92 lines
81 KiB
JavaScript
92 lines
81 KiB
JavaScript
/*! third party licenses: js/vendor.LICENSE.txt */
|
|
import{C as We,n as $,f as gt,D as ye,E as Xe,F as Ke,h as Ut,H as Y,I as Ge,J as Ze,K as it,V as kt,L as jt,M as at,O as Dt,P as Ye,Q as Je,R as be,T as Qe,U as Ht,W as tn,g as en,X as we,t as B,Y as Ft,Z as xe,_ as K,r as ct,$ as nn,a0 as sn,a1 as Vt,a2 as Bt,l as It,a3 as Se,i as _e,j as on,a4 as rn,a5 as an,a6 as St,a7 as _t,a8 as ln,a9 as cn,aa as un,G as Wt,u as dn,ab as hn,ac as pn,ad as fn}from"./logreader-main.mjs";import{g as gn}from"./colors-DYuPlOca-BUp7eygq.chunk.mjs";function Ce(){try{return We("core","capabilities")}catch{return console.debug("Could not find capabilities initial state fall back to _oc_capabilities"),"_oc_capabilities"in window?window._oc_capabilities:{}}}const ut=Math.min,G=Math.max,dt=Math.round,rt=Math.floor,F=t=>({x:t,y:t}),mn={left:"right",right:"left",bottom:"top",top:"bottom"},vn={start:"end",end:"start"};function Xt(t,e,n){return G(t,ut(e,n))}function Q(t,e){return typeof t=="function"?t(e):t}function j(t){return t.split("-")[0]}function mt(t){return t.split("-")[1]}function $t(t){return t==="x"?"y":"x"}function Oe(t){return t==="y"?"height":"width"}const yn=new Set(["top","bottom"]);function z(t){return yn.has(j(t))?"y":"x"}function Le(t){return $t(z(t))}function bn(t,e,n){n===void 0&&(n=!1);const s=mt(t),r=Le(t),h=Oe(r);let u=r==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return e.reference[h]>e.floating[h]&&(u=ht(u)),[u,ht(u)]}function wn(t){const e=ht(t);return[Nt(t),e,Nt(e)]}function Nt(t){return t.replace(/start|end/g,e=>vn[e])}const Kt=["left","right"],Gt=["right","left"],xn=["top","bottom"],Sn=["bottom","top"];function _n(t,e,n){switch(t){case"top":case"bottom":return n?e?Gt:Kt:e?Kt:Gt;case"left":case"right":return e?xn:Sn;default:return[]}}function Cn(t,e,n,s){const r=mt(t);let h=_n(j(t),n==="start",s);return r&&(h=h.map(u=>u+"-"+r),e&&(h=h.concat(h.map(Nt)))),h}function ht(t){return t.replace(/left|right|bottom|top/g,e=>mn[e])}function On(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ln(t){return typeof t!="number"?On(t):{top:t,right:t,bottom:t,left:t}}function pt(t){const{x:e,y:n,width:s,height:r}=t;return{width:s,height:r,top:n,left:e,right:e+s,bottom:n+r,x:e,y:n}}function Zt(t,e,n){let{reference:s,floating:r}=t;const h=z(e),u=Le(e),o=Oe(u),f=j(e),a=h==="y",l=s.x+s.width/2-r.width/2,c=s.y+s.height/2-r.height/2,d=s[o]/2-r[o]/2;let p;switch(f){case"top":p={x:l,y:s.y-r.height};break;case"bottom":p={x:l,y:s.y+s.height};break;case"right":p={x:s.x+s.width,y:c};break;case"left":p={x:s.x-r.width,y:c};break;default:p={x:s.x,y:s.y}}switch(mt(e)){case"start":p[u]-=d*(n&&a?-1:1);break;case"end":p[u]+=d*(n&&a?-1:1);break}return p}const An=async(t,e,n)=>{const{placement:s="bottom",strategy:r="absolute",middleware:h=[],platform:u}=n,o=h.filter(Boolean),f=await(u.isRTL==null?void 0:u.isRTL(e));let a=await u.getElementRects({reference:t,floating:e,strategy:r}),{x:l,y:c}=Zt(a,s,f),d=s,p={},v=0;for(let y=0;y<o.length;y++){const{name:w,fn:x}=o[y],{x:_,y:S,data:A,reset:L}=await x({x:l,y:c,initialPlacement:s,placement:d,strategy:r,middlewareData:p,rects:a,platform:u,elements:{reference:t,floating:e}});l=_??l,c=S??c,p={...p,[w]:{...p[w],...A}},L&&v<=50&&(v++,typeof L=="object"&&(L.placement&&(d=L.placement),L.rects&&(a=L.rects===!0?await u.getElementRects({reference:t,floating:e,strategy:r}):L.rects),{x:l,y:c}=Zt(a,d,f)),y=-1)}return{x:l,y:c,placement:d,strategy:r,middlewareData:p}};async function Ae(t,e){var n;e===void 0&&(e={});const{x:s,y:r,platform:h,rects:u,elements:o,strategy:f}=t,{boundary:a="clippingAncestors",rootBoundary:l="viewport",elementContext:c="floating",altBoundary:d=!1,padding:p=0}=Q(e,t),v=Ln(p),y=o[d?c==="floating"?"reference":"floating":c],w=pt(await h.getClippingRect({element:(n=await(h.isElement==null?void 0:h.isElement(y)))==null||n?y:y.contextElement||await(h.getDocumentElement==null?void 0:h.getDocumentElement(o.floating)),boundary:a,rootBoundary:l,strategy:f})),x=c==="floating"?{x:s,y:r,width:u.floating.width,height:u.floating.height}:u.reference,_=await(h.getOffsetParent==null?void 0:h.getOffsetParent(o.floating)),S=await(h.isElement==null?void 0:h.isElement(_))?await(h.getScale==null?void 0:h.getScale(_))||{x:1,y:1}:{x:1,y:1},A=pt(h.convertOffsetParentRelativeRectToViewportRelativeRect?await h.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:x,offsetParent:_,strategy:f}):x);return{top:(w.top-A.top+v.top)/S.y,bottom:(A.bottom-w.bottom+v.bottom)/S.y,left:(w.left-A.left+v.left)/S.x,right:(A.right-w.right+v.right)/S.x}}const Tn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,s;const{placement:r,middlewareData:h,rects:u,initialPlacement:o,platform:f,elements:a}=e,{mainAxis:l=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...w}=Q(t,e);if((n=h.arrow)!=null&&n.alignmentOffset)return{};const x=j(r),_=z(o),S=j(o)===o,A=await(f.isRTL==null?void 0:f.isRTL(a.floating)),L=d||(S||!y?[ht(o)]:wn(o)),T=v!=="none";!d&&T&&L.push(...Cn(o,y,v,A));const R=[o,...L],W=await Ae(e,w),k=[];let i=((s=h.flip)==null?void 0:s.overflows)||[];if(l&&k.push(W[x]),c){const C=bn(r,u,A);k.push(W[C[0]],W[C[1]])}if(i=[...i,{placement:r,overflows:k}],!k.every(C=>C<=0)){var g,m;const C=(((g=h.flip)==null?void 0:g.index)||0)+1,O=R[C];if(O&&(!(c==="alignment"&&_!==z(O))||i.every(M=>z(M.placement)===_?M.overflows[0]>0:!0)))return{data:{index:C,overflows:i},reset:{placement:O}};let I=(m=i.filter(M=>M.overflows[0]<=0).sort((M,P)=>M.overflows[1]-P.overflows[1])[0])==null?void 0:m.placement;if(!I)switch(p){case"bestFit":{var b;const M=(b=i.filter(P=>{if(T){const D=z(P.placement);return D===_||D==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(D=>D>0).reduce((D,xt)=>D+xt,0)]).sort((P,D)=>P[1]-D[1])[0])==null?void 0:b[0];M&&(I=M);break}case"initialPlacement":I=o;break}if(r!==I)return{reset:{placement:I}}}return{}}}},Te=new Set(["left","top"]);async function kn(t,e){const{placement:n,platform:s,elements:r}=t,h=await(s.isRTL==null?void 0:s.isRTL(r.floating)),u=j(n),o=mt(n),f=z(n)==="y",a=Te.has(u)?-1:1,l=h&&f?-1:1,c=Q(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:v}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return o&&typeof v=="number"&&(p=o==="end"?v*-1:v),f?{x:p*l,y:d*a}:{x:d*a,y:p*l}}const Dn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,s;const{x:r,y:h,placement:u,middlewareData:o}=e,f=await kn(e,t);return u===((n=o.offset)==null?void 0:n.placement)&&(s=o.arrow)!=null&&s.alignmentOffset?{}:{x:r+f.x,y:h+f.y,data:{...f,placement:u}}}}},Bn=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:s,placement:r}=e,{mainAxis:h=!0,crossAxis:u=!1,limiter:o={fn:w=>{let{x,y:_}=w;return{x,y:_}}},...f}=Q(t,e),a={x:n,y:s},l=await Ae(e,f),c=z(j(r)),d=$t(c);let p=a[d],v=a[c];if(h){const w=d==="y"?"top":"left",x=d==="y"?"bottom":"right",_=p+l[w],S=p-l[x];p=Xt(_,p,S)}if(u){const w=c==="y"?"top":"left",x=c==="y"?"bottom":"right",_=v+l[w],S=v-l[x];v=Xt(_,v,S)}const y=o.fn({...e,[d]:p,[c]:v});return{...y,data:{x:y.x-n,y:y.y-s,enabled:{[d]:h,[c]:u}}}}}},In=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:s,placement:r,rects:h,middlewareData:u}=e,{offset:o=0,mainAxis:f=!0,crossAxis:a=!0}=Q(t,e),l={x:n,y:s},c=z(r),d=$t(c);let p=l[d],v=l[c];const y=Q(o,e),w=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(f){const S=d==="y"?"height":"width",A=h.reference[d]-h.floating[S]+w.mainAxis,L=h.reference[d]+h.reference[S]-w.mainAxis;p<A?p=A:p>L&&(p=L)}if(a){var x,_;const S=d==="y"?"width":"height",A=Te.has(j(r)),L=h.reference[c]-h.floating[S]+(A&&((x=u.offset)==null?void 0:x[c])||0)+(A?0:w.crossAxis),T=h.reference[c]+h.reference[S]+(A?0:((_=u.offset)==null?void 0:_[c])||0)-(A?w.crossAxis:0);v<L?v=L:v>T&&(v=T)}return{[d]:p,[c]:v}}}};function vt(){return typeof window<"u"}function et(t){return ke(t)?(t.nodeName||"").toLowerCase():"#document"}function N(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function q(t){var e;return(e=(ke(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ke(t){return vt()?t instanceof Node||t instanceof N(t).Node:!1}function E(t){return vt()?t instanceof Element||t instanceof N(t).Element:!1}function V(t){return vt()?t instanceof HTMLElement||t instanceof N(t).HTMLElement:!1}function Yt(t){return!vt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof N(t).ShadowRoot}const Nn=new Set(["inline","contents"]);function ot(t){const{overflow:e,overflowX:n,overflowY:s,display:r}=U(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+n)&&!Nn.has(r)}const Mn=new Set(["table","td","th"]);function Pn(t){return Mn.has(et(t))}const En=[":popover-open",":modal"];function yt(t){return En.some(e=>{try{return t.matches(e)}catch{return!1}})}const Un=["transform","translate","scale","rotate","perspective"],Fn=["transform","translate","scale","rotate","perspective","filter"],Vn=["paint","layout","strict","content"];function qt(t){const e=zt(),n=E(t)?U(t):t;return Un.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Fn.some(s=>(n.willChange||"").includes(s))||Vn.some(s=>(n.contain||"").includes(s))}function $n(t){let e=H(t);for(;V(e)&&!tt(e);){if(qt(e))return e;if(yt(e))return null;e=H(e)}return null}function zt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const qn=new Set(["html","body","#document"]);function tt(t){return qn.has(et(t))}function U(t){return N(t).getComputedStyle(t)}function bt(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function H(t){if(et(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Yt(t)&&t.host||q(t);return Yt(e)?e.host:e}function De(t){const e=H(t);return tt(e)?t.ownerDocument?t.ownerDocument.body:t.body:V(e)&&ot(e)?e:De(e)}function st(t,e,n){var s;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=De(t),h=r===((s=t.ownerDocument)==null?void 0:s.body),u=N(r);if(h){const o=Mt(u);return e.concat(u,u.visualViewport||[],ot(r)?r:[],o&&n?st(o):[])}return e.concat(r,st(r,[],n))}function Mt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Be(t){const e=U(t);let n=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const r=V(t),h=r?t.offsetWidth:n,u=r?t.offsetHeight:s,o=dt(n)!==h||dt(s)!==u;return o&&(n=h,s=u),{width:n,height:s,$:o}}function Rt(t){return E(t)?t:t.contextElement}function J(t){const e=Rt(t);if(!V(e))return F(1);const n=e.getBoundingClientRect(),{width:s,height:r,$:h}=Be(e);let u=(h?dt(n.width):n.width)/s,o=(h?dt(n.height):n.height)/r;return(!u||!Number.isFinite(u))&&(u=1),(!o||!Number.isFinite(o))&&(o=1),{x:u,y:o}}const zn=F(0);function Ie(t){const e=N(t);return!zt()||!e.visualViewport?zn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Rn(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==N(t)?!1:e}function Z(t,e,n,s){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),h=Rt(t);let u=F(1);e&&(s?E(s)&&(u=J(s)):u=J(t));const o=Rn(h,n,s)?Ie(h):F(0);let f=(r.left+o.x)/u.x,a=(r.top+o.y)/u.y,l=r.width/u.x,c=r.height/u.y;if(h){const d=N(h),p=s&&E(s)?N(s):s;let v=d,y=Mt(v);for(;y&&s&&p!==v;){const w=J(y),x=y.getBoundingClientRect(),_=U(y),S=x.left+(y.clientLeft+parseFloat(_.paddingLeft))*w.x,A=x.top+(y.clientTop+parseFloat(_.paddingTop))*w.y;f*=w.x,a*=w.y,l*=w.x,c*=w.y,f+=S,a+=A,v=N(y),y=Mt(v)}}return pt({width:l,height:c,x:f,y:a})}function wt(t,e){const n=bt(t).scrollLeft;return e?e.left+n:Z(q(t)).left+n}function Ne(t,e){const n=t.getBoundingClientRect(),s=n.left+e.scrollLeft-wt(t,n),r=n.top+e.scrollTop;return{x:s,y:r}}function jn(t){let{elements:e,rect:n,offsetParent:s,strategy:r}=t;const h=r==="fixed",u=q(s),o=e?yt(e.floating):!1;if(s===u||o&&h)return n;let f={scrollLeft:0,scrollTop:0},a=F(1);const l=F(0),c=V(s);if((c||!c&&!h)&&((et(s)!=="body"||ot(u))&&(f=bt(s)),V(s))){const p=Z(s);a=J(s),l.x=p.x+s.clientLeft,l.y=p.y+s.clientTop}const d=u&&!c&&!h?Ne(u,f):F(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-f.scrollLeft*a.x+l.x+d.x,y:n.y*a.y-f.scrollTop*a.y+l.y+d.y}}function Hn(t){return Array.from(t.getClientRects())}function Wn(t){const e=q(t),n=bt(t),s=t.ownerDocument.body,r=G(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),h=G(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let u=-n.scrollLeft+wt(t);const o=-n.scrollTop;return U(s).direction==="rtl"&&(u+=G(e.clientWidth,s.clientWidth)-r),{width:r,height:h,x:u,y:o}}const Jt=25;function Xn(t,e){const n=N(t),s=q(t),r=n.visualViewport;let h=s.clientWidth,u=s.clientHeight,o=0,f=0;if(r){h=r.width,u=r.height;const l=zt();(!l||l&&e==="fixed")&&(o=r.offsetLeft,f=r.offsetTop)}const a=wt(s);if(a<=0){const l=s.ownerDocument,c=l.body,d=getComputedStyle(c),p=l.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,v=Math.abs(s.clientWidth-c.clientWidth-p);v<=Jt&&(h-=v)}else a<=Jt&&(h+=a);return{width:h,height:u,x:o,y:f}}const Kn=new Set(["absolute","fixed"]);function Gn(t,e){const n=Z(t,!0,e==="fixed"),s=n.top+t.clientTop,r=n.left+t.clientLeft,h=V(t)?J(t):F(1),u=t.clientWidth*h.x,o=t.clientHeight*h.y,f=r*h.x,a=s*h.y;return{width:u,height:o,x:f,y:a}}function Qt(t,e,n){let s;if(e==="viewport")s=Xn(t,n);else if(e==="document")s=Wn(q(t));else if(E(e))s=Gn(e,n);else{const r=Ie(t);s={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return pt(s)}function Me(t,e){const n=H(t);return n===e||!E(n)||tt(n)?!1:U(n).position==="fixed"||Me(n,e)}function Zn(t,e){const n=e.get(t);if(n)return n;let s=st(t,[],!1).filter(o=>E(o)&&et(o)!=="body"),r=null;const h=U(t).position==="fixed";let u=h?H(t):t;for(;E(u)&&!tt(u);){const o=U(u),f=qt(u);!f&&o.position==="fixed"&&(r=null),(h?!f&&!r:!f&&o.position==="static"&&r&&Kn.has(r.position)||ot(u)&&!f&&Me(t,u))?s=s.filter(a=>a!==u):r=o,u=H(u)}return e.set(t,s),s}function Yn(t){let{element:e,boundary:n,rootBoundary:s,strategy:r}=t;const h=[...n==="clippingAncestors"?yt(e)?[]:Zn(e,this._c):[].concat(n),s],u=h[0],o=h.reduce((f,a)=>{const l=Qt(e,a,r);return f.top=G(l.top,f.top),f.right=ut(l.right,f.right),f.bottom=ut(l.bottom,f.bottom),f.left=G(l.left,f.left),f},Qt(e,u,r));return{width:o.right-o.left,height:o.bottom-o.top,x:o.left,y:o.top}}function Jn(t){const{width:e,height:n}=Be(t);return{width:e,height:n}}function Qn(t,e,n){const s=V(e),r=q(e),h=n==="fixed",u=Z(t,!0,h,e);let o={scrollLeft:0,scrollTop:0};const f=F(0);function a(){f.x=wt(r)}if(s||!s&&!h)if((et(e)!=="body"||ot(r))&&(o=bt(e)),s){const p=Z(e,!0,h,e);f.x=p.x+e.clientLeft,f.y=p.y+e.clientTop}else r&&a();h&&!s&&r&&a();const l=r&&!s&&!h?Ne(r,o):F(0),c=u.left+o.scrollLeft-f.x-l.x,d=u.top+o.scrollTop-f.y-l.y;return{x:c,y:d,width:u.width,height:u.height}}function Ct(t){return U(t).position==="static"}function te(t,e){if(!V(t)||U(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return q(t)===n&&(n=n.ownerDocument.body),n}function Pe(t,e){const n=N(t);if(yt(t))return n;if(!V(t)){let r=H(t);for(;r&&!tt(r);){if(E(r)&&!Ct(r))return r;r=H(r)}return n}let s=te(t,e);for(;s&&Pn(s)&&Ct(s);)s=te(s,e);return s&&tt(s)&&Ct(s)&&!qt(s)?n:s||$n(t)||n}const ti=async function(t){const e=this.getOffsetParent||Pe,n=this.getDimensions,s=await n(t.floating);return{reference:Qn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function ei(t){return U(t).direction==="rtl"}const ni={convertOffsetParentRelativeRectToViewportRelativeRect:jn,getDocumentElement:q,getClippingRect:Yn,getOffsetParent:Pe,getElementRects:ti,getClientRects:Hn,getDimensions:Jn,getScale:J,isElement:E,isRTL:ei};function Ee(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ii(t,e){let n=null,s;const r=q(t);function h(){var o;clearTimeout(s),(o=n)==null||o.disconnect(),n=null}function u(o,f){o===void 0&&(o=!1),f===void 0&&(f=1),h();const a=t.getBoundingClientRect(),{left:l,top:c,width:d,height:p}=a;if(o||e(),!d||!p)return;const v=rt(c),y=rt(r.clientWidth-(l+d)),w=rt(r.clientHeight-(c+p)),x=rt(l),_={rootMargin:-v+"px "+-y+"px "+-w+"px "+-x+"px",threshold:G(0,ut(1,f))||1};let S=!0;function A(L){const T=L[0].intersectionRatio;if(T!==f){if(!S)return u();T?u(!1,T):s=setTimeout(()=>{u(!1,1e-7)},1e3)}T===1&&!Ee(a,t.getBoundingClientRect())&&u(),S=!1}try{n=new IntersectionObserver(A,{..._,root:r.ownerDocument})}catch{n=new IntersectionObserver(A,_)}n.observe(t)}return u(!0),h}function si(t,e,n,s){s===void 0&&(s={});const{ancestorScroll:r=!0,ancestorResize:h=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:f=!1}=s,a=Rt(t),l=r||h?[...a?st(a):[],...st(e)]:[];l.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),h&&x.addEventListener("resize",n)});const c=a&&o?ii(a,n):null;let d=-1,p=null;u&&(p=new ResizeObserver(x=>{let[_]=x;_&&_.target===a&&p&&(p.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(e)})),n()}),a&&!f&&p.observe(a),p.observe(e));let v,y=f?Z(t):null;f&&w();function w(){const x=Z(t);y&&!Ee(y,x)&&n(),y=x,v=requestAnimationFrame(w)}return n(),()=>{var x;l.forEach(_=>{r&&_.removeEventListener("scroll",n),h&&_.removeEventListener("resize",n)}),c?.(),(x=p)==null||x.disconnect(),p=null,f&&cancelAnimationFrame(v)}}const oi=Dn,ri=Bn,ai=Tn,li=In,ci=(t,e,n)=>{const s=new Map,r={platform:ni,...n},h={...r.platform,_c:s};return An(t,e,{...r,platform:h})};var Pt={exports:{}},ui=Pt.exports,ee;function di(){return ee||(ee=1,function(t,e){(function(n,s){t.exports=s()})(typeof self<"u"?self:ui,function(){return(()=>{var n={646:u=>{u.exports=function(o){if(Array.isArray(o)){for(var f=0,a=new Array(o.length);f<o.length;f++)a[f]=o[f];return a}}},713:u=>{u.exports=function(o,f,a){return f in o?Object.defineProperty(o,f,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[f]=a,o}},860:u=>{u.exports=function(o){if(Symbol.iterator in Object(o)||Object.prototype.toString.call(o)==="[object Arguments]")return Array.from(o)}},206:u=>{u.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},319:(u,o,f)=>{var a=f(646),l=f(860),c=f(206);u.exports=function(d){return a(d)||l(d)||c()}},8:u=>{function o(f){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u.exports=o=function(a){return typeof a}:u.exports=o=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},o(f)}u.exports=o}},s={};function r(u){var o=s[u];if(o!==void 0)return o.exports;var f=s[u]={exports:{}};return n[u](f,f.exports,r),f.exports}r.n=u=>{var o=u&&u.__esModule?()=>u.default:()=>u;return r.d(o,{a:o}),o},r.d=(u,o)=>{for(var f in o)r.o(o,f)&&!r.o(u,f)&&Object.defineProperty(u,f,{enumerable:!0,get:o[f]})},r.o=(u,o)=>Object.prototype.hasOwnProperty.call(u,o),r.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var h={};return(()=>{r.r(h),r.d(h,{VueSelect:()=>R,default:()=>k,mixins:()=>W});var u=r(319),o=r.n(u),f=r(8),a=r.n(f),l=r(713),c=r.n(l);const d={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer:function(){this.autoscroll&&this.maybeAdjustScroll()},open:function(i){var g=this;this.autoscroll&&i&&this.$nextTick(function(){return g.maybeAdjustScroll()})}},methods:{maybeAdjustScroll:function(){var i,g=((i=this.$refs.dropdownMenu)===null||i===void 0?void 0:i.children[this.typeAheadPointer])||!1;if(g){var m=this.getDropdownViewport(),b=g.getBoundingClientRect(),C=b.top,O=b.bottom,I=b.height;if(C<m.top)return this.$refs.dropdownMenu.scrollTop=g.offsetTop;if(O>m.bottom)return this.$refs.dropdownMenu.scrollTop=g.offsetTop-(m.height-I)}},getDropdownViewport:function(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},p={data:function(){return{typeAheadPointer:-1}},watch:{filteredOptions:function(){if(this.resetFocusOnOptionsChange){for(var i=0;i<this.filteredOptions.length;i++)if(this.selectable(this.filteredOptions[i])){this.typeAheadPointer=i;break}}},open:function(i){i&&this.typeAheadToLastSelected()},selectedValue:function(){this.open&&this.typeAheadToLastSelected()}},methods:{typeAheadUp:function(){for(var i=this.typeAheadPointer-1;i>=0;i--)if(this.selectable(this.filteredOptions[i])){this.typeAheadPointer=i;break}},typeAheadDown:function(){for(var i=this.typeAheadPointer+1;i<this.filteredOptions.length;i++)if(this.selectable(this.filteredOptions[i])){this.typeAheadPointer=i;break}},typeAheadSelect:function(){var i=this.filteredOptions[this.typeAheadPointer];i&&this.selectable(i)&&this.select(i)},typeAheadToLastSelected:function(){var i=this.selectedValue.length!==0?this.filteredOptions.indexOf(this.selectedValue[this.selectedValue.length-1]):-1;i!==-1&&(this.typeAheadPointer=i)}}},v={props:{loading:{type:Boolean,default:!1}},data:function(){return{mutableLoading:!1}},watch:{search:function(){this.$emit("search",this.search,this.toggleLoading)},loading:function(i){this.mutableLoading=i}},methods:{toggleLoading:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this.mutableLoading=i??!this.mutableLoading}}};function y(i,g,m,b,C,O,I,M){var P,D=typeof i=="function"?i.options:i;return g&&(D.render=g,D.staticRenderFns=m,D._compiled=!0),{exports:i,options:D}}const w={Deselect:y({},function(){var i=this.$createElement,g=this._self._c||i;return g("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"}},[g("path",{attrs:{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"}})])},[]).exports,OpenIndicator:y({},function(){var i=this.$createElement,g=this._self._c||i;return g("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"}},[g("path",{attrs:{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"}})])},[]).exports},x={inserted:function(i,g,m){var b=m.context;if(b.appendToBody){document.body.appendChild(i);var C=b.$refs.toggle.getBoundingClientRect(),O=C.height,I=C.top,M=C.left,P=C.width,D=window.scrollX||window.pageXOffset,xt=window.scrollY||window.pageYOffset;i.unbindPosition=b.calculatePosition(i,b,{width:P+"px",left:D+M+"px",top:xt+I+O+"px"})}},unbind:function(i,g,m){m.context.appendToBody&&(i.unbindPosition&&typeof i.unbindPosition=="function"&&i.unbindPosition(),i.parentNode&&i.parentNode.removeChild(i))}},_=function(i){var g={};return Object.keys(i).sort().forEach(function(m){g[m]=i[m]}),JSON.stringify(g)};var S=0;const A=function(){return++S};function L(i,g){var m=Object.keys(i);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(i);g&&(b=b.filter(function(C){return Object.getOwnPropertyDescriptor(i,C).enumerable})),m.push.apply(m,b)}return m}function T(i){for(var g=1;g<arguments.length;g++){var m=arguments[g]!=null?arguments[g]:{};g%2?L(Object(m),!0).forEach(function(b){c()(i,b,m[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(m)):L(Object(m)).forEach(function(b){Object.defineProperty(i,b,Object.getOwnPropertyDescriptor(m,b))})}return i}const R=y({components:T({},w),directives:{appendToBody:x},mixins:[d,p,v],props:{value:{},components:{type:Object,default:function(){return{}}},options:{type:Array,default:function(){return[]}},limit:{type:Number,default:null},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},deselectFromDropdown:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},placeholder:{type:String,default:""},transition:{type:String,default:"vs__fade"},clearSearchOnSelect:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},label:{type:String,default:"label"},ariaLabelCombobox:{type:String,default:"Search for options"},ariaLabelListbox:{type:String,default:"Options"},ariaLabelClearSelected:{type:String,default:"Clear selected"},ariaLabelDeselectOption:{type:Function,default:function(i){return"Deselect ".concat(i)}},autocomplete:{type:String,default:"off"},reduce:{type:Function,default:function(i){return i}},selectable:{type:Function,default:function(i){return!0}},getOptionLabel:{type:Function,default:function(i){return a()(i)==="object"?i.hasOwnProperty(this.label)?i[this.label]:console.warn('[vue-select warn]: Label key "option.'.concat(this.label,'" does not')+" exist in options object ".concat(JSON.stringify(i),`.
|
|
`)+"https://vue-select.org/api/props.html#getoptionlabel"):i}},getOptionKey:{type:Function,default:function(i){if(a()(i)!=="object")return i;try{return i.hasOwnProperty("id")?i.id:_(i)}catch(g){return console.warn(`[vue-select warn]: Could not stringify this option to generate unique key. Please provide'getOptionKey' prop to return a unique key for each option.
|
|
https://vue-select.org/api/props.html#getoptionkey`,i,g)}}},onTab:{type:Function,default:function(){this.selectOnTab&&!this.isComposing&&this.typeAheadSelect()}},taggable:{type:Boolean,default:!1},tabindex:{type:Number,default:null},pushTags:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},filterBy:{type:Function,default:function(i,g,m){return(g||"").toLocaleLowerCase().indexOf(m.toLocaleLowerCase())>-1}},filter:{type:Function,default:function(i,g){var m=this;return i.filter(function(b){var C=m.getOptionLabel(b);return typeof C=="number"&&(C=C.toString()),m.filterBy(b,C,g)})}},createOption:{type:Function,default:function(i){return a()(this.optionList[0])==="object"?c()({},this.label,i):i}},resetFocusOnOptionsChange:{type:Boolean,default:!0},resetOnOptionsChange:{default:!1,validator:function(i){return["function","boolean"].includes(a()(i))}},clearSearchOnBlur:{type:Function,default:function(i){var g=i.clearSearchOnSelect,m=i.multiple;return g&&!m}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:function(){return[13]}},searchInputQuerySelector:{type:String,default:"[type=search]"},mapKeydown:{type:Function,default:function(i,g){return i}},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default:function(i,g,m){var b=m.width,C=m.top,O=m.left;i.style.top=C,i.style.left=O,i.style.width=b}},dropdownShouldOpen:{type:Function,default:function(i){var g=i.noDrop,m=i.open,b=i.mutableLoading;return!g&&m&&!b}},keyboardFocusBorder:{type:Boolean,default:!1},uid:{type:[String,Number],default:function(){return A()}}},data:function(){return{search:"",open:!1,isComposing:!1,isKeyboardNavigation:!1,pushedTags:[],_value:[]}},computed:{isTrackingValues:function(){return this.value===void 0||this.$options.propsData.hasOwnProperty("reduce")},selectedValue:function(){var i=this.value;return this.isTrackingValues&&(i=this.$data._value),i!=null&&i!==""?[].concat(i):[]},optionList:function(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl:function(){return this.$scopedSlots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope:function(){var i=this,g={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:T({id:this.inputId,disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,role:"combobox","aria-autocomplete":"list","aria-label":this.ariaLabelCombobox,"aria-controls":"vs-".concat(this.uid,"__listbox"),"aria-owns":"vs-".concat(this.uid,"__listbox"),"aria-expanded":this.dropdownOpen.toString(),ref:"search",type:"search",autocomplete:this.autocomplete,value:this.search},this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{"aria-activedescendant":"vs-".concat(this.uid,"__option-").concat(this.typeAheadPointer)}:{}),events:{compositionstart:function(){return i.isComposing=!0},compositionend:function(){return i.isComposing=!1},keydown:this.onSearchKeyDown,keypress:this.onSearchKeyPress,blur:this.onSearchBlur,focus:this.onSearchFocus,input:function(m){return i.search=m.target.value}}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.mutableLoading,searching:this.searching},openIndicator:{attributes:{ref:"openIndicator",role:"presentation",class:"vs__open-indicator"}},listHeader:g,listFooter:g,header:T({},g,{deselect:this.deselect}),footer:T({},g,{deselect:this.deselect})}},childComponents:function(){return T({},w,{},this.components)},stateClasses:function(){return{"vs--open":this.dropdownOpen,"vs--single":!this.multiple,"vs--multiple":this.multiple,"vs--searching":this.searching&&!this.noDrop,"vs--searchable":this.searchable&&!this.noDrop,"vs--unsearchable":!this.searchable,"vs--loading":this.mutableLoading,"vs--disabled":this.disabled}},searching:function(){return!!this.search},dropdownOpen:function(){return this.dropdownShouldOpen(this)},searchPlaceholder:function(){return this.isValueEmpty&&this.placeholder?this.placeholder:void 0},filteredOptions:function(){var i=this,g=function(O){return i.limit!==null?O.slice(0,i.limit):O},m=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return g(m);var b=this.search.length?this.filter(m,this.search,this):m;if(this.taggable&&this.search.length)try{var C=this.createOption(this.search);this.optionExists(C)||b.unshift(C)}catch{}return g(b)},isValueEmpty:function(){return this.selectedValue.length===0},showClearButton:function(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}},watch:{options:function(i,g){var m=this;!this.taggable&&(typeof m.resetOnOptionsChange=="function"?m.resetOnOptionsChange(i,g,m.selectedValue):m.resetOnOptionsChange)&&this.clearSelection(),this.value&&this.isTrackingValues&&this.setInternalValueFromOptions(this.value)},value:{immediate:!0,handler:function(i){this.isTrackingValues&&this.setInternalValueFromOptions(i)}},multiple:function(){this.clearSelection()},open:function(i){this.$emit(i?"open":"close")},search:function(i){i.length&&(this.open=!0)}},created:function(){this.mutableLoading=this.loading,this.$on("option:created",this.pushTag)},methods:{setInternalValueFromOptions:function(i){var g=this;Array.isArray(i)?this.$data._value=i.map(function(m){return g.findOptionFromReducedValue(m)}):this.$data._value=this.findOptionFromReducedValue(i)},select:function(i){this.$emit("option:selecting",i),this.isOptionSelected(i)?this.deselectFromDropdown&&(this.clearable||this.multiple&&this.selectedValue.length>1)&&this.deselect(i):(this.taggable&&!this.optionExists(i)&&this.$emit("option:created",i),this.multiple&&(i=this.selectedValue.concat(i)),this.updateValue(i),this.$emit("option:selected",i)),this.onAfterSelect(i)},deselect:function(i){var g=this;this.$emit("option:deselecting",i),this.updateValue(this.selectedValue.filter(function(m){return!g.optionComparator(m,i)})),this.$emit("option:deselected",i)},keyboardDeselect:function(i,g){var m,b;this.deselect(i);var C=(m=this.$refs.deselectButtons)===null||m===void 0?void 0:m[g+1],O=(b=this.$refs.deselectButtons)===null||b===void 0?void 0:b[g-1],I=C??O;I?I.focus():this.searchEl.focus()},clearSelection:function(){this.updateValue(this.multiple?[]:null),this.searchEl.focus()},onAfterSelect:function(i){var g=this;this.closeOnSelect&&(this.open=!this.open),this.clearSearchOnSelect&&(this.search=""),this.noDrop&&this.multiple&&this.$nextTick(function(){return g.$refs.search.focus()})},updateValue:function(i){var g=this;this.value===void 0&&(this.$data._value=i),i!==null&&(i=Array.isArray(i)?i.map(function(m){return g.reduce(m)}):this.reduce(i)),this.$emit("input",i)},toggleDropdown:function(i){var g=i.target!==this.searchEl;g&&i.preventDefault();var m=[].concat(o()(this.$refs.deselectButtons||[]),o()([this.$refs.clearButton]));this.searchEl===void 0||m.filter(Boolean).some(function(b){return b.contains(i.target)||b===i.target})?i.preventDefault():this.open&&g?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected:function(i){var g=this;return this.selectedValue.some(function(m){return g.optionComparator(m,i)})},isOptionDeselectable:function(i){return this.isOptionSelected(i)&&this.deselectFromDropdown},hasKeyboardFocusBorder:function(i){return!(!this.keyboardFocusBorder||!this.isKeyboardNavigation)&&i===this.typeAheadPointer},optionComparator:function(i,g){return this.getOptionKey(i)===this.getOptionKey(g)},findOptionFromReducedValue:function(i){var g=this,m=[].concat(o()(this.options),o()(this.pushedTags)).filter(function(b){return JSON.stringify(g.reduce(b))===JSON.stringify(i)});return m.length===1?m[0]:m.find(function(b){return g.optionComparator(b,g.$data._value)})||i},closeSearchOptions:function(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue:function(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){var i=null;this.multiple&&(i=o()(this.selectedValue.slice(0,this.selectedValue.length-1))),this.updateValue(i)}},optionExists:function(i){var g=this;return this.optionList.some(function(m){return g.optionComparator(m,i)})},optionAriaSelected:function(i){return this.selectable(i)?String(this.isOptionSelected(i)):null},normalizeOptionForSlot:function(i){return a()(i)==="object"?i:c()({},this.label,i)},pushTag:function(i){this.pushedTags.push(i)},onEscape:function(){this.search.length?this.search="":this.open=!1},onSearchBlur:function(){if(!this.mousedown||this.searching){var i=this.clearSearchOnSelect,g=this.multiple;return this.clearSearchOnBlur({clearSearchOnSelect:i,multiple:g})&&(this.search=""),void this.closeSearchOptions()}this.mousedown=!1,this.search.length!==0||this.options.length!==0||this.closeSearchOptions()},onSearchFocus:function(){this.open=!0,this.$emit("search:focus")},onMousedown:function(){this.mousedown=!0},onMouseUp:function(){this.mousedown=!1},onMouseMove:function(i,g){this.isKeyboardNavigation=!1,this.selectable(i)&&(this.typeAheadPointer=g)},onSearchKeyDown:function(i){var g=this,m=function(O){if(O.preventDefault(),g.open)return!g.isComposing&&g.typeAheadSelect();g.open=!0},b={8:function(O){return g.maybeDeleteValue()},9:function(O){return g.onTab()},27:function(O){return g.onEscape()},38:function(O){if(O.preventDefault(),g.isKeyboardNavigation=!0,g.open)return g.typeAheadUp();g.open=!0},40:function(O){if(O.preventDefault(),g.isKeyboardNavigation=!0,g.open)return g.typeAheadDown();g.open=!0}};this.selectOnKeyCodes.forEach(function(O){return b[O]=m});var C=this.mapKeydown(b,this);if(typeof C[i.keyCode]=="function")return C[i.keyCode](i)},onSearchKeyPress:function(i){this.open||i.keyCode!==32||(i.preventDefault(),this.open=!0)}}},function(){var i=this,g=i.$createElement,m=i._self._c||g;return m("div",{staticClass:"v-select",class:i.stateClasses,attrs:{id:"v-select-"+i.uid,dir:i.dir}},[i._t("header",null,null,i.scope.header),i._v(" "),m("div",{ref:"toggle",staticClass:"vs__dropdown-toggle"},[m("div",{ref:"selectedOptions",staticClass:"vs__selected-options",on:{mousedown:i.toggleDropdown}},[i._l(i.selectedValue,function(b,C){return i._t("selected-option-container",[m("span",{key:i.getOptionKey(b),staticClass:"vs__selected"},[i._t("selected-option",[i._v(`
|
|
`+i._s(i.getOptionLabel(b))+`
|
|
`)],null,i.normalizeOptionForSlot(b)),i._v(" "),i.multiple?m("button",{ref:"deselectButtons",refInFor:!0,staticClass:"vs__deselect",attrs:{disabled:i.disabled,type:"button",title:i.ariaLabelDeselectOption(i.getOptionLabel(b)),"aria-label":i.ariaLabelDeselectOption(i.getOptionLabel(b))},on:{mousedown:function(O){return O.stopPropagation(),i.deselect(b)},keydown:function(O){return!O.type.indexOf("key")&&i._k(O.keyCode,"enter",13,O.key,"Enter")?null:i.keyboardDeselect(b,C)}}},[m(i.childComponents.Deselect,{tag:"component"})],1):i._e()],2)],{option:i.normalizeOptionForSlot(b),deselect:i.deselect,multiple:i.multiple,disabled:i.disabled})}),i._v(" "),i._t("search",[m("input",i._g(i._b({staticClass:"vs__search"},"input",i.scope.search.attributes,!1),i.scope.search.events))],null,i.scope.search)],2),i._v(" "),m("div",{ref:"actions",staticClass:"vs__actions"},[m("button",{directives:[{name:"show",rawName:"v-show",value:i.showClearButton,expression:"showClearButton"}],ref:"clearButton",staticClass:"vs__clear",attrs:{disabled:i.disabled,type:"button",title:i.ariaLabelClearSelected,"aria-label":i.ariaLabelClearSelected},on:{click:i.clearSelection}},[m(i.childComponents.Deselect,{tag:"component"})],1),i._v(" "),i.noDrop?i._e():m("button",{ref:"openIndicatorButton",staticClass:"vs__open-indicator-button",attrs:{type:"button",tabindex:"-1","aria-labelledby":"vs-"+i.uid+"__listbox","aria-controls":"vs-"+i.uid+"__listbox","aria-expanded":i.dropdownOpen.toString()},on:{mousedown:i.toggleDropdown}},[i._t("open-indicator",[m(i.childComponents.OpenIndicator,i._b({tag:"component"},"component",i.scope.openIndicator.attributes,!1))],null,i.scope.openIndicator)],2),i._v(" "),i._t("spinner",[m("div",{directives:[{name:"show",rawName:"v-show",value:i.mutableLoading,expression:"mutableLoading"}],staticClass:"vs__spinner"},[i._v("Loading...")])],null,i.scope.spinner)],2)]),i._v(" "),m("transition",{attrs:{name:i.transition}},[i.dropdownOpen?m("ul",{directives:[{name:"append-to-body",rawName:"v-append-to-body"}],key:"vs-"+i.uid+"__listbox",ref:"dropdownMenu",staticClass:"vs__dropdown-menu",attrs:{id:"vs-"+i.uid+"__listbox",role:"listbox","aria-label":i.ariaLabelListbox,"aria-multiselectable":i.multiple,tabindex:"-1"},on:{mousedown:function(b){return b.preventDefault(),i.onMousedown(b)},mouseup:i.onMouseUp}},[i._t("list-header",null,null,i.scope.listHeader),i._v(" "),i._l(i.filteredOptions,function(b,C){return m("li",{key:i.getOptionKey(b),staticClass:"vs__dropdown-option",class:{"vs__dropdown-option--deselect":i.isOptionDeselectable(b)&&C===i.typeAheadPointer,"vs__dropdown-option--selected":i.isOptionSelected(b),"vs__dropdown-option--highlight":C===i.typeAheadPointer,"vs__dropdown-option--kb-focus":i.hasKeyboardFocusBorder(C),"vs__dropdown-option--disabled":!i.selectable(b)},attrs:{id:"vs-"+i.uid+"__option-"+C,role:"option","aria-selected":i.optionAriaSelected(b)},on:{mousemove:function(O){return i.onMouseMove(b,C)},click:function(O){O.preventDefault(),O.stopPropagation(),i.selectable(b)&&i.select(b)}}},[i._t("option",[i._v(`
|
|
`+i._s(i.getOptionLabel(b))+`
|
|
`)],null,i.normalizeOptionForSlot(b))],2)}),i._v(" "),i.filteredOptions.length===0?m("li",{staticClass:"vs__no-options"},[i._t("no-options",[i._v(`
|
|
Sorry, no matching options.
|
|
`)],null,i.scope.noOptions)],2):i._e(),i._v(" "),i._t("list-footer",null,null,i.scope.listFooter)],2):m("ul",{staticStyle:{display:"none",visibility:"hidden"},attrs:{id:"vs-"+i.uid+"__listbox",role:"listbox","aria-label":i.ariaLabelListbox}})]),i._v(" "),i._t("footer",null,null,i.scope.footer)],2)},[]).exports,W={ajax:v,pointer:p,pointerScroll:d},k=R})(),h})()})}(Pt)),Pt.exports}var X=di();const hi={name:"ChevronDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var pi=function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon chevron-down-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(n){return t.$emit("click",n)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])},fi=[],gi=$(hi,pi,fi,!1,null,null);const mi=gi.exports;function Ue(t,e){const n=[];let s=0,r=t.toLowerCase().indexOf(e.toLowerCase(),s),h=0;for(;r>-1&&h<t.length;)s=r+e.length,n.push({start:r,end:s}),r=t.toLowerCase().indexOf(e.toLowerCase(),s),h++;return n}const vi={name:"NcHighlight",props:{text:{type:String,default:""},search:{type:String,default:""},highlight:{type:Array,default:()=>[]}},computed:{ranges(){let t=[];return!this.search&&this.highlight.length===0||(this.highlight.length>0?t=this.highlight:t=Ue(this.text,this.search),t.forEach((e,n)=>{e.end<e.start&&(t[n]={start:e.end,end:e.start})}),t=t.reduce((e,n)=>(n.start<this.text.length&&n.end>0&&e.push({start:n.start<0?0:n.start,end:n.end>this.text.length?this.text.length:n.end}),e),[]),t.sort((e,n)=>e.start-n.start),t=t.reduce((e,n)=>{if(!e.length)e.push(n);else{const s=e.length-1;e[s].end>=n.start?e[s]={start:e[s].start,end:Math.max(e[s].end,n.end)}:e.push(n)}return e},[])),t},chunks(){if(this.ranges.length===0)return[{start:0,end:this.text.length,highlight:!1,text:this.text}];const t=[];let e=0,n=0;for(;e<this.text.length;){const s=this.ranges[n];if(s.start===e){t.push({...s,highlight:!0,text:this.text.slice(s.start,s.end)}),n++,e=s.end,n>=this.ranges.length&&e<this.text.length&&(t.push({start:e,end:this.text.length,highlight:!1,text:this.text.slice(e)}),e=this.text.length);continue}t.push({start:e,end:s.start,highlight:!1,text:this.text.slice(e,s.start)}),e=s.start}return t}},render(t){return this.ranges.length?t("span",{},this.chunks.map(e=>e.highlight?t("strong",{},e.text):e.text)):t("span",{},this.text)}},yi=null,bi=null;var wi=$(vi,yi,bi,!1,null,null);const Fe=wi.exports,xi={name:"NcEllipsisedOption",components:{NcHighlight:Fe},props:{name:{type:String,default:""},search:{type:String,default:""}},computed:{needsTruncate(){return this.name&&this.name.length>=10},split(){return this.name.length-Math.min(Math.floor(this.name.length/2),10)},part1(){return this.needsTruncate?this.name.slice(0,this.split):this.name},part2(){return this.needsTruncate?this.name.slice(this.split):""},highlight1(){return this.search?Ue(this.name,this.search):[]},highlight2(){return this.highlight1.map(t=>({start:t.start-this.split,end:t.end-this.split}))}}};var Si=function(){var t=this,e=t._self._c;return e("span",{staticClass:"name-parts",attrs:{dir:"auto",title:t.name}},[e("NcHighlight",{staticClass:"name-parts__first",attrs:{text:t.part1,search:t.search,highlight:t.highlight1}}),t.part2?e("NcHighlight",{staticClass:"name-parts__last",attrs:{text:t.part2,search:t.search,highlight:t.highlight2}}):t._e()],1)},_i=[],Ci=$(xi,Si,_i,!1,null,"592b8444");const Oi=Ci.exports,Ve=gt($e());window.addEventListener("resize",()=>{Ve.value=$e()});function $e(){return window.outerHeight===window.screen.height}ye(Ve);var Et={exports:{}},Li=Et.exports,ne;function Ai(){return ne||(ne=1,function(t){(function(e){if(typeof n!="function"){var n=function(v){return v};n.nonNative=!0}const s=n("plaintext"),r=n("html"),h=n("comment"),u=/<(\w*)>/g,o=/<\/?([^\s\/>]+)/;function f(v,y,w){v=v||"",y=y||[],w=w||"";let x=l(y,w);return c(v,x)}function a(v,y){v=v||[],y=y||"";let w=l(v,y);return function(x){return c(x||"",w)}}f.init_streaming_mode=a;function l(v,y){return v=d(v),{allowable_tags:v,tag_replacement:y,state:s,tag_buffer:"",depth:0,in_quote_char:""}}function c(v,y){if(typeof v!="string")throw new TypeError("'html' parameter must be a string");let w=y.allowable_tags,x=y.tag_replacement,_=y.state,S=y.tag_buffer,A=y.depth,L=y.in_quote_char,T="";for(let R=0,W=v.length;R<W;R++){let k=v[R];if(_===s)switch(k){case"<":_=r,S+=k;break;default:T+=k;break}else if(_===r)switch(k){case"<":if(L)break;A++;break;case">":if(L)break;if(A){A--;break}L="",_=s,S+=">",w.has(p(S))?T+=S:T+=x,S="";break;case'"':case"'":k===L?L="":L=L||k,S+=k;break;case"-":S==="<!-"&&(_=h),S+=k;break;case" ":case`
|
|
`:if(S==="<"){_=s,T+="< ",S="";break}S+=k;break;default:S+=k;break}else if(_===h)switch(k){case">":S.slice(-2)=="--"&&(_=s),S="";break;default:S+=k;break}}return y.state=_,y.tag_buffer=S,y.depth=A,y.in_quote_char=L,T}function d(v){let y=new Set;if(typeof v=="string"){let w;for(;w=u.exec(v);)y.add(w[1])}else!n.nonNative&&typeof v[n.iterator]=="function"?y=new Set(v):typeof v.forEach=="function"&&v.forEach(y.add,y);return y}function p(v){let y=o.exec(v);return y?y[1].toLowerCase():null}t.exports?t.exports=f:e.striptags=f})(Li)}(Et)),Et.exports}Ai();function ft(t=document.body){const e=window.getComputedStyle(t).getPropertyValue("--background-invert-if-dark");return e!==void 0?e==="invert(100%)":!1}ft();const Ti=Symbol.for("nc:theme:enforced");function ki(t){const e=Ut(()=>Y(t)??document.body),n=gt(ft(e.value)),s=Ge();function r(){n.value=ft(e.value)}return Ze(e,r,{attributes:!0}),it(e,r),it(s,r,{immediate:!0}),ye(n)}const Di=Xe(()=>ki());function Bi(){const t=Di(),e=Ke(Ti,void 0);return Ut(()=>e?.value?e.value==="dark":t.value)}kt.util.warn;function nt(t){var e;const n=Y(t);return(e=n?.$el)!=null?e:n}const qe=Ye?window:void 0;function lt(...t){let e,n,s,r;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,s,r]=t,e=qe):[e,n,s,r]=t,!e)return at;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const h=[],u=()=>{h.forEach(l=>l()),h.length=0},o=(l,c,d,p)=>(l.addEventListener(c,d,p),()=>l.removeEventListener(c,d,p)),f=it(()=>[nt(e),Y(r)],([l,c])=>{if(u(),!l)return;const d=Je(c)?{...c}:c;h.push(...n.flatMap(p=>s.map(v=>o(l,p,v,d))))},{immediate:!0,flush:"post"}),a=()=>{f(),u()};return be(a),a}let ie=!1;function se(t,e,n={}){const{window:s=qe,ignore:r=[],capture:h=!0,detectIframe:u=!1}=n;if(!s)return at;Dt&&!ie&&(ie=!0,Array.from(s.document.body.children).forEach(l=>l.addEventListener("click",at)),s.document.documentElement.addEventListener("click",at));let o=!0;const f=l=>r.some(c=>{if(typeof c=="string")return Array.from(s.document.querySelectorAll(c)).some(d=>d===l.target||l.composedPath().includes(d));{const d=nt(c);return d&&(l.target===d||l.composedPath().includes(d))}}),a=[lt(s,"click",l=>{const c=nt(t);if(!(!c||c===l.target||l.composedPath().includes(c))){if(l.detail===0&&(o=!f(l)),!o){o=!0;return}e(l)}},{passive:!0,capture:h}),lt(s,"pointerdown",l=>{const c=nt(t);o=!f(l)&&!!(c&&!l.composedPath().includes(c))},{passive:!0}),u&<(s,"blur",l=>{setTimeout(()=>{var c;const d=nt(t);((c=s.document.activeElement)==null?void 0:c.tagName)==="IFRAME"&&!d?.contains(s.document.activeElement)&&e(l)},0)})].filter(Boolean);return()=>a.forEach(l=>l())}const Ii={[jt.mounted](t,e){const n=!e.modifiers.bubble;if(typeof e.value=="function")t.__onClickOutside_stop=se(t,e.value,{capture:n});else{const[s,r]=e.value;t.__onClickOutside_stop=se(t,s,Object.assign({capture:n},r))}},[jt.unmounted](t){t.__onClickOutside_stop()}};function Ot(t){return typeof Window<"u"&&t instanceof Window?t.document.documentElement:typeof Document<"u"&&t instanceof Document?t.documentElement:t}function ze(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth<t.scrollWidth||e.overflowY==="auto"&&t.clientHeight<t.scrollHeight)return!0;{const n=t.parentNode;return!n||n.tagName==="BODY"?!1:ze(n)}}function Ni(t){const e=t||window.event,n=e.target;return ze(n)?!1:e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}const Lt=new WeakMap;function Mi(t,e=!1){const n=gt(e);let s=null,r="";it(Qe(t),o=>{const f=Ot(Y(o));if(f){const a=f;if(Lt.get(a)||Lt.set(a,a.style.overflow),a.style.overflow!=="hidden"&&(r=a.style.overflow),a.style.overflow==="hidden")return n.value=!0;if(n.value)return a.style.overflow="hidden"}},{immediate:!0});const h=()=>{const o=Ot(Y(t));!o||n.value||(Dt&&(s=lt(o,"touchmove",f=>{Ni(f)},{passive:!1})),o.style.overflow="hidden",n.value=!0)},u=()=>{const o=Ot(Y(t));!o||!n.value||(Dt&&s?.(),o.style.overflow=r,Lt.delete(o),n.value=!1)};return be(u),Ut({get(){return n.value},set(o){o?h():u()}})}function Pi(){let t=!1;const e=gt(!1);return(n,s)=>{if(e.value=s.value,t)return;t=!0;const r=Mi(n,s.value);it(e,h=>r.value=h)}}Pi();function Ei(t,e){const n=(l,c)=>l.startsWith(c)?l.slice(c.length):l,s=(l,...c)=>c.reduce((d,p)=>n(d,p),l);if(!t)return null;const r=/^https?:\/\//.test(e),h=/^[a-z][a-z0-9+.-]*:.+/.test(e);if(!r&&h||r&&!e.startsWith(Ht())||!r&&!e.startsWith("/"))return null;const u=r?s(e,Ht(),"/index.php"):e,o=s(t.history.base,tn(),"/index.php"),f=s(u,o)||"/",a=t.resolve(f).route;return a.matched.length?a.fullPath:null}function Ui(t){return window._nc_contacts_menu_hooks?Object.values(window._nc_contacts_menu_hooks).filter(e=>e.enabled(t)):[]}var oe={exports:{}},re={exports:{}},ae;function Fi(){return ae||(ae=1,function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(n,s){return n<<s|n>>>32-s},rotr:function(n,s){return n<<32-s|n>>>s},endian:function(n){if(n.constructor==Number)return e.rotl(n,8)&16711935|e.rotl(n,24)&4278255360;for(var s=0;s<n.length;s++)n[s]=e.endian(n[s]);return n},randomBytes:function(n){for(var s=[];n>0;n--)s.push(Math.floor(Math.random()*256));return s},bytesToWords:function(n){for(var s=[],r=0,h=0;r<n.length;r++,h+=8)s[h>>>5]|=n[r]<<24-h%32;return s},wordsToBytes:function(n){for(var s=[],r=0;r<n.length*32;r+=8)s.push(n[r>>>5]>>>24-r%32&255);return s},bytesToHex:function(n){for(var s=[],r=0;r<n.length;r++)s.push((n[r]>>>4).toString(16)),s.push((n[r]&15).toString(16));return s.join("")},hexToBytes:function(n){for(var s=[],r=0;r<n.length;r+=2)s.push(parseInt(n.substr(r,2),16));return s},bytesToBase64:function(n){for(var s=[],r=0;r<n.length;r+=3)for(var h=n[r]<<16|n[r+1]<<8|n[r+2],u=0;u<4;u++)r*8+u*6<=n.length*8?s.push(t.charAt(h>>>6*(3-u)&63)):s.push("=");return s.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var s=[],r=0,h=0;r<n.length;h=++r%4)h!=0&&s.push((t.indexOf(n.charAt(r-1))&Math.pow(2,-2*h+8)-1)<<h*2|t.indexOf(n.charAt(r))>>>6-h*2);return s}};re.exports=e}()),re.exports}var At,le;function ce(){if(le)return At;le=1;var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var n=[],s=0;s<e.length;s++)n.push(e.charCodeAt(s)&255);return n},bytesToString:function(e){for(var n=[],s=0;s<e.length;s++)n.push(String.fromCharCode(e[s]));return n.join("")}}};return At=t,At}var Tt,ue;function Vi(){if(ue)return Tt;ue=1,Tt=function(n){return n!=null&&(t(n)||e(n)||!!n._isBuffer)};function t(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function e(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&t(n.slice(0,0))}return Tt}var de;function $i(){return de||(de=1,function(){var t=Fi(),e=ce().utf8,n=Vi(),s=ce().bin,r=function(h,u){h.constructor==String?u&&u.encoding==="binary"?h=s.stringToBytes(h):h=e.stringToBytes(h):n(h)?h=Array.prototype.slice.call(h,0):!Array.isArray(h)&&h.constructor!==Uint8Array&&(h=h.toString());for(var o=t.bytesToWords(h),f=h.length*8,a=1732584193,l=-271733879,c=-1732584194,d=271733878,p=0;p<o.length;p++)o[p]=(o[p]<<8|o[p]>>>24)&16711935|(o[p]<<24|o[p]>>>8)&4278255360;o[f>>>5]|=128<<f%32,o[(f+64>>>9<<4)+14]=f;for(var v=r._ff,y=r._gg,w=r._hh,x=r._ii,p=0;p<o.length;p+=16){var _=a,S=l,A=c,L=d;a=v(a,l,c,d,o[p+0],7,-680876936),d=v(d,a,l,c,o[p+1],12,-389564586),c=v(c,d,a,l,o[p+2],17,606105819),l=v(l,c,d,a,o[p+3],22,-1044525330),a=v(a,l,c,d,o[p+4],7,-176418897),d=v(d,a,l,c,o[p+5],12,1200080426),c=v(c,d,a,l,o[p+6],17,-1473231341),l=v(l,c,d,a,o[p+7],22,-45705983),a=v(a,l,c,d,o[p+8],7,1770035416),d=v(d,a,l,c,o[p+9],12,-1958414417),c=v(c,d,a,l,o[p+10],17,-42063),l=v(l,c,d,a,o[p+11],22,-1990404162),a=v(a,l,c,d,o[p+12],7,1804603682),d=v(d,a,l,c,o[p+13],12,-40341101),c=v(c,d,a,l,o[p+14],17,-1502002290),l=v(l,c,d,a,o[p+15],22,1236535329),a=y(a,l,c,d,o[p+1],5,-165796510),d=y(d,a,l,c,o[p+6],9,-1069501632),c=y(c,d,a,l,o[p+11],14,643717713),l=y(l,c,d,a,o[p+0],20,-373897302),a=y(a,l,c,d,o[p+5],5,-701558691),d=y(d,a,l,c,o[p+10],9,38016083),c=y(c,d,a,l,o[p+15],14,-660478335),l=y(l,c,d,a,o[p+4],20,-405537848),a=y(a,l,c,d,o[p+9],5,568446438),d=y(d,a,l,c,o[p+14],9,-1019803690),c=y(c,d,a,l,o[p+3],14,-187363961),l=y(l,c,d,a,o[p+8],20,1163531501),a=y(a,l,c,d,o[p+13],5,-1444681467),d=y(d,a,l,c,o[p+2],9,-51403784),c=y(c,d,a,l,o[p+7],14,1735328473),l=y(l,c,d,a,o[p+12],20,-1926607734),a=w(a,l,c,d,o[p+5],4,-378558),d=w(d,a,l,c,o[p+8],11,-2022574463),c=w(c,d,a,l,o[p+11],16,1839030562),l=w(l,c,d,a,o[p+14],23,-35309556),a=w(a,l,c,d,o[p+1],4,-1530992060),d=w(d,a,l,c,o[p+4],11,1272893353),c=w(c,d,a,l,o[p+7],16,-155497632),l=w(l,c,d,a,o[p+10],23,-1094730640),a=w(a,l,c,d,o[p+13],4,681279174),d=w(d,a,l,c,o[p+0],11,-358537222),c=w(c,d,a,l,o[p+3],16,-722521979),l=w(l,c,d,a,o[p+6],23,76029189),a=w(a,l,c,d,o[p+9],4,-640364487),d=w(d,a,l,c,o[p+12],11,-421815835),c=w(c,d,a,l,o[p+15],16,530742520),l=w(l,c,d,a,o[p+2],23,-995338651),a=x(a,l,c,d,o[p+0],6,-198630844),d=x(d,a,l,c,o[p+7],10,1126891415),c=x(c,d,a,l,o[p+14],15,-1416354905),l=x(l,c,d,a,o[p+5],21,-57434055),a=x(a,l,c,d,o[p+12],6,1700485571),d=x(d,a,l,c,o[p+3],10,-1894986606),c=x(c,d,a,l,o[p+10],15,-1051523),l=x(l,c,d,a,o[p+1],21,-2054922799),a=x(a,l,c,d,o[p+8],6,1873313359),d=x(d,a,l,c,o[p+15],10,-30611744),c=x(c,d,a,l,o[p+6],15,-1560198380),l=x(l,c,d,a,o[p+13],21,1309151649),a=x(a,l,c,d,o[p+4],6,-145523070),d=x(d,a,l,c,o[p+11],10,-1120210379),c=x(c,d,a,l,o[p+2],15,718787259),l=x(l,c,d,a,o[p+9],21,-343485551),a=a+_>>>0,l=l+S>>>0,c=c+A>>>0,d=d+L>>>0}return t.endian([a,l,c,d])};r._ff=function(h,u,o,f,a,l,c){var d=h+(u&o|~u&f)+(a>>>0)+c;return(d<<l|d>>>32-l)+u},r._gg=function(h,u,o,f,a,l,c){var d=h+(u&f|o&~f)+(a>>>0)+c;return(d<<l|d>>>32-l)+u},r._hh=function(h,u,o,f,a,l,c){var d=h+(u^o^f)+(a>>>0)+c;return(d<<l|d>>>32-l)+u},r._ii=function(h,u,o,f,a,l,c){var d=h+(o^(u|~f))+(a>>>0)+c;return(d<<l|d>>>32-l)+u},r._blocksize=16,r._digestsize=16,oe.exports=function(h,u){if(h==null)throw new Error("Illegal argument "+h);var o=t.wordsToBytes(r(h,u));return u&&u.asBytes?o:u&&u.asString?s.bytesToString(o):t.bytesToHex(o)}}()),oe.exports}var qi=$i();const zi=en(qi);function he(t){let e=t.toLowerCase();e.match(/^([0-9a-f]{4}-?){8}$/)===null&&(e=zi(e)),e=e.replace(/[^0-9a-f]/g,"");const n=6,s=gn(n);function r(h,u){let o=0;const f=[];for(let a=0;a<h.length;a++)f.push(parseInt(h.charAt(a),16)%16);for(const a in f)o+=f[a];return parseInt(parseInt(o,10)%u,10)}return s[r(e,n*3)]}function Ri(t,e){const n=(e?.size||64)<=64?64:512,s=e?.isGuest?"/guest":"",r=e?.isDarkTheme??ft(document.body)?"/dark":"";return we(`/avatar${s}/{user}/{size}${r}`,{user:t,size:n})}const pe=`<!--
|
|
- SPDX-FileCopyrightText: 2020 Google Inc.
|
|
- SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<svg viewBox="-1 -1 18 18" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
|
|
<path fill="none" d="M-4-4h24v24H-4z" />
|
|
<path fill="var(--color-warning)" d="M6.9.1C3 .6-.1 4-.1 8c0 4.4 3.6 8 8 8 4 0 7.4-3 8-6.9-1.2 1.3-2.9 2.1-4.7 2.1-3.5 0-6.4-2.9-6.4-6.4 0-1.9.8-3.6 2.1-4.7z" />
|
|
</svg>
|
|
`,ji=`<!--
|
|
- SPDX-FileCopyrightText: 2020 Google Inc.
|
|
- SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<svg viewBox="0 -960 960 960" width="24px" height="24px" xmlns="http://www.w3.org/2000/svg">
|
|
<path
|
|
fill="var(--user-status-color-away, var(--color-warning, #C88800))"
|
|
d="m612-292 56-56-148-148v-184h-80v216l172 172ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"/>
|
|
</svg>
|
|
`,Hi=`<!--
|
|
- SPDX-FileCopyrightText: 2020 Google Inc.
|
|
- SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<svg viewBox="0 -960 960 960" width="24px" height="24px" xmlns="http://www.w3.org/2000/svg">
|
|
<path
|
|
fill="var(--user-status-color-busy, var(--color-error, #DB0606))"
|
|
d="M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"/>
|
|
</svg>
|
|
`,Wi=`<!--
|
|
- SPDX-FileCopyrightText: 2020 Google Inc.
|
|
- SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<svg viewBox="-1 -1 18 18" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
|
|
<path fill="none" d="M-4-4h24v24H-4V-4z" />
|
|
<path fill="var(--color-border-error, var(--color-error))" d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8z" />
|
|
<path fill="#fdffff" d="M5 6.5h6c.8 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5H5c-.8 0-1.5-.7-1.5-1.5S4.2 6.5 5 6.5z" />
|
|
</svg>
|
|
`,Xi=`<!--
|
|
- SPDX-FileCopyrightText: 2020 Google Inc.
|
|
- SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<svg viewBox="0 -960 960 960" width="24px" height="24px" xmlns="http://www.w3.org/2000/svg">
|
|
<path
|
|
fill="var(--user-status-color-busy, var(--color-error, #DB0606))"
|
|
d="M280-440h400v-80H280v80ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"/>
|
|
</svg>
|
|
`,fe=`<!--
|
|
- SPDX-FileCopyrightText: 2020 Google Inc.
|
|
- SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<svg viewBox="-1 -1 18 18" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
|
|
<path fill="none" d="M-4-4h24v24H-4V-4z" />
|
|
<path d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 3.2c2.7 0 4.8 2.1 4.8 4.8s-2.1 4.8-4.8 4.8S3.2 10.7 3.2 8 5.3 3.2 8 3.2z" />
|
|
</svg>
|
|
`,ge=`<!--
|
|
- SPDX-FileCopyrightText: 2020 Google Inc.
|
|
- SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<svg viewBox="0 -960 960 960" width="24px" height="24px" xmlns="http://www.w3.org/2000/svg">
|
|
<path
|
|
fill="var(--user-status-color-offline, var(--color-text-maxcontrast, #6B6B6B))"
|
|
d="M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/>
|
|
</svg>
|
|
`,Ki=`<!--
|
|
- SPDX-FileCopyrightText: 2020 Google Inc.
|
|
- SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<svg viewBox="-1 -1 18 18" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
|
|
<path fill="var(--color-success)" d="M4.8 11.2h6.4V4.8H4.8v6.4zM8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8z" />
|
|
</svg>
|
|
`,Gi=`<!--
|
|
- SPDX-FileCopyrightText: 2020 Google Inc.
|
|
- SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<svg viewBox="0 -960 960 960" width="24px" height="24px" xmlns="http://www.w3.org/2000/svg">
|
|
<path
|
|
fill="var(--user-status-color-online, var(--color-success, #2D7B41))"
|
|
d="m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"/>
|
|
</svg>
|
|
`;ct(nn),ct(sn);function Re(t){switch(t){case"away":return B("away");case"busy":return B("busy");case"dnd":return B("do not disturb");case"online":return B("online");case"invisible":return B("invisible");case"offline":return B("offline");default:return t}}const Zi={online:K?Ki:Gi,away:K?pe:ji,busy:K?pe:Hi,dnd:K?Wi:Xi,invisible:K?fe:ge,offline:K?fe:ge},Yi={name:"NcUserStatusIcon",props:{user:{type:String,default:null},status:{type:String,default:null,validator:t=>["online","away","busy","dnd","invisible","offline"].includes(t)},ariaHidden:{type:String,default:null,validator:t=>["true","false"].includes(t)}},data(){return{fetchedUserStatus:null}},computed:{activeStatus(){return this.status??this.fetchedUserStatus},activeSvg(){return Zi[this.activeStatus]??null},ariaLabel(){return this.ariaHidden==="true"?null:B("User status: {status}",{status:Re(this.activeStatus)})}},watch:{user:{immediate:!0,async handler(t){if(!t||!Ce()?.user_status?.enabled){this.fetchedUserStatus=null;return}try{const{data:e}=await Ft.get(xe("/apps/user_status/api/v1/statuses/{user}",{user:t}));this.fetchedUserStatus=e.ocs?.data?.status}catch{this.fetchedUserStatus=null}}}}};var Ji=function(){var t=this,e=t._self._c;return t.activeStatus?e("span",{staticClass:"user-status-icon",class:{"user-status-icon--invisible":["invisible","offline"].includes(t.status)},attrs:{role:"img","aria-hidden":t.ariaHidden,"aria-label":t.ariaLabel},domProps:{innerHTML:t._s(t.activeSvg)}}):t._e()},Qi=[],ts=$(Yi,Ji,Qi,!1,null,"86b73d39");const es=ts.exports,ns={name:"NcActionLink",mixins:[Vt],inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}},props:{href:{type:String,required:!0,validator:t=>{try{return new URL(t)}catch{return t.startsWith("#")||t.startsWith("/")}}},download:{type:String,default:null},target:{type:String,default:"_self",validator:t=>t&&(!t.startsWith("_")||["_blank","_self","_parent","_top"].indexOf(t)>-1)},title:{type:String,default:null},ariaHidden:{type:Boolean,default:null}}};var is=function(){var t=this,e=t._self._c;return e("li",{staticClass:"action",attrs:{role:t.isInSemanticMenu&&"presentation"}},[e("a",{staticClass:"action-link focusable",attrs:{download:t.download,href:t.href,"aria-label":t.ariaLabel,target:t.target,title:t.title,rel:"nofollow noreferrer noopener",role:t.isInSemanticMenu&&"menuitem"},on:{click:t.onClick}},[t._t("icon",function(){return[e("span",{staticClass:"action-link__icon",class:[t.isIconUrl?"action-link__icon--url":t.icon],style:{backgroundImage:t.isIconUrl?`url(${t.icon})`:null},attrs:{"aria-hidden":"true"}})]}),t.name?e("span",{staticClass:"action-link__longtext-wrapper"},[e("strong",{staticClass:"action-link__name"},[t._v(" "+t._s(t.name)+" ")]),e("br"),e("span",{staticClass:"action-link__longtext",domProps:{textContent:t._s(t.text)}})]):t.isLongText?e("span",{staticClass:"action-link__longtext",domProps:{textContent:t._s(t.text)}}):e("span",{staticClass:"action-link__text"},[t._v(t._s(t.text))]),t._e()],2)])},ss=[],os=$(ns,is,ss,!1,null,"86e09254");const rs=os.exports,as={name:"NcActionRouter",mixins:[Vt],inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}},props:{to:{type:[String,Object],required:!0},exact:{type:Boolean,default:!1}}};var ls=function(){var t=this,e=t._self._c;return e("li",{staticClass:"action",attrs:{role:t.isInSemanticMenu&&"presentation"}},[e("RouterLink",{staticClass:"action-router focusable",attrs:{to:t.to,"aria-label":t.ariaLabel,exact:t.exact,title:t.title,rel:"nofollow noreferrer noopener",role:t.isInSemanticMenu&&"menuitem"},nativeOn:{click:function(n){return t.onClick.apply(null,arguments)}}},[t._t("icon",function(){return[e("span",{staticClass:"action-router__icon",class:[t.isIconUrl?"action-router__icon--url":t.icon],style:{backgroundImage:t.isIconUrl?`url(${t.icon})`:null},attrs:{"aria-hidden":"true"}})]}),t.name?e("span",{staticClass:"action-router__longtext-wrapper"},[e("strong",{staticClass:"action-router__name"},[t._v(" "+t._s(t.name)+" ")]),e("br"),e("span",{staticClass:"action-router__longtext",domProps:{textContent:t._s(t.text)}})]):t.isLongText?e("span",{staticClass:"action-router__longtext",domProps:{textContent:t._s(t.text)}}):e("span",{staticClass:"action-router__text"},[t._v(t._s(t.text))]),t._e()],2)],1)},cs=[],us=$(as,ls,cs,!1,null,"4dae1ff7");const ds=us.exports,hs={name:"NcActionText",mixins:[Vt],inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}}};var ps=function(){var t=this,e=t._self._c;return e("li",{staticClass:"action",attrs:{role:t.isInSemanticMenu&&"presentation"}},[e("span",{staticClass:"action-text",on:{click:t.onClick}},[t._t("icon",function(){return[t.icon!==""?e("span",{staticClass:"action-text__icon",class:[t.isIconUrl?"action-text__icon--url":t.icon],style:{backgroundImage:t.isIconUrl?`url(${t.icon})`:null},attrs:{"aria-hidden":"true"}}):t._e()]}),t.name?e("span",{staticClass:"action-text__longtext-wrapper"},[e("strong",{staticClass:"action-text__name"},[t._v(" "+t._s(t.name)+" ")]),e("span",{staticClass:"action-text__longtext",domProps:{textContent:t._s(t.text)}})]):t.isLongText?e("span",{staticClass:"action-text__longtext",domProps:{textContent:t._s(t.text)}}):e("span",{staticClass:"action-text__text"},[t._v(t._s(t.text))]),t._e()],2)])},fs=[],gs=$(hs,ps,fs,!1,null,"2fe7eb92");const ms=gs.exports;ct(un);const je={data(){return{hasStatus:!1,userStatus:{status:null,message:null,icon:null}}},methods:{async fetchUserStatus(t){if(!t)return;const e=Ce();if(!(!Object.hasOwn(e,"user_status")||!e.user_status.enabled)&&Bt())try{const{data:n}=await Ft.get(xe("apps/user_status/api/v1/statuses/{userId}",{userId:t}));this.setUserStatus(n.ocs.data)}catch(n){if(n.response.status===404&&n.response.data.ocs?.data?.length===0)return;It.error("Could not fetch user status",{error:n})}},setUserStatus({status:t,message:e,icon:n}){this.userStatus.status=t||"",this.userStatus.message=e||"",this.userStatus.icon=n||"",this.hasStatus=!!t}}},He=cn("nextcloud").persist().build();function vs(t){const e=He.getItem("user-has-avatar."+t);return typeof e=="string"?!!e:null}function me(t,e){t&&He.setItem("user-has-avatar."+t,e)}const ys={name:"NcAvatar",directives:{ClickOutside:Ii},components:{IconDotsHorizontal:an,NcActions:rn,NcButton:on,NcIconSvgWrapper:_e,NcLoadingIcon:Se,NcUserStatusIcon:es},mixins:[je],props:{url:{type:String,default:void 0},iconClass:{type:String,default:void 0},user:{type:String,default:void 0},hideStatus:{type:Boolean,default:!1},showUserStatus:{type:Boolean,default:!0},verboseStatus:{type:Boolean,default:!1},showUserStatusCompact:{type:Boolean,default:!0},preloadedUserStatus:{type:Object,default:void 0},isGuest:{type:Boolean,default:!1},displayName:{type:String,default:void 0},size:{type:Number,default:32},noPlaceholder:{type:Boolean,default:!1},allowPlaceholder:{type:Boolean,default:!0},disableTooltip:{type:Boolean,default:!1},disableMenu:{type:Boolean,default:!1},tooltipMessage:{type:String,default:null},isNoUser:{type:Boolean,default:!1},menuContainer:{type:[Boolean,String,Object,Element],default:"body"}},setup(){return{isDarkTheme:Bi()}},data(){return{avatarUrlLoaded:null,avatarSrcSetLoaded:null,userDoesNotExist:!1,isAvatarLoaded:!1,isMenuLoaded:!1,contactsMenuLoading:!1,contactsMenuData:{},contactsMenuActions:[],contactsMenuOpenState:!1}},computed:{avatarAriaLabel(){if(this.hasMenu)return this.canDisplayUserStatus||this.showUserStatusIconOnAvatar?B("Avatar of {displayName}, {status}",{displayName:this.displayName??this.user,status:Re(this.userStatus.status)}):B("Avatar of {displayName}",{displayName:this.displayName??this.user})},canDisplayUserStatus(){return!this.hideStatus&&this.showUserStatus&&this.hasStatus&&["online","away","busy","dnd"].includes(this.userStatus.status)},showUserStatusIconOnAvatar(){return!this.hideStatus&&this.showUserStatus&&!this.verboseStatus&&this.showUserStatusCompact&&this.hasStatus&&this.userStatus.status!=="dnd"&&this.userStatus.icon},userIdentifier(){return this.isDisplayNameDefined?this.displayName:this.isUserDefined?this.user:""},isUserDefined(){return typeof this.user<"u"},isDisplayNameDefined(){return typeof this.displayName<"u"},isUrlDefined(){return typeof this.url<"u"},hasMenu(){return this.disableMenu?!1:this.isMenuLoaded?this.menu.length>0:!(this.user===Bt()?.uid||this.userDoesNotExist||this.url)},showInitials(){return!this.noPlaceholder&&this.allowPlaceholder&&this.userDoesNotExist&&!(this.iconClass||this.$scopedSlots.icon)},avatarStyle(){return{"--avatar-size":this.size+"px",lineHeight:this.showInitials?this.size+"px":0,fontSize:Math.round(this.size*.45)+"px"}},initialsWrapperStyle(){const{r:t,g:e,b:n}=he(this.userIdentifier);return{backgroundColor:`rgba(${t}, ${e}, ${n}, 0.1)`}},initialsStyle(){const{r:t,g:e,b:n}=he(this.userIdentifier);return{color:`rgb(${t}, ${e}, ${n})`}},tooltip(){return this.disableTooltip?!1:this.tooltipMessage?this.tooltipMessage:this.displayName},initials(){let t="?";if(this.showInitials){const e=this.userIdentifier.trim();if(e==="")return t;const n=e.match(/[\p{L}\p{N}\s]/gu);if(!n)return t;const s=n.join(""),r=s.lastIndexOf(" ");t=String.fromCodePoint(s.codePointAt(0)),r!==-1&&(t=t.concat(String.fromCodePoint(s.codePointAt(r+1))))}return t.toLocaleUpperCase()},menu(){const t=this.contactsMenuActions.map(n=>{const s=Ei(this.$router,n.hyperlink);return{ncActionComponent:s?ds:rs,ncActionComponentProps:s?{to:s,icon:n.icon}:{href:n.hyperlink,icon:n.icon},text:n.title}});for(const n of Ui(this.contactsMenuData))try{t.push({ncActionComponent:ln,ncActionComponentProps:{},ncActionComponentHandlers:{click:()=>n.callback(this.contactsMenuData)},text:n.displayName(this.contactsMenuData),iconSvg:n.iconSvg(this.contactsMenuData)})}catch(s){It.error(`Failed to render ContactsMenu action ${n.id}`,{error:s,action:n})}function e(n){const s=document.createTextNode(n),r=document.createElement("p");return r.appendChild(s),r.innerHTML}if(!this.hideStatus&&this.showUserStatus&&(this.userStatus.icon||this.userStatus.message)){const n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
|
<text x="50%" y="50%" text-anchor="middle" style="dominant-baseline: central; font-size: 85%">${e(this.userStatus.icon)}</text>
|
|
</svg>`;return[{ncActionComponent:ms,ncActionComponentProps:{},iconSvg:this.userStatus.icon?n:void 0,text:`${this.userStatus.message}`}].concat(t)}return t}},watch:{url(){this.userDoesNotExist=!1,this.loadAvatarUrl()},user(){this.userDoesNotExist=!1,this.isMenuLoaded=!1,this.loadAvatarUrl()}},mounted(){this.loadAvatarUrl(),_t("settings:avatar:updated",this.loadAvatarUrl),_t("settings:display-name:updated",this.loadAvatarUrl),!this.hideStatus&&this.showUserStatus&&this.user&&!this.isNoUser?(this.preloadedUserStatus?this.setUserStatus(this.preloadedUserStatus):this.fetchUserStatus(this.user),_t("user_status:status.updated",this.handleUserStatusUpdated)):!this.hideStatus&&this.preloadedUserStatus&&this.setUserStatus(this.preloadedUserStatus)},beforeDestroy(){St("settings:avatar:updated",this.loadAvatarUrl),St("settings:display-name:updated",this.loadAvatarUrl),St("user_status:status.updated",this.handleUserStatusUpdated)},methods:{t:B,handleUserStatusUpdated(t){this.user===t.userId&&(this.userStatus={status:t.status,icon:t.icon,message:t.message},this.hasStatus=t.status!==null)},async toggleMenu(t){t.type==="keydown"&&t.key!=="Enter"||(this.contactsMenuOpenState||await this.fetchContactsMenu(),this.contactsMenuOpenState=!this.contactsMenuOpenState)},closeMenu(){this.contactsMenuOpenState=!1},async fetchContactsMenu(){this.contactsMenuLoading=!0;try{const t=encodeURIComponent(this.user),{data:e}=await Ft.post(we("contactsmenu/findOne"),`shareType=0&shareWith=${t}`);this.contactsMenuData=e,this.contactsMenuActions=e.topAction?[e.topAction].concat(e.actions):e.actions}catch{this.contactsMenuOpenState=!1}this.contactsMenuLoading=!1,this.isMenuLoaded=!0},loadAvatarUrl(){if(this.isAvatarLoaded=!1,!this.isUrlDefined&&(!this.isUserDefined||this.isNoUser||this.iconClass||this.$scopedSlots.icon)){this.isAvatarLoaded=!0,this.userDoesNotExist=!0;return}if(this.isUrlDefined){this.updateImageIfValid(this.url);return}if(this.size<=64){const t=this.avatarUrlGenerator(this.user,64),e=[t+" 1x",this.avatarUrlGenerator(this.user,512)+" 8x"].join(", ");this.updateImageIfValid(t,e)}else{const t=this.avatarUrlGenerator(this.user,512);this.updateImageIfValid(t)}},avatarUrlGenerator(t,e){let n=Ri(t,{size:e,isDarkTheme:this.isDarkTheme,isGuest:this.isGuest});return t===Bt()?.uid&&typeof window.oc_userconfig<"u"&&(n+="?v="+window.oc_userconfig.avatar.version),n},updateImageIfValid(t,e=null){const n=vs(this.user);if(this.isUserDefined&&typeof n=="boolean"){this.isAvatarLoaded=!0,this.avatarUrlLoaded=t,e&&(this.avatarSrcSetLoaded=e),n===!1&&(this.userDoesNotExist=!0);return}const s=new Image;s.onload=()=>{this.avatarUrlLoaded=t,e&&(this.avatarSrcSetLoaded=e),this.isAvatarLoaded=!0,me(this.user,!0)},s.onerror=r=>{It.debug("Invalid avatar url",{error:r,url:t}),this.avatarUrlLoaded=null,this.avatarSrcSetLoaded=null,this.userDoesNotExist=!0,this.isAvatarLoaded=!1,me(this.user,!1)},e&&(s.srcset=e),s.src=t}}};var bs=function(){var t=this,e=t._self._c;return e("span",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.closeMenu,expression:"closeMenu"}],staticClass:"avatardiv popovermenu-wrapper",class:{"avatardiv--unknown":t.userDoesNotExist,"avatardiv--with-menu":t.hasMenu,"avatardiv--with-menu-loading":t.contactsMenuLoading},style:t.avatarStyle,attrs:{title:t.tooltip}},[t._t("icon",function(){return[t.iconClass?e("span",{staticClass:"avatar-class-icon",class:t.iconClass}):t.isAvatarLoaded&&!t.userDoesNotExist?e("img",{attrs:{src:t.avatarUrlLoaded,srcset:t.avatarSrcSetLoaded,alt:""}}):t._e()]}),t.hasMenu&&t.menu.length===0?e("NcButton",{staticClass:"action-item action-item__menutoggle",attrs:{"aria-label":t.avatarAriaLabel,variant:"tertiary-no-background"},on:{click:t.toggleMenu},scopedSlots:t._u([{key:"icon",fn:function(){return[t.contactsMenuLoading?e("NcLoadingIcon"):e("IconDotsHorizontal",{attrs:{size:20}})]},proxy:!0}],null,!1,1269954734)}):t.hasMenu?e("NcActions",{attrs:{"aria-label":t.avatarAriaLabel,container:t.menuContainer,"force-menu":"","manual-open":"",open:t.contactsMenuOpenState,variant:"tertiary-no-background"},on:{"update:open":function(n){t.contactsMenuOpenState=n},click:t.toggleMenu},scopedSlots:t._u([t.contactsMenuLoading?{key:"icon",fn:function(){return[e("NcLoadingIcon")]},proxy:!0}:null],null,!0)},t._l(t.menu,function(n,s){return e(n.ncActionComponent,t._g(t._b({key:s,tag:"component",scopedSlots:t._u([n.iconSvg?{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{svg:n.iconSvg}})]},proxy:!0}:null],null,!0)},"component",n.ncActionComponentProps,!1),n.ncActionComponentHandlers),[t._v(" "+t._s(n.text)+" ")])}),1):t._e(),t.showUserStatusIconOnAvatar?e("span",{staticClass:"avatardiv__user-status avatardiv__user-status--icon"},[t._v(" "+t._s(t.userStatus.icon)+" ")]):t.canDisplayUserStatus?e("NcUserStatusIcon",{staticClass:"avatardiv__user-status",attrs:{status:t.userStatus.status,"aria-hidden":String(t.hasMenu)}}):t._e(),t.showInitials?e("span",{staticClass:"avatardiv__initials-wrapper",style:t.initialsWrapperStyle},[e("span",{staticClass:"avatardiv__initials",style:t.initialsStyle},[t._v(" "+t._s(t.initials)+" ")])]):t._e()],2)},ws=[],xs=$(ys,bs,ws,!1,null,"a4de1e87");const Ss=xs.exports,_s=8,ve=32,Cs={name:"NcListItemIcon",components:{NcAvatar:Ss,NcHighlight:Fe,NcIconSvgWrapper:_e},mixins:[je],props:{name:{type:String,required:!0},subname:{type:String,default:""},icon:{type:String,default:""},iconSvg:{type:String,default:""},iconName:{type:String,default:""},search:{type:String,default:""},avatarSize:{type:Number,default:ve},noMargin:{type:Boolean,default:!1},displayName:{type:String,default:null},isNoUser:{type:Boolean,default:!1},id:{type:String,default:null}},setup(){return{margin:_s,defaultSize:ve}},computed:{hasIcon(){return this.icon!==""},hasIconSvg(){return this.iconSvg!==""},isValidSubname(){return this.subname?.trim?.()!==""},isSizeBigEnough(){return this.avatarSize>=26},cssVars(){const t=this.noMargin?0:this.margin;return{"--height":this.avatarSize+2*t+"px","--margin":this.margin+"px"}},searchParts(){const t=/^([^<]*)<([^>]+)>?$/,e=this.search.match(t);return this.isNoUser||!e?[this.search,this.search]:[e[1].trim(),e[2]]}},beforeMount(){!this.isNoUser&&!this.subname&&this.fetchUserStatus(this.user)}};var Os=function(){var t=this,e=t._self._c;return e("span",t._g({staticClass:"option",class:{"option--compact":t.avatarSize<t.defaultSize},style:t.cssVars,attrs:{id:t.id}},t.$listeners),[e("NcAvatar",t._b({staticClass:"option__avatar",attrs:{"disable-menu":!0,"disable-tooltip":!0,"display-name":t.displayName||t.name,"is-no-user":t.isNoUser,size:t.avatarSize}},"NcAvatar",t.$attrs,!1)),e("div",{staticClass:"option__details"},[e("NcHighlight",{staticClass:"option__lineone",attrs:{text:t.name,search:t.searchParts[0]}}),t.isValidSubname&&t.isSizeBigEnough?e("NcHighlight",{staticClass:"option__linetwo",attrs:{text:t.subname,search:t.searchParts[1]}}):t.hasStatus?e("span",[e("span",[t._v(t._s(t.userStatus.icon))]),e("span",[t._v(t._s(t.userStatus.message))])]):t._e()],1),t._t("default",function(){return[t.hasIconSvg?e("NcIconSvgWrapper",{staticClass:"option__icon",attrs:{svg:t.iconSvg,name:t.iconName}}):t.hasIcon?e("span",{staticClass:"icon option__icon",class:t.icon,attrs:{"aria-label":t.iconName}}):t._e()]})],2)},Ls=[],As=$(Cs,Os,Ls,!1,null,"eff1d9a4");const Ts=As.exports;ct(fn,pn);const ks={name:"NcSelect",components:{ChevronDown:mi,NcEllipsisedOption:Oi,NcListItemIcon:Ts,NcLoadingIcon:Se,VueSelect:X.VueSelect},model:{prop:"modelValue",event:"update:modelValue"},props:{...X.VueSelect.props,...X.VueSelect.mixins.reduce((t,e)=>({...t,...e.props}),{}),ariaLabelClearSelected:{type:String,default:B("Clear selected")},ariaLabelCombobox:{type:String,default:null},ariaLabelListbox:{type:String,default:B("Options")},ariaLabelDeselectOption:{type:Function,default:t=>B("Deselect {option}",{option:t})},appendToBody:{type:Boolean,default:!0},calculatePosition:{type:Function,default:null},closeOnSelect:{type:Boolean,default:!0},keepOpen:{type:Boolean,default:!1},components:{type:Object,default:()=>({Deselect:{render:t=>t(hn,{props:{size:20,fillColor:"var(--vs-controls-color)"},style:{cursor:"pointer"}})}})},limit:{type:Number,default:null},disabled:{type:Boolean,default:!1},dropdownShouldOpen:{type:Function,default:({noDrop:t,open:e})=>t?!1:e},filterBy:{type:Function,default:null},inputClass:{type:[String,Object],default:null},inputId:{type:String,default:()=>`select-input-${Wt()}`},inputLabel:{type:String,default:null},labelOutside:{type:Boolean,default:!1},keyboardFocusBorder:{type:Boolean,default:!0},label:{type:String,default:null},loading:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},noWrap:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},placeholder:{type:String,default:""},mapKeydown:{type:Function,default(t,e){return{...t,27:n=>{e.open&&n.stopPropagation(),t[27](n)}}}},uid:{type:String,default:()=>Wt()},placement:{type:String,default:"bottom"},resetFocusOnOptionsChange:{type:Boolean,default:!0},userSelect:{type:Boolean,default:!1},value:{type:[String,Number,Object,Array],default:void 0},modelValue:{type:[String,Number,Object,Array],default:null},required:{type:Boolean,default:!1}," ":{}},emits:[" ","input","update:modelValue","update:model-value"],setup(){const t=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area")),e=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-grid-baseline")),n=t-2*e,s=dn("value","input");return{avatarSize:n,model:s,isLegacy:K}},data(){return{search:""}},computed:{inputRequired(){return this.required?this.model===null||Array.isArray(this.model)&&this.model.length===0:null},localCalculatePosition(){return this.calculatePosition!==null?this.calculatePosition:(t,e,{width:n})=>{t.style.width=n;const s={name:"addClass",fn(){return t.classList.add("vs__dropdown-menu--floating"),{}}},r={name:"togglePlacementClass",fn({placement:u}){return e.$el.classList.toggle("select--drop-up",u==="top"),t.classList.toggle("vs__dropdown-menu--floating-placement-top",u==="top"),{}}},h=()=>{ci(e.$refs.toggle,t,{placement:this.placement,middleware:[oi(-1),s,r,ai(),ri({limiter:li()})]}).then(({x:u,y:o})=>{Object.assign(t.style,{left:`${u}px`,top:`${o}px`,width:`${e.$refs.toggle.getBoundingClientRect().width}px`})})};return si(e.$refs.toggle,t,h)}},localFilterBy(){const t=/[^<]*<([^>]+)/;return this.filterBy!==null?this.filterBy:this.userSelect?(e,n,s)=>{const r=s.match(t);return r&&e.subname?.toLocaleLowerCase?.()?.indexOf(r[1].toLocaleLowerCase())>-1||`${n} ${e.subname}`.toLocaleLowerCase().indexOf(s.toLocaleLowerCase())>-1}:X.VueSelect.props.filterBy.default},localLabel(){return this.label!==null?this.label:this.userSelect?"displayName":X.VueSelect.props.label.default},propsToForward(){const t=[...Object.keys(X.VueSelect.props),...X.VueSelect.mixins.flatMap(e=>Object.keys(e.props??{}))];return{...Object.fromEntries(Object.entries(this.$props).filter(([e])=>t.includes(e))),value:this.model,calculatePosition:this.localCalculatePosition,closeOnSelect:this.closeOnSelect&&!this.keepOpen,filterBy:this.localFilterBy,label:this.localLabel}},listenersToForward(){return{...this.$listeners,input:t=>{this.model=t}}}},mounted(){!this.labelOutside&&!this.inputLabel&&!this.ariaLabelCombobox&&kt.util.warn("[NcSelect] An `inputLabel` or `ariaLabelCombobox` should be set. If an external label is used, `labelOutside` should be set to `true`."),this.inputLabel&&this.ariaLabelCombobox&&kt.util.warn("[NcSelect] Only one of `inputLabel` or `ariaLabelCombobox` should to be set.")},methods:{t:B}};var Ds=function(){var t=this,e=t._self._c;return e("VueSelect",t._g(t._b({staticClass:"select",class:{"select--legacy":t.isLegacy,"select--no-wrap":t.noWrap,"user-select":t.userSelect},on:{search:n=>t.search=n},scopedSlots:t._u([!t.labelOutside&&t.inputLabel?{key:"header",fn:function(){return[e("label",{staticClass:"select__label",attrs:{for:t.inputId}},[t._v(" "+t._s(t.inputLabel)+" ")])]},proxy:!0}:null,{key:"search",fn:function({attributes:n,events:s}){return[e("input",t._g(t._b({staticClass:"vs__search",class:t.inputClass,attrs:{required:t.inputRequired,dir:"auto"}},"input",n,!1),s))]}},{key:"open-indicator",fn:function({attributes:n}){return[e("ChevronDown",t._b({style:{cursor:t.disabled?null:"pointer"},attrs:{"fill-color":"var(--vs-controls-color)",size:26}},"ChevronDown",n,!1))]}},{key:"option",fn:function(n){return[t._t("option",function(){return[t.userSelect?e("NcListItemIcon",t._b({attrs:{"avatar-size":32,name:n[t.localLabel],search:t.search}},"NcListItemIcon",n,!1)):e("NcEllipsisedOption",{attrs:{name:String(n[t.localLabel]),search:t.search}})]},null,n)]}},{key:"selected-option",fn:function(n){return[t._t("selected-option",function(){return[t.userSelect?e("NcListItemIcon",t._b({attrs:{"avatar-size":t.avatarSize,name:n[t.localLabel],"no-margin":"",search:t.search}},"NcListItemIcon",n,!1)):e("NcEllipsisedOption",{attrs:{name:String(n[t.localLabel]),search:t.search}})]},{vBind:n})]}},{key:"spinner",fn:function(n){return[n.loading?e("NcLoadingIcon"):t._e()]}},{key:"no-options",fn:function(){return[t._v(" "+t._s(t.t("No results"))+" ")]},proxy:!0},t._l(t.$scopedSlots,function(n,s){return{key:s,fn:function(r){return[t._t(s,null,null,r)]}}})],null,!0)},"VueSelect",t.propsToForward,!1),t.listenersToForward))},Bs=[],Is=$(ks,Ds,Bs,!1,null,null);const Ps=Is.exports;export{Ps as default};
|
|
//# sourceMappingURL=NcSelect-BSkjzMww.chunk.mjs.map
|