@blueking/ai-blueking 0.3.22 → 0.3.23

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
@@ -567,13 +567,20 @@ npm i @blueking/bkui-library
567
567
  1. 安装依赖
568
568
 
569
569
  ```bash
570
- npm install
570
+ pnpm install
571
571
  ```
572
572
 
573
573
  2. 启动开发服务器
574
574
 
575
575
  ```bash
576
- npm run dev
576
+ pnpm run dev
577
+ ```
578
+
579
+ 3. 配置 hosts,以.woa.com 结尾的域名,以正常获取cookie
580
+
581
+ ```bash
582
+ # 配置 hosts
583
+ echo "127.0.0.1 local.dev.woa.com" >> /etc/hosts
577
584
  ```
578
585
 
579
586
  ### Demo 运行模式
@@ -599,7 +606,7 @@ npm run dev
599
606
  1. 配置本地 hosts
600
607
 
601
608
 
602
- 2. 设置必要的变量
609
+ 2. 设置必要的变量 (不需要手动修改,playground 中已经存在)
603
610
 
604
611
  ```bash
605
612
  # 网站前缀
@@ -65,7 +65,7 @@ const Yv = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAA
65
65
  translateShortcut: `你是受过语言翻译训练的高技能人工智能。我想让你把用三引号分隔的文本翻译(中文翻译成英文,其他语言翻译成中文),确保译文口语化、地道。
66
66
  只给我输出结果,其他内容一概不要。请勿用引号将回复包起来
