1161 lines
235 KiB
JavaScript
1161 lines
235 KiB
JavaScript
import{r as L,w as Se,o as Ue,a as et,i as Ma,c as D,b as La,h as Ea,d as lo,e as Pe,f as Aa,g as Re,j as Ve,k as ie,m as Er,l as Ar,p as er,u as Ae,n as K,q as ke,s as Dr,t as Da,v as mt,x as dn,C as Fa,y as Na,z as J,A as Fr,B as u,D as Nr,L as so,E as Gt,F as tr,G as rr,H as Ha,I as ja,J as Hr,K as Wa,M as Je,N as uo,O as jr,P as Wr,Q as yt,R as co,S as kr,T as un,U as Ua,V as cn,W as fn,X as qt,Y as Va,Z as hn,_ as Ka,$ as qa,a0 as Ga,a1 as Xa,a2 as Ya,a3 as Za,a4 as Ja,a5 as fo,a6 as Ke,a7 as Be,a8 as k,a9 as E,aa as j,ab as _e,ac as ne,ad as He,ae as fe,af as oe,ag as Te,ah as U,ai as Qa,aj as lt,ak as zt,al as pn,am as ho,an as vn,ao as gn,ap as el,aq as _t,ar as Ye,as as Ne,at as po,au as mn,av as tl,aw as pe,ax as vo,ay as ce,az as te,aA as Ot,aB as rl,aC as bn,aD as go,aE as mo,aF as bo,aG as pt,aH as nl,aI as ol,aJ as il,aK as yo,aL as al,aM as ll,aN as sl,aO as Ur,aP as Bt,aQ as $t,aR as dl,aS as Vr,aT as Xt,aU as wo,aV as ul,aW as cl,aX as yn,aY as fl,aZ as wn,a_ as hl,a$ as $r,b0 as pl,b1 as vl,b2 as wt,b3 as gl,b4 as xo,b5 as Co,b6 as So,b7 as Po,b8 as ko,b9 as ge,ba as xn,bb as ml,bc as bl,bd as he,be as Le,bf as Qe,bg as Ee,bh as Z,bi as $e,bj as G,bk as yl,bl as H,bm as vt,bn as Mt,bo as wl,bp as $o,bq as xl,br as Cn,bs as Cl,bt as Yt,bu as Kr,bv as Sl,bw as Pl}from"./index-f360c8c0.js";let Zt=[];const zo=new WeakMap;function kl(){Zt.forEach(e=>e(...zo.get(e))),Zt=[]}function Io(e,...t){zo.set(e,t),!Zt.includes(e)&&Zt.push(e)===1&&requestAnimationFrame(kl)}function Sn(e,t){let{target:r}=e;for(;r;){if(r.dataset&&r.dataset[t]!==void 0)return!0;r=r.parentElement}return!1}function $l(e,t="default",r=[]){const o=e.$slots[t];return o===void 0?r:o()}function zl(e){return t=>{t?e.value=t.$el:e.value=null}}const Il=/^(\d|\.)+$/,Pn=/(\d|\.)+/;function We(e,{c:t=1,offset:r=0,attachPx:n=!0}={}){if(typeof e=="number"){const o=(e+r)*t;return o===0?"0":`${o}px`}else if(typeof e=="string")if(Il.test(e)){const o=(Number(e)+r)*t;return n?o===0?"0":`${o}px`:`${o}`}else{const o=Pn.exec(e);return o?e.replace(Pn,String((Number(o[0])+r)*t)):e}return e}let cr;function Tl(){return cr===void 0&&(cr=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),cr}function Rl(e,t,r){if(!t)return e;const n=L(e.value);let o=null;return Se(e,i=>{o!==null&&window.clearTimeout(o),i===!0?r&&!r.value?n.value=!0:o=window.setTimeout(()=>{n.value=!0},t):n.value=!1}),n}let gt,It;const _l=()=>{var e,t;gt=Ma?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,It=!1,gt!==void 0?gt.then(()=>{It=!0}):It=!0};_l();function Ol(e){if(It)return;let t=!1;Ue(()=>{It||gt==null||gt.then(()=>{t||e()})}),et(()=>{t=!0})}function nr(e,t){return Se(e,r=>{r!==void 0&&(t.value=r)}),D(()=>e.value===void 0?t.value:e.value)}function Bl(e,t){return D(()=>{for(const r of t)if(e[r]!==void 0)return e[r];return e[t[t.length-1]]})}function Ml(e={},t){const r=La({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:n,keyup:o}=e,i=a=>{switch(a.key){case"Control":r.ctrl=!0;break;case"Meta":r.command=!0,r.win=!0;break;case"Shift":r.shift=!0;break;case"Tab":r.tab=!0;break}n!==void 0&&Object.keys(n).forEach(s=>{if(s!==a.key)return;const c=n[s];if(typeof c=="function")c(a);else{const{stop:f=!1,prevent:h=!1}=c;f&&a.stopPropagation(),h&&a.preventDefault(),c.handler(a)}})},l=a=>{switch(a.key){case"Control":r.ctrl=!1;break;case"Meta":r.command=!1,r.win=!1;break;case"Shift":r.shift=!1;break;case"Tab":r.tab=!1;break}o!==void 0&&Object.keys(o).forEach(s=>{if(s!==a.key)return;const c=o[s];if(typeof c=="function")c(a);else{const{stop:f=!1,prevent:h=!1}=c;f&&a.stopPropagation(),h&&a.preventDefault(),c.handler(a)}})},d=()=>{(t===void 0||t.value)&&(Re("keydown",document,i),Re("keyup",document,l)),t!==void 0&&Se(t,a=>{a?(Re("keydown",document,i),Re("keyup",document,l)):(Pe("keydown",document,i),Pe("keyup",document,l))})};return Ea()?(lo(d),et(()=>{(t===void 0||t.value)&&(Pe("keydown",document,i),Pe("keyup",document,l))})):d(),Aa(r)}const Ll=Ve("n-internal-select-menu-body"),To="__disabled__";function bt(e){const t=ie(Er,null),r=ie(Ar,null),n=ie(er,null),o=ie(Ll,null),i=L();if(typeof document<"u"){i.value=document.fullscreenElement;const l=()=>{i.value=document.fullscreenElement};Ue(()=>{Re("fullscreenchange",document,l)}),et(()=>{Pe("fullscreenchange",document,l)})}return Ae(()=>{var l;const{to:d}=e;return d!==void 0?d===!1?To:d===!0?i.value||"body":d:t!=null&&t.value?(l=t.value.$el)!==null&&l!==void 0?l:t.value:r!=null&&r.value?r.value:n!=null&&n.value?n.value:o!=null&&o.value?o.value:d??(i.value||"body")})}bt.tdkey=To;bt.propTo={type:[String,Object,Boolean],default:void 0};let Ze=null;function Ro(){if(Ze===null&&(Ze=document.getElementById("v-binder-view-measurer"),Ze===null)){Ze=document.createElement("div"),Ze.id="v-binder-view-measurer";const{style:e}=Ze;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(Ze)}return Ze.getBoundingClientRect()}function El(e,t){const r=Ro();return{top:t,left:e,height:0,width:0,right:r.width-e,bottom:r.height-t}}function fr(e){const t=e.getBoundingClientRect(),r=Ro();return{left:t.left-r.left,top:t.top-r.top,bottom:r.height+r.top-t.bottom,right:r.width+r.left-t.right,width:t.width,height:t.height}}function Al(e){return e.nodeType===9?null:e.parentNode}function _o(e){if(e===null)return null;const t=Al(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:r,overflowX:n,overflowY:o}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(r+o+n))return t}return _o(t)}const Dl=K({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;ke("VBinder",(t=Dr())===null||t===void 0?void 0:t.proxy);const r=ie("VBinder",null),n=L(null),o=b=>{n.value=b,r&&e.syncTargetWithParent&&r.setTargetRef(b)};let i=[];const l=()=>{let b=n.value;for(;b=_o(b),b!==null;)i.push(b);for(const S of i)Re("scroll",S,f,!0)},d=()=>{for(const b of i)Pe("scroll",b,f,!0);i=[]},a=new Set,s=b=>{a.size===0&&l(),a.has(b)||a.add(b)},c=b=>{a.has(b)&&a.delete(b),a.size===0&&d()},f=()=>{Io(h)},h=()=>{a.forEach(b=>b())},p=new Set,y=b=>{p.size===0&&Re("resize",window,x),p.has(b)||p.add(b)},C=b=>{p.has(b)&&p.delete(b),p.size===0&&Pe("resize",window,x)},x=()=>{p.forEach(b=>b())};return et(()=>{Pe("resize",window,x),d()}),{targetRef:n,setTargetRef:o,addScrollListener:s,removeScrollListener:c,addResizeListener:y,removeResizeListener:C}},render(){return Da("binder",this.$slots)}}),Oo=Dl,Bo=K({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=ie("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?mt(dn("follower",this.$slots),[[t]]):dn("follower",this.$slots)}}),dt="@@mmoContext",Fl={mounted(e,{value:t}){e[dt]={handler:void 0},typeof t=="function"&&(e[dt].handler=t,Re("mousemoveoutside",e,t))},updated(e,{value:t}){const r=e[dt];typeof t=="function"?r.handler?r.handler!==t&&(Pe("mousemoveoutside",e,r.handler),r.handler=t,Re("mousemoveoutside",e,t)):(e[dt].handler=t,Re("mousemoveoutside",e,t)):r.handler&&(Pe("mousemoveoutside",e,r.handler),r.handler=void 0)},unmounted(e){const{handler:t}=e[dt];t&&Pe("mousemoveoutside",e,t),e[dt].handler=void 0}},Nl=Fl,{c:Ft}=Fa(),Hl="vueuc-style",Nt={top:"bottom",bottom:"top",left:"right",right:"left"},kn={start:"end",center:"center",end:"start"},hr={top:"height",bottom:"height",left:"width",right:"width"},jl={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},Wl={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},Ul={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},$n={top:!0,bottom:!1,left:!0,right:!1},zn={top:"end",bottom:"start",left:"end",right:"start"};function Vl(e,t,r,n,o,i){if(!o||i)return{placement:e,top:0,left:0};const[l,d]=e.split("-");let a=d??"center",s={top:0,left:0};const c=(p,y,C)=>{let x=0,b=0;const S=r[p]-t[y]-t[p];return S>0&&n&&(C?b=$n[y]?S:-S:x=$n[y]?S:-S),{left:x,top:b}},f=l==="left"||l==="right";if(a!=="center"){const p=Ul[e],y=Nt[p],C=hr[p];if(r[C]>t[C]){if(t[p]+t[C]<r[C]){const x=(r[C]-t[C])/2;t[p]<x||t[y]<x?t[p]<t[y]?(a=kn[d],s=c(C,y,f)):s=c(C,p,f):a="center"}}else r[C]<t[C]&&t[y]<0&&t[p]>t[y]&&(a=kn[d])}else{const p=l==="bottom"||l==="top"?"left":"top",y=Nt[p],C=hr[p],x=(r[C]-t[C])/2;(t[p]<x||t[y]<x)&&(t[p]>t[y]?(a=zn[p],s=c(C,p,f)):(a=zn[y],s=c(C,y,f)))}let h=l;return t[l]<r[hr[l]]&&t[l]<t[Nt[l]]&&(h=Nt[l]),{placement:a!=="center"?`${h}-${a}`:h,left:s.left,top:s.top}}function Kl(e,t){return t?Wl[e]:jl[e]}function ql(e,t,r,n,o,i){if(i)switch(e){case"bottom-start":return{top:`${Math.round(r.top-t.top+r.height)}px`,left:`${Math.round(r.left-t.left)}px`,transform:"translateY(-100%)"};case"bottom-end":return{top:`${Math.round(r.top-t.top+r.height)}px`,left:`${Math.round(r.left-t.left+r.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top-start":return{top:`${Math.round(r.top-t.top)}px`,left:`${Math.round(r.left-t.left)}px`,transform:""};case"top-end":return{top:`${Math.round(r.top-t.top)}px`,left:`${Math.round(r.left-t.left+r.width)}px`,transform:"translateX(-100%)"};case"right-start":return{top:`${Math.round(r.top-t.top)}px`,left:`${Math.round(r.left-t.left+r.width)}px`,transform:"translateX(-100%)"};case"right-end":return{top:`${Math.round(r.top-t.top+r.height)}px`,left:`${Math.round(r.left-t.left+r.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"left-start":return{top:`${Math.round(r.top-t.top)}px`,left:`${Math.round(r.left-t.left)}px`,transform:""};case"left-end":return{top:`${Math.round(r.top-t.top+r.height)}px`,left:`${Math.round(r.left-t.left)}px`,transform:"translateY(-100%)"};case"top":return{top:`${Math.round(r.top-t.top)}px`,left:`${Math.round(r.left-t.left+r.width/2)}px`,transform:"translateX(-50%)"};case"right":return{top:`${Math.round(r.top-t.top+r.height/2)}px`,left:`${Math.round(r.left-t.left+r.width)}px`,transform:"translateX(-100%) translateY(-50%)"};case"left":return{top:`${Math.round(r.top-t.top+r.height/2)}px`,left:`${Math.round(r.left-t.left)}px`,transform:"translateY(-50%)"};case"bottom":default:return{top:`${Math.round(r.top-t.top+r.height)}px`,left:`${Math.round(r.left-t.left+r.width/2)}px`,transform:"translateX(-50%) translateY(-100%)"}}switch(e){case"bottom-start":return{top:`${Math.round(r.top-t.top+r.height+n)}px`,left:`${Math.round(r.left-t.left+o)}px`,transform:""};case"bottom-end":return{top:`${Math.round(r.top-t.top+r.height+n)}px`,left:`${Math.round(r.left-t.left+r.width+o)}px`,transform:"translateX(-100%)"};case"top-start":return{top:`${Math.round(r.top-t.top+n)}px`,left:`${Math.round(r.left-t.left+o)}px`,transform:"translateY(-100%)"};case"top-end":return{top:`${Math.round(r.top-t.top+n)}px`,left:`${Math.round(r.left-t.left+r.width+o)}px`,transform:"translateX(-100%) translateY(-100%)"};case"right-start":return{top:`${Math.round(r.top-t.top+n)}px`,left:`${Math.round(r.left-t.left+r.width+o)}px`,transform:""};case"right-end":return{top:`${Math.round(r.top-t.top+r.height+n)}px`,left:`${Math.round(r.left-t.left+r.width+o)}px`,transform:"translateY(-100%)"};case"left-start":return{top:`${Math.round(r.top-t.top+n)}px`,left:`${Math.round(r.left-t.left+o)}px`,transform:"translateX(-100%)"};case"left-end":return{top:`${Math.round(r.top-t.top+r.height+n)}px`,left:`${Math.round(r.left-t.left+o)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top":return{top:`${Math.round(r.top-t.top+n)}px`,left:`${Math.round(r.left-t.left+r.width/2+o)}px`,transform:"translateY(-100%) translateX(-50%)"};case"right":return{top:`${Math.round(r.top-t.top+r.height/2+n)}px`,left:`${Math.round(r.left-t.left+r.width+o)}px`,transform:"translateY(-50%)"};case"left":return{top:`${Math.round(r.top-t.top+r.height/2+n)}px`,left:`${Math.round(r.left-t.left+o)}px`,transform:"translateY(-50%) translateX(-100%)"};case"bottom":default:return{top:`${Math.round(r.top-t.top+r.height+n)}px`,left:`${Math.round(r.left-t.left+r.width/2+o)}px`,transform:"translateX(-50%)"}}}const Gl=Ft([Ft(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),Ft(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[Ft("> *",{pointerEvents:"all"})])]),Mo=K({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){const t=ie("VBinder"),r=Ae(()=>e.enabled!==void 0?e.enabled:e.show),n=L(null),o=L(null),i=()=>{const{syncTrigger:h}=e;h.includes("scroll")&&t.addScrollListener(a),h.includes("resize")&&t.addResizeListener(a)},l=()=>{t.removeScrollListener(a),t.removeResizeListener(a)};Ue(()=>{r.value&&(a(),i())});const d=Na();Gl.mount({id:"vueuc/binder",head:!0,anchorMetaName:Hl,ssr:d}),et(()=>{l()}),Ol(()=>{r.value&&a()});const a=()=>{if(!r.value)return;const h=n.value;if(h===null)return;const p=t.targetRef,{x:y,y:C,overlap:x}=e,b=y!==void 0&&C!==void 0?El(y,C):fr(p);h.style.setProperty("--v-target-width",`${Math.round(b.width)}px`),h.style.setProperty("--v-target-height",`${Math.round(b.height)}px`);const{width:S,minWidth:_,placement:m,internalShift:g,flip:M}=e;h.setAttribute("v-placement",m),x?h.setAttribute("v-overlap",""):h.removeAttribute("v-overlap");const{style:$}=h;S==="target"?$.width=`${b.width}px`:S!==void 0?$.width=S:$.width="",_==="target"?$.minWidth=`${b.width}px`:_!==void 0?$.minWidth=_:$.minWidth="";const A=fr(h),z=fr(o.value),{left:B,top:R,placement:O}=Vl(m,b,A,g,M,x),I=Kl(O,x),{left:w,top:P,transform:N}=ql(O,z,b,R,B,x);h.setAttribute("v-placement",O),h.style.setProperty("--v-offset-left",`${Math.round(B)}px`),h.style.setProperty("--v-offset-top",`${Math.round(R)}px`),h.style.transform=`translateX(${w}) translateY(${P}) ${N}`,h.style.setProperty("--v-transform-origin",I),h.style.transformOrigin=I};Se(r,h=>{h?(i(),s()):l()});const s=()=>{Gt().then(a).catch(h=>console.error(h))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(h=>{Se(J(e,h),a)}),["teleportDisabled"].forEach(h=>{Se(J(e,h),s)}),Se(J(e,"syncTrigger"),h=>{h.includes("resize")?t.addResizeListener(a):t.removeResizeListener(a),h.includes("scroll")?t.addScrollListener(a):t.removeScrollListener(a)});const c=Fr(),f=Ae(()=>{const{to:h}=e;if(h!==void 0)return h;c.value});return{VBinder:t,mergedEnabled:r,offsetContainerRef:o,followerRef:n,mergedTo:f,syncPosition:a}},render(){return u(so,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const r=u("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[u("div",{class:"v-binder-follower-content",ref:"followerRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))]);return this.zindexable?mt(r,[[Nr,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):r}})}});var Xl=tr(rr,"WeakMap");const zr=Xl;var Yl=Ha(Object.keys,Object);const Zl=Yl;var Jl=Object.prototype,Ql=Jl.hasOwnProperty;function es(e){if(!ja(e))return Zl(e);var t=[];for(var r in Object(e))Ql.call(e,r)&&r!="constructor"&&t.push(r);return t}function qr(e){return Hr(e)?Wa(e):es(e)}var ts=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rs=/^\w*$/;function Gr(e,t){if(Je(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||uo(e)?!0:rs.test(e)||!ts.test(e)||t!=null&&e in Object(t)}var ns="Expected a function";function Xr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ns);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var l=e.apply(this,n);return r.cache=i.set(o,l)||i,l};return r.cache=new(Xr.Cache||jr),r}Xr.Cache=jr;var os=500;function is(e){var t=Xr(e,function(n){return r.size===os&&r.clear(),n}),r=t.cache;return t}var as=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ls=/\\(\\)?/g,ss=is(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(as,function(r,n,o,i){t.push(o?i.replace(ls,"$1"):n||r)}),t});const ds=ss;function Lo(e,t){return Je(e)?e:Gr(e,t)?[e]:ds(Wr(e))}var us=1/0;function or(e){if(typeof e=="string"||uo(e))return e;var t=e+"";return t=="0"&&1/e==-us?"-0":t}function Eo(e,t){t=Lo(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[or(t[r++])];return r&&r==n?e:void 0}function cs(e,t,r){var n=e==null?void 0:Eo(e,t);return n===void 0?r:n}function fs(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function hs(e,t,r,n){var o=-1,i=e==null?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r}function ps(e){return function(t){return e==null?void 0:e[t]}}var vs={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},gs=ps(vs);const ms=gs;var bs=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ys="\\u0300-\\u036f",ws="\\ufe20-\\ufe2f",xs="\\u20d0-\\u20ff",Cs=ys+ws+xs,Ss="["+Cs+"]",Ps=RegExp(Ss,"g");function ks(e){return e=Wr(e),e&&e.replace(bs,ms).replace(Ps,"")}var $s=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function zs(e){return e.match($s)||[]}var Is=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Ts(e){return Is.test(e)}var Ao="\\ud800-\\udfff",Rs="\\u0300-\\u036f",_s="\\ufe20-\\ufe2f",Os="\\u20d0-\\u20ff",Bs=Rs+_s+Os,Do="\\u2700-\\u27bf",Fo="a-z\\xdf-\\xf6\\xf8-\\xff",Ms="\\xac\\xb1\\xd7\\xf7",Ls="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Es="\\u2000-\\u206f",As=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",No="A-Z\\xc0-\\xd6\\xd8-\\xde",Ds="\\ufe0e\\ufe0f",Ho=Ms+Ls+Es+As,jo="['’]",In="["+Ho+"]",Fs="["+Bs+"]",Wo="\\d+",Ns="["+Do+"]",Uo="["+Fo+"]",Vo="[^"+Ao+Ho+Wo+Do+Fo+No+"]",Hs="\\ud83c[\\udffb-\\udfff]",js="(?:"+Fs+"|"+Hs+")",Ws="[^"+Ao+"]",Ko="(?:\\ud83c[\\udde6-\\uddff]){2}",qo="[\\ud800-\\udbff][\\udc00-\\udfff]",ct="["+No+"]",Us="\\u200d",Tn="(?:"+Uo+"|"+Vo+")",Vs="(?:"+ct+"|"+Vo+")",Rn="(?:"+jo+"(?:d|ll|m|re|s|t|ve))?",_n="(?:"+jo+"(?:D|LL|M|RE|S|T|VE))?",Go=js+"?",Xo="["+Ds+"]?",Ks="(?:"+Us+"(?:"+[Ws,Ko,qo].join("|")+")"+Xo+Go+")*",qs="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Gs="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xs=Xo+Go+Ks,Ys="(?:"+[Ns,Ko,qo].join("|")+")"+Xs,Zs=RegExp([ct+"?"+Uo+"+"+Rn+"(?="+[In,ct,"$"].join("|")+")",Vs+"+"+_n+"(?="+[In,ct+Tn,"$"].join("|")+")",ct+"?"+Tn+"+"+Rn,ct+"+"+_n,Gs,qs,Wo,Ys].join("|"),"g");function Js(e){return e.match(Zs)||[]}function Qs(e,t,r){return e=Wr(e),t=r?void 0:t,t===void 0?Ts(e)?Js(e):zs(e):e.match(t)||[]}var ed="['’]",td=RegExp(ed,"g");function rd(e){return function(t){return hs(Qs(ks(t).replace(td,"")),e,"")}}function nd(e,t){for(var r=-1,n=e==null?0:e.length,o=0,i=[];++r<n;){var l=e[r];t(l,r,e)&&(i[o++]=l)}return i}function od(){return[]}var id=Object.prototype,ad=id.propertyIsEnumerable,On=Object.getOwnPropertySymbols,ld=On?function(e){return e==null?[]:(e=Object(e),nd(On(e),function(t){return ad.call(e,t)}))}:od;const sd=ld;function dd(e,t,r){var n=t(e);return Je(e)?n:fs(n,r(e))}function Bn(e){return dd(e,qr,sd)}var ud=tr(rr,"DataView");const Ir=ud;var cd=tr(rr,"Promise");const Tr=cd;var fd=tr(rr,"Set");const Rr=fd;var Mn="[object Map]",hd="[object Object]",Ln="[object Promise]",En="[object Set]",An="[object WeakMap]",Dn="[object DataView]",pd=yt(Ir),vd=yt(kr),gd=yt(Tr),md=yt(Rr),bd=yt(zr),it=co;(Ir&&it(new Ir(new ArrayBuffer(1)))!=Dn||kr&&it(new kr)!=Mn||Tr&&it(Tr.resolve())!=Ln||Rr&&it(new Rr)!=En||zr&&it(new zr)!=An)&&(it=function(e){var t=co(e),r=t==hd?e.constructor:void 0,n=r?yt(r):"";if(n)switch(n){case pd:return Dn;case vd:return Mn;case gd:return Ln;case md:return En;case bd:return An}return t});const Fn=it;var yd="__lodash_hash_undefined__";function wd(e){return this.__data__.set(e,yd),this}function xd(e){return this.__data__.has(e)}function Jt(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new jr;++t<r;)this.add(e[t])}Jt.prototype.add=Jt.prototype.push=wd;Jt.prototype.has=xd;function Cd(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Sd(e,t){return e.has(t)}var Pd=1,kd=2;function Yo(e,t,r,n,o,i){var l=r&Pd,d=e.length,a=t.length;if(d!=a&&!(l&&a>d))return!1;var s=i.get(e),c=i.get(t);if(s&&c)return s==t&&c==e;var f=-1,h=!0,p=r&kd?new Jt:void 0;for(i.set(e,t),i.set(t,e);++f<d;){var y=e[f],C=t[f];if(n)var x=l?n(C,y,f,t,e,i):n(y,C,f,e,t,i);if(x!==void 0){if(x)continue;h=!1;break}if(p){if(!Cd(t,function(b,S){if(!Sd(p,S)&&(y===b||o(y,b,r,n,i)))return p.push(S)})){h=!1;break}}else if(!(y===C||o(y,C,r,n,i))){h=!1;break}}return i.delete(e),i.delete(t),h}function $d(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function zd(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Id=1,Td=2,Rd="[object Boolean]",_d="[object Date]",Od="[object Error]",Bd="[object Map]",Md="[object Number]",Ld="[object RegExp]",Ed="[object Set]",Ad="[object String]",Dd="[object Symbol]",Fd="[object ArrayBuffer]",Nd="[object DataView]",Nn=un?un.prototype:void 0,pr=Nn?Nn.valueOf:void 0;function Hd(e,t,r,n,o,i,l){switch(r){case Nd:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Fd:return!(e.byteLength!=t.byteLength||!i(new cn(e),new cn(t)));case Rd:case _d:case Md:return Ua(+e,+t);case Od:return e.name==t.name&&e.message==t.message;case Ld:case Ad:return e==t+"";case Bd:var d=$d;case Ed:var a=n&Id;if(d||(d=zd),e.size!=t.size&&!a)return!1;var s=l.get(e);if(s)return s==t;n|=Td,l.set(e,t);var c=Yo(d(e),d(t),n,o,i,l);return l.delete(e),c;case Dd:if(pr)return pr.call(e)==pr.call(t)}return!1}var jd=1,Wd=Object.prototype,Ud=Wd.hasOwnProperty;function Vd(e,t,r,n,o,i){var l=r&jd,d=Bn(e),a=d.length,s=Bn(t),c=s.length;if(a!=c&&!l)return!1;for(var f=a;f--;){var h=d[f];if(!(l?h in t:Ud.call(t,h)))return!1}var p=i.get(e),y=i.get(t);if(p&&y)return p==t&&y==e;var C=!0;i.set(e,t),i.set(t,e);for(var x=l;++f<a;){h=d[f];var b=e[h],S=t[h];if(n)var _=l?n(S,b,h,t,e,i):n(b,S,h,e,t,i);if(!(_===void 0?b===S||o(b,S,r,n,i):_)){C=!1;break}x||(x=h=="constructor")}if(C&&!x){var m=e.constructor,g=t.constructor;m!=g&&"constructor"in e&&"constructor"in t&&!(typeof m=="function"&&m instanceof m&&typeof g=="function"&&g instanceof g)&&(C=!1)}return i.delete(e),i.delete(t),C}var Kd=1,Hn="[object Arguments]",jn="[object Array]",Ht="[object Object]",qd=Object.prototype,Wn=qd.hasOwnProperty;function Gd(e,t,r,n,o,i){var l=Je(e),d=Je(t),a=l?jn:Fn(e),s=d?jn:Fn(t);a=a==Hn?Ht:a,s=s==Hn?Ht:s;var c=a==Ht,f=s==Ht,h=a==s;if(h&&fn(e)){if(!fn(t))return!1;l=!0,c=!1}if(h&&!c)return i||(i=new qt),l||Va(e)?Yo(e,t,r,n,o,i):Hd(e,t,a,r,n,o,i);if(!(r&Kd)){var p=c&&Wn.call(e,"__wrapped__"),y=f&&Wn.call(t,"__wrapped__");if(p||y){var C=p?e.value():e,x=y?t.value():t;return i||(i=new qt),o(C,x,r,n,i)}}return h?(i||(i=new qt),Vd(e,t,r,n,o,i)):!1}function Yr(e,t,r,n,o){return e===t?!0:e==null||t==null||!hn(e)&&!hn(t)?e!==e&&t!==t:Gd(e,t,r,n,Yr,o)}var Xd=1,Yd=2;function Zd(e,t,r,n){var o=r.length,i=o,l=!n;if(e==null)return!i;for(e=Object(e);o--;){var d=r[o];if(l&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++o<i;){d=r[o];var a=d[0],s=e[a],c=d[1];if(l&&d[2]){if(s===void 0&&!(a in e))return!1}else{var f=new qt;if(n)var h=n(s,c,a,e,t,f);if(!(h===void 0?Yr(c,s,Xd|Yd,n,f):h))return!1}}return!0}function Zo(e){return e===e&&!Ka(e)}function Jd(e){for(var t=qr(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Zo(o)]}return t}function Jo(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function Qd(e){var t=Jd(e);return t.length==1&&t[0][2]?Jo(t[0][0],t[0][1]):function(r){return r===e||Zd(r,e,t)}}function eu(e,t){return e!=null&&t in Object(e)}function tu(e,t,r){t=Lo(t,e);for(var n=-1,o=t.length,i=!1;++n<o;){var l=or(t[n]);if(!(i=e!=null&&r(e,l)))break;e=e[l]}return i||++n!=o?i:(o=e==null?0:e.length,!!o&&qa(o)&&Ga(l,o)&&(Je(e)||Xa(e)))}function ru(e,t){return e!=null&&tu(e,t,eu)}var nu=1,ou=2;function iu(e,t){return Gr(e)&&Zo(t)?Jo(or(e),t):function(r){var n=cs(r,e);return n===void 0&&n===t?ru(r,e):Yr(t,n,nu|ou)}}function au(e){return function(t){return t==null?void 0:t[e]}}function lu(e){return function(t){return Eo(t,e)}}function su(e){return Gr(e)?au(or(e)):lu(e)}function du(e){return typeof e=="function"?e:e==null?Ya:typeof e=="object"?Je(e)?iu(e[0],e[1]):Qd(e):su(e)}function uu(e,t){return e&&Za(e,t,qr)}function cu(e,t){return function(r,n){if(r==null)return r;if(!Hr(r))return e(r,n);for(var o=r.length,i=t?o:-1,l=Object(r);(t?i--:++i<o)&&n(l[i],i,l)!==!1;);return r}}var fu=cu(uu);const hu=fu;function pu(e,t){var r=-1,n=Hr(e)?Array(e.length):[];return hu(e,function(o,i,l){n[++r]=t(o,i,l)}),n}function vu(e,t){var r=Je(e)?Ja:pu;return r(e,du(t))}var gu=rd(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()});const mu=gu,bu={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}},yu=bu;function vr(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}function Pt(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",o;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,l=r!=null&&r.width?String(r.width):i;o=e.formattingValues[l]||e.formattingValues[i]}else{var d=e.defaultWidth,a=r!=null&&r.width?String(r.width):e.defaultWidth;o=e.values[a]||e.values[d]}var s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}function kt(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var l=i[0],d=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],a=Array.isArray(d)?xu(d,function(f){return f.test(l)}):wu(d,function(f){return f.test(l)}),s;s=e.valueCallback?e.valueCallback(a):a,s=r.valueCallback?r.valueCallback(s):s;var c=t.slice(l.length);return{value:s,rest:c}}}function wu(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function xu(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function Cu(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var o=n[0],i=t.match(e.parsePattern);if(!i)return null;var l=e.valueCallback?e.valueCallback(i[0]):i[0];l=r.valueCallback?r.valueCallback(l):l;var d=t.slice(o.length);return{value:l,rest:d}}}var Su={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Pu=function(t,r,n){var o,i=Su[t];return typeof i=="string"?o=i:r===1?o=i.one:o=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+o:o+" ago":o};const ku=Pu;var $u={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zu={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Iu={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Tu={date:vr({formats:$u,defaultWidth:"full"}),time:vr({formats:zu,defaultWidth:"full"}),dateTime:vr({formats:Iu,defaultWidth:"full"})};const Ru=Tu;var _u={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ou=function(t,r,n,o){return _u[t]};const Bu=Ou;var Mu={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Lu={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Eu={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Au={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Du={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Fu={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Nu=function(t,r){var n=Number(t),o=n%100;if(o>20||o<10)switch(o%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Hu={ordinalNumber:Nu,era:Pt({values:Mu,defaultWidth:"wide"}),quarter:Pt({values:Lu,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Pt({values:Eu,defaultWidth:"wide"}),day:Pt({values:Au,defaultWidth:"wide"}),dayPeriod:Pt({values:Du,defaultWidth:"wide",formattingValues:Fu,defaultFormattingWidth:"wide"})};const ju=Hu;var Wu=/^(\d+)(th|st|nd|rd)?/i,Uu=/\d+/i,Vu={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ku={any:[/^b/i,/^(a|c)/i]},qu={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Gu={any:[/1/i,/2/i,/3/i,/4/i]},Xu={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Yu={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Zu={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ju={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Qu={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ec={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},tc={ordinalNumber:Cu({matchPattern:Wu,parsePattern:Uu,valueCallback:function(t){return parseInt(t,10)}}),era:kt({matchPatterns:Vu,defaultMatchWidth:"wide",parsePatterns:Ku,defaultParseWidth:"any"}),quarter:kt({matchPatterns:qu,defaultMatchWidth:"wide",parsePatterns:Gu,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:kt({matchPatterns:Xu,defaultMatchWidth:"wide",parsePatterns:Yu,defaultParseWidth:"any"}),day:kt({matchPatterns:Zu,defaultMatchWidth:"wide",parsePatterns:Ju,defaultParseWidth:"any"}),dayPeriod:kt({matchPatterns:Qu,defaultMatchWidth:"any",parsePatterns:ec,defaultParseWidth:"any"})};const rc=tc;var nc={code:"en-US",formatDistance:ku,formatLong:Ru,formatRelative:Bu,localize:ju,match:rc,options:{weekStartsOn:0,firstWeekContainsDate:1}};const oc=nc,ic={name:"en-US",locale:oc},ac=ic;function Zr(e){const{mergedLocaleRef:t,mergedDateLocaleRef:r}=ie(fo,null)||{},n=D(()=>{var i,l;return(l=(i=t==null?void 0:t.value)===null||i===void 0?void 0:i[e])!==null&&l!==void 0?l:yu[e]});return{dateLocaleRef:D(()=>{var i;return(i=r==null?void 0:r.value)!==null&&i!==void 0?i:ac}),localeRef:n}}const lc=K({name:"Add",render(){return u("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}}),sc=Ke("attach",u("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},u("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},u("g",{fill:"currentColor","fill-rule":"nonzero"},u("path",{d:"M3.25735931,8.70710678 L7.85355339,4.1109127 C8.82986412,3.13460197 10.4127766,3.13460197 11.3890873,4.1109127 C12.365398,5.08722343 12.365398,6.67013588 11.3890873,7.64644661 L6.08578644,12.9497475 C5.69526215,13.3402718 5.06209717,13.3402718 4.67157288,12.9497475 C4.28104858,12.5592232 4.28104858,11.9260582 4.67157288,11.5355339 L9.97487373,6.23223305 C10.1701359,6.0369709 10.1701359,5.72038841 9.97487373,5.52512627 C9.77961159,5.32986412 9.4630291,5.32986412 9.26776695,5.52512627 L3.96446609,10.8284271 C3.18341751,11.6094757 3.18341751,12.8758057 3.96446609,13.6568542 C4.74551468,14.4379028 6.01184464,14.4379028 6.79289322,13.6568542 L12.0961941,8.35355339 C13.4630291,6.98671837 13.4630291,4.77064094 12.0961941,3.40380592 C10.7293591,2.0369709 8.51328163,2.0369709 7.14644661,3.40380592 L2.55025253,8 C2.35499039,8.19526215 2.35499039,8.51184464 2.55025253,8.70710678 C2.74551468,8.90236893 3.06209717,8.90236893 3.25735931,8.70710678 Z"}))))),dc=K({name:"ChevronRight",render(){return u("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M5.64645 3.14645C5.45118 3.34171 5.45118 3.65829 5.64645 3.85355L9.79289 8L5.64645 12.1464C5.45118 12.3417 5.45118 12.6583 5.64645 12.8536C5.84171 13.0488 6.15829 13.0488 6.35355 12.8536L10.8536 8.35355C11.0488 8.15829 11.0488 7.84171 10.8536 7.64645L6.35355 3.14645C6.15829 2.95118 5.84171 2.95118 5.64645 3.14645Z",fill:"currentColor"}))}}),Qo=K({name:"Eye",render(){return u("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},u("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),u("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),uc=K({name:"EyeOff",render(){return u("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},u("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),u("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),u("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),u("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),u("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),cc=Ke("trash",u("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},u("path",{d:"M432,144,403.33,419.74A32,32,0,0,1,371.55,448H140.46a32,32,0,0,1-31.78-28.26L80,144",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),u("rect",{x:"32",y:"64",width:"448",height:"80",rx:"16",ry:"16",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),u("line",{x1:"312",y1:"240",x2:"200",y2:"352",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),u("line",{x1:"312",y1:"352",x2:"200",y2:"240",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}))),fc=Ke("download",u("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},u("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},u("g",{fill:"currentColor","fill-rule":"nonzero"},u("path",{d:"M3.5,13 L12.5,13 C12.7761424,13 13,13.2238576 13,13.5 C13,13.7454599 12.8231248,13.9496084 12.5898756,13.9919443 L12.5,14 L3.5,14 C3.22385763,14 3,13.7761424 3,13.5 C3,13.2545401 3.17687516,13.0503916 3.41012437,13.0080557 L3.5,13 L12.5,13 L3.5,13 Z M7.91012437,1.00805567 L8,1 C8.24545989,1 8.44960837,1.17687516 8.49194433,1.41012437 L8.5,1.5 L8.5,10.292 L11.1819805,7.6109127 C11.3555469,7.43734635 11.6249713,7.4180612 11.8198394,7.55305725 L11.8890873,7.6109127 C12.0626536,7.78447906 12.0819388,8.05390346 11.9469427,8.2487716 L11.8890873,8.31801948 L8.35355339,11.8535534 C8.17998704,12.0271197 7.91056264,12.0464049 7.7156945,11.9114088 L7.64644661,11.8535534 L4.1109127,8.31801948 C3.91565056,8.12275734 3.91565056,7.80617485 4.1109127,7.6109127 C4.28447906,7.43734635 4.55390346,7.4180612 4.7487716,7.55305725 L4.81801948,7.6109127 L7.5,10.292 L7.5,1.5 C7.5,1.25454011 7.67687516,1.05039163 7.91012437,1.00805567 L8,1 L7.91012437,1.00805567 Z"}))))),hc=K({name:"Empty",render(){return u("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),u("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),pc=Ke("cancel",u("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},u("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},u("g",{fill:"currentColor","fill-rule":"nonzero"},u("path",{d:"M2.58859116,2.7156945 L2.64644661,2.64644661 C2.82001296,2.47288026 3.08943736,2.45359511 3.2843055,2.58859116 L3.35355339,2.64644661 L8,7.293 L12.6464466,2.64644661 C12.8417088,2.45118446 13.1582912,2.45118446 13.3535534,2.64644661 C13.5488155,2.84170876 13.5488155,3.15829124 13.3535534,3.35355339 L8.707,8 L13.3535534,12.6464466 C13.5271197,12.820013 13.5464049,13.0894374 13.4114088,13.2843055 L13.3535534,13.3535534 C13.179987,13.5271197 12.9105626,13.5464049 12.7156945,13.4114088 L12.6464466,13.3535534 L8,8.707 L3.35355339,13.3535534 C3.15829124,13.5488155 2.84170876,13.5488155 2.64644661,13.3535534 C2.45118446,13.1582912 2.45118446,12.8417088 2.64644661,12.6464466 L7.293,8 L2.64644661,3.35355339 C2.47288026,3.17998704 2.45359511,2.91056264 2.58859116,2.7156945 L2.64644661,2.64644661 L2.58859116,2.7156945 Z"}))))),vc=K({name:"ChevronDown",render(){return u("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z",fill:"currentColor"}))}}),gc=Ke("clear",u("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},u("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},u("g",{fill:"currentColor","fill-rule":"nonzero"},u("path",{d:"M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z"}))))),mc=Ke("retry",u("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},u("path",{d:"M320,146s24.36-12-64-12A160,160,0,1,0,416,294",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-miterlimit: 10; stroke-width: 32px;"}),u("polyline",{points:"256 58 336 138 256 218",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}))),bc=Ke("rotateClockwise",u("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 12.7916 15.3658 15.2026 13 16.3265V14.5C13 14.2239 12.7761 14 12.5 14C12.2239 14 12 14.2239 12 14.5V17.5C12 17.7761 12.2239 18 12.5 18H15.5C15.7761 18 16 17.7761 16 17.5C16 17.2239 15.7761 17 15.5 17H13.8758C16.3346 15.6357 18 13.0128 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 10.2761 2.22386 10.5 2.5 10.5C2.77614 10.5 3 10.2761 3 10Z",fill:"currentColor"}),u("path",{d:"M10 12C11.1046 12 12 11.1046 12 10C12 8.89543 11.1046 8 10 8C8.89543 8 8 8.89543 8 10C8 11.1046 8.89543 12 10 12ZM10 11C9.44772 11 9 10.5523 9 10C9 9.44772 9.44772 9 10 9C10.5523 9 11 9.44772 11 10C11 10.5523 10.5523 11 10 11Z",fill:"currentColor"}))),yc=Ke("rotateClockwise",u("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M17 10C17 6.13401 13.866 3 10 3C6.13401 3 3 6.13401 3 10C3 12.7916 4.63419 15.2026 7 16.3265V14.5C7 14.2239 7.22386 14 7.5 14C7.77614 14 8 14.2239 8 14.5V17.5C8 17.7761 7.77614 18 7.5 18H4.5C4.22386 18 4 17.7761 4 17.5C4 17.2239 4.22386 17 4.5 17H6.12422C3.66539 15.6357 2 13.0128 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10C18 10.2761 17.7761 10.5 17.5 10.5C17.2239 10.5 17 10.2761 17 10Z",fill:"currentColor"}),u("path",{d:"M10 12C8.89543 12 8 11.1046 8 10C8 8.89543 8.89543 8 10 8C11.1046 8 12 8.89543 12 10C12 11.1046 11.1046 12 10 12ZM10 11C10.5523 11 11 10.5523 11 10C11 9.44772 10.5523 9 10 9C9.44772 9 9 9.44772 9 10C9 10.5523 9.44772 11 10 11Z",fill:"currentColor"}))),wc=Ke("zoomIn",u("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5Z",fill:"currentColor"}),u("path",{d:"M8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z",fill:"currentColor"}))),xc=Ke("zoomOut",u("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11Z",fill:"currentColor"}),u("path",{d:"M14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z",fill:"currentColor"}))),Cc=K({name:"ResizeSmall",render(){return u("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},u("g",{fill:"none"},u("path",{d:"M5.5 4A1.5 1.5 0 0 0 4 5.5v1a.5.5 0 0 1-1 0v-1A2.5 2.5 0 0 1 5.5 3h1a.5.5 0 0 1 0 1h-1zM16 5.5A1.5 1.5 0 0 0 14.5 4h-1a.5.5 0 0 1 0-1h1A2.5 2.5 0 0 1 17 5.5v1a.5.5 0 0 1-1 0v-1zm0 9a1.5 1.5 0 0 1-1.5 1.5h-1a.5.5 0 0 0 0 1h1a2.5 2.5 0 0 0 2.5-2.5v-1a.5.5 0 0 0-1 0v1zm-12 0A1.5 1.5 0 0 0 5.5 16h1.25a.5.5 0 0 1 0 1H5.5A2.5 2.5 0 0 1 3 14.5v-1.25a.5.5 0 0 1 1 0v1.25zM8.5 7A1.5 1.5 0 0 0 7 8.5v3A1.5 1.5 0 0 0 8.5 13h3a1.5 1.5 0 0 0 1.5-1.5v-3A1.5 1.5 0 0 0 11.5 7h-3zM8 8.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-3z",fill:"currentColor"})))}});function Un(e){return Array.isArray(e)?e:[e]}const _r={STOP:"STOP"};function ei(e,t){const r=t(e);e.children!==void 0&&r!==_r.STOP&&e.children.forEach(n=>ei(n,t))}function Sc(e,t={}){const{preserveGroup:r=!1}=t,n=[],o=r?l=>{l.isLeaf||(n.push(l.key),i(l.children))}:l=>{l.isLeaf||(l.isGroup||n.push(l.key),i(l.children))};function i(l){l.forEach(o)}return i(e),n}function Pc(e,t){const{isLeaf:r}=e;return r!==void 0?r:!t(e)}function kc(e){return e.children}function $c(e){return e.key}function zc(){return!1}function Ic(e,t){const{isLeaf:r}=e;return!(r===!1&&!Array.isArray(t(e)))}function Tc(e){return e.disabled===!0}function Rc(e,t){return e.isLeaf===!1&&!Array.isArray(t(e))}function gr(e){var t;return e==null?[]:Array.isArray(e)?e:(t=e.checkedKeys)!==null&&t!==void 0?t:[]}function mr(e){var t;return e==null||Array.isArray(e)?[]:(t=e.indeterminateKeys)!==null&&t!==void 0?t:[]}function _c(e,t){const r=new Set(e);return t.forEach(n=>{r.has(n)||r.add(n)}),Array.from(r)}function Oc(e,t){const r=new Set(e);return t.forEach(n=>{r.has(n)&&r.delete(n)}),Array.from(r)}function Bc(e){return(e==null?void 0:e.type)==="group"}class Mc extends Error{constructor(){super(),this.message="SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded."}}function Lc(e,t,r,n){return Qt(t.concat(e),r,n,!1)}function Ec(e,t){const r=new Set;return e.forEach(n=>{const o=t.treeNodeMap.get(n);if(o!==void 0){let i=o.parent;for(;i!==null&&!(i.disabled||r.has(i.key));)r.add(i.key),i=i.parent}}),r}function Ac(e,t,r,n){const o=Qt(t,r,n,!1),i=Qt(e,r,n,!0),l=Ec(e,r),d=[];return o.forEach(a=>{(i.has(a)||l.has(a))&&d.push(a)}),d.forEach(a=>o.delete(a)),o}function br(e,t){const{checkedKeys:r,keysToCheck:n,keysToUncheck:o,indeterminateKeys:i,cascade:l,leafOnly:d,checkStrategy:a,allowNotLoaded:s}=e;if(!l)return n!==void 0?{checkedKeys:_c(r,n),indeterminateKeys:Array.from(i)}:o!==void 0?{checkedKeys:Oc(r,o),indeterminateKeys:Array.from(i)}:{checkedKeys:Array.from(r),indeterminateKeys:Array.from(i)};const{levelTreeNodeMap:c}=t;let f;o!==void 0?f=Ac(o,r,t,s):n!==void 0?f=Lc(n,r,t,s):f=Qt(r,t,s,!1);const h=a==="parent",p=a==="child"||d,y=f,C=new Set,x=Math.max.apply(null,Array.from(c.keys()));for(let b=x;b>=0;b-=1){const S=b===0,_=c.get(b);for(const m of _){if(m.isLeaf)continue;const{key:g,shallowLoaded:M}=m;if(p&&M&&m.children.forEach(B=>{!B.disabled&&!B.isLeaf&&B.shallowLoaded&&y.has(B.key)&&y.delete(B.key)}),m.disabled||!M)continue;let $=!0,A=!1,z=!0;for(const B of m.children){const R=B.key;if(!B.disabled){if(z&&(z=!1),y.has(R))A=!0;else if(C.has(R)){A=!0,$=!1;break}else if($=!1,A)break}}$&&!z?(h&&m.children.forEach(B=>{!B.disabled&&y.has(B.key)&&y.delete(B.key)}),y.add(g)):A&&C.add(g),S&&p&&y.has(g)&&y.delete(g)}}return{checkedKeys:Array.from(y),indeterminateKeys:Array.from(C)}}function Qt(e,t,r,n){const{treeNodeMap:o,getChildren:i}=t,l=new Set,d=new Set(e);return e.forEach(a=>{const s=o.get(a);s!==void 0&&ei(s,c=>{if(c.disabled)return _r.STOP;const{key:f}=c;if(!l.has(f)&&(l.add(f),d.add(f),Rc(c.rawNode,i))){if(n)return _r.STOP;if(!r)throw new Mc}})}),d}function Dc(e,{includeGroup:t=!1,includeSelf:r=!0},n){var o;const i=n.treeNodeMap;let l=e==null?null:(o=i.get(e))!==null&&o!==void 0?o:null;const d={keyPath:[],treeNodePath:[],treeNode:l};if(l!=null&&l.ignored)return d.treeNode=null,d;for(;l;)!l.ignored&&(t||!l.isGroup)&&d.treeNodePath.push(l),l=l.parent;return d.treeNodePath.reverse(),r||d.treeNodePath.pop(),d.keyPath=d.treeNodePath.map(a=>a.key),d}function Fc(e){if(e.length===0)return null;const t=e[0];return t.isGroup||t.ignored||t.disabled?t.getNext():t}function Nc(e,t){const r=e.siblings,n=r.length,{index:o}=e;return t?r[(o+1)%n]:o===r.length-1?null:r[o+1]}function Vn(e,t,{loop:r=!1,includeDisabled:n=!1}={}){const o=t==="prev"?Hc:Nc,i={reverse:t==="prev"};let l=!1,d=null;function a(s){if(s!==null){if(s===e){if(!l)l=!0;else if(!e.disabled&&!e.isGroup){d=e;return}}else if((!s.disabled||n)&&!s.ignored&&!s.isGroup){d=s;return}if(s.isGroup){const c=Jr(s,i);c!==null?d=c:a(o(s,r))}else{const c=o(s,!1);if(c!==null)a(c);else{const f=jc(s);f!=null&&f.isGroup?a(o(f,r)):r&&a(o(s,!0))}}}}return a(e),d}function Hc(e,t){const r=e.siblings,n=r.length,{index:o}=e;return t?r[(o-1+n)%n]:o===0?null:r[o-1]}function jc(e){return e.parent}function Jr(e,t={}){const{reverse:r=!1}=t,{children:n}=e;if(n){const{length:o}=n,i=r?o-1:0,l=r?-1:o,d=r?-1:1;for(let a=i;a!==l;a+=d){const s=n[a];if(!s.disabled&&!s.ignored)if(s.isGroup){const c=Jr(s,t);if(c!==null)return c}else return s}}return null}const Wc={getChild(){return this.ignored?null:Jr(this)},getParent(){const{parent:e}=this;return e!=null&&e.isGroup?e.getParent():e},getNext(e={}){return Vn(this,"next",e)},getPrev(e={}){return Vn(this,"prev",e)}};function Uc(e,t){const r=t?new Set(t):void 0,n=[];function o(i){i.forEach(l=>{n.push(l),!(l.isLeaf||!l.children||l.ignored)&&(l.isGroup||r===void 0||r.has(l.key))&&o(l.children)})}return o(e),n}function Vc(e,t){const r=e.key;for(;t;){if(t.key===r)return!0;t=t.parent}return!1}function ti(e,t,r,n,o,i=null,l=0){const d=[];return e.forEach((a,s)=>{var c;const f=Object.create(n);if(f.rawNode=a,f.siblings=d,f.level=l,f.index=s,f.isFirstChild=s===0,f.isLastChild=s+1===e.length,f.parent=i,!f.ignored){const h=o(a);Array.isArray(h)&&(f.children=ti(h,t,r,n,o,f,l+1))}d.push(f),t.set(f.key,f),r.has(l)||r.set(l,[]),(c=r.get(l))===null||c===void 0||c.push(f)}),d}function Kc(e,t={}){var r;const n=new Map,o=new Map,{getDisabled:i=Tc,getIgnored:l=zc,getIsGroup:d=Bc,getKey:a=$c}=t,s=(r=t.getChildren)!==null&&r!==void 0?r:kc,c=t.ignoreEmptyChildren?m=>{const g=s(m);return Array.isArray(g)?g.length?g:null:g}:s,f=Object.assign({get key(){return a(this.rawNode)},get disabled(){return i(this.rawNode)},get isGroup(){return d(this.rawNode)},get isLeaf(){return Pc(this.rawNode,c)},get shallowLoaded(){return Ic(this.rawNode,c)},get ignored(){return l(this.rawNode)},contains(m){return Vc(this,m)}},Wc),h=ti(e,n,o,f,c);function p(m){if(m==null)return null;const g=n.get(m);return g&&!g.isGroup&&!g.ignored?g:null}function y(m){if(m==null)return null;const g=n.get(m);return g&&!g.ignored?g:null}function C(m,g){const M=y(m);return M?M.getPrev(g):null}function x(m,g){const M=y(m);return M?M.getNext(g):null}function b(m){const g=y(m);return g?g.getParent():null}function S(m){const g=y(m);return g?g.getChild():null}const _={treeNodes:h,treeNodeMap:n,levelTreeNodeMap:o,maxLevel:Math.max(...o.keys()),getChildren:c,getFlattenedNodes(m){return Uc(h,m)},getNode:p,getPrev:C,getNext:x,getParent:b,getChild:S,getFirstAvailableNode(){return Fc(h)},getPath(m,g={}){return Dc(m,g,_)},getCheckedKeys(m,g={}){const{cascade:M=!0,leafOnly:$=!1,checkStrategy:A="all",allowNotLoaded:z=!1}=g;return br({checkedKeys:gr(m),indeterminateKeys:mr(m),cascade:M,leafOnly:$,checkStrategy:A,allowNotLoaded:z},_)},check(m,g,M={}){const{cascade:$=!0,leafOnly:A=!1,checkStrategy:z="all",allowNotLoaded:B=!1}=M;return br({checkedKeys:gr(g),indeterminateKeys:mr(g),keysToCheck:m==null?[]:Un(m),cascade:$,leafOnly:A,checkStrategy:z,allowNotLoaded:B},_)},uncheck(m,g,M={}){const{cascade:$=!0,leafOnly:A=!1,checkStrategy:z="all",allowNotLoaded:B=!1}=M;return br({checkedKeys:gr(g),indeterminateKeys:mr(g),keysToUncheck:m==null?[]:Un(m),cascade:$,leafOnly:A,checkStrategy:z,allowNotLoaded:B},_)},getNonLeafKeys(m={}){return Sc(h,m)}};return _}const qc={iconSizeSmall:"34px",iconSizeMedium:"40px",iconSizeLarge:"46px",iconSizeHuge:"52px"},Gc=e=>{const{textColorDisabled:t,iconColor:r,textColor2:n,fontSizeSmall:o,fontSizeMedium:i,fontSizeLarge:l,fontSizeHuge:d}=e;return Object.assign(Object.assign({},qc),{fontSizeSmall:o,fontSizeMedium:i,fontSizeLarge:l,fontSizeHuge:d,textColor:t,iconColor:r,extraTextColor:n})},Xc={name:"Empty",common:Be,self:Gc},Yc=Xc,Zc=k("empty",`
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
font-size: var(--n-font-size);
|
||
`,[E("icon",`
|
||
width: var(--n-icon-size);
|
||
height: var(--n-icon-size);
|
||
font-size: var(--n-icon-size);
|
||
line-height: var(--n-icon-size);
|
||
color: var(--n-icon-color);
|
||
transition:
|
||
color .3s var(--n-bezier);
|
||
`,[j("+",[E("description",`
|
||
margin-top: 8px;
|
||
`)])]),E("description",`
|
||
transition: color .3s var(--n-bezier);
|
||
color: var(--n-text-color);
|
||
`),E("extra",`
|
||
text-align: center;
|
||
transition: color .3s var(--n-bezier);
|
||
margin-top: 12px;
|
||
color: var(--n-extra-text-color);
|
||
`)]),Jc=Object.assign(Object.assign({},ne.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),Qr=K({name:"Empty",props:Jc,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r}=_e(e),n=ne("Empty","-empty",Zc,Yc,e,t),{localeRef:o}=Zr("Empty"),i=ie(fo,null),l=D(()=>{var c,f,h;return(c=e.description)!==null&&c!==void 0?c:(h=(f=i==null?void 0:i.mergedComponentPropsRef.value)===null||f===void 0?void 0:f.Empty)===null||h===void 0?void 0:h.description}),d=D(()=>{var c,f;return((f=(c=i==null?void 0:i.mergedComponentPropsRef.value)===null||c===void 0?void 0:c.Empty)===null||f===void 0?void 0:f.renderIcon)||(()=>u(hc,null))}),a=D(()=>{const{size:c}=e,{common:{cubicBezierEaseInOut:f},self:{[oe("iconSize",c)]:h,[oe("fontSize",c)]:p,textColor:y,iconColor:C,extraTextColor:x}}=n.value;return{"--n-icon-size":h,"--n-font-size":p,"--n-bezier":f,"--n-text-color":y,"--n-icon-color":C,"--n-extra-text-color":x}}),s=r?He("empty",D(()=>{let c="";const{size:f}=e;return c+=f[0],c}),a,e):void 0;return{mergedClsPrefix:t,mergedRenderIcon:d,localizedDescription:D(()=>l.value||o.value.description),cssVars:r?void 0:a,themeClass:s==null?void 0:s.themeClass,onRender:s==null?void 0:s.onRender}},render(){const{$slots:e,mergedClsPrefix:t,onRender:r}=this;return r==null||r(),u("div",{class:[`${t}-empty`,this.themeClass],style:this.cssVars},this.showIcon?u("div",{class:`${t}-empty__icon`},e.icon?e.icon():u(fe,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?u("div",{class:`${t}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?u("div",{class:`${t}-empty__extra`},e.extra()):null)}}),Qc={space:"6px",spaceArrow:"10px",arrowOffset:"10px",arrowOffsetVertical:"10px",arrowHeight:"6px",padding:"8px 14px"},ef=e=>{const{boxShadow2:t,popoverColor:r,textColor2:n,borderRadius:o,fontSize:i,dividerColor:l}=e;return Object.assign(Object.assign({},Qc),{fontSize:i,borderRadius:o,color:r,dividerColor:l,textColor:n,boxShadow:t})},tf={name:"Popover",common:Be,self:ef},en=tf,yr={top:"bottom",bottom:"top",left:"right",right:"left"},ye="var(--n-arrow-height) * 1.414",rf=j([k("popover",`
|
||
transition:
|
||
box-shadow .3s var(--n-bezier),
|
||
background-color .3s var(--n-bezier),
|
||
color .3s var(--n-bezier);
|
||
position: relative;
|
||
font-size: var(--n-font-size);
|
||
color: var(--n-text-color);
|
||
box-shadow: var(--n-box-shadow);
|
||
word-break: break-word;
|
||
`,[j(">",[k("scrollbar",`
|
||
height: inherit;
|
||
max-height: inherit;
|
||
`)]),Te("raw",`
|
||
background-color: var(--n-color);
|
||
border-radius: var(--n-border-radius);
|
||
`,[Te("scrollable",[Te("show-header-or-footer","padding: var(--n-padding);")])]),E("header",`
|
||
padding: var(--n-padding);
|
||
border-bottom: 1px solid var(--n-divider-color);
|
||
transition: border-color .3s var(--n-bezier);
|
||
`),E("footer",`
|
||
padding: var(--n-padding);
|
||
border-top: 1px solid var(--n-divider-color);
|
||
transition: border-color .3s var(--n-bezier);
|
||
`),U("scrollable, show-header-or-footer",[E("content",`
|
||
padding: var(--n-padding);
|
||
`)])]),k("popover-shared",`
|
||
transform-origin: inherit;
|
||
`,[k("popover-arrow-wrapper",`
|
||
position: absolute;
|
||
overflow: hidden;
|
||
pointer-events: none;
|
||
`,[k("popover-arrow",`
|
||
transition: background-color .3s var(--n-bezier);
|
||
position: absolute;
|
||
display: block;
|
||
width: calc(${ye});
|
||
height: calc(${ye});
|
||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, .12);
|
||
transform: rotate(45deg);
|
||
background-color: var(--n-color);
|
||
pointer-events: all;
|
||
`)]),j("&.popover-transition-enter-from, &.popover-transition-leave-to",`
|
||
opacity: 0;
|
||
transform: scale(.85);
|
||
`),j("&.popover-transition-enter-to, &.popover-transition-leave-from",`
|
||
transform: scale(1);
|
||
opacity: 1;
|
||
`),j("&.popover-transition-enter-active",`
|
||
transition:
|
||
box-shadow .3s var(--n-bezier),
|
||
background-color .3s var(--n-bezier),
|
||
color .3s var(--n-bezier),
|
||
opacity .15s var(--n-bezier-ease-out),
|
||
transform .15s var(--n-bezier-ease-out);
|
||
`),j("&.popover-transition-leave-active",`
|
||
transition:
|
||
box-shadow .3s var(--n-bezier),
|
||
background-color .3s var(--n-bezier),
|
||
color .3s var(--n-bezier),
|
||
opacity .15s var(--n-bezier-ease-in),
|
||
transform .15s var(--n-bezier-ease-in);
|
||
`)]),Me("top-start",`
|
||
top: calc(${ye} / -2);
|
||
left: calc(${Xe("top-start")} - var(--v-offset-left));
|
||
`),Me("top",`
|
||
top: calc(${ye} / -2);
|
||
transform: translateX(calc(${ye} / -2)) rotate(45deg);
|
||
left: 50%;
|
||
`),Me("top-end",`
|
||
top: calc(${ye} / -2);
|
||
right: calc(${Xe("top-end")} + var(--v-offset-left));
|
||
`),Me("bottom-start",`
|
||
bottom: calc(${ye} / -2);
|
||
left: calc(${Xe("bottom-start")} - var(--v-offset-left));
|
||
`),Me("bottom",`
|
||
bottom: calc(${ye} / -2);
|
||
transform: translateX(calc(${ye} / -2)) rotate(45deg);
|
||
left: 50%;
|
||
`),Me("bottom-end",`
|
||
bottom: calc(${ye} / -2);
|
||
right: calc(${Xe("bottom-end")} + var(--v-offset-left));
|
||
`),Me("left-start",`
|
||
left: calc(${ye} / -2);
|
||
top: calc(${Xe("left-start")} - var(--v-offset-top));
|
||
`),Me("left",`
|
||
left: calc(${ye} / -2);
|
||
transform: translateY(calc(${ye} / -2)) rotate(45deg);
|
||
top: 50%;
|
||
`),Me("left-end",`
|
||
left: calc(${ye} / -2);
|
||
bottom: calc(${Xe("left-end")} + var(--v-offset-top));
|
||
`),Me("right-start",`
|
||
right: calc(${ye} / -2);
|
||
top: calc(${Xe("right-start")} - var(--v-offset-top));
|
||
`),Me("right",`
|
||
right: calc(${ye} / -2);
|
||
transform: translateY(calc(${ye} / -2)) rotate(45deg);
|
||
top: 50%;
|
||
`),Me("right-end",`
|
||
right: calc(${ye} / -2);
|
||
bottom: calc(${Xe("right-end")} + var(--v-offset-top));
|
||
`),...vu({top:["right-start","left-start"],right:["top-end","bottom-end"],bottom:["right-end","left-end"],left:["top-start","bottom-start"]},(e,t)=>{const r=["right","left"].includes(t),n=r?"width":"height";return e.map(o=>{const i=o.split("-")[1]==="end",d=`calc((${`var(--v-target-${n}, 0px)`} - ${ye}) / 2)`,a=Xe(o);return j(`[v-placement="${o}"] >`,[k("popover-shared",[U("center-arrow",[k("popover-arrow",`${t}: calc(max(${d}, ${a}) ${i?"+":"-"} var(--v-offset-${r?"left":"top"}));`)])])])})})]);function Xe(e){return["top","bottom"].includes(e.split("-")[0])?"var(--n-arrow-offset)":"var(--n-arrow-offset-vertical)"}function Me(e,t){const r=e.split("-")[0],n=["top","bottom"].includes(r)?"height: var(--n-space-arrow);":"width: var(--n-space-arrow);";return j(`[v-placement="${e}"] >`,[k("popover-shared",`
|
||
margin-${yr[r]}: var(--n-space);
|
||
`,[U("show-arrow",`
|
||
margin-${yr[r]}: var(--n-space-arrow);
|
||
`),U("overlap",`
|
||
margin: 0;
|
||
`),Qa("popover-arrow-wrapper",`
|
||
right: 0;
|
||
left: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
${r}: 100%;
|
||
${yr[r]}: auto;
|
||
${n}
|
||
`,[k("popover-arrow",t)])])])}const ri=Object.assign(Object.assign({},ne.props),{to:bt.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentStyle:[Object,String],headerStyle:[Object,String],footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number}),ni=({arrowStyle:e,clsPrefix:t})=>u("div",{key:"__popover-arrow__",class:`${t}-popover-arrow-wrapper`},u("div",{class:`${t}-popover-arrow`,style:e})),nf=K({name:"PopoverBody",inheritAttrs:!1,props:ri,setup(e,{slots:t,attrs:r}){const{namespaceRef:n,mergedClsPrefixRef:o,inlineThemeDisabled:i}=_e(e),l=ne("Popover","-popover",rf,en,e,o),d=L(null),a=ie("NPopover"),s=L(null),c=L(e.show),f=L(!1);lt(()=>{const{show:$}=e;$&&!Tl()&&!e.internalDeactivateImmediately&&(f.value=!0)});const h=D(()=>{const{trigger:$,onClickoutside:A}=e,z=[],{positionManuallyRef:{value:B}}=a;return B||($==="click"&&!A&&z.push([pn,m,void 0,{capture:!0}]),$==="hover"&&z.push([Nl,_])),A&&z.push([pn,m,void 0,{capture:!0}]),(e.displayDirective==="show"||e.animated&&f.value)&&z.push([ho,e.show]),z}),p=D(()=>{const $=e.width==="trigger"?void 0:We(e.width),A=[];$&&A.push({width:$});const{maxWidth:z,minWidth:B}=e;return z&&A.push({maxWidth:We(z)}),B&&A.push({maxWidth:We(B)}),i||A.push(y.value),A}),y=D(()=>{const{common:{cubicBezierEaseInOut:$,cubicBezierEaseIn:A,cubicBezierEaseOut:z},self:{space:B,spaceArrow:R,padding:O,fontSize:I,textColor:w,dividerColor:P,color:N,boxShadow:F,borderRadius:q,arrowHeight:Q,arrowOffset:ae,arrowOffsetVertical:me}}=l.value;return{"--n-box-shadow":F,"--n-bezier":$,"--n-bezier-ease-in":A,"--n-bezier-ease-out":z,"--n-font-size":I,"--n-text-color":w,"--n-color":N,"--n-divider-color":P,"--n-border-radius":q,"--n-arrow-height":Q,"--n-arrow-offset":ae,"--n-arrow-offset-vertical":me,"--n-padding":O,"--n-space":B,"--n-space-arrow":R}}),C=i?He("popover",void 0,y,e):void 0;a.setBodyInstance({syncPosition:x}),et(()=>{a.setBodyInstance(null)}),Se(J(e,"show"),$=>{e.animated||($?c.value=!0:c.value=!1)});function x(){var $;($=d.value)===null||$===void 0||$.syncPosition()}function b($){e.trigger==="hover"&&e.keepAliveOnHover&&e.show&&a.handleMouseEnter($)}function S($){e.trigger==="hover"&&e.keepAliveOnHover&&a.handleMouseLeave($)}function _($){e.trigger==="hover"&&!g().contains(vn($))&&a.handleMouseMoveOutside($)}function m($){(e.trigger==="click"&&!g().contains(vn($))||e.onClickoutside)&&a.handleClickOutside($)}function g(){return a.getTriggerElement()}ke(er,s),ke(Ar,null),ke(Er,null);function M(){if(C==null||C.onRender(),!(e.displayDirective==="show"||e.show||e.animated&&f.value))return null;let A;const z=a.internalRenderBodyRef.value,{value:B}=o;if(z)A=z([`${B}-popover-shared`,C==null?void 0:C.themeClass.value,e.overlap&&`${B}-popover-shared--overlap`,e.showArrow&&`${B}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${B}-popover-shared--center-arrow`],s,p.value,b,S);else{const{value:R}=a.extraClassRef,{internalTrapFocus:O}=e,I=!gn(t.header)||!gn(t.footer),w=()=>{var P;const N=I?u(Ne,null,Ye(t.header,Q=>Q?u("div",{class:`${B}-popover__header`,style:e.headerStyle},Q):null),Ye(t.default,Q=>Q?u("div",{class:`${B}-popover__content`,style:e.contentStyle},t):null),Ye(t.footer,Q=>Q?u("div",{class:`${B}-popover__footer`,style:e.footerStyle},Q):null)):e.scrollable?(P=t.default)===null||P===void 0?void 0:P.call(t):u("div",{class:`${B}-popover__content`,style:e.contentStyle},t),F=e.scrollable?u(po,{contentClass:I?void 0:`${B}-popover__content`,contentStyle:I?void 0:e.contentStyle},{default:()=>N}):N,q=e.showArrow?ni({arrowStyle:e.arrowStyle,clsPrefix:B}):null;return[F,q]};A=u("div",_t({class:[`${B}-popover`,`${B}-popover-shared`,C==null?void 0:C.themeClass.value,R.map(P=>`${B}-${P}`),{[`${B}-popover--scrollable`]:e.scrollable,[`${B}-popover--show-header-or-footer`]:I,[`${B}-popover--raw`]:e.raw,[`${B}-popover-shared--overlap`]:e.overlap,[`${B}-popover-shared--show-arrow`]:e.showArrow,[`${B}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:s,style:p.value,onKeydown:a.handleKeydown,onMouseenter:b,onMouseleave:S},r),O?u(el,{active:e.show,autoFocus:!0},{default:w}):w())}return mt(A,h.value)}return{displayed:f,namespace:n,isMounted:a.isMountedRef,zIndex:a.zIndexRef,followerRef:d,adjustedTo:bt(e),followerEnabled:c,renderContentNode:M}},render(){return u(Mo,{ref:"followerRef",zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:this.width==="trigger"?"target":void 0,teleportDisabled:this.adjustedTo===bt.tdkey},{default:()=>this.animated?u(zt,{name:"popover-transition",appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)===null||e===void 0||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),of=Object.keys(ri),af={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"],manual:[],nested:["onFocus","onBlur","onMouseenter","onMouseleave","onClick"]};function lf(e,t,r){af[t].forEach(n=>{e.props?e.props=Object.assign({},e.props):e.props={};const o=e.props[n],i=r[n];o?e.props[n]=(...l)=>{o(...l),i(...l)}:e.props[n]=i})}const sf=pe("").type,ir={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:"hover"},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:"top"},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:"if"},arrowStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:bt.propTo,scrollable:Boolean,contentStyle:[Object,String],headerStyle:[Object,String],footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},df=Object.assign(Object.assign(Object.assign({},ne.props),ir),{internalOnAfterLeave:Function,internalRenderBody:Function}),oi=K({name:"Popover",inheritAttrs:!1,props:df,__popover__:!0,setup(e){const t=Fr(),r=L(null),n=D(()=>e.show),o=L(e.defaultShow),i=nr(n,o),l=Ae(()=>e.disabled?!1:i.value),d=()=>{if(e.disabled)return!0;const{getDisabled:w}=e;return!!(w!=null&&w())},a=()=>d()?!1:i.value,s=Bl(e,["arrow","showArrow"]),c=D(()=>e.overlap?!1:s.value);let f=null;const h=L(null),p=L(null),y=Ae(()=>e.x!==void 0&&e.y!==void 0);function C(w){const{"onUpdate:show":P,onUpdateShow:N,onShow:F,onHide:q}=e;o.value=w,P&&ce(P,w),N&&ce(N,w),w&&F&&ce(F,!0),w&&q&&ce(q,!1)}function x(){f&&f.syncPosition()}function b(){const{value:w}=h;w&&(window.clearTimeout(w),h.value=null)}function S(){const{value:w}=p;w&&(window.clearTimeout(w),p.value=null)}function _(){const w=d();if(e.trigger==="focus"&&!w){if(a())return;C(!0)}}function m(){const w=d();if(e.trigger==="focus"&&!w){if(!a())return;C(!1)}}function g(){const w=d();if(e.trigger==="hover"&&!w){if(S(),h.value!==null||a())return;const P=()=>{C(!0),h.value=null},{delay:N}=e;N===0?P():h.value=window.setTimeout(P,N)}}function M(){const w=d();if(e.trigger==="hover"&&!w){if(b(),p.value!==null||!a())return;const P=()=>{C(!1),p.value=null},{duration:N}=e;N===0?P():p.value=window.setTimeout(P,N)}}function $(){M()}function A(w){var P;a()&&(e.trigger==="click"&&(b(),S(),C(!1)),(P=e.onClickoutside)===null||P===void 0||P.call(e,w))}function z(){if(e.trigger==="click"&&!d()){b(),S();const w=!a();C(w)}}function B(w){e.internalTrapFocus&&w.key==="Escape"&&(b(),S(),C(!1))}function R(w){o.value=w}function O(){var w;return(w=r.value)===null||w===void 0?void 0:w.targetRef}function I(w){f=w}return ke("NPopover",{getTriggerElement:O,handleKeydown:B,handleMouseEnter:g,handleMouseLeave:M,handleClickOutside:A,handleMouseMoveOutside:$,setBodyInstance:I,positionManuallyRef:y,isMountedRef:t,zIndexRef:J(e,"zIndex"),extraClassRef:J(e,"internalExtraClass"),internalRenderBodyRef:J(e,"internalRenderBody")}),lt(()=>{i.value&&d()&&C(!1)}),{binderInstRef:r,positionManually:y,mergedShowConsideringDisabledProp:l,uncontrolledShow:o,mergedShowArrow:c,getMergedShow:a,setShow:R,handleClick:z,handleMouseEnter:g,handleMouseLeave:M,handleFocus:_,handleBlur:m,syncPosition:x}},render(){var e;const{positionManually:t,$slots:r}=this;let n,o=!1;if(!t&&(r.activator?n=mn(r,"activator"):n=mn(r,"trigger"),n)){n=tl(n),n=n.type===sf?u("span",[n]):n;const i={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(!((e=n.type)===null||e===void 0)&&e.__popover__)o=!0,n.props||(n.props={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]}),n.props.internalSyncTargetWithParent=!0,n.props.internalInheritedEventHandlers?n.props.internalInheritedEventHandlers=[i,...n.props.internalInheritedEventHandlers]:n.props.internalInheritedEventHandlers=[i];else{const{internalInheritedEventHandlers:l}=this,d=[i,...l],a={onBlur:s=>{d.forEach(c=>{c.onBlur(s)})},onFocus:s=>{d.forEach(c=>{c.onFocus(s)})},onClick:s=>{d.forEach(c=>{c.onClick(s)})},onMouseenter:s=>{d.forEach(c=>{c.onMouseenter(s)})},onMouseleave:s=>{d.forEach(c=>{c.onMouseleave(s)})}};lf(n,l?"nested":t?"manual":this.trigger,a)}}return u(Oo,{ref:"binderInstRef",syncTarget:!o,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;const i=this.getMergedShow();return[this.internalTrapFocus&&i?mt(u("div",{style:{position:"fixed",inset:0}}),[[Nr,{enabled:i,zIndex:this.zIndex}]]):null,t?null:u(Bo,null,{default:()=>n}),u(nf,vo(this.$props,of,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:i})),{default:()=>{var l,d;return(d=(l=this.$slots).default)===null||d===void 0?void 0:d.call(l)},header:()=>{var l,d;return(d=(l=this.$slots).header)===null||d===void 0?void 0:d.call(l)},footer:()=>{var l,d;return(d=(l=this.$slots).footer)===null||d===void 0?void 0:d.call(l)}})]}})}}),uf={closeIconSizeTiny:"12px",closeIconSizeSmall:"12px",closeIconSizeMedium:"14px",closeIconSizeLarge:"14px",closeSizeTiny:"16px",closeSizeSmall:"16px",closeSizeMedium:"18px",closeSizeLarge:"18px",padding:"0 7px",closeMargin:"0 0 0 4px",closeMarginRtl:"0 4px 0 0"},cf=e=>{const{textColor2:t,primaryColorHover:r,primaryColorPressed:n,primaryColor:o,infoColor:i,successColor:l,warningColor:d,errorColor:a,baseColor:s,borderColor:c,opacityDisabled:f,tagColor:h,closeIconColor:p,closeIconColorHover:y,closeIconColorPressed:C,borderRadiusSmall:x,fontSizeMini:b,fontSizeTiny:S,fontSizeSmall:_,fontSizeMedium:m,heightMini:g,heightTiny:M,heightSmall:$,heightMedium:A,closeColorHover:z,closeColorPressed:B,buttonColor2Hover:R,buttonColor2Pressed:O,fontWeightStrong:I}=e;return Object.assign(Object.assign({},uf),{closeBorderRadius:x,heightTiny:g,heightSmall:M,heightMedium:$,heightLarge:A,borderRadius:x,opacityDisabled:f,fontSizeTiny:b,fontSizeSmall:S,fontSizeMedium:_,fontSizeLarge:m,fontWeightStrong:I,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:s,colorCheckable:"#0000",colorHoverCheckable:R,colorPressedCheckable:O,colorChecked:o,colorCheckedHover:r,colorCheckedPressed:n,border:`1px solid ${c}`,textColor:t,color:h,colorBordered:"rgb(250, 250, 252)",closeIconColor:p,closeIconColorHover:y,closeIconColorPressed:C,closeColorHover:z,closeColorPressed:B,borderPrimary:`1px solid ${te(o,{alpha:.3})}`,textColorPrimary:o,colorPrimary:te(o,{alpha:.12}),colorBorderedPrimary:te(o,{alpha:.1}),closeIconColorPrimary:o,closeIconColorHoverPrimary:o,closeIconColorPressedPrimary:o,closeColorHoverPrimary:te(o,{alpha:.12}),closeColorPressedPrimary:te(o,{alpha:.18}),borderInfo:`1px solid ${te(i,{alpha:.3})}`,textColorInfo:i,colorInfo:te(i,{alpha:.12}),colorBorderedInfo:te(i,{alpha:.1}),closeIconColorInfo:i,closeIconColorHoverInfo:i,closeIconColorPressedInfo:i,closeColorHoverInfo:te(i,{alpha:.12}),closeColorPressedInfo:te(i,{alpha:.18}),borderSuccess:`1px solid ${te(l,{alpha:.3})}`,textColorSuccess:l,colorSuccess:te(l,{alpha:.12}),colorBorderedSuccess:te(l,{alpha:.1}),closeIconColorSuccess:l,closeIconColorHoverSuccess:l,closeIconColorPressedSuccess:l,closeColorHoverSuccess:te(l,{alpha:.12}),closeColorPressedSuccess:te(l,{alpha:.18}),borderWarning:`1px solid ${te(d,{alpha:.35})}`,textColorWarning:d,colorWarning:te(d,{alpha:.15}),colorBorderedWarning:te(d,{alpha:.12}),closeIconColorWarning:d,closeIconColorHoverWarning:d,closeIconColorPressedWarning:d,closeColorHoverWarning:te(d,{alpha:.12}),closeColorPressedWarning:te(d,{alpha:.18}),borderError:`1px solid ${te(a,{alpha:.23})}`,textColorError:a,colorError:te(a,{alpha:.1}),colorBorderedError:te(a,{alpha:.08}),closeIconColorError:a,closeIconColorHoverError:a,closeIconColorPressedError:a,closeColorHoverError:te(a,{alpha:.12}),closeColorPressedError:te(a,{alpha:.18})})},ff={name:"Tag",common:Be,self:cf},hf=ff,pf={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},vf=k("tag",`
|
||
white-space: nowrap;
|
||
position: relative;
|
||
box-sizing: border-box;
|
||
cursor: default;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
flex-wrap: nowrap;
|
||
padding: var(--n-padding);
|
||
border-radius: var(--n-border-radius);
|
||
color: var(--n-text-color);
|
||
background-color: var(--n-color);
|
||
transition:
|
||
border-color .3s var(--n-bezier),
|
||
background-color .3s var(--n-bezier),
|
||
color .3s var(--n-bezier),
|
||
box-shadow .3s var(--n-bezier),
|
||
opacity .3s var(--n-bezier);
|
||
line-height: 1;
|
||
height: var(--n-height);
|
||
font-size: var(--n-font-size);
|
||
`,[U("strong",`
|
||
font-weight: var(--n-font-weight-strong);
|
||
`),E("border",`
|
||
pointer-events: none;
|
||
position: absolute;
|
||
left: 0;
|
||
right: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
border-radius: inherit;
|
||
border: var(--n-border);
|
||
transition: border-color .3s var(--n-bezier);
|
||
`),E("icon",`
|
||
display: flex;
|
||
margin: 0 4px 0 0;
|
||
color: var(--n-text-color);
|
||
transition: color .3s var(--n-bezier);
|
||
font-size: var(--n-avatar-size-override);
|
||
`),E("avatar",`
|
||
display: flex;
|
||
margin: 0 6px 0 0;
|
||
`),E("close",`
|
||
margin: var(--n-close-margin);
|
||
transition:
|
||
background-color .3s var(--n-bezier),
|
||
color .3s var(--n-bezier);
|
||
`),U("round",`
|
||
padding: 0 calc(var(--n-height) / 3);
|
||
border-radius: calc(var(--n-height) / 2);
|
||
`,[E("icon",`
|
||
margin: 0 4px 0 calc((var(--n-height) - 8px) / -2);
|
||
`),E("avatar",`
|
||
margin: 0 6px 0 calc((var(--n-height) - 8px) / -2);
|
||
`),U("closable",`
|
||
padding: 0 calc(var(--n-height) / 4) 0 calc(var(--n-height) / 3);
|
||
`)]),U("icon, avatar",[U("round",`
|
||
padding: 0 calc(var(--n-height) / 3) 0 calc(var(--n-height) / 2);
|
||
`)]),U("disabled",`
|
||
cursor: not-allowed !important;
|
||
opacity: var(--n-opacity-disabled);
|
||
`),U("checkable",`
|
||
cursor: pointer;
|
||
box-shadow: none;
|
||
color: var(--n-text-color-checkable);
|
||
background-color: var(--n-color-checkable);
|
||
`,[Te("disabled",[j("&:hover","background-color: var(--n-color-hover-checkable);",[Te("checked","color: var(--n-text-color-hover-checkable);")]),j("&:active","background-color: var(--n-color-pressed-checkable);",[Te("checked","color: var(--n-text-color-pressed-checkable);")])]),U("checked",`
|
||
color: var(--n-text-color-checked);
|
||
background-color: var(--n-color-checked);
|
||
`,[Te("disabled",[j("&:hover","background-color: var(--n-color-checked-hover);"),j("&:active","background-color: var(--n-color-checked-pressed);")])])])]),gf=Object.assign(Object.assign(Object.assign({},ne.props),pf),{bordered:{type:Boolean,default:void 0},checked:Boolean,checkable:Boolean,strong:Boolean,triggerClickOnClose:Boolean,onClose:[Array,Function],onMouseenter:Function,onMouseleave:Function,"onUpdate:checked":Function,onUpdateChecked:Function,internalCloseFocusable:{type:Boolean,default:!0},internalCloseIsButtonTag:{type:Boolean,default:!0},onCheckedChange:Function}),mf=Ve("n-tag"),ii=K({name:"Tag",props:gf,setup(e){const t=L(null),{mergedBorderedRef:r,mergedClsPrefixRef:n,inlineThemeDisabled:o,mergedRtlRef:i}=_e(e),l=ne("Tag","-tag",vf,hf,e,n);ke(mf,{roundRef:J(e,"round")});function d(p){if(!e.disabled&&e.checkable){const{checked:y,onCheckedChange:C,onUpdateChecked:x,"onUpdate:checked":b}=e;x&&x(!y),b&&b(!y),C&&C(!y)}}function a(p){if(e.triggerClickOnClose||p.stopPropagation(),!e.disabled){const{onClose:y}=e;y&&ce(y,p)}}const s={setTextContent(p){const{value:y}=t;y&&(y.textContent=p)}},c=Ot("Tag",i,n),f=D(()=>{const{type:p,size:y,color:{color:C,textColor:x}={}}=e,{common:{cubicBezierEaseInOut:b},self:{padding:S,closeMargin:_,closeMarginRtl:m,borderRadius:g,opacityDisabled:M,textColorCheckable:$,textColorHoverCheckable:A,textColorPressedCheckable:z,textColorChecked:B,colorCheckable:R,colorHoverCheckable:O,colorPressedCheckable:I,colorChecked:w,colorCheckedHover:P,colorCheckedPressed:N,closeBorderRadius:F,fontWeightStrong:q,[oe("colorBordered",p)]:Q,[oe("closeSize",y)]:ae,[oe("closeIconSize",y)]:me,[oe("fontSize",y)]:ve,[oe("height",y)]:we,[oe("color",p)]:re,[oe("textColor",p)]:ze,[oe("border",p)]:xe,[oe("closeIconColor",p)]:ee,[oe("closeIconColorHover",p)]:De,[oe("closeIconColorPressed",p)]:qe,[oe("closeColorHover",p)]:Ge,[oe("closeColorPressed",p)]:Fe}}=l.value;return{"--n-font-weight-strong":q,"--n-avatar-size-override":`calc(${we} - 8px)`,"--n-bezier":b,"--n-border-radius":g,"--n-border":xe,"--n-close-icon-size":me,"--n-close-color-pressed":Fe,"--n-close-color-hover":Ge,"--n-close-border-radius":F,"--n-close-icon-color":ee,"--n-close-icon-color-hover":De,"--n-close-icon-color-pressed":qe,"--n-close-icon-color-disabled":ee,"--n-close-margin":_,"--n-close-margin-rtl":m,"--n-close-size":ae,"--n-color":C||(r.value?Q:re),"--n-color-checkable":R,"--n-color-checked":w,"--n-color-checked-hover":P,"--n-color-checked-pressed":N,"--n-color-hover-checkable":O,"--n-color-pressed-checkable":I,"--n-font-size":ve,"--n-height":we,"--n-opacity-disabled":M,"--n-padding":S,"--n-text-color":x||ze,"--n-text-color-checkable":$,"--n-text-color-checked":B,"--n-text-color-hover-checkable":A,"--n-text-color-pressed-checkable":z}}),h=o?He("tag",D(()=>{let p="";const{type:y,size:C,color:{color:x,textColor:b}={}}=e;return p+=y[0],p+=C[0],x&&(p+=`a${bn(x)}`),b&&(p+=`b${bn(b)}`),r.value&&(p+="c"),p}),f,e):void 0;return Object.assign(Object.assign({},s),{rtlEnabled:c,mergedClsPrefix:n,contentRef:t,mergedBordered:r,handleClick:d,handleCloseClick:a,cssVars:o?void 0:f,themeClass:h==null?void 0:h.themeClass,onRender:h==null?void 0:h.onRender})},render(){var e,t;const{mergedClsPrefix:r,rtlEnabled:n,closable:o,color:{borderColor:i}={},round:l,onRender:d,$slots:a}=this;d==null||d();const s=Ye(a.avatar,f=>f&&u("div",{class:`${r}-tag__avatar`},f)),c=Ye(a.icon,f=>f&&u("div",{class:`${r}-tag__icon`},f));return u("div",{class:[`${r}-tag`,this.themeClass,{[`${r}-tag--rtl`]:n,[`${r}-tag--strong`]:this.strong,[`${r}-tag--disabled`]:this.disabled,[`${r}-tag--checkable`]:this.checkable,[`${r}-tag--checked`]:this.checkable&&this.checked,[`${r}-tag--round`]:l,[`${r}-tag--avatar`]:s,[`${r}-tag--icon`]:c,[`${r}-tag--closable`]:o}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},c||s,u("span",{class:`${r}-tag__content`,ref:"contentRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)),!this.checkable&&o?u(rl,{clsPrefix:r,class:`${r}-tag__close`,disabled:this.disabled,onClick:this.handleCloseClick,focusable:this.internalCloseFocusable,round:l,isButtonTag:this.internalCloseIsButtonTag,absolute:!0}):null,!this.checkable&&this.mergedBordered?u("div",{class:`${r}-tag__border`,style:{borderColor:i}}):null)}}),bf=k("base-clear",`
|
||
flex-shrink: 0;
|
||
height: 1em;
|
||
width: 1em;
|
||
position: relative;
|
||
`,[j(">",[E("clear",`
|
||
font-size: var(--n-clear-size);
|
||
height: 1em;
|
||
width: 1em;
|
||
cursor: pointer;
|
||
color: var(--n-clear-color);
|
||
transition: color .3s var(--n-bezier);
|
||
display: flex;
|
||
`,[j("&:hover",`
|
||
color: var(--n-clear-color-hover)!important;
|
||
`),j("&:active",`
|
||
color: var(--n-clear-color-pressed)!important;
|
||
`)]),E("placeholder",`
|
||
display: flex;
|
||
`),E("clear, placeholder",`
|
||
position: absolute;
|
||
left: 50%;
|
||
top: 50%;
|
||
transform: translateX(-50%) translateY(-50%);
|
||
`,[go({originalTransform:"translateX(-50%) translateY(-50%)",left:"50%",top:"50%"})])])]),Or=K({name:"BaseClear",props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return mo("-base-clear",bf,J(e,"clsPrefix")),{handleMouseDown(t){t.preventDefault()}}},render(){const{clsPrefix:e}=this;return u("div",{class:`${e}-base-clear`},u(bo,null,{default:()=>{var t,r;return this.show?u("div",{key:"dismiss",class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},pt(this.$slots.icon,()=>[u(fe,{clsPrefix:e},{default:()=>u(gc,null)})])):u("div",{key:"icon",class:`${e}-base-clear__placeholder`},(r=(t=this.$slots).placeholder)===null||r===void 0?void 0:r.call(t))}}))}}),yf=K({name:"InternalSelectionSuffix",props:{clsPrefix:{type:String,required:!0},showArrow:{type:Boolean,default:void 0},showClear:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},onClear:Function},setup(e,{slots:t}){return()=>{const{clsPrefix:r}=e;return u(nl,{clsPrefix:r,class:`${r}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?u(Or,{clsPrefix:r,show:e.showClear,onClear:e.onClear},{placeholder:()=>u(fe,{clsPrefix:r,class:`${r}-base-suffix__arrow`},{default:()=>pt(t.default,()=>[u(vc,null)])})}):null})}}}),wf={paddingTiny:"0 8px",paddingSmall:"0 10px",paddingMedium:"0 12px",paddingLarge:"0 14px",clearSize:"16px"},xf=e=>{const{textColor2:t,textColor3:r,textColorDisabled:n,primaryColor:o,primaryColorHover:i,inputColor:l,inputColorDisabled:d,borderColor:a,warningColor:s,warningColorHover:c,errorColor:f,errorColorHover:h,borderRadius:p,lineHeight:y,fontSizeTiny:C,fontSizeSmall:x,fontSizeMedium:b,fontSizeLarge:S,heightTiny:_,heightSmall:m,heightMedium:g,heightLarge:M,actionColor:$,clearColor:A,clearColorHover:z,clearColorPressed:B,placeholderColor:R,placeholderColorDisabled:O,iconColor:I,iconColorDisabled:w,iconColorHover:P,iconColorPressed:N}=e;return Object.assign(Object.assign({},wf),{countTextColorDisabled:n,countTextColor:r,heightTiny:_,heightSmall:m,heightMedium:g,heightLarge:M,fontSizeTiny:C,fontSizeSmall:x,fontSizeMedium:b,fontSizeLarge:S,lineHeight:y,lineHeightTextarea:y,borderRadius:p,iconSize:"16px",groupLabelColor:$,groupLabelTextColor:t,textColor:t,textColorDisabled:n,textDecorationColor:t,caretColor:o,placeholderColor:R,placeholderColorDisabled:O,color:l,colorDisabled:d,colorFocus:l,groupLabelBorder:`1px solid ${a}`,border:`1px solid ${a}`,borderHover:`1px solid ${i}`,borderDisabled:`1px solid ${a}`,borderFocus:`1px solid ${i}`,boxShadowFocus:`0 0 0 2px ${te(o,{alpha:.2})}`,loadingColor:o,loadingColorWarning:s,borderWarning:`1px solid ${s}`,borderHoverWarning:`1px solid ${c}`,colorFocusWarning:l,borderFocusWarning:`1px solid ${c}`,boxShadowFocusWarning:`0 0 0 2px ${te(s,{alpha:.2})}`,caretColorWarning:s,loadingColorError:f,borderError:`1px solid ${f}`,borderHoverError:`1px solid ${h}`,colorFocusError:l,borderFocusError:`1px solid ${h}`,boxShadowFocusError:`0 0 0 2px ${te(f,{alpha:.2})}`,caretColorError:f,clearColor:A,clearColorHover:z,clearColorPressed:B,iconColor:I,iconColorDisabled:w,iconColorHover:P,iconColorPressed:N,suffixTextColor:t})},Cf={name:"Input",common:Be,self:xf},Sf=Cf,ai=Ve("n-input");function Pf(e){let t=0;for(const r of e)t++;return t}function jt(e){return e===""||e==null}function kf(e){const t=L(null);function r(){const{value:i}=e;if(!(i!=null&&i.focus)){o();return}const{selectionStart:l,selectionEnd:d,value:a}=i;if(l==null||d==null){o();return}t.value={start:l,end:d,beforeText:a.slice(0,l),afterText:a.slice(d)}}function n(){var i;const{value:l}=t,{value:d}=e;if(!l||!d)return;const{value:a}=d,{start:s,beforeText:c,afterText:f}=l;let h=a.length;if(a.endsWith(f))h=a.length-f.length;else if(a.startsWith(c))h=c.length;else{const p=c[s-1],y=a.indexOf(p,s-1);y!==-1&&(h=y+1)}(i=d.setSelectionRange)===null||i===void 0||i.call(d,h,h)}function o(){t.value=null}return Se(e,o),{recordCursor:r,restoreCursor:n}}const Kn=K({name:"InputWordCount",setup(e,{slots:t}){const{mergedValueRef:r,maxlengthRef:n,mergedClsPrefixRef:o,countGraphemesRef:i}=ie(ai),l=D(()=>{const{value:d}=r;return d===null||Array.isArray(d)?0:(i.value||Pf)(d)});return()=>{const{value:d}=n,{value:a}=r;return u("span",{class:`${o.value}-input-word-count`},ol(t.default,{value:a===null||Array.isArray(a)?"":a},()=>[d===void 0?l.value:`${l.value} / ${d}`]))}}}),$f=k("input",`
|
||
max-width: 100%;
|
||
cursor: text;
|
||
line-height: 1.5;
|
||
z-index: auto;
|
||
outline: none;
|
||
box-sizing: border-box;
|
||
position: relative;
|
||
display: inline-flex;
|
||
border-radius: var(--n-border-radius);
|
||
background-color: var(--n-color);
|
||
transition: background-color .3s var(--n-bezier);
|
||
font-size: var(--n-font-size);
|
||
--n-padding-vertical: calc((var(--n-height) - 1.5 * var(--n-font-size)) / 2);
|
||
`,[E("input, textarea",`
|
||
overflow: hidden;
|
||
flex-grow: 1;
|
||
position: relative;
|
||
`),E("input-el, textarea-el, input-mirror, textarea-mirror, separator, placeholder",`
|
||
box-sizing: border-box;
|
||
font-size: inherit;
|
||
line-height: 1.5;
|
||
font-family: inherit;
|
||
border: none;
|
||
outline: none;
|
||
background-color: #0000;
|
||
text-align: inherit;
|
||
transition:
|
||
-webkit-text-fill-color .3s var(--n-bezier),
|
||
caret-color .3s var(--n-bezier),
|
||
color .3s var(--n-bezier),
|
||
text-decoration-color .3s var(--n-bezier);
|
||
`),E("input-el, textarea-el",`
|
||
-webkit-appearance: none;
|
||
scrollbar-width: none;
|
||
width: 100%;
|
||
min-width: 0;
|
||
text-decoration-color: var(--n-text-decoration-color);
|
||
color: var(--n-text-color);
|
||
caret-color: var(--n-caret-color);
|
||
background-color: transparent;
|
||
`,[j("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",`
|
||
width: 0;
|
||
height: 0;
|
||
display: none;
|
||
`),j("&::placeholder",`
|
||
color: #0000;
|
||
-webkit-text-fill-color: transparent !important;
|
||
`),j("&:-webkit-autofill ~",[E("placeholder","display: none;")])]),U("round",[Te("textarea","border-radius: calc(var(--n-height) / 2);")]),E("placeholder",`
|
||
pointer-events: none;
|
||
position: absolute;
|
||
left: 0;
|
||
right: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
overflow: hidden;
|
||
color: var(--n-placeholder-color);
|
||
`,[j("span",`
|
||
width: 100%;
|
||
display: inline-block;
|
||
`)]),U("textarea",[E("placeholder","overflow: visible;")]),Te("autosize","width: 100%;"),U("autosize",[E("textarea-el, input-el",`
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
height: 100%;
|
||
`)]),k("input-wrapper",`
|
||
overflow: hidden;
|
||
display: inline-flex;
|
||
flex-grow: 1;
|
||
position: relative;
|
||
padding-left: var(--n-padding-left);
|
||
padding-right: var(--n-padding-right);
|
||
`),E("input-mirror",`
|
||
padding: 0;
|
||
height: var(--n-height);
|
||
line-height: var(--n-height);
|
||
overflow: hidden;
|
||
visibility: hidden;
|
||
position: static;
|
||
white-space: pre;
|
||
pointer-events: none;
|
||
`),E("input-el",`
|
||
padding: 0;
|
||
height: var(--n-height);
|
||
line-height: var(--n-height);
|
||
`,[j("+",[E("placeholder",`
|
||
display: flex;
|
||
align-items: center;
|
||
`)])]),Te("textarea",[E("placeholder","white-space: nowrap;")]),E("eye",`
|
||
transition: color .3s var(--n-bezier);
|
||
`),U("textarea","width: 100%;",[k("input-word-count",`
|
||
position: absolute;
|
||
right: var(--n-padding-right);
|
||
bottom: var(--n-padding-vertical);
|
||
`),U("resizable",[k("input-wrapper",`
|
||
resize: vertical;
|
||
min-height: var(--n-height);
|
||
`)]),E("textarea-el, textarea-mirror, placeholder",`
|
||
height: 100%;
|
||
padding-left: 0;
|
||
padding-right: 0;
|
||
padding-top: var(--n-padding-vertical);
|
||
padding-bottom: var(--n-padding-vertical);
|
||
word-break: break-word;
|
||
display: inline-block;
|
||
vertical-align: bottom;
|
||
box-sizing: border-box;
|
||
line-height: var(--n-line-height-textarea);
|
||
margin: 0;
|
||
resize: none;
|
||
white-space: pre-wrap;
|
||
`),E("textarea-mirror",`
|
||
width: 100%;
|
||
pointer-events: none;
|
||
overflow: hidden;
|
||
visibility: hidden;
|
||
position: static;
|
||
white-space: pre-wrap;
|
||
overflow-wrap: break-word;
|
||
`)]),U("pair",[E("input-el, placeholder","text-align: center;"),E("separator",`
|
||
display: flex;
|
||
align-items: center;
|
||
transition: color .3s var(--n-bezier);
|
||
color: var(--n-text-color);
|
||
white-space: nowrap;
|
||
`,[k("icon",`
|
||
color: var(--n-icon-color);
|
||
`),k("base-icon",`
|
||
color: var(--n-icon-color);
|
||
`)])]),U("disabled",`
|
||
cursor: not-allowed;
|
||
background-color: var(--n-color-disabled);
|
||
`,[E("border","border: var(--n-border-disabled);"),E("input-el, textarea-el",`
|
||
cursor: not-allowed;
|
||
color: var(--n-text-color-disabled);
|
||
text-decoration-color: var(--n-text-color-disabled);
|
||
`),E("placeholder","color: var(--n-placeholder-color-disabled);"),E("separator","color: var(--n-text-color-disabled);",[k("icon",`
|
||
color: var(--n-icon-color-disabled);
|
||
`),k("base-icon",`
|
||
color: var(--n-icon-color-disabled);
|
||
`)]),k("input-word-count",`
|
||
color: var(--n-count-text-color-disabled);
|
||
`),E("suffix, prefix","color: var(--n-text-color-disabled);",[k("icon",`
|
||
color: var(--n-icon-color-disabled);
|
||
`),k("internal-icon",`
|
||
color: var(--n-icon-color-disabled);
|
||
`)])]),Te("disabled",[E("eye",`
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: var(--n-icon-color);
|
||
cursor: pointer;
|
||
`,[j("&:hover",`
|
||
color: var(--n-icon-color-hover);
|
||
`),j("&:active",`
|
||
color: var(--n-icon-color-pressed);
|
||
`)]),j("&:hover",[E("state-border","border: var(--n-border-hover);")]),U("focus","background-color: var(--n-color-focus);",[E("state-border",`
|
||
border: var(--n-border-focus);
|
||
box-shadow: var(--n-box-shadow-focus);
|
||
`)])]),E("border, state-border",`
|
||
box-sizing: border-box;
|
||
position: absolute;
|
||
left: 0;
|
||
right: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
pointer-events: none;
|
||
border-radius: inherit;
|
||
border: var(--n-border);
|
||
transition:
|
||
box-shadow .3s var(--n-bezier),
|
||
border-color .3s var(--n-bezier);
|
||
`),E("state-border",`
|
||
border-color: #0000;
|
||
z-index: 1;
|
||
`),E("prefix","margin-right: 4px;"),E("suffix",`
|
||
margin-left: 4px;
|
||
`),E("suffix, prefix",`
|
||
transition: color .3s var(--n-bezier);
|
||
flex-wrap: nowrap;
|
||
flex-shrink: 0;
|
||
line-height: var(--n-height);
|
||
white-space: nowrap;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: var(--n-suffix-text-color);
|
||
`,[k("base-loading",`
|
||
font-size: var(--n-icon-size);
|
||
margin: 0 2px;
|
||
color: var(--n-loading-color);
|
||
`),k("base-clear",`
|
||
font-size: var(--n-icon-size);
|
||
`,[E("placeholder",[k("base-icon",`
|
||
transition: color .3s var(--n-bezier);
|
||
color: var(--n-icon-color);
|
||
font-size: var(--n-icon-size);
|
||
`)])]),j(">",[k("icon",`
|
||
transition: color .3s var(--n-bezier);
|
||
color: var(--n-icon-color);
|
||
font-size: var(--n-icon-size);
|
||
`)]),k("base-icon",`
|
||
font-size: var(--n-icon-size);
|
||
`)]),k("input-word-count",`
|
||
pointer-events: none;
|
||
line-height: 1.5;
|
||
font-size: .85em;
|
||
color: var(--n-count-text-color);
|
||
transition: color .3s var(--n-bezier);
|
||
margin-left: 4px;
|
||
font-variant: tabular-nums;
|
||
`),["warning","error"].map(e=>U(`${e}-status`,[Te("disabled",[k("base-loading",`
|
||
color: var(--n-loading-color-${e})
|
||
`),E("input-el, textarea-el",`
|
||
caret-color: var(--n-caret-color-${e});
|
||
`),E("state-border",`
|
||
border: var(--n-border-${e});
|
||
`),j("&:hover",[E("state-border",`
|
||
border: var(--n-border-hover-${e});
|
||
`)]),j("&:focus",`
|
||
background-color: var(--n-color-focus-${e});
|
||
`,[E("state-border",`
|
||
box-shadow: var(--n-box-shadow-focus-${e});
|
||
border: var(--n-border-focus-${e});
|
||
`)]),U("focus",`
|
||
background-color: var(--n-color-focus-${e});
|
||
`,[E("state-border",`
|
||
box-shadow: var(--n-box-shadow-focus-${e});
|
||
border: var(--n-border-focus-${e});
|
||
`)])])]))]),zf=k("input",[U("disabled",[E("input-el, textarea-el",`
|
||
-webkit-text-fill-color: var(--n-text-color-disabled);
|
||
`)])]),If=Object.assign(Object.assign({},ne.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:"text"},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:Function,onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:Boolean,showPasswordToggle:Boolean}),ft=K({name:"Input",props:If,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:r,inlineThemeDisabled:n,mergedRtlRef:o}=_e(e),i=ne("Input","-input",$f,Sf,e,t);il&&mo("-input-safari",zf,t);const l=L(null),d=L(null),a=L(null),s=L(null),c=L(null),f=L(null),h=L(null),p=kf(h),y=L(null),{localeRef:C}=Zr("Input"),x=L(e.defaultValue),b=J(e,"value"),S=nr(b,x),_=yo(e),{mergedSizeRef:m,mergedDisabledRef:g,mergedStatusRef:M}=_,$=L(!1),A=L(!1),z=L(!1),B=L(!1);let R=null;const O=D(()=>{const{placeholder:v,pair:T}=e;return T?Array.isArray(v)?v:v===void 0?["",""]:[v,v]:v===void 0?[C.value.placeholder]:[v]}),I=D(()=>{const{value:v}=z,{value:T}=S,{value:X}=O;return!v&&(jt(T)||Array.isArray(T)&&jt(T[0]))&&X[0]}),w=D(()=>{const{value:v}=z,{value:T}=S,{value:X}=O;return!v&&X[1]&&(jt(T)||Array.isArray(T)&&jt(T[1]))}),P=Ae(()=>e.internalForceFocus||$.value),N=Ae(()=>{if(g.value||e.readonly||!e.clearable||!P.value&&!A.value)return!1;const{value:v}=S,{value:T}=P;return e.pair?!!(Array.isArray(v)&&(v[0]||v[1]))&&(A.value||T):!!v&&(A.value||T)}),F=D(()=>{const{showPasswordOn:v}=e;if(v)return v;if(e.showPasswordToggle)return"click"}),q=L(!1),Q=D(()=>{const{textDecoration:v}=e;return v?Array.isArray(v)?v.map(T=>({textDecoration:T})):[{textDecoration:v}]:["",""]}),ae=L(void 0),me=()=>{var v,T;if(e.type==="textarea"){const{autosize:X}=e;if(X&&(ae.value=(T=(v=y.value)===null||v===void 0?void 0:v.$el)===null||T===void 0?void 0:T.offsetWidth),!d.value||typeof X=="boolean")return;const{paddingTop:ue,paddingBottom:be,lineHeight:de}=window.getComputedStyle(d.value),tt=Number(ue.slice(0,-2)),rt=Number(be.slice(0,-2)),nt=Number(de.slice(0,-2)),{value:Ct}=a;if(!Ct)return;if(X.minRows){const St=Math.max(X.minRows,1),ur=`${tt+rt+nt*St}px`;Ct.style.minHeight=ur}if(X.maxRows){const St=`${tt+rt+nt*X.maxRows}px`;Ct.style.maxHeight=St}}},ve=D(()=>{const{maxlength:v}=e;return v===void 0?void 0:Number(v)});Ue(()=>{const{value:v}=S;Array.isArray(v)||dr(v)});const we=Dr().proxy;function re(v){const{onUpdateValue:T,"onUpdate:value":X,onInput:ue}=e,{nTriggerFormInput:be}=_;T&&ce(T,v),X&&ce(X,v),ue&&ce(ue,v),x.value=v,be()}function ze(v){const{onChange:T}=e,{nTriggerFormChange:X}=_;T&&ce(T,v),x.value=v,X()}function xe(v){const{onBlur:T}=e,{nTriggerFormBlur:X}=_;T&&ce(T,v),X()}function ee(v){const{onFocus:T}=e,{nTriggerFormFocus:X}=_;T&&ce(T,v),X()}function De(v){const{onClear:T}=e;T&&ce(T,v)}function qe(v){const{onInputBlur:T}=e;T&&ce(T,v)}function Ge(v){const{onInputFocus:T}=e;T&&ce(T,v)}function Fe(){const{onDeactivate:v}=e;v&&ce(v)}function W(){const{onActivate:v}=e;v&&ce(v)}function Y(v){const{onClick:T}=e;T&&ce(T,v)}function V(v){const{onWrapperFocus:T}=e;T&&ce(T,v)}function le(v){const{onWrapperBlur:T}=e;T&&ce(T,v)}function se(){z.value=!0}function Ie(v){z.value=!1,v.target===f.value?Ce(v,1):Ce(v,0)}function Ce(v,T=0,X="input"){const ue=v.target.value;if(dr(ue),v instanceof InputEvent&&!v.isComposing&&(z.value=!1),e.type==="textarea"){const{value:de}=y;de&&de.syncUnifiedContainer()}if(R=ue,z.value)return;p.recordCursor();const be=Oe(ue);if(be)if(!e.pair)X==="input"?re(ue):ze(ue);else{let{value:de}=S;Array.isArray(de)?de=[de[0],de[1]]:de=["",""],de[T]=ue,X==="input"?re(de):ze(de)}we.$forceUpdate(),be||Gt(p.restoreCursor)}function Oe(v){const{countGraphemes:T,maxlength:X,minlength:ue}=e;if(T){let de;if(X!==void 0&&(de===void 0&&(de=T(v)),de>Number(X))||ue!==void 0&&(de===void 0&&(de=T(v)),de<Number(X)))return!1}const{allowInput:be}=e;return typeof be=="function"?be(v):!0}function je(v){qe(v),v.relatedTarget===l.value&&Fe(),v.relatedTarget!==null&&(v.relatedTarget===c.value||v.relatedTarget===f.value||v.relatedTarget===d.value)||(B.value=!1),Et(v,"blur"),h.value=null}function Ii(v,T){Ge(v),$.value=!0,B.value=!0,W(),Et(v,"focus"),T===0?h.value=c.value:T===1?h.value=f.value:T===2&&(h.value=d.value)}function Ti(v){e.passivelyActivated&&(le(v),Et(v,"blur"))}function Ri(v){e.passivelyActivated&&($.value=!0,V(v),Et(v,"focus"))}function Et(v,T){v.relatedTarget!==null&&(v.relatedTarget===c.value||v.relatedTarget===f.value||v.relatedTarget===d.value||v.relatedTarget===l.value)||(T==="focus"?(ee(v),$.value=!0):T==="blur"&&(xe(v),$.value=!1))}function _i(v,T){Ce(v,T,"change")}function Oi(v){Y(v)}function Bi(v){De(v),e.pair?(re(["",""]),ze(["",""])):(re(""),ze(""))}function Mi(v){const{onMousedown:T}=e;T&&T(v);const{tagName:X}=v.target;if(X!=="INPUT"&&X!=="TEXTAREA"){if(e.resizable){const{value:ue}=l;if(ue){const{left:be,top:de,width:tt,height:rt}=ue.getBoundingClientRect(),nt=14;if(be+tt-nt<v.clientX&&v.clientX<be+tt&&de+rt-nt<v.clientY&&v.clientY<de+rt)return}}v.preventDefault(),$.value||an()}}function Li(){var v;A.value=!0,e.type==="textarea"&&((v=y.value)===null||v===void 0||v.handleMouseEnterWrapper())}function Ei(){var v;A.value=!1,e.type==="textarea"&&((v=y.value)===null||v===void 0||v.handleMouseLeaveWrapper())}function Ai(){g.value||F.value==="click"&&(q.value=!q.value)}function Di(v){if(g.value)return;v.preventDefault();const T=ue=>{ue.preventDefault(),Pe("mouseup",document,T)};if(Re("mouseup",document,T),F.value!=="mousedown")return;q.value=!0;const X=()=>{q.value=!1,Pe("mouseup",document,X)};Re("mouseup",document,X)}function Fi(v){var T;switch((T=e.onKeydown)===null||T===void 0||T.call(e,v),v.key){case"Escape":sr();break;case"Enter":Ni(v);break}}function Ni(v){var T,X;if(e.passivelyActivated){const{value:ue}=B;if(ue){e.internalDeactivateOnEnter&&sr();return}v.preventDefault(),e.type==="textarea"?(T=d.value)===null||T===void 0||T.focus():(X=c.value)===null||X===void 0||X.focus()}}function sr(){e.passivelyActivated&&(B.value=!1,Gt(()=>{var v;(v=l.value)===null||v===void 0||v.focus()}))}function an(){var v,T,X;g.value||(e.passivelyActivated?(v=l.value)===null||v===void 0||v.focus():((T=d.value)===null||T===void 0||T.focus(),(X=c.value)===null||X===void 0||X.focus()))}function Hi(){var v;!((v=l.value)===null||v===void 0)&&v.contains(document.activeElement)&&document.activeElement.blur()}function ji(){var v,T;(v=d.value)===null||v===void 0||v.select(),(T=c.value)===null||T===void 0||T.select()}function Wi(){g.value||(d.value?d.value.focus():c.value&&c.value.focus())}function Ui(){const{value:v}=l;v!=null&&v.contains(document.activeElement)&&v!==document.activeElement&&sr()}function Vi(v){if(e.type==="textarea"){const{value:T}=d;T==null||T.scrollTo(v)}else{const{value:T}=c;T==null||T.scrollTo(v)}}function dr(v){const{type:T,pair:X,autosize:ue}=e;if(!X&&ue)if(T==="textarea"){const{value:be}=a;be&&(be.textContent=(v??"")+`\r
|
||
`)}else{const{value:be}=s;be&&(v?be.textContent=v:be.innerHTML=" ")}}function Ki(){me()}const ln=L({top:"0"});function qi(v){var T;const{scrollTop:X}=v.target;ln.value.top=`${-X}px`,(T=y.value)===null||T===void 0||T.syncUnifiedContainer()}let At=null;lt(()=>{const{autosize:v,type:T}=e;v&&T==="textarea"?At=Se(S,X=>{!Array.isArray(X)&&X!==R&&dr(X)}):At==null||At()});let Dt=null;lt(()=>{e.type==="textarea"?Dt=Se(S,v=>{var T;!Array.isArray(v)&&v!==R&&((T=y.value)===null||T===void 0||T.syncUnifiedContainer())}):Dt==null||Dt()}),ke(ai,{mergedValueRef:S,maxlengthRef:ve,mergedClsPrefixRef:t,countGraphemesRef:J(e,"countGraphemes")});const Gi={wrapperElRef:l,inputElRef:c,textareaElRef:d,isCompositing:z,focus:an,blur:Hi,select:ji,deactivate:Ui,activate:Wi,scrollTo:Vi},Xi=Ot("Input",o,t),sn=D(()=>{const{value:v}=m,{common:{cubicBezierEaseInOut:T},self:{color:X,borderRadius:ue,textColor:be,caretColor:de,caretColorError:tt,caretColorWarning:rt,textDecorationColor:nt,border:Ct,borderDisabled:St,borderHover:ur,borderFocus:Yi,placeholderColor:Zi,placeholderColorDisabled:Ji,lineHeightTextarea:Qi,colorDisabled:ea,colorFocus:ta,textColorDisabled:ra,boxShadowFocus:na,iconSize:oa,colorFocusWarning:ia,boxShadowFocusWarning:aa,borderWarning:la,borderFocusWarning:sa,borderHoverWarning:da,colorFocusError:ua,boxShadowFocusError:ca,borderError:fa,borderFocusError:ha,borderHoverError:pa,clearSize:va,clearColor:ga,clearColorHover:ma,clearColorPressed:ba,iconColor:ya,iconColorDisabled:wa,suffixTextColor:xa,countTextColor:Ca,countTextColorDisabled:Sa,iconColorHover:Pa,iconColorPressed:ka,loadingColor:$a,loadingColorError:za,loadingColorWarning:Ia,[oe("padding",v)]:Ta,[oe("fontSize",v)]:Ra,[oe("height",v)]:_a}}=i.value,{left:Oa,right:Ba}=sl(Ta);return{"--n-bezier":T,"--n-count-text-color":Ca,"--n-count-text-color-disabled":Sa,"--n-color":X,"--n-font-size":Ra,"--n-border-radius":ue,"--n-height":_a,"--n-padding-left":Oa,"--n-padding-right":Ba,"--n-text-color":be,"--n-caret-color":de,"--n-text-decoration-color":nt,"--n-border":Ct,"--n-border-disabled":St,"--n-border-hover":ur,"--n-border-focus":Yi,"--n-placeholder-color":Zi,"--n-placeholder-color-disabled":Ji,"--n-icon-size":oa,"--n-line-height-textarea":Qi,"--n-color-disabled":ea,"--n-color-focus":ta,"--n-text-color-disabled":ra,"--n-box-shadow-focus":na,"--n-loading-color":$a,"--n-caret-color-warning":rt,"--n-color-focus-warning":ia,"--n-box-shadow-focus-warning":aa,"--n-border-warning":la,"--n-border-focus-warning":sa,"--n-border-hover-warning":da,"--n-loading-color-warning":Ia,"--n-caret-color-error":tt,"--n-color-focus-error":ua,"--n-box-shadow-focus-error":ca,"--n-border-error":fa,"--n-border-focus-error":ha,"--n-border-hover-error":pa,"--n-loading-color-error":za,"--n-clear-color":ga,"--n-clear-size":va,"--n-clear-color-hover":ma,"--n-clear-color-pressed":ba,"--n-icon-color":ya,"--n-icon-color-hover":Pa,"--n-icon-color-pressed":ka,"--n-icon-color-disabled":wa,"--n-suffix-text-color":xa}}),st=n?He("input",D(()=>{const{value:v}=m;return v[0]}),sn,e):void 0;return Object.assign(Object.assign({},Gi),{wrapperElRef:l,inputElRef:c,inputMirrorElRef:s,inputEl2Ref:f,textareaElRef:d,textareaMirrorElRef:a,textareaScrollbarInstRef:y,rtlEnabled:Xi,uncontrolledValue:x,mergedValue:S,passwordVisible:q,mergedPlaceholder:O,showPlaceholder1:I,showPlaceholder2:w,mergedFocus:P,isComposing:z,activated:B,showClearButton:N,mergedSize:m,mergedDisabled:g,textDecorationStyle:Q,mergedClsPrefix:t,mergedBordered:r,mergedShowPasswordOn:F,placeholderStyle:ln,mergedStatus:M,textAreaScrollContainerWidth:ae,handleTextAreaScroll:qi,handleCompositionStart:se,handleCompositionEnd:Ie,handleInput:Ce,handleInputBlur:je,handleInputFocus:Ii,handleWrapperBlur:Ti,handleWrapperFocus:Ri,handleMouseEnter:Li,handleMouseLeave:Ei,handleMouseDown:Mi,handleChange:_i,handleClick:Oi,handleClear:Bi,handlePasswordToggleClick:Ai,handlePasswordToggleMousedown:Di,handleWrapperKeydown:Fi,handleTextAreaMirrorResize:Ki,getTextareaScrollContainer:()=>d.value,mergedTheme:i,cssVars:n?void 0:sn,themeClass:st==null?void 0:st.themeClass,onRender:st==null?void 0:st.onRender})},render(){var e,t;const{mergedClsPrefix:r,mergedStatus:n,themeClass:o,type:i,countGraphemes:l,onRender:d}=this,a=this.$slots;return d==null||d(),u("div",{ref:"wrapperElRef",class:[`${r}-input`,o,n&&`${r}-input--${n}-status`,{[`${r}-input--rtl`]:this.rtlEnabled,[`${r}-input--disabled`]:this.mergedDisabled,[`${r}-input--textarea`]:i==="textarea",[`${r}-input--resizable`]:this.resizable&&!this.autosize,[`${r}-input--autosize`]:this.autosize,[`${r}-input--round`]:this.round&&i!=="textarea",[`${r}-input--pair`]:this.pair,[`${r}-input--focus`]:this.mergedFocus,[`${r}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.onKeyup,onKeydown:this.handleWrapperKeydown},u("div",{class:`${r}-input-wrapper`},Ye(a.prefix,s=>s&&u("div",{class:`${r}-input__prefix`},s)),i==="textarea"?u(al,{ref:"textareaScrollbarInstRef",class:`${r}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{var s,c;const{textAreaScrollContainerWidth:f}=this,h={width:this.autosize&&f&&`${f}px`};return u(Ne,null,u("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:[`${r}-input__textarea-el`,(s=this.inputProps)===null||s===void 0?void 0:s.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],(c=this.inputProps)===null||c===void 0?void 0:c.style,h],onBlur:this.handleInputBlur,onFocus:p=>this.handleInputFocus(p,2),onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?u("div",{class:`${r}-input__placeholder`,style:[this.placeholderStyle,h],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?u(ll,{onResize:this.handleTextAreaMirrorResize},{default:()=>u("div",{ref:"textareaMirrorElRef",class:`${r}-input__textarea-mirror`,key:"mirror"})}):null)}}):u("div",{class:`${r}-input__input`},u("input",Object.assign({type:i==="password"&&this.mergedShowPasswordOn&&this.passwordVisible?"text":i},this.inputProps,{ref:"inputElRef",class:[`${r}-input__input-el`,(e=this.inputProps)===null||e===void 0?void 0:e.class],style:[this.textDecorationStyle[0],(t=this.inputProps)===null||t===void 0?void 0:t.style],tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:s=>this.handleInputFocus(s,0),onInput:s=>this.handleInput(s,0),onChange:s=>this.handleChange(s,0)})),this.showPlaceholder1?u("div",{class:`${r}-input__placeholder`},u("span",null,this.mergedPlaceholder[0])):null,this.autosize?u("div",{class:`${r}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&Ye(a.suffix,s=>s||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?u("div",{class:`${r}-input__suffix`},[Ye(a["clear-icon-placeholder"],c=>(this.clearable||c)&&u(Or,{clsPrefix:r,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>c,icon:()=>{var f,h;return(h=(f=this.$slots)["clear-icon"])===null||h===void 0?void 0:h.call(f)}})),this.internalLoadingBeforeSuffix?null:s,this.loading!==void 0?u(yf,{clsPrefix:r,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?s:null,this.showCount&&this.type!=="textarea"?u(Kn,null,{default:c=>{var f;return(f=a.count)===null||f===void 0?void 0:f.call(a,c)}}):null,this.mergedShowPasswordOn&&this.type==="password"?u("div",{class:`${r}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?pt(a["password-visible-icon"],()=>[u(fe,{clsPrefix:r},{default:()=>u(Qo,null)})]):pt(a["password-invisible-icon"],()=>[u(fe,{clsPrefix:r},{default:()=>u(uc,null)})])):null]):null)),this.pair?u("span",{class:`${r}-input__separator`},pt(a.separator,()=>[this.separator])):null,this.pair?u("div",{class:`${r}-input-wrapper`},u("div",{class:`${r}-input__input`},u("input",{ref:"inputEl2Ref",type:this.type,class:`${r}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:s=>this.handleInputFocus(s,1),onInput:s=>this.handleInput(s,1),onChange:s=>this.handleChange(s,1)}),this.showPlaceholder2?u("div",{class:`${r}-input__placeholder`},u("span",null,this.mergedPlaceholder[1])):null),Ye(a.suffix,s=>(this.clearable||s)&&u("div",{class:`${r}-input__suffix`},[this.clearable&&u(Or,{clsPrefix:r,show:this.showClearButton,onClear:this.handleClear},{icon:()=>{var c;return(c=a["clear-icon"])===null||c===void 0?void 0:c.call(a)},placeholder:()=>{var c;return(c=a["clear-icon-placeholder"])===null||c===void 0?void 0:c.call(a)}}),s]))):null,this.mergedBordered?u("div",{class:`${r}-input__border`}):null,this.mergedBordered?u("div",{class:`${r}-input__state-border`}):null,this.showCount&&i==="textarea"?u(Kn,null,{default:s=>{var c;const{renderCount:f}=this;return f?f(s):(c=a.count)===null||c===void 0?void 0:c.call(a,s)}}):null)}}),wr=Ur&&"loading"in document.createElement("img"),Tf=(e={})=>{var t;const{root:r=null}=e;return{hash:`${e.rootMargin||"0px 0px 0px 0px"}-${Array.isArray(e.threshold)?e.threshold.join(","):(t=e.threshold)!==null&&t!==void 0?t:"0"}`,options:Object.assign(Object.assign({},e),{root:(typeof r=="string"?document.querySelector(r):r)||document.documentElement})}},xr=new WeakMap,Cr=new WeakMap,Sr=new WeakMap,Rf=(e,t,r)=>{if(!e)return()=>{};const n=Tf(t),{root:o}=n.options;let i;const l=xr.get(o);l?i=l:(i=new Map,xr.set(o,i));let d,a;i.has(n.hash)?(a=i.get(n.hash),a[1].has(e)||(d=a[0],a[1].add(e),d.observe(e))):(d=new IntersectionObserver(f=>{f.forEach(h=>{if(h.isIntersecting){const p=Cr.get(h.target),y=Sr.get(h.target);p&&p(),y&&(y.value=!0)}})},n.options),d.observe(e),a=[d,new Set([e])],i.set(n.hash,a));let s=!1;const c=()=>{s||(Cr.delete(e),Sr.delete(e),s=!0,a[1].has(e)&&(a[0].unobserve(e),a[1].delete(e)),a[1].size<=0&&i.delete(n.hash),i.size||xr.delete(o))};return Cr.set(e,c),Sr.set(e,r),c},_f={padding:"8px 14px"},Of=e=>{const{borderRadius:t,boxShadow2:r,baseColor:n}=e;return Object.assign(Object.assign({},_f),{borderRadius:t,boxShadow:r,color:$t(n,"rgba(0, 0, 0, .85)"),textColor:n})},Bf=Bt({name:"Tooltip",common:Be,peers:{Popover:en},self:Of}),tn=Bf,Mf=Bt({name:"Ellipsis",common:Be,peers:{Tooltip:tn}}),Lf=Mf,Ef={padding:"4px 0",optionIconSizeSmall:"14px",optionIconSizeMedium:"16px",optionIconSizeLarge:"16px",optionIconSizeHuge:"18px",optionSuffixWidthSmall:"14px",optionSuffixWidthMedium:"14px",optionSuffixWidthLarge:"16px",optionSuffixWidthHuge:"16px",optionIconSuffixWidthSmall:"32px",optionIconSuffixWidthMedium:"32px",optionIconSuffixWidthLarge:"36px",optionIconSuffixWidthHuge:"36px",optionPrefixWidthSmall:"14px",optionPrefixWidthMedium:"14px",optionPrefixWidthLarge:"16px",optionPrefixWidthHuge:"16px",optionIconPrefixWidthSmall:"36px",optionIconPrefixWidthMedium:"36px",optionIconPrefixWidthLarge:"40px",optionIconPrefixWidthHuge:"40px"},Af=e=>{const{primaryColor:t,textColor2:r,dividerColor:n,hoverColor:o,popoverColor:i,invertedColor:l,borderRadius:d,fontSizeSmall:a,fontSizeMedium:s,fontSizeLarge:c,fontSizeHuge:f,heightSmall:h,heightMedium:p,heightLarge:y,heightHuge:C,textColor3:x,opacityDisabled:b}=e;return Object.assign(Object.assign({},Ef),{optionHeightSmall:h,optionHeightMedium:p,optionHeightLarge:y,optionHeightHuge:C,borderRadius:d,fontSizeSmall:a,fontSizeMedium:s,fontSizeLarge:c,fontSizeHuge:f,optionTextColor:r,optionTextColorHover:r,optionTextColorActive:t,optionTextColorChildActive:t,color:i,dividerColor:n,suffixColor:r,prefixColor:r,optionColorHover:o,optionColorActive:te(t,{alpha:.1}),groupHeaderTextColor:x,optionTextColorInverted:"#BBB",optionTextColorHoverInverted:"#FFF",optionTextColorActiveInverted:"#FFF",optionTextColorChildActiveInverted:"#FFF",colorInverted:l,dividerColorInverted:"#BBB",suffixColorInverted:"#BBB",prefixColorInverted:"#BBB",optionColorHoverInverted:t,optionColorActiveInverted:t,groupHeaderTextColorInverted:"#AAA",optionOpacityDisabled:b})},Df=Bt({name:"Dropdown",common:Be,peers:{Popover:en},self:Af}),Ff=Df,Nf=Object.assign(Object.assign({},ir),ne.props),li=K({name:"Tooltip",props:Nf,__popover__:!0,setup(e){const t=ne("Tooltip","-tooltip",void 0,tn,e),r=L(null);return Object.assign(Object.assign({},{syncPosition(){r.value.syncPosition()},setShow(o){r.value.setShow(o)}}),{popoverRef:r,mergedTheme:t,popoverThemeOverrides:D(()=>t.value.self)})},render(){const{mergedTheme:e,internalExtraClass:t}=this;return u(oi,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:t.concat("tooltip"),ref:"popoverRef"}),this.$slots)}}),Hf=k("ellipsis",{overflow:"hidden"},[Te("line-clamp",`
|
||
white-space: nowrap;
|
||
display: inline-block;
|
||
vertical-align: bottom;
|
||
max-width: 100%;
|
||
`),U("line-clamp",`
|
||
display: -webkit-inline-box;
|
||
-webkit-box-orient: vertical;
|
||
`),U("cursor-pointer",`
|
||
cursor: pointer;
|
||
`)]);function qn(e){return`${e}-ellipsis--line-clamp`}function Gn(e,t){return`${e}-ellipsis--cursor-${t}`}const jf=Object.assign(Object.assign({},ne.props),{expandTrigger:String,lineClamp:[Number,String],tooltip:{type:[Boolean,Object],default:!0}}),si=K({name:"Ellipsis",inheritAttrs:!1,props:jf,setup(e,{slots:t,attrs:r}){const{mergedClsPrefixRef:n}=_e(e),o=ne("Ellipsis","-ellipsis",Hf,Lf,e,n),i=L(null),l=L(null),d=L(null),a=L(!1),s=D(()=>{const{lineClamp:x}=e,{value:b}=a;return x!==void 0?{textOverflow:"","-webkit-line-clamp":b?"":x}:{textOverflow:b?"":"ellipsis","-webkit-line-clamp":""}});function c(){let x=!1;const{value:b}=a;if(b)return!0;const{value:S}=i;if(S){const{lineClamp:_}=e;if(p(S),_!==void 0)x=S.scrollHeight<=S.offsetHeight;else{const{value:m}=l;m&&(x=m.getBoundingClientRect().width<=S.getBoundingClientRect().width)}y(S,x)}return x}const f=D(()=>e.expandTrigger==="click"?()=>{var x;const{value:b}=a;b&&((x=d.value)===null||x===void 0||x.setShow(!1)),a.value=!b}:void 0);dl(()=>{var x;e.tooltip&&((x=d.value)===null||x===void 0||x.setShow(!1))});const h=()=>u("span",Object.assign({},_t(r,{class:[`${n.value}-ellipsis`,e.lineClamp!==void 0?qn(n.value):void 0,e.expandTrigger==="click"?Gn(n.value,"pointer"):void 0],style:s.value}),{ref:"triggerRef",onClick:f.value,onMouseenter:e.expandTrigger==="click"?c:void 0}),e.lineClamp?t:u("span",{ref:"triggerInnerRef"},t));function p(x){if(!x)return;const b=s.value,S=qn(n.value);e.lineClamp!==void 0?C(x,S,"add"):C(x,S,"remove");for(const _ in b)x.style[_]!==b[_]&&(x.style[_]=b[_])}function y(x,b){const S=Gn(n.value,"pointer");e.expandTrigger==="click"&&!b?C(x,S,"add"):C(x,S,"remove")}function C(x,b,S){S==="add"?x.classList.contains(b)||x.classList.add(b):x.classList.contains(b)&&x.classList.remove(b)}return{mergedTheme:o,triggerRef:i,triggerInnerRef:l,tooltipRef:d,handleClick:f,renderTrigger:h,getTooltipDisabled:c}},render(){var e;const{tooltip:t,renderTrigger:r,$slots:n}=this;if(t){const{mergedTheme:o}=this;return u(li,Object.assign({ref:"tooltipRef",placement:"top"},t,{getDisabled:this.getTooltipDisabled,theme:o.peers.Tooltip,themeOverrides:o.peerOverrides.Tooltip}),{trigger:r,default:(e=n.tooltip)!==null&&e!==void 0?e:n.default})}else return r()}}),di=K({name:"DropdownDivider",props:{clsPrefix:{type:String,required:!0}},render(){return u("div",{class:`${this.clsPrefix}-dropdown-divider`})}}),Wf=e=>{const{textColorBase:t,opacity1:r,opacity2:n,opacity3:o,opacity4:i,opacity5:l}=e;return{color:t,opacity1Depth:r,opacity2Depth:n,opacity3Depth:o,opacity4Depth:i,opacity5Depth:l}},Uf={name:"Icon",common:Be,self:Wf},Vf=Uf,Kf=k("icon",`
|
||
height: 1em;
|
||
width: 1em;
|
||
line-height: 1em;
|
||
text-align: center;
|
||
display: inline-block;
|
||
position: relative;
|
||
fill: currentColor;
|
||
transform: translateZ(0);
|
||
`,[U("color-transition",{transition:"color .3s var(--n-bezier)"}),U("depth",{color:"var(--n-color)"},[j("svg",{opacity:"var(--n-opacity)",transition:"opacity .3s var(--n-bezier)"})]),j("svg",{height:"1em",width:"1em"})]),qf=Object.assign(Object.assign({},ne.props),{depth:[String,Number],size:[Number,String],color:String,component:Object}),Gf=K({_n_icon__:!0,name:"Icon",inheritAttrs:!1,props:qf,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r}=_e(e),n=ne("Icon","-icon",Kf,Vf,e,t),o=D(()=>{const{depth:l}=e,{common:{cubicBezierEaseInOut:d},self:a}=n.value;if(l!==void 0){const{color:s,[`opacity${l}Depth`]:c}=a;return{"--n-bezier":d,"--n-color":s,"--n-opacity":c}}return{"--n-bezier":d,"--n-color":"","--n-opacity":""}}),i=r?He("icon",D(()=>`${e.depth||"d"}`),o,e):void 0;return{mergedClsPrefix:t,mergedStyle:D(()=>{const{size:l,color:d}=e;return{fontSize:We(l),color:d}}),cssVars:r?void 0:o,themeClass:i==null?void 0:i.themeClass,onRender:i==null?void 0:i.onRender}},render(){var e;const{$parent:t,depth:r,mergedClsPrefix:n,component:o,onRender:i,themeClass:l}=this;return!((e=t==null?void 0:t.$options)===null||e===void 0)&&e._n_icon__&&Vr("icon","don't wrap `n-icon` inside `n-icon`"),i==null||i(),u("i",_t(this.$attrs,{role:"img",class:[`${n}-icon`,l,{[`${n}-icon--depth`]:r,[`${n}-icon--color-transition`]:r!==void 0}],style:[this.cssVars,this.mergedStyle]}),o?u(o):this.$slots)}}),rn=Ve("n-dropdown-menu"),ar=Ve("n-dropdown"),Xn=Ve("n-dropdown-option");function Br(e,t){return e.type==="submenu"||e.type===void 0&&e[t]!==void 0}function Xf(e){return e.type==="group"}function ui(e){return e.type==="divider"}function Yf(e){return e.type==="render"}const ci=K({name:"DropdownOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null},placement:{type:String,default:"right-start"},props:Object,scrollable:Boolean},setup(e){const t=ie(ar),{hoverKeyRef:r,keyboardKeyRef:n,lastToggledSubmenuKeyRef:o,pendingKeyPathRef:i,activeKeyPathRef:l,animatedRef:d,mergedShowRef:a,renderLabelRef:s,renderIconRef:c,labelFieldRef:f,childrenFieldRef:h,renderOptionRef:p,nodePropsRef:y,menuPropsRef:C}=t,x=ie(Xn,null),b=ie(rn),S=ie(er),_=D(()=>e.tmNode.rawNode),m=D(()=>{const{value:F}=h;return Br(e.tmNode.rawNode,F)}),g=D(()=>{const{disabled:F}=e.tmNode;return F}),M=D(()=>{if(!m.value)return!1;const{key:F,disabled:q}=e.tmNode;if(q)return!1;const{value:Q}=r,{value:ae}=n,{value:me}=o,{value:ve}=i;return Q!==null?ve.includes(F):ae!==null?ve.includes(F)&&ve[ve.length-1]!==F:me!==null?ve.includes(F):!1}),$=D(()=>n.value===null&&!d.value),A=Rl(M,300,$),z=D(()=>!!(x!=null&&x.enteringSubmenuRef.value)),B=L(!1);ke(Xn,{enteringSubmenuRef:B});function R(){B.value=!0}function O(){B.value=!1}function I(){const{parentKey:F,tmNode:q}=e;q.disabled||a.value&&(o.value=F,n.value=null,r.value=q.key)}function w(){const{tmNode:F}=e;F.disabled||a.value&&r.value!==F.key&&I()}function P(F){if(e.tmNode.disabled||!a.value)return;const{relatedTarget:q}=F;q&&!Sn({target:q},"dropdownOption")&&!Sn({target:q},"scrollbarRail")&&(r.value=null)}function N(){const{value:F}=m,{tmNode:q}=e;a.value&&!F&&!q.disabled&&(t.doSelect(q.key,q.rawNode),t.doUpdateShow(!1))}return{labelField:f,renderLabel:s,renderIcon:c,siblingHasIcon:b.showIconRef,siblingHasSubmenu:b.hasSubmenuRef,menuProps:C,popoverBody:S,animated:d,mergedShowSubmenu:D(()=>A.value&&!z.value),rawNode:_,hasSubmenu:m,pending:Ae(()=>{const{value:F}=i,{key:q}=e.tmNode;return F.includes(q)}),childActive:Ae(()=>{const{value:F}=l,{key:q}=e.tmNode,Q=F.findIndex(ae=>q===ae);return Q===-1?!1:Q<F.length-1}),active:Ae(()=>{const{value:F}=l,{key:q}=e.tmNode,Q=F.findIndex(ae=>q===ae);return Q===-1?!1:Q===F.length-1}),mergedDisabled:g,renderOption:p,nodeProps:y,handleClick:N,handleMouseMove:w,handleMouseEnter:I,handleMouseLeave:P,handleSubmenuBeforeEnter:R,handleSubmenuAfterEnter:O}},render(){var e,t;const{animated:r,rawNode:n,mergedShowSubmenu:o,clsPrefix:i,siblingHasIcon:l,siblingHasSubmenu:d,renderLabel:a,renderIcon:s,renderOption:c,nodeProps:f,props:h,scrollable:p}=this;let y=null;if(o){const S=(e=this.menuProps)===null||e===void 0?void 0:e.call(this,n,n.children);y=u(fi,Object.assign({},S,{clsPrefix:i,scrollable:this.scrollable,tmNodes:this.tmNode.children,parentKey:this.tmNode.key}))}const C={class:[`${i}-dropdown-option-body`,this.pending&&`${i}-dropdown-option-body--pending`,this.active&&`${i}-dropdown-option-body--active`,this.childActive&&`${i}-dropdown-option-body--child-active`,this.mergedDisabled&&`${i}-dropdown-option-body--disabled`],onMousemove:this.handleMouseMove,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onClick:this.handleClick},x=f==null?void 0:f(n),b=u("div",Object.assign({class:[`${i}-dropdown-option`,x==null?void 0:x.class],"data-dropdown-option":!0},x),u("div",_t(C,h),[u("div",{class:[`${i}-dropdown-option-body__prefix`,l&&`${i}-dropdown-option-body__prefix--show-icon`]},[s?s(n):Xt(n.icon)]),u("div",{"data-dropdown-option":!0,class:`${i}-dropdown-option-body__label`},a?a(n):Xt((t=n[this.labelField])!==null&&t!==void 0?t:n.title)),u("div",{"data-dropdown-option":!0,class:[`${i}-dropdown-option-body__suffix`,d&&`${i}-dropdown-option-body__suffix--has-submenu`]},this.hasSubmenu?u(Gf,null,{default:()=>u(dc,null)}):null)]),this.hasSubmenu?u(Oo,null,{default:()=>[u(Bo,null,{default:()=>u("div",{class:`${i}-dropdown-offset-container`},u(Mo,{show:this.mergedShowSubmenu,placement:this.placement,to:p&&this.popoverBody||void 0,teleportDisabled:!p},{default:()=>u("div",{class:`${i}-dropdown-menu-wrapper`},r?u(zt,{onBeforeEnter:this.handleSubmenuBeforeEnter,onAfterEnter:this.handleSubmenuAfterEnter,name:"fade-in-scale-up-transition",appear:!0},{default:()=>y}):y)}))})]}):null);return c?c({node:b,option:n}):b}}),Zf=K({name:"DropdownGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{showIconRef:e,hasSubmenuRef:t}=ie(rn),{renderLabelRef:r,labelFieldRef:n,nodePropsRef:o,renderOptionRef:i}=ie(ar);return{labelField:n,showIcon:e,hasSubmenu:t,renderLabel:r,nodeProps:o,renderOption:i}},render(){var e;const{clsPrefix:t,hasSubmenu:r,showIcon:n,nodeProps:o,renderLabel:i,renderOption:l}=this,{rawNode:d}=this.tmNode,a=u("div",Object.assign({class:`${t}-dropdown-option`},o==null?void 0:o(d)),u("div",{class:`${t}-dropdown-option-body ${t}-dropdown-option-body--group`},u("div",{"data-dropdown-option":!0,class:[`${t}-dropdown-option-body__prefix`,n&&`${t}-dropdown-option-body__prefix--show-icon`]},Xt(d.icon)),u("div",{class:`${t}-dropdown-option-body__label`,"data-dropdown-option":!0},i?i(d):Xt((e=d.title)!==null&&e!==void 0?e:d[this.labelField])),u("div",{class:[`${t}-dropdown-option-body__suffix`,r&&`${t}-dropdown-option-body__suffix--has-submenu`],"data-dropdown-option":!0})));return l?l({node:a,option:d}):a}}),Jf=K({name:"NDropdownGroup",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null}},render(){const{tmNode:e,parentKey:t,clsPrefix:r}=this,{children:n}=e;return u(Ne,null,u(Zf,{clsPrefix:r,tmNode:e,key:e.key}),n==null?void 0:n.map(o=>{const{rawNode:i}=o;return i.show===!1?null:ui(i)?u(di,{clsPrefix:r,key:o.key}):o.isGroup?(Vr("dropdown","`group` node is not allowed to be put in `group` node."),null):u(ci,{clsPrefix:r,tmNode:o,parentKey:t,key:o.key})}))}}),Qf=K({name:"DropdownRenderOption",props:{tmNode:{type:Object,required:!0}},render(){const{rawNode:{render:e,props:t}}=this.tmNode;return u("div",t,[e==null?void 0:e()])}}),fi=K({name:"DropdownMenu",props:{scrollable:Boolean,showArrow:Boolean,arrowStyle:[String,Object],clsPrefix:{type:String,required:!0},tmNodes:{type:Array,default:()=>[]},parentKey:{type:[String,Number],default:null}},setup(e){const{renderIconRef:t,childrenFieldRef:r}=ie(ar);ke(rn,{showIconRef:D(()=>{const o=t.value;return e.tmNodes.some(i=>{var l;if(i.isGroup)return(l=i.children)===null||l===void 0?void 0:l.some(({rawNode:a})=>o?o(a):a.icon);const{rawNode:d}=i;return o?o(d):d.icon})}),hasSubmenuRef:D(()=>{const{value:o}=r;return e.tmNodes.some(i=>{var l;if(i.isGroup)return(l=i.children)===null||l===void 0?void 0:l.some(({rawNode:a})=>Br(a,o));const{rawNode:d}=i;return Br(d,o)})})});const n=L(null);return ke(Er,null),ke(Ar,null),ke(er,n),{bodyRef:n}},render(){const{parentKey:e,clsPrefix:t,scrollable:r}=this,n=this.tmNodes.map(o=>{const{rawNode:i}=o;return i.show===!1?null:Yf(i)?u(Qf,{tmNode:o,key:o.key}):ui(i)?u(di,{clsPrefix:t,key:o.key}):Xf(i)?u(Jf,{clsPrefix:t,tmNode:o,parentKey:e,key:o.key}):u(ci,{clsPrefix:t,tmNode:o,parentKey:e,key:o.key,props:i.props,scrollable:r})});return u("div",{class:[`${t}-dropdown-menu`,r&&`${t}-dropdown-menu--scrollable`],ref:"bodyRef"},r?u(po,{contentClass:`${t}-dropdown-menu__content`},{default:()=>n}):n,this.showArrow?ni({clsPrefix:t,arrowStyle:this.arrowStyle}):null)}}),eh=k("dropdown-menu",`
|
||
transform-origin: var(--v-transform-origin);
|
||
background-color: var(--n-color);
|
||
border-radius: var(--n-border-radius);
|
||
box-shadow: var(--n-box-shadow);
|
||
position: relative;
|
||
transition:
|
||
background-color .3s var(--n-bezier),
|
||
box-shadow .3s var(--n-bezier);
|
||
`,[wo(),k("dropdown-option",`
|
||
position: relative;
|
||
`,[j("a",`
|
||
text-decoration: none;
|
||
color: inherit;
|
||
outline: none;
|
||
`,[j("&::before",`
|
||
content: "";
|
||
position: absolute;
|
||
left: 0;
|
||
right: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
`)]),k("dropdown-option-body",`
|
||
display: flex;
|
||
cursor: pointer;
|
||
position: relative;
|
||
height: var(--n-option-height);
|
||
line-height: var(--n-option-height);
|
||
font-size: var(--n-font-size);
|
||
color: var(--n-option-text-color);
|
||
transition: color .3s var(--n-bezier);
|
||
`,[j("&::before",`
|
||
content: "";
|
||
position: absolute;
|
||
top: 0;
|
||
bottom: 0;
|
||
left: 4px;
|
||
right: 4px;
|
||
transition: background-color .3s var(--n-bezier);
|
||
border-radius: var(--n-border-radius);
|
||
`),Te("disabled",[U("pending",`
|
||
color: var(--n-option-text-color-hover);
|
||
`,[E("prefix, suffix",`
|
||
color: var(--n-option-text-color-hover);
|
||
`),j("&::before","background-color: var(--n-option-color-hover);")]),U("active",`
|
||
color: var(--n-option-text-color-active);
|
||
`,[E("prefix, suffix",`
|
||
color: var(--n-option-text-color-active);
|
||
`),j("&::before","background-color: var(--n-option-color-active);")]),U("child-active",`
|
||
color: var(--n-option-text-color-child-active);
|
||
`,[E("prefix, suffix",`
|
||
color: var(--n-option-text-color-child-active);
|
||
`)])]),U("disabled",`
|
||
cursor: not-allowed;
|
||
opacity: var(--n-option-opacity-disabled);
|
||
`),U("group",`
|
||
font-size: calc(var(--n-font-size) - 1px);
|
||
color: var(--n-group-header-text-color);
|
||
`,[E("prefix",`
|
||
width: calc(var(--n-option-prefix-width) / 2);
|
||
`,[U("show-icon",`
|
||
width: calc(var(--n-option-icon-prefix-width) / 2);
|
||
`)])]),E("prefix",`
|
||
width: var(--n-option-prefix-width);
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
color: var(--n-prefix-color);
|
||
transition: color .3s var(--n-bezier);
|
||
z-index: 1;
|
||
`,[U("show-icon",`
|
||
width: var(--n-option-icon-prefix-width);
|
||
`),k("icon",`
|
||
font-size: var(--n-option-icon-size);
|
||
`)]),E("label",`
|
||
white-space: nowrap;
|
||
flex: 1;
|
||
z-index: 1;
|
||
`),E("suffix",`
|
||
box-sizing: border-box;
|
||
flex-grow: 0;
|
||
flex-shrink: 0;
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
align-items: center;
|
||
min-width: var(--n-option-suffix-width);
|
||
padding: 0 8px;
|
||
transition: color .3s var(--n-bezier);
|
||
color: var(--n-suffix-color);
|
||
z-index: 1;
|
||
`,[U("has-submenu",`
|
||
width: var(--n-option-icon-suffix-width);
|
||
`),k("icon",`
|
||
font-size: var(--n-option-icon-size);
|
||
`)]),k("dropdown-menu","pointer-events: all;")]),k("dropdown-offset-container",`
|
||
pointer-events: none;
|
||
position: absolute;
|
||
left: 0;
|
||
right: 0;
|
||
top: -4px;
|
||
bottom: -4px;
|
||
`)]),k("dropdown-divider",`
|
||
transition: background-color .3s var(--n-bezier);
|
||
background-color: var(--n-divider-color);
|
||
height: 1px;
|
||
margin: 4px 0;
|
||
`),k("dropdown-menu-wrapper",`
|
||
transform-origin: var(--v-transform-origin);
|
||
width: fit-content;
|
||
`),j(">",[k("scrollbar",`
|
||
height: inherit;
|
||
max-height: inherit;
|
||
`)]),Te("scrollable",`
|
||
padding: var(--n-padding);
|
||
`),U("scrollable",[E("content",`
|
||
padding: var(--n-padding);
|
||
`)])]),th={animated:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},size:{type:String,default:"medium"},inverted:Boolean,placement:{type:String,default:"bottom"},onSelect:[Function,Array],options:{type:Array,default:()=>[]},menuProps:Function,showArrow:Boolean,renderLabel:Function,renderIcon:Function,renderOption:Function,nodeProps:Function,labelField:{type:String,default:"label"},keyField:{type:String,default:"key"},childrenField:{type:String,default:"children"},value:[String,Number]},rh=Object.keys(ir),nh=Object.assign(Object.assign(Object.assign({},ir),th),ne.props),Yn=K({name:"Dropdown",inheritAttrs:!1,props:nh,setup(e){const t=L(!1),r=nr(J(e,"show"),t),n=D(()=>{const{keyField:O,childrenField:I}=e;return Kc(e.options,{getKey(w){return w[O]},getDisabled(w){return w.disabled===!0},getIgnored(w){return w.type==="divider"||w.type==="render"},getChildren(w){return w[I]}})}),o=D(()=>n.value.treeNodes),i=L(null),l=L(null),d=L(null),a=D(()=>{var O,I,w;return(w=(I=(O=i.value)!==null&&O!==void 0?O:l.value)!==null&&I!==void 0?I:d.value)!==null&&w!==void 0?w:null}),s=D(()=>n.value.getPath(a.value).keyPath),c=D(()=>n.value.getPath(e.value).keyPath),f=Ae(()=>e.keyboard&&r.value);Ml({keydown:{ArrowUp:{prevent:!0,handler:g},ArrowRight:{prevent:!0,handler:m},ArrowDown:{prevent:!0,handler:M},ArrowLeft:{prevent:!0,handler:_},Enter:{prevent:!0,handler:$},Escape:S}},f);const{mergedClsPrefixRef:h,inlineThemeDisabled:p}=_e(e),y=ne("Dropdown","-dropdown",eh,Ff,e,h);ke(ar,{labelFieldRef:J(e,"labelField"),childrenFieldRef:J(e,"childrenField"),renderLabelRef:J(e,"renderLabel"),renderIconRef:J(e,"renderIcon"),hoverKeyRef:i,keyboardKeyRef:l,lastToggledSubmenuKeyRef:d,pendingKeyPathRef:s,activeKeyPathRef:c,animatedRef:J(e,"animated"),mergedShowRef:r,nodePropsRef:J(e,"nodeProps"),renderOptionRef:J(e,"renderOption"),menuPropsRef:J(e,"menuProps"),doSelect:C,doUpdateShow:x}),Se(r,O=>{!e.animated&&!O&&b()});function C(O,I){const{onSelect:w}=e;w&&ce(w,O,I)}function x(O){const{"onUpdate:show":I,onUpdateShow:w}=e;I&&ce(I,O),w&&ce(w,O),t.value=O}function b(){i.value=null,l.value=null,d.value=null}function S(){x(!1)}function _(){z("left")}function m(){z("right")}function g(){z("up")}function M(){z("down")}function $(){const O=A();O!=null&&O.isLeaf&&r.value&&(C(O.key,O.rawNode),x(!1))}function A(){var O;const{value:I}=n,{value:w}=a;return!I||w===null?null:(O=I.getNode(w))!==null&&O!==void 0?O:null}function z(O){const{value:I}=a,{value:{getFirstAvailableNode:w}}=n;let P=null;if(I===null){const N=w();N!==null&&(P=N.key)}else{const N=A();if(N){let F;switch(O){case"down":F=N.getNext();break;case"up":F=N.getPrev();break;case"right":F=N.getChild();break;case"left":F=N.getParent();break}F&&(P=F.key)}}P!==null&&(i.value=null,l.value=P)}const B=D(()=>{const{size:O,inverted:I}=e,{common:{cubicBezierEaseInOut:w},self:P}=y.value,{padding:N,dividerColor:F,borderRadius:q,optionOpacityDisabled:Q,[oe("optionIconSuffixWidth",O)]:ae,[oe("optionSuffixWidth",O)]:me,[oe("optionIconPrefixWidth",O)]:ve,[oe("optionPrefixWidth",O)]:we,[oe("fontSize",O)]:re,[oe("optionHeight",O)]:ze,[oe("optionIconSize",O)]:xe}=P,ee={"--n-bezier":w,"--n-font-size":re,"--n-padding":N,"--n-border-radius":q,"--n-option-height":ze,"--n-option-prefix-width":we,"--n-option-icon-prefix-width":ve,"--n-option-suffix-width":me,"--n-option-icon-suffix-width":ae,"--n-option-icon-size":xe,"--n-divider-color":F,"--n-option-opacity-disabled":Q};return I?(ee["--n-color"]=P.colorInverted,ee["--n-option-color-hover"]=P.optionColorHoverInverted,ee["--n-option-color-active"]=P.optionColorActiveInverted,ee["--n-option-text-color"]=P.optionTextColorInverted,ee["--n-option-text-color-hover"]=P.optionTextColorHoverInverted,ee["--n-option-text-color-active"]=P.optionTextColorActiveInverted,ee["--n-option-text-color-child-active"]=P.optionTextColorChildActiveInverted,ee["--n-prefix-color"]=P.prefixColorInverted,ee["--n-suffix-color"]=P.suffixColorInverted,ee["--n-group-header-text-color"]=P.groupHeaderTextColorInverted):(ee["--n-color"]=P.color,ee["--n-option-color-hover"]=P.optionColorHover,ee["--n-option-color-active"]=P.optionColorActive,ee["--n-option-text-color"]=P.optionTextColor,ee["--n-option-text-color-hover"]=P.optionTextColorHover,ee["--n-option-text-color-active"]=P.optionTextColorActive,ee["--n-option-text-color-child-active"]=P.optionTextColorChildActive,ee["--n-prefix-color"]=P.prefixColor,ee["--n-suffix-color"]=P.suffixColor,ee["--n-group-header-text-color"]=P.groupHeaderTextColor),ee}),R=p?He("dropdown",D(()=>`${e.size[0]}${e.inverted?"i":""}`),B,e):void 0;return{mergedClsPrefix:h,mergedTheme:y,tmNodes:o,mergedShow:r,handleAfterLeave:()=>{e.animated&&b()},doUpdateShow:x,cssVars:p?void 0:B,themeClass:R==null?void 0:R.themeClass,onRender:R==null?void 0:R.onRender}},render(){const e=(n,o,i,l,d)=>{var a;const{mergedClsPrefix:s,menuProps:c}=this;(a=this.onRender)===null||a===void 0||a.call(this);const f=(c==null?void 0:c(void 0,this.tmNodes.map(p=>p.rawNode)))||{},h={ref:zl(o),class:[n,`${s}-dropdown`,this.themeClass],clsPrefix:s,tmNodes:this.tmNodes,style:[i,this.cssVars],showArrow:this.showArrow,arrowStyle:this.arrowStyle,scrollable:this.scrollable,onMouseenter:l,onMouseleave:d};return u(fi,_t(this.$attrs,h,f))},{mergedTheme:t}=this,r={show:this.mergedShow,theme:t.peers.Popover,themeOverrides:t.peerOverrides.Popover,internalOnAfterLeave:this.handleAfterLeave,internalRenderBody:e,onUpdateShow:this.doUpdateShow,"onUpdate:show":void 0};return u(oi,Object.assign({},vo(this.$props,rh),r),{trigger:()=>{var n,o;return(o=(n=this.$slots).default)===null||o===void 0?void 0:o.call(n)}})}}),oh={gapSmall:"4px 8px",gapMedium:"8px 12px",gapLarge:"12px 16px"},ih=()=>oh,ah={name:"Space",self:ih},lh=ah;let Pr;const sh=()=>{if(!Ur)return!0;if(Pr===void 0){const e=document.createElement("div");e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e);const t=e.scrollHeight===1;return document.body.removeChild(e),Pr=t}return Pr},dh=Object.assign(Object.assign({},ne.props),{align:String,justify:{type:String,default:"start"},inline:Boolean,vertical:Boolean,size:{type:[String,Number,Array],default:"medium"},wrapItem:{type:Boolean,default:!0},itemStyle:[String,Object],wrap:{type:Boolean,default:!0},internalUseGap:{type:Boolean,default:void 0}}),uh=K({name:"Space",props:dh,setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:r}=_e(e),n=ne("Space","-space",void 0,lh,e,t),o=Ot("Space",r,t);return{useGap:sh(),rtlEnabled:o,mergedClsPrefix:t,margin:D(()=>{const{size:i}=e;if(Array.isArray(i))return{horizontal:i[0],vertical:i[1]};if(typeof i=="number")return{horizontal:i,vertical:i};const{self:{[oe("gap",i)]:l}}=n.value,{row:d,col:a}=cl(l);return{horizontal:yn(a),vertical:yn(d)}})}},render(){const{vertical:e,align:t,inline:r,justify:n,itemStyle:o,margin:i,wrap:l,mergedClsPrefix:d,rtlEnabled:a,useGap:s,wrapItem:c,internalUseGap:f}=this,h=ul($l(this));if(!h.length)return null;const p=`${i.horizontal}px`,y=`${i.horizontal/2}px`,C=`${i.vertical}px`,x=`${i.vertical/2}px`,b=h.length-1,S=n.startsWith("space-");return u("div",{role:"none",class:[`${d}-space`,a&&`${d}-space--rtl`],style:{display:r?"inline-flex":"flex",flexDirection:e?"column":"row",justifyContent:["start","end"].includes(n)?"flex-"+n:n,flexWrap:!l||e?"nowrap":"wrap",marginTop:s||e?"":`-${x}`,marginBottom:s||e?"":`-${x}`,alignItems:t,gap:s?`${i.vertical}px ${i.horizontal}px`:""}},!c&&(s||f)?h:h.map((_,m)=>u("div",{role:"none",style:[o,{maxWidth:"100%"},s?"":e?{marginBottom:m!==b?C:""}:a?{marginLeft:S?n==="space-between"&&m===b?"":y:m!==b?p:"",marginRight:S?n==="space-between"&&m===0?"":y:"",paddingTop:x,paddingBottom:x}:{marginRight:S?n==="space-between"&&m===b?"":y:m!==b?p:"",marginLeft:S?n==="space-between"&&m===0?"":y:"",paddingTop:x,paddingBottom:x}]},_)))}}),nn=Object.assign(Object.assign({},ne.props),{showToolbar:{type:Boolean,default:!0},showToolbarTooltip:Boolean}),hi=Ve("n-image");function ch(){return{toolbarIconColor:"rgba(255, 255, 255, .9)",toolbarColor:"rgba(0, 0, 0, .35)",toolbarBoxShadow:"none",toolbarBorderRadius:"24px"}}const fh=Bt({name:"Image",common:Be,peers:{Tooltip:tn},self:ch}),hh=e=>{const{textColor2:t,cardColor:r,modalColor:n,popoverColor:o,dividerColor:i,borderRadius:l,fontSize:d,hoverColor:a}=e;return{textColor:t,color:r,colorHover:a,colorModal:n,colorHoverModal:$t(n,a),colorPopover:o,colorHoverPopover:$t(o,a),borderColor:i,borderColorModal:$t(n,i),borderColorPopover:$t(o,i),borderRadius:l,fontSize:d}},ph={name:"List",common:Be,self:hh},vh=ph,gh=e=>{const{infoColor:t,successColor:r,warningColor:n,errorColor:o,textColor2:i,progressRailColor:l,fontSize:d,fontWeight:a}=e;return{fontSize:d,fontSizeCircle:"28px",fontWeightCircle:a,railColor:l,railHeight:"8px",iconSizeCircle:"36px",iconSizeLine:"18px",iconColor:t,iconColorInfo:t,iconColorSuccess:r,iconColorWarning:n,iconColorError:o,textColorCircle:i,textColorLineInner:"rgb(255, 255, 255)",textColorLineOuter:i,fillColor:t,fillColorInfo:t,fillColorSuccess:r,fillColorWarning:n,fillColorError:o,lineBgProcessing:"linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)"}},mh={name:"Progress",common:Be,self:gh},pi=mh,bh=e=>{const{textColor1:t,textColor2:r,fontWeightStrong:n,fontSize:o}=e;return{fontSize:o,titleTextColor:t,textColor:r,titleFontWeight:n}},yh={name:"Thing",common:Be,self:bh},wh=yh,xh=e=>{const{iconColor:t,primaryColor:r,errorColor:n,textColor2:o,successColor:i,opacityDisabled:l,actionColor:d,borderColor:a,hoverColor:s,lineHeight:c,borderRadius:f,fontSize:h}=e;return{fontSize:h,lineHeight:c,borderRadius:f,draggerColor:d,draggerBorder:`1px dashed ${a}`,draggerBorderHover:`1px dashed ${r}`,itemColorHover:s,itemColorHoverError:te(n,{alpha:.06}),itemTextColor:o,itemTextColorError:n,itemTextColorSuccess:i,itemIconColor:t,itemDisabledOpacity:l,itemBorderImageCardError:`1px solid ${n}`,itemBorderImageCard:`1px solid ${a}`}},Ch=Bt({name:"Upload",common:Be,peers:{Button:fl,Progress:pi},self:xh}),Sh=Ch,Ph=u("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M6 5C5.75454 5 5.55039 5.17688 5.50806 5.41012L5.5 5.5V14.5C5.5 14.7761 5.72386 15 6 15C6.24546 15 6.44961 14.8231 6.49194 14.5899L6.5 14.5V5.5C6.5 5.22386 6.27614 5 6 5ZM13.8536 5.14645C13.68 4.97288 13.4106 4.9536 13.2157 5.08859L13.1464 5.14645L8.64645 9.64645C8.47288 9.82001 8.4536 10.0894 8.58859 10.2843L8.64645 10.3536L13.1464 14.8536C13.3417 15.0488 13.6583 15.0488 13.8536 14.8536C14.0271 14.68 14.0464 14.4106 13.9114 14.2157L13.8536 14.1464L9.70711 10L13.8536 5.85355C14.0488 5.65829 14.0488 5.34171 13.8536 5.14645Z",fill:"currentColor"})),kh=u("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M13.5 5C13.7455 5 13.9496 5.17688 13.9919 5.41012L14 5.5V14.5C14 14.7761 13.7761 15 13.5 15C13.2545 15 13.0504 14.8231 13.0081 14.5899L13 14.5V5.5C13 5.22386 13.2239 5 13.5 5ZM5.64645 5.14645C5.82001 4.97288 6.08944 4.9536 6.28431 5.08859L6.35355 5.14645L10.8536 9.64645C11.0271 9.82001 11.0464 10.0894 10.9114 10.2843L10.8536 10.3536L6.35355 14.8536C6.15829 15.0488 5.84171 15.0488 5.64645 14.8536C5.47288 14.68 5.4536 14.4106 5.58859 14.2157L5.64645 14.1464L9.79289 10L5.64645 5.85355C5.45118 5.65829 5.45118 5.34171 5.64645 5.14645Z",fill:"currentColor"})),$h=u("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M4.089 4.216l.057-.07a.5.5 0 0 1 .638-.057l.07.057L10 9.293l5.146-5.147a.5.5 0 0 1 .638-.057l.07.057a.5.5 0 0 1 .057.638l-.057.07L10.707 10l5.147 5.146a.5.5 0 0 1 .057.638l-.057.07a.5.5 0 0 1-.638.057l-.07-.057L10 10.707l-5.146 5.147a.5.5 0 0 1-.638.057l-.07-.057a.5.5 0 0 1-.057-.638l.057-.07L9.293 10L4.146 4.854a.5.5 0 0 1-.057-.638l.057-.07l-.057.07z",fill:"currentColor"})),zh=j([j("body >",[k("image-container","position: fixed;")]),k("image-preview-container",`
|
||
position: fixed;
|
||
left: 0;
|
||
right: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
display: flex;
|
||
`),k("image-preview-overlay",`
|
||
z-index: -1;
|
||
position: absolute;
|
||
left: 0;
|
||
right: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
background: rgba(0, 0, 0, .3);
|
||
`,[wn()]),k("image-preview-toolbar",`
|
||
z-index: 1;
|
||
position: absolute;
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
border-radius: var(--n-toolbar-border-radius);
|
||
height: 48px;
|
||
bottom: 40px;
|
||
padding: 0 12px;
|
||
background: var(--n-toolbar-color);
|
||
box-shadow: var(--n-toolbar-box-shadow);
|
||
color: var(--n-toolbar-icon-color);
|
||
transition: color .3s var(--n-bezier);
|
||
display: flex;
|
||
align-items: center;
|
||
`,[k("base-icon",`
|
||
padding: 0 8px;
|
||
font-size: 28px;
|
||
cursor: pointer;
|
||
`),wn()]),k("image-preview-wrapper",`
|
||
position: absolute;
|
||
left: 0;
|
||
right: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
display: flex;
|
||
pointer-events: none;
|
||
`,[wo()]),k("image-preview",`
|
||
user-select: none;
|
||
-webkit-user-select: none;
|
||
pointer-events: all;
|
||
margin: auto;
|
||
max-height: calc(100vh - 32px);
|
||
max-width: calc(100vw - 32px);
|
||
transition: transform .3s var(--n-bezier);
|
||
`),k("image",`
|
||
display: inline-flex;
|
||
max-height: 100%;
|
||
max-width: 100%;
|
||
`,[Te("preview-disabled",`
|
||
cursor: pointer;
|
||
`),j("img",`
|
||
border-radius: inherit;
|
||
`)])]),Wt=32,vi=K({name:"ImagePreview",props:Object.assign(Object.assign({},nn),{onNext:Function,onPrev:Function,clsPrefix:{type:String,required:!0}}),setup(e){const t=ne("Image","-image",zh,fh,e,J(e,"clsPrefix"));let r=null;const n=L(null),o=L(null),i=L(void 0),l=L(!1),d=L(!1),{localeRef:a}=Zr("Image");function s(){const{value:W}=o;if(!r||!W)return;const{style:Y}=W,V=r.getBoundingClientRect(),le=V.left+V.width/2,se=V.top+V.height/2;Y.transformOrigin=`${le}px ${se}px`}function c(W){var Y,V;switch(W.key){case" ":W.preventDefault();break;case"ArrowLeft":(Y=e.onPrev)===null||Y===void 0||Y.call(e);break;case"ArrowRight":(V=e.onNext)===null||V===void 0||V.call(e);break;case"Escape":ze();break}}Se(l,W=>{W?Re("keydown",document,c):Pe("keydown",document,c)}),et(()=>{Pe("keydown",document,c)});let f=0,h=0,p=0,y=0,C=0,x=0,b=0,S=0,_=!1;function m(W){const{clientX:Y,clientY:V}=W;p=Y-f,y=V-h,Io(re)}function g(W){const{mouseUpClientX:Y,mouseUpClientY:V,mouseDownClientX:le,mouseDownClientY:se}=W,Ie=le-Y,Ce=se-V,Oe=`vertical${Ce>0?"Top":"Bottom"}`,je=`horizontal${Ie>0?"Left":"Right"}`;return{moveVerticalDirection:Oe,moveHorizontalDirection:je,deltaHorizontal:Ie,deltaVertical:Ce}}function M(W){const{value:Y}=n;if(!Y)return{offsetX:0,offsetY:0};const V=Y.getBoundingClientRect(),{moveVerticalDirection:le,moveHorizontalDirection:se,deltaHorizontal:Ie,deltaVertical:Ce}=W||{};let Oe=0,je=0;return V.width<=window.innerWidth?Oe=0:V.left>0?Oe=(V.width-window.innerWidth)/2:V.right<window.innerWidth?Oe=-(V.width-window.innerWidth)/2:se==="horizontalRight"?Oe=Math.min((V.width-window.innerWidth)/2,C-(Ie??0)):Oe=Math.max(-((V.width-window.innerWidth)/2),C-(Ie??0)),V.height<=window.innerHeight?je=0:V.top>0?je=(V.height-window.innerHeight)/2:V.bottom<window.innerHeight?je=-(V.height-window.innerHeight)/2:le==="verticalBottom"?je=Math.min((V.height-window.innerHeight)/2,x-(Ce??0)):je=Math.max(-((V.height-window.innerHeight)/2),x-(Ce??0)),{offsetX:Oe,offsetY:je}}function $(W){Pe("mousemove",document,m),Pe("mouseup",document,$);const{clientX:Y,clientY:V}=W;_=!1;const le=g({mouseUpClientX:Y,mouseUpClientY:V,mouseDownClientX:b,mouseDownClientY:S}),se=M(le);p=se.offsetX,y=se.offsetY,re()}const A=ie(hi,null);function z(W){var Y,V;if((V=(Y=A==null?void 0:A.previewedImgPropsRef.value)===null||Y===void 0?void 0:Y.onMousedown)===null||V===void 0||V.call(Y,W),W.button!==0)return;const{clientX:le,clientY:se}=W;_=!0,f=le-p,h=se-y,C=p,x=y,b=le,S=se,re(),Re("mousemove",document,m),Re("mouseup",document,$)}function B(W){var Y,V;(V=(Y=A==null?void 0:A.previewedImgPropsRef.value)===null||Y===void 0?void 0:Y.onDblclick)===null||V===void 0||V.call(Y,W);const le=me();I=I===le?1:le,re()}const R=1.5;let O=0,I=1,w=0;function P(){I=1,O=0}function N(){var W;P(),w=0,(W=e.onPrev)===null||W===void 0||W.call(e)}function F(){var W;P(),w=0,(W=e.onNext)===null||W===void 0||W.call(e)}function q(){w-=90,re()}function Q(){w+=90,re()}function ae(){const{value:W}=n;if(!W)return 1;const{innerWidth:Y,innerHeight:V}=window,le=Math.max(1,W.naturalHeight/(V-Wt)),se=Math.max(1,W.naturalWidth/(Y-Wt));return Math.max(3,le*2,se*2)}function me(){const{value:W}=n;if(!W)return 1;const{innerWidth:Y,innerHeight:V}=window,le=W.naturalHeight/(V-Wt),se=W.naturalWidth/(Y-Wt);return le<1&&se<1?1:Math.max(le,se)}function ve(){const W=ae();I<W&&(O+=1,I=Math.min(W,Math.pow(R,O)),re())}function we(){if(I>.5){const W=I;O-=1,I=Math.max(.5,Math.pow(R,O));const Y=W-I;re(!1);const V=M();I+=Y,re(!1),I-=Y,p=V.offsetX,y=V.offsetY,re()}}function re(W=!0){var Y;const{value:V}=n;if(!V)return;const{style:le}=V,se=hl((Y=A==null?void 0:A.previewedImgPropsRef.value)===null||Y===void 0?void 0:Y.style);let Ie="";if(typeof se=="string")Ie=se+";";else for(const Oe in se)Ie+=`${mu(Oe)}: ${se[Oe]};`;const Ce=`transform-origin: center; transform: translateX(${p}px) translateY(${y}px) rotate(${w}deg) scale(${I});`;_?le.cssText=Ie+"cursor: grabbing; transition: none;"+Ce:le.cssText=Ie+"cursor: grab;"+Ce+(W?"":"transition: none;"),W||V.offsetHeight}function ze(){l.value=!l.value,d.value=!0}function xe(){I=me(),O=Math.ceil(Math.log(I)/Math.log(R)),p=0,y=0,re()}const ee={setPreviewSrc:W=>{i.value=W},setThumbnailEl:W=>{r=W},toggleShow:ze};function De(W,Y){if(e.showToolbarTooltip){const{value:V}=t;return u(li,{to:!1,theme:V.peers.Tooltip,themeOverrides:V.peerOverrides.Tooltip,keepAliveOnHover:!1},{default:()=>a.value[Y],trigger:()=>W})}else return W}const qe=D(()=>{const{common:{cubicBezierEaseInOut:W},self:{toolbarIconColor:Y,toolbarBorderRadius:V,toolbarBoxShadow:le,toolbarColor:se}}=t.value;return{"--n-bezier":W,"--n-toolbar-icon-color":Y,"--n-toolbar-color":se,"--n-toolbar-border-radius":V,"--n-toolbar-box-shadow":le}}),{inlineThemeDisabled:Ge}=_e(),Fe=Ge?He("image-preview",void 0,qe,e):void 0;return Object.assign({previewRef:n,previewWrapperRef:o,previewSrc:i,show:l,appear:Fr(),displayed:d,previewedImgProps:A==null?void 0:A.previewedImgPropsRef,handleWheel(W){W.preventDefault()},handlePreviewMousedown:z,handlePreviewDblclick:B,syncTransformOrigin:s,handleAfterLeave:()=>{P(),w=0,d.value=!1},handleDragStart:W=>{var Y,V;(V=(Y=A==null?void 0:A.previewedImgPropsRef.value)===null||Y===void 0?void 0:Y.onDragstart)===null||V===void 0||V.call(Y,W),W.preventDefault()},zoomIn:ve,zoomOut:we,rotateCounterclockwise:q,rotateClockwise:Q,handleSwitchPrev:N,handleSwitchNext:F,withTooltip:De,resizeToOrignalImageSize:xe,cssVars:Ge?void 0:qe,themeClass:Fe==null?void 0:Fe.themeClass,onRender:Fe==null?void 0:Fe.onRender},ee)},render(){var e,t;const{clsPrefix:r}=this;return u(Ne,null,(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e),u(so,{show:this.show},{default:()=>{var n;return this.show||this.displayed?((n=this.onRender)===null||n===void 0||n.call(this),mt(u("div",{class:[`${r}-image-preview-container`,this.themeClass],style:this.cssVars,onWheel:this.handleWheel},u(zt,{name:"fade-in-transition",appear:this.appear},{default:()=>this.show?u("div",{class:`${r}-image-preview-overlay`,onClick:this.toggleShow}):null}),this.showToolbar?u(zt,{name:"fade-in-transition",appear:this.appear},{default:()=>{if(!this.show)return null;const{withTooltip:o}=this;return u("div",{class:`${r}-image-preview-toolbar`},this.onPrev?u(Ne,null,o(u(fe,{clsPrefix:r,onClick:this.handleSwitchPrev},{default:()=>Ph}),"tipPrevious"),o(u(fe,{clsPrefix:r,onClick:this.handleSwitchNext},{default:()=>kh}),"tipNext")):null,o(u(fe,{clsPrefix:r,onClick:this.rotateCounterclockwise},{default:()=>u(yc,null)}),"tipCounterclockwise"),o(u(fe,{clsPrefix:r,onClick:this.rotateClockwise},{default:()=>u(bc,null)}),"tipClockwise"),o(u(fe,{clsPrefix:r,onClick:this.resizeToOrignalImageSize},{default:()=>u(Cc,null)}),"tipOriginalSize"),o(u(fe,{clsPrefix:r,onClick:this.zoomOut},{default:()=>u(xc,null)}),"tipZoomOut"),o(u(fe,{clsPrefix:r,onClick:this.zoomIn},{default:()=>u(wc,null)}),"tipZoomIn"),o(u(fe,{clsPrefix:r,onClick:this.toggleShow},{default:()=>$h}),"tipClose"))}}):null,u(zt,{name:"fade-in-scale-up-transition",onAfterLeave:this.handleAfterLeave,appear:this.appear,onEnter:this.syncTransformOrigin,onBeforeLeave:this.syncTransformOrigin},{default:()=>{const{previewedImgProps:o={}}=this;return mt(u("div",{class:`${r}-image-preview-wrapper`,ref:"previewWrapperRef"},u("img",Object.assign({},o,{draggable:!1,onMousedown:this.handlePreviewMousedown,onDblclick:this.handlePreviewDblclick,class:[`${r}-image-preview`,o.class],key:this.previewSrc,src:this.previewSrc,ref:"previewRef",onDragstart:this.handleDragStart}))),[[ho,this.show]])}})),[[Nr,{enabled:this.show}]])):null}}))}}),gi=Ve("n-image-group"),Ih=nn,Th=K({name:"ImageGroup",props:Ih,setup(e){let t;const{mergedClsPrefixRef:r}=_e(e),n=`c${$r()}`,o=Dr(),i=a=>{var s;t=a,(s=d.value)===null||s===void 0||s.setPreviewSrc(a)};function l(a){if(!(o!=null&&o.proxy))return;const c=o.proxy.$el.parentElement.querySelectorAll(`[data-group-id=${n}]:not([data-error=true])`);if(!c.length)return;const f=Array.from(c).findIndex(h=>h.dataset.previewSrc===t);~f?i(c[(f+a+c.length)%c.length].dataset.previewSrc):i(c[0].dataset.previewSrc)}ke(gi,{mergedClsPrefixRef:r,setPreviewSrc:i,setThumbnailEl:a=>{var s;(s=d.value)===null||s===void 0||s.setThumbnailEl(a)},toggleShow:()=>{var a;(a=d.value)===null||a===void 0||a.toggleShow()},groupId:n});const d=L(null);return{mergedClsPrefix:r,previewInstRef:d,next:()=>l(1),prev:()=>l(-1)}},render(){return u(vi,{theme:this.theme,themeOverrides:this.themeOverrides,clsPrefix:this.mergedClsPrefix,ref:"previewInstRef",onPrev:this.prev,onNext:this.next,showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip},this.$slots)}}),Rh=Object.assign({alt:String,height:[String,Number],imgProps:Object,previewedImgProps:Object,lazy:Boolean,intersectionObserverOptions:Object,objectFit:{type:String,default:"fill"},previewSrc:String,fallbackSrc:String,width:[String,Number],src:String,previewDisabled:Boolean,loadDescription:String,onError:Function,onLoad:Function},nn),Mr=K({name:"Image",props:Rh,inheritAttrs:!1,setup(e){const t=L(null),r=L(!1),n=L(null),o=ie(gi,null),{mergedClsPrefixRef:i}=o||_e(e),l={click:()=>{if(e.previewDisabled||r.value)return;const s=e.previewSrc||e.src;if(o){o.setPreviewSrc(s),o.setThumbnailEl(t.value),o.toggleShow();return}const{value:c}=n;c&&(c.setPreviewSrc(s),c.setThumbnailEl(t.value),c.toggleShow())}},d=L(!e.lazy);Ue(()=>{var s;(s=t.value)===null||s===void 0||s.setAttribute("data-group-id",(o==null?void 0:o.groupId)||"")}),Ue(()=>{if(wr)return;let s;const c=lt(()=>{s==null||s(),s=void 0,e.lazy&&(s=Rf(t.value,e.intersectionObserverOptions,d))});et(()=>{c(),s==null||s()})}),lt(()=>{var s;e.src,(s=e.imgProps)===null||s===void 0||s.src,r.value=!1});const a=L(!1);return ke(hi,{previewedImgPropsRef:J(e,"previewedImgProps")}),Object.assign({mergedClsPrefix:i,groupId:o==null?void 0:o.groupId,previewInstRef:n,imageRef:t,showError:r,shouldStartLoading:d,loaded:a,mergedOnClick:s=>{var c,f;l.click(),(f=(c=e.imgProps)===null||c===void 0?void 0:c.onClick)===null||f===void 0||f.call(c,s)},mergedOnError:s=>{if(!d.value)return;r.value=!0;const{onError:c,imgProps:{onError:f}={}}=e;c==null||c(s),f==null||f(s)},mergedOnLoad:s=>{const{onLoad:c,imgProps:{onLoad:f}={}}=e;c==null||c(s),f==null||f(s),a.value=!0}},l)},render(){var e,t;const{mergedClsPrefix:r,imgProps:n={},loaded:o,$attrs:i,lazy:l}=this,d=(t=(e=this.$slots).placeholder)===null||t===void 0?void 0:t.call(e),a=this.src||n.src||"",s=u("img",Object.assign(Object.assign({},n),{ref:"imageRef",width:this.width||n.width,height:this.height||n.height,src:wr?a:this.showError?this.fallbackSrc:this.shouldStartLoading?a:void 0,alt:this.alt||n.alt,"aria-label":this.alt||n.alt,onClick:this.mergedOnClick,onError:this.mergedOnError,onLoad:this.mergedOnLoad,loading:wr&&l&&!this.intersectionObserverOptions?"lazy":"eager",style:[n.style||"",d&&!o?{height:"0",width:"0",visibility:"hidden"}:"",{objectFit:this.objectFit}],"data-error":this.showError,"data-preview-src":this.previewSrc||this.src}));return u("div",Object.assign({},i,{role:"none",class:[i.class,`${r}-image`,(this.previewDisabled||this.showError)&&`${r}-image--preview-disabled`]}),this.groupId?s:u(vi,{theme:this.theme,themeOverrides:this.themeOverrides,clsPrefix:r,ref:"previewInstRef",showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip},{default:()=>s}),!o&&d)}}),_h=j([k("list",`
|
||
--n-merged-border-color: var(--n-border-color);
|
||
--n-merged-color: var(--n-color);
|
||
--n-merged-color-hover: var(--n-color-hover);
|
||
margin: 0;
|
||
font-size: var(--n-font-size);
|
||
transition:
|
||
background-color .3s var(--n-bezier),
|
||
color .3s var(--n-bezier),
|
||
border-color .3s var(--n-bezier);
|
||
padding: 0;
|
||
list-style-type: none;
|
||
color: var(--n-text-color);
|
||
background-color: var(--n-merged-color);
|
||
`,[U("show-divider",[k("list-item",[j("&:not(:last-child)",[E("divider",`
|
||
background-color: var(--n-merged-border-color);
|
||
`)])])]),U("clickable",[k("list-item",`
|
||
cursor: pointer;
|
||
`)]),U("bordered",`
|
||
border: 1px solid var(--n-merged-border-color);
|
||
border-radius: var(--n-border-radius);
|
||
`),U("hoverable",[k("list-item",`
|
||
border-radius: var(--n-border-radius);
|
||
`,[j("&:hover",`
|
||
background-color: var(--n-merged-color-hover);
|
||
`,[E("divider",`
|
||
background-color: transparent;
|
||
`)])])]),U("bordered, hoverable",[k("list-item",`
|
||
padding: 12px 20px;
|
||
`),E("header, footer",`
|
||
padding: 12px 20px;
|
||
`)]),E("header, footer",`
|
||
padding: 12px 0;
|
||
box-sizing: border-box;
|
||
transition: border-color .3s var(--n-bezier);
|
||
`,[j("&:not(:last-child)",`
|
||
border-bottom: 1px solid var(--n-merged-border-color);
|
||
`)]),k("list-item",`
|
||
position: relative;
|
||
padding: 12px 0;
|
||
box-sizing: border-box;
|
||
display: flex;
|
||
flex-wrap: nowrap;
|
||
align-items: center;
|
||
transition:
|
||
background-color .3s var(--n-bezier),
|
||
border-color .3s var(--n-bezier);
|
||
`,[E("prefix",`
|
||
margin-right: 20px;
|
||
flex: 0;
|
||
`),E("suffix",`
|
||
margin-left: 20px;
|
||
flex: 0;
|
||
`),E("main",`
|
||
flex: 1;
|
||
`),E("divider",`
|
||
height: 1px;
|
||
position: absolute;
|
||
bottom: 0;
|
||
left: 0;
|
||
right: 0;
|
||
background-color: transparent;
|
||
transition: background-color .3s var(--n-bezier);
|
||
pointer-events: none;
|
||
`)])]),pl(k("list",`
|
||
--n-merged-color-hover: var(--n-color-hover-modal);
|
||
--n-merged-color: var(--n-color-modal);
|
||
--n-merged-border-color: var(--n-border-color-modal);
|
||
`)),vl(k("list",`
|
||
--n-merged-color-hover: var(--n-color-hover-popover);
|
||
--n-merged-color: var(--n-color-popover);
|
||
--n-merged-border-color: var(--n-border-color-popover);
|
||
`))]),Oh=Object.assign(Object.assign({},ne.props),{size:{type:String,default:"medium"},bordered:Boolean,clickable:Boolean,hoverable:Boolean,showDivider:{type:Boolean,default:!0}}),mi=Ve("n-list"),Bh=K({name:"List",props:Oh,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r,mergedRtlRef:n}=_e(e),o=Ot("List",n,t),i=ne("List","-list",_h,vh,e,t);ke(mi,{showDividerRef:J(e,"showDivider"),mergedClsPrefixRef:t});const l=D(()=>{const{common:{cubicBezierEaseInOut:a},self:{fontSize:s,textColor:c,color:f,colorModal:h,colorPopover:p,borderColor:y,borderColorModal:C,borderColorPopover:x,borderRadius:b,colorHover:S,colorHoverModal:_,colorHoverPopover:m}}=i.value;return{"--n-font-size":s,"--n-bezier":a,"--n-text-color":c,"--n-color":f,"--n-border-radius":b,"--n-border-color":y,"--n-border-color-modal":C,"--n-border-color-popover":x,"--n-color-modal":h,"--n-color-popover":p,"--n-color-hover":S,"--n-color-hover-modal":_,"--n-color-hover-popover":m}}),d=r?He("list",void 0,l,e):void 0;return{mergedClsPrefix:t,rtlEnabled:o,cssVars:r?void 0:l,themeClass:d==null?void 0:d.themeClass,onRender:d==null?void 0:d.onRender}},render(){var e;const{$slots:t,mergedClsPrefix:r,onRender:n}=this;return n==null||n(),u("ul",{class:[`${r}-list`,this.rtlEnabled&&`${r}-list--rtl`,this.bordered&&`${r}-list--bordered`,this.showDivider&&`${r}-list--show-divider`,this.hoverable&&`${r}-list--hoverable`,this.clickable&&`${r}-list--clickable`,this.themeClass],style:this.cssVars},t.header?u("div",{class:`${r}-list__header`},t.header()):null,(e=t.default)===null||e===void 0?void 0:e.call(t),t.footer?u("div",{class:`${r}-list__footer`},t.footer()):null)}}),Mh=K({name:"ListItem",setup(){const e=ie(mi,null);return e||wt("list-item","`n-list-item` must be placed in `n-list`."),{showDivider:e.showDividerRef,mergedClsPrefix:e.mergedClsPrefixRef}},render(){const{$slots:e,mergedClsPrefix:t}=this;return u("li",{class:`${t}-list-item`},e.prefix?u("div",{class:`${t}-list-item__prefix`},e.prefix()):null,e.default?u("div",{class:`${t}-list-item__main`},e):null,e.suffix?u("div",{class:`${t}-list-item__suffix`},e.suffix()):null,this.showDivider&&u("div",{class:`${t}-list-item__divider`}))}});function lr(){const e=ie(gl,null);return e===null&&wt("use-message","No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A."),e}const Lh=j([k("progress",{display:"inline-block"},[k("progress-icon",`
|
||
color: var(--n-icon-color);
|
||
transition: color .3s var(--n-bezier);
|
||
`),U("line",`
|
||
width: 100%;
|
||
display: block;
|
||
`,[k("progress-content",`
|
||
display: flex;
|
||
align-items: center;
|
||
`,[k("progress-graph",{flex:1})]),k("progress-custom-content",{marginLeft:"14px"}),k("progress-icon",`
|
||
width: 30px;
|
||
padding-left: 14px;
|
||
height: var(--n-icon-size-line);
|
||
line-height: var(--n-icon-size-line);
|
||
font-size: var(--n-icon-size-line);
|
||
`,[U("as-text",`
|
||
color: var(--n-text-color-line-outer);
|
||
text-align: center;
|
||
width: 40px;
|
||
font-size: var(--n-font-size);
|
||
padding-left: 4px;
|
||
transition: color .3s var(--n-bezier);
|
||
`)])]),U("circle, dashboard",{width:"120px"},[k("progress-custom-content",`
|
||
position: absolute;
|
||
left: 50%;
|
||
top: 50%;
|
||
transform: translateX(-50%) translateY(-50%);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
`),k("progress-text",`
|
||
position: absolute;
|
||
left: 50%;
|
||
top: 50%;
|
||
transform: translateX(-50%) translateY(-50%);
|
||
display: flex;
|
||
align-items: center;
|
||
color: inherit;
|
||
font-size: var(--n-font-size-circle);
|
||
color: var(--n-text-color-circle);
|
||
font-weight: var(--n-font-weight-circle);
|
||
transition: color .3s var(--n-bezier);
|
||
white-space: nowrap;
|
||
`),k("progress-icon",`
|
||
position: absolute;
|
||
left: 50%;
|
||
top: 50%;
|
||
transform: translateX(-50%) translateY(-50%);
|
||
display: flex;
|
||
align-items: center;
|
||
color: var(--n-icon-color);
|
||
font-size: var(--n-icon-size-circle);
|
||
`)]),U("multiple-circle",`
|
||
width: 200px;
|
||
color: inherit;
|
||
`,[k("progress-text",`
|
||
font-weight: var(--n-font-weight-circle);
|
||
color: var(--n-text-color-circle);
|
||
position: absolute;
|
||
left: 50%;
|
||
top: 50%;
|
||
transform: translateX(-50%) translateY(-50%);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
transition: color .3s var(--n-bezier);
|
||
`)]),k("progress-content",{position:"relative"}),k("progress-graph",{position:"relative"},[k("progress-graph-circle",[j("svg",{verticalAlign:"bottom"}),k("progress-graph-circle-fill",`
|
||
stroke: var(--n-fill-color);
|
||
transition:
|
||
opacity .3s var(--n-bezier),
|
||
stroke .3s var(--n-bezier),
|
||
stroke-dasharray .3s var(--n-bezier);
|
||
`,[U("empty",{opacity:0})]),k("progress-graph-circle-rail",`
|
||
transition: stroke .3s var(--n-bezier);
|
||
overflow: hidden;
|
||
stroke: var(--n-rail-color);
|
||
`)]),k("progress-graph-line",[U("indicator-inside",[k("progress-graph-line-rail",`
|
||
height: 16px;
|
||
line-height: 16px;
|
||
border-radius: 10px;
|
||
`,[k("progress-graph-line-fill",`
|
||
height: inherit;
|
||
border-radius: 10px;
|
||
`),k("progress-graph-line-indicator",`
|
||
background: #0000;
|
||
white-space: nowrap;
|
||
text-align: right;
|
||
margin-left: 14px;
|
||
margin-right: 14px;
|
||
height: inherit;
|
||
font-size: 12px;
|
||
color: var(--n-text-color-line-inner);
|
||
transition: color .3s var(--n-bezier);
|
||
`)])]),U("indicator-inside-label",`
|
||
height: 16px;
|
||
display: flex;
|
||
align-items: center;
|
||
`,[k("progress-graph-line-rail",`
|
||
flex: 1;
|
||
transition: background-color .3s var(--n-bezier);
|
||
`),k("progress-graph-line-indicator",`
|
||
background: var(--n-fill-color);
|
||
font-size: 12px;
|
||
transform: translateZ(0);
|
||
display: flex;
|
||
vertical-align: middle;
|
||
height: 16px;
|
||
line-height: 16px;
|
||
padding: 0 10px;
|
||
border-radius: 10px;
|
||
position: absolute;
|
||
white-space: nowrap;
|
||
color: var(--n-text-color-line-inner);
|
||
transition:
|
||
right .2s var(--n-bezier),
|
||
color .3s var(--n-bezier),
|
||
background-color .3s var(--n-bezier);
|
||
`)]),k("progress-graph-line-rail",`
|
||
position: relative;
|
||
overflow: hidden;
|
||
height: var(--n-rail-height);
|
||
border-radius: 5px;
|
||
background-color: var(--n-rail-color);
|
||
transition: background-color .3s var(--n-bezier);
|
||
`,[k("progress-graph-line-fill",`
|
||
background: var(--n-fill-color);
|
||
position: relative;
|
||
border-radius: 5px;
|
||
height: inherit;
|
||
width: 100%;
|
||
max-width: 0%;
|
||
transition:
|
||
background-color .3s var(--n-bezier),
|
||
max-width .2s var(--n-bezier);
|
||
`,[U("processing",[j("&::after",`
|
||
content: "";
|
||
background-image: var(--n-line-bg-processing);
|
||
animation: progress-processing-animation 2s var(--n-bezier) infinite;
|
||
`)])])])])])]),j("@keyframes progress-processing-animation",`
|
||
0% {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
right: 100%;
|
||
opacity: 1;
|
||
}
|
||
66% {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
right: 0;
|
||
opacity: 0;
|
||
}
|
||
100% {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
right: 0;
|
||
opacity: 0;
|
||
}
|
||
`)]),Eh={success:u(xo,null),error:u(Co,null),warning:u(So,null),info:u(Po,null)},Ah=K({name:"ProgressLine",props:{clsPrefix:{type:String,required:!0},percentage:{type:Number,default:0},railColor:String,railStyle:[String,Object],fillColor:String,status:{type:String,required:!0},indicatorPlacement:{type:String,required:!0},indicatorTextColor:String,unit:{type:String,default:"%"},processing:{type:Boolean,required:!0},showIndicator:{type:Boolean,required:!0},height:[String,Number],railBorderRadius:[String,Number],fillBorderRadius:[String,Number]},setup(e,{slots:t}){const r=D(()=>We(e.height)),n=D(()=>e.railBorderRadius!==void 0?We(e.railBorderRadius):e.height!==void 0?We(e.height,{c:.5}):""),o=D(()=>e.fillBorderRadius!==void 0?We(e.fillBorderRadius):e.railBorderRadius!==void 0?We(e.railBorderRadius):e.height!==void 0?We(e.height,{c:.5}):"");return()=>{const{indicatorPlacement:i,railColor:l,railStyle:d,percentage:a,unit:s,indicatorTextColor:c,status:f,showIndicator:h,fillColor:p,processing:y,clsPrefix:C}=e;return u("div",{class:`${C}-progress-content`,role:"none"},u("div",{class:`${C}-progress-graph`,"aria-hidden":!0},u("div",{class:[`${C}-progress-graph-line`,{[`${C}-progress-graph-line--indicator-${i}`]:!0}]},u("div",{class:`${C}-progress-graph-line-rail`,style:[{backgroundColor:l,height:r.value,borderRadius:n.value},d]},u("div",{class:[`${C}-progress-graph-line-fill`,y&&`${C}-progress-graph-line-fill--processing`],style:{maxWidth:`${e.percentage}%`,backgroundColor:p,height:r.value,lineHeight:r.value,borderRadius:o.value}},i==="inside"?u("div",{class:`${C}-progress-graph-line-indicator`,style:{color:c}},a,s):null)))),h&&i==="outside"?u("div",null,t.default?u("div",{class:`${C}-progress-custom-content`,style:{color:c},role:"none"},t.default()):f==="default"?u("div",{role:"none",class:`${C}-progress-icon ${C}-progress-icon--as-text`,style:{color:c}},a,s):u("div",{class:`${C}-progress-icon`,"aria-hidden":!0},u(fe,{clsPrefix:C},{default:()=>Eh[f]}))):null)}}}),Dh={success:u(xo,null),error:u(Co,null),warning:u(So,null),info:u(Po,null)},Fh=K({name:"ProgressCircle",props:{clsPrefix:{type:String,required:!0},status:{type:String,required:!0},strokeWidth:{type:Number,required:!0},fillColor:String,railColor:String,railStyle:[String,Object],percentage:{type:Number,default:0},offsetDegree:{type:Number,default:0},showIndicator:{type:Boolean,required:!0},indicatorTextColor:String,unit:String,viewBoxWidth:{type:Number,required:!0},gapDegree:{type:Number,required:!0},gapOffsetDegree:{type:Number,default:0}},setup(e,{slots:t}){function r(n,o,i){const{gapDegree:l,viewBoxWidth:d,strokeWidth:a}=e,s=50,c=0,f=s,h=0,p=2*s,y=50+a/2,C=`M ${y},${y} m ${c},${f}
|
||
a ${s},${s} 0 1 1 ${h},${-p}
|
||
a ${s},${s} 0 1 1 ${-h},${p}`,x=Math.PI*2*s,b={stroke:i,strokeDasharray:`${n/100*(x-l)}px ${d*8}px`,strokeDashoffset:`-${l/2}px`,transformOrigin:o?"center":void 0,transform:o?`rotate(${o}deg)`:void 0};return{pathString:C,pathStyle:b}}return()=>{const{fillColor:n,railColor:o,strokeWidth:i,offsetDegree:l,status:d,percentage:a,showIndicator:s,indicatorTextColor:c,unit:f,gapOffsetDegree:h,clsPrefix:p}=e,{pathString:y,pathStyle:C}=r(100,0,o),{pathString:x,pathStyle:b}=r(a,l,n),S=100+i;return u("div",{class:`${p}-progress-content`,role:"none"},u("div",{class:`${p}-progress-graph`,"aria-hidden":!0},u("div",{class:`${p}-progress-graph-circle`,style:{transform:h?`rotate(${h}deg)`:void 0}},u("svg",{viewBox:`0 0 ${S} ${S}`},u("g",null,u("path",{class:`${p}-progress-graph-circle-rail`,d:y,"stroke-width":i,"stroke-linecap":"round",fill:"none",style:C})),u("g",null,u("path",{class:[`${p}-progress-graph-circle-fill`,a===0&&`${p}-progress-graph-circle-fill--empty`],d:x,"stroke-width":i,"stroke-linecap":"round",fill:"none",style:b}))))),s?u("div",null,t.default?u("div",{class:`${p}-progress-custom-content`,role:"none"},t.default()):d!=="default"?u("div",{class:`${p}-progress-icon`,"aria-hidden":!0},u(fe,{clsPrefix:p},{default:()=>Dh[d]})):u("div",{class:`${p}-progress-text`,style:{color:c},role:"none"},u("span",{class:`${p}-progress-text__percentage`},a),u("span",{class:`${p}-progress-text__unit`},f))):null)}}});function Zn(e,t,r=100){return`m ${r/2} ${r/2-e} a ${e} ${e} 0 1 1 0 ${2*e} a ${e} ${e} 0 1 1 0 -${2*e}`}const Nh=K({name:"ProgressMultipleCircle",props:{clsPrefix:{type:String,required:!0},viewBoxWidth:{type:Number,required:!0},percentage:{type:Array,default:[0]},strokeWidth:{type:Number,required:!0},circleGap:{type:Number,required:!0},showIndicator:{type:Boolean,required:!0},fillColor:{type:Array,default:()=>[]},railColor:{type:Array,default:()=>[]},railStyle:{type:Array,default:()=>[]}},setup(e,{slots:t}){const r=D(()=>e.percentage.map((o,i)=>`${Math.PI*o/100*(e.viewBoxWidth/2-e.strokeWidth/2*(1+2*i)-e.circleGap*i)*2}, ${e.viewBoxWidth*8}`));return()=>{const{viewBoxWidth:n,strokeWidth:o,circleGap:i,showIndicator:l,fillColor:d,railColor:a,railStyle:s,percentage:c,clsPrefix:f}=e;return u("div",{class:`${f}-progress-content`,role:"none"},u("div",{class:`${f}-progress-graph`,"aria-hidden":!0},u("div",{class:`${f}-progress-graph-circle`},u("svg",{viewBox:`0 0 ${n} ${n}`},c.map((h,p)=>u("g",{key:p},u("path",{class:`${f}-progress-graph-circle-rail`,d:Zn(n/2-o/2*(1+2*p)-i*p,o,n),"stroke-width":o,"stroke-linecap":"round",fill:"none",style:[{strokeDashoffset:0,stroke:a[p]},s[p]]}),u("path",{class:[`${f}-progress-graph-circle-fill`,h===0&&`${f}-progress-graph-circle-fill--empty`],d:Zn(n/2-o/2*(1+2*p)-i*p,o,n),"stroke-width":o,"stroke-linecap":"round",fill:"none",style:{strokeDasharray:r.value[p],strokeDashoffset:0,stroke:d[p]}})))))),l&&t.default?u("div",null,u("div",{class:`${f}-progress-text`},t.default())):null)}}}),Hh=Object.assign(Object.assign({},ne.props),{processing:Boolean,type:{type:String,default:"line"},gapDegree:Number,gapOffsetDegree:Number,status:{type:String,default:"default"},railColor:[String,Array],railStyle:[String,Array],color:[String,Array],viewBoxWidth:{type:Number,default:100},strokeWidth:{type:Number,default:7},percentage:[Number,Array],unit:{type:String,default:"%"},showIndicator:{type:Boolean,default:!0},indicatorPosition:{type:String,default:"outside"},indicatorPlacement:{type:String,default:"outside"},indicatorTextColor:String,circleGap:{type:Number,default:1},height:Number,borderRadius:[String,Number],fillBorderRadius:[String,Number],offsetDegree:Number}),jh=K({name:"Progress",props:Hh,setup(e){const t=D(()=>e.indicatorPlacement||e.indicatorPosition),r=D(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type==="dashboard")return 75}),{mergedClsPrefixRef:n,inlineThemeDisabled:o}=_e(e),i=ne("Progress","-progress",Lh,pi,e,n),l=D(()=>{const{status:a}=e,{common:{cubicBezierEaseInOut:s},self:{fontSize:c,fontSizeCircle:f,railColor:h,railHeight:p,iconSizeCircle:y,iconSizeLine:C,textColorCircle:x,textColorLineInner:b,textColorLineOuter:S,lineBgProcessing:_,fontWeightCircle:m,[oe("iconColor",a)]:g,[oe("fillColor",a)]:M}}=i.value;return{"--n-bezier":s,"--n-fill-color":M,"--n-font-size":c,"--n-font-size-circle":f,"--n-font-weight-circle":m,"--n-icon-color":g,"--n-icon-size-circle":y,"--n-icon-size-line":C,"--n-line-bg-processing":_,"--n-rail-color":h,"--n-rail-height":p,"--n-text-color-circle":x,"--n-text-color-line-inner":b,"--n-text-color-line-outer":S}}),d=o?He("progress",D(()=>e.status[0]),l,e):void 0;return{mergedClsPrefix:n,mergedIndicatorPlacement:t,gapDeg:r,cssVars:o?void 0:l,themeClass:d==null?void 0:d.themeClass,onRender:d==null?void 0:d.onRender}},render(){const{type:e,cssVars:t,indicatorTextColor:r,showIndicator:n,status:o,railColor:i,railStyle:l,color:d,percentage:a,viewBoxWidth:s,strokeWidth:c,mergedIndicatorPlacement:f,unit:h,borderRadius:p,fillBorderRadius:y,height:C,processing:x,circleGap:b,mergedClsPrefix:S,gapDeg:_,gapOffsetDegree:m,themeClass:g,$slots:M,onRender:$}=this;return $==null||$(),u("div",{class:[g,`${S}-progress`,`${S}-progress--${e}`,`${S}-progress--${o}`],style:t,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":a,role:e==="circle"||e==="line"||e==="dashboard"?"progressbar":"none"},e==="circle"||e==="dashboard"?u(Fh,{clsPrefix:S,status:o,showIndicator:n,indicatorTextColor:r,railColor:i,fillColor:d,railStyle:l,offsetDegree:this.offsetDegree,percentage:a,viewBoxWidth:s,strokeWidth:c,gapDegree:_===void 0?e==="dashboard"?75:0:_,gapOffsetDegree:m,unit:h},M):e==="line"?u(Ah,{clsPrefix:S,status:o,showIndicator:n,indicatorTextColor:r,railColor:i,fillColor:d,railStyle:l,percentage:a,processing:x,indicatorPlacement:f,unit:h,fillBorderRadius:y,railBorderRadius:p,height:C},M):e==="multiple-circle"?u(Nh,{clsPrefix:S,strokeWidth:c,railColor:i,fillColor:d,railStyle:l,viewBoxWidth:s,percentage:a,showIndicator:n,circleGap:b},M):null)}}),Wh=k("thing",`
|
||
display: flex;
|
||
transition: color .3s var(--n-bezier);
|
||
font-size: var(--n-font-size);
|
||
color: var(--n-text-color);
|
||
`,[k("thing-avatar",`
|
||
margin-right: 12px;
|
||
margin-top: 2px;
|
||
`),k("thing-avatar-header-wrapper",`
|
||
display: flex;
|
||
flex-wrap: nowrap;
|
||
`,[k("thing-header-wrapper",`
|
||
flex: 1;
|
||
`)]),k("thing-main",`
|
||
flex-grow: 1;
|
||
`,[k("thing-header",`
|
||
display: flex;
|
||
margin-bottom: 4px;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
`,[E("title",`
|
||
font-size: 16px;
|
||
font-weight: var(--n-title-font-weight);
|
||
transition: color .3s var(--n-bezier);
|
||
color: var(--n-title-text-color);
|
||
`)]),E("description",[j("&:not(:last-child)",`
|
||
margin-bottom: 4px;
|
||
`)]),E("content",[j("&:not(:first-child)",`
|
||
margin-top: 12px;
|
||
`)]),E("footer",[j("&:not(:first-child)",`
|
||
margin-top: 12px;
|
||
`)]),E("action",[j("&:not(:first-child)",`
|
||
margin-top: 12px;
|
||
`)])])]),Uh=Object.assign(Object.assign({},ne.props),{title:String,titleExtra:String,description:String,descriptionStyle:[String,Object],content:String,contentStyle:[String,Object],contentIndented:Boolean}),bi=K({name:"Thing",props:Uh,setup(e,{slots:t}){const{mergedClsPrefixRef:r,inlineThemeDisabled:n,mergedRtlRef:o}=_e(e),i=ne("Thing","-thing",Wh,wh,e,r),l=Ot("Thing",o,r),d=D(()=>{const{self:{titleTextColor:s,textColor:c,titleFontWeight:f,fontSize:h},common:{cubicBezierEaseInOut:p}}=i.value;return{"--n-bezier":p,"--n-font-size":h,"--n-text-color":c,"--n-title-font-weight":f,"--n-title-text-color":s}}),a=n?He("thing",void 0,d,e):void 0;return()=>{var s;const{value:c}=r,f=l?l.value:!1;return(s=a==null?void 0:a.onRender)===null||s===void 0||s.call(a),u("div",{class:[`${c}-thing`,a==null?void 0:a.themeClass,f&&`${c}-thing--rtl`],style:n?void 0:d.value},t.avatar&&e.contentIndented?u("div",{class:`${c}-thing-avatar`},t.avatar()):null,u("div",{class:`${c}-thing-main`},!e.contentIndented&&(t.header||e.title||t["header-extra"]||e.titleExtra||t.avatar)?u("div",{class:`${c}-thing-avatar-header-wrapper`},t.avatar?u("div",{class:`${c}-thing-avatar`},t.avatar()):null,t.header||e.title||t["header-extra"]||e.titleExtra?u("div",{class:`${c}-thing-header-wrapper`},u("div",{class:`${c}-thing-header`},t.header||e.title?u("div",{class:`${c}-thing-header__title`},t.header?t.header():e.title):null,t["header-extra"]||e.titleExtra?u("div",{class:`${c}-thing-header__extra`},t["header-extra"]?t["header-extra"]():e.titleExtra):null),t.description||e.description?u("div",{class:`${c}-thing-main__description`,style:e.descriptionStyle},t.description?t.description():e.description):null):null):u(Ne,null,t.header||e.title||t["header-extra"]||e.titleExtra?u("div",{class:`${c}-thing-header`},t.header||e.title?u("div",{class:`${c}-thing-header__title`},t.header?t.header():e.title):null,t["header-extra"]||e.titleExtra?u("div",{class:`${c}-thing-header__extra`},t["header-extra"]?t["header-extra"]():e.titleExtra):null):null,t.description||e.description?u("div",{class:`${c}-thing-main__description`,style:e.descriptionStyle},t.description?t.description():e.description):null),t.default||e.content?u("div",{class:`${c}-thing-main__content`,style:e.contentStyle},t.default?t.default():e.content):null,t.footer?u("div",{class:`${c}-thing-main__footer`},t.footer()):null,t.action?u("div",{class:`${c}-thing-main__action`},t.action()):null))}}}),xt=Ve("n-upload"),yi="__UPLOAD_DRAGGER__",Vh=K({name:"UploadDragger",[yi]:!0,setup(e,{slots:t}){const r=ie(xt,null);return r||wt("upload-dragger","`n-upload-dragger` must be placed inside `n-upload`."),()=>{const{mergedClsPrefixRef:{value:n},mergedDisabledRef:{value:o},maxReachedRef:{value:i}}=r;return u("div",{class:[`${n}-upload-dragger`,(o||i)&&`${n}-upload-dragger--disabled`]},t)}}});var wi=globalThis&&globalThis.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(l){l(i)})}return new(r||(r=Promise))(function(i,l){function d(c){try{s(n.next(c))}catch(f){l(f)}}function a(c){try{s(n.throw(c))}catch(f){l(f)}}function s(c){c.done?i(c.value):o(c.value).then(d,a)}s((n=n.apply(e,t||[])).next())})};const xi=e=>e.includes("image/"),Jn=(e="")=>{const t=e.split("/"),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[""])[0]},Qn=/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i,Ci=e=>{if(e.type)return xi(e.type);const t=Jn(e.name||"");if(Qn.test(t))return!0;const r=e.thumbnailUrl||e.url||"",n=Jn(r);return!!(/^data:image\//.test(r)||Qn.test(n))};function Kh(e){return wi(this,void 0,void 0,function*(){return yield new Promise(t=>{if(!e.type||!xi(e.type)){t("");return}t(window.URL.createObjectURL(e))})})}const qh=Ur&&window.FileReader&&window.File;function Gh(e){return e.isDirectory}function Xh(e){return e.isFile}function Yh(e,t){return wi(this,void 0,void 0,function*(){const r=[];let n,o=0;function i(){o++}function l(){o--,o||n(r)}function d(a){a.forEach(s=>{if(s){if(i(),t&&Gh(s)){const c=s.createReader();i(),c.readEntries(f=>{d(f),l()},()=>{l()})}else Xh(s)&&(i(),s.file(c=>{r.push({file:c,entry:s,source:"dnd"}),l()},()=>{l()}));l()}})}return yield new Promise(a=>{n=a,d(e)}),r})}function Rt(e){const{id:t,name:r,percentage:n,status:o,url:i,file:l,thumbnailUrl:d,type:a,fullPath:s,batchId:c}=e;return{id:t,name:r,percentage:n??null,status:o,url:i??null,file:l??null,thumbnailUrl:d??null,type:a??null,fullPath:s??null,batchId:c??null}}function Zh(e,t,r){return e=e.toLowerCase(),t=t.toLocaleLowerCase(),r=r.toLocaleLowerCase(),r.split(",").map(o=>o.trim()).filter(Boolean).some(o=>{if(o.startsWith(".")){if(e.endsWith(o))return!0}else if(o.includes("/")){const[i,l]=t.split("/"),[d,a]=o.split("/");if((d==="*"||i&&d&&d===i)&&(a==="*"||l&&a&&a===l))return!0}else return!0;return!1})}const Jh=(e,t)=>{if(!e)return;const r=document.createElement("a");r.href=e,t!==void 0&&(r.download=t),document.body.appendChild(r),r.click(),document.body.removeChild(r)},Si=K({name:"UploadTrigger",props:{abstract:Boolean},setup(e,{slots:t}){const r=ie(xt,null);r||wt("upload-trigger","`n-upload-trigger` must be placed inside `n-upload`.");const{mergedClsPrefixRef:n,mergedDisabledRef:o,maxReachedRef:i,listTypeRef:l,dragOverRef:d,openOpenFileDialog:a,draggerInsideRef:s,handleFileAddition:c,mergedDirectoryDndRef:f,triggerStyleRef:h}=r,p=D(()=>l.value==="image-card");function y(){o.value||i.value||a()}function C(_){_.preventDefault(),d.value=!0}function x(_){_.preventDefault(),d.value=!0}function b(_){_.preventDefault(),d.value=!1}function S(_){var m;if(_.preventDefault(),!s.value||o.value||i.value){d.value=!1;return}const g=(m=_.dataTransfer)===null||m===void 0?void 0:m.items;g!=null&&g.length?Yh(Array.from(g).map(M=>M.webkitGetAsEntry()),f.value).then(M=>{c(M)}).finally(()=>{d.value=!1}):d.value=!1}return()=>{var _;const{value:m}=n;return e.abstract?(_=t.default)===null||_===void 0?void 0:_.call(t,{handleClick:y,handleDrop:S,handleDragOver:C,handleDragEnter:x,handleDragLeave:b}):u("div",{class:[`${m}-upload-trigger`,(o.value||i.value)&&`${m}-upload-trigger--disabled`,p.value&&`${m}-upload-trigger--image-card`],style:h.value,onClick:y,onDrop:S,onDragover:C,onDragenter:x,onDragleave:b},p.value?u(Vh,null,{default:()=>pt(t.default,()=>[u(fe,{clsPrefix:m},{default:()=>u(lc,null)})])}):t)}}}),Qh=K({name:"UploadProgress",props:{show:Boolean,percentage:{type:Number,required:!0},status:{type:String,required:!0}},setup(){return{mergedTheme:ie(xt).mergedThemeRef}},render(){return u(ko,null,{default:()=>this.show?u(jh,{type:"line",showIndicator:!1,percentage:this.percentage,status:this.status,height:2,theme:this.mergedTheme.peers.Progress,themeOverrides:this.mergedTheme.peerOverrides.Progress}):null})}}),ep=u("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},u("g",{fill:"none"},u("path",{d:"M21.75 3A3.25 3.25 0 0 1 25 6.25v15.5A3.25 3.25 0 0 1 21.75 25H6.25A3.25 3.25 0 0 1 3 21.75V6.25A3.25 3.25 0 0 1 6.25 3h15.5zm.583 20.4l-7.807-7.68a.75.75 0 0 0-.968-.07l-.084.07l-7.808 7.68c.183.065.38.1.584.1h15.5c.204 0 .4-.035.583-.1l-7.807-7.68l7.807 7.68zM21.75 4.5H6.25A1.75 1.75 0 0 0 4.5 6.25v15.5c0 .208.036.408.103.593l7.82-7.692a2.25 2.25 0 0 1 3.026-.117l.129.117l7.82 7.692c.066-.185.102-.385.102-.593V6.25a1.75 1.75 0 0 0-1.75-1.75zm-3.25 3a2.5 2.5 0 1 1 0 5a2.5 2.5 0 0 1 0-5zm0 1.5a1 1 0 1 0 0 2a1 1 0 0 0 0-2z",fill:"currentColor"}))),tp=u("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},u("g",{fill:"none"},u("path",{d:"M6.4 2A2.4 2.4 0 0 0 4 4.4v19.2A2.4 2.4 0 0 0 6.4 26h15.2a2.4 2.4 0 0 0 2.4-2.4V11.578c0-.729-.29-1.428-.805-1.944l-6.931-6.931A2.4 2.4 0 0 0 14.567 2H6.4zm-.9 2.4a.9.9 0 0 1 .9-.9H14V10a2 2 0 0 0 2 2h6.5v11.6a.9.9 0 0 1-.9.9H6.4a.9.9 0 0 1-.9-.9V4.4zm16.44 6.1H16a.5.5 0 0 1-.5-.5V4.06l6.44 6.44z",fill:"currentColor"})));var rp=globalThis&&globalThis.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(l){l(i)})}return new(r||(r=Promise))(function(i,l){function d(c){try{s(n.next(c))}catch(f){l(f)}}function a(c){try{s(n.throw(c))}catch(f){l(f)}}function s(c){c.done?i(c.value):o(c.value).then(d,a)}s((n=n.apply(e,t||[])).next())})};const Ut={paddingMedium:"0 3px",heightMedium:"24px",iconSizeMedium:"18px"},np=K({name:"UploadFile",props:{clsPrefix:{type:String,required:!0},file:{type:Object,required:!0},listType:{type:String,required:!0}},setup(e){const t=ie(xt),r=L(null),n=L(""),o=D(()=>{const{file:g}=e;return g.status==="finished"?"success":g.status==="error"?"error":"info"}),i=D(()=>{const{file:g}=e;if(g.status==="error")return"error"}),l=D(()=>{const{file:g}=e;return g.status==="uploading"}),d=D(()=>{if(!t.showCancelButtonRef.value)return!1;const{file:g}=e;return["uploading","pending","error"].includes(g.status)}),a=D(()=>{if(!t.showRemoveButtonRef.value)return!1;const{file:g}=e;return["finished"].includes(g.status)}),s=D(()=>{if(!t.showDownloadButtonRef.value)return!1;const{file:g}=e;return["finished"].includes(g.status)}),c=D(()=>{if(!t.showRetryButtonRef.value)return!1;const{file:g}=e;return["error"].includes(g.status)}),f=Ae(()=>n.value||e.file.thumbnailUrl||e.file.url),h=D(()=>{if(!t.showPreviewButtonRef.value)return!1;const{file:{status:g},listType:M}=e;return["finished"].includes(g)&&f.value&&M==="image-card"});function p(){t.submit(e.file.id)}function y(g){g.preventDefault();const{file:M}=e;["finished","pending","error"].includes(M.status)?x(M):["uploading"].includes(M.status)?S(M):Vr("upload","The button clicked type is unknown.")}function C(g){g.preventDefault(),b(e.file)}function x(g){const{xhrMap:M,doChange:$,onRemoveRef:{value:A},mergedFileListRef:{value:z}}=t;Promise.resolve(A?A({file:Object.assign({},g),fileList:z}):!0).then(B=>{if(B===!1)return;const R=Object.assign({},g,{status:"removed"});M.delete(g.id),$(R,void 0,{remove:!0})})}function b(g){const{onDownloadRef:{value:M}}=t;Promise.resolve(M?M(Object.assign({},g)):!0).then($=>{$!==!1&&Jh(g.url,g.name)})}function S(g){const{xhrMap:M}=t,$=M.get(g.id);$==null||$.abort(),x(Object.assign({},g))}function _(){const{onPreviewRef:{value:g}}=t;if(g)g(e.file);else if(e.listType==="image-card"){const{value:M}=r;if(!M)return;M.click()}}const m=()=>rp(this,void 0,void 0,function*(){const{listType:g}=e;g!=="image"&&g!=="image-card"||t.shouldUseThumbnailUrlRef.value(e.file)&&(n.value=yield t.getFileThumbnailUrlResolver(e.file))});return lt(()=>{m()}),{mergedTheme:t.mergedThemeRef,progressStatus:o,buttonType:i,showProgress:l,disabled:t.mergedDisabledRef,showCancelButton:d,showRemoveButton:a,showDownloadButton:s,showRetryButton:c,showPreviewButton:h,mergedThumbnailUrl:f,shouldUseThumbnailUrl:t.shouldUseThumbnailUrlRef,renderIcon:t.renderIconRef,imageRef:r,handleRemoveOrCancelClick:y,handleDownloadClick:C,handleRetryClick:p,handlePreviewClick:_}},render(){const{clsPrefix:e,mergedTheme:t,listType:r,file:n,renderIcon:o}=this;let i;const l=r==="image";l||r==="image-card"?i=!this.shouldUseThumbnailUrl(n)||!this.mergedThumbnailUrl?u("span",{class:`${e}-upload-file-info__thumbnail`},o?o(n):Ci(n)?u(fe,{clsPrefix:e},{default:()=>ep}):u(fe,{clsPrefix:e},{default:()=>tp})):u("a",{rel:"noopener noreferer",target:"_blank",href:n.url||void 0,class:`${e}-upload-file-info__thumbnail`,onClick:this.handlePreviewClick},r==="image-card"?u(Mr,{src:this.mergedThumbnailUrl||void 0,previewSrc:n.url||void 0,alt:n.name,ref:"imageRef"}):u("img",{src:this.mergedThumbnailUrl||void 0,alt:n.name})):i=u("span",{class:`${e}-upload-file-info__thumbnail`},o?o(n):u(fe,{clsPrefix:e},{default:()=>u(sc,null)}));const a=u(Qh,{show:this.showProgress,percentage:n.percentage||0,status:this.progressStatus}),s=r==="text"||r==="image";return u("div",{class:[`${e}-upload-file`,`${e}-upload-file--${this.progressStatus}-status`,n.url&&n.status!=="error"&&r!=="image-card"&&`${e}-upload-file--with-url`,`${e}-upload-file--${r}-type`]},u("div",{class:`${e}-upload-file-info`},i,u("div",{class:`${e}-upload-file-info__name`},s&&(n.url&&n.status!=="error"?u("a",{rel:"noopener noreferer",target:"_blank",href:n.url||void 0,onClick:this.handlePreviewClick},n.name):u("span",{onClick:this.handlePreviewClick},n.name)),l&&a),u("div",{class:[`${e}-upload-file-info__action`,`${e}-upload-file-info__action--${r}-type`]},this.showPreviewButton?u(ge,{key:"preview",quaternary:!0,type:this.buttonType,onClick:this.handlePreviewClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:Ut},{icon:()=>u(fe,{clsPrefix:e},{default:()=>u(Qo,null)})}):null,(this.showRemoveButton||this.showCancelButton)&&!this.disabled&&u(ge,{key:"cancelOrTrash",theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,quaternary:!0,builtinThemeOverrides:Ut,type:this.buttonType,onClick:this.handleRemoveOrCancelClick},{icon:()=>u(bo,null,{default:()=>this.showRemoveButton?u(fe,{clsPrefix:e,key:"trash"},{default:()=>u(cc,null)}):u(fe,{clsPrefix:e,key:"cancel"},{default:()=>u(pc,null)})})}),this.showRetryButton&&!this.disabled&&u(ge,{key:"retry",quaternary:!0,type:this.buttonType,onClick:this.handleRetryClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:Ut},{icon:()=>u(fe,{clsPrefix:e},{default:()=>u(mc,null)})}),this.showDownloadButton?u(ge,{key:"download",quaternary:!0,type:this.buttonType,onClick:this.handleDownloadClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:Ut},{icon:()=>u(fe,{clsPrefix:e},{default:()=>u(fc,null)})}):null)),!l&&a)}}),op=K({name:"UploadFileList",setup(e,{slots:t}){const r=ie(xt,null);r||wt("upload-file-list","`n-upload-file-list` must be placed inside `n-upload`.");const{abstractRef:n,mergedClsPrefixRef:o,listTypeRef:i,mergedFileListRef:l,fileListStyleRef:d,cssVarsRef:a,themeClassRef:s,maxReachedRef:c,showTriggerRef:f,imageGroupPropsRef:h}=r,p=D(()=>i.value==="image-card"),y=()=>l.value.map(x=>u(np,{clsPrefix:o.value,key:x.id,file:x,listType:i.value})),C=()=>p.value?u(Th,Object.assign({},h.value),{default:y}):u(ko,{group:!0},{default:y});return()=>{const{value:x}=o,{value:b}=n;return u("div",{class:[`${x}-upload-file-list`,p.value&&`${x}-upload-file-list--grid`,b?s==null?void 0:s.value:void 0],style:[b&&a?a.value:"",d.value]},C(),f.value&&!c.value&&p.value&&u(Si,null,t))}}}),ip=j([k("upload","width: 100%;",[U("dragger-inside",[k("upload-trigger",`
|
||
display: block;
|
||
`)]),U("drag-over",[k("upload-dragger",`
|
||
border: var(--n-dragger-border-hover);
|
||
`)])]),k("upload-dragger",`
|
||
cursor: pointer;
|
||
box-sizing: border-box;
|
||
width: 100%;
|
||
text-align: center;
|
||
border-radius: var(--n-border-radius);
|
||
padding: 24px;
|
||
opacity: 1;
|
||
transition:
|
||
opacity .3s var(--n-bezier),
|
||
border-color .3s var(--n-bezier),
|
||
background-color .3s var(--n-bezier);
|
||
background-color: var(--n-dragger-color);
|
||
border: var(--n-dragger-border);
|
||
`,[j("&:hover",`
|
||
border: var(--n-dragger-border-hover);
|
||
`),U("disabled",`
|
||
cursor: not-allowed;
|
||
`)]),k("upload-trigger",`
|
||
display: inline-block;
|
||
box-sizing: border-box;
|
||
opacity: 1;
|
||
transition: opacity .3s var(--n-bezier);
|
||
`,[j("+",[k("upload-file-list","margin-top: 8px;")]),U("disabled",`
|
||
opacity: var(--n-item-disabled-opacity);
|
||
cursor: not-allowed;
|
||
`),U("image-card",`
|
||
width: 96px;
|
||
height: 96px;
|
||
`,[k("base-icon",`
|
||
font-size: 24px;
|
||
`),k("upload-dragger",`
|
||
padding: 0;
|
||
height: 100%;
|
||
width: 100%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
`)])]),k("upload-file-list",`
|
||
line-height: var(--n-line-height);
|
||
opacity: 1;
|
||
transition: opacity .3s var(--n-bezier);
|
||
`,[j("a, img","outline: none;"),U("disabled",`
|
||
opacity: var(--n-item-disabled-opacity);
|
||
cursor: not-allowed;
|
||
`,[k("upload-file","cursor: not-allowed;")]),U("grid",`
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, 96px);
|
||
grid-gap: 8px;
|
||
margin-top: 0;
|
||
`),k("upload-file",`
|
||
display: block;
|
||
box-sizing: border-box;
|
||
cursor: default;
|
||
padding: 0px 12px 0 6px;
|
||
transition: background-color .3s var(--n-bezier);
|
||
border-radius: var(--n-border-radius);
|
||
`,[xn(),k("progress",[xn({foldPadding:!0})]),j("&:hover",`
|
||
background-color: var(--n-item-color-hover);
|
||
`,[k("upload-file-info",[E("action",`
|
||
opacity: 1;
|
||
`)])]),U("image-type",`
|
||
border-radius: var(--n-border-radius);
|
||
text-decoration: underline;
|
||
text-decoration-color: #0000;
|
||
`,[k("upload-file-info",`
|
||
padding-top: 0px;
|
||
padding-bottom: 0px;
|
||
width: 100%;
|
||
height: 100%;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
padding: 6px 0;
|
||
`,[k("progress",`
|
||
padding: 2px 0;
|
||
margin-bottom: 0;
|
||
`),E("name",`
|
||
padding: 0 8px;
|
||
`),E("thumbnail",`
|
||
width: 32px;
|
||
height: 32px;
|
||
font-size: 28px;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
`,[j("img",`
|
||
width: 100%;
|
||
`)])])]),U("text-type",[k("progress",`
|
||
box-sizing: border-box;
|
||
padding-bottom: 6px;
|
||
margin-bottom: 6px;
|
||
`)]),U("image-card-type",`
|
||
position: relative;
|
||
width: 96px;
|
||
height: 96px;
|
||
border: var(--n-item-border-image-card);
|
||
border-radius: var(--n-border-radius);
|
||
padding: 0;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
transition: border-color .3s var(--n-bezier), background-color .3s var(--n-bezier);
|
||
border-radius: var(--n-border-radius);
|
||
overflow: hidden;
|
||
`,[k("progress",`
|
||
position: absolute;
|
||
left: 8px;
|
||
bottom: 8px;
|
||
right: 8px;
|
||
width: unset;
|
||
`),k("upload-file-info",`
|
||
padding: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
`,[E("thumbnail",`
|
||
width: 100%;
|
||
height: 100%;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 36px;
|
||
`,[j("img",`
|
||
width: 100%;
|
||
`)])]),j("&::before",`
|
||
position: absolute;
|
||
z-index: 1;
|
||
left: 0;
|
||
right: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
border-radius: inherit;
|
||
opacity: 0;
|
||
transition: opacity .2s var(--n-bezier);
|
||
content: "";
|
||
`),j("&:hover",[j("&::before","opacity: 1;"),k("upload-file-info",[E("thumbnail","opacity: .12;")])])]),U("error-status",[j("&:hover",`
|
||
background-color: var(--n-item-color-hover-error);
|
||
`),k("upload-file-info",[E("name","color: var(--n-item-text-color-error);"),E("thumbnail","color: var(--n-item-text-color-error);")]),U("image-card-type",`
|
||
border: var(--n-item-border-image-card-error);
|
||
`)]),U("with-url",`
|
||
cursor: pointer;
|
||
`,[k("upload-file-info",[E("name",`
|
||
color: var(--n-item-text-color-success);
|
||
text-decoration-color: var(--n-item-text-color-success);
|
||
`,[j("a",`
|
||
text-decoration: underline;
|
||
`)])])]),k("upload-file-info",`
|
||
position: relative;
|
||
padding-top: 6px;
|
||
padding-bottom: 6px;
|
||
display: flex;
|
||
flex-wrap: nowrap;
|
||
`,[E("thumbnail",`
|
||
font-size: 18px;
|
||
opacity: 1;
|
||
transition: opacity .2s var(--n-bezier);
|
||
color: var(--n-item-icon-color);
|
||
`,[k("base-icon",`
|
||
margin-right: 2px;
|
||
vertical-align: middle;
|
||
transition: color .3s var(--n-bezier);
|
||
`)]),E("action",`
|
||
padding-top: inherit;
|
||
padding-bottom: inherit;
|
||
position: absolute;
|
||
right: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
width: 80px;
|
||
display: flex;
|
||
align-items: center;
|
||
transition: opacity .2s var(--n-bezier);
|
||
justify-content: flex-end;
|
||
opacity: 0;
|
||
`,[k("button",[j("&:not(:last-child)",{marginRight:"4px"}),k("base-icon",[j("svg",[go()])])]),U("image-type",`
|
||
position: relative;
|
||
max-width: 80px;
|
||
width: auto;
|
||
`),U("image-card-type",`
|
||
z-index: 2;
|
||
position: absolute;
|
||
width: 100%;
|
||
height: 100%;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
top: 0;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
`)]),E("name",`
|
||
color: var(--n-item-text-color);
|
||
flex: 1;
|
||
display: flex;
|
||
justify-content: center;
|
||
text-overflow: ellipsis;
|
||
overflow: hidden;
|
||
flex-direction: column;
|
||
text-decoration-color: #0000;
|
||
font-size: var(--n-font-size);
|
||
transition:
|
||
color .3s var(--n-bezier),
|
||
text-decoration-color .3s var(--n-bezier);
|
||
`,[j("a",`
|
||
color: inherit;
|
||
text-decoration: underline;
|
||
`)])])])]),k("upload-file-input",`
|
||
display: block;
|
||
width: 0;
|
||
height: 0;
|
||
opacity: 0;
|
||
`)]);var eo=globalThis&&globalThis.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(l){l(i)})}return new(r||(r=Promise))(function(i,l){function d(c){try{s(n.next(c))}catch(f){l(f)}}function a(c){try{s(n.throw(c))}catch(f){l(f)}}function s(c){c.done?i(c.value):o(c.value).then(d,a)}s((n=n.apply(e,t||[])).next())})};function ap(e,t,r){const{doChange:n,xhrMap:o}=e;let i=0;function l(a){var s;let c=Object.assign({},t,{status:"error",percentage:i});o.delete(t.id),c=Rt(((s=e.onError)===null||s===void 0?void 0:s.call(e,{file:c,event:a}))||c),n(c,a)}function d(a){var s;if(e.isErrorState){if(e.isErrorState(r)){l(a);return}}else if(r.status<200||r.status>=300){l(a);return}let c=Object.assign({},t,{status:"finished",percentage:i});o.delete(t.id),c=Rt(((s=e.onFinish)===null||s===void 0?void 0:s.call(e,{file:c,event:a}))||c),n(c,a)}return{handleXHRLoad:d,handleXHRError:l,handleXHRAbort(a){const s=Object.assign({},t,{status:"removed",file:null,percentage:i});o.delete(t.id),n(s,a)},handleXHRProgress(a){const s=Object.assign({},t,{status:"uploading"});if(a.lengthComputable){const c=Math.ceil(a.loaded/a.total*100);s.percentage=c,i=c}n(s,a)}}}function lp(e){const{inst:t,file:r,data:n,headers:o,withCredentials:i,action:l,customRequest:d}=e,{doChange:a}=e.inst;let s=0;d({file:r,data:n,headers:o,withCredentials:i,action:l,onProgress(c){const f=Object.assign({},r,{status:"uploading"}),h=c.percent;f.percentage=h,s=h,a(f)},onFinish(){var c;let f=Object.assign({},r,{status:"finished",percentage:s});f=Rt(((c=t.onFinish)===null||c===void 0?void 0:c.call(t,{file:f}))||f),a(f)},onError(){var c;let f=Object.assign({},r,{status:"error",percentage:s});f=Rt(((c=t.onError)===null||c===void 0?void 0:c.call(t,{file:f}))||f),a(f)}})}function sp(e,t,r){const n=ap(e,t,r);r.onabort=n.handleXHRAbort,r.onerror=n.handleXHRError,r.onload=n.handleXHRLoad,r.upload&&(r.upload.onprogress=n.handleXHRProgress)}function Pi(e,t){return typeof e=="function"?e({file:t}):e||{}}function dp(e,t,r){const n=Pi(t,r);n&&Object.keys(n).forEach(o=>{e.setRequestHeader(o,n[o])})}function up(e,t,r){const n=Pi(t,r);n&&Object.keys(n).forEach(o=>{e.append(o,n[o])})}function cp(e,t,r,{method:n,action:o,withCredentials:i,responseType:l,headers:d,data:a}){const s=new XMLHttpRequest;s.responseType=l,e.xhrMap.set(r.id,s),s.withCredentials=i;const c=new FormData;if(up(c,a,r),c.append(t,r.file),sp(e,r,s),o!==void 0){s.open(n.toUpperCase(),o),dp(s,d,r),s.send(c);const f=Object.assign({},r,{status:"uploading"});e.doChange(f)}}const fp=Object.assign(Object.assign({},ne.props),{name:{type:String,default:"file"},accept:String,action:String,customRequest:Function,directory:Boolean,directoryDnd:{type:Boolean,default:void 0},method:{type:String,default:"POST"},multiple:Boolean,showFileList:{type:Boolean,default:!0},data:[Object,Function],headers:[Object,Function],withCredentials:Boolean,responseType:{type:String,default:""},disabled:{type:Boolean,default:void 0},onChange:Function,onRemove:Function,onFinish:Function,onError:Function,onBeforeUpload:Function,isErrorState:Function,onDownload:Function,defaultUpload:{type:Boolean,default:!0},fileList:Array,"onUpdate:fileList":[Function,Array],onUpdateFileList:[Function,Array],fileListStyle:[String,Object],defaultFileList:{type:Array,default:()=>[]},showCancelButton:{type:Boolean,default:!0},showRemoveButton:{type:Boolean,default:!0},showDownloadButton:Boolean,showRetryButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},listType:{type:String,default:"text"},onPreview:Function,shouldUseThumbnailUrl:{type:Function,default:e=>qh?Ci(e):!1},createThumbnailUrl:Function,abstract:Boolean,max:Number,showTrigger:{type:Boolean,default:!0},imageGroupProps:Object,inputProps:Object,triggerStyle:[String,Object],renderIcon:Object}),hp=K({name:"Upload",props:fp,setup(e){e.abstract&&e.listType==="image-card"&&wt("upload","when the list-type is image-card, abstract is not supported.");const{mergedClsPrefixRef:t,inlineThemeDisabled:r}=_e(e),n=ne("Upload","-upload",ip,Sh,e,t),o=yo(e),i=D(()=>{const{max:z}=e;return z!==void 0?p.value.length>=z:!1}),l=L(e.defaultFileList),d=J(e,"fileList"),a=L(null),s={value:!1},c=L(!1),f=new Map,h=nr(d,l),p=D(()=>h.value.map(Rt));function y(){var z;(z=a.value)===null||z===void 0||z.click()}function C(z){const B=z.target;S(B.files?Array.from(B.files).map(R=>({file:R,entry:null,source:"input"})):null,z),B.value=""}function x(z){const{"onUpdate:fileList":B,onUpdateFileList:R}=e;B&&ce(B,z),R&&ce(R,z),l.value=z}const b=D(()=>e.multiple||e.directory);function S(z,B){if(!z||z.length===0)return;const{onBeforeUpload:R}=e;z=b.value?z:[z[0]];const{max:O,accept:I}=e;z=z.filter(({file:P,source:N})=>N==="dnd"&&(I!=null&&I.trim())?Zh(P.name,P.type,I):!0),O&&(z=z.slice(0,O-p.value.length));const w=$r();Promise.all(z.map(({file:P,entry:N})=>eo(this,void 0,void 0,function*(){var F;const q={id:$r(),batchId:w,name:P.name,status:"pending",percentage:0,file:P,url:null,type:P.type,thumbnailUrl:null,fullPath:(F=N==null?void 0:N.fullPath)!==null&&F!==void 0?F:`/${P.webkitRelativePath||P.name}`};return!R||(yield R({file:q,fileList:p.value}))!==!1?q:null}))).then(P=>eo(this,void 0,void 0,function*(){let N=Promise.resolve();return P.forEach(F=>{N=N.then(Gt).then(()=>{F&&m(F,B,{append:!0})})}),yield N})).then(()=>{e.defaultUpload&&_()})}function _(z){const{method:B,action:R,withCredentials:O,headers:I,data:w,name:P}=e,N=z!==void 0?p.value.filter(q=>q.id===z):p.value,F=z!==void 0;N.forEach(q=>{const{status:Q}=q;(Q==="pending"||Q==="error"&&F)&&(e.customRequest?lp({inst:{doChange:m,xhrMap:f,onFinish:e.onFinish,onError:e.onError},file:q,action:R,withCredentials:O,headers:I,data:w,customRequest:e.customRequest}):cp({doChange:m,xhrMap:f,onFinish:e.onFinish,onError:e.onError,isErrorState:e.isErrorState},P,q,{method:B,action:R,withCredentials:O,responseType:e.responseType,headers:I,data:w}))})}const m=(z,B,R={append:!1,remove:!1})=>{const{append:O,remove:I}=R,w=Array.from(p.value),P=w.findIndex(N=>N.id===z.id);if(O||I||~P){O?w.push(z):I?w.splice(P,1):w.splice(P,1,z);const{onChange:N}=e;N&&N({file:z,fileList:w,event:B}),x(w)}};function g(z){var B;if(z.thumbnailUrl)return z.thumbnailUrl;const{createThumbnailUrl:R}=e;return R?(B=R(z.file,z))!==null&&B!==void 0?B:z.url||"":z.url?z.url:z.file?Kh(z.file):""}const M=D(()=>{const{common:{cubicBezierEaseInOut:z},self:{draggerColor:B,draggerBorder:R,draggerBorderHover:O,itemColorHover:I,itemColorHoverError:w,itemTextColorError:P,itemTextColorSuccess:N,itemTextColor:F,itemIconColor:q,itemDisabledOpacity:Q,lineHeight:ae,borderRadius:me,fontSize:ve,itemBorderImageCardError:we,itemBorderImageCard:re}}=n.value;return{"--n-bezier":z,"--n-border-radius":me,"--n-dragger-border":R,"--n-dragger-border-hover":O,"--n-dragger-color":B,"--n-font-size":ve,"--n-item-color-hover":I,"--n-item-color-hover-error":w,"--n-item-disabled-opacity":Q,"--n-item-icon-color":q,"--n-item-text-color":F,"--n-item-text-color-error":P,"--n-item-text-color-success":N,"--n-line-height":ae,"--n-item-border-image-card-error":we,"--n-item-border-image-card":re}}),$=r?He("upload",void 0,M,e):void 0;ke(xt,{mergedClsPrefixRef:t,mergedThemeRef:n,showCancelButtonRef:J(e,"showCancelButton"),showDownloadButtonRef:J(e,"showDownloadButton"),showRemoveButtonRef:J(e,"showRemoveButton"),showRetryButtonRef:J(e,"showRetryButton"),onRemoveRef:J(e,"onRemove"),onDownloadRef:J(e,"onDownload"),mergedFileListRef:p,triggerStyleRef:J(e,"triggerStyle"),shouldUseThumbnailUrlRef:J(e,"shouldUseThumbnailUrl"),renderIconRef:J(e,"renderIcon"),xhrMap:f,submit:_,doChange:m,showPreviewButtonRef:J(e,"showPreviewButton"),onPreviewRef:J(e,"onPreview"),getFileThumbnailUrlResolver:g,listTypeRef:J(e,"listType"),dragOverRef:c,openOpenFileDialog:y,draggerInsideRef:s,handleFileAddition:S,mergedDisabledRef:o.mergedDisabledRef,maxReachedRef:i,fileListStyleRef:J(e,"fileListStyle"),abstractRef:J(e,"abstract"),acceptRef:J(e,"accept"),cssVarsRef:r?void 0:M,themeClassRef:$==null?void 0:$.themeClass,onRender:$==null?void 0:$.onRender,showTriggerRef:J(e,"showTrigger"),imageGroupPropsRef:J(e,"imageGroupProps"),mergedDirectoryDndRef:D(()=>{var z;return(z=e.directoryDnd)!==null&&z!==void 0?z:e.directory})});const A={clear:()=>{l.value=[]},submit:_,openOpenFileDialog:y};return Object.assign({mergedClsPrefix:t,draggerInsideRef:s,inputElRef:a,mergedTheme:n,dragOver:c,mergedMultiple:b,cssVars:r?void 0:M,themeClass:$==null?void 0:$.themeClass,onRender:$==null?void 0:$.onRender,handleFileInputChange:C},A)},render(){var e,t;const{draggerInsideRef:r,mergedClsPrefix:n,$slots:o,directory:i,onRender:l}=this;if(o.default&&!this.abstract){const a=o.default()[0];!((e=a==null?void 0:a.type)===null||e===void 0)&&e[yi]&&(r.value=!0)}const d=u("input",Object.assign({},this.inputProps,{ref:"inputElRef",type:"file",class:`${n}-upload-file-input`,accept:this.accept,multiple:this.mergedMultiple,onChange:this.handleFileInputChange,webkitdirectory:i||void 0,directory:i||void 0}));return this.abstract?u(Ne,null,(t=o.default)===null||t===void 0?void 0:t.call(o),u(ml,{to:"body"},d)):(l==null||l(),u("div",{class:[`${n}-upload`,r.value&&`${n}-upload--dragger-inside`,this.dragOver&&`${n}-upload--drag-over`,this.themeClass],style:this.cssVars},d,this.showTrigger&&this.listType!=="image-card"&&u(Si,null,o),this.showFileList&&u(op,null,o)))}}),to="/web/assets/setting-c6ca7b14.svg";function pp(e){const t=document.cookie.match("(^|;) ?"+e+"=([^;]*)(;|$)");return t?t[2]:null}function vp(e,t,r=0,n="/",o=""){let i=e+"="+t+";path="+n;if(o&&(i+=";domain="+o),r>0){const l=new Date;l.setTime(l.getTime()+r*60*1e3),i+=";expires="+l.toUTCString()}document.cookie=i}const at={get:pp,set:vp},Lt=bl("prompt-store",()=>{const e=L([{type:1,name:"ChatGPT 中文调教指南 - 简体",url:"./data/prompts/prompts-zh.json",refer:"https://github.com/PlexPt/awesome-chatgpt-prompts-zh"},{type:1,name:"ChatGPT 中文调教指南 - 繁体",url:"./data/prompts/prompts-zh-TW.json",refer:"https://github.com/PlexPt/awesome-chatgpt-prompts-zh"},{type:1,name:"Awesome ChatGPT Prompts",url:"./data/prompts/prompts.csv",refer:"https://github.com/f/awesome-chatgpt-prompts"},{type:2,name:"",url:"",refer:""}]),t=L(!1),r=L(!1),n=L([]),o=L(""),i=L(0),l=L({isShow:!1,newPrompt:{act:"",prompt:""}}),d=D(()=>{var s;return o.value?(s=n.value)==null?void 0:s.filter(c=>c.act.includes(o.value)||c.prompt.includes(o.value)):n.value});function a(s){if(s instanceof Array&&s.every(c=>c.act&&c.prompt)){if(n.value.length===0)return n.value.push(...s),{result:!0,data:{successCount:s.length}};const c=s.filter(f=>{var h;return(h=n.value)==null?void 0:h.every(p=>f.act!==p.act&&f.prompt!==p.prompt)});return n.value.push(...c),{result:!0,data:{successCount:c.length}}}else return{result:!1,msg:"提示词格式有误"}}return{promptDownloadConfig:e,isShowPromptSotre:t,isShowChatPrompt:r,promptList:n,keyword:o,searchPromptList:d,selectedPromptIndex:i,optPromptConfig:l,addPrompt:a}},{persist:{key:"prompt-store",storage:localStorage,paths:["promptList"]}}),gp=["href"],mp={key:1},bp=K({__name:"ChatNavItem",props:{navConfig:{}},setup(e){return(t,r)=>t.navConfig.url?(he(),Le("a",{key:0,href:t.navConfig.url,target:"_blank",rel:"noopener noreferrer"},Qe(t.navConfig.label),9,gp)):(he(),Le("div",mp,Qe(t.navConfig.label),1))}}),ki=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),yp=e=>new Promise((t,r)=>setTimeout(t,e)),wp={class:"flex justify-center gap-3 px-8"},xp={class:"flex justify-center items-center"},Cp=["src"],Sp=$e("p",{class:"text-left"},"提示:形容词+名词+动词+风格,描述得越详细时,效果越好。",-1),ro="骑着摩托的小猫咪,疾驰在路上,动漫场景,详细的细节。",Pp=K({__name:"CreateImage",props:{show:{type:Boolean}},emits:["update:show"],setup(e,{emit:t}){const r=e,n=lr(),o=L(""),i=L(""),l=L(!1),d=D({get:()=>r.show,set:f=>t("update:show",f)}),a=()=>{if(!o.value){n.error("请先输入关键词");return}l.value=!0,i.value=`/images/create?re=1&showselective=1&sude=1&kseed=7500&SFX=2&q=${encodeURIComponent(o.value)}&t=${Date.now()}`},s=()=>{o.value="",i.value=""},c=()=>(o.value=ro,a());return(f,h)=>(he(),Ee(H(vt),{class:"w-11/12 lg:w-[540px] select-none",show:d.value,"onUpdate:show":h[2]||(h[2]=p=>d.value=p),"on-close":s,preset:"card",title:"图像创建"},{default:Z(()=>[$e("head",wp,[G(H(ft),{class:"flex-1",placeholder:"提示词",value:o.value,"onUpdate:value":h[0]||(h[0]=p=>o.value=p),clearable:!0,onKeyup:yl(a,["enter"]),maxlength:"100"},null,8,["value","onKeyup"]),G(H(ge),{secondary:"",type:"info",onClick:a,loading:l.value},{default:Z(()=>[pe("开始创建")]),_:1},8,["loading"])]),$e("main",xp,[i.value?(he(),Le("iframe",{key:0,class:"w-[310px] h-[350px] xl:w-[475px] xl:h-[520px] my-4",src:i.value,frameborder:"0",onLoad:h[1]||(h[1]=p=>l.value=!1)},null,40,Cp)):(he(),Ee(H(Qr),{key:1,class:"h-[40vh] xl:h-[60vh] flex justify-center items-center",description:"暂未创建"},{extra:Z(()=>[G(H(ge),{secondary:"",type:"info",onClick:c},{default:Z(()=>[pe("使用示例创建")]),_:1}),$e("div",{class:"text-[#c2c2c2] px-2 xl:px-10"},[Sp,$e("p",{class:"text-left"},"示例:"+Qe(ro))])]),_:1}))])]),_:1},8,["show"]))}}),kp=$e("div",{class:"text-3xl py-2"},"设置用户",-1),$p=$e("div",{class:"text-xl py-2"},"将删除包括 Cookie 等的所有缓存?",-1),Vt="_U",zp="BingAI_Rand_IP",Ip=K({__name:"ChatNav",setup(e){const t=L(!1),r=L(!1),n=L(""),o=lr(),i=Lt(),{isShowPromptSotre:l}=Mt(i),d=L(!1),a=L(!1),s={github:"github",setToken:"setToken",compose:"compose",createImage:"createImage",promptStore:"promptStore",reset:"reset",version:"version"},c=[{key:s.github,label:"开源地址",url:"https://github.com/adams549659584/go-proxy-bingai"},{key:s.version,label:"版本信息"},{key:s.promptStore,label:"提示词库"},{key:s.setToken,label:"设置用户"},{key:s.compose,label:"撰写文章",url:"/web/compose.html"},{key:s.createImage,label:"图像创建"},{key:s.reset,label:"一键重置"}],f=x=>u(bp,{navConfig:x}),h=x=>{switch(x){case s.version:o.success("当前版本号为:1.7.0");break;case s.promptStore:l.value=!0;break;case s.setToken:n.value=at.get(Vt)||"",r.value=!0;break;case s.reset:d.value=!0;break;case s.createImage:at.get(Vt)||o.warning("体验画图功能需先登录"),a.value=!0;break}},p=async()=>{d.value=!1,at.set(Vt,"",-1),at.set(zp,"",-1),await C(),o.success("清理完成"),window.location.reload()},y=()=>{if(!n.value){o.warning("请先填入用户 Cookie");return}at.set(Vt,n.value,7*24*60,"/"),r.value=!1},C=async()=>{localStorage.clear(),sessionStorage.clear();const x=await caches.keys();for(const b of x)await caches.open(b).then(async S=>{const _=await S.keys();return await Promise.all(_.map(m=>(console.log("del cache : ",m.url),S.delete(m))))})};return(x,b)=>(he(),Le(Ne,null,[H(ki)()?(he(),Ee(H(Yn),{key:0,class:"select-none",show:t.value,options:c,"render-label":f,onSelect:h},{default:Z(()=>[G(H(Mr),{class:"fixed top-6 right-4 cursor-pointer",src:H(to),alt:"设置菜单","preview-disabled":!0,onClick:b[0]||(b[0]=S=>t.value=!t.value)},null,8,["src"])]),_:1},8,["show"])):(he(),Ee(H(Yn),{key:1,class:"select-none",trigger:"hover",options:c,"render-label":f,onSelect:h},{default:Z(()=>[G(H(Mr),{class:"fixed top-6 right-6 cursor-pointer",src:H(to),alt:"设置菜单","preview-disabled":!0},null,8,["src"])]),_:1})),G(H(vt),{show:r.value,"onUpdate:show":b[3]||(b[3]=S=>r.value=S),preset:"dialog","show-icon":!1},{header:Z(()=>[kp]),action:Z(()=>[G(H(ge),{size:"large",onClick:b[2]||(b[2]=S=>r.value=!1)},{default:Z(()=>[pe("取消")]),_:1}),G(H(ge),{ghost:"",size:"large",type:"info",onClick:y},{default:Z(()=>[pe("保存")]),_:1})]),default:Z(()=>[G(H(ft),{size:"large",value:n.value,"onUpdate:value":b[1]||(b[1]=S=>n.value=S),type:"text",placeholder:"用户 Cookie ,仅需要 _U 的值"},null,8,["value"])]),_:1},8,["show"]),G(H(vt),{show:d.value,"onUpdate:show":b[5]||(b[5]=S=>d.value=S),preset:"dialog","show-icon":!1},{header:Z(()=>[$p]),action:Z(()=>[G(H(ge),{size:"large",onClick:b[4]||(b[4]=S=>d.value=!1)},{default:Z(()=>[pe("取消")]),_:1}),G(H(ge),{ghost:"",size:"large",type:"error",onClick:p},{default:Z(()=>[pe("确定")]),_:1})]),_:1},8,["show"]),G(Pp,{show:a.value,"onUpdate:show":b[6]||(b[6]=S=>a.value=S)},null,8,["show"])],64))}});function no(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Kt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?no(Object(r),!0).forEach(function(n){_p(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):no(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Rp(e,t,r){return t&&oo(e.prototype,t),r&&oo(e,r),e}function _p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Op(e){return Bp(e)||Mp(e)||Lp(e)||Ep()}function Bp(e){if(Array.isArray(e))return Lr(e)}function Mp(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Lp(e,t){if(e){if(typeof e=="string")return Lr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Lr(e,t)}}function Lr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ep(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ut={FRONT:"FRONT",BEHIND:"BEHIND"},ot={INIT:"INIT",FIXED:"FIXED",DYNAMIC:"DYNAMIC"},io=2,Ap=function(){function e(t,r){Tp(this,e),this.init(t,r)}return Rp(e,[{key:"init",value:function(r,n){this.param=r,this.callUpdate=n,this.sizes=new Map,this.firstRangeTotalSize=0,this.firstRangeAverageSize=0,this.lastCalcIndex=0,this.fixedSizeValue=0,this.calcType=ot.INIT,this.offset=0,this.direction="",this.range=Object.create(null),r&&this.checkRange(0,r.keeps-1)}},{key:"destroy",value:function(){this.init(null,null)}},{key:"getRange",value:function(){var r=Object.create(null);return r.start=this.range.start,r.end=this.range.end,r.padFront=this.range.padFront,r.padBehind=this.range.padBehind,r}},{key:"isBehind",value:function(){return this.direction===ut.BEHIND}},{key:"isFront",value:function(){return this.direction===ut.FRONT}},{key:"getOffset",value:function(r){return(r<1?0:this.getIndexOffset(r))+this.param.slotHeaderSize}},{key:"updateParam",value:function(r,n){var o=this;this.param&&r in this.param&&(r==="uniqueIds"&&this.sizes.forEach(function(i,l){n.includes(l)||o.sizes.delete(l)}),this.param[r]=n)}},{key:"saveSize",value:function(r,n){this.sizes.set(r,n),this.calcType===ot.INIT?(this.fixedSizeValue=n,this.calcType=ot.FIXED):this.calcType===ot.FIXED&&this.fixedSizeValue!==n&&(this.calcType=ot.DYNAMIC,delete this.fixedSizeValue),this.calcType!==ot.FIXED&&typeof this.firstRangeTotalSize<"u"&&(this.sizes.size<Math.min(this.param.keeps,this.param.uniqueIds.length)?(this.firstRangeTotalSize=Op(this.sizes.values()).reduce(function(o,i){return o+i},0),this.firstRangeAverageSize=Math.round(this.firstRangeTotalSize/this.sizes.size)):delete this.firstRangeTotalSize)}},{key:"handleDataSourcesChange",value:function(){var r=this.range.start;this.isFront()?r=r-io:this.isBehind()&&(r=r+io),r=Math.max(r,0),this.updateRange(this.range.start,this.getEndByStart(r))}},{key:"handleSlotSizeChange",value:function(){this.handleDataSourcesChange()}},{key:"handleScroll",value:function(r){this.direction=r<this.offset?ut.FRONT:ut.BEHIND,this.offset=r,this.param&&(this.direction===ut.FRONT?this.handleFront():this.direction===ut.BEHIND&&this.handleBehind())}},{key:"handleFront",value:function(){var r=this.getScrollOvers();if(!(r>this.range.start)){var n=Math.max(r-this.param.buffer,0);this.checkRange(n,this.getEndByStart(n))}}},{key:"handleBehind",value:function(){var r=this.getScrollOvers();r<this.range.start+this.param.buffer||this.checkRange(r,this.getEndByStart(r))}},{key:"getScrollOvers",value:function(){var r=this.offset-this.param.slotHeaderSize;if(r<=0)return 0;if(this.isFixedType())return Math.floor(r/this.fixedSizeValue);for(var n=0,o=0,i=0,l=this.param.uniqueIds.length;n<=l;){if(o=n+Math.floor((l-n)/2),i=this.getIndexOffset(o),i===r)return o;i<r?n=o+1:i>r&&(l=o-1)}return n>0?--n:0}},{key:"getIndexOffset",value:function(r){if(!r)return 0;for(var n=0,o=0,i=0;i<r;i++)o=this.sizes.get(this.param.uniqueIds[i]),n=n+(typeof o=="number"?o:this.getEstimateSize());return this.lastCalcIndex=Math.max(this.lastCalcIndex,r-1),this.lastCalcIndex=Math.min(this.lastCalcIndex,this.getLastIndex()),n}},{key:"isFixedType",value:function(){return this.calcType===ot.FIXED}},{key:"getLastIndex",value:function(){return this.param.uniqueIds.length-1}},{key:"checkRange",value:function(r,n){var o=this.param.keeps,i=this.param.uniqueIds.length;i<=o?(r=0,n=this.getLastIndex()):n-r<o-1&&(r=n-o+1),this.range.start!==r&&this.updateRange(r,n)}},{key:"updateRange",value:function(r,n){this.range.start=r,this.range.end=n,this.range.padFront=this.getPadFront(),this.range.padBehind=this.getPadBehind(),this.callUpdate(this.getRange())}},{key:"getEndByStart",value:function(r){var n=r+this.param.keeps-1,o=Math.min(n,this.getLastIndex());return o}},{key:"getPadFront",value:function(){return this.isFixedType()?this.fixedSizeValue*this.range.start:this.getIndexOffset(this.range.start)}},{key:"getPadBehind",value:function(){var r=this.range.end,n=this.getLastIndex();return this.isFixedType()?(n-r)*this.fixedSizeValue:this.lastCalcIndex===n?this.getIndexOffset(n)-this.getIndexOffset(r):(n-r)*this.getEstimateSize()}},{key:"getEstimateSize",value:function(){return this.isFixedType()?this.fixedSizeValue:this.firstRangeAverageSize||this.param.estimateSize}}]),e}(),Dp={dataKey:{type:[String,Function],required:!0},dataSources:{type:Array,required:!0,default:function(){return[]}},dataComponent:{type:[Object,Function],required:!0},keeps:{type:Number,default:30},extraProps:{type:Object},estimateSize:{type:Number,default:50},direction:{type:String,default:"vertical"},start:{type:Number,default:0},offset:{type:Number,default:0},topThreshold:{type:Number,default:0},bottomThreshold:{type:Number,default:0},pageMode:{type:Boolean,default:!1},rootTag:{type:String,default:"div"},wrapTag:{type:String,default:"div"},wrapClass:{type:String,default:"wrap"},wrapStyle:{type:Object},itemTag:{type:String,default:"div"},itemClass:{type:String,default:""},itemClassAdd:{type:Function},itemStyle:{type:Object},headerTag:{type:String,default:"div"},headerClass:{type:String,default:""},headerStyle:{type:Object},footerTag:{type:String,default:"div"},footerClass:{type:String,default:""},footerStyle:{type:Object},itemScopedSlots:{type:Object}},Fp={index:{type:Number},event:{type:String},tag:{type:String},horizontal:{type:Boolean},source:{type:Object},component:{type:[Object,Function]},uniqueKey:{type:[String,Number]},extraProps:{type:Object},scopedSlots:{type:Object}},Np={event:{type:String},uniqueKey:{type:String},tag:{type:String},horizontal:{type:Boolean}},$i=function(t,r,n){var o=null,i=D(function(){return t.horizontal?"offsetWidth":"offsetHeight"}),l=function(){return r.value?r.value[i.value]:0},d=function(){var s=t.event,c=t.uniqueKey,f=t.hasInitial;n(s,c,l(),f)};Ue(function(){typeof ResizeObserver<"u"&&(o=new ResizeObserver(function(){d()}),r.value&&o.observe(r.value))}),xl(function(){d()}),$o(function(){o&&(o.disconnect(),o=null)})},Hp=K({name:"VirtualListItem",props:Fp,emits:["itemResize"],setup:function(t,r){var n=r.emit,o=L(null);return $i(t,o,n),function(){var i=t.tag,l=t.component,d=t.extraProps,a=d===void 0?{}:d,s=t.index,c=t.source,f=t.scopedSlots,h=f===void 0?{}:f,p=t.uniqueKey,y=Kt(Kt({},a),{},{source:c,index:s});return G(i,{key:p,ref:o},{default:function(){return[G(l,Kt(Kt({},y),{},{scopedSlots:h}),null)]}})}}}),ao=K({name:"VirtualListSlot",props:Np,emits:["slotResize"],setup:function(t,r){var n=r.slots,o=r.emit,i=L(null);return $i(t,i,o),function(){var l,d=t.tag,a=t.uniqueKey;return G(d,{ref:i,key:a},{default:function(){return[(l=n.default)===null||l===void 0?void 0:l.call(n)]}})}}}),Tt;(function(e){e.ITEM="itemResize",e.SLOT="slotResize"})(Tt||(Tt={}));var ht;(function(e){e.HEADER="thead",e.FOOTER="tfoot"})(ht||(ht={}));var zi=K({name:"VirtualList",props:Dp,setup:function(t,r){var n=r.emit,o=r.slots,i=r.expose,l=t.direction==="horizontal",d=l?"scrollLeft":"scrollTop",a=L(null),s=L(),c=L(null),f;Se(function(){return t.dataSources.length},function(){f.updateParam("uniqueIds",S()),f.handleDataSourcesChange()}),Se(function(){return t.keeps},function(I){f.updateParam("keeps",I),f.handleSlotSizeChange()}),Se(function(){return t.start},function(I){g(I)}),Se(function(){return t.offset},function(I){return M(I)});var h=function(w){return f.sizes.get(w)},p=function(){return t.pageMode?document.documentElement[d]||document.body[d]:s.value?Math.ceil(s.value[d]):0},y=function(){var w=l?"clientWidth":"clientHeight";return t.pageMode?document.documentElement[w]||document.body[w]:s.value?Math.ceil(s.value[w]):0},C=function(){var w=l?"scrollWidth":"scrollHeight";return t.pageMode?document.documentElement[w]||document.body[w]:s.value?Math.ceil(s.value[w]):0},x=function(w,P,N,F){n("scroll",F,f.getRange()),f.isFront()&&t.dataSources.length&&w-t.topThreshold<=0?n("totop"):f.isBehind()&&w+P+t.bottomThreshold>=N&&n("tobottom")},b=function(w){var P=p(),N=y(),F=C();P<0||P+N>F+1||!F||(f.handleScroll(P),x(P,N,F,w))},S=function(){var w=t.dataKey,P=t.dataSources,N=P===void 0?[]:P;return N.map(function(F){return typeof w=="function"?w(F):F[w]})},_=function(w){a.value=w},m=function(){f=new Ap({slotHeaderSize:0,slotFooterSize:0,keeps:t.keeps,estimateSize:t.estimateSize,buffer:Math.round(t.keeps/3),uniqueIds:S()},_),a.value=f.getRange()},g=function(w){if(w>=t.dataSources.length-1)B();else{var P=f.getOffset(w);M(P)}},M=function(w){t.pageMode?(document.body[d]=w,document.documentElement[d]=w):s.value&&(s.value[d]=w)},$=function(){for(var w=[],P=a.value,N=P.start,F=P.end,q=t.dataSources,Q=t.dataKey,ae=t.itemClass,me=t.itemTag,ve=t.itemStyle,we=t.extraProps,re=t.dataComponent,ze=t.itemScopedSlots,xe=N;xe<=F;xe++){var ee=q[xe];if(ee){var De=typeof Q=="function"?Q(ee):ee[Q];typeof De=="string"||typeof De=="number"?w.push(G(Hp,{index:xe,tag:me,event:Tt.ITEM,horizontal:l,uniqueKey:De,source:ee,extraProps:we,component:re,scopedSlots:ze,style:ve,class:"".concat(ae).concat(t.itemClassAdd?" "+t.itemClassAdd(xe):""),onItemResize:A},null)):console.warn("Cannot get the data-key '".concat(Q,"' from data-sources."))}else console.warn("Cannot get the index '".concat(xe,"' from data-sources."))}return w},A=function(w,P){f.saveSize(w,P),n("resized",w,P)},z=function(w,P,N){w===ht.HEADER?f.updateParam("slotHeaderSize",P):w===ht.FOOTER&&f.updateParam("slotFooterSize",P),N&&f.handleSlotSizeChange()},B=function I(){if(c.value){var w=c.value[l?"offsetLeft":"offsetTop"];M(w),setTimeout(function(){p()+y()<C()&&I()},3)}},R=function(){if(s.value){var w=s.value.getBoundingClientRect(),P=s.value.ownerDocument.defaultView,N=l?w.left+P.pageXOffset:w.top+P.pageYOffset;f.updateParam("slotHeaderSize",N)}},O=function(){return f.sizes.size};return lo(function(){m()}),wl(function(){M(f.offset)}),Ue(function(){t.start?g(t.start):t.offset&&M(t.offset),t.pageMode&&(R(),document.addEventListener("scroll",b,{passive:!1}))}),$o(function(){f.destroy(),t.pageMode&&document.removeEventListener("scroll",b)}),i({scrollToBottom:B,getSizes:O,getSize:h,getOffset:p,getScrollSize:C,getClientSize:y,scrollToOffset:M,scrollToIndex:g}),function(){var I=t.pageMode,w=t.rootTag,P=t.wrapTag,N=t.wrapClass,F=t.wrapStyle,q=t.headerTag,Q=t.headerClass,ae=t.headerStyle,me=t.footerTag,ve=t.footerClass,we=t.footerStyle,re=a.value,ze=re.padFront,xe=re.padBehind,ee={padding:l?"0px ".concat(xe,"px 0px ").concat(ze,"px"):"".concat(ze,"px 0px ").concat(xe,"px")},De=F?Object.assign({},F,ee):ee,qe=o.header,Ge=o.footer;return G(w,{ref:s,onScroll:!I&&b},{default:function(){return[qe&&G(ao,{class:Q,style:ae,tag:q,event:Tt.SLOT,uniqueKey:ht.HEADER,onSlotResize:z},{default:function(){return[qe()]}}),G(P,{class:N,style:De},{default:function(){return[$()]}}),Ge&&G(ao,{class:ve,style:we,tag:me,event:Tt.SLOT,uniqueKey:ht.FOOTER,onSlotResize:z},{default:function(){return[Ge()]}}),G("div",{ref:c,style:{width:l?"0px":"100%",height:l?"100%":"0px"}},null)]}})}}});const jp={class:"inline-block max-w-[120px] xl:max-w-[650px] overflow-hidden text-ellipsis"},Wp={class:"float-right"},Up=K({__name:"ChatPromptItem",props:{index:{},source:{}},setup(e){const t=lr(),r=Lt(),{promptList:n,optPromptConfig:o}=Mt(r),i=d=>{n.value=n.value.filter(a=>a.act!==d.act&&a.prompt!==d.prompt),t.success("删除提示词成功")},l=d=>{o.value.isShow=!0,o.value.type="edit",o.value.title="编辑提示词",o.value.tmpPrompt=d,o.value.newPrompt={...d}};return(d,a)=>(he(),Ee(H(bi),{class:"hover:bg-gray-100 cursor-pointer p-5"},{description:Z(()=>[G(H(ii),{type:"info"},{default:Z(()=>[$e("span",jp,Qe(d.source.act),1)]),_:1}),$e("div",Wp,[G(H(ge),{secondary:"",type:"info",size:"small",onClick:a[0]||(a[0]=s=>l(d.source))},{default:Z(()=>[pe("编辑")]),_:1}),G(H(ge),{secondary:"",class:"ml-2",type:"error",size:"small",onClick:a[1]||(a[1]=s=>i(d.source))},{default:Z(()=>[pe("删除")]),_:1})])]),default:Z(()=>[G(H(si),{tooltip:!1,"line-clamp":2},{default:Z(()=>[pe(Qe(d.source.prompt),1)]),_:1})]),_:1}))}}),Vp={class:"flex justify-start flex-wrap gap-2 px-5 pb-2"},Kp=["href"],qp={class:"flex justify-center gap-5"},Gp=["href"],Xp=K({__name:"ChatPromptStore",setup(e){const t=lr(),r=Lt(),{promptDownloadConfig:n,isShowPromptSotre:o,promptList:i,keyword:l,searchPromptList:d,optPromptConfig:a}=Mt(r),s=L(!1),c=L(!1),f=L(!1),h=()=>{a.value.isShow=!0,a.value.type="add",a.value.title="添加提示词",a.value.newPrompt={act:"",prompt:""}},p=()=>{const{type:_,tmpPrompt:m,newPrompt:g}=a.value;if(!g.act)return t.error("提示词标题不能为空");if(!g.prompt)return t.error("提示词描述不能为空");if(_==="add")i.value=[g,...i.value],t.success("添加提示词成功");else if(_==="edit"){if(g.act===(m==null?void 0:m.act)&&g.prompt===(m==null?void 0:m.prompt)){t.warning("提示词未变更"),a.value.isShow=!1;return}const M=i.value.findIndex($=>$.act===(m==null?void 0:m.act)&&$.prompt===(m==null?void 0:m.prompt));M>-1?(i.value[M]=g,t.success("编辑提示词成功")):t.error("编辑提示词出错")}a.value.isShow=!1},y=_=>new Promise((m,g)=>{const M=new FileReader;M.onload=function($){var A;m((A=$.target)==null?void 0:A.result)},M.onerror=g,M.readAsText(_)}),C=async _=>{var m;if(_.file.file){c.value=!0;const g=await y(_.file.file),M=JSON.parse(g),$=r.addPrompt(M);$.result?(t.info(`上传文件含 ${M.length} 条数据`),t.success(`成功导入 ${(m=$.data)==null?void 0:m.successCount} 条有效数据`)):t.error($.msg||"提示词格式有误"),c.value=!1}else t.error("上传文件有误")},x=()=>{if(i.value.length===0)return t.error("暂无可导出的提示词数据");f.value=!0;const _=JSON.stringify(i.value),m=new Blob([_],{type:"application/json"}),g=URL.createObjectURL(m),M=document.createElement("a");M.href=g,M.download="BingAIPrompts.json",M.click(),URL.revokeObjectURL(g),t.success("导出提示词库成功"),f.value=!1},b=()=>{i.value=[],t.success("清空提示词库成功")},S=async _=>{var M;if(!_.url)return t.error("请先输入下载链接");_.isDownloading=!0;let m;if(_.url.endsWith(".json"))m=await fetch(_.url).then($=>$.json());else if(_.url.endsWith(".csv")){const $=await fetch(_.url).then(A=>A.text());console.log($),m=$.split(`
|
||
`).filter(A=>A).map(A=>{var B;const z=A.split('","');return{act:z[0].slice(1),prompt:(B=z[1])==null?void 0:B.slice(1)}}),m.shift()}else return _.isDownloading=!1,t.error("暂不支持下载此后缀的提示词");_.isDownloading=!1;const g=r.addPrompt(m);g.result?(t.info(`下载文件含 ${m.length} 条数据`),t.success(`成功导入 ${(M=g.data)==null?void 0:M.successCount} 条有效数据`)):t.error(g.msg||"提示词格式有误")};return(_,m)=>(he(),Le(Ne,null,[G(H(vt),{class:"w-11/12 xl:w-[900px]",show:H(o),"onUpdate:show":m[3]||(m[3]=g=>Cn(o)?o.value=g:null),preset:"card",title:"提示词库"},{default:Z(()=>[$e("div",Vp,[G(H(ft),{class:"basis-full xl:basis-0 xl:min-w-[300px]",placeholder:"搜索提示词",value:H(l),"onUpdate:value":m[0]||(m[0]=g=>Cn(l)?l.value=g:null),clearable:!0},null,8,["value"]),G(H(ge),{secondary:"",type:"info",onClick:m[1]||(m[1]=g=>s.value=!0)},{default:Z(()=>[pe("下载")]),_:1}),G(H(ge),{secondary:"",type:"info",onClick:h},{default:Z(()=>[pe("添加")]),_:1}),G(H(hp),{class:"w-[56px] xl:w-auto",accept:".json","default-upload":!1,"show-file-list":!1,onChange:C},{default:Z(()=>[G(H(ge),{secondary:"",type:"success",loading:c.value},{default:Z(()=>[pe("导入")]),_:1},8,["loading"])]),_:1}),G(H(ge),{secondary:"",type:"success",onClick:x,loading:f.value},{default:Z(()=>[pe("导出")]),_:1},8,["loading"]),G(H(ge),{secondary:"",type:"error",onClick:b},{default:Z(()=>[pe("清空")]),_:1})]),H(d).length>0?(he(),Ee(H(zi),{key:0,class:"h-[40vh] xl:h-[60vh] overflow-y-auto","data-key":"prompt","data-sources":H(d),"data-component":Up,keeps:10},null,8,["data-sources"])):(he(),Ee(H(Qr),{key:1,class:"h-[40vh] xl:h-[60vh] flex justify-center items-center",description:"暂无数据"},{extra:Z(()=>[G(H(ge),{secondary:"",type:"info",onClick:m[2]||(m[2]=g=>s.value=!0)},{default:Z(()=>[pe("下载提示词")]),_:1})]),_:1}))]),_:1},8,["show"]),G(H(vt),{class:"w-11/12 xl:w-[600px]",show:H(a).isShow,"onUpdate:show":m[6]||(m[6]=g=>H(a).isShow=g),preset:"card",title:H(a).title},{default:Z(()=>[G(H(uh),{vertical:""},{default:Z(()=>[pe(" 标题 "),G(H(ft),{placeholder:"请输入标题",value:H(a).newPrompt.act,"onUpdate:value":m[4]||(m[4]=g=>H(a).newPrompt.act=g)},null,8,["value"]),pe(" 描述 "),G(H(ft),{placeholder:"请输入描述",type:"textarea",value:H(a).newPrompt.prompt,"onUpdate:value":m[5]||(m[5]=g=>H(a).newPrompt.prompt=g)},null,8,["value"]),G(H(ge),{block:"",secondary:"",type:"info",onClick:p},{default:Z(()=>[pe("保存")]),_:1})]),_:1})]),_:1},8,["show","title"]),G(H(vt),{class:"w-11/12 xl:w-[600px]",show:s.value,"onUpdate:show":m[7]||(m[7]=g=>s.value=g),preset:"card",title:"下载提示词"},{default:Z(()=>[G(H(Bh),{class:"overflow-y-auto rounded-lg",hoverable:"",clickable:""},{default:Z(()=>[(he(!0),Le(Ne,null,Cl(H(n),(g,M)=>(he(),Ee(H(Mh),{key:M},{suffix:Z(()=>[$e("div",qp,[g.type===1?(he(),Le("a",{key:0,class:"no-underline",href:g.refer,target:"_blank",rel:"noopener noreferrer"},[G(H(ge),{secondary:""},{default:Z(()=>[pe("来源")]),_:1})],8,Gp)):Yt("",!0),G(H(ge),{secondary:"",type:"info",onClick:$=>S(g),loading:g.isDownloading},{default:Z(()=>[pe("下载")]),_:2},1032,["onClick","loading"])])]),default:Z(()=>[g.type===1?(he(),Le("a",{key:0,class:"no-underline text-blue-500",href:g.url,target:"_blank",rel:"noopener noreferrer"},Qe(g.name),9,Kp)):g.type===2?(he(),Ee(H(ft),{key:1,placeholder:"请输入下载链接,支持 json 及 csv ",value:g.url,"onUpdate:value":$=>g.url=$},null,8,["value","onUpdate:value"])):Yt("",!0)]),_:2},1024))),128))]),_:1})]),_:1},8,["show"])],64))}}),Yp=`/* 移除顶部背景遮挡 */\r
|
||
.scroller>.top {\r
|
||
display: none !important;\r
|
||
}\r
|
||
\r
|
||
/* 移除顶部边距 */\r
|
||
.scroller>.scroller-positioner>.content {\r
|
||
padding-top: 0 !important;\r
|
||
}\r
|
||
\r
|
||
/* 聊天记录 */\r
|
||
.scroller .side-panel {\r
|
||
position: fixed;\r
|
||
right: 10px;\r
|
||
}`,Zp={class:"inline-block max-w-[310px] xl:max-w-[650px] overflow-hidden text-ellipsis"},Jp=K({__name:"ChatPromptItem",props:{index:{},source:{}},setup(e){const t=Lt(),{selectedPromptIndex:r,isShowChatPrompt:n,keyword:o}=Mt(t),i=l=>{l&&(o.value="",CIB.vm.actionBar.inputText=l.prompt,CIB.vm.actionBar.input.focus(),n.value=!1)};return(l,d)=>(he(),Ee(H(bi),{class:Kr(["hover:bg-gray-100 cursor-pointer px-5 h-[130px] flex justify-start items-center",{"bg-gray-100":l.index===H(r)}]),onClick:d[0]||(d[0]=a=>i(l.source))},{description:Z(()=>[G(H(ii),{type:"info"},{default:Z(()=>[$e("span",Zp,Qe(l.source.act),1)]),_:1})]),default:Z(()=>[G(H(si),{tooltip:!1,"line-clamp":2},{default:Z(()=>[pe(Qe(l.source.prompt),1)]),_:1})]),_:1},8,["class"]))}}),on=e=>(Sl("data-v-aff729bc"),e=e(),Pl(),e),Qp=on(()=>$e("div",{class:"bounce1"},null,-1)),ev=on(()=>$e("div",{class:"bounce2"},null,-1)),tv=on(()=>$e("div",{class:"bounce3"},null,-1)),rv=[Qp,ev,tv],nv=K({__name:"LoadingSpinner",props:{isShow:{type:Boolean}},setup(e){const t=L(!1),r=L();return Ue(()=>{r.value&&r.value.addEventListener("transitionend",()=>{t.value=!0})}),(n,o)=>t.value?Yt("",!0):(he(),Le("div",{key:0,ref_key:"loadingRef",ref:r,class:Kr(["loading-spinner",{hidden:!n.isShow}])},rv,2))}});const ov=(e,t)=>{const r=e.__vccOpts||e;for(const[n,o]of t)r[n]=o;return r},iv=ov(nv,[["__scopeId","data-v-aff729bc"]]),av=$e("div",{class:"w-0 md:w-[60px]"},null,-1),lv=10,sv="_U",dv="BingAI_Rand_IP",uv=130,cv=K({__name:"ChatPrompt",setup(e){const t=L(!0),r=Lt(),{isShowPromptSotre:n,isShowChatPrompt:o,keyword:i,promptList:l,searchPromptList:d,selectedPromptIndex:a}=Mt(r),s=L(),c=L(!1),f=L(!1),h=D(()=>CIB.vm.isMobile&&CIB.vm.sidePanel.isVisibleMobile||!CIB.vm.isMobile&&CIB.vm.sidePanel.isVisibleDesktop);Ue(async()=>{await p(),y(),SydneyFullScreenConv.initWithWaitlistUpdate({cookLoc:{}},10),t.value=!1,b(),S()});const p=async()=>new Promise((R,O)=>{sj_evt.bind("sydFSC.init",R,!0),sj_evt.fire("showSydFSC")}),y=()=>{at.get(sv)||(CIB.config.features.enableGetChats=!1,CIB.vm.sidePanel.isVisibleMobile=!1,CIB.vm.sidePanel.isVisibleDesktop=!1,x())},C=()=>{const R=new Date;return R.setMinutes(R.getMinutes()+CIB.config.sydney.expiryInMinutes),R},x=async(R=0)=>{var I;if(R>=lv){console.log(`已重试 ${R} 次,自动创建停止`);return}const O=await fetch("/turing/conversation/create",{credentials:"include"}).then(w=>w.json()).catch(w=>"error");((I=O==null?void 0:O.result)==null?void 0:I.value)==="Success"?(console.log("成功创建会话ID : ",O.conversationId),CIB.manager.conversation.updateId(O.conversationId,C(),O.clientId,O.conversationSignature)):(await yp(300),R+=1,console.log(`开始第 ${R} 次重试创建会话ID`),at.set(dv,"",-1),x(R))},b=()=>{var P,N,F,q,Q,ae,me,ve,we;location.hostname==="localhost"&&(CIB.config.sydney.hostnamesToBypassSecureConnection=CIB.config.sydney.hostnamesToBypassSecureConnection.filter(re=>re!==location.hostname));const R=document.querySelector("cib-serp");R==null||R.setAttribute("alignment","center");const O=(P=R==null?void 0:R.shadowRoot)==null?void 0:P.querySelector("cib-conversation"),I=(N=O==null?void 0:O.shadowRoot)==null?void 0:N.querySelector("cib-welcome-container");(q=(F=I==null?void 0:I.shadowRoot)==null?void 0:F.querySelector(".learn-tog-item"))==null||q.remove(),(ae=(Q=R==null?void 0:R.shadowRoot)==null?void 0:Q.querySelector("cib-serp-feedback"))==null||ae.remove(),ki()&&((ve=(me=I==null?void 0:I.shadowRoot)==null?void 0:me.querySelector(".container-item"))==null||ve.remove(),CIB.vm.actionBar.input.placeholder='有问题尽管问我...("/" 触发提示词)');const w=document.createElement("style");w.innerText=Yp,(we=O.shadowRoot)==null||we.append(w)},S=()=>{var I,w;const R=(w=(I=document.querySelector("#b_sydConvCont > cib-serp"))==null?void 0:I.shadowRoot)==null?void 0:w.querySelector("#cib-action-bar-main"),O=R.handleInputTextKey;R.handleInputTextKey=function(P){if(!(P.key==="Enter"&&o.value))return O.apply(this,[P])},CIB.vm.actionBar.input.addEventListener("compositionstart",_),CIB.vm.actionBar.input.addEventListener("compositionend",m),CIB.vm.actionBar.input.addEventListener("change",g),CIB.vm.actionBar.input.addEventListener("input",g),CIB.vm.actionBar.input.addEventListener("keydown",A),CIB.vm.actionBar.input.addEventListener("focus",M),CIB.vm.actionBar.input.addEventListener("blur",$)},_=R=>{c.value=!0},m=R=>{c.value=!1,g(R)},g=R=>{var O;c.value||(R instanceof InputEvent||R instanceof CompositionEvent)&&R.target instanceof HTMLTextAreaElement&&((O=R.target.value)!=null&&O.startsWith("/")?(o.value=!0,i.value=R.target.value.slice(1),a.value=0):(i.value="",o.value=!1))},M=R=>{},$=R=>{setTimeout(()=>{o.value=!1},200)},A=R=>{switch(R.key){case"ArrowUp":a.value>0&&(a.value--,s.value&&s.value.scrollToIndex(a.value));break;case"ArrowDown":a.value<d.value.length-1&&(a.value++,s.value&&s.value.scrollToIndex(a.value));break;case"Tab":case"Enter":{if(!CIB.vm.actionBar.inputText||!CIB.vm.actionBar.inputText.startsWith("/"))return;z(d.value[a.value])}break}},z=R=>{R&&(i.value="",CIB.vm.actionBar.inputText=R.prompt,o.value=!1)},B=()=>{f.value=!0,setTimeout(()=>{var R;if(f.value===!0){f.value=!1;const O=((R=s.value)==null?void 0:R.getOffset())||0;a.value=Math.round(O/uv)}},100)};return(R,O)=>(he(),Le(Ne,null,[G(iv,{"is-show":t.value},null,8,["is-show"]),$e("main",null,[H(o)?(he(),Le("div",{key:0,class:Kr(["box-border fixed bottom-[110px] w-full flex justify-center px-[14px] md:px-[34px] z-999",{"md:px-[170px]":h.value,"xl:px-[220px]":h.value}])},[av,H(l).length>0?(he(),Ee(H(zi),{key:0,ref_key:"scrollbarRef",ref:s,class:"bg-white w-full max-w-[1060px] max-h-[390px] rounded-xl overflow-y-auto","data-key":"prompt","data-sources":H(d),"data-component":Jp,keeps:10,onScroll:B},null,8,["data-sources"])):(he(),Ee(H(Qr),{key:1,class:"bg-white w-full max-w-[1060px] max-h-[390px] rounded-xl py-6",description:"暂未设置提示词数据"},{extra:Z(()=>[G(H(ge),{secondary:"",type:"info",onClick:O[0]||(O[0]=I=>n.value=!0)},{default:Z(()=>[pe("去提示词库添加")]),_:1})]),_:1}))],2)):Yt("",!0)])],64))}}),hv=K({__name:"index",setup(e){return(t,r)=>(he(),Le("main",null,[G(Ip),G(Xp),G(cv)]))}});export{hv as default};
|