ant-design-x-vue 0.1.2 → 0.1.3

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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![NPM version](https://img.shields.io/npm/v/ant-design-x-vue.svg?style=flat)](https://npmjs.org/package/ant-design-x-vue)
4
4
  [![NPM downloads](http://img.shields.io/npm/dm/ant-design-x-vue.svg?style=flat)](https://npmjs.org/package/ant-design-x-vue)
5
5
 
6
- Ant Design X For Vue.(WIP) 疯狂研发中🔥
6
+ Ant Design X For Vue. 🔥
7
7
 
8
8
  这里是[Ant Design X](https://github.com/ant-design/x)的Vue实现。
9
9
 
@@ -59,18 +59,7 @@ $ pnpm lint
59
59
 
60
60
  您的贡献至关重要!
61
61
 
62
- 现在Ant Desgin X Vue正在全力同步[Ant Design X](https://github.com/ant-design/x) 的组件,因此,协助我们同步组件是最好的贡献方式,在开始您的工作前,请遵照如下流程:
63
- 1. 在[Roadmap](https://github.com/wzc520pyfm/ant-design-x-vue/issues/1)中提及@wzc520pyfm认领一个组件,在得到答复后开始工作
64
- 2. Fork本仓库,并为你认领的组件创建一个开发分支,分支名和commit请遵守《通用提交规范》,建议在完成一个阶段性工作时就进行一次commit,不建议单个commit积累太多内容。
65
- 3. 目前完成一个新组件的大致工作如下(可参考`bubble`组件):
66
- 1. 对照react版本同步组件代码为Vue,尽量保障目录一致、代码结构一致
67
- 2. 编写demo,与React版demo一致
68
- 1. demo写在 docs/example/[component]/*目录下
69
- 3. 编写文档,与React版一致
70
- 1. 文档写在docs/component/*目录下
71
- 4. 提交pr到本仓库main分支,等待审核
72
-
73
- 除此之外,我们仍有很多事要做,您也可以参考Roadmap,从中挑选您感兴趣的部分。
62
+ 您可以参考[Roadmap](https://github.com/wzc520pyfm/ant-design-x-vue/issues/1),从中挑选您感兴趣的部分。
74
63
 
75
64
  ## Contributors
76
65
 
package/dist/index.mjs CHANGED
@@ -7312,6 +7312,7 @@ const vd = /* @__PURE__ */ I({
7312
7312
  },
7313
7313
  items: null,
7314
7314
  overflow: null,
7315
+ beforeUpload: null,
7315
7316
  onChange: {
7316
7317
  type: Function
7317
7318
  }
package/dist/index.umd.js CHANGED
@@ -110,7 +110,7 @@ summary tabindex target title type usemap value width wmode wrap onCopy onCut on
110
110
  }
111
111
  `;function Po(e){return e&&e.getRootNode&&e.getRootNode()}function Es(e){return un()?Po(e)instanceof ShadowRoot:!1}function Rs(e){return Es(e)?Po(e):null}var Ms=function(){var t=bo(),n=t.prefixCls,r=t.csp,o=a.getCurrentInstance(),i=Os;n&&(i=i.replace(/anticon/g,n.value)),a.nextTick(function(){if(un()){var l=o.vnode.el,s=Rs(l);Ns(i,"@ant-design-vue-icons",{prepend:!0,csp:r.value,attachTo:s})}})},Is=["icon","primaryColor","secondaryColor"];function Bs(e,t){if(e==null)return{};var n=Hs(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Hs(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function gt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Vs(e,o,n[o])})}return e}function Vs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var We=a.reactive({primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1});function Ls(e){var t=e.primaryColor,n=e.secondaryColor;We.primaryColor=t,We.secondaryColor=n||No(t),We.calculated=!!n}function js(){return gt({},We)}var he=function(t,n){var r=gt({},t,n.attrs),o=r.icon,i=r.primaryColor,l=r.secondaryColor,s=Bs(r,Is),c=We;if(i&&(c={primaryColor:i,secondaryColor:l||No(i)}),As($o(o),"icon should be icon definiton, but got ".concat(o)),!$o(o))return null;var d=o;return d&&typeof d.icon=="function"&&(d=gt({},d,{icon:d.icon(c.primaryColor,c.secondaryColor)})),mn(d.icon,"svg-".concat(d.name),gt({},s,{"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};he.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},he.inheritAttrs=!1,he.displayName="IconBase",he.getTwoToneColors=js,he.setTwoToneColors=Ls;function zs(e,t){return ks(e)||Xs(e,t)||Ds(e,t)||Fs()}function Fs(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
112
112
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ds(e,t){if(e){if(typeof e=="string")return Ao(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ao(e,t)}}function Ao(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xs(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,l,s;try{for(n=n.call(e);!(o=(l=n.next()).done)&&(r.push(l.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function ks(e){if(Array.isArray(e))return e}function Oo(e){var t=To(e),n=zs(t,2),r=n[0],o=n[1];return he.setTwoToneColors({primaryColor:r,secondaryColor:o})}function Ws(){var e=he.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var Gs=a.defineComponent({name:"InsertStyles",setup:function(){return Ms(),function(){return null}}}),qs=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function Us(e,t){return Qs(e)||Ys(e,t)||Zs(e,t)||Ks()}function Ks(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
113
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zs(e,t){if(e){if(typeof e=="string")return Eo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Eo(e,t)}}function Eo(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ys(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,l,s;try{for(n=n.call(e);!(o=(l=n.next()).done)&&(r.push(l.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function Qs(e){if(Array.isArray(e))return e}function Ro(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Ge(e,o,n[o])})}return e}function Ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Js(e,t){if(e==null)return{};var n=_s(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _s(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}Oo(zl.primary);var H=function(t,n){var r,o=Ro({},t,n.attrs),i=o.class,l=o.icon,s=o.spin,c=o.rotate,d=o.tabindex,f=o.twoToneColor,u=o.onClick,m=Js(o,qs),p=bo(),g=p.prefixCls,h=p.rootClassName,y=(r={},Ge(r,h.value,!!h.value),Ge(r,g.value,!0),Ge(r,"".concat(g.value,"-").concat(l.name),!!l.name),Ge(r,"".concat(g.value,"-spin"),!!s||l.name==="loading"),r),v=d;v===void 0&&u&&(v=-1);var $=c?{msTransform:"rotate(".concat(c,"deg)"),transform:"rotate(".concat(c,"deg)")}:void 0,C=To(f),S=Us(C,2),x=S[0],w=S[1];return a.createVNode("span",Ro({role:"img","aria-label":l.name},m,{onClick:u,class:[y,i],tabindex:v}),[a.createVNode(he,{icon:l,primaryColor:x,secondaryColor:w,style:$},null),a.createVNode(Gs,null,null)])};H.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:[String,Array]},H.displayName="AntdIcon",H.inheritAttrs=!1,H.getTwoToneColor=Ws,H.setTwoToneColor=Oo;var ec={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"};function Mo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){tc(e,o,n[o])})}return e}function tc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gn=function(t,n){var r=Mo({},t,n.attrs);return a.createVNode(H,Mo({},r,{icon:ec}),null)};gn.displayName="ArrowUpOutlined",gn.inheritAttrs=!1;var nc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M682 455V311l-76 76v68c-.1 50.7-42 92.1-94 92a95.8 95.8 0 01-52-15l-54 55c29.1 22.4 65.9 36 106 36 93.8 0 170-75.1 170-168z"}},{tag:"path",attrs:{d:"M833 446h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254-63 0-120.7-23-165-61l-54 54a334.01 334.01 0 00179 81v102H326c-13.9 0-24.9 14.3-25 32v36c.1 4.4 2.9 8 6 8h408c3.2 0 6-3.6 6-8v-36c0-17.7-11-32-25-32H547V782c165.3-17.9 294-157.9 294-328 0-4.4-3.6-8-8-8zm13.1-377.7l-43.5-41.9a8 8 0 00-11.2.1l-129 129C634.3 101.2 577 64 511 64c-93.9 0-170 75.3-170 168v224c0 6.7.4 13.3 1.2 19.8l-68 68A252.33 252.33 0 01258 454c-.2-4.4-3.8-8-8-8h-60c-4.4 0-8 3.6-8 8 0 53 12.5 103 34.6 147.4l-137 137a8.03 8.03 0 000 11.3l42.7 42.7c3.1 3.1 8.2 3.1 11.3 0L846.2 79.8l.1-.1c3.1-3.2 3-8.3-.2-11.4zM417 401V232c0-50.6 41.9-92 94-92 46 0 84.1 32.3 92.3 74.7L417 401z"}}]},name:"audio-muted",theme:"outlined"};function Io(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){rc(e,o,n[o])})}return e}function rc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pn=function(t,n){var r=Io({},t,n.attrs);return a.createVNode(H,Io({},r,{icon:nc}),null)};pn.displayName="AudioMutedOutlined",pn.inheritAttrs=!1;var oc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"}}]},name:"audio",theme:"outlined"};function Bo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){ac(e,o,n[o])})}return e}function ac(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yn=function(t,n){var r=Bo({},t,n.attrs);return a.createVNode(H,Bo({},r,{icon:oc}),null)};yn.displayName="AudioOutlined",yn.inheritAttrs=!1;var ic={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"};function Ho(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){lc(e,o,n[o])})}return e}function lc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bn=function(t,n){var r=Ho({},t,n.attrs);return a.createVNode(H,Ho({},r,{icon:ic}),null)};bn.displayName="ClearOutlined",bn.inheritAttrs=!1;var sc={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};function Vo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){cc(e,o,n[o])})}return e}function cc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Sn=function(t,n){var r=Vo({},t,n.attrs);return a.createVNode(H,Vo({},r,{icon:sc}),null)};Sn.displayName="CloseCircleFilled",Sn.inheritAttrs=!1;var dc={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};function Lo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){uc(e,o,n[o])})}return e}function uc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Cn=function(t,n){var r=Lo({},t,n.attrs);return a.createVNode(H,Lo({},r,{icon:dc}),null)};Cn.displayName="CloseOutlined",Cn.inheritAttrs=!1;var fc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};function jo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){hc(e,o,n[o])})}return e}function hc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vn=function(t,n){var r=jo({},t,n.attrs);return a.createVNode(H,jo({},r,{icon:fc}),null)};vn.displayName="EllipsisOutlined",vn.inheritAttrs=!1;var mc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM575.34 477.84l-61.22 102.3L452.3 477.8a12 12 0 00-10.27-5.79h-38.44a12 12 0 00-6.4 1.85 12 12 0 00-3.75 16.56l82.34 130.42-83.45 132.78a12 12 0 00-1.84 6.39 12 12 0 0012 12h34.46a12 12 0 0010.21-5.7l62.7-101.47 62.3 101.45a12 12 0 0010.23 5.72h37.48a12 12 0 006.48-1.9 12 12 0 003.62-16.58l-83.83-130.55 85.3-132.47a12 12 0 001.9-6.5 12 12 0 00-12-12h-35.7a12 12 0 00-10.29 5.84z"}}]},name:"file-excel",theme:"filled"};function zo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){gc(e,o,n[o])})}return e}function gc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xn=function(t,n){var r=zo({},t,n.attrs);return a.createVNode(H,zo({},r,{icon:mc}),null)};xn.displayName="FileExcelFilled",xn.inheritAttrs=!1;var pc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7L639.4 73.4c-6-6-14.2-9.4-22.7-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.6-9.4-22.6zM400 402c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40zm296 294H328c-6.7 0-10.4-7.7-6.3-12.9l99.8-127.2a8 8 0 0112.6 0l41.1 52.4 77.8-99.2a8 8 0 0112.6 0l136.5 174c4.3 5.2.5 12.9-6.1 12.9zm-94-370V137.8L790.2 326H602z"}}]},name:"file-image",theme:"filled"};function Fo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){yc(e,o,n[o])})}return e}function yc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wn=function(t,n){var r=Fo({},t,n.attrs);return a.createVNode(H,Fo({},r,{icon:pc}),null)};wn.displayName="FileImageFilled",wn.inheritAttrs=!1;var bc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM426.13 600.93l59.11 132.97a16 16 0 0014.62 9.5h24.06a16 16 0 0014.63-9.51l59.1-133.35V758a16 16 0 0016.01 16H641a16 16 0 0016-16V486a16 16 0 00-16-16h-34.75a16 16 0 00-14.67 9.62L512.1 662.2l-79.48-182.59a16 16 0 00-14.67-9.61H383a16 16 0 00-16 16v272a16 16 0 0016 16h27.13a16 16 0 0016-16V600.93z"}}]},name:"file-markdown",theme:"filled"};function Do(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Sc(e,o,n[o])})}return e}function Sc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $n=function(t,n){var r=Do({},t,n.attrs);return a.createVNode(H,Do({},r,{icon:bc}),null)};$n.displayName="FileMarkdownFilled",$n.inheritAttrs=!1;var Cc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM633.22 637.26c-15.18-.5-31.32.67-49.65 2.96-24.3-14.99-40.66-35.58-52.28-65.83l1.07-4.38 1.24-5.18c4.3-18.13 6.61-31.36 7.3-44.7.52-10.07-.04-19.36-1.83-27.97-3.3-18.59-16.45-29.46-33.02-30.13-15.45-.63-29.65 8-33.28 21.37-5.91 21.62-2.45 50.07 10.08 98.59-15.96 38.05-37.05 82.66-51.2 107.54-18.89 9.74-33.6 18.6-45.96 28.42-16.3 12.97-26.48 26.3-29.28 40.3-1.36 6.49.69 14.97 5.36 21.92 5.3 7.88 13.28 13 22.85 13.74 24.15 1.87 53.83-23.03 86.6-79.26 3.29-1.1 6.77-2.26 11.02-3.7l11.9-4.02c7.53-2.54 12.99-4.36 18.39-6.11 23.4-7.62 41.1-12.43 57.2-15.17 27.98 14.98 60.32 24.8 82.1 24.8 17.98 0 30.13-9.32 34.52-23.99 3.85-12.88.8-27.82-7.48-36.08-8.56-8.41-24.3-12.43-45.65-13.12zM385.23 765.68v-.36l.13-.34a54.86 54.86 0 015.6-10.76c4.28-6.58 10.17-13.5 17.47-20.87 3.92-3.95 8-7.8 12.79-12.12 1.07-.96 7.91-7.05 9.19-8.25l11.17-10.4-8.12 12.93c-12.32 19.64-23.46 33.78-33 43-3.51 3.4-6.6 5.9-9.1 7.51a16.43 16.43 0 01-2.61 1.42c-.41.17-.77.27-1.13.3a2.2 2.2 0 01-1.12-.15 2.07 2.07 0 01-1.27-1.91zM511.17 547.4l-2.26 4-1.4-4.38c-3.1-9.83-5.38-24.64-6.01-38-.72-15.2.49-24.32 5.29-24.32 6.74 0 9.83 10.8 10.07 27.05.22 14.28-2.03 29.14-5.7 35.65zm-5.81 58.46l1.53-4.05 2.09 3.8c11.69 21.24 26.86 38.96 43.54 51.31l3.6 2.66-4.39.9c-16.33 3.38-31.54 8.46-52.34 16.85 2.17-.88-21.62 8.86-27.64 11.17l-5.25 2.01 2.8-4.88c12.35-21.5 23.76-47.32 36.05-79.77zm157.62 76.26c-7.86 3.1-24.78.33-54.57-12.39l-7.56-3.22 8.2-.6c23.3-1.73 39.8-.45 49.42 3.07 4.1 1.5 6.83 3.39 8.04 5.55a4.64 4.64 0 01-1.36 6.31 6.7 6.7 0 01-2.17 1.28z"}}]},name:"file-pdf",theme:"filled"};function Xo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){vc(e,o,n[o])})}return e}function vc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Nn=function(t,n){var r=Xo({},t,n.attrs);return a.createVNode(H,Xo({},r,{icon:Cc}),null)};Nn.displayName="FilePdfFilled",Nn.inheritAttrs=!1;var xc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM468.53 760v-91.54h59.27c60.57 0 100.2-39.65 100.2-98.12 0-58.22-39.58-98.34-99.98-98.34H424a12 12 0 00-12 12v276a12 12 0 0012 12h32.53a12 12 0 0012-12zm0-139.33h34.9c47.82 0 67.19-12.93 67.19-50.33 0-32.05-18.12-50.12-49.87-50.12h-52.22v100.45z"}}]},name:"file-ppt",theme:"filled"};function ko(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){wc(e,o,n[o])})}return e}function wc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Tn=function(t,n){var r=ko({},t,n.attrs);return a.createVNode(H,ko({},r,{icon:xc}),null)};Tn.displayName="FilePptFilled",Tn.inheritAttrs=!1;var $c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM320 482a8 8 0 00-8 8v48a8 8 0 008 8h384a8 8 0 008-8v-48a8 8 0 00-8-8H320zm0 136a8 8 0 00-8 8v48a8 8 0 008 8h184a8 8 0 008-8v-48a8 8 0 00-8-8H320z"}}]},name:"file-text",theme:"filled"};function Wo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Nc(e,o,n[o])})}return e}function Nc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pn=function(t,n){var r=Wo({},t,n.attrs);return a.createVNode(H,Wo({},r,{icon:$c}),null)};Pn.displayName="FileTextFilled",Pn.inheritAttrs=!1;var Tc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM512 566.1l52.81 197a12 12 0 0011.6 8.9h31.77a12 12 0 0011.6-8.88l74.37-276a12 12 0 00.4-3.12 12 12 0 00-12-12h-35.57a12 12 0 00-11.7 9.31l-45.78 199.1-49.76-199.32A12 12 0 00528.1 472h-32.2a12 12 0 00-11.64 9.1L434.6 680.01 388.5 481.3a12 12 0 00-11.68-9.29h-35.39a12 12 0 00-3.11.41 12 12 0 00-8.47 14.7l74.17 276A12 12 0 00415.6 772h31.99a12 12 0 0011.59-8.9l52.81-197z"}}]},name:"file-word",theme:"filled"};function Go(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Pc(e,o,n[o])})}return e}function Pc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var An=function(t,n){var r=Go({},t,n.attrs);return a.createVNode(H,Go({},r,{icon:Tc}),null)};An.displayName="FileWordFilled",An.inheritAttrs=!1;var Ac={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM296 136v64h64v-64h-64zm64 64v64h64v-64h-64zm-64 64v64h64v-64h-64zm64 64v64h64v-64h-64zm-64 64v64h64v-64h-64zm64 64v64h64v-64h-64zm-64 64v64h64v-64h-64zm0 64v160h128V584H296zm48 48h32v64h-32v-64z"}}]},name:"file-zip",theme:"filled"};function qo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Oc(e,o,n[o])})}return e}function Oc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var On=function(t,n){var r=qo({},t,n.attrs);return a.createVNode(H,qo({},r,{icon:Ac}),null)};On.displayName="FileZipFilled",On.inheritAttrs=!1;var Ec={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};function Uo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Rc(e,o,n[o])})}return e}function Rc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pt=function(t,n){var r=Uo({},t,n.attrs);return a.createVNode(H,Uo({},r,{icon:Ec}),null)};pt.displayName="LeftOutlined",pt.inheritAttrs=!1;var Mc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};function Ko(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Ic(e,o,n[o])})}return e}function Ic(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var En=function(t,n){var r=Ko({},t,n.attrs);return a.createVNode(H,Ko({},r,{icon:Mc}),null)};En.displayName="PlusOutlined",En.inheritAttrs=!1;var Bc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};function Zo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Hc(e,o,n[o])})}return e}function Hc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yt=function(t,n){var r=Zo({},t,n.attrs);return a.createVNode(H,Zo({},r,{icon:Bc}),null)};yt.displayName="RightOutlined",yt.inheritAttrs=!1;const Vc=a.defineComponent({name:"AXConversationsItem",__name:"ConversationsItem",props:{info:null,prefixCls:null,direction:null,menu:null,active:{type:Boolean},onClick:{type:Function}},setup(e){const t=K(e,["prefixCls","info","class","direction","onClick","active","menu"]);a.toRef(e,"class");const n=a.computed(()=>Me(t,{aria:!0,data:!0,attr:!0})),r=m=>{m.stopPropagation()},o=a.computed(()=>e.info.disabled),[i,l]=L(!1),[s,c]=L(!1),d=a.computed(()=>N(e.class,`${e.prefixCls}-item`,{[`${e.prefixCls}-item-active`]:e.active&&!o.value},{[`${e.prefixCls}-item-disabled`]:o.value})),f=()=>{!o.value&&e.onClick&&e.onClick(e.info)},u=m=>{m&&c(!m)};return()=>a.createVNode(E.Tooltip,{title:e.info.label,open:i.value&&s.value,onOpenChange:c,placement:e.direction==="rtl"?"left":"right"},{default:()=>[a.createVNode("li",a.mergeProps(n.value,{class:d.value,onClick:f}),[e.info.icon&&a.createVNode("div",{class:`${e.prefixCls}-icon`},[e.info.icon]),a.createVNode(E.Typography.Text,{class:`${e.prefixCls}-label`,ellipsis:{onEllipsis:l},content:e.info.label},null),e.menu&&!o.value&&a.createVNode(E.Dropdown,{placement:e.direction==="rtl"?"bottomLeft":"bottomRight",trigger:["click"],disabled:o.value,onOpenChange:u},{default:()=>a.createVNode(vn,{onClick:r,disabled:o.value,class:`${e.prefixCls}-menu-icon`},null),overlay:()=>a.createVNode(E.Menu,e.menu,null)})])]})}}),Yo=Symbol("GroupTitleContext"),Rn=a.shallowRef(),Lc=e=>{a.provide(Yo,e),a.watch(e,()=>{Rn.value=a.unref(e),a.triggerRef(Rn)},{immediate:!0,deep:!0})},jc=()=>a.inject(Yo,a.computed(()=>Rn.value||{})),zc=a.defineComponent({props:{value:ne()},setup(e,{slots:t}){return Lc(a.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),Qo=a.defineComponent({name:"AXConversationsGroupTitle",__name:"GroupTitle",setup(e){const t=a.useSlots(),n=jc(),r=a.computed(()=>{var o;return(o=t.default)==null?void 0:o.call(t)});return()=>a.createVNode("div",{class:N(`${n.value.prefixCls}-group-title`)},[r.value&&a.createVNode(E.Typography.Text,null,{default:()=>[r.value]})])}});function Jo(e,t){const{defaultValue:n,value:r=a.ref()}=t||{};let o=typeof e=="function"?e():e;r.value!==void 0&&(o=a.unref(r)),n!==void 0&&(o=typeof n=="function"?n():n);const i=a.ref(o),l=a.ref(o);a.watchEffect(()=>{let c=r.value!==void 0?r.value:i.value;t.postState&&(c=t.postState(c)),l.value=c});function s(c){const d=l.value;i.value=c,a.toRaw(l.value)!==c&&t.onChange&&t.onChange(c,d)}return a.watch(r,()=>{i.value=r.value}),[l,s]}const Mn="__ungrouped",Fc=(e,t=[])=>{const n=a.computed(()=>{if(!a.toValue(e))return{enableGroup:!1,sort:void 0,title:void 0};let r={sort:void 0,title:void 0};return typeof a.toValue(e)=="object"&&(r={...r,...a.toValue(e)}),{enableGroup:!0,sort:r.sort,title:r.title}});return a.computed(()=>{if(!n.value.enableGroup)return{groupList:[{name:Mn,data:a.toValue(t),title:void 0}],enableGroup:n.value.enableGroup};const r=a.toValue(t).reduce((l,s)=>{const c=s.group||Mn;return l[c]||(l[c]=[]),l[c].push(s),l},{});return{groupList:(n.value.sort?Object.keys(r).sort(n.value.sort):Object.keys(r)).map(l=>({name:l===Mn?void 0:l,title:n.value.title,data:r[l]})),enableGroup:n.value.enableGroup}})},Dc=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexDirection:"column",gap:e.paddingXXS,overflowY:"auto",padding:e.paddingSM,[`&${t}-rtl`]:{direction:"rtl"},[`& ${t}-list`]:{display:"flex",gap:e.paddingXXS,flexDirection:"column",paddingLeft:0,[`& ${t}-item`]:{paddingInlineStart:e.paddingXL},[`& ${t}-label`]:{color:e.colorTextDescription}},[`& ${t}-item`]:{display:"flex",height:e.controlHeightLG,minHeight:e.controlHeightLG,gap:e.paddingXS,padding:`0 ${Z(e.paddingXS)}`,alignItems:"center",borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,"&:hover":{backgroundColor:e.colorBgTextHover},"&-active":{backgroundColor:e.colorBgTextHover,[`& ${t}-label, ${t}-menu-icon`]:{color:e.colorText}},"&-disabled":{cursor:"not-allowed",[`& ${t}-label`]:{color:e.colorTextDisabled}},"&:hover, &-active":{[`& ${t}-menu-icon`]:{opacity:1}}},[`& ${t}-label`]:{flex:1,color:e.colorText},[`& ${t}-menu-icon`]:{opacity:0,fontSize:e.fontSizeXL},[`& ${t}-group-title`]:{display:"flex",alignItems:"center",height:e.controlHeightLG,minHeight:e.controlHeightLG,padding:`0 ${Z(e.paddingXS)}`}}}},Xc=fe("Conversations",e=>{const t=ee(e,{});return Dc(t)},()=>({})),kc=a.defineComponent({name:"AXConversations",__name:"Conversations",props:a.mergeDefaults({items:null,activeKey:null,defaultActiveKey:null,onActiveChange:{type:Function},menu:{type:Function},groupable:{type:Boolean},styles:null,classNames:null,prefixCls:null,rootClassName:null},{styles:()=>({}),classNames:()=>({})}),setup(e){const t=K(e,["prefixCls","rootClassName","items","activeKey","defaultActiveKey","onActiveChange","menu","styles","classNames","groupable","class","style"]);a.toRef(e,"class"),a.toRef(e,"activeKey"),a.toRef(e,"prefixCls");const n=a.ref(e.activeKey),r=a.computed(()=>Me(t,{attr:!0,aria:!0,data:!0})),[o,i]=Jo(e.defaultActiveKey,{value:n});a.watch(()=>e.activeKey,()=>{n.value=e.activeKey});const l=Fc(()=>e.groupable,()=>e.items),{getPrefixCls:s,direction:c}=W(),d=a.computed(()=>s("conversations",e.prefixCls)),f=se("conversations"),[u,m,p]=Xc(d),g=a.computed(()=>N(d.value,f.value.className,e.class,e.rootClassName,m.value,p,{[`${d.value}-rtl`]:c.value==="rtl"})),h=y=>{i(y.key),e.onActiveChange&&e.onActiveChange(y.key)};return()=>u(a.createVNode("ul",a.mergeProps(r.value,{style:{...typeof f.value.style=="object"?f.value.style:{},...typeof e.style=="object"?e.style:{}},class:g.value}),[l.value.groupList.map((y,v)=>{const $=y.data.map((C,S)=>a.createVNode(Vc,{key:C.key||`key-${S}`,info:C,prefixCls:d.value,direction:c.value,class:N(e.classNames.item,f.value.classNames.item),style:{...f.value.styles.item,...e.styles.item},menu:typeof e.menu=="function"?e.menu(C):e.menu,active:o.value===C.key,onClick:h},null));return l.value.enableGroup?a.createVNode("li",{key:y.name||`key-${v}`},[a.createVNode(zc,{value:{prefixCls:d.value}},{default:()=>{var C;return[((C=y.title)==null?void 0:C.call(y,y.name,{components:{GroupTitle:Qo}}))||a.createVNode(Qo,{key:y.name},{default:()=>[y.name]})]}}),a.createVNode("ul",{class:`${d.value}-list`},[$])]):$})]))}}),Wc=e=>{const{componentCls:t,calc:n}=e,r=n(e.fontSizeHeading3).mul(e.lineHeightHeading3).equal(),o=n(e.fontSize).mul(e.lineHeight).equal();return{[t]:{gap:e.padding,[`${t}-icon`]:{height:n(r).add(o).add(e.paddingXXS).equal(),display:"flex",img:{height:"100%"}},[`${t}-content-wrapper`]:{gap:e.paddingXS,flex:"auto",minWidth:0,[`${t}-title-wrapper`]:{gap:e.paddingXS},[`${t}-title`]:{margin:0},[`${t}-extra`]:{marginInlineStart:"auto"}}}}},Gc=e=>{const{componentCls:t}=e;return{[t]:{"&-filled":{paddingInline:e.padding,paddingBlock:e.paddingSM,background:e.colorFillContent,borderRadius:e.borderRadiusLG},"&-borderless":{[`${t}-title`]:{fontSize:e.fontSizeHeading3,lineHeight:e.lineHeightHeading3}}}}},qc=fe("Welcome",e=>{const t=ee(e,{});return[Wc(t),Gc(t)]},()=>({})),Uc=a.defineComponent({name:"AXWelcome",__name:"Welcome",props:a.mergeDefaults({prefixCls:null,rootClassName:null,className:null,style:null,variant:null,classNames:null,styles:null,icon:null,title:null,description:null,extra:null},{variant:"filled",classNames:()=>({}),styles:()=>({})}),setup(e){a.toRef(e,"prefixCls");const{direction:t,getPrefixCls:n}=W(),r=n("welcome",e.prefixCls),o=se("welcome"),[i,l,s]=qc(r),c=a.computed(()=>{if(!e.icon)return null;let u=e.icon;return typeof e.icon=="string"&&e.icon.startsWith("http")&&(u=a.createVNode("img",{src:e.icon,alt:"icon"},null)),a.createVNode("div",{class:N(`${r}-icon`,o.value.classNames.icon,e.classNames.icon),style:e.styles.icon},[u])}),d=a.computed(()=>e.title?a.createVNode(E.Typography.Title,{level:4,class:N(`${r}-title`,o.value.classNames.title,e.classNames.title),style:e.styles.title},{default:()=>[e.title]}):null),f=a.computed(()=>e.extra?a.createVNode("div",{class:N(`${r}-extra`,o.value.classNames.extra,e.classNames.extra),style:e.styles.extra},[e.extra]):null);return()=>i(a.createVNode(E.Flex,{class:N(r,o.value.className,e.className,e.rootClassName,l.value,s,`${r}-${e.variant}`,{[`${r}-rtl`]:t.value==="rtl"}),style:e.style},{default:()=>[c.value,a.createVNode(E.Flex,{vertical:!0,class:`${r}-content-wrapper`},{default:()=>[e.extra?a.createVNode(E.Flex,{align:"flex-start",class:`${r}-title-wrapper`},{default:()=>[d.value,f.value]}):d.value,e.description&&a.createVNode(E.Typography.Text,{class:N(`${r}-description`,o.value.classNames.description,e.classNames.description),style:e.styles.description},{default:()=>[e.description]})]})]}))}}),Kc=e=>{const{componentCls:t}=e;return{[t]:{"&, & *":{boxSizing:"border-box"},maxWidth:"100%",[`&${t}-rtl`]:{direction:"rtl"},[`& ${t}-title`]:{marginBlockStart:0,fontWeight:"normal",color:e.colorTextTertiary},[`& ${t}-list`]:{display:"flex",gap:e.paddingSM,overflowX:"scroll","&::-webkit-scrollbar":{display:"none"},listStyle:"none",paddingInlineStart:0,marginBlock:0,alignItems:"stretch","&-wrap":{flexWrap:"wrap"},"&-vertical":{flexDirection:"column",alignItems:"flex-start"}},[`${t}-item`]:{flex:"none",display:"flex",gap:e.paddingXS,height:"auto",paddingBlock:e.paddingSM,paddingInline:e.padding,alignItems:"flex-start",justifyContent:"flex-start",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,transition:["border","background"].map(n=>`${n} ${e.motionDurationSlow}`).join(","),border:`${Z(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,[`&:not(${t}-item-has-nest)`]:{"&:hover":{cursor:"pointer",background:e.colorFillTertiary},"&:active":{background:e.colorFill}},[`${t}-content`]:{flex:"auto",minWidth:0,display:"flex",gap:e.paddingXXS,flexDirection:"column",alignItems:"flex-start"},[`${t}-icon, ${t}-label, ${t}-desc`]:{margin:0,padding:0,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start",whiteSpace:"normal"},[`${t}-label`]:{color:e.colorTextHeading,fontWeight:500},[`${t}-label + ${t}-desc`]:{color:e.colorTextTertiary},[`&${t}-item-disabled`]:{pointerEvents:"none",background:e.colorBgContainerDisabled,[`${t}-label, ${t}-desc`]:{color:e.colorTextTertiary}}}}}},Zc=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-item-has-nest`]:{[`> ${t}-content`]:{[`> ${t}-label`]:{fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}}},[`&${t}-nested`]:{marginTop:e.paddingXS,alignSelf:"stretch",[`${t}-list`]:{alignItems:"stretch"},[`${t}-item`]:{border:0,background:e.colorFillQuaternary}}}}},Yc=fe("Prompts",e=>{const t=ee(e,{});return[Kc(t),Zc(t)]},()=>({})),_o=a.defineComponent({name:"AXPrompts",__name:"Prompts",props:a.mergeDefaults({items:null,title:null,onItemClick:{type:Function},vertical:{type:Boolean},wrap:{type:Boolean},styles:null,classNames:null,prefixCls:null,rootClassName:null},{styles:()=>({}),classNames:()=>({})}),setup(e){const t=K(e,["prefixCls","title","class","items","onItemClick","vertical","wrap","rootClassName","styles","classNames","style"]);a.toRef(e,"class"),a.toRef(e,"prefixCls");const{getPrefixCls:n,direction:r}=W(),o=n("prompts",e.prefixCls),i=se("prompts"),[l,s,c]=Yc(o),d=a.computed(()=>N(o,i.value.className,e.class,e.rootClassName,s.value,c,{[`${o}-rtl`]:r.value==="rtl"})),f=a.computed(()=>N(`${o}-list`,i.value.classNames.list,e.classNames.list,{[`${o}-list-wrap`]:e.wrap},{[`${o}-list-vertical`]:e.vertical}));return()=>{var u;return l(a.createVNode("div",a.mergeProps(t,{class:d.value,style:{...typeof e.style=="object"?e.style:{},...typeof i.value.style=="object"?i.value.style:{}}}),[e.title&&a.createVNode(E.Typography.Title,{level:5,class:N(`${o}-title`,i.value.classNames.title,e.classNames.title),style:{...i.value.styles.title,...e.styles.title}},{default:()=>[e.title]}),a.createVNode("div",{class:f.value,style:{...i.value.styles.list,...e.styles.list}},[(u=e.items)==null?void 0:u.map((m,p)=>{const g=m.children&&m.children.length>0;return a.createVNode("div",{key:m.key||`key_${p}`,style:{...i.value.styles.item,...e.styles.item},class:N(`${o}-item`,i.value.classNames.item,e.classNames.item,{[`${o}-item-disabled`]:m.disabled,[`${o}-item-has-nest`]:g}),onClick:()=>{!g&&e.onItemClick&&e.onItemClick({data:m})}},[m.icon&&a.createVNode("div",{class:`${o}-icon`},[m.icon]),a.createVNode("div",{class:N(`${o}-content`,i.value.classNames.itemContent,e.classNames.itemContent),style:{...i.value.styles.itemContent,...e.styles.itemContent}},[m.label&&a.createVNode("h6",{class:`${o}-label`},[m.label]),m.description&&a.createVNode("p",{class:`${o}-desc`},[m.description]),g&&a.createVNode(_o,{class:`${o}-nested`,items:m.children,vertical:!0,onItemClick:e.onItemClick,classNames:{list:e.classNames.subList,item:e.classNames.subItem},styles:{list:e.styles.subList,item:e.styles.subItem}},null)])])})])]))}}}),Qc=e=>{const{componentCls:t,antCls:n}=e;return{[t]:{[`${n}-cascader-menus ${n}-cascader-menu`]:{height:"auto"},[`${t}-item`]:{"&-icon":{marginInlineEnd:e.paddingXXS},"&-extra":{marginInlineStart:e.padding}},[`&${t}-block`]:{[`${t}-item-extra`]:{marginInlineStart:"auto"}}}}},Jc=fe("Suggestion",e=>{const t=ee(e,{});return Qc(t)},()=>({}));function _c(e,t,n,r,o){const[i,l]=L([]),s=(p,g=i.value)=>{let h=a.toValue(e);for(let y=0;y<p-1;y+=1){const v=g[y],$=h.find(C=>C.value===v);if(!$)break;h=$.children||[]}return h},c=p=>p.map((g,h)=>{const v=s(h+1,p).find($=>$.value===g);return v==null?void 0:v.value}),d=p=>{const g=i.value.length||1,h=s(g),y=h.findIndex(C=>C.value===i.value[g-1]),v=h.length,$=h[(y+p+v)%v];l([...i.value.slice(0,g-1),$.value])},f=()=>{i.value.length>1&&l(i.value.slice(0,i.value.length-1))},u=()=>{const p=s(i.value.length+1);p.length&&l([...i.value,p[0].value])},m=mt(p=>{if(a.toValue(t))switch(console.log("e.key",p),p.key){case"ArrowDown":d(1),p.preventDefault();break;case"ArrowUp":d(-1),p.preventDefault();break;case"ArrowRight":a.toValue(n)?f():u(),p.preventDefault();break;case"ArrowLeft":a.toValue(n)?u():f(),p.preventDefault();break;case"Enter":s(i.value.length+1).length||r(c(i.value)),p.preventDefault();break;case"Escape":o(),p.preventDefault();break}});return a.watch(()=>a.toValue(t),()=>{a.toValue(t)&&l([a.toValue(e)[0].value])},{immediate:!0}),[i,m]}const ed=a.defineComponent({name:"AXSuggestion",__name:"Suggestion",props:a.mergeDefaults({prefixCls:null,className:null,rootClassName:null,style:null,children:{type:Function},open:{type:Boolean},onOpenChange:{type:Function},items:{type:Function},onSelect:{type:Function},block:{type:Boolean},styles:null,classNames:null},{open:!1}),setup(e){a.toRef(e,"prefixCls");const{direction:t,getPrefixCls:n}=W(),r=a.computed(()=>n("suggestion",e.prefixCls));`${r.value}`;const o=a.computed(()=>t.value==="rtl"),i=se("suggestion"),[l,s,c]=Jc(r),[d,f]=L(e.open),[u,m]=L(),p=x=>{var w;f(x),(w=e.onOpenChange)==null||w.call(e,x)},g=x=>{x===!1?p(!1):(m(x),p(!0))},h=()=>{p(!1)},y=a.computed(()=>typeof e.items=="function"?e.items(u.value):e.items),v=x=>{e.onSelect&&e.onSelect(x[x.length-1]),p(!1)},[$,C]=_c(y,d,o,v,h),S=a.computed(()=>{var x;return(x=e.children)==null?void 0:x.call(e,{onTrigger:g,onKeyDown:C})});return()=>l(a.createVNode(E.Cascader,{options:y.value,open:d.value,value:$.value,placement:o.value?"topRight":"topLeft",onDropdownVisibleChange:x=>{x||h()},class:N(e.rootClassName,r.value,s,c,{[`${r.value}-block`]:e.block}),onChange:v,dropdownMatchSelectWidth:e.block},{default:()=>a.createVNode("div",{class:N(r.value,i.value.className,e.rootClassName,e.className,`${r.value}-wrapper`,s.value,c),style:{...i.value.style,...e.style}},[S.value])}))}}),ea=Symbol("SenderHeaderContext"),In=a.shallowRef(),td=e=>{a.provide(ea,e),a.watch(e,()=>{In.value=a.unref(e),a.triggerRef(In)},{immediate:!0,deep:!0})},nd=()=>a.inject(ea,a.computed(()=>In.value||{})),rd=a.defineComponent({props:{value:ne()},setup(e,{slots:t}){return td(a.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),ta=Symbol("ActionButtonContext"),Bn=a.shallowRef(),od=e=>{a.provide(ta,e),a.watch(e,()=>{Bn.value=a.unref(e),a.triggerRef(Bn)},{immediate:!0,deep:!0})},Hn=()=>a.inject(ta,a.computed(()=>Bn.value||{})),ad=a.defineComponent({props:{value:ne()},setup(e,{slots:t}){return od(a.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),bt=a.defineComponent({name:"AXSenderActionButton",__name:"index",props:{action:null},setup(e){const t=K(e,["action","onClick"]);a.toRef(e,"onClick");const n=a.useSlots(),r=Hn(),o=a.computed(()=>{var f;const s=r.value.disabled,c=t.disabled,d=(f=r.value)==null?void 0:f[`${e.action}Disabled`];return s??c??d}),i=a.computed(()=>r.value.prefixCls),l=a.computed(()=>{var s;return(s=r.value)==null?void 0:s[e.action]});return()=>a.createVNode(E.Button,a.mergeProps({type:"text"},t,{onClick:s=>{o.value||(l.value&&l.value(),e.onClick&&!Array.isArray(e.onClick)&&e.onClick(s))},class:N(i.value,{[`${i.value}-disabled`]:o.value})}),{icon:()=>n.default()})}}),id=a.defineComponent({name:"AXSenderClearButton",__name:"ClearButton",props:{prefixCls:{},type:{},htmlType:{},shape:{},size:{},loading:{type:[Boolean,Object]},disabled:{type:Boolean},ghost:{type:Boolean},block:{type:Boolean},danger:{type:Boolean},icon:{},href:{},target:{},title:{},onClick:{type:[Function,Array]},onMousedown:{type:[Function,Array]}},setup(e){const t=e;return()=>a.createVNode(bt,a.mergeProps(t,{action:"onClear"}),{default:()=>[a.createVNode(bn,null,null)]})}}),ld=a.defineComponent({name:"AXSenderStopLoading",__name:"StopLoading",props:{className:null},setup(e){const t=e;return()=>a.createVNode("svg",{color:"currentColor",viewBox:"0 0 1000 1000",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",class:t.className},[a.createVNode("title",null,[a.createTextVNode("Stop Loading")]),a.createVNode("rect",{fill:"currentColor",height:"250",rx:"24",ry:"24",width:"250",x:"375",y:"375"},null),a.createVNode("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor","stroke-width":"100",opacity:"0.45"},null),a.createVNode("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor","stroke-width":"100","stroke-dasharray":"600 9999999"},[a.createVNode("animateTransform",{attributeName:"transform",dur:"1s",from:"0 500 500",repeatCount:"indefinite",to:"360 500 500",type:"rotate"},null)])])}}),na=a.defineComponent({name:"AXSenderLoadingButton",__name:"LoadingButton",props:{prefixCls:{},type:{},htmlType:{},shape:{},size:{},loading:{type:[Boolean,Object]},disabled:{type:Boolean},ghost:{type:Boolean},block:{type:Boolean},danger:{type:Boolean},icon:{},href:{},target:{},title:{},onClick:{type:[Function,Array]},onMousedown:{type:[Function,Array]}},setup(e){const t=e,n=Hn();return()=>a.createVNode(bt,a.mergeProps({icon:null,type:"primary",shape:"circle"},t,{class:N(`${n.value.prefixCls}-loading-button`),action:"onCancel"}),{default:()=>[a.createVNode(ld,{className:`${n.value.prefixCls}-loading-icon`},null)]})}}),ra=a.defineComponent({name:"AXSenderLoadingButton",__name:"SendButton",props:{prefixCls:{},type:{},htmlType:{},shape:{},size:{},loading:{type:[Boolean,Object]},disabled:{type:Boolean},ghost:{type:Boolean},block:{type:Boolean},danger:{type:Boolean},icon:{},href:{},target:{},title:{},onClick:{type:[Function,Array]},onMousedown:{type:[Function,Array]}},setup(e){const t=e;return()=>a.createVNode(bt,a.mergeProps({type:"primary",shape:"circle"},t,{action:"onSend"}),{default:()=>[a.createVNode(gn,null,null)]})}}),qe=1e3,Ue=4,St=140,Ct=250,oa=500,vt=.8,sd=a.defineComponent({name:"AXSenderRecordingIcon",__name:"RecordingIcon",props:{className:null},setup(e){const t=St/2;return()=>a.createVNode("svg",{color:"currentColor",viewBox:`0 0 ${qe} ${qe}`,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",class:e.className},[a.createVNode("title",null,[a.createTextVNode("Speech Recording")]),Array.from({length:Ue}).map((n,r)=>{const o=(qe-St*Ue)/(Ue-1),i=r*(o+St),l=qe/2-Ct/2,s=qe/2-oa/2;return a.createVNode("rect",{fill:"currentColor",rx:t,ry:t,height:Ct,width:St,x:i,y:l,key:r},[a.createVNode("animate",{attributeName:"height",values:`${Ct}; ${oa}; ${Ct}`,keyTimes:"0; 0.5; 1",dur:`${vt}s`,begin:`${vt/Ue*r}s`,repeatCount:"indefinite"},null),a.createVNode("animate",{attributeName:"y",values:`${l}; ${s}; ${l}`,keyTimes:"0; 0.5; 1",dur:`${vt}s`,begin:`${vt/Ue*r}s`,repeatCount:"indefinite"},null)])})])}}),cd=a.defineComponent({name:"AXSenderSpeechButton",__name:"index",props:{prefixCls:{},type:{},htmlType:{},shape:{},size:{},loading:{type:[Boolean,Object]},disabled:{type:Boolean},ghost:{type:Boolean},block:{type:Boolean},danger:{type:Boolean},icon:{},href:{},target:{},title:{},onClick:{type:[Function,Array]},onMousedown:{type:[Function,Array]}},setup(e){const t=e,n=Hn(),r=a.computed(()=>n.value.speechRecording),o=a.computed(()=>n.value.prefixCls),i=a.computed(()=>{let l;return r.value?l=a.createVNode(sd,{className:`${o.value}-recording-icon`},null):n.value.onSpeechDisabled?l=a.createVNode(pn,null,null):l=a.createVNode(yn,null,null),l});return()=>a.createVNode(bt,a.mergeProps({icon:null,type:"primary"},t,{style:{display:"flex",justifyContent:"center",alignItems:"center"},action:"onSpeech"}),{default:()=>[i.value]})}}),dd=e=>{const{componentCls:t,calc:n}=e,r=`${t}-header`;return{[t]:{[r]:{borderBottomWidth:e.lineWidth,borderBottomStyle:"solid",borderBottomColor:e.colorBorder,"&-header":{background:e.colorFillAlter,fontSize:e.fontSize,lineHeight:e.lineHeight,paddingBlock:n(e.paddingSM).sub(e.lineWidthBold).equal(),paddingInlineStart:e.padding,paddingInlineEnd:e.paddingXS,display:"flex",[`${r}-title`]:{flex:"auto"}},"&-content":{padding:e.padding},"&-motion":{transition:["height","border"].map(o=>`${o} ${e.motionDurationSlow}`).join(","),overflow:"hidden","&-enter-start, &-leave-active":{borderBottomColor:"transparent"},"&-hidden":{display:"none"}},"&-collapse-transition":{"&-enter-active":{transition:["max-height","padding-top","padding-bottom"].map(o=>`${o} ${e.motionDurationSlow} ${e.motionEaseInOut}`).join(",")},"&-leave-active":{transition:["max-height","padding-top","padding-bottom"].map(o=>`${o} ${e.motionDurationSlow} ${e.motionEaseInOut}`).join(",")}}}}}},ud=e=>{const{componentCls:t,padding:n,paddingSM:r,paddingXS:o,lineWidth:i,lineWidthBold:l,calc:s}=e;return{[t]:{position:"relative",width:"100%",boxSizing:"border-box",boxShadow:`${e.boxShadowTertiary}`,transition:`background ${e.motionDurationSlow}`,borderRadius:{_skip_check_:!0,value:s(e.borderRadius).mul(2).equal()},borderColor:e.colorBorder,borderWidth:0,borderStyle:"solid","&:after":{content:'""',position:"absolute",inset:0,pointerEvents:"none",transition:`border-color ${e.motionDurationSlow}`,borderRadius:{_skip_check_:!0,value:"inherit"},borderStyle:"inherit",borderColor:"inherit",borderWidth:i},"&:focus-within":{boxShadow:`${e.boxShadowSecondary}`,borderColor:e.colorPrimary,"&:after":{borderWidth:l}},"&-disabled":{background:e.colorBgContainerDisabled},[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{display:"flex",gap:o,width:"100%",paddingBlock:r,paddingInlineStart:n,paddingInlineEnd:r,boxSizing:"border-box",alignItems:"flex-end"},[`${t}-prefix`]:{flex:"none"},[`${t}-input`]:{padding:0,borderRadius:0,flex:"auto",alignSelf:"center",minHeight:"auto"},[`${t}-actions-list`]:{flex:"none",display:"flex","&-presets":{gap:e.paddingXS}},[`${t}-actions-btn`]:{"&-disabled":{opacity:.45},"&-loading-button":{padding:0,border:0},"&-loading-icon":{height:e.controlHeight,width:e.controlHeight,verticalAlign:"top"},"&-recording-icon":{height:"1.2em",width:"1.2em",verticalAlign:"top"}}}}},fd=fe("Sender",e=>{const{paddingXS:t,calc:n}=e,r=ee(e,{SenderContentMaxWidth:`calc(100% - ${Z(n(t).add(32).equal())})`});return[ud(r),dd(r)]},()=>({}));let xt;!xt&&typeof window<"u"&&(xt=window.SpeechRecognition||window.webkitSpeechRecognition);function hd(e,t){const n=e,r=a.computed(()=>{const h=a.toValue(t);return typeof h=="object"?{controlledRecording:h.recording,onControlledRecordingChange:h.onRecordingChange,speechInControlled:typeof h.recording=="boolean"}:{controlledRecording:void 0,onControlledRecordingChange:void 0,speechInControlled:!1}}),o=a.computed(()=>r.value.controlledRecording),i=r.value.onControlledRecordingChange,l=r.value.speechInControlled,s=a.ref(null);a.watchEffect(()=>{if(typeof navigator<"u"&&"permissions"in navigator){let h=null;navigator.permissions.query({name:"microphone"}).then(y=>{s.value=y.state,y.onchange=function(){s.value=this.state},h=y}),a.onWatcherCleanup(()=>{h&&(h.onchange=null)})}});const c=a.computed(()=>xt&&s.value!=="denied"),d=a.ref(null),[f,u]=Jo(!1,{value:o}),m=a.ref(!1),p=()=>{if(c.value&&!d.value){const h=new xt;h.onstart=()=>{u(!0)},h.onend=()=>{u(!1)},h.onresult=y=>{var v,$,C;if(!m.value){const S=(C=($=(v=y.results)==null?void 0:v[0])==null?void 0:$[0])==null?void 0:C.transcript;n(S)}m.value=!1},d.value=h}};return{speechPermission:c,triggerSpeech:h=>{h&&!f.value||(m.value=h,l?i==null||i(!f.value):(p(),d.value&&(f.value?(d.value.stop(),i==null||i(!1)):(d.value.start(),i==null||i(!0)))))},recording:f}}function md(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}const gd=a.defineComponent({name:"AXSender",__name:"Sender",props:{onKeyPress:{},prefixCls:{},defaultValue:{},value:{},loading:{type:Boolean},placeholder:{},readOnly:{type:Boolean},submitType:{type:[String,Boolean],default:"enter"},disabled:{type:Boolean,default:void 0},onSubmit:{},onChange:{},onCancel:{},onKeyDown:{},onPaste:{},onPasteFile:{},components:{},styles:{default:()=>({})},rootClassName:{},classNames:{default:()=>({})},style:{},className:{},actions:{},allowSpeech:{},prefix:{},header:{}},emits:["update:value"],setup(e,{expose:t,emit:n}){const r=K(e,["prefixCls","styles","classNames","className","rootClassName","style","defaultValue","value","placeholder","readOnly","submitType","onSubmit","loading","components","onCancel","onChange","actions","onKeyPress","onKeyDown","disabled","allowSpeech","prefix","header","onPaste","onPasteFile"]);a.toRef(e,"prefixCls");function o(A,z,le){return md(A,z)||le}const i=n,l=a.useSlots(),{direction:s,getPrefixCls:c}=W(),d=a.computed(()=>c("sender",e.prefixCls)),f=a.ref(null),u=a.ref(null),m=se("sender"),p=a.computed(()=>`${d.value}-input`),[g,h,y]=fd(d.value),v=a.computed(()=>N(d.value,m.value.className,e.className,e.rootClassName,h.value,y,{[`${d.value}-rtl`]:s.value==="rtl",[`${d.value}-disabled`]:e.disabled})),$=a.computed(()=>`${d.value}-actions-btn`),C=a.computed(()=>`${d.value}-actions-list`),S=a.ref(e.value??e.defaultValue??""),x=A=>{S.value=A};a.watch(()=>e.value,()=>{x(e.value)});const w=(A,z)=>{x(A),i("update:value",A),e.onChange&&e.onChange(A,z)},{speechPermission:b,triggerSpeech:T,recording:P}=hd(A=>{w(`${S.value} ${A}`)},()=>e.allowSpeech),O=o(e.components,["input"],E.Input.TextArea),M=a.computed(()=>Me(r,{attr:!0,aria:!0,data:!0})),k=a.computed(()=>({...M.value,ref:u})),I=()=>{S.value&&e.onSubmit&&!e.loading&&e.onSubmit(S.value)},V=()=>{w("")},X=a.ref(!1),J=()=>{X.value=!0},Ie=()=>{X.value=!1},Un=A=>{const z=A.key==="Enter"&&!X.value;switch(e.submitType){case"enter":z&&!A.shiftKey&&(A.preventDefault(),I());break;case"shiftEnter":z&&A.shiftKey&&(A.preventDefault(),I());break}e.onKeyPress&&e.onKeyPress(A)},xe=A=>{var le,Qe;const z=(le=A.clipboardData)==null?void 0:le.files[0];z&&e.onPasteFile&&(e.onPasteFile(z),A.preventDefault()),(Qe=e.onPaste)==null||Qe.call(e,A)},Be=A=>{var z,le;A.target!==((z=f.value)==null?void 0:z.querySelector(`.${p.value}`))&&A.preventDefault(),(le=u.value)==null||le.focus()},me=a.computed(()=>{let A=a.createVNode(E.Flex,{class:`${C.value}-presets`},{default:()=>[e.allowSpeech&&a.createVNode(cd,null,null),e.loading?a.createVNode(na,null,null):a.createVNode(ra,null,null)]});const z={components:{SendButton:ra,ClearButton:id,LoadingButton:na}};return l.actions?A=l.actions({ori:A,info:z}):typeof e.actions=="function"?A=e.actions(A,z):e.actions&&(A=e.actions),A}),Tt=a.computed(()=>l.header?l.header():e.header),Ye=a.computed(()=>l.prefix?l.prefix():e.prefix);return t({nativeElement:f.value,focus:A=>{var z;return(z=u.value)==null?void 0:z.focus(A)},blur:()=>{var A;return(A=u.value)==null?void 0:A.blur()}}),()=>g(a.createVNode("div",{ref:f,class:v.value,style:{...m.value.style,...e.style}},[Tt.value&&a.createVNode(rd,{value:{prefixCls:d.value}},{default:()=>[Tt.value]}),a.createVNode("div",{class:`${d.value}-content`,onMousedown:Be},[Ye.value&&a.createVNode("div",{class:N(`${d.value}-prefix`,m.value.classNames.prefix,e.classNames.prefix),style:{...m.value.styles.prefix,...e.styles.prefix}},[Ye.value]),a.createVNode(O,a.mergeProps(k.value,{disabled:e.disabled,style:{...m.value.styles.input,...e.styles.input},class:N(p.value,m.value.classNames.input,e.classNames.input),autoSize:{maxRows:8},value:S.value,onChange:A=>{w(A.target.value,A),T(!0)},onPressEnter:Un,onCompositionstart:J,onCompositionend:Ie,onKeydown:e.onKeyDown,placeholder:e.placeholder,onPaste:xe,bordered:!1,readOnly:e.readOnly}),null),a.createVNode("div",{class:N(C.value,m.value.classNames.actions,e.classNames.actions),style:{...m.value.styles.actions,...e.styles.actions}},[a.createVNode(ad,{value:{prefixCls:$.value,onSend:I,onSendDisabled:!S.value,onClear:V,onClearDisabled:!S.value,onCancel:e.onCancel,onCancelDisabled:!e.loading,onSpeech:()=>T(!1),onSpeechDisabled:!b.value,speechRecording:P.value,disabled:e.disabled}},{default:()=>[me.value]})])])]))}}),pd=a.defineComponent({name:"AXCollapseTransition",__name:"CollapseTransition",props:{prefixCls:null},setup(e){const t=e,n=a.computed(()=>t.prefixCls+"-collapse-transition"),r={beforeEnter(o){o.dataset||(o.dataset={}),o.dataset.oldPaddingTop=o.style.paddingTop,o.dataset.oldPaddingBottom=o.style.paddingBottom,o.style.maxHeight=0,o.style.paddingTop=0,o.style.paddingBottom=0},enter(o){o.dataset.oldOverflow=o.style.overflow,o.scrollHeight!==0?(o.style.maxHeight=`${o.scrollHeight}px`,o.style.paddingTop=o.dataset.oldPaddingTop,o.style.paddingBottom=o.dataset.oldPaddingBottom):(o.style.maxHeight=`${o.dataset.oldMaxHeight||999}px`,o.style.paddingTop=o.dataset.oldPaddingTop,o.style.paddingBottom=o.dataset.oldPaddingBottom),o.style.overflow="hidden"},afterEnter(o){o.style.maxHeight="",o.style.overflow=o.dataset.oldOverflow},beforeLeave(o){o.dataset||(o.dataset={}),o.dataset.oldMaxHeight=o.scrollHeight,o.dataset.oldPaddingTop=o.style.paddingTop,o.dataset.oldPaddingBottom=o.style.paddingBottom,o.dataset.oldOverflow=o.style.overflow,o.style.overflow="hidden",o.style.maxHeight=`${o.scrollHeight}px`},leave(o){o.scrollHeight!==0&&(o.style.maxHeight=0,o.style.paddingTop=0,o.style.paddingBottom=0)},afterLeave(o){o.style.maxHeight="",o.style.overflow=o.dataset.oldOverflow,o.style.paddingTop=o.dataset.oldPaddingTop,o.style.paddingBottom=o.dataset.oldPaddingBottom}};return(o,i)=>(a.openBlock(),a.createBlock(a.Transition,a.mergeProps({name:n.value},a.toHandlers(r)),{default:a.withCtx(()=>[a.renderSlot(o.$slots,"default")]),_:3},16,["name"]))}}),yd=a.defineComponent({name:"AXSenderHeader",inheritAttrs:!1,__name:"SenderHeader",props:a.mergeDefaults({forceRender:{type:Boolean},open:{type:Boolean},onOpenChange:{type:Function},title:null,children:null,className:null,style:null,classNames:null,styles:null,closable:{type:Boolean}},{classNames:()=>({}),styles:()=>({})}),setup(e){a.toRef(e,"classNames");const t=a.useSlots(),n=nd(),r=a.computed(()=>`${n.value.prefixCls}-header`),o=a.useAttrs();return()=>a.createVNode(pd,{prefixCls:r.value},{default:()=>{var i;return[e.open&&a.createVNode("div",a.mergeProps(o,{class:N(r.value,e.className),style:{...e.style}}),[(e.closable!==!1||e.title)&&a.createVNode("div",{class:N(`${r.value}-header`,e.classNames.header),style:{...e.styles.header}},[a.createVNode("div",{class:`${r.value}-title`},[e.title]),e.closable!==!1&&a.createVNode("div",{class:`${r.value}-close`},[a.createVNode(E.Button,{type:"text",icon:a.createVNode(Cn,null,null),size:"small",onClick:()=>{var l;(l=e.onOpenChange)==null||l.call(e,!e.open)}},null)])]),t.default&&a.createVNode("div",{class:N(`${r.value}-content`,e.classNames.content),style:{...e.styles.content}},[(i=t.default)==null?void 0:i.call(t)])])]}})}}),bd=Object.assign(gd,{Header:yd}),aa=Symbol("AttachmentContext"),Vn=a.shallowRef(),Sd=e=>{a.provide(aa,e),a.watch(e,()=>{Vn.value=a.unref(e),a.triggerRef(Vn)},{immediate:!0,deep:!0})},wt=()=>a.inject(aa,a.computed(()=>Vn.value||{})),Cd=a.defineComponent({inheritAttrs:!1,props:{value:ne()},setup(e,{slots:t}){return Sd(a.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),vd=a.defineComponent({name:"AXAttachmentsPlaceholderUploader",__name:"PlaceholderUploader",props:a.mergeDefaults({prefixCls:null,placeholder:null,upload:null,className:null,style:null},{placeholder:()=>({})}),setup(e,{expose:t}){const n=`${e.prefixCls}-placeholder`,r=a.computed(()=>e.placeholder||{}),o=a.useTemplateRef("upload-dragger"),i=wt(),[l,s]=L(!1),c=()=>{s(!0)},d=m=>{m.currentTarget.contains(m.relatedTarget)||s(!1)},f=()=>{s(!1)};t({nativeElement:o});const u=a.computed(()=>a.isVNode(e.placeholder)?e.placeholder:a.createVNode(E.Flex,{align:"center",justify:"center",vertical:!0,class:`${n}-inner`},{default:()=>[a.createVNode(E.Typography.Text,{class:`${n}-icon`},{default:()=>[r.value.icon]}),a.createVNode(E.Typography.Title,{class:`${n}-title`,level:5},{default:()=>[r.value.title]}),a.createVNode(E.Typography.Text,{class:`${n}-description`,type:"secondary"},{default:()=>[r.value.description]})]}));return()=>a.createVNode("div",{class:N(n,{[`${n}-drag-in`]:l.value,[`${n}-disabled`]:i.value.disabled},e.className),onDragenter:c,onDragleave:d,onDrop:f,"aria-hidden":i.value.disabled,style:e.style},[a.createVNode(E.Upload.Dragger,a.mergeProps({showUploadList:!1},e.upload,{ref:"upload-dragger",style:{padding:0,border:0,background:"transparent"}}),{default:()=>[u.value]})])}}),ia=a.defineComponent({name:"AXAttachmentsDropArea",__name:"DropArea",props:{prefixCls:null,className:null,getDropContainer:{type:Function},children:null},setup(e){const t=wt(),[n,r]=L(),[o,i]=L(null);a.watch(()=>e.getDropContainer,()=>{var d;const c=(d=e.getDropContainer)==null?void 0:d.call(e);n.value!==c&&r(c)}),a.watch(()=>!!n.value,()=>{if(n.value){const c=()=>{i(!0)},d=m=>{m.preventDefault()},f=m=>{m.relatedTarget||i(!1)},u=m=>{i(!1),m.preventDefault()};document.addEventListener("dragenter",c),document.addEventListener("dragover",d),document.addEventListener("dragleave",f),document.addEventListener("drop",u),a.onWatcherCleanup(()=>{document.removeEventListener("dragenter",c),document.removeEventListener("dragover",d),document.removeEventListener("dragleave",f),document.removeEventListener("drop",u)})}});const l=a.computed(()=>e.getDropContainer&&n.value&&!t.value.disabled),s=`${e.prefixCls}-drop-area`;return()=>l.value?a.createVNode(a.Teleport,{to:n.value},{default:()=>[a.createVNode("div",{class:N(s,e.className,{[`${s}-on-body`]:n.value.tagName==="BODY"}),style:{display:o.value?"block":"none"}},[e.children])]}):null}}),la=a.defineComponent({name:"AXAttachmentsSilentUploader",__name:"SilentUploader",props:{children:null,upload:null,rootClassName:null},setup(e,{expose:t}){const n=a.useTemplateRef("upload");return t({nativeElement:n}),()=>a.createVNode(E.Upload,a.mergeProps(e.upload,{showUploadList:!1,ref:"upload"}),{default:()=>[e.children]})}}),sa=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},xd={},wd={width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function $d(e,t){return a.openBlock(),a.createElementBlock("svg",wd,t[0]||(t[0]=[a.createElementVNode("title",null,"audio",-1),a.createElementVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[a.createElementVNode("path",{d:"M14.1178571,4.0125 C14.225,4.11964286 14.2857143,4.26428571 14.2857143,4.41607143 L14.2857143,15.4285714 C14.2857143,15.7446429 14.0303571,16 13.7142857,16 L2.28571429,16 C1.96964286,16 1.71428571,15.7446429 1.71428571,15.4285714 L1.71428571,0.571428571 C1.71428571,0.255357143 1.96964286,0 2.28571429,0 L9.86964286,0 C10.0214286,0 10.1678571,0.0607142857 10.275,0.167857143 L14.1178571,4.0125 Z M10.7315824,7.11216117 C10.7428131,7.15148751 10.7485063,7.19218979 10.7485063,7.23309113 L10.7485063,8.07742614 C10.7484199,8.27364959 10.6183424,8.44607275 10.4296853,8.50003683 L8.32984514,9.09986306 L8.32984514,11.7071803 C8.32986605,12.5367078 7.67249692,13.217028 6.84345686,13.2454634 L6.79068592,13.2463395 C6.12766108,13.2463395 5.53916361,12.8217001 5.33010655,12.1924966 C5.1210495,11.563293 5.33842118,10.8709227 5.86959669,10.4741173 C6.40077221,10.0773119 7.12636292,10.0652587 7.67042486,10.4442027 L7.67020842,7.74937024 L7.68449368,7.74937024 C7.72405122,7.59919041 7.83988806,7.48101083 7.98924584,7.4384546 L10.1880418,6.81004755 C10.42156,6.74340323 10.6648954,6.87865515 10.7315824,7.11216117 Z M9.60714286,1.31785714 L12.9678571,4.67857143 L9.60714286,4.67857143 L9.60714286,1.31785714 Z",fill:"currentColor"})],-1)]))}const Nd=sa(xd,[["render",$d]]),Td={},Pd={width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function Ad(e,t){return a.openBlock(),a.createElementBlock("svg",Pd,t[0]||(t[0]=[a.createElementVNode("title",null,"video",-1),a.createElementVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[a.createElementVNode("path",{d:"M14.1178571,4.0125 C14.225,4.11964286 14.2857143,4.26428571 14.2857143,4.41607143 L14.2857143,15.4285714 C14.2857143,15.7446429 14.0303571,16 13.7142857,16 L2.28571429,16 C1.96964286,16 1.71428571,15.7446429 1.71428571,15.4285714 L1.71428571,0.571428571 C1.71428571,0.255357143 1.96964286,0 2.28571429,0 L9.86964286,0 C10.0214286,0 10.1678571,0.0607142857 10.275,0.167857143 L14.1178571,4.0125 Z M12.9678571,4.67857143 L9.60714286,1.31785714 L9.60714286,4.67857143 L12.9678571,4.67857143 Z M10.5379461,10.3101106 L6.68957555,13.0059749 C6.59910784,13.0693494 6.47439406,13.0473861 6.41101953,12.9569184 C6.3874624,12.9232903 6.37482581,12.8832269 6.37482581,12.8421686 L6.37482581,7.45043999 C6.37482581,7.33998304 6.46436886,7.25043999 6.57482581,7.25043999 C6.61588409,7.25043999 6.65594753,7.26307658 6.68957555,7.28663371 L10.5379461,9.98249803 C10.6284138,10.0458726 10.6503772,10.1705863 10.5870027,10.2610541 C10.5736331,10.2801392 10.5570312,10.2967411 10.5379461,10.3101106 Z",fill:"currentColor"})],-1)]))}const Od=sa(Td,[["render",Ad]]),Ed=e=>e.indexOf("image/")===0,$t=200;function Rd(e){return new Promise(t=>{if(!e||!e.type||!Ed(e.type)){t("");return}const n=new Image;if(n.onload=()=>{const{width:r,height:o}=n,i=r/o,l=i>1?$t:$t*i,s=i>1?$t/i:$t,c=document.createElement("canvas");c.width=l,c.height=s,c.style.cssText=`position: fixed; left: 0; top: 0; width: ${l}px; height: ${s}px; z-index: 9999; display: none;`,document.body.appendChild(c),c.getContext("2d").drawImage(n,0,0,l,s);const f=c.toDataURL();document.body.removeChild(c),window.URL.revokeObjectURL(n.src),t(f)},n.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const r=new FileReader;r.onload=()=>{r.result&&typeof r.result=="string"&&(n.src=r.result)},r.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){const r=new FileReader;r.onload=()=>{r.result&&t(r.result)},r.readAsDataURL(e)}else n.src=window.URL.createObjectURL(e)})}function Ke(e){"@babel/helpers - typeof";return Ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ke(e)}function Md(e,t){if(Ke(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ke(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Id(e){var t=Md(e,"string");return Ke(t)=="symbol"?t:t+""}function U(e,t,n){return(t=Id(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const F=Math.round;function Ln(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(o=>parseFloat(o));for(let o=0;o<3;o+=1)r[o]=t(r[o]||0,n[o]||"",o);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const ca=(e,t,n)=>n===0?e:e/100;function Ze(e,t){const n=t||255;return e>n?n:e<0?0:e}class jn{constructor(t){U(this,"isValid",!0),U(this,"r",0),U(this,"g",0),U(this,"b",0),U(this,"a",1),U(this,"_h",void 0),U(this,"_s",void 0),U(this,"_l",void 0),U(this,"_v",void 0),U(this,"_max",void 0),U(this,"_min",void 0),U(this,"_brightness",void 0);function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let o=function(i){return r.startsWith(i)};const r=t.trim();/^#?[A-F\d]{3,8}$/i.test(r)?this.fromHexString(r):o("rgb")?this.fromRgbString(r):o("hsl")?this.fromHslString(r):(o("hsv")||o("hsb"))&&this.fromHsvString(r)}else if(t instanceof jn)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=Ze(t.r),this.g=Ze(t.g),this.b=Ze(t.b),this.a=typeof t.a=="number"?Ze(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(i){const l=i/255;return l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),o=t(this.b);return .2126*n+.7152*r+.0722*o}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=F(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()-t/100;return o<0&&(o=0),this._c({h:n,s:r,l:o,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()+t/100;return o>1&&(o=1),this._c({h:n,s:r,l:o,a:this.a})}mix(t,n=50){const r=this._c(t),o=n/100,i=s=>(r[s]-this[s])*o+this[s],l={r:F(i("r")),g:F(i("g")),b:F(i("b")),a:F(i("a")*100)/100};return this._c(l)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),o=i=>F((this[i]*this.a+n[i]*n.a*(1-this.a))/r);return this._c({r:o("r"),g:o("g"),b:o("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const o=(this.b||0).toString(16);if(t+=o.length===2?o:"0"+o,typeof this.a=="number"&&this.a>=0&&this.a<1){const i=F(this.a*255).toString(16);t+=i.length===2?i:"0"+i}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=F(this.getSaturation()*100),r=F(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const o=this.clone();return o[t]=Ze(n,r),o}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function r(o,i){return parseInt(n[o]+n[i||o],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:t,s:n,l:r,a:o}){if(this._h=t%360,this._s=n,this._l=r,this.a=typeof o=="number"?o:1,n<=0){const m=F(r*255);this.r=m,this.g=m,this.b=m}let i=0,l=0,s=0;const c=t/60,d=(1-Math.abs(2*r-1))*n,f=d*(1-Math.abs(c%2-1));c>=0&&c<1?(i=d,l=f):c>=1&&c<2?(i=f,l=d):c>=2&&c<3?(l=d,s=f):c>=3&&c<4?(l=f,s=d):c>=4&&c<5?(i=f,s=d):c>=5&&c<6&&(i=d,s=f);const u=r-d/2;this.r=F((i+u)*255),this.g=F((l+u)*255),this.b=F((s+u)*255)}fromHsv({h:t,s:n,v:r,a:o}){this._h=t%360,this._s=n,this._v=r,this.a=typeof o=="number"?o:1;const i=F(r*255);if(this.r=i,this.g=i,this.b=i,n<=0)return;const l=t/60,s=Math.floor(l),c=l-s,d=F(r*(1-n)*255),f=F(r*(1-n*c)*255),u=F(r*(1-n*(1-c))*255);switch(s){case 0:this.g=u,this.b=d;break;case 1:this.r=f,this.b=d;break;case 2:this.r=d,this.b=u;break;case 3:this.r=d,this.g=f;break;case 4:this.r=u,this.g=d;break;case 5:default:this.g=d,this.b=f;break}}fromHsvString(t){const n=Ln(t,ca);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=Ln(t,ca);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=Ln(t,(r,o)=>o.includes("%")?F(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}const Bd=e=>{const{componentCls:t,calc:n}=e,r=`${t}-list-card`,o=n(e.fontSize).mul(e.lineHeight).mul(2).add(e.paddingSM).add(e.paddingSM).equal();return{[r]:{borderRadius:e.borderRadius,position:"relative",background:e.colorFillContent,borderWidth:e.lineWidth,borderStyle:"solid",borderColor:"transparent",flex:"none",[`${r}-name,${r}-desc`]:{display:"flex",flexWrap:"nowrap",maxWidth:"100%"},[`${r}-ellipsis-prefix`]:{flex:"0 1 auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},[`${r}-ellipsis-suffix`]:{flex:"none"},"&-type-overview":{padding:n(e.paddingSM).sub(e.lineWidth).equal(),paddingInlineStart:n(e.padding).add(e.lineWidth).equal(),display:"flex",flexWrap:"nowrap",gap:e.paddingXS,alignItems:"flex-start",width:236,[`${r}-icon`]:{fontSize:n(e.fontSizeLG).mul(2).equal(),lineHeight:1,paddingTop:n(e.paddingXXS).mul(1.5).equal(),flex:"none"},[`${r}-content`]:{flex:"auto",minWidth:0,display:"flex",flexDirection:"column",alignItems:"stretch"},[`${r}-desc`]:{color:e.colorTextTertiary}},"&-type-preview":{width:o,height:o,lineHeight:1,[`&:not(${r}-status-error)`]:{border:0},img:{width:"100%",height:"100%",verticalAlign:"top",objectFit:"cover",borderRadius:"inherit"},[`${r}-img-mask`]:{position:"absolute",inset:0,display:"flex",justifyContent:"center",alignItems:"center",background:`rgba(0, 0, 0, ${e.opacityLoading})`,borderRadius:"inherit"},[`&${r}-status-error`]:{[`img, ${r}-img-mask`]:{borderRadius:n(e.borderRadius).sub(e.lineWidth).equal()},[`${r}-desc`]:{paddingInline:e.paddingXXS}},[`${r}-progress`]:{}},[`${r}-remove`]:{position:"absolute",top:0,insetInlineEnd:0,border:0,padding:e.paddingXXS,background:"transparent",lineHeight:1,transform:"translate(50%, -50%)",fontSize:e.fontSize,cursor:"pointer",opacity:e.opacityLoading,display:"none","&:dir(rtl)":{transform:"translate(-50%, -50%)"},"&:hover":{opacity:1},"&:active":{opacity:e.opacityLoading}},[`&:hover ${r}-remove`]:{display:"block"},"&-status-error":{borderColor:e.colorError,[`${r}-desc`]:{color:e.colorError}},"&-motion":{overflow:"hidden",transition:["opacity","width","margin","padding"].map(i=>`${i} ${e.motionDurationSlow}`).join(","),[`${r}-remove`]:{display:"none !important"},"&-appear-start":{width:0,transition:"none"},"&-leave-active":{opacity:0,width:0,paddingInline:0,borderInlineWidth:0,marginInlineEnd:n(e.paddingSM).mul(-1).equal()}}}}},zn={"&, *":{boxSizing:"border-box"}},Hd=e=>{const{componentCls:t,calc:n,antCls:r}=e,o=`${t}-drop-area`,i=`${t}-placeholder`;return{[o]:{position:"absolute",inset:0,zIndex:e.zIndexPopupBase,...zn,"&-on-body":{position:"fixed",inset:0},"&-hide-placement":{[`${i}-inner`]:{display:"none"}},[i]:{padding:0}},"&":{[i]:{height:"100%",borderRadius:e.borderRadius,borderWidth:e.lineWidthBold,borderStyle:"dashed",borderColor:"transparent",padding:e.padding,position:"relative",backdropFilter:"blur(10px)",...zn,[`${r}-upload-wrapper ${r}-upload${r}-upload-btn`]:{padding:0},[`&${i}-drag-in`]:{borderColor:e.colorPrimaryHover},[`&${i}-disabled`]:{opacity:.25,pointerEvents:"none"},[`${i}-inner`]:{gap:n(e.paddingXXS).div(2).equal()},[`${i}-icon`]:{fontSize:e.fontSizeHeading2,lineHeight:1},[`${i}-title${i}-title`]:{margin:0,fontSize:e.fontSize,lineHeight:e.lineHeight},[`${i}-description`]:{}}}}},Vd=e=>{const{componentCls:t,calc:n}=e,r=`${t}-list`,o=n(e.fontSize).mul(e.lineHeight).mul(2).add(e.paddingSM).add(e.paddingSM).equal();return{[t]:{position:"relative",width:"100%",...zn,[r]:{display:"flex",flexWrap:"wrap",gap:e.paddingSM,fontSize:e.fontSize,lineHeight:e.lineHeight,color:e.colorText,paddingBlock:e.paddingSM,paddingInline:e.padding,width:"100%",background:e.colorBgContainer,scrollbarWidth:"none","-ms-overflow-style":"none","&::-webkit-scrollbar":{display:"none"},"&-overflow-scrollX, &-overflow-scrollY":{"&:before, &:after":{content:'""',position:"absolute",opacity:0,transition:`opacity ${e.motionDurationSlow}`,zIndex:1}},"&-overflow-ping-start:before":{opacity:1},"&-overflow-ping-end:after":{opacity:1},"&-overflow-scrollX":{overflowX:"auto",overflowY:"hidden",flexWrap:"nowrap","&:before, &:after":{insetBlock:0,width:8},"&:before":{insetInlineStart:0,background:"linear-gradient(to right, rgba(0,0,0,0.06), rgba(0,0,0,0));"},"&:after":{insetInlineEnd:0,background:"linear-gradient(to left, rgba(0,0,0,0.06), rgba(0,0,0,0));"},"&:dir(rtl)":{"&:before":{background:"linear-gradient(to left, rgba(0,0,0,0.06), rgba(0,0,0,0));"},"&:after":{background:"linear-gradient(to right, rgba(0,0,0,0.06), rgba(0,0,0,0));"}}},"&-overflow-scrollY":{overflowX:"hidden",overflowY:"auto",maxHeight:n(o).mul(3).equal(),"&:before, &:after":{insetInline:0,height:8},"&:before":{insetBlockStart:0,background:"linear-gradient(to bottom, rgba(0,0,0,0.06), rgba(0,0,0,0));"},"&:after":{insetBlockEnd:0,background:"linear-gradient(to top, rgba(0,0,0,0.06), rgba(0,0,0,0));"}},"&-upload-btn":{width:o,height:o,fontSize:e.fontSizeHeading2,color:"#999"},"&-prev-btn, &-next-btn":{position:"absolute",top:"50%",transform:"translateY(-50%)",boxShadow:e.boxShadowTertiary,opacity:0,pointerEvents:"none"},"&-prev-btn":{left:{_skip_check_:!0,value:e.padding}},"&-next-btn":{right:{_skip_check_:!0,value:e.padding}},"&:dir(ltr)":{[`&${r}-overflow-ping-start ${r}-prev-btn`]:{opacity:1,pointerEvents:"auto"},[`&${r}-overflow-ping-end ${r}-next-btn`]:{opacity:1,pointerEvents:"auto"}},"&:dir(rtl)":{[`&${r}-overflow-ping-end ${r}-prev-btn`]:{opacity:1,pointerEvents:"auto"},[`&${r}-overflow-ping-start ${r}-next-btn`]:{opacity:1,pointerEvents:"auto"}}}}}},da=fe("Attachments",e=>{const t=ee(e,{});return[Hd(t),Vd(t),Bd(t)]},e=>{const{colorBgContainer:t}=e;return{colorBgPlaceholderHover:new jn(t).setA(.85).toRgbString()}}),Fn=" ",Dn="#8c8c8c",ua=a.defineComponent({name:"AXAttachmentsFileListCard",__name:"FileListCard",props:{prefixCls:null,item:null,onRemove:{type:Function},className:null,style:null},setup(e,{expose:t}){a.toRef(e,"prefixCls");const n=["png","jpg","jpeg","gif","bmp","webp","svg"],r=[{icon:a.createVNode(xn,null,null),color:"#22b35e",ext:["xlsx","xls"]},{icon:a.createVNode(wn,null,null),color:Dn,ext:n},{icon:a.createVNode($n,null,null),color:Dn,ext:["md","mdx"]},{icon:a.createVNode(Nn,null,null),color:"#ff4d4f",ext:["pdf"]},{icon:a.createVNode(Tn,null,null),color:"#ff6e31",ext:["ppt","pptx"]},{icon:a.createVNode(An,null,null),color:"#1677ff",ext:["doc","docx"]},{icon:a.createVNode(On,null,null),color:"#fab714",ext:["zip","rar","7z","tar","gz"]},{icon:a.createVNode(Od,null,null),color:"#ff4d4f",ext:["mp4","avi","mov","wmv","flv","mkv"]},{icon:a.createVNode(Nd,null,null),color:"#8c8c8c",ext:["mp3","wav","flac","ape","aac","ogg"]}];function o(I,V){return V.some(X=>I.toLowerCase()===`.${X}`)}function i(I){let V=I;const X=["B","KB","MB","GB","TB","PB","EB"];let J=0;for(;V>=1024&&J<X.length-1;)V/=1024,J++;return`${V.toFixed(0)} ${X[J]}`}const l=wt(),s=a.computed(()=>l.value.disabled),c=a.computed(()=>e.item.name),d=a.computed(()=>e.item.size),f=a.computed(()=>e.item.percent),u=a.computed(()=>e.item.status||"done"),m=a.computed(()=>e.item.description),{getPrefixCls:p}=W(),g=a.computed(()=>p("attachment",e.prefixCls)),h=`${g.value}-list-card`,[y,v,$]=da(g),C=a.useTemplateRef("file-list-card-container"),S=a.computed(()=>{const I=c.value||"",V=I.match(/^(.*)\.[^.]+$/);return{namePrefix:V?V[1]:I,nameSuffix:V?I.slice(V[1].length):""}}),x=a.computed(()=>o(S.value.nameSuffix,n)),w=a.computed(()=>m.value?m.value:u.value==="uploading"?`${f.value||0}%`:u.value==="error"?e.item.response||Fn:d.value?i(d.value):Fn),b=a.computed(()=>{for(const{ext:I,icon:V,color:X}of r)if(o(S.value.nameSuffix,I))return{icon:V,iconColor:X};return{icon:a.createVNode(Pn,{key:"defaultIcon"},null),iconColor:Dn}}),[T,P]=L();a.watch(()=>e.item.originFileObj,()=>{if(e.item.originFileObj){let I=!0;Rd(e.item.originFileObj).then(V=>{I&&P(V)}),a.onWatcherCleanup(()=>{I=!1})}P(void 0)},{immediate:!0});const O=a.computed(()=>e.item.thumbUrl||e.item.url||T.value),M=a.computed(()=>x.value&&(e.item.originFileObj||O.value)),k=a.computed(()=>M.value?a.createVNode(a.Fragment,null,[a.createVNode("img",{alt:"preview",src:O.value},null),u.value!=="done"&&a.createVNode("div",{class:`${h}-img-mask`},[u.value==="uploading"&&f.value!==void 0&&a.createVNode(E.Progress,{percent:f.value,prefixCls:h},null),u.value==="error"&&a.createVNode("div",{class:`${h}-desc`},[a.createVNode("div",{class:`${h}-ellipsis-prefix`},[w.value])])])]):a.createVNode(a.Fragment,null,[a.createVNode("div",{class:`${h}-icon`,style:{color:b.value.iconColor}},[b.value.icon]),a.createVNode("div",{class:`${h}-content`},[a.createVNode("div",{class:`${h}-name`},[a.createVNode("div",{class:`${h}-ellipsis-prefix`},[S.value.namePrefix??Fn]),a.createVNode("div",{class:`${h}-ellipsis-suffix`},[S.value.nameSuffix])]),a.createVNode("div",{class:`${h}-desc`},[a.createVNode("div",{class:`${h}-ellipsis-prefix`},[w.value])])])]));return t({nativeElement:C}),()=>y(a.createVNode("div",{class:N(h,{[`${h}-status-${u.value}`]:u.value,[`${h}-type-preview`]:M.value,[`${h}-type-overview`]:!M.value},e.className,v.value,$),style:e.style,ref:"file-list-card-container"},[k.value,!s.value&&e.onRemove&&a.createVNode("button",{type:"button",class:`${h}-remove`,onClick:()=>{e.onRemove(e.item)}},[a.createVNode(Sn,null,null)])]))}}),fa=1,Ld=a.defineComponent({name:"AXAttachmentsFileList",__name:"FileList",props:{prefixCls:null,items:null,onRemove:{type:Function},overflow:null,upload:null,listClassName:null,listStyle:null,itemClassName:null,itemStyle:null},setup(e){const t=a.computed(()=>`${e.prefixCls}-list`),n=a.useTemplateRef("file-list-container"),[r,o]=L(!1),i=wt();a.watchEffect(()=>{o(!0),a.onWatcherCleanup(()=>{o(!1)})});const[l,s]=L(!1),[c,d]=L(!1),f=()=>{const g=n.value;g&&(e.overflow==="scrollX"?(s(Math.abs(g.scrollLeft)>=fa),d(g.scrollWidth-g.clientWidth-Math.abs(g.scrollLeft)>=fa)):e.overflow==="scrollY"&&(s(g.scrollTop!==0),d(g.scrollHeight-g.clientHeight!==g.scrollTop)))};a.watch(()=>e.overflow,()=>{f()},{immediate:!0});const u=g=>{const h=n.value;h&&h.scrollTo({left:h.scrollLeft+g*h.clientWidth,behavior:"smooth"})},m=()=>{u(-1)},p=()=>{u(1)};return()=>a.createVNode("div",{class:N(t.value,{[`${t.value}-overflow-${e.overflow}`]:e.overflow,[`${t.value}-overflow-ping-start`]:l.value,[`${t.value}-overflow-ping-end`]:c.value},e.listClassName),ref:"file-list-container",onScroll:f,style:e.listStyle},[e.items.map(g=>a.createVNode(ua,{key:g.uid,prefixCls:e.prefixCls,item:g,onRemove:e.onRemove,className:N(e.itemClassName),style:{...e.itemStyle}},null)),!i.value.disabled&&a.createVNode(la,{upload:e.upload,children:a.createVNode(E.Button,{class:`${t.value}-upload-btn`,type:"dashed"},{default:()=>[a.createVNode(En,{class:`${t.value}-upload-btn-icon`},null)]})},null),e.overflow==="scrollX"&&a.createVNode(a.Fragment,null,[a.createVNode(E.Button,{size:"small",shape:"circle",class:`${t.value}-prev-btn`,icon:a.createVNode(pt,null,null),onClick:m},null),a.createVNode(E.Button,{size:"small",shape:"circle",class:`${t.value}-next-btn`,icon:a.createVNode(yt,null,null),onClick:p},null)])])}});function jd(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const zd=a.defineComponent({name:"AXAttachments",__name:"Attachments",props:a.mergeDefaults({prefixCls:null,rootClassName:null,rootStyle:null,style:null,className:null,classNames:null,styles:null,children:null,disabled:{type:Boolean},placeholder:{type:Function},getDropContainer:{type:Function},items:null,overflow:null,onChange:{type:Function}},{items:()=>[],classNames:()=>({}),styles:()=>({})}),setup(e,{expose:t}){const n=K(e,["prefixCls","rootClassName","rootStyle","className","style","items","children","getDropContainer","placeholder","onChange","overflow","disabled","classNames","styles"]);a.toRef(e,"prefixCls");const{getPrefixCls:r,direction:o}=W(),i=r("attachment",e.prefixCls),l=se("attachments"),s=a.computed(()=>l.value.classNames),c=a.computed(()=>l.value.styles),d=a.useTemplateRef("attachments-container"),f=a.useTemplateRef("attachments-upload"),[u,m,p]=da(i),g=a.computed(()=>N(m.value,p)),[h,y]=L(e.items);a.watch(()=>e.items,()=>{y(e.items)});const v=w=>{var b;y(w.fileList),(b=e.onChange)==null||b.call(e,w)},$=a.computed(()=>({...n,fileList:h.value,onChange:v})),C=w=>{const b=h.value.filter(T=>T.uid!==w.uid);v({file:w,fileList:b})},S=(w,b,T)=>{const P=typeof e.placeholder=="function"?e.placeholder(w):e.placeholder;return a.createVNode(vd,{placeholder:P,upload:$.value,prefixCls:i,className:N(s.value.placeholder,e.classNames.placeholder),style:{...c.value.placeholder,...e.styles.placeholder,...b==null?void 0:b.style}},null)},x=a.computed(()=>{let w;if(e.children)return a.createVNode(a.Fragment,null,[a.createVNode(la,{upload:$.value,rootClassName:e.rootClassName,ref:"attachments-upload",children:e.children},null),a.createVNode(ia,{getDropContainer:e.getDropContainer,prefixCls:i,className:N(g.value,e.rootClassName),children:S("drop")},null)]);const b=h.value.length>0;return a.createVNode("div",{class:N(i,g.value,{[`${i}-rtl`]:o.value==="rtl"},e.className,e.rootClassName),style:{...e.rootStyle,...e.style},dir:o.value||"ltr",ref:"attachments-container"},[a.createVNode(Ld,{prefixCls:i,items:h.value,onRemove:C,overflow:e.overflow,upload:$.value,listClassName:N(s.value.list,e.classNames.list),listStyle:{...c.value.list,...e.styles.list,...!b&&{display:"none"}},itemClassName:N(s.value.item,e.classNames.item),itemStyle:{...c.value.item,...e.styles.item}},null),S("inline",b?{style:{display:"none"}}:{},f.value),a.createVNode(ia,{getDropContainer:e.getDropContainer||(()=>d.value),prefixCls:i,className:g.value},jd(w=S("drop"))?w:{default:()=>[w]})])});return t({nativeElement:d.value,upload:w=>{var T,P;const b=(P=(T=f.value)==null?void 0:T.nativeElement)==null?void 0:P.querySelector('input[type="file"]');if(b){const O=new DataTransfer;O.items.add(w),b.files=O.files,b.dispatchEvent(new Event("change",{bubbles:!0}))}}}),()=>u(a.createVNode(Cd,{value:{disabled:e.disabled}},{default:()=>[x.value]}))}}),Fd=Object.assign(zd,{FileCard:ua}),Dd=(e,t,n)=>{const r=a.computed(()=>{const s=a.toValue(e);let c={expandedKeys:[],onExpand:()=>{}};return s?(typeof s=="object"&&(c={...c,...s}),{enableCollapse:!0,customizeExpandedKeys:c.expandedKeys,customizeOnExpand:c.onExpand}):{enableCollapse:!1,customizeExpandedKeys:c.expandedKeys,customizeOnExpand:c.onExpand}}),[o,i]=L(r.value.customizeExpandedKeys),l=s=>{var d,f;if(!r.value.enableCollapse)return;const c=o.value.includes(s)?o.value.filter(u=>u!==s):[...o.value,s];(f=(d=r.value).customizeOnExpand)==null||f.call(d,c),i(c)};return[a.computed(()=>r.value.enableCollapse),o,l]};var Nt=(e=>(e.PENDING="pending",e.SUCCESS="success",e.ERROR="error",e))(Nt||{});const Xd=e=>{const{componentCls:t}=e,n=`${t}-item`,r={[Nt.PENDING]:e.colorPrimaryText,[Nt.SUCCESS]:e.colorSuccessText,[Nt.ERROR]:e.colorErrorText},o=Object.keys(r);return o.reduce((i,l)=>{const s=r[l];return o.forEach(c=>{const d=`& ${n}-${l}-${c}`,f=l===c?{}:{backgroundColor:"none !important",backgroundImage:`linear-gradient(${s}, ${r[c]})`};i[d]={[`& ${n}-icon, & > *::before`]:{backgroundColor:`${s} !important`},"& > :last-child::before":f}}),i},{})},kd=e=>{const{calc:t,componentCls:n}=e,r=`${n}-item`,o={content:'""',width:t(e.lineWidth).mul(2).equal(),display:"block",position:"absolute",insetInlineEnd:"none",backgroundColor:e.colorTextPlaceholder};return{"& > :last-child > :last-child":{"&::before":{display:"none !important"},[`&${r}-footer`]:{"&::before":{display:"block !important",bottom:0}}},[`& > ${r}`]:{[`& ${r}-header, & ${r}-content, & ${r}-footer`]:{position:"relative","&::before":{bottom:t(e.itemGap).mul(-1).equal()}},[`& ${r}-header, & ${r}-content`]:{marginInlineStart:t(e.itemSize).mul(-1).equal(),"&::before":{...o,insetInlineStart:t(e.itemSize).div(2).sub(e.lineWidth).equal()}},[`& ${r}-header::before`]:{top:e.itemSize,bottom:t(e.itemGap).mul(-2).equal()},[`& ${r}-content::before`]:{top:"100%"},[`& ${r}-footer::before`]:{...o,top:0,insetInlineStart:t(e.itemSize).div(-2).sub(e.lineWidth).equal()}}}},Wd=e=>{const{componentCls:t}=e,n=`${t}-item`;return{[n]:{display:"flex",flexDirection:"column",[`& ${n}-collapsible`]:{cursor:"pointer"},[`& ${n}-header`]:{display:"flex",marginBottom:e.itemGap,gap:e.itemGap,alignItems:"flex-start",[`& ${n}-icon`]:{height:e.itemSize,width:e.itemSize,fontSize:e.itemFontSize,display:"flex",justifyContent:"center",alignItems:"center"},[`& ${n}-extra`]:{height:e.itemSize,maxHeight:e.itemSize},[`& ${n}-header-box`]:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden",[`& ${n}-title`]:{height:e.itemSize,lineHeight:`${Z(e.itemSize)}`,maxHeight:e.itemSize,fontSize:e.itemFontSize,[`& ${n}-collapse-icon`]:{marginInlineEnd:e.marginXS}},[`& ${n}-desc`]:{fontSize:e.itemFontSize}}},[`& ${n}-content`]:{[`& ${n}-content-hidden`]:{display:"none"},[`& ${n}-content-box`]:{padding:e.itemGap,display:"inline-block",maxWidth:`calc(100% - ${e.itemSize})`,borderRadius:e.borderRadiusLG,backgroundColor:e.colorBgContainer,border:`${Z(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}},[`& ${n}-footer`]:{marginTop:e.itemGap,display:"inline-flex"}}}},Xn=(e,t="middle")=>{const{componentCls:n}=e,r={large:{itemSize:e.itemSizeLG,itemGap:e.itemGapLG,itemFontSize:e.itemFontSizeLG},middle:{itemSize:e.itemSize,itemGap:e.itemGap,itemFontSize:e.itemFontSize},small:{itemSize:e.itemSizeSM,itemGap:e.itemGapSM,itemFontSize:e.itemFontSizeSM}}[t];return{[`&${n}-${t}`]:{paddingInlineStart:r.itemSize,gap:r.itemGap,...Wd({...e,...r}),...kd({...e,...r})}}},Gd=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexDirection:"column",...Xd(e),...Xn(e),...Xn(e,"large"),...Xn(e,"small"),[`&${t}-rtl`]:{direction:"rtl"}}}},qd=fe("ThoughtChain",e=>{const t=ee(e,{itemFontSizeSM:e.fontSizeSM,itemSizeSM:e.calc(e.controlHeightXS).add(e.controlHeightSM).div(2).equal(),itemGapSM:e.marginSM,itemFontSize:e.fontSize,itemSize:e.calc(e.controlHeightSM).add(e.controlHeight).div(2).equal(),itemGap:e.margin,itemFontSizeLG:e.fontSizeLG,itemSizeLG:e.calc(e.controlHeight).add(e.controlHeightLG).div(2).equal(),itemGapLG:e.marginLG});return[Gd(t)]}),ha=Symbol("ThoughtChainNodeContext"),kn=a.shallowRef(),Ud=e=>{a.provide(ha,e),a.watch(e,()=>{kn.value=a.unref(e),a.triggerRef(kn)},{immediate:!0,deep:!0})},Kd=()=>a.inject(ha,a.computed(()=>kn.value||{})),Zd=a.defineComponent({props:{value:ne()},setup(e,{slots:t}){return Ud(a.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),Yd=a.defineComponent({name:"AXThoughtChainNode",__name:"item",props:a.mergeDefaults({info:null,nextStatus:null,onClick:{type:Function}},{info:()=>({})}),setup(e){const t=K(e,["info","nextStatus","onClick"]),n=a.computed(()=>Me(t,{attr:!0,aria:!0,data:!0})),r=Kd(),o=a.computed(()=>r.value.prefixCls),i=a.computed(()=>r.value.enableCollapse),l=a.computed(()=>r.value.expandedKeys),s=a.computed(()=>r.value.direction),c=a.computed(()=>r.value.classNames),d=a.computed(()=>r.value.styles),f=a.useId(),u=a.computed(()=>e.info.key??f),m=a.computed(()=>e.info.icon),p=a.computed(()=>e.info.title),g=a.computed(()=>e.info.extra),h=a.computed(()=>e.info.content),y=a.computed(()=>e.info.footer),v=a.computed(()=>e.info.status),$=a.computed(()=>e.info.description),C=a.computed(()=>`${o.value}-item`),S=()=>{var b;return(b=e.onClick)==null?void 0:b.call(e,u.value)},x=a.computed(()=>{var b;return(b=l.value)==null?void 0:b.includes(u.value)}),w=a.computed(()=>i.value?x.value:!0);return()=>a.createVNode("div",a.mergeProps(n.value,{class:N(C.value,{[`${C.value}-${v.value}${e.nextStatus?`-${e.nextStatus}`:""}`]:v.value},t.class),style:t.style}),[a.createVNode("div",{class:N(`${C.value}-header`,c.value.itemHeader),style:d.value.itemHeader,onClick:S},[a.createVNode(E.Avatar,{icon:m.value,class:`${C.value}-icon`},null),a.createVNode("div",{class:N(`${C.value}-header-box`,{[`${C.value}-collapsible`]:i.value&&h.value})},[a.createVNode(E.Typography.Text,{strong:!0,ellipsis:{tooltip:{placement:s.value==="rtl"?"topRight":"topLeft",title:p.value}},class:`${C.value}-title`},{default:()=>[i.value&&h.value&&(s.value==="rtl"?a.createVNode(pt,{class:`${C.value}-collapse-icon`,rotate:x.value?-90:0},null):a.createVNode(yt,{class:`${C.value}-collapse-icon`,rotate:x.value?90:0},null)),p.value]}),$.value&&a.createVNode(E.Typography.Text,{class:`${C.value}-desc`,ellipsis:{tooltip:{placement:s.value==="rtl"?"topRight":"topLeft",title:$.value}},type:"secondary"},{default:()=>[$.value]})]),g.value&&a.createVNode("div",{class:`${C.value}-extra`},[g.value])]),h.value&&a.withDirectives(a.createVNode("div",{class:N(`${C.value}-content`)},[a.createVNode("div",{class:N(`${C.value}-content-box`,c.value.itemContent),style:d.value.itemContent},[h.value])]),[[a.vShow,w.value]]),y.value&&a.createVNode("div",{class:N(`${C.value}-footer`,c.value.itemFooter),style:d.value.itemFooter},[y.value])])}}),Qd=a.defineComponent({name:"AXThoughtChain",__name:"ThoughtChain",props:a.mergeDefaults({items:null,collapsible:{type:Boolean},size:null,styles:null,classNames:null,prefixCls:null,rootClassName:null},{styles:()=>({}),classNames:()=>({}),size:"middle"}),setup(e){const t=K(e,["prefixCls","rootClassName","class","items","collapsible","styles","style","classNames","size"]);a.toRef(e,"class"),a.toRef(e,"prefixCls");const n=a.computed(()=>Me(t,{attr:!0,aria:!0,data:!0})),{getPrefixCls:r,direction:o}=W(),i=a.computed(()=>r()),l=a.computed(()=>r("thought-chain",e.prefixCls)),s=se("thoughtChain"),[c,d,f]=Dd(()=>e.collapsible,l.value,i.value),[u,m,p]=qd(l),g=a.computed(()=>N(e.class,e.rootClassName,l.value,s.value.className,m.value,p,{[`${l.value}-rtl`]:o.value==="rtl"},`${l.value}-${e.size}`));return()=>u(a.createVNode("div",a.mergeProps(n.value,{class:g.value,style:{...typeof s.value.style=="object"?s.value.style:{},...typeof e.style=="object"?e.style:{}}}),[a.createVNode(Zd,{value:{prefixCls:l.value,enableCollapse:c.value,expandedKeys:d.value,direction:o.value,classNames:{itemHeader:N(s.value.classNames.itemHeader,e.classNames.itemHeader),itemContent:N(s.value.classNames.itemContent,e.classNames.itemContent),itemFooter:N(s.value.classNames.itemFooter,e.classNames.itemFooter)},styles:{itemHeader:{...s.value.styles.itemHeader,...e.styles.itemHeader},itemContent:{...s.value.styles.itemContent,...e.styles.itemContent},itemFooter:{...s.value.styles.itemFooter,...e.styles.itemFooter}}}},{default:()=>{var h;return[(h=e.items)==null?void 0:h.map((y,v)=>{var $;return a.createVNode(Yd,{key:y.key||`key_${v}`,class:N(s.value.classNames.item,e.classNames.item),style:{...s.value.styles.item,...e.styles.item},info:{...y,icon:y.icon||v+1},onClick:f,nextStatus:(($=e.items[v+1])==null?void 0:$.status)||y.status},null)})]}})]))}}),Jd=`
113
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zs(e,t){if(e){if(typeof e=="string")return Eo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Eo(e,t)}}function Eo(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ys(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,l,s;try{for(n=n.call(e);!(o=(l=n.next()).done)&&(r.push(l.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function Qs(e){if(Array.isArray(e))return e}function Ro(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Ge(e,o,n[o])})}return e}function Ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Js(e,t){if(e==null)return{};var n=_s(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _s(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}Oo(zl.primary);var H=function(t,n){var r,o=Ro({},t,n.attrs),i=o.class,l=o.icon,s=o.spin,c=o.rotate,d=o.tabindex,f=o.twoToneColor,u=o.onClick,m=Js(o,qs),p=bo(),g=p.prefixCls,h=p.rootClassName,y=(r={},Ge(r,h.value,!!h.value),Ge(r,g.value,!0),Ge(r,"".concat(g.value,"-").concat(l.name),!!l.name),Ge(r,"".concat(g.value,"-spin"),!!s||l.name==="loading"),r),v=d;v===void 0&&u&&(v=-1);var $=c?{msTransform:"rotate(".concat(c,"deg)"),transform:"rotate(".concat(c,"deg)")}:void 0,C=To(f),S=Us(C,2),x=S[0],w=S[1];return a.createVNode("span",Ro({role:"img","aria-label":l.name},m,{onClick:u,class:[y,i],tabindex:v}),[a.createVNode(he,{icon:l,primaryColor:x,secondaryColor:w,style:$},null),a.createVNode(Gs,null,null)])};H.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:[String,Array]},H.displayName="AntdIcon",H.inheritAttrs=!1,H.getTwoToneColor=Ws,H.setTwoToneColor=Oo;var ec={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"};function Mo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){tc(e,o,n[o])})}return e}function tc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gn=function(t,n){var r=Mo({},t,n.attrs);return a.createVNode(H,Mo({},r,{icon:ec}),null)};gn.displayName="ArrowUpOutlined",gn.inheritAttrs=!1;var nc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M682 455V311l-76 76v68c-.1 50.7-42 92.1-94 92a95.8 95.8 0 01-52-15l-54 55c29.1 22.4 65.9 36 106 36 93.8 0 170-75.1 170-168z"}},{tag:"path",attrs:{d:"M833 446h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254-63 0-120.7-23-165-61l-54 54a334.01 334.01 0 00179 81v102H326c-13.9 0-24.9 14.3-25 32v36c.1 4.4 2.9 8 6 8h408c3.2 0 6-3.6 6-8v-36c0-17.7-11-32-25-32H547V782c165.3-17.9 294-157.9 294-328 0-4.4-3.6-8-8-8zm13.1-377.7l-43.5-41.9a8 8 0 00-11.2.1l-129 129C634.3 101.2 577 64 511 64c-93.9 0-170 75.3-170 168v224c0 6.7.4 13.3 1.2 19.8l-68 68A252.33 252.33 0 01258 454c-.2-4.4-3.8-8-8-8h-60c-4.4 0-8 3.6-8 8 0 53 12.5 103 34.6 147.4l-137 137a8.03 8.03 0 000 11.3l42.7 42.7c3.1 3.1 8.2 3.1 11.3 0L846.2 79.8l.1-.1c3.1-3.2 3-8.3-.2-11.4zM417 401V232c0-50.6 41.9-92 94-92 46 0 84.1 32.3 92.3 74.7L417 401z"}}]},name:"audio-muted",theme:"outlined"};function Io(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){rc(e,o,n[o])})}return e}function rc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pn=function(t,n){var r=Io({},t,n.attrs);return a.createVNode(H,Io({},r,{icon:nc}),null)};pn.displayName="AudioMutedOutlined",pn.inheritAttrs=!1;var oc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"}}]},name:"audio",theme:"outlined"};function Bo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){ac(e,o,n[o])})}return e}function ac(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yn=function(t,n){var r=Bo({},t,n.attrs);return a.createVNode(H,Bo({},r,{icon:oc}),null)};yn.displayName="AudioOutlined",yn.inheritAttrs=!1;var ic={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"};function Ho(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){lc(e,o,n[o])})}return e}function lc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bn=function(t,n){var r=Ho({},t,n.attrs);return a.createVNode(H,Ho({},r,{icon:ic}),null)};bn.displayName="ClearOutlined",bn.inheritAttrs=!1;var sc={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};function Vo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){cc(e,o,n[o])})}return e}function cc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Sn=function(t,n){var r=Vo({},t,n.attrs);return a.createVNode(H,Vo({},r,{icon:sc}),null)};Sn.displayName="CloseCircleFilled",Sn.inheritAttrs=!1;var dc={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};function Lo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){uc(e,o,n[o])})}return e}function uc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Cn=function(t,n){var r=Lo({},t,n.attrs);return a.createVNode(H,Lo({},r,{icon:dc}),null)};Cn.displayName="CloseOutlined",Cn.inheritAttrs=!1;var fc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};function jo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){hc(e,o,n[o])})}return e}function hc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vn=function(t,n){var r=jo({},t,n.attrs);return a.createVNode(H,jo({},r,{icon:fc}),null)};vn.displayName="EllipsisOutlined",vn.inheritAttrs=!1;var mc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM575.34 477.84l-61.22 102.3L452.3 477.8a12 12 0 00-10.27-5.79h-38.44a12 12 0 00-6.4 1.85 12 12 0 00-3.75 16.56l82.34 130.42-83.45 132.78a12 12 0 00-1.84 6.39 12 12 0 0012 12h34.46a12 12 0 0010.21-5.7l62.7-101.47 62.3 101.45a12 12 0 0010.23 5.72h37.48a12 12 0 006.48-1.9 12 12 0 003.62-16.58l-83.83-130.55 85.3-132.47a12 12 0 001.9-6.5 12 12 0 00-12-12h-35.7a12 12 0 00-10.29 5.84z"}}]},name:"file-excel",theme:"filled"};function zo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){gc(e,o,n[o])})}return e}function gc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xn=function(t,n){var r=zo({},t,n.attrs);return a.createVNode(H,zo({},r,{icon:mc}),null)};xn.displayName="FileExcelFilled",xn.inheritAttrs=!1;var pc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7L639.4 73.4c-6-6-14.2-9.4-22.7-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.6-9.4-22.6zM400 402c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40zm296 294H328c-6.7 0-10.4-7.7-6.3-12.9l99.8-127.2a8 8 0 0112.6 0l41.1 52.4 77.8-99.2a8 8 0 0112.6 0l136.5 174c4.3 5.2.5 12.9-6.1 12.9zm-94-370V137.8L790.2 326H602z"}}]},name:"file-image",theme:"filled"};function Fo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){yc(e,o,n[o])})}return e}function yc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wn=function(t,n){var r=Fo({},t,n.attrs);return a.createVNode(H,Fo({},r,{icon:pc}),null)};wn.displayName="FileImageFilled",wn.inheritAttrs=!1;var bc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM426.13 600.93l59.11 132.97a16 16 0 0014.62 9.5h24.06a16 16 0 0014.63-9.51l59.1-133.35V758a16 16 0 0016.01 16H641a16 16 0 0016-16V486a16 16 0 00-16-16h-34.75a16 16 0 00-14.67 9.62L512.1 662.2l-79.48-182.59a16 16 0 00-14.67-9.61H383a16 16 0 00-16 16v272a16 16 0 0016 16h27.13a16 16 0 0016-16V600.93z"}}]},name:"file-markdown",theme:"filled"};function Do(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Sc(e,o,n[o])})}return e}function Sc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $n=function(t,n){var r=Do({},t,n.attrs);return a.createVNode(H,Do({},r,{icon:bc}),null)};$n.displayName="FileMarkdownFilled",$n.inheritAttrs=!1;var Cc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM633.22 637.26c-15.18-.5-31.32.67-49.65 2.96-24.3-14.99-40.66-35.58-52.28-65.83l1.07-4.38 1.24-5.18c4.3-18.13 6.61-31.36 7.3-44.7.52-10.07-.04-19.36-1.83-27.97-3.3-18.59-16.45-29.46-33.02-30.13-15.45-.63-29.65 8-33.28 21.37-5.91 21.62-2.45 50.07 10.08 98.59-15.96 38.05-37.05 82.66-51.2 107.54-18.89 9.74-33.6 18.6-45.96 28.42-16.3 12.97-26.48 26.3-29.28 40.3-1.36 6.49.69 14.97 5.36 21.92 5.3 7.88 13.28 13 22.85 13.74 24.15 1.87 53.83-23.03 86.6-79.26 3.29-1.1 6.77-2.26 11.02-3.7l11.9-4.02c7.53-2.54 12.99-4.36 18.39-6.11 23.4-7.62 41.1-12.43 57.2-15.17 27.98 14.98 60.32 24.8 82.1 24.8 17.98 0 30.13-9.32 34.52-23.99 3.85-12.88.8-27.82-7.48-36.08-8.56-8.41-24.3-12.43-45.65-13.12zM385.23 765.68v-.36l.13-.34a54.86 54.86 0 015.6-10.76c4.28-6.58 10.17-13.5 17.47-20.87 3.92-3.95 8-7.8 12.79-12.12 1.07-.96 7.91-7.05 9.19-8.25l11.17-10.4-8.12 12.93c-12.32 19.64-23.46 33.78-33 43-3.51 3.4-6.6 5.9-9.1 7.51a16.43 16.43 0 01-2.61 1.42c-.41.17-.77.27-1.13.3a2.2 2.2 0 01-1.12-.15 2.07 2.07 0 01-1.27-1.91zM511.17 547.4l-2.26 4-1.4-4.38c-3.1-9.83-5.38-24.64-6.01-38-.72-15.2.49-24.32 5.29-24.32 6.74 0 9.83 10.8 10.07 27.05.22 14.28-2.03 29.14-5.7 35.65zm-5.81 58.46l1.53-4.05 2.09 3.8c11.69 21.24 26.86 38.96 43.54 51.31l3.6 2.66-4.39.9c-16.33 3.38-31.54 8.46-52.34 16.85 2.17-.88-21.62 8.86-27.64 11.17l-5.25 2.01 2.8-4.88c12.35-21.5 23.76-47.32 36.05-79.77zm157.62 76.26c-7.86 3.1-24.78.33-54.57-12.39l-7.56-3.22 8.2-.6c23.3-1.73 39.8-.45 49.42 3.07 4.1 1.5 6.83 3.39 8.04 5.55a4.64 4.64 0 01-1.36 6.31 6.7 6.7 0 01-2.17 1.28z"}}]},name:"file-pdf",theme:"filled"};function Xo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){vc(e,o,n[o])})}return e}function vc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Nn=function(t,n){var r=Xo({},t,n.attrs);return a.createVNode(H,Xo({},r,{icon:Cc}),null)};Nn.displayName="FilePdfFilled",Nn.inheritAttrs=!1;var xc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM468.53 760v-91.54h59.27c60.57 0 100.2-39.65 100.2-98.12 0-58.22-39.58-98.34-99.98-98.34H424a12 12 0 00-12 12v276a12 12 0 0012 12h32.53a12 12 0 0012-12zm0-139.33h34.9c47.82 0 67.19-12.93 67.19-50.33 0-32.05-18.12-50.12-49.87-50.12h-52.22v100.45z"}}]},name:"file-ppt",theme:"filled"};function ko(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){wc(e,o,n[o])})}return e}function wc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Tn=function(t,n){var r=ko({},t,n.attrs);return a.createVNode(H,ko({},r,{icon:xc}),null)};Tn.displayName="FilePptFilled",Tn.inheritAttrs=!1;var $c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM320 482a8 8 0 00-8 8v48a8 8 0 008 8h384a8 8 0 008-8v-48a8 8 0 00-8-8H320zm0 136a8 8 0 00-8 8v48a8 8 0 008 8h184a8 8 0 008-8v-48a8 8 0 00-8-8H320z"}}]},name:"file-text",theme:"filled"};function Wo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Nc(e,o,n[o])})}return e}function Nc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pn=function(t,n){var r=Wo({},t,n.attrs);return a.createVNode(H,Wo({},r,{icon:$c}),null)};Pn.displayName="FileTextFilled",Pn.inheritAttrs=!1;var Tc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM512 566.1l52.81 197a12 12 0 0011.6 8.9h31.77a12 12 0 0011.6-8.88l74.37-276a12 12 0 00.4-3.12 12 12 0 00-12-12h-35.57a12 12 0 00-11.7 9.31l-45.78 199.1-49.76-199.32A12 12 0 00528.1 472h-32.2a12 12 0 00-11.64 9.1L434.6 680.01 388.5 481.3a12 12 0 00-11.68-9.29h-35.39a12 12 0 00-3.11.41 12 12 0 00-8.47 14.7l74.17 276A12 12 0 00415.6 772h31.99a12 12 0 0011.59-8.9l52.81-197z"}}]},name:"file-word",theme:"filled"};function Go(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Pc(e,o,n[o])})}return e}function Pc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var An=function(t,n){var r=Go({},t,n.attrs);return a.createVNode(H,Go({},r,{icon:Tc}),null)};An.displayName="FileWordFilled",An.inheritAttrs=!1;var Ac={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM296 136v64h64v-64h-64zm64 64v64h64v-64h-64zm-64 64v64h64v-64h-64zm64 64v64h64v-64h-64zm-64 64v64h64v-64h-64zm64 64v64h64v-64h-64zm-64 64v64h64v-64h-64zm0 64v160h128V584H296zm48 48h32v64h-32v-64z"}}]},name:"file-zip",theme:"filled"};function qo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Oc(e,o,n[o])})}return e}function Oc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var On=function(t,n){var r=qo({},t,n.attrs);return a.createVNode(H,qo({},r,{icon:Ac}),null)};On.displayName="FileZipFilled",On.inheritAttrs=!1;var Ec={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};function Uo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Rc(e,o,n[o])})}return e}function Rc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pt=function(t,n){var r=Uo({},t,n.attrs);return a.createVNode(H,Uo({},r,{icon:Ec}),null)};pt.displayName="LeftOutlined",pt.inheritAttrs=!1;var Mc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};function Ko(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Ic(e,o,n[o])})}return e}function Ic(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var En=function(t,n){var r=Ko({},t,n.attrs);return a.createVNode(H,Ko({},r,{icon:Mc}),null)};En.displayName="PlusOutlined",En.inheritAttrs=!1;var Bc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};function Zo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Hc(e,o,n[o])})}return e}function Hc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yt=function(t,n){var r=Zo({},t,n.attrs);return a.createVNode(H,Zo({},r,{icon:Bc}),null)};yt.displayName="RightOutlined",yt.inheritAttrs=!1;const Vc=a.defineComponent({name:"AXConversationsItem",__name:"ConversationsItem",props:{info:null,prefixCls:null,direction:null,menu:null,active:{type:Boolean},onClick:{type:Function}},setup(e){const t=K(e,["prefixCls","info","class","direction","onClick","active","menu"]);a.toRef(e,"class");const n=a.computed(()=>Me(t,{aria:!0,data:!0,attr:!0})),r=m=>{m.stopPropagation()},o=a.computed(()=>e.info.disabled),[i,l]=L(!1),[s,c]=L(!1),d=a.computed(()=>N(e.class,`${e.prefixCls}-item`,{[`${e.prefixCls}-item-active`]:e.active&&!o.value},{[`${e.prefixCls}-item-disabled`]:o.value})),f=()=>{!o.value&&e.onClick&&e.onClick(e.info)},u=m=>{m&&c(!m)};return()=>a.createVNode(E.Tooltip,{title:e.info.label,open:i.value&&s.value,onOpenChange:c,placement:e.direction==="rtl"?"left":"right"},{default:()=>[a.createVNode("li",a.mergeProps(n.value,{class:d.value,onClick:f}),[e.info.icon&&a.createVNode("div",{class:`${e.prefixCls}-icon`},[e.info.icon]),a.createVNode(E.Typography.Text,{class:`${e.prefixCls}-label`,ellipsis:{onEllipsis:l},content:e.info.label},null),e.menu&&!o.value&&a.createVNode(E.Dropdown,{placement:e.direction==="rtl"?"bottomLeft":"bottomRight",trigger:["click"],disabled:o.value,onOpenChange:u},{default:()=>a.createVNode(vn,{onClick:r,disabled:o.value,class:`${e.prefixCls}-menu-icon`},null),overlay:()=>a.createVNode(E.Menu,e.menu,null)})])]})}}),Yo=Symbol("GroupTitleContext"),Rn=a.shallowRef(),Lc=e=>{a.provide(Yo,e),a.watch(e,()=>{Rn.value=a.unref(e),a.triggerRef(Rn)},{immediate:!0,deep:!0})},jc=()=>a.inject(Yo,a.computed(()=>Rn.value||{})),zc=a.defineComponent({props:{value:ne()},setup(e,{slots:t}){return Lc(a.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),Qo=a.defineComponent({name:"AXConversationsGroupTitle",__name:"GroupTitle",setup(e){const t=a.useSlots(),n=jc(),r=a.computed(()=>{var o;return(o=t.default)==null?void 0:o.call(t)});return()=>a.createVNode("div",{class:N(`${n.value.prefixCls}-group-title`)},[r.value&&a.createVNode(E.Typography.Text,null,{default:()=>[r.value]})])}});function Jo(e,t){const{defaultValue:n,value:r=a.ref()}=t||{};let o=typeof e=="function"?e():e;r.value!==void 0&&(o=a.unref(r)),n!==void 0&&(o=typeof n=="function"?n():n);const i=a.ref(o),l=a.ref(o);a.watchEffect(()=>{let c=r.value!==void 0?r.value:i.value;t.postState&&(c=t.postState(c)),l.value=c});function s(c){const d=l.value;i.value=c,a.toRaw(l.value)!==c&&t.onChange&&t.onChange(c,d)}return a.watch(r,()=>{i.value=r.value}),[l,s]}const Mn="__ungrouped",Fc=(e,t=[])=>{const n=a.computed(()=>{if(!a.toValue(e))return{enableGroup:!1,sort:void 0,title:void 0};let r={sort:void 0,title:void 0};return typeof a.toValue(e)=="object"&&(r={...r,...a.toValue(e)}),{enableGroup:!0,sort:r.sort,title:r.title}});return a.computed(()=>{if(!n.value.enableGroup)return{groupList:[{name:Mn,data:a.toValue(t),title:void 0}],enableGroup:n.value.enableGroup};const r=a.toValue(t).reduce((l,s)=>{const c=s.group||Mn;return l[c]||(l[c]=[]),l[c].push(s),l},{});return{groupList:(n.value.sort?Object.keys(r).sort(n.value.sort):Object.keys(r)).map(l=>({name:l===Mn?void 0:l,title:n.value.title,data:r[l]})),enableGroup:n.value.enableGroup}})},Dc=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexDirection:"column",gap:e.paddingXXS,overflowY:"auto",padding:e.paddingSM,[`&${t}-rtl`]:{direction:"rtl"},[`& ${t}-list`]:{display:"flex",gap:e.paddingXXS,flexDirection:"column",paddingLeft:0,[`& ${t}-item`]:{paddingInlineStart:e.paddingXL},[`& ${t}-label`]:{color:e.colorTextDescription}},[`& ${t}-item`]:{display:"flex",height:e.controlHeightLG,minHeight:e.controlHeightLG,gap:e.paddingXS,padding:`0 ${Z(e.paddingXS)}`,alignItems:"center",borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,"&:hover":{backgroundColor:e.colorBgTextHover},"&-active":{backgroundColor:e.colorBgTextHover,[`& ${t}-label, ${t}-menu-icon`]:{color:e.colorText}},"&-disabled":{cursor:"not-allowed",[`& ${t}-label`]:{color:e.colorTextDisabled}},"&:hover, &-active":{[`& ${t}-menu-icon`]:{opacity:1}}},[`& ${t}-label`]:{flex:1,color:e.colorText},[`& ${t}-menu-icon`]:{opacity:0,fontSize:e.fontSizeXL},[`& ${t}-group-title`]:{display:"flex",alignItems:"center",height:e.controlHeightLG,minHeight:e.controlHeightLG,padding:`0 ${Z(e.paddingXS)}`}}}},Xc=fe("Conversations",e=>{const t=ee(e,{});return Dc(t)},()=>({})),kc=a.defineComponent({name:"AXConversations",__name:"Conversations",props:a.mergeDefaults({items:null,activeKey:null,defaultActiveKey:null,onActiveChange:{type:Function},menu:{type:Function},groupable:{type:Boolean},styles:null,classNames:null,prefixCls:null,rootClassName:null},{styles:()=>({}),classNames:()=>({})}),setup(e){const t=K(e,["prefixCls","rootClassName","items","activeKey","defaultActiveKey","onActiveChange","menu","styles","classNames","groupable","class","style"]);a.toRef(e,"class"),a.toRef(e,"activeKey"),a.toRef(e,"prefixCls");const n=a.ref(e.activeKey),r=a.computed(()=>Me(t,{attr:!0,aria:!0,data:!0})),[o,i]=Jo(e.defaultActiveKey,{value:n});a.watch(()=>e.activeKey,()=>{n.value=e.activeKey});const l=Fc(()=>e.groupable,()=>e.items),{getPrefixCls:s,direction:c}=W(),d=a.computed(()=>s("conversations",e.prefixCls)),f=se("conversations"),[u,m,p]=Xc(d),g=a.computed(()=>N(d.value,f.value.className,e.class,e.rootClassName,m.value,p,{[`${d.value}-rtl`]:c.value==="rtl"})),h=y=>{i(y.key),e.onActiveChange&&e.onActiveChange(y.key)};return()=>u(a.createVNode("ul",a.mergeProps(r.value,{style:{...typeof f.value.style=="object"?f.value.style:{},...typeof e.style=="object"?e.style:{}},class:g.value}),[l.value.groupList.map((y,v)=>{const $=y.data.map((C,S)=>a.createVNode(Vc,{key:C.key||`key-${S}`,info:C,prefixCls:d.value,direction:c.value,class:N(e.classNames.item,f.value.classNames.item),style:{...f.value.styles.item,...e.styles.item},menu:typeof e.menu=="function"?e.menu(C):e.menu,active:o.value===C.key,onClick:h},null));return l.value.enableGroup?a.createVNode("li",{key:y.name||`key-${v}`},[a.createVNode(zc,{value:{prefixCls:d.value}},{default:()=>{var C;return[((C=y.title)==null?void 0:C.call(y,y.name,{components:{GroupTitle:Qo}}))||a.createVNode(Qo,{key:y.name},{default:()=>[y.name]})]}}),a.createVNode("ul",{class:`${d.value}-list`},[$])]):$})]))}}),Wc=e=>{const{componentCls:t,calc:n}=e,r=n(e.fontSizeHeading3).mul(e.lineHeightHeading3).equal(),o=n(e.fontSize).mul(e.lineHeight).equal();return{[t]:{gap:e.padding,[`${t}-icon`]:{height:n(r).add(o).add(e.paddingXXS).equal(),display:"flex",img:{height:"100%"}},[`${t}-content-wrapper`]:{gap:e.paddingXS,flex:"auto",minWidth:0,[`${t}-title-wrapper`]:{gap:e.paddingXS},[`${t}-title`]:{margin:0},[`${t}-extra`]:{marginInlineStart:"auto"}}}}},Gc=e=>{const{componentCls:t}=e;return{[t]:{"&-filled":{paddingInline:e.padding,paddingBlock:e.paddingSM,background:e.colorFillContent,borderRadius:e.borderRadiusLG},"&-borderless":{[`${t}-title`]:{fontSize:e.fontSizeHeading3,lineHeight:e.lineHeightHeading3}}}}},qc=fe("Welcome",e=>{const t=ee(e,{});return[Wc(t),Gc(t)]},()=>({})),Uc=a.defineComponent({name:"AXWelcome",__name:"Welcome",props:a.mergeDefaults({prefixCls:null,rootClassName:null,className:null,style:null,variant:null,classNames:null,styles:null,icon:null,title:null,description:null,extra:null},{variant:"filled",classNames:()=>({}),styles:()=>({})}),setup(e){a.toRef(e,"prefixCls");const{direction:t,getPrefixCls:n}=W(),r=n("welcome",e.prefixCls),o=se("welcome"),[i,l,s]=qc(r),c=a.computed(()=>{if(!e.icon)return null;let u=e.icon;return typeof e.icon=="string"&&e.icon.startsWith("http")&&(u=a.createVNode("img",{src:e.icon,alt:"icon"},null)),a.createVNode("div",{class:N(`${r}-icon`,o.value.classNames.icon,e.classNames.icon),style:e.styles.icon},[u])}),d=a.computed(()=>e.title?a.createVNode(E.Typography.Title,{level:4,class:N(`${r}-title`,o.value.classNames.title,e.classNames.title),style:e.styles.title},{default:()=>[e.title]}):null),f=a.computed(()=>e.extra?a.createVNode("div",{class:N(`${r}-extra`,o.value.classNames.extra,e.classNames.extra),style:e.styles.extra},[e.extra]):null);return()=>i(a.createVNode(E.Flex,{class:N(r,o.value.className,e.className,e.rootClassName,l.value,s,`${r}-${e.variant}`,{[`${r}-rtl`]:t.value==="rtl"}),style:e.style},{default:()=>[c.value,a.createVNode(E.Flex,{vertical:!0,class:`${r}-content-wrapper`},{default:()=>[e.extra?a.createVNode(E.Flex,{align:"flex-start",class:`${r}-title-wrapper`},{default:()=>[d.value,f.value]}):d.value,e.description&&a.createVNode(E.Typography.Text,{class:N(`${r}-description`,o.value.classNames.description,e.classNames.description),style:e.styles.description},{default:()=>[e.description]})]})]}))}}),Kc=e=>{const{componentCls:t}=e;return{[t]:{"&, & *":{boxSizing:"border-box"},maxWidth:"100%",[`&${t}-rtl`]:{direction:"rtl"},[`& ${t}-title`]:{marginBlockStart:0,fontWeight:"normal",color:e.colorTextTertiary},[`& ${t}-list`]:{display:"flex",gap:e.paddingSM,overflowX:"scroll","&::-webkit-scrollbar":{display:"none"},listStyle:"none",paddingInlineStart:0,marginBlock:0,alignItems:"stretch","&-wrap":{flexWrap:"wrap"},"&-vertical":{flexDirection:"column",alignItems:"flex-start"}},[`${t}-item`]:{flex:"none",display:"flex",gap:e.paddingXS,height:"auto",paddingBlock:e.paddingSM,paddingInline:e.padding,alignItems:"flex-start",justifyContent:"flex-start",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,transition:["border","background"].map(n=>`${n} ${e.motionDurationSlow}`).join(","),border:`${Z(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,[`&:not(${t}-item-has-nest)`]:{"&:hover":{cursor:"pointer",background:e.colorFillTertiary},"&:active":{background:e.colorFill}},[`${t}-content`]:{flex:"auto",minWidth:0,display:"flex",gap:e.paddingXXS,flexDirection:"column",alignItems:"flex-start"},[`${t}-icon, ${t}-label, ${t}-desc`]:{margin:0,padding:0,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start",whiteSpace:"normal"},[`${t}-label`]:{color:e.colorTextHeading,fontWeight:500},[`${t}-label + ${t}-desc`]:{color:e.colorTextTertiary},[`&${t}-item-disabled`]:{pointerEvents:"none",background:e.colorBgContainerDisabled,[`${t}-label, ${t}-desc`]:{color:e.colorTextTertiary}}}}}},Zc=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-item-has-nest`]:{[`> ${t}-content`]:{[`> ${t}-label`]:{fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}}},[`&${t}-nested`]:{marginTop:e.paddingXS,alignSelf:"stretch",[`${t}-list`]:{alignItems:"stretch"},[`${t}-item`]:{border:0,background:e.colorFillQuaternary}}}}},Yc=fe("Prompts",e=>{const t=ee(e,{});return[Kc(t),Zc(t)]},()=>({})),_o=a.defineComponent({name:"AXPrompts",__name:"Prompts",props:a.mergeDefaults({items:null,title:null,onItemClick:{type:Function},vertical:{type:Boolean},wrap:{type:Boolean},styles:null,classNames:null,prefixCls:null,rootClassName:null},{styles:()=>({}),classNames:()=>({})}),setup(e){const t=K(e,["prefixCls","title","class","items","onItemClick","vertical","wrap","rootClassName","styles","classNames","style"]);a.toRef(e,"class"),a.toRef(e,"prefixCls");const{getPrefixCls:n,direction:r}=W(),o=n("prompts",e.prefixCls),i=se("prompts"),[l,s,c]=Yc(o),d=a.computed(()=>N(o,i.value.className,e.class,e.rootClassName,s.value,c,{[`${o}-rtl`]:r.value==="rtl"})),f=a.computed(()=>N(`${o}-list`,i.value.classNames.list,e.classNames.list,{[`${o}-list-wrap`]:e.wrap},{[`${o}-list-vertical`]:e.vertical}));return()=>{var u;return l(a.createVNode("div",a.mergeProps(t,{class:d.value,style:{...typeof e.style=="object"?e.style:{},...typeof i.value.style=="object"?i.value.style:{}}}),[e.title&&a.createVNode(E.Typography.Title,{level:5,class:N(`${o}-title`,i.value.classNames.title,e.classNames.title),style:{...i.value.styles.title,...e.styles.title}},{default:()=>[e.title]}),a.createVNode("div",{class:f.value,style:{...i.value.styles.list,...e.styles.list}},[(u=e.items)==null?void 0:u.map((m,p)=>{const g=m.children&&m.children.length>0;return a.createVNode("div",{key:m.key||`key_${p}`,style:{...i.value.styles.item,...e.styles.item},class:N(`${o}-item`,i.value.classNames.item,e.classNames.item,{[`${o}-item-disabled`]:m.disabled,[`${o}-item-has-nest`]:g}),onClick:()=>{!g&&e.onItemClick&&e.onItemClick({data:m})}},[m.icon&&a.createVNode("div",{class:`${o}-icon`},[m.icon]),a.createVNode("div",{class:N(`${o}-content`,i.value.classNames.itemContent,e.classNames.itemContent),style:{...i.value.styles.itemContent,...e.styles.itemContent}},[m.label&&a.createVNode("h6",{class:`${o}-label`},[m.label]),m.description&&a.createVNode("p",{class:`${o}-desc`},[m.description]),g&&a.createVNode(_o,{class:`${o}-nested`,items:m.children,vertical:!0,onItemClick:e.onItemClick,classNames:{list:e.classNames.subList,item:e.classNames.subItem},styles:{list:e.styles.subList,item:e.styles.subItem}},null)])])})])]))}}}),Qc=e=>{const{componentCls:t,antCls:n}=e;return{[t]:{[`${n}-cascader-menus ${n}-cascader-menu`]:{height:"auto"},[`${t}-item`]:{"&-icon":{marginInlineEnd:e.paddingXXS},"&-extra":{marginInlineStart:e.padding}},[`&${t}-block`]:{[`${t}-item-extra`]:{marginInlineStart:"auto"}}}}},Jc=fe("Suggestion",e=>{const t=ee(e,{});return Qc(t)},()=>({}));function _c(e,t,n,r,o){const[i,l]=L([]),s=(p,g=i.value)=>{let h=a.toValue(e);for(let y=0;y<p-1;y+=1){const v=g[y],$=h.find(C=>C.value===v);if(!$)break;h=$.children||[]}return h},c=p=>p.map((g,h)=>{const v=s(h+1,p).find($=>$.value===g);return v==null?void 0:v.value}),d=p=>{const g=i.value.length||1,h=s(g),y=h.findIndex(C=>C.value===i.value[g-1]),v=h.length,$=h[(y+p+v)%v];l([...i.value.slice(0,g-1),$.value])},f=()=>{i.value.length>1&&l(i.value.slice(0,i.value.length-1))},u=()=>{const p=s(i.value.length+1);p.length&&l([...i.value,p[0].value])},m=mt(p=>{if(a.toValue(t))switch(console.log("e.key",p),p.key){case"ArrowDown":d(1),p.preventDefault();break;case"ArrowUp":d(-1),p.preventDefault();break;case"ArrowRight":a.toValue(n)?f():u(),p.preventDefault();break;case"ArrowLeft":a.toValue(n)?u():f(),p.preventDefault();break;case"Enter":s(i.value.length+1).length||r(c(i.value)),p.preventDefault();break;case"Escape":o(),p.preventDefault();break}});return a.watch(()=>a.toValue(t),()=>{a.toValue(t)&&l([a.toValue(e)[0].value])},{immediate:!0}),[i,m]}const ed=a.defineComponent({name:"AXSuggestion",__name:"Suggestion",props:a.mergeDefaults({prefixCls:null,className:null,rootClassName:null,style:null,children:{type:Function},open:{type:Boolean},onOpenChange:{type:Function},items:{type:Function},onSelect:{type:Function},block:{type:Boolean},styles:null,classNames:null},{open:!1}),setup(e){a.toRef(e,"prefixCls");const{direction:t,getPrefixCls:n}=W(),r=a.computed(()=>n("suggestion",e.prefixCls));`${r.value}`;const o=a.computed(()=>t.value==="rtl"),i=se("suggestion"),[l,s,c]=Jc(r),[d,f]=L(e.open),[u,m]=L(),p=x=>{var w;f(x),(w=e.onOpenChange)==null||w.call(e,x)},g=x=>{x===!1?p(!1):(m(x),p(!0))},h=()=>{p(!1)},y=a.computed(()=>typeof e.items=="function"?e.items(u.value):e.items),v=x=>{e.onSelect&&e.onSelect(x[x.length-1]),p(!1)},[$,C]=_c(y,d,o,v,h),S=a.computed(()=>{var x;return(x=e.children)==null?void 0:x.call(e,{onTrigger:g,onKeyDown:C})});return()=>l(a.createVNode(E.Cascader,{options:y.value,open:d.value,value:$.value,placement:o.value?"topRight":"topLeft",onDropdownVisibleChange:x=>{x||h()},class:N(e.rootClassName,r.value,s,c,{[`${r.value}-block`]:e.block}),onChange:v,dropdownMatchSelectWidth:e.block},{default:()=>a.createVNode("div",{class:N(r.value,i.value.className,e.rootClassName,e.className,`${r.value}-wrapper`,s.value,c),style:{...i.value.style,...e.style}},[S.value])}))}}),ea=Symbol("SenderHeaderContext"),In=a.shallowRef(),td=e=>{a.provide(ea,e),a.watch(e,()=>{In.value=a.unref(e),a.triggerRef(In)},{immediate:!0,deep:!0})},nd=()=>a.inject(ea,a.computed(()=>In.value||{})),rd=a.defineComponent({props:{value:ne()},setup(e,{slots:t}){return td(a.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),ta=Symbol("ActionButtonContext"),Bn=a.shallowRef(),od=e=>{a.provide(ta,e),a.watch(e,()=>{Bn.value=a.unref(e),a.triggerRef(Bn)},{immediate:!0,deep:!0})},Hn=()=>a.inject(ta,a.computed(()=>Bn.value||{})),ad=a.defineComponent({props:{value:ne()},setup(e,{slots:t}){return od(a.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),bt=a.defineComponent({name:"AXSenderActionButton",__name:"index",props:{action:null},setup(e){const t=K(e,["action","onClick"]);a.toRef(e,"onClick");const n=a.useSlots(),r=Hn(),o=a.computed(()=>{var f;const s=r.value.disabled,c=t.disabled,d=(f=r.value)==null?void 0:f[`${e.action}Disabled`];return s??c??d}),i=a.computed(()=>r.value.prefixCls),l=a.computed(()=>{var s;return(s=r.value)==null?void 0:s[e.action]});return()=>a.createVNode(E.Button,a.mergeProps({type:"text"},t,{onClick:s=>{o.value||(l.value&&l.value(),e.onClick&&!Array.isArray(e.onClick)&&e.onClick(s))},class:N(i.value,{[`${i.value}-disabled`]:o.value})}),{icon:()=>n.default()})}}),id=a.defineComponent({name:"AXSenderClearButton",__name:"ClearButton",props:{prefixCls:{},type:{},htmlType:{},shape:{},size:{},loading:{type:[Boolean,Object]},disabled:{type:Boolean},ghost:{type:Boolean},block:{type:Boolean},danger:{type:Boolean},icon:{},href:{},target:{},title:{},onClick:{type:[Function,Array]},onMousedown:{type:[Function,Array]}},setup(e){const t=e;return()=>a.createVNode(bt,a.mergeProps(t,{action:"onClear"}),{default:()=>[a.createVNode(bn,null,null)]})}}),ld=a.defineComponent({name:"AXSenderStopLoading",__name:"StopLoading",props:{className:null},setup(e){const t=e;return()=>a.createVNode("svg",{color:"currentColor",viewBox:"0 0 1000 1000",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",class:t.className},[a.createVNode("title",null,[a.createTextVNode("Stop Loading")]),a.createVNode("rect",{fill:"currentColor",height:"250",rx:"24",ry:"24",width:"250",x:"375",y:"375"},null),a.createVNode("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor","stroke-width":"100",opacity:"0.45"},null),a.createVNode("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor","stroke-width":"100","stroke-dasharray":"600 9999999"},[a.createVNode("animateTransform",{attributeName:"transform",dur:"1s",from:"0 500 500",repeatCount:"indefinite",to:"360 500 500",type:"rotate"},null)])])}}),na=a.defineComponent({name:"AXSenderLoadingButton",__name:"LoadingButton",props:{prefixCls:{},type:{},htmlType:{},shape:{},size:{},loading:{type:[Boolean,Object]},disabled:{type:Boolean},ghost:{type:Boolean},block:{type:Boolean},danger:{type:Boolean},icon:{},href:{},target:{},title:{},onClick:{type:[Function,Array]},onMousedown:{type:[Function,Array]}},setup(e){const t=e,n=Hn();return()=>a.createVNode(bt,a.mergeProps({icon:null,type:"primary",shape:"circle"},t,{class:N(`${n.value.prefixCls}-loading-button`),action:"onCancel"}),{default:()=>[a.createVNode(ld,{className:`${n.value.prefixCls}-loading-icon`},null)]})}}),ra=a.defineComponent({name:"AXSenderLoadingButton",__name:"SendButton",props:{prefixCls:{},type:{},htmlType:{},shape:{},size:{},loading:{type:[Boolean,Object]},disabled:{type:Boolean},ghost:{type:Boolean},block:{type:Boolean},danger:{type:Boolean},icon:{},href:{},target:{},title:{},onClick:{type:[Function,Array]},onMousedown:{type:[Function,Array]}},setup(e){const t=e;return()=>a.createVNode(bt,a.mergeProps({type:"primary",shape:"circle"},t,{action:"onSend"}),{default:()=>[a.createVNode(gn,null,null)]})}}),qe=1e3,Ue=4,St=140,Ct=250,oa=500,vt=.8,sd=a.defineComponent({name:"AXSenderRecordingIcon",__name:"RecordingIcon",props:{className:null},setup(e){const t=St/2;return()=>a.createVNode("svg",{color:"currentColor",viewBox:`0 0 ${qe} ${qe}`,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",class:e.className},[a.createVNode("title",null,[a.createTextVNode("Speech Recording")]),Array.from({length:Ue}).map((n,r)=>{const o=(qe-St*Ue)/(Ue-1),i=r*(o+St),l=qe/2-Ct/2,s=qe/2-oa/2;return a.createVNode("rect",{fill:"currentColor",rx:t,ry:t,height:Ct,width:St,x:i,y:l,key:r},[a.createVNode("animate",{attributeName:"height",values:`${Ct}; ${oa}; ${Ct}`,keyTimes:"0; 0.5; 1",dur:`${vt}s`,begin:`${vt/Ue*r}s`,repeatCount:"indefinite"},null),a.createVNode("animate",{attributeName:"y",values:`${l}; ${s}; ${l}`,keyTimes:"0; 0.5; 1",dur:`${vt}s`,begin:`${vt/Ue*r}s`,repeatCount:"indefinite"},null)])})])}}),cd=a.defineComponent({name:"AXSenderSpeechButton",__name:"index",props:{prefixCls:{},type:{},htmlType:{},shape:{},size:{},loading:{type:[Boolean,Object]},disabled:{type:Boolean},ghost:{type:Boolean},block:{type:Boolean},danger:{type:Boolean},icon:{},href:{},target:{},title:{},onClick:{type:[Function,Array]},onMousedown:{type:[Function,Array]}},setup(e){const t=e,n=Hn(),r=a.computed(()=>n.value.speechRecording),o=a.computed(()=>n.value.prefixCls),i=a.computed(()=>{let l;return r.value?l=a.createVNode(sd,{className:`${o.value}-recording-icon`},null):n.value.onSpeechDisabled?l=a.createVNode(pn,null,null):l=a.createVNode(yn,null,null),l});return()=>a.createVNode(bt,a.mergeProps({icon:null,type:"primary"},t,{style:{display:"flex",justifyContent:"center",alignItems:"center"},action:"onSpeech"}),{default:()=>[i.value]})}}),dd=e=>{const{componentCls:t,calc:n}=e,r=`${t}-header`;return{[t]:{[r]:{borderBottomWidth:e.lineWidth,borderBottomStyle:"solid",borderBottomColor:e.colorBorder,"&-header":{background:e.colorFillAlter,fontSize:e.fontSize,lineHeight:e.lineHeight,paddingBlock:n(e.paddingSM).sub(e.lineWidthBold).equal(),paddingInlineStart:e.padding,paddingInlineEnd:e.paddingXS,display:"flex",[`${r}-title`]:{flex:"auto"}},"&-content":{padding:e.padding},"&-motion":{transition:["height","border"].map(o=>`${o} ${e.motionDurationSlow}`).join(","),overflow:"hidden","&-enter-start, &-leave-active":{borderBottomColor:"transparent"},"&-hidden":{display:"none"}},"&-collapse-transition":{"&-enter-active":{transition:["max-height","padding-top","padding-bottom"].map(o=>`${o} ${e.motionDurationSlow} ${e.motionEaseInOut}`).join(",")},"&-leave-active":{transition:["max-height","padding-top","padding-bottom"].map(o=>`${o} ${e.motionDurationSlow} ${e.motionEaseInOut}`).join(",")}}}}}},ud=e=>{const{componentCls:t,padding:n,paddingSM:r,paddingXS:o,lineWidth:i,lineWidthBold:l,calc:s}=e;return{[t]:{position:"relative",width:"100%",boxSizing:"border-box",boxShadow:`${e.boxShadowTertiary}`,transition:`background ${e.motionDurationSlow}`,borderRadius:{_skip_check_:!0,value:s(e.borderRadius).mul(2).equal()},borderColor:e.colorBorder,borderWidth:0,borderStyle:"solid","&:after":{content:'""',position:"absolute",inset:0,pointerEvents:"none",transition:`border-color ${e.motionDurationSlow}`,borderRadius:{_skip_check_:!0,value:"inherit"},borderStyle:"inherit",borderColor:"inherit",borderWidth:i},"&:focus-within":{boxShadow:`${e.boxShadowSecondary}`,borderColor:e.colorPrimary,"&:after":{borderWidth:l}},"&-disabled":{background:e.colorBgContainerDisabled},[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{display:"flex",gap:o,width:"100%",paddingBlock:r,paddingInlineStart:n,paddingInlineEnd:r,boxSizing:"border-box",alignItems:"flex-end"},[`${t}-prefix`]:{flex:"none"},[`${t}-input`]:{padding:0,borderRadius:0,flex:"auto",alignSelf:"center",minHeight:"auto"},[`${t}-actions-list`]:{flex:"none",display:"flex","&-presets":{gap:e.paddingXS}},[`${t}-actions-btn`]:{"&-disabled":{opacity:.45},"&-loading-button":{padding:0,border:0},"&-loading-icon":{height:e.controlHeight,width:e.controlHeight,verticalAlign:"top"},"&-recording-icon":{height:"1.2em",width:"1.2em",verticalAlign:"top"}}}}},fd=fe("Sender",e=>{const{paddingXS:t,calc:n}=e,r=ee(e,{SenderContentMaxWidth:`calc(100% - ${Z(n(t).add(32).equal())})`});return[ud(r),dd(r)]},()=>({}));let xt;!xt&&typeof window<"u"&&(xt=window.SpeechRecognition||window.webkitSpeechRecognition);function hd(e,t){const n=e,r=a.computed(()=>{const h=a.toValue(t);return typeof h=="object"?{controlledRecording:h.recording,onControlledRecordingChange:h.onRecordingChange,speechInControlled:typeof h.recording=="boolean"}:{controlledRecording:void 0,onControlledRecordingChange:void 0,speechInControlled:!1}}),o=a.computed(()=>r.value.controlledRecording),i=r.value.onControlledRecordingChange,l=r.value.speechInControlled,s=a.ref(null);a.watchEffect(()=>{if(typeof navigator<"u"&&"permissions"in navigator){let h=null;navigator.permissions.query({name:"microphone"}).then(y=>{s.value=y.state,y.onchange=function(){s.value=this.state},h=y}),a.onWatcherCleanup(()=>{h&&(h.onchange=null)})}});const c=a.computed(()=>xt&&s.value!=="denied"),d=a.ref(null),[f,u]=Jo(!1,{value:o}),m=a.ref(!1),p=()=>{if(c.value&&!d.value){const h=new xt;h.onstart=()=>{u(!0)},h.onend=()=>{u(!1)},h.onresult=y=>{var v,$,C;if(!m.value){const S=(C=($=(v=y.results)==null?void 0:v[0])==null?void 0:$[0])==null?void 0:C.transcript;n(S)}m.value=!1},d.value=h}};return{speechPermission:c,triggerSpeech:h=>{h&&!f.value||(m.value=h,l?i==null||i(!f.value):(p(),d.value&&(f.value?(d.value.stop(),i==null||i(!1)):(d.value.start(),i==null||i(!0)))))},recording:f}}function md(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}const gd=a.defineComponent({name:"AXSender",__name:"Sender",props:{onKeyPress:{},prefixCls:{},defaultValue:{},value:{},loading:{type:Boolean},placeholder:{},readOnly:{type:Boolean},submitType:{type:[String,Boolean],default:"enter"},disabled:{type:Boolean,default:void 0},onSubmit:{},onChange:{},onCancel:{},onKeyDown:{},onPaste:{},onPasteFile:{},components:{},styles:{default:()=>({})},rootClassName:{},classNames:{default:()=>({})},style:{},className:{},actions:{},allowSpeech:{},prefix:{},header:{}},emits:["update:value"],setup(e,{expose:t,emit:n}){const r=K(e,["prefixCls","styles","classNames","className","rootClassName","style","defaultValue","value","placeholder","readOnly","submitType","onSubmit","loading","components","onCancel","onChange","actions","onKeyPress","onKeyDown","disabled","allowSpeech","prefix","header","onPaste","onPasteFile"]);a.toRef(e,"prefixCls");function o(A,z,le){return md(A,z)||le}const i=n,l=a.useSlots(),{direction:s,getPrefixCls:c}=W(),d=a.computed(()=>c("sender",e.prefixCls)),f=a.ref(null),u=a.ref(null),m=se("sender"),p=a.computed(()=>`${d.value}-input`),[g,h,y]=fd(d.value),v=a.computed(()=>N(d.value,m.value.className,e.className,e.rootClassName,h.value,y,{[`${d.value}-rtl`]:s.value==="rtl",[`${d.value}-disabled`]:e.disabled})),$=a.computed(()=>`${d.value}-actions-btn`),C=a.computed(()=>`${d.value}-actions-list`),S=a.ref(e.value??e.defaultValue??""),x=A=>{S.value=A};a.watch(()=>e.value,()=>{x(e.value)});const w=(A,z)=>{x(A),i("update:value",A),e.onChange&&e.onChange(A,z)},{speechPermission:b,triggerSpeech:T,recording:P}=hd(A=>{w(`${S.value} ${A}`)},()=>e.allowSpeech),O=o(e.components,["input"],E.Input.TextArea),M=a.computed(()=>Me(r,{attr:!0,aria:!0,data:!0})),k=a.computed(()=>({...M.value,ref:u})),I=()=>{S.value&&e.onSubmit&&!e.loading&&e.onSubmit(S.value)},V=()=>{w("")},X=a.ref(!1),J=()=>{X.value=!0},Ie=()=>{X.value=!1},Un=A=>{const z=A.key==="Enter"&&!X.value;switch(e.submitType){case"enter":z&&!A.shiftKey&&(A.preventDefault(),I());break;case"shiftEnter":z&&A.shiftKey&&(A.preventDefault(),I());break}e.onKeyPress&&e.onKeyPress(A)},xe=A=>{var le,Qe;const z=(le=A.clipboardData)==null?void 0:le.files[0];z&&e.onPasteFile&&(e.onPasteFile(z),A.preventDefault()),(Qe=e.onPaste)==null||Qe.call(e,A)},Be=A=>{var z,le;A.target!==((z=f.value)==null?void 0:z.querySelector(`.${p.value}`))&&A.preventDefault(),(le=u.value)==null||le.focus()},me=a.computed(()=>{let A=a.createVNode(E.Flex,{class:`${C.value}-presets`},{default:()=>[e.allowSpeech&&a.createVNode(cd,null,null),e.loading?a.createVNode(na,null,null):a.createVNode(ra,null,null)]});const z={components:{SendButton:ra,ClearButton:id,LoadingButton:na}};return l.actions?A=l.actions({ori:A,info:z}):typeof e.actions=="function"?A=e.actions(A,z):e.actions&&(A=e.actions),A}),Tt=a.computed(()=>l.header?l.header():e.header),Ye=a.computed(()=>l.prefix?l.prefix():e.prefix);return t({nativeElement:f.value,focus:A=>{var z;return(z=u.value)==null?void 0:z.focus(A)},blur:()=>{var A;return(A=u.value)==null?void 0:A.blur()}}),()=>g(a.createVNode("div",{ref:f,class:v.value,style:{...m.value.style,...e.style}},[Tt.value&&a.createVNode(rd,{value:{prefixCls:d.value}},{default:()=>[Tt.value]}),a.createVNode("div",{class:`${d.value}-content`,onMousedown:Be},[Ye.value&&a.createVNode("div",{class:N(`${d.value}-prefix`,m.value.classNames.prefix,e.classNames.prefix),style:{...m.value.styles.prefix,...e.styles.prefix}},[Ye.value]),a.createVNode(O,a.mergeProps(k.value,{disabled:e.disabled,style:{...m.value.styles.input,...e.styles.input},class:N(p.value,m.value.classNames.input,e.classNames.input),autoSize:{maxRows:8},value:S.value,onChange:A=>{w(A.target.value,A),T(!0)},onPressEnter:Un,onCompositionstart:J,onCompositionend:Ie,onKeydown:e.onKeyDown,placeholder:e.placeholder,onPaste:xe,bordered:!1,readOnly:e.readOnly}),null),a.createVNode("div",{class:N(C.value,m.value.classNames.actions,e.classNames.actions),style:{...m.value.styles.actions,...e.styles.actions}},[a.createVNode(ad,{value:{prefixCls:$.value,onSend:I,onSendDisabled:!S.value,onClear:V,onClearDisabled:!S.value,onCancel:e.onCancel,onCancelDisabled:!e.loading,onSpeech:()=>T(!1),onSpeechDisabled:!b.value,speechRecording:P.value,disabled:e.disabled}},{default:()=>[me.value]})])])]))}}),pd=a.defineComponent({name:"AXCollapseTransition",__name:"CollapseTransition",props:{prefixCls:null},setup(e){const t=e,n=a.computed(()=>t.prefixCls+"-collapse-transition"),r={beforeEnter(o){o.dataset||(o.dataset={}),o.dataset.oldPaddingTop=o.style.paddingTop,o.dataset.oldPaddingBottom=o.style.paddingBottom,o.style.maxHeight=0,o.style.paddingTop=0,o.style.paddingBottom=0},enter(o){o.dataset.oldOverflow=o.style.overflow,o.scrollHeight!==0?(o.style.maxHeight=`${o.scrollHeight}px`,o.style.paddingTop=o.dataset.oldPaddingTop,o.style.paddingBottom=o.dataset.oldPaddingBottom):(o.style.maxHeight=`${o.dataset.oldMaxHeight||999}px`,o.style.paddingTop=o.dataset.oldPaddingTop,o.style.paddingBottom=o.dataset.oldPaddingBottom),o.style.overflow="hidden"},afterEnter(o){o.style.maxHeight="",o.style.overflow=o.dataset.oldOverflow},beforeLeave(o){o.dataset||(o.dataset={}),o.dataset.oldMaxHeight=o.scrollHeight,o.dataset.oldPaddingTop=o.style.paddingTop,o.dataset.oldPaddingBottom=o.style.paddingBottom,o.dataset.oldOverflow=o.style.overflow,o.style.overflow="hidden",o.style.maxHeight=`${o.scrollHeight}px`},leave(o){o.scrollHeight!==0&&(o.style.maxHeight=0,o.style.paddingTop=0,o.style.paddingBottom=0)},afterLeave(o){o.style.maxHeight="",o.style.overflow=o.dataset.oldOverflow,o.style.paddingTop=o.dataset.oldPaddingTop,o.style.paddingBottom=o.dataset.oldPaddingBottom}};return(o,i)=>(a.openBlock(),a.createBlock(a.Transition,a.mergeProps({name:n.value},a.toHandlers(r)),{default:a.withCtx(()=>[a.renderSlot(o.$slots,"default")]),_:3},16,["name"]))}}),yd=a.defineComponent({name:"AXSenderHeader",inheritAttrs:!1,__name:"SenderHeader",props:a.mergeDefaults({forceRender:{type:Boolean},open:{type:Boolean},onOpenChange:{type:Function},title:null,children:null,className:null,style:null,classNames:null,styles:null,closable:{type:Boolean}},{classNames:()=>({}),styles:()=>({})}),setup(e){a.toRef(e,"classNames");const t=a.useSlots(),n=nd(),r=a.computed(()=>`${n.value.prefixCls}-header`),o=a.useAttrs();return()=>a.createVNode(pd,{prefixCls:r.value},{default:()=>{var i;return[e.open&&a.createVNode("div",a.mergeProps(o,{class:N(r.value,e.className),style:{...e.style}}),[(e.closable!==!1||e.title)&&a.createVNode("div",{class:N(`${r.value}-header`,e.classNames.header),style:{...e.styles.header}},[a.createVNode("div",{class:`${r.value}-title`},[e.title]),e.closable!==!1&&a.createVNode("div",{class:`${r.value}-close`},[a.createVNode(E.Button,{type:"text",icon:a.createVNode(Cn,null,null),size:"small",onClick:()=>{var l;(l=e.onOpenChange)==null||l.call(e,!e.open)}},null)])]),t.default&&a.createVNode("div",{class:N(`${r.value}-content`,e.classNames.content),style:{...e.styles.content}},[(i=t.default)==null?void 0:i.call(t)])])]}})}}),bd=Object.assign(gd,{Header:yd}),aa=Symbol("AttachmentContext"),Vn=a.shallowRef(),Sd=e=>{a.provide(aa,e),a.watch(e,()=>{Vn.value=a.unref(e),a.triggerRef(Vn)},{immediate:!0,deep:!0})},wt=()=>a.inject(aa,a.computed(()=>Vn.value||{})),Cd=a.defineComponent({inheritAttrs:!1,props:{value:ne()},setup(e,{slots:t}){return Sd(a.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),vd=a.defineComponent({name:"AXAttachmentsPlaceholderUploader",__name:"PlaceholderUploader",props:a.mergeDefaults({prefixCls:null,placeholder:null,upload:null,className:null,style:null},{placeholder:()=>({})}),setup(e,{expose:t}){const n=`${e.prefixCls}-placeholder`,r=a.computed(()=>e.placeholder||{}),o=a.useTemplateRef("upload-dragger"),i=wt(),[l,s]=L(!1),c=()=>{s(!0)},d=m=>{m.currentTarget.contains(m.relatedTarget)||s(!1)},f=()=>{s(!1)};t({nativeElement:o});const u=a.computed(()=>a.isVNode(e.placeholder)?e.placeholder:a.createVNode(E.Flex,{align:"center",justify:"center",vertical:!0,class:`${n}-inner`},{default:()=>[a.createVNode(E.Typography.Text,{class:`${n}-icon`},{default:()=>[r.value.icon]}),a.createVNode(E.Typography.Title,{class:`${n}-title`,level:5},{default:()=>[r.value.title]}),a.createVNode(E.Typography.Text,{class:`${n}-description`,type:"secondary"},{default:()=>[r.value.description]})]}));return()=>a.createVNode("div",{class:N(n,{[`${n}-drag-in`]:l.value,[`${n}-disabled`]:i.value.disabled},e.className),onDragenter:c,onDragleave:d,onDrop:f,"aria-hidden":i.value.disabled,style:e.style},[a.createVNode(E.Upload.Dragger,a.mergeProps({showUploadList:!1},e.upload,{ref:"upload-dragger",style:{padding:0,border:0,background:"transparent"}}),{default:()=>[u.value]})])}}),ia=a.defineComponent({name:"AXAttachmentsDropArea",__name:"DropArea",props:{prefixCls:null,className:null,getDropContainer:{type:Function},children:null},setup(e){const t=wt(),[n,r]=L(),[o,i]=L(null);a.watch(()=>e.getDropContainer,()=>{var d;const c=(d=e.getDropContainer)==null?void 0:d.call(e);n.value!==c&&r(c)}),a.watch(()=>!!n.value,()=>{if(n.value){const c=()=>{i(!0)},d=m=>{m.preventDefault()},f=m=>{m.relatedTarget||i(!1)},u=m=>{i(!1),m.preventDefault()};document.addEventListener("dragenter",c),document.addEventListener("dragover",d),document.addEventListener("dragleave",f),document.addEventListener("drop",u),a.onWatcherCleanup(()=>{document.removeEventListener("dragenter",c),document.removeEventListener("dragover",d),document.removeEventListener("dragleave",f),document.removeEventListener("drop",u)})}});const l=a.computed(()=>e.getDropContainer&&n.value&&!t.value.disabled),s=`${e.prefixCls}-drop-area`;return()=>l.value?a.createVNode(a.Teleport,{to:n.value},{default:()=>[a.createVNode("div",{class:N(s,e.className,{[`${s}-on-body`]:n.value.tagName==="BODY"}),style:{display:o.value?"block":"none"}},[e.children])]}):null}}),la=a.defineComponent({name:"AXAttachmentsSilentUploader",__name:"SilentUploader",props:{children:null,upload:null,rootClassName:null},setup(e,{expose:t}){const n=a.useTemplateRef("upload");return t({nativeElement:n}),()=>a.createVNode(E.Upload,a.mergeProps(e.upload,{showUploadList:!1,ref:"upload"}),{default:()=>[e.children]})}}),sa=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},xd={},wd={width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function $d(e,t){return a.openBlock(),a.createElementBlock("svg",wd,t[0]||(t[0]=[a.createElementVNode("title",null,"audio",-1),a.createElementVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[a.createElementVNode("path",{d:"M14.1178571,4.0125 C14.225,4.11964286 14.2857143,4.26428571 14.2857143,4.41607143 L14.2857143,15.4285714 C14.2857143,15.7446429 14.0303571,16 13.7142857,16 L2.28571429,16 C1.96964286,16 1.71428571,15.7446429 1.71428571,15.4285714 L1.71428571,0.571428571 C1.71428571,0.255357143 1.96964286,0 2.28571429,0 L9.86964286,0 C10.0214286,0 10.1678571,0.0607142857 10.275,0.167857143 L14.1178571,4.0125 Z M10.7315824,7.11216117 C10.7428131,7.15148751 10.7485063,7.19218979 10.7485063,7.23309113 L10.7485063,8.07742614 C10.7484199,8.27364959 10.6183424,8.44607275 10.4296853,8.50003683 L8.32984514,9.09986306 L8.32984514,11.7071803 C8.32986605,12.5367078 7.67249692,13.217028 6.84345686,13.2454634 L6.79068592,13.2463395 C6.12766108,13.2463395 5.53916361,12.8217001 5.33010655,12.1924966 C5.1210495,11.563293 5.33842118,10.8709227 5.86959669,10.4741173 C6.40077221,10.0773119 7.12636292,10.0652587 7.67042486,10.4442027 L7.67020842,7.74937024 L7.68449368,7.74937024 C7.72405122,7.59919041 7.83988806,7.48101083 7.98924584,7.4384546 L10.1880418,6.81004755 C10.42156,6.74340323 10.6648954,6.87865515 10.7315824,7.11216117 Z M9.60714286,1.31785714 L12.9678571,4.67857143 L9.60714286,4.67857143 L9.60714286,1.31785714 Z",fill:"currentColor"})],-1)]))}const Nd=sa(xd,[["render",$d]]),Td={},Pd={width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function Ad(e,t){return a.openBlock(),a.createElementBlock("svg",Pd,t[0]||(t[0]=[a.createElementVNode("title",null,"video",-1),a.createElementVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[a.createElementVNode("path",{d:"M14.1178571,4.0125 C14.225,4.11964286 14.2857143,4.26428571 14.2857143,4.41607143 L14.2857143,15.4285714 C14.2857143,15.7446429 14.0303571,16 13.7142857,16 L2.28571429,16 C1.96964286,16 1.71428571,15.7446429 1.71428571,15.4285714 L1.71428571,0.571428571 C1.71428571,0.255357143 1.96964286,0 2.28571429,0 L9.86964286,0 C10.0214286,0 10.1678571,0.0607142857 10.275,0.167857143 L14.1178571,4.0125 Z M12.9678571,4.67857143 L9.60714286,1.31785714 L9.60714286,4.67857143 L12.9678571,4.67857143 Z M10.5379461,10.3101106 L6.68957555,13.0059749 C6.59910784,13.0693494 6.47439406,13.0473861 6.41101953,12.9569184 C6.3874624,12.9232903 6.37482581,12.8832269 6.37482581,12.8421686 L6.37482581,7.45043999 C6.37482581,7.33998304 6.46436886,7.25043999 6.57482581,7.25043999 C6.61588409,7.25043999 6.65594753,7.26307658 6.68957555,7.28663371 L10.5379461,9.98249803 C10.6284138,10.0458726 10.6503772,10.1705863 10.5870027,10.2610541 C10.5736331,10.2801392 10.5570312,10.2967411 10.5379461,10.3101106 Z",fill:"currentColor"})],-1)]))}const Od=sa(Td,[["render",Ad]]),Ed=e=>e.indexOf("image/")===0,$t=200;function Rd(e){return new Promise(t=>{if(!e||!e.type||!Ed(e.type)){t("");return}const n=new Image;if(n.onload=()=>{const{width:r,height:o}=n,i=r/o,l=i>1?$t:$t*i,s=i>1?$t/i:$t,c=document.createElement("canvas");c.width=l,c.height=s,c.style.cssText=`position: fixed; left: 0; top: 0; width: ${l}px; height: ${s}px; z-index: 9999; display: none;`,document.body.appendChild(c),c.getContext("2d").drawImage(n,0,0,l,s);const f=c.toDataURL();document.body.removeChild(c),window.URL.revokeObjectURL(n.src),t(f)},n.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const r=new FileReader;r.onload=()=>{r.result&&typeof r.result=="string"&&(n.src=r.result)},r.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){const r=new FileReader;r.onload=()=>{r.result&&t(r.result)},r.readAsDataURL(e)}else n.src=window.URL.createObjectURL(e)})}function Ke(e){"@babel/helpers - typeof";return Ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ke(e)}function Md(e,t){if(Ke(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ke(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Id(e){var t=Md(e,"string");return Ke(t)=="symbol"?t:t+""}function U(e,t,n){return(t=Id(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const F=Math.round;function Ln(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(o=>parseFloat(o));for(let o=0;o<3;o+=1)r[o]=t(r[o]||0,n[o]||"",o);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const ca=(e,t,n)=>n===0?e:e/100;function Ze(e,t){const n=t||255;return e>n?n:e<0?0:e}class jn{constructor(t){U(this,"isValid",!0),U(this,"r",0),U(this,"g",0),U(this,"b",0),U(this,"a",1),U(this,"_h",void 0),U(this,"_s",void 0),U(this,"_l",void 0),U(this,"_v",void 0),U(this,"_max",void 0),U(this,"_min",void 0),U(this,"_brightness",void 0);function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let o=function(i){return r.startsWith(i)};const r=t.trim();/^#?[A-F\d]{3,8}$/i.test(r)?this.fromHexString(r):o("rgb")?this.fromRgbString(r):o("hsl")?this.fromHslString(r):(o("hsv")||o("hsb"))&&this.fromHsvString(r)}else if(t instanceof jn)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=Ze(t.r),this.g=Ze(t.g),this.b=Ze(t.b),this.a=typeof t.a=="number"?Ze(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(i){const l=i/255;return l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),o=t(this.b);return .2126*n+.7152*r+.0722*o}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=F(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()-t/100;return o<0&&(o=0),this._c({h:n,s:r,l:o,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()+t/100;return o>1&&(o=1),this._c({h:n,s:r,l:o,a:this.a})}mix(t,n=50){const r=this._c(t),o=n/100,i=s=>(r[s]-this[s])*o+this[s],l={r:F(i("r")),g:F(i("g")),b:F(i("b")),a:F(i("a")*100)/100};return this._c(l)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),o=i=>F((this[i]*this.a+n[i]*n.a*(1-this.a))/r);return this._c({r:o("r"),g:o("g"),b:o("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const o=(this.b||0).toString(16);if(t+=o.length===2?o:"0"+o,typeof this.a=="number"&&this.a>=0&&this.a<1){const i=F(this.a*255).toString(16);t+=i.length===2?i:"0"+i}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=F(this.getSaturation()*100),r=F(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const o=this.clone();return o[t]=Ze(n,r),o}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function r(o,i){return parseInt(n[o]+n[i||o],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:t,s:n,l:r,a:o}){if(this._h=t%360,this._s=n,this._l=r,this.a=typeof o=="number"?o:1,n<=0){const m=F(r*255);this.r=m,this.g=m,this.b=m}let i=0,l=0,s=0;const c=t/60,d=(1-Math.abs(2*r-1))*n,f=d*(1-Math.abs(c%2-1));c>=0&&c<1?(i=d,l=f):c>=1&&c<2?(i=f,l=d):c>=2&&c<3?(l=d,s=f):c>=3&&c<4?(l=f,s=d):c>=4&&c<5?(i=f,s=d):c>=5&&c<6&&(i=d,s=f);const u=r-d/2;this.r=F((i+u)*255),this.g=F((l+u)*255),this.b=F((s+u)*255)}fromHsv({h:t,s:n,v:r,a:o}){this._h=t%360,this._s=n,this._v=r,this.a=typeof o=="number"?o:1;const i=F(r*255);if(this.r=i,this.g=i,this.b=i,n<=0)return;const l=t/60,s=Math.floor(l),c=l-s,d=F(r*(1-n)*255),f=F(r*(1-n*c)*255),u=F(r*(1-n*(1-c))*255);switch(s){case 0:this.g=u,this.b=d;break;case 1:this.r=f,this.b=d;break;case 2:this.r=d,this.b=u;break;case 3:this.r=d,this.g=f;break;case 4:this.r=u,this.g=d;break;case 5:default:this.g=d,this.b=f;break}}fromHsvString(t){const n=Ln(t,ca);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=Ln(t,ca);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=Ln(t,(r,o)=>o.includes("%")?F(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}const Bd=e=>{const{componentCls:t,calc:n}=e,r=`${t}-list-card`,o=n(e.fontSize).mul(e.lineHeight).mul(2).add(e.paddingSM).add(e.paddingSM).equal();return{[r]:{borderRadius:e.borderRadius,position:"relative",background:e.colorFillContent,borderWidth:e.lineWidth,borderStyle:"solid",borderColor:"transparent",flex:"none",[`${r}-name,${r}-desc`]:{display:"flex",flexWrap:"nowrap",maxWidth:"100%"},[`${r}-ellipsis-prefix`]:{flex:"0 1 auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},[`${r}-ellipsis-suffix`]:{flex:"none"},"&-type-overview":{padding:n(e.paddingSM).sub(e.lineWidth).equal(),paddingInlineStart:n(e.padding).add(e.lineWidth).equal(),display:"flex",flexWrap:"nowrap",gap:e.paddingXS,alignItems:"flex-start",width:236,[`${r}-icon`]:{fontSize:n(e.fontSizeLG).mul(2).equal(),lineHeight:1,paddingTop:n(e.paddingXXS).mul(1.5).equal(),flex:"none"},[`${r}-content`]:{flex:"auto",minWidth:0,display:"flex",flexDirection:"column",alignItems:"stretch"},[`${r}-desc`]:{color:e.colorTextTertiary}},"&-type-preview":{width:o,height:o,lineHeight:1,[`&:not(${r}-status-error)`]:{border:0},img:{width:"100%",height:"100%",verticalAlign:"top",objectFit:"cover",borderRadius:"inherit"},[`${r}-img-mask`]:{position:"absolute",inset:0,display:"flex",justifyContent:"center",alignItems:"center",background:`rgba(0, 0, 0, ${e.opacityLoading})`,borderRadius:"inherit"},[`&${r}-status-error`]:{[`img, ${r}-img-mask`]:{borderRadius:n(e.borderRadius).sub(e.lineWidth).equal()},[`${r}-desc`]:{paddingInline:e.paddingXXS}},[`${r}-progress`]:{}},[`${r}-remove`]:{position:"absolute",top:0,insetInlineEnd:0,border:0,padding:e.paddingXXS,background:"transparent",lineHeight:1,transform:"translate(50%, -50%)",fontSize:e.fontSize,cursor:"pointer",opacity:e.opacityLoading,display:"none","&:dir(rtl)":{transform:"translate(-50%, -50%)"},"&:hover":{opacity:1},"&:active":{opacity:e.opacityLoading}},[`&:hover ${r}-remove`]:{display:"block"},"&-status-error":{borderColor:e.colorError,[`${r}-desc`]:{color:e.colorError}},"&-motion":{overflow:"hidden",transition:["opacity","width","margin","padding"].map(i=>`${i} ${e.motionDurationSlow}`).join(","),[`${r}-remove`]:{display:"none !important"},"&-appear-start":{width:0,transition:"none"},"&-leave-active":{opacity:0,width:0,paddingInline:0,borderInlineWidth:0,marginInlineEnd:n(e.paddingSM).mul(-1).equal()}}}}},zn={"&, *":{boxSizing:"border-box"}},Hd=e=>{const{componentCls:t,calc:n,antCls:r}=e,o=`${t}-drop-area`,i=`${t}-placeholder`;return{[o]:{position:"absolute",inset:0,zIndex:e.zIndexPopupBase,...zn,"&-on-body":{position:"fixed",inset:0},"&-hide-placement":{[`${i}-inner`]:{display:"none"}},[i]:{padding:0}},"&":{[i]:{height:"100%",borderRadius:e.borderRadius,borderWidth:e.lineWidthBold,borderStyle:"dashed",borderColor:"transparent",padding:e.padding,position:"relative",backdropFilter:"blur(10px)",...zn,[`${r}-upload-wrapper ${r}-upload${r}-upload-btn`]:{padding:0},[`&${i}-drag-in`]:{borderColor:e.colorPrimaryHover},[`&${i}-disabled`]:{opacity:.25,pointerEvents:"none"},[`${i}-inner`]:{gap:n(e.paddingXXS).div(2).equal()},[`${i}-icon`]:{fontSize:e.fontSizeHeading2,lineHeight:1},[`${i}-title${i}-title`]:{margin:0,fontSize:e.fontSize,lineHeight:e.lineHeight},[`${i}-description`]:{}}}}},Vd=e=>{const{componentCls:t,calc:n}=e,r=`${t}-list`,o=n(e.fontSize).mul(e.lineHeight).mul(2).add(e.paddingSM).add(e.paddingSM).equal();return{[t]:{position:"relative",width:"100%",...zn,[r]:{display:"flex",flexWrap:"wrap",gap:e.paddingSM,fontSize:e.fontSize,lineHeight:e.lineHeight,color:e.colorText,paddingBlock:e.paddingSM,paddingInline:e.padding,width:"100%",background:e.colorBgContainer,scrollbarWidth:"none","-ms-overflow-style":"none","&::-webkit-scrollbar":{display:"none"},"&-overflow-scrollX, &-overflow-scrollY":{"&:before, &:after":{content:'""',position:"absolute",opacity:0,transition:`opacity ${e.motionDurationSlow}`,zIndex:1}},"&-overflow-ping-start:before":{opacity:1},"&-overflow-ping-end:after":{opacity:1},"&-overflow-scrollX":{overflowX:"auto",overflowY:"hidden",flexWrap:"nowrap","&:before, &:after":{insetBlock:0,width:8},"&:before":{insetInlineStart:0,background:"linear-gradient(to right, rgba(0,0,0,0.06), rgba(0,0,0,0));"},"&:after":{insetInlineEnd:0,background:"linear-gradient(to left, rgba(0,0,0,0.06), rgba(0,0,0,0));"},"&:dir(rtl)":{"&:before":{background:"linear-gradient(to left, rgba(0,0,0,0.06), rgba(0,0,0,0));"},"&:after":{background:"linear-gradient(to right, rgba(0,0,0,0.06), rgba(0,0,0,0));"}}},"&-overflow-scrollY":{overflowX:"hidden",overflowY:"auto",maxHeight:n(o).mul(3).equal(),"&:before, &:after":{insetInline:0,height:8},"&:before":{insetBlockStart:0,background:"linear-gradient(to bottom, rgba(0,0,0,0.06), rgba(0,0,0,0));"},"&:after":{insetBlockEnd:0,background:"linear-gradient(to top, rgba(0,0,0,0.06), rgba(0,0,0,0));"}},"&-upload-btn":{width:o,height:o,fontSize:e.fontSizeHeading2,color:"#999"},"&-prev-btn, &-next-btn":{position:"absolute",top:"50%",transform:"translateY(-50%)",boxShadow:e.boxShadowTertiary,opacity:0,pointerEvents:"none"},"&-prev-btn":{left:{_skip_check_:!0,value:e.padding}},"&-next-btn":{right:{_skip_check_:!0,value:e.padding}},"&:dir(ltr)":{[`&${r}-overflow-ping-start ${r}-prev-btn`]:{opacity:1,pointerEvents:"auto"},[`&${r}-overflow-ping-end ${r}-next-btn`]:{opacity:1,pointerEvents:"auto"}},"&:dir(rtl)":{[`&${r}-overflow-ping-end ${r}-prev-btn`]:{opacity:1,pointerEvents:"auto"},[`&${r}-overflow-ping-start ${r}-next-btn`]:{opacity:1,pointerEvents:"auto"}}}}}},da=fe("Attachments",e=>{const t=ee(e,{});return[Hd(t),Vd(t),Bd(t)]},e=>{const{colorBgContainer:t}=e;return{colorBgPlaceholderHover:new jn(t).setA(.85).toRgbString()}}),Fn=" ",Dn="#8c8c8c",ua=a.defineComponent({name:"AXAttachmentsFileListCard",__name:"FileListCard",props:{prefixCls:null,item:null,onRemove:{type:Function},className:null,style:null},setup(e,{expose:t}){a.toRef(e,"prefixCls");const n=["png","jpg","jpeg","gif","bmp","webp","svg"],r=[{icon:a.createVNode(xn,null,null),color:"#22b35e",ext:["xlsx","xls"]},{icon:a.createVNode(wn,null,null),color:Dn,ext:n},{icon:a.createVNode($n,null,null),color:Dn,ext:["md","mdx"]},{icon:a.createVNode(Nn,null,null),color:"#ff4d4f",ext:["pdf"]},{icon:a.createVNode(Tn,null,null),color:"#ff6e31",ext:["ppt","pptx"]},{icon:a.createVNode(An,null,null),color:"#1677ff",ext:["doc","docx"]},{icon:a.createVNode(On,null,null),color:"#fab714",ext:["zip","rar","7z","tar","gz"]},{icon:a.createVNode(Od,null,null),color:"#ff4d4f",ext:["mp4","avi","mov","wmv","flv","mkv"]},{icon:a.createVNode(Nd,null,null),color:"#8c8c8c",ext:["mp3","wav","flac","ape","aac","ogg"]}];function o(I,V){return V.some(X=>I.toLowerCase()===`.${X}`)}function i(I){let V=I;const X=["B","KB","MB","GB","TB","PB","EB"];let J=0;for(;V>=1024&&J<X.length-1;)V/=1024,J++;return`${V.toFixed(0)} ${X[J]}`}const l=wt(),s=a.computed(()=>l.value.disabled),c=a.computed(()=>e.item.name),d=a.computed(()=>e.item.size),f=a.computed(()=>e.item.percent),u=a.computed(()=>e.item.status||"done"),m=a.computed(()=>e.item.description),{getPrefixCls:p}=W(),g=a.computed(()=>p("attachment",e.prefixCls)),h=`${g.value}-list-card`,[y,v,$]=da(g),C=a.useTemplateRef("file-list-card-container"),S=a.computed(()=>{const I=c.value||"",V=I.match(/^(.*)\.[^.]+$/);return{namePrefix:V?V[1]:I,nameSuffix:V?I.slice(V[1].length):""}}),x=a.computed(()=>o(S.value.nameSuffix,n)),w=a.computed(()=>m.value?m.value:u.value==="uploading"?`${f.value||0}%`:u.value==="error"?e.item.response||Fn:d.value?i(d.value):Fn),b=a.computed(()=>{for(const{ext:I,icon:V,color:X}of r)if(o(S.value.nameSuffix,I))return{icon:V,iconColor:X};return{icon:a.createVNode(Pn,{key:"defaultIcon"},null),iconColor:Dn}}),[T,P]=L();a.watch(()=>e.item.originFileObj,()=>{if(e.item.originFileObj){let I=!0;Rd(e.item.originFileObj).then(V=>{I&&P(V)}),a.onWatcherCleanup(()=>{I=!1})}P(void 0)},{immediate:!0});const O=a.computed(()=>e.item.thumbUrl||e.item.url||T.value),M=a.computed(()=>x.value&&(e.item.originFileObj||O.value)),k=a.computed(()=>M.value?a.createVNode(a.Fragment,null,[a.createVNode("img",{alt:"preview",src:O.value},null),u.value!=="done"&&a.createVNode("div",{class:`${h}-img-mask`},[u.value==="uploading"&&f.value!==void 0&&a.createVNode(E.Progress,{percent:f.value,prefixCls:h},null),u.value==="error"&&a.createVNode("div",{class:`${h}-desc`},[a.createVNode("div",{class:`${h}-ellipsis-prefix`},[w.value])])])]):a.createVNode(a.Fragment,null,[a.createVNode("div",{class:`${h}-icon`,style:{color:b.value.iconColor}},[b.value.icon]),a.createVNode("div",{class:`${h}-content`},[a.createVNode("div",{class:`${h}-name`},[a.createVNode("div",{class:`${h}-ellipsis-prefix`},[S.value.namePrefix??Fn]),a.createVNode("div",{class:`${h}-ellipsis-suffix`},[S.value.nameSuffix])]),a.createVNode("div",{class:`${h}-desc`},[a.createVNode("div",{class:`${h}-ellipsis-prefix`},[w.value])])])]));return t({nativeElement:C}),()=>y(a.createVNode("div",{class:N(h,{[`${h}-status-${u.value}`]:u.value,[`${h}-type-preview`]:M.value,[`${h}-type-overview`]:!M.value},e.className,v.value,$),style:e.style,ref:"file-list-card-container"},[k.value,!s.value&&e.onRemove&&a.createVNode("button",{type:"button",class:`${h}-remove`,onClick:()=>{e.onRemove(e.item)}},[a.createVNode(Sn,null,null)])]))}}),fa=1,Ld=a.defineComponent({name:"AXAttachmentsFileList",__name:"FileList",props:{prefixCls:null,items:null,onRemove:{type:Function},overflow:null,upload:null,listClassName:null,listStyle:null,itemClassName:null,itemStyle:null},setup(e){const t=a.computed(()=>`${e.prefixCls}-list`),n=a.useTemplateRef("file-list-container"),[r,o]=L(!1),i=wt();a.watchEffect(()=>{o(!0),a.onWatcherCleanup(()=>{o(!1)})});const[l,s]=L(!1),[c,d]=L(!1),f=()=>{const g=n.value;g&&(e.overflow==="scrollX"?(s(Math.abs(g.scrollLeft)>=fa),d(g.scrollWidth-g.clientWidth-Math.abs(g.scrollLeft)>=fa)):e.overflow==="scrollY"&&(s(g.scrollTop!==0),d(g.scrollHeight-g.clientHeight!==g.scrollTop)))};a.watch(()=>e.overflow,()=>{f()},{immediate:!0});const u=g=>{const h=n.value;h&&h.scrollTo({left:h.scrollLeft+g*h.clientWidth,behavior:"smooth"})},m=()=>{u(-1)},p=()=>{u(1)};return()=>a.createVNode("div",{class:N(t.value,{[`${t.value}-overflow-${e.overflow}`]:e.overflow,[`${t.value}-overflow-ping-start`]:l.value,[`${t.value}-overflow-ping-end`]:c.value},e.listClassName),ref:"file-list-container",onScroll:f,style:e.listStyle},[e.items.map(g=>a.createVNode(ua,{key:g.uid,prefixCls:e.prefixCls,item:g,onRemove:e.onRemove,className:N(e.itemClassName),style:{...e.itemStyle}},null)),!i.value.disabled&&a.createVNode(la,{upload:e.upload,children:a.createVNode(E.Button,{class:`${t.value}-upload-btn`,type:"dashed"},{default:()=>[a.createVNode(En,{class:`${t.value}-upload-btn-icon`},null)]})},null),e.overflow==="scrollX"&&a.createVNode(a.Fragment,null,[a.createVNode(E.Button,{size:"small",shape:"circle",class:`${t.value}-prev-btn`,icon:a.createVNode(pt,null,null),onClick:m},null),a.createVNode(E.Button,{size:"small",shape:"circle",class:`${t.value}-next-btn`,icon:a.createVNode(yt,null,null),onClick:p},null)])])}});function jd(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const zd=a.defineComponent({name:"AXAttachments",__name:"Attachments",props:a.mergeDefaults({prefixCls:null,rootClassName:null,rootStyle:null,style:null,className:null,classNames:null,styles:null,children:null,disabled:{type:Boolean},placeholder:{type:Function},getDropContainer:{type:Function},items:null,overflow:null,beforeUpload:null,onChange:{type:Function}},{items:()=>[],classNames:()=>({}),styles:()=>({})}),setup(e,{expose:t}){const n=K(e,["prefixCls","rootClassName","rootStyle","className","style","items","children","getDropContainer","placeholder","onChange","overflow","disabled","classNames","styles"]);a.toRef(e,"prefixCls");const{getPrefixCls:r,direction:o}=W(),i=r("attachment",e.prefixCls),l=se("attachments"),s=a.computed(()=>l.value.classNames),c=a.computed(()=>l.value.styles),d=a.useTemplateRef("attachments-container"),f=a.useTemplateRef("attachments-upload"),[u,m,p]=da(i),g=a.computed(()=>N(m.value,p)),[h,y]=L(e.items);a.watch(()=>e.items,()=>{y(e.items)});const v=w=>{var b;y(w.fileList),(b=e.onChange)==null||b.call(e,w)},$=a.computed(()=>({...n,fileList:h.value,onChange:v})),C=w=>{const b=h.value.filter(T=>T.uid!==w.uid);v({file:w,fileList:b})},S=(w,b,T)=>{const P=typeof e.placeholder=="function"?e.placeholder(w):e.placeholder;return a.createVNode(vd,{placeholder:P,upload:$.value,prefixCls:i,className:N(s.value.placeholder,e.classNames.placeholder),style:{...c.value.placeholder,...e.styles.placeholder,...b==null?void 0:b.style}},null)},x=a.computed(()=>{let w;if(e.children)return a.createVNode(a.Fragment,null,[a.createVNode(la,{upload:$.value,rootClassName:e.rootClassName,ref:"attachments-upload",children:e.children},null),a.createVNode(ia,{getDropContainer:e.getDropContainer,prefixCls:i,className:N(g.value,e.rootClassName),children:S("drop")},null)]);const b=h.value.length>0;return a.createVNode("div",{class:N(i,g.value,{[`${i}-rtl`]:o.value==="rtl"},e.className,e.rootClassName),style:{...e.rootStyle,...e.style},dir:o.value||"ltr",ref:"attachments-container"},[a.createVNode(Ld,{prefixCls:i,items:h.value,onRemove:C,overflow:e.overflow,upload:$.value,listClassName:N(s.value.list,e.classNames.list),listStyle:{...c.value.list,...e.styles.list,...!b&&{display:"none"}},itemClassName:N(s.value.item,e.classNames.item),itemStyle:{...c.value.item,...e.styles.item}},null),S("inline",b?{style:{display:"none"}}:{},f.value),a.createVNode(ia,{getDropContainer:e.getDropContainer||(()=>d.value),prefixCls:i,className:g.value},jd(w=S("drop"))?w:{default:()=>[w]})])});return t({nativeElement:d.value,upload:w=>{var T,P;const b=(P=(T=f.value)==null?void 0:T.nativeElement)==null?void 0:P.querySelector('input[type="file"]');if(b){const O=new DataTransfer;O.items.add(w),b.files=O.files,b.dispatchEvent(new Event("change",{bubbles:!0}))}}}),()=>u(a.createVNode(Cd,{value:{disabled:e.disabled}},{default:()=>[x.value]}))}}),Fd=Object.assign(zd,{FileCard:ua}),Dd=(e,t,n)=>{const r=a.computed(()=>{const s=a.toValue(e);let c={expandedKeys:[],onExpand:()=>{}};return s?(typeof s=="object"&&(c={...c,...s}),{enableCollapse:!0,customizeExpandedKeys:c.expandedKeys,customizeOnExpand:c.onExpand}):{enableCollapse:!1,customizeExpandedKeys:c.expandedKeys,customizeOnExpand:c.onExpand}}),[o,i]=L(r.value.customizeExpandedKeys),l=s=>{var d,f;if(!r.value.enableCollapse)return;const c=o.value.includes(s)?o.value.filter(u=>u!==s):[...o.value,s];(f=(d=r.value).customizeOnExpand)==null||f.call(d,c),i(c)};return[a.computed(()=>r.value.enableCollapse),o,l]};var Nt=(e=>(e.PENDING="pending",e.SUCCESS="success",e.ERROR="error",e))(Nt||{});const Xd=e=>{const{componentCls:t}=e,n=`${t}-item`,r={[Nt.PENDING]:e.colorPrimaryText,[Nt.SUCCESS]:e.colorSuccessText,[Nt.ERROR]:e.colorErrorText},o=Object.keys(r);return o.reduce((i,l)=>{const s=r[l];return o.forEach(c=>{const d=`& ${n}-${l}-${c}`,f=l===c?{}:{backgroundColor:"none !important",backgroundImage:`linear-gradient(${s}, ${r[c]})`};i[d]={[`& ${n}-icon, & > *::before`]:{backgroundColor:`${s} !important`},"& > :last-child::before":f}}),i},{})},kd=e=>{const{calc:t,componentCls:n}=e,r=`${n}-item`,o={content:'""',width:t(e.lineWidth).mul(2).equal(),display:"block",position:"absolute",insetInlineEnd:"none",backgroundColor:e.colorTextPlaceholder};return{"& > :last-child > :last-child":{"&::before":{display:"none !important"},[`&${r}-footer`]:{"&::before":{display:"block !important",bottom:0}}},[`& > ${r}`]:{[`& ${r}-header, & ${r}-content, & ${r}-footer`]:{position:"relative","&::before":{bottom:t(e.itemGap).mul(-1).equal()}},[`& ${r}-header, & ${r}-content`]:{marginInlineStart:t(e.itemSize).mul(-1).equal(),"&::before":{...o,insetInlineStart:t(e.itemSize).div(2).sub(e.lineWidth).equal()}},[`& ${r}-header::before`]:{top:e.itemSize,bottom:t(e.itemGap).mul(-2).equal()},[`& ${r}-content::before`]:{top:"100%"},[`& ${r}-footer::before`]:{...o,top:0,insetInlineStart:t(e.itemSize).div(-2).sub(e.lineWidth).equal()}}}},Wd=e=>{const{componentCls:t}=e,n=`${t}-item`;return{[n]:{display:"flex",flexDirection:"column",[`& ${n}-collapsible`]:{cursor:"pointer"},[`& ${n}-header`]:{display:"flex",marginBottom:e.itemGap,gap:e.itemGap,alignItems:"flex-start",[`& ${n}-icon`]:{height:e.itemSize,width:e.itemSize,fontSize:e.itemFontSize,display:"flex",justifyContent:"center",alignItems:"center"},[`& ${n}-extra`]:{height:e.itemSize,maxHeight:e.itemSize},[`& ${n}-header-box`]:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden",[`& ${n}-title`]:{height:e.itemSize,lineHeight:`${Z(e.itemSize)}`,maxHeight:e.itemSize,fontSize:e.itemFontSize,[`& ${n}-collapse-icon`]:{marginInlineEnd:e.marginXS}},[`& ${n}-desc`]:{fontSize:e.itemFontSize}}},[`& ${n}-content`]:{[`& ${n}-content-hidden`]:{display:"none"},[`& ${n}-content-box`]:{padding:e.itemGap,display:"inline-block",maxWidth:`calc(100% - ${e.itemSize})`,borderRadius:e.borderRadiusLG,backgroundColor:e.colorBgContainer,border:`${Z(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}},[`& ${n}-footer`]:{marginTop:e.itemGap,display:"inline-flex"}}}},Xn=(e,t="middle")=>{const{componentCls:n}=e,r={large:{itemSize:e.itemSizeLG,itemGap:e.itemGapLG,itemFontSize:e.itemFontSizeLG},middle:{itemSize:e.itemSize,itemGap:e.itemGap,itemFontSize:e.itemFontSize},small:{itemSize:e.itemSizeSM,itemGap:e.itemGapSM,itemFontSize:e.itemFontSizeSM}}[t];return{[`&${n}-${t}`]:{paddingInlineStart:r.itemSize,gap:r.itemGap,...Wd({...e,...r}),...kd({...e,...r})}}},Gd=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexDirection:"column",...Xd(e),...Xn(e),...Xn(e,"large"),...Xn(e,"small"),[`&${t}-rtl`]:{direction:"rtl"}}}},qd=fe("ThoughtChain",e=>{const t=ee(e,{itemFontSizeSM:e.fontSizeSM,itemSizeSM:e.calc(e.controlHeightXS).add(e.controlHeightSM).div(2).equal(),itemGapSM:e.marginSM,itemFontSize:e.fontSize,itemSize:e.calc(e.controlHeightSM).add(e.controlHeight).div(2).equal(),itemGap:e.margin,itemFontSizeLG:e.fontSizeLG,itemSizeLG:e.calc(e.controlHeight).add(e.controlHeightLG).div(2).equal(),itemGapLG:e.marginLG});return[Gd(t)]}),ha=Symbol("ThoughtChainNodeContext"),kn=a.shallowRef(),Ud=e=>{a.provide(ha,e),a.watch(e,()=>{kn.value=a.unref(e),a.triggerRef(kn)},{immediate:!0,deep:!0})},Kd=()=>a.inject(ha,a.computed(()=>kn.value||{})),Zd=a.defineComponent({props:{value:ne()},setup(e,{slots:t}){return Ud(a.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),Yd=a.defineComponent({name:"AXThoughtChainNode",__name:"item",props:a.mergeDefaults({info:null,nextStatus:null,onClick:{type:Function}},{info:()=>({})}),setup(e){const t=K(e,["info","nextStatus","onClick"]),n=a.computed(()=>Me(t,{attr:!0,aria:!0,data:!0})),r=Kd(),o=a.computed(()=>r.value.prefixCls),i=a.computed(()=>r.value.enableCollapse),l=a.computed(()=>r.value.expandedKeys),s=a.computed(()=>r.value.direction),c=a.computed(()=>r.value.classNames),d=a.computed(()=>r.value.styles),f=a.useId(),u=a.computed(()=>e.info.key??f),m=a.computed(()=>e.info.icon),p=a.computed(()=>e.info.title),g=a.computed(()=>e.info.extra),h=a.computed(()=>e.info.content),y=a.computed(()=>e.info.footer),v=a.computed(()=>e.info.status),$=a.computed(()=>e.info.description),C=a.computed(()=>`${o.value}-item`),S=()=>{var b;return(b=e.onClick)==null?void 0:b.call(e,u.value)},x=a.computed(()=>{var b;return(b=l.value)==null?void 0:b.includes(u.value)}),w=a.computed(()=>i.value?x.value:!0);return()=>a.createVNode("div",a.mergeProps(n.value,{class:N(C.value,{[`${C.value}-${v.value}${e.nextStatus?`-${e.nextStatus}`:""}`]:v.value},t.class),style:t.style}),[a.createVNode("div",{class:N(`${C.value}-header`,c.value.itemHeader),style:d.value.itemHeader,onClick:S},[a.createVNode(E.Avatar,{icon:m.value,class:`${C.value}-icon`},null),a.createVNode("div",{class:N(`${C.value}-header-box`,{[`${C.value}-collapsible`]:i.value&&h.value})},[a.createVNode(E.Typography.Text,{strong:!0,ellipsis:{tooltip:{placement:s.value==="rtl"?"topRight":"topLeft",title:p.value}},class:`${C.value}-title`},{default:()=>[i.value&&h.value&&(s.value==="rtl"?a.createVNode(pt,{class:`${C.value}-collapse-icon`,rotate:x.value?-90:0},null):a.createVNode(yt,{class:`${C.value}-collapse-icon`,rotate:x.value?90:0},null)),p.value]}),$.value&&a.createVNode(E.Typography.Text,{class:`${C.value}-desc`,ellipsis:{tooltip:{placement:s.value==="rtl"?"topRight":"topLeft",title:$.value}},type:"secondary"},{default:()=>[$.value]})]),g.value&&a.createVNode("div",{class:`${C.value}-extra`},[g.value])]),h.value&&a.withDirectives(a.createVNode("div",{class:N(`${C.value}-content`)},[a.createVNode("div",{class:N(`${C.value}-content-box`,c.value.itemContent),style:d.value.itemContent},[h.value])]),[[a.vShow,w.value]]),y.value&&a.createVNode("div",{class:N(`${C.value}-footer`,c.value.itemFooter),style:d.value.itemFooter},[y.value])])}}),Qd=a.defineComponent({name:"AXThoughtChain",__name:"ThoughtChain",props:a.mergeDefaults({items:null,collapsible:{type:Boolean},size:null,styles:null,classNames:null,prefixCls:null,rootClassName:null},{styles:()=>({}),classNames:()=>({}),size:"middle"}),setup(e){const t=K(e,["prefixCls","rootClassName","class","items","collapsible","styles","style","classNames","size"]);a.toRef(e,"class"),a.toRef(e,"prefixCls");const n=a.computed(()=>Me(t,{attr:!0,aria:!0,data:!0})),{getPrefixCls:r,direction:o}=W(),i=a.computed(()=>r()),l=a.computed(()=>r("thought-chain",e.prefixCls)),s=se("thoughtChain"),[c,d,f]=Dd(()=>e.collapsible,l.value,i.value),[u,m,p]=qd(l),g=a.computed(()=>N(e.class,e.rootClassName,l.value,s.value.className,m.value,p,{[`${l.value}-rtl`]:o.value==="rtl"},`${l.value}-${e.size}`));return()=>u(a.createVNode("div",a.mergeProps(n.value,{class:g.value,style:{...typeof s.value.style=="object"?s.value.style:{},...typeof e.style=="object"?e.style:{}}}),[a.createVNode(Zd,{value:{prefixCls:l.value,enableCollapse:c.value,expandedKeys:d.value,direction:o.value,classNames:{itemHeader:N(s.value.classNames.itemHeader,e.classNames.itemHeader),itemContent:N(s.value.classNames.itemContent,e.classNames.itemContent),itemFooter:N(s.value.classNames.itemFooter,e.classNames.itemFooter)},styles:{itemHeader:{...s.value.styles.itemHeader,...e.styles.itemHeader},itemContent:{...s.value.styles.itemContent,...e.styles.itemContent},itemFooter:{...s.value.styles.itemFooter,...e.styles.itemFooter}}}},{default:()=>{var h;return[(h=e.items)==null?void 0:h.map((y,v)=>{var $;return a.createVNode(Yd,{key:y.key||`key_${v}`,class:N(s.value.classNames.item,e.classNames.item),style:{...s.value.styles.item,...e.styles.item},info:{...y,icon:y.icon||v+1},onClick:f,nextStatus:(($=e.items[v+1])==null?void 0:$.status)||y.status},null)})]}})]))}}),Jd=`
114
114
 
115
115
  `,_d=`
116
116
  `,ma=":",Wn=e=>(e??"").trim()!=="";function eu(){let e="";return new TransformStream({transform(t,n){e+=t;const r=e.split(Jd);r.slice(0,-1).forEach(o=>{Wn(o)&&n.enqueue(o)}),e=r[r.length-1]},flush(t){Wn(e)&&t.enqueue(e)}})}function tu(){return new TransformStream({transform(e,t){const r=e.split(_d).reduce((o,i)=>{const l=i.indexOf(ma);if(l===-1)throw new Error(`The key-value separator "${ma}" is not found in the sse line chunk!`);const s=i.slice(0,l);if(!Wn(s))return o;const c=i.slice(l+1);return{...o,[s]:c}},{});Object.keys(r).length!==0&&t.enqueue(r)}})}function Gn(e){const{readableStream:t,transformStream:n}=e;if(!(t instanceof ReadableStream))throw new Error("The options.readableStream must be an instance of ReadableStream.");const r=new TextDecoderStream,o=n?t.pipeThrough(r).pipeThrough(n):t.pipeThrough(r).pipeThrough(eu()).pipeThrough(tu());return o[Symbol.asyncIterator]=async function*(){const i=this.getReader();for(;;){const{done:l,value:s}=await i.read();if(l)break;s&&(yield s)}},o}const ga=async(e,t={})=>{const{fetch:n=globalThis.fetch,middlewares:r={},...o}=t;if(typeof n!="function")throw new Error("The options.fetch must be a typeof fetch function!");let i=[e,o];typeof r.onRequest=="function"&&(i=await r.onRequest(...i));let l=await n(...i);if(typeof r.onResponse=="function"){const s=await r.onResponse(l);if(!(s instanceof Response))throw new Error("The options.onResponse must return a Response instance!");l=s}if(!l.ok)throw new Error(`Fetch failed with status ${l.status}`);if(!l.body)throw new Error("The response body is empty.");return l},ve=class ve{constructor(t){this.create=async(l,s,c)=>{var f;const d={method:"POST",body:JSON.stringify({model:this.model,...l}),headers:this.defaultHeaders};try{const u=await ga(this.baseURL,{fetch:this.customOptions.fetch,...d});if(c){await this.customResponseHandler(u,s,c);return}const m=u.headers.get("content-type")||"";switch(m.split(";")[0].trim()){case"text/event-stream":await this.sseResponseHandler(u,s);break;case"application/json":await this.jsonResponseHandler(u,s);break;default:throw new Error(`The response content-type: ${m} is not support!`)}}catch(u){const m=u instanceof Error?u:new Error("Unknown error!");throw(f=s==null?void 0:s.onError)==null||f.call(s,m),m}},this.customResponseHandler=async(l,s,c)=>{var f,u;const d=[];for await(const m of Gn({readableStream:l.body,transformStream:c}))d.push(m),(f=s==null?void 0:s.onUpdate)==null||f.call(s,m);(u=s==null?void 0:s.onSuccess)==null||u.call(s,d)},this.sseResponseHandler=async(l,s)=>{var d,f;const c=[];for await(const u of Gn({readableStream:l.body}))c.push(u),(d=s==null?void 0:s.onUpdate)==null||d.call(s,u);(f=s==null?void 0:s.onSuccess)==null||f.call(s,c)},this.jsonResponseHandler=async(l,s)=>{var d,f;const c=await l.json();(d=s==null?void 0:s.onUpdate)==null||d.call(s,c),(f=s==null?void 0:s.onSuccess)==null||f.call(s,[c])};const{baseURL:n,model:r,dangerouslyApiKey:o,...i}=t;this.baseURL=t.baseURL,this.model=t.model,this.defaultHeaders={"Content-Type":"application/json",...t.dangerouslyApiKey&&{Authorization:t.dangerouslyApiKey}},this.customOptions=i}static init(t){if(!t.baseURL||typeof t.baseURL!="string")throw new Error("The baseURL is not valid!");const n=t.fetch||t.baseURL;return ve.instanceBuffer.has(n)||ve.instanceBuffer.set(n,new ve(t)),ve.instanceBuffer.get(n)}};ve.instanceBuffer=new Map;let qn=ve;const pa=qn.init;let ya=0;class ba{constructor(t){this.requestingMap={},this.request=(n,r)=>{const{request:o}=this.config,{onUpdate:i,onSuccess:l,onError:s}=r,c=ya;ya+=1,this.requestingMap[c]=!0,o==null||o(n,{onUpdate:d=>{this.requestingMap[c]&&i(d)},onSuccess:d=>{this.requestingMap[c]&&(l(d),this.finishRequest(c))},onError:d=>{this.requestingMap[c]&&(s(d),this.finishRequest(c))}})},this.config=t}finishRequest(t){delete this.requestingMap[t]}isRequesting(){return Object.keys(this.requestingMap).length>0}}function nu(e){const{request:t,...n}=e;return{agent:a.computed(()=>new ba({request:t||pa({baseURL:n.baseURL,model:n.model,dangerouslyApiKey:n.dangerouslyApiKey}).create,...n}))}}function ru(e,t){const n=a.ref(e);function r(o){const i=typeof o=="function"?o(n.value):o;i!==n.value&&t(i,n.value),n.value=i}return[n,r]}function ou(e){return Array.isArray(e)?e:[e]}function au(e){const{defaultMessages:t,agent:n,requestFallback:r,requestPlaceholder:o,parser:i}=e,l=a.ref(0),s=a.computed(()=>(t||[]).map((h,y)=>({id:`default_${y}`,status:"local",...h}))),[c,d]=ru(s.value,()=>{}),f=(h,y)=>{const v={id:`msg_${l.value}`,message:h,status:y};return l.value+=1,v},u=a.computed(()=>{const h=[];return c.value.forEach(y=>{const v=i?i(y.message):y.message,$=ou(v);$.forEach((C,S)=>{let x=y.id;$.length>1&&(x=`${x}_${S}`),h.push({id:x,message:C,status:y.status})})}),h}),m=h=>h.filter(y=>y.status!=="loading"&&y.status!=="error").map(y=>y.message),p=()=>m(c.value);return{onRequest:mt(h=>{if(!n)throw new Error("The agent parameter is required when using the onRequest method in an agent generated by useXAgent.");let y=null;d(C=>{let S=[...C,f(h,"local")];if(o){let x;typeof o=="function"?x=o(h,{messages:m(S)}):x=o;const w=f(x,"loading");y=w.id,S=[...S,w]}return S});let v=null;const $=(C,S)=>{let x=c.value.find(w=>w.id===v);return x?d(w=>w.map(b=>b.id===v?{...b,message:C,status:S}:b)):(x=f(C,S),d(w=>[...w.filter(T=>T.id!==y),x]),v=x.id),x};n.request({message:h,messages:p()},{onUpdate:C=>{$(C,"loading")},onSuccess:C=>{$(C,"success")},onError:async C=>{if(r){let S;typeof r=="function"?S=await r(h,{error:C,messages:p()}):S=r,d(x=>[...x.filter(w=>w.id!==y&&w.id!==v),f(S,"error")])}else d(S=>S.filter(x=>x.id!==y&&x.id!==v))}})}),messages:c,parsedMessages:u,setMessages:d}}Object.defineProperty(R,"theme",{enumerable:!0,get:()=>E.theme}),R.Attachments=Fd,R.Bubble=bs,R.BubbleList=yo,R.Conversations=kc,R.Prompts=_o,R.Sender=bd,R.Suggestion=ed,R.ThoughtChain=Qd,R.Welcome=Uc,R.XAgent=ba,R.XFetch=ga,R.XProvider=Ia,R.XRequest=pa,R.XStream=Gn,R.defaultPrefixCls=Ta,R.useXAgent=nu,R.useXChat=au,R.useXProviderContext=W,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
@@ -67,6 +67,7 @@ export interface AttachmentsProps extends Omit<UploadProps, 'fileList'> {
67
67
  getDropContainer?: null | (() => HTMLElement | null | undefined);
68
68
  items?: Attachment[];
69
69
  overflow?: FileListProps['overflow'];
70
+ beforeUpload?: UploadProps['beforeUpload'];
70
71
  onChange?: (info: UploadChangeParam<UploadFile>) => void;
71
72
  }
72
73
  export interface AttachmentsRef {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ant-design-x-vue",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "A vue library developed with dumi",
5
5
  "scripts": {
6
6
  "build": "vite build && vue-tsc --project ./tsconfig.build.json",
@@ -8,11 +8,12 @@
8
8
  "dev": "dumi dev",
9
9
  "docs:build": "vitepress build docs",
10
10
  "docs:preview": "vitepress preview docs",
11
- "lint": "npm run lint:es && npm run lint:css",
11
+ "lint": "npm run lint:es",
12
12
  "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
13
13
  "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx,vue}\"",
14
14
  "prepare": "husky install && dumi setup",
15
15
  "prepublishOnly": "npm run test && npm run build",
16
+ "release": "pnpm test && changelogen --release && npm publish && git push --follow-tags",
16
17
  "start": "npm run dev",
17
18
  "test": "vitest",
18
19
  "test:cov": "vitest --coverage",
@@ -91,6 +92,7 @@
91
92
  "@vue/shared": "^3.5.13",
92
93
  "@vue/test-utils": "^2.4.6",
93
94
  "@vueuse/core": "^12.2.0",
95
+ "changelogen": "^0.5.7",
94
96
  "dumi": "^2.4.13",
95
97
  "eslint": "^8.57.1",
96
98
  "eslint-plugin-vue": "^9.17.0",