67
67
  '''
68
- {{ selected_text }}
68
+ {{ SELECTED_TEXT }}
69
69
  '''`,
70
70
  explanationShortcut: "您是一位专业的解释者。请详细解释“{{ SELECTED_TEXT }}”。您的解释应包括 1) 基本含义和概念解释;2) 实际应用或使用案例;3) 如果是技术术语,请提供相关技术背景;4) 适当时提供具体示例,以帮助理解。使用清晰易懂的语言,确保非专业人员也能理解。如果该词/短语有多种含义,请列出主要定义。在确保信息完整性和准确性的同时,请保持答复简洁明了。"
71
71
  }, Xe = (e) => Th !== "en" ? Oh[e] || e : Lh[e] || e, Bv = [
@@ -26,7 +26,7 @@ var lesscodeCustomComponentLibrary=function(zr){"use strict";var Vfe=Object.defi
26
26
  `,explanationShortcut:`You are a professional explainer. Please provide a detailed explanation of "{{ SELECTED_TEXT }}". Your explanation should include: 1) basic meaning and conceptual explanation; 2) practical applications or use cases; 3) if it's a technical term, please provide relevant technical background; 4) where appropriate, provide specific examples to aid understanding. Use clear and accessible language to ensure non-experts can understand. If the word/phrase has multiple meanings, please list the main definitions. Keep your response concise and clear while ensuring completeness and accuracy of information.`,翻译:"translate",解释:"explan"},I4={translateShortcut:`你是受过语言翻译训练的高技能人工智能。我想让你把用三引号分隔的文本翻译(中文翻译成英文,其他语言翻译成中文),确保译文口语化、地道。
27
27
  只给我输出结果,其他内容一概不要。请勿用引号将回复包起来
28
28
  '''
29
- {{ selected_text }}
29
+ {{ SELECTED_TEXT }}
30
30
  '''`,explanationShortcut:"您是一位专业的解释者。请详细解释“{{ SELECTED_TEXT }}”。您的解释应包括 1) 基本含义和概念解释;2) 实际应用或使用案例;3) 如果是技术术语,请提供相关技术背景;4) 适当时提供具体示例,以帮助理解。使用清晰易懂的语言,确保非专业人员也能理解。如果该词/短语有多种含义,请列出主要定义。在确保信息完整性和准确性的同时,请保持答复简洁明了。"},jt=t=>y4!=="en"?I4[t]||t:C4[t]||t,qI=[{label:jt("翻译"),prompt:jt("translateShortcut")},{label:jt("解释"),prompt:jt("explanationShortcut")}];var fr="top",Wr="bottom",qr="right",mr="left",yg="auto",Yc=[fr,Wr,qr,mr],qs="start",Hc="end",N4="clippingParents",JI="viewport",Qc="popper",O4="reference",KI=Yc.reduce(function(t,e){return t.concat([e+"-"+qs,e+"-"+Hc])},[]),ZI=[].concat(Yc,[yg]).reduce(function(t,e){return t.concat([e,e+"-"+qs,e+"-"+Hc])},[]),R4="beforeRead",A4="read",M4="afterRead",w4="beforeMain",D4="main",L4="afterMain",x4="beforeWrite",P4="write",k4="afterWrite",U4=[R4,A4,M4,w4,D4,L4,x4,P4,k4];function Fi(t){return t?(t.nodeName||"").toLowerCase():null}function Rr(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function cs(t){var e=Rr(t).Element;return t instanceof e||t instanceof Element}function Jr(t){var e=Rr(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Cg(t){if(typeof ShadowRoot>"u")return!1;var e=Rr(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function F4(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!Jr(o)||!Fi(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(l){var s=i[l];s===!1?o.removeAttribute(l):o.setAttribute(l,s===!0?"":s)}))})}function B4(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},l=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),s=l.reduce(function(u,d){return u[d]="",u},{});!Jr(i)||!Fi(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(u){i.removeAttribute(u)}))})}}const G4={name:"applyStyles",enabled:!0,phase:"write",fn:F4,effect:B4,requires:["computeStyles"]};function Bi(t){return t.split("-")[0]}var us=Math.max,Bp=Math.min,Js=Math.round;function Ig(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function XI(){return!/^((?!chrome|android).)*safari/i.test(Ig())}function Ks(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,o=1;e&&Jr(t)&&(i=t.offsetWidth>0&&Js(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Js(r.height)/t.offsetHeight||1);var l=cs(t)?Rr(t):window,s=l.visualViewport,u=!XI()&&n,d=(r.left+(u&&s?s.offsetLeft:0))/i,p=(r.top+(u&&s?s.offsetTop:0))/o,f=r.width/i,g=r.height/o;return{width:f,height:g,top:p,right:d+f,bottom:p+g,left:d,x:d,y:p}}function Ng(t){var e=Ks(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function eN(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Cg(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Oo(t){return Rr(t).getComputedStyle(t)}function j4(t){return["table","td","th"].indexOf(Fi(t))>=0}function Ca(t){return((cs(t)?t.ownerDocument:t.document)||window.document).documentElement}function Gp(t){return Fi(t)==="html"?t:t.assignedSlot||t.parentNode||(Cg(t)?t.host:null)||Ca(t)}function tN(t){return!Jr(t)||Oo(t).position==="fixed"?null:t.offsetParent}function z4(t){var e=/firefox/i.test(Ig()),n=/Trident/i.test(Ig());if(n&&Jr(t)){var r=Oo(t);if(r.position==="fixed")return null}var i=Gp(t);for(Cg(i)&&(i=i.host);Jr(i)&&["html","body"].indexOf(Fi(i))<0;){var o=Oo(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Vc(t){for(var e=Rr(t),n=tN(t);n&&j4(n)&&Oo(n).position==="static";)n=tN(n);return n&&(Fi(n)==="html"||Fi(n)==="body"&&Oo(n).position==="static")?e:n||z4(t)||e}function Og(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function $c(t,e,n){return us(t,Bp(e,n))}function Y4(t,e,n){var r=$c(t,e,n);return r>n?n:r}function nN(){return{top:0,right:0,bottom:0,left:0}}function rN(t){return Object.assign({},nN(),t)}function iN(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var H4=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,rN(typeof e!="number"?e:iN(e,Yc))};function Q4(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,l=n.modifiersData.popperOffsets,s=Bi(n.placement),u=Og(s),d=[mr,qr].indexOf(s)>=0,p=d?"height":"width";if(!(!o||!l)){var f=H4(i.padding,n),g=Ng(o),m=u==="y"?fr:mr,E=u==="y"?Wr:qr,S=n.rects.reference[p]+n.rects.reference[u]-l[u]-n.rects.popper[p],h=l[u]-n.rects.reference[u],v=Vc(o),N=v?u==="y"?v.clientHeight||0:v.clientWidth||0:0,w=S/2-h/2,U=f[m],P=N-g[p]-f[E],C=N/2-g[p]/2+w,K=$c(U,C,P),$=u;n.modifiersData[r]=(e={},e[$]=K,e.centerOffset=K-C,e)}}function V4(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||eN(e.elements.popper,i)&&(e.elements.arrow=i))}const $4={name:"arrow",enabled:!0,phase:"main",fn:Q4,effect:V4,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Zs(t){return t.split("-")[1]}var W4={top:"auto",right:"auto",bottom:"auto",left:"auto"};function q4(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:Js(n*i)/i||0,y:Js(r*i)/i||0}}function oN(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,l=t.offsets,s=t.position,u=t.gpuAcceleration,d=t.adaptive,p=t.roundOffsets,f=t.isFixed,g=l.x,m=g===void 0?0:g,E=l.y,S=E===void 0?0:E,h=typeof p=="function"?p({x:m,y:S}):{x:m,y:S};m=h.x,S=h.y;var v=l.hasOwnProperty("x"),N=l.hasOwnProperty("y"),w=mr,U=fr,P=window;if(d){var C=Vc(n),K="clientHeight",$="clientWidth";if(C===Rr(n)&&(C=Ca(n),Oo(C).position!=="static"&&s==="absolute"&&(K="scrollHeight",$="scrollWidth")),C=C,i===fr||(i===mr||i===qr)&&o===Hc){U=Wr;var ie=f&&C===P&&P.visualViewport?P.visualViewport.height:C[K];S-=ie-r.height,S*=u?1:-1}if(i===mr||(i===fr||i===Wr)&&o===Hc){w=qr;var Z=f&&C===P&&P.visualViewport?P.visualViewport.width:C[$];m-=Z-r.width,m*=u?1:-1}}var oe=Object.assign({position:s},d&&W4),se=p===!0?q4({x:m,y:S},Rr(n)):{x:m,y:S};if(m=se.x,S=se.y,u){var Se;return Object.assign({},oe,(Se={},Se[U]=N?"0":"",Se[w]=v?"0":"",Se.transform=(P.devicePixelRatio||1)<=1?"translate("+m+"px, "+S+"px)":"translate3d("+m+"px, "+S+"px, 0)",Se))}return Object.assign({},oe,(e={},e[U]=N?S+"px":"",e[w]=v?m+"px":"",e.transform="",e))}function J4(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,l=o===void 0?!0:o,s=n.roundOffsets,u=s===void 0?!0:s,d={placement:Bi(e.placement),variation:Zs(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,oN(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:l,roundOffsets:u})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,oN(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const K4={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:J4,data:{}};var jp={passive:!0};function Z4(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=i===void 0?!0:i,l=r.resize,s=l===void 0?!0:l,u=Rr(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&d.forEach(function(p){p.addEventListener("scroll",n.update,jp)}),s&&u.addEventListener("resize",n.update,jp),function(){o&&d.forEach(function(p){p.removeEventListener("scroll",n.update,jp)}),s&&u.removeEventListener("resize",n.update,jp)}}const X4={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Z4,data:{}};var eB={left:"right",right:"left",bottom:"top",top:"bottom"};function zp(t){return t.replace(/left|right|bottom|top/g,function(e){return eB[e]})}var tB={start:"end",end:"start"};function aN(t){return t.replace(/start|end/g,function(e){return tB[e]})}function Rg(t){var e=Rr(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Ag(t){return Ks(Ca(t)).left+Rg(t).scrollLeft}function nB(t,e){var n=Rr(t),r=Ca(t),i=n.visualViewport,o=r.clientWidth,l=r.clientHeight,s=0,u=0;if(i){o=i.width,l=i.height;var d=XI();(d||!d&&e==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:o,height:l,x:s+Ag(t),y:u}}function rB(t){var e,n=Ca(t),r=Rg(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=us(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),l=us(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Ag(t),u=-r.scrollTop;return Oo(i||n).direction==="rtl"&&(s+=us(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:l,x:s,y:u}}function Mg(t){var e=Oo(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function sN(t){return["html","body","#document"].indexOf(Fi(t))>=0?t.ownerDocument.body:Jr(t)&&Mg(t)?t:sN(Gp(t))}function Wc(t,e){var n;e===void 0&&(e=[]);var r=sN(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=Rr(r),l=i?[o].concat(o.visualViewport||[],Mg(r)?r:[]):r,s=e.concat(l);return i?s:s.concat(Wc(Gp(l)))}function wg(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function iB(t,e){var n=Ks(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function lN(t,e,n){return e===JI?wg(nB(t,n)):cs(e)?iB(e,n):wg(rB(Ca(t)))}function oB(t){var e=Wc(Gp(t)),n=["absolute","fixed"].indexOf(Oo(t).position)>=0,r=n&&Jr(t)?Vc(t):t;return cs(r)?e.filter(function(i){return cs(i)&&eN(i,r)&&Fi(i)!=="body"}):[]}function aB(t,e,n,r){var i=e==="clippingParents"?oB(t):[].concat(e),o=[].concat(i,[n]),l=o[0],s=o.reduce(function(u,d){var p=lN(t,d,r);return u.top=us(p.top,u.top),u.right=Bp(p.right,u.right),u.bottom=Bp(p.bottom,u.bottom),u.left=us(p.left,u.left),u},lN(t,l,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function cN(t){var e=t.reference,n=t.element,r=t.placement,i=r?Bi(r):null,o=r?Zs(r):null,l=e.x+e.width/2-n.width/2,s=e.y+e.height/2-n.height/2,u;switch(i){case fr:u={x:l,y:e.y-n.height};break;case Wr:u={x:l,y:e.y+e.height};break;case qr:u={x:e.x+e.width,y:s};break;case mr:u={x:e.x-n.width,y:s};break;default:u={x:e.x,y:e.y}}var d=i?Og(i):null;if(d!=null){var p=d==="y"?"height":"width";switch(o){case qs:u[d]=u[d]-(e[p]/2-n[p]/2);break;case Hc:u[d]=u[d]+(e[p]/2-n[p]/2);break}}return u}function qc(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,o=n.strategy,l=o===void 0?t.strategy:o,s=n.boundary,u=s===void 0?N4:s,d=n.rootBoundary,p=d===void 0?JI:d,f=n.elementContext,g=f===void 0?Qc:f,m=n.altBoundary,E=m===void 0?!1:m,S=n.padding,h=S===void 0?0:S,v=rN(typeof h!="number"?h:iN(h,Yc)),N=g===Qc?O4:Qc,w=t.rects.popper,U=t.elements[E?N:g],P=aB(cs(U)?U:U.contextElement||Ca(t.elements.popper),u,p,l),C=Ks(t.elements.reference),K=cN({reference:C,element:w,strategy:"absolute",placement:i}),$=wg(Object.assign({},w,K)),ie=g===Qc?$:C,Z={top:P.top-ie.top+v.top,bottom:ie.bottom-P.bottom+v.bottom,left:P.left-ie.left+v.left,right:ie.right-P.right+v.right},oe=t.modifiersData.offset;if(g===Qc&&oe){var se=oe[i];Object.keys(Z).forEach(function(Se){var J=[qr,Wr].indexOf(Se)>=0?1:-1,D=[fr,Wr].indexOf(Se)>=0?"y":"x";Z[Se]+=se[D]*J})}return Z}function sB(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,l=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,d=u===void 0?ZI:u,p=Zs(r),f=p?s?KI:KI.filter(function(E){return Zs(E)===p}):Yc,g=f.filter(function(E){return d.indexOf(E)>=0});g.length===0&&(g=f);var m=g.reduce(function(E,S){return E[S]=qc(t,{placement:S,boundary:i,rootBoundary:o,padding:l})[Bi(S)],E},{});return Object.keys(m).sort(function(E,S){return m[E]-m[S]})}function lB(t){if(Bi(t)===yg)return[];var e=zp(t);return[aN(t),e,aN(e)]}function cB(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,l=n.altAxis,s=l===void 0?!0:l,u=n.fallbackPlacements,d=n.padding,p=n.boundary,f=n.rootBoundary,g=n.altBoundary,m=n.flipVariations,E=m===void 0?!0:m,S=n.allowedAutoPlacements,h=e.options.placement,v=Bi(h),N=v===h,w=u||(N||!E?[zp(h)]:lB(h)),U=[h].concat(w).reduce(function(M,y){return M.concat(Bi(y)===yg?sB(e,{placement:y,boundary:p,rootBoundary:f,padding:d,flipVariations:E,allowedAutoPlacements:S}):y)},[]),P=e.rects.reference,C=e.rects.popper,K=new Map,$=!0,ie=U[0],Z=0;Z<U.length;Z++){var oe=U[Z],se=Bi(oe),Se=Zs(oe)===qs,J=[fr,Wr].indexOf(se)>=0,D=J?"width":"height",L=qc(e,{placement:oe,boundary:p,rootBoundary:f,altBoundary:g,padding:d}),R=J?Se?qr:mr:Se?Wr:fr;P[D]>C[D]&&(R=zp(R));var V=zp(R),_e=[];if(o&&_e.push(L[se]<=0),s&&_e.push(L[R]<=0,L[V]<=0),_e.every(function(M){return M})){ie=oe,$=!1;break}K.set(oe,_e)}if($)for(var de=E?3:1,z=function(y){var Y=U.find(function(le){var W=K.get(le);if(W)return W.slice(0,y).every(function(k){return k})});if(Y)return ie=Y,"break"},I=de;I>0;I--){var A=z(I);if(A==="break")break}e.placement!==ie&&(e.modifiersData[r]._skip=!0,e.placement=ie,e.reset=!0)}}const uB={name:"flip",enabled:!0,phase:"main",fn:cB,requiresIfExists:["offset"],data:{_skip:!1}};function uN(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function dN(t){return[fr,qr,Wr,mr].some(function(e){return t[e]>=0})}function dB(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,l=qc(e,{elementContext:"reference"}),s=qc(e,{altBoundary:!0}),u=uN(l,r),d=uN(s,i,o),p=dN(u),f=dN(d);e.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:d,isReferenceHidden:p,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":f})}const pB={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:dB};function _B(t,e,n){var r=Bi(t),i=[mr,fr].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,l=o[0],s=o[1];return l=l||0,s=(s||0)*i,[mr,qr].indexOf(r)>=0?{x:s,y:l}:{x:l,y:s}}function fB(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=i===void 0?[0,0]:i,l=ZI.reduce(function(p,f){return p[f]=_B(f,e.rects,o),p},{}),s=l[e.placement],u=s.x,d=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=d),e.modifiersData[r]=l}const mB={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:fB};function gB(t){var e=t.state,n=t.name;e.modifiersData[n]=cN({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const EB={name:"popperOffsets",enabled:!0,phase:"read",fn:gB,data:{}};function SB(t){return t==="x"?"y":"x"}function bB(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=i===void 0?!0:i,l=n.altAxis,s=l===void 0?!1:l,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.padding,g=n.tether,m=g===void 0?!0:g,E=n.tetherOffset,S=E===void 0?0:E,h=qc(e,{boundary:u,rootBoundary:d,padding:f,altBoundary:p}),v=Bi(e.placement),N=Zs(e.placement),w=!N,U=Og(v),P=SB(U),C=e.modifiersData.popperOffsets,K=e.rects.reference,$=e.rects.popper,ie=typeof S=="function"?S(Object.assign({},e.rects,{placement:e.placement})):S,Z=typeof ie=="number"?{mainAxis:ie,altAxis:ie}:Object.assign({mainAxis:0,altAxis:0},ie),oe=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,se={x:0,y:0};if(C){if(o){var Se,J=U==="y"?fr:mr,D=U==="y"?Wr:qr,L=U==="y"?"height":"width",R=C[U],V=R+h[J],_e=R-h[D],de=m?-$[L]/2:0,z=N===qs?K[L]:$[L],I=N===qs?-$[L]:-K[L],A=e.elements.arrow,M=m&&A?Ng(A):{width:0,height:0},y=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:nN(),Y=y[J],le=y[D],W=$c(0,K[L],M[L]),k=w?K[L]/2-de-W-Y-Z.mainAxis:z-W-Y-Z.mainAxis,q=w?-K[L]/2+de+W+le+Z.mainAxis:I+W+le+Z.mainAxis,H=e.elements.arrow&&Vc(e.elements.arrow),ae=H?U==="y"?H.clientTop||0:H.clientLeft||0:0,O=(Se=oe==null?void 0:oe[U])!=null?Se:0,Q=R+k-O-ae,re=R+q-O,B=$c(m?Bp(V,Q):V,R,m?us(_e,re):_e);C[U]=B,se[U]=B-R}if(s){var F,X=U==="x"?fr:mr,ne=U==="x"?Wr:qr,me=C[P],Ee=P==="y"?"height":"width",pe=me+h[X],Ce=me-h[ne],xe=[fr,mr].indexOf(v)!==-1,Me=(F=oe==null?void 0:oe[P])!=null?F:0,Ue=xe?pe:me-K[Ee]-$[Ee]-Me+Z.altAxis,be=xe?me+K[Ee]+$[Ee]-Me-Z.altAxis:Ce,Ne=m&&xe?Y4(Ue,me,be):$c(m?Ue:pe,me,m?be:Ce);C[P]=Ne,se[P]=Ne-me}e.modifiersData[r]=se}}const vB={name:"preventOverflow",enabled:!0,phase:"main",fn:bB,requiresIfExists:["offset"]};function hB(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function TB(t){return t===Rr(t)||!Jr(t)?Rg(t):hB(t)}function yB(t){var e=t.getBoundingClientRect(),n=Js(e.width)/t.offsetWidth||1,r=Js(e.height)/t.offsetHeight||1;return n!==1||r!==1}function CB(t,e,n){n===void 0&&(n=!1);var r=Jr(e),i=Jr(e)&&yB(e),o=Ca(e),l=Ks(t,i,n),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((Fi(e)!=="body"||Mg(o))&&(s=TB(e)),Jr(e)?(u=Ks(e,!0),u.x+=e.clientLeft,u.y+=e.clientTop):o&&(u.x=Ag(o))),{x:l.left+s.scrollLeft-u.x,y:l.top+s.scrollTop-u.y,width:l.width,height:l.height}}function IB(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var l=[].concat(o.requires||[],o.requiresIfExists||[]);l.forEach(function(s){if(!n.has(s)){var u=e.get(s);u&&i(u)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),r}function NB(t){var e=IB(t);return U4.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function OB(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function RB(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var pN={placement:"bottom",modifiers:[],strategy:"absolute"};function _N(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function AB(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,i=e.defaultOptions,o=i===void 0?pN:i;return function(s,u,d){d===void 0&&(d=o);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},pN,o),modifiersData:{},elements:{reference:s,popper:u},attributes:{},styles:{}},f=[],g=!1,m={state:p,setOptions:function(v){var N=typeof v=="function"?v(p.options):v;S(),p.options=Object.assign({},o,p.options,N),p.scrollParents={reference:cs(s)?Wc(s):s.contextElement?Wc(s.contextElement):[],popper:Wc(u)};var w=NB(RB([].concat(r,p.options.modifiers)));return p.orderedModifiers=w.filter(function(U){return U.enabled}),E(),m.update()},forceUpdate:function(){if(!g){var v=p.elements,N=v.reference,w=v.popper;if(_N(N,w)){p.rects={reference:CB(N,Vc(w),p.options.strategy==="fixed"),popper:Ng(w)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(Z){return p.modifiersData[Z.name]=Object.assign({},Z.data)});for(var U=0;U<p.orderedModifiers.length;U++){if(p.reset===!0){p.reset=!1,U=-1;continue}var P=p.orderedModifiers[U],C=P.fn,K=P.options,$=K===void 0?{}:K,ie=P.name;typeof C=="function"&&(p=C({state:p,options:$,name:ie,instance:m})||p)}}}},update:OB(function(){return new Promise(function(h){m.forceUpdate(),h(p)})}),destroy:function(){S(),g=!0}};if(!_N(s,u))return m;m.setOptions(d).then(function(h){!g&&d.onFirstUpdate&&d.onFirstUpdate(h)});function E(){p.orderedModifiers.forEach(function(h){var v=h.name,N=h.options,w=N===void 0?{}:N,U=h.effect;if(typeof U=="function"){var P=U({state:p,name:v,instance:m,options:w}),C=function(){};f.push(P||C)}})}function S(){f.forEach(function(h){return h()}),f=[]}return m}}var MB=[X4,EB,K4,G4,mB,uB,vB,$4,pB],fN=AB({defaultModifiers:MB}),Kr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function wB(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}function DB(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var ji=DB,LB=typeof Kr=="object"&&Kr&&Kr.Object===Object&&Kr,mN=LB,xB=mN,PB=typeof self=="object"&&self&&self.Object===Object&&self,kB=xB||PB||Function("return this")(),Si=kB,UB=Si,FB=function(){return UB.Date.now()},BB=FB,GB=/\s/;function jB(t){for(var e=t.length;e--&&GB.test(t.charAt(e)););return e}var zB=jB,YB=zB,HB=/^\s+/;function QB(t){return t&&t.slice(0,YB(t)+1).replace(HB,"")}var VB=QB,$B=Si,WB=$B.Symbol,Dg=WB,gN=Dg,EN=Object.prototype,qB=EN.hasOwnProperty,JB=EN.toString,Jc=gN?gN.toStringTag:void 0;function KB(t){var e=qB.call(t,Jc),n=t[Jc];try{t[Jc]=void 0;var r=!0}catch{}var i=JB.call(t);return r&&(e?t[Jc]=n:delete t[Jc]),i}var ZB=KB,XB=Object.prototype,eG=XB.toString;function tG(t){return eG.call(t)}var nG=tG,SN=Dg,rG=ZB,iG=nG,oG="[object Null]",aG="[object Undefined]",bN=SN?SN.toStringTag:void 0;function sG(t){return t==null?t===void 0?aG:oG:bN&&bN in Object(t)?rG(t):iG(t)}var Xs=sG;function lG(t){return t!=null&&typeof t=="object"}var Ia=lG,cG=Xs,uG=Ia,dG="[object Symbol]";function pG(t){return typeof t=="symbol"||uG(t)&&cG(t)==dG}var _G=pG,fG=VB,vN=ji,mG=_G,hN=NaN,gG=/^[-+]0x[0-9a-f]+$/i,EG=/^0b[01]+$/i,SG=/^0o[0-7]+$/i,bG=parseInt;function vG(t){if(typeof t=="number")return t;if(mG(t))return hN;if(vN(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=vN(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=fG(t);var n=EG.test(t);return n||SG.test(t)?bG(t.slice(2),n?2:8):gG.test(t)?hN:+t}var hG=vG,TG=ji,Lg=BB,TN=hG,yG="Expected a function",CG=Math.max,IG=Math.min;function NG(t,e,n){var r,i,o,l,s,u,d=0,p=!1,f=!1,g=!0;if(typeof t!="function")throw new TypeError(yG);e=TN(e)||0,TG(n)&&(p=!!n.leading,f="maxWait"in n,o=f?CG(TN(n.maxWait)||0,e):o,g="trailing"in n?!!n.trailing:g);function m(C){var K=r,$=i;return r=i=void 0,d=C,l=t.apply($,K),l}function E(C){return d=C,s=setTimeout(v,e),p?m(C):l}function S(C){var K=C-u,$=C-d,ie=e-K;return f?IG(ie,o-$):ie}function h(C){var K=C-u,$=C-d;return u===void 0||K>=e||K<0||f&&$>=o}function v(){var C=Lg();if(h(C))return N(C);s=setTimeout(v,S(C))}function N(C){return s=void 0,g&&r?m(C):(r=i=void 0,l)}function w(){s!==void 0&&clearTimeout(s),d=0,r=u=i=s=void 0}function U(){return s===void 0?l:N(Lg())}function P(){var C=Lg(),K=h(C);if(r=arguments,i=this,u=C,K){if(s===void 0)return E(u);if(f)return clearTimeout(s),s=setTimeout(v,e),m(u)}return s===void 0&&(s=setTimeout(v,e)),l}return P.cancel=w,P.flush=U,P}var yN=NG;const OG=Gi(yN);var RG=yN,AG=ji,MG="Expected a function";function wG(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(MG);return AG(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),RG(t,e,{leading:r,maxWait:e,trailing:i})}var DG=wG;const CN=Gi(DG);/*!
31
31
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
32
32
  *
@@ -7,7 +7,7 @@
7
7
  `,explanationShortcut:`You are a professional explainer. Please provide a detailed explanation of "{{ SELECTED_TEXT }}". Your explanation should include: 1) basic meaning and conceptual explanation; 2) practical applications or use cases; 3) if it's a technical term, please provide relevant technical background; 4) where appropriate, provide specific examples to aid understanding. Use clear and accessible language to ensure non-experts can understand. If the word/phrase has multiple meanings, please list the main definitions. Keep your response concise and clear while ensuring completeness and accuracy of information.`,翻译:"translate",解释:"explan"},fm={translateShortcut:`你是受过语言翻译训练的高技能人工智能。我想让你把用三引号分隔的文本翻译(中文翻译成英文,其他语言翻译成中文),确保译文口语化、地道。
8
8
  只给我输出结果,其他内容一概不要。请勿用引号将回复包起来
9
9
  '''
10
- {{ selected_text }}
10
+ {{ SELECTED_TEXT }}
11
11
  '''`,explanationShortcut:"您是一位专业的解释者。请详细解释“{{ SELECTED_TEXT }}”。您的解释应包括 1) 基本含义和概念解释;2) 实际应用或使用案例;3) 如果是技术术语,请提供相关技术背景;4) 适当时提供具体示例,以帮助理解。使用清晰易懂的语言,确保非专业人员也能理解。如果该词/短语有多种含义,请列出主要定义。在确保信息完整性和准确性的同时,请保持答复简洁明了。"},We=e=>um!=="en"?fm[e]||e:dm[e]||e,Hu=[{label:We("翻译"),prompt:We("translateShortcut")},{label:We("解释"),prompt:We("explanationShortcut")}];var kt="top",Dt="bottom",Qt="right",xt="left",us="auto",Ro=[kt,Dt,Qt,xt],Dr="start",Yo="end",pm="clippingParents",Vu="viewport",$o="popper",gm="reference",Ru=Ro.reduce(function(e,t){return e.concat([t+"-"+Dr,t+"-"+Yo])},[]),Yu=[].concat(Ro,[us]).reduce(function(e,t){return e.concat([t,t+"-"+Dr,t+"-"+Yo])},[]),bm="beforeRead",vm="read",mm="afterRead",ym="beforeMain",hm="main",Am="afterMain",wm="beforeWrite",Im="write",km="afterWrite",xm=[bm,vm,mm,ym,hm,Am,wm,Im,km];function en(e){return e?(e.nodeName||"").toLowerCase():null}function Nt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function pr(e){var t=Nt(e).Element;return e instanceof t||e instanceof Element}function zt(e){var t=Nt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ds(e){if(typeof ShadowRoot>"u")return!1;var t=Nt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Mm(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!zt(i)||!en(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(l){var a=o[l];a===!1?i.removeAttribute(l):i.setAttribute(l,a===!0?"":a)}))})}function jm(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},l=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=l.reduce(function(s,c){return s[c]="",s},{});!zt(o)||!en(o)||(Object.assign(o.style,a),Object.keys(i).forEach(function(s){o.removeAttribute(s)}))})}}const Cm={name:"applyStyles",enabled:!0,phase:"write",fn:Mm,effect:jm,requires:["computeStyles"]};function tn(e){return e.split("-")[0]}var gr=Math.max,xa=Math.min,Qr=Math.round;function fs(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function $u(){return!/^((?!chrome|android).)*safari/i.test(fs())}function zr(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&zt(e)&&(o=e.offsetWidth>0&&Qr(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Qr(r.height)/e.offsetHeight||1);var l=pr(e)?Nt(e):window,a=l.visualViewport,s=!$u()&&n,c=(r.left+(s&&a?a.offsetLeft:0))/o,u=(r.top+(s&&a?a.offsetTop:0))/i,d=r.width/o,v=r.height/i;return{width:d,height:v,top:u,right:c+d,bottom:u+v,left:c,x:c,y:u}}function ps(e){var t=zr(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Fu(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ds(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Cn(e){return Nt(e).getComputedStyle(e)}function Nm(e){return["table","td","th"].indexOf(en(e))>=0}function Wn(e){return((pr(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ma(e){return en(e)==="html"?e:e.assignedSlot||e.parentNode||(ds(e)?e.host:null)||Wn(e)}function Wu(e){return!zt(e)||Cn(e).position==="fixed"?null:e.offsetParent}function Sm(e){var t=/firefox/i.test(fs()),n=/Trident/i.test(fs());if(n&&zt(e)){var r=Cn(e);if(r.position==="fixed")return null}var o=Ma(e);for(ds(o)&&(o=o.host);zt(o)&&["html","body"].indexOf(en(o))<0;){var i=Cn(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function Fo(e){for(var t=Nt(e),n=Wu(e);n&&Nm(n)&&Cn(n).position==="static";)n=Wu(n);return n&&(en(n)==="html"||en(n)==="body"&&Cn(n).position==="static")?t:n||Sm(e)||t}function gs(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Wo(e,t,n){return gr(e,xa(t,n))}function Tm(e,t,n){var r=Wo(e,t,n);return r>n?n:r}function Uu(){return{top:0,right:0,bottom:0,left:0}}function Ku(e){return Object.assign({},Uu(),e)}function Xu(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Om=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Ku(typeof t!="number"?t:Xu(t,Ro))};function Lm(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,l=n.modifiersData.popperOffsets,a=tn(n.placement),s=gs(a),c=[xt,Qt].indexOf(a)>=0,u=c?"height":"width";if(!(!i||!l)){var d=Om(o.padding,n),v=ps(i),f=s==="y"?kt:xt,g=s==="y"?Dt:Qt,p=n.rects.reference[u]+n.rects.reference[s]-l[s]-n.rects.popper[u],x=l[s]-n.rects.reference[s],m=Fo(i),z=m?s==="y"?m.clientHeight||0:m.clientWidth||0:0,E=p/2-x/2,Z=d[f],J=z-v[u]-d[g],G=z/2-v[u]/2+E,R=Wo(Z,G,J),W=s;n.modifiersData[r]=(t={},t[W]=R,t.centerOffset=R-G,t)}}function Pm(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Fu(t.elements.popper,o)&&(t.elements.arrow=o))}const Dm={name:"arrow",enabled:!0,phase:"main",fn:Lm,effect:Pm,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Jr(e){return e.split("-")[1]}var Qm={top:"auto",right:"auto",bottom:"auto",left:"auto"};function zm(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Qr(n*o)/o||0,y:Qr(r*o)/o||0}}function qu(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,l=e.offsets,a=e.position,s=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,v=l.x,f=v===void 0?0:v,g=l.y,p=g===void 0?0:g,x=typeof u=="function"?u({x:f,y:p}):{x:f,y:p};f=x.x,p=x.y;var m=l.hasOwnProperty("x"),z=l.hasOwnProperty("y"),E=xt,Z=kt,J=window;if(c){var G=Fo(n),R="clientHeight",W="clientWidth";if(G===Nt(n)&&(G=Wn(n),Cn(G).position!=="static"&&a==="absolute"&&(R="scrollHeight",W="scrollWidth")),G=G,o===kt||(o===xt||o===Qt)&&i===Yo){Z=Dt;var q=d&&G===J&&J.visualViewport?J.visualViewport.height:G[R];p-=q-r.height,p*=s?1:-1}if(o===xt||(o===kt||o===Dt)&&i===Yo){E=Qt;var Y=d&&G===J&&J.visualViewport?J.visualViewport.width:G[W];f-=Y-r.width,f*=s?1:-1}}var ce=Object.assign({position:a},c&&Qm),ee=u===!0?zm({x:f,y:p},Nt(n)):{x:f,y:p};if(f=ee.x,p=ee.y,s){var se;return Object.assign({},ce,(se={},se[Z]=z?"0":"",se[E]=m?"0":"",se.transform=(J.devicePixelRatio||1)<=1?"translate("+f+"px, "+p+"px)":"translate3d("+f+"px, "+p+"px, 0)",se))}return Object.assign({},ce,(t={},t[Z]=z?p+"px":"",t[E]=m?f+"px":"",t.transform="",t))}function Jm(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,l=i===void 0?!0:i,a=n.roundOffsets,s=a===void 0?!0:a,c={placement:tn(t.placement),variation:Jr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,qu(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:s})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,qu(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Em={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Jm,data:{}};var ja={passive:!0};function Gm(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,l=r.resize,a=l===void 0?!0:l,s=Nt(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,ja)}),a&&s.addEventListener("resize",n.update,ja),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,ja)}),a&&s.removeEventListener("resize",n.update,ja)}}const Bm={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Gm,data:{}};var Zm={left:"right",right:"left",bottom:"top",top:"bottom"};function Ca(e){return e.replace(/left|right|bottom|top/g,function(t){return Zm[t]})}var Hm={start:"end",end:"start"};function _u(e){return e.replace(/start|end/g,function(t){return Hm[t]})}function bs(e){var t=Nt(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function vs(e){return zr(Wn(e)).left+bs(e).scrollLeft}function Vm(e,t){var n=Nt(e),r=Wn(e),o=n.visualViewport,i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;var c=$u();(c||!c&&t==="fixed")&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a+vs(e),y:s}}function Rm(e){var t,n=Wn(e),r=bs(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=gr(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=gr(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+vs(e),s=-r.scrollTop;return Cn(o||n).direction==="rtl"&&(a+=gr(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:l,x:a,y:s}}function ms(e){var t=Cn(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function ed(e){return["html","body","#document"].indexOf(en(e))>=0?e.ownerDocument.body:zt(e)&&ms(e)?e:ed(Ma(e))}function Uo(e,t){var n;t===void 0&&(t=[]);var r=ed(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=Nt(r),l=o?[i].concat(i.visualViewport||[],ms(r)?r:[]):r,a=t.concat(l);return o?a:a.concat(Uo(Ma(l)))}function ys(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ym(e,t){var n=zr(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function td(e,t,n){return t===Vu?ys(Vm(e,n)):pr(t)?Ym(t,n):ys(Rm(Wn(e)))}function $m(e){var t=Uo(Ma(e)),n=["absolute","fixed"].indexOf(Cn(e).position)>=0,r=n&&zt(e)?Fo(e):e;return pr(r)?t.filter(function(o){return pr(o)&&Fu(o,r)&&en(o)!=="body"}):[]}function Fm(e,t,n,r){var o=t==="clippingParents"?$m(e):[].concat(t),i=[].concat(o,[n]),l=i[0],a=i.reduce(function(s,c){var u=td(e,c,r);return s.top=gr(u.top,s.top),s.right=xa(u.right,s.right),s.bottom=xa(u.bottom,s.bottom),s.left=gr(u.left,s.left),s},td(e,l,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function nd(e){var t=e.reference,n=e.element,r=e.placement,o=r?tn(r):null,i=r?Jr(r):null,l=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,s;switch(o){case kt:s={x:l,y:t.y-n.height};break;case Dt:s={x:l,y:t.y+t.height};break;case Qt:s={x:t.x+t.width,y:a};break;case xt:s={x:t.x-n.width,y:a};break;default:s={x:t.x,y:t.y}}var c=o?gs(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case Dr:s[c]=s[c]-(t[u]/2-n[u]/2);break;case Yo:s[c]=s[c]+(t[u]/2-n[u]/2);break}}return s}function Ko(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,l=i===void 0?e.strategy:i,a=n.boundary,s=a===void 0?pm:a,c=n.rootBoundary,u=c===void 0?Vu:c,d=n.elementContext,v=d===void 0?$o:d,f=n.altBoundary,g=f===void 0?!1:f,p=n.padding,x=p===void 0?0:p,m=Ku(typeof x!="number"?x:Xu(x,Ro)),z=v===$o?gm:$o,E=e.rects.popper,Z=e.elements[g?z:v],J=Fm(pr(Z)?Z:Z.contextElement||Wn(e.elements.popper),s,u,l),G=zr(e.elements.reference),R=nd({reference:G,element:E,strategy:"absolute",placement:o}),W=ys(Object.assign({},E,R)),q=v===$o?W:G,Y={top:J.top-q.top+m.top,bottom:q.bottom-J.bottom+m.bottom,left:J.left-q.left+m.left,right:q.right-J.right+m.right},ce=e.modifiersData.offset;if(v===$o&&ce){var ee=ce[o];Object.keys(Y).forEach(function(se){var _=[Qt,Dt].indexOf(se)>=0?1:-1,O=[kt,Dt].indexOf(se)>=0?"y":"x";Y[se]+=ee[O]*_})}return Y}function Wm(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,l=n.padding,a=n.flipVariations,s=n.allowedAutoPlacements,c=s===void 0?Yu:s,u=Jr(r),d=u?a?Ru:Ru.filter(function(g){return Jr(g)===u}):Ro,v=d.filter(function(g){return c.indexOf(g)>=0});v.length===0&&(v=d);var f=v.reduce(function(g,p){return g[p]=Ko(e,{placement:p,boundary:o,rootBoundary:i,padding:l})[tn(p)],g},{});return Object.keys(f).sort(function(g,p){return f[g]-f[p]})}function Um(e){if(tn(e)===us)return[];var t=Ca(e);return[_u(e),t,_u(t)]}function Km(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,l=n.altAxis,a=l===void 0?!0:l,s=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,v=n.altBoundary,f=n.flipVariations,g=f===void 0?!0:f,p=n.allowedAutoPlacements,x=t.options.placement,m=tn(x),z=m===x,E=s||(z||!g?[Ca(x)]:Um(x)),Z=[x].concat(E).reduce(function(k,h){return k.concat(tn(h)===us?Wm(t,{placement:h,boundary:u,rootBoundary:d,padding:c,flipVariations:g,allowedAutoPlacements:p}):h)},[]),J=t.rects.reference,G=t.rects.popper,R=new Map,W=!0,q=Z[0],Y=0;Y<Z.length;Y++){var ce=Z[Y],ee=tn(ce),se=Jr(ce)===Dr,_=[kt,Dt].indexOf(ee)>=0,O=_?"width":"height",B=Ko(t,{placement:ce,boundary:u,rootBoundary:d,altBoundary:v,padding:c}),H=_?se?Qt:xt:se?Dt:kt;J[O]>G[O]&&(H=Ca(H));var te=Ca(H),pe=[];if(i&&pe.push(B[ee]<=0),a&&pe.push(B[H]<=0,B[te]<=0),pe.every(function(k){return k})){q=ce,W=!1;break}R.set(ce,pe)}if(W)for(var re=g?3:1,N=function(h){var T=Z.find(function($){var S=R.get($);if(S)return S.slice(0,h).every(function(A){return A})});if(T)return q=T,"break"},w=re;w>0;w--){var M=N(w);if(M==="break")break}t.placement!==q&&(t.modifiersData[r]._skip=!0,t.placement=q,t.reset=!0)}}const Xm={name:"flip",enabled:!0,phase:"main",fn:Km,requiresIfExists:["offset"],data:{_skip:!1}};function rd(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function od(e){return[kt,Qt,Dt,xt].some(function(t){return e[t]>=0})}function qm(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,l=Ko(t,{elementContext:"reference"}),a=Ko(t,{altBoundary:!0}),s=rd(l,r),c=rd(a,o,i),u=od(s),d=od(c);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const _m={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:qm};function ey(e,t,n){var r=tn(e),o=[xt,kt].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,l=i[0],a=i[1];return l=l||0,a=(a||0)*o,[xt,Qt].indexOf(r)>=0?{x:a,y:l}:{x:l,y:a}}function ty(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,l=Yu.reduce(function(u,d){return u[d]=ey(d,t.rects,i),u},{}),a=l[t.placement],s=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=l}const ny={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ty};function ry(e){var t=e.state,n=e.name;t.modifiersData[n]=nd({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const oy={name:"popperOffsets",enabled:!0,phase:"read",fn:ry,data:{}};function iy(e){return e==="x"?"y":"x"}function ay(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,l=n.altAxis,a=l===void 0?!1:l,s=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,v=n.tether,f=v===void 0?!0:v,g=n.tetherOffset,p=g===void 0?0:g,x=Ko(t,{boundary:s,rootBoundary:c,padding:d,altBoundary:u}),m=tn(t.placement),z=Jr(t.placement),E=!z,Z=gs(m),J=iy(Z),G=t.modifiersData.popperOffsets,R=t.rects.reference,W=t.rects.popper,q=typeof p=="function"?p(Object.assign({},t.rects,{placement:t.placement})):p,Y=typeof q=="number"?{mainAxis:q,altAxis:q}:Object.assign({mainAxis:0,altAxis:0},q),ce=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ee={x:0,y:0};if(G){if(i){var se,_=Z==="y"?kt:xt,O=Z==="y"?Dt:Qt,B=Z==="y"?"height":"width",H=G[Z],te=H+x[_],pe=H-x[O],re=f?-W[B]/2:0,N=z===Dr?R[B]:W[B],w=z===Dr?-W[B]:-R[B],M=t.elements.arrow,k=f&&M?ps(M):{width:0,height:0},h=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Uu(),T=h[_],$=h[O],S=Wo(0,R[B],k[B]),A=E?R[B]/2-re-S-T-Y.mainAxis:N-S-T-Y.mainAxis,C=E?-R[B]/2+re+S+$+Y.mainAxis:w+S+$+Y.mainAxis,I=t.elements.arrow&&Fo(t.elements.arrow),Q=I?Z==="y"?I.clientTop||0:I.clientLeft||0:0,X=(se=ce==null?void 0:ce[Z])!=null?se:0,oe=H+A-X-Q,ue=H+C-X,D=Wo(f?xa(te,oe):te,H,f?gr(pe,ue):pe);G[Z]=D,ee[Z]=D-H}if(a){var L,V=Z==="x"?kt:xt,ne=Z==="x"?Dt:Qt,fe=G[J],Ae=J==="y"?"height":"width",xe=fe+x[V],Oe=fe-x[ne],Ee=[kt,xt].indexOf(m)!==-1,Ge=(L=ce==null?void 0:ce[J])!=null?L:0,$e=Ee?xe:fe-R[Ae]-W[Ae]-Ge+Y.altAxis,Be=Ee?fe+R[Ae]+W[Ae]-Ge-Y.altAxis:Oe,nt=f&&Ee?Tm($e,fe,Be):Wo(f?$e:xe,fe,f?Be:Oe);G[J]=nt,ee[J]=nt-fe}t.modifiersData[r]=ee}}const ly={name:"preventOverflow",enabled:!0,phase:"main",fn:ay,requiresIfExists:["offset"]};function sy(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function cy(e){return e===Nt(e)||!zt(e)?bs(e):sy(e)}function uy(e){var t=e.getBoundingClientRect(),n=Qr(t.width)/e.offsetWidth||1,r=Qr(t.height)/e.offsetHeight||1;return n!==1||r!==1}function dy(e,t,n){n===void 0&&(n=!1);var r=zt(t),o=zt(t)&&uy(t),i=Wn(t),l=zr(e,o,n),a={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(r||!r&&!n)&&((en(t)!=="body"||ms(i))&&(a=cy(t)),zt(t)?(s=zr(t,!0),s.x+=t.clientLeft,s.y+=t.clientTop):i&&(s.x=vs(i))),{x:l.left+a.scrollLeft-s.x,y:l.top+a.scrollTop-s.y,width:l.width,height:l.height}}function fy(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var l=[].concat(i.requires||[],i.requiresIfExists||[]);l.forEach(function(a){if(!n.has(a)){var s=t.get(a);s&&o(s)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function py(e){var t=fy(e);return xm.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function gy(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function by(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var id={placement:"bottom",modifiers:[],strategy:"absolute"};function ad(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function vy(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,i=o===void 0?id:o;return function(a,s,c){c===void 0&&(c=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},id,i),modifiersData:{},elements:{reference:a,popper:s},attributes:{},styles:{}},d=[],v=!1,f={state:u,setOptions:function(m){var z=typeof m=="function"?m(u.options):m;p(),u.options=Object.assign({},i,u.options,z),u.scrollParents={reference:pr(a)?Uo(a):a.contextElement?Uo(a.contextElement):[],popper:Uo(s)};var E=py(by([].concat(r,u.options.modifiers)));return u.orderedModifiers=E.filter(function(Z){return Z.enabled}),g(),f.update()},forceUpdate:function(){if(!v){var m=u.elements,z=m.reference,E=m.popper;if(ad(z,E)){u.rects={reference:dy(z,Fo(E),u.options.strategy==="fixed"),popper:ps(E)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(Y){return u.modifiersData[Y.name]=Object.assign({},Y.data)});for(var Z=0;Z<u.orderedModifiers.length;Z++){if(u.reset===!0){u.reset=!1,Z=-1;continue}var J=u.orderedModifiers[Z],G=J.fn,R=J.options,W=R===void 0?{}:R,q=J.name;typeof G=="function"&&(u=G({state:u,options:W,name:q,instance:f})||u)}}}},update:gy(function(){return new Promise(function(x){f.forceUpdate(),x(u)})}),destroy:function(){p(),v=!0}};if(!ad(a,s))return f;f.setOptions(c).then(function(x){!v&&c.onFirstUpdate&&c.onFirstUpdate(x)});function g(){u.orderedModifiers.forEach(function(x){var m=x.name,z=x.options,E=z===void 0?{}:z,Z=x.effect;if(typeof Z=="function"){var J=Z({state:u,name:m,instance:f,options:E}),G=function(){};d.push(J||G)}})}function p(){d.forEach(function(x){return x()}),d=[]}return f}}var my=[Bm,oy,Em,Cm,ny,Xm,ly,Dm,_m],ld=vy({defaultModifiers:my}),Na=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Er(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function yy(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var nn=yy,hy=typeof Na=="object"&&Na&&Na.Object===Object&&Na,sd=hy,Ay=sd,wy=typeof self=="object"&&self&&self.Object===Object&&self,Iy=Ay||wy||Function("return this")(),Rt=Iy,ky=Rt,xy=function(){return ky.Date.now()},My=xy,jy=/\s/;function Cy(e){for(var t=e.length;t--&&jy.test(e.charAt(t)););return t}var Ny=Cy,Sy=Ny,Ty=/^\s+/;function Oy(e){return e&&e.slice(0,Sy(e)+1).replace(Ty,"")}var Ly=Oy,Py=Rt,Dy=Py.Symbol,hs=Dy,cd=hs,ud=Object.prototype,Qy=ud.hasOwnProperty,zy=ud.toString,Xo=cd?cd.toStringTag:void 0;function Jy(e){var t=Qy.call(e,Xo),n=e[Xo];try{e[Xo]=void 0;var r=!0}catch{}var o=zy.call(e);return r&&(t?e[Xo]=n:delete e[Xo]),o}var Ey=Jy,Gy=Object.prototype,By=Gy.toString;function Zy(e){return By.call(e)}var Hy=Zy,dd=hs,Vy=Ey,Ry=Hy,Yy="[object Null]",$y="[object Undefined]",fd=dd?dd.toStringTag:void 0;function Fy(e){return e==null?e===void 0?$y:Yy:fd&&fd in Object(e)?Vy(e):Ry(e)}var Gr=Fy;function Wy(e){return e!=null&&typeof e=="object"}var Un=Wy,Uy=Gr,Ky=Un,Xy="[object Symbol]";function qy(e){return typeof e=="symbol"||Ky(e)&&Uy(e)==Xy}var _y=qy,eh=Ly,pd=nn,th=_y,gd=NaN,nh=/^[-+]0x[0-9a-f]+$/i,rh=/^0b[01]+$/i,oh=/^0o[0-7]+$/i,ih=parseInt;function ah(e){if(typeof e=="number")return e;if(th(e))return gd;if(pd(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=pd(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=eh(e);var n=rh.test(e);return n||oh.test(e)?ih(e.slice(2),n?2:8):nh.test(e)?gd:+e}var lh=ah,sh=nn,As=My,bd=lh,ch="Expected a function",uh=Math.max,dh=Math.min;function fh(e,t,n){var r,o,i,l,a,s,c=0,u=!1,d=!1,v=!0;if(typeof e!="function")throw new TypeError(ch);t=bd(t)||0,sh(n)&&(u=!!n.leading,d="maxWait"in n,i=d?uh(bd(n.maxWait)||0,t):i,v="trailing"in n?!!n.trailing:v);function f(G){var R=r,W=o;return r=o=void 0,c=G,l=e.apply(W,R),l}function g(G){return c=G,a=setTimeout(m,t),u?f(G):l}function p(G){var R=G-s,W=G-c,q=t-R;return d?dh(q,i-W):q}function x(G){var R=G-s,W=G-c;return s===void 0||R>=t||R<0||d&&W>=i}function m(){var G=As();if(x(G))return z(G);a=setTimeout(m,p(G))}function z(G){return a=void 0,v&&r?f(G):(r=o=void 0,l)}function E(){a!==void 0&&clearTimeout(a),c=0,r=s=o=a=void 0}function Z(){return a===void 0?l:z(As())}function J(){var G=As(),R=x(G);if(r=arguments,o=this,s=G,R){if(a===void 0)return g(s);if(d)return clearTimeout(a),a=setTimeout(m,t),f(s)}return a===void 0&&(a=setTimeout(m,t)),l}return J.cancel=E,J.flush=Z,J}var vd=fh;const ph=Er(vd);var gh=vd,bh=nn,vh="Expected a function";function mh(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(vh);return bh(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),gh(e,t,{leading:r,maxWait:t,trailing:o})}var yh=mh;const md=Er(yh);/*!
12
12
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
13
13
  *
@@ -1,8 +1,8 @@
1
- var He = Object.defineProperty;
2
- var Te = (o, n, e) => n in o ? He(o, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[n] = e;
3
- var O = (o, n, e) => (Te(o, typeof n != "symbol" ? n + "" : n, e), e);
1
+ var Te = Object.defineProperty;
2
+ var He = (o, n, e) => n in o ? Te(o, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[n] = e;
3
+ var O = (o, n, e) => (He(o, typeof n != "symbol" ? n + "" : n, e), e);
4
4
  import { Popover as Re, Input as ve, Exception as Ve, clickoutside as De, bkTooltips as pe, Tag as xe, Alert as Ee, Button as Ye, Message as fe, Select as be, provideGlobalConfig as Ie } from "bkui-vue";
5
- import { inject as Ae, ref as Y, onMounted as ae, onBeforeUnmount as le, defineComponent as I, withDirectives as q, openBlock as h, createElementBlock as g, createElementVNode as u, toDisplayString as T, unref as c, createCommentVNode as S, vShow as ke, createTextVNode as te, pushScopeId as ie, popScopeId as re, computed as K, normalizeStyle as Z, normalizeClass as ee, createVNode as R, Fragment as j, watch as we, createBlock as U, withCtx as F, renderList as ce, nextTick as Le, withModifiers as E, onBeforeMount as Xe, renderSlot as qe, provide as Ke } from "vue";
5
+ import { inject as Ae, ref as Y, onMounted as ae, onBeforeUnmount as le, defineComponent as I, withDirectives as q, openBlock as h, createElementBlock as g, createElementVNode as u, toDisplayString as H, unref as c, createCommentVNode as S, vShow as ke, createTextVNode as te, pushScopeId as ie, popScopeId as re, computed as K, normalizeStyle as Z, normalizeClass as ee, createVNode as R, Fragment as j, watch as we, createBlock as U, withCtx as F, renderList as ce, nextTick as Le, withModifiers as E, onBeforeMount as Xe, renderSlot as qe, provide as Ke } from "vue";
6
6
  import se from "dayjs";
7
7
  import ye from "highlight.js";
8
8
  import Ue from "markdown-it";
@@ -45,12 +45,12 @@ function me(o) {
45
45
  const M = a.getRangeAt(0).getBoundingClientRect(), y = window.innerWidth;
46
46
  $.value = a.toString().trim();
47
47
  const z = 80, B = 34, C = 10;
48
- let H = M.left + window.scrollX + M.width / 2 - z / 2;
49
- H = Math.max(C, Math.min(H, y - z - C));
48
+ let T = M.left + window.scrollX + M.width / 2 - z / 2;
49
+ T = Math.max(C, Math.min(T, y - z - C));
50
50
  let D = M.top + window.scrollY - B - C;
51
51
  M.top > B + C || (D = M.bottom + window.scrollY + C), e.value = {
52
52
  top: `${D}px`,
53
- left: `${H}px`
53
+ left: `${T}px`
54
54
  }, n.value = !0;
55
55
  } else
56
56
  i();
@@ -135,7 +135,7 @@ const We = (o) => {
135
135
  translateShortcut: `你是受过语言翻译训练的高技能人工智能。我想让你把用三引号分隔的文本翻译(中文翻译成英文,其他语言翻译成中文),确保译文口语化、地道。
136
136
  只给我输出结果,其他内容一概不要。请勿用引号将回复包起来
137
137
  '''
138
- {{ selected_text }}
138
+ {{ SELECTED_TEXT }}
139
139
  '''`,
140
140
  explanationShortcut: "您是一位专业的解释者。请详细解释“{{ SELECTED_TEXT }}”。您的解释应包括 1) 基本含义和概念解释;2) 实际应用或使用案例;3) 如果是技术术语,请提供相关技术背景;4) 适当时提供具体示例,以帮助理解。使用清晰易懂的语言,确保非专业人员也能理解。如果该词/短语有多种含义,请列出主要定义。在确保信息完整性和准确性的同时,请保持答复简洁明了。"
141
141
  }, f = (o) => Oe !== "en" ? Ne[o] || o : Ze[o] || o, Fe = [
@@ -162,14 +162,14 @@ const We = (o) => {
162
162
  u(
163
163
  "span",
164
164
  $e,
165
- T(n.text),
165
+ H(n.text),
166
166
  1
167
167
  /* TEXT */
168
168
  ),
169
169
  u(
170
170
  "span",
171
171
  et,
172
- T(c(f)("您选择的文本内容")),
172
+ H(c(f)("您选择的文本内容")),
173
173
  1
174
174
  /* TEXT */
175
175
  ),
@@ -208,7 +208,7 @@ const We = (o) => {
208
208
  }, [
209
209
  nt,
210
210
  te(
211
- " " + T(c(f)("返回最新")),
211
+ " " + H(c(f)("返回最新")),
212
212
  1
213
213
  /* TEXT */
214
214
  )
@@ -340,7 +340,7 @@ const rt = /* @__PURE__ */ I({
340
340
  i.value ? (h(), g(
341
341
  "span",
342
342
  ht,
343
- T(i.value),
343
+ H(i.value),
344
344
  1
345
345
  /* TEXT */
346
346
  )) : S("v-if", !0),
@@ -364,7 +364,7 @@ const rt = /* @__PURE__ */ I({
364
364
  i.value ? (h(), g(
365
365
  "span",
366
366
  bt,
367
- T(i.value),
367
+ H(i.value),
368
368
  1
369
369
  /* TEXT */
370
370
  )) : S("v-if", !0),
@@ -382,7 +382,7 @@ const rt = /* @__PURE__ */ I({
382
382
  t.message.status === c(ne).Error ? (h(), g(
383
383
  "span",
384
384
  Lt,
385
- T(t.message.content),
385
+ H(t.message.content),
386
386
  1
387
387
  /* TEXT */
388
388
  )) : (h(), g("span", {
@@ -404,7 +404,7 @@ const rt = /* @__PURE__ */ I({
404
404
  /* CLASS */
405
405
  ));
406
406
  }
407
- }), zt = { class: "prompt-list" }, Ct = { class: "search-group" }, Pt = ["onClick"], Bt = { class: "prompt-content" }, Ht = /* @__PURE__ */ I({
407
+ }), zt = { class: "prompt-list" }, Ct = { class: "search-group" }, Pt = ["onClick"], Bt = { class: "prompt-content" }, Tt = /* @__PURE__ */ I({
408
408
  __name: "render-send",
409
409
  props: {
410
410
  prompts: {},
@@ -419,7 +419,7 @@ const rt = /* @__PURE__ */ I({
419
419
  }), C = K(() => {
420
420
  var v;
421
421
  return e.placeholder ? e.placeholder : (v = e.prompts) != null && v.length ? f("您可以键入 “/” 查看更多Prompt") : f("请输入");
422
- }), H = (v) => {
422
+ }), T = (v) => {
423
423
  s("update:value", v), s("change-prompt", v);
424
424
  }, D = () => {
425
425
  var v;
@@ -435,7 +435,7 @@ const rt = /* @__PURE__ */ I({
435
435
  }, Q = (v, L) => {
436
436
  L.key === "Enter" && !L.shiftKey && (L.preventDefault(), s("enter"));
437
437
  }, W = () => {
438
- H("");
438
+ T("");
439
439
  }, N = () => {
440
440
  var L;
441
441
  const v = (L = y.value) == null ? void 0 : L.$el.querySelector("textarea");
@@ -487,7 +487,7 @@ const rt = /* @__PURE__ */ I({
487
487
  u(
488
488
  "span",
489
489
  Bt,
490
- T(G.content),
490
+ H(G.content),
491
491
  1
492
492
  /* TEXT */
493
493
  )
@@ -538,7 +538,7 @@ const rt = /* @__PURE__ */ I({
538
538
  row: "1",
539
539
  type: "textarea",
540
540
  onFocus: d,
541
- onInput: H,
541
+ onInput: T,
542
542
  onKeydown: Q
543
543
  }, null, 8, ["model-value", "placeholder"]),
544
544
  v.value ? (h(), U(c(je), {
@@ -555,7 +555,7 @@ const rt = /* @__PURE__ */ I({
555
555
  /* STABLE */
556
556
  }, 8, ["is-show"]));
557
557
  }
558
- }), Tt = /* @__PURE__ */ A(Ht, [["__scopeId", "data-v-dd1d94cb"]]), Rt = { class: "ai-shortcuts" }, Vt = /* @__PURE__ */ I({
558
+ }), Ht = /* @__PURE__ */ A(Tt, [["__scopeId", "data-v-dd1d94cb"]]), Rt = { class: "ai-shortcuts" }, Vt = /* @__PURE__ */ I({
559
559
  __name: "render-shortcuts",
560
560
  props: {
561
561
  shortcuts: {}
@@ -577,7 +577,7 @@ const rt = /* @__PURE__ */ I({
577
577
  }, {
578
578
  default: F(() => [
579
579
  te(
580
- T(t.label),
580
+ H(t.label),
581
581
  1
582
582
  /* TEXT */
583
583
  )
@@ -620,7 +620,7 @@ const rt = /* @__PURE__ */ I({
620
620
  }, [
621
621
  Et,
622
622
  te(
623
- " " + T(c(f)("终止生成")),
623
+ " " + H(c(f)("终止生成")),
624
624
  1
625
625
  /* TEXT */
626
626
  )
@@ -654,7 +654,7 @@ const rt = /* @__PURE__ */ I({
654
654
  u(
655
655
  "span",
656
656
  Xt,
657
- T(e.value),
657
+ H(e.value),
658
658
  1
659
659
  /* TEXT */
660
660
  )
@@ -718,7 +718,7 @@ const rt = /* @__PURE__ */ I({
718
718
  }
719
719
  }, C = (d) => {
720
720
  l("choose-prompt", d);
721
- }, H = (d) => {
721
+ }, T = (d) => {
722
722
  l("change-prompt", d);
723
723
  }, D = () => {
724
724
  l("stop");
@@ -847,7 +847,7 @@ const rt = /* @__PURE__ */ I({
847
847
  u(
848
848
  "span",
849
849
  Jt,
850
- T(c(f)("想对选中的文本做什么")),
850
+ H(c(f)("想对选中的文本做什么")),
851
851
  1
852
852
  /* TEXT */
853
853
  ),
@@ -860,12 +860,12 @@ const rt = /* @__PURE__ */ I({
860
860
  /* CLASS, NEED_HYDRATION */
861
861
  )) : S("v-if", !0),
862
862
  u("section", Ot, [
863
- R(Tt, {
863
+ R(Ht, {
864
864
  value: m.value,
865
865
  "onUpdate:value": b[3] || (b[3] = (k) => m.value = k),
866
866
  placeholder: d.placeholder,
867
867
  prompts: d.prompts,
868
- onChangePrompt: H,
868
+ onChangePrompt: T,
869
869
  onChoosePrompt: C,
870
870
  onEnter: B
871
871
  }, null, 8, ["value", "placeholder", "prompts"]),
@@ -879,7 +879,7 @@ const rt = /* @__PURE__ */ I({
879
879
  default: F(() => [
880
880
  Zt,
881
881
  te(
882
- " " + T(c(f)("发送")),
882
+ " " + H(c(f)("发送")),
883
883
  1
884
884
  /* TEXT */
885
885
  )
@@ -958,7 +958,7 @@ const rt = /* @__PURE__ */ I({
958
958
  y(), t.isMove = !0, t.type = "move", t.clientX = r.clientX, t.clientY = r.clientY;
959
959
  }, C = (r) => {
960
960
  y(), t.isMove = !0, t.type = "rightDrag", t.clientX = r.clientX;
961
- }, H = (r) => {
961
+ }, T = (r) => {
962
962
  y(), t.isMove = !0, t.type = "leftDrag", t.clientX = r.clientX;
963
963
  }, D = (r) => {
964
964
  y(), t.isMove = !0, t.type = "topDrag", t.clientY = r.clientY;
@@ -1038,7 +1038,7 @@ const rt = /* @__PURE__ */ I({
1038
1038
  /* CLASS */
1039
1039
  ),
1040
1040
  te(
1041
- " " + T(r.name || c(f)("小鲸")) + " ",
1041
+ " " + H(r.name || c(f)("小鲸")) + " ",
1042
1042
  1
1043
1043
  /* TEXT */
1044
1044
  ),
@@ -1138,7 +1138,7 @@ const rt = /* @__PURE__ */ I({
1138
1138
  "span",
1139
1139
  {
1140
1140
  class: "drag-line left",
1141
- onMousedown: E(H, ["stop"])
1141
+ onMousedown: E(T, ["stop"])
1142
1142
  },
1143
1143
  null,
1144
1144
  32
@@ -1250,7 +1250,7 @@ const rt = /* @__PURE__ */ I({
1250
1250
  u(
1251
1251
  "span",
1252
1252
  no,
1253
- T(c(f)("问小鲸")),
1253
+ H(c(f)("问小鲸")),
1254
1254
  1
1255
1255
  /* TEXT */
1256
1256
  )
@@ -1306,7 +1306,7 @@ const rt = /* @__PURE__ */ I({
1306
1306
  l("scroll-load");
1307
1307
  }, C = (p) => {
1308
1308
  l("ai-click", p);
1309
- }, H = (p) => {
1309
+ }, T = (p) => {
1310
1310
  l("choose-prompt", p);
1311
1311
  }, D = (p) => {
1312
1312
  l("change-prompt", p);
@@ -1346,7 +1346,7 @@ const rt = /* @__PURE__ */ I({
1346
1346
  "user-photo": p.userPhoto,
1347
1347
  onAiClick: C,
1348
1348
  onChangePrompt: D,
1349
- onChoosePrompt: H,
1349
+ onChoosePrompt: T,
1350
1350
  onScrollLoad: B,
1351
1351
  onSend: y,
1352
1352
  onStop: z
@@ -1434,7 +1434,7 @@ class fo {
1434
1434
  `).forEach((y) => {
1435
1435
  const z = y.replace("data:", "").trim();
1436
1436
  if (Ge(z)) {
1437
- const { event: B, content: C, cover: H, documents: D, result: p, code: x, message: Q } = JSON.parse(z);
1437
+ const { event: B, content: C, cover: T, documents: D, result: p, code: x, message: Q } = JSON.parse(z);
1438
1438
  if (p === !1 || i.status !== 200) {
1439
1439
  this.handleError(Q, x, e);
1440
1440
  return;
@@ -1448,7 +1448,7 @@ class fo {
1448
1448
  this.handleReceiveMessage(W, e);
1449
1449
  break;
1450
1450
  case "done":
1451
- this.handleEnd(e, H ? C : "");
1451
+ this.handleEnd(e, T ? C : "");
1452
1452
  break;
1453
1453
  case "error":
1454
1454
  this.handleError(Q, x, e);