sand-components-vben 2.7.33 → 2.7.35

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sand-components-vben",
3
- "version": "2.7.33",
3
+ "version": "2.7.35",
4
4
  "description": "",
5
5
  "main": "sand-components-vben.js",
6
6
  "scripts": {
@@ -94157,7 +94157,7 @@ const oQe = { class: "hint-content" }, sQe = { class: "dialog-body" }, uQe = { c
94157
94157
  const t = hQe(e), n = yQe(t);
94158
94158
  return encodeURIComponent(n);
94159
94159
  }, DQe = (e) => {
94160
- const { url: t, type: n, isOpenDirectly: r = !0, watermark: a } = e, i = "http://192.168.52.212:8091";
94160
+ const { url: t, type: n, isOpenDirectly: r = !0, watermark: a } = e, { origin: i } = location;
94161
94161
  if (t instanceof Array && !n)
94162
94162
  throw new Error("仅图片支持多文件预览");
94163
94163
  let o = "";
@@ -377,4 +377,4 @@ https://github.com/highlightjs/highlight.js/issues/2277`),De=ce,xt=Re),qe===void
377
377
  width: ${U.width}px;
378
378
  height: ${U.height}px;
379
379
  display: block;
380
- `},T=()=>{A.overlay&&(A.overlay.style.display="none")},x=V=>{if(!A.isActive)return;const U=V.target;if(U.closest("#element-picker-overlay")||U.closest(".chat-bot-box")||U.closest(".ant-tooltip")||U.closest(".element-picker-hint")||U===document.body||U===document.documentElement||U.tagName==="SCRIPT"||U.tagName==="STYLE"||U.tagName==="LINK"||U.tagName==="META"){T();return}const z=U.getBoundingClientRect();if(z.width<3||z.height<3){T();return}if(z.bottom<0||z.top>window.innerHeight||z.right<0||z.left>window.innerWidth){T();return}A.currentElement=U,E(U)},N=async V=>{if(!A.isActive)return;V.preventDefault(),V.stopPropagation();const U=V.target;if(U.closest("#element-picker-overlay")||U.closest(".chat-bot-box")||U.closest(".ant-tooltip")||U.closest(".element-picker-hint")||U===document.body||U===document.documentElement||U.tagName==="SCRIPT"||U.tagName==="STYLE"||U.tagName==="LINK"||U.tagName==="META")return;const z=U.getBoundingClientRect();if(z.width<3||z.height<3)return;A.selectedElement=U;const C=D(U);M(),A.isLoading=!0,console.log("选中的元素:",U),console.log("元素信息:",C);const{minimalHtml:H,formHtml:I,structure:Q,formData:q,selectorInfo:oe}=EUe(U);u(),await s({url:Rke(),data:{content:I},onComplete:()=>{console.log("完成")}})},D=V=>{var C;const U=V.getBoundingClientRect(),z=window.getComputedStyle(V);return{tagName:V.tagName.toLowerCase(),className:V.className,id:V.id,textContent:((C=V.textContent)==null?void 0:C.trim().substring(0,100))||"",attributes:Array.from(V.attributes).reduce((H,I)=>(H[I.name]=I.value,H),{}),dimensions:{width:U.width,height:U.height,left:U.left,top:U.top},styles:{backgroundColor:z.backgroundColor,color:z.color,fontSize:z.fontSize,fontFamily:z.fontFamily,display:z.display,position:z.position},xpath:P(V),cssSelector:S(V)}},P=V=>{if(V.id)return`//*[@id="${V.id}"]`;const U=[];for(;V&&V.nodeType===Node.ELEMENT_NODE;){let z=0,C=!1,H=V.previousSibling;for(;H;)H.nodeType===Node.ELEMENT_NODE&&H.nodeName===V.nodeName&&z++,H=H.previousSibling;for(H=V.nextSibling;H;){if(H.nodeType===Node.ELEMENT_NODE&&H.nodeName===V.nodeName){C=!0;break}H=H.nextSibling}const I=z||C?`[${z+1}]`:"";U.unshift(V.nodeName.toLowerCase()+I),V=V.parentNode}return U.length?"/"+U.join("/"):""},S=V=>{if(V.id)return`#${V.id}`;const U=[];for(;V&&V.nodeType===Node.ELEMENT_NODE;){let z=V.nodeName.toLowerCase();V.className&&(z+="."+V.className.split(" ").join(".")),U.unshift(z),V=V.parentNode}return U.join(" > ")},R=V=>{V.key==="Escape"&&A.isActive&&M()},B=()=>{!A.isActive||!A.currentElement||E(A.currentElement)},F=V=>{A.isActive=!0,A.currentElement=null,A.selectedElement=null,O(),document.addEventListener("mousemove",x,!0),document.addEventListener("click",N,!0),document.addEventListener("keydown",R,!0),document.addEventListener("scroll",B,!0),document.body.style.cursor="crosshair"},M=()=>{A.isActive=!1,A.currentElement=null,A.isLoading=!1,document.removeEventListener("mousemove",x,!0),document.removeEventListener("click",N,!0),document.removeEventListener("keydown",R,!0),document.removeEventListener("scroll",B,!0),document.body.style.cursor="",T()};return{pickerState:A,startPicker:F,stopPicker:M,cleanup:()=>{M(),A.overlay&&(document.body.removeChild(A.overlay),A.overlay=null)},showDialog:()=>{},hideDialog:()=>{A.showDialog=!1,A.isLoading=!1}}}const{pickerState:d,startPicker:p,stopPicker:m,cleanup:g,showDialog:h,hideDialog:b}=l(),y=()=>{m()},v=()=>{b()};return t({pickerState:d,startPicker:p,stopPicker:m,cleanup:g,showDialog:h,hideDialog:b}),f.watch(o,A=>{d.content=A,A&&d.isLoading&&(d.isLoading=!1,d.showDialog=!0)}),(A,O)=>f.unref(d).isActive||f.unref(d).showDialog||f.unref(d).isLoading?(f.openBlock(),f.createElementBlock("div",{key:0,class:f.normalizeClass(["element-picker-hint",{"dialog-mode":f.unref(d).showDialog,"loading-mode":f.unref(d).isLoading}])},[f.createElementVNode("div",DUe,[f.unref(d).isActive&&!f.unref(d).showDialog&&!f.unref(d).isLoading?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[O[0]||(O[0]=f.createElementVNode("div",{class:"hint-icon"},"🎯",-1)),O[1]||(O[1]=f.createElementVNode("div",{class:"hint-text"},[f.createElementVNode("div",{class:"hint-title"},"元素选择模式已启动"),f.createElementVNode("div",{class:"hint-description"}," 移动鼠标选择页面元素,点击确认选择,按ESC键退出 ")],-1)),f.createElementVNode("div",{class:"hint-close",onClick:y},"✕")],64)):f.createCommentVNode("",!0),f.unref(d).isLoading?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[O[2]||(O[2]=f.createStaticVNode('<div class="loading-icon" data-v-67a04885><div class="spinner" data-v-67a04885></div></div><div class="loading-text" data-v-67a04885><div class="loading-title" data-v-67a04885>正在分析元素</div><div class="loading-description" data-v-67a04885> 上传图片并进行AI分析中,请稍候... </div></div>',2))],64)):f.createCommentVNode("",!0),f.unref(d).showDialog?(f.openBlock(),f.createElementBlock(f.Fragment,{key:2},[f.createElementVNode("div",{class:"dialog-header"},[f.createElementVNode("div",{class:"dialog-close",onClick:v},"✕")]),f.createElementVNode("div",PUe,[f.createElementVNode("div",wUe,[f.createElementVNode("p",{innerHTML:f.unref(r)(f.unref(d).content||"")},null,8,SUe)])])],64)):f.createCommentVNode("",!0)])],2)):f.createCommentVNode("",!0)}},[["__scopeId","data-v-67a04885"]]),CUe={class:"chat-bot-box"},RUe={class:"chat-bot-sidebar-menu"},MUe={class:"chat-bot-sidebar-menu-item"},LUe=["src"],Die=Lt({__name:"ChatBot",setup(e){const t=f.ref(null),{animationState:n,sidebarHeight:r,sidebarStyle:a,iframeStyle:o,buttonAnimationClass:i,resizeHandleClass:s,toggleMainPanel:c,toggleIframe:u,startDragAnimation:l,endDragAnimation:d,updateIframeWidth:p}=hUe(),{createDragHandler:m}=yUe(),g=m({startDragAnimation:l,endDragAnimation:d,updateIframeWidth:p,animationState:n}),h=()=>{c(),setTimeout(()=>u(),300)},b=()=>v("newConversation"),y=()=>{n.menuVisible=!n.menuVisible,v("saasMenu",{visible:n.menuVisible})},v=(T,x={})=>{const N=document.querySelector("iframe");if(N)try{N.contentWindow.postMessage({type:T,...x},"*")}catch(D){console.warn(`发送${T}消息到iframe失败:`,D)}},A=window.location.hostname.includes("localhost"),O=`?sdkey=${localStorage.getItem("accessToken")}&sysFlag=2&tenantId=${localStorage.getItem("tenantId")}&from=saas`,E=()=>{var T,x;if((T=t.value)!=null&&T.pickerState.isActive){t.value.stopPicker();return}(x=t.value)==null||x.startPicker()};return f.onUnmounted(()=>{var T;n.isDragging=!1,n.menuVisible=!1,(T=t.value)==null||T.cleanup();try{window.removeEventListener("message")}catch(x){console.warn("移除message事件监听器失败:",x)}}),f.onMounted(()=>{window.addEventListener("message",T=>{T.data.type==="closeSaasMenu"&&y()})}),(T,x)=>{var D,P;const N=f.resolveComponent("a-tooltip");return f.openBlock(),f.createElementBlock("div",CUe,[f.createVNode(zUe,{ref_key:"elementPickerHintRef",ref:t},null,512),f.createElementVNode("div",{class:f.normalizeClass(["chat-bot-btn",f.unref(i)]),onClick:h},x[2]||(x[2]=[f.createElementVNode("img",{src:pUe,alt:""},null,-1)]),2),f.createElementVNode("div",{class:"chat-bot-sidebar",style:f.normalizeStyle(f.unref(a))},[f.createElementVNode("div",{class:"chat-bot-sidebar-header",onClick:x[0]||(x[0]=(...S)=>f.unref(u)&&f.unref(u)(...S))},x[3]||(x[3]=[f.createElementVNode("img",{src:mUe,alt:""},null,-1)])),f.createElementVNode("div",RUe,[f.createElementVNode("div",{class:f.normalizeClass(["chat-bot-sidebar-menu-item",{"chat-bot-sidebar-menu-item-active":f.unref(n).menuVisible}])},[f.createVNode(N,{placement:"left"},{title:f.withCtx(()=>x[4]||(x[4]=[f.createTextVNode("历史对话")])),default:f.withCtx(()=>[f.createElementVNode("img",{onClick:y,src:bUe,alt:""})]),_:1})],2),f.createElementVNode("div",MUe,[f.createVNode(N,{placement:"left"},{title:f.withCtx(()=>x[5]||(x[5]=[f.createTextVNode("新的对话")])),default:f.withCtx(()=>[f.createElementVNode("img",{onClick:b,src:gUe,alt:""})]),_:1})]),f.createElementVNode("div",{class:f.normalizeClass(["chat-bot-sidebar-menu-item",{"chat-bot-sidebar-menu-item-active":(P=(D=t.value)==null?void 0:D.pickerState)==null?void 0:P.isActive}])},[f.createVNode(N,{placement:"left"},{title:f.withCtx(()=>{var S,R;return[f.createTextVNode(f.toDisplayString((R=(S=t.value)==null?void 0:S.pickerState)!=null&&R.isActive?"退出选择模式":"鼐思图析"),1)]}),default:f.withCtx(()=>{var S,R;return[f.createElementVNode("img",{onClick:E,src:vUe,alt:"",style:f.normalizeStyle({filter:(R=(S=t.value)==null?void 0:S.pickerState)!=null&&R.isActive?"brightness(1.2) saturate(1.3)":""})},null,4)]}),_:1})],2)])],4),f.unref(n).isOpenShowIframe?(f.openBlock(),f.createElementBlock("div",{key:0,class:"chat-bot-iframe",style:f.normalizeStyle(f.unref(o))},[f.createElementVNode("div",{class:f.normalizeClass(["resize-handle",f.unref(s)]),onMousedown:x[1]||(x[1]=(...S)=>f.unref(g)&&f.unref(g)(...S))},x[6]||(x[6]=[f.createElementVNode("div",{class:"resize-line"},null,-1)]),34),f.createElementVNode("iframe",{src:`${f.unref(A)?"http://localhost:81":""}/nsibot-ai/?${O}`,frameborder:"0"},null,8,LUe)],4)):f.createCommentVNode("",!0)])}}},[["__scopeId","data-v-e3b5ff32"]]),HUe=e=>{const t=[];let n;const r=e.length;for(let a=0;a<r;a++)n=e.charCodeAt(a),n>=65536&&n<=1114111?(t.push(n>>18&7|240),t.push(n>>12&63|128),t.push(n>>6&63|128),t.push(n&63|128)):n>=2048&&n<=65535?(t.push(n>>12&15|224),t.push(n>>6&63|128),t.push(n&63|128)):n>=128&&n<=2047?(t.push(n>>6&31|192),t.push(n&63|128)):t.push(n&255);return t},BUe=e=>{let t="";const n=new Uint8Array(e),r=n.byteLength;for(let a=0;a<r;a++)t+=String.fromCharCode(n[a]);return window.btoa(t)},IUe=e=>{const t=HUe(e),n=BUe(t);return encodeURIComponent(n)},kUe=e=>{const{url:t,type:n,isOpenDirectly:r=!0,watermark:a}=e,o="http://192.168.52.212:8091";if(t instanceof Array&&!n)throw new Error("仅图片支持多文件预览");let i="";const s=u=>IUe(u);if(n){let u="";t instanceof Array?u=t.join("|"):u=t,i=o+`/preview/picturesPreview?urls=${s(o+u)}`}else i=o+`/preview/onlinePreview?url=${s(o+t)}`;const c=Ue.namespace;if(c){const u=localStorage.getItem(`${c}-core-user`);if(u){const d=JSON.parse(u).userInfo.user.nickname;d&&(i+=`&watermarkTxt=${d}`)}}if(a&&(i+=`&watermarkTxt=${a}`),r)window.open(i);else return i},Pie={ApiSelect:xR,BaseUpload:Kg,UploadImage:Cte,UploadFile:zte,DetailItem:Gte,DetailRow:Zte,EmployeeStatus:xS,SexStatus:Wte,PositionStatus:Yte,BaseUserSelect:Ute,SelectUserDialog:TS,UserTag:uO,SandEditor:Dte,SelectAddress:wte,EnterpriseSearch:jB,ChangeRecord:kte,FollowUpRecord:Fte,UserCard:ES,BtnAi:xie,ChatBot:Die,AITextarea:Bte,AIInput:Ite,UploadImage2:Mte,UploadFile2:Lte,TagSelect:Jte},XUe={install:e=>{Object.entries(Pie).forEach(([t,n])=>{e.component(t,n)})}},jUe=e=>Pde(e);gt.AIInput=Ite,gt.AITextarea=Bte,gt.ApiSelect=xR,gt.BaseUpload=Kg,gt.BaseUserSelect=Ute,gt.BtnAi=xie,gt.BusinessUserSelect=qte,gt.ChangeRecord=kte,gt.ChatBot=Die,gt.DeptTree=Vte,gt.DetailItem=Gte,gt.DetailRow=Zte,gt.EmployeeStatus=xS,gt.EnterpriseSearch=jB,gt.FollowUpRecord=Fte,gt.PositionStatus=Yte,gt.SandEditor=Dte,gt.SelectAddress=wte,gt.SelectUserDialog=TS,gt.SexStatus=Wte,gt.TagSelect=Jte,gt.TreeOrg=QXe,gt.UploadFile=zte,gt.UploadFile2=Lte,gt.UploadImage=Cte,gt.UploadImage2=Mte,gt.UserCard=ES,gt.UserTag=uO,gt.components=Pie,gt.default=XUe,gt.filePreview=kUe,gt.sandInit=jUe,Object.defineProperties(gt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
380
+ `},T=()=>{A.overlay&&(A.overlay.style.display="none")},x=V=>{if(!A.isActive)return;const U=V.target;if(U.closest("#element-picker-overlay")||U.closest(".chat-bot-box")||U.closest(".ant-tooltip")||U.closest(".element-picker-hint")||U===document.body||U===document.documentElement||U.tagName==="SCRIPT"||U.tagName==="STYLE"||U.tagName==="LINK"||U.tagName==="META"){T();return}const z=U.getBoundingClientRect();if(z.width<3||z.height<3){T();return}if(z.bottom<0||z.top>window.innerHeight||z.right<0||z.left>window.innerWidth){T();return}A.currentElement=U,E(U)},N=async V=>{if(!A.isActive)return;V.preventDefault(),V.stopPropagation();const U=V.target;if(U.closest("#element-picker-overlay")||U.closest(".chat-bot-box")||U.closest(".ant-tooltip")||U.closest(".element-picker-hint")||U===document.body||U===document.documentElement||U.tagName==="SCRIPT"||U.tagName==="STYLE"||U.tagName==="LINK"||U.tagName==="META")return;const z=U.getBoundingClientRect();if(z.width<3||z.height<3)return;A.selectedElement=U;const C=D(U);M(),A.isLoading=!0,console.log("选中的元素:",U),console.log("元素信息:",C);const{minimalHtml:H,formHtml:I,structure:Q,formData:q,selectorInfo:oe}=EUe(U);u(),await s({url:Rke(),data:{content:I},onComplete:()=>{console.log("完成")}})},D=V=>{var C;const U=V.getBoundingClientRect(),z=window.getComputedStyle(V);return{tagName:V.tagName.toLowerCase(),className:V.className,id:V.id,textContent:((C=V.textContent)==null?void 0:C.trim().substring(0,100))||"",attributes:Array.from(V.attributes).reduce((H,I)=>(H[I.name]=I.value,H),{}),dimensions:{width:U.width,height:U.height,left:U.left,top:U.top},styles:{backgroundColor:z.backgroundColor,color:z.color,fontSize:z.fontSize,fontFamily:z.fontFamily,display:z.display,position:z.position},xpath:P(V),cssSelector:S(V)}},P=V=>{if(V.id)return`//*[@id="${V.id}"]`;const U=[];for(;V&&V.nodeType===Node.ELEMENT_NODE;){let z=0,C=!1,H=V.previousSibling;for(;H;)H.nodeType===Node.ELEMENT_NODE&&H.nodeName===V.nodeName&&z++,H=H.previousSibling;for(H=V.nextSibling;H;){if(H.nodeType===Node.ELEMENT_NODE&&H.nodeName===V.nodeName){C=!0;break}H=H.nextSibling}const I=z||C?`[${z+1}]`:"";U.unshift(V.nodeName.toLowerCase()+I),V=V.parentNode}return U.length?"/"+U.join("/"):""},S=V=>{if(V.id)return`#${V.id}`;const U=[];for(;V&&V.nodeType===Node.ELEMENT_NODE;){let z=V.nodeName.toLowerCase();V.className&&(z+="."+V.className.split(" ").join(".")),U.unshift(z),V=V.parentNode}return U.join(" > ")},R=V=>{V.key==="Escape"&&A.isActive&&M()},B=()=>{!A.isActive||!A.currentElement||E(A.currentElement)},F=V=>{A.isActive=!0,A.currentElement=null,A.selectedElement=null,O(),document.addEventListener("mousemove",x,!0),document.addEventListener("click",N,!0),document.addEventListener("keydown",R,!0),document.addEventListener("scroll",B,!0),document.body.style.cursor="crosshair"},M=()=>{A.isActive=!1,A.currentElement=null,A.isLoading=!1,document.removeEventListener("mousemove",x,!0),document.removeEventListener("click",N,!0),document.removeEventListener("keydown",R,!0),document.removeEventListener("scroll",B,!0),document.body.style.cursor="",T()};return{pickerState:A,startPicker:F,stopPicker:M,cleanup:()=>{M(),A.overlay&&(document.body.removeChild(A.overlay),A.overlay=null)},showDialog:()=>{},hideDialog:()=>{A.showDialog=!1,A.isLoading=!1}}}const{pickerState:d,startPicker:p,stopPicker:m,cleanup:g,showDialog:h,hideDialog:b}=l(),y=()=>{m()},v=()=>{b()};return t({pickerState:d,startPicker:p,stopPicker:m,cleanup:g,showDialog:h,hideDialog:b}),f.watch(o,A=>{d.content=A,A&&d.isLoading&&(d.isLoading=!1,d.showDialog=!0)}),(A,O)=>f.unref(d).isActive||f.unref(d).showDialog||f.unref(d).isLoading?(f.openBlock(),f.createElementBlock("div",{key:0,class:f.normalizeClass(["element-picker-hint",{"dialog-mode":f.unref(d).showDialog,"loading-mode":f.unref(d).isLoading}])},[f.createElementVNode("div",DUe,[f.unref(d).isActive&&!f.unref(d).showDialog&&!f.unref(d).isLoading?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[O[0]||(O[0]=f.createElementVNode("div",{class:"hint-icon"},"🎯",-1)),O[1]||(O[1]=f.createElementVNode("div",{class:"hint-text"},[f.createElementVNode("div",{class:"hint-title"},"元素选择模式已启动"),f.createElementVNode("div",{class:"hint-description"}," 移动鼠标选择页面元素,点击确认选择,按ESC键退出 ")],-1)),f.createElementVNode("div",{class:"hint-close",onClick:y},"✕")],64)):f.createCommentVNode("",!0),f.unref(d).isLoading?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[O[2]||(O[2]=f.createStaticVNode('<div class="loading-icon" data-v-67a04885><div class="spinner" data-v-67a04885></div></div><div class="loading-text" data-v-67a04885><div class="loading-title" data-v-67a04885>正在分析元素</div><div class="loading-description" data-v-67a04885> 上传图片并进行AI分析中,请稍候... </div></div>',2))],64)):f.createCommentVNode("",!0),f.unref(d).showDialog?(f.openBlock(),f.createElementBlock(f.Fragment,{key:2},[f.createElementVNode("div",{class:"dialog-header"},[f.createElementVNode("div",{class:"dialog-close",onClick:v},"✕")]),f.createElementVNode("div",PUe,[f.createElementVNode("div",wUe,[f.createElementVNode("p",{innerHTML:f.unref(r)(f.unref(d).content||"")},null,8,SUe)])])],64)):f.createCommentVNode("",!0)])],2)):f.createCommentVNode("",!0)}},[["__scopeId","data-v-67a04885"]]),CUe={class:"chat-bot-box"},RUe={class:"chat-bot-sidebar-menu"},MUe={class:"chat-bot-sidebar-menu-item"},LUe=["src"],Die=Lt({__name:"ChatBot",setup(e){const t=f.ref(null),{animationState:n,sidebarHeight:r,sidebarStyle:a,iframeStyle:o,buttonAnimationClass:i,resizeHandleClass:s,toggleMainPanel:c,toggleIframe:u,startDragAnimation:l,endDragAnimation:d,updateIframeWidth:p}=hUe(),{createDragHandler:m}=yUe(),g=m({startDragAnimation:l,endDragAnimation:d,updateIframeWidth:p,animationState:n}),h=()=>{c(),setTimeout(()=>u(),300)},b=()=>v("newConversation"),y=()=>{n.menuVisible=!n.menuVisible,v("saasMenu",{visible:n.menuVisible})},v=(T,x={})=>{const N=document.querySelector("iframe");if(N)try{N.contentWindow.postMessage({type:T,...x},"*")}catch(D){console.warn(`发送${T}消息到iframe失败:`,D)}},A=window.location.hostname.includes("localhost"),O=`?sdkey=${localStorage.getItem("accessToken")}&sysFlag=2&tenantId=${localStorage.getItem("tenantId")}&from=saas`,E=()=>{var T,x;if((T=t.value)!=null&&T.pickerState.isActive){t.value.stopPicker();return}(x=t.value)==null||x.startPicker()};return f.onUnmounted(()=>{var T;n.isDragging=!1,n.menuVisible=!1,(T=t.value)==null||T.cleanup();try{window.removeEventListener("message")}catch(x){console.warn("移除message事件监听器失败:",x)}}),f.onMounted(()=>{window.addEventListener("message",T=>{T.data.type==="closeSaasMenu"&&y()})}),(T,x)=>{var D,P;const N=f.resolveComponent("a-tooltip");return f.openBlock(),f.createElementBlock("div",CUe,[f.createVNode(zUe,{ref_key:"elementPickerHintRef",ref:t},null,512),f.createElementVNode("div",{class:f.normalizeClass(["chat-bot-btn",f.unref(i)]),onClick:h},x[2]||(x[2]=[f.createElementVNode("img",{src:pUe,alt:""},null,-1)]),2),f.createElementVNode("div",{class:"chat-bot-sidebar",style:f.normalizeStyle(f.unref(a))},[f.createElementVNode("div",{class:"chat-bot-sidebar-header",onClick:x[0]||(x[0]=(...S)=>f.unref(u)&&f.unref(u)(...S))},x[3]||(x[3]=[f.createElementVNode("img",{src:mUe,alt:""},null,-1)])),f.createElementVNode("div",RUe,[f.createElementVNode("div",{class:f.normalizeClass(["chat-bot-sidebar-menu-item",{"chat-bot-sidebar-menu-item-active":f.unref(n).menuVisible}])},[f.createVNode(N,{placement:"left"},{title:f.withCtx(()=>x[4]||(x[4]=[f.createTextVNode("历史对话")])),default:f.withCtx(()=>[f.createElementVNode("img",{onClick:y,src:bUe,alt:""})]),_:1})],2),f.createElementVNode("div",MUe,[f.createVNode(N,{placement:"left"},{title:f.withCtx(()=>x[5]||(x[5]=[f.createTextVNode("新的对话")])),default:f.withCtx(()=>[f.createElementVNode("img",{onClick:b,src:gUe,alt:""})]),_:1})]),f.createElementVNode("div",{class:f.normalizeClass(["chat-bot-sidebar-menu-item",{"chat-bot-sidebar-menu-item-active":(P=(D=t.value)==null?void 0:D.pickerState)==null?void 0:P.isActive}])},[f.createVNode(N,{placement:"left"},{title:f.withCtx(()=>{var S,R;return[f.createTextVNode(f.toDisplayString((R=(S=t.value)==null?void 0:S.pickerState)!=null&&R.isActive?"退出选择模式":"鼐思图析"),1)]}),default:f.withCtx(()=>{var S,R;return[f.createElementVNode("img",{onClick:E,src:vUe,alt:"",style:f.normalizeStyle({filter:(R=(S=t.value)==null?void 0:S.pickerState)!=null&&R.isActive?"brightness(1.2) saturate(1.3)":""})},null,4)]}),_:1})],2)])],4),f.unref(n).isOpenShowIframe?(f.openBlock(),f.createElementBlock("div",{key:0,class:"chat-bot-iframe",style:f.normalizeStyle(f.unref(o))},[f.createElementVNode("div",{class:f.normalizeClass(["resize-handle",f.unref(s)]),onMousedown:x[1]||(x[1]=(...S)=>f.unref(g)&&f.unref(g)(...S))},x[6]||(x[6]=[f.createElementVNode("div",{class:"resize-line"},null,-1)]),34),f.createElementVNode("iframe",{src:`${f.unref(A)?"http://localhost:81":""}/nsibot-ai/?${O}`,frameborder:"0"},null,8,LUe)],4)):f.createCommentVNode("",!0)])}}},[["__scopeId","data-v-e3b5ff32"]]),HUe=e=>{const t=[];let n;const r=e.length;for(let a=0;a<r;a++)n=e.charCodeAt(a),n>=65536&&n<=1114111?(t.push(n>>18&7|240),t.push(n>>12&63|128),t.push(n>>6&63|128),t.push(n&63|128)):n>=2048&&n<=65535?(t.push(n>>12&15|224),t.push(n>>6&63|128),t.push(n&63|128)):n>=128&&n<=2047?(t.push(n>>6&31|192),t.push(n&63|128)):t.push(n&255);return t},BUe=e=>{let t="";const n=new Uint8Array(e),r=n.byteLength;for(let a=0;a<r;a++)t+=String.fromCharCode(n[a]);return window.btoa(t)},IUe=e=>{const t=HUe(e),n=BUe(t);return encodeURIComponent(n)},kUe=e=>{const{url:t,type:n,isOpenDirectly:r=!0,watermark:a}=e,{origin:o}=location;if(t instanceof Array&&!n)throw new Error("仅图片支持多文件预览");let i="";const s=u=>IUe(u);if(n){let u="";t instanceof Array?u=t.join("|"):u=t,i=o+`/preview/picturesPreview?urls=${s(o+u)}`}else i=o+`/preview/onlinePreview?url=${s(o+t)}`;const c=Ue.namespace;if(c){const u=localStorage.getItem(`${c}-core-user`);if(u){const d=JSON.parse(u).userInfo.user.nickname;d&&(i+=`&watermarkTxt=${d}`)}}if(a&&(i+=`&watermarkTxt=${a}`),r)window.open(i);else return i},Pie={ApiSelect:xR,BaseUpload:Kg,UploadImage:Cte,UploadFile:zte,DetailItem:Gte,DetailRow:Zte,EmployeeStatus:xS,SexStatus:Wte,PositionStatus:Yte,BaseUserSelect:Ute,SelectUserDialog:TS,UserTag:uO,SandEditor:Dte,SelectAddress:wte,EnterpriseSearch:jB,ChangeRecord:kte,FollowUpRecord:Fte,UserCard:ES,BtnAi:xie,ChatBot:Die,AITextarea:Bte,AIInput:Ite,UploadImage2:Mte,UploadFile2:Lte,TagSelect:Jte},XUe={install:e=>{Object.entries(Pie).forEach(([t,n])=>{e.component(t,n)})}},jUe=e=>Pde(e);gt.AIInput=Ite,gt.AITextarea=Bte,gt.ApiSelect=xR,gt.BaseUpload=Kg,gt.BaseUserSelect=Ute,gt.BtnAi=xie,gt.BusinessUserSelect=qte,gt.ChangeRecord=kte,gt.ChatBot=Die,gt.DeptTree=Vte,gt.DetailItem=Gte,gt.DetailRow=Zte,gt.EmployeeStatus=xS,gt.EnterpriseSearch=jB,gt.FollowUpRecord=Fte,gt.PositionStatus=Yte,gt.SandEditor=Dte,gt.SelectAddress=wte,gt.SelectUserDialog=TS,gt.SexStatus=Wte,gt.TagSelect=Jte,gt.TreeOrg=QXe,gt.UploadFile=zte,gt.UploadFile2=Lte,gt.UploadImage=Cte,gt.UploadImage2=Mte,gt.UserCard=ES,gt.UserTag=uO,gt.components=Pie,gt.default=XUe,gt.filePreview=kUe,gt.sandInit=jUe,Object.defineProperties(gt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});