← Back
Editing: contacts-main.mjs
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('contacts', '', 'js/style-BeIBZbRG.chunk.mjs'),window.OC.filePath('contacts', '', 'js/index-DfS3j7V6.chunk.mjs'),window.OC.filePath('contacts', '', 'js/modulepreload-polyfill-BLwK9oPO.chunk.mjs'),window.OC.filePath('contacts', '', 'css/index-D5Ldnqys.chunk.css'),window.OC.filePath('contacts', '', 'css/style-MUcxutnt.chunk.css')])))=>i.map(i=>d[i]); import{o as Vs,p as Hg,q as ai,k as bt,w as vp,x as zg,y as Gg,M as Fg,z as Sn,A as bp,B as pl,D as fl,P as Yg,E as Xa,S as lr,N as yo,F as Xg,G as Le,H as zr,J as jg,K as Wg,L as ml,I as ja,a as _o,O as qg,Q as Zg,R as ac,T as Jg,U as Kg,V as sc,W as lc,f as _p,X as Qg,Y as ei,Z as t0,_ as Cp,b as cc,$ as e0,a0 as n0,a1 as Rr,a2 as Wa,r as Cn,a3 as o0,a4 as r0,a5 as i0,a6 as a0,a7 as s0,a8 as si,a9 as l0,aa as c0,ab as wp,C as kp,v as d0,e as gu,m as dc,ac as Sp,c as Ji,ad as u0,u as xp,ae as Bs,af as Us,ag as gl,ah as Ki,ai as h0,aj as Qi,ak as p0,al as f0,am as ta,an as m0,d as g0,s as y0}from"./style-BeIBZbRG.chunk.mjs";import{_ as tt,r as w,o as f,h as T,D as be,an as v0,U as b0,C as Ae,ad as qa,a5 as Fn,z as uc,E as Bt,S as wn,N as Go,$ as _0,ao as ea,c as k,m as $t,n as ee,ap as Ap,T as Ep,aq as C0,a as D,t as O,I as w0,ar as k0,i as S,q as Z,s as gt,am as vo,u as R,W as hc,k as Np,w as Yn,v as S0,f as E,Y as yr,as as pc,at as yl,au as x0,av as A0,a1 as Za,aw as E0,e as Tp,L as Mp,al as N0,a3 as en,ax as ni,ay as Bn,az as _e,aA as Pi,aB as fc,aC as T0,aD as Ip,aE as fo,aF as M0,aG as Op,aH as I0,aI as lo,aJ as Lp,aK as yu,aL as O0,aM as L0,aN as D0,aO as R0,aP as P0,aQ as Ja,aR as $0,aS as mc,aT as V0,aU as B0,a2 as Ka,F as _t,aV as gc,V as vr,a4 as Bo,j as jt,x as ae,aW as yc,Z as vu,B as _a,aX as U0,b as oe,ai as Ze,d as Fo,P as Ca,O as br,ah as vc,l as Yo,aY as Dp,aa as vl,aZ as H0,a_ as z0}from"./modulepreload-polyfill-BLwK9oPO.chunk.mjs";import{I as wa,J as Rp,K as G0,L as F0,_ as nn,M as Y0,O as X0,F as j0,Q as W0,R as q0,c as Pp,r as Z0,S as J0,T as K0,b as Co,U as Q0,V as ty,o as ey,W as ny,X as Wn,p as wo,Y as bc,Z as _c,a as he,m as Qa,n as Cc,g as $p,q as qn,N as We,$ as wc,f as xn,k as Vp,y as oy,a0 as ry,d as ts,a1 as iy,a2 as Bp,j as ay,a3 as kc,l as Sc,a4 as sy,a5 as ly,a6 as cy,a7 as dy}from"./index-DfS3j7V6.chunk.mjs";const Bg="contacts",Ug="8.7.2",uy={name:"ContactsRoot"};function hy(e,o,r,i,a,s){const l=w("RouterView");return f(),T(l)}const py=tt(uy,[["render",hy]]),ir=typeof document<"u";function Up(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function fy(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Up(e.default)}const zt=Object.assign;function Hs(e,o){const r={};for(const i in o){const a=o[i];r[i]=un(a)?a.map(e):e(a)}return r}const oi=()=>{},un=Array.isArray;function bu(e,o){const r={};for(const i in e)r[i]=i in o?o[i]:e[i];return r}const Hp=/#/g,my=/&/g,gy=/\//g,yy=/=/g,vy=/\?/g,zp=/\+/g,by=/%5B/g,_y=/%5D/g,Gp=/%5E/g,Cy=/%60/g,Fp=/%7B/g,wy=/%7C/g,Yp=/%7D/g,ky=/%20/g;function xc(e){return e==null?"":encodeURI(""+e).replace(wy,"|").replace(by,"[").replace(_y,"]")}function Sy(e){return xc(e).replace(Fp,"{").replace(Yp,"}").replace(Gp,"^")}function bl(e){return xc(e).replace(zp,"%2B").replace(ky,"+").replace(Hp,"%23").replace(my,"%26").replace(Cy,"`").replace(Fp,"{").replace(Yp,"}").replace(Gp,"^")}function xy(e){return bl(e).replace(yy,"%3D")}function Ay(e){return xc(e).replace(Hp,"%23").replace(vy,"%3F")}function Ey(e){return Ay(e).replace(gy,"%2F")}function li(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Ny=/\/$/,Ty=e=>e.replace(Ny,"");function zs(e,o,r="/"){let i,a={},s="",l="";const c=o.indexOf("#");let d=o.indexOf("?");return d=c>=0&&d>c?-1:d,d>=0&&(i=o.slice(0,d),s=o.slice(d,c>0?c:o.length),a=e(s.slice(1))),c>=0&&(i=i||o.slice(0,c),l=o.slice(c,o.length)),i=Ly(i??o,r),{fullPath:i+s+l,path:i,query:a,hash:li(l)}}function My(e,o){const r=o.query?e(o.query):"";return o.path+(r&&"?")+r+(o.hash||"")}function _u(e,o){return!o||!e.toLowerCase().startsWith(o.toLowerCase())?e:e.slice(o.length)||"/"}function Iy(e,o,r){const i=o.matched.length-1,a=r.matched.length-1;return i>-1&&i===a&&_r(o.matched[i],r.matched[a])&&Xp(o.params,r.params)&&e(o.query)===e(r.query)&&o.hash===r.hash}function _r(e,o){return(e.aliasOf||e)===(o.aliasOf||o)}function Xp(e,o){if(Object.keys(e).length!==Object.keys(o).length)return!1;for(var r in e)if(!Oy(e[r],o[r]))return!1;return!0}function Oy(e,o){return un(e)?Cu(e,o):un(o)?Cu(o,e):e?.valueOf()===o?.valueOf()}function Cu(e,o){return un(o)?e.length===o.length&&e.every((r,i)=>r===o[i]):e.length===1&&e[0]===o}function Ly(e,o){if(e.startsWith("/"))return e;if(!e)return o;const r=o.split("/"),i=e.split("/"),a=i[i.length-1];(a===".."||a===".")&&i.push("");let s=r.length-1,l,c;for(l=0;l<i.length;l++)if(c=i[l],c!==".")if(c==="..")s>1&&s--;else break;return r.slice(0,s).join("/")+"/"+i.slice(l).join("/")}const oo={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let _l=(function(e){return e.pop="pop",e.push="push",e})({}),Gs=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Dy(e){if(!e)if(ir){const o=document.querySelector("base");e=o&&o.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Ty(e)}const Ry=/^[^#]+#/;function Py(e,o){return e.replace(Ry,"#")+o}function $y(e,o){const r=document.documentElement.getBoundingClientRect(),i=e.getBoundingClientRect();return{behavior:o.behavior,left:i.left-r.left-(o.left||0),top:i.top-r.top-(o.top||0)}}const es=()=>({left:window.scrollX,top:window.scrollY});function Vy(e){let o;if("el"in e){const r=e.el,i=typeof r=="string"&&r.startsWith("#"),a=typeof r=="string"?i?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!a)return;o=$y(a,e)}else o=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(o):window.scrollTo(o.left!=null?o.left:window.scrollX,o.top!=null?o.top:window.scrollY)}function wu(e,o){return(history.state?history.state.position-o:-1)+e}const Cl=new Map;function By(e,o){Cl.set(e,o)}function Uy(e){const o=Cl.get(e);return Cl.delete(e),o}function Hy(e){return typeof e=="string"||e&&typeof e=="object"}function jp(e){return typeof e=="string"||typeof e=="symbol"}let re=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const Wp=Symbol("");re.MATCHER_NOT_FOUND+"",re.NAVIGATION_GUARD_REDIRECT+"",re.NAVIGATION_ABORTED+"",re.NAVIGATION_CANCELLED+"",re.NAVIGATION_DUPLICATED+"";function Cr(e,o){return zt(new Error,{type:e,[Wp]:!0},o)}function Mn(e,o){return e instanceof Error&&Wp in e&&(o==null||!!(e.type&o))}function zy(e){const o={};if(e===""||e==="?")return o;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;i<r.length;++i){const a=r[i].replace(zp," "),s=a.indexOf("="),l=li(s<0?a:a.slice(0,s)),c=s<0?null:li(a.slice(s+1));if(l in o){let d=o[l];un(d)||(d=o[l]=[d]),d.push(c)}else o[l]=c}return o}function ku(e){let o="";for(let r in e){const i=e[r];if(r=xy(r),i==null){i!==void 0&&(o+=(o.length?"&":"")+r);continue}(un(i)?i.map(a=>a&&bl(a)):[i&&bl(i)]).forEach(a=>{a!==void 0&&(o+=(o.length?"&":"")+r,a!=null&&(o+="="+a))})}return o}function Gy(e){const o={};for(const r in e){const i=e[r];i!==void 0&&(o[r]=un(i)?i.map(a=>a==null?null:""+a):i==null?i:""+i)}return o}const Fy=Symbol(""),Su=Symbol(""),Ac=Symbol(""),qp=Symbol(""),wl=Symbol("");function Gr(){let e=[];function o(i){return e.push(i),()=>{const a=e.indexOf(i);a>-1&&e.splice(a,1)}}function r(){e=[]}return{add:o,list:()=>e.slice(),reset:r}}function io(e,o,r,i,a,s=l=>l()){const l=i&&(i.enterCallbacks[a]=i.enterCallbacks[a]||[]);return()=>new Promise((c,d)=>{const u=m=>{m===!1?d(Cr(re.NAVIGATION_ABORTED,{from:r,to:o})):m instanceof Error?d(m):Hy(m)?d(Cr(re.NAVIGATION_GUARD_REDIRECT,{from:o,to:m})):(l&&i.enterCallbacks[a]===l&&typeof m=="function"&&l.push(m),c())},h=s(()=>e.call(i&&i.instances[a],o,r,u));let p=Promise.resolve(h);e.length<3&&(p=p.then(u)),p.catch(m=>d(m))})}function Fs(e,o,r,i,a=s=>s()){const s=[];for(const l of e)for(const c in l.components){let d=l.components[c];if(!(o!=="beforeRouteEnter"&&!l.instances[c]))if(Up(d)){const u=(d.__vccOpts||d)[o];u&&s.push(io(u,r,i,l,c,a))}else{let u=d();s.push(()=>u.then(h=>{if(!h)throw new Error(`Couldn't resolve component "${c}" at "${l.path}"`);const p=fy(h)?h.default:h;l.mods[c]=h,l.components[c]=p;const m=(p.__vccOpts||p)[o];return m&&io(m,r,i,l,c,a)()}))}}return s}function Yy(e,o){const r=[],i=[],a=[],s=Math.max(o.matched.length,e.matched.length);for(let l=0;l<s;l++){const c=o.matched[l];c&&(e.matched.find(u=>_r(u,c))?i.push(c):r.push(c));const d=e.matched[l];d&&(o.matched.find(u=>_r(u,d))||a.push(d))}return[r,i,a]}let Xy=()=>location.protocol+"//"+location.host;function Zp(e,o){const{pathname:r,search:i,hash:a}=o,s=e.indexOf("#");if(s>-1){let l=a.includes(e.slice(s))?e.slice(s).length:1,c=a.slice(l);return c[0]!=="/"&&(c="/"+c),_u(c,"")}return _u(r,e)+i+a}function jy(e,o,r,i){let a=[],s=[],l=null;const c=({state:m})=>{const g=Zp(e,location),_=r.value,C=o.value;let M=0;if(m){if(r.value=g,o.value=m,l&&l===_){l=null;return}M=C?m.position-C.position:0}else i(g);a.forEach(N=>{N(r.value,_,{delta:M,type:_l.pop,direction:M?M>0?Gs.forward:Gs.back:Gs.unknown})})};function d(){l=r.value}function u(m){a.push(m);const g=()=>{const _=a.indexOf(m);_>-1&&a.splice(_,1)};return s.push(g),g}function h(){if(document.visibilityState==="hidden"){const{history:m}=window;if(!m.state)return;m.replaceState(zt({},m.state,{scroll:es()}),"")}}function p(){for(const m of s)m();s=[],window.removeEventListener("popstate",c),window.removeEventListener("pagehide",h),document.removeEventListener("visibilitychange",h)}return window.addEventListener("popstate",c),window.addEventListener("pagehide",h),document.addEventListener("visibilitychange",h),{pauseListeners:d,listen:u,destroy:p}}function xu(e,o,r,i=!1,a=!1){return{back:e,current:o,forward:r,replaced:i,position:window.history.length,scroll:a?es():null}}function Wy(e){const{history:o,location:r}=window,i={value:Zp(e,r)},a={value:o.state};a.value||s(i.value,{back:null,current:i.value,forward:null,position:o.length-1,replaced:!0,scroll:null},!0);function s(d,u,h){const p=e.indexOf("#"),m=p>-1?(r.host&&document.querySelector("base")?e:e.slice(p))+d:Xy()+e+d;try{o[h?"replaceState":"pushState"](u,"",m),a.value=u}catch(g){console.error(g),r[h?"replace":"assign"](m)}}function l(d,u){s(d,zt({},o.state,xu(a.value.back,d,a.value.forward,!0),u,{position:a.value.position}),!0),i.value=d}function c(d,u){const h=zt({},a.value,o.state,{forward:d,scroll:es()});s(h.current,h,!0),s(d,zt({},xu(i.value,d,null),{position:h.position+1},u),!1),i.value=d}return{location:i,state:a,push:c,replace:l}}function qy(e){e=Dy(e);const o=Wy(e),r=jy(e,o.state,o.location,o.replace);function i(s,l=!0){l||r.pauseListeners(),history.go(s)}const a=zt({location:"",base:e,go:i,createHref:Py.bind(null,e)},o,r);return Object.defineProperty(a,"location",{enumerable:!0,get:()=>o.location.value}),Object.defineProperty(a,"state",{enumerable:!0,get:()=>o.state.value}),a}let Do=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var ye=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(ye||{});const Zy={type:Do.Static,value:""},Jy=/[a-zA-Z0-9_]/;function Ky(e){if(!e)return[[]];if(e==="/")return[[Zy]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function o(g){throw new Error(`ERR (${r})/"${u}": ${g}`)}let r=ye.Static,i=r;const a=[];let s;function l(){s&&a.push(s),s=[]}let c=0,d,u="",h="";function p(){u&&(r===ye.Static?s.push({type:Do.Static,value:u}):r===ye.Param||r===ye.ParamRegExp||r===ye.ParamRegExpEnd?(s.length>1&&(d==="*"||d==="+")&&o(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),s.push({type:Do.Param,value:u,regexp:h,repeatable:d==="*"||d==="+",optional:d==="*"||d==="?"})):o("Invalid state to consume buffer"),u="")}function m(){u+=d}for(;c<e.length;){if(d=e[c++],d==="\\"&&r!==ye.ParamRegExp){i=r,r=ye.EscapeNext;continue}switch(r){case ye.Static:d==="/"?(u&&p(),l()):d===":"?(p(),r=ye.Param):m();break;case ye.EscapeNext:m(),r=i;break;case ye.Param:d==="("?r=ye.ParamRegExp:Jy.test(d)?m():(p(),r=ye.Static,d!=="*"&&d!=="?"&&d!=="+"&&c--);break;case ye.ParamRegExp:d===")"?h[h.length-1]=="\\"?h=h.slice(0,-1)+d:r=ye.ParamRegExpEnd:h+=d;break;case ye.ParamRegExpEnd:p(),r=ye.Static,d!=="*"&&d!=="?"&&d!=="+"&&c--,h="";break;default:o("Unknown state");break}}return r===ye.ParamRegExp&&o(`Unfinished custom RegExp for param "${u}"`),p(),l(),a}const Au="[^/]+?",Qy={sensitive:!1,strict:!1,start:!0,end:!0};var De=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(De||{});const tv=/[.+*?^${}()[\]/\\]/g;function ev(e,o){const r=zt({},Qy,o),i=[];let a=r.start?"^":"";const s=[];for(const u of e){const h=u.length?[]:[De.Root];r.strict&&!u.length&&(a+="/");for(let p=0;p<u.length;p++){const m=u[p];let g=De.Segment+(r.sensitive?De.BonusCaseSensitive:0);if(m.type===Do.Static)p||(a+="/"),a+=m.value.replace(tv,"\\$&"),g+=De.Static;else if(m.type===Do.Param){const{value:_,repeatable:C,optional:M,regexp:N}=m;s.push({name:_,repeatable:C,optional:M});const P=N||Au;if(P!==Au){g+=De.BonusCustomRegExp;try{`${P}`}catch(K){throw new Error(`Invalid custom RegExp for param "${_}" (${P}): `+K.message)}}let V=C?`((?:${P})(?:/(?:${P}))*)`:`(${P})`;p||(V=M&&u.length<2?`(?:/${V})`:"/"+V),M&&(V+="?"),a+=V,g+=De.Dynamic,M&&(g+=De.BonusOptional),C&&(g+=De.BonusRepeatable),P===".*"&&(g+=De.BonusWildcard)}h.push(g)}i.push(h)}if(r.strict&&r.end){const u=i.length-1;i[u][i[u].length-1]+=De.BonusStrict}r.strict||(a+="/?"),r.end?a+="$":r.strict&&!a.endsWith("/")&&(a+="(?:/|$)");const l=new RegExp(a,r.sensitive?"":"i");function c(u){const h=u.match(l),p={};if(!h)return null;for(let m=1;m<h.length;m++){const g=h[m]||"",_=s[m-1];p[_.name]=g&&_.repeatable?g.split("/"):g}return p}function d(u){let h="",p=!1;for(const m of e){(!p||!h.endsWith("/"))&&(h+="/"),p=!1;for(const g of m)if(g.type===Do.Static)h+=g.value;else if(g.type===Do.Param){const{value:_,repeatable:C,optional:M}=g,N=_ in u?u[_]:"";if(un(N)&&!C)throw new Error(`Provided param "${_}" is an array but it is not repeatable (* or + modifiers)`);const P=un(N)?N.join("/"):N;if(!P)if(M)m.length<2&&(h.endsWith("/")?h=h.slice(0,-1):p=!0);else throw new Error(`Missing required param "${_}"`);h+=P}}return h||"/"}return{re:l,score:i,keys:s,parse:c,stringify:d}}function nv(e,o){let r=0;for(;r<e.length&&r<o.length;){const i=o[r]-e[r];if(i)return i;r++}return e.length<o.length?e.length===1&&e[0]===De.Static+De.Segment?-1:1:e.length>o.length?o.length===1&&o[0]===De.Static+De.Segment?1:-1:0}function Jp(e,o){let r=0;const i=e.score,a=o.score;for(;r<i.length&&r<a.length;){const s=nv(i[r],a[r]);if(s)return s;r++}if(Math.abs(a.length-i.length)===1){if(Eu(i))return 1;if(Eu(a))return-1}return a.length-i.length}function Eu(e){const o=e[e.length-1];return e.length>0&&o[o.length-1]<0}const ov={strict:!1,end:!0,sensitive:!1};function rv(e,o,r){const i=ev(Ky(e.path),r),a=zt(i,{record:e,parent:o,children:[],alias:[]});return o&&!a.record.aliasOf==!o.record.aliasOf&&o.children.push(a),a}function iv(e,o){const r=[],i=new Map;o=bu(ov,o);function a(p){return i.get(p)}function s(p,m,g){const _=!g,C=Tu(p);C.aliasOf=g&&g.record;const M=bu(o,p),N=[C];if("alias"in p){const K=typeof p.alias=="string"?[p.alias]:p.alias;for(const X of K)N.push(Tu(zt({},C,{components:g?g.record.components:C.components,path:X,aliasOf:g?g.record:C})))}let P,V;for(const K of N){const{path:X}=K;if(m&&X[0]!=="/"){const rt=m.record.path,pt=rt[rt.length-1]==="/"?"":"/";K.path=m.record.path+(X&&pt+X)}if(P=rv(K,m,M),g?g.alias.push(P):(V=V||P,V!==P&&V.alias.push(P),_&&p.name&&!Mu(P)&&l(p.name)),Kp(P)&&d(P),C.children){const rt=C.children;for(let pt=0;pt<rt.length;pt++)s(rt[pt],P,g&&g.children[pt])}g=g||P}return V?()=>{l(V)}:oi}function l(p){if(jp(p)){const m=i.get(p);m&&(i.delete(p),r.splice(r.indexOf(m),1),m.children.forEach(l),m.alias.forEach(l))}else{const m=r.indexOf(p);m>-1&&(r.splice(m,1),p.record.name&&i.delete(p.record.name),p.children.forEach(l),p.alias.forEach(l))}}function c(){return r}function d(p){const m=lv(p,r);r.splice(m,0,p),p.record.name&&!Mu(p)&&i.set(p.record.name,p)}function u(p,m){let g,_={},C,M;if("name"in p&&p.name){if(g=i.get(p.name),!g)throw Cr(re.MATCHER_NOT_FOUND,{location:p});M=g.record.name,_=zt(Nu(m.params,g.keys.filter(V=>!V.optional).concat(g.parent?g.parent.keys.filter(V=>V.optional):[]).map(V=>V.name)),p.params&&Nu(p.params,g.keys.map(V=>V.name))),C=g.stringify(_)}else if(p.path!=null)C=p.path,g=r.find(V=>V.re.test(C)),g&&(_=g.parse(C),M=g.record.name);else{if(g=m.name?i.get(m.name):r.find(V=>V.re.test(m.path)),!g)throw Cr(re.MATCHER_NOT_FOUND,{location:p,currentLocation:m});M=g.record.name,_=zt({},m.params,p.params),C=g.stringify(_)}const N=[];let P=g;for(;P;)N.unshift(P.record),P=P.parent;return{name:M,path:C,params:_,matched:N,meta:sv(N)}}e.forEach(p=>s(p));function h(){r.length=0,i.clear()}return{addRoute:s,resolve:u,removeRoute:l,clearRoutes:h,getRoutes:c,getRecordMatcher:a}}function Nu(e,o){const r={};for(const i of o)i in e&&(r[i]=e[i]);return r}function Tu(e){const o={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:av(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(o,"mods",{value:{}}),o}function av(e){const o={},r=e.props||!1;if("component"in e)o.default=r;else for(const i in e.components)o[i]=typeof r=="object"?r[i]:r;return o}function Mu(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function sv(e){return e.reduce((o,r)=>zt(o,r.meta),{})}function lv(e,o){let r=0,i=o.length;for(;r!==i;){const s=r+i>>1;Jp(e,o[s])<0?i=s:r=s+1}const a=cv(e);return a&&(i=o.lastIndexOf(a,i-1)),i}function cv(e){let o=e;for(;o=o.parent;)if(Kp(o)&&Jp(e,o)===0)return o}function Kp({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Iu(e){const o=Fn(Ac),r=Fn(qp),i=Bt(()=>{const d=be(e.to);return o.resolve(d)}),a=Bt(()=>{const{matched:d}=i.value,{length:u}=d,h=d[u-1],p=r.matched;if(!h||!p.length)return-1;const m=p.findIndex(_r.bind(null,h));if(m>-1)return m;const g=Ou(d[u-2]);return u>1&&Ou(h)===g&&p[p.length-1].path!==g?p.findIndex(_r.bind(null,d[u-2])):m}),s=Bt(()=>a.value>-1&&fv(r.params,i.value.params)),l=Bt(()=>a.value>-1&&a.value===r.matched.length-1&&Xp(r.params,i.value.params));function c(d={}){if(pv(d)){const u=o[be(e.replace)?"replace":"push"](be(e.to)).catch(oi);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:i,href:Bt(()=>i.value.href),isActive:s,isExactActive:l,navigate:c}}function dv(e){return e.length===1?e[0]:e}const uv=Ae({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Iu,setup(e,{slots:o}){const r=qa(Iu(e)),{options:i}=Fn(Ac),a=Bt(()=>({[Lu(e.activeClass,i.linkActiveClass,"router-link-active")]:r.isActive,[Lu(e.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const s=o.default&&dv(o.default(r));return e.custom?s:uc("a",{"aria-current":r.isExactActive?e.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:a.value},s)}}}),hv=uv;function pv(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const o=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(o))return}return e.preventDefault&&e.preventDefault(),!0}}function fv(e,o){for(const r in o){const i=o[r],a=e[r];if(typeof i=="string"){if(i!==a)return!1}else if(!un(a)||a.length!==i.length||i.some((s,l)=>s.valueOf()!==a[l].valueOf()))return!1}return!0}function Ou(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Lu=(e,o,r)=>e??o??r,mv=Ae({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:o,slots:r}){const i=Fn(wl),a=Bt(()=>e.route||i.value),s=Fn(Su,0),l=Bt(()=>{let u=be(s);const{matched:h}=a.value;let p;for(;(p=h[u])&&!p.components;)u++;return u}),c=Bt(()=>a.value.matched[l.value]);ea(Su,Bt(()=>l.value+1)),ea(Fy,c),ea(wl,a);const d=Go();return wn(()=>[d.value,c.value,e.name],([u,h,p],[m,g,_])=>{h&&(h.instances[p]=u,g&&g!==h&&u&&u===m&&(h.leaveGuards.size||(h.leaveGuards=g.leaveGuards),h.updateGuards.size||(h.updateGuards=g.updateGuards))),u&&h&&(!g||!_r(h,g)||!m)&&(h.enterCallbacks[p]||[]).forEach(C=>C(u))},{flush:"post"}),()=>{const u=a.value,h=e.name,p=c.value,m=p&&p.components[h];if(!m)return Du(r.default,{Component:m,route:u});const g=p.props[h],_=g?g===!0?u.params:typeof g=="function"?g(u):g:null,C=uc(m,zt({},_,o,{onVnodeUnmounted:M=>{M.component.isUnmounted&&(p.instances[h]=null)},ref:d}));return Du(r.default,{Component:C,route:u})||C}}});function Du(e,o){if(!e)return null;const r=e(o);return r.length===1?r[0]:r}const gv=mv;function yv(e){const o=iv(e.routes,e),r=e.parseQuery||zy,i=e.stringifyQuery||ku,a=e.history,s=Gr(),l=Gr(),c=Gr(),d=b0(oo);let u=oo;ir&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const h=Hs.bind(null,G=>""+G),p=Hs.bind(null,Ey),m=Hs.bind(null,li);function g(G,ht){let dt,vt;return jp(G)?(dt=o.getRecordMatcher(G),vt=ht):vt=G,o.addRoute(vt,dt)}function _(G){const ht=o.getRecordMatcher(G);ht&&o.removeRoute(ht)}function C(){return o.getRoutes().map(G=>G.record)}function M(G){return!!o.getRecordMatcher(G)}function N(G,ht){if(ht=zt({},ht||d.value),typeof G=="string"){const wt=zs(r,G,ht.path),se=o.resolve({path:wt.path},ht),So=a.createHref(wt.fullPath);return zt(wt,se,{params:m(se.params),hash:li(wt.hash),redirectedFrom:void 0,href:So})}let dt;if(G.path!=null)dt=zt({},G,{path:zs(r,G.path,ht.path).path});else{const wt=zt({},G.params);for(const se in wt)wt[se]==null&&delete wt[se];dt=zt({},G,{params:p(wt)}),ht.params=p(ht.params)}const vt=o.resolve(dt,ht),Et=G.hash||"";vt.params=h(m(vt.params));const Jt=My(i,zt({},G,{hash:Sy(Et),path:vt.path})),xt=a.createHref(Jt);return zt({fullPath:Jt,hash:Et,query:i===ku?Gy(G.query):G.query||{}},vt,{redirectedFrom:void 0,href:xt})}function P(G){return typeof G=="string"?zs(r,G,d.value.path):zt({},G)}function V(G,ht){if(u!==G)return Cr(re.NAVIGATION_CANCELLED,{from:ht,to:G})}function K(G){return pt(G)}function X(G){return K(zt(P(G),{replace:!0}))}function rt(G,ht){const dt=G.matched[G.matched.length-1];if(dt&&dt.redirect){const{redirect:vt}=dt;let Et=typeof vt=="function"?vt(G,ht):vt;return typeof Et=="string"&&(Et=Et.includes("?")||Et.includes("#")?Et=P(Et):{path:Et},Et.params={}),zt({query:G.query,hash:G.hash,params:Et.path!=null?{}:G.params},Et)}}function pt(G,ht){const dt=u=N(G),vt=d.value,Et=G.state,Jt=G.force,xt=G.replace===!0,wt=rt(dt,vt);if(wt)return pt(zt(P(wt),{state:typeof wt=="object"?zt({},Et,wt.state):Et,force:Jt,replace:xt}),ht||dt);const se=dt;se.redirectedFrom=ht;let So;return!Jt&&Iy(i,vt,dt)&&(So=Cr(re.NAVIGATION_DUPLICATED,{to:se,from:vt}),ot(vt,vt,!0,!1)),(So?Promise.resolve(So):ut(se,vt)).catch(Ee=>Mn(Ee)?Mn(Ee,re.NAVIGATION_GUARD_REDIRECT)?Ee:lt(Ee):ct(Ee,se,vt)).then(Ee=>{if(Ee){if(Mn(Ee,re.NAVIGATION_GUARD_REDIRECT))return pt(zt({replace:xt},P(Ee.to),{state:typeof Ee.to=="object"?zt({},Et,Ee.to.state):Et,force:Jt}),ht||se)}else Ee=q(se,vt,!0,xt,Et);return L(se,vt,Ee),Ee})}function it(G,ht){const dt=V(G,ht);return dt?Promise.reject(dt):Promise.resolve()}function et(G){const ht=At.values().next().value;return ht&&typeof ht.runWithContext=="function"?ht.runWithContext(G):G()}function ut(G,ht){let dt;const[vt,Et,Jt]=Yy(G,ht);dt=Fs(vt.reverse(),"beforeRouteLeave",G,ht);for(const wt of vt)wt.leaveGuards.forEach(se=>{dt.push(io(se,G,ht))});const xt=it.bind(null,G,ht);return dt.push(xt),ne(dt).then(()=>{dt=[];for(const wt of s.list())dt.push(io(wt,G,ht));return dt.push(xt),ne(dt)}).then(()=>{dt=Fs(Et,"beforeRouteUpdate",G,ht);for(const wt of Et)wt.updateGuards.forEach(se=>{dt.push(io(se,G,ht))});return dt.push(xt),ne(dt)}).then(()=>{dt=[];for(const wt of Jt)if(wt.beforeEnter)if(un(wt.beforeEnter))for(const se of wt.beforeEnter)dt.push(io(se,G,ht));else dt.push(io(wt.beforeEnter,G,ht));return dt.push(xt),ne(dt)}).then(()=>(G.matched.forEach(wt=>wt.enterCallbacks={}),dt=Fs(Jt,"beforeRouteEnter",G,ht,et),dt.push(xt),ne(dt))).then(()=>{dt=[];for(const wt of l.list())dt.push(io(wt,G,ht));return dt.push(xt),ne(dt)}).catch(wt=>Mn(wt,re.NAVIGATION_CANCELLED)?wt:Promise.reject(wt))}function L(G,ht,dt){c.list().forEach(vt=>et(()=>vt(G,ht,dt)))}function q(G,ht,dt,vt,Et){const Jt=V(G,ht);if(Jt)return Jt;const xt=ht===oo,wt=ir?history.state:{};dt&&(vt||xt?a.replace(G.fullPath,zt({scroll:xt&&wt&&wt.scroll},Et)):a.push(G.fullPath,Et)),d.value=G,ot(G,ht,dt,xt),lt()}let H;function I(){H||(H=a.listen((G,ht,dt)=>{if(!Ut.listening)return;const vt=N(G),Et=rt(vt,Ut.currentRoute.value);if(Et){pt(zt(Et,{replace:!0,force:!0}),vt).catch(oi);return}u=vt;const Jt=d.value;ir&&By(wu(Jt.fullPath,dt.delta),es()),ut(vt,Jt).catch(xt=>Mn(xt,re.NAVIGATION_ABORTED|re.NAVIGATION_CANCELLED)?xt:Mn(xt,re.NAVIGATION_GUARD_REDIRECT)?(pt(zt(P(xt.to),{force:!0}),vt).then(wt=>{Mn(wt,re.NAVIGATION_ABORTED|re.NAVIGATION_DUPLICATED)&&!dt.delta&&dt.type===_l.pop&&a.go(-1,!1)}).catch(oi),Promise.reject()):(dt.delta&&a.go(-dt.delta,!1),ct(xt,vt,Jt))).then(xt=>{xt=xt||q(vt,Jt,!1),xt&&(dt.delta&&!Mn(xt,re.NAVIGATION_CANCELLED)?a.go(-dt.delta,!1):dt.type===_l.pop&&Mn(xt,re.NAVIGATION_ABORTED|re.NAVIGATION_DUPLICATED)&&a.go(-1,!1)),L(vt,Jt,xt)}).catch(oi)}))}let U=Gr(),z=Gr(),j;function ct(G,ht,dt){lt(G);const vt=z.list();return vt.length?vt.forEach(Et=>Et(G,ht,dt)):console.error(G),Promise.reject(G)}function st(){return j&&d.value!==oo?Promise.resolve():new Promise((G,ht)=>{U.add([G,ht])})}function lt(G){return j||(j=!G,I(),U.list().forEach(([ht,dt])=>G?dt(G):ht()),U.reset()),G}function ot(G,ht,dt,vt){const{scrollBehavior:Et}=e;if(!ir||!Et)return Promise.resolve();const Jt=!dt&&Uy(wu(G.fullPath,0))||(vt||!dt)&&history.state&&history.state.scroll||null;return _0().then(()=>Et(G,ht,Jt)).then(xt=>xt&&Vy(xt)).catch(xt=>ct(xt,G,ht))}const St=G=>a.go(G);let Pt;const At=new Set,Ut={currentRoute:d,listening:!0,addRoute:g,removeRoute:_,clearRoutes:o.clearRoutes,hasRoute:M,getRoutes:C,resolve:N,options:e,push:K,replace:X,go:St,back:()=>St(-1),forward:()=>St(1),beforeEach:s.add,beforeResolve:l.add,afterEach:c.add,onError:z.add,isReady:st,install(G){G.component("RouterLink",hv),G.component("RouterView",gv),G.config.globalProperties.$router=Ut,Object.defineProperty(G.config.globalProperties,"$route",{enumerable:!0,get:()=>be(d)}),ir&&!Pt&&d.value===oo&&(Pt=!0,K(a.location).catch(vt=>{}));const ht={};for(const vt in oo)Object.defineProperty(ht,vt,{get:()=>d.value[vt],enumerable:!0});G.provide(Ac,Ut),G.provide(qp,v0(ht)),G.provide(wl,d);const dt=G.unmount;At.add(G),G.unmount=function(){At.delete(G),At.size<1&&(u=oo,H&&H(),H=null,d.value=oo,Pt=!1,j=!1),dt()}}};function ne(G){return G.reduce((ht,dt)=>ht.then(()=>et(dt)),Promise.resolve())}return Ut}function Ru(e,o){return(e.aliasOf||e)===(o.aliasOf||o)}function vv(e,o){if(Object.keys(e).length!==Object.keys(o).length)return!1;for(var r in e)if(!bv(e[r],o[r]))return!1;return!0}function bv(e,o){return wa(e)?Pu(e,o):wa(o)?Pu(o,e):(e&&e.valueOf())===(o&&o.valueOf())}function Pu(e,o){return wa(o)?e.length===o.length&&e.every((r,i)=>r===o[i]):e.length===1&&e[0]===o}function $u(e){const o=Fn(Rp),r=Fn(G0),i=Bt(()=>{const d=be(e.to);return o.resolve(d)}),a=Bt(()=>{const{matched:d}=i.value,{length:u}=d,h=d[u-1],p=r.matched;if(!h||!p.length)return-1;const m=p.findIndex(Ru.bind(null,h));if(m>-1)return m;const g=Vu(d[u-2]);return u>1&&Vu(h)===g&&p[p.length-1].path!==g?p.findIndex(Ru.bind(null,d[u-2])):m}),s=Bt(()=>a.value>-1&&kv(r.params,i.value.params)),l=Bt(()=>a.value>-1&&a.value===r.matched.length-1&&vv(r.params,i.value.params));function c(d={}){if(wv(d)){const u=o[be(e.replace)?"replace":"push"](be(e.to)).catch(F0);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:i,href:Bt(()=>i.value.href),isActive:s,isExactActive:l,navigate:c}}function _v(e){return e.length===1?e[0]:e}const Cv=Ae({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:$u,setup(e,{slots:o}){const r=qa($u(e)),{options:i}=Fn(Rp),a=Bt(()=>({[Bu(e.activeClass,i.linkActiveClass,"router-link-active")]:r.isActive,[Bu(e.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const s=o.default&&_v(o.default(r));return e.custom?s:uc("a",{"aria-current":r.isExactActive?e.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:a.value},s)}}});function wv(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const o=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(o))return}return e.preventDefault&&e.preventDefault(),!0}}function kv(e,o){for(const r in o){const i=o[r],a=e[r];if(typeof i=="string"){if(i!==a)return!1}else if(!wa(a)||a.length!==i.length||i.some((s,l)=>s.valueOf()!==a[l].valueOf()))return!1}return!0}function Vu(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Bu=(e,o,r)=>e??o??r,Sv={name:"NcActionSeparator"},xv={class:"action action-separator action--disabled",role:"separator"};function Av(e,o,r,i,a,s){return f(),k("li",xv)}const Ev=nn(Sv,[["render",Av],["__scopeId","data-v-3e2324b7"]]),Nv={class:"app-content-details"},Tv=Ae({__name:"NcAppContentDetails",setup(e){return(o,r)=>(f(),k("div",Nv,[$t(o.$slots,"default")]))}}),Mv={name:"NcAppContentList",props:{selection:{type:Boolean,default:!1},showDetails:{type:Boolean,default:!1}}};function Iv(e,o,r,i,a,s){return f(),k("div",{class:ee(["app-content-list",{selection:r.selection,showdetails:r.showDetails}])},[$t(e.$slots,"default")],2)}const Ov=nn(Mv,[["render",Iv]]),Lv=["id","aria-labelledby"],Dv=["id"],Rv={class:"app-settings-section__description"},Pv={class:"app-settings-section__content"},$v=Ae({__name:"NcAppSettingsSection",props:{name:{},description:{},id:{},order:{}},setup(e){const o=e,r=Ap(),{registerSection:i,unregisterSection:a}=Y0(),s=Fn(X0),l=Bt(()=>"settings-section_"+o.id);return wn(()=>o.id,()=>{/^[a-z0-9\-_]+$/.test(o.id)||j0.warn(`Invalid id prop: ${o.id}. Only alphanumeric, dash and underscore are allowed.`)},{immediate:!0}),wn([()=>o.id,()=>o.name,()=>o.order],([c,d,u],[h,,])=>{a(h),i(c,d,u,r?.icon?.())}),Ep(()=>{i(o.id,o.name,o.order,r?.icon?.())}),C0(()=>{a(o.id)}),(c,d)=>(f(),k("section",{id:l.value,"aria-labelledby":`${l.value}--label`,class:ee(["app-settings-section",{"app-settings-section__legacy":be(s)}])},[D("h3",{id:`${l.value}--label`,class:"app-settings-section__name"},O(e.name),9,Dv),D("div",Rv,O(e.description),1),D("div",Pv,[$t(c.$slots,"default",{},void 0,!0)])],10,Lv))}}),Vv=nn($v,[["__scopeId","data-v-9f146f2d"]]),Bv=["title"],Uv=Ae({__name:"NcCounterBubble",props:{count:{},active:{type:Boolean},type:{default:""},raw:{type:Boolean}},setup(e){const o=e,r=Bt(()=>o.raw?o.count.toString():new Intl.NumberFormat(w0(),{notation:"compact",compactDisplay:"short"}).format(o.count)),i=Bt(()=>{if(o.raw)return;const a=o.count.toString();if(a!==r.value)return a});return(a,s)=>(f(),k("div",{class:ee(["counter-bubble__counter",{active:e.active,"counter-bubble__counter--highlighted":e.type==="highlighted","counter-bubble__counter--outlined":e.type==="outlined"}]),title:i.value},O(r.value),11,Bv))}}),ns=nn(Uv,[["__scopeId","data-v-36ffc13f"]]),Hv=Ae({__name:"NcFormBox",props:{row:{type:Boolean}},setup(e){const o=k0();return ea(W0,{isInFormBox:!0,formBoxItemClass:o.ncFormBox__item}),(r,i)=>(f(),k("div",{class:ee([r.$style.ncFormBox,e.row?r.$style.ncFormBox_row:r.$style.ncFormBox_col])},[$t(r.$slots,"default",{itemClass:r.$style.ncFormBox__item})],2))}}),zv="_ncFormBox_BhWbh",Gv="_ncFormBox_row_F5s-i",Fv="_ncFormBox__item_655o7",Yv="_ncFormBox_col_nIEpL",Xv={"material-design-icon":"_material-design-icon_TxQIB",ncFormBox:zv,ncFormBox_row:Gv,ncFormBox__item:Fv,ncFormBox_col:Yv},jv={$style:Xv},Qp=nn(Hv,[["__cssModules",jv]]),Wv=["id"],qv=Ae({inheritAttrs:!1,__name:"NcFormBoxItem",props:{tag:{},label:{default:()=>{}},description:{default:()=>{}},invertedAccent:{type:Boolean,default:!1},class:{default:()=>{}},itemClasses:{default:()=>{}}},emits:["click"],setup(e){const o=Ap(),{formBoxItemClass:r}=q0(),i=Pp(),a=()=>!!e.description||!!o.description;return(s,l)=>(f(),k("div",{class:ee([e.class,s.$style.formBoxItem,be(r),{[s.$style.formBoxItem_inverted]:e.invertedAccent&&a(),[s.$style.formBoxItem_legacy]:be(Z0)}])},[D("span",{class:ee(s.$style.formBoxItem__content)},[(f(),T(vo(e.tag),gt({class:[s.$style.formBoxItem__element,e.itemClasses]},s.$attrs,{onClick:l[0]||(l[0]=c=>s.$emit("click",c))}),{default:S(()=>[$t(s.$slots,"default",{descriptionId:be(i)},()=>[Z(O(e.label||"⚠️ Label is missing"),1)])]),_:3},16,["class"])),a()?(f(),k("span",{key:0,id:be(i),class:ee(s.$style.formBoxItem__description)},[$t(s.$slots,"description",{},()=>[Z(O(e.description),1)])],10,Wv)):R("",!0)],2),D("span",{class:ee(s.$style.formBoxItem__icon)},[$t(s.$slots,"icon",{descriptionId:be(i)},()=>[l[1]||(l[1]=Z(" ⚠️ Icon is missing ",-1))])],2)],2))}}),Zv="_formBoxItem_tUuGC",Jv="_formBoxItem__description_HntYN",Kv="_formBoxItem_legacy_9rptB",Qv="_formBoxItem_inverted_KvZoR",t2="_formBoxItem__element_qeQE5",e2="_formBoxItem__content_cHFNh",n2="_formBoxItem__icon_knJ-G",o2={"material-design-icon":"_material-design-icon_2v3kw",formBoxItem:Zv,formBoxItem__description:Jv,formBoxItem_legacy:Kv,formBoxItem_inverted:Qv,formBoxItem__element:t2,formBoxItem__content:e2,formBoxItem__icon:n2},r2={$style:o2},i2=nn(qv,[["__cssModules",r2]]),a2=["id","aria-describedby","disabled"],s2=Ae({__name:"NcFormBoxSwitch",props:yr({label:{default:()=>{}},description:{default:()=>{}},disabled:{type:Boolean,default:!1}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:yr(["enable","disable"],["update:modelValue"]),setup(e,{emit:o}){const r=hc(e,"modelValue"),i=o,a=Pp();return wn(r,()=>{r.value?i("enable"):i("disable")},{flush:"sync"}),(s,l)=>(f(),T(i2,{tag:"label",for:be(a)},Np({icon:S(({descriptionId:c})=>[Yn(D("input",{id:be(a),"onUpdate:modelValue":l[0]||(l[0]=d=>r.value=d),class:ee(s.$style.formBoxSwitch__input),type:"checkbox",role:"switch","aria-describedby":c,disabled:e.disabled},null,10,a2),[[S0,r.value]]),E(J0,{checked:r.value,inline:""},null,8,["checked"])]),_:2},[s.$slots.default||e.label?{name:"default",fn:S(()=>[$t(s.$slots,"default",{},()=>[Z(O(e.label),1)])]),key:"0"}:void 0,s.$slots.description||e.description?{name:"description",fn:S(()=>[$t(s.$slots,"description",{},()=>[Z(O(e.description),1)])]),key:"1"}:void 0]),1032,["for"]))}}),l2="_formBoxSwitch__input_aIokG",c2={"material-design-icon":"_material-design-icon_kprl2",formBoxSwitch__input:l2},d2={$style:c2},u2=nn(s2,[["__cssModules",d2]]),h2={name:"NcListItem",components:{NcActions:Co,NcCounterBubble:ns,NcVNodes:K0},inheritAttrs:!1,setup(){return{isLegacy34:Q0}},props:{details:{type:String,default:""},name:{type:String,default:void 0},to:{type:[String,Object],default:null},href:{type:String,default:"#"},target:{type:String,default:""},anchorId:{type:String,default:""},bold:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},active:{type:Boolean,default:void 0},linkAriaLabel:{type:String,default:""},actionsAriaLabel:{type:String,default:void 0},counterNumber:{type:[Number,String],default:0},counterType:{type:String,default:"",validator(e){return["highlighted","outlined",""].indexOf(e)!==-1}},forceDisplayActions:{type:Boolean,default:!1},forceMenu:{type:Boolean,default:!1},oneLine:{type:Boolean,default:!1}},emits:["click","dragstart","update:menuOpen"],data(){return{hovered:!1,hasActions:!1,hasSubname:!1,displayActionsOnHoverFocus:!1,menuOpen:!1,hasIndicator:!1,hasDetails:!1}},computed:{showAdditionalElements(){return!this.displayActionsOnHoverFocus||this.forceDisplayActions},showDetails(){return(this.details!==""||this.hasDetails)&&(!this.displayActionsOnHoverFocus||this.forceDisplayActions)}},watch:{menuOpen(e){!e&&!this.hovered&&(this.displayActionsOnHoverFocus=!1)}},mounted(){this.checkSlots()},updated(){this.checkSlots()},methods:{onClick(e,o,r){this.$emit("click",e),!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&r&&(o?.(e),e.preventDefault())},showActions(){this.hasActions&&(this.displayActionsOnHoverFocus=!0),this.hovered=!1},hideActions(){this.displayActionsOnHoverFocus=!1},handleBlur(e){this.menuOpen||this.$refs["list-item"]?.contains(e.relatedTarget)||this.hideActions()},handleMouseleave(){this.menuOpen||(this.displayActionsOnHoverFocus=!1),this.hovered=!1},handleMouseover(){this.showActions(),this.hovered=!0},handleActionsUpdateOpen(e){this.menuOpen=e,this.$emit("update:menuOpen",e)},checkSlots(){this.hasActions!==!!this.$slots.actions&&(this.hasActions=!!this.$slots.actions),this.hasSubname!==!!this.$slots.subname&&(this.hasSubname=!!this.$slots.subname),this.hasIndicator!==!!this.$slots.indicator&&(this.hasIndicator=!!this.$slots.indicator),this.hasDetails!==!!this.$slots.details&&(this.hasDetails=!!this.$slots.details)}}},p2=["id","aria-label","href","target","rel","onClick"],f2={class:"list-item-content"},m2={class:"list-item-content__main"},g2={class:"list-item-content__name"},y2={class:"list-item-content__details"},v2={key:0,class:"list-item-details__details"},b2={key:1,class:"list-item-details__extra"},_2={key:1,class:"list-item-details__indicator"},C2={key:0,class:"list-item-content__extra-actions"},w2={key:2,class:"list-item__extra"};function k2(e,o,r,i,a,s){const l=w("NcCounterBubble"),c=w("NcActions");return f(),T(vo(r.to?"router-link":"NcVNodes"),x0(A0({...r.to&&{custom:!0,to:r.to}})),{default:S(({href:d,navigate:u,isActive:h})=>[D("li",gt({class:["list-item__wrapper",{"list-item__wrapper--active":r.active??h,"list-item__wrapper--legacy":i.isLegacy34}]},e.$attrs),[D("div",{ref:"list-item",class:ee(["list-item",{"list-item--compact":r.compact,"list-item--one-line":r.oneLine}]),onMouseover:o[5]||(o[5]=(...p)=>s.handleMouseover&&s.handleMouseover(...p)),onMouseleave:o[6]||(o[6]=(...p)=>s.handleMouseleave&&s.handleMouseleave(...p))},[D("a",{id:r.anchorId||void 0,"aria-label":r.linkAriaLabel,class:"list-item__anchor",href:d||r.href,target:r.target||(r.href==="#"?void 0:"_blank"),rel:r.href==="#"?void 0:"noopener noreferrer",onFocus:o[0]||(o[0]=(...p)=>s.showActions&&s.showActions(...p)),onFocusout:o[1]||(o[1]=(...p)=>s.handleBlur&&s.handleBlur(...p)),onClick:p=>s.onClick(p,u,d),onDragstart:o[2]||(o[2]=p=>e.$emit("dragstart",p)),onKeydown:o[3]||(o[3]=pc((...p)=>s.hideActions&&s.hideActions(...p),["esc"]))},[$t(e.$slots,"icon",{},void 0,!0),D("div",f2,[D("div",m2,[D("div",g2,[$t(e.$slots,"name",{},()=>[Z(O(r.name),1)],!0)]),a.hasSubname?(f(),k("div",{key:0,class:ee(["list-item-content__subname",{"list-item-content__subname--bold":r.bold}])},[$t(e.$slots,"subname",{},void 0,!0)],2)):R("",!0)]),D("div",y2,[s.showDetails?(f(),k("div",v2,[$t(e.$slots,"details",{},()=>[Z(O(r.details),1)],!0)])):R("",!0),r.counterNumber!==0||a.hasIndicator?Yn((f(),k("div",b2,[r.counterNumber!==0?(f(),T(l,{key:0,count:r.counterNumber,active:i.isLegacy34?r.active??h:!1,class:"list-item-details__counter",type:r.counterType},null,8,["count","active","type"])):R("",!0),a.hasIndicator?(f(),k("span",_2,[$t(e.$slots,"indicator",{},void 0,!0)])):R("",!0)],512)),[[yl,s.showAdditionalElements]]):R("",!0)])])],40,p2),e.$slots["extra-actions"]?(f(),k("div",C2,[$t(e.$slots,"extra-actions",{},void 0,!0)])):R("",!0),r.forceDisplayActions||a.displayActionsOnHoverFocus?(f(),k("div",{key:1,class:"list-item-content__actions",onFocusout:o[4]||(o[4]=(...p)=>s.handleBlur&&s.handleBlur(...p))},[E(c,{ref:"actions",primary:i.isLegacy34?r.active??h:!1,forceMenu:r.forceMenu,"aria-label":r.actionsAriaLabel,"onUpdate:open":s.handleActionsUpdateOpen},Np({default:S(()=>[$t(e.$slots,"actions",{},void 0,!0)]),_:2},[e.$slots["actions-icon"]?{name:"icon",fn:S(()=>[$t(e.$slots,"actions-icon",{},void 0,!0)]),key:"0"}:void 0]),1032,["primary","forceMenu","aria-label","onUpdate:open"])],32)):R("",!0),e.$slots.extra?(f(),k("div",w2,[$t(e.$slots,"extra",{},void 0,!0)])):R("",!0)],34)],16)]),_:3},16)}const tf=nn(h2,[["render",k2],["__scopeId","data-v-7e90555e"]]),S2=8,Uu=32,x2={name:"NcListItemIcon",components:{NcAvatar:Wn,NcHighlight:ny,NcIconSvgWrapper:ey},mixins:[ty],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:Uu},noMargin:{type:Boolean,default:!1},displayName:{type:String,default:null},isNoUser:{type:Boolean,default:!1},id:{type:String,default:null}},setup(){return{margin:S2,defaultSize:Uu}},computed:{hasIcon(){return this.icon!==""},hasIconSvg(){return this.iconSvg!==""},isValidSubname(){return this.subname?.trim?.()!==""},isSizeBigEnough(){return this.avatarSize>=26},cssVars(){const e=this.noMargin?0:this.margin;return{"--height":this.avatarSize+2*e+"px","--margin":this.margin+"px"}},searchParts(){const e=/^([^<]*)<([^>]+)>?$/,o=this.search.match(e);return this.isNoUser||!o?[this.search,this.search]:[o[1].trim(),o[2]]}},beforeMount(){!this.isNoUser&&!this.subname&&this.fetchUserStatus(this.user)}},A2=["id"],E2={class:"option__details"},N2={key:1},T2=["aria-label"];function M2(e,o,r,i,a,s){const l=w("NcAvatar"),c=w("NcHighlight"),d=w("NcIconSvgWrapper");return f(),k("span",{id:r.id,class:ee(["option",{"option--compact":r.avatarSize<i.defaultSize}]),style:Za(s.cssVars)},[E(l,gt(e.$attrs,{disableMenu:"",disableTooltip:"",displayName:r.displayName||r.name,isNoUser:r.isNoUser,size:r.avatarSize,class:"option__avatar"}),null,16,["displayName","isNoUser","size"]),D("div",E2,[E(c,{class:"option__lineone",text:r.name,search:s.searchParts[0]},null,8,["text","search"]),s.isValidSubname&&s.isSizeBigEnough?(f(),T(c,{key:0,class:"option__linetwo",text:r.subname,search:s.searchParts[1]},null,8,["text","search"])):e.hasStatus?(f(),k("span",N2,[D("span",null,O(e.userStatus.icon),1),D("span",null,O(e.userStatus.message),1)])):R("",!0)]),$t(e.$slots,"default",{},()=>[s.hasIconSvg?(f(),T(d,{key:0,class:"option__icon",svg:r.iconSvg,name:r.iconName},null,8,["svg","name"])):s.hasIcon?(f(),k("span",{key:1,class:ee(["icon option__icon",r.icon]),"aria-label":r.iconName},null,10,T2)):R("",!0)],!0)],14,A2)}const Hu=nn(x2,[["render",M2],["__scopeId","data-v-0ee94269"]]),I2=Ae({__name:"NcSelectUsers",props:yr({ariaLabelClearSelected:{},ariaLabelListbox:{},ariaLabelDeselectOption:{type:Function},disabled:{type:Boolean},inputId:{},inputLabel:{},labelOutside:{type:Boolean},keepOpen:{type:Boolean},loading:{type:Boolean},multiple:{type:Boolean},noWrap:{type:Boolean},options:{},placeholder:{},required:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:yr(["search"],["update:modelValue"]),setup(e,{emit:o}){const r=hc(e,"modelValue"),i=o,a=Go("");wn(a,()=>i("search",a.value));const s=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area")),l=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-grid-baseline")),c=s-2*l;function d(u,h,p){const m=/[^<]*<([^>]+)/,g=p.match(m),_=u.subname?.toLocaleLowerCase()??"";return g&&_.indexOf(g[1].toLocaleLowerCase())>-1||`${h} ${u.subname}`.toLocaleLowerCase().indexOf(p.toLocaleLowerCase())>-1}return(u,h)=>(f(),T(be(wo),gt({modelValue:r.value,"onUpdate:modelValue":h[0]||(h[0]=p=>r.value=p),class:"nc-select-users"},u.$props,{filterBy:d,label:"displayName",onSearch:h[1]||(h[1]=p=>a.value=p)}),{option:S(p=>[E(be(Hu),gt(p,{avatarSize:32,name:p.displayName,search:a.value}),null,16,["name","search"])]),"selected-option":S(p=>[E(be(Hu),gt(p,{avatarSize:c,name:p.displayName,noMargin:"",search:a.value}),null,16,["name","search"])]),_:1},16,["modelValue"]))}}),O2=nn(I2,[["__scopeId","data-v-e8e18fd3"]]),L2={};function D2(e,o){return f(),k("div",null,[$t(e.$slots,"trigger")])}const R2=nn(L2,[["render",D2]]),P2={class:"user-bubble__name"},$2={key:0,class:"user-bubble__secondary"},V2=Ae({__name:"NcUserBubble",props:yr({avatarImage:{default:void 0},user:{default:void 0},displayName:{default:void 0},showUserStatus:{type:Boolean},url:{default:void 0},to:{default:void 0},primary:{type:Boolean},size:{default:20},margin:{default:2}},{open:{type:Boolean},openModifiers:{}}),emits:yr(["click"],["update:open"]),setup(e,{emit:o}){const r=hc(e,"open"),i=e,a=o,s=Bt(()=>{if(!i.avatarImage)return!1;try{return!!new URL(i.avatarImage)}catch{return!1}}),l=Bt(()=>!!i.avatarImage),c=Bt(()=>({marginInlineStart:`${i.margin}px`})),d=Bt(()=>{if(!i.url||i.url.trim()==="")return!1;try{return!!new URL(i.url,i.url?.startsWith?.("/")?window.location.href:void 0)}catch{return E0("[NcUserBubble] Invalid URL passed",{url:i.url}),!1}}),u=Bt(()=>d.value?i.url:void 0),h=Bt(()=>d.value?"a":i.to?Cv:"div"),p=Bt(()=>({height:`${i.size}px`,lineHeight:`${i.size}px`,borderRadius:`${i.size/2}px`}));return wn([()=>i.displayName,()=>i.user],()=>{!i.displayName&&i.user}),(m,g)=>(f(),T(vo(m.$slots.default?bc:R2),{shown:r.value,"onUpdate:shown":g[1]||(g[1]=_=>r.value=_),class:"user-bubble__wrapper",trigger:"hover focus"},{trigger:S(({attrs:_})=>[(f(),T(vo(h.value),gt({class:["user-bubble__content",{"user-bubble__content--primary":e.primary}],style:p.value,to:e.to,href:u.value},_,{onClick:g[0]||(g[0]=C=>a("click",C))}),{default:S(()=>[E(Wn,{url:l.value&&s.value?e.avatarImage:void 0,iconClass:l.value&&!s.value?e.avatarImage:void 0,user:e.user,displayName:e.displayName,size:e.size-e.margin*2,style:Za(c.value),disableTooltip:"",disableMenu:"",hideStatus:!e.showUserStatus,class:"user-bubble__avatar"},null,8,["url","iconClass","user","displayName","size","style","hideStatus"]),D("span",P2,O(e.displayName||e.user),1),m.$slots.name?(f(),k("span",$2,[$t(m.$slots,"name",{},void 0,!0)])):R("",!0)]),_:3},16,["class","style","to","href"]))]),default:S(()=>[$t(m.$slots,"default",{},void 0,!0)]),_:3},40,["shown"]))}}),Ec=nn(V2,[["__scopeId","data-v-9189d023"]]);function B2(e,o){var r=0,i=0;return Float64Array.from(e,o===void 0?a=>r+=+a||0:a=>r+=+o(a,i++,e)||0)}function U2(e,o){let r;if(o===void 0)for(const i of e)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let a of e)(a=o(a,++i,e))!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}return r}function H2(e,o){let r;if(o===void 0)for(const i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let a of e)(a=o(a,++i,e))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function z2(e,o){let r=0;if(o===void 0)for(let i of e)(i=+i)&&(r+=i);else{let i=-1;for(let a of e)(a=+o(a,++i,e))&&(r+=a)}return r}var G2={value:()=>{}};function Nc(){for(var e=0,o=arguments.length,r={},i;e<o;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new na(r)}function na(e){this._=e}function F2(e,o){return e.trim().split(/^|\s+/).map(function(r){var i="",a=r.indexOf(".");if(a>=0&&(i=r.slice(a+1),r=r.slice(0,a)),r&&!o.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}na.prototype=Nc.prototype={constructor:na,on:function(e,o){var r=this._,i=F2(e+"",r),a,s=-1,l=i.length;if(arguments.length<2){for(;++s<l;)if((a=(e=i[s]).type)&&(a=Y2(r[a],e.name)))return a;return}if(o!=null&&typeof o!="function")throw new Error("invalid callback: "+o);for(;++s<l;)if(a=(e=i[s]).type)r[a]=zu(r[a],e.name,o);else if(o==null)for(a in r)r[a]=zu(r[a],e.name,null);return this},copy:function(){var e={},o=this._;for(var r in o)e[r]=o[r].slice();return new na(e)},call:function(e,o){if((a=arguments.length-2)>0)for(var r=new Array(a),i=0,a,s;i<a;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,a=s.length;i<a;++i)s[i].value.apply(o,r)},apply:function(e,o,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],a=0,s=i.length;a<s;++a)i[a].value.apply(o,r)}};function Y2(e,o){for(var r=0,i=e.length,a;r<i;++r)if((a=e[r]).name===o)return a.value}function zu(e,o,r){for(var i=0,a=e.length;i<a;++i)if(e[i].name===o){e[i]=G2,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:o,value:r}),e}var kl="http://www.w3.org/1999/xhtml";const Gu={svg:"http://www.w3.org/2000/svg",xhtml:kl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function os(e){var o=e+="",r=o.indexOf(":");return r>=0&&(o=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Gu.hasOwnProperty(o)?{space:Gu[o],local:e}:e}function X2(e){return function(){var o=this.ownerDocument,r=this.namespaceURI;return r===kl&&o.documentElement.namespaceURI===kl?o.createElement(e):o.createElementNS(r,e)}}function j2(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ef(e){var o=os(e);return(o.local?j2:X2)(o)}function W2(){}function Tc(e){return e==null?W2:function(){return this.querySelector(e)}}function q2(e){typeof e!="function"&&(e=Tc(e));for(var o=this._groups,r=o.length,i=new Array(r),a=0;a<r;++a)for(var s=o[a],l=s.length,c=i[a]=new Array(l),d,u,h=0;h<l;++h)(d=s[h])&&(u=e.call(d,d.__data__,h,s))&&("__data__"in d&&(u.__data__=d.__data__),c[h]=u);return new je(i,this._parents)}function Z2(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function J2(){return[]}function nf(e){return e==null?J2:function(){return this.querySelectorAll(e)}}function K2(e){return function(){return Z2(e.apply(this,arguments))}}function Q2(e){typeof e=="function"?e=K2(e):e=nf(e);for(var o=this._groups,r=o.length,i=[],a=[],s=0;s<r;++s)for(var l=o[s],c=l.length,d,u=0;u<c;++u)(d=l[u])&&(i.push(e.call(d,d.__data__,u,l)),a.push(d));return new je(i,a)}function of(e){return function(){return this.matches(e)}}function rf(e){return function(o){return o.matches(e)}}var tb=Array.prototype.find;function eb(e){return function(){return tb.call(this.children,e)}}function nb(){return this.firstElementChild}function ob(e){return this.select(e==null?nb:eb(typeof e=="function"?e:rf(e)))}var rb=Array.prototype.filter;function ib(){return Array.from(this.children)}function ab(e){return function(){return rb.call(this.children,e)}}function sb(e){return this.selectAll(e==null?ib:ab(typeof e=="function"?e:rf(e)))}function lb(e){typeof e!="function"&&(e=of(e));for(var o=this._groups,r=o.length,i=new Array(r),a=0;a<r;++a)for(var s=o[a],l=s.length,c=i[a]=[],d,u=0;u<l;++u)(d=s[u])&&e.call(d,d.__data__,u,s)&&c.push(d);return new je(i,this._parents)}function af(e){return new Array(e.length)}function cb(){return new je(this._enter||this._groups.map(af),this._parents)}function ka(e,o){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=o}ka.prototype={constructor:ka,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,o){return this._parent.insertBefore(e,o)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function db(e){return function(){return e}}function ub(e,o,r,i,a,s){for(var l=0,c,d=o.length,u=s.length;l<u;++l)(c=o[l])?(c.__data__=s[l],i[l]=c):r[l]=new ka(e,s[l]);for(;l<d;++l)(c=o[l])&&(a[l]=c)}function hb(e,o,r,i,a,s,l){var c,d,u=new Map,h=o.length,p=s.length,m=new Array(h),g;for(c=0;c<h;++c)(d=o[c])&&(m[c]=g=l.call(d,d.__data__,c,o)+"",u.has(g)?a[c]=d:u.set(g,d));for(c=0;c<p;++c)g=l.call(e,s[c],c,s)+"",(d=u.get(g))?(i[c]=d,d.__data__=s[c],u.delete(g)):r[c]=new ka(e,s[c]);for(c=0;c<h;++c)(d=o[c])&&u.get(m[c])===d&&(a[c]=d)}function pb(e){return e.__data__}function fb(e,o){if(!arguments.length)return Array.from(this,pb);var r=o?hb:ub,i=this._parents,a=this._groups;typeof e!="function"&&(e=db(e));for(var s=a.length,l=new Array(s),c=new Array(s),d=new Array(s),u=0;u<s;++u){var h=i[u],p=a[u],m=p.length,g=mb(e.call(h,h&&h.__data__,u,i)),_=g.length,C=c[u]=new Array(_),M=l[u]=new Array(_),N=d[u]=new Array(m);r(h,p,C,M,N,g,o);for(var P=0,V=0,K,X;P<_;++P)if(K=C[P]){for(P>=V&&(V=P+1);!(X=M[V])&&++V<_;);K._next=X||null}}return l=new je(l,i),l._enter=c,l._exit=d,l}function mb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function gb(){return new je(this._exit||this._groups.map(af),this._parents)}function yb(e,o,r){var i=this.enter(),a=this,s=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),o!=null&&(a=o(a),a&&(a=a.selection())),r==null?s.remove():r(s),i&&a?i.merge(a).order():a}function vb(e){for(var o=e.selection?e.selection():e,r=this._groups,i=o._groups,a=r.length,s=i.length,l=Math.min(a,s),c=new Array(a),d=0;d<l;++d)for(var u=r[d],h=i[d],p=u.length,m=c[d]=new Array(p),g,_=0;_<p;++_)(g=u[_]||h[_])&&(m[_]=g);for(;d<a;++d)c[d]=r[d];return new je(c,this._parents)}function bb(){for(var e=this._groups,o=-1,r=e.length;++o<r;)for(var i=e[o],a=i.length-1,s=i[a],l;--a>=0;)(l=i[a])&&(s&&l.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(l,s),s=l);return this}function _b(e){e||(e=Cb);function o(p,m){return p&&m?e(p.__data__,m.__data__):!p-!m}for(var r=this._groups,i=r.length,a=new Array(i),s=0;s<i;++s){for(var l=r[s],c=l.length,d=a[s]=new Array(c),u,h=0;h<c;++h)(u=l[h])&&(d[h]=u);d.sort(o)}return new je(a,this._parents).order()}function Cb(e,o){return e<o?-1:e>o?1:e>=o?0:NaN}function wb(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function kb(){return Array.from(this)}function Sb(){for(var e=this._groups,o=0,r=e.length;o<r;++o)for(var i=e[o],a=0,s=i.length;a<s;++a){var l=i[a];if(l)return l}return null}function xb(){let e=0;for(const o of this)++e;return e}function Ab(){return!this.node()}function Eb(e){for(var o=this._groups,r=0,i=o.length;r<i;++r)for(var a=o[r],s=0,l=a.length,c;s<l;++s)(c=a[s])&&e.call(c,c.__data__,s,a);return this}function Nb(e){return function(){this.removeAttribute(e)}}function Tb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Mb(e,o){return function(){this.setAttribute(e,o)}}function Ib(e,o){return function(){this.setAttributeNS(e.space,e.local,o)}}function Ob(e,o){return function(){var r=o.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Lb(e,o){return function(){var r=o.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function Db(e,o){var r=os(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((o==null?r.local?Tb:Nb:typeof o=="function"?r.local?Lb:Ob:r.local?Ib:Mb)(r,o))}function sf(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Rb(e){return function(){this.style.removeProperty(e)}}function Pb(e,o,r){return function(){this.style.setProperty(e,o,r)}}function $b(e,o,r){return function(){var i=o.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Vb(e,o,r){return arguments.length>1?this.each((o==null?Rb:typeof o=="function"?$b:Pb)(e,o,r??"")):wr(this.node(),e)}function wr(e,o){return e.style.getPropertyValue(o)||sf(e).getComputedStyle(e,null).getPropertyValue(o)}function Bb(e){return function(){delete this[e]}}function Ub(e,o){return function(){this[e]=o}}function Hb(e,o){return function(){var r=o.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function zb(e,o){return arguments.length>1?this.each((o==null?Bb:typeof o=="function"?Hb:Ub)(e,o)):this.node()[e]}function lf(e){return e.trim().split(/^|\s+/)}function Mc(e){return e.classList||new cf(e)}function cf(e){this._node=e,this._names=lf(e.getAttribute("class")||"")}cf.prototype={add:function(e){var o=this._names.indexOf(e);o<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var o=this._names.indexOf(e);o>=0&&(this._names.splice(o,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function df(e,o){for(var r=Mc(e),i=-1,a=o.length;++i<a;)r.add(o[i])}function uf(e,o){for(var r=Mc(e),i=-1,a=o.length;++i<a;)r.remove(o[i])}function Gb(e){return function(){df(this,e)}}function Fb(e){return function(){uf(this,e)}}function Yb(e,o){return function(){(o.apply(this,arguments)?df:uf)(this,e)}}function Xb(e,o){var r=lf(e+"");if(arguments.length<2){for(var i=Mc(this.node()),a=-1,s=r.length;++a<s;)if(!i.contains(r[a]))return!1;return!0}return this.each((typeof o=="function"?Yb:o?Gb:Fb)(r,o))}function jb(){this.textContent=""}function Wb(e){return function(){this.textContent=e}}function qb(e){return function(){var o=e.apply(this,arguments);this.textContent=o??""}}function Zb(e){return arguments.length?this.each(e==null?jb:(typeof e=="function"?qb:Wb)(e)):this.node().textContent}function Jb(){this.innerHTML=""}function Kb(e){return function(){this.innerHTML=e}}function Qb(e){return function(){var o=e.apply(this,arguments);this.innerHTML=o??""}}function t_(e){return arguments.length?this.each(e==null?Jb:(typeof e=="function"?Qb:Kb)(e)):this.node().innerHTML}function e_(){this.nextSibling&&this.parentNode.appendChild(this)}function n_(){return this.each(e_)}function o_(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function r_(){return this.each(o_)}function i_(e){var o=typeof e=="function"?e:ef(e);return this.select(function(){return this.appendChild(o.apply(this,arguments))})}function a_(){return null}function s_(e,o){var r=typeof e=="function"?e:ef(e),i=o==null?a_:typeof o=="function"?o:Tc(o);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function l_(){var e=this.parentNode;e&&e.removeChild(this)}function c_(){return this.each(l_)}function d_(){var e=this.cloneNode(!1),o=this.parentNode;return o?o.insertBefore(e,this.nextSibling):e}function u_(){var e=this.cloneNode(!0),o=this.parentNode;return o?o.insertBefore(e,this.nextSibling):e}function h_(e){return this.select(e?u_:d_)}function p_(e){return arguments.length?this.property("__data__",e):this.node().__data__}function f_(e){return function(o){e.call(this,o,this.__data__)}}function m_(e){return e.trim().split(/^|\s+/).map(function(o){var r="",i=o.indexOf(".");return i>=0&&(r=o.slice(i+1),o=o.slice(0,i)),{type:o,name:r}})}function g_(e){return function(){var o=this.__on;if(o){for(var r=0,i=-1,a=o.length,s;r<a;++r)s=o[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):o[++i]=s;++i?o.length=i:delete this.__on}}}function y_(e,o,r){return function(){var i=this.__on,a,s=f_(o);if(i){for(var l=0,c=i.length;l<c;++l)if((a=i[l]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=s,a.options=r),a.value=o;return}}this.addEventListener(e.type,s,r),a={type:e.type,name:e.name,value:o,listener:s,options:r},i?i.push(a):this.__on=[a]}}function v_(e,o,r){var i=m_(e+""),a,s=i.length,l;if(arguments.length<2){var c=this.node().__on;if(c){for(var d=0,u=c.length,h;d<u;++d)for(a=0,h=c[d];a<s;++a)if((l=i[a]).type===h.type&&l.name===h.name)return h.value}return}for(c=o?y_:g_,a=0;a<s;++a)this.each(c(i[a],o,r));return this}function hf(e,o,r){var i=sf(e),a=i.CustomEvent;typeof a=="function"?a=new a(o,r):(a=i.document.createEvent("Event"),r?(a.initEvent(o,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(o,!1,!1)),e.dispatchEvent(a)}function b_(e,o){return function(){return hf(this,e,o)}}function __(e,o){return function(){return hf(this,e,o.apply(this,arguments))}}function C_(e,o){return this.each((typeof o=="function"?__:b_)(e,o))}function*w_(){for(var e=this._groups,o=0,r=e.length;o<r;++o)for(var i=e[o],a=0,s=i.length,l;a<s;++a)(l=i[a])&&(yield l)}var pf=[null];function je(e,o){this._groups=e,this._parents=o}function kr(){return new je([[document.documentElement]],pf)}function k_(){return this}je.prototype=kr.prototype={constructor:je,select:q2,selectAll:Q2,selectChild:ob,selectChildren:sb,filter:lb,data:fb,enter:cb,exit:gb,join:yb,merge:vb,selection:k_,order:bb,sort:_b,call:wb,nodes:kb,node:Sb,size:xb,empty:Ab,each:Eb,attr:Db,style:Vb,property:zb,classed:Xb,text:Zb,html:t_,raise:n_,lower:r_,append:i_,insert:s_,remove:c_,clone:h_,datum:p_,on:v_,dispatch:C_,[Symbol.iterator]:w_};function He(e){return typeof e=="string"?new je([[document.querySelector(e)]],[document.documentElement]):new je([[e]],pf)}function S_(e){let o;for(;o=e.sourceEvent;)e=o;return e}function To(e,o){if(e=S_(e),o===void 0&&(o=e.currentTarget),o){var r=o.ownerSVGElement||o;if(r.createSVGPoint){var i=r.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(o.getScreenCTM().inverse()),[i.x,i.y]}if(o.getBoundingClientRect){var a=o.getBoundingClientRect();return[e.clientX-a.left-o.clientLeft,e.clientY-a.top-o.clientTop]}}return[e.pageX,e.pageY]}const Sl={capture:!0,passive:!1};function xl(e){e.preventDefault(),e.stopImmediatePropagation()}function x_(e){var o=e.document.documentElement,r=He(e).on("dragstart.drag",xl,Sl);"onselectstart"in o?r.on("selectstart.drag",xl,Sl):(o.__noselect=o.style.MozUserSelect,o.style.MozUserSelect="none")}function A_(e,o){var r=e.document.documentElement,i=He(e).on("dragstart.drag",null);o&&(i.on("click.drag",xl,Sl),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in r?i.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}function Ic(e,o,r){e.prototype=o.prototype=r,r.constructor=e}function ff(e,o){var r=Object.create(e.prototype);for(var i in o)r[i]=o[i];return r}function xi(){}var ci=.7,Sa=1/ci,ur="\\s*([+-]?\\d+)\\s*",di="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",kn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",E_=/^#([0-9a-f]{3,8})$/,N_=new RegExp(`^rgb\\(${ur},${ur},${ur}\\)$`),T_=new RegExp(`^rgb\\(${kn},${kn},${kn}\\)$`),M_=new RegExp(`^rgba\\(${ur},${ur},${ur},${di}\\)$`),I_=new RegExp(`^rgba\\(${kn},${kn},${kn},${di}\\)$`),O_=new RegExp(`^hsl\\(${di},${kn},${kn}\\)$`),L_=new RegExp(`^hsla\\(${di},${kn},${kn},${di}\\)$`),Fu={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ic(xi,ui,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Yu,formatHex:Yu,formatHex8:D_,formatHsl:R_,formatRgb:Xu,toString:Xu});function Yu(){return this.rgb().formatHex()}function D_(){return this.rgb().formatHex8()}function R_(){return mf(this).formatHsl()}function Xu(){return this.rgb().formatRgb()}function ui(e){var o,r;return e=(e+"").trim().toLowerCase(),(o=E_.exec(e))?(r=o[1].length,o=parseInt(o[1],16),r===6?ju(o):r===3?new ze(o>>8&15|o>>4&240,o>>4&15|o&240,(o&15)<<4|o&15,1):r===8?$i(o>>24&255,o>>16&255,o>>8&255,(o&255)/255):r===4?$i(o>>12&15|o>>8&240,o>>8&15|o>>4&240,o>>4&15|o&240,((o&15)<<4|o&15)/255):null):(o=N_.exec(e))?new ze(o[1],o[2],o[3],1):(o=T_.exec(e))?new ze(o[1]*255/100,o[2]*255/100,o[3]*255/100,1):(o=M_.exec(e))?$i(o[1],o[2],o[3],o[4]):(o=I_.exec(e))?$i(o[1]*255/100,o[2]*255/100,o[3]*255/100,o[4]):(o=O_.exec(e))?Zu(o[1],o[2]/100,o[3]/100,1):(o=L_.exec(e))?Zu(o[1],o[2]/100,o[3]/100,o[4]):Fu.hasOwnProperty(e)?ju(Fu[e]):e==="transparent"?new ze(NaN,NaN,NaN,0):null}function ju(e){return new ze(e>>16&255,e>>8&255,e&255,1)}function $i(e,o,r,i){return i<=0&&(e=o=r=NaN),new ze(e,o,r,i)}function P_(e){return e instanceof xi||(e=ui(e)),e?(e=e.rgb(),new ze(e.r,e.g,e.b,e.opacity)):new ze}function Al(e,o,r,i){return arguments.length===1?P_(e):new ze(e,o,r,i??1)}function ze(e,o,r,i){this.r=+e,this.g=+o,this.b=+r,this.opacity=+i}Ic(ze,Al,ff(xi,{brighter(e){return e=e==null?Sa:Math.pow(Sa,e),new ze(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ci:Math.pow(ci,e),new ze(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ze(Uo(this.r),Uo(this.g),Uo(this.b),xa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Wu,formatHex:Wu,formatHex8:$_,formatRgb:qu,toString:qu}));function Wu(){return`#${Ro(this.r)}${Ro(this.g)}${Ro(this.b)}`}function $_(){return`#${Ro(this.r)}${Ro(this.g)}${Ro(this.b)}${Ro((isNaN(this.opacity)?1:this.opacity)*255)}`}function qu(){const e=xa(this.opacity);return`${e===1?"rgb(":"rgba("}${Uo(this.r)}, ${Uo(this.g)}, ${Uo(this.b)}${e===1?")":`, ${e})`}`}function xa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Uo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ro(e){return e=Uo(e),(e<16?"0":"")+e.toString(16)}function Zu(e,o,r,i){return i<=0?e=o=r=NaN:r<=0||r>=1?e=o=NaN:o<=0&&(e=NaN),new ln(e,o,r,i)}function mf(e){if(e instanceof ln)return new ln(e.h,e.s,e.l,e.opacity);if(e instanceof xi||(e=ui(e)),!e)return new ln;if(e instanceof ln)return e;e=e.rgb();var o=e.r/255,r=e.g/255,i=e.b/255,a=Math.min(o,r,i),s=Math.max(o,r,i),l=NaN,c=s-a,d=(s+a)/2;return c?(o===s?l=(r-i)/c+(r<i)*6:r===s?l=(i-o)/c+2:l=(o-r)/c+4,c/=d<.5?s+a:2-s-a,l*=60):c=d>0&&d<1?0:l,new ln(l,c,d,e.opacity)}function V_(e,o,r,i){return arguments.length===1?mf(e):new ln(e,o,r,i??1)}function ln(e,o,r,i){this.h=+e,this.s=+o,this.l=+r,this.opacity=+i}Ic(ln,V_,ff(xi,{brighter(e){return e=e==null?Sa:Math.pow(Sa,e),new ln(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ci:Math.pow(ci,e),new ln(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,o=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*o,a=2*r-i;return new ze(Ys(e>=240?e-240:e+120,a,i),Ys(e,a,i),Ys(e<120?e+240:e-120,a,i),this.opacity)},clamp(){return new ln(Ju(this.h),Vi(this.s),Vi(this.l),xa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=xa(this.opacity);return`${e===1?"hsl(":"hsla("}${Ju(this.h)}, ${Vi(this.s)*100}%, ${Vi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ju(e){return e=(e||0)%360,e<0?e+360:e}function Vi(e){return Math.max(0,Math.min(1,e||0))}function Ys(e,o,r){return(e<60?o+(r-o)*e/60:e<180?r:e<240?o+(r-o)*(240-e)/60:o)*255}const gf=e=>()=>e;function B_(e,o){return function(r){return e+r*o}}function U_(e,o,r){return e=Math.pow(e,r),o=Math.pow(o,r)-e,r=1/r,function(i){return Math.pow(e+i*o,r)}}function H_(e){return(e=+e)==1?yf:function(o,r){return r-o?U_(o,r,e):gf(isNaN(o)?r:o)}}function yf(e,o){var r=o-e;return r?B_(e,r):gf(isNaN(e)?o:e)}const Ku=(function e(o){var r=H_(o);function i(a,s){var l=r((a=Al(a)).r,(s=Al(s)).r),c=r(a.g,s.g),d=r(a.b,s.b),u=yf(a.opacity,s.opacity);return function(h){return a.r=l(h),a.g=c(h),a.b=d(h),a.opacity=u(h),a+""}}return i.gamma=e,i})(1);function ao(e,o){return e=+e,o=+o,function(r){return e*(1-r)+o*r}}var El=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xs=new RegExp(El.source,"g");function z_(e){return function(){return e}}function G_(e){return function(o){return e(o)+""}}function F_(e,o){var r=El.lastIndex=Xs.lastIndex=0,i,a,s,l=-1,c=[],d=[];for(e=e+"",o=o+"";(i=El.exec(e))&&(a=Xs.exec(o));)(s=a.index)>r&&(s=o.slice(r,s),c[l]?c[l]+=s:c[++l]=s),(i=i[0])===(a=a[0])?c[l]?c[l]+=a:c[++l]=a:(c[++l]=null,d.push({i:l,x:ao(i,a)})),r=Xs.lastIndex;return r<o.length&&(s=o.slice(r),c[l]?c[l]+=s:c[++l]=s),c.length<2?d[0]?G_(d[0].x):z_(o):(o=d.length,function(u){for(var h=0,p;h<o;++h)c[(p=d[h]).i]=p.x(u);return c.join("")})}var Qu=180/Math.PI,vf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function bf(e,o,r,i,a,s){var l,c,d;return(l=Math.sqrt(e*e+o*o))&&(e/=l,o/=l),(d=e*r+o*i)&&(r-=e*d,i-=o*d),(c=Math.sqrt(r*r+i*i))&&(r/=c,i/=c,d/=c),e*i<o*r&&(e=-e,o=-o,d=-d,l=-l),{translateX:a,translateY:s,rotate:Math.atan2(o,e)*Qu,skewX:Math.atan(d)*Qu,scaleX:l,scaleY:c}}var Bi;function Y_(e){const o=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return o.isIdentity?vf:bf(o.a,o.b,o.c,o.d,o.e,o.f)}function X_(e){return e==null||(Bi||(Bi=document.createElementNS("http://www.w3.org/2000/svg","g")),Bi.setAttribute("transform",e),!(e=Bi.transform.baseVal.consolidate()))?vf:(e=e.matrix,bf(e.a,e.b,e.c,e.d,e.e,e.f))}function _f(e,o,r,i){function a(u){return u.length?u.pop()+" ":""}function s(u,h,p,m,g,_){if(u!==p||h!==m){var C=g.push("translate(",null,o,null,r);_.push({i:C-4,x:ao(u,p)},{i:C-2,x:ao(h,m)})}else(p||m)&&g.push("translate("+p+o+m+r)}function l(u,h,p,m){u!==h?(u-h>180?h+=360:h-u>180&&(u+=360),m.push({i:p.push(a(p)+"rotate(",null,i)-2,x:ao(u,h)})):h&&p.push(a(p)+"rotate("+h+i)}function c(u,h,p,m){u!==h?m.push({i:p.push(a(p)+"skewX(",null,i)-2,x:ao(u,h)}):h&&p.push(a(p)+"skewX("+h+i)}function d(u,h,p,m,g,_){if(u!==p||h!==m){var C=g.push(a(g)+"scale(",null,",",null,")");_.push({i:C-4,x:ao(u,p)},{i:C-2,x:ao(h,m)})}else(p!==1||m!==1)&&g.push(a(g)+"scale("+p+","+m+")")}return function(u,h){var p=[],m=[];return u=e(u),h=e(h),s(u.translateX,u.translateY,h.translateX,h.translateY,p,m),l(u.rotate,h.rotate,p,m),c(u.skewX,h.skewX,p,m),d(u.scaleX,u.scaleY,h.scaleX,h.scaleY,p,m),u=h=null,function(g){for(var _=-1,C=m.length,M;++_<C;)p[(M=m[_]).i]=M.x(g);return p.join("")}}}var j_=_f(Y_,"px, ","px)","deg)"),W_=_f(X_,", ",")",")"),q_=1e-12;function th(e){return((e=Math.exp(e))+1/e)/2}function Z_(e){return((e=Math.exp(e))-1/e)/2}function J_(e){return((e=Math.exp(2*e))-1)/(e+1)}const K_=(function e(o,r,i){function a(s,l){var c=s[0],d=s[1],u=s[2],h=l[0],p=l[1],m=l[2],g=h-c,_=p-d,C=g*g+_*_,M,N;if(C<q_)N=Math.log(m/u)/o,M=function(pt){return[c+pt*g,d+pt*_,u*Math.exp(o*pt*N)]};else{var P=Math.sqrt(C),V=(m*m-u*u+i*C)/(2*u*r*P),K=(m*m-u*u-i*C)/(2*m*r*P),X=Math.log(Math.sqrt(V*V+1)-V),rt=Math.log(Math.sqrt(K*K+1)-K);N=(rt-X)/o,M=function(pt){var it=pt*N,et=th(X),ut=u/(r*P)*(et*J_(o*it+X)-Z_(X));return[c+ut*g,d+ut*_,u*et/th(o*it+X)]}}return M.duration=N*1e3*o/Math.SQRT2,M}return a.rho=function(s){var l=Math.max(.001,+s),c=l*l,d=c*c;return e(l,c,d)},a})(Math.SQRT2,2,4);var Sr=0,Kr=0,Fr=0,Cf=1e3,Aa,Qr,Ea=0,Xo=0,rs=0,hi=typeof performance=="object"&&performance.now?performance:Date,wf=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Oc(){return Xo||(wf(Q_),Xo=hi.now()+rs)}function Q_(){Xo=0}function Na(){this._call=this._time=this._next=null}Na.prototype=kf.prototype={constructor:Na,restart:function(e,o,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Oc():+r)+(o==null?0:+o),!this._next&&Qr!==this&&(Qr?Qr._next=this:Aa=this,Qr=this),this._call=e,this._time=r,Nl()},stop:function(){this._call&&(this._call=null,this._time=1/0,Nl())}};function kf(e,o,r){var i=new Na;return i.restart(e,o,r),i}function tC(){Oc(),++Sr;for(var e=Aa,o;e;)(o=Xo-e._time)>=0&&e._call.call(void 0,o),e=e._next;--Sr}function eh(){Xo=(Ea=hi.now())+rs,Sr=Kr=0;try{tC()}finally{Sr=0,nC(),Xo=0}}function eC(){var e=hi.now(),o=e-Ea;o>Cf&&(rs-=o,Ea=e)}function nC(){for(var e,o=Aa,r,i=1/0;o;)o._call?(i>o._time&&(i=o._time),e=o,o=o._next):(r=o._next,o._next=null,o=e?e._next=r:Aa=r);Qr=e,Nl(i)}function Nl(e){if(!Sr){Kr&&(Kr=clearTimeout(Kr));var o=e-Xo;o>24?(e<1/0&&(Kr=setTimeout(eh,e-hi.now()-rs)),Fr&&(Fr=clearInterval(Fr))):(Fr||(Ea=hi.now(),Fr=setInterval(eC,Cf)),Sr=1,wf(eh))}}function nh(e,o,r){var i=new Na;return o=o==null?0:+o,i.restart(a=>{i.stop(),e(a+o)},o,r),i}var oC=Nc("start","end","cancel","interrupt"),rC=[],Sf=0,oh=1,Tl=2,oa=3,rh=4,Ml=5,ra=6;function is(e,o,r,i,a,s){var l=e.__transition;if(!l)e.__transition={};else if(r in l)return;iC(e,r,{name:o,index:i,group:a,on:oC,tween:rC,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Sf})}function Lc(e,o){var r=mn(e,o);if(r.state>Sf)throw new Error("too late; already scheduled");return r}function An(e,o){var r=mn(e,o);if(r.state>oa)throw new Error("too late; already running");return r}function mn(e,o){var r=e.__transition;if(!r||!(r=r[o]))throw new Error("transition not found");return r}function iC(e,o,r){var i=e.__transition,a;i[o]=r,r.timer=kf(s,0,r.time);function s(u){r.state=oh,r.timer.restart(l,r.delay,r.time),r.delay<=u&&l(u-r.delay)}function l(u){var h,p,m,g;if(r.state!==oh)return d();for(h in i)if(g=i[h],g.name===r.name){if(g.state===oa)return nh(l);g.state===rh?(g.state=ra,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete i[h]):+h<o&&(g.state=ra,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete i[h])}if(nh(function(){r.state===oa&&(r.state=rh,r.timer.restart(c,r.delay,r.time),c(u))}),r.state=Tl,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Tl){for(r.state=oa,a=new Array(m=r.tween.length),h=0,p=-1;h<m;++h)(g=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(a[++p]=g);a.length=p+1}}function c(u){for(var h=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(d),r.state=Ml,1),p=-1,m=a.length;++p<m;)a[p].call(e,h);r.state===Ml&&(r.on.call("end",e,e.__data__,r.index,r.group),d())}function d(){r.state=ra,r.timer.stop(),delete i[o];for(var u in i)return;delete e.__transition}}function ia(e,o){var r=e.__transition,i,a,s=!0,l;if(r){o=o==null?null:o+"";for(l in r){if((i=r[l]).name!==o){s=!1;continue}a=i.state>Tl&&i.state<Ml,i.state=ra,i.timer.stop(),i.on.call(a?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[l]}s&&delete e.__transition}}function aC(e){return this.each(function(){ia(this,e)})}function sC(e,o){var r,i;return function(){var a=An(this,e),s=a.tween;if(s!==r){i=r=s;for(var l=0,c=i.length;l<c;++l)if(i[l].name===o){i=i.slice(),i.splice(l,1);break}}a.tween=i}}function lC(e,o,r){var i,a;if(typeof r!="function")throw new Error;return function(){var s=An(this,e),l=s.tween;if(l!==i){a=(i=l).slice();for(var c={name:o,value:r},d=0,u=a.length;d<u;++d)if(a[d].name===o){a[d]=c;break}d===u&&a.push(c)}s.tween=a}}function cC(e,o){var r=this._id;if(e+="",arguments.length<2){for(var i=mn(this.node(),r).tween,a=0,s=i.length,l;a<s;++a)if((l=i[a]).name===e)return l.value;return null}return this.each((o==null?sC:lC)(r,e,o))}function Dc(e,o,r){var i=e._id;return e.each(function(){var a=An(this,i);(a.value||(a.value={}))[o]=r.apply(this,arguments)}),function(a){return mn(a,i).value[o]}}function xf(e,o){var r;return(typeof o=="number"?ao:o instanceof ui?Ku:(r=ui(o))?(o=r,Ku):F_)(e,o)}function dC(e){return function(){this.removeAttribute(e)}}function uC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function hC(e,o,r){var i,a=r+"",s;return function(){var l=this.getAttribute(e);return l===a?null:l===i?s:s=o(i=l,r)}}function pC(e,o,r){var i,a=r+"",s;return function(){var l=this.getAttributeNS(e.space,e.local);return l===a?null:l===i?s:s=o(i=l,r)}}function fC(e,o,r){var i,a,s;return function(){var l,c=r(this),d;return c==null?void this.removeAttribute(e):(l=this.getAttribute(e),d=c+"",l===d?null:l===i&&d===a?s:(a=d,s=o(i=l,c)))}}function mC(e,o,r){var i,a,s;return function(){var l,c=r(this),d;return c==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),d=c+"",l===d?null:l===i&&d===a?s:(a=d,s=o(i=l,c)))}}function gC(e,o){var r=os(e),i=r==="transform"?W_:xf;return this.attrTween(e,typeof o=="function"?(r.local?mC:fC)(r,i,Dc(this,"attr."+e,o)):o==null?(r.local?uC:dC)(r):(r.local?pC:hC)(r,i,o))}function yC(e,o){return function(r){this.setAttribute(e,o.call(this,r))}}function vC(e,o){return function(r){this.setAttributeNS(e.space,e.local,o.call(this,r))}}function bC(e,o){var r,i;function a(){var s=o.apply(this,arguments);return s!==i&&(r=(i=s)&&vC(e,s)),r}return a._value=o,a}function _C(e,o){var r,i;function a(){var s=o.apply(this,arguments);return s!==i&&(r=(i=s)&&yC(e,s)),r}return a._value=o,a}function CC(e,o){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(o==null)return this.tween(r,null);if(typeof o!="function")throw new Error;var i=os(e);return this.tween(r,(i.local?bC:_C)(i,o))}function wC(e,o){return function(){Lc(this,e).delay=+o.apply(this,arguments)}}function kC(e,o){return o=+o,function(){Lc(this,e).delay=o}}function SC(e){var o=this._id;return arguments.length?this.each((typeof e=="function"?wC:kC)(o,e)):mn(this.node(),o).delay}function xC(e,o){return function(){An(this,e).duration=+o.apply(this,arguments)}}function AC(e,o){return o=+o,function(){An(this,e).duration=o}}function EC(e){var o=this._id;return arguments.length?this.each((typeof e=="function"?xC:AC)(o,e)):mn(this.node(),o).duration}function NC(e,o){if(typeof o!="function")throw new Error;return function(){An(this,e).ease=o}}function TC(e){var o=this._id;return arguments.length?this.each(NC(o,e)):mn(this.node(),o).ease}function MC(e,o){return function(){var r=o.apply(this,arguments);if(typeof r!="function")throw new Error;An(this,e).ease=r}}function IC(e){if(typeof e!="function")throw new Error;return this.each(MC(this._id,e))}function LC(e){typeof e!="function"&&(e=of(e));for(var o=this._groups,r=o.length,i=new Array(r),a=0;a<r;++a)for(var s=o[a],l=s.length,c=i[a]=[],d,u=0;u<l;++u)(d=s[u])&&e.call(d,d.__data__,u,s)&&c.push(d);return new Xn(i,this._parents,this._name,this._id)}function DC(e){if(e._id!==this._id)throw new Error;for(var o=this._groups,r=e._groups,i=o.length,a=r.length,s=Math.min(i,a),l=new Array(i),c=0;c<s;++c)for(var d=o[c],u=r[c],h=d.length,p=l[c]=new Array(h),m,g=0;g<h;++g)(m=d[g]||u[g])&&(p[g]=m);for(;c<i;++c)l[c]=o[c];return new Xn(l,this._parents,this._name,this._id)}function RC(e){return(e+"").trim().split(/^|\s+/).every(function(o){var r=o.indexOf(".");return r>=0&&(o=o.slice(0,r)),!o||o==="start"})}function PC(e,o,r){var i,a,s=RC(o)?Lc:An;return function(){var l=s(this,e),c=l.on;c!==i&&(a=(i=c).copy()).on(o,r),l.on=a}}function $C(e,o){var r=this._id;return arguments.length<2?mn(this.node(),r).on.on(e):this.each(PC(r,e,o))}function VC(e){return function(){var o=this.parentNode;for(var r in this.__transition)if(+r!==e)return;o&&o.removeChild(this)}}function BC(){return this.on("end.remove",VC(this._id))}function UC(e){var o=this._name,r=this._id;typeof e!="function"&&(e=Tc(e));for(var i=this._groups,a=i.length,s=new Array(a),l=0;l<a;++l)for(var c=i[l],d=c.length,u=s[l]=new Array(d),h,p,m=0;m<d;++m)(h=c[m])&&(p=e.call(h,h.__data__,m,c))&&("__data__"in h&&(p.__data__=h.__data__),u[m]=p,is(u[m],o,r,m,u,mn(h,r)));return new Xn(s,this._parents,o,r)}function HC(e){var o=this._name,r=this._id;typeof e!="function"&&(e=nf(e));for(var i=this._groups,a=i.length,s=[],l=[],c=0;c<a;++c)for(var d=i[c],u=d.length,h,p=0;p<u;++p)if(h=d[p]){for(var m=e.call(h,h.__data__,p,d),g,_=mn(h,r),C=0,M=m.length;C<M;++C)(g=m[C])&&is(g,o,r,C,m,_);s.push(m),l.push(h)}return new Xn(s,l,o,r)}var zC=kr.prototype.constructor;function GC(){return new zC(this._groups,this._parents)}function FC(e,o){var r,i,a;return function(){var s=wr(this,e),l=(this.style.removeProperty(e),wr(this,e));return s===l?null:s===r&&l===i?a:a=o(r=s,i=l)}}function Af(e){return function(){this.style.removeProperty(e)}}function YC(e,o,r){var i,a=r+"",s;return function(){var l=wr(this,e);return l===a?null:l===i?s:s=o(i=l,r)}}function XC(e,o,r){var i,a,s;return function(){var l=wr(this,e),c=r(this),d=c+"";return c==null&&(d=c=(this.style.removeProperty(e),wr(this,e))),l===d?null:l===i&&d===a?s:(a=d,s=o(i=l,c))}}function jC(e,o){var r,i,a,s="style."+o,l="end."+s,c;return function(){var d=An(this,e),u=d.on,h=d.value[s]==null?c||(c=Af(o)):void 0;(u!==r||a!==h)&&(i=(r=u).copy()).on(l,a=h),d.on=i}}function WC(e,o,r){var i=(e+="")=="transform"?j_:xf;return o==null?this.styleTween(e,FC(e,i)).on("end.style."+e,Af(e)):typeof o=="function"?this.styleTween(e,XC(e,i,Dc(this,"style."+e,o))).each(jC(this._id,e)):this.styleTween(e,YC(e,i,o),r).on("end.style."+e,null)}function qC(e,o,r){return function(i){this.style.setProperty(e,o.call(this,i),r)}}function ZC(e,o,r){var i,a;function s(){var l=o.apply(this,arguments);return l!==a&&(i=(a=l)&&qC(e,l,r)),i}return s._value=o,s}function JC(e,o,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(o==null)return this.tween(i,null);if(typeof o!="function")throw new Error;return this.tween(i,ZC(e,o,r??""))}function KC(e){return function(){this.textContent=e}}function QC(e){return function(){var o=e(this);this.textContent=o??""}}function tw(e){return this.tween("text",typeof e=="function"?QC(Dc(this,"text",e)):KC(e==null?"":e+""))}function ew(e){return function(o){this.textContent=e.call(this,o)}}function nw(e){var o,r;function i(){var a=e.apply(this,arguments);return a!==r&&(o=(r=a)&&ew(a)),o}return i._value=e,i}function ow(e){var o="text";if(arguments.length<1)return(o=this.tween(o))&&o._value;if(e==null)return this.tween(o,null);if(typeof e!="function")throw new Error;return this.tween(o,nw(e))}function rw(){for(var e=this._name,o=this._id,r=Ef(),i=this._groups,a=i.length,s=0;s<a;++s)for(var l=i[s],c=l.length,d,u=0;u<c;++u)if(d=l[u]){var h=mn(d,o);is(d,e,r,u,l,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Xn(i,this._parents,e,r)}function iw(){var e,o,r=this,i=r._id,a=r.size();return new Promise(function(s,l){var c={value:l},d={value:function(){--a===0&&s()}};r.each(function(){var u=An(this,i),h=u.on;h!==e&&(o=(e=h).copy(),o._.cancel.push(c),o._.interrupt.push(c),o._.end.push(d)),u.on=o}),a===0&&s()})}var aw=0;function Xn(e,o,r,i){this._groups=e,this._parents=o,this._name=r,this._id=i}function Ef(){return++aw}var In=kr.prototype;Xn.prototype={constructor:Xn,select:UC,selectAll:HC,selectChild:In.selectChild,selectChildren:In.selectChildren,filter:LC,merge:DC,selection:GC,transition:rw,call:In.call,nodes:In.nodes,node:In.node,size:In.size,empty:In.empty,each:In.each,on:$C,attr:gC,attrTween:CC,style:WC,styleTween:JC,text:tw,textTween:ow,remove:BC,tween:cC,delay:SC,duration:EC,ease:TC,easeVarying:IC,end:iw,[Symbol.iterator]:In[Symbol.iterator]};function sw(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var lw={time:null,delay:0,duration:250,ease:sw};function cw(e,o){for(var r;!(r=e.__transition)||!(r=r[o]);)if(!(e=e.parentNode))throw new Error(`transition ${o} not found`);return r}function dw(e){var o,r;e instanceof Xn?(o=e._id,e=e._name):(o=Ef(),(r=lw).time=Oc(),e=e==null?null:e+"");for(var i=this._groups,a=i.length,s=0;s<a;++s)for(var l=i[s],c=l.length,d,u=0;u<c;++u)(d=l[u])&&is(d,e,o,u,l,r||cw(d,o));return new Xn(i,this._parents,e,o)}kr.prototype.interrupt=aC,kr.prototype.transition=dw;const Il=Math.PI,Ol=2*Il,Oo=1e-6,uw=Ol-Oo;function Ll(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Nf(){return new Ll}Ll.prototype=Nf.prototype={constructor:Ll,moveTo:function(e,o){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+o)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,o){this._+="L"+(this._x1=+e)+","+(this._y1=+o)},quadraticCurveTo:function(e,o,r,i){this._+="Q"+ +e+","+ +o+","+(this._x1=+r)+","+(this._y1=+i)},bezierCurveTo:function(e,o,r,i,a,s){this._+="C"+ +e+","+ +o+","+ +r+","+ +i+","+(this._x1=+a)+","+(this._y1=+s)},arcTo:function(e,o,r,i,a){e=+e,o=+o,r=+r,i=+i,a=+a;var s=this._x1,l=this._y1,c=r-e,d=i-o,u=s-e,h=l-o,p=u*u+h*h;if(a<0)throw new Error("negative radius: "+a);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=o);else if(p>Oo)if(!(Math.abs(h*c-d*u)>Oo)||!a)this._+="L"+(this._x1=e)+","+(this._y1=o);else{var m=r-s,g=i-l,_=c*c+d*d,C=m*m+g*g,M=Math.sqrt(_),N=Math.sqrt(p),P=a*Math.tan((Il-Math.acos((_+p-C)/(2*M*N)))/2),V=P/N,K=P/M;Math.abs(V-1)>Oo&&(this._+="L"+(e+V*u)+","+(o+V*h)),this._+="A"+a+","+a+",0,0,"+ +(h*m>u*g)+","+(this._x1=e+K*c)+","+(this._y1=o+K*d)}},arc:function(e,o,r,i,a,s){e=+e,o=+o,r=+r,s=!!s;var l=r*Math.cos(i),c=r*Math.sin(i),d=e+l,u=o+c,h=1^s,p=s?i-a:a-i;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+d+","+u:(Math.abs(this._x1-d)>Oo||Math.abs(this._y1-u)>Oo)&&(this._+="L"+d+","+u),r&&(p<0&&(p=p%Ol+Ol),p>uw?this._+="A"+r+","+r+",0,1,"+h+","+(e-l)+","+(o-c)+"A"+r+","+r+",0,1,"+h+","+(this._x1=d)+","+(this._y1=u):p>Oo&&(this._+="A"+r+","+r+",0,"+ +(p>=Il)+","+h+","+(this._x1=e+r*Math.cos(a))+","+(this._y1=o+r*Math.sin(a))))},rect:function(e,o,r,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+o)+"h"+ +r+"v"+ +i+"h"+-r+"Z"},toString:function(){return this._}};function hw(e){var o=0,r=e.children,i=r&&r.length;if(!i)o=1;else for(;--i>=0;)o+=r[i].value;e.value=o}function pw(){return this.eachAfter(hw)}function fw(e,o){let r=-1;for(const i of this)e.call(o,i,++r,this);return this}function mw(e,o){for(var r=this,i=[r],a,s,l=-1;r=i.pop();)if(e.call(o,r,++l,this),a=r.children)for(s=a.length-1;s>=0;--s)i.push(a[s]);return this}function gw(e,o){for(var r=this,i=[r],a=[],s,l,c,d=-1;r=i.pop();)if(a.push(r),s=r.children)for(l=0,c=s.length;l<c;++l)i.push(s[l]);for(;r=a.pop();)e.call(o,r,++d,this);return this}function yw(e,o){let r=-1;for(const i of this)if(e.call(o,i,++r,this))return i}function vw(e){return this.eachAfter(function(o){for(var r=+e(o.data)||0,i=o.children,a=i&&i.length;--a>=0;)r+=i[a].value;o.value=r})}function bw(e){return this.eachBefore(function(o){o.children&&o.children.sort(e)})}function _w(e){for(var o=this,r=Cw(o,e),i=[o];o!==r;)o=o.parent,i.push(o);for(var a=i.length;e!==r;)i.splice(a,0,e),e=e.parent;return i}function Cw(e,o){if(e===o)return e;var r=e.ancestors(),i=o.ancestors(),a=null;for(e=r.pop(),o=i.pop();e===o;)a=e,e=r.pop(),o=i.pop();return a}function ww(){for(var e=this,o=[e];e=e.parent;)o.push(e);return o}function kw(){return Array.from(this)}function Sw(){var e=[];return this.eachBefore(function(o){o.children||e.push(o)}),e}function xw(){var e=this,o=[];return e.each(function(r){r!==e&&o.push({source:r.parent,target:r})}),o}function*Aw(){var e=this,o,r=[e],i,a,s;do for(o=r.reverse(),r=[];e=o.pop();)if(yield e,i=e.children)for(a=0,s=i.length;a<s;++a)r.push(i[a]);while(r.length)}function Tf(e,o){e instanceof Map?(e=[void 0,e],o===void 0&&(o=Tw)):o===void 0&&(o=Nw);for(var r=new xr(e),i,a=[r],s,l,c,d;i=a.pop();)if((l=o(i.data))&&(d=(l=Array.from(l)).length))for(i.children=l,c=d-1;c>=0;--c)a.push(s=l[c]=new xr(l[c])),s.parent=i,s.depth=i.depth+1;return r.eachBefore(Mf)}function Ew(){return Tf(this).eachBefore(Mw)}function Nw(e){return e.children}function Tw(e){return Array.isArray(e)?e[1]:null}function Mw(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Mf(e){var o=0;do e.height=o;while((e=e.parent)&&e.height<++o)}function xr(e){this.data=e,this.depth=this.height=0,this.parent=null}xr.prototype=Tf.prototype={constructor:xr,count:pw,each:fw,eachAfter:gw,eachBefore:mw,find:yw,sum:vw,sort:bw,path:_w,ancestors:ww,descendants:kw,leaves:Sw,links:xw,copy:Ew,[Symbol.iterator]:Aw};function js(e){return e==null?null:Iw(e)}function Iw(e){if(typeof e!="function")throw new Error;return e}var Ow={depth:-1},ih={},Ws={};function Lw(e){return e.id}function Dw(e){return e.parentId}function Rw(){var e=Lw,o=Dw,r;function i(a){var s=Array.from(a),l=e,c=o,d,u,h,p,m,g,_,C,M=new Map;if(r!=null){const N=s.map((K,X)=>Pw(r(K,X,a))),P=N.map(ah),V=new Set(N).add("");for(const K of P)V.has(K)||(V.add(K),N.push(K),P.push(ah(K)),s.push(Ws));l=(K,X)=>N[X],c=(K,X)=>P[X]}for(h=0,d=s.length;h<d;++h)u=s[h],g=s[h]=new xr(u),(_=l(u,h,a))!=null&&(_+="")&&(C=g.id=_,M.set(C,M.has(C)?ih:g)),(_=c(u,h,a))!=null&&(_+="")&&(g.parent=_);for(h=0;h<d;++h)if(g=s[h],_=g.parent){if(m=M.get(_),!m)throw new Error("missing: "+_);if(m===ih)throw new Error("ambiguous: "+_);m.children?m.children.push(g):m.children=[g],g.parent=m}else{if(p)throw new Error("multiple roots");p=g}if(!p)throw new Error("no root");if(r!=null){for(;p.data===Ws&&p.children.length===1;)p=p.children[0],--d;for(let N=s.length-1;N>=0&&(g=s[N],g.data===Ws);--N)g.data=null}if(p.parent=Ow,p.eachBefore(function(N){N.depth=N.parent.depth+1,--d}).eachBefore(Mf),p.parent=null,d>0)throw new Error("cycle");return p}return i.id=function(a){return arguments.length?(e=js(a),i):e},i.parentId=function(a){return arguments.length?(o=js(a),i):o},i.path=function(a){return arguments.length?(r=js(a),i):r},i}function Pw(e){e=`${e}`;let o=e.length;return Dl(e,o-1)&&!Dl(e,o-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function ah(e){let o=e.length;if(o<2)return"";for(;--o>1&&!Dl(e,o););return e.slice(0,o)}function Dl(e,o){if(e[o]==="/"){let r=0;for(;o>0&&e[--o]==="\\";)++r;if((r&1)===0)return!0}return!1}function $w(e,o){return e.parent===o.parent?1:2}function qs(e){var o=e.children;return o?o[0]:e.t}function Zs(e){var o=e.children;return o?o[o.length-1]:e.t}function Vw(e,o,r){var i=r/(o.i-e.i);o.c-=i,o.s+=r,e.c+=i,o.z+=r,o.m+=r}function Bw(e){for(var o=0,r=0,i=e.children,a=i.length,s;--a>=0;)s=i[a],s.z+=o,s.m+=o,o+=s.s+(r+=s.c)}function Uw(e,o,r){return e.a.parent===o.parent?e.a:r}function aa(e,o){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=o}aa.prototype=Object.create(xr.prototype);function Hw(e){for(var o=new aa(e,0),r,i=[o],a,s,l,c;r=i.pop();)if(s=r._.children)for(r.children=new Array(c=s.length),l=c-1;l>=0;--l)i.push(a=r.children[l]=new aa(s[l],l)),a.parent=r;return(o.parent=new aa(null,0)).children=[o],o}function zw(){var e=$w,o=1,r=1,i=null;function a(u){var h=Hw(u);if(h.eachAfter(s),h.parent.m=-h.z,h.eachBefore(l),i)u.eachBefore(d);else{var p=u,m=u,g=u;u.eachBefore(function(P){P.x<p.x&&(p=P),P.x>m.x&&(m=P),P.depth>g.depth&&(g=P)});var _=p===m?1:e(p,m)/2,C=_-p.x,M=o/(m.x+_+C),N=r/(g.depth||1);u.eachBefore(function(P){P.x=(P.x+C)*M,P.y=P.depth*N})}return u}function s(u){var h=u.children,p=u.parent.children,m=u.i?p[u.i-1]:null;if(h){Bw(u);var g=(h[0].z+h[h.length-1].z)/2;m?(u.z=m.z+e(u._,m._),u.m=u.z-g):u.z=g}else m&&(u.z=m.z+e(u._,m._));u.parent.A=c(u,m,u.parent.A||p[0])}function l(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function c(u,h,p){if(h){for(var m=u,g=u,_=h,C=m.parent.children[0],M=m.m,N=g.m,P=_.m,V=C.m,K;_=Zs(_),m=qs(m),_&&m;)C=qs(C),g=Zs(g),g.a=u,K=_.z+P-m.z-M+e(_._,m._),K>0&&(Vw(Uw(_,u,p),u,K),M+=K,N+=K),P+=_.m,M+=m.m,V+=C.m,N+=g.m;_&&!Zs(g)&&(g.t=_,g.m+=P-N),m&&!qs(C)&&(C.t=m,C.m+=M-V,p=u)}return p}function d(u){u.x*=o,u.y=u.depth*r}return a.separation=function(u){return arguments.length?(e=u,a):e},a.size=function(u){return arguments.length?(i=!1,o=+u[0],r=+u[1],a):i?null:[o,r]},a.nodeSize=function(u){return arguments.length?(i=!0,o=+u[0],r=+u[1],a):i?[o,r]:null},a}function sh(e){return function(){return e}}var Gw=Array.prototype.slice;function Fw(e){return e[0]}function Yw(e){return e[1]}class Xw{constructor(o,r){this._context=o,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(o,r){switch(o=+o,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(o,r):this._context.moveTo(o,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+o)/2,this._y0,this._x0,r,o,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,o,this._y0,o,r);break}}this._x0=o,this._y0=r}}function jw(e){return new Xw(e,!0)}function Ww(e){return e.source}function qw(e){return e.target}function Zw(e){let o=Ww,r=qw,i=Fw,a=Yw,s=null,l=null;function c(){let d;const u=Gw.call(arguments),h=o.apply(this,u),p=r.apply(this,u);if(s==null&&(l=e(d=Nf())),l.lineStart(),u[0]=h,l.point(+i.apply(this,u),+a.apply(this,u)),u[0]=p,l.point(+i.apply(this,u),+a.apply(this,u)),l.lineEnd(),d)return l=null,d+""||null}return c.source=function(d){return arguments.length?(o=d,c):o},c.target=function(d){return arguments.length?(r=d,c):r},c.x=function(d){return arguments.length?(i=typeof d=="function"?d:sh(+d),c):i},c.y=function(d){return arguments.length?(a=typeof d=="function"?d:sh(+d),c):a},c.context=function(d){return arguments.length?(d==null?s=l=null:l=e(s=d),c):s},c}function Jw(){return Zw(jw)}const Ui=e=>()=>e;function Kw(e,{sourceEvent:o,target:r,transform:i,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:o,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function Pn(e,o,r){this.k=e,this.x=o,this.y=r}Pn.prototype={constructor:Pn,scale:function(e){return e===1?this:new Pn(this.k*e,this.x,this.y)},translate:function(e,o){return e===0&o===0?this:new Pn(this.k,this.x+this.k*e,this.y+this.k*o)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Rc=new Pn(1,0,0);Pn.prototype;function Js(e){e.stopImmediatePropagation()}function Yr(e){e.preventDefault(),e.stopImmediatePropagation()}function Qw(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function tk(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function lh(){return this.__zoom||Rc}function ek(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function nk(){return navigator.maxTouchPoints||"ontouchstart"in this}function ok(e,o,r){var i=e.invertX(o[0][0])-r[0][0],a=e.invertX(o[1][0])-r[1][0],s=e.invertY(o[0][1])-r[0][1],l=e.invertY(o[1][1])-r[1][1];return e.translate(a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a),l>s?(s+l)/2:Math.min(0,s)||Math.max(0,l))}function rk(){var e=Qw,o=tk,r=ok,i=ek,a=nk,s=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,d=K_,u=Nc("start","zoom","end"),h,p,m,g=500,_=150,C=0,M=10;function N(I){I.property("__zoom",lh).on("wheel.zoom",it,{passive:!1}).on("mousedown.zoom",et).on("dblclick.zoom",ut).filter(a).on("touchstart.zoom",L).on("touchmove.zoom",q).on("touchend.zoom touchcancel.zoom",H).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}N.transform=function(I,U,z,j){var ct=I.selection?I.selection():I;ct.property("__zoom",lh),I!==ct?X(I,U,z,j):ct.interrupt().each(function(){rt(this,arguments).event(j).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},N.scaleBy=function(I,U,z,j){N.scaleTo(I,function(){var ct=this.__zoom.k,st=typeof U=="function"?U.apply(this,arguments):U;return ct*st},z,j)},N.scaleTo=function(I,U,z,j){N.transform(I,function(){var ct=o.apply(this,arguments),st=this.__zoom,lt=z==null?K(ct):typeof z=="function"?z.apply(this,arguments):z,ot=st.invert(lt),St=typeof U=="function"?U.apply(this,arguments):U;return r(V(P(st,St),lt,ot),ct,l)},z,j)},N.translateBy=function(I,U,z,j){N.transform(I,function(){return r(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof z=="function"?z.apply(this,arguments):z),o.apply(this,arguments),l)},null,j)},N.translateTo=function(I,U,z,j,ct){N.transform(I,function(){var st=o.apply(this,arguments),lt=this.__zoom,ot=j==null?K(st):typeof j=="function"?j.apply(this,arguments):j;return r(Rc.translate(ot[0],ot[1]).scale(lt.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof z=="function"?-z.apply(this,arguments):-z),st,l)},j,ct)};function P(I,U){return U=Math.max(s[0],Math.min(s[1],U)),U===I.k?I:new Pn(U,I.x,I.y)}function V(I,U,z){var j=U[0]-z[0]*I.k,ct=U[1]-z[1]*I.k;return j===I.x&&ct===I.y?I:new Pn(I.k,j,ct)}function K(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function X(I,U,z,j){I.on("start.zoom",function(){rt(this,arguments).event(j).start()}).on("interrupt.zoom end.zoom",function(){rt(this,arguments).event(j).end()}).tween("zoom",function(){var ct=this,st=arguments,lt=rt(ct,st).event(j),ot=o.apply(ct,st),St=z==null?K(ot):typeof z=="function"?z.apply(ct,st):z,Pt=Math.max(ot[1][0]-ot[0][0],ot[1][1]-ot[0][1]),At=ct.__zoom,Ut=typeof U=="function"?U.apply(ct,st):U,ne=d(At.invert(St).concat(Pt/At.k),Ut.invert(St).concat(Pt/Ut.k));return function(G){if(G===1)G=Ut;else{var ht=ne(G),dt=Pt/ht[2];G=new Pn(dt,St[0]-ht[0]*dt,St[1]-ht[1]*dt)}lt.zoom(null,G)}})}function rt(I,U,z){return!z&&I.__zooming||new pt(I,U)}function pt(I,U){this.that=I,this.args=U,this.active=0,this.sourceEvent=null,this.extent=o.apply(I,U),this.taps=0}pt.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,U){return this.mouse&&I!=="mouse"&&(this.mouse[1]=U.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=U.invert(this.touch0[0])),this.touch1&&I!=="touch"&&(this.touch1[1]=U.invert(this.touch1[0])),this.that.__zoom=U,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(I){var U=He(this.that).datum();u.call(I,this.that,new Kw(I,{sourceEvent:this.sourceEvent,target:N,transform:this.that.__zoom,dispatch:u}),U)}};function it(I,...U){if(!e.apply(this,arguments))return;var z=rt(this,U).event(I),j=this.__zoom,ct=Math.max(s[0],Math.min(s[1],j.k*Math.pow(2,i.apply(this,arguments)))),st=To(I);if(z.wheel)(z.mouse[0][0]!==st[0]||z.mouse[0][1]!==st[1])&&(z.mouse[1]=j.invert(z.mouse[0]=st)),clearTimeout(z.wheel);else{if(j.k===ct)return;z.mouse=[st,j.invert(st)],ia(this),z.start()}Yr(I),z.wheel=setTimeout(lt,_),z.zoom("mouse",r(V(P(j,ct),z.mouse[0],z.mouse[1]),z.extent,l));function lt(){z.wheel=null,z.end()}}function et(I,...U){if(m||!e.apply(this,arguments))return;var z=I.currentTarget,j=rt(this,U,!0).event(I),ct=He(I.view).on("mousemove.zoom",St,!0).on("mouseup.zoom",Pt,!0),st=To(I,z),lt=I.clientX,ot=I.clientY;x_(I.view),Js(I),j.mouse=[st,this.__zoom.invert(st)],ia(this),j.start();function St(At){if(Yr(At),!j.moved){var Ut=At.clientX-lt,ne=At.clientY-ot;j.moved=Ut*Ut+ne*ne>C}j.event(At).zoom("mouse",r(V(j.that.__zoom,j.mouse[0]=To(At,z),j.mouse[1]),j.extent,l))}function Pt(At){ct.on("mousemove.zoom mouseup.zoom",null),A_(At.view,j.moved),Yr(At),j.event(At).end()}}function ut(I,...U){if(e.apply(this,arguments)){var z=this.__zoom,j=To(I.changedTouches?I.changedTouches[0]:I,this),ct=z.invert(j),st=z.k*(I.shiftKey?.5:2),lt=r(V(P(z,st),j,ct),o.apply(this,U),l);Yr(I),c>0?He(this).transition().duration(c).call(X,lt,j,I):He(this).call(N.transform,lt,j,I)}}function L(I,...U){if(e.apply(this,arguments)){var z=I.touches,j=z.length,ct=rt(this,U,I.changedTouches.length===j).event(I),st,lt,ot,St;for(Js(I),lt=0;lt<j;++lt)ot=z[lt],St=To(ot,this),St=[St,this.__zoom.invert(St),ot.identifier],ct.touch0?!ct.touch1&&ct.touch0[2]!==St[2]&&(ct.touch1=St,ct.taps=0):(ct.touch0=St,st=!0,ct.taps=1+!!h);h&&(h=clearTimeout(h)),st&&(ct.taps<2&&(p=St[0],h=setTimeout(function(){h=null},g)),ia(this),ct.start())}}function q(I,...U){if(this.__zooming){var z=rt(this,U).event(I),j=I.changedTouches,ct=j.length,st,lt,ot,St;for(Yr(I),st=0;st<ct;++st)lt=j[st],ot=To(lt,this),z.touch0&&z.touch0[2]===lt.identifier?z.touch0[0]=ot:z.touch1&&z.touch1[2]===lt.identifier&&(z.touch1[0]=ot);if(lt=z.that.__zoom,z.touch1){var Pt=z.touch0[0],At=z.touch0[1],Ut=z.touch1[0],ne=z.touch1[1],G=(G=Ut[0]-Pt[0])*G+(G=Ut[1]-Pt[1])*G,ht=(ht=ne[0]-At[0])*ht+(ht=ne[1]-At[1])*ht;lt=P(lt,Math.sqrt(G/ht)),ot=[(Pt[0]+Ut[0])/2,(Pt[1]+Ut[1])/2],St=[(At[0]+ne[0])/2,(At[1]+ne[1])/2]}else if(z.touch0)ot=z.touch0[0],St=z.touch0[1];else return;z.zoom("touch",r(V(lt,ot,St),z.extent,l))}}function H(I,...U){if(this.__zooming){var z=rt(this,U).event(I),j=I.changedTouches,ct=j.length,st,lt;for(Js(I),m&&clearTimeout(m),m=setTimeout(function(){m=null},g),st=0;st<ct;++st)lt=j[st],z.touch0&&z.touch0[2]===lt.identifier?delete z.touch0:z.touch1&&z.touch1[2]===lt.identifier&&delete z.touch1;if(z.touch1&&!z.touch0&&(z.touch0=z.touch1,delete z.touch1),z.touch0)z.touch0[1]=this.__zoom.invert(z.touch0[0]);else if(z.end(),z.taps===2&&(lt=To(lt,this),Math.hypot(p[0]-lt[0],p[1]-lt[1])<M)){var ot=He(this).on("dblclick.zoom");ot&&ot.apply(this,arguments)}}}return N.wheelDelta=function(I){return arguments.length?(i=typeof I=="function"?I:Ui(+I),N):i},N.filter=function(I){return arguments.length?(e=typeof I=="function"?I:Ui(!!I),N):e},N.touchable=function(I){return arguments.length?(a=typeof I=="function"?I:Ui(!!I),N):a},N.extent=function(I){return arguments.length?(o=typeof I=="function"?I:Ui([[+I[0][0],+I[0][1]],[+I[1][0],+I[1][1]]]),N):o},N.scaleExtent=function(I){return arguments.length?(s[0]=+I[0],s[1]=+I[1],N):[s[0],s[1]]},N.translateExtent=function(I){return arguments.length?(l[0][0]=+I[0][0],l[1][0]=+I[1][0],l[0][1]=+I[0][1],l[1][1]=+I[1][1],N):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},N.constrain=function(I){return arguments.length?(r=I,N):r},N.duration=function(I){return arguments.length?(c=+I,N):c},N.interpolate=function(I){return arguments.length?(d=I,N):d},N.on=function(){var I=u.on.apply(u,arguments);return I===u?N:I},N.clickDistance=function(I){return arguments.length?(C=(I=+I)*I,N):Math.sqrt(C)},N.tapDistance=function(I){return arguments.length?(M=+I,N):M},N}function ik(e){var o=0,r=e.children,i=r&&r.length;if(!i)o=1;else for(;--i>=0;)o+=r[i].value;e.value=o}function ak(){return this.eachAfter(ik)}function sk(e){var o=this,r,i=[o],a,s,l;do for(r=i.reverse(),i=[];o=r.pop();)if(e(o),a=o.children,a)for(s=0,l=a.length;s<l;++s)i.push(a[s]);while(i.length);return this}function lk(e){for(var o=this,r=[o],i,a;o=r.pop();)if(e(o),i=o.children,i)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function ck(e){for(var o=this,r=[o],i=[],a,s,l;o=r.pop();)if(i.push(o),a=o.children,a)for(s=0,l=a.length;s<l;++s)r.push(a[s]);for(;o=i.pop();)e(o);return this}function dk(e){return this.eachAfter(function(o){for(var r=+e(o.data)||0,i=o.children,a=i&&i.length;--a>=0;)r+=i[a].value;o.value=r})}function uk(e){return this.eachBefore(function(o){o.children&&o.children.sort(e)})}function hk(e){for(var o=this,r=pk(o,e),i=[o];o!==r;)o=o.parent,i.push(o);for(var a=i.length;e!==r;)i.splice(a,0,e),e=e.parent;return i}function pk(e,o){if(e===o)return e;var r=e.ancestors(),i=o.ancestors(),a=null;for(e=r.pop(),o=i.pop();e===o;)a=e,e=r.pop(),o=i.pop();return a}function fk(){for(var e=this,o=[e];e=e.parent;)o.push(e);return o}function mk(){var e=[];return this.each(function(o){e.push(o)}),e}function gk(){var e=[];return this.eachBefore(function(o){o.children||e.push(o)}),e}function yk(){var e=this,o=[];return e.each(function(r){r!==e&&o.push({source:r.parent,target:r})}),o}function Pc(e,o){var r=new Ta(e),i=+e.value&&(r.value=e.value),a,s=[r],l,c,d,u;for(o==null&&(o=bk);a=s.pop();)if(i&&(a.value=+a.data.value),(c=o(a.data))&&(u=c.length))for(a.children=new Array(u),d=u-1;d>=0;--d)s.push(l=a.children[d]=new Ta(c[d])),l.parent=a,l.depth=a.depth+1;return r.eachBefore(Ck)}function vk(){return Pc(this).eachBefore(_k)}function bk(e){return e.children}function _k(e){e.data=e.data.data}function Ck(e){var o=0;do e.height=o;while((e=e.parent)&&e.height<++o)}function Ta(e){this.data=e,this.depth=this.height=0,this.parent=null}Ta.prototype=Pc.prototype={constructor:Ta,count:ak,each:sk,eachAfter:ck,eachBefore:lk,sum:dk,sort:uk,path:hk,ancestors:fk,descendants:mk,leaves:gk,links:yk,copy:vk};const wk="2.1.2",kk={version:wk},{version:Sk}=kk,xk=Object.freeze({children:e=>e.children,nodeSize:e=>e.data.size,spacing:0});function $c(e){const o=Object.assign({},xk,e);function r(c){const d=o[c];return typeof d=="function"?d:()=>d}function i(c){const d=l(s(),c,u=>u.children);return d.update(),d.data}function a(){const c=r("nodeSize"),d=r("spacing");return class If extends Pc.prototype.constructor{constructor(h){super(h)}copy(){const h=l(this.constructor,this,p=>p.children);return h.each(p=>p.data=p.data.data),h}get size(){return c(this)}spacing(h){return d(this,h)}get nodes(){return this.descendants()}get xSize(){return this.size[0]}get ySize(){return this.size[1]}get top(){return this.y}get bottom(){return this.y+this.ySize}get left(){return this.x-this.xSize/2}get right(){return this.x+this.xSize/2}get root(){const h=this.ancestors();return h[h.length-1]}get numChildren(){return this.hasChildren?this.children.length:0}get hasChildren(){return!this.noChildren}get noChildren(){return this.children===null}get firstChild(){return this.hasChildren?this.children[0]:null}get lastChild(){return this.hasChildren?this.children[this.numChildren-1]:null}get extents(){return(this.children||[]).reduce((h,p)=>If.maxExtents(h,p.extents),this.nodeExtents)}get nodeExtents(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}static maxExtents(h,p){return{top:Math.min(h.top,p.top),bottom:Math.max(h.bottom,p.bottom),left:Math.min(h.left,p.left),right:Math.max(h.right,p.right)}}}}function s(){const c=a(),d=r("nodeSize"),u=r("spacing");return class extends c{constructor(h){super(h),Object.assign(this,{x:0,y:0,relX:0,prelim:0,shift:0,change:0,lExt:this,lExtRelX:0,lThr:null,rExt:this,rExtRelX:0,rThr:null})}get size(){return d(this.data)}spacing(h){return u(this.data,h.data)}get x(){return this.data.x}set x(h){this.data.x=h}get y(){return this.data.y}set y(h){this.data.y=h}update(){return Of(this),Lf(this),this}}}function l(c,d,u){const h=(p,m)=>{const g=new c(p);Object.assign(g,{parent:m,depth:m===null?0:m.depth+1,height:0,length:1});const _=u(p)||[];return g.children=_.length===0?null:_.map(C=>h(C,g)),g.children&&Object.assign(g,g.children.reduce((C,M)=>({height:Math.max(C.height,M.height+1),length:C.length+M.length}),g)),g};return h(d,null)}return Object.assign(i,{nodeSize(c){return arguments.length?(o.nodeSize=c,i):o.nodeSize},spacing(c){return arguments.length?(o.spacing=c,i):o.spacing},children(c){return arguments.length?(o.children=c,i):o.children},hierarchy(c,d){const u=typeof d>"u"?o.children:d;return l(a(),c,u)},dump(c){const d=r("nodeSize"),u=h=>p=>{const m=h+" ",g=h+" ",{x:_,y:C}=p,M=d(p),N=p.children||[],P=N.length===0?" ":`,${m}children: [${g}${N.map(u(g)).join(g)}${m}],${h}`;return`{ size: [${M.join(", ")}],${m}x: ${_}, y: ${C}${P}},`};return u(` `)(c)}}),i}$c.version=Sk;const Of=(e,o=0)=>(e.y=o,(e.children||[]).reduce((r,i)=>{const[a,s]=r;Of(i,e.y+e.ySize);const l=(a===0?i.lExt:i.rExt).bottom;a!==0&&Ek(e,a,s);const c=Rk(l,a,s);return[a+1,c]},[0,null]),Ak(e),Dk(e),e),Lf=(e,o,r)=>{typeof o>"u"&&(o=-e.relX-e.prelim,r=0);const i=o+e.relX;return e.relX=i+e.prelim-r,e.prelim=0,e.x=r+e.relX,(e.children||[]).forEach(a=>Lf(a,i,e.x)),e},Ak=e=>{(e.children||[]).reduce((o,r)=>{const[i,a]=o,s=i+r.shift,l=a+s+r.change;return r.relX+=l,[s,l]},[0,0])},Ek=(e,o,r)=>{const i=e.children[o-1],a=e.children[o];let s=i,l=i.relX,c=a,d=a.relX,u=!0;for(;s&&c;){s.bottom>r.lowY&&(r=r.next);const h=l+s.prelim-(d+c.prelim)+s.xSize/2+c.xSize/2+s.spacing(c);(h>0||h<0&&u)&&(d+=h,Nk(a,h),Tk(e,o,r.index,h)),u=!1;const p=s.bottom,m=c.bottom;p<=m&&(s=Ik(s),s&&(l+=s.relX)),p>=m&&(c=Mk(c),c&&(d+=c.relX))}!s&&c?Ok(e,o,c,d):s&&!c&&Lk(e,o,s,l)},Nk=(e,o)=>{e.relX+=o,e.lExtRelX+=o,e.rExtRelX+=o},Tk=(e,o,r,i)=>{const a=e.children[o],s=o-r;if(s>1){const l=i/s;e.children[r+1].shift+=l,a.shift-=l,a.change-=i-l}},Mk=e=>e.hasChildren?e.firstChild:e.lThr,Ik=e=>e.hasChildren?e.lastChild:e.rThr,Ok=(e,o,r,i)=>{const a=e.firstChild,s=a.lExt,l=e.children[o];s.lThr=r;const c=i-r.relX-a.lExtRelX;s.relX+=c,s.prelim-=c,a.lExt=l.lExt,a.lExtRelX=l.lExtRelX},Lk=(e,o,r,i)=>{const a=e.children[o],s=a.rExt,l=e.children[o-1];s.rThr=r;const c=i-r.relX-a.rExtRelX;s.relX+=c,s.prelim-=c,a.rExt=l.rExt,a.rExtRelX=l.rExtRelX},Dk=e=>{if(e.hasChildren){const o=e.firstChild,r=e.lastChild,i=(o.prelim+o.relX-o.xSize/2+r.relX+r.prelim+r.xSize/2)/2;Object.assign(e,{prelim:i,lExt:o.lExt,lExtRelX:o.lExtRelX,rExt:r.rExt,rExtRelX:r.rExtRelX})}},Rk=(e,o,r)=>{for(;r!==null&&e>=r.lowY;)r=r.next;return{lowY:e,index:o,next:r}},Xt={selection:kr,select:He,max:U2,min:H2,sum:z2,cumsum:B2,tree:zw,stratify:Rw,zoom:rk,zoomIdentity:Rc,linkHorizontal:Jw,flextree:$c};let Pk=class{constructor(){const e={id:`ID${Math.floor(Math.random()*1e6)}`,firstDraw:!0,ctx:document.createElement("canvas").getContext("2d"),initialExpandLevel:1,nodeDefaultBackground:"none",lastTransform:{x:0,y:0,k:1},allowedNodesCount:{},zoomBehavior:null,generateRoot:null,svgWidth:800,svgHeight:window.innerHeight-100,container:"body",data:null,connections:[],defaultFont:"Helvetica",nodeId:o=>o.nodeId||o.id,parentNodeId:o=>o.parentNodeId||o.parentId,rootMargin:40,nodeWidth:o=>250,nodeHeight:o=>150,neighbourMargin:(o,r)=>80,siblingsMargin:o=>20,childrenMargin:o=>60,compactMarginPair:o=>100,compactMarginBetween:o=>20,nodeButtonWidth:o=>40,nodeButtonHeight:o=>40,nodeButtonX:o=>-20,nodeButtonY:o=>-20,linkYOffset:30,pagingStep:o=>5,minPagingVisibleNodes:o=>2e3,scaleExtent:[.001,20],duration:400,imageName:"Chart",setActiveNodeCentered:!0,layout:"top",compact:!0,createZoom:o=>Xt.zoom(),onZoomStart:o=>{},onZoom:o=>{},onZoomEnd:o=>{},onNodeClick:o=>o,onExpandOrCollapse:o=>o,nodeContent:o=>`<div style="padding:5px;font-size:10px;">Sample Node(id=${o.id}), override using <br/> <code>chart.nodeContent({data}=>{ <br/> return '' // Custom HTML <br/> })</code> <br/> Or check different <a href="https://github.com/bumbeishvili/org-chart#jump-to-examples" target="_blank">layout examples</a> </div>`,buttonContent:({node:o,state:r})=>`<div style="border:1px solid #E4E2E9;border-radius:3px;padding:3px;font-size:9px;margin:auto auto;background-color:white"> ${{left:i=>i?`<div style="display:flex;"><span style="align-items:center;display:flex;"><svg width="8" height="8" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M14.283 3.50094L6.51 11.4749C6.37348 11.615 6.29707 11.8029 6.29707 11.9984C6.29707 12.194 6.37348 12.3819 6.51 12.5219L14.283 20.4989C14.3466 20.5643 14.4226 20.6162 14.5066 20.6516C14.5906 20.6871 14.6808 20.7053 14.772 20.7053C14.8632 20.7053 14.9534 20.6871 15.0374 20.6516C15.1214 20.6162 15.1974 20.5643 15.261 20.4989C15.3918 20.365 15.4651 20.1852 15.4651 19.9979C15.4651 19.8107 15.3918 19.6309 15.261 19.4969L7.9515 11.9984L15.261 4.50144C15.3914 4.36756 15.4643 4.18807 15.4643 4.00119C15.4643 3.81431 15.3914 3.63482 15.261 3.50094C15.1974 3.43563 15.1214 3.38371 15.0374 3.34827C14.9534 3.31282 14.8632 3.29456 14.772 3.29456C14.6808 3.29456 14.5906 3.31282 14.5066 3.34827C14.4226 3.38371 14.3466 3.43563 14.283 3.50094V3.50094Z" fill="#716E7B" stroke="#716E7B"/> </svg></span><span style="color:#716E7B">${o.data._directSubordinatesPaging} </span></div>`:`<div style="display:flex;"><span style="align-items:center;display:flex;"><svg width="8" height="8" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7.989 3.49944C7.85817 3.63339 7.78492 3.8132 7.78492 4.00044C7.78492 4.18768 7.85817 4.36749 7.989 4.50144L15.2985 11.9999L7.989 19.4969C7.85817 19.6309 7.78492 19.8107 7.78492 19.9979C7.78492 20.1852 7.85817 20.365 7.989 20.4989C8.05259 20.5643 8.12863 20.6162 8.21261 20.6516C8.2966 20.6871 8.38684 20.7053 8.478 20.7053C8.56916 20.7053 8.6594 20.6871 8.74338 20.6516C8.82737 20.6162 8.90341 20.5643 8.967 20.4989L16.74 12.5234C16.8765 12.3834 16.9529 12.1955 16.9529 11.9999C16.9529 11.8044 16.8765 11.6165 16.74 11.4764L8.967 3.50094C8.90341 3.43563 8.82737 3.38371 8.74338 3.34827C8.6594 3.31282 8.56916 3.29456 8.478 3.29456C8.38684 3.29456 8.2966 3.31282 8.21261 3.34827C8.12863 3.38371 8.05259 3.43563 7.989 3.50094V3.49944Z" fill="#716E7B" stroke="#716E7B"/> </svg></span><span style="color:#716E7B">${o.data._directSubordinatesPaging} </span></div>`,bottom:i=>i?`<div style="display:flex;"><span style="align-items:center;display:flex;"><svg width="8" height="8" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M19.497 7.98903L12 15.297L4.503 7.98903C4.36905 7.85819 4.18924 7.78495 4.002 7.78495C3.81476 7.78495 3.63495 7.85819 3.501 7.98903C3.43614 8.05257 3.38462 8.12842 3.34944 8.21213C3.31427 8.29584 3.29615 8.38573 3.29615 8.47653C3.29615 8.56733 3.31427 8.65721 3.34944 8.74092C3.38462 8.82463 3.43614 8.90048 3.501 8.96403L11.4765 16.74C11.6166 16.8765 11.8044 16.953 12 16.953C12.1956 16.953 12.3834 16.8765 12.5235 16.74L20.499 8.96553C20.5643 8.90193 20.6162 8.8259 20.6517 8.74191C20.6871 8.65792 20.7054 8.56769 20.7054 8.47653C20.7054 8.38537 20.6871 8.29513 20.6517 8.21114C20.6162 8.12715 20.5643 8.05112 20.499 7.98753C20.3651 7.85669 20.1852 7.78345 19.998 7.78345C19.8108 7.78345 19.6309 7.85669 19.497 7.98753V7.98903Z" fill="#716E7B" stroke="#716E7B"/> </svg></span><span style="margin-left:1px;color:#716E7B" >${o.data._directSubordinatesPaging} </span></div> `:`<div style="display:flex;"><span style="align-items:center;display:flex;"><svg width="8" height="8" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M11.457 8.07005L3.49199 16.4296C3.35903 16.569 3.28485 16.7543 3.28485 16.9471C3.28485 17.1398 3.35903 17.3251 3.49199 17.4646L3.50099 17.4736C3.56545 17.5414 3.64304 17.5954 3.72904 17.6324C3.81504 17.6693 3.90765 17.6883 4.00124 17.6883C4.09483 17.6883 4.18745 17.6693 4.27344 17.6324C4.35944 17.5954 4.43703 17.5414 4.50149 17.4736L12.0015 9.60155L19.4985 17.4736C19.563 17.5414 19.6405 17.5954 19.7265 17.6324C19.8125 17.6693 19.9052 17.6883 19.9987 17.6883C20.0923 17.6883 20.1849 17.6693 20.2709 17.6324C20.3569 17.5954 20.4345 17.5414 20.499 17.4736L20.508 17.4646C20.641 17.3251 20.7151 17.1398 20.7151 16.9471C20.7151 16.7543 20.641 16.569 20.508 16.4296L12.543 8.07005C12.4729 7.99653 12.3887 7.93801 12.2954 7.89801C12.202 7.85802 12.1015 7.8374 12 7.8374C11.8984 7.8374 11.798 7.85802 11.7046 7.89801C11.6113 7.93801 11.527 7.99653 11.457 8.07005Z" fill="#716E7B" stroke="#716E7B"/> </svg></span><span style="margin-left:1px;color:#716E7B" >${o.data._directSubordinatesPaging} </span></div> `,right:i=>i?`<div style="display:flex;"><span style="align-items:center;display:flex;"><svg width="8" height="8" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7.989 3.49944C7.85817 3.63339 7.78492 3.8132 7.78492 4.00044C7.78492 4.18768 7.85817 4.36749 7.989 4.50144L15.2985 11.9999L7.989 19.4969C7.85817 19.6309 7.78492 19.8107 7.78492 19.9979C7.78492 20.1852 7.85817 20.365 7.989 20.4989C8.05259 20.5643 8.12863 20.6162 8.21261 20.6516C8.2966 20.6871 8.38684 20.7053 8.478 20.7053C8.56916 20.7053 8.6594 20.6871 8.74338 20.6516C8.82737 20.6162 8.90341 20.5643 8.967 20.4989L16.74 12.5234C16.8765 12.3834 16.9529 12.1955 16.9529 11.9999C16.9529 11.8044 16.8765 11.6165 16.74 11.4764L8.967 3.50094C8.90341 3.43563 8.82737 3.38371 8.74338 3.34827C8.6594 3.31282 8.56916 3.29456 8.478 3.29456C8.38684 3.29456 8.2966 3.31282 8.21261 3.34827C8.12863 3.38371 8.05259 3.43563 7.989 3.50094V3.49944Z" fill="#716E7B" stroke="#716E7B"/> </svg></span><span style="color:#716E7B">${o.data._directSubordinatesPaging} </span></div>`:`<div style="display:flex;"><span style="align-items:center;display:flex;"><svg width="8" height="8" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M14.283 3.50094L6.51 11.4749C6.37348 11.615 6.29707 11.8029 6.29707 11.9984C6.29707 12.194 6.37348 12.3819 6.51 12.5219L14.283 20.4989C14.3466 20.5643 14.4226 20.6162 14.5066 20.6516C14.5906 20.6871 14.6808 20.7053 14.772 20.7053C14.8632 20.7053 14.9534 20.6871 15.0374 20.6516C15.1214 20.6162 15.1974 20.5643 15.261 20.4989C15.3918 20.365 15.4651 20.1852 15.4651 19.9979C15.4651 19.8107 15.3918 19.6309 15.261 19.4969L7.9515 11.9984L15.261 4.50144C15.3914 4.36756 15.4643 4.18807 15.4643 4.00119C15.4643 3.81431 15.3914 3.63482 15.261 3.50094C15.1974 3.43563 15.1214 3.38371 15.0374 3.34827C14.9534 3.31282 14.8632 3.29456 14.772 3.29456C14.6808 3.29456 14.5906 3.31282 14.5066 3.34827C14.4226 3.38371 14.3466 3.43563 14.283 3.50094V3.50094Z" fill="#716E7B" stroke="#716E7B"/> </svg></span><span style="color:#716E7B">${o.data._directSubordinatesPaging} </span></div>`,top:i=>i?`<div style="display:flex;"><span style="align-items:center;display:flex;"><svg width="8" height="8" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M11.457 8.07005L3.49199 16.4296C3.35903 16.569 3.28485 16.7543 3.28485 16.9471C3.28485 17.1398 3.35903 17.3251 3.49199 17.4646L3.50099 17.4736C3.56545 17.5414 3.64304 17.5954 3.72904 17.6324C3.81504 17.6693 3.90765 17.6883 4.00124 17.6883C4.09483 17.6883 4.18745 17.6693 4.27344 17.6324C4.35944 17.5954 4.43703 17.5414 4.50149 17.4736L12.0015 9.60155L19.4985 17.4736C19.563 17.5414 19.6405 17.5954 19.7265 17.6324C19.8125 17.6693 19.9052 17.6883 19.9987 17.6883C20.0923 17.6883 20.1849 17.6693 20.2709 17.6324C20.3569 17.5954 20.4345 17.5414 20.499 17.4736L20.508 17.4646C20.641 17.3251 20.7151 17.1398 20.7151 16.9471C20.7151 16.7543 20.641 16.569 20.508 16.4296L12.543 8.07005C12.4729 7.99653 12.3887 7.93801 12.2954 7.89801C12.202 7.85802 12.1015 7.8374 12 7.8374C11.8984 7.8374 11.798 7.85802 11.7046 7.89801C11.6113 7.93801 11.527 7.99653 11.457 8.07005Z" fill="#716E7B" stroke="#716E7B"/> </svg></span><span style="margin-left:1px;color:#716E7B">${o.data._directSubordinatesPaging} </span></div> `:`<div style="display:flex;"><span style="align-items:center;display:flex;"><svg width="8" height="8" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M19.497 7.98903L12 15.297L4.503 7.98903C4.36905 7.85819 4.18924 7.78495 4.002 7.78495C3.81476 7.78495 3.63495 7.85819 3.501 7.98903C3.43614 8.05257 3.38462 8.12842 3.34944 8.21213C3.31427 8.29584 3.29615 8.38573 3.29615 8.47653C3.29615 8.56733 3.31427 8.65721 3.34944 8.74092C3.38462 8.82463 3.43614 8.90048 3.501 8.96403L11.4765 16.74C11.6166 16.8765 11.8044 16.953 12 16.953C12.1956 16.953 12.3834 16.8765 12.5235 16.74L20.499 8.96553C20.5643 8.90193 20.6162 8.8259 20.6517 8.74191C20.6871 8.65792 20.7054 8.56769 20.7054 8.47653C20.7054 8.38537 20.6871 8.29513 20.6517 8.21114C20.6162 8.12715 20.5643 8.05112 20.499 7.98753C20.3651 7.85669 20.1852 7.78345 19.998 7.78345C19.8108 7.78345 19.6309 7.85669 19.497 7.98753V7.98903Z" fill="#716E7B" stroke="#716E7B"/> </svg></span><span style="margin-left:1px;color:#716E7B">${o.data._directSubordinatesPaging} </span></div> `}[r.layout](o.children)} </div>`,pagingButton:(o,r,i,a)=>{const s=a.pagingStep(o.parent),l=o.parent.data._pagingStep,c=o.parent.data._directSubordinatesPaging-l;return` <div style="margin-top:90px;"> <div style="display:flex;width:170px;border-radius:20px;padding:5px 15px; padding-bottom:4px;;background-color:#E5E9F2"> <div><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M5.59 7.41L10.18 12L5.59 16.59L7 18L13 12L7 6L5.59 7.41ZM16 6H18V18H16V6Z" fill="#716E7B" stroke="#716E7B"/> </svg> </div><div style="line-height:2"> Show next ${Math.min(c,s)} nodes </div></div> </div> `},nodeUpdate:function(o,r,i){Xt.select(this).select(".node-rect").attr("stroke",a=>a.data._highlighted||a.data._upToTheRootHighlighted?"#E27396":"none").attr("stroke-width",o.data._highlighted||o.data._upToTheRootHighlighted?10:1)},nodeEnter:o=>o,nodeExit:o=>o,linkUpdate:function(o,r,i){Xt.select(this).attr("stroke",a=>a.data._upToTheRootHighlighted?"#E27396":"#E4E2E9").attr("stroke-width",a=>a.data._upToTheRootHighlighted?5:1),o.data._upToTheRootHighlighted&&Xt.select(this).raise()},hdiagonal:function(o,r,i){const a=o.x,s=o.y,l=r.x,c=r.y;let d=i&&i.x!=null?i.x:a,u=i&&i.y!=null?i.y:s,h=l-a<0?-1:1,p=c-s<0?-1:1,m=35,g=Math.abs(l-a)/2<m?Math.abs(l-a)/2:m;g=Math.abs(c-s)/2<g?Math.abs(c-s)/2:g;let _=Math.abs(l-a)/2-g;return` M ${d} ${u} L ${d} ${s} L ${a} ${s} L ${a+_*h} ${s} C ${a+_*h+g*h} ${s} ${a+_*h+g*h} ${s} ${a+_*h+g*h} ${s+g*p} L ${a+_*h+g*h} ${c-g*p} C ${a+_*h+g*h} ${c} ${a+_*h+g*h} ${c} ${l-_*h} ${c} L ${l} ${c} `},diagonal:function(o,r,i,a={sy:0}){const s=o.x;let l=o.y;const c=r.x,d=r.y;let u=i&&i.x!=null?i.x:s,h=i&&i.y!=null?i.y:l,p=c-s<0?-1:1,m=d-l<0?-1:1;l+=a.sy;let g=35,_=Math.abs(c-s)/2<g?Math.abs(c-s)/2:g;_=Math.abs(d-l)/2<_?Math.abs(d-l)/2:_;let C=Math.abs(d-l)/2-_,M=Math.abs(c-s)-_*2;return` M ${u} ${h} L ${s} ${h} L ${s} ${l} L ${s} ${l+C*m} C ${s} ${l+C*m+_*m} ${s} ${l+C*m+_*m} ${s+_*p} ${l+C*m+_*m} L ${s+M*p+_*p} ${l+C*m+_*m} C ${c} ${l+C*m+_*m} ${c} ${l+C*m+_*m} ${c} ${d-C*m} L ${c} ${d} `},defs:function(o,r){return`<defs> ${r.map(i=>{const a=this.getTextWidth(i.label,{ctx:o.ctx,fontSize:2,defaultFont:o.defaultFont});return` <marker id="${i.from+"_"+i.to}" refX="${i._source.x<i._target.x?-7:7}" refY="5" markerWidth="500" markerHeight="500" orient="${i._source.x<i._target.x?"auto":"auto-start-reverse"}" > <rect rx=0.5 width=${i.label?a+3:0} height=3 y=1 fill="#E27396"></rect> <text font-size="2px" x=1 fill="white" y=3>${i.label||""}</text> </marker> <marker id="arrow-${i.from+"_"+i.to}" markerWidth="500" markerHeight="500" refY="2" refX="1" orient="${i._source.x<i._target.x?"auto":"auto-start-reverse"}" > <path transform="translate(0)" d='M0,0 V4 L2,2 Z' fill='#E27396' /> </marker> `}).join("")} </defs> `},connectionsUpdate:function(o,r,i){Xt.select(this).attr("stroke",a=>"#E27396").attr("stroke-linecap","round").attr("stroke-width",a=>"5").attr("pointer-events","none").attr("marker-start",a=>`url(#${a.from+"_"+a.to})`).attr("marker-end",a=>`url(#arrow-${a.from+"_"+a.to})`)},linkGroupArc:Xt.linkHorizontal().x(o=>o.x).y(o=>o.y),layoutBindings:{left:{nodeLeftX:o=>0,nodeRightX:o=>o.width,nodeTopY:o=>-o.height/2,nodeBottomY:o=>o.height/2,nodeJoinX:o=>o.x+o.width,nodeJoinY:o=>o.y-o.height/2,linkJoinX:o=>o.x+o.width,linkJoinY:o=>o.y,linkX:o=>o.x,linkY:o=>o.y,linkCompactXStart:o=>o.x+o.width/2,linkCompactYStart:o=>o.y+(o.compactEven?o.height/2:-o.height/2),compactLinkMidX:(o,r)=>o.firstCompactNode.x,compactLinkMidY:(o,r)=>o.firstCompactNode.y+o.firstCompactNode.flexCompactDim[0]/4+r.compactMarginPair(o)/4,linkParentX:o=>o.parent.x+o.parent.width,linkParentY:o=>o.parent.y,buttonX:o=>o.width,buttonY:o=>o.height/2,centerTransform:({root:o,rootMargin:r,centerY:i,scale:a,centerX:s})=>`translate(${r},${i}) scale(${a})`,compactDimension:{sizeColumn:o=>o.height,sizeRow:o=>o.width,reverse:o=>o.slice().reverse()},nodeFlexSize:({height:o,width:r,siblingsMargin:i,childrenMargin:a,state:s,node:l})=>s.compact&&l.flexCompactDim?[l.flexCompactDim[0],l.flexCompactDim[1]]:[o+i,r+a],zoomTransform:({centerY:o,scale:r})=>`translate(0,${o}) scale(${r})`,diagonal:this.hdiagonal.bind(this),swap:o=>{const r=o.x;o.x=o.y,o.y=r},nodeUpdateTransform:({x:o,y:r,width:i,height:a})=>`translate(${o},${r-a/2})`},top:{nodeLeftX:o=>-o.width/2,nodeRightX:o=>o.width/2,nodeTopY:o=>0,nodeBottomY:o=>o.height,nodeJoinX:o=>o.x-o.width/2,nodeJoinY:o=>o.y+o.height,linkJoinX:o=>o.x,linkJoinY:o=>o.y+o.height,linkCompactXStart:o=>o.x+(o.compactEven?o.width/2:-o.width/2),linkCompactYStart:o=>o.y+o.height/2,compactLinkMidX:(o,r)=>o.firstCompactNode.x+o.firstCompactNode.flexCompactDim[0]/4+r.compactMarginPair(o)/4,compactLinkMidY:o=>o.firstCompactNode.y,compactDimension:{sizeColumn:o=>o.width,sizeRow:o=>o.height,reverse:o=>o},linkX:o=>o.x,linkY:o=>o.y,linkParentX:o=>o.parent.x,linkParentY:o=>o.parent.y+o.parent.height,buttonX:o=>o.width/2,buttonY:o=>o.height,centerTransform:({root:o,rootMargin:r,centerY:i,scale:a,centerX:s})=>`translate(${s},${r}) scale(${a})`,nodeFlexSize:({height:o,width:r,siblingsMargin:i,childrenMargin:a,state:s,node:l,compactViewIndex:c})=>s.compact&&l.flexCompactDim?[l.flexCompactDim[0],l.flexCompactDim[1]]:[r+i,o+a],zoomTransform:({centerX:o,scale:r})=>`translate(${o},0}) scale(${r})`,diagonal:this.diagonal.bind(this),swap:o=>{},nodeUpdateTransform:({x:o,y:r,width:i,height:a})=>`translate(${o-i/2},${r})`},bottom:{nodeLeftX:o=>-o.width/2,nodeRightX:o=>o.width/2,nodeTopY:o=>-o.height,nodeBottomY:o=>0,nodeJoinX:o=>o.x-o.width/2,nodeJoinY:o=>o.y-o.height-o.height,linkJoinX:o=>o.x,linkJoinY:o=>o.y-o.height,linkCompactXStart:o=>o.x+(o.compactEven?o.width/2:-o.width/2),linkCompactYStart:o=>o.y-o.height/2,compactLinkMidX:(o,r)=>o.firstCompactNode.x+o.firstCompactNode.flexCompactDim[0]/4+r.compactMarginPair(o)/4,compactLinkMidY:o=>o.firstCompactNode.y,linkX:o=>o.x,linkY:o=>o.y,compactDimension:{sizeColumn:o=>o.width,sizeRow:o=>o.height,reverse:o=>o},linkParentX:o=>o.parent.x,linkParentY:o=>o.parent.y-o.parent.height,buttonX:o=>o.width/2,buttonY:o=>0,centerTransform:({root:o,rootMargin:r,centerY:i,scale:a,centerX:s,chartHeight:l})=>`translate(${s},${l-r}) scale(${a})`,nodeFlexSize:({height:o,width:r,siblingsMargin:i,childrenMargin:a,state:s,node:l})=>s.compact&&l.flexCompactDim?[l.flexCompactDim[0],l.flexCompactDim[1]]:[r+i,o+a],zoomTransform:({centerX:o,scale:r})=>`translate(${o},0}) scale(${r})`,diagonal:this.diagonal.bind(this),swap:o=>{o.y=-o.y},nodeUpdateTransform:({x:o,y:r,width:i,height:a})=>`translate(${o-i/2},${r-a})`},right:{nodeLeftX:o=>-o.width,nodeRightX:o=>0,nodeTopY:o=>-o.height/2,nodeBottomY:o=>o.height/2,nodeJoinX:o=>o.x-o.width-o.width,nodeJoinY:o=>o.y-o.height/2,linkJoinX:o=>o.x-o.width,linkJoinY:o=>o.y,linkX:o=>o.x,linkY:o=>o.y,linkParentX:o=>o.parent.x-o.parent.width,linkParentY:o=>o.parent.y,buttonX:o=>0,buttonY:o=>o.height/2,linkCompactXStart:o=>o.x-o.width/2,linkCompactYStart:o=>o.y+(o.compactEven?o.height/2:-o.height/2),compactLinkMidX:(o,r)=>o.firstCompactNode.x,compactLinkMidY:(o,r)=>o.firstCompactNode.y+o.firstCompactNode.flexCompactDim[0]/4+r.compactMarginPair(o)/4,centerTransform:({root:o,rootMargin:r,centerY:i,scale:a,centerX:s,chartWidth:l})=>`translate(${l-r},${i}) scale(${a})`,nodeFlexSize:({height:o,width:r,siblingsMargin:i,childrenMargin:a,state:s,node:l})=>s.compact&&l.flexCompactDim?[l.flexCompactDim[0],l.flexCompactDim[1]]:[o+i,r+a],compactDimension:{sizeColumn:o=>o.height,sizeRow:o=>o.width,reverse:o=>o.slice().reverse()},zoomTransform:({centerY:o,scale:r})=>`translate(0,${o}) scale(${r})`,diagonal:this.hdiagonal.bind(this),swap:o=>{const r=o.x;o.x=-o.y,o.y=r},nodeUpdateTransform:({x:o,y:r,width:i,height:a})=>`translate(${o-i},${r-a/2})`}}};this.getChartState=()=>e,Object.keys(e).forEach(o=>{this[o]=function(r){if(arguments.length)e[o]=r;else return e[o];return this}}),this.initializeEnterExitUpdatePattern()}initializeEnterExitUpdatePattern(){Xt.selection.prototype.patternify=function(e){var o=this,r=e.selector,i=e.tag,a=e.data||[r],s=o.selectAll("."+r).data(a,(l,c)=>typeof l=="object"&&l.id?l.id:c);return s.exit().remove(),s=s.enter().append(i).merge(s),s.attr("class",r),s}}getNodeChildren({data:e,children:o,_children:r},i){return i.push(e),o&&o.forEach(a=>{this.getNodeChildren(a,i)}),r&&r.forEach(a=>{this.getNodeChildren(a,i)}),i}initialZoom(e){const o=this.getChartState();return o.lastTransform.k=e,this}render(){const e=this.getChartState();if(!e.data||e.data.length==0)return console.log("ORG CHART - Data is empty"),e.container&&(He(e.container).select(".nodes-wrapper").remove(),He(e.container).select(".links-wrapper").remove(),He(e.container).select(".connections-wrapper").remove()),this;const o=Xt.select(e.container),r=o.node().getBoundingClientRect();r.width>0&&(e.svgWidth=r.width);const i={id:`ID${Math.floor(Math.random()*1e6)}`,chartWidth:e.svgWidth,chartHeight:e.svgHeight};if(e.calc=i,i.centerX=i.chartWidth/2,i.centerY=i.chartHeight/2,e.firstDraw){const l={zoom:null};l.zoom=e.createZoom().clickDistance(10).on("start",(c,d)=>e.onZoomStart(c)).on("end",(c,d)=>e.onZoomEnd(c)).on("zoom",(c,d)=>{e.onZoom(c),this.zoomed(c,d)}).scaleExtent(e.scaleExtent),e.zoomBehavior=l.zoom}e.flexTreeLayout=$c({nodeSize:l=>{const c=e.nodeWidth(l),d=e.nodeHeight(l),u=e.siblingsMargin(l),h=e.childrenMargin(l);return e.layoutBindings[e.layout].nodeFlexSize({state:e,node:l,width:c,height:d,siblingsMargin:u,childrenMargin:h})}}).spacing((l,c)=>l.parent==c.parent?0:e.neighbourMargin(l,c)),this.setLayouts({expandNodesFirst:!1});const a=o.patternify({tag:"svg",selector:"svg-chart-container"}).attr("width",e.svgWidth).attr("height",e.svgHeight).attr("font-family",e.defaultFont);e.firstDraw&&a.call(e.zoomBehavior).on("dblclick.zoom",null).attr("cursor","move"),e.svg=a;const s=a.patternify({tag:"g",selector:"chart"});return e.centerG=s.patternify({tag:"g",selector:"center-group"}),e.linksWrapper=e.centerG.patternify({tag:"g",selector:"links-wrapper"}),e.nodesWrapper=e.centerG.patternify({tag:"g",selector:"nodes-wrapper"}),e.connectionsWrapper=e.centerG.patternify({tag:"g",selector:"connections-wrapper"}),e.defsWrapper=a.patternify({tag:"g",selector:"defs-wrapper"}),e.firstDraw&&e.centerG.attr("transform",()=>e.layoutBindings[e.layout].centerTransform({centerX:i.centerX,centerY:i.centerY,scale:e.lastTransform.k,rootMargin:e.rootMargin,root:e.root,chartHeight:i.chartHeight,chartWidth:i.chartWidth})),e.chart=s,this.update(e.root),Xt.select(window).on(`resize.${e.id}`,()=>{const l=Xt.select(e.container).node().getBoundingClientRect();e.svg.attr("width",l.width)}),e.firstDraw&&(e.firstDraw=!1),this}addNode(e){const o=this.getChartState();if(e&&(o.parentNodeId(e)==null||o.parentNodeId(e)==o.nodeId(e))&&o.data.length==0)return o.data.push(e),this.render(),this;const r=o.generateRoot(o.data).descendants(),i=r.filter(({data:a})=>o.nodeId(a).toString()===o.nodeId(e).toString())[0];return r.filter(({data:a})=>o.nodeId(a).toString()===o.parentNodeId(e).toString())[0],i?(console.log(`ORG CHART - ADD - Node with id "${o.nodeId(e)}" already exists in tree`),this):(e._centered&&!e._expanded&&(e._expanded=!0),o.data.push(e),this.updateNodesState(),this)}removeNode(e){const o=this.getChartState(),r=o.generateRoot(o.data).descendants().filter(({data:i})=>o.nodeId(i)==e)[0];return r?(r.descendants().forEach(i=>i.data._filteredOut=!0),o.data=o.data.filter(i=>!i._filteredOut),o.data.length==0?this.render():this.updateNodesState.bind(this)(),this):(console.log(`ORG CHART - REMOVE - Node with id "${e}" not found in the tree`),this)}groupBy(e,o,r){const i={};return e.forEach(a=>{const s=o(a);i[s]||(i[s]=[]),i[s].push(a)}),Object.keys(i).forEach(a=>{i[a]=r(i[a])}),Object.entries(i)}calculateCompactFlexDimensions(e){const o=this.getChartState();e.eachBefore(r=>{r.firstCompact=null,r.compactEven=null,r.flexCompactDim=null,r.firstCompactNode=null}),e.eachBefore(r=>{if(r.children&&r.children.length>1){const i=r.children.filter(u=>!u.children);if(i.length<2)return;i.forEach((u,h)=>{h||(u.firstCompact=!0),h%2?u.compactEven=!1:u.compactEven=!0,u.row=Math.floor(h/2)});const a=Xt.max(i.filter(u=>u.compactEven),o.layoutBindings[o.layout].compactDimension.sizeColumn),s=Xt.max(i.filter(u=>!u.compactEven),o.layoutBindings[o.layout].compactDimension.sizeColumn),l=Math.max(a,s)*2,c=this.groupBy(i,u=>u.row,u=>Xt.max(u,h=>o.layoutBindings[o.layout].compactDimension.sizeRow(h)+o.compactMarginBetween(h))),d=Xt.sum(c.map(u=>u[1]));i.forEach(u=>{u.firstCompactNode=i[0],u.firstCompact?u.flexCompactDim=[l+o.compactMarginPair(u),d-o.compactMarginBetween(u)]:u.flexCompactDim=[0,0]}),r.flexCompactDim=null}})}calculateCompactFlexPositions(e){const o=this.getChartState();e.eachBefore(r=>{if(r.children){const i=r.children.filter(u=>u.flexCompactDim),a=i[0];if(!a)return;i.forEach((u,h,p)=>{h==0&&(a.x-=a.flexCompactDim[0]/2),h&h%2-1?u.x=a.x+a.flexCompactDim[0]*.25-o.compactMarginPair(u)/4:h&&(u.x=a.x+a.flexCompactDim[0]*.75+o.compactMarginPair(u)/4)});const s=a.x+a.flexCompactDim[0]*.5;a.x=a.x+a.flexCompactDim[0]*.25-o.compactMarginPair(a)/4;const l=r.x-s;Math.abs(l)<10&&i.forEach(u=>u.x+=l);const c=this.groupBy(i,u=>u.row,u=>Xt.max(u,h=>o.layoutBindings[o.layout].compactDimension.sizeRow(h))),d=Xt.cumsum(c.map(u=>u[1]+o.compactMarginBetween(u)));i.forEach((u,h)=>{u.row?u.y=a.y+d[u.row-1]:u.y=a.y})}})}update({x0:e,y0:o,x:r=0,y:i=0,width:a,height:s}){const l=this.getChartState();l.calc,l.compact&&this.calculateCompactFlexDimensions(l.root);const c=l.flexTreeLayout(l.root);l.compact&&this.calculateCompactFlexPositions(l.root);const d=c.descendants(),u=c.descendants().slice(1);d.forEach(l.layoutBindings[l.layout].swap);const h=l.connections,p={};l.allNodes.forEach(L=>p[l.nodeId(L.data)]=L);const m={};d.forEach(L=>m[l.nodeId(L.data)]=L),h.forEach(L=>{const q=p[L.from],H=p[L.to];L._source=q,L._target=H});const g=h.filter(L=>m[L.from]&&m[L.to]),_=l.defs.bind(this)(l,g),C=l.defsWrapper.html();_!==C&&l.defsWrapper.html(_);const M=l.linksWrapper.selectAll("path.link").data(u,L=>l.nodeId(L.data)),N=M.enter().insert("path","g").attr("class","link").attr("d",L=>{const q=l.layoutBindings[l.layout].linkJoinX({x:e,y:o,width:a,height:s}),H=l.layoutBindings[l.layout].linkJoinY({x:e,y:o,width:a,height:s}),I={x:q,y:H};return l.layoutBindings[l.layout].diagonal(I,I,I)}).merge(M);N.attr("fill","none"),this.isEdge()?N.style("display",L=>L.data._pagingButton?"none":"auto"):N.attr("display",L=>L.data._pagingButton?"none":"auto"),N.each(l.linkUpdate),N.transition().duration(l.duration).attr("d",L=>{const q=l.compact&&L.flexCompactDim?{x:l.layoutBindings[l.layout].compactLinkMidX(L,l),y:l.layoutBindings[l.layout].compactLinkMidY(L,l)}:{x:l.layoutBindings[l.layout].linkX(L),y:l.layoutBindings[l.layout].linkY(L)},H={x:l.layoutBindings[l.layout].linkParentX(L),y:l.layoutBindings[l.layout].linkParentY(L)},I=l.compact&&L.flexCompactDim?{x:l.layoutBindings[l.layout].linkCompactXStart(L),y:l.layoutBindings[l.layout].linkCompactYStart(L)}:q;return l.layoutBindings[l.layout].diagonal(q,H,I,{sy:l.linkYOffset})}),M.exit().transition().duration(l.duration).attr("d",L=>{const q=l.layoutBindings[l.layout].linkJoinX({x:r,y:i,width:a,height:s}),H=l.layoutBindings[l.layout].linkJoinY({x:r,y:i,width:a,height:s}),I={x:q,y:H};return l.layoutBindings[l.layout].diagonal(I,I,null,{sy:l.linkYOffset})}).remove();const P=l.connectionsWrapper.selectAll("path.connection").data(g),V=P.enter().insert("path","g").attr("class","connection").attr("d",L=>{const q=l.layoutBindings[l.layout].linkJoinX({x:e,y:o,width:a,height:s}),H=l.layoutBindings[l.layout].linkJoinY({x:e,y:o,width:a,height:s}),I={x:q,y:H};return l.layoutBindings[l.layout].diagonal(I,I,null,{sy:l.linkYOffset})}).merge(P);V.attr("fill","none"),V.transition().duration(l.duration).attr("d",L=>{const q=l.layoutBindings[l.layout].linkX({x:L._source.x,y:L._source.y,width:L._source.width,height:L._source.height}),H=l.layoutBindings[l.layout].linkY({x:L._source.x,y:L._source.y,width:L._source.width,height:L._source.height}),I=l.layoutBindings[l.layout].linkJoinX({x:L._target.x,y:L._target.y,width:L._target.width,height:L._target.height}),U=l.layoutBindings[l.layout].linkJoinY({x:L._target.x,y:L._target.y,width:L._target.width,height:L._target.height});return l.linkGroupArc({source:{x:q,y:H},target:{x:I,y:U}})}),V.each(l.connectionsUpdate),P.exit().transition().duration(l.duration).attr("opacity",0).remove();const K=l.nodesWrapper.selectAll("g.node").data(d,({data:L})=>l.nodeId(L)),X=K.enter().append("g").attr("class","node").attr("transform",L=>{if(L==l.root)return`translate(${e},${o})`;const q=l.layoutBindings[l.layout].nodeJoinX({x:e,y:o,width:a,height:s}),H=l.layoutBindings[l.layout].nodeJoinY({x:e,y:o,width:a,height:s});return`translate(${q},${H})`}).attr("cursor","pointer").on("click.node",(L,q)=>{const{data:H}=q;if(![...L.srcElement.classList].includes("node-button-foreign-object")){if([...L.srcElement.classList].includes("paging-button-wrapper")){this.loadPagingNodes(q);return}if(!H._pagingButton){l.onNodeClick(q);return}console.log("event fired, no handlers")}}).on("keydown.node",(L,q)=>{const{data:H}=q;if(L.key==="Enter"||L.key===" "||L.key==="Spacebar"){if([...L.srcElement.classList].includes("node-button-foreign-object"))return;if([...L.srcElement.classList].includes("paging-button-wrapper")){this.loadPagingNodes(q);return}(L.key==="Enter"||L.key===" "||L.key==="Spacebar")&&this.onButtonClick(L,q)}});X.each(l.nodeEnter),X.patternify({tag:"rect",selector:"node-rect",data:L=>[L]});const rt=X.merge(K).style("font","12px sans-serif");rt.patternify({tag:"foreignObject",selector:"node-foreign-object",data:L=>[L]}).style("overflow","visible").patternify({tag:"xhtml:div",selector:"node-foreign-object-div",data:L=>[L]}),this.restyleForeignObjectElements();const pt=X.patternify({tag:"g",selector:"node-button-g",data:L=>[L]}).on("click",(L,q)=>this.onButtonClick(L,q)).on("keydown",(L,q)=>{(L.key==="Enter"||L.key===" "||L.key==="Spacebar")&&this.onButtonClick(L,q)});pt.patternify({tag:"rect",selector:"node-button-rect",data:L=>[L]}).attr("opacity",0).attr("pointer-events","all").attr("width",L=>l.nodeButtonWidth(L)).attr("height",L=>l.nodeButtonHeight(L)).attr("x",L=>l.nodeButtonX(L)).attr("y",L=>l.nodeButtonY(L)),pt.patternify({tag:"foreignObject",selector:"node-button-foreign-object",data:L=>[L]}).attr("width",L=>l.nodeButtonWidth(L)).attr("height",L=>l.nodeButtonHeight(L)).attr("x",L=>l.nodeButtonX(L)).attr("y",L=>l.nodeButtonY(L)).style("overflow","visible").patternify({tag:"xhtml:div",selector:"node-button-div",data:L=>[L]}).style("pointer-events","none").style("display","flex").style("width","100%").style("height","100%"),rt.transition().attr("opacity",0).duration(l.duration).attr("transform",({x:L,y:q,width:H,height:I})=>l.layoutBindings[l.layout].nodeUpdateTransform({x:L,y:q,width:H,height:I})).attr("opacity",1),rt.select(".node-rect").attr("width",({width:L})=>L).attr("height",({height:L})=>L).attr("x",({width:L})=>0).attr("y",({height:L})=>0).attr("cursor","pointer").attr("rx",3).attr("fill",l.nodeDefaultBackground),rt.select(".node-button-g").attr("transform",({data:L,width:q,height:H})=>{const I=l.layoutBindings[l.layout].buttonX({width:q,height:H}),U=l.layoutBindings[l.layout].buttonY({width:q,height:H});return`translate(${I},${U})`}).attr("display",({data:L})=>L._directSubordinates>0?null:"none").attr("opacity",({data:L,children:q,_children:H})=>L._pagingButton?0:q||H?1:0),rt.select(".node-button-foreign-object .node-button-div").html(L=>l.buttonContent({node:L,state:l})),rt.select(".node-button-text").attr("text-anchor","middle").attr("alignment-baseline","middle").attr("font-size",({children:L})=>L?40:26).text(({children:L})=>L?"-":"+").attr("y",this.isEdge()?10:0),rt.each(l.nodeUpdate);const it=K.exit();it.each(l.nodeExit);const et=it.data().reduce((L,q)=>L.depth<q.depth?L:q,{depth:1/0});it.attr("opacity",1).transition().duration(l.duration).attr("transform",L=>{let{x:q,y:H,width:I,height:U}=et.parent||{};const z=l.layoutBindings[l.layout].nodeJoinX({x:q,y:H,width:I,height:U}),j=l.layoutBindings[l.layout].nodeJoinY({x:q,y:H,width:I,height:U});return`translate(${z},${j})`}).on("end",function(){Xt.select(this).remove()}).attr("opacity",0),d.forEach(L=>{L.x0=L.x,L.y0=L.y});const ut=l.allNodes.filter(L=>L.data._centered)[0];if(ut){let L=[ut];ut.data._centeredWithDescendants&&(l.compact?L=ut.descendants().filter((q,H)=>H<7):L=ut.descendants().filter((q,H,I)=>{const U=Math.round(I.length/2),z=2;return I.length%2?H>U-z&&H<U+z-1:H>U-z&&H<U+z})),ut.data._centeredWithDescendants=null,ut.data._centered=null,this.fit({animate:!0,scale:!1,nodes:L})}}isEdge(){return window.navigator.userAgent.includes("Edge")}hdiagonal(e,o,r,i){return this.getChartState().hdiagonal(e,o,r,i)}diagonal(e,o,r,i){return this.getChartState().diagonal(e,o,r,i)}restyleForeignObjectElements(){const e=this.getChartState();e.svg.selectAll(".node-foreign-object").attr("width",({width:o})=>o).attr("height",({height:o})=>o).attr("x",({width:o})=>0).attr("y",({height:o})=>0),e.svg.selectAll(".node-foreign-object-div").style("width",({width:o})=>`${o}px`).style("height",({height:o})=>`${o}px`).html(function(o,r,i){return o.data._pagingButton?`<div class="paging-button-wrapper"><div style="pointer-events:none">${e.pagingButton(o,r,i,e)}</div></div>`:e.nodeContent.bind(this)(o,r,i,e)})}onButtonClick(e,o){const r=this.getChartState();o.data._pagingButton||(r.setActiveNodeCentered&&(o.data._centered=!0,o.data._centeredWithDescendants=!0),o.children?(o._children=o.children,o.children=null,this.setExpansionFlagToChildren(o,!1)):(o.children=o._children,o._children=null,o.children&&o.children.forEach(({data:i})=>i._expanded=!0)),this.update(o),e.stopPropagation(),r.onExpandOrCollapse(o))}setExpansionFlagToChildren({data:e,children:o,_children:r},i){e._expanded=i,o&&o.forEach(a=>{this.setExpansionFlagToChildren(a,i)}),r&&r.forEach(a=>{this.setExpansionFlagToChildren(a,i)})}expandSomeNodes(e){if(e.data._expanded){let o=e.parent;for(;o&&o._children;)o.children=o._children,o._children=null,o=o.parent}e._children&&e._children.forEach(o=>this.expandSomeNodes(o)),e.children&&e.children.forEach(o=>this.expandSomeNodes(o))}updateNodesState(){const e=this.getChartState();this.setLayouts({expandNodesFirst:!0}),this.update(e.root)}setLayouts({expandNodesFirst:e=!0}){const o=this.getChartState();o.generateRoot=Xt.stratify().id(a=>o.nodeId(a)).parentId(a=>o.parentNodeId(a)),o.root=o.generateRoot(o.data);const r=o.root.descendants();o.initialExpandLevel>1&&r.length>0&&(r.forEach(a=>{a.depth<=o.initialExpandLevel&&(a.data._expanded=!0)}),o.initialExpandLevel=1);const i={};o.root.descendants().filter(a=>a.children).filter(a=>!a.data._pagingStep).forEach(a=>{a.data._pagingStep=o.minPagingVisibleNodes(a)}),o.root.eachBefore((a,s)=>{a.data._directSubordinatesPaging=a.children?a.children.length:0,a.children&&a.children.forEach((l,c)=>{if(l.data._pagingButton=!1,c>a.data._pagingStep&&(i[l.id]=!0),c===a.data._pagingStep&&a.children.length-1>a.data._pagingStep&&(l.data._pagingButton=!0),i[l.parent.id]&&(i[l.id]=!0),l.data._expanded||l.data._centered||l.data._highlighted||l.data._upToTheRootHighlighted){let d=l;for(;d&&(i[d.id]||d.data._pagingButton);)i[d.id]=!1,d.data._pagingButton&&(d.data._pagingButton=!1,d.parent.children.forEach(u=>{u.data._expanded=!0,i[u.id]=!1})),d=d.parent}})}),o.root=Xt.stratify().id(a=>o.nodeId(a)).parentId(a=>o.parentNodeId(a))(o.data.filter(a=>i[a.id]!==!0)),o.root.each((a,s,l)=>{let c=a._hierarchyHeight||a.height,d=o.nodeWidth(a),u=o.nodeHeight(a);Object.assign(a,{width:d,height:u,_hierarchyHeight:c})}),o.root.x0=0,o.root.y0=0,o.allNodes=o.root.descendants(),o.allNodes.forEach(a=>{Object.assign(a.data,{_directSubordinates:a.children?a.children.length:0,_totalSubordinates:a.descendants().length-1})}),o.root.children&&(e&&o.root.children.forEach(this.expand),o.root.children.forEach(a=>this.collapse(a)),o.initialExpandLevel==0&&(o.root._children=o.root.children,o.root.children=null),[o.root].forEach(a=>this.expandSomeNodes(a)))}collapse(e){e.children&&(e._children=e.children,e._children.forEach(o=>this.collapse(o)),e.children=null)}expand(e){e._children&&(e.children=e._children,e.children.forEach(o=>this.expand(o)),e._children=null)}zoomed(e,o){const r=this.getChartState(),i=r.chart,a=e.transform;r.lastTransform=a,i.attr("transform",a),this.isEdge()&&this.restyleForeignObjectElements()}zoomTreeBounds({x0:e,x1:o,y0:r,y1:i,params:a={animate:!0,scale:!0,onCompleted:()=>{}}}){const{centerG:s,svgWidth:l,svgHeight:c,svg:d,zoomBehavior:u,duration:h,lastTransform:p}=this.getChartState();let m=Math.min(8,.9/Math.max((o-e)/l,(i-r)/c)),g=Xt.zoomIdentity.translate(l/2,c/2);g=g.scale(a.scale?m:p.k),g=g.translate(-(e+o)/2,-(r+i)/2),d.transition().duration(a.animate?h:0).call(u.transform,g),s.transition().duration(a.animate?h:0).attr("transform","translate(0,0)").on("end",function(){a.onCompleted&&a.onCompleted()})}fit({animate:e=!0,nodes:o,scale:r=!0,onCompleted:i=()=>{}}={}){const a=this.getChartState(),{root:s}=a;let l=o||s.descendants();const c=Xt.min(l,p=>p.x+a.layoutBindings[a.layout].nodeLeftX(p)),d=Xt.max(l,p=>p.x+a.layoutBindings[a.layout].nodeRightX(p)),u=Xt.min(l,p=>p.y+a.layoutBindings[a.layout].nodeTopY(p)),h=Xt.max(l,p=>p.y+a.layoutBindings[a.layout].nodeBottomY(p));return this.zoomTreeBounds({params:{animate:e,scale:r,onCompleted:i},x0:c-50,x1:d+50,y0:u-50,y1:h+50}),this}loadPagingNodes(e){const o=this.getChartState();e.data._pagingButton=!1;const r=e.parent.data._pagingStep,i=o.pagingStep(e.parent),a=r+i;e.parent.data._pagingStep=a,this.updateNodesState()}setExpanded(e,o=!0){const r=this.getChartState(),i=r.allNodes.filter(({data:a})=>r.nodeId(a)==e)[0];if(!i)return console.log(`ORG CHART - ${o?"EXPAND":"COLLAPSE"} - Node with id (${e}) not found in the tree`),this;if(i.data._expanded=o,o==!1){const a=i.parent||{descendants:()=>[]};a.descendants().filter(s=>s!=a).forEach(s=>s.data._expanded=!1)}return this}setCentered(e){const o=this.getChartState(),r=o.generateRoot(o.data).descendants().filter(({data:i})=>o.nodeId(i).toString()==e.toString())[0];return r?(r.ancestors().forEach(i=>i.data._expanded=!0),r.data._centered=!0,r.data._expanded=!0,this):(console.log(`ORG CHART - CENTER - Node with id (${e}) not found in the tree`),this)}setHighlighted(e){const o=this.getChartState(),r=o.generateRoot(o.data).descendants().filter(i=>o.nodeId(i.data).toString()===e.toString())[0];return r?(r.ancestors().forEach(i=>i.data._expanded=!0),r.data._highlighted=!0,r.data._expanded=!0,r.data._centered=!0,this):(console.log(`ORG CHART - HIGHLIGHT - Node with id (${e}) not found in the tree`),this)}setUpToTheRootHighlighted(e){const o=this.getChartState(),r=o.generateRoot(o.data).descendants().filter(i=>o.nodeId(i.data).toString()===e.toString())[0];return r?(r.ancestors().forEach(i=>i.data._expanded=!0),r.data._upToTheRootHighlighted=!0,r.data._expanded=!0,r.ancestors().forEach(i=>i.data._upToTheRootHighlighted=!0),this):(console.log(`ORG CHART - HIGHLIGHTROOT - Node with id (${e}) not found in the tree`),this)}clearHighlighting(){const e=this.getChartState();return e.allNodes.forEach(o=>{o.data._highlighted=!1,o.data._upToTheRootHighlighted=!1}),this.update(e.root),this}fullscreen(e){const o=this.getChartState(),r=Xt.select(e||o.container).node();Xt.select(document).on("fullscreenchange."+o.id,function(i){(document.fullscreenElement||document.mozFullscreenElement||document.webkitFullscreenElement)==r?setTimeout(a=>{o.svg.attr("height",window.innerHeight-40)},500):o.svg.attr("height",o.svgHeight)}),r.requestFullscreen?r.requestFullscreen():r.mozRequestFullScreen?r.mozRequestFullScreen():r.webkitRequestFullscreen?r.webkitRequestFullscreen():r.msRequestFullscreen&&r.msRequestFullscreen()}zoomIn(){const{svg:e,zoomBehavior:o}=this.getChartState();e.transition().call(o.scaleBy,1.3)}zoomOut(){const{svg:e,zoomBehavior:o}=this.getChartState();e.transition().call(o.scaleBy,.78)}toDataURL(e,o){var r=new XMLHttpRequest;r.onload=function(){var i=new FileReader;i.onloadend=function(){o(i.result)},i.readAsDataURL(r.response)},r.open("GET",e),r.responseType="blob",r.send()}exportImg({full:e=!1,scale:o=3,onLoad:r=s=>s,save:i=!0,backgroundColor:a="#FAFAFA"}={}){const s=this,l=this.getChartState(),{svg:c,root:d}=l;let u=0;const h=c.selectAll("img");let p=h.size();const m=()=>{JSON.parse(JSON.stringify(s.lastTransform()));const g=s.duration();e&&s.fit();const{svg:_}=s.getChartState();setTimeout(C=>{s.downloadImage({node:_.node(),scale:o,isSvg:!1,backgroundColor:a,onAlreadySerialized:M=>{s.update(d)},imageName:l.imageName,onLoad:r,save:i})},e?g+10:0)};p>0?h.each(function(){s.toDataURL(this.src,g=>{this.src=g,++u==p&&m()})}):m()}exportSvg(){const{svg:e,imageName:o}=this.getChartState();return this.downloadImage({imageName:o,node:e.node(),scale:3,isSvg:!0}),this}expandAll(){const{allNodes:e,root:o,data:r}=this.getChartState();return r.forEach(i=>i._expanded=!0),this.render(),this}collapseAll(){const{allNodes:e,root:o}=this.getChartState();return e.forEach(r=>r.data._expanded=!1),this.initialExpandLevel(0),this.render(),this}downloadImage({node:e,scale:o=2,imageName:r="graph",isSvg:i=!1,save:a=!0,backgroundColor:s="#FAFAFA",onAlreadySerialized:l=d=>{},onLoad:c=d=>{}}){const d=e;function u(_,C){var M=document.createElement("a");typeof M.download=="string"?(document.body.appendChild(M),M.download=C,M.href=_,M.click(),document.body.removeChild(M)):location.replace(_)}function h(_){const C="http://www.w3.org/2000/xmlns/",M="http://www.w3.org/1999/xlink",N="http://www.w3.org/2000/svg";_=_.cloneNode(!0);const P=window.location.href+"#",V=document.createTreeWalker(_,NodeFilter.SHOW_ELEMENT,null,!1);for(;V.nextNode();)for(const K of V.currentNode.attributes)K.value.includes(P)&&(K.value=K.value.replace(P,"#"));return _.setAttributeNS(C,"xmlns",N),_.setAttributeNS(C,"xmlns:xlink",M),new XMLSerializer().serializeToString(_)}if(i){let _=h(d);_=`<?xml version="1.0" standalone="no"?>\r `+_;var g="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(_);u(g,r+".svg"),l();return}const p=o,m=document.createElement("img");m.onload=function(){const _=document.createElement("canvas"),C=d.getBoundingClientRect();_.width=C.width*p,_.height=C.height*p;const M=_.getContext("2d");M.fillStyle=s,M.fillRect(0,0,C.width*p,C.height*p),M.drawImage(m,0,0,C.width*p,C.height*p);let N=_.toDataURL("image/png");c&&c(N),a&&u(N,r+".png")};var g="data:image/svg+xml; charset=utf8, "+encodeURIComponent(h(d));l(),m.src=g}getTextWidth(e,{fontSize:o=14,fontWeight:r=400,defaultFont:i="Helvetice",ctx:a}={}){return a.font=`${r||""} ${o}px ${i} `,a.measureText(e).width}clear(){const e=this.getChartState();Xt.select(window).on(`resize.${e.id}`,null),e.svg&&e.svg.selectAll("*").remove()}};const $k={name:"ChartTemplate",components:{Avatar:Wn},props:{chartData:{type:Object,default:()=>{}},onAvatarClick:{type:Function,default:()=>{}}},computed:{selectedChart(){return this.$route.params.selectedChart}}},Vk={class:"org-chart-node"},Bk={class:"inner-box"},Uk={class:"main-container"},Hk={class:"fullName"},zk={class:"title"},Gk={class:"description"},Fk={key:0},Yk={key:1};function Xk(e,o,r,i,a,s){const l=w("Avatar"),c=w("router-link");return f(),k("div",Vk,[D("div",Bk,[E(c,{to:{name:"contact",params:{selectedGroup:s.selectedChart,selectedContact:r.chartData.key}}},{default:S(()=>[E(l,{"disable-tooltip":!0,"display-name":r.chartData.fullName,"is-no-user":!0,size:60,url:r.chartData.photoUrl,class:"org-chart-node__avatar"},null,8,["display-name","url"])]),_:1},8,["to"]),o[0]||(o[0]=D("div",{class:"panel"},null,-1)),D("div",Uk,[D("h3",Hk,O(r.chartData.fullName),1),D("h4",zk,O(r.chartData.title),1)]),D("div",Gk,[r.chartData._directSubordinates?(f(),k("p",Fk,O(e.t("contacts","Manages"))+": "+O(r.chartData._directSubordinates),1)):R("",!0),r.chartData._totalSubordinates?(f(),k("p",Yk,O(e.t("contacts","Oversees"))+": "+O(r.chartData._totalSubordinates),1)):R("",!0)])])])}const jk=tt($k,[["render",Xk],["__scopeId","data-v-c955ad94"]]),Wk={name:"OrgChart",components:{NcSelect:wo},props:{data:{type:Array,default:()=>[]}},data(){return{chartReference:null,chart:0}},computed:{charts(){return this.data.map((e,o)=>{const r=e.find(i=>i.parentNodeId===null);return{id:o,label:r.org?`${r.org} (${r.fullName})`:r.fullName}}).sort((e,o)=>e.label.localeCompare(o.label,N0().replace("_","-"),{sensitivity:"base"}))},placeholder(){return t("contacts","Select chart …")}},watch:{data(){this.data[this.chart]?.length&&this.renderChart(this.data[this.chart])}},mounted(){this.data[this.chart]?.length&&this.renderChart(this.data[this.chart])},methods:{chartChanged(e){this.renderChart(this.data[e.id])},goToContact(e){this.$router.push({name:"contact",params:{selectedGroup:this.$route.params.selectedChart,selectedContact:e}})},renderChart(e){const o=this;this.chartReference||(this.chartReference=new Pk),this.chartReference.container(this.$refs.svgElementContainer).data(e).nodeWidth(()=>250).initialZoom(1).nodeHeight(()=>200).childrenMargin(()=>70).compactMarginBetween(()=>15).compactMarginPair(()=>80).nodeContent(()=>"").nodeUpdate(function(r){const i=this.querySelector(".node-foreign-object-div");if(i)if(r.data.rendered)i.appendChild(r.data.rendered);else{const a=Tp(jk,{chartData:r.data,onAvatarClick:l=>o.goToContact(l)});a.use(ic),a.mixin(Mp);const s=document.createElement("div");a.mount(s),r.data.rendered=s,i.appendChild(s)}He(this).select(".inner-box").attr("class",a=>a.data._highlighted||a.data._upToTheRootHighlighted?"inner-box inner-box-highlight":"inner-box")}).linkUpdate(function(r){He(this).attr("stroke",()=>"var(--color-primary-element)").attr("stroke-width",i=>i.data._upToTheRootHighlighted?2:1),r.data._upToTheRootHighlighted&&He(this).raise()}).onNodeClick(r=>{this.chartReference.data().filter(i=>i.nodeId===r.id)[0]?._upToTheRootHighlighted?this.chartReference.clearHighlighting():(this.chartReference.clearHighlighting(),this.chartReference.setUpToTheRootHighlighted(r.id).render())}).render()}}},qk={class:"org-chart"},Zk={key:0,class:"org-chart__menu"},Jk={ref:"svgElementContainer",class:"org-chart__container"};function Kk(e,o,r,i,a,s){const l=w("NcSelect");return f(),k("div",qk,[r.data.length>1?(f(),k("div",Zk,[D("h3",null,O(e.t("contacts","Chart"))+": ",1),E(l,{modelValue:a.chart,"onUpdate:modelValue":[o[0]||(o[0]=c=>a.chart=c),s.chartChanged],class:"chart-selection",disabled:r.data.length===1,options:s.charts,"allow-empty":!1,searchable:!1,placeholder:s.placeholder,"input-id":"select-chart-input",label:"label"},null,8,["modelValue","disabled","options","placeholder","onUpdate:modelValue"])])):R("",!0),D("div",Jk,null,512)])}const Qk=tt(Wk,[["render",Kk]]),tS={name:"ChartContent",components:{AppContent:_c,OrgChart:Qk},props:{contactsList:{type:Object,required:!0}},data(){return{data:[],searchQuery:""}},computed:{transformData(){const e={},o=Object.keys(this.contactsList).map(s=>{const[l,c]=en.from(s,"base64").toString("utf-8").split("~");return e[c]||(e[c]={}),e[c][l]=this.contactsList[s]}),r=[],i=o.filter(s=>s.managersName).reduce((s,l)=>{s.push(Vs(l));const c=e[l.addressbook.id][l.managersName];return c&&!c.managersName&&!r.some(d=>d.nodeId===c.uid)&&(s.push(Vs(c)),r.push(Vs(c))),s},[]),a=r.map(s=>Hg(i,s));return console.debug("Org charts",a.map((s,l)=>s.map(c=>`list ${l} ${c.nodeId} (${c.fullName}) -> ${c.parentNodeId}`))),a}}};function eS(e,o,r,i,a,s){const l=w("OrgChart"),c=w("AppContent");return f(),T(c,null,{default:S(()=>[E(l,{data:s.transformData},null,8,["data"])]),_:1})}const nS=tt(tS,[["render",eS]]),oS={name:"AccountGroupOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},rS=["aria-hidden","aria-label"],iS=["fill","width","height"],aS={d:"M12,5A3.5,3.5 0 0,0 8.5,8.5A3.5,3.5 0 0,0 12,12A3.5,3.5 0 0,0 15.5,8.5A3.5,3.5 0 0,0 12,5M12,7A1.5,1.5 0 0,1 13.5,8.5A1.5,1.5 0 0,1 12,10A1.5,1.5 0 0,1 10.5,8.5A1.5,1.5 0 0,1 12,7M5.5,8A2.5,2.5 0 0,0 3,10.5C3,11.44 3.53,12.25 4.29,12.68C4.65,12.88 5.06,13 5.5,13C5.94,13 6.35,12.88 6.71,12.68C7.08,12.47 7.39,12.17 7.62,11.81C6.89,10.86 6.5,9.7 6.5,8.5C6.5,8.41 6.5,8.31 6.5,8.22C6.2,8.08 5.86,8 5.5,8M18.5,8C18.14,8 17.8,8.08 17.5,8.22C17.5,8.31 17.5,8.41 17.5,8.5C17.5,9.7 17.11,10.86 16.38,11.81C16.5,12 16.63,12.15 16.78,12.3C16.94,12.45 17.1,12.58 17.29,12.68C17.65,12.88 18.06,13 18.5,13C18.94,13 19.35,12.88 19.71,12.68C20.47,12.25 21,11.44 21,10.5A2.5,2.5 0 0,0 18.5,8M12,14C9.66,14 5,15.17 5,17.5V19H19V17.5C19,15.17 14.34,14 12,14M4.71,14.55C2.78,14.78 0,15.76 0,17.5V19H3V17.07C3,16.06 3.69,15.22 4.71,14.55M19.29,14.55C20.31,15.22 21,16.06 21,17.07V19H24V17.5C24,15.76 21.22,14.78 19.29,14.55M12,16C13.53,16 15.24,16.5 16.23,17H7.77C8.76,16.5 10.47,16 12,16Z"},sS={key:0};function lS(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon account-group-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",aS,[r.title?(f(),k("title",sS,O(r.title),1)):R("",!0)])],8,iS))],16,rS)}const as=tt(oS,[["render",lS]]);var Hi={},ch={exports:{}},dh={};const Ar=Symbol(""),hr=Symbol(""),ss=Symbol(""),pi=Symbol(""),Vc=Symbol(""),bo=Symbol(""),Bc=Symbol(""),Uc=Symbol(""),ls=Symbol(""),cs=Symbol(""),Pr=Symbol(""),ds=Symbol(""),Hc=Symbol(""),us=Symbol(""),hs=Symbol(""),ps=Symbol(""),fs=Symbol(""),ms=Symbol(""),gs=Symbol(""),zc=Symbol(""),Gc=Symbol(""),Ai=Symbol(""),fi=Symbol(""),ys=Symbol(""),vs=Symbol(""),Er=Symbol(""),$r=Symbol(""),bs=Symbol(""),Ma=Symbol(""),Df=Symbol(""),Ia=Symbol(""),mi=Symbol(""),Rf=Symbol(""),Pf=Symbol(""),_s=Symbol(""),$f=Symbol(""),Vf=Symbol(""),Cs=Symbol(""),Fc=Symbol(""),jo={[Ar]:"Fragment",[hr]:"Teleport",[ss]:"Suspense",[pi]:"KeepAlive",[Vc]:"BaseTransition",[bo]:"openBlock",[Bc]:"createBlock",[Uc]:"createElementBlock",[ls]:"createVNode",[cs]:"createElementVNode",[Pr]:"createCommentVNode",[ds]:"createTextVNode",[Hc]:"createStaticVNode",[us]:"resolveComponent",[hs]:"resolveDynamicComponent",[ps]:"resolveDirective",[fs]:"resolveFilter",[ms]:"withDirectives",[gs]:"renderList",[zc]:"renderSlot",[Gc]:"createSlots",[Ai]:"toDisplayString",[fi]:"mergeProps",[ys]:"normalizeClass",[vs]:"normalizeStyle",[Er]:"normalizeProps",[$r]:"guardReactiveProps",[bs]:"toHandlers",[Ma]:"camelize",[Df]:"capitalize",[Ia]:"toHandlerKey",[mi]:"setBlockTracking",[Rf]:"pushScopeId",[Pf]:"popScopeId",[_s]:"withCtx",[$f]:"unref",[Vf]:"isRef",[Cs]:"withMemo",[Fc]:"isMemoSame"};function Bf(e){Object.getOwnPropertySymbols(e).forEach(o=>{jo[o]=e[o]})}const cS={HTML:0,0:"HTML",SVG:1,1:"SVG",MATH_ML:2,2:"MATH_ML"},dS={ROOT:0,0:"ROOT",ELEMENT:1,1:"ELEMENT",TEXT:2,2:"TEXT",COMMENT:3,3:"COMMENT",SIMPLE_EXPRESSION:4,4:"SIMPLE_EXPRESSION",INTERPOLATION:5,5:"INTERPOLATION",ATTRIBUTE:6,6:"ATTRIBUTE",DIRECTIVE:7,7:"DIRECTIVE",COMPOUND_EXPRESSION:8,8:"COMPOUND_EXPRESSION",IF:9,9:"IF",IF_BRANCH:10,10:"IF_BRANCH",FOR:11,11:"FOR",TEXT_CALL:12,12:"TEXT_CALL",VNODE_CALL:13,13:"VNODE_CALL",JS_CALL_EXPRESSION:14,14:"JS_CALL_EXPRESSION",JS_OBJECT_EXPRESSION:15,15:"JS_OBJECT_EXPRESSION",JS_PROPERTY:16,16:"JS_PROPERTY",JS_ARRAY_EXPRESSION:17,17:"JS_ARRAY_EXPRESSION",JS_FUNCTION_EXPRESSION:18,18:"JS_FUNCTION_EXPRESSION",JS_CONDITIONAL_EXPRESSION:19,19:"JS_CONDITIONAL_EXPRESSION",JS_CACHE_EXPRESSION:20,20:"JS_CACHE_EXPRESSION",JS_BLOCK_STATEMENT:21,21:"JS_BLOCK_STATEMENT",JS_TEMPLATE_LITERAL:22,22:"JS_TEMPLATE_LITERAL",JS_IF_STATEMENT:23,23:"JS_IF_STATEMENT",JS_ASSIGNMENT_EXPRESSION:24,24:"JS_ASSIGNMENT_EXPRESSION",JS_SEQUENCE_EXPRESSION:25,25:"JS_SEQUENCE_EXPRESSION",JS_RETURN_STATEMENT:26,26:"JS_RETURN_STATEMENT"},uS={ELEMENT:0,0:"ELEMENT",COMPONENT:1,1:"COMPONENT",SLOT:2,2:"SLOT",TEMPLATE:3,3:"TEMPLATE"},hS={NOT_CONSTANT:0,0:"NOT_CONSTANT",CAN_SKIP_PATCH:1,1:"CAN_SKIP_PATCH",CAN_CACHE:2,2:"CAN_CACHE",CAN_STRINGIFY:3,3:"CAN_STRINGIFY"},Ce={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function Uf(e,o=""){return{type:0,source:o,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:Ce}}function Nr(e,o,r,i,a,s,l,c=!1,d=!1,u=!1,h=Ce){return e&&(c?(e.helper(bo),e.helper(Zo(e.inSSR,u))):e.helper(qo(e.inSSR,u)),l&&e.helper(ms)),{type:13,tag:o,props:r,children:i,patchFlag:a,dynamicProps:s,directives:l,isBlock:c,disableTracking:d,isComponent:u,loc:h}}function mo(e,o=Ce){return{type:17,loc:o,elements:e}}function Ye(e,o=Ce){return{type:15,loc:o,properties:e}}function ue(e,o){return{type:16,loc:Ce,key:_e(e)?Ct(e,!0):e,value:o}}function Ct(e,o=!1,r=Ce,i=0){return{type:4,loc:r,content:e,isStatic:o,constType:o?3:i}}function pS(e,o){return{type:5,loc:o,content:_e(e)?Ct(e,!1,o):e}}function tn(e,o=Ce){return{type:8,loc:o,children:e}}function ge(e,o=[],r=Ce){return{type:14,loc:r,callee:e,arguments:o}}function Wo(e,o=void 0,r=!1,i=!1,a=Ce){return{type:18,params:e,returns:o,newline:r,isSlot:i,loc:a}}function Oa(e,o,r,i=!0){return{type:19,test:e,consequent:o,alternate:r,newline:i,loc:Ce}}function Hf(e,o,r=!1,i=!1){return{type:20,index:e,value:o,needPauseTracking:r,inVOnce:i,needArraySpread:!1,loc:Ce}}function zf(e){return{type:21,body:e,loc:Ce}}function fS(e){return{type:22,elements:e,loc:Ce}}function mS(e,o,r){return{type:23,test:e,consequent:o,alternate:r,loc:Ce}}function gS(e,o){return{type:24,left:e,right:o,loc:Ce}}function yS(e){return{type:25,expressions:e,loc:Ce}}function vS(e){return{type:26,returns:e,loc:Ce}}function qo(e,o){return e||o?ls:cs}function Zo(e,o){return e||o?Bc:Uc}function ws(e,{helper:o,removeHelper:r,inSSR:i}){e.isBlock||(e.isBlock=!0,r(qo(i,e.isComponent)),o(bo),o(Zo(i,e.isComponent)))}const uh=new Uint8Array([123,123]),hh=new Uint8Array([125,125]);function ph(e){return e>=97&&e<=122||e>=65&&e<=90}function Fe(e){return e===32||e===10||e===9||e===12||e===13}function ro(e){return e===47||e===62||Fe(e)}function La(e){const o=new Uint8Array(e.length);for(let r=0;r<e.length;r++)o[r]=e.charCodeAt(r);return o}const Te={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class bS{constructor(o,r){this.stack=o,this.cbs=r,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=uh,this.delimiterClose=hh,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=uh,this.delimiterClose=hh}getPos(o){let r=1,i=o+1;const a=this.newlines.length;let s=-1;if(a>100){let l=-1,c=a;for(;l+1<c;){const d=l+c>>>1;this.newlines[d]<o?l=d:c=d}s=l}else for(let l=a-1;l>=0;l--)if(o>this.newlines[l]){s=l;break}return s>=0&&(r=s+2,i=o-this.newlines[s]),{column:i,line:r,offset:o}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(o){o===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&o===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(o))}stateInterpolationOpen(o){if(o===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const r=this.index+1-this.delimiterOpen.length;r>this.sectionStart&&this.cbs.ontext(this.sectionStart,r),this.state=3,this.sectionStart=r}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(o)):(this.state=1,this.stateText(o))}stateInterpolation(o){o===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(o))}stateInterpolationClose(o){o===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(o))}stateSpecialStartSequence(o){const r=this.sequenceIndex===this.currentSequence.length;if(!(r?ro(o):(o|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!r){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(o)}stateInRCDATA(o){if(this.sequenceIndex===this.currentSequence.length){if(o===62||Fe(o)){const r=this.index-this.currentSequence.length;if(this.sectionStart<r){const i=this.index;this.index=r,this.cbs.ontext(this.sectionStart,r),this.index=i}this.sectionStart=r+2,this.stateInClosingTagName(o),this.inRCDATA=!1;return}this.sequenceIndex=0}(o|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===Te.TitleEnd||this.currentSequence===Te.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&o===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(o)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(o===60)}stateCDATASequence(o){o===Te.Cdata[this.sequenceIndex]?++this.sequenceIndex===Te.Cdata.length&&(this.state=28,this.currentSequence=Te.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(o))}fastForwardTo(o){for(;++this.index<this.buffer.length;){const r=this.buffer.charCodeAt(this.index);if(r===10&&this.newlines.push(this.index),r===o)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(o){o===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===Te.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):o!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(o,r){this.enterRCDATA(o,r),this.state=31}enterRCDATA(o,r){this.inRCDATA=!0,this.currentSequence=o,this.sequenceIndex=r}stateBeforeTagName(o){o===33?(this.state=22,this.sectionStart=this.index+1):o===63?(this.state=24,this.sectionStart=this.index+1):ph(o)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:o===116?this.state=30:this.state=o===115?29:6):o===47?this.state=8:(this.state=1,this.stateText(o))}stateInTagName(o){ro(o)&&this.handleTagName(o)}stateInSFCRootTagName(o){if(ro(o)){const r=this.buffer.slice(this.sectionStart,this.index);r!=="template"&&this.enterRCDATA(La("</"+r),0),this.handleTagName(o)}}handleTagName(o){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(o)}stateBeforeClosingTagName(o){Fe(o)||(o===62?(this.state=1,this.sectionStart=this.index+1):(this.state=ph(o)?9:27,this.sectionStart=this.index))}stateInClosingTagName(o){(o===62||Fe(o))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(o))}stateAfterClosingTagName(o){o===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(o){o===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):o===47?this.state=7:o===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):Fe(o)||this.handleAttrStart(o)}handleAttrStart(o){o===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):o===46||o===58||o===64||o===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(o){o===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):Fe(o)||(this.state=11,this.stateBeforeAttrName(o))}stateInAttrName(o){(o===61||ro(o))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(o))}stateInDirName(o){o===61||ro(o)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(o)):o===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):o===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(o){o===61||ro(o)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(o)):o===91?this.state=15:o===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(o){o===93?this.state=14:(o===61||ro(o))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(o))}stateInDirModifier(o){o===61||ro(o)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(o)):o===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(o){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(o)}stateAfterAttrName(o){o===61?this.state=18:o===47||o===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(o)):Fe(o)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(o))}stateBeforeAttrValue(o){o===34?(this.state=19,this.sectionStart=this.index+1):o===39?(this.state=20,this.sectionStart=this.index+1):Fe(o)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(o))}handleInAttrValue(o,r){(o===r||this.fastForwardTo(r))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(r===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(o){this.handleInAttrValue(o,34)}stateInAttrValueSingleQuotes(o){this.handleInAttrValue(o,39)}stateInAttrValueNoQuotes(o){Fe(o)||o===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(o)):(o===39||o===60||o===61||o===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(o){o===91?(this.state=26,this.sequenceIndex=0):this.state=o===45?25:23}stateInDeclaration(o){(o===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(o){(o===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(o){o===45?(this.state=28,this.currentSequence=Te.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(o){(o===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(o){o===Te.ScriptEnd[3]?this.startSpecial(Te.ScriptEnd,4):o===Te.StyleEnd[3]?this.startSpecial(Te.StyleEnd,4):(this.state=6,this.stateInTagName(o))}stateBeforeSpecialT(o){o===Te.TitleEnd[3]?this.startSpecial(Te.TitleEnd,4):o===Te.TextareaEnd[3]?this.startSpecial(Te.TextareaEnd,4):(this.state=6,this.stateInTagName(o))}startEntity(){}stateInEntity(){}parse(o){for(this.buffer=o;this.index<this.buffer.length;){const r=this.buffer.charCodeAt(this.index);switch(r===10&&this.state!==33&&this.newlines.push(this.index),this.state){case 1:{this.stateText(r);break}case 2:{this.stateInterpolationOpen(r);break}case 3:{this.stateInterpolation(r);break}case 4:{this.stateInterpolationClose(r);break}case 31:{this.stateSpecialStartSequence(r);break}case 32:{this.stateInRCDATA(r);break}case 26:{this.stateCDATASequence(r);break}case 19:{this.stateInAttrValueDoubleQuotes(r);break}case 12:{this.stateInAttrName(r);break}case 13:{this.stateInDirName(r);break}case 14:{this.stateInDirArg(r);break}case 15:{this.stateInDynamicDirArg(r);break}case 16:{this.stateInDirModifier(r);break}case 28:{this.stateInCommentLike(r);break}case 27:{this.stateInSpecialComment(r);break}case 11:{this.stateBeforeAttrName(r);break}case 6:{this.stateInTagName(r);break}case 34:{this.stateInSFCRootTagName(r);break}case 9:{this.stateInClosingTagName(r);break}case 5:{this.stateBeforeTagName(r);break}case 17:{this.stateAfterAttrName(r);break}case 20:{this.stateInAttrValueSingleQuotes(r);break}case 18:{this.stateBeforeAttrValue(r);break}case 8:{this.stateBeforeClosingTagName(r);break}case 10:{this.stateAfterClosingTagName(r);break}case 29:{this.stateBeforeSpecialS(r);break}case 30:{this.stateBeforeSpecialT(r);break}case 21:{this.stateInAttrValueNoQuotes(r);break}case 7:{this.stateInSelfClosingTag(r);break}case 23:{this.stateInDeclaration(r);break}case 22:{this.stateBeforeDeclaration(r);break}case 25:{this.stateBeforeComment(r);break}case 24:{this.stateInProcessingInstruction(r);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const o=this.buffer.length;this.sectionStart>=o||(this.state===28?this.currentSequence===Te.CdataEnd?this.cbs.oncdata(this.sectionStart,o):this.cbs.oncomment(this.sectionStart,o):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,o))}emitCodePoint(o,r){}}const _S={COMPILER_IS_ON_ELEMENT:"COMPILER_IS_ON_ELEMENT",COMPILER_V_BIND_SYNC:"COMPILER_V_BIND_SYNC",COMPILER_V_BIND_OBJECT_ORDER:"COMPILER_V_BIND_OBJECT_ORDER",COMPILER_V_ON_NATIVE:"COMPILER_V_ON_NATIVE",COMPILER_V_IF_V_FOR_PRECEDENCE:"COMPILER_V_IF_V_FOR_PRECEDENCE",COMPILER_NATIVE_TEMPLATE:"COMPILER_NATIVE_TEMPLATE",COMPILER_INLINE_TEMPLATE:"COMPILER_INLINE_TEMPLATE",COMPILER_FILTERS:"COMPILER_FILTERS"},CS={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:e=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${e}.sync\` should be changed to \`v-model:${e}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",link:"https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Vue 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Vue 3.',link:"https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"},COMPILER_FILTERS:{message:'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://v3-migration.vuejs.org/breaking-changes/filters.html"}};function Rl(e,{compatConfig:o}){const r=o&&o[e];return e==="MODE"?r||3:r}function Ho(e,o){const r=Rl("MODE",o),i=Rl(e,o);return r===3?i===!0:i!==!1}function Tr(e,o,r,...i){return Ho(e,o)}function wS(e,o,r,...i){if(Rl(e,o)==="suppress-warning")return;const{message:a,link:s}=CS[e],l=`(deprecation ${e}) ${typeof a=="function"?a(...i):a}${s?` Details: ${s}`:""}`,c=new SyntaxError(l);c.code=e,r&&(c.loc=r),o.onWarn(c)}function Yc(e){throw e}function Gf(e){}function Wt(e,o,r,i){const a=`https://vuejs.org/error-reference/#compiler-${e}`,s=new SyntaxError(String(a));return s.code=e,s.loc=o,s}const kS={ABRUPT_CLOSING_OF_EMPTY_COMMENT:0,0:"ABRUPT_CLOSING_OF_EMPTY_COMMENT",CDATA_IN_HTML_CONTENT:1,1:"CDATA_IN_HTML_CONTENT",DUPLICATE_ATTRIBUTE:2,2:"DUPLICATE_ATTRIBUTE",END_TAG_WITH_ATTRIBUTES:3,3:"END_TAG_WITH_ATTRIBUTES",END_TAG_WITH_TRAILING_SOLIDUS:4,4:"END_TAG_WITH_TRAILING_SOLIDUS",EOF_BEFORE_TAG_NAME:5,5:"EOF_BEFORE_TAG_NAME",EOF_IN_CDATA:6,6:"EOF_IN_CDATA",EOF_IN_COMMENT:7,7:"EOF_IN_COMMENT",EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT:8,8:"EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT",EOF_IN_TAG:9,9:"EOF_IN_TAG",INCORRECTLY_CLOSED_COMMENT:10,10:"INCORRECTLY_CLOSED_COMMENT",INCORRECTLY_OPENED_COMMENT:11,11:"INCORRECTLY_OPENED_COMMENT",INVALID_FIRST_CHARACTER_OF_TAG_NAME:12,12:"INVALID_FIRST_CHARACTER_OF_TAG_NAME",MISSING_ATTRIBUTE_VALUE:13,13:"MISSING_ATTRIBUTE_VALUE",MISSING_END_TAG_NAME:14,14:"MISSING_END_TAG_NAME",MISSING_WHITESPACE_BETWEEN_ATTRIBUTES:15,15:"MISSING_WHITESPACE_BETWEEN_ATTRIBUTES",NESTED_COMMENT:16,16:"NESTED_COMMENT",UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME:17,17:"UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME",UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE:18,18:"UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE",UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME:19,19:"UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME",UNEXPECTED_NULL_CHARACTER:20,20:"UNEXPECTED_NULL_CHARACTER",UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME:21,21:"UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME",UNEXPECTED_SOLIDUS_IN_TAG:22,22:"UNEXPECTED_SOLIDUS_IN_TAG",X_INVALID_END_TAG:23,23:"X_INVALID_END_TAG",X_MISSING_END_TAG:24,24:"X_MISSING_END_TAG",X_MISSING_INTERPOLATION_END:25,25:"X_MISSING_INTERPOLATION_END",X_MISSING_DIRECTIVE_NAME:26,26:"X_MISSING_DIRECTIVE_NAME",X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END:27,27:"X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END",X_V_IF_NO_EXPRESSION:28,28:"X_V_IF_NO_EXPRESSION",X_V_IF_SAME_KEY:29,29:"X_V_IF_SAME_KEY",X_V_ELSE_NO_ADJACENT_IF:30,30:"X_V_ELSE_NO_ADJACENT_IF",X_V_FOR_NO_EXPRESSION:31,31:"X_V_FOR_NO_EXPRESSION",X_V_FOR_MALFORMED_EXPRESSION:32,32:"X_V_FOR_MALFORMED_EXPRESSION",X_V_FOR_TEMPLATE_KEY_PLACEMENT:33,33:"X_V_FOR_TEMPLATE_KEY_PLACEMENT",X_V_BIND_NO_EXPRESSION:34,34:"X_V_BIND_NO_EXPRESSION",X_V_ON_NO_EXPRESSION:35,35:"X_V_ON_NO_EXPRESSION",X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET:36,36:"X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET",X_V_SLOT_MIXED_SLOT_USAGE:37,37:"X_V_SLOT_MIXED_SLOT_USAGE",X_V_SLOT_DUPLICATE_SLOT_NAMES:38,38:"X_V_SLOT_DUPLICATE_SLOT_NAMES",X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN:39,39:"X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN",X_V_SLOT_MISPLACED:40,40:"X_V_SLOT_MISPLACED",X_V_MODEL_NO_EXPRESSION:41,41:"X_V_MODEL_NO_EXPRESSION",X_V_MODEL_MALFORMED_EXPRESSION:42,42:"X_V_MODEL_MALFORMED_EXPRESSION",X_V_MODEL_ON_SCOPE_VARIABLE:43,43:"X_V_MODEL_ON_SCOPE_VARIABLE",X_V_MODEL_ON_PROPS:44,44:"X_V_MODEL_ON_PROPS",X_V_MODEL_ON_CONST:45,45:"X_V_MODEL_ON_CONST",X_INVALID_EXPRESSION:46,46:"X_INVALID_EXPRESSION",X_KEEP_ALIVE_INVALID_CHILDREN:47,47:"X_KEEP_ALIVE_INVALID_CHILDREN",X_PREFIX_ID_NOT_SUPPORTED:48,48:"X_PREFIX_ID_NOT_SUPPORTED",X_MODULE_MODE_NOT_SUPPORTED:49,49:"X_MODULE_MODE_NOT_SUPPORTED",X_CACHE_HANDLER_NOT_SUPPORTED:50,50:"X_CACHE_HANDLER_NOT_SUPPORTED",X_SCOPE_ID_NOT_SUPPORTED:51,51:"X_SCOPE_ID_NOT_SUPPORTED",X_VNODE_HOOKS:52,52:"X_VNODE_HOOKS",X_V_BIND_INVALID_SAME_NAME_ARGUMENT:53,53:"X_V_BIND_INVALID_SAME_NAME_ARGUMENT",__EXTEND_POINT__:54,54:"__EXTEND_POINT__"},SS={0:"Illegal comment.",1:"CDATA section is allowed only in XML context.",2:"Duplicate attribute.",3:"End tag cannot have attributes.",4:"Illegal '/' in tags.",5:"Unexpected EOF in tag.",6:"Unexpected EOF in CDATA section.",7:"Unexpected EOF in comment.",8:"Unexpected EOF in script.",9:"Unexpected EOF in tag.",10:"Incorrectly closed comment.",11:"Incorrectly opened comment.",12:"Illegal tag name. Use '<' to print '<'.",13:"Attribute value was expected.",14:"End tag name was expected.",15:"Whitespace was expected.",16:"Unexpected '<!--' in comment.",17:`Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,18:"Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",19:"Attribute name cannot start with '='.",21:"'<?' is allowed only in XML context.",20:"Unexpected null character.",22:"Illegal '/' in tags.",23:"Invalid end tag.",24:"Element is missing end tag.",25:"Interpolation end sign was not found.",27:"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",26:"Legal directive name was expected.",28:"v-if/v-else-if is missing expression.",29:"v-if/else branches must use unique keys.",30:"v-else/v-else-if has no adjacent v-if or v-else-if.",31:"v-for is missing expression.",32:"v-for has invalid expression.",33:"<template v-for> key should be placed on the <template> tag.",34:"v-bind is missing expression.",53:"v-bind with same-name shorthand only allows static argument.",35:"v-on is missing expression.",36:"Unexpected custom directive on <slot> outlet.",37:"Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.",38:"Duplicate slot names found. ",39:"Extraneous children found when component already has explicitly named default slot. These children will be ignored.",40:"v-slot can only be used on components or <template> tags.",41:"v-model is missing expression.",42:"v-model value must be a valid JavaScript member expression.",43:"v-model cannot be used on v-for or v-slot scope variables because they are not writable.",44:`v-model cannot be used on a prop, because local prop bindings are not writable. Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,45:"v-model cannot be used on a const binding because it is not writable.",46:"Error parsing JavaScript expression: ",47:"<KeepAlive> expects exactly one child component.",52:"@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.",48:'"prefixIdentifiers" option is not supported in this build of compiler.',49:"ES module mode is not supported in this build of compiler.",50:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',51:'"scopeId" option is only supported in module mode.',54:""};function xS(e,o,r=!1,i=[],a=Object.create(null)){}function AS(e,o,r){return!1}function ES(e,o){if(e&&(e.type==="ObjectProperty"||e.type==="ArrayPattern")){let r=o.length;for(;r--;){const i=o[r];if(i.type==="AssignmentExpression")return!0;if(i.type!=="ObjectProperty"&&!i.type.endsWith("Pattern"))break}}return!1}function NS(e){let o=e.length;for(;o--;){const r=e[o];if(r.type==="NewExpression")return!0;if(r.type!=="MemberExpression")break}return!1}function TS(e,o){for(const r of e.params)for(const i of bn(r))o(i)}function Ff(e,o){const r=e.type==="SwitchCase"?e.consequent:e.body;for(const i of r)if(i.type==="VariableDeclaration"){if(i.declare)continue;for(const a of i.declarations)for(const s of bn(a.id))o(s)}else if(i.type==="FunctionDeclaration"||i.type==="ClassDeclaration"){if(i.declare||!i.id)continue;o(i.id)}else MS(i)?IS(i,!0,o):i.type==="SwitchStatement"&&OS(i,!0,o)}function MS(e){return e.type==="ForOfStatement"||e.type==="ForInStatement"||e.type==="ForStatement"}function IS(e,o,r){const i=e.type==="ForStatement"?e.init:e.left;if(i&&i.type==="VariableDeclaration"&&(i.kind==="var"?o:!o))for(const a of i.declarations)for(const s of bn(a.id))r(s)}function OS(e,o,r){for(const i of e.cases){for(const a of i.consequent)if(a.type==="VariableDeclaration"&&(a.kind==="var"?o:!o))for(const s of a.declarations)for(const l of bn(s.id))r(l);Ff(i,r)}}function bn(e,o=[]){switch(e.type){case"Identifier":o.push(e);break;case"MemberExpression":let r=e;for(;r.type==="MemberExpression";)r=r.object;o.push(r);break;case"ObjectPattern":for(const i of e.properties)i.type==="RestElement"?bn(i.argument,o):bn(i.value,o);break;case"ArrayPattern":e.elements.forEach(i=>{i&&bn(i,o)});break;case"RestElement":bn(e.argument,o);break;case"AssignmentPattern":bn(e.left,o);break}return o}const LS=e=>/Function(?:Expression|Declaration)$|Method$/.test(e.type),Yf=e=>e&&(e.type==="ObjectProperty"||e.type==="ObjectMethod")&&!e.computed,DS=(e,o)=>Yf(o)&&o.key===e,Xf=["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"];function jf(e){return Xf.includes(e.type)?jf(e.expression):e}const Pe=e=>e.type===4&&e.isStatic;function Xc(e){switch(e){case"Teleport":case"teleport":return hr;case"Suspense":case"suspense":return ss;case"KeepAlive":case"keep-alive":return pi;case"BaseTransition":case"base-transition":return Vc}}const RS=/^$|^\d|[^\$\w\xA0-\uFFFF]/,Ei=e=>!RS.test(e),jc=/[A-Za-z_$\xA0-\uFFFF]/,PS=/[\.\?\w$\xA0-\uFFFF]/,$S=/\s+[.[]\s*|\s*[.[]\s+/g,Wf=e=>e.type===4?e.content:e.loc.source,qf=e=>{const o=Wf(e).trim().replace($S,c=>c.trim());let r=0,i=[],a=0,s=0,l=null;for(let c=0;c<o.length;c++){const d=o.charAt(c);switch(r){case 0:if(d==="[")i.push(r),r=1,a++;else if(d==="(")i.push(r),r=2,s++;else if(!(c===0?jc:PS).test(d))return!1;break;case 1:d==="'"||d==='"'||d==="`"?(i.push(r),r=3,l=d):d==="["?a++:d==="]"&&(--a||(r=i.pop()));break;case 2:if(d==="'"||d==='"'||d==="`")i.push(r),r=3,l=d;else if(d==="(")s++;else if(d===")"){if(c===o.length-1)return!1;--s||(r=i.pop())}break;case 3:d===l&&(r=i.pop(),l=null);break}}return!a&&!s},VS=ni,Wc=qf,BS=/^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,Zf=e=>BS.test(Wf(e)),US=ni,Jf=Zf;function HS(e,o,r=o.length){return Kf({offset:e.offset,line:e.line,column:e.column},o,r)}function Kf(e,o,r=o.length){let i=0,a=-1;for(let s=0;s<r;s++)o.charCodeAt(s)===10&&(i++,a=s);return e.offset+=r,e.line+=i,e.column=a===-1?e.column+r:r-a,e}function zS(e,o){if(!e)throw new Error(o||"unexpected compiler condition")}function Re(e,o,r=!1){for(let i=0;i<e.props.length;i++){const a=e.props[i];if(a.type===7&&(r||a.exp)&&(_e(o)?a.name===o:o.test(a.name)))return a}}function Ni(e,o,r=!1,i=!1){for(let a=0;a<e.props.length;a++){const s=e.props[a];if(s.type===6){if(r)continue;if(s.name===o&&(s.value||i))return s}else if(s.name==="bind"&&(s.exp||i)&&co(s.arg,o))return s}}function co(e,o){return!!(e&&Pe(e)&&e.content===o)}function Qf(e){return e.props.some(o=>o.type===7&&o.name==="bind"&&(!o.arg||o.arg.type!==4||!o.arg.isStatic))}function sa(e){return e.type===5||e.type===2}function Pl(e){return e.type===7&&e.name==="pre"}function qc(e){return e.type===7&&e.name==="slot"}function Mr(e){return e.type===1&&e.tagType===3}function gi(e){return e.type===1&&e.tagType===2}const GS=new Set([Er,$r]);function t1(e,o=[]){if(e&&!_e(e)&&e.type===14){const r=e.callee;if(!_e(r)&&GS.has(r))return t1(e.arguments[0],o.concat(e))}return[e,o]}function yi(e,o,r){let i,a=e.type===13?e.props:e.arguments[2],s=[],l;if(a&&!_e(a)&&a.type===14){const c=t1(a);a=c[0],s=c[1],l=s[s.length-1]}if(a==null||_e(a))i=Ye([o]);else if(a.type===14){const c=a.arguments[0];!_e(c)&&c.type===15?fh(o,c)||c.properties.unshift(o):a.callee===bs?i=ge(r.helper(fi),[Ye([o]),a]):a.arguments.unshift(Ye([o])),!i&&(i=a)}else a.type===15?(fh(o,a)||a.properties.unshift(o),i=a):(i=ge(r.helper(fi),[Ye([o]),a]),l&&l.callee===$r&&(l=s[s.length-2]));e.type===13?l?l.arguments[0]=i:e.props=i:l?l.arguments[0]=i:e.arguments[2]=i}function fh(e,o){let r=!1;if(e.key.type===4){const i=e.key.content;r=o.properties.some(a=>a.key.type===4&&a.key.content===i)}return r}function Ir(e,o){return`_${o}_${e.replace(/[^\w]/g,(r,i)=>r==="-"?"_":e.charCodeAt(i).toString())}`}function an(e,o){if(!e||Object.keys(o).length===0)return!1;switch(e.type){case 1:for(let r=0;r<e.props.length;r++){const i=e.props[r];if(i.type===7&&(an(i.arg,o)||an(i.exp,o)))return!0}return e.children.some(r=>an(r,o));case 11:return an(e.source,o)?!0:e.children.some(r=>an(r,o));case 9:return e.branches.some(r=>an(r,o));case 10:return an(e.condition,o)?!0:e.children.some(r=>an(r,o));case 4:return!e.isStatic&&Ei(e.content)&&!!o[e.content];case 8:return e.children.some(r=>Op(r)&&an(r,o));case 5:case 12:return an(e.content,o);case 2:case 3:case 20:return!1;default:return!1}}function e1(e){return e.type===14&&e.callee===Cs?e.arguments[1].returns:e}const n1=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;function Zc(e){for(let o=0;o<e.length;o++)if(!Fe(e.charCodeAt(o)))return!1;return!0}function ks(e){return e.type===2&&Zc(e.content)||e.type===12&&ks(e.content)}function Jc(e){return e.type===3||ks(e)}const o1={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:Pi,isPreTag:Pi,isIgnoreNewlineTag:Pi,isCustomElement:Pi,onError:Yc,onWarn:Gf,comments:!1,prefixIdentifiers:!1};let Vt=o1,vi=null,Un="",Me=null,Mt=null,Be="",Dn=-1,Lo=-1,Kc=0,so=!1,$l=null;const Qt=[],ie=new bS(Qt,{onerr:On,ontext(e,o){zi(Se(e,o),e,o)},ontextentity(e,o,r){zi(e,o,r)},oninterpolation(e,o){if(so)return zi(Se(e,o),e,o);let r=e+ie.delimiterOpen.length,i=o-ie.delimiterClose.length;for(;Fe(Un.charCodeAt(r));)r++;for(;Fe(Un.charCodeAt(i-1));)i--;let a=Se(r,i);a.includes("&")&&(a=Vt.decodeEntities(a,!1)),Vl({type:5,content:ca(a,!1,ce(r,i)),loc:ce(e,o)})},onopentagname(e,o){const r=Se(e,o);Me={type:1,tag:r,ns:Vt.getNamespace(r,Qt[0],Vt.ns),tagType:0,props:[],children:[],loc:ce(e-1,o),codegenNode:void 0}},onopentagend(e){gh(e)},onclosetag(e,o){const r=Se(e,o);if(!Vt.isVoidTag(r)){let i=!1;for(let a=0;a<Qt.length;a++)if(Qt[a].tag.toLowerCase()===r.toLowerCase()){i=!0,a>0&&On(24,Qt[0].loc.start.offset);for(let s=0;s<=a;s++){const l=Qt.shift();la(l,o,s<a)}break}i||On(23,r1(e,60))}},onselfclosingtag(e){const o=Me.tag;Me.isSelfClosing=!0,gh(e),Qt[0]&&Qt[0].tag===o&&la(Qt.shift(),e)},onattribname(e,o){Mt={type:6,name:Se(e,o),nameLoc:ce(e,o),value:void 0,loc:ce(e)}},ondirname(e,o){const r=Se(e,o),i=r==="."||r===":"?"bind":r==="@"?"on":r==="#"?"slot":r.slice(2);if(!so&&i===""&&On(26,e),so||i==="")Mt={type:6,name:r,nameLoc:ce(e,o),value:void 0,loc:ce(e)};else if(Mt={type:7,name:i,rawName:r,exp:void 0,arg:void 0,modifiers:r==="."?[Ct("prop")]:[],loc:ce(e)},i==="pre"){so=ie.inVPre=!0,$l=Me;const a=Me.props;for(let s=0;s<a.length;s++)a[s].type===7&&(a[s]=QS(a[s]))}},ondirarg(e,o){if(e===o)return;const r=Se(e,o);if(so&&!Pl(Mt))Mt.name+=r,Po(Mt.nameLoc,o);else{const i=r[0]!=="[";Mt.arg=ca(i?r:r.slice(1,-1),i,ce(e,o),i?3:0)}},ondirmodifier(e,o){const r=Se(e,o);if(so&&!Pl(Mt))Mt.name+="."+r,Po(Mt.nameLoc,o);else if(Mt.name==="slot"){const i=Mt.arg;i&&(i.content+="."+r,Po(i.loc,o))}else{const i=Ct(r,!0,ce(e,o));Mt.modifiers.push(i)}},onattribdata(e,o){Be+=Se(e,o),Dn<0&&(Dn=e),Lo=o},onattribentity(e,o,r){Be+=e,Dn<0&&(Dn=o),Lo=r},onattribnameend(e){const o=Mt.loc.start.offset,r=Se(o,e);Mt.type===7&&(Mt.rawName=r),Me.props.some(i=>(i.type===7?i.rawName:i.name)===r)&&On(2,o)},onattribend(e,o){if(Me&&Mt){if(Po(Mt.loc,o),e!==0)if(Be.includes("&")&&(Be=Vt.decodeEntities(Be,!0)),Mt.type===6)Mt.name==="class"&&(Be=a1(Be).trim()),e===1&&!Be&&On(13,o),Mt.value={type:2,content:Be,loc:e===1?ce(Dn,Lo):ce(Dn-1,Lo+1)},ie.inSFCRoot&&Me.tag==="template"&&Mt.name==="lang"&&Be&&Be!=="html"&&ie.enterRCDATA(La("</template"),0);else{let r=0;Mt.exp=ca(Be,!1,ce(Dn,Lo),0,r),Mt.name==="for"&&(Mt.forParseResult=YS(Mt.exp));let i=-1;Mt.name==="bind"&&(i=Mt.modifiers.findIndex(a=>a.content==="sync"))>-1&&Tr("COMPILER_V_BIND_SYNC",Vt,Mt.loc,Mt.arg.loc.source)&&(Mt.name="model",Mt.modifiers.splice(i,1))}(Mt.type!==7||Mt.name!=="pre")&&Me.props.push(Mt)}Be="",Dn=Lo=-1},oncomment(e,o){Vt.comments&&Vl({type:3,content:Se(e,o),loc:ce(e-4,o+3)})},onend(){const e=Un.length;for(let o=0;o<Qt.length;o++)la(Qt[o],e-1),On(24,Qt[o].loc.start.offset)},oncdata(e,o){Qt[0].ns!==0?zi(Se(e,o),e,o):On(1,e-9)},onprocessinginstruction(e){(Qt[0]?Qt[0].ns:Vt.ns)===0&&On(21,e-1)}}),mh=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,FS=/^\(|\)$/g;function YS(e){const o=e.loc,r=e.content,i=r.match(n1);if(!i)return;const[,a,s]=i,l=(p,m,g=!1)=>{const _=o.start.offset+m,C=_+p.length;return ca(p,!1,ce(_,C),0,g?1:0)},c={source:l(s.trim(),r.indexOf(s,a.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let d=a.trim().replace(FS,"").trim();const u=a.indexOf(d),h=d.match(mh);if(h){d=d.replace(mh,"").trim();const p=h[1].trim();let m;if(p&&(m=r.indexOf(p,u+d.length),c.key=l(p,m,!0)),h[2]){const g=h[2].trim();g&&(c.index=l(g,r.indexOf(g,c.key?m+p.length:u+d.length),!0))}}return d&&(c.value=l(d,u,!0)),c}function Se(e,o){return Un.slice(e,o)}function gh(e){ie.inSFCRoot&&(Me.innerLoc=ce(e+1,e+1)),Vl(Me);const{tag:o,ns:r}=Me;r===0&&Vt.isPreTag(o)&&Kc++,Vt.isVoidTag(o)?la(Me,e):(Qt.unshift(Me),(r===1||r===2)&&(ie.inXML=!0)),Me=null}function zi(e,o,r){{const s=Qt[0]&&Qt[0].tag;s!=="script"&&s!=="style"&&e.includes("&")&&(e=Vt.decodeEntities(e,!1))}const i=Qt[0]||vi,a=i.children[i.children.length-1];a&&a.type===2?(a.content+=e,Po(a.loc,r)):i.children.push({type:2,content:e,loc:ce(o,r)})}function la(e,o,r=!1){r?Po(e.loc,r1(o,60)):Po(e.loc,XS(o,62)+1),ie.inSFCRoot&&(e.children.length?e.innerLoc.end=Bn({},e.children[e.children.length-1].loc.end):e.innerLoc.end=Bn({},e.innerLoc.start),e.innerLoc.source=Se(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:i,ns:a,children:s}=e;if(so||(i==="slot"?e.tagType=2:yh(e)?e.tagType=3:WS(e)&&(e.tagType=1)),ie.inRCDATA||(e.children=i1(s)),a===0&&Vt.isIgnoreNewlineTag(i)){const l=s[0];l&&l.type===2&&(l.content=l.content.replace(/^\r?\n/,""))}a===0&&Vt.isPreTag(i)&&Kc--,$l===e&&(so=ie.inVPre=!1,$l=null),ie.inXML&&(Qt[0]?Qt[0].ns:Vt.ns)===0&&(ie.inXML=!1);{const l=e.props;if(!ie.inSFCRoot&&Ho("COMPILER_NATIVE_TEMPLATE",Vt)&&e.tag==="template"&&!yh(e)){const d=Qt[0]||vi,u=d.children.indexOf(e);d.children.splice(u,1,...e.children)}const c=l.find(d=>d.type===6&&d.name==="inline-template");c&&Tr("COMPILER_INLINE_TEMPLATE",Vt,c.loc)&&e.children.length&&(c.value={type:2,content:Se(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:c.loc})}}function XS(e,o){let r=e;for(;Un.charCodeAt(r)!==o&&r<Un.length-1;)r++;return r}function r1(e,o){let r=e;for(;Un.charCodeAt(r)!==o&&r>=0;)r--;return r}const jS=new Set(["if","else","else-if","for","slot"]);function yh({tag:e,props:o}){if(e==="template"){for(let r=0;r<o.length;r++)if(o[r].type===7&&jS.has(o[r].name))return!0}return!1}function WS({tag:e,props:o}){if(Vt.isCustomElement(e))return!1;if(e==="component"||qS(e.charCodeAt(0))||Xc(e)||Vt.isBuiltInComponent&&Vt.isBuiltInComponent(e)||Vt.isNativeTag&&!Vt.isNativeTag(e))return!0;for(let r=0;r<o.length;r++){const i=o[r];if(i.type===6){if(i.name==="is"&&i.value&&(i.value.content.startsWith("vue:")||Tr("COMPILER_IS_ON_ELEMENT",Vt,i.loc)))return!0}else if(i.name==="bind"&&co(i.arg,"is")&&Tr("COMPILER_IS_ON_ELEMENT",Vt,i.loc))return!0}return!1}function qS(e){return e>64&&e<91}const ZS=/\r\n/g;function i1(e){const o=Vt.whitespace!=="preserve";let r=!1;for(let i=0;i<e.length;i++){const a=e[i];if(a.type===2)if(Kc)a.content=a.content.replace(ZS,` `);else if(Zc(a.content)){const s=e[i-1]&&e[i-1].type,l=e[i+1]&&e[i+1].type;!s||!l||o&&(s===3&&(l===3||l===1)||s===1&&(l===3||l===1&&JS(a.content)))?(r=!0,e[i]=null):a.content=" "}else o&&(a.content=a1(a.content))}return r?e.filter(Boolean):e}function JS(e){for(let o=0;o<e.length;o++){const r=e.charCodeAt(o);if(r===10||r===13)return!0}return!1}function a1(e){let o="",r=!1;for(let i=0;i<e.length;i++)Fe(e.charCodeAt(i))?r||(o+=" ",r=!0):(o+=e[i],r=!1);return o}function Vl(e){(Qt[0]||vi).children.push(e)}function ce(e,o){return{start:ie.getPos(e),end:o==null?o:ie.getPos(o),source:o==null?o:Se(e,o)}}function KS(e){return ce(e.start.offset,e.end.offset)}function Po(e,o){e.end=ie.getPos(o),e.source=Se(e.start.offset,o)}function QS(e){const o={type:6,name:e.rawName,nameLoc:ce(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){const r=e.exp.loc;r.end.offset<e.loc.end.offset&&(r.start.offset--,r.start.column--,r.end.offset++,r.end.column++),o.value={type:2,content:e.exp.content,loc:r}}return o}function ca(e,o=!1,r,i=0,a=0){return Ct(e,o,r,i)}function On(e,o,r){Vt.onError(Wt(e,ce(o,o)))}function t4(){ie.reset(),Me=null,Mt=null,Be="",Dn=-1,Lo=-1,Qt.length=0}function Qc(e,o){if(t4(),Un=e,Vt=Bn({},o1),o){let a;for(a in o)o[a]!=null&&(Vt[a]=o[a])}ie.mode=Vt.parseMode==="html"?1:Vt.parseMode==="sfc"?2:0,ie.inXML=Vt.ns===1||Vt.ns===2;const r=o&&o.delimiters;r&&(ie.delimiterOpen=La(r[0]),ie.delimiterClose=La(r[1]));const i=vi=Uf([],e);return ie.parse(Un),i.loc=ce(0,e.length),i.children=i1(i.children),vi=null,i}function e4(e,o){da(e,void 0,o,!!s1(e))}function s1(e){const o=e.children.filter(r=>r.type!==3);return o.length===1&&o[0].type===1&&!gi(o[0])?o[0]:null}function da(e,o,r,i=!1,a=!1){const{children:s}=e,l=[];for(let h=0;h<s.length;h++){const p=s[h];if(p.type===1&&p.tagType===0){const m=i?0:Ge(p,r);if(m>0){if(m>=2){p.codegenNode.patchFlag=-1,l.push(p);continue}}else{const g=p.codegenNode;if(g.type===13){const _=g.patchFlag;if((_===void 0||_===512||_===1)&&c1(p,r)>=2){const C=d1(p);C&&(g.props=r.hoist(C))}g.dynamicProps&&(g.dynamicProps=r.hoist(g.dynamicProps))}}}else if(p.type===12&&(i?0:Ge(p,r))>=2){p.codegenNode.type===14&&p.codegenNode.arguments.length>0&&p.codegenNode.arguments.push("-1"),l.push(p);continue}if(p.type===1){const m=p.tagType===1;m&&r.scopes.vSlot++,da(p,e,r,!1,a),m&&r.scopes.vSlot--}else if(p.type===11)da(p,e,r,p.children.length===1,!0);else if(p.type===9)for(let m=0;m<p.branches.length;m++)da(p.branches[m],e,r,p.branches[m].children.length===1,a)}let c=!1;if(l.length===s.length&&e.type===1){if(e.tagType===0&&e.codegenNode&&e.codegenNode.type===13&&lo(e.codegenNode.children))e.codegenNode.children=d(mo(e.codegenNode.children)),c=!0;else if(e.tagType===1&&e.codegenNode&&e.codegenNode.type===13&&e.codegenNode.children&&!lo(e.codegenNode.children)&&e.codegenNode.children.type===15){const h=u(e.codegenNode,"default");h&&(h.returns=d(mo(h.returns)),c=!0)}else if(e.tagType===3&&o&&o.type===1&&o.tagType===1&&o.codegenNode&&o.codegenNode.type===13&&o.codegenNode.children&&!lo(o.codegenNode.children)&&o.codegenNode.children.type===15){const h=Re(e,"slot",!0),p=h&&h.arg&&u(o.codegenNode,h.arg);p&&(p.returns=d(mo(p.returns)),c=!0)}}if(!c)for(const h of l)h.codegenNode=r.cache(h.codegenNode);function d(h){const p=r.cache(h);return p.needArraySpread=!0,p}function u(h,p){if(h.children&&!lo(h.children)&&h.children.type===15){const m=h.children.properties.find(g=>g.key===p||g.key.content===p);return m&&m.value}}l.length&&r.transformHoist&&r.transformHoist(s,r,e)}function Ge(e,o){const{constantCache:r}=o;switch(e.type){case 1:if(e.tagType!==0)return 0;const i=r.get(e);if(i!==void 0)return i;const a=e.codegenNode;if(a.type!==13||a.isBlock&&e.tag!=="svg"&&e.tag!=="foreignObject"&&e.tag!=="math")return 0;if(a.patchFlag===void 0){let l=3;const c=c1(e,o);if(c===0)return r.set(e,0),0;c<l&&(l=c);for(let d=0;d<e.children.length;d++){const u=Ge(e.children[d],o);if(u===0)return r.set(e,0),0;u<l&&(l=u)}if(l>1)for(let d=0;d<e.props.length;d++){const u=e.props[d];if(u.type===7&&u.name==="bind"&&u.exp){const h=Ge(u.exp,o);if(h===0)return r.set(e,0),0;h<l&&(l=h)}}if(a.isBlock){for(let d=0;d<e.props.length;d++)if(e.props[d].type===7)return r.set(e,0),0;o.removeHelper(bo),o.removeHelper(Zo(o.inSSR,a.isComponent)),a.isBlock=!1,o.helper(qo(o.inSSR,a.isComponent))}return r.set(e,l),l}else return r.set(e,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return Ge(e.content,o);case 4:return e.constType;case 8:let s=3;for(let l=0;l<e.children.length;l++){const c=e.children[l];if(_e(c)||fc(c))continue;const d=Ge(c,o);if(d===0)return 0;d<s&&(s=d)}return s;case 20:return 2;default:return 0}}const n4=new Set([ys,vs,Er,$r]);function l1(e,o){if(e.type===14&&!_e(e.callee)&&n4.has(e.callee)){const r=e.arguments[0];if(r.type===4)return Ge(r,o);if(r.type===14)return l1(r,o)}return 0}function c1(e,o){let r=3;const i=d1(e);if(i&&i.type===15){const{properties:a}=i;for(let s=0;s<a.length;s++){const{key:l,value:c}=a[s],d=Ge(l,o);if(d===0)return d;d<r&&(r=d);let u;if(c.type===4?u=Ge(c,o):c.type===14?u=l1(c,o):u=0,u===0)return u;u<r&&(r=u)}}return r}function d1(e){const o=e.codegenNode;if(o.type===13)return o.props}function u1(e,{filename:o="",prefixIdentifiers:r=!1,hoistStatic:i=!1,hmr:a=!1,cacheHandlers:s=!1,nodeTransforms:l=[],directiveTransforms:c={},transformHoist:d=null,isBuiltInComponent:u=ni,isCustomElement:h=ni,expressionPlugins:p=[],scopeId:m=null,slotted:g=!0,ssr:_=!1,inSSR:C=!1,ssrCssVars:M="",bindingMetadata:N=M0,inline:P=!1,isTS:V=!1,onError:K=Yc,onWarn:X=Gf,compatConfig:rt}){const pt=o.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),it={filename:o,selfName:pt&&Ip(fo(pt[1])),prefixIdentifiers:r,hoistStatic:i,hmr:a,cacheHandlers:s,nodeTransforms:l,directiveTransforms:c,transformHoist:d,isBuiltInComponent:u,isCustomElement:h,expressionPlugins:p,scopeId:m,slotted:g,ssr:_,inSSR:C,ssrCssVars:M,bindingMetadata:N,inline:P,isTS:V,onError:K,onWarn:X,compatConfig:rt,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(et){const ut=it.helpers.get(et)||0;return it.helpers.set(et,ut+1),et},removeHelper(et){const ut=it.helpers.get(et);if(ut){const L=ut-1;L?it.helpers.set(et,L):it.helpers.delete(et)}},helperString(et){return`_${jo[it.helper(et)]}`},replaceNode(et){it.parent.children[it.childIndex]=it.currentNode=et},removeNode(et){const ut=it.parent.children,L=et?ut.indexOf(et):it.currentNode?it.childIndex:-1;!et||et===it.currentNode?(it.currentNode=null,it.onNodeRemoved()):it.childIndex>L&&(it.childIndex--,it.onNodeRemoved()),it.parent.children.splice(L,1)},onNodeRemoved:ni,addIdentifiers(et){},removeIdentifiers(et){},hoist(et){_e(et)&&(et=Ct(et)),it.hoists.push(et);const ut=Ct(`_hoisted_${it.hoists.length}`,!1,et.loc,2);return ut.hoisted=et,ut},cache(et,ut=!1,L=!1){const q=Hf(it.cached.length,et,ut,L);return it.cached.push(q),q}};return it.filters=new Set,it}function h1(e,o){const r=u1(e,o);Ti(e,r),o.hoistStatic&&e4(e,r),o.ssr||o4(e,r),e.helpers=new Set([...r.helpers.keys()]),e.components=[...r.components],e.directives=[...r.directives],e.imports=r.imports,e.hoists=r.hoists,e.temps=r.temps,e.cached=r.cached,e.transformed=!0,e.filters=[...r.filters]}function o4(e,o){const{helper:r}=o,{children:i}=e;if(i.length===1){const a=s1(e);if(a&&a.codegenNode){const s=a.codegenNode;s.type===13&&ws(s,o),e.codegenNode=s}else e.codegenNode=i[0]}else if(i.length>1){let a=64;e.codegenNode=Nr(o,r(Ar),void 0,e.children,a,void 0,void 0,!0,void 0,!1)}}function r4(e,o){let r=0;const i=()=>{r--};for(;r<e.children.length;r++){const a=e.children[r];_e(a)||(o.grandParent=o.parent,o.parent=e,o.childIndex=r,o.onNodeRemoved=i,Ti(a,o))}}function Ti(e,o){o.currentNode=e;const{nodeTransforms:r}=o,i=[];for(let s=0;s<r.length;s++){const l=r[s](e,o);if(l&&(lo(l)?i.push(...l):i.push(l)),o.currentNode)e=o.currentNode;else return}switch(e.type){case 3:o.ssr||o.helper(Pr);break;case 5:o.ssr||o.helper(Ai);break;case 9:for(let s=0;s<e.branches.length;s++)Ti(e.branches[s],o);break;case 10:case 11:case 1:case 0:r4(e,o);break}o.currentNode=e;let a=i.length;for(;a--;)i[a]()}function td(e,o){const r=_e(e)?i=>i===e:i=>e.test(i);return(i,a)=>{if(i.type===1){const{props:s}=i;if(i.tagType===3&&s.some(qc))return;const l=[];for(let c=0;c<s.length;c++){const d=s[c];if(d.type===7&&r(d.name)){s.splice(c,1),c--;const u=o(i,d,a);u&&l.push(u)}}return l}}}const Ss="/*@__PURE__*/",p1=e=>`${jo[e]}: _${jo[e]}`;function i4(e,{mode:o="function",prefixIdentifiers:r=o==="module",sourceMap:i=!1,filename:a="template.vue.html",scopeId:s=null,optimizeImports:l=!1,runtimeGlobalName:c="Vue",runtimeModuleName:d="vue",ssrRuntimeModuleName:u="vue/server-renderer",ssr:h=!1,isTS:p=!1,inSSR:m=!1}){const g={mode:o,prefixIdentifiers:r,sourceMap:i,filename:a,scopeId:s,optimizeImports:l,runtimeGlobalName:c,runtimeModuleName:d,ssrRuntimeModuleName:u,ssr:h,isTS:p,inSSR:m,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(C){return`_${jo[C]}`},push(C,M=-2,N){g.code+=C},indent(){_(++g.indentLevel)},deindent(C=!1){C?--g.indentLevel:_(--g.indentLevel)},newline(){_(g.indentLevel)}};function _(C){g.push(` `+" ".repeat(C),0)}return g}function f1(e,o={}){const r=i4(e,o);o.onContextCreated&&o.onContextCreated(r);const{mode:i,push:a,prefixIdentifiers:s,indent:l,deindent:c,newline:d,scopeId:u,ssr:h}=r,p=Array.from(e.helpers),m=p.length>0,g=!s&&i!=="module";a4(e,r);const _=h?"ssrRender":"render",C=(h?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(a(`function ${_}(${C}) {`),l(),g&&(a("with (_ctx) {"),l(),m&&(a(`const { ${p.map(p1).join(", ")} } = _Vue `,-1),d())),e.components.length&&(Ks(e.components,"component",r),(e.directives.length||e.temps>0)&&d()),e.directives.length&&(Ks(e.directives,"directive",r),e.temps>0&&d()),e.filters&&e.filters.length&&(d(),Ks(e.filters,"filter",r),d()),e.temps>0){a("let ");for(let M=0;M<e.temps;M++)a(`${M>0?", ":""}_temp${M}`)}return(e.components.length||e.directives.length||e.temps)&&(a(` `,0),d()),h||a("return "),e.codegenNode?Oe(e.codegenNode,r):a("null"),g&&(c(),a("}")),c(),a("}"),{ast:e,code:r.code,preamble:"",map:r.map?r.map.toJSON():void 0}}function a4(e,o){const{ssr:r,prefixIdentifiers:i,push:a,newline:s,runtimeModuleName:l,runtimeGlobalName:c,ssrRuntimeModuleName:d}=o,u=c,h=Array.from(e.helpers);if(h.length>0&&(a(`const _Vue = ${u} `,-1),e.hoists.length)){const p=[ls,cs,Pr,ds,Hc].filter(m=>h.includes(m)).map(p1).join(", ");a(`const { ${p} } = _Vue `,-1)}s4(e.hoists,o),s(),a("return ")}function Ks(e,o,{helper:r,push:i,newline:a,isTS:s}){const l=r(o==="filter"?fs:o==="component"?us:ps);for(let c=0;c<e.length;c++){let d=e[c];const u=d.endsWith("__self");u&&(d=d.slice(0,-6)),i(`const ${Ir(d,o)} = ${l}(${JSON.stringify(d)}${u?", true":""})${s?"!":""}`),c<e.length-1&&a()}}function s4(e,o){if(!e.length)return;o.pure=!0;const{push:r,newline:i}=o;i();for(let a=0;a<e.length;a++){const s=e[a];s&&(r(`const _hoisted_${a+1} = `),Oe(s,o),i())}o.pure=!1}function ed(e,o){const r=e.length>3||!1;o.push("["),r&&o.indent(),Mi(e,o,r),r&&o.deindent(),o.push("]")}function Mi(e,o,r=!1,i=!0){const{push:a,newline:s}=o;for(let l=0;l<e.length;l++){const c=e[l];_e(c)?a(c,-3):lo(c)?ed(c,o):Oe(c,o),l<e.length-1&&(r?(i&&a(","),s()):i&&a(", "))}}function Oe(e,o){if(_e(e)){o.push(e,-3);return}if(fc(e)){o.push(o.helper(e));return}switch(e.type){case 1:case 9:case 11:Oe(e.codegenNode,o);break;case 2:l4(e,o);break;case 4:m1(e,o);break;case 5:c4(e,o);break;case 12:Oe(e.codegenNode,o);break;case 8:g1(e,o);break;case 3:u4(e,o);break;case 13:h4(e,o);break;case 14:f4(e,o);break;case 15:m4(e,o);break;case 17:g4(e,o);break;case 18:y4(e,o);break;case 19:v4(e,o);break;case 20:b4(e,o);break;case 21:Mi(e.body,o,!0,!1);break}}function l4(e,o){o.push(JSON.stringify(e.content),-3,e)}function m1(e,o){const{content:r,isStatic:i}=e;o.push(i?JSON.stringify(r):r,-3,e)}function c4(e,o){const{push:r,helper:i,pure:a}=o;a&&r(Ss),r(`${i(Ai)}(`),Oe(e.content,o),r(")")}function g1(e,o){for(let r=0;r<e.children.length;r++){const i=e.children[r];_e(i)?o.push(i,-3):Oe(i,o)}}function d4(e,o){const{push:r}=o;if(e.type===8)r("["),g1(e,o),r("]");else if(e.isStatic){const i=Ei(e.content)?e.content:JSON.stringify(e.content);r(i,-2,e)}else r(`[${e.content}]`,-3,e)}function u4(e,o){const{push:r,helper:i,pure:a}=o;a&&r(Ss),r(`${i(Pr)}(${JSON.stringify(e.content)})`,-3,e)}function h4(e,o){const{push:r,helper:i,pure:a}=o,{tag:s,props:l,children:c,patchFlag:d,dynamicProps:u,directives:h,isBlock:p,disableTracking:m,isComponent:g}=e;let _;d&&(_=String(d)),h&&r(i(ms)+"("),p&&r(`(${i(bo)}(${m?"true":""}), `),a&&r(Ss);const C=p?Zo(o.inSSR,g):qo(o.inSSR,g);r(i(C)+"(",-2,e),Mi(p4([s,l,c,_,u]),o),r(")"),p&&r(")"),h&&(r(", "),Oe(h,o),r(")"))}function p4(e){let o=e.length;for(;o--&&e[o]==null;);return e.slice(0,o+1).map(r=>r||"null")}function f4(e,o){const{push:r,helper:i,pure:a}=o,s=_e(e.callee)?e.callee:i(e.callee);a&&r(Ss),r(s+"(",-2,e),Mi(e.arguments,o),r(")")}function m4(e,o){const{push:r,indent:i,deindent:a,newline:s}=o,{properties:l}=e;if(!l.length){r("{}",-2,e);return}const c=l.length>1||!1;r(c?"{":"{ "),c&&i();for(let d=0;d<l.length;d++){const{key:u,value:h}=l[d];d4(u,o),r(": "),Oe(h,o),d<l.length-1&&(r(","),s())}c&&a(),r(c?"}":" }")}function g4(e,o){ed(e.elements,o)}function y4(e,o){const{push:r,indent:i,deindent:a}=o,{params:s,returns:l,body:c,newline:d,isSlot:u}=e;u&&r(`_${jo[_s]}(`),r("(",-2,e),lo(s)?Mi(s,o):s&&Oe(s,o),r(") => "),(d||c)&&(r("{"),i()),l?(d&&r("return "),lo(l)?ed(l,o):Oe(l,o)):c&&Oe(c,o),(d||c)&&(a(),r("}")),u&&(e.isNonScopedSlot&&r(", undefined, true"),r(")"))}function v4(e,o){const{test:r,consequent:i,alternate:a,newline:s}=e,{push:l,indent:c,deindent:d,newline:u}=o;if(r.type===4){const p=!Ei(r.content);p&&l("("),m1(r,o),p&&l(")")}else l("("),Oe(r,o),l(")");s&&c(),o.indentLevel++,s||l(" "),l("? "),Oe(i,o),o.indentLevel--,s&&u(),s||l(" "),l(": ");const h=a.type===19;h||o.indentLevel++,Oe(a,o),h||o.indentLevel--,s&&d(!0)}function b4(e,o){const{push:r,helper:i,indent:a,deindent:s,newline:l}=o,{needPauseTracking:c,needArraySpread:d}=e;d&&r("[...("),r(`_cache[${e.index}] || (`),c&&(a(),r(`${i(mi)}(-1`),e.inVOnce&&r(", true"),r("),"),l(),r("(")),r(`_cache[${e.index}] = `),Oe(e.value,o),c&&(r(`).cacheIndex = ${e.index},`),l(),r(`${i(mi)}(1),`),l(),r(`_cache[${e.index}]`),s()),r(")"),d&&r(")]")}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");const _4=(e,o)=>{if(e.type===5)e.content=ua(e.content,o);else if(e.type===1){const r=Re(e,"memo");for(let i=0;i<e.props.length;i++){const a=e.props[i];if(a.type===7&&a.name!=="for"){const s=a.exp,l=a.arg;s&&s.type===4&&!(a.name==="on"&&l)&&!(r&&l&&l.type===4&&l.content==="key")&&(a.exp=ua(s,o,a.name==="slot")),l&&l.type===4&&!l.isStatic&&(a.arg=ua(l,o))}}}};function ua(e,o,r=!1,i=!1,a=Object.create(o.identifiers)){return e}function y1(e){return _e(e)?e:e.type===4?e.content:e.children.map(y1).join("")}const C4=td(/^(?:if|else|else-if)$/,(e,o,r)=>v1(e,o,r,(i,a,s)=>{const l=r.parent.children;let c=l.indexOf(i),d=0;for(;c-->=0;){const u=l[c];u&&u.type===9&&(d+=u.branches.length)}return()=>{if(s)i.codegenNode=bh(a,d,r);else{const u=w4(i.codegenNode);u.alternate=bh(a,d+i.branches.length-1,r)}}}));function v1(e,o,r,i){if(o.name!=="else"&&(!o.exp||!o.exp.content.trim())){const a=o.exp?o.exp.loc:e.loc;r.onError(Wt(28,o.loc)),o.exp=Ct("true",!1,a)}if(o.name==="if"){const a=vh(e,o),s={type:9,loc:KS(e.loc),branches:[a]};if(r.replaceNode(s),i)return i(s,a,!0)}else{const a=r.parent.children;let s=a.indexOf(e);for(;s-->=-1;){const l=a[s];if(l&&Jc(l)){r.removeNode(l);continue}if(l&&l.type===9){(o.name==="else-if"||o.name==="else")&&l.branches[l.branches.length-1].condition===void 0&&r.onError(Wt(30,e.loc)),r.removeNode();const c=vh(e,o);l.branches.push(c);const d=i&&i(l,c,!1);Ti(c,r),d&&d(),r.currentNode=null}else r.onError(Wt(30,e.loc));break}}}function vh(e,o){const r=e.tagType===3;return{type:10,loc:e.loc,condition:o.name==="else"?void 0:o.exp,children:r&&!Re(e,"for")?e.children:[e],userKey:Ni(e,"key"),isTemplateIf:r}}function bh(e,o,r){return e.condition?Oa(e.condition,_h(e,o,r),ge(r.helper(Pr),['""',"true"])):_h(e,o,r)}function _h(e,o,r){const{helper:i}=r,a=ue("key",Ct(`${o}`,!1,Ce,2)),{children:s}=e,l=s[0];if(s.length!==1||l.type!==1)if(s.length===1&&l.type===11){const c=l.codegenNode;return yi(c,a,r),c}else return Nr(r,i(Ar),Ye([a]),s,64,void 0,void 0,!0,!1,!1,e.loc);else{const c=l.codegenNode,d=e1(c);return d.type===13&&ws(d,r),yi(d,a,r),c}}function w4(e){for(;;)if(e.type===19)if(e.alternate.type===19)e=e.alternate;else return e;else e.type===20&&(e=e.value)}const k4=td("for",(e,o,r)=>{const{helper:i,removeHelper:a}=r;return b1(e,o,r,s=>{const l=ge(i(gs),[s.source]),c=Mr(e),d=Re(e,"memo"),u=Ni(e,"key",!1,!0);u&&u.type;let h=u&&(u.type===6?u.value?Ct(u.value.content,!0):void 0:u.exp);const p=u&&h?ue("key",h):null,m=s.source.type===4&&s.source.constType>0,g=m?64:u?128:256;return s.codegenNode=Nr(r,i(Ar),void 0,l,g,void 0,void 0,!0,!m,!1,e.loc),()=>{let _;const{children:C}=s,M=C.length!==1||C[0].type!==1,N=gi(e)?e:c&&e.children.length===1&&gi(e.children[0])?e.children[0]:null;if(N?(_=N.codegenNode,c&&p&&yi(_,p,r)):M?_=Nr(r,i(Ar),p?Ye([p]):void 0,e.children,64,void 0,void 0,!0,void 0,!1):(_=C[0].codegenNode,c&&p&&yi(_,p,r),_.isBlock!==!m&&(_.isBlock?(a(bo),a(Zo(r.inSSR,_.isComponent))):a(qo(r.inSSR,_.isComponent))),_.isBlock=!m,_.isBlock?(i(bo),i(Zo(r.inSSR,_.isComponent))):i(qo(r.inSSR,_.isComponent))),d){const P=Wo(Da(s.parseResult,[Ct("_cached")]));P.body=zf([tn(["const _memo = (",d.exp,")"]),tn(["if (_cached && _cached.el",...h?[" && _cached.key === ",h]:[],` && ${r.helperString(Fc)}(_cached, _memo)) return _cached`]),tn(["const _item = ",_]),Ct("_item.memo = _memo"),Ct("return _item")]),l.arguments.push(P,Ct("_cache"),Ct(String(r.cached.length))),r.cached.push(null)}else l.arguments.push(Wo(Da(s.parseResult),_,!0))}})});function b1(e,o,r,i){if(!o.exp){r.onError(Wt(31,o.loc));return}const a=o.forParseResult;if(!a){r.onError(Wt(32,o.loc));return}nd(a);const{addIdentifiers:s,removeIdentifiers:l,scopes:c}=r,{source:d,value:u,key:h,index:p}=a,m={type:11,loc:o.loc,source:d,valueAlias:u,keyAlias:h,objectIndexAlias:p,parseResult:a,children:Mr(e)?e.children:[e]};r.replaceNode(m),c.vFor++;const g=i&&i(m);return()=>{c.vFor--,g&&g()}}function nd(e,o){e.finalized||(e.finalized=!0)}function Da({value:e,key:o,index:r},i=[]){return S4([e,o,r,...i])}function S4(e){let o=e.length;for(;o--&&!e[o];);return e.slice(0,o+1).map((r,i)=>r||Ct("_".repeat(i+1),!1))}const Ch=Ct("undefined",!1),_1=(e,o)=>{if(e.type===1&&(e.tagType===1||e.tagType===3)){const r=Re(e,"slot");if(r)return r.exp,o.scopes.vSlot++,()=>{o.scopes.vSlot--}}},x4=(e,o)=>{let r;if(Mr(e)&&e.props.some(qc)&&(r=Re(e,"for"))){const i=r.forParseResult;if(i){nd(i);const{value:a,key:s,index:l}=i,{addIdentifiers:c,removeIdentifiers:d}=o;return a&&c(a),s&&c(s),l&&c(l),()=>{a&&d(a),s&&d(s),l&&d(l)}}}},A4=(e,o,r,i)=>Wo(e,r,!1,!0,r.length?r[0].loc:i);function C1(e,o,r=A4){o.helper(_s);const{children:i,loc:a}=e,s=[],l=[];let c=o.scopes.vSlot>0||o.scopes.vFor>0;const d=Re(e,"slot",!0);if(d){const{arg:M,exp:N}=d;M&&!Pe(M)&&(c=!0),s.push(ue(M||Ct("default",!0),r(N,void 0,i,a)))}let u=!1,h=!1;const p=[],m=new Set;let g=0;for(let M=0;M<i.length;M++){const N=i[M];let P;if(!Mr(N)||!(P=Re(N,"slot",!0))){N.type!==3&&p.push(N);continue}if(d){o.onError(Wt(37,P.loc));break}u=!0;const{children:V,loc:K}=N,{arg:X=Ct("default",!0),exp:rt,loc:pt}=P;let it;Pe(X)?it=X?X.content:"default":c=!0;const et=Re(N,"for"),ut=r(rt,et,V,K);let L,q;if(L=Re(N,"if"))c=!0,l.push(Oa(L.exp,Gi(X,ut,g++),Ch));else if(q=Re(N,/^else(?:-if)?$/,!0)){let H=M,I;for(;H--&&(I=i[H],!!Jc(I)););if(I&&Mr(I)&&Re(I,/^(?:else-)?if$/)){let U=l[l.length-1];for(;U.alternate.type===19;)U=U.alternate;U.alternate=q.exp?Oa(q.exp,Gi(X,ut,g++),Ch):Gi(X,ut,g++)}else o.onError(Wt(30,q.loc))}else if(et){c=!0;const H=et.forParseResult;H?(nd(H),l.push(ge(o.helper(gs),[H.source,Wo(Da(H),Gi(X,ut),!0)]))):o.onError(Wt(32,et.loc))}else{if(it){if(m.has(it)){o.onError(Wt(38,pt));continue}m.add(it),it==="default"&&(h=!0)}s.push(ue(X,ut))}}if(!d){const M=(N,P)=>{const V=r(N,void 0,P,a);return o.compatConfig&&(V.isNonScopedSlot=!0),ue("default",V)};u?p.length&&!p.every(ks)&&(h?o.onError(Wt(39,p[0].loc)):s.push(M(void 0,p))):s.push(M(void 0,i))}const _=c?2:ha(e.children)?3:1;let C=Ye(s.concat(ue("_",Ct(_+"",!1))),a);return l.length&&(C=ge(o.helper(Gc),[C,mo(l)])),{slots:C,hasDynamicSlots:c}}function Gi(e,o,r){const i=[ue("name",e),ue("fn",o)];return r!=null&&i.push(ue("key",Ct(String(r),!0))),Ye(i)}function ha(e){for(let o=0;o<e.length;o++){const r=e[o];switch(r.type){case 1:if(r.tagType===2||ha(r.children))return!0;break;case 9:if(ha(r.branches))return!0;break;case 10:case 11:if(ha(r.children))return!0;break}}return!1}const w1=new WeakMap,k1=(e,o)=>function(){if(e=o.currentNode,!(e.type===1&&(e.tagType===0||e.tagType===1)))return;const{tag:r,props:i}=e,a=e.tagType===1;let s=a?S1(e,o):`"${r}"`;const l=Op(s)&&s.callee===hs;let c,d,u=0,h,p,m,g=l||s===hr||s===ss||!a&&(r==="svg"||r==="foreignObject"||r==="math");if(i.length>0){const _=od(e,o,void 0,a,l);c=_.props,u=_.patchFlag,p=_.dynamicPropNames;const C=_.directives;m=C&&C.length?mo(C.map(M=>x1(M,o))):void 0,_.shouldUseBlock&&(g=!0)}if(e.children.length>0)if(s===pi&&(g=!0,u|=1024),a&&s!==hr&&s!==pi){const{slots:_,hasDynamicSlots:C}=C1(e,o);d=_,C&&(u|=1024)}else if(e.children.length===1&&s!==hr){const _=e.children[0],C=_.type,M=C===5||C===8;M&&Ge(_,o)===0&&(u|=1),M||C===2?d=_:d=e.children}else d=e.children;p&&p.length&&(h=N4(p)),e.codegenNode=Nr(o,s,c,d,u===0?void 0:u,h,m,!!g,!1,a,e.loc)};function S1(e,o,r=!1){let{tag:i}=e;const a=Bl(i),s=Ni(e,"is",!1,!0);if(s)if(a||Ho("COMPILER_IS_ON_ELEMENT",o)){let c;if(s.type===6?c=s.value&&Ct(s.value.content,!0):(c=s.exp,c||(c=Ct("is",!1,s.arg.loc))),c)return ge(o.helper(hs),[c])}else s.type===6&&s.value.content.startsWith("vue:")&&(i=s.value.content.slice(4));const l=Xc(i)||o.isBuiltInComponent(i);return l?(r||o.helper(l),l):(o.helper(us),o.components.add(i),Ir(i,"component"))}function od(e,o,r=e.props,i,a,s=!1){const{tag:l,loc:c,children:d}=e;let u=[];const h=[],p=[],m=d.length>0;let g=!1,_=0,C=!1,M=!1,N=!1,P=!1,V=!1,K=!1;const X=[],rt=ut=>{u.length&&(h.push(Ye(wh(u),c)),u=[]),ut&&h.push(ut)},pt=()=>{o.scopes.vFor>0&&u.push(ue(Ct("ref_for",!0),Ct("true")))},it=({key:ut,value:L})=>{if(Pe(ut)){const q=ut.content,H=Lp(q);if(H&&(!i||a)&&q.toLowerCase()!=="onclick"&&q!=="onUpdate:modelValue"&&!yu(q)&&(P=!0),H&&yu(q)&&(K=!0),H&&L.type===14&&(L=L.arguments[0]),L.type===20||(L.type===4||L.type===8)&&Ge(L,o)>0)return;q==="ref"?C=!0:q==="class"?M=!0:q==="style"?N=!0:q!=="key"&&!X.includes(q)&&X.push(q),i&&(q==="class"||q==="style")&&!X.includes(q)&&X.push(q)}else V=!0};for(let ut=0;ut<r.length;ut++){const L=r[ut];if(L.type===6){const{loc:q,name:H,nameLoc:I,value:U}=L;let z=!0;if(H==="ref"&&(C=!0,pt()),H==="is"&&(Bl(l)||U&&U.content.startsWith("vue:")||Ho("COMPILER_IS_ON_ELEMENT",o)))continue;u.push(ue(Ct(H,!0,I),Ct(U?U.content:"",z,U?U.loc:q)))}else{const{name:q,arg:H,exp:I,loc:U,modifiers:z}=L,j=q==="bind",ct=q==="on";if(q==="slot"){i||o.onError(Wt(40,U));continue}if(q==="once"||q==="memo"||q==="is"||j&&co(H,"is")&&(Bl(l)||Ho("COMPILER_IS_ON_ELEMENT",o))||ct&&s)continue;if((j&&co(H,"key")||ct&&m&&co(H,"vue:before-update"))&&(g=!0),j&&co(H,"ref")&&pt(),!H&&(j||ct)){if(V=!0,I)if(j){if(rt(),Ho("COMPILER_V_BIND_OBJECT_ORDER",o)){h.unshift(I);continue}pt(),rt(),h.push(I)}else rt({type:14,loc:U,callee:o.helper(bs),arguments:i?[I]:[I,"true"]});else o.onError(Wt(j?34:35,U));continue}j&&z.some(lt=>lt.content==="prop")&&(_|=32);const st=o.directiveTransforms[q];if(st){const{props:lt,needRuntime:ot}=st(L,e,o);!s&<.forEach(it),ct&&H&&!Pe(H)?rt(Ye(lt,c)):u.push(...lt),ot&&(p.push(L),fc(ot)&&w1.set(L,ot))}else T0(q)||(p.push(L),m&&(g=!0))}}let et;if(h.length?(rt(),h.length>1?et=ge(o.helper(fi),h,c):et=h[0]):u.length&&(et=Ye(wh(u),c)),V?_|=16:(M&&!i&&(_|=2),N&&!i&&(_|=4),X.length&&(_|=8),P&&(_|=32)),!g&&(_===0||_===32)&&(C||K||p.length>0)&&(_|=512),!o.inSSR&&et)switch(et.type){case 15:let ut=-1,L=-1,q=!1;for(let U=0;U<et.properties.length;U++){const z=et.properties[U].key;Pe(z)?z.content==="class"?ut=U:z.content==="style"&&(L=U):z.isHandlerKey||(q=!0)}const H=et.properties[ut],I=et.properties[L];q?et=ge(o.helper(Er),[et]):(H&&!Pe(H.value)&&(H.value=ge(o.helper(ys),[H.value])),I&&(N||I.value.type===4&&I.value.content.trim()[0]==="["||I.value.type===17)&&(I.value=ge(o.helper(vs),[I.value])));break;case 14:break;default:et=ge(o.helper(Er),[ge(o.helper($r),[et])]);break}return{props:et,directives:p,patchFlag:_,dynamicPropNames:X,shouldUseBlock:g}}function wh(e){const o=new Map,r=[];for(let i=0;i<e.length;i++){const a=e[i];if(a.key.type===8||!a.key.isStatic){r.push(a);continue}const s=a.key.content,l=o.get(s);l?(s==="style"||s==="class"||Lp(s))&&E4(l,a):(o.set(s,a),r.push(a))}return r}function E4(e,o){e.value.type===17?e.value.elements.push(o.value):e.value=mo([e.value,o.value],e.loc)}function x1(e,o){const r=[],i=w1.get(e);i?r.push(o.helperString(i)):(o.helper(ps),o.directives.add(e.name),r.push(Ir(e.name,"directive")));const{loc:a}=e;if(e.exp&&r.push(e.exp),e.arg&&(e.exp||r.push("void 0"),r.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||r.push("void 0"),r.push("void 0"));const s=Ct("true",!1,a);r.push(Ye(e.modifiers.map(l=>ue(l,s)),a))}return mo(r,e.loc)}function N4(e){let o="[";for(let r=0,i=e.length;r<i;r++)o+=JSON.stringify(e[r]),r<i-1&&(o+=", ");return o+"]"}function Bl(e){return e==="component"||e==="Component"}const T4=(e,o)=>{if(gi(e)){const{children:r,loc:i}=e,{slotName:a,slotProps:s}=A1(e,o),l=[o.prefixIdentifiers?"_ctx.$slots":"$slots",a,"{}","undefined","true"];let c=2;s&&(l[2]=s,c=3),r.length&&(l[3]=Wo([],r,!1,!1,i),c=4),o.scopeId&&!o.slotted&&(c=5),l.splice(c),e.codegenNode=ge(o.helper(zc),l,i)}};function A1(e,o){let r='"default"',i;const a=[];for(let s=0;s<e.props.length;s++){const l=e.props[s];if(l.type===6)l.value&&(l.name==="name"?r=JSON.stringify(l.value.content):(l.name=fo(l.name),a.push(l)));else if(l.name==="bind"&&co(l.arg,"name")){if(l.exp)r=l.exp;else if(l.arg&&l.arg.type===4){const c=fo(l.arg.content);r=l.exp=Ct(c,!1,l.arg.loc)}}else l.name==="bind"&&l.arg&&Pe(l.arg)&&(l.arg.content=fo(l.arg.content)),a.push(l)}if(a.length>0){const{props:s,directives:l}=od(e,o,a,!1,!1);i=s,l.length&&o.onError(Wt(36,l[0].loc))}return{slotName:r,slotProps:i}}const rd=(e,o,r,i)=>{const{loc:a,modifiers:s,arg:l}=e;!e.exp&&!s.length&&r.onError(Wt(35,a));let c;if(l.type===4)if(l.isStatic){let p=l.content;p.startsWith("vue:")&&(p=`vnode-${p.slice(4)}`);const m=o.tagType!==0||p.startsWith("vnode")||!/[A-Z]/.test(p)?I0(fo(p)):`on:${p}`;c=Ct(m,!0,l.loc)}else c=tn([`${r.helperString(Ia)}(`,l,")"]);else c=l,c.children.unshift(`${r.helperString(Ia)}(`),c.children.push(")");let d=e.exp;d&&!d.content.trim()&&(d=void 0);let u=r.cacheHandlers&&!d&&!r.inVOnce;if(d){const p=Wc(d),m=!(p||Jf(d)),g=d.content.includes(";");(m||u&&p)&&(d=tn([`${m?"$event":"(...args)"} => ${g?"{":"("}`,d,g?"}":")"]))}let h={props:[ue(c,d||Ct("() => {}",!1,a))]};return i&&(h=i(h)),u&&(h.props[0].value=r.cache(h.props[0].value)),h.props.forEach(p=>p.key.isHandlerKey=!0),h},E1=(e,o,r)=>{const{modifiers:i,loc:a}=e,s=e.arg;let{exp:l}=e;return l&&l.type===4&&!l.content.trim()&&(l=void 0),s.type!==4?(s.children.unshift("("),s.children.push(') || ""')):s.isStatic||(s.content=s.content?`${s.content} || ""`:'""'),i.some(c=>c.content==="camel")&&(s.type===4?s.isStatic?s.content=fo(s.content):s.content=`${r.helperString(Ma)}(${s.content})`:(s.children.unshift(`${r.helperString(Ma)}(`),s.children.push(")"))),r.inSSR||(i.some(c=>c.content==="prop")&&kh(s,"."),i.some(c=>c.content==="attr")&&kh(s,"^")),{props:[ue(s,l)]}},kh=(e,o)=>{e.type===4?e.isStatic?e.content=o+e.content:e.content=`\`${o}\${${e.content}}\``:(e.children.unshift(`'${o}' + (`),e.children.push(")"))},M4=(e,o)=>{if(e.type===0||e.type===1||e.type===11||e.type===10)return()=>{const r=e.children;let i,a=!1;for(let s=0;s<r.length;s++){const l=r[s];if(sa(l)){a=!0;for(let c=s+1;c<r.length;c++){const d=r[c];if(sa(d))i||(i=r[s]=tn([l],l.loc)),i.children.push(" + ",d),r.splice(c,1),c--;else{i=void 0;break}}}}if(!(!a||r.length===1&&(e.type===0||e.type===1&&e.tagType===0&&!e.props.find(s=>s.type===7&&!o.directiveTransforms[s.name])&&e.tag!=="template")))for(let s=0;s<r.length;s++){const l=r[s];if(sa(l)||l.type===8){const c=[];(l.type!==2||l.content!==" ")&&c.push(l),!o.ssr&&Ge(l,o)===0&&c.push("1"),r[s]={type:12,content:l,loc:l.loc,codegenNode:ge(o.helper(ds),c)}}}}},Sh=new WeakSet,I4=(e,o)=>{if(e.type===1&&Re(e,"once",!0))return Sh.has(e)||o.inVOnce||o.inSSR?void 0:(Sh.add(e),o.inVOnce=!0,o.helper(mi),()=>{o.inVOnce=!1;const r=o.currentNode;r.codegenNode&&(r.codegenNode=o.cache(r.codegenNode,!0,!0))})},id=(e,o,r)=>{const{exp:i,arg:a}=e;if(!i)return r.onError(Wt(41,e.loc)),Xr();const s=i.loc.source.trim(),l=i.type===4?i.content:s,c=r.bindingMetadata[s];if(c==="props"||c==="props-aliased")return r.onError(Wt(44,i.loc)),Xr();if(c==="literal-const"||c==="setup-const")return r.onError(Wt(45,i.loc)),Xr();if(!l.trim()||!Wc(i))return r.onError(Wt(42,i.loc)),Xr();const d=a||Ct("modelValue",!0),u=a?Pe(a)?`onUpdate:${fo(a.content)}`:tn(['"onUpdate:" + ',a]):"onUpdate:modelValue";let h;const p=r.isTS?"($event: any)":"$event";h=tn([`${p} => ((`,i,") = $event)"]);const m=[ue(d,e.exp),ue(u,h)];if(e.modifiers.length&&o.tagType===1){const g=e.modifiers.map(C=>C.content).map(C=>(Ei(C)?C:JSON.stringify(C))+": true").join(", "),_=a?Pe(a)?`${a.content}Modifiers`:tn([a,' + "Modifiers"']):"modelModifiers";m.push(ue(_,Ct(`{ ${g} }`,!1,e.loc,2)))}return Xr(m)};function Xr(e=[]){return{props:e}}const O4=/[\w).+\-_$\]]/,L4=(e,o)=>{Ho("COMPILER_FILTERS",o)&&(e.type===5?Ra(e.content,o):e.type===1&&e.props.forEach(r=>{r.type===7&&r.name!=="for"&&r.exp&&Ra(r.exp,o)}))};function Ra(e,o){if(e.type===4)xh(e,o);else for(let r=0;r<e.children.length;r++){const i=e.children[r];typeof i=="object"&&(i.type===4?xh(i,o):i.type===8?Ra(e,o):i.type===5&&Ra(i.content,o))}}function xh(e,o){const r=e.content;let i=!1,a=!1,s=!1,l=!1,c=0,d=0,u=0,h=0,p,m,g,_,C=[];for(g=0;g<r.length;g++)if(m=p,p=r.charCodeAt(g),i)p===39&&m!==92&&(i=!1);else if(a)p===34&&m!==92&&(a=!1);else if(s)p===96&&m!==92&&(s=!1);else if(l)p===47&&m!==92&&(l=!1);else if(p===124&&r.charCodeAt(g+1)!==124&&r.charCodeAt(g-1)!==124&&!c&&!d&&!u)_===void 0?(h=g+1,_=r.slice(0,g).trim()):M();else{switch(p){case 34:a=!0;break;case 39:i=!0;break;case 96:s=!0;break;case 40:u++;break;case 41:u--;break;case 91:d++;break;case 93:d--;break;case 123:c++;break;case 125:c--;break}if(p===47){let N=g-1,P;for(;N>=0&&(P=r.charAt(N),P===" ");N--);(!P||!O4.test(P))&&(l=!0)}}_===void 0?_=r.slice(0,g).trim():h!==0&&M();function M(){C.push(r.slice(h,g).trim()),h=g+1}if(C.length){for(g=0;g<C.length;g++)_=D4(_,C[g],o);e.content=_,e.ast=void 0}}function D4(e,o,r){r.helper(fs);const i=o.indexOf("(");if(i<0)return r.filters.add(o),`${Ir(o,"filter")}(${e})`;{const a=o.slice(0,i),s=o.slice(i+1);return r.filters.add(a),`${Ir(a,"filter")}(${e}${s!==")"?","+s:s}`}}const Ah=new WeakSet,R4=(e,o)=>{if(e.type===1){const r=Re(e,"memo");return!r||Ah.has(e)||o.inSSR?void 0:(Ah.add(e),()=>{const i=e.codegenNode||o.currentNode.codegenNode;i&&i.type===13&&(e.tagType!==1&&ws(i,o),e.codegenNode=ge(o.helper(Cs),[r.exp,Wo(void 0,i),"_cache",String(o.cached.length)]),o.cached.push(null))})}},N1=(e,o)=>{if(e.type===1){for(const r of e.props)if(r.type===7&&r.name==="bind"&&(!r.exp||r.exp.type===4&&!r.exp.content.trim())&&r.arg){const i=r.arg;if(i.type!==4||!i.isStatic)o.onError(Wt(53,i.loc)),r.exp=Ct("",!0,i.loc);else{const a=fo(i.content);(jc.test(a[0])||a[0]==="-")&&(r.exp=Ct(a,!1,i.loc))}}}};function T1(e){return[[N1,I4,C4,R4,k4,L4,T4,k1,_1,M4],{on:rd,bind:E1,model:id}]}function M1(e,o={}){const r=o.onError||Yc,i=o.mode==="module";o.prefixIdentifiers===!0?r(Wt(48)):i&&r(Wt(49));const a=!1;o.cacheHandlers&&r(Wt(50)),o.scopeId&&!i&&r(Wt(51));const s=Bn({},o,{prefixIdentifiers:a}),l=_e(e)?Qc(e,s):e,[c,d]=T1();return h1(l,Bn({},s,{nodeTransforms:[...c,...o.nodeTransforms||[]],directiveTransforms:Bn({},d,o.directiveTransforms||{})})),f1(l,s)}const P4={DATA:"data",PROPS:"props",PROPS_ALIASED:"props-aliased",SETUP_LET:"setup-let",SETUP_CONST:"setup-const",SETUP_REACTIVE_CONST:"setup-reactive-const",SETUP_MAYBE_REF:"setup-maybe-ref",SETUP_REF:"setup-ref",OPTIONS:"options",LITERAL_CONST:"literal-const"},I1=()=>({props:[]}),ad=Symbol(""),sd=Symbol(""),ld=Symbol(""),cd=Symbol(""),Pa=Symbol(""),dd=Symbol(""),ud=Symbol(""),hd=Symbol(""),pd=Symbol(""),fd=Symbol("");Bf({[ad]:"vModelRadio",[sd]:"vModelCheckbox",[ld]:"vModelText",[cd]:"vModelSelect",[Pa]:"vModelDynamic",[dd]:"withModifiers",[ud]:"withKeys",[hd]:"vShow",[pd]:"Transition",[fd]:"TransitionGroup"});let nr;function $4(e,o=!1){return nr||(nr=document.createElement("div")),o?(nr.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,nr.children[0].getAttribute("foo")):(nr.innerHTML=e,nr.textContent)}const md={parseMode:"html",isVoidTag:O0,isNativeTag:e=>L0(e)||D0(e)||R0(e),isPreTag:e=>e==="pre",isIgnoreNewlineTag:e=>e==="pre"||e==="textarea",decodeEntities:$4,isBuiltInComponent:e=>{if(e==="Transition"||e==="transition")return pd;if(e==="TransitionGroup"||e==="transition-group")return fd},getNamespace(e,o,r){let i=o?o.ns:r;if(o&&i===2)if(o.tag==="annotation-xml"){if(e==="svg")return 1;o.props.some(a=>a.type===6&&a.name==="encoding"&&a.value!=null&&(a.value.content==="text/html"||a.value.content==="application/xhtml+xml"))&&(i=0)}else/^m(?:[ions]|text)$/.test(o.tag)&&e!=="mglyph"&&e!=="malignmark"&&(i=0);else o&&i===1&&(o.tag==="foreignObject"||o.tag==="desc"||o.tag==="title")&&(i=0);if(i===0){if(e==="svg")return 1;if(e==="math")return 2}return i}},O1=e=>{e.type===1&&e.props.forEach((o,r)=>{o.type===6&&o.name==="style"&&o.value&&(e.props[r]={type:7,name:"bind",arg:Ct("style",!0,o.loc),exp:V4(o.value.content,o.loc),modifiers:[],loc:o.loc})})},V4=(e,o)=>{const r=P0(e);return Ct(JSON.stringify(r),!1,o,3)};function Hn(e,o){return Wt(e,o)}const B4={X_V_HTML_NO_EXPRESSION:54,54:"X_V_HTML_NO_EXPRESSION",X_V_HTML_WITH_CHILDREN:55,55:"X_V_HTML_WITH_CHILDREN",X_V_TEXT_NO_EXPRESSION:56,56:"X_V_TEXT_NO_EXPRESSION",X_V_TEXT_WITH_CHILDREN:57,57:"X_V_TEXT_WITH_CHILDREN",X_V_MODEL_ON_INVALID_ELEMENT:58,58:"X_V_MODEL_ON_INVALID_ELEMENT",X_V_MODEL_ARG_ON_ELEMENT:59,59:"X_V_MODEL_ARG_ON_ELEMENT",X_V_MODEL_ON_FILE_INPUT_ELEMENT:60,60:"X_V_MODEL_ON_FILE_INPUT_ELEMENT",X_V_MODEL_UNNECESSARY_VALUE:61,61:"X_V_MODEL_UNNECESSARY_VALUE",X_V_SHOW_NO_EXPRESSION:62,62:"X_V_SHOW_NO_EXPRESSION",X_TRANSITION_INVALID_CHILDREN:63,63:"X_TRANSITION_INVALID_CHILDREN",X_IGNORED_SIDE_EFFECT_TAG:64,64:"X_IGNORED_SIDE_EFFECT_TAG",__EXTEND_POINT__:65,65:"__EXTEND_POINT__"},U4={54:"v-html is missing expression.",55:"v-html will override element children.",56:"v-text is missing expression.",57:"v-text will override element children.",58:"v-model can only be used on <input>, <textarea> and <select> elements.",59:"v-model argument is not supported on plain elements.",60:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",61:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",62:"v-show is missing expression.",63:"<Transition> expects exactly one child element or component.",64:"Tags with side effect (<script> and <style>) are ignored in client component templates."},H4=(e,o,r)=>{const{exp:i,loc:a}=e;return i||r.onError(Hn(54,a)),o.children.length&&(r.onError(Hn(55,a)),o.children.length=0),{props:[ue(Ct("innerHTML",!0,a),i||Ct("",!0))]}},z4=(e,o,r)=>{const{exp:i,loc:a}=e;return i||r.onError(Hn(56,a)),o.children.length&&(r.onError(Hn(57,a)),o.children.length=0),{props:[ue(Ct("textContent",!0),i?Ge(i,r)>0?i:ge(r.helperString(Ai),[i],a):Ct("",!0))]}},G4=(e,o,r)=>{const i=id(e,o,r);if(!i.props.length||o.tagType===1)return i;e.arg&&r.onError(Hn(59,e.arg.loc));const{tag:a}=o,s=r.isCustomElement(a);if(a==="input"||a==="textarea"||a==="select"||s){let l=ld,c=!1;if(a==="input"||s){const d=Ni(o,"type");if(d){if(d.type===7)l=Pa;else if(d.value)switch(d.value.content){case"radio":l=ad;break;case"checkbox":l=sd;break;case"file":c=!0,r.onError(Hn(60,e.loc));break}}else Qf(o)&&(l=Pa)}else a==="select"&&(l=cd);c||(i.needRuntime=r.helper(l))}else r.onError(Hn(58,e.loc));return i.props=i.props.filter(l=>!(l.key.type===4&&l.key.content==="modelValue")),i},F4=Ja("passive,once,capture"),Y4=Ja("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),X4=Ja("left,right"),L1=Ja("onkeyup,onkeydown,onkeypress"),j4=(e,o,r,i)=>{const a=[],s=[],l=[];for(let c=0;c<o.length;c++){const d=o[c].content;d==="native"&&Tr("COMPILER_V_ON_NATIVE",r)||F4(d)?l.push(d):X4(d)?Pe(e)?L1(e.content.toLowerCase())?a.push(d):s.push(d):(a.push(d),s.push(d)):Y4(d)?s.push(d):a.push(d)}return{keyModifiers:a,nonKeyModifiers:s,eventOptionModifiers:l}},Eh=(e,o)=>Pe(e)&&e.content.toLowerCase()==="onclick"?Ct(o,!0):e.type!==4?tn(["(",e,`) === "onClick" ? "${o}" : (`,e,")"]):e,W4=(e,o,r)=>rd(e,o,r,i=>{const{modifiers:a}=e;if(!a.length)return i;let{key:s,value:l}=i.props[0];const{keyModifiers:c,nonKeyModifiers:d,eventOptionModifiers:u}=j4(s,a,r,e.loc);if(d.includes("right")&&(s=Eh(s,"onContextmenu")),d.includes("middle")&&(s=Eh(s,"onMouseup")),d.length&&(l=ge(r.helper(dd),[l,JSON.stringify(d)])),c.length&&(!Pe(s)||L1(s.content.toLowerCase()))&&(l=ge(r.helper(ud),[l,JSON.stringify(c)])),u.length){const h=u.map(Ip).join("");s=Pe(s)?Ct(`${s.content}${h}`,!0):tn(["(",s,`) + "${h}"`])}return{props:[ue(s,l)]}}),q4=(e,o,r)=>{const{exp:i,loc:a}=e;return i||r.onError(Hn(62,a)),{props:[],needRuntime:r.helper(hd)}},Z4=(e,o)=>{e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")&&o.removeNode()},D1=[O1],R1={cloak:I1,html:H4,text:z4,model:G4,on:W4,show:q4};function J4(e,o={}){return M1(e,Bn({},md,o,{nodeTransforms:[Z4,...D1,...o.nodeTransforms||[]],directiveTransforms:Bn({},R1,o.directiveTransforms||{}),transformHoist:null}))}function K4(e,o={}){return Qc(e,Bn({},md,o))}const Q4=Object.freeze(Object.defineProperty({__proto__:null,BASE_TRANSITION:Vc,BindingTypes:P4,CAMELIZE:Ma,CAPITALIZE:Df,CREATE_BLOCK:Bc,CREATE_COMMENT:Pr,CREATE_ELEMENT_BLOCK:Uc,CREATE_ELEMENT_VNODE:cs,CREATE_SLOTS:Gc,CREATE_STATIC:Hc,CREATE_TEXT:ds,CREATE_VNODE:ls,CompilerDeprecationTypes:_S,ConstantTypes:hS,DOMDirectiveTransforms:R1,DOMErrorCodes:B4,DOMErrorMessages:U4,DOMNodeTransforms:D1,ElementTypes:uS,ErrorCodes:kS,FRAGMENT:Ar,GUARD_REACTIVE_PROPS:$r,IS_MEMO_SAME:Fc,IS_REF:Vf,KEEP_ALIVE:pi,MERGE_PROPS:fi,NORMALIZE_CLASS:ys,NORMALIZE_PROPS:Er,NORMALIZE_STYLE:vs,Namespaces:cS,NodeTypes:dS,OPEN_BLOCK:bo,POP_SCOPE_ID:Pf,PUSH_SCOPE_ID:Rf,RENDER_LIST:gs,RENDER_SLOT:zc,RESOLVE_COMPONENT:us,RESOLVE_DIRECTIVE:ps,RESOLVE_DYNAMIC_COMPONENT:hs,RESOLVE_FILTER:fs,SET_BLOCK_TRACKING:mi,SUSPENSE:ss,TELEPORT:hr,TO_DISPLAY_STRING:Ai,TO_HANDLERS:bs,TO_HANDLER_KEY:Ia,TRANSITION:pd,TRANSITION_GROUP:fd,TS_NODE_TYPES:Xf,UNREF:$f,V_MODEL_CHECKBOX:sd,V_MODEL_DYNAMIC:Pa,V_MODEL_RADIO:ad,V_MODEL_SELECT:cd,V_MODEL_TEXT:ld,V_ON_WITH_KEYS:ud,V_ON_WITH_MODIFIERS:dd,V_SHOW:hd,WITH_CTX:_s,WITH_DIRECTIVES:ms,WITH_MEMO:Cs,advancePositionWithClone:HS,advancePositionWithMutation:Kf,assert:zS,baseCompile:M1,baseParse:Qc,buildDirectiveArgs:x1,buildProps:od,buildSlots:C1,checkCompatEnabled:Tr,compile:J4,convertToBlock:ws,createArrayExpression:mo,createAssignmentExpression:gS,createBlockStatement:zf,createCacheExpression:Hf,createCallExpression:ge,createCompilerError:Wt,createCompoundExpression:tn,createConditionalExpression:Oa,createDOMCompilerError:Hn,createForLoopParams:Da,createFunctionExpression:Wo,createIfStatement:mS,createInterpolation:pS,createObjectExpression:Ye,createObjectProperty:ue,createReturnStatement:vS,createRoot:Uf,createSequenceExpression:yS,createSimpleExpression:Ct,createStructuralDirectiveTransform:td,createTemplateLiteral:fS,createTransformContext:u1,createVNodeCall:Nr,errorMessages:SS,extractIdentifiers:bn,findDir:Re,findProp:Ni,forAliasRE:n1,generate:f1,generateCodeFrame:$0,getBaseTransformPreset:T1,getConstantType:Ge,getMemoedVNodeCall:e1,getVNodeBlockHelper:Zo,getVNodeHelper:qo,hasDynamicKeyVBind:Qf,hasScopeRef:an,helperNameMap:jo,injectProp:yi,isAllWhitespace:Zc,isCommentOrWhitespace:Jc,isCoreComponent:Xc,isFnExpression:Jf,isFnExpressionBrowser:Zf,isFnExpressionNode:US,isFunctionType:LS,isInDestructureAssignment:ES,isInNewExpression:NS,isMemberExpression:Wc,isMemberExpressionBrowser:qf,isMemberExpressionNode:VS,isReferencedIdentifier:AS,isSimpleIdentifier:Ei,isSlotOutlet:gi,isStaticArgOf:co,isStaticExp:Pe,isStaticProperty:Yf,isStaticPropertyKey:DS,isTemplateNode:Mr,isText:sa,isVPre:Pl,isVSlot:qc,isWhitespaceText:ks,locStub:Ce,noopDirectiveTransform:I1,parse:K4,parserOptions:md,processExpression:ua,processFor:b1,processIf:v1,processSlotOutlet:A1,registerRuntimeHelpers:Bf,resolveComponentType:S1,stringifyExpression:y1,toValidAssetId:Ir,trackSlotScopes:_1,trackVForSlotScopes:x4,transform:h1,transformBind:E1,transformElement:k1,transformExpression:_4,transformModel:id,transformOn:rd,transformStyle:O1,transformVBindShorthand:N1,traverseNode:Ti,unwrapTSNode:jf,validFirstIdentCharRE:jc,walkBlockDeclarations:Ff,walkFunctionParams:TS,walkIdentifiers:xS,warnDeprecation:wS},Symbol.toStringTag,{value:"Module"})),t5=mc(Q4),e5=mc(V0),n5=mc(B0);var Nh;function o5(){return Nh||(Nh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});var o=t5,r=e5,i=n5;function a(d){var u=Object.create(null);if(d)for(var h in d)u[h]=d[h];return u.default=d,Object.freeze(u)}var s=a(r);const l=Object.create(null);function c(d,u){if(!i.isString(d))if(d.nodeType)d=d.innerHTML;else return i.NOOP;const h=i.genCacheKey(d,u),p=l[h];if(p)return p;if(d[0]==="#"){const C=document.querySelector(d);d=C?C.innerHTML:""}const m=i.extend({hoistStatic:!0,onError:void 0,onWarn:i.NOOP},u);!m.isCustomElement&&typeof customElements<"u"&&(m.isCustomElement=C=>!!customElements.get(C));const{code:g}=o.compile(d,m),_=new Function("Vue",g)(s);return _._rc=!0,l[h]=_}r.registerRuntimeCompiler(c),e.compile=c,Object.keys(r).forEach(function(d){d!=="default"&&!Object.prototype.hasOwnProperty.call(e,d)&&(e[d]=r[d])})})(dh)),dh}var Th;function r5(){return Th||(Th=1,ch.exports=o5()),ch.exports}var Ul={exports:{}},i5=Ul.exports,Mh;function a5(){return Mh||(Mh=1,(function(e,o){(function(r,i){e.exports=i()})(i5,function(){function r(y,v){var b=Object.keys(y);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(y);v&&(x=x.filter(function(A){return Object.getOwnPropertyDescriptor(y,A).enumerable})),b.push.apply(b,x)}return b}function i(y){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?r(Object(b),!0).forEach(function(x){h(y,x,b[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(b)):r(Object(b)).forEach(function(x){Object.defineProperty(y,x,Object.getOwnPropertyDescriptor(b,x))})}return y}function a(y,v){if(typeof y!="object"||!y)return y;var b=y[Symbol.toPrimitive];if(b!==void 0){var x=b.call(y,v);if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(y)}function s(y){var v=a(y,"string");return typeof v=="symbol"?v:v+""}function l(y){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},l(y)}function c(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}function d(y,v){for(var b=0;b<v.length;b++){var x=v[b];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(y,s(x.key),x)}}function u(y,v,b){return v&&d(y.prototype,v),b&&d(y,b),Object.defineProperty(y,"prototype",{writable:!1}),y}function h(y,v,b){return v=s(v),v in y?Object.defineProperty(y,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[v]=b,y}function p(y){return m(y)||g(y)||_(y)||M()}function m(y){if(Array.isArray(y))return C(y)}function g(y){if(typeof Symbol<"u"&&y[Symbol.iterator]!=null||y["@@iterator"]!=null)return Array.from(y)}function _(y,v){if(y){if(typeof y=="string")return C(y,v);var b=Object.prototype.toString.call(y).slice(8,-1);if(b==="Object"&&y.constructor&&(b=y.constructor.name),b==="Map"||b==="Set")return Array.from(y);if(b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b))return C(y,v)}}function C(y,v){(v==null||v>y.length)&&(v=y.length);for(var b=0,x=new Array(v);b<v;b++)x[b]=y[b];return x}function M(){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 N=typeof window<"u"&&typeof window.document<"u",P=N?window:{},V=N&&P.document.documentElement?"ontouchstart"in P.document.documentElement:!1,K=N?"PointerEvent"in P:!1,X="cropper",rt="all",pt="crop",it="move",et="zoom",ut="e",L="w",q="s",H="n",I="ne",U="nw",z="se",j="sw",ct="".concat(X,"-crop"),st="".concat(X,"-disabled"),lt="".concat(X,"-hidden"),ot="".concat(X,"-hide"),St="".concat(X,"-invisible"),Pt="".concat(X,"-modal"),At="".concat(X,"-move"),Ut="".concat(X,"Action"),ne="".concat(X,"Preview"),G="crop",ht="move",dt="none",vt="crop",Et="cropend",Jt="cropmove",xt="cropstart",wt="dblclick",se=V?"touchstart":"mousedown",So=V?"touchmove":"mousemove",Ee=V?"touchend touchcancel":"mouseup",Xd=K?"pointerdown":se,jd=K?"pointermove":So,Wd=K?"pointerup pointercancel":Ee,qd="ready",Zd="resize",Jd="wheel",Is="zoom",Kd="image/jpeg",ag=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,sg=/^data:/,lg=/^data:image\/jpeg;base64,/,cg=/^img|canvas$/i,Qd=200,tu=100,eu={viewMode:0,dragMode:G,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:Qd,minContainerHeight:tu,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},dg='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',ug=Number.isNaN||P.isNaN;function Tt(y){return typeof y=="number"&&!ug(y)}var nu=function(y){return y>0&&y<1/0};function Os(y){return typeof y>"u"}function xo(y){return l(y)==="object"&&y!==null}var hg=Object.prototype.hasOwnProperty;function Ko(y){if(!xo(y))return!1;try{var v=y.constructor,b=v.prototype;return v&&b&&hg.call(b,"isPrototypeOf")}catch{return!1}}function $e(y){return typeof y=="function"}var pg=Array.prototype.slice;function ou(y){return Array.from?Array.from(y):pg.call(y)}function pe(y,v){return y&&$e(v)&&(Array.isArray(y)||Tt(y.length)?ou(y).forEach(function(b,x){v.call(y,b,x,y)}):xo(y)&&Object.keys(y).forEach(function(b){v.call(y,y[b],b,y)})),y}var Kt=Object.assign||function(y){for(var v=arguments.length,b=new Array(v>1?v-1:0),x=1;x<v;x++)b[x-1]=arguments[x];return xo(y)&&b.length>0&&b.forEach(function(A){xo(A)&&Object.keys(A).forEach(function($){y[$]=A[$]})}),y},fg=/\.\d*(?:0|9){12}\d*$/;function Qo(y){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return fg.test(y)?Math.round(y*v)/v:y}var mg=/^width|height|left|top|marginLeft|marginTop$/;function Kn(y,v){var b=y.style;pe(v,function(x,A){mg.test(A)&&Tt(x)&&(x="".concat(x,"px")),b[A]=x})}function gg(y,v){return y.classList?y.classList.contains(v):y.className.indexOf(v)>-1}function we(y,v){if(v){if(Tt(y.length)){pe(y,function(x){we(x,v)});return}if(y.classList){y.classList.add(v);return}var b=y.className.trim();b?b.indexOf(v)<0&&(y.className="".concat(b," ").concat(v)):y.className=v}}function gn(y,v){if(v){if(Tt(y.length)){pe(y,function(b){gn(b,v)});return}if(y.classList){y.classList.remove(v);return}y.className.indexOf(v)>=0&&(y.className=y.className.replace(v,""))}}function tr(y,v,b){if(v){if(Tt(y.length)){pe(y,function(x){tr(x,v,b)});return}b?we(y,v):gn(y,v)}}var yg=/([a-z\d])([A-Z])/g;function Ls(y){return y.replace(yg,"$1-$2").toLowerCase()}function Ds(y,v){return xo(y[v])?y[v]:y.dataset?y.dataset[v]:y.getAttribute("data-".concat(Ls(v)))}function Ur(y,v,b){xo(b)?y[v]=b:y.dataset?y.dataset[v]=b:y.setAttribute("data-".concat(Ls(v)),b)}function vg(y,v){if(xo(y[v]))try{delete y[v]}catch{y[v]=void 0}else if(y.dataset)try{delete y.dataset[v]}catch{y.dataset[v]=void 0}else y.removeAttribute("data-".concat(Ls(v)))}var ru=/\s\s*/,iu=(function(){var y=!1;if(N){var v=!1,b=function(){},x=Object.defineProperty({},"once",{get:function(){return y=!0,v},set:function(A){v=A}});P.addEventListener("test",b,x),P.removeEventListener("test",b,x)}return y})();function rn(y,v,b){var x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},A=b;v.trim().split(ru).forEach(function($){if(!iu){var B=y.listeners;B&&B[$]&&B[$][b]&&(A=B[$][b],delete B[$][b],Object.keys(B[$]).length===0&&delete B[$],Object.keys(B).length===0&&delete y.listeners)}y.removeEventListener($,A,x)})}function qe(y,v,b){var x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},A=b;v.trim().split(ru).forEach(function($){if(x.once&&!iu){var B=y.listeners,W=B===void 0?{}:B;A=function(){delete W[$][b],y.removeEventListener($,A,x);for(var J=arguments.length,F=new Array(J),Y=0;Y<J;Y++)F[Y]=arguments[Y];b.apply(y,F)},W[$]||(W[$]={}),W[$][b]&&y.removeEventListener($,W[$][b],x),W[$][b]=A,y.listeners=W}y.addEventListener($,A,x)})}function er(y,v,b){var x;return $e(Event)&&$e(CustomEvent)?x=new CustomEvent(v,{detail:b,bubbles:!0,cancelable:!0}):(x=document.createEvent("CustomEvent"),x.initCustomEvent(v,!0,!0,b)),y.dispatchEvent(x)}function au(y){var v=y.getBoundingClientRect();return{left:v.left+(window.pageXOffset-document.documentElement.clientLeft),top:v.top+(window.pageYOffset-document.documentElement.clientTop)}}var Rs=P.location,bg=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function su(y){var v=y.match(bg);return v!==null&&(v[1]!==Rs.protocol||v[2]!==Rs.hostname||v[3]!==Rs.port)}function lu(y){var v="timestamp=".concat(new Date().getTime());return y+(y.indexOf("?")===-1?"?":"&")+v}function Hr(y){var v=y.rotate,b=y.scaleX,x=y.scaleY,A=y.translateX,$=y.translateY,B=[];Tt(A)&&A!==0&&B.push("translateX(".concat(A,"px)")),Tt($)&&$!==0&&B.push("translateY(".concat($,"px)")),Tt(v)&&v!==0&&B.push("rotate(".concat(v,"deg)")),Tt(b)&&b!==1&&B.push("scaleX(".concat(b,")")),Tt(x)&&x!==1&&B.push("scaleY(".concat(x,")"));var W=B.length?B.join(" "):"none";return{WebkitTransform:W,msTransform:W,transform:W}}function _g(y){var v=i({},y),b=0;return pe(y,function(x,A){delete v[A],pe(v,function($){var B=Math.abs(x.startX-$.startX),W=Math.abs(x.startY-$.startY),J=Math.abs(x.endX-$.endX),F=Math.abs(x.endY-$.endY),Y=Math.sqrt(B*B+W*W),Q=Math.sqrt(J*J+F*F),Lt=(Q-Y)/Y;Math.abs(Lt)>Math.abs(b)&&(b=Lt)})}),b}function Di(y,v){var b=y.pageX,x=y.pageY,A={endX:b,endY:x};return v?A:i({startX:b,startY:x},A)}function Cg(y){var v=0,b=0,x=0;return pe(y,function(A){var $=A.startX,B=A.startY;v+=$,b+=B,x+=1}),v/=x,b/=x,{pageX:v,pageY:b}}function Qn(y){var v=y.aspectRatio,b=y.height,x=y.width,A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",$=nu(x),B=nu(b);if($&&B){var W=b*v;A==="contain"&&W>x||A==="cover"&&W<x?b=x/v:x=b*v}else $?b=x/v:B&&(x=b*v);return{width:x,height:b}}function wg(y){var v=y.width,b=y.height,x=y.degree;if(x=Math.abs(x)%180,x===90)return{width:b,height:v};var A=x%90*Math.PI/180,$=Math.sin(A),B=Math.cos(A),W=v*B+b*$,J=v*$+b*B;return x>90?{width:J,height:W}:{width:W,height:J}}function kg(y,v,b,x){var A=v.aspectRatio,$=v.naturalWidth,B=v.naturalHeight,W=v.rotate,J=W===void 0?0:W,F=v.scaleX,Y=F===void 0?1:F,Q=v.scaleY,Lt=Q===void 0?1:Q,Nt=b.aspectRatio,Ft=b.naturalWidth,Gt=b.naturalHeight,fe=x.fillColor,ke=fe===void 0?"transparent":fe,le=x.imageSmoothingEnabled,to=le===void 0?!0:le,Ve=x.imageSmoothingQuality,at=Ve===void 0?"low":Ve,Ht=x.maxWidth,me=Ht===void 0?1/0:Ht,yn=x.maxHeight,Tn=yn===void 0?1/0:yn,Ao=x.minWidth,Eo=Ao===void 0?0:Ao,eo=x.minHeight,no=eo===void 0?0:eo,No=document.createElement("canvas"),Ne=No.getContext("2d"),Ri=Qn({aspectRatio:Nt,width:me,height:Tn}),uu=Qn({aspectRatio:Nt,width:Eo,height:no},"cover"),Ps=Math.min(Ri.width,Math.max(uu.width,Ft)),$s=Math.min(Ri.height,Math.max(uu.height,Gt)),hu=Qn({aspectRatio:A,width:me,height:Tn}),pu=Qn({aspectRatio:A,width:Eo,height:no},"cover"),fu=Math.min(hu.width,Math.max(pu.width,$)),mu=Math.min(hu.height,Math.max(pu.height,B)),$g=[-fu/2,-mu/2,fu,mu];return No.width=Qo(Ps),No.height=Qo($s),Ne.fillStyle=ke,Ne.fillRect(0,0,Ps,$s),Ne.save(),Ne.translate(Ps/2,$s/2),Ne.rotate(J*Math.PI/180),Ne.scale(Y,Lt),Ne.imageSmoothingEnabled=to,Ne.imageSmoothingQuality=at,Ne.drawImage.apply(Ne,[y].concat(p($g.map(function(Vg){return Math.floor(Qo(Vg))})))),Ne.restore(),No}var cu=String.fromCharCode;function Sg(y,v,b){var x="";b+=v;for(var A=v;A<b;A+=1)x+=cu(y.getUint8(A));return x}var xg=/^data:.*,/;function Ag(y){var v=y.replace(xg,""),b=atob(v),x=new ArrayBuffer(b.length),A=new Uint8Array(x);return pe(A,function($,B){A[B]=b.charCodeAt(B)}),x}function Eg(y,v){for(var b=[],x=8192,A=new Uint8Array(y);A.length>0;)b.push(cu.apply(null,ou(A.subarray(0,x)))),A=A.subarray(x);return"data:".concat(v,";base64,").concat(btoa(b.join("")))}function Ng(y){var v=new DataView(y),b;try{var x,A,$;if(v.getUint8(0)===255&&v.getUint8(1)===216)for(var B=v.byteLength,W=2;W+1<B;){if(v.getUint8(W)===255&&v.getUint8(W+1)===225){A=W;break}W+=1}if(A){var J=A+4,F=A+10;if(Sg(v,J,4)==="Exif"){var Y=v.getUint16(F);if(x=Y===18761,(x||Y===19789)&&v.getUint16(F+2,x)===42){var Q=v.getUint32(F+4,x);Q>=8&&($=F+Q)}}}if($){var Lt=v.getUint16($,x),Nt,Ft;for(Ft=0;Ft<Lt;Ft+=1)if(Nt=$+Ft*12+2,v.getUint16(Nt,x)===274){Nt+=8,b=v.getUint16(Nt,x),v.setUint16(Nt,1,x);break}}}catch{b=1}return b}function Tg(y){var v=0,b=1,x=1;switch(y){case 2:b=-1;break;case 3:v=-180;break;case 4:x=-1;break;case 5:v=90,x=-1;break;case 6:v=90;break;case 7:v=90,b=-1;break;case 8:v=-90;break}return{rotate:v,scaleX:b,scaleY:x}}var Mg={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var y=this.element,v=this.options,b=this.container,x=this.cropper,A=Number(v.minContainerWidth),$=Number(v.minContainerHeight);we(x,lt),gn(y,lt);var B={width:Math.max(b.offsetWidth,A>=0?A:Qd),height:Math.max(b.offsetHeight,$>=0?$:tu)};this.containerData=B,Kn(x,{width:B.width,height:B.height}),we(y,lt),gn(x,lt)},initCanvas:function(){var y=this.containerData,v=this.imageData,b=this.options.viewMode,x=Math.abs(v.rotate)%180===90,A=x?v.naturalHeight:v.naturalWidth,$=x?v.naturalWidth:v.naturalHeight,B=A/$,W=y.width,J=y.height;y.height*B>y.width?b===3?W=y.height*B:J=y.width/B:b===3?J=y.width/B:W=y.height*B;var F={aspectRatio:B,naturalWidth:A,naturalHeight:$,width:W,height:J};this.canvasData=F,this.limited=b===1||b===2,this.limitCanvas(!0,!0),F.width=Math.min(Math.max(F.width,F.minWidth),F.maxWidth),F.height=Math.min(Math.max(F.height,F.minHeight),F.maxHeight),F.left=(y.width-F.width)/2,F.top=(y.height-F.height)/2,F.oldLeft=F.left,F.oldTop=F.top,this.initialCanvasData=Kt({},F)},limitCanvas:function(y,v){var b=this.options,x=this.containerData,A=this.canvasData,$=this.cropBoxData,B=b.viewMode,W=A.aspectRatio,J=this.cropped&&$;if(y){var F=Number(b.minCanvasWidth)||0,Y=Number(b.minCanvasHeight)||0;B>1?(F=Math.max(F,x.width),Y=Math.max(Y,x.height),B===3&&(Y*W>F?F=Y*W:Y=F/W)):B>0&&(F?F=Math.max(F,J?$.width:0):Y?Y=Math.max(Y,J?$.height:0):J&&(F=$.width,Y=$.height,Y*W>F?F=Y*W:Y=F/W));var Q=Qn({aspectRatio:W,width:F,height:Y});F=Q.width,Y=Q.height,A.minWidth=F,A.minHeight=Y,A.maxWidth=1/0,A.maxHeight=1/0}if(v)if(B>(J?0:1)){var Lt=x.width-A.width,Nt=x.height-A.height;A.minLeft=Math.min(0,Lt),A.minTop=Math.min(0,Nt),A.maxLeft=Math.max(0,Lt),A.maxTop=Math.max(0,Nt),J&&this.limited&&(A.minLeft=Math.min($.left,$.left+($.width-A.width)),A.minTop=Math.min($.top,$.top+($.height-A.height)),A.maxLeft=$.left,A.maxTop=$.top,B===2&&(A.width>=x.width&&(A.minLeft=Math.min(0,Lt),A.maxLeft=Math.max(0,Lt)),A.height>=x.height&&(A.minTop=Math.min(0,Nt),A.maxTop=Math.max(0,Nt))))}else A.minLeft=-A.width,A.minTop=-A.height,A.maxLeft=x.width,A.maxTop=x.height},renderCanvas:function(y,v){var b=this.canvasData,x=this.imageData;if(v){var A=wg({width:x.naturalWidth*Math.abs(x.scaleX||1),height:x.naturalHeight*Math.abs(x.scaleY||1),degree:x.rotate||0}),$=A.width,B=A.height,W=b.width*($/b.naturalWidth),J=b.height*(B/b.naturalHeight);b.left-=(W-b.width)/2,b.top-=(J-b.height)/2,b.width=W,b.height=J,b.aspectRatio=$/B,b.naturalWidth=$,b.naturalHeight=B,this.limitCanvas(!0,!1)}(b.width>b.maxWidth||b.width<b.minWidth)&&(b.left=b.oldLeft),(b.height>b.maxHeight||b.height<b.minHeight)&&(b.top=b.oldTop),b.width=Math.min(Math.max(b.width,b.minWidth),b.maxWidth),b.height=Math.min(Math.max(b.height,b.minHeight),b.maxHeight),this.limitCanvas(!1,!0),b.left=Math.min(Math.max(b.left,b.minLeft),b.maxLeft),b.top=Math.min(Math.max(b.top,b.minTop),b.maxTop),b.oldLeft=b.left,b.oldTop=b.top,Kn(this.canvas,Kt({width:b.width,height:b.height},Hr({translateX:b.left,translateY:b.top}))),this.renderImage(y),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(y){var v=this.canvasData,b=this.imageData,x=b.naturalWidth*(v.width/v.naturalWidth),A=b.naturalHeight*(v.height/v.naturalHeight);Kt(b,{width:x,height:A,left:(v.width-x)/2,top:(v.height-A)/2}),Kn(this.image,Kt({width:b.width,height:b.height},Hr(Kt({translateX:b.left,translateY:b.top},b)))),y&&this.output()},initCropBox:function(){var y=this.options,v=this.canvasData,b=y.aspectRatio||y.initialAspectRatio,x=Number(y.autoCropArea)||.8,A={width:v.width,height:v.height};b&&(v.height*b>v.width?A.height=A.width/b:A.width=A.height*b),this.cropBoxData=A,this.limitCropBox(!0,!0),A.width=Math.min(Math.max(A.width,A.minWidth),A.maxWidth),A.height=Math.min(Math.max(A.height,A.minHeight),A.maxHeight),A.width=Math.max(A.minWidth,A.width*x),A.height=Math.max(A.minHeight,A.height*x),A.left=v.left+(v.width-A.width)/2,A.top=v.top+(v.height-A.height)/2,A.oldLeft=A.left,A.oldTop=A.top,this.initialCropBoxData=Kt({},A)},limitCropBox:function(y,v){var b=this.options,x=this.containerData,A=this.canvasData,$=this.cropBoxData,B=this.limited,W=b.aspectRatio;if(y){var J=Number(b.minCropBoxWidth)||0,F=Number(b.minCropBoxHeight)||0,Y=B?Math.min(x.width,A.width,A.width+A.left,x.width-A.left):x.width,Q=B?Math.min(x.height,A.height,A.height+A.top,x.height-A.top):x.height;J=Math.min(J,x.width),F=Math.min(F,x.height),W&&(J&&F?F*W>J?F=J/W:J=F*W:J?F=J/W:F&&(J=F*W),Q*W>Y?Q=Y/W:Y=Q*W),$.minWidth=Math.min(J,Y),$.minHeight=Math.min(F,Q),$.maxWidth=Y,$.maxHeight=Q}v&&(B?($.minLeft=Math.max(0,A.left),$.minTop=Math.max(0,A.top),$.maxLeft=Math.min(x.width,A.left+A.width)-$.width,$.maxTop=Math.min(x.height,A.top+A.height)-$.height):($.minLeft=0,$.minTop=0,$.maxLeft=x.width-$.width,$.maxTop=x.height-$.height))},renderCropBox:function(){var y=this.options,v=this.containerData,b=this.cropBoxData;(b.width>b.maxWidth||b.width<b.minWidth)&&(b.left=b.oldLeft),(b.height>b.maxHeight||b.height<b.minHeight)&&(b.top=b.oldTop),b.width=Math.min(Math.max(b.width,b.minWidth),b.maxWidth),b.height=Math.min(Math.max(b.height,b.minHeight),b.maxHeight),this.limitCropBox(!1,!0),b.left=Math.min(Math.max(b.left,b.minLeft),b.maxLeft),b.top=Math.min(Math.max(b.top,b.minTop),b.maxTop),b.oldLeft=b.left,b.oldTop=b.top,y.movable&&y.cropBoxMovable&&Ur(this.face,Ut,b.width>=v.width&&b.height>=v.height?it:rt),Kn(this.cropBox,Kt({width:b.width,height:b.height},Hr({translateX:b.left,translateY:b.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),er(this.element,vt,this.getData())}},Ig={initPreview:function(){var y=this.element,v=this.crossOrigin,b=this.options.preview,x=v?this.crossOriginUrl:this.url,A=y.alt||"The image to preview",$=document.createElement("img");if(v&&($.crossOrigin=v),$.src=x,$.alt=A,this.viewBox.appendChild($),this.viewBoxImage=$,!!b){var B=b;typeof b=="string"?B=y.ownerDocument.querySelectorAll(b):b.querySelector&&(B=[b]),this.previews=B,pe(B,function(W){var J=document.createElement("img");Ur(W,ne,{width:W.offsetWidth,height:W.offsetHeight,html:W.innerHTML}),v&&(J.crossOrigin=v),J.src=x,J.alt=A,J.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',W.innerHTML="",W.appendChild(J)})}},resetPreview:function(){pe(this.previews,function(y){var v=Ds(y,ne);Kn(y,{width:v.width,height:v.height}),y.innerHTML=v.html,vg(y,ne)})},preview:function(){var y=this.imageData,v=this.canvasData,b=this.cropBoxData,x=b.width,A=b.height,$=y.width,B=y.height,W=b.left-v.left-y.left,J=b.top-v.top-y.top;!this.cropped||this.disabled||(Kn(this.viewBoxImage,Kt({width:$,height:B},Hr(Kt({translateX:-W,translateY:-J},y)))),pe(this.previews,function(F){var Y=Ds(F,ne),Q=Y.width,Lt=Y.height,Nt=Q,Ft=Lt,Gt=1;x&&(Gt=Q/x,Ft=A*Gt),A&&Ft>Lt&&(Gt=Lt/A,Nt=x*Gt,Ft=Lt),Kn(F,{width:Nt,height:Ft}),Kn(F.getElementsByTagName("img")[0],Kt({width:$*Gt,height:B*Gt},Hr(Kt({translateX:-W*Gt,translateY:-J*Gt},y))))}))}},Og={bind:function(){var y=this.element,v=this.options,b=this.cropper;$e(v.cropstart)&&qe(y,xt,v.cropstart),$e(v.cropmove)&&qe(y,Jt,v.cropmove),$e(v.cropend)&&qe(y,Et,v.cropend),$e(v.crop)&&qe(y,vt,v.crop),$e(v.zoom)&&qe(y,Is,v.zoom),qe(b,Xd,this.onCropStart=this.cropStart.bind(this)),v.zoomable&&v.zoomOnWheel&&qe(b,Jd,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),v.toggleDragModeOnDblclick&&qe(b,wt,this.onDblclick=this.dblclick.bind(this)),qe(y.ownerDocument,jd,this.onCropMove=this.cropMove.bind(this)),qe(y.ownerDocument,Wd,this.onCropEnd=this.cropEnd.bind(this)),v.responsive&&qe(window,Zd,this.onResize=this.resize.bind(this))},unbind:function(){var y=this.element,v=this.options,b=this.cropper;$e(v.cropstart)&&rn(y,xt,v.cropstart),$e(v.cropmove)&&rn(y,Jt,v.cropmove),$e(v.cropend)&&rn(y,Et,v.cropend),$e(v.crop)&&rn(y,vt,v.crop),$e(v.zoom)&&rn(y,Is,v.zoom),rn(b,Xd,this.onCropStart),v.zoomable&&v.zoomOnWheel&&rn(b,Jd,this.onWheel,{passive:!1,capture:!0}),v.toggleDragModeOnDblclick&&rn(b,wt,this.onDblclick),rn(y.ownerDocument,jd,this.onCropMove),rn(y.ownerDocument,Wd,this.onCropEnd),v.responsive&&rn(window,Zd,this.onResize)}},Lg={resize:function(){if(!this.disabled){var y=this.options,v=this.container,b=this.containerData,x=v.offsetWidth/b.width,A=v.offsetHeight/b.height,$=Math.abs(x-1)>Math.abs(A-1)?x:A;if($!==1){var B,W;y.restore&&(B=this.getCanvasData(),W=this.getCropBoxData()),this.render(),y.restore&&(this.setCanvasData(pe(B,function(J,F){B[F]=J*$})),this.setCropBoxData(pe(W,function(J,F){W[F]=J*$})))}}},dblclick:function(){this.disabled||this.options.dragMode===dt||this.setDragMode(gg(this.dragBox,ct)?ht:G)},wheel:function(y){var v=this,b=Number(this.options.wheelZoomRatio)||.1,x=1;this.disabled||(y.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){v.wheeling=!1},50),y.deltaY?x=y.deltaY>0?1:-1:y.wheelDelta?x=-y.wheelDelta/120:y.detail&&(x=y.detail>0?1:-1),this.zoom(-x*b,y)))},cropStart:function(y){var v=y.buttons,b=y.button;if(!(this.disabled||(y.type==="mousedown"||y.type==="pointerdown"&&y.pointerType==="mouse")&&(Tt(v)&&v!==1||Tt(b)&&b!==0||y.ctrlKey))){var x=this.options,A=this.pointers,$;y.changedTouches?pe(y.changedTouches,function(B){A[B.identifier]=Di(B)}):A[y.pointerId||0]=Di(y),Object.keys(A).length>1&&x.zoomable&&x.zoomOnTouch?$=et:$=Ds(y.target,Ut),ag.test($)&&er(this.element,xt,{originalEvent:y,action:$})!==!1&&(y.preventDefault(),this.action=$,this.cropping=!1,$===pt&&(this.cropping=!0,we(this.dragBox,Pt)))}},cropMove:function(y){var v=this.action;if(!(this.disabled||!v)){var b=this.pointers;y.preventDefault(),er(this.element,Jt,{originalEvent:y,action:v})!==!1&&(y.changedTouches?pe(y.changedTouches,function(x){Kt(b[x.identifier]||{},Di(x,!0))}):Kt(b[y.pointerId||0]||{},Di(y,!0)),this.change(y))}},cropEnd:function(y){if(!this.disabled){var v=this.action,b=this.pointers;y.changedTouches?pe(y.changedTouches,function(x){delete b[x.identifier]}):delete b[y.pointerId||0],v&&(y.preventDefault(),Object.keys(b).length||(this.action=""),this.cropping&&(this.cropping=!1,tr(this.dragBox,Pt,this.cropped&&this.options.modal)),er(this.element,Et,{originalEvent:y,action:v}))}}},Dg={change:function(y){var v=this.options,b=this.canvasData,x=this.containerData,A=this.cropBoxData,$=this.pointers,B=this.action,W=v.aspectRatio,J=A.left,F=A.top,Y=A.width,Q=A.height,Lt=J+Y,Nt=F+Q,Ft=0,Gt=0,fe=x.width,ke=x.height,le=!0,to;!W&&y.shiftKey&&(W=Y&&Q?Y/Q:1),this.limited&&(Ft=A.minLeft,Gt=A.minTop,fe=Ft+Math.min(x.width,b.width,b.left+b.width),ke=Gt+Math.min(x.height,b.height,b.top+b.height));var Ve=$[Object.keys($)[0]],at={x:Ve.endX-Ve.startX,y:Ve.endY-Ve.startY},Ht=function(me){switch(me){case ut:Lt+at.x>fe&&(at.x=fe-Lt);break;case L:J+at.x<Ft&&(at.x=Ft-J);break;case H:F+at.y<Gt&&(at.y=Gt-F);break;case q:Nt+at.y>ke&&(at.y=ke-Nt);break}};switch(B){case rt:J+=at.x,F+=at.y;break;case ut:if(at.x>=0&&(Lt>=fe||W&&(F<=Gt||Nt>=ke))){le=!1;break}Ht(ut),Y+=at.x,Y<0&&(B=L,Y=-Y,J-=Y),W&&(Q=Y/W,F+=(A.height-Q)/2);break;case H:if(at.y<=0&&(F<=Gt||W&&(J<=Ft||Lt>=fe))){le=!1;break}Ht(H),Q-=at.y,F+=at.y,Q<0&&(B=q,Q=-Q,F-=Q),W&&(Y=Q*W,J+=(A.width-Y)/2);break;case L:if(at.x<=0&&(J<=Ft||W&&(F<=Gt||Nt>=ke))){le=!1;break}Ht(L),Y-=at.x,J+=at.x,Y<0&&(B=ut,Y=-Y,J-=Y),W&&(Q=Y/W,F+=(A.height-Q)/2);break;case q:if(at.y>=0&&(Nt>=ke||W&&(J<=Ft||Lt>=fe))){le=!1;break}Ht(q),Q+=at.y,Q<0&&(B=H,Q=-Q,F-=Q),W&&(Y=Q*W,J+=(A.width-Y)/2);break;case I:if(W){if(at.y<=0&&(F<=Gt||Lt>=fe)){le=!1;break}Ht(H),Q-=at.y,F+=at.y,Y=Q*W}else Ht(H),Ht(ut),at.x>=0?Lt<fe?Y+=at.x:at.y<=0&&F<=Gt&&(le=!1):Y+=at.x,at.y<=0?F>Gt&&(Q-=at.y,F+=at.y):(Q-=at.y,F+=at.y);Y<0&&Q<0?(B=j,Q=-Q,Y=-Y,F-=Q,J-=Y):Y<0?(B=U,Y=-Y,J-=Y):Q<0&&(B=z,Q=-Q,F-=Q);break;case U:if(W){if(at.y<=0&&(F<=Gt||J<=Ft)){le=!1;break}Ht(H),Q-=at.y,F+=at.y,Y=Q*W,J+=A.width-Y}else Ht(H),Ht(L),at.x<=0?J>Ft?(Y-=at.x,J+=at.x):at.y<=0&&F<=Gt&&(le=!1):(Y-=at.x,J+=at.x),at.y<=0?F>Gt&&(Q-=at.y,F+=at.y):(Q-=at.y,F+=at.y);Y<0&&Q<0?(B=z,Q=-Q,Y=-Y,F-=Q,J-=Y):Y<0?(B=I,Y=-Y,J-=Y):Q<0&&(B=j,Q=-Q,F-=Q);break;case j:if(W){if(at.x<=0&&(J<=Ft||Nt>=ke)){le=!1;break}Ht(L),Y-=at.x,J+=at.x,Q=Y/W}else Ht(q),Ht(L),at.x<=0?J>Ft?(Y-=at.x,J+=at.x):at.y>=0&&Nt>=ke&&(le=!1):(Y-=at.x,J+=at.x),at.y>=0?Nt<ke&&(Q+=at.y):Q+=at.y;Y<0&&Q<0?(B=I,Q=-Q,Y=-Y,F-=Q,J-=Y):Y<0?(B=z,Y=-Y,J-=Y):Q<0&&(B=U,Q=-Q,F-=Q);break;case z:if(W){if(at.x>=0&&(Lt>=fe||Nt>=ke)){le=!1;break}Ht(ut),Y+=at.x,Q=Y/W}else Ht(q),Ht(ut),at.x>=0?Lt<fe?Y+=at.x:at.y>=0&&Nt>=ke&&(le=!1):Y+=at.x,at.y>=0?Nt<ke&&(Q+=at.y):Q+=at.y;Y<0&&Q<0?(B=U,Q=-Q,Y=-Y,F-=Q,J-=Y):Y<0?(B=j,Y=-Y,J-=Y):Q<0&&(B=I,Q=-Q,F-=Q);break;case it:this.move(at.x,at.y),le=!1;break;case et:this.zoom(_g($),y),le=!1;break;case pt:if(!at.x||!at.y){le=!1;break}to=au(this.cropper),J=Ve.startX-to.left,F=Ve.startY-to.top,Y=A.minWidth,Q=A.minHeight,at.x>0?B=at.y>0?z:I:at.x<0&&(J-=Y,B=at.y>0?j:U),at.y<0&&(F-=Q),this.cropped||(gn(this.cropBox,lt),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}le&&(A.width=Y,A.height=Q,A.left=J,A.top=F,this.action=B,this.renderCropBox()),pe($,function(me){me.startX=me.endX,me.startY=me.endY})}},Rg={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&we(this.dragBox,Pt),gn(this.cropBox,lt),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Kt({},this.initialImageData),this.canvasData=Kt({},this.initialCanvasData),this.cropBoxData=Kt({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Kt(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),gn(this.dragBox,Pt),we(this.cropBox,lt)),this},replace:function(y){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&y&&(this.isImg&&(this.element.src=y),v?(this.url=y,this.image.src=y,this.ready&&(this.viewBoxImage.src=y,pe(this.previews,function(b){b.getElementsByTagName("img")[0].src=y}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(y))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,gn(this.cropper,st)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,we(this.cropper,st)),this},destroy:function(){var y=this.element;return y[X]?(y[X]=void 0,this.isImg&&this.replaced&&(y.src=this.originalUrl),this.uncreate(),this):this},move:function(y){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:y,b=this.canvasData,x=b.left,A=b.top;return this.moveTo(Os(y)?y:x+Number(y),Os(v)?v:A+Number(v))},moveTo:function(y){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:y,b=this.canvasData,x=!1;return y=Number(y),v=Number(v),this.ready&&!this.disabled&&this.options.movable&&(Tt(y)&&(b.left=y,x=!0),Tt(v)&&(b.top=v,x=!0),x&&this.renderCanvas(!0)),this},zoom:function(y,v){var b=this.canvasData;return y=Number(y),y<0?y=1/(1-y):y=1+y,this.zoomTo(b.width*y/b.naturalWidth,null,v)},zoomTo:function(y,v,b){var x=this.options,A=this.canvasData,$=A.width,B=A.height,W=A.naturalWidth,J=A.naturalHeight;if(y=Number(y),y>=0&&this.ready&&!this.disabled&&x.zoomable){var F=W*y,Y=J*y;if(er(this.element,Is,{ratio:y,oldRatio:$/W,originalEvent:b})===!1)return this;if(b){var Q=this.pointers,Lt=au(this.cropper),Nt=Q&&Object.keys(Q).length?Cg(Q):{pageX:b.pageX,pageY:b.pageY};A.left-=(F-$)*((Nt.pageX-Lt.left-A.left)/$),A.top-=(Y-B)*((Nt.pageY-Lt.top-A.top)/B)}else Ko(v)&&Tt(v.x)&&Tt(v.y)?(A.left-=(F-$)*((v.x-A.left)/$),A.top-=(Y-B)*((v.y-A.top)/B)):(A.left-=(F-$)/2,A.top-=(Y-B)/2);A.width=F,A.height=Y,this.renderCanvas(!0)}return this},rotate:function(y){return this.rotateTo((this.imageData.rotate||0)+Number(y))},rotateTo:function(y){return y=Number(y),Tt(y)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=y%360,this.renderCanvas(!0,!0)),this},scaleX:function(y){var v=this.imageData.scaleY;return this.scale(y,Tt(v)?v:1)},scaleY:function(y){var v=this.imageData.scaleX;return this.scale(Tt(v)?v:1,y)},scale:function(y){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:y,b=this.imageData,x=!1;return y=Number(y),v=Number(v),this.ready&&!this.disabled&&this.options.scalable&&(Tt(y)&&(b.scaleX=y,x=!0),Tt(v)&&(b.scaleY=v,x=!0),x&&this.renderCanvas(!0,!0)),this},getData:function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,v=this.options,b=this.imageData,x=this.canvasData,A=this.cropBoxData,$;if(this.ready&&this.cropped){$={x:A.left-x.left,y:A.top-x.top,width:A.width,height:A.height};var B=b.width/b.naturalWidth;if(pe($,function(F,Y){$[Y]=F/B}),y){var W=Math.round($.y+$.height),J=Math.round($.x+$.width);$.x=Math.round($.x),$.y=Math.round($.y),$.width=J-$.x,$.height=W-$.y}}else $={x:0,y:0,width:0,height:0};return v.rotatable&&($.rotate=b.rotate||0),v.scalable&&($.scaleX=b.scaleX||1,$.scaleY=b.scaleY||1),$},setData:function(y){var v=this.options,b=this.imageData,x=this.canvasData,A={};if(this.ready&&!this.disabled&&Ko(y)){var $=!1;v.rotatable&&Tt(y.rotate)&&y.rotate!==b.rotate&&(b.rotate=y.rotate,$=!0),v.scalable&&(Tt(y.scaleX)&&y.scaleX!==b.scaleX&&(b.scaleX=y.scaleX,$=!0),Tt(y.scaleY)&&y.scaleY!==b.scaleY&&(b.scaleY=y.scaleY,$=!0)),$&&this.renderCanvas(!0,!0);var B=b.width/b.naturalWidth;Tt(y.x)&&(A.left=y.x*B+x.left),Tt(y.y)&&(A.top=y.y*B+x.top),Tt(y.width)&&(A.width=y.width*B),Tt(y.height)&&(A.height=y.height*B),this.setCropBoxData(A)}return this},getContainerData:function(){return this.ready?Kt({},this.containerData):{}},getImageData:function(){return this.sized?Kt({},this.imageData):{}},getCanvasData:function(){var y=this.canvasData,v={};return this.ready&&pe(["left","top","width","height","naturalWidth","naturalHeight"],function(b){v[b]=y[b]}),v},setCanvasData:function(y){var v=this.canvasData,b=v.aspectRatio;return this.ready&&!this.disabled&&Ko(y)&&(Tt(y.left)&&(v.left=y.left),Tt(y.top)&&(v.top=y.top),Tt(y.width)?(v.width=y.width,v.height=y.width/b):Tt(y.height)&&(v.height=y.height,v.width=y.height*b),this.renderCanvas(!0)),this},getCropBoxData:function(){var y=this.cropBoxData,v;return this.ready&&this.cropped&&(v={left:y.left,top:y.top,width:y.width,height:y.height}),v||{}},setCropBoxData:function(y){var v=this.cropBoxData,b=this.options.aspectRatio,x,A;return this.ready&&this.cropped&&!this.disabled&&Ko(y)&&(Tt(y.left)&&(v.left=y.left),Tt(y.top)&&(v.top=y.top),Tt(y.width)&&y.width!==v.width&&(x=!0,v.width=y.width),Tt(y.height)&&y.height!==v.height&&(A=!0,v.height=y.height),b&&(x?v.height=v.width/b:A&&(v.width=v.height*b)),this.renderCropBox()),this},getCroppedCanvas:function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var v=this.canvasData,b=kg(this.image,this.imageData,v,y);if(!this.cropped)return b;var x=this.getData(y.rounded),A=x.x,$=x.y,B=x.width,W=x.height,J=b.width/Math.floor(v.naturalWidth);J!==1&&(A*=J,$*=J,B*=J,W*=J);var F=B/W,Y=Qn({aspectRatio:F,width:y.maxWidth||1/0,height:y.maxHeight||1/0}),Q=Qn({aspectRatio:F,width:y.minWidth||0,height:y.minHeight||0},"cover"),Lt=Qn({aspectRatio:F,width:y.width||(J!==1?b.width:B),height:y.height||(J!==1?b.height:W)}),Nt=Lt.width,Ft=Lt.height;Nt=Math.min(Y.width,Math.max(Q.width,Nt)),Ft=Math.min(Y.height,Math.max(Q.height,Ft));var Gt=document.createElement("canvas"),fe=Gt.getContext("2d");Gt.width=Qo(Nt),Gt.height=Qo(Ft),fe.fillStyle=y.fillColor||"transparent",fe.fillRect(0,0,Nt,Ft);var ke=y.imageSmoothingEnabled,le=ke===void 0?!0:ke,to=y.imageSmoothingQuality;fe.imageSmoothingEnabled=le,to&&(fe.imageSmoothingQuality=to);var Ve=b.width,at=b.height,Ht=A,me=$,yn,Tn,Ao,Eo,eo,no;Ht<=-B||Ht>Ve?(Ht=0,yn=0,Ao=0,eo=0):Ht<=0?(Ao=-Ht,Ht=0,yn=Math.min(Ve,B+Ht),eo=yn):Ht<=Ve&&(Ao=0,yn=Math.min(B,Ve-Ht),eo=yn),yn<=0||me<=-W||me>at?(me=0,Tn=0,Eo=0,no=0):me<=0?(Eo=-me,me=0,Tn=Math.min(at,W+me),no=Tn):me<=at&&(Eo=0,Tn=Math.min(W,at-me),no=Tn);var No=[Ht,me,yn,Tn];if(eo>0&&no>0){var Ne=Nt/B;No.push(Ao*Ne,Eo*Ne,eo*Ne,no*Ne)}return fe.drawImage.apply(fe,[b].concat(p(No.map(function(Ri){return Math.floor(Qo(Ri))})))),Gt},setAspectRatio:function(y){var v=this.options;return!this.disabled&&!Os(y)&&(v.aspectRatio=Math.max(0,y)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(y){var v=this.options,b=this.dragBox,x=this.face;if(this.ready&&!this.disabled){var A=y===G,$=v.movable&&y===ht;y=A||$?y:dt,v.dragMode=y,Ur(b,Ut,y),tr(b,ct,A),tr(b,At,$),v.cropBoxMovable||(Ur(x,Ut,y),tr(x,ct,A),tr(x,At,$))}return this}},Pg=P.Cropper,du=(function(){function y(v){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(c(this,y),!v||!cg.test(v.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=v,this.options=Kt({},eu,Ko(b)&&b),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return u(y,[{key:"init",value:function(){var v=this.element,b=v.tagName.toLowerCase(),x;if(!v[X]){if(v[X]=this,b==="img"){if(this.isImg=!0,x=v.getAttribute("src")||"",this.originalUrl=x,!x)return;x=v.src}else b==="canvas"&&window.HTMLCanvasElement&&(x=v.toDataURL());this.load(x)}}},{key:"load",value:function(v){var b=this;if(v){this.url=v,this.imageData={};var x=this.element,A=this.options;if(!A.rotatable&&!A.scalable&&(A.checkOrientation=!1),!A.checkOrientation||!window.ArrayBuffer){this.clone();return}if(sg.test(v)){lg.test(v)?this.read(Ag(v)):this.clone();return}var $=new XMLHttpRequest,B=this.clone.bind(this);this.reloading=!0,this.xhr=$,$.onabort=B,$.onerror=B,$.ontimeout=B,$.onprogress=function(){$.getResponseHeader("content-type")!==Kd&&$.abort()},$.onload=function(){b.read($.response)},$.onloadend=function(){b.reloading=!1,b.xhr=null},A.checkCrossOrigin&&su(v)&&x.crossOrigin&&(v=lu(v)),$.open("GET",v,!0),$.responseType="arraybuffer",$.withCredentials=x.crossOrigin==="use-credentials",$.send()}}},{key:"read",value:function(v){var b=this.options,x=this.imageData,A=Ng(v),$=0,B=1,W=1;if(A>1){this.url=Eg(v,Kd);var J=Tg(A);$=J.rotate,B=J.scaleX,W=J.scaleY}b.rotatable&&(x.rotate=$),b.scalable&&(x.scaleX=B,x.scaleY=W),this.clone()}},{key:"clone",value:function(){var v=this.element,b=this.url,x=v.crossOrigin,A=b;this.options.checkCrossOrigin&&su(b)&&(x||(x="anonymous"),A=lu(b)),this.crossOrigin=x,this.crossOriginUrl=A;var $=document.createElement("img");x&&($.crossOrigin=x),$.src=A||b,$.alt=v.alt||"The image to crop",this.image=$,$.onload=this.start.bind(this),$.onerror=this.stop.bind(this),we($,ot),v.parentNode.insertBefore($,v.nextSibling)}},{key:"start",value:function(){var v=this,b=this.image;b.onload=null,b.onerror=null,this.sizing=!0;var x=P.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(P.navigator.userAgent),A=function(W,J){Kt(v.imageData,{naturalWidth:W,naturalHeight:J,aspectRatio:W/J}),v.initialImageData=Kt({},v.imageData),v.sizing=!1,v.sized=!0,v.build()};if(b.naturalWidth&&!x){A(b.naturalWidth,b.naturalHeight);return}var $=document.createElement("img"),B=document.body||document.documentElement;this.sizingImage=$,$.onload=function(){A($.width,$.height),x||B.removeChild($)},$.src=b.src,x||($.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",B.appendChild($))}},{key:"stop",value:function(){var v=this.image;v.onload=null,v.onerror=null,v.parentNode.removeChild(v),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var v=this.element,b=this.options,x=this.image,A=v.parentNode,$=document.createElement("div");$.innerHTML=dg;var B=$.querySelector(".".concat(X,"-container")),W=B.querySelector(".".concat(X,"-canvas")),J=B.querySelector(".".concat(X,"-drag-box")),F=B.querySelector(".".concat(X,"-crop-box")),Y=F.querySelector(".".concat(X,"-face"));this.container=A,this.cropper=B,this.canvas=W,this.dragBox=J,this.cropBox=F,this.viewBox=B.querySelector(".".concat(X,"-view-box")),this.face=Y,W.appendChild(x),we(v,lt),A.insertBefore(B,v.nextSibling),gn(x,ot),this.initPreview(),this.bind(),b.initialAspectRatio=Math.max(0,b.initialAspectRatio)||NaN,b.aspectRatio=Math.max(0,b.aspectRatio)||NaN,b.viewMode=Math.max(0,Math.min(3,Math.round(b.viewMode)))||0,we(F,lt),b.guides||we(F.getElementsByClassName("".concat(X,"-dashed")),lt),b.center||we(F.getElementsByClassName("".concat(X,"-center")),lt),b.background&&we(B,"".concat(X,"-bg")),b.highlight||we(Y,St),b.cropBoxMovable&&(we(Y,At),Ur(Y,Ut,rt)),b.cropBoxResizable||(we(F.getElementsByClassName("".concat(X,"-line")),lt),we(F.getElementsByClassName("".concat(X,"-point")),lt)),this.render(),this.ready=!0,this.setDragMode(b.dragMode),b.autoCrop&&this.crop(),this.setData(b.data),$e(b.ready)&&qe(v,qd,b.ready,{once:!0}),er(v,qd)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var v=this.cropper.parentNode;v&&v.removeChild(this.cropper),gn(this.element,lt)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=Pg,y}},{key:"setDefaults",value:function(v){Kt(eu,Ko(v)&&v)}}])})();return Kt(du.prototype,Mg,Ig,Og,Lg,Dg,Rg),du})})(Ul)),Ul.exports}var Ih;function s5(){if(Ih)return Hi;Ih=1,Object.defineProperty(Hi,"__esModule",{value:!0});var e=r5(),o=a5(),r=i(o);function i(l){return l&&l.__esModule?l:{default:l}}function a(l,c){var d={};for(var u in l)c.indexOf(u)>=0||Object.prototype.hasOwnProperty.call(l,u)&&(d[u]=l[u]);return d}var s=typeof window>"u"?[String,Array]:[String,Array,Element,NodeList];return Hi.default={render:function(){var l=this.crossorigin||void 0;return(0,e.h)("div",{style:this.containerStyle},[(0,e.h)("img",{ref:"img",src:this.src,alt:this.alt||"image",style:[{"max-width":"100%"},this.imgStyle],crossorigin:l})])},props:{containerStyle:Object,src:{type:String,default:""},alt:String,imgStyle:Object,viewMode:Number,dragMode:String,initialAspectRatio:Number,aspectRatio:Number,data:Object,preview:s,responsive:{type:Boolean,default:!0},restore:{type:Boolean,default:!0},checkCrossOrigin:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},crossorigin:{type:String},modal:{type:Boolean,default:!0},guides:{type:Boolean,default:!0},center:{type:Boolean,default:!0},highlight:{type:Boolean,default:!0},background:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!0},autoCropArea:Number,movable:{type:Boolean,default:!0},rotatable:{type:Boolean,default:!0},scalable:{type:Boolean,default:!0},zoomable:{type:Boolean,default:!0},zoomOnTouch:{type:Boolean,default:!0},zoomOnWheel:{type:Boolean,default:!0},wheelZoomRatio:Number,cropBoxMovable:{type:Boolean,default:!0},cropBoxResizable:{type:Boolean,default:!0},toggleDragModeOnDblclick:{type:Boolean,default:!0},minCanvasWidth:Number,minCanvasHeight:Number,minCropBoxWidth:Number,minCropBoxHeight:Number,minContainerWidth:Number,minContainerHeight:Number,ready:Function,cropstart:Function,cropmove:Function,cropend:Function,crop:Function,zoom:Function},mounted:function(){var l=this.$options.props;l.containerStyle,l.src,l.alt,l.imgStyle;var c=a(l,["containerStyle","src","alt","imgStyle"]),d={};for(var u in c)this[u]!==void 0&&(d[u]=this[u]);this.cropper=new r.default(this.$refs.img,d)},methods:{reset:function(){return this.cropper.reset()},clear:function(){return this.cropper.clear()},initCrop:function(){return this.cropper.crop()},replace:function(l){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.cropper.replace(l,c)},enable:function(){return this.cropper.enable()},disable:function(){return this.cropper.disable()},destroy:function(){return this.cropper.destroy()},move:function(l,c){return this.cropper.move(l,c)},moveTo:function(l){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return this.cropper.moveTo(l,c)},relativeZoom:function(l,c){return this.cropper.zoom(l,c)},zoomTo:function(l,c){return this.cropper.zoomTo(l,c)},rotate:function(l){return this.cropper.rotate(l)},rotateTo:function(l){return this.cropper.rotateTo(l)},scaleX:function(l){return this.cropper.scaleX(l)},scaleY:function(l){return this.cropper.scaleY(l)},scale:function(l){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return this.cropper.scale(l,c)},getData:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return this.cropper.getData(l)},setData:function(l){return this.cropper.setData(l)},getContainerData:function(){return this.cropper.getContainerData()},getImageData:function(){return this.cropper.getImageData()},getCanvasData:function(){return this.cropper.getCanvasData()},setCanvasData:function(l){return this.cropper.setCanvasData(l)},getCropBoxData:function(){return this.cropper.getCropBoxData()},setCropBoxData:function(l){return this.cropper.setCropBoxData(l)},getCroppedCanvas:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.cropper.getCroppedCanvas(l)},setAspectRatio:function(l){return this.cropper.setAspectRatio(l)},setDragMode:function(l){return this.cropper.setDragMode(l)}}},Hi}var l5=s5();const P1=Ka(l5),c5={name:"AccountPlusOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},d5=["aria-hidden","aria-label"],u5=["fill","width","height"],h5={d:"M15,4A4,4 0 0,0 11,8A4,4 0 0,0 15,12A4,4 0 0,0 19,8A4,4 0 0,0 15,4M15,5.9C16.16,5.9 17.1,6.84 17.1,8C17.1,9.16 16.16,10.1 15,10.1A2.1,2.1 0 0,1 12.9,8A2.1,2.1 0 0,1 15,5.9M4,7V10H1V12H4V15H6V12H9V10H6V7H4M15,13C12.33,13 7,14.33 7,17V20H23V17C23,14.33 17.67,13 15,13M15,14.9C17.97,14.9 21.1,16.36 21.1,17V18.1H8.9V17C8.9,16.36 12,14.9 15,14.9Z"},p5={key:0};function f5(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon account-plus-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",h5,[r.title?(f(),k("title",p5,O(r.title),1)):R("",!0)])],8,u5))],16,d5)}const $1=tt(c5,[["render",f5]]),m5={name:"BookOpenPageVariantIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},g5=["aria-hidden","aria-label"],y5=["fill","width","height"],v5={d:"M19 2L14 6.5V17.5L19 13V2M6.5 5C4.55 5 2.45 5.4 1 6.5V21.16C1 21.41 1.25 21.66 1.5 21.66C1.6 21.66 1.65 21.59 1.75 21.59C3.1 20.94 5.05 20.5 6.5 20.5C8.45 20.5 10.55 20.9 12 22C13.35 21.15 15.8 20.5 17.5 20.5C19.15 20.5 20.85 20.81 22.25 21.56C22.35 21.61 22.4 21.59 22.5 21.59C22.75 21.59 23 21.34 23 21.09V6.5C22.4 6.05 21.75 5.75 21 5.5V19C19.9 18.65 18.7 18.5 17.5 18.5C15.8 18.5 13.35 19.15 12 20V6.5C10.55 5.4 8.45 5 6.5 5Z"},b5={key:0};function _5(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon book-open-page-variant-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",v5,[r.title?(f(),k("title",b5,O(r.title),1)):R("",!0)])],8,y5))],16,g5)}const C5=tt(m5,[["render",_5]]),w5={name:"CalendarOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},k5=["aria-hidden","aria-label"],S5=["fill","width","height"],x5={d:"M12 12H17V17H12V12M19 3H18V1H16V3H8V1H6V3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3M19 5V7H5V5H19M5 19V9H19V19H5Z"},A5={key:0};function E5(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon calendar-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",x5,[r.title?(f(),k("title",A5,O(r.title),1)):R("",!0)])],8,S5))],16,k5)}const N5=tt(w5,[["render",E5]]),T5={name:"CheckIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},M5=["aria-hidden","aria-label"],I5=["fill","width","height"],O5={d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},L5={key:0};function D5(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon check-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",O5,[r.title?(f(),k("title",L5,O(r.title),1)):R("",!0)])],8,I5))],16,M5)}const xs=tt(T5,[["render",D5]]),R5={name:"CogOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},P5=["aria-hidden","aria-label"],$5=["fill","width","height"],V5={d:"M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10M10,22C9.75,22 9.54,21.82 9.5,21.58L9.13,18.93C8.5,18.68 7.96,18.34 7.44,17.94L4.95,18.95C4.73,19.03 4.46,18.95 4.34,18.73L2.34,15.27C2.21,15.05 2.27,14.78 2.46,14.63L4.57,12.97L4.5,12L4.57,11L2.46,9.37C2.27,9.22 2.21,8.95 2.34,8.73L4.34,5.27C4.46,5.05 4.73,4.96 4.95,5.05L7.44,6.05C7.96,5.66 8.5,5.32 9.13,5.07L9.5,2.42C9.54,2.18 9.75,2 10,2H14C14.25,2 14.46,2.18 14.5,2.42L14.87,5.07C15.5,5.32 16.04,5.66 16.56,6.05L19.05,5.05C19.27,4.96 19.54,5.05 19.66,5.27L21.66,8.73C21.79,8.95 21.73,9.22 21.54,9.37L19.43,11L19.5,12L19.43,13L21.54,14.63C21.73,14.78 21.79,15.05 21.66,15.27L19.66,18.73C19.54,18.95 19.27,19.04 19.05,18.95L16.56,17.95C16.04,18.34 15.5,18.68 14.87,18.93L14.5,21.58C14.46,21.82 14.25,22 14,22H10M11.25,4L10.88,6.61C9.68,6.86 8.62,7.5 7.85,8.39L5.44,7.35L4.69,8.65L6.8,10.2C6.4,11.37 6.4,12.64 6.8,13.8L4.68,15.36L5.43,16.66L7.86,15.62C8.63,16.5 9.68,17.14 10.87,17.38L11.24,20H12.76L13.13,17.39C14.32,17.14 15.37,16.5 16.14,15.62L18.57,16.66L19.32,15.36L17.2,13.81C17.6,12.64 17.6,11.37 17.2,10.2L19.31,8.65L18.56,7.35L16.15,8.39C15.38,7.5 14.32,6.86 13.12,6.62L12.75,4H11.25Z"},B5={key:0};function U5(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon cog-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",V5,[r.title?(f(),k("title",B5,O(r.title),1)):R("",!0)])],8,$5))],16,P5)}const gd=tt(R5,[["render",U5]]),H5={name:"FileDocumentOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},z5=["aria-hidden","aria-label"],G5=["fill","width","height"],F5={d:"M6,2A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6M6,4H13V9H18V20H6V4M8,12V14H16V12H8M8,16V18H13V16H8Z"},Y5={key:0};function X5(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon file-document-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",F5,[r.title?(f(),k("title",Y5,O(r.title),1)):R("",!0)])],8,G5))],16,z5)}const j5=tt(H5,[["render",X5]]),W5={name:"FolderIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},q5=["aria-hidden","aria-label"],Z5=["fill","width","height"],J5={d:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z"},K5={key:0};function Q5(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon folder-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",J5,[r.title?(f(),k("title",K5,O(r.title),1)):R("",!0)])],8,Z5))],16,q5)}const t3=tt(W5,[["render",Q5]]),e3={name:"FolderOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},n3=["aria-hidden","aria-label"],o3=["fill","width","height"],r3={d:"M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z"},i3={key:0};function a3(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon folder-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",r3,[r.title?(f(),k("title",i3,O(r.title),1)):R("",!0)])],8,o3))],16,n3)}const yd=tt(e3,[["render",a3]]),s3={name:"LoginIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},l3=["aria-hidden","aria-label"],c3=["fill","width","height"],d3={d:"M11 7L9.6 8.4L12.2 11H2V13H12.2L9.6 15.6L11 17L16 12L11 7M20 19H12V21H20C21.1 21 22 20.1 22 19V5C22 3.9 21.1 3 20 3H12V5H20V19Z"},u3={key:0};function h3(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon login-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",d3,[r.title?(f(),k("title",u3,O(r.title),1)):R("",!0)])],8,c3))],16,l3)}const p3=tt(s3,[["render",h3]]),f3={name:"LogoutIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},m3=["aria-hidden","aria-label"],g3=["fill","width","height"],y3={d:"M17 7L15.59 8.41L18.17 11H8V13H18.17L15.59 15.58L17 17L22 12M4 5H12V3H4C2.9 3 2 3.9 2 5V19C2 20.1 2.9 21 4 21H12V19H4V5Z"},v3={key:0};function b3(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon logout-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",y3,[r.title?(f(),k("title",v3,O(r.title),1)):R("",!0)])],8,g3))],16,m3)}const V1=tt(f3,[["render",b3]]),_3={name:"MessageOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},C3=["aria-hidden","aria-label"],w3=["fill","width","height"],k3={d:"M20 2H4C2.9 2 2 2.9 2 4V22L6 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2M20 16H5.2L4 17.2V4H20V16Z"},S3={key:0};function x3(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon message-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",k3,[r.title?(f(),k("title",S3,O(r.title),1)):R("",!0)])],8,w3))],16,C3)}const A3=tt(_3,[["render",x3]]),E3={name:"TrayArrowUpIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},N3=["aria-hidden","aria-label"],T3=["fill","width","height"],M3={d:"M2 12H4V17H20V12H22V17C22 18.11 21.11 19 20 19H4C2.9 19 2 18.11 2 17V12M12 2L6.46 7.46L7.88 8.88L11 5.75V15H13V5.75L16.13 8.88L17.55 7.45L12 2Z"},I3={key:0};function O3(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon tray-arrow-up-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",M3,[r.title?(f(),k("title",I3,O(r.title),1)):R("",!0)])],8,T3))],16,N3)}const L3=tt(E3,[["render",O3]]),D3={name:"ViewDashboardIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},R3=["aria-hidden","aria-label"],P3=["fill","width","height"],$3={d:"M13,3V9H21V3M13,21H21V11H13M3,21H11V15H3M3,13H11V3H3V13Z"},V3={key:0};function B3(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon view-dashboard-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",$3,[r.title?(f(),k("title",V3,O(r.title),1)):R("",!0)])],8,P3))],16,R3)}const U3=tt(D3,[["render",B3]]),jr="enforce_password",Wr="password_single_enabled",Fi="password_single",H3={name:"CirclePasswordSettings",components:{CheckboxRadioSwitch:Qa,NcButton:he},props:{circle:{type:Object,required:!0}},data(){return{ENFORCE_PASSWORD_PROTECTION:jr,USE_UNIQUE_PASSWORD:Wr,UNIQUE_PASSWORD:Fi,loading:[],uniquePassword:"",uniquePasswordError:!1,showUniquePasswordInput:!1}},computed:{circleId(){return this.circle._data.id},enforcePasswordProtection(){const e=this.circle._data.settings[jr];return e==="1"||e==="true"},useUniquePassword(){const e=this.circle._data.settings[Wr];return e==="1"||e==="true"}},methods:{async changePasswordProtection(){this.loading.push(jr);try{const e=!this.enforcePasswordProtection;!e&&this.useUniquePassword&&await this.saveUseUniquePassword(!1),!e&&this.showUniquePasswordInput&&(this.showUniquePasswordInput=!1),await this.$store.dispatch("editCircleSetting",{circleId:this.circleId,setting:{setting:jr,value:e.toString()}})}finally{this.loading=this.loading.filter(e=>e!==jr)}},async changeUseUniquePassword(){if(!this.useUniquePassword){this.showUniquePasswordInput=!this.showUniquePasswordInput;return}await this.saveUseUniquePassword(!this.useUniquePassword)},async saveUseUniquePassword(e){this.loading.push(Wr);try{await this.$store.dispatch("editCircleSetting",{circleId:this.circleId,setting:{setting:Wr,value:e.toString()}}),e||(this.uniquePassword="",this.showUniquePasswordInput=!1)}finally{this.loading=this.loading.filter(o=>o!==Wr)}},async saveUniquePassword(){if(this.uniquePassword.length!==0){this.loading.push(Fi),this.uniquePasswordError=!1;try{this.useUniquePassword||await this.saveUseUniquePassword(!0),await this.$store.dispatch("editCircleSetting",{circleId:this.circleId,setting:{setting:Fi,value:this.uniquePassword}}),this.showUniquePasswordInput=!1,this.uniquePassword=""}catch{this.uniquePasswordError=!0}finally{this.loading=this.loading.filter(e=>e!==Fi)}}},onClickChangePassword(){this.showUniquePasswordInput=!0}}},z3={class:"circle-config"},G3={class:"circle-config__list"},F3={class:"unique-password"},Y3=["disabled","placeholder"],X3={key:2,class:"unique-password-error"};function j3(e,o,r,i,a,s){const l=w("CheckboxRadioSwitch"),c=w("NcButton");return f(),k("ul",null,[D("li",z3,[D("ul",G3,[E(l,{"model-value":s.enforcePasswordProtection,loading:a.loading.includes(a.ENFORCE_PASSWORD_PROTECTION),disabled:a.loading.length>0,"wrapper-element":"li","onUpdate:modelValue":s.changePasswordProtection},{default:S(()=>[Z(O(e.t("contacts","Enforce password protection on files shared to this team")),1)]),_:1},8,["model-value","loading","disabled","onUpdate:modelValue"]),s.enforcePasswordProtection?(f(),T(l,{key:0,"model-value":s.useUniquePassword||a.showUniquePasswordInput,loading:a.loading.includes(a.USE_UNIQUE_PASSWORD),disabled:a.loading.length>0,"wrapper-element":"li","onUpdate:modelValue":s.changeUseUniquePassword},{default:S(()=>[Z(O(e.t("contacts","Use a unique password for all shares to this team")),1)]),_:1},8,["model-value","loading","disabled","onUpdate:modelValue"])):R("",!0),D("li",F3,[a.showUniquePasswordInput?(f(),k(_t,{key:0},[Yn(D("input",{"onUpdate:modelValue":o[0]||(o[0]=d=>a.uniquePassword=d),disabled:a.loading.length>0,placeholder:e.t("contacts","Unique password …"),type:"text",onKeyup:o[1]||(o[1]=pc((...d)=>s.saveUniquePassword&&s.saveUniquePassword(...d),["enter"]))},null,40,Y3),[[gc,a.uniquePassword]]),E(c,{variant:"tertiary-no-background",disabled:a.loading.length>0||a.uniquePassword.length===0,onClick:s.saveUniquePassword},{default:S(()=>[Z(O(e.t("contacts","Save")),1)]),_:1},8,["disabled","onClick"])],64)):s.useUniquePassword?(f(),T(c,{key:1,class:"change-unique-password",onClick:s.onClickChangePassword},{default:S(()=>[Z(O(e.t("contacts","Change unique password")),1)]),_:1},8,["onClick"])):R("",!0),a.uniquePasswordError?(f(),k("div",X3,O(e.t("contacts","Failed to save password. Please try again later.")),1)):R("",!0)])])])])}const W3=tt(H3,[["render",j3],["__scopeId","data-v-93191071"]]),q3={name:"ContentHeading",props:{loading:{type:Boolean,default:!1}}},Z3={class:"app-content-heading"},J3={key:0,class:"app-content-heading__loader icon-loading-small"};function K3(e,o,r,i,a,s){return f(),k("h3",Z3,[$t(e.$slots,"default",{},void 0,!0),r.loading?(f(),k("div",J3)):R("",!0)])}const B1=tt(q3,[["render",K3],["__scopeId","data-v-614dccab"]]),vd={data(){return{copied:!1,copyLoading:!1,copySuccess:!1}},computed:{copyLinkIcon(){return this.copySuccess?"icon-checkmark":this.copyLoading?"icon-loading-small":"icon-public"}},methods:{async copyToClipboard(e){this.copyLoading=!0;try{await navigator.clipboard.writeText(e),this.copySuccess=!0,this.copied=!0,ai(t("contacts","Link copied to the clipboard"))}catch{this.copySuccess=!1,this.copied=!0,bt(t("contacts","Could not copy link to the clipboard."))}finally{this.copyLoading=!1,setTimeout(()=>{this.copied=!1,this.copySuccess=!1},2e3)}}}},bd={props:{circle:{type:vp,required:!0}},mixins:[vd],data(){return{loadingAction:!1,loadingJoin:!1}},computed:{copyButtonText(){return this.copied?this.copySuccess?t("contacts","Copied"):t("contacts","Could not copy"):t("contacts","Copy link")},circleUrl(){const e=this.$router.resolve(this.circle.router);return window.location.origin+e.href},joinButtonTitle(){return this.circle.requireJoinAccept?t("contacts","Request to join"):t("contacts","Join team")}},methods:{confirmLeaveCircle(){window.OC.dialogs.confirmDestructive(t("contacts",`You are about to leave {circle}. Are you sure?`,{circle:this.circle.displayName}),t("contacts","Please confirm team leave"),window.OC.dialogs.YES_NO_BUTTONS,this.leaveCircle,!0)},async leaveCircle(e){if(!e){this.logger.debug("Circle leave cancelled");return}this.loadingAction=!0;const o=this.circle.initiator;try{await this.$store.dispatch("deleteMemberFromCircle",{member:o,leave:!0}),this.circle.initiator=null}catch(r){console.error("Could not leave the circle",o,r),bt(t("contacts","Could not leave the team {displayName}",this.circle))}finally{this.loadingAction=!1}},async joinCircle(){this.loadingJoin=!0;try{const e=await Gg(this.circle.id),o=new Fg(e,this.circle);this.circle.initiator=o,o.circle.addMember(o)}catch(e){bt(t("contacts","Unable to join the team")),console.error("Unable to join the circle",e)}finally{this.loadingJoin=!1}},confirmDeleteCircle(){window.OC.dialogs.confirmDestructive(t("contacts",`You are about to delete {circle}. Are you sure?`,{circle:this.circle.displayName}),t("contacts","Please confirm team deletion"),window.OC.dialogs.YES_NO_BUTTONS,this.deleteCircle,!0)},async deleteCircle(e){if(!e){this.logger.debug("Circle deletion cancelled");return}this.loadingAction=!0;try{await this.$store.dispatch("deleteCircle",this.circle.id)}catch{bt(t("contacts","Unable to delete the team"))}finally{this.loadingAction=!1}},async confirmEnableFederationForCircle(){return await zg({name:t("contacts","Confirm enabling federation"),text:t("contacts",`Enabling this will prevent {circle} from being a member of other teams. Are you sure?`,{circle:this.circle.displayName}),labelConfirm:t("contacts","Enable federation"),labelReject:t("contacts","Cancel"),severity:"warning"})?!0:(this.logger.debug("Enable federation cancelled"),!1)},async addMemberToCircle(){try{await this.$router.push(this.circle.router)}catch(e){console.error("Could not open circle member picker",e)}vr("contacts:circles:append",this.circle.id)}}},Q3=Ae({name:"CircleSettings",components:{ContentHeading:B1,CirclePasswordSettings:W3,IconDelete:Sn,IconLogout:V1,NcButton:he,NcCheckboxRadioSwitch:Qa},mixins:[bd],props:{circle:{type:Object,required:!0}},emits:["leave","delete","close-settings-popover"],setup(){return{t:Bo}},data(){return{PUBLIC_CIRCLE_CONFIG:Yg,loading:!1}},methods:{isChecked(e){return(this.circle.config&e)!==0},async onChange(e,o){if(this.logger.debug(`Circle config ${e} is set to ${o}`),o&&e===bp.FEDERATED&&(this.$emit("close-settings-popover"),!await this.confirmEnableFederationForCircle()))return;this.loading=e;const r=this.circle.config;o?e=r|e:e=r&~e;try{const i=await pl(this.circle.id,fl.Config,e);this.circle.config=i.config}catch(i){this.logger.error("Unable to edit circle config",{prevConfig:r,config:e,error:i}),bt(Bo("contacts","An error happened during the config change"))}finally{this.loading=!1}}}}),t6={class:"circle-settings"},e6={class:"circle-config__list"};function n6(e,o,r,i,a,s){const l=w("ContentHeading"),c=w("NcCheckboxRadioSwitch"),d=w("CirclePasswordSettings"),u=w("IconLogout"),h=w("NcButton"),p=w("IconDelete");return f(),k("div",t6,[D("ul",null,[(f(!0),k(_t,null,jt(e.PUBLIC_CIRCLE_CONFIG,(m,g)=>(f(),k("li",{key:g,class:"circle-config"},[E(l,{class:"circle-config__title"},{default:S(()=>[Z(O(g),1)]),_:2},1024),D("ul",e6,[(f(!0),k(_t,null,jt(m,(_,C)=>(f(),T(c,{key:"circle-config"+C,"model-value":e.isChecked(C),loading:e.loading===C,disabled:e.loading!==!1,"wrapper-element":"li","onUpdate:modelValue":M=>e.onChange(Number(C),M)},{default:S(()=>[Z(O(_),1)]),_:2},1032,["model-value","loading","disabled","onUpdate:modelValue"]))),128))])]))),128))]),E(d,{circle:e.circle},null,8,["circle"]),e.circle.canLeave?(f(),T(h,{key:0,variant:"warning",onClick:o[0]||(o[0]=m=>e.$emit("leave"))},{icon:S(()=>[E(u,{size:16})]),default:S(()=>[Z(" "+O(e.t("contacts","Leave team")),1)]),_:1})):R("",!0),e.circle.canDelete?(f(),T(h,{key:1,variant:"error",href:"#",onClick:o[1]||(o[1]=ae(m=>e.$emit("delete"),["prevent","stop"]))},{icon:S(()=>[E(p,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Delete team")),1)]),_:1})):R("",!0)])}const o6=tt(Q3,[["render",n6],["__scopeId","data-v-c76e33fa"]]),r6={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},i6=["aria-hidden","aria-label"],a6=["fill","width","height"],s6={d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},l6={key:0};function c6(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon close-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",s6,[r.title?(f(),k("title",l6,O(r.title),1)):R("",!0)])],8,a6))],16,i6)}const d6=tt(r6,[["render",c6]]),u6={name:"TeamResourceButton",components:{NcButton:he,NcNoteCard:Xa,NcPopover:bc,NcTextField:Cc,CloseOutlineIcon:d6,CheckOutlineIcon:xs},props:{resourceType:{type:Object,required:!0},value:{type:String,default:""},isOpen:{type:Boolean,default:!1}},emits:["update:value","update:isOpen","create"],computed:{inputValue(){return this.value},isPopoverOpen:{get(){return this.isOpen},set(e){this.$emit("update:isOpen",e)}},canCreate(){if(this.resourceType.noInput)return this.resourceType.enabled!==!1;const e=this.inputValue;return typeof e=="string"&&e.trim().length>0&&this.resourceType.enabled!==!1}},methods:{openPopover(){this.resourceType.noInput?this.createResource():this.isPopoverOpen=!0},closePopover(){this.isPopoverOpen=!1},handlePopoverToggle(e){this.isPopoverOpen=e},updateInput(e){const o=typeof e=="string"?e:e?.target?.value||e?.value||"";this.$emit("update:value",o)},createResource(){if(this.canCreate)if(this.resourceType.noInput)this.$emit("create",{resourceType:this.resourceType,name:""});else{const e=this.inputValue,o=typeof e=="string"?e.trim():"";o&&this.$emit("create",{resourceType:this.resourceType,name:o})}}}},h6={key:0,class:"resource-creation-popover"},p6={class:"popover-content"},f6={class:"popover-actions"},m6={key:0,class:"popover-helper-text"};function g6(e,o,r,i,a,s){const l=w("NcButton"),c=w("NcTextField"),d=w("CloseOutlineIcon"),u=w("CheckOutlineIcon"),h=w("NcNoteCard"),p=w("NcPopover");return f(),T(p,{shown:s.isPopoverOpen,"popup-role":"dialog","onUpdate:shown":s.handlePopoverToggle},{trigger:S(()=>[E(l,{variant:"secondary","aria-describedby":`tooltip-${r.resourceType.id}`,onClick:s.openPopover},{icon:S(()=>[$t(e.$slots,"icon",{},void 0,!0)]),default:S(()=>[Z(" "+O(r.resourceType.label),1)]),_:3},8,["aria-describedby","onClick"])]),default:S(()=>[r.resourceType.noInput?R("",!0):(f(),k("div",h6,[D("div",p6,[E(c,{"model-value":s.inputValue,placeholder:r.resourceType.placeholder,label:r.resourceType.inputLabel,"onUpdate:value":s.updateInput,onInput:s.updateInput},null,8,["model-value","placeholder","label","onUpdate:value","onInput"]),D("div",f6,[E(l,{variant:"secondary","aria-label":e.t("contacts","Close"),onClick:s.closePopover},{icon:S(()=>[E(d,{size:20})]),_:1},8,["aria-label","onClick"]),E(l,{variant:"primary","aria-label":e.t("contacts","Save"),disabled:!s.canCreate,onClick:s.createResource},{icon:S(()=>[E(u,{size:20})]),_:1},8,["aria-label","disabled","onClick"])])]),r.resourceType.helperText?(f(),k("div",m6,[E(h,{type:"info"},{default:S(()=>[Z(O(r.resourceType.helperText),1)]),_:1})])):R("",!0)]))]),_:3},8,["shown","onUpdate:shown"])}const y6=tt(u6,[["render",g6],["__scopeId","data-v-d459b596"]]),bi=null,{min:$o,max:sn,abs:Oh,floor:v6}=Math,U1=(e,o,r)=>$o(r,sn(o,e)),H1=e=>[...e].sort((o,r)=>o-r),b6=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)},Hl=()=>{let e;return[new Promise(o=>{e=o}),e]},z1=e=>{let o;return()=>(e&&(o=e(),e=void 0),o)},ri=(e,o,r)=>{const i=r?"unshift":"push";for(let a=0;a<o;a++)e[i](-1);return e},G1=(e,o)=>{const r=e.t[o];return r===-1?e.o:r},_6=(e,o,r)=>{const i=e.t[o]===-1;return e.t[o]=r,e.i=$o(o,e.i),i},pa=(e,o)=>{if(!e.l)return 0;if(e.i>=o)return e.u[o];e.i<0&&(e.u[0]=0,e.i=0);let r=e.i,i=e.u[r];for(;r<o;)i+=G1(e,r),e.u[++r]=i;return e.i=o,i},or=(e,o,r=0,i=e.l-1)=>{let a=r;for(;r<=i;){const s=v6((r+i)/2);pa(e,s)<=o?(a=s,r=s+1):i=s-1}return U1(a,0,e.l-1)},Lh=(e,o,r)=>{const i=o-e.l;return e.i=r?-1:$o(o-1,e.i),e.l=o,i>0?(ri(e.u,i),ri(e.t,i,r),e.o*i):(e.u.splice(i),(r?e.t.splice(0,-i):e.t.splice(i)).reduce((a,s)=>a-(s===-1?e.o:s),0))},C6=e=>e.documentElement,w6=e=>e.ownerDocument,k6=e=>e.defaultView,F1=z1(()=>!!/iP(hone|od|ad)/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>0),S6=z1(()=>"scrollBehavior"in C6(document).style),x6=(e,o=40,r=0,i,a=!1)=>{let s=!!r,l=1,c=0,d=0,u=0,h=0,p=0,m=0,g=0,_=0,C=bi,M=[0,s?sn(r-1,0):-1],N=0,P=!1;const V=((H,I,U)=>({o:I,t:U?ri(U.slice(0,$o(H,U.length)),sn(0,H-U.length)):ri([],H),l:H,i:-1,u:ri([],H+1)}))(e,i?i[1]:o,i&&i[0]),K=new Set,X=()=>u-d,rt=()=>X()+p+h,pt=(H,I)=>((U,z,j,ct)=>{if(ct=$o(ct,U.l-1),pa(U,ct)<=z){const st=or(U,j,ct);return[or(U,z,ct,st),st]}{const st=or(U,z,void 0,ct);return[st,or(U,j,st)]}})(V,H,I,M[0]),it=()=>pa(V,V.l),et=(H,I)=>{const U=pa(V,H)-p;return I?it()-U-ut(H):U},ut=H=>G1(V,H),L=(H,I=-1)=>V.t[H]===I,q=H=>{H&&(F1()&&g!==0||C&&_===1?p+=H:h+=H)};return{p:()=>{K.clear()},m:()=>l,h:()=>(H=>[H.t.slice(),H.o])(V),v:(H=200)=>{if(!P||s)return M;let I,U;if(m)[I,U]=M;else{let z=sn(0,rt()),j=z+c;a||(H=sn(0,H),g!==1&&(z-=H),g!==2&&(j+=H)),[I,U]=M=pt(sn(0,z),sn(0,j)),C&&(I=$o(I,C[0]),U=sn(U,C[1]))}return[sn(I,0),$o(U,V.l-1)]},S:H=>or(V,H-d),I:L,O:et,k:ut,j:()=>V.l,N:()=>u,B:()=>g!==0,T:()=>c,q:()=>d,M:it,P:()=>(m=h,h=0,[m,_===2]),R:(H,I)=>{const U=[H,I];return K.add(U),()=>{K.delete(U)}},A:(H,I)=>{let U,z,j=0;switch(H){case 1:{if(I===u&&_===0)break;const ct=m;m=0;const st=I-u,lt=Oh(st);ct&<<Oh(ct)+1||_!==0||(g=st<0?2:1),s&&(s=!1),u=I,j=4;const ot=X();ot>=-c&&ot<=it()&&(j+=1,z=lt>c);break}case 2:j=8,g!==0&&(U=!0,j+=1),g=0,_=0,C=bi;break;case 3:{const ct=I.filter(([st,lt])=>!L(st,lt));if(!ct.length)break;q(ct.reduce((st,[lt,ot])=>{let St;if(_===2)St=!0;else if(C&&_===1)St=lt<C[0];else{const Pt=X(),At=et(lt),Ut=ut(lt);St=g!==1&&_===0?At+Ut<Pt:At<Pt&&At+Ut<Pt+c}return St&&(st+=ot-ut(lt)),st},0));for(const[st,lt]of ct){const ot=ut(st),St=_6(V,st,lt);a&&(N+=St?lt:lt-ot)}a&&c&&N>c&&(q(((st,lt)=>{let ot=0;const St=[];st.t.forEach((ht,dt)=>{ht!==-1&&(St.push(ht),dt<lt&&ot++)}),st.i=-1;const Pt=H1(St),At=Pt.length,Ut=At/2|0,ne=At%2==0?(Pt[Ut-1]+Pt[Ut])/2:Pt[Ut],G=st.o;return((st.o=ne)-G)*sn(lt-ot,0)})(V,or(V,rt()))),a=!1),j=3,z=!0;break}case 4:c!==I&&(c||(P=z=!0),c=I,j=3);break;case 5:I[1]?(q(Lh(V,I[0],!0)),_=2,j=1):(Lh(V,I[0]),j=1);break;case 6:d=I;break;case 7:_=1;break;case 8:C=pt(I,I+c),j=1}j&&(l=1+(2147483647&l),U&&p&&(h+=p,p=0),K.forEach(([ct,st])=>{j&ct&&st(z)}))}}},_d=setTimeout,Qs=(e,o)=>o?-e:e,A6=(e,o,r,i,a,s)=>{const l=Date.now;let c=0,d=!1,u=!1,h=!1,p=!1;const m=(()=>{let N;const P=()=>{N!=bi&&clearTimeout(N)},V=()=>{P(),N=_d(()=>{N=bi,(()=>{if(d||u)return d=!1,void m();h=!1,e.A(2)})()},150)};return V.C=P,V})(),g=()=>{c=l(),h&&(p=!0),e.A(1,i()),m()},_=N=>{if(d||!e.B()||N.ctrlKey)return;const P=l()-c;150>P&&50<P&&(r?N.deltaX:N.deltaY)&&(d=!0)},C=()=>{u=!0,h=p=!1},M=()=>{u=!1,F1()&&(h=!0)};return o.addEventListener("scroll",g),o.addEventListener("wheel",_,{passive:!0}),o.addEventListener("touchstart",C,{passive:!0}),o.addEventListener("touchend",M,{passive:!0}),{H:()=>{o.removeEventListener("scroll",g),o.removeEventListener("wheel",_),o.removeEventListener("touchstart",C),o.removeEventListener("touchend",M),m.C()},V:()=>{const[N,P]=e.P();N&&(a(N,P,p),p=!1,P&&e.T()>e.M()&&e.A(1,i()))}}},E6=(e,o,r)=>{let i;return[async(a,s)=>{if(!await o())return;i&&i();const l=()=>{const[c,d]=Hl();return i=()=>{d(!1)},e.T()&&_d(i,150),[c,e.R(2,()=>{d(!0)})]};if(s&&S6())e.A(8,a()),b6(async()=>{for(;;){let c=!0;for(let[h,p]=e.v();h<=p;h++)if(e.I(h)){c=!1;break}if(c)break;const[d,u]=l();try{if(!await d)return}finally{u()}}e.A(7),r(a(),s)});else for(;;){const[c,d]=l();try{if(e.A(7),r(a()),!await c)return}finally{d()}}},()=>{i&&i()}]},N6=e=>{let o;return{F(r){(o||(o=new(k6(w6(r))).ResizeObserver(e))).observe(r)},J(r){o.unobserve(r)},H(){o&&o.disconnect()}}},T6=Ae({props:{L:{type:Object,required:!0},W:{type:Object,required:!0},X:{type:Object,required:!0},Y:{type:Function,required:!0},D:{type:Number,required:!0},U:{type:Boolean},G:{type:Boolean},K:{type:Boolean},Z:{type:String,required:!0},ee:Object},setup(e){const o=Go(),r=Bt(()=>e.L.value&&e.W.O(e.D,e.K)),i=Bt(()=>e.L.value&&e.W.I(e.D));return wn(()=>o.value&&e.D,(a,s,l)=>{l(e.Y(o.value,e.D))},{flush:"post"}),()=>{const{X:a,U:s,G:l,Z:c}=e,d=i.value,{style:u,...h}=e.ee??{},p={contain:"layout style",position:d&&l?void 0:"absolute",[s?"height":"width"]:"100%",[s?"top":"left"]:"0px",[s?"left":"top"]:r.value+"px",visibility:!d||l?void 0:"hidden",...u};return s&&(p.display="inline-flex"),E(c,gt({ref:o,style:p},h),typeof(m=a)=="function"||Object.prototype.toString.call(m)==="[object Object]"&&!yc(m)?a:{default:()=>[a],_:2},16,["style"]);var m}}}),M6=(e,o)=>{if(e.length===1){const r=e[0].key;if(r!=null)return r}return"_"+o},I6=(e,o)=>e[0]===o[0]&&e[1]===o[1],O6=Ae({props:{data:{type:Array,required:!0},bufferSize:Number,itemSize:Number,shift:Boolean,horizontal:Boolean,startMargin:{type:Number,default:0},ssrCount:Number,scrollRef:Object,as:{type:String,default:"div"},item:{type:String,default:"div"},itemProps:Function,keepMounted:Array,cache:Object},emits:["scroll","scrollEnd"],setup(e,{emit:o,expose:r,slots:i}){let a=!!e.ssrCount;const s=e.horizontal,l=Go(),c=x6(e.data.length,e.itemSize,e.ssrCount,e.cache,!e.itemSize),d=((_,C)=>{let M;const N=C?"width":"height",P=new WeakMap,V=N6(K=>{const X=[];for(const{target:rt,contentRect:pt}of K)if(rt.offsetParent)if(rt===M)_.A(4,pt[N]);else{const it=P.get(rt);it!=bi&&X.push([it,pt[N]])}X.length&&_.A(3,X)});return{te(K){V.F(M=K)},re:(K,X)=>(P.set(K,X),V.F(K),()=>{P.delete(K),V.J(K)}),p:V.H}})(c,s),u=((_,C)=>{let M,N,P=Hl(),V=!1;const K=C?"scrollLeft":"scrollTop",X=C?"overflowX":"overflowY",[rt,pt]=E6(_,()=>P[0],(it,et)=>{it=Qs(it,V),et?M.scrollTo({[C?"left":"top"]:it,behavior:"smooth"}):M[K]=it});return{oe(it,et){M=et,C&&(V=getComputedStyle(et).direction==="rtl"),N=A6(_,et,C,()=>Qs(et[K],V),(ut,L,q)=>{if(q){const H=et.style,I=H[X];H[X]="hidden",_d(()=>{H[X]=I})}et[K]=Qs(_.N()+ut,V),L&&pt()}),P[1](!0)},p(){N&&N.H(),P[1](!1),P=Hl()},ne:()=>V,se(it){rt(()=>it)},ie(it){it+=_.N(),rt(()=>it)},le(it,{align:et,smooth:ut,offset:L=0}={}){if(it=U1(it,0,_.j()-1),et==="nearest"){const q=_.O(it),H=_.N();if(q<H)et="start";else{if(!(q+_.k(it)>H+_.T()))return;et="end"}}rt(()=>L+_.q()+_.O(it)+(et==="end"?_.k(it)-_.T():et==="center"?(_.k(it)-_.T())/2:0),ut)},ce:()=>{N&&N.V()}}})(c,s),h=Go(c.m());c.R(1,()=>{h.value=c.m()}),c.R(4,()=>{o("scroll",c.N())}),c.R(8,()=>{o("scrollEnd")});const p=Bt(_=>{h.value;const C=c.v(e.bufferSize);return _&&I6(_,C)?_:C}),m=Bt(()=>h.value&&c.B()),g=Bt(()=>h.value&&c.M());return Ep(()=>{a=!1;const _=l.value,C=requestAnimationFrame(()=>{const M=N=>{d.te(N),u.oe(_,N)};e.scrollRef?M(e.scrollRef):M(_.parentElement)});vu(()=>{cancelAnimationFrame(C)})}),vu(()=>{c.p(),d.p(),u.p()}),wn(()=>e.data.length,_=>{c.A(5,[_,e.shift])}),wn(()=>e.startMargin,_=>{c.A(6,_)},{immediate:!0}),wn([h],()=>{u.ce()},{flush:"post"}),r({get cache(){return c.h()},get scrollOffset(){return c.N()},get scrollSize(){return(_=>sn(_.M(),_.T()))(c)},get viewportSize(){return c.T()},findItemIndex:c.S,getItemOffset:c.O,getItemSize:c.k,scrollToIndex:u.le,scrollTo:u.se,scrollBy:u.ie}),()=>{const _=e.as,C=e.item,M=g.value,N=u.ne(),P=[],V=X=>{const rt=i.default({item:e.data[X],index:X});return E(T6,{key:M6(rt,X),L:h,W:c,Y:d.re,D:X,X:rt,U:s,K:N,G:a,Z:C,ee:e.itemProps?.({item:e.data[X],index:X})},null,8,["L","W","Y","D","X","U","K","G","Z","ee"])};if(e.keepMounted){const X=new Set(e.keepMounted);for(let[rt,pt]=p.value;rt<=pt;rt++)X.add(rt);H1([...X]).forEach(rt=>{P.push(V(rt))})}else for(let[X,rt]=p.value;X<=rt;X++)P.push(V(X));return E(_,{ref:l,style:{contain:"size style",overflowAnchor:"none",flex:"none",position:"relative",width:s?M+"px":"100%",height:s?"100%":M+"px",pointerEvents:m.value?"none":void 0}},typeof(K=P)=="function"||Object.prototype.toString.call(K)==="[object Object]"&&!yc(K)?P:{default:()=>[P],_:2},8,["style"]);var K}}}),Cd=Ae({props:{data:{type:Array,required:!0},bufferSize:Number,itemSize:Number,shift:Boolean,horizontal:Boolean,ssrCount:Number,itemProps:Function,keepMounted:Array,cache:Object},emits:["scroll","scrollEnd"],setup(e,{emit:o,expose:r,slots:i}){const a=e.horizontal,s=d=>{o("scroll",d)},l=()=>{o("scrollEnd")},c=Go();return r({get cache(){return c.value.cache},get scrollOffset(){return c.value.scrollOffset},get scrollSize(){return c.value.scrollSize},get viewportSize(){return c.value.viewportSize},findItemIndex:(...d)=>c.value.findItemIndex(...d),getItemOffset:(...d)=>c.value.getItemOffset(...d),getItemSize:(...d)=>c.value.getItemSize(...d),scrollToIndex:(...d)=>c.value.scrollToIndex(...d),scrollTo:(...d)=>c.value.scrollTo(...d),scrollBy:(...d)=>c.value.scrollBy(...d)}),()=>{return E("div",{style:{display:a?"inline-block":"block",[a?"overflowX":"overflowY"]:"auto",contain:"strict",width:"100%",height:"100%"}},[E(O6,{ref:c,data:e.data,bufferSize:e.bufferSize,itemSize:e.itemSize,itemProps:e.itemProps,shift:e.shift,ssrCount:e.ssrCount,horizontal:a,keepMounted:e.keepMounted,cache:e.cache,onScroll:s,onScrollEnd:l},(d=i,typeof d=="function"||Object.prototype.toString.call(d)==="[object Object]"&&!yc(d)?i:{default:()=>[i],_:2}),8,["data","bufferSize","itemSize","itemProps","shift","ssrCount","horizontal","keepMounted","cache","onScroll","onScrollEnd"])],4);var d}}}),L6={name:"MagnifyIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},D6=["aria-hidden","aria-label"],R6=["fill","width","height"],P6={d:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"},$6={key:0};function V6(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon magnify-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",P6,[r.title?(f(),k("title",$6,O(r.title),1)):R("",!0)])],8,R6))],16,D6)}const B6=tt(L6,[["render",V6]]),U6={name:"EntityBubble",components:{UserBubble:Ec},props:{id:{type:String,required:!0},label:{type:String,required:!0},type:{type:String,required:!0},shareType:{type:Number,default:void 0},user:{type:String,default:void 0}},setup(){return{ShareType:lr}},methods:{onDelete(){this.$emit("delete",{id:this.id,type:this.type})}}},H6=["title"];function z6(e,o,r,i,a,s){const l=w("UserBubble");return f(),T(l,{class:"entity-picker__bubble",margin:0,size:22,"display-name":r.label,user:r.shareType===i.ShareType.User?r.user:void 0},{name:S(()=>[D("a",{href:"#",title:e.t("contacts","Remove {type}",{type:r.type}),class:"entity-picker__bubble-delete icon-close",onClick:o[0]||(o[0]=(...c)=>s.onDelete&&s.onDelete(...c))},null,8,H6)]),_:1},8,["display-name","user"])}const G6=tt(U6,[["render",z6],["__scopeId","data-v-2330057e"]]),F6={name:"EntitySearchResult",components:{UserBubble:Ec},props:{source:{type:Object,default(){return{}}},onClick:{type:Function,default(){}},selection:{type:Object,default:()=>({})}},setup(){return{ShareType:lr}},computed:{isSelected(){return this.source.id in this.selection}}};function Y6(e,o,r,i,a,s){const l=w("UserBubble");return r.source.heading?(f(),k("h4",{key:r.source.id,class:"entity-picker__option-caption"},O(e.t("contacts","Add {type}",{type:r.source.label.toLowerCase()})),1)):(f(),T(l,{key:1,class:ee(["entity-picker__bubble",{"entity-picker__bubble--selected":s.isSelected}]),"display-name":r.source.label,user:r.source.shareType===i.ShareType.User?r.source.user:void 0,margin:6,size:44,url:"#",onClick:o[0]||(o[0]=ae(c=>r.onClick(r.source),["stop","prevent"]))},{title:S(()=>[...o[1]||(o[1]=[D("span",{class:"entity-picker__bubble-checkmark icon-checkmark"},null,-1)])]),_:1},8,["class","display-name","user"]))}const X6=tt(F6,[["render",Y6],["__scopeId","data-v-d0c44a5f"]]),j6={name:"EntityPicker",components:{NcButton:he,EmptyContent:yo,EntityBubble:G6,IconAccountPlusOutline:$1,IconSearch:B6,IconLoading:We,Modal:qn,VList:Cd,EntitySearchResult:X6},props:{loading:{type:Boolean,default:!1},dataTypes:{type:Array,required:!0,validator:e=>{const o=e.filter(r=>!r.id&&!r.label);return o.length>0?(console.error("The following types MUST have a proper id and label key",o),!1):!0}},dataSet:{type:Array,required:!0,validator:e=>(e.forEach(o=>{(!o.id||!o.label)&&console.error("The following source MUST have a proper id and label key",o)}),!0)},sort:{type:String,default:"label"},confirmLabel:{type:String,default:t("contacts","Add to group")},titleLabel:{type:String,default:t("contacts","Add members to group")},internalSearch:{type:Boolean,default:!0},selection:{type:Object,default:null},emptyDataSetDescription:{type:String,default:""}},data(){return{canInviteGuests:!!window?.OCA?.Guests?.openGuestDialog,searchQuery:"",localSelection:{}}},computed:{selectionSet:{get(){return this.selection!==null?this.selection:this.localSelection},set(e){this.selection!==null&&this.$emit("update:selection",e),this.localSelection=e}},isSingleType(){return!(this.dataTypes.length>1)},isEmptySelection(){return Object.keys(this.selectionSet).length===0},searchPlaceholderTypes(){return`${this.dataTypes.map(e=>e.label).join(", ")}…`},searchSet(){return this.internalSearch&&this.searchQuery&&this.searchQuery.trim!==""?this.dataSet.filter(e=>e.label.toLowerCase().indexOf(this.searchQuery.toLowerCase())>-1):this.dataSet},availableEntities(){return this.isSingleType?this.searchSet:this.dataTypes.map(e=>{const o=this.searchSet.filter(i=>i.type===e.id),r=[{id:e.id,label:e.label,heading:!0},...o];return o.length===0?[]:r}).flat()}},mounted(){this.$nextTick(()=>{this.$refs.input.focus(),this.$refs.input.select()}),this.canInviteGuests&&_a("guests:user:created",this.addGuest)},methods:{onCancel(){this.$emit("close")},onSubmit(){this.$emit("submit",Object.values(this.selectionSet))},onSearch:$p(function(){this.$emit("search",this.searchQuery)},200),onDelete(e){delete this.selectionSet[e.id],console.debug("Removing entity from selection",e)},onClick(e){if(e.id in this.selectionSet){delete this.selectionSet[e.id],console.debug("Removed entity to selection",e);return}this.selectionSet[e.id]=e,console.debug("Added entity to selection",e)},onToggle(e){e.id in this.selectionSet?this.onDelete(e):this.onPick(e)},onGuestButtonClick(){this.canInviteGuests&&window?.OCA?.Guests?.openGuestDialog("contacts")}}},W6={class:"entity-picker"},q6={class:"entity-picker__heading"},Z6={class:"entity-picker__title"},J6={class:"entity-picker__search-container"},K6={class:"entity-picker__search"},Q6=["placeholder"],tx={class:"entity-picker__navigation"};function ex(e,o,r,i,a,s){const l=w("IconAccountPlusOutline"),c=w("NcButton"),d=w("IconLoading"),u=w("EmptyContent"),h=w("EntityBubble"),p=w("IconSearch"),m=w("EntitySearchResult"),g=w("VList"),_=w("Modal");return f(),T(_,{size:"normal",onClose:s.onCancel},{default:S(()=>[D("div",W6,[D("div",q6,[D("h3",Z6,O(r.titleLabel),1)]),D("div",J6,[D("div",K6,[o[2]||(o[2]=D("div",{class:"entity-picker__search-icon icon-search"},null,-1)),Yn(D("input",{ref:"input","onUpdate:modelValue":o[0]||(o[0]=C=>a.searchQuery=C),placeholder:e.t("contacts","Search {types}",{types:s.searchPlaceholderTypes}),class:"entity-picker__search-input",type:"search",onInput:o[1]||(o[1]=(...C)=>s.onSearch&&s.onSearch(...C))},null,40,Q6),[[gc,a.searchQuery]])]),a.canInviteGuests?(f(),T(c,{key:0,type:"button",variant:"tertiary-no-background",title:e.t("contacts","Add guest"),"aria-label":e.t("contacts","Add guest"),onClick:s.onGuestButtonClick},{default:S(()=>[E(l,{size:20})]),_:1},8,["title","aria-label","onClick"])):R("",!0)]),r.loading?(f(),T(u,{key:0,name:e.t("contacts","Loading …")},{icon:S(()=>[E(d,{size:20})]),_:1},8,["name"])):(f(),k(_t,{key:1},[Object.keys(s.selectionSet).length>0?(f(),T(U0,{key:0,name:"zoom",tag:"ul",class:"entity-picker__selection"},{default:S(()=>[(f(!0),k(_t,null,jt(s.selectionSet,C=>(f(),T(h,gt({key:C.key||`entity-${C.type}-${C.id}`},{ref_for:!0},C,{onDelete:M=>s.onDelete(C)}),null,16,["onDelete"]))),128))]),_:1})):R("",!0),r.dataSet.length===0?(f(),T(u,{key:1,name:e.t("contacts","Search for people to add"),description:r.emptyDataSetDescription},{icon:S(()=>[E(p,{size:20})]),_:1},8,["name","description"])):s.searchSet.length>0&&s.availableEntities.length>0?(f(),T(g,{key:2,class:"entity-picker__options",data:s.availableEntities},{default:S(({item:C})=>[(f(),T(m,{key:C.id,source:C,selection:s.selectionSet,"on-click":s.onClick},null,8,["source","selection","on-click"]))]),_:1},8,["data"])):a.searchQuery?(f(),T(u,{key:3,name:e.t("contacts","No results")},{icon:S(()=>[E(p,{size:20})]),_:1},8,["name"])):R("",!0),D("div",tx,[E(c,{disabled:r.loading,class:"navigation__button-left",onClick:s.onCancel},{default:S(()=>[Z(O(e.t("contacts","Cancel")),1)]),_:1},8,["disabled","onClick"]),E(c,{disabled:s.isEmptySelection||r.loading,class:"navigation__button-right primary",onClick:s.onSubmit},{default:S(()=>[Z(O(r.confirmLabel),1)]),_:1},8,["disabled","onClick"])])],64))])]),_:1},8,["onClose"])}const Y1=tt(j6,[["render",ex],["__scopeId","data-v-76578209"]]),nx={name:"CheckOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ox=["aria-hidden","aria-label"],rx=["fill","width","height"],ix={d:"M19.78,2.2L24,6.42L8.44,22L0,13.55L4.22,9.33L8.44,13.55L19.78,2.2M19.78,5L8.44,16.36L4.22,12.19L2.81,13.55L8.44,19.17L21.19,6.42L19.78,5Z"},ax={key:0};function sx(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon check-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",ix,[r.title?(f(),k("title",ax,O(r.title),1)):R("",!0)])],8,rx))],16,ox)}const lx=tt(nx,[["render",sx]]),cx={name:"CloseOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},dx=["aria-hidden","aria-label"],ux=["fill","width","height"],hx={d:"M3,16.74L7.76,12L3,7.26L7.26,3L12,7.76L16.74,3L21,7.26L16.24,12L21,16.74L16.74,21L12,16.24L7.26,21L3,16.74M12,13.41L16.74,18.16L18.16,16.74L13.41,12L18.16,7.26L16.74,5.84L12,10.59L7.26,5.84L5.84,7.26L10.59,12L5.84,16.74L7.26,18.16L12,13.41Z"},px={key:0};function fx(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon close-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",hx,[r.title?(f(),k("title",px,O(r.title),1)):R("",!0)])],8,ux))],16,dx)}const mx=tt(cx,[["render",fx]]),gx={name:"ExitToAppIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},yx=["aria-hidden","aria-label"],vx=["fill","width","height"],bx={d:"M19,3H5C3.89,3 3,3.89 3,5V9H5V5H19V19H5V15H3V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M10.08,15.58L11.5,17L16.5,12L11.5,7L10.08,8.41L12.67,11H3V13H12.67L10.08,15.58Z"},_x={key:0};function Cx(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon exit-to-app-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",bx,[r.title?(f(),k("title",_x,O(r.title),1)):R("",!0)])],8,vx))],16,yx)}const X1=tt(gx,[["render",Cx]]),wx={name:"ShieldCheckOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},kx=["aria-hidden","aria-label"],Sx=["fill","width","height"],xx={d:"M21,11C21,16.55 17.16,21.74 12,23C6.84,21.74 3,16.55 3,11V5L12,1L21,5V11M12,21C15.75,20 19,15.54 19,11.22V6.3L12,3.18L5,6.3V11.22C5,15.54 8.25,20 12,21M10,17L6,13L7.41,11.59L10,14.17L16.59,7.58L18,9"},Ax={key:0};function Ex(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon shield-check-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",xx,[r.title?(f(),k("title",Ax,O(r.title),1)):R("",!0)])],8,Sx))],16,kx)}const Nx=tt(wx,[["render",Ex]]),ko={computed:{selectedContact(){return this.$route.params.selectedContact},selectedGroup(){return this.$route.params.selectedGroup},selectedCircle(){return this.$route.params.selectedCircle},selectedUserGroup(){return this.$route.params.selectedUserGroup},selectedChart(){return this.$route.params.selectedChart}}},Tx={name:"MemberGridItem",components:{NcAvatar:Wn,IconAccountGroupOutline:as,NcActions:Co,NcActionButton:xn,NcActionSeparator:Ev,NcActionText:wc,IconDeleteOutline:Sn,IconExitToApp:X1,IconShieldCheckOutline:Nx,IconCheckOutline:lx,IconCloseOutline:mx,NcButton:he},mixins:[ko],props:{member:{type:Object,required:!0},isTeam:{type:Boolean,default:!1}},data(){return{loading:!1}},computed:{circle(){return this.$store.getters.getCircle(this.selectedCircle)},currentUserLevel(){return this.circle?.initiator?.level||Le.MEMBER},currentUserId(){return this.circle?.initiator?.singleId},availableLevelsChange(){const e=[];return this.member.level===Le.OWNER||this.isCurrentUser||(this.currentUserLevel>=Le.MODERATOR&&this.member.level!==Le.ADMIN&&e.push(Le.ADMIN),this.currentUserLevel>=Le.ADMIN&&(this.member.level!==Le.MODERATOR&&e.push(Le.MODERATOR),this.member.level!==Le.MEMBER&&e.push(Le.MEMBER)),this.circle.isOwner&&e.push(Le.OWNER)),e},isCurrentUser(){return this.member.id===this.currentUserId},isPendingApproval(){return this.member.level===Le.NONE&&this.member.status===Wg.PENDING},canChangeLevel(){return this.circle.canManageMembers&&this.availableLevelsChange.length>0&&!this.isCurrentUser},canDelete(){return this.circle.canManageMembers&&this.member.level<=this.currentUserLevel&&!this.isCurrentUser},memberRole(){return!this.member.level||this.member.level===Le.NONE?null:zr[this.member.level]||null}},methods:{levelChangeLabel(e){return e===Le.OWNER?t("contacts","Promote as sole owner"):this.member.level<e?t("contacts","Promote to {level}",{level:zr[e]}):t("contacts","Demote to {level}",{level:zr[e]})},async deleteMember(){if(!this.isCurrentUser){await this.doDeleteMember();return}try{await new jg().setName(t("contacts","Leave team")).setText(t("contacts","Are you sure you want to leave this team? This action cannot be undone.")).setButtons([{label:t("contacts","Cancel"),type:"secondary",callback:()=>{}},{label:t("contacts","Leave team"),type:"error",callback:async()=>{try{await this.doDeleteMember()}catch(e){this.logger.error("Error in delete member callback",{e}),bt(t("contacts","Leave team failed."))}}}]).build().show()}catch{}},async doDeleteMember(){this.loading=!0;try{await this.$store.dispatch("deleteMemberFromCircle",{member:this.member,leave:this.isCurrentUser})}catch(e){if(e?.response?.status===404){this.logger.debug("Member is not in circle");return}this.logger.error("Could not delete the member",{member:this.member,error:e}),bt(t("contacts","Could not delete the member {displayName}",this.member))}finally{this.loading=!1}},async changeLevel(e){this.loading=!0;try{if(await Xg(this.circle.id,this.member.id,e),this.showLevelMenu=!1,e===Le.OWNER){await this.$store.dispatch("getCircle",this.circle.id),await this.$store.dispatch("getCircleMembers",this.circle.id);return}this.member.level=e}catch(o){this.logger.error("Could not change the member level",{level:zr[e],error:o}),bt(t("contacts","Could not change the member level to {level}",{level:zr[e]}))}finally{this.loading=!1}},async acceptMember(){this.loading=!0;try{await await this.$store.dispatch("acceptCircleMember",{circleId:this.circle.id,memberId:this.member.id})}catch(e){this.logger.error("Could not accept membership request",{member:this.member,error:e}),bt(t("contacts","Could not accept membership request"))}finally{this.loading=!1}}}},Mx={class:"member-grid-item"},Ix={class:"member-info"},Ox={class:"member-name"},Lx={key:0,class:"member-role"},Dx={key:2,class:"member-grid-item__actions"};function Rx(e,o,r,i,a,s){const l=w("IconAccountGroupOutline"),c=w("NcAvatar"),d=w("IconCheckOutline"),u=w("NcButton"),h=w("IconCloseOutline"),p=w("NcActionText"),m=w("IconShieldCheckOutline"),g=w("NcActionButton"),_=w("NcActionSeparator"),C=w("IconExitToApp"),M=w("IconDeleteOutline"),N=w("NcActions");return f(),k("div",Mx,[r.isTeam?(f(),T(c,{key:0,"display-name":r.member.displayName,"is-no-user":!0,size:32},{icon:S(()=>[E(l,{size:20})]),_:1},8,["display-name"])):(f(),T(c,{key:1,user:r.member.userId,"display-name":r.member.displayName,size:32},null,8,["user","display-name"])),D("div",Ix,[D("span",Ox,O(r.member.displayName),1),s.memberRole?(f(),k("span",Lx,O(s.memberRole),1)):R("",!0)]),!a.loading&&s.isPendingApproval&&s.circle.canManageMembers?(f(),k("div",Dx,[E(u,{"aria-label":e.t("contacts","Accept membership request"),onClick:s.acceptMember},{icon:S(()=>[E(d,{size:20})]),_:1},8,["aria-label","onClick"]),E(u,{"aria-label":e.t("contacts","Reject membership request"),onClick:s.deleteMember},{icon:S(()=>[E(h,{size:20})]),_:1},8,["aria-label","onClick"])])):(f(),T(N,{key:3},{default:S(()=>[a.loading?(f(),T(p,{key:0,icon:"icon-loading-small"},{default:S(()=>[Z(O(e.t("contacts","Loading …")),1)]),_:1})):(f(),k(_t,{key:1},[s.canChangeLevel?(f(),k(_t,{key:0},[E(p,null,{icon:S(()=>[E(m,{size:16})]),default:S(()=>[Z(O(e.t("contacts","Manage level"))+" ",1)]),_:1}),(f(!0),k(_t,null,jt(s.availableLevelsChange,P=>(f(),T(g,{key:P,icon:"",onClick:V=>s.changeLevel(P)},{default:S(()=>[Z(O(s.levelChangeLabel(P)),1)]),_:2},1032,["onClick"]))),128)),E(_)],64)):R("",!0),s.isCurrentUser&&!s.circle.isOwner?(f(),T(g,{key:1,onClick:s.deleteMember},{icon:S(()=>[E(C,{size:16})]),default:S(()=>[Z(O(e.t("contacts","Leave team"))+" ",1)]),_:1},8,["onClick"])):s.canDelete?(f(),T(g,{key:2,onClick:s.deleteMember},{icon:S(()=>[E(M,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Remove member")),1)]),_:1},8,["onClick"])):R("",!0)],64))]),_:1}))])}const Px=tt(Tx,[["render",Rx],["__scopeId","data-v-2a4da73d"]]),j1=Object.keys(ml),$x=parseInt(window.OC.config["sharing.maxAutocompleteResults"],10)||25;async function Dh(e,o=null){const r=await oe.get(Ze("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"teams",search:e,perPage:$x,shareType:j1,lookup:!1}}),i=r.data.ocs.data,a=r.data.ocs.data.exact;i.exact=[];let s=Object.values(a).reduce((m,g)=>m.concat(g),[]),l=Object.values(i).reduce((m,g)=>m.concat(g),[]);o&&(o.config&bp.FEDERATED)!==0?(s=s.filter(m=>!(m.value?.shareType===lr.Remote&&m.value?.isTrustedServer===!1)),l=l.filter(m=>!(m.value?.shareType===lr.Remote&&m.value?.isTrustedServer===!1))):(s=s.filter(m=>m.value?.shareType!==lr.Remote),l=l.filter(m=>m.value?.shareType!==lr.Remote));const c=s.filter(m=>typeof m=="object").map(m=>zl(m)).sort((m,g)=>m.shareType-g.shareType),d=l.filter(m=>typeof m=="object").map(m=>zl(m)).sort((m,g)=>m.shareType-g.shareType),u=c.concat(d),h=u.reduce((m,g)=>(g.displayName&&(m[g.displayName]||(m[g.displayName]=0),m[g.displayName]++),m),{}),p=u.map(m=>h[m.displayName]>1&&!m.desc?{...m,desc:m.shareWithDisplayNameUnique}:m);return console.info("suggestions",p),p}async function Vx(){const e=(await oe.get(Ze("apps/files_sharing/api/v1/sharees_recommended"),{params:{format:"json",itemType:"contacts",shareType:j1}})).data.ocs.data.exact,o=Object.values(e).reduce((r,i)=>r.concat(i),[]).map(r=>zl(r));return console.info("recommendations",o),o}function zl(e){const o=`picker-${e.value.shareType}`;return{label:e.label,id:`${o}-${e.value.shareWith}`,user:[window.OC.Share.SHARE_TYPE_USER,window.OC.Share.SHARE_TYPE_REMOTE].indexOf(e.value.shareType)>-1?e.value.shareWith:null,type:o,...e.value}}const Bx=Ae({name:"MemberList",components:{EntityPicker:Y1,IconContact:_o,MemberGridItem:Px,NcEmptyContent:yo,VList:Cd},mixins:[ja,ko],props:{list:{type:Array,required:!0},loading:{type:Boolean,default:!1}},data(){return{pickerLoading:!1,showPicker:!1,showPickerIntro:!0,recommendations:[],pickerCircle:null,pickerData:[],pickerSelection:{},pickerTypes:Zg,circleHeaderHeight:0}},computed:{circle(){return this.$store.getters.getCircle(this.selectedCircle)},decodedTeamName(){const e=this.circle&&this.circle.displayName?this.circle.displayName:"",o=document.createElement("textarea");return o.innerHTML=e,o.value},filteredPickerData(){return this.pickerData.filter(e=>{const o=ml[e.shareType],r=this.list.filter(({userType:i})=>i===o);return r?r.find(i=>i.userId===e.shareWith)===void 0:!0})},flatList(){const e=this.list.filter(r=>!r.isUser),o=this.list.filter(r=>r.isUser);return[...e,...o]},hasMembers(){return this.flatList.length>0},virtualListStyle(){const e=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--default-grid-baseline"))||4,o=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--header-height"))||50,r=e*32,i=window.innerHeight-o-this.circleHeaderHeight-r;return{height:`${Math.max(i,200)}px`}}},mounted(){_a("contacts:circles:append",this.onShowPicker),_a("guests:user:created",this.onGuestCreated),this.measureCircleHeader()},beforeUnmount(){this.resizeObserver?.disconnect()},methods:{measureCircleHeader(){const e=document.querySelector(".circle-details__header-wrapper");e&&(this.circleHeaderHeight=e.getBoundingClientRect().height,this.resizeObserver=new ResizeObserver(o=>{for(const r of o)this.circleHeaderHeight=r.contentRect.height}),this.resizeObserver.observe(e))},async onShowPicker(e){this.showPicker=!0,this.pickerLoading=!0,this.pickerCircle=e;try{const o=await Vx();this.recommendations=o,this.pickerData=o}catch(o){console.error("Unable to get the recommendations list",o)}finally{this.pickerLoading=!1}},async onSearch(e){if(e.trim()===""){this.pickerData=this.recommendations;return}this.pickerLoading=!0;try{const o=await Dh(e,this.circle);this.pickerData=o}catch(o){console.error("Unable to get the results",o),bt(Bo("contacts","Unable to get the results"))}finally{this.pickerLoading=!1}},async onPickerPick(e){this.logger.info("Adding selection to circle",{selection:e,pickerCircle:this.pickerCircle}),this.pickerLoading=!0,e=e.map(o=>({id:o.shareWith,type:ml[o.shareType]}));try{if((await this.$store.dispatch("addMembersToCircle",{circleId:this.pickerCircle,selection:e})).length<e.length){qg(Bo("contacts","Some members could not be added")),this.pickerSelection={};return}this.resetPicker()}catch(o){bt(Bo("contacts","There was an issue adding members to the team")),console.error("There was an issue adding members to the circle",this.pickerCircle,o)}finally{this.pickerLoading=!1}},resetPicker(){this.showPicker=!1,this.pickerCircle=null,this.pickerData=[],this.pickerSelection={}},async onGuestCreated(e){const o=await Dh(e.username,this.circle);this.$refs.entityPicker.onClick(o[0])}}}),Ux={class:"member-list"};function Hx(e,o,r,i,a,s){const l=w("IconLoading"),c=w("NcEmptyContent"),d=w("IconContact"),u=w("MemberGridItem"),h=w("VList"),p=w("EntityPicker");return f(),k("section",Ux,[e.loading?(f(),T(c,{key:0,class:"empty-content",name:e.t("contacts","Loading members list …")},{icon:S(()=>[E(l,{size:20})]),_:1},8,["name"])):e.circle.isMember?e.hasMembers?(f(),T(h,{key:3,class:"member-list__virtual",style:Za(e.virtualListStyle),data:e.flatList},{default:S(({item:m})=>[(f(),T(u,{key:`member-grid-item-${m.id}`,member:m,"is-team":!m.isUser},null,8,["member","is-team"]))]),_:1},8,["style","data"])):(f(),T(c,{key:2,class:"empty-content",name:e.t("contacts","You currently have no access to the member list")},{icon:S(()=>[E(d,{size:20})]),_:1},8,["name"])):(f(),T(c,{key:1,class:"empty-content",name:e.t("contacts","The list of members is only visible to members of this team")},{icon:S(()=>[E(d,{size:20})]),_:1},8,["name"])),e.showPicker?(f(),T(p,{key:4,ref:"entityPicker",selection:e.pickerSelection,"onUpdate:selection":o[0]||(o[0]=m=>e.pickerSelection=m),"confirm-label":e.t("contacts","Add to {team}",{team:e.decodedTeamName}),"title-label":e.t("contacts","Invite members to {team}",{team:e.decodedTeamName}),"data-types":e.pickerTypes,"data-set":e.filteredPickerData,"internal-search":!1,loading:e.pickerLoading,onClose:e.resetPicker,onSearch:e.onSearch,onSubmit:e.onPickerPick},null,8,["selection","confirm-label","title-label","data-types","data-set","loading","onClose","onSearch","onSubmit"])):R("",!0)])}const zx=tt(Bx,[["render",Hx],["__scopeId","data-v-c0967003"]]),Gl=["image/png","image/jpeg"],qr=Object.freeze({SET:"set",DELETE:"delete"}),Gx=ac(t("contacts","Choose a team picture")).setMultiSelect(!1).setMimeTypeFilter(Gl).setType(Jg.Choose).allowDirectories(!1).build(),Fx={name:"CircleDetails",components:{AccountPlusIcon:$1,Avatar:Wn,NcButton:he,NcDialog:Vp,ContentHeading:B1,ListItem:tf,CogIcon:gd,CopyIcon:lc,IconAccountGroup:as,FileDocumentOutline:j5,LoginIcon:p3,LogoutIcon:V1,MemberList:zx,CircleSettings:o6,TeamResourceButton:y6,NcEmptyContent:yo,NcLoadingIcon:We,NcPopover:bc,PencilIcon:sc,UserBubble:Ec,NcTextField:Cc,NcTextArea:Kg,NcActions:Co,NcActionButton:xn,FolderOutlineIcon:yd,MessageIcon:A3,CalendarIcon:N5,ViewDashboardIcon:U3,BookOpenPageVariantIcon:C5,CheckIcon:xs,FolderIcon:t3,TrashCanOutlineIcon:Sn,TrayArrowUpIcon:L3,VueCropper:P1},mixins:[bd],setup(){const e=Go(),{width:o}=ry(e),r=Gl.join(","),i=parseInt(window.OC.config.version.split(".")[0])>=34;return{avatarList:e,width:o,avatarAccept:r,avatarSupported:i}},data(){return{active:!1,isEditing:!1,showMembersModal:!1,loading:!1,loadingJoin:!1,loadingLeave:!1,loadingName:!1,loadingDescription:!1,isSettingsPopoverShown:!1,resources:[],originalDisplayName:"",originalDescription:"",activePopover:null,resourceInputs:qa({}),popoverBoundary:null,createdCalendar:null,showCalendarSuccessNotification:!1,createdCalendarName:"",avatarUrl:void 0,pendingAvatarBlob:null,pendingAvatarAction:null,pendingAvatarPreviewUrl:void 0,showCropper:!1,loadingAvatar:!1,cropperOptions:{aspectRatio:1/1,viewMode:1,guides:!1,center:!1,highlight:!1,autoCropArea:1,minContainerWidth:300,minContainerHeight:300}}},computed:{descriptionPlaceholder(){return this.circle.description.trim()===""?t("contacts","There is no description for this team"):t("contacts","Enter a description for the team")},isEmptyDescription(){return this.circle.description.trim()===""},showDescription(){return this.circle.isOwner?!0:!this.isEmptyDescription},members(){return Object.values(this.$store.getters.getCircle(this.circle.id)?.members||[])},circleUrl(){return window.location.href},displayAvatarUrl(){if(this.avatarSupported&&this.pendingAvatarAction!==qr.DELETE)return this.pendingAvatarPreviewUrl?this.pendingAvatarPreviewUrl:this.avatarUrl},canManageTeam(){return(this.circle.isOwner||this.circle.isAdmin)&&!this.circle.isPersonal},teamHasCollective(){return this.resourcesForProvider("collectives").length>0},maxMembers(){const e=parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area"))+12,o=Math.floor(this.width/e);return this.members.length>o?o-1:o},memberLimit(){return Math.min(this.members.length,this.maxMembers)},membersLimited(){return this.members.slice(0,this.memberLimit)},hasExtraMembers(){return this.members.length>this.maxMembers},groupedResources(){return this.resources.reduce((e,o)=>{const r=o.provider.id;return e[r]||(e[r]={name:o.provider.name,resources:[]}),e[r].resources.push(o),e},{})},resourcesForProvider(){return e=>this.resources?.filter(o=>o.provider.id===e)??[]},resourceTypes(){const e=window.OC?.appswebroots||{};return[{id:"folder",label:t("contacts","Folder"),inputLabel:t("contacts","New folder"),placeholder:t("contacts","Folder name"),helperText:t("contacts","This will create a regular folder shared with the team. To create a Team Folder, please contact your {productName} administrator",{productName:OC.theme.name}),icon:"FolderOutlineIcon",apiPath:"files",enabled:e.files!==void 0},{id:"talk",label:t("contacts","Talk conversation"),inputLabel:t("contacts","New Talk conversation"),placeholder:t("contacts","Conversation name"),icon:"MessageIcon",apiPath:"spreed",enabled:e.spreed!==void 0},{id:"collective",label:t("contacts","Collective"),inputLabel:null,placeholder:null,icon:"BookOpenPageVariantIcon",apiPath:"collectives",enabled:e.collectives!==void 0&&!this.teamHasCollective,noInput:!0},{id:"calendar",label:t("contacts","Calendar"),inputLabel:t("contacts","New calendar"),placeholder:t("contacts","Calendar name"),icon:"CalendarIcon",apiPath:"calendar",enabled:e.calendar!==void 0}].filter(o=>o.enabled)}},watch:{"circle.id":{handler(){this.isEditing=!1,this.fetchTeamResources(),this.avatarSupported&&(this.cancelSetAvatar(),this.clearPendingAvatar(),this.loadAvatarUrl())},immediate:!0}},beforeUnmount(){this.avatarUrl!==void 0&&URL.revokeObjectURL(this.avatarUrl),this.pendingAvatarPreviewUrl!==void 0&&URL.revokeObjectURL(this.pendingAvatarPreviewUrl)},methods:{addMembers(){this.$refs.memberList.onShowPicker(this.circle.id)},setActivePopover(e,o){this.activePopover=o?e:null},updateResourceInput(e,o){this.resourceInputs[e]=o},async handleResourceCreation({resourceType:e,name:o}){try{let r;switch(e.id){case"folder":{const i=`/remote.php/dav/files/${br().uid}/${o}`;await oe.request({method:"MKCOL",url:i,headers:{"Content-Type":"application/xml"}}),r=o;break}case"talk":{const i=Ze("/apps/spreed/api/v4/room");r=(await oe.post(i,{roomName:o,roomType:2})).data.ocs.data.token;break}case"collective":{const i=this.circle.sanitizedName||this.circle.name||this.circle.displayName;if(!i)throw new Error("Cannot create collective: team has no valid name");const a=Ze("/apps/collectives/api/v1.0/collectives");if(r=(await oe.post(a,{name:i})).data.ocs.data.collective.id,!r)throw new Error("Failed to get collective ID from creation response");break}case"calendar":{const i=(await oy(async()=>{const{default:l}=await import("./style-BeIBZbRG.chunk.mjs").then(c=>c.ao);return{default:l}},__vite__mapDeps([0,1,2,3,4]),import.meta.url)).default,a=new i({rootUrl:Ca("dav"),defaultHeaders:{"X-NC-CalDAV-Webcal-Caching":"On"}});await a.connect({enableCalDAV:!0});const s=a.calendarHomes[0];try{const l=await s.createCalendarCollection(o,"#0082c9",["VEVENT","VTODO"],0);this.createdCalendar=l,r=l.url}catch{throw console.error("Calendar creation failed for name:",o),new Error(`CALENDAR_EXISTS:${o}`)}break}default:{bt(t("contacts","Unknown resource type"));return}}await this.shareResourceWithTeam(e,r),this.resourceInputs[e.id]="",this.activePopover=null,e.id==="calendar"?(this.createdCalendar=null,ai(t("contacts",'Team calendar "{resourceName}" created and shared with team',{resourceName:o})),this.createdCalendarName=o,this.showCalendarSuccessNotification=!0,setTimeout(()=>{this.showCalendarSuccessNotification=!1},1e4)):(ai(t("contacts",'{resourceType} "{resourceName}" created and shared with team',{resourceType:e.label,resourceName:o})),this.fetchTeamResources())}catch(r){if(console.error("Failed to create resource:",r),r.message&&r.message.startsWith("CALENDAR_EXISTS:")){const i=r.message.replace("CALENDAR_EXISTS:","");bt(t("contacts",'A calendar named "{name}" already exists. Please choose a different name.',{name:i}))}else bt(t("contacts","Failed to create {resourceType}: {error}",{resourceType:e.label.toLowerCase(),error:r.response?.data?.ocs?.data?.message||r.response?.data?.message||r.message}))}},async shareResourceWithTeam(e,o){switch(e.id){case"folder":{const r=Ze("/apps/files_sharing/api/v1/shares");await oe.post(r,{path:`/${o}`,shareType:7,shareWith:this.circle.id,permissions:31});break}case"talk":{const r=Ze(`/apps/spreed/api/v4/room/${o}/participants`);await oe.post(r,{source:"circles",newParticipant:this.circle.id});break}case"collective":break;case"calendar":{if(!this.createdCalendar||!this.createdCalendar.share)throw new Error("No calendar object available for sharing");const r=`principal:principals/circles/${this.circle.id}`;await this.createdCalendar.share(r);break}}},openLocalFilePicker(){this.$refs.avatarInput.value=null,this.$refs.avatarInput.click()},async onAvatarInputChange(e){try{const o=e.target.files[0];if(!Gl.includes(o.type)){bt(t("contacts","Please select a valid png or jpg file"));return}const r=new FileReader;r.onload=async i=>{this.showCropper=!0,await this.$nextTick(),this.$refs.cropper.replace(i.target.result)},r.readAsDataURL(o)}catch(o){console.error("Error picking avatar file",o),bt(t("contacts","Error picking team picture"))}},async openFilePicker(){try{const e=await Gx.pick();if(!e)return;const o=await oe.get(Ca(`dav/files/${br().uid}`)+_p(e),{responseType:"blob"}),r=new FileReader;r.onload=async i=>{this.showCropper=!0,await this.$nextTick(),this.$refs.cropper.replace(i.target.result)},r.readAsDataURL(o.data)}catch(e){if(e instanceof Qg)return;console.error("Error picking avatar file",e),bt(t("contacts","Error picking team picture"))}},setAvatar(){this.showCropper=!1,this.$refs.cropper.getCroppedCanvas({minWidth:16,minHeight:16,maxWidth:512,maxHeight:512}).toBlob(async e=>{if(e===null){bt(t("contacts","Error cropping avatar picture")),this.cancelSetAvatar();return}this.pendingAvatarPreviewUrl&&URL.revokeObjectURL(this.pendingAvatarPreviewUrl),this.pendingAvatarBlob=e,this.pendingAvatarAction=qr.SET,this.pendingAvatarPreviewUrl=URL.createObjectURL(e)})},cancelSetAvatar(){this.showCropper=!1,this.$refs.avatarInput&&(this.$refs.avatarInput.value=null)},removeAvatar(){this.pendingAvatarPreviewUrl&&URL.revokeObjectURL(this.pendingAvatarPreviewUrl),this.pendingAvatarBlob=null,this.pendingAvatarAction=qr.DELETE,this.pendingAvatarPreviewUrl=void 0},clearPendingAvatar(){this.pendingAvatarPreviewUrl&&URL.revokeObjectURL(this.pendingAvatarPreviewUrl),this.pendingAvatarBlob=null,this.pendingAvatarAction=null,this.pendingAvatarPreviewUrl=void 0},onLeave(){this.isSettingsPopoverShown=!1,this.confirmLeaveCircle()},onDelete(){this.isSettingsPopoverShown=!1,this.confirmDeleteCircle()},onCloseSettingsPopover(){this.isSettingsPopoverShown=!1},startEditing(){this.originalDisplayName=this.circle.displayName,this.originalDescription=this.circle.description,this.isEditing=!0},cancelEditing(){this.circle.displayName=this.originalDisplayName,this.circle.description=this.originalDescription,this.cancelSetAvatar(),this.clearPendingAvatar(),this.isEditing=!1},async fetchTeamResources(){const e=await oe.get(Ze(`/teams/${this.circle.id}/resources`));this.resources=e.data.ocs.data.resources,console.debug("Team resources",this.resources)},async loadAvatarUrl(){if(this.avatarSupported)try{const e=await oe.get(Ze(`/apps/circles/circles/${this.circle.id}/avatar`),{responseType:"blob"});this.avatarUrl!==void 0&&URL.revokeObjectURL(this.avatarUrl),this.avatarUrl=URL.createObjectURL(e.data)}catch{this.avatarUrl!==void 0&&(URL.revokeObjectURL(this.avatarUrl),this.avatarUrl=void 0)}},onAutocomplete(e,o){o([])},async saveChanges(){const e=[];if(this.cancelSetAvatar(),this.circle.displayName!==this.originalDisplayName){this.loadingName=!0;try{await pl(this.circle.id,fl.Name,this.circle.displayName),this.originalDisplayName=this.circle.displayName}catch(o){console.error("Unable to edit name",this.circle.displayName,o),e.push("name"),this.circle.displayName=this.originalDisplayName}finally{this.loadingName=!1}}if(this.circle.description!==this.originalDescription){this.loadingDescription=!0;try{await pl(this.circle.id,fl.Description,this.circle.description),this.originalDescription=this.circle.description}catch(o){console.error("Unable to edit team description",this.circle.description,o),e.push("description"),this.circle.description=this.originalDescription}finally{this.loadingDescription=!1}}if(this.avatarSupported&&this.pendingAvatarAction===qr.SET&&this.pendingAvatarBlob){this.loadingAvatar=!0;const o=new FormData;o.append("file",this.pendingAvatarBlob);try{await oe.post(Ze(`/apps/circles/circles/${this.circle.id}/avatar`),o),this.clearPendingAvatar(),await this.loadAvatarUrl()}catch{console.error("Unable to save avatar picture"),e.push("avatar")}finally{this.loadingAvatar=!1}}if(this.avatarSupported&&this.pendingAvatarAction===qr.DELETE){this.loadingAvatar=!0;try{await oe.delete(Ze(`/apps/circles/circles/${this.circle.id}/avatar`)),this.clearPendingAvatar(),await this.loadAvatarUrl()}catch{console.error("Unable to remove avatar"),e.push("avatar")}finally{this.loadingAvatar=!1}}if(e.length>0){const o=e.join(" and ");bt(t("contacts","An error happened while saving {fields}",{fields:o}));return}this.isEditing=!1},openCalendarApp(){window.open(Fo("/apps/calendar/"),"_blank"),this.showCalendarSuccessNotification=!1}}},Yx={class:"circle-details-container"},Xx={class:"circle-details__header-wrapper"},jx={class:"circle-details-grid__avatar"},Wx={class:"circle-details__header"},qx={class:"circle-name-wrapper"},Zx={key:0,class:"circle-name"},Jx=["title"],Kx={key:0,class:"subtitle"},Qx={key:1,class:"circle-description-wrapper"},t8={key:0,class:"circle-description"},e8={key:2,class:"circle-avatar-buttons-wrapper"},n8=["accept"],o8={class:"actions"},r8={key:3,class:"resource-shortcuts"},i8={class:"resource-shortcuts__title"},a8={class:"resource-shortcuts__buttons"},s8={class:"circle-details__main-content"},l8={key:1},c8={class:"section-header"},d8={class:"item-list"},u8=["innerHTML"],h8=["src","alt"],p8={class:"circle-details-section"},f8={class:"member-section-layout"},m8={class:"section-header"};function g8(e,o,r,i,a,s){const l=w("NcLoadingIcon"),c=w("Avatar"),d=w("NcTextField"),u=w("UserBubble"),h=w("NcTextArea"),p=w("TrayArrowUpIcon"),m=w("NcButton"),g=w("FolderIcon"),_=w("TrashCanOutlineIcon"),C=w("PencilIcon"),M=w("CopyIcon"),N=w("CogIcon"),P=w("CircleSettings"),V=w("NcPopover"),K=w("LoginIcon"),X=w("LogoutIcon"),rt=w("CheckIcon"),pt=w("TeamResourceButton"),it=w("NcEmptyContent"),et=w("IconAccountGroup"),ut=w("ContentHeading"),L=w("FileDocumentOutline"),q=w("ListItem"),H=w("AccountPlusIcon"),I=w("MemberList"),U=w("VueCropper"),z=w("NcDialog");return f(),k("div",Yx,[D("div",{class:ee(["circle-details-grid",{"is-editing":a.isEditing}])},[D("div",Xx,[D("div",jx,[a.loadingAvatar?(f(),T(l,{key:0,size:75})):(f(),T(c,{key:1,"disable-tooltip":!0,"display-name":e.circle.displayName,"is-no-user":!0,url:s.displayAvatarUrl,size:75},null,8,["display-name","url"]))]),D("div",Wx,[D("div",qx,[a.isEditing?(f(),T(d,{key:1,modelValue:e.circle.displayName,"onUpdate:modelValue":o[0]||(o[0]=j=>e.circle.displayName=j),placeholder:e.t("contacts","Team name"),label:"Team name"},null,8,["modelValue","placeholder"])):(f(),k("h2",Zx,[D("span",{title:e.circle.displayName},O(e.circle.displayName),9,Jx),a.loadingName?(f(),T(l,{key:0,size:24})):R("",!0)]))]),a.isEditing?R("",!0):(f(),k("div",Kx,[D("span",null,O(e.t("files","Team owner")),1),o[6]||(o[6]=Z()),E(u,{user:e.circle.owner.userId,"display-name":e.circle.isOwner?"you":e.circle.owner.displayName},null,8,["user","display-name"])])),s.showDescription?(f(),k("div",Qx,[a.isEditing?(f(),T(h,{key:1,modelValue:e.circle.description,"onUpdate:modelValue":o[1]||(o[1]=j=>e.circle.description=j),placeholder:s.descriptionPlaceholder,label:"Description",maxlength:1024},null,8,["modelValue","placeholder"])):(f(),k("div",t8,O(e.circle.description),1))])):R("",!0),i.avatarSupported?(f(),k("div",e8,[a.isEditing?(f(),T(m,{key:0,disabled:a.loadingAvatar,onClick:s.openLocalFilePicker},{icon:S(()=>[E(p,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Upload team picture")),1)]),_:1},8,["disabled","onClick"])):R("",!0),a.isEditing?(f(),T(m,{key:1,disabled:a.loadingAvatar,onClick:s.openFilePicker},{icon:S(()=>[E(g,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Choose from Nextcloud Files")),1)]),_:1},8,["disabled","onClick"])):R("",!0),a.isEditing&&s.displayAvatarUrl!==void 0?(f(),T(m,{key:2,disabled:a.loadingAvatar,onClick:s.removeAvatar},{icon:S(()=>[E(_,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Delete picture")),1)]),_:1},8,["disabled","onClick"])):R("",!0),D("input",{ref:"avatarInput",type:"file",accept:i.avatarAccept,class:"hidden-visually",onChange:o[2]||(o[2]=(...j)=>s.onAvatarInputChange&&s.onAvatarInputChange(...j))},null,40,n8)])):R("",!0),D("div",o8,[a.isEditing?(f(),k(_t,{key:1},[E(m,{variant:"secondary",onClick:s.cancelEditing},{default:S(()=>[Z(O(e.t("contacts","Cancel")),1)]),_:1},8,["onClick"]),E(m,{variant:"primary",onClick:s.saveChanges},{default:S(()=>[Z(O(e.t("contacts","Save")),1)]),_:1},8,["onClick"])],64)):(f(),k(_t,{key:0},[s.canManageTeam?(f(),T(m,{key:0,variant:"primary",onClick:s.startEditing},{icon:S(()=>[E(C,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Edit")),1)]),_:1},8,["onClick"])):R("",!0),E(m,{variant:"secondary",href:s.circleUrl,onClick:o[3]||(o[3]=ae(j=>e.copyToClipboard(s.circleUrl),["stop","prevent"]))},{icon:S(()=>[E(M,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Copy link")),1)]),_:1},8,["href"]),s.canManageTeam?(f(),T(V,{key:1,shown:a.isSettingsPopoverShown,"popup-role":"dialog","onUpdate:shown":o[5]||(o[5]=j=>a.isSettingsPopoverShown=j)},{trigger:S(()=>[E(m,{onClick:o[4]||(o[4]=j=>a.isSettingsPopoverShown=!0)},{icon:S(()=>[E(N,{size:20})]),_:1})]),default:S(()=>[E(P,{circle:e.circle,onLeave:s.onLeave,onDelete:s.onDelete,onCloseSettingsPopover:s.onCloseSettingsPopover},null,8,["circle","onLeave","onDelete","onCloseSettingsPopover"])]),_:1},8,["shown"])):R("",!0)],64)),!e.circle.isPendingMember&&!e.circle.isMember&&e.circle.canJoin?(f(),T(m,{key:2,disabled:a.loadingJoin,class:"primary",onClick:e.joinCircle},{icon:S(()=>[E(K,{size:16})]),default:S(()=>[Z(" "+O(e.t("contacts","Request to join")),1)]),_:1},8,["disabled","onClick"])):R("",!0),e.circle.isMember&&e.circle.canLeave?(f(),T(m,{key:3,disabled:a.loadingLeave,variant:"warning",onClick:e.confirmLeaveCircle},{icon:S(()=>[E(X,{size:16})]),default:S(()=>[Z(" "+O(e.t("contacts","Leave team")),1)]),_:1},8,["disabled","onClick"])):R("",!0)]),e.circle.isMember?(f(),k("div",r8,[D("h3",i8,O(e.t("contacts","Create")),1),D("div",a8,[(f(!0),k(_t,null,jt(s.resourceTypes,j=>(f(),k(_t,{key:j.id},[j.id==="calendar"&&a.showCalendarSuccessNotification?(f(),T(m,{key:0,variant:"success",onClick:s.openCalendarApp},{icon:S(()=>[E(rt,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Show in Calendar")),1)]),_:1},8,["onClick"])):(f(),T(pt,{key:1,"resource-type":j,value:a.resourceInputs[j.id]||"","is-open":a.activePopover===j.id,"helper-text":j.helperText,"onUpdate:value":ct=>s.updateResourceInput(j.id,ct),"onUpdate:isOpen":ct=>s.setActivePopover(j.id,ct),onCreate:s.handleResourceCreation},{icon:S(()=>[(f(),T(vo(j.icon),{size:20}))]),_:2},1032,["resource-type","value","is-open","helper-text","onUpdate:value","onUpdate:isOpen","onCreate"]))],64))),128))])])):R("",!0)])]),D("div",s8,[e.circle.isMember?(f(),k("section",l8,[(f(!0),k(_t,null,jt(s.groupedResources,(j,ct)=>(f(),k("div",{key:ct,class:"circle-details-section"},[D("div",c8,[E(ut,null,{default:S(()=>[Z(O(j.name),1)]),_:2},1024)]),D("ul",d8,[(f(!0),k(_t,null,jt(j.resources,st=>(f(),T(q,{key:st.id,href:st.url,name:st.label},{icon:S(()=>[st.iconSvg?(f(),k("div",{key:0,class:"resource__icon",innerHTML:st.iconSvg},null,8,u8)):st.iconURL?(f(),k("img",{key:1,src:st.iconURL,alt:st.label,class:"resource__icon"},null,8,h8)):(f(),T(L,{key:2,size:20}))]),_:2},1032,["href","name"]))),128))])]))),128)),D("div",p8,[D("div",f8,[D("div",m8,[E(ut,null,{default:S(()=>[Z(O(e.t("contacts","Members")),1)]),_:1}),e.circle.canManageMembers?(f(),T(m,{key:0,variant:"tertiary",onClick:s.addMembers},{icon:S(()=>[E(H,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Add")),1)]),_:1},8,["onClick"])):R("",!0)]),E(I,{ref:"memberList",list:s.members},null,8,["list"])])])])):(f(),k(_t,{key:0},[e.circle.isPendingMember?(f(),T(it,{key:0,name:e.t("contacts","Your request to join this team is pending approval")},{icon:S(()=>[E(l,{size:20})]),_:1},8,["name"])):(f(),T(it,{key:1,name:e.t("contacts","You are not a member of {circle}",{circle:e.circle.displayName})},{icon:S(()=>[E(et,{size:20})]),_:1},8,["name"]))],64))])],2),a.showCropper?(f(),T(z,{key:0,class:"circle-avatar-cropper-dialog",name:e.t("contacts","Edit team picture"),open:a.showCropper,size:"normal",onClosing:s.cancelSetAvatar},{actions:S(()=>[E(m,{onClick:s.cancelSetAvatar},{default:S(()=>[Z(O(e.t("contacts","Cancel")),1)]),_:1},8,["onClick"]),E(m,{variant:"primary",onClick:s.setAvatar},{default:S(()=>[Z(O(e.t("contacts","Apply")),1)]),_:1},8,["onClick"])]),default:S(()=>[E(U,gt({ref:"cropper",class:"circle-avatar-cropper"},a.cropperOptions),null,16)]),_:1},8,["name","open","onClosing"])):R("",!0)])}const y8=tt(Fx,[["render",g8],["__scopeId","data-v-c0354980"]]),v8={name:"UserGroupMember",components:{NcAvatar:Wn},props:{member:{type:String,required:!0}},data(){return{loading:!0,displayName:""}},mounted(){this.fetchMemberInfo()},methods:{async fetchMemberInfo(){const e=encodeURIComponent(this.member),{data:o}=await oe.post(Fo("contactsmenu/findOne"),`shareType=0&shareWith=${e}`);this.displayName=o.fullName,this.loading=!1}}},b8={class:"usergroup-member__container"},_8={class:"usergroup-member__info"},C8={key:0,class:"usergroup-member__name"},w8={class:"usergroup-member__role"};function k8(e,o,r,i,a,s){const l=w("NcAvatar");return f(),k("div",b8,[E(l,{user:r.member,size:32},null,8,["user"]),D("div",_8,[a.loading?R("",!0):(f(),k("div",C8,O(a.displayName),1)),D("div",w8,O(e.t("contacts","Member")),1)])])}const S8=tt(v8,[["render",k8],["__scopeId","data-v-7b48e627"]]);class wd{_data;_members;constructor(o){this._data=o,this._members=[]}addMember(o){this._members.includes(o)||this._members.push(o)}get id(){return this._data.id}get displayName(){return this._data.displayname}get population(){return this._data.usercount}get canLeave(){return!1}get isOwner(){return!1}get isMember(){return!0}get canManageMembers(){return!1}get canJoin(){return!1}get members(){return this._members}get router(){return{name:"user_group",params:{selectedUserGroup:this.id,selectedGroup:ei}}}toString(){return this.displayName}}const x8={name:"UserGroupDetails",components:{CopyIcon:lc,NcAvatar:Wn,NcButton:he,UserGroupMember:S8},mixins:[vd],props:{userGroup:{type:wd,required:!0}},computed:{userGroupUrl(){return window.location.href}}},A8={class:"usergroup-details-container"},E8={class:"usergroup-details-grid"},N8={class:"usergroup-details__header-wrapper"},T8={class:"usergroup-details-grid__avatar"},M8={class:"usergroup-details__header"},I8={class:"usergroup-name-wrapper"},O8={class:"usergroup-name"},L8=["title"],D8={class:"usergroup-details__subtitle"},R8={class:"actions"},P8={class:"usergroup-details__main-content"},$8={class:"usergroup-details__content-heading"},V8={class:"usergroup-details__member-grid"};function B8(e,o,r,i,a,s){const l=w("NcAvatar"),c=w("CopyIcon"),d=w("NcButton"),u=w("UserGroupMember");return f(),k("div",A8,[D("div",E8,[D("div",N8,[D("div",T8,[E(l,{"disable-tooltip":!0,"display-name":r.userGroup.displayName,"is-no-user":!0,size:75},null,8,["display-name"])]),D("div",M8,[D("div",I8,[D("h2",O8,[D("span",{title:r.userGroup.displayName},O(r.userGroup.displayName),9,L8)]),D("div",D8,O(e.t("contacts","This is a read-only group managed by administrators. Group members can only view this group.")),1)]),D("div",R8,[E(d,{variant:"secondary",onClick:o[0]||(o[0]=ae(h=>e.copyToClipboard(s.userGroupUrl),["stop","prevent"]))},{icon:S(()=>[E(c,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Copy link")),1)]),_:1})])])]),D("div",P8,[D("h3",$8,O(e.t("contacts","Members")),1),D("div",V8,[(f(!0),k(_t,null,jt(r.userGroup.members,h=>(f(),T(u,{key:`user-group-member-${h}`,member:h},null,8,["member"]))),128))])])])])}const U8=tt(x8,[["render",B8],["__scopeId","data-v-c6692938"]]);async function H8(e){return(await oe.get(Ze("/cloud/users/{userId}/groups/details",{userId:e}))).data.ocs.data.groups}async function z8(e){return(await oe.get(Ze("/cloud/groups/{groupId}/users",{groupId:e}))).data.ocs.data.users}const kd=t0("userGroup",{state:()=>({userGroups:{}}),getters:{userGroupList:e=>Object.values(e.userGroups),getUserGroup:e=>o=>e.userGroups[o]},actions:{async getUserGroups(e){const o=await H8(e);return o.forEach(r=>{try{const i=new wd(r);this.userGroups[i.id]=i}catch(i){vc.error("Failed to add group",{group:r,error:i})}}),o},async getUserGroupMembers(e){const o=await z8(e);return o.forEach(r=>{this.getUserGroup(e).addMember(r)}),o}}}),G8={name:"CircleContent",components:{AppContent:_c,CircleDetails:y8,EmptyContent:yo,AccountGroup:as,IconLoading:We,UserGroupDetails:U8},mixins:[ja,ko],props:{loading:{type:Boolean,default:!0}},data(){return{loadingList:!1}},computed:{circles(){return this.$store.getters.getCircles},circle(){return this.$store.getters.getCircle(this.selectedCircle)},userGroup(){return this.userGroupStore.getUserGroup(this.selectedUserGroup)},members(){return Object.values(this.circle?.members||[])},isEmptyCircle(){return this.members.length===0},...Cp(kd)},watch:{circle(e){e?.id&&this.fetchCircleMembers(e.id)},userGroup(e){e?.id&&this.fetchUserGroupMembers(e.id)}},beforeMount(){this.circle?.id&&this.fetchCircleMembers(this.circle.id),this.userGroup?.id&&this.fetchUserGroupMembers(this.userGroup.id)},methods:{async fetchCircleMembers(e){this.loadingList=!0,this.logger.debug("Fetching members for",{circleId:e});try{await this.$store.dispatch("getCircleMembers",e)}catch(o){console.error(o),bt(t("contacts","There was an error fetching the member list"))}finally{this.loadingList=!1}},async fetchUserGroupMembers(e){this.loadingList=!0;try{await this.userGroupStore.getUserGroupMembers(e)}catch(o){console.error(o),bt(t("contacts","There was an error fetching the member list"))}finally{this.loadingList=!1}}}};function F8(e,o,r,i,a,s){const l=w("AccountGroup"),c=w("EmptyContent"),d=w("IconLoading"),u=w("UserGroupDetails"),h=w("CircleDetails"),p=w("AppContent");return f(),T(p,null,{default:S(()=>[!s.circle&&!s.userGroup?(f(),T(c,{key:0,name:e.t("contacts","Please select a team")},{icon:S(()=>[E(l,{size:20})]),_:1},8,["name"])):r.loading?(f(),T(c,{key:1,class:"empty-content",name:e.t("contacts","Loading team…")},{icon:S(()=>[E(d,{size:20})]),_:1},8,["name"])):s.userGroup?(f(),T(u,{key:2,"user-group":s.userGroup},null,8,["user-group"])):(f(),T(h,{key:3,circle:s.circle},null,8,["circle"]))]),_:1})}const Y8=tt(G8,[["render",F8],["__scopeId","data-v-62e499e6"]]);function X8(e){e=structuredClone(e);const o=e.length,r=0;for(let i=-3;i<=3;i++)for(let a=-3;a<=3;a++)e[3+i][3+a]=r,e[3+i][o-4+a]=r,e[o-4+i][3+a]=r;for(let i=0;i<8;i++)e[7][i]=e[i][7]=e[7][o-i-1]=e[i][o-8]=e[o-8][i]=e[o-1-i][7]=r;return e}function j8(e,o,r){e=structuredClone(e);const i=e.length,a=Math.ceil((i*o/100+i%2)/2)*2-i%2,s=e[0]?.length??0,l=Math.ceil((s*r/100+s%2)/2)*2-s%2,c=Math.round((i-a)/2),d=Math.round((s-l)/2);for(let u=c;u<c+a;u+=1)for(let h=d;h<d+l;h+=1)e[u][h]=0;return e}const W8=new TextEncoder,q8=new TextDecoder;function Fl(e,o){let r,i;if(typeof e=="string"||typeof e=="number")r=`${e}`,i=W8.encode(r);else if(Array.isArray(e))i=new Uint8Array(e),r=q8.decode(e);else throw new Error("Bad data: "+typeof e);if(/^[0-9]+$/.test(r)){if(i.byteLength>7089)throw new Error("Too much data");return K8(r)}if(/^[0-9A-Z \$%\*\+\.\/\:\-]+$/.test(r)){if(i.byteLength>4296)throw new Error("Too much data");return J8(r)}if(o&&/^https?:/i.test(r))return Q8(r);if(i.byteLength>2953)throw new Error("Too much data");return Z8(new Uint8Array(i))}function cn(e,o,r){for(let i=1<<o-1;i;i>>>=1)e.push(i&r?1:0)}function Z8(e){const o=e.byteLength,r=[];for(let s=0;s<o;s++)cn(r,8,e[s]);const i={};let a=[0,1,0,0];if(cn(a,16,o),i.data10=i.data27=a.concat(r),o<256){let s=[0,1,0,0];cn(s,8,o),i.data1=s.concat(r)}return i}const Rh=(function(e){const o={};for(let r=0;r<e.length;r++)o[e[r]]=r;return o})("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:");function J8(e){const o=e.length,r=[];for(let s=0;s<o;s+=2){let l=6,c=Rh[e[s]];e[s+1]&&(l=11,c=c*45+Rh[e[s+1]]),cn(r,l,c)}const i={};let a=[0,0,1,0];if(cn(a,13,o),i.data27=a.concat(r),o<2048){let s=[0,0,1,0];cn(s,11,o),i.data10=s.concat(r)}if(o<512){let s=[0,0,1,0];cn(s,9,o),i.data1=s.concat(r)}return i}function K8(e){const o=e.length,r=[];for(let s=0;s<o;s+=3){const l=e.substr(s,3),c=Math.ceil(l.length*10/3);cn(r,c,parseInt(l,10))}const i={};let a=[0,0,0,1];if(cn(a,14,o),i.data27=a.concat(r),o<4096){let s=[0,0,0,1];cn(s,12,o),i.data10=s.concat(r)}if(o<1024){let s=[0,0,0,1];cn(s,10,o),i.data1=s.concat(r)}return i}function Q8(e){const o=e.indexOf("/",8)+1||e.length,r=Fl(e.slice(0,o).toUpperCase(),!1);if(o>=e.length)return r;const i=Fl(e.slice(o),!1);return r.data27=r.data27.concat(i.data27),r.data10&&i.data10&&(r.data10=r.data10.concat(i.data10)),r.data1&&i.data1&&(r.data1=r.data1.concat(i.data1)),r}function tA(e,o){const r=e.length,i=new Array(r+o);for(let s=0;s<r;s++)i[s]=e[s];for(let s=r;s<r+o;s++)i[s]=0;const a=Z1(o);for(let s=0;s<r;s++){if(!i[s])continue;const l=q1(i[s]);for(let c=0;c<=o;c++)i[s+c]=i[s+c]^Yl(a[c]+l)}return new Uint8Array(i.slice(r))}const eA=285,$a=[1],W1=[];for(let e=1;e<256;e++){let o=$a[e-1]<<1;o>255&&(o^=eA),$a[e]=o}for(let e=0;e<255;e++)W1[$a[e]]=e;function Yl(e){return $a[(e%255+255)%255]}function q1(e){if(e<1||e>255)throw Error(`Bad log(${e})`);return W1[e]}const tl=[[0],[0,0],[0,25,1]];function Z1(e){if(tl[e])return tl[e];const o=Z1(e-1),r=[];r[0]=o[0];for(let i=1;i<=e;i++)r[i]=q1(Yl(o[i])^Yl(o[i-1]+e-1));return tl[e]=r,r}function nA(e){const o=(e<<2)+17;return Array(o).fill(null).map(()=>Array(o).fill(0))}function oA(e){const o=e.length;for(let r=-3;r<=3;r++)for(let i=-3;i<=3;i++){const a=Math.max(r,i),s=Math.min(r,i),l=a==2&&s>=-2||s==-2&&a<=2?128:129;e[3+r][3+i]=l,e[3+r][o-4+i]=l,e[o-4+r][3+i]=l}for(let r=0;r<8;r++)e[7][r]=e[r][7]=e[7][o-r-1]=e[r][o-8]=e[o-8][r]=e[o-1-r][7]=128}function rA(e){const o=e.length;if(o>21){const i=o-13;let a=Math.round(i/Math.ceil(i/28));a%2&&a++;const s=[];for(let l=i+6;l>10;l-=a)s.unshift(l);s.unshift(6);for(var r=0;r<s.length;r++)for(let l=0;l<s.length;l++){const c=s[r],d=s[l];if(!e[c][d])for(let u=-2;u<=2;u++)for(let h=-2;h<=2;h++){const p=Math.max(u,h),m=Math.min(u,h),g=p==1&&m>=-1||m==-1&&p<=1?128:129;e[c+u][d+h]=g}}}for(var r=8;r<o-8;r++)e[6][r]=e[r][6]=r%2?128:129}function iA(e){const o=e.length;for(var r=0;r<8;r++)r!=6&&(e[8][r]=e[r][8]=128),e[8][o-1-r]=128,e[o-1-r][8]=128;if(e[8][8]=128,e[o-8][8]=129,!(o<45))for(var r=o-11;r<o-8;r++)for(let a=0;a<6;a++)e[r][a]=e[a][r]=128}const Ph=(function(){const e=Array(32),o=Array(40),r=1335,i=7973,a=21522;for(let l=0;l<32;l++){let c=l<<10;for(let d=5;d>0;d--)c>>>9+d&&(c^=r<<d-1);e[l]=(c|l<<10)^a}for(let l=7;l<=40;l++){let c=l<<12;for(let d=6;d>0;d--)c>>>11+d&&(c^=i<<d-1);o[l]=c|l<<12}const s={L:1,M:0,Q:3,H:2};return function(l,c,d){const u=l.length,h=e[s[c]<<3|d];function p(C){return h>>C&1?129:128}for(var m=0;m<8;m++)l[8][u-1-m]=p(m),m<6&&(l[m][8]=p(m));for(var m=8;m<15;m++)l[u-15+m][8]=p(m),m>8&&(l[8][14-m]=p(m));l[7][8]=p(6),l[8][8]=p(7),l[8][7]=p(8);const g=o[(u-17)/4];if(!g)return;function _(C){return g>>C&1?129:128}for(var m=0;m<6;m++)for(let M=0;M<3;M++)l[u-11+M][m]=l[m][u-11+M]=_(m*3+M)}})(),$h=(function(){const e=[(o,r)=>(o+r)%2==0,(o,r)=>o%2==0,(o,r)=>r%3==0,(o,r)=>(o+r)%3==0,(o,r)=>(Math.floor(o/2)+Math.floor(r/3))%2==0,(o,r)=>o*r%2+o*r%3==0,(o,r)=>(o*r%2+o*r%3)%2==0,(o,r)=>(o*r%3+(o+r)%2)%2==0];return function(o,r,i){const a=o.length;let s,l,c=-1;s=l=a-1;const d=e[i];let u=r.blocks[r.blocks.length-1].length;for(var h=0;h<u;h++)for(var p=0;p<r.blocks.length;p++)r.blocks[p].length<=h||m(r.blocks[p][h]);u=r.ec_len;for(var h=0;h<u;h++)for(var p=0;p<r.ec.length;p++)m(r.ec[p][h]);if(l>-1)do o[s][l]=d(s,l)?1:0;while(g());function m(_){for(let C=128;C;C>>=1){let M=!!(C&_);d(s,l)&&(M=!M),o[s][l]=M?1:0,g()}}function g(){do if(l%2^+(l<6)?c<0&&s==0||c>0&&s==a-1?(l--,c=-c):(l++,s+=c):l--,l==6&&l--,l<0)return!1;while(o[s][l]&240);return!0}}})();function aA(e){const o=e.length;let r=0;for(var i=0;i<o;i++){for(var a=e[i][0]&1,s=1,l=1;l<o;l++){var c=e[i][l]&1;if(c==a){s++;continue}s>=5&&(r+=s-2),a=c,s=1}s>=5&&(r+=s-2)}for(var l=0;l<o;l++){for(var a=e[0][l]&1,s=1,i=1;i<o;i++){var c=e[i][l]&1;if(c==a){s++;continue}s>=5&&(r+=s-2),a=c,s=1}s>=5&&(r+=s-2)}for(var i=0;i<o-1;i++)for(var l=0;l<o-1;l++){const g=e[i][l]+e[i][l+1]+e[i+1][l]+e[i+1][l+1]&7;(g==0||g==4)&&(r+=3)}function d(p){return e[i][l+p]&1}function u(p){return e[i+p][l]&1}for(var i=0;i<o;i++)for(var l=0;l<o;l++)l<o-6&&d(0)&&!d(1)&&d(2)&&d(3)&&d(4)&&!d(5)&&d(6)&&(l>=4&&!(d(-4)||d(-3)||d(-2)||d(-1))&&(r+=40),l<o-10&&!(d(7)||d(8)||d(9)||d(10))&&(r+=40)),i<o-6&&u(0)&&!u(1)&&u(2)&&u(3)&&u(4)&&!u(5)&&u(6)&&(i>=4&&!(u(-4)||u(-3)||u(-2)||u(-1))&&(r+=40),i<o-10&&!(u(7)||u(8)||u(9)||u(10))&&(r+=40));let h=0;for(var i=0;i<o;i++)for(var l=0;l<o;l++)e[i][l]&1&&h++;return r+=10*Math.floor(Math.abs(10-20*h/(o*o))),r}function sA(e){const o=nA(e.version);oA(o),rA(o),iA(o);let r=1/0,i=0;for(let a=0;a<8;a++){$h(o,e,a),Ph(o,e.ec_level,a);const s=aA(o);s<r&&(r=s,i=a)}i!==7&&($h(o,e,i),Ph(o,e.ec_level,i));for(let a=0;a<o.length;a++){const s=o[a];for(let l=0;l<s.length;l++)s[l]=s[l]&1}return o}const J1=["L","M","Q","H"];function lA(e,o){let r=1,i;for(e.data1?i=Math.ceil(e.data1.length/8):r=10;r<10;r++){let a=nl[r][o];if(a.data_len>=i)return el(a)}for(e.data10?i=Math.ceil(e.data10.length/8):r=27;r<27;r++){let a=nl[r][o];if(a.data_len>=i)return el(a)}for(i=Math.ceil(e.data27.length/8);r<41;r++){let a=nl[r][o];if(a.data_len>=i)return el(a)}throw new Error("Too much data")}function cA(e,o){const r=new Uint8ClampedArray(o.data_len);let i;o.version<10?i=e.data1:o.version<27?i=e.data10:i=e.data27;const a=i.length;for(let c=0;c<a;c+=8){let d=0;for(let u=0;u<8;u++)d=d<<1|(i[c+u]?1:0);r[c/8]=d}let s=236;for(let c=Math.ceil((a+4)/8);c<r.length;c++)r[c]=s,s=s==236?17:236;let l=0;return o.blocks=o.blocks.map(c=>{const d=r.slice(l,l+c);return l+=c,o.ec.push(tA(d,o.ec_len)),d}),o}function dA(e,o,r){o=J1.includes(o)?o:"M";const i=Fl(e,r),a=cA(i,lA(i,o));return sA(a)}function el(e){return{...e,blocks:[...e.blocks],ec:[]}}const uA=[[],[26,7,1,10,1,13,1,17,1],[44,10,1,16,1,22,1,28,1],[70,15,1,26,1,36,2,44,2],[100,20,1,36,2,52,2,64,4],[134,26,1,48,2,72,4,88,4],[172,36,2,64,4,96,4,112,4],[196,40,2,72,4,108,6,130,5],[242,48,2,88,4,132,6,156,6],[292,60,2,110,5,160,8,192,8],[346,72,4,130,5,192,8,224,8],[404,80,4,150,5,224,8,264,11],[466,96,4,176,8,260,10,308,11],[532,104,4,198,9,288,12,352,16],[581,120,4,216,9,320,16,384,16],[655,132,6,240,10,360,12,432,18],[733,144,6,280,10,408,17,480,16],[815,168,6,308,11,448,16,532,19],[901,180,6,338,13,504,18,588,21],[991,196,7,364,14,546,21,650,25],[1085,224,8,416,16,600,20,700,25],[1156,224,8,442,17,644,23,750,25],[1258,252,9,476,17,690,23,816,34],[1364,270,9,504,18,750,25,900,30],[1474,300,10,560,20,810,27,960,32],[1588,312,12,588,21,870,29,1050,35],[1706,336,12,644,23,952,34,1110,37],[1828,360,12,700,25,1020,34,1200,40],[1921,390,13,728,26,1050,35,1260,42],[2051,420,14,784,28,1140,38,1350,45],[2185,450,15,812,29,1200,40,1440,48],[2323,480,16,868,31,1290,43,1530,51],[2465,510,17,924,33,1350,45,1620,54],[2611,540,18,980,35,1440,48,1710,57],[2761,570,19,1036,37,1530,51,1800,60],[2876,570,19,1064,38,1590,53,1890,63],[3034,600,20,1120,40,1680,56,1980,66],[3196,630,21,1204,43,1770,59,2100,70],[3362,660,22,1260,45,1860,62,2220,74],[3532,720,24,1316,47,1950,65,2310,77],[3706,750,25,1372,49,2040,68,2430,81]],nl=uA.map((e,o)=>{if(!o)return Object.create(null);const r=Object.create(null);for(let i=1;i<8;i+=2){const a=e[0]-e[i],s=e[i+1],l=J1[i/2|0],c={version:o,ec_level:l,data_len:a,ec_len:e[i]/s,blocks:[],ec:[]};for(let d=s,u=a;d>0;d--){const h=u/d|0;c.blocks.push(h),u-=h}r[l]=c}return r});var ol={exports:{}},Vh,Bh;function hA(){return Bh||(Bh=1,Vh={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),Vh}var rl={exports:{}},Uh,Hh;function pA(){return Hh||(Hh=1,Uh=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")}),Uh}var zh;function fA(){if(zh)return rl.exports;zh=1;var e=pA(),o=Array.prototype.concat,r=Array.prototype.slice,i=rl.exports=function(a){for(var s=[],l=0,c=a.length;l<c;l++){var d=a[l];e(d)?s=o.call(s,r.call(d)):s.push(d)}return s};return i.wrap=function(a){return function(){return a(i(arguments))}},rl.exports}var Gh;function mA(){if(Gh)return ol.exports;Gh=1;var e=hA(),o=fA(),r=Object.hasOwnProperty,i=Object.create(null);for(var a in e)r.call(e,a)&&(i[e[a]]=a);var s=ol.exports={to:{},get:{}};s.get=function(d){var u=d.substring(0,3).toLowerCase(),h,p;switch(u){case"hsl":h=s.get.hsl(d),p="hsl";break;case"hwb":h=s.get.hwb(d),p="hwb";break;default:h=s.get.rgb(d),p="rgb";break}return h?{model:p,value:h}:null},s.get.rgb=function(d){if(!d)return null;var u=/^#([a-f0-9]{3,4})$/i,h=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,p=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,m=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,g=/^(\w+)$/,_=[0,0,0,1],C,M,N;if(C=d.match(h)){for(N=C[2],C=C[1],M=0;M<3;M++){var P=M*2;_[M]=parseInt(C.slice(P,P+2),16)}N&&(_[3]=parseInt(N,16)/255)}else if(C=d.match(u)){for(C=C[1],N=C[3],M=0;M<3;M++)_[M]=parseInt(C[M]+C[M],16);N&&(_[3]=parseInt(N+N,16)/255)}else if(C=d.match(p)){for(M=0;M<3;M++)_[M]=parseInt(C[M+1],0);C[4]&&(C[5]?_[3]=parseFloat(C[4])*.01:_[3]=parseFloat(C[4]))}else if(C=d.match(m)){for(M=0;M<3;M++)_[M]=Math.round(parseFloat(C[M+1])*2.55);C[4]&&(C[5]?_[3]=parseFloat(C[4])*.01:_[3]=parseFloat(C[4]))}else return(C=d.match(g))?C[1]==="transparent"?[0,0,0,0]:r.call(e,C[1])?(_=e[C[1]],_[3]=1,_):null:null;for(M=0;M<3;M++)_[M]=l(_[M],0,255);return _[3]=l(_[3],0,1),_},s.get.hsl=function(d){if(!d)return null;var u=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,h=d.match(u);if(h){var p=parseFloat(h[4]),m=(parseFloat(h[1])%360+360)%360,g=l(parseFloat(h[2]),0,100),_=l(parseFloat(h[3]),0,100),C=l(isNaN(p)?1:p,0,1);return[m,g,_,C]}return null},s.get.hwb=function(d){if(!d)return null;var u=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,h=d.match(u);if(h){var p=parseFloat(h[4]),m=(parseFloat(h[1])%360+360)%360,g=l(parseFloat(h[2]),0,100),_=l(parseFloat(h[3]),0,100),C=l(isNaN(p)?1:p,0,1);return[m,g,_,C]}return null},s.to.hex=function(){var d=o(arguments);return"#"+c(d[0])+c(d[1])+c(d[2])+(d[3]<1?c(Math.round(d[3]*255)):"")},s.to.rgb=function(){var d=o(arguments);return d.length<4||d[3]===1?"rgb("+Math.round(d[0])+", "+Math.round(d[1])+", "+Math.round(d[2])+")":"rgba("+Math.round(d[0])+", "+Math.round(d[1])+", "+Math.round(d[2])+", "+d[3]+")"},s.to.rgb.percent=function(){var d=o(arguments),u=Math.round(d[0]/255*100),h=Math.round(d[1]/255*100),p=Math.round(d[2]/255*100);return d.length<4||d[3]===1?"rgb("+u+"%, "+h+"%, "+p+"%)":"rgba("+u+"%, "+h+"%, "+p+"%, "+d[3]+")"},s.to.hsl=function(){var d=o(arguments);return d.length<4||d[3]===1?"hsl("+d[0]+", "+d[1]+"%, "+d[2]+"%)":"hsla("+d[0]+", "+d[1]+"%, "+d[2]+"%, "+d[3]+")"},s.to.hwb=function(){var d=o(arguments),u="";return d.length>=4&&d[3]!==1&&(u=", "+d[3]),"hwb("+d[0]+", "+d[1]+"%, "+d[2]+"%"+u+")"},s.to.keyword=function(d){return i[d.slice(0,3)]};function l(d,u,h){return Math.min(Math.max(u,d),h)}function c(d){var u=Math.round(d).toString(16).toUpperCase();return u.length<2?"0"+u:u}return ol.exports}var gA=mA();const Fh=Ka(gA);function yA(e){return{...(e?.type??"png")==="png"?kA:SA,...e}}function uo(e){return typeof e=="string"?Fh.to.hex(Fh.get.rgb(e)):`#${(e>>>8).toString(16).padStart(6,"0")}`}const Sd=(e,o)=>["M",e,o],xd=()=>["z"],Qe=(e,o,r,i=0)=>e>0?["a",e,e,0,0,i,o,r]:[],Or=e=>["v",e],Lr=e=>["h",e];function vA(e,o=0,r=0,i=0){const a=e.length*o+r*2;let s=7;const l=[[0,0],[1,0],[0,1]],c=[];for(const d of l){const[u,h]=d.map(p=>p==0?1:-1);for(const p of[0,1,2]){let m=a*d[0]+u*(r+o*p),g=a*d[1]+h*(r+o*p);const _=u*(o*(s-2*p)-2*i),C=h*(o*(s-2*p)-2*i);let M=[Sd(m,g+i*h),Or(C),Qe(i,i*u,i*h,d[1]|d[0]),Lr(_),Qe(i,i*u,-i*h,d[1]|d[0]),Or(-C),Qe(i,-i*u,-i*h,d[1]|d[0]),Lr(-_),Qe(i,-i*u,i*h,d[1]|d[0]),xd()];c.push(...M.flat())}}return c.join(" ")}function Yi(e,o,r){return o>=0&&o<e.length&&r>=0&&r<(e[0]?.length??0)&&!!e[o][r]}function bA(e,o,r){const i=Yi(e,o-1,r),a=Yi(e,o+1,r),s=Yi(e,o,r-1),l=Yi(e,o,r+1);return[!i&&!s,!a&&!s,!a&&!l,!i&&!l]}function _A(e,o,r=0,i=0,a="individual"){let s=[];for(let l=0;l<e.length;l++){const c=e[l];for(let d=0;d<c.length;d++)if(c[d]){const u=l*o+r,h=d*o+r;let p,m,g,_;if(a==="merge"){const[M,N,P,V]=bA(e,l,d);p=M?i:0,m=N?i:0,g=P?i:0,_=V?i:0}else p=m=g=_=i;const C=[Sd(u,h+p),Or(o-p-_),Qe(_,_,_),Lr(o-_-g),Qe(g,g,-g),Or(-(o-g-m)),Qe(m,-m,-m),Lr(-(o-m-p)),Qe(p,-p,p),xd()];s.push(...C.flat())}}return s.join(" ")}const K1=[[0,0],[1,0],[0,1]],Q1=7;function tm(e,o,r){const i=o/2;switch(e){case"square":return[0,0,0,0];case"rounded":return[r,r,r,r];case"circle":return[i,i,i,i];case"drop":return[i,0,i,i]}}function em(e,o,r,i,a,s,l){const[c,d,u,h]=l;return[Sd(e,o+h*a),Or(a*(r-h-c)),Qe(c,c*i,c*a,s),Lr(i*(r-c-d)),Qe(d,d*i,-d*a,s),Or(-a*(r-d-u)),Qe(u,-u*i,-u*a,s),Lr(-i*(r-u-h)),Qe(h,-h*i,h*a,s),xd()].flat()}function CA(e,o,r,i,a){const s=e.length*o+r*2,l=[];for(const c of K1){const[d,u]=c.map(p=>p===0?1:-1),h=c[1]|c[0];for(const p of[0,1]){const m=o*(Q1-2*p),g=s*c[0]+d*(r+o*p),_=s*c[1]+u*(r+o*p),C=tm(a,m,i);l.push(...em(g,_,m,d,u,h,C))}}return l.join(" ")}function wA(e,o,r,i,a){const s=e.length*o+r*2,l=[];for(const c of K1){const[d,u]=c.map(C=>C===0?1:-1),h=c[1]|c[0],p=o*(Q1-4),m=s*c[0]+d*(r+o*2),g=s*c[1]+u*(r+o*2),_=tm(a,p,i);l.push(...em(m,g,p,d,u,h,_))}return l.join(" ")}const nm={type:"png",parse_url:!1,ec_level:"M",logo:void 0,logoWidth:20,logoHeight:20,bgColor:4294967295,color:255},kA={...nm,margin:1,size:5},SA={...nm,margin:1,size:0};function xA(e,o,r,i){if(!e.labelText)return null;const a=e.labelStyle??"below",s=(e.labelFontSize??5)*i,l=e.labelFontFamily??"sans-serif",c=uo(e.color??255),d=uo(e.bgColor??4294967295),u=e.labelColor?uo(e.labelColor):a==="below"?c:d,h=e.labelBgColor?uo(e.labelBgColor):c;if(a==="below"){const g=s*2.5;return{totalWidth:o,totalHeight:o+g,qrSize:o,label:{text:e.labelText,x:o/2,y:o+g/2,width:o,height:g,fontSize:s,fontFamily:l,textColor:u,bgColor:null,borderRadius:0}}}if(a==="pill"){const g=s*2.2,_=e.labelText.length*s*.7,C=Math.min(Math.max(_+s*2,o*.3),o*.95),M=g+s*.6;return{totalWidth:o,totalHeight:o+M,qrSize:o,label:{text:e.labelText,x:o/2,y:o+M/2,width:C,height:g,fontSize:s,fontFamily:l,textColor:u,bgColor:h,borderRadius:g/2}}}const p=s*2.2,m=p+s*.4;return{totalWidth:o,totalHeight:o+m,qrSize:o,label:{text:e.labelText,x:o/2,y:o+m/2,width:o,height:p,fontSize:s,fontFamily:l,textColor:u,bgColor:h,borderRadius:0}}}const om="3.7.7",AA=om,Vr=typeof en=="function",Yh=typeof TextDecoder=="function"?new TextDecoder:void 0,Xh=typeof TextEncoder=="function"?new TextEncoder:void 0,EA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ti=Array.prototype.slice.call(EA),Xi=(e=>{let o={};return e.forEach((r,i)=>o[r]=i),o})(ti),NA=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,xe=String.fromCharCode.bind(String),jh=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),rm=e=>e.replace(/=/g,"").replace(/[+\/]/g,o=>o=="+"?"-":"_"),im=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),am=e=>{let o,r,i,a,s="";const l=e.length%3;for(let c=0;c<e.length;){if((r=e.charCodeAt(c++))>255||(i=e.charCodeAt(c++))>255||(a=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");o=r<<16|i<<8|a,s+=ti[o>>18&63]+ti[o>>12&63]+ti[o>>6&63]+ti[o&63]}return l?s.slice(0,l-3)+"===".substring(l):s},Ad=typeof btoa=="function"?e=>btoa(e):Vr?e=>en.from(e,"binary").toString("base64"):am,Xl=Vr?e=>en.from(e).toString("base64"):e=>{let o=[];for(let r=0,i=e.length;r<i;r+=4096)o.push(xe.apply(null,e.subarray(r,r+4096)));return Ad(o.join(""))},fa=(e,o=!1)=>o?rm(Xl(e)):Xl(e),TA=e=>{if(e.length<2){var o=e.charCodeAt(0);return o<128?e:o<2048?xe(192|o>>>6)+xe(128|o&63):xe(224|o>>>12&15)+xe(128|o>>>6&63)+xe(128|o&63)}else{var o=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return xe(240|o>>>18&7)+xe(128|o>>>12&63)+xe(128|o>>>6&63)+xe(128|o&63)}},MA=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,sm=e=>e.replace(MA,TA),Wh=Vr?e=>en.from(e,"utf8").toString("base64"):Xh?e=>Xl(Xh.encode(e)):e=>Ad(sm(e)),pr=(e,o=!1)=>o?rm(Wh(e)):Wh(e),qh=e=>pr(e,!0),IA=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,OA=e=>{switch(e.length){case 4:var o=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),r=o-65536;return xe((r>>>10)+55296)+xe((r&1023)+56320);case 3:return xe((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return xe((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},lm=e=>e.replace(IA,OA),cm=e=>{if(e=e.replace(/\s+/g,""),!NA.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let o,r="",i,a;for(let s=0;s<e.length;)o=Xi[e.charAt(s++)]<<18|Xi[e.charAt(s++)]<<12|(i=Xi[e.charAt(s++)])<<6|(a=Xi[e.charAt(s++)]),r+=i===64?xe(o>>16&255):a===64?xe(o>>16&255,o>>8&255):xe(o>>16&255,o>>8&255,o&255);return r},Ed=typeof atob=="function"?e=>atob(im(e)):Vr?e=>en.from(e,"base64").toString("binary"):cm,dm=Vr?e=>jh(en.from(e,"base64")):e=>jh(Ed(e).split("").map(o=>o.charCodeAt(0))),um=e=>dm(hm(e)),LA=Vr?e=>en.from(e,"base64").toString("utf8"):Yh?e=>Yh.decode(dm(e)):e=>lm(Ed(e)),hm=e=>im(e.replace(/[-_]/g,o=>o=="-"?"+":"/")),jl=e=>LA(hm(e)),DA=e=>{if(typeof e!="string")return!1;const o=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(o)||!/[^\s0-9a-zA-Z\-_]/.test(o)},pm=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),fm=function(){const e=(o,r)=>Object.defineProperty(String.prototype,o,pm(r));e("fromBase64",function(){return jl(this)}),e("toBase64",function(o){return pr(this,o)}),e("toBase64URI",function(){return pr(this,!0)}),e("toBase64URL",function(){return pr(this,!0)}),e("toUint8Array",function(){return um(this)})},mm=function(){const e=(o,r)=>Object.defineProperty(Uint8Array.prototype,o,pm(r));e("toBase64",function(o){return fa(this,o)}),e("toBase64URI",function(){return fa(this,!0)}),e("toBase64URL",function(){return fa(this,!0)})},RA=()=>{fm(),mm()},PA={version:om,VERSION:AA,atob:Ed,atobPolyfill:cm,btoa:Ad,btoaPolyfill:am,fromBase64:jl,toBase64:pr,encode:pr,encodeURI:qh,encodeURL:qh,utob:sm,btou:lm,decode:jl,isValid:DA,fromUint8Array:fa,toUint8Array:um,extendString:fm,extendUint8Array:mm,extendBuiltins:RA};function $A(e,o={}){const r=yA({...o,type:"svg"});let i=dA(e,r.ec_level,r.parse_url);i=X8(i),r.logo&&r.logoWidth&&r.logoHeight&&!r.noExcavate&&(i=j8(i,r.logoWidth,r.logoHeight));const a=r.size||9,s=r.margin*a,l=i.length*a+2*s,c=xA(r,l,s,a);return BA({matrix:i,...r,labelLayout:c})}const VA=new TextEncoder;function BA({matrix:e,margin:o,size:r,logo:i,logoWidth:a,logoHeight:s,color:l,bgColor:c,imageWidth:d,imageHeight:u,borderRadius:h,cornerMode:p,finderOuterShape:m,finderInnerShape:g,finderColor:_,labelLayout:C}){const M=r||9,N=e.length*M,P=o*M,V=N+2*P,K=C?.totalWidth??V,X=C?.totalHeight??V,rt=d?` width="${d}"`:"",pt=u?` height="${u}"`:"",it='<?xml version="1.0" encoding="utf-8"?>',et=`<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink"${rt}${pt} viewBox="0 0 ${K} ${X}">`,ut=UA(e,{color:l,bgColor:c,margin:o,blockSize:M,borderRadius:h,cornerMode:p,finderOuterShape:m,finderInnerShape:g,finderColor:_},K,X),L="</svg>",q=i?GA(i,P,N,a,s):"",H=C?HA(C):"";return VA.encode(it+et+ut+H+q+L)}function UA(e,o,r,i){const a=o.margin*o.blockSize,s=_A(e,o.blockSize,a,o.borderRadius,o.cornerMode);let l=`<rect width="${r}" height="${i}" fill="${uo(o.bgColor)}"></rect>`;if(o.finderOuterShape||o.finderInnerShape||o.finderColor){const c=uo(o.finderColor??o.color),d=o.finderOuterShape??"rounded",u=o.finderInnerShape??"rounded",h=CA(e,o.blockSize,a,o.borderRadius,d),p=wA(e,o.blockSize,a,o.borderRadius,u);l+=`<path shape-rendering="geometricPrecision" d="${h}" fill-rule="evenodd" fill="${c}"/>`,l+=`<path shape-rendering="geometricPrecision" d="${p}" fill="${c}"/>`}else{const c=vA(e,o.blockSize,a,o.borderRadius);l+=`<path shape-rendering="geometricPrecision" d="${c}" fill-rule="evenodd" fill="${uo(o.color)}"/>`}return l+=`<path shape-rendering="geometricPrecision" d="${s}" fill="${uo(o.color)}"/>`,l}function HA(e){const{label:o}=e,r=zA(o.text);let i="";return o.bgColor&&(o.borderRadius>0?i+=`<rect x="${o.x-o.width/2}" y="${o.y-o.height/2}" width="${o.width}" height="${o.height}" rx="${o.borderRadius}" ry="${o.borderRadius}" fill="${o.bgColor}"/>`:i+=`<rect x="${o.x-o.width/2}" y="${o.y-o.height/2}" width="${o.width}" height="${o.height}" fill="${o.bgColor}"/>`),i+=`<text x="${o.x}" y="${o.y}" text-anchor="middle" dominant-baseline="central" font-family="${o.fontFamily}" font-size="${o.fontSize}" font-weight="bold" fill="${o.textColor}">${r}</text>`,i}function zA(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function GA(e,o,r,i,a){const s=`data:image/png;base64,${PA.fromUint8Array(new Uint8Array(e))}`,l=i/100*r,c=a/100*r;return`<image width="${l}" height="${c}" xlink:href="${s}" x="${o+(r-l)/2}" y="${o+(r-c)/2}"></image>`}const FA={name:"CakeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},YA=["aria-hidden","aria-label"],XA=["fill","width","height"],jA={d:"M11.5,0.5C12,0.75 13,2.4 13,3.5C13,4.6 12.33,5 11.5,5C10.67,5 10,4.85 10,3.75C10,2.65 11,2 11.5,0.5M18.5,9C21,9 23,11 23,13.5C23,15.06 22.21,16.43 21,17.24V23H12L3,23V17.24C1.79,16.43 1,15.06 1,13.5C1,11 3,9 5.5,9H10V6H13V9H18.5M12,16A2.5,2.5 0 0,0 14.5,13.5H16A2.5,2.5 0 0,0 18.5,16A2.5,2.5 0 0,0 21,13.5A2.5,2.5 0 0,0 18.5,11H5.5A2.5,2.5 0 0,0 3,13.5A2.5,2.5 0 0,0 5.5,16A2.5,2.5 0 0,0 8,13.5H9.5A2.5,2.5 0 0,0 12,16Z"},WA={key:0};function qA(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon cake-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",jA,[r.title?(f(),k("title",WA,O(r.title),1)):R("",!0)])],8,XA))],16,YA)}const ZA=tt(FA,[["render",qA]]),JA={name:"EyeCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},KA=["aria-hidden","aria-label"],QA=["fill","width","height"],tE={d:"M12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,11A1,1 0 0,1 13,12A1,1 0 0,1 12,13A1,1 0 0,1 11,12A1,1 0 0,1 12,11M12,8C14.63,8 17,9.57 18,12C16.62,15.31 12.81,16.88 9.5,15.5C7.92,14.84 6.66,13.58 6,12C7,9.57 9.37,8 12,8M12,9.5A2.5,2.5 0 0,0 9.5,12A2.5,2.5 0 0,0 12,14.5A2.5,2.5 0 0,0 14.5,12A2.5,2.5 0 0,0 12,9.5"},eE={key:0};function nE(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon eye-circle-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",tE,[r.title?(f(),k("title",eE,O(r.title),1)):R("",!0)])],8,QA))],16,KA)}const oE=tt(JA,[["render",nE]]),rE={name:"FolderMultipleImageIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},iE=["aria-hidden","aria-label"],aE=["fill","width","height"],sE={d:"M7,15L11.5,9L15,13.5L17.5,10.5L21,15M22,4H14L12,2H6A2,2 0 0,0 4,4V16A2,2 0 0,0 6,18H22A2,2 0 0,0 24,16V6A2,2 0 0,0 22,4M2,6H0V11H0V20A2,2 0 0,0 2,22H20V20H2V6Z"},lE={key:0};function cE(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon folder-multiple-image-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",sE,[r.title?(f(),k("title",lE,O(r.title),1)):R("",!0)])],8,aE))],16,iE)}const dE=tt(rE,[["render",cE]]),uE={name:"QrcodeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},hE=["aria-hidden","aria-label"],pE=["fill","width","height"],fE={d:"M3,11H5V13H3V11M11,5H13V9H11V5M9,11H13V15H11V13H9V11M15,11H17V13H19V11H21V13H19V15H21V19H19V21H17V19H13V21H11V17H15V15H17V13H15V11M19,19V15H17V19H19M15,3H21V9H15V3M17,5V7H19V5H17M3,3H9V9H3V3M5,5V7H7V5H5M3,15H9V21H3V15M5,17V19H7V17H5Z"},mE={key:0};function gE(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon qrcode-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",fE,[r.title?(f(),k("title",mE,O(r.title),1)):R("",!0)])],8,pE))],16,hE)}const yE=tt(uE,[["render",gE]]),vE={name:"TrayArrowDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},bE=["aria-hidden","aria-label"],_E=["fill","width","height"],CE={d:"M2 12H4V17H20V12H22V17C22 18.11 21.11 19 20 19H4C2.9 19 2 18.11 2 17V12M12 15L17.55 9.54L16.13 8.13L13 11.25V2H11V11.25L7.88 8.13L6.46 9.55L12 15Z"},wE={key:0};function kE(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon tray-arrow-down-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",CE,[r.title?(f(),k("title",wE,O(r.title),1)):R("",!0)])],8,_E))],16,bE)}const As=tt(vE,[["render",kE]]),SE={name:"ChevronLeftIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},xE=["aria-hidden","aria-label"],AE=["fill","width","height"],EE={d:"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"},NE={key:0};function TE(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon chevron-left-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",EE,[r.title?(f(),k("title",NE,O(r.title),1)):R("",!0)])],8,AE))],16,xE)}const ME=tt(SE,[["render",TE]]),IE={name:"DotsHorizontalIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},OE=["aria-hidden","aria-label"],LE=["fill","width","height"],DE={d:"M16,12A2,2 0 0,1 18,10A2,2 0 0,1 20,12A2,2 0 0,1 18,14A2,2 0 0,1 16,12M10,12A2,2 0 0,1 12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12M4,12A2,2 0 0,1 6,10A2,2 0 0,1 8,12A2,2 0 0,1 6,14A2,2 0 0,1 4,12Z"},RE={key:0};function PE(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon dots-horizontal-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",DE,[r.title?(f(),k("title",RE,O(r.title),1)):R("",!0)])],8,LE))],16,OE)}const $E=tt(IE,[["render",PE]]),VE={name:"ContactDetailsAddNewProp",components:{IconAdd:Rr,PropertyTitleIcon:n0,Actions:Co,ActionButton:xn,ChevronLeft:ME,DotsHorizontalIcon:$E},mixins:[e0],props:{contact:{type:cc,default:null},bus:{type:Object,required:!0}},data(){return{moreActionsOpen:!1}},computed:{properties(){return Cn.properties},propertiesOrder(){return Cn.fieldOrder},usedProperties(){return this.contact.jCal[1].map(e=>e[0])},availablePrimaryProperties(){return Object.keys(this.properties).filter(e=>this.properties[e].primary).map(e=>({id:e,name:this.properties[e].readableName,icon:this.properties[e].icon})).sort((e,o)=>this.propertiesOrder.indexOf(e.id)-this.propertiesOrder.indexOf(o.id))},availableSecondaryProperties(){return Object.keys(this.properties).filter(e=>!this.properties[e].primary).map(e=>({id:e,name:this.properties[e].readableName,icon:this.properties[e].icon})).sort((e,o)=>e.name.localeCompare(o.name))}},created(){this.bus.on("add-prop",this.addProp)},unmounted(){this.bus.off("add-prop",this.addProp)},methods:{async addProp(e){if(this.usedProperties.includes(e)&&!this.properties[e].multiple){this.bus.emit("focus-prop",e);return}if(e==="x-managersname"){const o=this.otherContacts(this.contact);o.length===1?(await this.contact.vCard.addPropertyWithValue(e,o[0].key),await this.$store.dispatch("updateContact",this.contact)):await this.contact.vCard.addPropertyWithValue(e,"")}else if(this.properties[e]&&this.properties[e].defaultjCal&&this.properties[e].defaultjCal[this.contact.version]){const o=this.properties[e].defaultjCal[this.contact.version],r=new Wa.Property([e,...o]);await this.contact.vCard.addProperty(r)}else{const o=this.properties[e].defaultValue;let r=o?o.value:"";Array.isArray(r)&&(r=[...r]);const i=await this.contact.vCard.addPropertyWithValue(e,r);o&&o.type&&i.setParameter("type",o.type)}this.moreActionsOpen=!1,this.bus.emit("focus-prop",e)}}},BE={class:"property__row"},UE={class:"property__value"};function HE(e,o,r,i,a,s){const l=w("IconAdd"),c=w("PropertyTitleIcon"),d=w("ActionButton"),u=w("DotsHorizontalIcon"),h=w("ChevronLeft"),p=w("Actions");return f(),k("div",BE,[o[3]||(o[3]=D("div",{class:"property__label"},null,-1)),D("div",UE,[E(p,{"menu-align":"right",event:"",variant:"secondary","menu-name":e.t("contacts","Add more info"),onClick:o[2]||(o[2]=ae(()=>{},["prevent"]))},{icon:S(()=>[E(l,{size:20})]),default:S(()=>[a.moreActionsOpen?R("",!0):(f(),k(_t,{key:0},[(f(!0),k(_t,null,jt(s.availablePrimaryProperties,m=>(f(),T(d,{key:m.id,class:"action--primary","close-after-click":!0,onClick:ae(g=>s.addProp(m.id),["prevent"])},{icon:S(()=>[E(c,{icon:m.icon},null,8,["icon"])]),default:S(()=>[Z(" "+O(m.name),1)]),_:2},1032,["onClick"]))),128)),E(d,{"close-after-click":!1,onClick:o[0]||(o[0]=m=>a.moreActionsOpen=!0)},{icon:S(()=>[E(u,{title:e.t("contacts","More fields"),size:20},null,8,["title"])]),default:S(()=>[Z(" "+O(e.t("contacts","More fields")),1)]),_:1})],64)),a.moreActionsOpen?(f(),k(_t,{key:1},[E(d,{"close-after-click":!1,onClick:o[1]||(o[1]=m=>a.moreActionsOpen=!1)},{icon:S(()=>[E(h,{title:e.t("contacts","More fields"),size:20},null,8,["title"]),Z(" "+O(e.t("contacts","More fields")),1)]),_:1}),(f(!0),k(_t,null,jt(s.availableSecondaryProperties,m=>(f(),T(d,{key:m.id,class:"action--primary","close-after-click":!0,onClick:ae(g=>s.addProp(m.id),["prevent"])},{icon:S(()=>[E(c,{icon:m.icon},null,8,["icon"])]),default:S(()=>[Z(" "+O(m.name),1)]),_:2},1032,["onClick"]))),128))],64)):R("",!0)]),_:1},8,["menu-name"])]),o[4]||(o[4]=D("div",{class:"property__actions"},null,-1))])}const zE=tt(VE,[["render",HE]]),GE={name:"CloudDownloadOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},FE=["aria-hidden","aria-label"],YE=["fill","width","height"],XE={d:"M6.5 20Q4.22 20 2.61 18.43 1 16.85 1 14.58 1 12.63 2.17 11.1 3.35 9.57 5.25 9.15 5.68 7.35 7.38 5.73 9.07 4.1 11 4.1 11.83 4.1 12.41 4.69 13 5.28 13 6.1V12.15L14.6 10.6L16 12L12 16L8 12L9.4 10.6L11 12.15V6.1Q9.1 6.45 8.05 7.94 7 9.43 7 11H6.5Q5.05 11 4.03 12.03 3 13.05 3 14.5 3 15.95 4.03 17 5.05 18 6.5 18H18.5Q19.55 18 20.27 17.27 21 16.55 21 15.5 21 14.45 20.27 13.73 19.55 13 18.5 13H17V11Q17 9.8 16.45 8.76 15.9 7.73 15 7V4.68Q16.85 5.55 17.93 7.26 19 9 19 11 20.73 11.2 21.86 12.5 23 13.78 23 15.5 23 17.38 21.69 18.69 20.38 20 18.5 20M12 11.05Z"},jE={key:0};function WE(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon cloud-download-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",XE,[r.title?(f(),k("title",jE,O(r.title),1)):R("",!0)])],8,YE))],16,FE)}const qE=tt(GE,[["render",WE]]),ZE={name:"ImageOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},JE=["aria-hidden","aria-label"],KE=["fill","width","height"],QE={d:"M19,19H5V5H19M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M13.96,12.29L11.21,15.83L9.25,13.47L6.5,17H17.5L13.96,12.29Z"},tN={key:0};function eN(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon image-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",QE,[r.title?(f(),k("title",tN,O(r.title),1)):R("",!0)])],8,KE))],16,JE)}const nN=tt(ZE,[["render",eN]]),oN={name:"UploadOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},rN=["aria-hidden","aria-label"],iN=["fill","width","height"],aN={d:"M9,10V16H15V10H19L12,3L5,10H9M12,5.8L14.2,8H13V14H11V8H9.8L12,5.8M19,18H5V20H19V18Z"},sN={key:0};function lN(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon upload-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",aN,[r.title?(f(),k("title",sN,O(r.title),1)):R("",!0)])],8,iN))],16,rN)}const gm=tt(oN,[["render",lN]]),cN=Yo("contacts","supportedNetworks"),dN={name:"ContactDetailsAvatar",components:{ActionButton:xn,ActionLink:ts,Actions:Co,Avatar:Wn,IconCloudDownload:qE,IconDownload:As,IconDelete:Sn,IconUpload:gm,IconFolder:yd,IconImage:nN,NcButton:he,VueCropper:P1,NcModal:qn},props:{contact:{type:Object,required:!0},isReadOnly:{type:Boolean,required:!0},reloadBus:{type:Object,required:!0}},data(){return{opened:!1,loading:!1,photoUrl:void 0,root:Ca(`dav/files/${br().uid}`),showCropper:!1,cropperOptions:{aspectRatio:1/1,viewMode:3,guides:!1,center:!1,highlight:!1,autoCropArea:1,dragMode:"move",minContainerWidth:100,minContainerHeight:100}}},computed:{supportedSocial(){const e=this.contact.vCard.getAllProperties("email"),o=this.contact.vCard.getAllProperties("x-socialprofile").map(s=>s.jCal[1].type.toString().toLowerCase()),r=this.contact.vCard.getAllProperties("impp").map(s=>s.jCal[1].type.toString().toLowerCase()),i=[].concat(o,r),a=cN.map(s=>s.toLowerCase());return e.length&&i.push("gravatar"),a.filter(s=>i.includes(s)).map(s=>this.capitalize(s))}},watch:{async contact(){await this.loadPhotoUrl()}},async mounted(){await this.loadPhotoUrl()},methods:{onLoad(...e){console.debug(...e)},async processPicture(e){const o=this.getMimetype(e);if(!o.startsWith("image/"))return bt(t("contacts","Please select a valid format")),!1;if(o==="image/svg"){const r=atob(e.toString("base64"));if(!await r0(r))throw new Error("Unsafe svg image",r)}return this.openCropper(e,o),!0},openCropper(e,o){const r=`data:${o};base64,${e.toString("base64")}`;this.$refs.cropper.replace(r),this.showCropper=!0},handleUploadedFile(e){if(e.target.files&&!this.loading){this.closeMenu();const o=e.target.files[0],r=new FileReader;r.onload=i=>{try{if(typeof i.target.result=="object"){const a=en.from(i.target.result,"binary");if(this.processPicture(a))return;throw new Error("Wrong image mimetype")}}catch(a){console.error(a),bt(t("contacts","Invalid image"))}finally{this.resetPicker()}},r.readAsArrayBuffer(o)}},resetPicker(){this.$refs.uploadInput.value="",this.loading=!1},capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},getMimetype(e){const o=[];e.slice(0,12).forEach(a=>{o.push(a.toString(16).padStart(2,"0"))});const r=o.join("").toUpperCase(),i=parseInt(window.OC.config.version.split(".")[0]);if(i>=31&&r.slice(0,8)==="52494646"&&r.slice(16,24)==="57454250")return"image/webp";if(i>=32&&r.slice(8,24)==="6674797061766966")return"image/avif";switch(r.slice(0,8)){case"89504E47":return"image/png";case"47494638":return"image/gif";case"3C3F786D":case"3C737667":return"image/svg+xml";case"FFD8FFDB":case"FFD8FFE0":case"FFD8FFE1":return"image/jpeg";default:return"application/octet-stream"}},async setPhoto(e,o){if(this.contact.photo&&this.contact.vCard.addPropertyWithValue("photo",""),this.contact.version==="3.0"){this.contact.photo=e;const r=this.contact.vCard.getFirstProperty("photo");r.setParameter("encoding","b"),o&&r.setParameter("type",o.split("/").pop())}else this.contact.photo=`data:${o};base64,${e}`;await this.loadPhotoUrl(),await this.reloadBus.emit("reload-avatar",this.contact.key),this.loading=!1},async loadPhotoUrl(){if(this.photoUrl=void 0,this.contact.photo){const e=await this.contact.getPhotoUrl();if(!e){console.warn("contact has an invalid photo");return}this.photoUrl=e}else this.contact.url&&(this.photoUrl=`${this.contact.url}?photo`)},saveAvatar(){this.showCropper=!1,this.loading=!0,this.$refs.cropper.getCroppedCanvas({minWidth:16,minHeight:16,maxWidth:512,maxHeight:512}).toBlob(async e=>{if(e===null){bt(t("contacts","Error cropping picture")),this.cancel();return}const o=new FileReader;o.readAsDataURL(e),o.onloadend=()=>{const r=o.result;this.setPhoto(r.split(",").pop(),e.type)}})},removePhoto(){this.contact.vCard.removeAllProperties("photo"),this.photoUrl=void 0,this.reloadBus.emit("delete-avatar",this.contact.key)},cancel(){this.showCropper=!1,this.loading=!1},selectFileInput(){this.loading||this.$refs.uploadInput.click()},async selectFilePicker(){if(!this.loading){this.closeMenu();const e=await ac(t("contacts","Pick an avatar")).setMimeTypeFilter(["image/png","image/jpeg","image/gif","image/x-xbitmap","image/bmp","image/svg+xml"]).addButton({label:t("calendar","Pick"),type:"primary",callback:o=>vc.debug("Picked avatar",{nodes:o})}).build().pick();if(e){this.loading=!0;try{const o=await oe.get(`${this.root}${e}`,{responseType:"arraybuffer"}),r=en.from(o.data,"binary");this.processPicture(r)}catch(o){bt(t("contacts","Error while processing the picture.")),console.error(o),this.loading=!1}finally{this.resetPicker()}}}},async getSocialAvatar(e){if(!this.loading){this.loading=!0;try{if((await oe.put(Fo("/apps/contacts/api/v1/social/avatar/{network}/{id}/{uid}",{network:e.toLowerCase(),id:this.contact.addressbook.id,uid:this.contact.uid})))?.status!==200)throw new URIError("Download of social profile avatar failed");await this.$store.dispatch("fetchFullContact",{contact:this.contact,forceReFetch:!0});const o=this.$store.getters.getContact(this.contact.key);await this.$emit("update-local-contact",o),await this.loadPhotoUrl(),await this.reloadBus.emit("reload-avatar",this.contact.key),ai(t("contacts","Avatar downloaded from social network"))}catch(o){o?.response?.status===304?o0(t("contacts","Avatar already up to date")):(bt(t("contacts","Avatar download failed")),console.debug(o))}}this.loading=!1},closeMenu(){this.opened=!1}}},uN={class:"contact-header-avatar__wrapper"},hN={class:"avatar__container"},pN={class:"avatar__cropper-buttons"};function fN(e,o,r,i,a,s){const l=w("Avatar"),c=w("VueCropper"),d=w("NcButton"),u=w("NcModal"),h=w("IconImage"),p=w("IconUpload"),m=w("ActionButton"),g=w("IconFolder"),_=w("IconCloudDownload"),C=w("IconDownload"),M=w("ActionLink"),N=w("IconDelete"),P=w("Actions");return f(),k("div",uN,[D("input",{id:"contact-avatar-upload",ref:"uploadInput",type:"file",class:"hidden",accept:"image/*",onChange:o[0]||(o[0]=(...V)=>s.handleUploadedFile&&s.handleUploadedFile(...V))},null,544),r.contact.addressbook.id==="z-server-generated--system"?(f(),T(l,{key:0,"disable-menu":"","show-user-status":!1,user:r.contact.uid,size:75,class:"contact-header-avatar__photo"},null,8,["user"])):(f(),T(l,{key:1,"disable-tooltip":!0,"display-name":r.contact.displayName,"is-no-user":!0,size:75,url:a.photoUrl,class:"contact-header-avatar__photo"},null,8,["display-name","url"])),E(u,{show:a.showCropper,"onUpdate:show":o[1]||(o[1]=V=>a.showCropper=V),size:"small",onClose:s.cancel},{default:S(()=>[D("div",hN,[D("h2",null,O(e.t("contacts","Crop contact photo")),1),E(c,gt({ref:"cropper",class:"avatar__cropper"},a.cropperOptions),null,16),D("div",pN,[E(d,{variant:"tertiary",onClick:s.cancel},{default:S(()=>[Z(O(e.t("contacts","Cancel")),1)]),_:1},8,["onClick"]),E(d,{variant:"primary",onClick:s.saveAvatar},{default:S(()=>[Z(O(e.t("contacts","Save")),1)]),_:1},8,["onClick"])])])]),_:1},8,["show","onClose"]),r.isReadOnly?R("",!0):(f(),T(P,{key:2,open:a.opened,"onUpdate:open":o[2]||(o[2]=V=>a.opened=V),"force-menu":!0,class:"contact-header-avatar__menu"},{icon:S(()=>[E(h,{size:20,"fill-color":"#fff"})]),default:S(()=>[E(m,{"close-after-click":!0,onClick:ae(s.selectFileInput,["stop","prevent"])},{icon:S(()=>[E(p,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Upload a new picture")),1)]),_:1},8,["onClick"]),E(m,{"close-after-click":!0,onClick:s.selectFilePicker},{icon:S(()=>[E(g,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Choose from Files")),1)]),_:1},8,["onClick"]),(f(!0),k(_t,null,jt(s.supportedSocial,V=>(f(),T(m,{key:V,"close-after-click":!0,onClick:K=>s.getSocialAvatar(V)},{icon:S(()=>[E(_,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Get from "+V)),1)]),_:2},1032,["onClick"]))),128)),r.contact.photo?(f(),k(_t,{key:0},[E(M,{href:`${r.contact.url}?photo`,target:"_blank","close-after-click":!0},{icon:S(()=>[E(C,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Download picture")),1)]),_:1},8,["href"]),E(m,{"close-after-click":!0,onClick:s.removePhoto},{icon:S(()=>[E(N,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Delete picture")),1)]),_:1},8,["onClick"])],64)):R("",!0)]),_:1},8,["open"]))])}const mN=tt(dN,[["render",fN],["__scopeId","data-v-5d080205"]]),gN={name:"DetailsHeader",components:{Actions:Co},data(){return{avatarSize:75}},computed:{cssStyle(){return{"--avatar-size":this.avatarSize+"px"}}}},yN={class:"contact-header__no-wrap"},vN={class:"contact-header__avatar"},bN={class:"contact-header__infos"},_N={class:"contact-header__infos-title"},CN={key:0,class:"contact-header__infos-subtitle"},wN={class:"contact-header__quick-actions"},kN={class:"contact-header__actions"};function SN(e,o,r,i,a,s){const l=w("Actions");return f(),k("header",{class:"contact-header",style:Za(s.cssStyle)},[D("div",yN,[D("div",vN,[$t(e.$slots,"avatar",{avatarSize:a.avatarSize},void 0,!0)]),D("div",bN,[D("h2",_N,[$t(e.$slots,"title",{},void 0,!0)]),e.$slots.subtitle?(f(),k("div",CN,[$t(e.$slots,"subtitle",{},void 0,!0)])):R("",!0),D("div",wN,[$t(e.$slots,"quick-actions",{},void 0,!0)])])]),D("div",kN,[$t(e.$slots,"actions",{},void 0,!0),E(l,gt({ref:"actions",class:"header-menu","menu-align":"right"},e.$attrs),{default:S(()=>[$t(e.$slots,"actions-menu",{},void 0,!0)]),_:3},16)])],4)}const xN=tt(gN,[["render",SN],["__scopeId","data-v-25754dc1"]]);var il,Zh;function AN(){if(Zh)return il;Zh=1;const e=[];function o(s){return s>=48&&s<=57}function r(s,l,c){if(typeof s!="string")throw new TypeError(`The first argument must be a string. Received type '${typeof s}'`);if(typeof l!="string")throw new TypeError(`The second argument must be a string. Received type '${typeof l}'`);const d=s.length,u=l.length;let h=0,p=0,m=e,g=0;for(c&&(c.caseInsensitive&&(s=s.toLowerCase(),l=l.toLowerCase()),c.alphabet&&(m=a(c.alphabet)));h<d&&p<u;){let _=s.charCodeAt(h),C=l.charCodeAt(p);if(o(_)){if(!o(C))return _-C;let M=h,N=p;for(;_===48&&++M<d;)_=s.charCodeAt(M);for(;C===48&&++N<u;)C=l.charCodeAt(N);M!==N&&g===0&&(g=M-N);let P=M,V=N;for(;P<d&&o(s.charCodeAt(P));)++P;for(;V<u&&o(l.charCodeAt(V));)++V;let K=P-M-V+N;if(K!==0)return K;for(;M<P;)if(K=s.charCodeAt(M++)-l.charCodeAt(N++),K!==0)return K;h=P,p=V;continue}if(_!==C)return _<m.length&&C<m.length&&m[_]!==-1&&m[C]!==-1?m[_]-m[C]:_-C;++h,++p}return h<d?1:p<u?-1:g}const i={};function a(s){const l=i[s];if(l!==void 0)return l;const c=[],d=s.split("").reduce((u,h)=>Math.max(u,h.charCodeAt(0)),0);for(let u=0;u<=d;u++)c.push(-1);for(let u=0;u<s.length;u++)c[s.charCodeAt(u)]=u;return i[s]=c,c}return il=r,il}var EN=AN();const Wl=Ka(EN),NN={name:"PropertyGroups",components:{PropertyTitle:i0,NcSelect:wo},props:{propModel:{type:Object,required:!0},value:{type:Array,required:!0},contact:{type:cc,required:!0},isReadOnly:{type:Boolean,required:!0}},data(){return{localValue:[...this.value].sort()}},computed:{showAsText(){return this.isReadOnly&&this.localValue.length<=1},showProperty(){return this.isReadOnly&&this.localValue.length>0||!this.isReadOnly},groups(){return this.$store.getters.getGroups.slice(0).map(e=>e.name).sort((e,o)=>Wl(e,o,{caseInsensitive:!0}))},formatGroupsTitle(){return this.localValue.slice(3).join(", ")}},watch:{value(){this.localValue=this.value},selectType(){this.localType=this.selectType}},methods:{updateValue(){this.$emit("update:value",this.localValue)}}},TN={key:0,class:"property"},MN={class:"property__row"},IN={class:"property__label"},ON={class:"property__value"},LN={class:"multiselect__limit"},DN={key:1},RN={key:0},PN={key:1,class:"group__list"};function $N(e,o,r,i,a,s){const l=w("PropertyTitle"),c=w("NcSelect"),d=Dp("tooltip");return r.propModel&&s.showProperty?(f(),k("div",TN,[E(l,{icon:"icon-contacts-dark","readable-name":e.t("contacts","Contact groups"),"is-read-only":r.isReadOnly},null,8,["readable-name","is-read-only"]),D("div",MN,[D("div",IN,[D("span",null,O(r.propModel.readableName),1)]),D("div",ON,[r.isReadOnly?(f(),k("div",DN,[a.localValue.length===0?(f(),k("span",RN,O(e.t("contacts","None")),1)):(f(),k("div",PN,[(f(!0),k(_t,null,jt(a.localValue,(u,h)=>(f(),k("span",{key:h},O(u)+O(h===a.localValue.length-1?"":", "),1))),128))]))])):(f(),T(c,{key:0,modelValue:a.localValue,"onUpdate:modelValue":o[0]||(o[0]=u=>a.localValue=u),options:s.groups,"no-wrap":!0,placeholder:e.t("contacts","Add contact in group"),multiple:!0,"keep-open":!0,clearable:!0,"deselect-from-dropdown":!0,taggable:!0,"tag-placeholder":"create","onOption:deselected":s.updateValue,onClose:s.updateValue},{limit:S(()=>[Yn((f(),k("span",LN,[Z(" +"+O(a.localValue.length-3),1)])),[[d,s.formatGroupsTitle,void 0,{auto:!0}]])]),"no-options":S(()=>[D("span",null,O(e.t("contacts","No results")),1)]),_:1},8,["modelValue","options","placeholder","onOption:deselected","onClose"]))]),o[1]||(o[1]=D("div",{class:"property__actions"},null,-1))])])):R("",!0)}const VN=tt(NN,[["render",$N],["__scopeId","data-v-043d1724"]]),BN={name:"PropertyRev",props:{value:{type:Object,required:!0}},computed:{relativeDate(){return a0.unix(vl(this.value).toUnixTime()).fromNow()}}},UN={class:"property property--rev"},HN={class:"property__row"},zN={class:"property__value"};function GN(e,o,r,i,a,s){return f(),k("div",UN,[D("div",HN,[o[0]||(o[0]=D("div",{class:"property__label"},null,-1)),D("div",zN,O(e.t("contacts","Last modified"))+" "+O(s.relativeDate),1),o[1]||(o[1]=D("div",{class:"property__actions"},null,-1))])])}const FN=tt(BN,[["render",GN],["__scopeId","data-v-0437201a"]]),YN=Yo("contacts","isTalkEnabled",!1),{profileEnabled:XN}=Yo("user_status","profileEnabled",!1),al=H0("contacts").persist().build(),jN=Ae({name:"ContactDetails",components:{Actions:Co,ActionButton:xn,ActionLink:ts,AddNewProp:zE,AppContentDetails:Tv,ContactAvatar:mN,ContactDetailsProperty:kp,DetailsHeader:xN,EmptyContent:yo,IconContact:_o,IconMail:wp,IconMessage:c0,IconCall:l0,IconAccount:si,IconDownload:As,IconDelete:Sn,IconQr:yE,CakeIcon:ZA,IconCopy:lc,IconLoading:We,PencilIcon:sc,CheckIcon:xs,Modal:qn,NcSelect:wo,NcInputField:Bp,PropertyGroups:VN,PropertyRev:FN,PropertySelect:s0,NcButton:he,NcRelatedResourcesPanel:iy,NcEmptyContent:yo,FolderMultipleImage:dE},mixins:[ja],provide(){return{sharedState:this.sharedState}},props:{contactKey:{type:String,default:void 0},contacts:{type:Array,default:()=>[]},reloadBus:{type:Object,required:!0},desc:{type:String,required:!1,default:""}},data(){return{fixed:!1,localContact:void 0,loadingData:!0,loadingUpdate:!1,qrcode:"",showPickAddressbookModal:!1,pickedAddressbook:null,editMode:!1,newGroupsValue:[],newAddressBook:null,contactDetailsSelector:".contact-details",excludeFromBirthdayKey:"x-nc-exclude-from-birthday-calendar",bus:dc(),showMenuPopover:!1,profileEnabled:XN,isTalkEnabled:YN,hasFilesResources:!1,hasTalkResources:!1,hasCalendarResources:!1,hasDeckResources:!1,deckPanelHasError:!1,filesPanelHasError:!1,talkPanelHasError:!1,calendarPanelHasError:!1,sharedState:qa({validEmail:!0,validUrl:!0}),lastUsedAddressBook:void 0}},computed:{contactTitle:{get(){return this.contact?.title??""},set(e){this.contact&&(this.contact.title=e)}},contactOrg:{get(){return this.contact?.org??""},set(e){this.contact&&(this.contact.org=e)}},hasRelatedResources(){return this.hasFilesResources||this.hasTalkResources||this.hasCalendarResources||this.hasDeckResources},canModifyCard(){return this.contact.addressbook?.canModifyCard},canDeleteCard(){return this.contact.addressbook?.canDeleteCard},isReadOnly(){return!this.canModifyCard||!this.editMode},isDataValid(){return this.sharedState.validEmail&&this.sharedState.validUrl},warning(){return this.isOwnContact===!0?!1:this.canModifyCard===!1?{icon:oE,classes:[],msg:t("contacts","This contact is in read-only mode. You do not have permission to edit this contact.")}:!1},conflict(){return this.contact.conflict?t("contacts","The contact you were trying to edit has changed. Please manually refresh the contact. Any further edits will be discarded."):!1},sortedProperties(){return this.localContact.properties.slice(0).sort((e,o)=>{const r=e.name.split(".").pop(),i=o.name.split(".").pop();return Cn.fieldOrder.indexOf(r)-Cn.fieldOrder.indexOf(i)})},groupedProperties(){return this.sortedProperties.reduce((e,o)=>this.canDisplay(o)?o.name==="bday"||o.name==="deathdate"||o.name==="anniversary"?(e.lifeEvents||(e.lifeEvents=[]),e.lifeEvents.push(o),e):(e[o.name]||(e[o.name]=[]),e[o.name].push(o),e):e,{})},addressbookModel(){return{readableName:t("contacts","Address book"),icon:"icon-address-book",options:this.addressbooksOptions}},addressbook(){return this.contact?.addressbook?.id||this.lastUsedAddressBook?.id},groupsModel(){return{readableName:t("contacts","Contact groups"),icon:"icon-contacts-dark"}},addressbooksOptions(){return this.addressbooks.filter(e=>e.enabled).map(e=>({id:e.id,name:e.displayName,readOnly:e.readOnly}))},copyableAddressbooksOptions(){return this.addressbooksOptions.filter(e=>!e.readOnly).filter(e=>e.id!==this.contact.addressbook.id).map(e=>({id:e.id,name:e.name}))},addressbooks(){return this.$store.getters.getAddressbooks},contact(){return this.$store.getters.getContact(this.contactKey)},excludeFromBirthdayLabel(){return this.localContact.vCard.hasProperty(this.excludeFromBirthdayKey)?t("contacts","Add contact to Birthday Calendar"):t("contacts","Exclude contact from Birthday Calendar")},enableToggleBirthdayExclusion(){return!!this.localContact?.vCard&&!this.isInSystemAddressBook},formattedSubtitle(){const e=this.contact.title,o=this.contact.org;return e&&o?t("contacts","{title} at {organization}",{title:e,organization:o}):e?gu(e):o?gu(o):""},profilePageLink(){return this.contact.socialLink("NEXTCLOUD")},emailAddressProperties(){return this.localContact.properties.find(e=>e.name==="email")},emailAddress(){return this.emailAddressProperties?.getFirstValue()},phoneNumberProperties(){return this.localContact.properties.find(e=>e.name==="tel")},phoneNumberList(){return this.groupedProperties?.tel?.map(e=>e.getFirstValue()).filter(e=>!!e)},emailAddressList(){return this.groupedProperties?.email?.map(e=>e.getFirstValue()).filter(e=>!!e)},callUrl(){return Fo("/apps/spreed/?callUser={uid}",{uid:this.contact.uid})},isInSystemAddressBook(){return this.contact.addressbook.id==="z-server-generated--system"},nextcloudVersionAtLeast28(){return parseInt(window.OC.config.version.split(".")[0])>=28},isOwnContact(){return this.isInSystemAddressBook&&this.contact.uid===br().uid},profileSettingsUrl(){return Fo("settings/user")}},watch:{contact(e,o){this.contactKey&&e!==o&&this.selectContact(this.contactKey)}},beforeMount(){this.contactKey&&this.selectContact(this.contactKey),document.addEventListener("keydown",this.onCtrlSave),this.lastUsedAddressBook=this.getLastUsedAddressBook()},beforeUnmount(){document.removeEventListener("keydown",this.onCtrlSave)},methods:{updateGroups(e){this.newGroupsValue=e},updateAddressbook(e){this.newAddressBook=e},async updateContact(){this.fixed=!1,this.loadingUpdate=!0;try{await this.$store.dispatch("updateContact",this.localContact)}finally{this.loadingUpdate=!1}if(!this.localContact.dav){this.logger.debug("New contact synced!",{localContact:this.localContact});const e=this.$store.getters.getContact(this.localContact.key);await this.updateLocalContact(e)}},async showQRcode(){const e=this.contact.jCal.slice(0);e[1]=e[1].filter(r=>r[0]!=="photo");const o=Wa.stringify(e);if(o.length>0){const r=await $A(o),i=new TextDecoder().decode(r);this.qrcode=btoa(i)}},async toggleBirthdayExclusionForContact(){this.localContact.vCard.hasProperty(this.excludeFromBirthdayKey)?this.localContact.vCard.removeProperty(this.excludeFromBirthdayKey):this.localContact.vCard.addPropertyWithValue(this.excludeFromBirthdayKey,!0),await this.updateContact()},selectInput(){this.$refs.fullname&&this.contact.fullName===t("contacts","Name")&&this.$refs.fullname.select()},async selectContact(e){this.loadingData=!0,this.editMode=!1;const o=this.$store.getters.getContact(e);if(o)if(o.dav)try{await this.$store.dispatch("fetchFullContact",{contact:o}),await this.updateLocalContact(o)}catch(r){r.name==="ParserError"?bt(t("contacts","Syntax error. Cannot open the contact.")):r?.status===404?bt(t("contacts","The contact does not exist on the server anymore.")):bt(t("contacts","Unable to retrieve the contact from the server, please check your network connection.")),console.error(r),this.$store.dispatch("deleteContact",{contact:this.contact,dav:!1})}else await this.updateLocalContact(o),this.editMode=!0;this.loadingData=!1},deleteContact(){this.$store.dispatch("deleteContact",{contact:this.contact})},async moveContactToAddressbook(e){const o=this.addressbooks.find(r=>r.id===e);if(this.loadingUpdate=!0,o)try{const r=await this.$store.dispatch("moveContactToAddressbook",{contact:this.contact,addressbook:o});this.$router.push({name:"contact",params:{selectedGroup:this.$route.params.selectedGroup,selectedContact:r.key}})}catch(r){console.error(r),bt(t("contacts","An error occurred while trying to move the contact"))}finally{this.loadingUpdate=!1}},async copyContactToAddressbook(e){const o=this.addressbooks.find(r=>r.id===e);if(this.loadingUpdate=!0,o)try{const r=await this.$store.dispatch("copyContactToAddressbook",{contact:this.contact,addressbook:o});this.$router.push({name:"contact",params:{selectedGroup:this.$route.params.selectedGroup,selectedContact:r.key}})}catch(r){console.error(r),bt(t("contacts","An error occurred while trying to copy the contact"))}finally{this.loadingUpdate=!1}},refreshContact(){this.$store.dispatch("fetchFullContact",{contact:this.contact,etag:this.conflict}).then(()=>{this.contact.conflict=!1})},closeQrModal(){this.qrcode=""},async updateLocalContact(e){const o=Object.assign(Object.create(Object.getPrototypeOf(e)),e);this.fixed=d0(o),this.localContact=o,this.newGroupsValue=[...this.localContact.groups]},onCtrlSave(e){this.editMode&&e.keyCode===83&&(navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&(e.preventDefault(),this.onSave())},async cloneContact(){this.pickedAddressbook&&this.addressbooks.find(e=>e.id===this.pickedAddressbook.id)?(this.logger.debug("Cloning contact to",{name:this.pickedAddressbook.name}),await this.copyContactToAddressbook(this.pickedAddressbook.id),this.closePickAddressbookModal()):this.addressbooksOptions.length===1?(this.logger.debug("Cloning contact to",{name:this.addressbooksOptions[0].name}),await this.copyContactToAddressbook(this.addressbooksOptions[0].id)):this.showPickAddressbookModal=!0},closePickAddressbookModal(){this.showPickAddressbookModal=!1,this.pickedAddressbook=null},canDisplay(e){const o=Cn.properties[e.name.split(".").pop()],r=o&&o.force?o.force:e.getDefaultType();return o&&r!=="unknown"},async onSave(){try{this.localContact.groups=[...this.newGroupsValue],await this.$store.dispatch("updateContactGroups",{groupNames:this.newGroupsValue,contact:this.contact}),await this.updateContact(),this.newAddressBook&&this.newAddressBook!==this.contact.addressbook.id&&(this.updateAddressBookAccesses(this.newAddressBook),this.moveContactToAddressbook(this.newAddressBook),this.newAddressBook=null),this.editMode=!1,await this.$store.commit("resortAddressbooks")}catch(e){this.logger.error("error while saving contact",{error:e}),bt(t("contacts","Unable to update contact")),this.logger.error(`Unable to update contact: ${e}`,{error:e,contact:vl(this.contact),localContact:vl(this.localContact)})}},getLastUsedAddressBook(){const e=JSON.parse(al.getItem("last-used-addressbook")||"{}");if(!(e?.id===null||e?.id===void 0))return this.addressbooksOptions?.find(o=>o.id===e.id)??void 0},updateAddressBookAccesses(e){let o=JSON.parse(al.getItem("last-used-addressbook")||"{}");(!o||typeof o!="object")&&(o={}),o.id=e,al.setItem("last-used-addressbook",JSON.stringify(o))}}}),WN={key:0,class:"contact-title"},qN=["innerHTML"],ZN={key:0,class:"quick-actions"},JN=["title"],KN=["title"],QN=["src","alt"],tT={class:"contact-details"},eT={key:4,class:"related-resources"};function nT(e,o,r,i,a,s){const l=w("IconContact"),c=w("EmptyContent"),d=w("ContactAvatar"),u=w("NcInputField"),h=w("NcButton"),p=w("IconAccount"),m=w("IconMail"),g=w("ActionLink"),_=w("Actions"),C=w("IconCall"),M=w("PencilIcon"),N=w("IconLoading"),P=w("CheckIcon"),V=w("IconDownload"),K=w("IconCopy"),X=w("ActionButton"),rt=w("IconQr"),pt=w("CakeIcon"),it=w("IconDelete"),et=w("DetailsHeader"),ut=w("Modal"),L=w("NcSelect"),q=w("ContactDetailsProperty"),H=w("PropertySelect"),I=w("PropertyGroups"),U=w("NcRelatedResourcesPanel"),z=w("FolderMultipleImage"),j=w("NcEmptyContent"),ct=w("AddNewProp"),st=w("PropertyRev"),lt=w("AppContentDetails");return f(),T(lt,null,{default:S(()=>[e.contact?(f(),k(_t,{key:1},[E(et,null,{avatar:S(()=>[E(d,{contact:e.contact,"is-read-only":e.isReadOnly,"reload-bus":e.reloadBus,onUpdateLocalContact:e.updateLocalContact},null,8,["contact","is-read-only","reload-bus","onUpdateLocalContact"])]),title:S(()=>[e.isReadOnly?(f(),k("div",WN,O(e.contact.fullName),1)):(f(),T(u,{key:1,id:"contact-fullname",ref:"fullname",modelValue:e.contact.fullName,"onUpdate:modelValue":o[0]||(o[0]=ot=>e.contact.fullName=ot),label:e.t("contacts","Name"),type:"text",autocomplete:"off",autocorrect:"off",spellcheck:"false",name:"fullname",onClick:e.selectInput},null,8,["modelValue","label","onClick"]))]),subtitle:S(()=>[e.isReadOnly?(f(),k("span",{key:0,innerHTML:e.formattedSubtitle},null,8,qN)):(f(),k(_t,{key:1},[E(u,{id:"contact-title",modelValue:e.contactTitle,"onUpdate:modelValue":o[1]||(o[1]=ot=>e.contactTitle=ot),label:e.t("contacts","Title"),type:"text",autocomplete:"off",autocorrect:"off",spellcheck:"false",name:"title"},null,8,["modelValue","label"]),E(u,{id:"contact-org",modelValue:e.contactOrg,"onUpdate:modelValue":o[2]||(o[2]=ot=>e.contactOrg=ot),label:e.t("contacts","Company"),type:"text",autocomplete:"off",autocorrect:"off",spellcheck:"false",name:"org"},null,8,["modelValue","label"])],64))]),"quick-actions":S(()=>[!e.editMode&&!e.loadingData?(f(),k("div",ZN,[e.isTalkEnabled&&e.isInSystemAddressBook?(f(),T(h,{key:0,"aria-label":e.t("contacts","Go to talk conversation"),name:e.t("contacts","Go to talk conversation"),class:"icon-talk quick-action",href:e.callUrl},null,8,["aria-label","name","href"])):R("",!0),e.profilePageLink?(f(),T(h,{key:1,class:"quick-action","aria-label":e.t("contacts","View profile"),name:e.t("contacts","View profile"),href:e.profilePageLink},{icon:S(()=>[E(p,{size:20})]),_:1},8,["aria-label","name","href"])):R("",!0),E(_,{class:"quick-action",variant:"secondary"},{icon:S(()=>[E(m,{size:20})]),default:S(()=>[(f(!0),k(_t,null,jt(e.emailAddressList,ot=>(f(),T(g,{key:ot,href:"mailto:"+ot},{icon:S(()=>[E(m,{size:20})]),default:S(()=>[Z(" "+O(ot),1)]),_:2},1032,["href"]))),128))]),_:1}),E(_,{class:"quick-action",variant:"secondary"},{icon:S(()=>[E(C,{size:20})]),default:S(()=>[(f(!0),k(_t,null,jt(e.phoneNumberList,ot=>(f(),T(g,{key:ot,href:"tel:"+ot},{icon:S(()=>[E(C,{size:20})]),default:S(()=>[Z(" "+O(ot),1)]),_:2},1032,["href"]))),128))]),_:1})])):R("",!0)]),actions:S(()=>[e.warning?(f(),T(vo(e.warning.icon),{key:0,title:e.warning?e.warning.msg:"",class:"header-icon",classes:e.warning.classes},null,8,["title","classes"])):R("",!0),e.conflict?(f(),k("div",{key:1,title:e.conflict,class:"header-icon header-icon--pulse icon-history",onClick:o[3]||(o[3]=(...ot)=>e.refreshContact&&e.refreshContact(...ot))},null,8,JN)):R("",!0),e.fixed?(f(),k("div",{key:2,title:e.t("contacts","This contact was broken and received a fix. Please review the content and click here to save it."),class:"header-icon header-icon--pulse icon-up",onClick:o[4]||(o[4]=(...ot)=>e.updateContact&&e.updateContact(...ot))},null,8,KN)):R("",!0),e.isOwnContact?(f(),T(h,{key:3,href:e.profileSettingsUrl,variant:e.isMobile?"secondary":"tertiary"},{icon:S(()=>[E(M,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Edit profile")),1)]),_:1},8,["href","variant"])):R("",!0),e.canModifyCard?(f(),k(_t,{key:4},[e.editMode?(f(),T(h,{key:1,variant:"secondary",disabled:e.loadingUpdate||!e.isDataValid,onClick:e.onSave},{icon:S(()=>[e.loadingUpdate?(f(),T(N,{key:0,size:20})):(f(),T(P,{key:1,size:20}))]),default:S(()=>[Z(" "+O(e.t("contacts","Save")),1)]),_:1},8,["disabled","onClick"])):(f(),T(h,{key:0,variant:e.isMobile?"secondary":"tertiary",onClick:o[5]||(o[5]=ot=>e.editMode=!0)},{icon:S(()=>[E(M,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Edit")),1)]),_:1},8,["variant"]))],64)):R("",!0)]),"actions-menu":S(()=>[E(g,{href:e.contact.url,download:`${e.contact.displayName}.vcf`},{icon:S(()=>[E(V,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Download")),1)]),_:1},8,["href","download"]),e.isReadOnly&&e.addressbooksOptions.length>0?(f(),T(X,{key:0,ref:"cloneAction","close-after-click":!0,onClick:e.cloneContact},{icon:S(()=>[E(K,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Clone contact")),1)]),_:1},8,["onClick"])):R("",!0),E(X,{"close-after-click":!0,onClick:e.showQRcode},{icon:S(()=>[E(rt,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Generate QR Code")),1)]),_:1},8,["onClick"]),e.enableToggleBirthdayExclusion?(f(),T(X,{key:1,"close-after-click":!0,onClick:e.toggleBirthdayExclusionForContact},{icon:S(()=>[E(pt,{size:20})]),default:S(()=>[Z(" "+O(e.excludeFromBirthdayLabel),1)]),_:1},8,["onClick"])):R("",!0),e.canDeleteCard?(f(),T(X,{key:2,onClick:e.deleteContact},{icon:S(()=>[E(it,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Delete")),1)]),_:1},8,["onClick"])):R("",!0)]),_:1}),e.qrcode?(f(),T(ut,{key:0,id:"qrcode-modal",size:"small","clear-view-delay":-1,name:e.contact.displayName,"close-button-contained":!1,onClose:e.closeQrModal},{default:S(()=>[D("img",{src:`data:image/svg+xml;base64,${e.qrcode}`,alt:e.t("contacts","Contact vCard as QR code"),class:"qrcode",width:"400"},null,8,QN)]),_:1},8,["name","onClose"])):R("",!0),e.showPickAddressbookModal?(f(),T(ut,{key:1,id:"pick-addressbook-modal","clear-view-delay":-1,name:e.t("contacts","Pick an address book"),onClose:e.closePickAddressbookModal},{default:S(()=>[E(L,{ref:"pickAddressbook",modelValue:e.pickedAddressbook,"onUpdate:modelValue":o[6]||(o[6]=ot=>e.pickedAddressbook=ot),class:"address-book","allow-empty":!1,options:e.copyableAddressbooksOptions,placeholder:e.t("contacts","Select address book"),label:"name"},null,8,["modelValue","options","placeholder"]),D("button",{onClick:o[7]||(o[7]=(...ot)=>e.closePickAddressbookModal&&e.closePickAddressbookModal(...ot))},O(e.t("contacts","Cancel")),1),D("button",{class:"primary",onClick:o[8]||(o[8]=(...ot)=>e.cloneContact&&e.cloneContact(...ot))},O(e.t("contacts","Clone contact")),1)]),_:1},8,["name","onClose"])):R("",!0),e.loadingData?(f(),T(N,{key:2,size:20,class:"contact-details"})):e.loadingData?R("",!0):(f(),k("div",{key:3,class:ee(["contact-details-wrapper",[{"contact-details-wrapper-read-only":e.isReadOnly}]])},[D("section",tT,[(f(!0),k(_t,null,jt(e.groupedProperties,(ot,St)=>(f(),k("div",{key:St},[(f(!0),k(_t,null,jt(ot,(Pt,At)=>(f(),T(q,{key:`${At}-${e.contact.key}-${Pt.name}`,"is-first-property":At===0,"is-last-property":At===ot.length-1,property:Pt,contact:e.contact,"local-contact":e.localContact,contacts:e.contacts,bus:e.bus,"is-read-only":e.isReadOnly},null,8,["is-first-property","is-last-property","property","contact","local-contact","contacts","bus","is-read-only"]))),128))]))),128))]),E(H,{"prop-model":e.addressbookModel,options:e.addressbooksOptions,value:e.addressbook,"is-first-property":!0,"is-last-property":!0,property:{},"hide-actions":!0,"is-read-only":e.isReadOnly,class:"property--addressbooks property--last","onUpdate:value":e.updateAddressbook},null,8,["prop-model","options","value","is-read-only","onUpdate:value"]),E(I,{value:e.localContact.groups,"prop-model":e.groupsModel,contact:e.contact,"is-read-only":e.isReadOnly,class:"property--groups property--last","onUpdate:value":e.updateGroups},null,8,["value","prop-model","contact","is-read-only","onUpdate:value"])],2)),e.nextcloudVersionAtLeast28&&!e.editMode?(f(),k("div",eT,[e.filesPanelHasError?R("",!0):(f(),T(U,{key:0,"provider-id":"account","resource-type":"files",description:e.desc,limit:5,header:e.t("contacts","Media shares with you"),"item-id":e.contact.uid,primary:!0,onHasResources:o[9]||(o[9]=ot=>e.hasFilesResources=ot),onHasError:o[10]||(o[10]=ot=>e.filesPanelHasError=ot)},null,8,["description","header","item-id"])),e.talkPanelHasError?R("",!0):(f(),T(U,{key:1,"provider-id":"account","resource-type":"talk",description:e.desc,limit:5,header:e.t("contacts","Talk conversations with you"),"item-id":e.contact.uid,primary:!0,onHasResources:o[11]||(o[11]=ot=>e.hasTalkResources=ot),onHasError:o[12]||(o[12]=ot=>e.talkPanelHasError=ot)},null,8,["description","header","item-id"])),e.calendarPanelHasError?R("",!0):(f(),T(U,{key:2,"provider-id":"account","resource-type":"calendar",description:e.desc,limit:5,header:e.t("contacts","Calendar events with you"),"item-id":e.contact.uid,primary:!0,onHasResources:o[13]||(o[13]=ot=>e.hasCalendarResources=ot),onHasError:o[14]||(o[14]=ot=>e.calendarPanelHasError=ot)},null,8,["description","header","item-id"])),e.deckPanelHasError?R("",!0):(f(),T(U,{key:3,"provider-id":"account","resource-type":"deck",description:e.desc,limit:5,header:e.t("contacts","Deck cards with you"),"item-id":e.contact.uid,primary:!0,onHasResources:o[15]||(o[15]=ot=>e.hasDeckResources=ot),onHasError:o[16]||(o[16]=ot=>e.deckPanelHasError=ot)},null,8,["description","header","item-id"])),!e.hasRelatedResources&&!e.loadingData?(f(),T(j,{key:4,name:e.t("contacts","No shared items with this contact")},{icon:S(()=>[E(z,{size:20})]),_:1},8,["name"])):R("",!0)])):R("",!0),e.isReadOnly?R("",!0):(f(),T(ct,{key:5,class:"last-edit",bus:e.bus,contact:e.contact},null,8,["bus","contact"])),e.contact.rev?(f(),T(st,{key:6,value:e.contact.rev,class:"last-edit"},null,8,["value"])):R("",!0)],64)):(f(),T(c,{key:0,class:"empty-content",name:e.t("contacts","No contact selected"),description:e.t("contacts","Select a contact on the list to begin")},{icon:S(()=>[E(l,{size:20})]),_:1},8,["name","description"]))]),_:1})}const oT=tt(jN,[["render",nT],["__scopeId","data-v-b23937f9"]]),rT='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-cancel" viewBox="0 0 24 24"><path d="M12 2C17.5 2 22 6.5 22 12S17.5 22 12 22 2 17.5 2 12 6.5 2 12 2M12 4C10.1 4 8.4 4.6 7.1 5.7L18.3 16.9C19.3 15.5 20 13.8 20 12C20 7.6 16.4 4 12 4M16.9 18.3L5.7 7.1C4.6 8.4 4 10.1 4 12C4 16.4 7.6 20 12 20C13.9 20 15.6 19.4 16.9 18.3Z" /></svg>',iT="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='mdi-delete-outline'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M6,19A2,2%200%200,0%208,21H16A2,2%200%200,0%2018,19V7H6V19M8,9H16V19H8V9M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z'%20/%3e%3c/svg%3e",aT={name:"BookAccountOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},sT=["aria-hidden","aria-label"],lT=["fill","width","height"],cT={d:"M18 2A2 2 0 0 1 20 4V20A2 2 0 0 1 18 22H6A2 2 0 0 1 4 20V4A2 2 0 0 1 6 2H18M18 4H13V9L10.5 6.7L8 9V4H6V20H18M13 11A2 2 0 1 1 11 13A2 2 0 0 1 13 11M17 19H9V18C9 16.67 11.67 16 13 16S17 16.67 17 18V19"},dT={key:0};function uT(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon book-account-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",cT,[r.title?(f(),k("title",dT,O(r.title),1)):R("",!0)])],8,lT))],16,sT)}const hT=tt(aT,[["render",uT]]),pT={name:"CloseThickIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},fT=["aria-hidden","aria-label"],mT=["fill","width","height"],gT={d:"M20 6.91L17.09 4L12 9.09L6.91 4L4 6.91L9.09 12L4 17.09L6.91 20L12 14.91L17.09 20L20 17.09L14.91 12L20 6.91Z"},yT={key:0};function vT(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon close-thick-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",gT,[r.title?(f(),k("title",yT,O(r.title),1)):R("",!0)])],8,mT))],16,fT)}const bT=tt(pT,[["render",vT]]),_T={name:"SetMergeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},CT=["aria-hidden","aria-label"],wT=["fill","width","height"],kT={d:"M2 7V9H7V7H2M12 9V11H9V13H12V15L15 12L12 9M17 9V15H22V9H17M2 11V13H7V11H2M2 15V17H7V15H2Z"},ST={key:0};function xT(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon set-merge-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",kT,[r.title?(f(),k("title",ST,O(r.title),1)):R("",!0)])],8,wT))],16,CT)}const ym=tt(_T,[["render",xT]]),AT={name:"AccountMultiplePlusOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ET=["aria-hidden","aria-label"],NT=["fill","width","height"],TT={d:"M13 11A3 3 0 1 0 10 8A3 3 0 0 0 13 11M13 7A1 1 0 1 1 12 8A1 1 0 0 1 13 7M17.11 10.86A5 5 0 0 0 17.11 5.14A2.91 2.91 0 0 1 18 5A3 3 0 0 1 18 11A2.91 2.91 0 0 1 17.11 10.86M13 13C7 13 7 17 7 17V19H19V17S19 13 13 13M9 17C9 16.71 9.32 15 13 15C16.5 15 16.94 16.56 17 17M24 17V19H21V17A5.6 5.6 0 0 0 19.2 13.06C24 13.55 24 17 24 17M8 12H5V15H3V12H0V10H3V7H5V10H8Z"},MT={key:0};function IT(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon account-multiple-plus-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",TT,[r.title?(f(),k("title",MT,O(r.title),1)):R("",!0)])],8,NT))],16,ET)}const vm=tt(AT,[["render",IT]]),OT={name:"BookArrowRightOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},LT=["aria-hidden","aria-label"],DT=["fill","width","height"],RT={d:"M13.09 20C13.21 20.72 13.46 21.39 13.81 22H6C4.89 22 4 21.11 4 20V4C4 2.9 4.89 2 6 2H18C19.11 2 20 2.9 20 4V13.09C19.67 13.04 19.34 13 19 13C18.66 13 18.33 13.04 18 13.09V4H13V12L10.5 9.75L8 12V4H6V20H13.09M23 19L20 16V18H16V20H20V22L23 19Z"},PT={key:0};function $T(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon book-arrow-right-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",RT,[r.title?(f(),k("title",PT,O(r.title),1)):R("",!0)])],8,DT))],16,LT)}const VT=tt(OT,[["render",$T]]),BT={name:"StarIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},UT=["aria-hidden","aria-label"],HT=["fill","width","height"],zT={d:"M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z"},GT={key:0};function FT(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon star-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",zT,[r.title?(f(),k("title",GT,O(r.title),1)):R("",!0)])],8,HT))],16,UT)}const YT=tt(BT,[["render",FT]]),XT={name:"StarOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},jT=["aria-hidden","aria-label"],WT=["fill","width","height"],qT={d:"M12,15.39L8.24,17.66L9.23,13.38L5.91,10.5L10.29,10.13L12,6.09L13.71,10.13L18.09,10.5L14.77,13.38L15.76,17.66M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z"},ZT={key:0};function JT(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon star-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",qT,[r.title?(f(),k("title",ZT,O(r.title),1)):R("",!0)])],8,WT))],16,jT)}const KT=tt(XT,[["render",JT]]),QT={name:"ContactsListItem",components:{ListItem:tf,NcAvatar:Wn,CheckIcon:xs,NcActionButton:xn,StarIcon:YT,StarOutlineIcon:KT},mixins:[ko],props:{index:{type:Number,required:!0},source:{type:Object,required:!0},reloadBus:{type:Object,required:!0},onSelectMultipleFromParent:{type:Function,default:()=>{}},isStatic:{type:Boolean,default:!1,required:!1},showAddressbook:{type:Boolean,default:!1,required:!1}},data(){return{avatarUrl:void 0,hoveringAvatar:!1}},computed:{isFavorite(){return this.source.favorite},isDraggable(){return!!this.source.dav&&this.source.addressbook.id!=="z-server-generated--system"&&!this.isStatic},id(){return this.source.key.slice(0,-2)},getTel(){return this.source.properties.find(e=>e.name==="tel")?.getFirstValue()}},created(){this.isStatic||(this.reloadBus.on("reload-avatar",this.reloadAvatarUrl),this.reloadBus.on("delete-avatar",this.deleteAvatar))},unmounted(){this.isStatic||(this.reloadBus.off("reload-avatar",this.reloadAvatarUrl),this.reloadBus.off("delete-avatar",this.deleteAvatar))},async mounted(){await this.loadAvatarUrl()},methods:{async toggleFavorite(){const e=this.$store.getters.getContact(this.source.key);if(!e){this.logger.error("Could not find contact in store",this.source.key),bt(t("contacts","Could not update favorite status"));return}if(!e.dav){this.logger.error("Missing DAV object for contact",{contactKey:e.key}),bt(t("contacts","Could not update favorite status"));return}try{await this.$store.dispatch("toggleFavorite",e)}catch(o){logger.error("Could not toggle favorite state",o),bt(t("contacts","Could not update favorite status"))}},startDrag(e,o){e.dataTransfer.dropEffect="move",e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("item",JSON.stringify({addressbookId:o.addressbook.id,displayName:o.displayName,groups:o.groups,url:o.url,uid:o.uid}))},reloadAvatarUrl(e){e===this.source.key&&this.loadAvatarUrl()},deleteAvatar(e){e===this.source.key&&(this.avatarUrl=void 0)},async loadAvatarUrl(){if(this.avatarUrl=void 0,this.source.photo){const e=await this.source.getPhotoUrl();if(!e){console.warn("contact has an invalid photo");return}this.avatarUrl=e}else this.source.hasPhoto&&this.source.url&&(this.avatarUrl=`${this.source.url}?photo`)},selectContact(){this.isStatic||this.$router.push({name:"contact",params:{selectedGroup:this.selectedGroup,selectedContact:this.source.key}})},onSelectMultiple(){this.isStatic||this.onSelectMultipleFromParent(this.source,this.index)},onSelectMultipleRange(){this.isStatic||this.onSelectMultipleFromParent(this.source,this.index,!0)},hoverAvatar(e){this.isStatic||(this.hoveringAvatar=e)}}},tM=["draggable"],eM={class:"envelope__subtitle"},nM={class:"envelope__subtitle__subject"},oM={key:0,class:"envelope__subtitle"},rM={class:"envelope__subtitle__addressbook"};function iM(e,o,r,i,a,s){const l=w("NcAvatar"),c=w("CheckIcon"),d=w("StarIcon"),u=w("StarOutlineIcon"),h=w("NcActionButton"),p=w("ListItem");return f(),k("div",{class:"contacts-list__item-wrapper",draggable:s.isDraggable,onDragstart:o[4]||(o[4]=m=>s.startDrag(m,r.source)),onClick:o[5]||(o[5]=ae((...m)=>s.onSelectMultipleRange&&s.onSelectMultipleRange(...m),["shift","exact","prevent"]))},[(f(),T(p,{id:s.id,key:r.source.key,class:"list-item-style envelope",name:r.source.displayName,to:r.isStatic?void 0:{name:"contact",params:{selectedGroup:e.selectedGroup,selectedContact:r.source.key}}},{icon:S(()=>[D("div",{class:"contacts-list__item-icon",onClick:o[1]||(o[1]=ae((...m)=>s.onSelectMultiple&&s.onSelectMultiple(...m),["exact","prevent"])),onMouseenter:o[2]||(o[2]=m=>s.hoverAvatar(!0)),onMouseleave:o[3]||(o[3]=m=>s.hoverAvatar(!1))},[(!r.source.isMultiSelected&&!a.hoveringAvatar||r.isStatic)&&r.source.addressbook.id==="z-server-generated--system"?(f(),T(l,{key:0,user:r.source.uid,"hide-status":!0,size:40},null,8,["user"])):R("",!0),(!r.source.isMultiSelected&&!a.hoveringAvatar||r.isStatic)&&r.source.addressbook.id!=="z-server-generated--system"?(f(),T(l,{key:1,"display-name":r.source.displayName,url:a.avatarUrl,size:40},null,8,["display-name","url"])):R("",!0),(r.source.isMultiSelected||a.hoveringAvatar)&&!r.isStatic?(f(),T(c,{key:2,size:28,class:ee({"contacts-list__item-avatar-selected":r.source.isMultiSelected,"contacts-list__item-avatar-hovered":!r.source.isMultiSelected})},null,8,["class"])):R("",!0),D("div",{class:ee(["favorite-star",{favorite:s.isFavorite}]),onClick:o[0]||(o[0]=ae((...m)=>s.toggleFavorite&&s.toggleFavorite(...m),["stop"]))},[s.isFavorite?(f(),T(d,{key:0,size:16,class:"favorite-icon"})):(f(),T(u,{key:1,size:16,class:"favorite-icon"}))],2)],32)]),subname:S(()=>[D("div",eM,[D("span",nM,O(r.source.email?r.source.email:s.getTel),1)]),r.showAddressbook?(f(),k("div",oM,[D("span",rM,O(e.t("contacts","from {addressbook}",{addressbook:r.source.addressbook.displayName})),1)])):R("",!0)]),actions:S(()=>[r.isStatic?R("",!0):(f(),T(h,{key:0,onClick:s.toggleFavorite},{icon:S(()=>[s.isFavorite?(f(),T(d,{key:0,size:20,class:"favorite-icon"})):(f(),T(u,{key:1,size:20}))]),default:S(()=>[Z(" "+O(s.isFavorite?e.t("contacts","Remove from favorites"):e.t("contacts","Add to favorites")),1)]),_:1},8,["onClick"]))]),_:1},8,["id","name","to"]))],40,tM)}const bm=tt(QT,[["render",iM],["__scopeId","data-v-4e726f47"]]);async function _m(e,o){const r=e.groups;return r.push(o),oe.patch(e.url,{},{headers:{"X-PROPERTY":"CATEGORIES","X-PROPERTY-REPLACE":r.map(i=>encodeURIComponent(i)).join(",")}})}const aM={name:"Batch",components:{ContactsListItem:bm,NcButton:he,NcSelect:wo,IconPlus:Rr,IconAccountPlus:vm,IconBookArrow:VT,NcNoteCard:Xa},props:{contacts:{type:Array,required:!0},mode:{type:String,required:!1,default:"group"}},emits:["submit"],data(){return{reloadBus:null,showAllContacts:!1,selectedGroups:[],selectedAddressesBook:null}},computed:{contactsLimited(){return this.showAllContacts?this.contacts:this.contacts.slice(0,9)},groupOptions(){return this.$store.getters.getGroups.map(e=>({label:e.name,value:e.name}))},canModifyCount(){return this.contacts.filter(e=>e.addressbook.canModifyCard).length},canDeleteCount(){return this.contacts.filter(e=>e.addressbook.canDeleteCard).length},moveTargetOptions(){return this.$store.getters.getAddressbooks.filter(e=>e.canCreateCard&&e.enabled).map(e=>({label:e.displayName||e.label||e.addressbook,value:e.id||e.addressbook}))}},methods:{submit(){this.mode==="group"&&this.group(),this.mode==="move"&&this.moveToAddressbook()},listItemTitle(e){return this.mode==="move"?e.addressbook.canDeleteCard?"":Bo("contacts","This contact cannot be moved"):this.mode==="group"?e.addressbook.canModifyCard?"":Bo("contacts","This contact cannot be grouped"):""},async group(){const e=this.$store.getters.getGroups;this.selectedGroups.forEach(o=>{const r=e.find(i=>i.name===o.value);if(!r){console.error("Cannot add contact to an undefined group",o);return}this.contacts.forEach(i=>{i.addressbook.canModifyCard&&(i.groups&&i.groups.includes(r.name)||_m(i,r.name).then(()=>{this.$store.dispatch("addContactToGroup",{contact:i,groupName:r.name})}).catch(a=>{console.error(a)}))})}),this.$emit("submit")},async moveToAddressbook(){if(!this.selectedAddressesBook)return;const e=this.$store.getters.getAddressbooks.find(r=>r.id===this.selectedAddressesBook.value);if(!e){console.error("Selected addressbook not found",this.selectedAddressesBook);return}const o=this.contacts.map(async r=>{if(!r.addressbook.canDeleteCard||r.addressbook.id===e.id)return null;try{return await this.$store.dispatch("moveContactToAddressbook",{contact:r,addressbook:e}),r}catch(i){return console.error("Failed to move contact",r,i),null}});await Promise.all(o),this.$emit("submit")}}},sM={class:"batch"},lM={class:"batch__title"},cM={key:0},dM={key:1},uM={class:"contacts-list"},hM={class:"batch__footer"};function pM(e,o,r,i,a,s){const l=w("NcSelect"),c=w("NcNoteCard"),d=w("ContactsListItem"),u=w("IconPlus"),h=w("NcButton"),p=w("IconAccountPlus"),m=w("IconBookArrow");return f(),k("div",sM,[D("div",lM,[r.mode==="group"?(f(),k("h3",cM,O(e.t("contacts","Add contacts to groups")),1)):R("",!0),r.mode==="move"?(f(),k("h3",dM,O(e.t("contacts","Move contacts to addressbook")),1)):R("",!0)]),r.mode==="group"?(f(),T(l,{key:0,modelValue:a.selectedGroups,"onUpdate:modelValue":o[0]||(o[0]=g=>a.selectedGroups=g),"input-label":e.t("contacts","Select groups"),multiple:!0,options:s.groupOptions},null,8,["modelValue","input-label","options"])):R("",!0),r.mode==="move"?(f(),T(l,{key:1,modelValue:a.selectedAddressesBook,"onUpdate:modelValue":o[1]||(o[1]=g=>a.selectedAddressesBook=g),"input-label":e.t("contacts","Select addressbook"),options:s.moveTargetOptions},null,8,["modelValue","input-label","options"])):R("",!0),D("h6",null,O(e.t("contacts","Selected contacts")),1),r.mode==="group"&&s.canModifyCount!==r.contacts.length?(f(),T(c,{key:2,type:"info"},{default:S(()=>[Z(O(e.t("contacts","Please note that only {count} of the {total} contacts can be added to a group",{count:s.canModifyCount,total:r.contacts.length})),1)]),_:1})):R("",!0),r.mode==="move"&&s.canDeleteCount!==r.contacts.length?(f(),T(c,{key:3,type:"info"},{default:S(()=>[Z(O(e.t("contacts","Please note that only {count} of the {total} contacts can be moved",{count:s.canDeleteCount,total:r.contacts.length})),1)]),_:1})):R("",!0),D("ul",uM,[(f(!0),k(_t,null,jt(s.contactsLimited,(g,_)=>(f(),T(d,{key:g.key,class:ee({disabled:!g.addressbook.canDeleteCard}),index:_,source:g,"reload-bus":a.reloadBus,title:s.listItemTitle(g),"is-static":!0,"show-addressbook":!0},null,8,["class","index","source","reload-bus","title"]))),128))]),r.contacts.length>9?(f(),T(h,{key:4,variant:"secondary",onClick:o[2]||(o[2]=g=>a.showAllContacts=!a.showAllContacts)},{icon:S(()=>[E(u,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts",a.showAllContacts?"Show less":"Show all")),1)]),_:1})):R("",!0),D("div",hM,[r.mode==="group"?(f(),T(h,{key:0,variant:"primary",disabled:a.selectedGroups.length===0,onClick:s.submit},{icon:S(()=>[E(p,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Add")),1)]),_:1},8,["disabled","onClick"])):R("",!0),r.mode==="move"?(f(),T(h,{key:1,variant:"primary",disabled:!a.selectedAddressesBook,onClick:s.submit},{icon:S(()=>[E(m,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Move")),1)]),_:1},8,["disabled","onClick"])):R("",!0)])])}const fM=tt(aM,[["render",pM],["__scopeId","data-v-c77e7593"]]),mM={name:"BadgeAccountOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},gM=["aria-hidden","aria-label"],yM=["fill","width","height"],vM={d:"M17,3H14V5H17V21H7V5H10V3H7A2,2 0 0,0 5,5V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V5A2,2 0 0,0 17,3M12,7A2,2 0 0,1 14,9A2,2 0 0,1 12,11A2,2 0 0,1 10,9A2,2 0 0,1 12,7M16,15H8V14C8,12.67 10.67,12 12,12C13.33,12 16,12.67 16,14V15M16,18H8V17H16V18M12,20H8V19H12V20M13,5H11V1H13V5Z"},bM={key:0};function _M(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon badge-account-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",vM,[r.title?(f(),k("title",bM,O(r.title),1)):R("",!0)])],8,yM))],16,gM)}const Jh=tt(mM,[["render",_M]]),CM={name:"CheckCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},wM=["aria-hidden","aria-label"],kM=["fill","width","height"],SM={d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M12 20C7.59 20 4 16.41 4 12S7.59 4 12 4 20 7.59 20 12 16.41 20 12 20M16.59 7.58L10 14.17L7.41 11.59L6 13L10 17L18 9L16.59 7.58Z"},xM={key:0};function AM(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon check-circle-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",SM,[r.title?(f(),k("title",xM,O(r.title),1)):R("",!0)])],8,kM))],16,wM)}const EM=tt(CM,[["render",AM]]),NM={name:"CloseCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},TM=["aria-hidden","aria-label"],MM=["fill","width","height"],IM={d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2C6.47,2 2,6.47 2,12C2,17.53 6.47,22 12,22C17.53,22 22,17.53 22,12C22,6.47 17.53,2 12,2M14.59,8L12,10.59L9.41,8L8,9.41L10.59,12L8,14.59L9.41,16L12,13.41L14.59,16L16,14.59L13.41,12L16,9.41L14.59,8Z"},OM={key:0};function LM(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon close-circle-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",IM,[r.title?(f(),k("title",OM,O(r.title),1)):R("",!0)])],8,MM))],16,TM)}const DM=tt(NM,[["render",LM]]),RM={name:"DomainIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},PM=["aria-hidden","aria-label"],$M=["fill","width","height"],VM={d:"M18,15H16V17H18M18,11H16V13H18M20,19H12V17H14V15H12V13H14V11H12V9H20M10,7H8V5H10M10,11H8V9H10M10,15H8V13H10M10,19H8V17H10M6,7H4V5H6M6,11H4V9H6M6,15H4V13H6M6,19H4V17H6M12,7V3H2V21H22V7H12Z"},BM={key:0};function UM(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon domain-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",VM,[r.title?(f(),k("title",BM,O(r.title),1)):R("",!0)])],8,$M))],16,PM)}const Kh=tt(RM,[["render",UM]]),HM={name:"Merging",components:{ContactDetailsProperty:kp,NcCheckboxRadioSwitch:Qa,IconCheckCircleOutline:EM,IconCloseCircleOutline:DM,IconSetMerge:ym,NcNoteCard:Xa,NcButton:he,IconDomain:Kh,IconAccount:si,IconBadgeAccount:Jh,NcSelect:wo,NcLoadingIcon:We},props:{contacts:{type:Map,required:!0}},data(){return{bus:dc(),resolvedConflicts:new Map,conflictsToResolve:0,sortedProperties:[],simpleProperties:["fn","org","title"],simplePropertyDescriptions:{fn:{description:this.t("contacts","Name"),icon:si},org:{description:this.t("contacts","Company"),icon:Kh},title:{description:this.t("contacts","Title"),icon:Jh}},chosenAddressBook:null,selectedGroups:[],isLoading:!1}},computed:{contactsList(){return Array.from(this.contacts.values()).map(e=>e)},dividedProperties(){const[e,o]=this.contactsList;if(!e||!o)return{};const r=this.sortProperties(e),i=this.sortProperties(o),a=this.groupedProperties(r),s=this.groupedProperties(i);return[a,s]},usedProperties(){const e=this.dividedProperties.flatMap(o=>Object.keys(o));return[...new Set(e)].filter(o=>{const r=this.dividedProperties[0][o]?this.dividedProperties[0][o].map(a=>this.getPropertyValue(a)):[],i=this.dividedProperties[1][o]?this.dividedProperties[1][o].map(a=>this.getPropertyValue(a)):[];return!r.every(a=>a==null||a==="")||!i.every(a=>a==null||a==="")})},conflictInformation(){const e={};return this.usedProperties.forEach(o=>{if((this.dividedProperties[0][o]??[]).every(r=>this.checkIfPropertyEmpty(r))){e[o]={type:"onlyInSecond",value:this.dividedProperties[1][o].map(r=>this.getPropertyValue(r))};return}if((this.dividedProperties[1][o]??[]).every(r=>this.checkIfPropertyEmpty(r))){e[o]={type:"onlyInFirst",value:this.dividedProperties[0][o].map(r=>this.getPropertyValue(r))};return}if(((r,i)=>r.length===i.length&&r.every((a,s)=>a===i[s]))((this.dividedProperties[0][o]??[]).map(r=>this.getPropertyValue(r)),(this.dividedProperties[1][o]??[]).map(r=>this.getPropertyValue(r)))){e[o]={type:"equal",value:this.dividedProperties[0][o].map(r=>this.getPropertyValue(r))};return}if(Cn.properties[o]?.multiple===!0){e[o]={type:"conflictWithMultipleValues",value:null};return}e[o]={type:"conflict",value:null}}),e},addressBookSelect(){return{placeholder:this.t("contacts","Select address book"),options:[{id:0,label:this.contactsList[0].addressbook.displayName},{id:1,label:this.contactsList[1].addressbook.displayName}]}}},mounted(){this.calculateConflictsToResolve(),this.sortedProperties=this.sortUsedProperties(),this.contactsList[0].addressbook.id===this.contactsList[1].addressbook.id&&(this.chosenAddressBook={id:0,label:this.contactsList[0].addressbook.displayName}),this.selectedGroups=this.selectedGroups.concat(this.contactsList[0].groups),this.selectedGroups=this.selectedGroups.concat(this.contactsList[1].groups)},methods:{resolveConflict(e,o){e===this.resolvedConflicts.get(o)?this.resolvedConflicts.set(o,void 0):this.resolvedConflicts.set(o,e),this.$forceUpdate(),this.calculateConflictsToResolve()},resolveMultiConflict(e,o){if(this.resolvedConflicts.has(o)){const r=this.resolvedConflicts.get(o);r.has(e)?r.delete(e):r.add(e),this.resolvedConflicts.set(o,r)}else{const r=new Set;r.add(e),this.resolvedConflicts.set(o,r)}this.$forceUpdate(),this.calculateConflictsToResolve()},canDisplay(e){const o=Cn.properties[e.name.split(".").pop()],r=o&&o.force?o.force:e.getDefaultType();return o&&r!=="unknown"},sortProperties(e){return e.properties.slice(0).sort((o,r)=>{const i=o.name.split(".").pop(),a=r.name.split(".").pop();return Cn.fieldOrder.indexOf(i)-Cn.fieldOrder.indexOf(a)})},groupedProperties(e){return e.reduce((o,r)=>!this.canDisplay(r)&&r.name!=="title"&&r.name!=="org"&&r.name!=="fn"?o:r.name==="bday"||r.name==="deathdate"||r.name==="anniversary"?(o.lifeEvents||(o.lifeEvents=[]),o.lifeEvents.push(r),o):(o[r.name]||(o[r.name]=[]),o[r.name].push(r),o),{})},calculateConflictsToResolve(){let e=0;this.usedProperties.forEach(o=>{this.conflictInformation[o]?.type==="conflict"&&this.resolvedConflicts.get(o)===void 0&&e++,this.conflictInformation[o]?.type==="conflictWithMultipleValues"&&!this.resolvedConflicts.get(o)?.size&&e++}),this.chosenAddressBook===null&&e++,this.conflictsToResolve=e},getPropertyValue(e){return e?e.isMultiValue?e.isStructuredValue?e.getValues()[0]:e.getValues():e.getFirstValue():null},checkIfPropertyEmpty(e){if(e===void 0)return!0;const o=this.getPropertyValue(e);return o===""||o===null||Array.isArray(o)&&o.length===0?!0:Array.isArray(o)?o.every(r=>r===""||r===void 0):!1},sortUsedProperties(){return this.usedProperties.sort((e,o)=>{const r=this.conflictInformation[e]?.type,i=this.conflictInformation[o]?.type;return r==="conflict"&&i!=="conflict"?-1:i==="conflict"&&r!=="conflict"?1:0})},async mergeContacts(){this.isLoading=!0;const e=this.contactsList[0],o={};this.usedProperties.forEach(r=>{if(this.conflictInformation[r]?.type==="conflict"){const i=this.resolvedConflicts.get(r);i!==void 0&&(o[r]=[this.dividedProperties[i][r]])}else if(this.conflictInformation[r]?.type==="conflictWithMultipleValues"){const i=this.resolvedConflicts.get(r);i?.size&&(o[r]=Array.from(i).map(a=>this.dividedProperties[a][r]))}else this.conflictInformation[r]?.type==="onlyInSecond"?o[r]=[this.dividedProperties[1][r]]:o[r]=[this.dividedProperties[0][r]]}),this.usedProperties.forEach(r=>{if(o[r]!==void 0&&o[r].length>0){const i=o[r].flat().filter(a=>a!=null);i.forEach(a=>{const s=a.name;e.vCard.getAllProperties(s).forEach(l=>e.vCard.removeProperty(l))}),i.forEach(a=>{const s=JSON.parse(JSON.stringify(a.jCal)),l=new Wa.Property(s);e.vCard.addProperty(l)})}}),e.groups=this.selectedGroups,e.addressbook=this.contactsList[this.chosenAddressBook.id].addressbook,await this.$store.dispatch("updateContact",e),await this.$store.dispatch("deleteContact",{contact:this.contactsList[1]}),this.$emit("finished",e)}}},zM={class:"merging"},GM={class:"merging__title"},FM={class:"merging-title__addressbooks"},YM={class:"merging__conflicts"},XM={key:5,class:"checkbox-spacer"},jM={key:6,class:"merging__conflicts__property"},WM={key:0},qM={key:1,class:"simple-property"},ZM={class:"simple-property__title"},JM={key:7,class:"merging__conflicts__filler"},KM={key:10,class:"checkbox-spacer"},QM={key:11,class:"merging__conflicts__property"},tI={key:0},eI={key:1,class:"simple-property"},nI={class:"simple-property__title"},oI={key:2,class:"merging__groups"},rI={class:"merging__groups__header"},iI={class:"merging__actions"};function aI(e,o,r,i,a,s){const l=w("IconCloseCircleOutline"),c=w("NcSelect"),d=w("NcNoteCard"),u=w("IconCheckCircleOutline"),h=w("NcCheckboxRadioSwitch"),p=w("ContactDetailsProperty"),m=w("IconSetMerge"),g=w("NcLoadingIcon"),_=w("NcButton");return f(),k("div",zM,[D("div",GM,[D("h3",null,O(e.t("contacts","Confirm merging contacts")),1),D("div",FM,[a.chosenAddressBook===null?(f(),T(l,{key:0,size:20,class:"needs-action"})):R("",!0),E(c,gt(s.addressBookSelect,{modelValue:a.chosenAddressBook,"onUpdate:modelValue":[o[0]||(o[0]=C=>a.chosenAddressBook=C),s.calculateConflictsToResolve],disabled:s.contactsList[0].addressbook.id===s.contactsList[1].addressbook.id,title:e.t("contacts","Select address book")}),null,16,["modelValue","disabled","title","onUpdate:modelValue"])])]),a.conflictsToResolve?(f(),T(d,{key:0,type:"warning",text:e.t("contacts","The selected contacts have conflicting information. Choose which information to keep")},null,8,["text"])):(f(),T(d,{key:1,type:"success",text:e.t("contacts","Contacts can be merged")},null,8,["text"])),D("div",YM,[(f(!0),k(_t,null,jt(a.sortedProperties,(C,M)=>(f(),k("div",{key:C,class:ee(["merging__conflicts__row",[{conflict:s.conflictInformation[C]?.type==="conflict"||s.conflictInformation[C]?.type==="conflictWithMultipleValues",last:M===a.sortedProperties.length-1}]])},[(s.conflictInformation[C]?.type!=="conflict"||a.resolvedConflicts.get(C)!==void 0)&&(s.conflictInformation[C]?.type!=="conflictWithMultipleValues"||a.resolvedConflicts.get(C)?.size)?(f(),T(u,{key:0,size:20})):R("",!0),s.conflictInformation[C]?.type==="conflict"&&a.resolvedConflicts.get(C)===void 0?(f(),T(l,{key:1,size:20,class:"needs-action"})):R("",!0),s.conflictInformation[C]?.type==="conflictWithMultipleValues"&&!a.resolvedConflicts.get(C)?.size?(f(),T(l,{key:2,size:20,class:"needs-action"})):R("",!0),s.conflictInformation[C]?.type==="conflict"?(f(),T(h,{key:3,"model-value":a.resolvedConflicts.get(C)===0,type:"radio","onUpdate:modelValue":N=>s.resolveConflict(0,C)},null,8,["model-value","onUpdate:modelValue"])):R("",!0),s.conflictInformation[C]?.type==="conflictWithMultipleValues"?(f(),T(h,{key:4,"model-value":a.resolvedConflicts.get(C)?.has(0),"onUpdate:modelValue":N=>s.resolveMultiConflict(0,C)},null,8,["model-value","onUpdate:modelValue"])):R("",!0),s.conflictInformation[C]?.type!=="conflict"&&s.conflictInformation[C]?.type!=="conflictWithMultipleValues"?(f(),k("div",XM)):R("",!0),s.conflictInformation[C]?.type!=="onlyInSecond"?(f(),k("div",jM,[a.simpleProperties.includes(C)?(f(),k("div",qM,[D("div",ZM,[(f(),T(vo(a.simplePropertyDescriptions[C]?.icon||"span"),{size:20})),D("h3",null,O(a.simplePropertyDescriptions[C]?.description||C),1)]),(f(!0),k(_t,null,jt(s.dividedProperties[0][C],N=>(f(),k("span",{key:N.jCal},O(N.getFirstValue()),1))),128))])):(f(),k("div",WM,[(f(!0),k(_t,null,jt(s.dividedProperties[0][C],(N,P)=>(f(),T(p,{key:N.jCal,"is-first-property":P===0,"is-last-property":!1,property:N,contact:s.contactsList[0],"local-contact":s.contactsList[0],contacts:r.contacts,bus:a.bus,"is-read-only":!0},null,8,["is-first-property","property","contact","local-contact","contacts","bus"]))),128))]))])):R("",!0),s.conflictInformation[C]?.type==="onlyInSecond"?(f(),k("div",JM)):R("",!0),s.conflictInformation[C]?.type==="conflict"?(f(),T(h,{key:8,"model-value":a.resolvedConflicts.get(C)===1,type:"radio","onUpdate:modelValue":N=>s.resolveConflict(1,C)},null,8,["model-value","onUpdate:modelValue"])):R("",!0),s.conflictInformation[C]?.type==="conflictWithMultipleValues"?(f(),T(h,{key:9,"model-value":a.resolvedConflicts.get(C)?.has(1),"onUpdate:modelValue":N=>s.resolveMultiConflict(1,C)},null,8,["model-value","onUpdate:modelValue"])):R("",!0),s.conflictInformation[C]?.type!=="conflict"&&s.conflictInformation[C]?.type!=="conflictWithMultipleValues"?(f(),k("div",KM)):R("",!0),s.conflictInformation[C]?.type!=="onlyInFirst"?(f(),k("div",QM,[a.simpleProperties.includes(C)?(f(),k("div",eI,[D("div",nI,[(f(),T(vo(a.simplePropertyDescriptions[C]?.icon||"span"),{size:20})),D("h3",null,O(a.simplePropertyDescriptions[C]?.description||C),1)]),(f(!0),k(_t,null,jt(s.dividedProperties[1][C],N=>(f(),k("span",{key:N.jCal},O(N.getFirstValue()),1))),128))])):(f(),k("div",tI,[(f(!0),k(_t,null,jt(s.dividedProperties[1][C],(N,P)=>(f(),T(p,{key:N.jCal,"is-first-property":P===0,"is-last-property":!1,property:N,contact:s.contactsList[1],"local-contact":s.contactsList[1],contacts:r.contacts,bus:a.bus,"is-read-only":!0},null,8,["is-first-property","property","contact","local-contact","contacts","bus"]))),128))]))])):R("",!0)],2))),128))]),s.contactsList[0].groups.length||s.contactsList[1].groups.length?(f(),k("div",oI,[D("h4",rI,O(e.t("contacts","Groups")),1),E(c,{modelValue:a.selectedGroups,"onUpdate:modelValue":[o[1]||(o[1]=C=>a.selectedGroups=C),s.calculateConflictsToResolve],options:s.contactsList[0].groups.concat(s.contactsList[1].groups),multiple:!0,placeholder:e.t("contacts","Select groups to add the merged contact to"),disabled:!s.contactsList[0].groups.length&&!s.contactsList[1].groups.length},null,8,["modelValue","options","placeholder","disabled","onUpdate:modelValue"])])):R("",!0),D("div",iI,[E(_,{disabled:a.conflictsToResolve!==0,variant:"secondary",onClick:s.mergeContacts},{icon:S(()=>[a.isLoading?(f(),T(g,{key:1,size:20})):(f(),T(m,{key:0,size:20}))]),default:S(()=>[Z(O(e.t("contacts","Merge contacts"))+" ",1)]),_:1},8,["disabled","onClick"])])])}const sI=tt(HM,[["render",aI],["__scopeId","data-v-67a3e3e7"]]),lI={name:"ContactsList",components:{AppContentList:Ov,NcNoteCard:Xa,VList:Cd,NcButton:he,IconSelect:bT,IconDelete:Sn,IconSetMerge:ym,IconAccountMultiple:_o,IconBookAccount:hT,NcDialog:Vp,NcModal:qn,Merging:sI,NcLoadingIcon:We,ContactsListItem:bm,Batch:fM,NcTextField:Cc},mixins:[ko],props:{list:{type:Array,required:!0},contacts:{type:Object,required:!0},searchQuery:{type:String,default:""},reloadBus:{type:Object,required:!0}},data(){return{query:"",multiSelectedContacts:new Map,refreshKey:0,showDeleteConfirmationDialog:!1,buttons:[{label:t("contacts","Cancel"),icon:rT,callback:()=>{this.showDeleteConfirmationDialog=!1}},{label:t("contacts","Delete"),type:"primary",icon:iT,callback:()=>{this.deleteAllMultiSelected()}}],lastToggledIndex:void 0,isMerging:!1,isMergingLoading:!1,isGrouping:!1,isMovingAddressbook:!1}},computed:{filteredList(){let e=this.list.filter(o=>this.matchSearch(this.contacts[o.key])).map(o=>this.contacts[o.key]);return e=e.filter(o=>o!==void 0),e.forEach((o,r)=>{o!==void 0&&(o.isMultiSelected=this.multiSelectedContacts.has(r))}),e},isMultiSelecting(){return this.multiSelectedContacts.size>0},readOnlyMultiSelectedCount(){let e=0;return this.multiSelectedContacts.forEach(o=>{o.addressbook.readOnly&&e++}),e},selectedEditable(){let e=0;return this.multiSelectedContacts.forEach(o=>{o.addressbook.canModifyCard&&e++}),e},selectedDeletable(){let e=0;return this.multiSelectedContacts.forEach(o=>{o.addressbook.canDeleteCard&&e++}),e},canModifyAnySelected(){return this.selectedEditable>0},canDeleteAnySelected(){return this.selectedDeletable>0},canMergeSelected(){return this.multiSelectedContacts.size===2&&this.selectedEditable===this.multiSelectedContacts.size},deleteActionTitle(){return this.canDeleteAnySelected?n("contacts","Delete {number} contact","Delete {number} contacts",this.multiSelectedContacts.size,{number:this.multiSelectedContacts.size}):t("contacts","Please select at least one editable contact to delete")},mergeActionTitle(){return this.areTwoEditable?t("contacts","Merge contacts"):t("contacts","Please select two editable contacts to merge")},groupActionTitle(){return this.canModifyAnySelected?n("contacts","Add {number} contact to group","Add {number} contacts to group",this.multiSelectedContacts.size,{number:this.multiSelectedContacts.size}):t("contacts","Please select at least one editable contact to add to a group")},moveActionTitle(){return this.canDeleteAnySelected?n("contacts","Move {number} contact to addressbook","Move {number} contacts to addressbook",this.multiSelectedContacts.size,{number:this.multiSelectedContacts.size}):t("contacts","Please select at least one editable contact to move to an addressbook")}},watch:{async selectedContact(e){e&&(await this.$nextTick(),this.scrollToContact(e))},list(e,o){e.length!==0&&o.length===0&&this.selectedContact&&this.$nextTick(()=>{this.scrollToContact(this.selectedContact)})}},mounted(){this.query=this.searchQuery},methods:{selectContact(e){if(this.list.length>0&&e<this.list.length){const o=e===0?this.list[e+1]:this.list[e-1];o&&this.$router.push({name:"contact",params:{selectedGroup:this.selectedGroup,selectedContact:o.key}})}},scrollToContact(e){const o=this.list.findIndex(l=>l.key===e);if(o===-1)return;const r=this.$refs.scroller,i=r.$el.getBoundingClientRect(),a=this.$el.querySelector("#"+e.slice(0,-2)),s=a?.getBoundingClientRect();if(!a||s.y<i.y)r.scrollToIndex(o);else if(a){const l=r.getItemSize(o),c=s.y+l-(this.$el.offsetHeight+50);c>0&&r.scrollTo(r.scrollOffset+c)}},matchSearch(e){if(this.query.trim()!=="")try{return e.searchData.toString().toLowerCase().search(this.query.trim().toLowerCase())!==-1}catch(o){if(o instanceof SyntaxError)return e.searchData.toString().toLowerCase().includes(this.query.trim().toLowerCase())}return!0},onSelectMultiple(e,o,r=!1){r&&this.lastToggledIndex!==o&&this.onSelectRange(o)||(this.multiSelectedContacts.has(o)?this.multiSelectedContacts.delete(o):this.multiSelectedContacts.set(o,e),this.lastToggledIndex=o,this.multiSelectedContacts=new Map(this.multiSelectedContacts))},onSelectRange(e){const o=this.lastToggledIndex??void 0;if(o===void 0)return!1;const r=Math.min(o,e),i=Math.max(o,e),a=this.multiSelectedContacts.has(e),s=new Map(this.multiSelectedContacts);for(let l=r;l<=i;l++)a?s.delete(l):s.set(l,this.filteredList[l]);return this.lastToggledIndex=e,this.multiSelectedContacts=s,!0},unselectAllMultiSelected(){this.multiSelectedContacts=new Map,this.lastToggledIndex=void 0},attemptDeleteAllMultiSelected(){this.showDeleteConfirmationDialog=!0},deleteAllMultiSelected(){this.multiSelectedContacts.forEach(async e=>{e.addressbook.readOnly||(await new Promise(o=>setTimeout(o,500)),await this.$store.dispatch("deleteContact",{contact:e}))}),this.unselectAllMultiSelected(),this.showDeleteConfirmationDialog=!1},async initiateContactMerging(){this.isMergingLoading=!0;const e=Array.from(this.multiSelectedContacts.values());for(const o of e)await this.$store.dispatch("fetchFullContact",{contact:o});this.isMergingLoading=!1,this.isMerging=!0},async finishContactMerging(e){await this.$store.dispatch("fetchFullContact",{contact:e,forceReFetch:!0}),this.unselectAllMultiSelected(),this.isMerging=!1,await this.$router.push({name:"root"})},async finishBatch(){if(this.isGrouping)for(const e of this.multiSelectedContacts.values())await this.$store.dispatch("fetchFullContact",{contact:e,forceReFetch:!0});this.isGrouping=!1,this.isMovingAddressbook=!1,this.unselectAllMultiSelected()}}},cI={class:"contacts-list__header"},dI={class:"search-contacts-field"},uI={key:0,class:"contacts-list__multiselect-header"};function hI(e,o,r,i,a,s){const l=w("NcNoteCard"),c=w("NcDialog"),d=w("Merging"),u=w("NcModal"),h=w("Batch"),p=w("NcTextField"),m=w("IconSelect"),g=w("NcButton"),_=w("IconDelete"),C=w("IconSetMerge"),M=w("NcLoadingIcon"),N=w("IconAccountMultiple"),P=w("IconBookAccount"),V=w("ContactsListItem"),K=w("VList"),X=w("AppContentList");return f(),T(X,{class:"content-list"},{default:S(()=>[E(c,{open:a.showDeleteConfirmationDialog,name:e.n("contacts","Delete {number} contact","Delete {number} contacts",a.multiSelectedContacts.size,{number:a.multiSelectedContacts.size}),buttons:a.buttons,"no-close":""},{default:S(()=>[Z(O(e.t("contacts","Are you sure you want to proceed?"))+" ",1),s.readOnlyMultiSelectedCount?(f(),T(l,{key:0,variant:"info",text:e.n("contacts","Please note that {number} contact is read only and will not be deleted","Please note that {number} contacts are read only and will not be deleted",s.readOnlyMultiSelectedCount,{number:s.readOnlyMultiSelectedCount})},null,8,["text"])):R("",!0)]),_:1},8,["open","name","buttons"]),a.isMerging?(f(),T(u,{key:0,name:e.t("contacts","Merge contacts"),size:"large",onClose:o[0]||(o[0]=rt=>a.isMerging=!1)},{default:S(()=>[E(d,{contacts:a.multiSelectedContacts,onFinished:s.finishContactMerging},null,8,["contacts","onFinished"])]),_:1},8,["name"])):R("",!0),a.isGrouping?(f(),T(u,{key:1,name:e.t("contacts","Add contacts to group"),size:"large",onClose:o[1]||(o[1]=rt=>a.isGrouping=!1)},{default:S(()=>[E(h,{contacts:Array.from(a.multiSelectedContacts.values()),mode:"group",onSubmit:s.finishBatch},null,8,["contacts","onSubmit"])]),_:1},8,["name"])):R("",!0),a.isMovingAddressbook?(f(),T(u,{key:2,name:e.t("contacts","Move contacts to addressbook"),size:"large",onClose:o[2]||(o[2]=rt=>a.isMovingAddressbook=!1)},{default:S(()=>[E(h,{contacts:Array.from(a.multiSelectedContacts.values()),mode:"move",onSubmit:s.finishBatch},null,8,["contacts","onSubmit"])]),_:1},8,["name"])):R("",!0),D("div",cI,[D("div",dI,[E(p,{modelValue:a.query,"onUpdate:modelValue":o[3]||(o[3]=rt=>a.query=rt),label:e.t("contacts","Search contacts …"),"trailing-button-icon":"close","show-trailing-button":a.query!=="",onTrailingButtonClick:o[4]||(o[4]=rt=>a.query="")},null,8,["modelValue","label","show-trailing-button"])])]),E(z0,{name:"contacts-list__multiselect-header"},{default:S(()=>[s.isMultiSelecting?(f(),k("div",uI,[E(g,{variant:"tertiary",title:e.t("contacts","Unselect {number}",{number:a.multiSelectedContacts.size}),"close-after-click":!0,onClick:ae(s.unselectAllMultiSelected,["prevent"])},{default:S(()=>[E(m,{size:16})]),_:1},8,["title","onClick"]),E(g,{variant:"tertiary",disabled:!s.canDeleteAnySelected,title:s.deleteActionTitle,"close-after-click":!0,onClick:ae(s.attemptDeleteAllMultiSelected,["prevent"])},{default:S(()=>[E(_,{size:16})]),_:1},8,["disabled","title","onClick"]),a.isMergingLoading?(f(),T(M,{key:1,size:20})):(f(),T(g,{key:0,variant:"tertiary",disabled:!s.canMergeSelected,title:s.mergeActionTitle,"close-after-click":!0,onClick:ae(s.initiateContactMerging,["prevent"])},{default:S(()=>[E(C,{size:20})]),_:1},8,["disabled","title","onClick"])),E(g,{variant:"tertiary",title:s.groupActionTitle,disabled:!s.canModifyAnySelected,"close-after-click":!0,onClick:o[5]||(o[5]=ae(rt=>a.isGrouping=!0,["prevent"]))},{default:S(()=>[E(N,{size:20})]),_:1},8,["title","disabled"]),E(g,{variant:"tertiary",title:s.moveActionTitle,disabled:!s.canDeleteAnySelected,"close-after-click":!0,onClick:o[6]||(o[6]=ae(rt=>a.isMovingAddressbook=!0,["prevent"]))},{default:S(()=>[E(P,{size:20})]),_:1},8,["title","disabled"])])):R("",!0)]),_:1}),E(K,{ref:"scroller",class:"contacts-list",data:s.filteredList},{default:S(({item:rt,index:pt})=>[(f(),T(V,{key:rt.key,index:pt,source:rt,"reload-bus":r.reloadBus,"on-select-multiple-from-parent":s.onSelectMultiple},null,8,["index","source","reload-bus","on-select-multiple-from-parent"]))]),_:1},8,["data"])]),_:1})}const pI=tt(lI,[["render",hI],["__scopeId","data-v-aad1535b"]]),fI={name:"ContactsContent",components:{AppContent:_c,NcButton:he,ContactDetails:oT,ContactsList:pI,EmptyContent:yo,IconContact:_o,IconLoading:We},mixins:[ko],props:{loading:{type:Boolean,default:!0},contactsList:{type:Array,required:!0}},data(){return{searchQuery:"",reloadBus:dc()}},computed:{contacts(){return this.$store.getters.getContacts},groups(){return this.$store.getters.getGroups},sortedContacts(){return this.$store.getters.getSortedContacts},isRealGroup(){return this.groups.findIndex(e=>e.name===this.selectedGroup)>-1},isEmptyGroup(){return this.contactsList.length===0},showDetails(){return!!this.selectedContact}},methods:{addContactsToGroup(e){vr("contacts:group:append",e)},newContact(){this.$emit("new-contact")},hideDetails(){this.$router.push({name:"group",params:{selectedGroup:this.selectedGroup}})}}};function mI(e,o,r,i,a,s){const l=w("IconLoading"),c=w("EmptyContent"),d=w("AppContent"),u=w("IconContact"),h=w("NcButton"),p=w("ContactsList"),m=w("ContactDetails");return r.loading?(f(),T(d,{key:0},{default:S(()=>[E(c,{class:"empty-content",name:e.t("contacts","Loading contacts …")},{icon:S(()=>[E(l,{size:20})]),_:1},8,["name"])]),_:1})):s.isEmptyGroup&&!s.isRealGroup?(f(),T(d,{key:1},{default:S(()=>[E(c,{class:"empty-content",name:e.t("contacts","There are no contacts yet")},{icon:S(()=>[E(u,{size:20})]),desc:S(()=>[E(h,{variant:"primary",onClick:s.newContact},{default:S(()=>[Z(O(e.t("contacts","Create contact")),1)]),_:1},8,["onClick"])]),_:1},8,["name"])]),_:1})):s.isEmptyGroup&&s.isRealGroup?(f(),T(d,{key:2},{default:S(()=>[E(c,{class:"empty-content",name:e.t("contacts","There are no contacts in this group")},{icon:S(()=>[E(u,{size:20})]),desc:S(()=>[s.contacts.length===0?(f(),T(h,{key:0,variant:"primary",onClick:o[0]||(o[0]=g=>s.addContactsToGroup(e.selectedGroup))},{default:S(()=>[Z(O(e.t("contacts","Create contacts")),1)]),_:1})):(f(),T(h,{key:1,variant:"primary",onClick:o[1]||(o[1]=g=>s.addContactsToGroup(e.selectedGroup))},{default:S(()=>[Z(O(e.t("contacts","Add contacts")),1)]),_:1}))]),_:1},8,["name"])]),_:1})):(f(),T(d,{key:3,"show-details":s.showDetails,"onUpdate:showDetails":s.hideDetails},{list:S(()=>[E(p,{list:r.contactsList,contacts:s.contacts,"search-query":a.searchQuery,"reload-bus":a.reloadBus},null,8,["list","contacts","search-query","reload-bus"])]),default:S(()=>[E(m,{"contact-key":e.selectedContact,contacts:s.sortedContacts,"reload-bus":a.reloadBus},null,8,["contact-key","contacts","reload-bus"])]),_:1},8,["show-details","onUpdate:showDetails"]))}const gI=tt(fI,[["render",mI],["__scopeId","data-v-493f9834"]]),yI={name:"AccountIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},vI=["aria-hidden","aria-label"],bI=["fill","width","height"],_I={d:"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z"},CI={key:0};function wI(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon account-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",_I,[r.title?(f(),k("title",CI,O(r.title),1)):R("",!0)])],8,bI))],16,vI)}const kI=tt(yI,[["render",wI]]),SI={name:"AccountMultipleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},xI=["aria-hidden","aria-label"],AI=["fill","width","height"],EI={d:"M16 17V19H2V17S2 13 9 13 16 17 16 17M12.5 7.5A3.5 3.5 0 1 0 9 11A3.5 3.5 0 0 0 12.5 7.5M15.94 13A5.32 5.32 0 0 1 18 17V19H22V17S22 13.37 15.94 13M15 4A3.39 3.39 0 0 0 13.07 4.59A5 5 0 0 1 13.07 10.41A3.39 3.39 0 0 0 15 11A3.5 3.5 0 0 0 15 4Z"},NI={key:0};function TI(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon account-multiple-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",EI,[r.title?(f(),k("title",NI,O(r.title),1)):R("",!0)])],8,AI))],16,xI)}const Cm=tt(SI,[["render",TI]]),MI={name:"AlertCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},II=["aria-hidden","aria-label"],OI=["fill","width","height"],LI={d:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z"},DI={key:0};function RI(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon alert-circle-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",LI,[r.title?(f(),k("title",DI,O(r.title),1)):R("",!0)])],8,OI))],16,II)}const wm=tt(MI,[["render",RI]]),PI={name:"NewCircleIntro",components:{CheckboxRadioSwitch:Qa,Modal:qn},props:{loading:{type:Boolean,default:!1}},data(){return{circleName:"",isPersonal:!1,isLocal:!1,CIRCLE_DESC:Sp}},computed:{isEmptyName(){return this.circleName.trim()===""},isGlobalScale(){return ay().circles?.status?.globalScale!==!1}},mounted(){this.$nextTick(()=>{this.$refs.input.focus(),this.$refs.input.select()})},methods:{onCancel(){this.$emit("close")},onSubmit(){this.$emit("submit",this.circleName,this.isPersonal,this.isLocal)}}},$I={class:"entity-picker"},VI={class:"entity-picker__new"},BI=["placeholder"],UI={class:"entity-picker__content"},HI={class:"entity-picker__navigation"},zI=["disabled"],GI=["disabled"];function FI(e,o,r,i,a,s){const l=w("CheckboxRadioSwitch"),c=w("Modal");return f(),T(c,{size:"normal",onClose:s.onCancel},{default:S(()=>[D("div",$I,[D("div",VI,[Yn(D("input",{ref:"input","onUpdate:modelValue":o[0]||(o[0]=d=>a.circleName=d),placeholder:e.t("contacts","New team name"),class:"entity-picker__new-input",type:"text",onKeypress:o[1]||(o[1]=pc((...d)=>s.onSubmit&&s.onSubmit(...d),["enter"]))},null,40,BI),[[gc,a.circleName]])]),D("div",UI,[D("p",null,O(a.CIRCLE_DESC),1),o[6]||(o[6]=D("br",null,null,-1)),R("",!0),s.isGlobalScale?(f(),k(_t,{key:1},[E(l,{"model-value":a.isLocal,"onUpdate:modelValue":o[3]||(o[3]=d=>a.isLocal=d),disabled:r.loading!==!1},{default:S(()=>[Z(O(e.t("contacts","Local team")),1)]),_:1},8,["model-value","disabled"]),D("p",null,O(e.t("contacts","This team will not be shared with the other instances of the global scale")),1)],64)):R("",!0)]),D("div",HI,[D("button",{disabled:r.loading,class:"navigation__button-left",onClick:o[4]||(o[4]=(...d)=>s.onCancel&&s.onCancel(...d))},O(e.t("contacts","Cancel")),9,zI),D("button",{disabled:s.isEmptyName||r.loading,class:"navigation__button-right primary",onClick:o[5]||(o[5]=(...d)=>s.onSubmit&&s.onSubmit(...d))},O(e.t("contacts","Create team")),9,GI)])])]),_:1},8,["onClose"])}const YI=tt(PI,[["render",FI],["__scopeId","data-v-877bbfbf"]]),XI={name:"IconRecentlyContacted",props:{title:{type:String,default:""},size:{type:Number,default:20},fillColor:{type:String,default:"currentColor"}}},jI=["aria-hidden","aria-label"],WI=["fill","width","height"];function qI(e,o,r,i,a,s){return f(),k("span",{"aria-hidden":!r.title,"aria-label":r.title,class:"material-design-icon icon-recently-contacted",role:"img"},[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 16 16"},[...o[0]||(o[0]=[D("path",{d:"M0 0h24v24H0V0z",fill:"none"},null,-1),D("path",{d:"M14 3v10h1V3zM12 13h1V3h-1zM1.7 3a.7.7 0 00-.7.7v8.6c0 .4.3.7.7.7h8.6c.4 0 .7-.3.7-.7V3.7a.7.7 0 00-.7-.7zM6 5a1.6 1.6 0 010 3.2A1.6 1.6 0 016 5zm0 4.4c1 0 3.2.6 3.2 1.6v.6H2.8V11c0-1 2.1-1.6 3.2-1.6z"},null,-1)])],8,WI))],8,jI)}const ZI=tt(XI,[["render",qI]]),JI={name:"AccountStarOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},KI=["aria-hidden","aria-label"],QI=["fill","width","height"],tO={d:"M15,4A4,4 0 0,1 19,8A4,4 0 0,1 15,12A4,4 0 0,1 11,8A4,4 0 0,1 15,4M15,5.9A2.1,2.1 0 0,0 12.9,8A2.1,2.1 0 0,0 15,10.1C16.16,10.1 17.1,9.16 17.1,8C17.1,6.84 16.16,5.9 15,5.9M15,13C17.67,13 23,14.33 23,17V20H7V17C7,14.33 12.33,13 15,13M15,14.9C12,14.9 8.9,16.36 8.9,17V18.1H21.1V17C21.1,16.36 17.97,14.9 15,14.9M5,13.28L2.5,14.77L3.18,11.96L1,10.08L3.87,9.83L5,7.19L6.11,9.83L9,10.08L6.8,11.96L7.45,14.77L5,13.28Z"},eO={key:0};function nO(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon account-star-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",tO,[r.title?(f(),k("title",eO,O(r.title),1)):R("",!0)])],8,QI))],16,KI)}const oO=tt(JI,[["render",nO]]),rO={name:"LocationEnterIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},iO=["aria-hidden","aria-label"],aO=["fill","width","height"],sO={d:"M14 12L10 8V11H2V13H10V16M22 12A10 10 0 0 1 2.46 15H4.59A8 8 0 1 0 4.59 9H2.46A10 10 0 0 1 22 12Z"},lO={key:0};function cO(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon location-enter-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",sO,[r.title?(f(),k("title",lO,O(r.title),1)):R("",!0)])],8,aO))],16,iO)}const dO=tt(rO,[["render",cO]]),uO={name:"CircleNavigationItem",components:{ActionButton:xn,ActionLink:ts,ActionText:wc,NcCounterBubble:ns,AppNavigationItem:kc,ExitToApp:X1,IconCog:gd,IconDelete:Sn,LocationEnter:dO,AccountStar:oO,AccountGroupOutline:as,IconLoading:We},mixins:[bd],props:{circle:{type:[vp,wd],required:!0}},computed:{memberCount(){return this.circle.populationInherited||0}}};function hO(e,o,r,i,a,s){const l=w("AccountStar"),c=w("AccountGroupOutline"),d=w("IconLoading"),u=w("ActionText"),h=w("IconCog"),p=w("ActionButton"),m=w("ActionLink"),g=w("ExitToApp"),_=w("LocationEnter"),C=w("IconDelete"),M=w("NcCounterBubble"),N=w("AppNavigationItem");return f(),T(N,{key:r.circle.key,name:r.circle.displayName,to:r.circle.router},{icon:S(()=>[r.circle.isOwner?(f(),T(l,{key:0,size:20})):(f(),T(c,{key:1,size:20}))]),actions:S(()=>[e.loadingAction?(f(),T(u,{key:0},{icon:S(()=>[E(d,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Loading …")),1)]),_:1})):(f(),k(_t,{key:1},[r.circle.canManageMembers?(f(),T(p,{key:0,"close-after-click":!0,onClick:e.addMemberToCircle},{icon:S(()=>[E(h,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Manage team")),1)]),_:1},8,["onClick"])):R("",!0),E(m,{href:e.circleUrl,icon:e.copyLinkIcon,onClick:o[0]||(o[0]=ae(P=>e.copyToClipboard(e.circleUrl),["stop","prevent"]))},{default:S(()=>[Z(O(e.copyButtonText),1)]),_:1},8,["href","icon"]),r.circle.canLeave?(f(),T(p,{key:1,onClick:e.confirmLeaveCircle},{icon:S(()=>[E(g,{size:16})]),default:S(()=>[Z(O(e.t("contacts","Leave team"))+" ",1)]),_:1},8,["onClick"])):!r.circle.isMember&&r.circle.canJoin?(f(),T(p,{key:2,disabled:e.loadingJoin,onClick:e.joinCircle},{icon:S(()=>[E(_,{size:16})]),default:S(()=>[Z(O(e.joinButtonTitle)+" ",1)]),_:1},8,["disabled","onClick"])):R("",!0),r.circle.canDelete?(f(),T(p,{key:3,onClick:e.confirmDeleteCircle},{icon:S(()=>[E(C,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Delete team")),1)]),_:1},8,["onClick"])):R("",!0)],64))]),counter:S(()=>[s.memberCount>0?(f(),T(M,{key:0,count:s.memberCount},null,8,["count"])):R("",!0)]),_:1},8,["name","to"])}const pO=tt(uO,[["render",hO]]),fO={name:"ShareVariantOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},mO=["aria-hidden","aria-label"],gO=["fill","width","height"],yO={d:"M18 16.08C17.24 16.08 16.56 16.38 16.04 16.85L8.91 12.7C8.96 12.47 9 12.24 9 12S8.96 11.53 8.91 11.3L15.96 7.19C16.5 7.69 17.21 8 18 8C19.66 8 21 6.66 21 5S19.66 2 18 2 15 3.34 15 5C15 5.24 15.04 5.47 15.09 5.7L8.04 9.81C7.5 9.31 6.79 9 6 9C4.34 9 3 10.34 3 12S4.34 15 6 15C6.79 15 7.5 14.69 8.04 14.19L15.16 18.34C15.11 18.55 15.08 18.77 15.08 19C15.08 20.61 16.39 21.91 18 21.91S20.92 20.61 20.92 19C20.92 17.39 19.61 16.08 18 16.08M18 4C18.55 4 19 4.45 19 5S18.55 6 18 6 17 5.55 17 5 17.45 4 18 4M6 13C5.45 13 5 12.55 5 12S5.45 11 6 11 7 11.45 7 12 6.55 13 6 13M18 20C17.45 20 17 19.55 17 19S17.45 18 18 18 19 18.45 19 19 18.55 20 18 20Z"},vO={key:0};function bO(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon share-variant-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",yO,[r.title?(f(),k("title",vO,O(r.title),1)):R("",!0)])],8,gO))],16,mO)}const _O=tt(fO,[["render",bO]]),CO={name:"SettingsAddressbookSharee",components:{NcButton:he,IconDelete:Sn,IconGroup:_o,IconLoading:We,IconUser:si},props:{addressbook:{type:Object,required:!0},sharee:{type:Object,required:!0}},data(){return{loading:!1}},computed:{writeable(){return this.sharee.writeable},uid(){return this.sharee.id+this.addressbook.id+Math.floor(Math.random()*1e3)}},methods:{async deleteSharee(){if(this.loading)return!1;this.loading=!0;try{await this.$store.dispatch("removeSharee",{addressbook:this.addressbook,uri:this.sharee.uri})}catch(e){console.error(e),bt(t("contacts","Unable to delete the share"))}finally{this.loading=!1}},async editSharee(){if(this.loading)return!1;this.loading=!0;try{await this.$store.dispatch("toggleShareeWritable",{addressbook:this.addressbook,uri:this.sharee.uri,writeable:!this.sharee.writeable})}catch(e){console.error(e),bt(t("contacts","Unable to change permissions"))}finally{this.loading=!1}}}},wO={class:"addressbook-sharee"},kO=["title"],SO={class:"addressbook-sharee__utils"},xO=["id","checked","disabled"],AO=["for","title"];function EO(e,o,r,i,a,s){const l=w("IconLoading"),c=w("IconGroup"),d=w("IconUser"),u=w("IconDelete"),h=w("NcButton");return f(),k("li",wO,[a.loading?(f(),T(l,{key:0,size:20})):r.sharee.isGroup&&!a.loading?(f(),T(c,{key:1})):!r.sharee.isGroup&&!a.loading?(f(),T(d,{key:2})):R("",!0),D("span",{class:"addressbook-sharee__identifier",title:r.sharee.displayName},O(r.sharee.displayName),9,kO),D("span",SO,[D("input",{id:s.uid,checked:s.writeable,disabled:a.loading,class:"checkbox",name:"editable",type:"checkbox",onChange:o[0]||(o[0]=(...p)=>s.editSharee&&s.editSharee(...p))},null,40,xO),D("label",{for:s.uid,title:e.t("contacts","can create and edit")},O(e.t("contacts","can create and edit")),9,AO),E(h,{class:ee({"addressbook-sharee__utils--disabled":a.loading}),href:"#",title:e.t("contacts","Delete"),onClick:s.deleteSharee},{icon:S(()=>[E(u,{size:20})]),_:1},8,["class","title","onClick"])])])}const NO=tt(CO,[["render",EO],["__scopeId","data-v-d2743672"]]),Qh=Yo("contacts","isGroupSharingEnabled",!1);function tp(e){return decodeURIComponent(e.replace(/\+/g," "))}const TO={name:"SettingsAddressbookShare",components:{NcSelectUsers:O2,AddressBookSharee:NO},props:{addressbook:{type:Object,default(){return{}}}},data(){return{isLoading:!1,inputGiven:!1,usersOrGroups:[]}},computed:{placeholder(){return Qh?t("contacts","Share with users or groups"):t("contacts","Share with users")},noResult(){return t("contacts","No users or groups")}},mounted(){document.getElementById("users-groups-search").focus()},methods:{shareAddressbook({user:e,displayName:o,uri:r,isGroup:i}){this.$store.dispatch("shareAddressbook",{addressbook:this.addressbook,user:e,displayName:o,uri:r,isGroup:i})},findSharee:$p(async function(e){if(this.isLoading=!0,this.usersOrGroups=[],e.length>0){const o=await Ji.principalPropertySearchByDisplayname(e);this.usersOrGroups=o.filter(r=>{const i=["INDIVIDUAL"];return Qh&&i.push("GROUP"),i.includes(r.calendarUserType)&&!this.addressbook.shares.some(a=>a.uri===r.principalScheme)}).map(r=>{const i=r.calendarUserType==="GROUP";return{user:tp(r[i?"groupId":"userId"]),displayName:r.displayname,icon:i?"icon-group":"icon-user",uri:tp(r.principalScheme),isGroup:i}}),this.isLoading=!1,this.inputGiven=!0}else this.inputGiven=!1,this.isLoading=!1},500)}},MO={class:"addressbook-shares"},IO={key:0,class:"addressbook-shares__list"};function OO(e,o,r,i,a,s){const l=w("NcSelectUsers"),c=w("AddressBookSharee");return f(),k("div",MO,[E(l,{id:"users-groups-search",options:a.usersOrGroups,searchable:!0,"internal-search":!1,"max-height":600,"show-no-results":!0,placeholder:s.placeholder,class:ee({showContent:a.inputGiven,"icon-loading":a.isLoading}),"get-option-key":d=>d.user,"open-direction":"bottom",label:"displayName",onSearch:s.findSharee,"onUpdate:modelValue":s.shareAddressbook},null,8,["options","placeholder","class","get-option-key","onSearch","onUpdate:modelValue"]),r.addressbook.shares.length>0?(f(),k("ul",IO,[(f(!0),k(_t,null,jt(r.addressbook.shares,d=>(f(),T(c,{key:d.uri,sharee:d,addressbook:r.addressbook},null,8,["sharee","addressbook"]))),128))])):R("",!0)])}const LO=tt(TO,[["render",OO],["__scopeId","data-v-e6862b5a"]]),DO={name:"SettingsAddressbook",components:{ActionButton:xn,ActionCheckbox:u0,ActionInput:Sc,ActionLink:ts,Actions:Co,NcButton:he,IconDelete:Sn,IconDownload:As,IconRename:sc,IconContactPlus:vm,IconShare:_O,IconLoading:We,ShareAddressBook:LO},mixins:[vd],props:{addressbook:{type:Object,default(){return{}}}},data(){return{deleteAddressbookLoading:!1,editingName:!1,menuOpen:!1,renameLoading:!1,shareOpen:!1,toggleEnabledLoading:!1}},computed:{enabled(){return this.addressbook.enabled},hasShares(){return this.addressbook.shares.length>0},addressbooks(){return this.$store.getters.getAddressbooks},hasMultipleAddressbooks(){return this.addressbooks.length>1},sharedWithTooltip(){return this.hasShares?n("contacts","Shared with {num} entity","Shared with {num} entities",this.addressbook.shares.length,{num:this.addressbook.shares.length}):""},copyNcButtonText(){return this.copied?this.copySuccess?t("contacts","Copied"):t("contacts","Cannot copy"):t("contacts","Copy link")},addressbookUrl(){return window.location.origin+this.addressbook.url},contacts(){return Object.values(this.addressbook.contacts)},groups(){const e=this.contacts.flatMap(o=>o.vCard.getAllProperties("categories").map(r=>r.getFirstValue()));return[...new Set(e)]},contactsCount(){return this.contacts.length},groupsCount(){return this.groups.length},principalUrl(){return xp().currentUserPrincipal.principalUrl},isSharedWithMe(){return this.addressbook.owner!==this.principalUrl}},watch:{menuOpen(){this.menuOpen===!1&&(this.editingName=!1)}},mounted(){this.popupItem=this.$el},methods:{closeMenu(){this.menuOpen=!1},toggleMenu(){this.menuOpen=!this.menuOpen},toggleShare(){this.shareOpen=!this.shareOpen},async toggleAddressbookEnabled(){this.toggleEnabledLoading=!0;try{await this.$store.dispatch("toggleAddressbookEnabled",this.addressbook)}catch(e){console.error(e),bt(t("contacts","Toggling of address book was not successful"))}finally{this.toggleEnabledLoading=!1}},confirmDeletion(){window.OC.dialogs.confirm(t("contacts","This will delete the address book and every contacts within it"),t("contacts","Delete {addressbook}?",{addressbook:this.addressbook.displayName}),this.deleteAddressbook,!0)},confirmUnshare(){window.OC.dialogs.confirm(t("contacts","This will unshare the address book and every contacts within it"),t("contacts","Unshare {addressbook}?",{addressbook:this.addressbook.displayName}),this.deleteAddressbook,!0)},async deleteAddressbook(e){if(e){this.deleteAddressbookLoading=!0;try{await this.$store.dispatch("deleteAddressbook",this.addressbook)}catch(o){console.error(o),bt(t("contacts","Deletion of address book was not successful."))}finally{this.deleteAddressbookLoading=!1}}},renameAddressbook(){this.editingName=!0},async updateAddressbookName(){const e=this.addressbook,o=this.$refs.renameInput.$el.querySelector('input[type="text"]').value;this.renameLoading=!0;try{await this.$store.dispatch("renameAddressbook",{addressbook:e,newName:o})}catch(r){console.error(r),bt(t("contacts","Renaming of address book was not successful."))}finally{this.editingName=!1,this.renameLoading=!1,this.menuOpen=!1}}}},RO={class:"settings-addressbook-list"},PO={class:"addressbook__content"},$O=["title"],VO={key:0,class:"addressbook__description"},BO={key:1,class:"addressbook__count-wrapper"},UO={class:"addressbook__count"},HO={class:"addressbook__count"};function zO(e,o,r,i,a,s){const l=w("IconContactPlus"),c=w("IconShare"),d=w("NcButton"),u=w("ActionLink"),h=w("IconDownload"),p=w("ActionCheckbox"),m=w("IconLoading"),g=w("ActionButton"),_=w("IconRename"),C=w("ActionInput"),M=w("IconDelete"),N=w("Actions"),P=w("ShareAddressBook"),V=Dp("tooltip");return f(),k("div",RO,[E(l,{class:"settings-line__icon"}),D("li",{class:ee([{"addressbook--disabled":!r.addressbook.enabled},"addressbook"])},[D("div",PO,[D("span",{class:"addressbook__name",title:r.addressbook.displayName},O(r.addressbook.enabled?r.addressbook.displayName:e.t("contacts","{addressbookname} (Hidden)",{addressbookname:r.addressbook.displayName})),9,$O),r.addressbook.dav.description?(f(),k("div",VO,O(r.addressbook.dav.description),1)):R("",!0),r.addressbook.enabled?(f(),k("div",BO,[D("span",UO,O(e.n("contacts","%n contact","%n contacts",s.contactsCount)),1),D("span",HO,"- "+O(e.n("contacts","%n group","%n groups",s.groupsCount)),1)])):R("",!0)]),!r.addressbook.readOnly&&!s.isSharedWithMe?Yn((f(),T(d,{key:0,class:ee([{"addressbook__share--shared":s.hasShares},"addressbook__share"]),name:s.sharedWithTooltip,href:"#",onClick:s.toggleShare},{icon:S(()=>[E(c,{size:20})]),_:1},8,["class","name","onClick"])),[[V,s.sharedWithTooltip,void 0,{top:!0}]]):R("",!0),E(N,{class:"addressbook__menu","menu-align":"right"},{default:S(()=>[E(u,{href:r.addressbook.url,icon:e.copyLinkIcon,onClick:o[0]||(o[0]=ae(K=>e.copyToClipboard(s.addressbookUrl),["stop","prevent"]))},{default:S(()=>[Z(O(s.copyNcButtonText),1)]),_:1},8,["href","icon"]),E(u,{href:r.addressbook.url+"?export"},{icon:S(()=>[E(h,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Download")),1)]),_:1},8,["href"]),r.addressbook.writeProps?(f(),k(_t,{key:0},[a.toggleEnabledLoading?(f(),T(g,{key:1},{icon:S(()=>[E(m,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Show")),1)]),_:1})):(f(),T(p,{key:0,"model-value":s.enabled,"onUpdate:modelValue":s.toggleAddressbookEnabled},{default:S(()=>[Z(O(e.t("contacts","Show")),1)]),_:1},8,["model-value","onUpdate:modelValue"]))],64)):R("",!0),r.addressbook.readOnly?R("",!0):(f(),k(_t,{key:1},[a.editingName?(f(),T(C,{key:1,ref:"renameInput",disabled:a.renameLoading,value:r.addressbook.displayName,onSubmit:s.updateAddressbookName},{icon:S(()=>[a.renameLoading?(f(),T(m,{key:0,size:20})):R("",!0),E(_,{size:20})]),_:1},8,["disabled","value","onSubmit"])):(f(),T(g,{key:0,onClick:ae(s.renameAddressbook,["stop","prevent"])},{icon:S(()=>[E(_,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Rename")),1)]),_:1},8,["onClick"]))],64)),s.hasMultipleAddressbooks&&r.addressbook.owner!==s.principalUrl&&r.addressbook.owner!=="/remote.php/dav/principals/system/system/"?(f(),T(g,{key:2,onClick:s.confirmUnshare},{icon:S(()=>[a.deleteAddressbookLoading?(f(),T(m,{key:0,size:20})):R("",!0),E(M,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Unshare from me")),1)]),_:1},8,["onClick"])):s.hasMultipleAddressbooks&&r.addressbook.owner!=="/remote.php/dav/principals/system/system/"?(f(),T(g,{key:3,onClick:s.confirmDeletion},{icon:S(()=>[a.deleteAddressbookLoading?(f(),T(m,{key:0,size:20})):R("",!0),E(M,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Delete")),1)]),_:1},8,["onClick"])):R("",!0)]),_:1}),a.shareOpen&&!r.addressbook.readOnly?(f(),T(P,{key:1,addressbook:r.addressbook},null,8,["addressbook"])):R("",!0)],2)])}const GO=tt(DO,[["render",zO],["__scopeId","data-v-5f111cbd"]]),FO=oe.CancelToken,YO=ac(t("contacts","Choose a vCard file to import")).setMultiSelect(!1).setType(1).allowDirectories(!1).addMimeTypeFilter("text/vcard").build(),XO={name:"SettingsImportContacts",components:{NcButton:he,Modal:qn,NcSelect:wo,IconUpload:gm,IconError:wm,IconFolder:yd,IconLoading:We},data(){return{cancelRequest:()=>{},importDestination:!1,isOpened:!1,loading:!1}},computed:{addressbooks(){return this.$store.getters.getAddressbooks},availableAddressbooks(){return this.addressbooks.filter(e=>!e.readOnly&&e.enabled)},options(){return this.availableAddressbooks.map(e=>({id:e.id,displayName:e.displayName}))},selectedAddressbook:{get(){return this.importDestination?this.availableAddressbooks.find(e=>e.id===this.importDestination.id):this.availableAddressbooks[0]},set(e){this.importDestination=e}},selectedAddressbookOption:{get(){return this.options.find(e=>e.id===this.selectedAddressbook.id)},set(e){this.selectedAddressbook=this.availableAddressbooks.find(o=>o.id===e.id)}},isSingleAddressbook(){return this.options.length===1},isNoAddressbookAvailable(){return this.options.length<1},importState(){return this.$store.getters.getImportState},isImporting(){return this.importState.stage!=="default"}},async mounted(){if(this.$route.name==="import"){const e=this.$route.query.file;await this.processLocalFile(e),this.$router.push({name:"group",params:{selectedGroup:t("contacts","All contacts")}})}},methods:{processFile(e){this.loading=!0,this.$store.dispatch("changeStage","parsing");const o=e.target.files[0],r=new FileReader,i=this.selectedAddressbook;this.$store.dispatch("setAddressbook",i.displayName),r.onload=()=>{this.isOpened=!1,this.$store.dispatch("importContactsIntoAddressbook",{vcf:r.result,addressbook:i}),e.target.value="",this.resetState()},r.readAsText(o)},async processLocalFile(e){console.debug("Importing",e);try{this.cancelRequest();const o=FO.source();this.cancelRequest=o.cancel;const r=await oe.get(Ca(`dav/files/${br().uid}`)+_p(e),{cancelToken:o.token}),i=this.selectedAddressbook;this.$store.dispatch("changeStage","parsing"),this.$store.dispatch("setAddressbook",i.displayName),r.data&&await this.$store.dispatch("importContactsIntoAddressbook",{vcf:r.data,addressbook:i})}catch(o){console.error("Something wrong happened while processing local file",o)}},toggleModal(){this.isOpened=!this.isOpened,this.isOpened||this.cancelRequest()},clickImportInput(){this.$refs["contact-import-input"].click()},async openPicker(){try{this.cancelRequest();const e=await YO.pick();e&&(this.loading=!0,await this.processLocalFile(e)),this.resetState()}catch(e){this.loading=!1,console.error("Something wrong happened while picking a file",e)}},resetState(){this.cancelRequest=()=>{},this.importDestination=!1,this.isOpened=!1,this.loading=!1}}},jO={class:"import-contact"},WO={class:"import-contact__modal-addressbook"},qO={class:"import-contact__modal-pick"},ZO=["disabled"];function JO(e,o,r,i,a,s){const l=w("IconUpload"),c=w("NcButton"),d=w("NcSelect"),u=w("IconLoading"),h=w("IconFolder"),p=w("Modal"),m=w("IconError");return f(),k("div",jO,[s.isNoAddressbookAvailable?(f(),T(c,{key:1,id:"upload",for:"contact-import",class:"button import-contact__button-disabled import-contact__multiselect-label import-contact__multiselect--no-select"},{icon:S(()=>[E(m,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Importing is disabled because there are no address books available")),1)]),_:1})):(f(),k(_t,{key:0},[E(c,{class:"import-contact__button-main",onClick:s.toggleModal},{icon:S(()=>[E(l,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Import contacts")),1)]),_:1},8,["onClick"]),a.isOpened?(f(),T(p,{key:0,ref:"modal",class:"import-contact__modal",name:e.t("contacts","Import contacts"),onClose:s.toggleModal},{default:S(()=>[D("section",WO,[D("h2",null,O(e.t("contacts","Import contacts")),1),s.isSingleAddressbook?R("",!0):(f(),T(d,{key:0,id:"select-addressbook",modelValue:s.selectedAddressbookOption,"onUpdate:modelValue":o[0]||(o[0]=g=>s.selectedAddressbookOption=g),"allow-empty":!1,clearable:!1,options:s.options,disabled:s.isSingleAddressbook||s.isImporting,placeholder:e.t("contacts","Contacts"),label:"displayName",class:"import-contact__modal-addressbook__select"},{"selected-option":S(({displayName:g})=>[D("span",null,O(e.t("contacts","Import into the {addressbookName} address book",{addressbookName:g})),1)]),_:1},8,["modelValue","options","disabled","placeholder"]))]),D("section",qO,[D("input",{id:"contact-import",ref:"contact-import-input",disabled:a.loading||s.isImporting,type:"file",class:"hidden-visually",onChange:o[1]||(o[1]=(...g)=>s.processFile&&s.processFile(...g))},null,40,ZO),E(c,{disabled:a.loading,class:"import-contact__button import-contact__button--local",onClick:s.clickImportInput},{icon:S(()=>[E(l,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Select local file")),1)]),_:1},8,["disabled","onClick"]),E(c,{variant:"primary",disabled:a.loading,class:"import-contact__button import-contact__button--files",onClick:s.openPicker},{icon:S(()=>[a.loading?(f(),T(u,{key:0,size:20})):R("",!0),E(h,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Import from files")),1)]),_:1},8,["disabled","onClick"])])]),_:1},8,["name","onClose"])):R("",!0)],64))])}const km=tt(XO,[["render",JO],["__scopeId","data-v-cc79ea03"]]),KO={name:"LoadingIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},QO=["aria-hidden","aria-label"],t7=["fill","width","height"],e7={d:"M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z"},n7={key:0};function o7(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon loading-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",e7,[r.title?(f(),k("title",n7,O(r.title),1)):R("",!0)])],8,t7))],16,QO)}const r7=tt(KO,[["render",o7]]),i7={name:"SettingsNewAddressbook",components:{NcInputField:Bp,IconAdd:Rr,IconLoading:r7,NcButton:he,NcModal:qn},data(){return{loading:!1,displayName:"",modalOpen:!1}},computed:{inputErrorState(){return this.displayName===""?!1:/[/\\]/.test(this.displayName)}},methods:{openModal(){this.modalOpen=!0},onModalCancel(){this.modalOpen=!1,this.displayName="",this.loading=!1},async onModalSubmit(){await this.addAddressbook(),this.modalOpen=!1},addAddressbook(){this.displayName!==""&&(this.loading=!0,this.$store.dispatch("appendAddressbook",{displayName:this.displayName}).then(()=>{this.displayName="",this.loading=!1}).catch(e=>{console.error(e),bt(t("contacts","An error occurred, unable to create the address book")),this.loading=!1}))}}},a7={class:"new-addressbook-entry"},s7={class:"new-addressbook-modal"},l7={class:"new-addressbook-modal__buttons"};function c7(e,o,r,i,a,s){const l=w("IconAdd"),c=w("NcButton"),d=w("IconLoading"),u=w("NcInputField"),h=w("NcModal");return f(),k("div",a7,[!a.modalOpen&&!a.loading?(f(),T(c,{key:0,onClick:s.openModal},{icon:S(()=>[E(l,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","New address book")),1)]),_:1},8,["onClick"])):R("",!0),a.loading?(f(),T(d,{key:1,size:20})):R("",!0),a.modalOpen?(f(),T(h,{key:2,size:"small",onClose:s.onModalCancel},{default:S(()=>[D("div",s7,[E(u,{"model-value":a.displayName,"onUpdate:modelValue":o[0]||(o[0]=p=>a.displayName=p),class:"new-addressbook",disabled:a.loading,label:e.t("contacts","Add new address book"),type:"text",autocomplete:"off",autocorrect:"off",spellcheck:"false"},null,8,["model-value","disabled","label"]),D("div",l7,[E(c,{variant:"tertiary",disabled:a.loading,onClick:s.onModalCancel},{default:S(()=>[Z(O(e.t("contacts","Cancel")),1)]),_:1},8,["disabled","onClick"]),E(c,{variant:"primary",disabled:a.loading||s.inputErrorState,onClick:s.onModalSubmit},{default:S(()=>[Z(O(e.t("contacts","Add")),1)]),_:1},8,["disabled","onClick"])])])]),_:1},8,["onClose"])):R("",!0)])}const d7=tt(i7,[["render",c7],["__scopeId","data-v-ebe06029"]]),u7={name:"SettingsSortContacts",components:{NcFormBox:Qp,NcSelect:wo},data(){return{selected:null}},computed:{options(){return[{label:t("contacts","First name"),value:"firstName"},{label:t("contacts","Last name"),value:"lastName"},{label:t("contacts","Phonetic first name"),value:"phoneticFirstName"},{label:t("contacts","Phonetic last name"),value:"phoneticLastName"},{label:t("contacts","Display name"),value:"displayName"},{label:t("contacts","Last modified"),value:"rev"}]}},beforeMount(){this.selected=this.options.find(e=>e.value===this.$store.getters.getOrderKey)??null},methods:{sortContacts(e){const o=e&&e.value?e.value:"displayName";this.$store.commit("setOrder",o),this.$store.commit("sortContacts"),localStorage.setItem("orderKey",o)}}},h7={class:"sort-contacts"},p7={for:"sort-by",class:"sort-contacts__label"};function f7(e,o,r,i,a,s){const l=w("NcSelect"),c=w("NcFormBox");return f(),T(c,null,{default:S(()=>[D("div",h7,[D("label",p7,O(e.t("contacts","Sort contacts by")),1),E(l,{id:"sort-by",modelValue:a.selected,"onUpdate:modelValue":[o[0]||(o[0]=d=>a.selected=d),s.sortContacts],searchable:!1,"allow-empty":!1,options:s.options,label:"label"},null,8,["modelValue","options","onUpdate:modelValue"])])]),_:1})}const m7=tt(u7,[["render",f7],["__scopeId","data-v-71d3c71e"]]),g7={name:"ContactsSettings",components:{AppSettingsDialog:sy,AppSettingsSection:Vv,NcFormBox:Qp,NcFormBoxSwitch:u2,SettingsAddressbook:GO,SettingsNewAddressbook:d7,SettingsImportContacts:km,SettingsSortContacts:m7},props:{open:{required:!0,type:Boolean}},data(){return{allowSocialSync:Yo("contacts","allowSocialSync")!=="no",enableSocialSync:Yo("contacts","enableSocialSync")!=="no",enableSocialSyncLoading:!1,showSettings:!1}},computed:{addressbooks(){return this.$store.getters.getAddressbooks}},watch:{showSettings(e){e||this.$emit("update:open",e)},async open(e){e&&await this.onOpen()}},methods:{onClickImport(e){this.$emit("clicked",e)},async toggleSocialSync(e){this.enableSocialSyncLoading=!0;const o=e?"yes":"no";try{await oe.put(Fo("apps/contacts/api/v1/social/config/user/enableSocialSync"),{allow:o}),ai(t("contacts","Setting saved"))}catch{bt(t("contacts","Failed to save setting")),this.enableSocialSync=!e}finally{this.enableSocialSyncLoading=!1}},onLoad(){this.$emit("file-loaded",!1)},async onOpen(){this.showSettings=!0}}},y7={id:"addressbook-list",class:"addressbook-list"};function v7(e,o,r,i,a,s){const l=w("SettingsSortContacts"),c=w("NcFormBoxSwitch"),d=w("NcFormBox"),u=w("SettingsImportContacts"),h=w("AppSettingsSection"),p=w("SettingsAddressbook"),m=w("SettingsNewAddressbook"),g=w("AppSettingsDialog");return f(),T(g,{id:"app-settings-dialog",open:a.showSettings,"onUpdate:open":o[1]||(o[1]=_=>a.showSettings=_),name:e.t("contacts","Contacts settings"),"show-navigation":!0},{default:S(()=>[E(h,{id:"general",name:e.t("contacts","General")},{default:S(()=>[E(l),E(d,null,{default:S(()=>[E(c,{modelValue:a.enableSocialSync,"onUpdate:modelValue":[o[0]||(o[0]=_=>a.enableSocialSync=_),s.toggleSocialSync],label:e.t("contacts","Update avatars from social media"),description:e.t("contacts","Refreshed once per week"),loading:a.enableSocialSyncLoading,disabled:a.enableSocialSyncLoading},null,8,["modelValue","label","description","loading","disabled","onUpdate:modelValue"])]),_:1}),E(u,{addressbooks:s.addressbooks,onClicked:s.onClickImport,onFileLoaded:s.onLoad},null,8,["addressbooks","onClicked","onFileLoaded"])]),_:1},8,["name"]),E(h,{id:"address-books",name:e.t("contacts","Address books")},{default:S(()=>[D("ul",y7,[(f(!0),k(_t,null,jt(s.addressbooks,_=>(f(),T(p,{key:_.id,addressbook:_},null,8,["addressbook"]))),128))]),E(m,{class:"settings-new-addressbook",addressbooks:s.addressbooks},null,8,["addressbooks"])]),_:1},8,["name"])]),_:1},8,["open","name"])}const b7=tt(g7,[["render",v7],["__scopeId","data-v-5e2430d6"]]);var ql={exports:{}},_7=ql.exports,ep;function C7(){return ep||(ep=1,(function(e,o){(function(r,i){e.exports=i()})(_7,function(){return function r(i,a,s){var l=window,c="application/octet-stream",d=s||c,u=i,h=!a&&!s&&u,p=document.createElement("a"),m=function(pt){return String(pt)},g=l.Blob||l.MozBlob||l.WebKitBlob||m,_=a||"download",C,M;if(g=g.call?g.bind(l):Blob,String(this)==="true"&&(u=[u,d],d=u[0],u=u[1]),h&&h.length<2048&&(_=h.split("/").pop().split("?")[0],p.href=h,p.href.indexOf(h)!==-1)){var N=new XMLHttpRequest;return N.open("GET",h,!0),N.responseType="blob",N.onload=function(pt){r(pt.target.response,_,c)},setTimeout(function(){N.send()},0),N}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u))if(u.length>1024*1024*1.999&&g!==m)u=X(u),d=u.type||c;else return navigator.msSaveBlob?navigator.msSaveBlob(X(u),_):rt(u);else if(/([\x80-\xff])/.test(u)){var P=0,V=new Uint8Array(u.length),K=V.length;for(P;P<K;++P)V[P]=u.charCodeAt(P);u=new g([V],{type:d})}C=u instanceof g?u:new g([u],{type:d});function X(pt){var it=pt.split(/[:;,]/),et=it[1],ut=it[2]=="base64"?atob:decodeURIComponent,L=ut(it.pop()),q=L.length,H=0,I=new Uint8Array(q);for(H;H<q;++H)I[H]=L.charCodeAt(H);return new g([I],{type:et})}function rt(pt,it){if("download"in p)return p.href=pt,p.setAttribute("download",_),p.className="download-js-link",p.innerHTML="downloading...",p.style.display="none",document.body.appendChild(p),setTimeout(function(){p.click(),document.body.removeChild(p),it===!0&&setTimeout(function(){l.URL.revokeObjectURL(p.href)},250)},66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(pt)&&(pt="data:"+pt.replace(/^data:([\w\/\-\+]+)/,c)),window.open(pt)||confirm(`Displaying New Document Use Save As... to download, then click back to return to this page.`)&&(location.href=pt),!0;var et=document.createElement("iframe");document.body.appendChild(et),!it&&/^data:/.test(pt)&&(pt="data:"+pt.replace(/^data:([\w\/\-\+]+)/,c)),et.src=pt,setTimeout(function(){document.body.removeChild(et)},333)}if(navigator.msSaveBlob)return navigator.msSaveBlob(C,_);if(l.URL)rt(l.URL.createObjectURL(C),!0);else{if(typeof C=="string"||C.constructor===m)try{return rt("data:"+d+";base64,"+l.btoa(C))}catch{return rt("data:"+d+","+encodeURIComponent(C))}M=new FileReader,M.onload=function(pt){rt(this.result)},M.readAsDataURL(C)}return!0}})})(ql)),ql.exports}var w7=C7();const k7=Ka(w7);var Sm;function ft(){return Sm.apply(null,arguments)}function S7(e){Sm=e}function hn(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function zo(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function Rt(e,o){return Object.prototype.hasOwnProperty.call(e,o)}function Nd(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var o;for(o in e)if(Rt(e,o))return!1;return!0}function Ue(e){return e===void 0}function jn(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Ii(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function xm(e,o){var r=[],i,a=e.length;for(i=0;i<a;++i)r.push(o(e[i],i));return r}function ho(e,o){for(var r in o)Rt(o,r)&&(e[r]=o[r]);return Rt(o,"toString")&&(e.toString=o.toString),Rt(o,"valueOf")&&(e.valueOf=o.valueOf),e}function En(e,o,r,i){return zm(e,o,r,i,!0).utc()}function x7(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function kt(e){return e._pf==null&&(e._pf=x7()),e._pf}var Zl;Array.prototype.some?Zl=Array.prototype.some:Zl=function(e){var o=Object(this),r=o.length>>>0,i;for(i=0;i<r;i++)if(i in o&&e.call(this,o[i],i,o))return!0;return!1};function Td(e){var o=null,r=!1,i=e._d&&!isNaN(e._d.getTime());if(i&&(o=kt(e),r=Zl.call(o.parsedDateParts,function(a){return a!=null}),i=o.overflow<0&&!o.empty&&!o.invalidEra&&!o.invalidMonth&&!o.invalidWeekday&&!o.weekdayMismatch&&!o.nullInput&&!o.invalidFormat&&!o.userInvalidated&&(!o.meridiem||o.meridiem&&r),e._strict&&(i=i&&o.charsLeftOver===0&&o.unusedTokens.length===0&&o.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=i;else return i;return e._isValid}function Es(e){var o=En(NaN);return e!=null?ho(kt(o),e):kt(o).userInvalidated=!0,o}var np=ft.momentProperties=[],sl=!1;function Md(e,o){var r,i,a,s=np.length;if(Ue(o._isAMomentObject)||(e._isAMomentObject=o._isAMomentObject),Ue(o._i)||(e._i=o._i),Ue(o._f)||(e._f=o._f),Ue(o._l)||(e._l=o._l),Ue(o._strict)||(e._strict=o._strict),Ue(o._tzm)||(e._tzm=o._tzm),Ue(o._isUTC)||(e._isUTC=o._isUTC),Ue(o._offset)||(e._offset=o._offset),Ue(o._pf)||(e._pf=kt(o)),Ue(o._locale)||(e._locale=o._locale),s>0)for(r=0;r<s;r++)i=np[r],a=o[i],Ue(a)||(e[i]=a);return e}function Oi(e){Md(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),sl===!1&&(sl=!0,ft.updateOffset(this),sl=!1)}function pn(e){return e instanceof Oi||e!=null&&e._isAMomentObject!=null}function Am(e){ft.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function Ke(e,o){var r=!0;return ho(function(){if(ft.deprecationHandler!=null&&ft.deprecationHandler(null,e),r){var i=[],a,s,l,c=arguments.length;for(s=0;s<c;s++){if(a="",typeof arguments[s]=="object"){a+=` [`+s+"] ";for(l in arguments[0])Rt(arguments[0],l)&&(a+=l+": "+arguments[0][l]+", ");a=a.slice(0,-2)}else a=arguments[s];i.push(a)}Am(e+` Arguments: `+Array.prototype.slice.call(i).join("")+` `+new Error().stack),r=!1}return o.apply(this,arguments)},o)}var op={};function Em(e,o){ft.deprecationHandler!=null&&ft.deprecationHandler(e,o),op[e]||(Am(o),op[e]=!0)}ft.suppressDeprecationWarnings=!1,ft.deprecationHandler=null;function Nn(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function A7(e){var o,r;for(r in e)Rt(e,r)&&(o=e[r],Nn(o)?this[r]=o:this["_"+r]=o);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Jl(e,o){var r=ho({},e),i;for(i in o)Rt(o,i)&&(zo(e[i])&&zo(o[i])?(r[i]={},ho(r[i],e[i]),ho(r[i],o[i])):o[i]!=null?r[i]=o[i]:delete r[i]);for(i in e)Rt(e,i)&&!Rt(o,i)&&zo(e[i])&&(r[i]=ho({},r[i]));return r}function Id(e){e!=null&&this.set(e)}var Kl;Object.keys?Kl=Object.keys:Kl=function(e){var o,r=[];for(o in e)Rt(e,o)&&r.push(o);return r};var E7={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function N7(e,o,r){var i=this._calendar[e]||this._calendar.sameElse;return Nn(i)?i.call(o,r):i}function vn(e,o,r){var i=""+Math.abs(e),a=o-i.length,s=e>=0;return(s?r?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+i}var Od=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ji=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ll={},fr={};function yt(e,o,r,i){var a=i;typeof i=="string"&&(a=function(){return this[i]()}),e&&(fr[e]=a),o&&(fr[o[0]]=function(){return vn(a.apply(this,arguments),o[1],o[2])}),r&&(fr[r]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function T7(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function M7(e){var o=e.match(Od),r,i;for(r=0,i=o.length;r<i;r++)fr[o[r]]?o[r]=fr[o[r]]:o[r]=T7(o[r]);return function(a){var s="",l;for(l=0;l<i;l++)s+=Nn(o[l])?o[l].call(a,e):o[l];return s}}function ma(e,o){return e.isValid()?(o=Nm(o,e.localeData()),ll[o]=ll[o]||M7(o),ll[o](e)):e.localeData().invalidDate()}function Nm(e,o){var r=5;function i(a){return o.longDateFormat(a)||a}for(ji.lastIndex=0;r>=0&&ji.test(e);)e=e.replace(ji,i),ji.lastIndex=0,r-=1;return e}var I7={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function O7(e){var o=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return o||!r?o:(this._longDateFormat[e]=r.match(Od).map(function(i){return i==="MMMM"||i==="MM"||i==="DD"||i==="dddd"?i.slice(1):i}).join(""),this._longDateFormat[e])}var L7="Invalid date";function D7(){return this._invalidDate}var R7="%d",P7=/\d{1,2}/;function $7(e){return this._ordinal.replace("%d",e)}var V7={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function B7(e,o,r,i){var a=this._relativeTime[r];return Nn(a)?a(e,o,r,i):a.replace(/%d/i,e)}function U7(e,o){var r=this._relativeTime[e>0?"future":"past"];return Nn(r)?r(o):r.replace(/%s/i,o)}var rp={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function on(e){return typeof e=="string"?rp[e]||rp[e.toLowerCase()]:void 0}function Ld(e){var o={},r,i;for(i in e)Rt(e,i)&&(r=on(i),r&&(o[r]=e[i]));return o}var H7={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function z7(e){var o=[],r;for(r in e)Rt(e,r)&&o.push({unit:r,priority:H7[r]});return o.sort(function(i,a){return i.priority-a.priority}),o}var Tm=/\d/,Xe=/\d\d/,Mm=/\d{3}/,Ql=/\d{4}/,Va=/[+-]?\d{6}/,qt=/\d\d?/,ip=/\d\d\d\d?/,ap=/\d\d\d\d\d\d?/,ga=/\d{1,3}/,tc=/\d{1,4}/,Ba=/[+-]?\d{1,6}/,cr=/\d+/,Ua=/[+-]?\d+/,G7=/Z|[+-]\d\d:?\d\d/gi,ya=/Z|[+-]\d\d(?::?\d\d)?/gi,F7=/[+-]?\d+(\.\d{1,3})?/,Li=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Dr=/^[1-9]\d?/,Dd=/^([1-9]\d|\d)/,Ha;Ha={};function mt(e,o,r){Ha[e]=Nn(o)?o:function(i,a){return i&&r?r:o}}function Y7(e,o){return Rt(Ha,e)?Ha[e](o._strict,o._locale):new RegExp(X7(e))}function X7(e){return zn(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(o,r,i,a,s){return r||i||a||s}))}function zn(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Je(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function It(e){var o=+e,r=0;return o!==0&&isFinite(o)&&(r=Je(o)),r}var ec={};function Yt(e,o){var r,i=o,a;for(typeof e=="string"&&(e=[e]),jn(o)&&(i=function(s,l){l[o]=It(s)}),a=e.length,r=0;r<a;r++)ec[e[r]]=i}function _i(e,o){Yt(e,function(r,i,a,s){a._w=a._w||{},o(r,a._w,a,s)})}function j7(e,o,r){o!=null&&Rt(ec,e)&&ec[e](o,r._a,r,e)}function Ns(e){return e%4===0&&e%100!==0||e%400===0}var Ie=0,$n=1,_n=2,ve=3,dn=4,Vn=5,Vo=6,W7=7,q7=8;yt("Y",0,0,function(){var e=this.year();return e<=9999?vn(e,4):"+"+e}),yt(0,["YY",2],0,function(){return this.year()%100}),yt(0,["YYYY",4],0,"year"),yt(0,["YYYYY",5],0,"year"),yt(0,["YYYYYY",6,!0],0,"year"),mt("Y",Ua),mt("YY",qt,Xe),mt("YYYY",tc,Ql),mt("YYYYY",Ba,Va),mt("YYYYYY",Ba,Va),Yt(["YYYYY","YYYYYY"],Ie),Yt("YYYY",function(e,o){o[Ie]=e.length===2?ft.parseTwoDigitYear(e):It(e)}),Yt("YY",function(e,o){o[Ie]=ft.parseTwoDigitYear(e)}),Yt("Y",function(e,o){o[Ie]=parseInt(e,10)});function ii(e){return Ns(e)?366:365}ft.parseTwoDigitYear=function(e){return It(e)+(It(e)>68?1900:2e3)};var sp=Br("FullYear",!0);function Z7(){return Ns(this.year())}function Br(e,o){return function(r){return r!=null?(Im(this,e,r),ft.updateOffset(this,o),this):Ci(this,e)}}function Ci(e,o){if(!e.isValid())return NaN;var r=e._d,i=e._isUTC;switch(o){case"Milliseconds":return i?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return i?r.getUTCSeconds():r.getSeconds();case"Minutes":return i?r.getUTCMinutes():r.getMinutes();case"Hours":return i?r.getUTCHours():r.getHours();case"Date":return i?r.getUTCDate():r.getDate();case"Day":return i?r.getUTCDay():r.getDay();case"Month":return i?r.getUTCMonth():r.getMonth();case"FullYear":return i?r.getUTCFullYear():r.getFullYear();default:return NaN}}function Im(e,o,r){var i,a,s,l,c;if(!(!e.isValid()||isNaN(r))){switch(i=e._d,a=e._isUTC,o){case"Milliseconds":return void(a?i.setUTCMilliseconds(r):i.setMilliseconds(r));case"Seconds":return void(a?i.setUTCSeconds(r):i.setSeconds(r));case"Minutes":return void(a?i.setUTCMinutes(r):i.setMinutes(r));case"Hours":return void(a?i.setUTCHours(r):i.setHours(r));case"Date":return void(a?i.setUTCDate(r):i.setDate(r));case"FullYear":break;default:return}s=r,l=e.month(),c=e.date(),c=c===29&&l===1&&!Ns(s)?28:c,a?i.setUTCFullYear(s,l,c):i.setFullYear(s,l,c)}}function J7(e){return e=on(e),Nn(this[e])?this[e]():this}function K7(e,o){if(typeof e=="object"){e=Ld(e);var r=z7(e),i,a=r.length;for(i=0;i<a;i++)this[r[i].unit](e[r[i].unit])}else if(e=on(e),Nn(this[e]))return this[e](o);return this}function Q7(e,o){return(e%o+o)%o}var de;Array.prototype.indexOf?de=Array.prototype.indexOf:de=function(e){var o;for(o=0;o<this.length;++o)if(this[o]===e)return o;return-1};function Rd(e,o){if(isNaN(e)||isNaN(o))return NaN;var r=Q7(o,12);return e+=(o-r)/12,r===1?Ns(e)?29:28:31-r%7%2}yt("M",["MM",2],"Mo",function(){return this.month()+1}),yt("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),yt("MMMM",0,0,function(e){return this.localeData().months(this,e)}),mt("M",qt,Dr),mt("MM",qt,Xe),mt("MMM",function(e,o){return o.monthsShortRegex(e)}),mt("MMMM",function(e,o){return o.monthsRegex(e)}),Yt(["M","MM"],function(e,o){o[$n]=It(e)-1}),Yt(["MMM","MMMM"],function(e,o,r,i){var a=r._locale.monthsParse(e,i,r._strict);a!=null?o[$n]=a:kt(r).invalidMonth=e});var t9="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Om="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Lm=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,e9=Li,n9=Li;function o9(e,o){return e?hn(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Lm).test(o)?"format":"standalone"][e.month()]:hn(this._months)?this._months:this._months.standalone}function r9(e,o){return e?hn(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Lm.test(o)?"format":"standalone"][e.month()]:hn(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function i9(e,o,r){var i,a,s,l=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)s=En([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(s,"").toLocaleLowerCase();return r?o==="MMM"?(a=de.call(this._shortMonthsParse,l),a!==-1?a:null):(a=de.call(this._longMonthsParse,l),a!==-1?a:null):o==="MMM"?(a=de.call(this._shortMonthsParse,l),a!==-1?a:(a=de.call(this._longMonthsParse,l),a!==-1?a:null)):(a=de.call(this._longMonthsParse,l),a!==-1?a:(a=de.call(this._shortMonthsParse,l),a!==-1?a:null))}function a9(e,o,r){var i,a,s;if(this._monthsParseExact)return i9.call(this,e,o,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++)if(a=En([2e3,i]),r&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),!r&&!this._monthsParse[i]&&(s="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[i]=new RegExp(s.replace(".",""),"i")),r&&o==="MMMM"&&this._longMonthsParse[i].test(e)||r&&o==="MMM"&&this._shortMonthsParse[i].test(e)||!r&&this._monthsParse[i].test(e))return i}function Dm(e,o){if(!e.isValid())return e;if(typeof o=="string"){if(/^\d+$/.test(o))o=It(o);else if(o=e.localeData().monthsParse(o),!jn(o))return e}var r=o,i=e.date();return i=i<29?i:Math.min(i,Rd(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,i):e._d.setMonth(r,i),e}function lp(e){return e!=null?(Dm(this,e),ft.updateOffset(this,!0),this):Ci(this,"Month")}function s9(){return Rd(this.year(),this.month())}function l9(e){return this._monthsParseExact?(Rt(this,"_monthsRegex")||Rm.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(Rt(this,"_monthsShortRegex")||(this._monthsShortRegex=e9),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function c9(e){return this._monthsParseExact?(Rt(this,"_monthsRegex")||Rm.call(this),e?this._monthsStrictRegex:this._monthsRegex):(Rt(this,"_monthsRegex")||(this._monthsRegex=n9),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Rm(){function e(d,u){return u.length-d.length}var o=[],r=[],i=[],a,s,l,c;for(a=0;a<12;a++)s=En([2e3,a]),l=zn(this.monthsShort(s,"")),c=zn(this.months(s,"")),o.push(l),r.push(c),i.push(c),i.push(l);o.sort(e),r.sort(e),i.sort(e),this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+o.join("|")+")","i")}function d9(e,o,r,i,a,s,l){var c;return e<100&&e>=0?(c=new Date(e+400,o,r,i,a,s,l),isFinite(c.getFullYear())&&c.setFullYear(e)):c=new Date(e,o,r,i,a,s,l),c}function wi(e){var o,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,o=new Date(Date.UTC.apply(null,r)),isFinite(o.getUTCFullYear())&&o.setUTCFullYear(e)):o=new Date(Date.UTC.apply(null,arguments)),o}function za(e,o,r){var i=7+o-r,a=(7+wi(e,0,i).getUTCDay()-o)%7;return-a+i-1}function Pm(e,o,r,i,a){var s=(7+r-i)%7,l=za(e,i,a),c=1+7*(o-1)+s+l,d,u;return c<=0?(d=e-1,u=ii(d)+c):c>ii(e)?(d=e+1,u=c-ii(e)):(d=e,u=c),{year:d,dayOfYear:u}}function ki(e,o,r){var i=za(e.year(),o,r),a=Math.floor((e.dayOfYear()-i-1)/7)+1,s,l;return a<1?(l=e.year()-1,s=a+Gn(l,o,r)):a>Gn(e.year(),o,r)?(s=a-Gn(e.year(),o,r),l=e.year()+1):(l=e.year(),s=a),{week:s,year:l}}function Gn(e,o,r){var i=za(e,o,r),a=za(e+1,o,r);return(ii(e)-i+a)/7}yt("w",["ww",2],"wo","week"),yt("W",["WW",2],"Wo","isoWeek"),mt("w",qt,Dr),mt("ww",qt,Xe),mt("W",qt,Dr),mt("WW",qt,Xe),_i(["w","ww","W","WW"],function(e,o,r,i){o[i.substr(0,1)]=It(e)});function u9(e){return ki(e,this._week.dow,this._week.doy).week}var h9={dow:0,doy:6};function p9(){return this._week.dow}function f9(){return this._week.doy}function m9(e){var o=this.localeData().week(this);return e==null?o:this.add((e-o)*7,"d")}function g9(e){var o=ki(this,1,4).week;return e==null?o:this.add((e-o)*7,"d")}yt("d",0,"do","day"),yt("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),yt("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),yt("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),yt("e",0,0,"weekday"),yt("E",0,0,"isoWeekday"),mt("d",qt),mt("e",qt),mt("E",qt),mt("dd",function(e,o){return o.weekdaysMinRegex(e)}),mt("ddd",function(e,o){return o.weekdaysShortRegex(e)}),mt("dddd",function(e,o){return o.weekdaysRegex(e)}),_i(["dd","ddd","dddd"],function(e,o,r,i){var a=r._locale.weekdaysParse(e,i,r._strict);a!=null?o.d=a:kt(r).invalidWeekday=e}),_i(["d","e","E"],function(e,o,r,i){o[i]=It(e)});function y9(e,o){return typeof e!="string"?e:isNaN(e)?(e=o.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function v9(e,o){return typeof e=="string"?o.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Pd(e,o){return e.slice(o,7).concat(e.slice(0,o))}var b9="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),$m="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),_9="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),C9=Li,w9=Li,k9=Li;function S9(e,o){var r=hn(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(o)?"format":"standalone"];return e===!0?Pd(r,this._week.dow):e?r[e.day()]:r}function x9(e){return e===!0?Pd(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function A9(e){return e===!0?Pd(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function E9(e,o,r){var i,a,s,l=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)s=En([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(s,"").toLocaleLowerCase();return r?o==="dddd"?(a=de.call(this._weekdaysParse,l),a!==-1?a:null):o==="ddd"?(a=de.call(this._shortWeekdaysParse,l),a!==-1?a:null):(a=de.call(this._minWeekdaysParse,l),a!==-1?a:null):o==="dddd"?(a=de.call(this._weekdaysParse,l),a!==-1||(a=de.call(this._shortWeekdaysParse,l),a!==-1)?a:(a=de.call(this._minWeekdaysParse,l),a!==-1?a:null)):o==="ddd"?(a=de.call(this._shortWeekdaysParse,l),a!==-1||(a=de.call(this._weekdaysParse,l),a!==-1)?a:(a=de.call(this._minWeekdaysParse,l),a!==-1?a:null)):(a=de.call(this._minWeekdaysParse,l),a!==-1||(a=de.call(this._weekdaysParse,l),a!==-1)?a:(a=de.call(this._shortWeekdaysParse,l),a!==-1?a:null))}function N9(e,o,r){var i,a,s;if(this._weekdaysParseExact)return E9.call(this,e,o,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++)if(a=En([2e3,1]).day(i),r&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(s="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[i]=new RegExp(s.replace(".",""),"i")),r&&o==="dddd"&&this._fullWeekdaysParse[i].test(e)||r&&o==="ddd"&&this._shortWeekdaysParse[i].test(e)||r&&o==="dd"&&this._minWeekdaysParse[i].test(e)||!r&&this._weekdaysParse[i].test(e))return i}function T9(e){if(!this.isValid())return e!=null?this:NaN;var o=Ci(this,"Day");return e!=null?(e=y9(e,this.localeData()),this.add(e-o,"d")):o}function M9(e){if(!this.isValid())return e!=null?this:NaN;var o=(this.day()+7-this.localeData()._week.dow)%7;return e==null?o:this.add(e-o,"d")}function I9(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var o=v9(e,this.localeData());return this.day(this.day()%7?o:o-7)}else return this.day()||7}function O9(e){return this._weekdaysParseExact?(Rt(this,"_weekdaysRegex")||$d.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Rt(this,"_weekdaysRegex")||(this._weekdaysRegex=C9),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function L9(e){return this._weekdaysParseExact?(Rt(this,"_weekdaysRegex")||$d.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Rt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=w9),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function D9(e){return this._weekdaysParseExact?(Rt(this,"_weekdaysRegex")||$d.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Rt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=k9),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function $d(){function e(h,p){return p.length-h.length}var o=[],r=[],i=[],a=[],s,l,c,d,u;for(s=0;s<7;s++)l=En([2e3,1]).day(s),c=zn(this.weekdaysMin(l,"")),d=zn(this.weekdaysShort(l,"")),u=zn(this.weekdays(l,"")),o.push(c),r.push(d),i.push(u),a.push(c),a.push(d),a.push(u);o.sort(e),r.sort(e),i.sort(e),a.sort(e),this._weekdaysRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function cl(){return this.hours()%12||12}function R9(){return this.hours()||24}yt("H",["HH",2],0,"hour"),yt("h",["hh",2],0,cl),yt("k",["kk",2],0,R9),yt("hmm",0,0,function(){return""+cl.apply(this)+vn(this.minutes(),2)}),yt("hmmss",0,0,function(){return""+cl.apply(this)+vn(this.minutes(),2)+vn(this.seconds(),2)}),yt("Hmm",0,0,function(){return""+this.hours()+vn(this.minutes(),2)}),yt("Hmmss",0,0,function(){return""+this.hours()+vn(this.minutes(),2)+vn(this.seconds(),2)});function cp(e,o){yt(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),o)})}cp("a",!0),cp("A",!1);function dp(e,o){return o._meridiemParse}mt("a",dp),mt("A",dp),mt("H",qt,Dd),mt("h",qt,Dr),mt("k",qt,Dr),mt("HH",qt,Xe),mt("hh",qt,Xe),mt("kk",qt,Xe),mt("hmm",ip),mt("hmmss",ap),mt("Hmm",ip),mt("Hmmss",ap),Yt(["H","HH"],ve),Yt(["k","kk"],function(e,o,r){var i=It(e);o[ve]=i===24?0:i}),Yt(["a","A"],function(e,o,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),Yt(["h","hh"],function(e,o,r){o[ve]=It(e),kt(r).bigHour=!0}),Yt("hmm",function(e,o,r){var i=e.length-2;o[ve]=It(e.substr(0,i)),o[dn]=It(e.substr(i)),kt(r).bigHour=!0}),Yt("hmmss",function(e,o,r){var i=e.length-4,a=e.length-2;o[ve]=It(e.substr(0,i)),o[dn]=It(e.substr(i,2)),o[Vn]=It(e.substr(a)),kt(r).bigHour=!0}),Yt("Hmm",function(e,o,r){var i=e.length-2;o[ve]=It(e.substr(0,i)),o[dn]=It(e.substr(i))}),Yt("Hmmss",function(e,o,r){var i=e.length-4,a=e.length-2;o[ve]=It(e.substr(0,i)),o[dn]=It(e.substr(i,2)),o[Vn]=It(e.substr(a))});function P9(e){return(e+"").toLowerCase().charAt(0)==="p"}var $9=/[ap]\.?m?\.?/i,V9=Br("Hours",!0);function B9(e,o,r){return e>11?r?"pm":"PM":r?"am":"AM"}var Vm={calendar:E7,longDateFormat:I7,invalidDate:L7,ordinal:R7,dayOfMonthOrdinalParse:P7,relativeTime:V7,months:t9,monthsShort:Om,week:h9,weekdays:b9,weekdaysMin:_9,weekdaysShort:$m,meridiemParse:$9},te={},Zr={},Si;function U9(e,o){var r,i=Math.min(e.length,o.length);for(r=0;r<i;r+=1)if(e[r]!==o[r])return r;return i}function up(e){return e&&e.toLowerCase().replace("_","-")}function H9(e){for(var o=0,r,i,a,s;o<e.length;){for(s=up(e[o]).split("-"),r=s.length,i=up(e[o+1]),i=i?i.split("-"):null;r>0;){if(a=Ts(s.slice(0,r).join("-")),a)return a;if(i&&i.length>=r&&U9(s,i)>=r-1)break;r--}o++}return Si}function z9(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Ts(e){var o=null,r;if(te[e]===void 0&&typeof module<"u"&&module&&module.exports&&z9(e))try{o=Si._abbr,r=require,r("./locale/"+e),go(o)}catch{te[e]=null}return te[e]}function go(e,o){var r;return e&&(Ue(o)?r=Zn(e):r=Vd(e,o),r?Si=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Si._abbr}function Vd(e,o){if(o!==null){var r,i=Vm;if(o.abbr=e,te[e]!=null)Em("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=te[e]._config;else if(o.parentLocale!=null)if(te[o.parentLocale]!=null)i=te[o.parentLocale]._config;else if(r=Ts(o.parentLocale),r!=null)i=r._config;else return Zr[o.parentLocale]||(Zr[o.parentLocale]=[]),Zr[o.parentLocale].push({name:e,config:o}),null;return te[e]=new Id(Jl(i,o)),Zr[e]&&Zr[e].forEach(function(a){Vd(a.name,a.config)}),go(e),te[e]}else return delete te[e],null}function G9(e,o){if(o!=null){var r,i,a=Vm;te[e]!=null&&te[e].parentLocale!=null?te[e].set(Jl(te[e]._config,o)):(i=Ts(e),i!=null&&(a=i._config),o=Jl(a,o),i==null&&(o.abbr=e),r=new Id(o),r.parentLocale=te[e],te[e]=r),go(e)}else te[e]!=null&&(te[e].parentLocale!=null?(te[e]=te[e].parentLocale,e===go()&&go(e)):te[e]!=null&&delete te[e]);return te[e]}function Zn(e){var o;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Si;if(!hn(e)){if(o=Ts(e),o)return o;e=[e]}return H9(e)}function F9(){return Kl(te)}function Bd(e){var o,r=e._a;return r&&kt(e).overflow===-2&&(o=r[$n]<0||r[$n]>11?$n:r[_n]<1||r[_n]>Rd(r[Ie],r[$n])?_n:r[ve]<0||r[ve]>24||r[ve]===24&&(r[dn]!==0||r[Vn]!==0||r[Vo]!==0)?ve:r[dn]<0||r[dn]>59?dn:r[Vn]<0||r[Vn]>59?Vn:r[Vo]<0||r[Vo]>999?Vo:-1,kt(e)._overflowDayOfYear&&(o<Ie||o>_n)&&(o=_n),kt(e)._overflowWeeks&&o===-1&&(o=W7),kt(e)._overflowWeekday&&o===-1&&(o=q7),kt(e).overflow=o),e}var Y9=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,X9=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,j9=/Z|[+-]\d\d(?::?\d\d)?/,Wi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],dl=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],W9=/^\/?Date\((-?\d+)/i,q9=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Z9={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Bm(e){var o,r,i=e._i,a=Y9.exec(i)||X9.exec(i),s,l,c,d,u=Wi.length,h=dl.length;if(a){for(kt(e).iso=!0,o=0,r=u;o<r;o++)if(Wi[o][1].exec(a[1])){l=Wi[o][0],s=Wi[o][2]!==!1;break}if(l==null){e._isValid=!1;return}if(a[3]){for(o=0,r=h;o<r;o++)if(dl[o][1].exec(a[3])){c=(a[2]||" ")+dl[o][0];break}if(c==null){e._isValid=!1;return}}if(!s&&c!=null){e._isValid=!1;return}if(a[4])if(j9.exec(a[4]))d="Z";else{e._isValid=!1;return}e._f=l+(c||"")+(d||""),Hd(e)}else e._isValid=!1}function J9(e,o,r,i,a,s){var l=[K9(e),Om.indexOf(o),parseInt(r,10),parseInt(i,10),parseInt(a,10)];return s&&l.push(parseInt(s,10)),l}function K9(e){var o=parseInt(e,10);return o<=49?2e3+o:o<=999?1900+o:o}function Q9(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function tL(e,o,r){if(e){var i=$m.indexOf(e),a=new Date(o[0],o[1],o[2]).getDay();if(i!==a)return kt(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function eL(e,o,r){if(e)return Z9[e];if(o)return 0;var i=parseInt(r,10),a=i%100,s=(i-a)/100;return s*60+a}function Um(e){var o=q9.exec(Q9(e._i)),r;if(o){if(r=J9(o[4],o[3],o[2],o[5],o[6],o[7]),!tL(o[1],r,e))return;e._a=r,e._tzm=eL(o[8],o[9],o[10]),e._d=wi.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),kt(e).rfc2822=!0}else e._isValid=!1}function nL(e){var o=W9.exec(e._i);if(o!==null){e._d=new Date(+o[1]);return}if(Bm(e),e._isValid===!1)delete e._isValid;else return;if(Um(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:ft.createFromInputFallback(e)}ft.createFromInputFallback=Ke("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function ar(e,o,r){return e??o??r}function oL(e){var o=new Date(ft.now());return e._useUTC?[o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()]:[o.getFullYear(),o.getMonth(),o.getDate()]}function Ud(e){var o,r,i=[],a,s,l;if(!e._d){for(a=oL(e),e._w&&e._a[_n]==null&&e._a[$n]==null&&rL(e),e._dayOfYear!=null&&(l=ar(e._a[Ie],a[Ie]),(e._dayOfYear>ii(l)||e._dayOfYear===0)&&(kt(e)._overflowDayOfYear=!0),r=wi(l,0,e._dayOfYear),e._a[$n]=r.getUTCMonth(),e._a[_n]=r.getUTCDate()),o=0;o<3&&e._a[o]==null;++o)e._a[o]=i[o]=a[o];for(;o<7;o++)e._a[o]=i[o]=e._a[o]==null?o===2?1:0:e._a[o];e._a[ve]===24&&e._a[dn]===0&&e._a[Vn]===0&&e._a[Vo]===0&&(e._nextDay=!0,e._a[ve]=0),e._d=(e._useUTC?wi:d9).apply(null,i),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ve]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(kt(e).weekdayMismatch=!0)}}function rL(e){var o,r,i,a,s,l,c,d,u;o=e._w,o.GG!=null||o.W!=null||o.E!=null?(s=1,l=4,r=ar(o.GG,e._a[Ie],ki(Zt(),1,4).year),i=ar(o.W,1),a=ar(o.E,1),(a<1||a>7)&&(d=!0)):(s=e._locale._week.dow,l=e._locale._week.doy,u=ki(Zt(),s,l),r=ar(o.gg,e._a[Ie],u.year),i=ar(o.w,u.week),o.d!=null?(a=o.d,(a<0||a>6)&&(d=!0)):o.e!=null?(a=o.e+s,(o.e<0||o.e>6)&&(d=!0)):a=s),i<1||i>Gn(r,s,l)?kt(e)._overflowWeeks=!0:d!=null?kt(e)._overflowWeekday=!0:(c=Pm(r,i,a,s,l),e._a[Ie]=c.year,e._dayOfYear=c.dayOfYear)}ft.ISO_8601=function(){},ft.RFC_2822=function(){};function Hd(e){if(e._f===ft.ISO_8601){Bm(e);return}if(e._f===ft.RFC_2822){Um(e);return}e._a=[],kt(e).empty=!0;var o=""+e._i,r,i,a,s,l,c=o.length,d=0,u,h;for(a=Nm(e._f,e._locale).match(Od)||[],h=a.length,r=0;r<h;r++)s=a[r],i=(o.match(Y7(s,e))||[])[0],i&&(l=o.substr(0,o.indexOf(i)),l.length>0&&kt(e).unusedInput.push(l),o=o.slice(o.indexOf(i)+i.length),d+=i.length),fr[s]?(i?kt(e).empty=!1:kt(e).unusedTokens.push(s),j7(s,i,e)):e._strict&&!i&&kt(e).unusedTokens.push(s);kt(e).charsLeftOver=c-d,o.length>0&&kt(e).unusedInput.push(o),e._a[ve]<=12&&kt(e).bigHour===!0&&e._a[ve]>0&&(kt(e).bigHour=void 0),kt(e).parsedDateParts=e._a.slice(0),kt(e).meridiem=e._meridiem,e._a[ve]=iL(e._locale,e._a[ve],e._meridiem),u=kt(e).era,u!==null&&(e._a[Ie]=e._locale.erasConvertYear(u,e._a[Ie])),Ud(e),Bd(e)}function iL(e,o,r){var i;return r==null?o:e.meridiemHour!=null?e.meridiemHour(o,r):(e.isPM!=null&&(i=e.isPM(r),i&&o<12&&(o+=12),!i&&o===12&&(o=0)),o)}function aL(e){var o,r,i,a,s,l,c=!1,d=e._f.length;if(d===0){kt(e).invalidFormat=!0,e._d=new Date(NaN);return}for(a=0;a<d;a++)s=0,l=!1,o=Md({},e),e._useUTC!=null&&(o._useUTC=e._useUTC),o._f=e._f[a],Hd(o),Td(o)&&(l=!0),s+=kt(o).charsLeftOver,s+=kt(o).unusedTokens.length*10,kt(o).score=s,c?s<i&&(i=s,r=o):(i==null||s<i||l)&&(i=s,r=o,l&&(c=!0));ho(e,r||o)}function sL(e){if(!e._d){var o=Ld(e._i),r=o.day===void 0?o.date:o.day;e._a=xm([o.year,o.month,r,o.hour,o.minute,o.second,o.millisecond],function(i){return i&&parseInt(i,10)}),Ud(e)}}function lL(e){var o=new Oi(Bd(Hm(e)));return o._nextDay&&(o.add(1,"d"),o._nextDay=void 0),o}function Hm(e){var o=e._i,r=e._f;return e._locale=e._locale||Zn(e._l),o===null||r===void 0&&o===""?Es({nullInput:!0}):(typeof o=="string"&&(e._i=o=e._locale.preparse(o)),pn(o)?new Oi(Bd(o)):(Ii(o)?e._d=o:hn(r)?aL(e):r?Hd(e):cL(e),Td(e)||(e._d=null),e))}function cL(e){var o=e._i;Ue(o)?e._d=new Date(ft.now()):Ii(o)?e._d=new Date(o.valueOf()):typeof o=="string"?nL(e):hn(o)?(e._a=xm(o.slice(0),function(r){return parseInt(r,10)}),Ud(e)):zo(o)?sL(e):jn(o)?e._d=new Date(o):ft.createFromInputFallback(e)}function zm(e,o,r,i,a){var s={};return(o===!0||o===!1)&&(i=o,o=void 0),(r===!0||r===!1)&&(i=r,r=void 0),(zo(e)&&Nd(e)||hn(e)&&e.length===0)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=a,s._l=r,s._i=e,s._f=o,s._strict=i,lL(s)}function Zt(e,o,r,i){return zm(e,o,r,i,!1)}var dL=Ke("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Zt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Es()}),uL=Ke("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Zt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Es()});function Gm(e,o){var r,i;if(o.length===1&&hn(o[0])&&(o=o[0]),!o.length)return Zt();for(r=o[0],i=1;i<o.length;++i)(!o[i].isValid()||o[i][e](r))&&(r=o[i]);return r}function hL(){var e=[].slice.call(arguments,0);return Gm("isBefore",e)}function pL(){var e=[].slice.call(arguments,0);return Gm("isAfter",e)}var fL=function(){return Date.now?Date.now():+new Date},Jr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function mL(e){var o,r=!1,i,a=Jr.length;for(o in e)if(Rt(e,o)&&!(de.call(Jr,o)!==-1&&(e[o]==null||!isNaN(e[o]))))return!1;for(i=0;i<a;++i)if(e[Jr[i]]){if(r)return!1;parseFloat(e[Jr[i]])!==It(e[Jr[i]])&&(r=!0)}return!0}function gL(){return this._isValid}function yL(){return fn(NaN)}function Ms(e){var o=Ld(e),r=o.year||0,i=o.quarter||0,a=o.month||0,s=o.week||o.isoWeek||0,l=o.day||0,c=o.hour||0,d=o.minute||0,u=o.second||0,h=o.millisecond||0;this._isValid=mL(o),this._milliseconds=+h+u*1e3+d*6e4+c*1e3*60*60,this._days=+l+s*7,this._months=+a+i*3+r*12,this._data={},this._locale=Zn(),this._bubble()}function va(e){return e instanceof Ms}function nc(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function vL(e,o,r){var i=Math.min(e.length,o.length),a=Math.abs(e.length-o.length),s=0,l;for(l=0;l<i;l++)It(e[l])!==It(o[l])&&s++;return s+a}function hp(e,o){yt(e,0,0,function(){var r=this.utcOffset(),i="+";return r<0&&(r=-r,i="-"),i+vn(~~(r/60),2)+o+vn(~~r%60,2)})}hp("Z",":"),hp("ZZ",""),mt("Z",ya),mt("ZZ",ya),Yt(["Z","ZZ"],function(e,o,r){r._useUTC=!0,r._tzm=zd(ya,e)});var bL=/([\+\-]|\d\d)/gi;function zd(e,o){var r=(o||"").match(e),i,a,s;return r===null?null:(i=r[r.length-1]||[],a=(i+"").match(bL)||["-",0,0],s=+(a[1]*60)+It(a[2]),s===0?0:a[0]==="+"?s:-s)}function Gd(e,o){var r,i;return o._isUTC?(r=o.clone(),i=(pn(e)||Ii(e)?e.valueOf():Zt(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+i),ft.updateOffset(r,!1),r):Zt(e).local()}function oc(e){return-Math.round(e._d.getTimezoneOffset())}ft.updateOffset=function(){};function _L(e,o,r){var i=this._offset||0,a;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=zd(ya,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&o&&(a=oc(this)),this._offset=e,this._isUTC=!0,a!=null&&this.add(a,"m"),i!==e&&(!o||this._changeInProgress?Ym(this,fn(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ft.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?i:oc(this)}function CL(e,o){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,o),this):-this.utcOffset()}function wL(e){return this.utcOffset(0,e)}function kL(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(oc(this),"m")),this}function SL(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=zd(G7,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function xL(e){return this.isValid()?(e=e?Zt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function AL(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function EL(){if(!Ue(this._isDSTShifted))return this._isDSTShifted;var e={},o;return Md(e,this),e=Hm(e),e._a?(o=e._isUTC?En(e._a):Zt(e._a),this._isDSTShifted=this.isValid()&&vL(e._a,o.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function NL(){return this.isValid()?!this._isUTC:!1}function TL(){return this.isValid()?this._isUTC:!1}function pp(){return this.isValid()?this._isUTC&&this._offset===0:!1}var ML=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,IL=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function fn(e,o){var r=e,i=null,a,s,l;return va(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:jn(e)||!isNaN(+e)?(r={},o?r[o]=+e:r.milliseconds=+e):(i=ML.exec(e))?(a=i[1]==="-"?-1:1,r={y:0,d:It(i[_n])*a,h:It(i[ve])*a,m:It(i[dn])*a,s:It(i[Vn])*a,ms:It(nc(i[Vo]*1e3))*a}):(i=IL.exec(e))?(a=i[1]==="-"?-1:1,r={y:Mo(i[2],a),M:Mo(i[3],a),w:Mo(i[4],a),d:Mo(i[5],a),h:Mo(i[6],a),m:Mo(i[7],a),s:Mo(i[8],a)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(l=OL(Zt(r.from),Zt(r.to)),r={},r.ms=l.milliseconds,r.M=l.months),s=new Ms(r),va(e)&&Rt(e,"_locale")&&(s._locale=e._locale),va(e)&&Rt(e,"_isValid")&&(s._isValid=e._isValid),s}fn.fn=Ms.prototype,fn.invalid=yL;function Mo(e,o){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*o}function fp(e,o){var r={};return r.months=o.month()-e.month()+(o.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(o)&&--r.months,r.milliseconds=+o-+e.clone().add(r.months,"M"),r}function OL(e,o){var r;return e.isValid()&&o.isValid()?(o=Gd(o,e),e.isBefore(o)?r=fp(e,o):(r=fp(o,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Fm(e,o){return function(r,i){var a,s;return i!==null&&!isNaN(+i)&&(Em(o,"moment()."+o+"(period, number) is deprecated. Please use moment()."+o+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=r,r=i,i=s),a=fn(r,i),Ym(this,a,e),this}}function Ym(e,o,r,i){var a=o._milliseconds,s=nc(o._days),l=nc(o._months);e.isValid()&&(i=i??!0,l&&Dm(e,Ci(e,"Month")+l*r),s&&Im(e,"Date",Ci(e,"Date")+s*r),a&&e._d.setTime(e._d.valueOf()+a*r),i&&ft.updateOffset(e,s||l))}var LL=Fm(1,"add"),DL=Fm(-1,"subtract");function Xm(e){return typeof e=="string"||e instanceof String}function RL(e){return pn(e)||Ii(e)||Xm(e)||jn(e)||$L(e)||PL(e)||e===null||e===void 0}function PL(e){var o=zo(e)&&!Nd(e),r=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a,s,l=i.length;for(a=0;a<l;a+=1)s=i[a],r=r||Rt(e,s);return o&&r}function $L(e){var o=hn(e),r=!1;return o&&(r=e.filter(function(i){return!jn(i)&&Xm(e)}).length===0),o&&r}function VL(e){var o=zo(e)&&!Nd(e),r=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],a,s;for(a=0;a<i.length;a+=1)s=i[a],r=r||Rt(e,s);return o&&r}function BL(e,o){var r=e.diff(o,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function UL(e,o){arguments.length===1&&(arguments[0]?RL(arguments[0])?(e=arguments[0],o=void 0):VL(arguments[0])&&(o=arguments[0],e=void 0):(e=void 0,o=void 0));var r=e||Zt(),i=Gd(r,this).startOf("day"),a=ft.calendarFormat(this,i)||"sameElse",s=o&&(Nn(o[a])?o[a].call(this,r):o[a]);return this.format(s||this.localeData().calendar(a,this,Zt(r)))}function HL(){return new Oi(this)}function zL(e,o){var r=pn(e)?e:Zt(e);return this.isValid()&&r.isValid()?(o=on(o)||"millisecond",o==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(o).valueOf()):!1}function GL(e,o){var r=pn(e)?e:Zt(e);return this.isValid()&&r.isValid()?(o=on(o)||"millisecond",o==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(o).valueOf()<r.valueOf()):!1}function FL(e,o,r,i){var a=pn(e)?e:Zt(e),s=pn(o)?o:Zt(o);return this.isValid()&&a.isValid()&&s.isValid()?(i=i||"()",(i[0]==="("?this.isAfter(a,r):!this.isBefore(a,r))&&(i[1]===")"?this.isBefore(s,r):!this.isAfter(s,r))):!1}function YL(e,o){var r=pn(e)?e:Zt(e),i;return this.isValid()&&r.isValid()?(o=on(o)||"millisecond",o==="millisecond"?this.valueOf()===r.valueOf():(i=r.valueOf(),this.clone().startOf(o).valueOf()<=i&&i<=this.clone().endOf(o).valueOf())):!1}function XL(e,o){return this.isSame(e,o)||this.isAfter(e,o)}function jL(e,o){return this.isSame(e,o)||this.isBefore(e,o)}function WL(e,o,r){var i,a,s;if(!this.isValid())return NaN;if(i=Gd(e,this),!i.isValid())return NaN;switch(a=(i.utcOffset()-this.utcOffset())*6e4,o=on(o),o){case"year":s=ba(this,i)/12;break;case"month":s=ba(this,i);break;case"quarter":s=ba(this,i)/3;break;case"second":s=(this-i)/1e3;break;case"minute":s=(this-i)/6e4;break;case"hour":s=(this-i)/36e5;break;case"day":s=(this-i-a)/864e5;break;case"week":s=(this-i-a)/6048e5;break;default:s=this-i}return r?s:Je(s)}function ba(e,o){if(e.date()<o.date())return-ba(o,e);var r=(o.year()-e.year())*12+(o.month()-e.month()),i=e.clone().add(r,"months"),a,s;return o-i<0?(a=e.clone().add(r-1,"months"),s=(o-i)/(i-a)):(a=e.clone().add(r+1,"months"),s=(o-i)/(a-i)),-(r+s)||0}ft.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",ft.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function qL(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ZL(e){if(!this.isValid())return null;var o=e!==!0,r=o?this.clone().utc():this;return r.year()<0||r.year()>9999?ma(r,o?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Nn(Date.prototype.toISOString)?o?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ma(r,"Z")):ma(r,o?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function JL(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",o="",r,i,a,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",o="Z"),r="["+e+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a="-MM-DD[T]HH:mm:ss.SSS",s=o+'[")]',this.format(r+i+a+s)}function KL(e){e||(e=this.isUtc()?ft.defaultFormatUtc:ft.defaultFormat);var o=ma(this,e);return this.localeData().postformat(o)}function QL(e,o){return this.isValid()&&(pn(e)&&e.isValid()||Zt(e).isValid())?fn({to:this,from:e}).locale(this.locale()).humanize(!o):this.localeData().invalidDate()}function tD(e){return this.from(Zt(),e)}function eD(e,o){return this.isValid()&&(pn(e)&&e.isValid()||Zt(e).isValid())?fn({from:this,to:e}).locale(this.locale()).humanize(!o):this.localeData().invalidDate()}function nD(e){return this.to(Zt(),e)}function jm(e){var o;return e===void 0?this._locale._abbr:(o=Zn(e),o!=null&&(this._locale=o),this)}var Wm=Ke("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function qm(){return this._locale}var Ga=1e3,mr=60*Ga,Fa=60*mr,Zm=(365*400+97)*24*Fa;function gr(e,o){return(e%o+o)%o}function Jm(e,o,r){return e<100&&e>=0?new Date(e+400,o,r)-Zm:new Date(e,o,r).valueOf()}function Km(e,o,r){return e<100&&e>=0?Date.UTC(e+400,o,r)-Zm:Date.UTC(e,o,r)}function oD(e){var o,r;if(e=on(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Km:Jm,e){case"year":o=r(this.year(),0,1);break;case"quarter":o=r(this.year(),this.month()-this.month()%3,1);break;case"month":o=r(this.year(),this.month(),1);break;case"week":o=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":o=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":o=r(this.year(),this.month(),this.date());break;case"hour":o=this._d.valueOf(),o-=gr(o+(this._isUTC?0:this.utcOffset()*mr),Fa);break;case"minute":o=this._d.valueOf(),o-=gr(o,mr);break;case"second":o=this._d.valueOf(),o-=gr(o,Ga);break}return this._d.setTime(o),ft.updateOffset(this,!0),this}function rD(e){var o,r;if(e=on(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Km:Jm,e){case"year":o=r(this.year()+1,0,1)-1;break;case"quarter":o=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":o=r(this.year(),this.month()+1,1)-1;break;case"week":o=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":o=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":o=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":o=this._d.valueOf(),o+=Fa-gr(o+(this._isUTC?0:this.utcOffset()*mr),Fa)-1;break;case"minute":o=this._d.valueOf(),o+=mr-gr(o,mr)-1;break;case"second":o=this._d.valueOf(),o+=Ga-gr(o,Ga)-1;break}return this._d.setTime(o),ft.updateOffset(this,!0),this}function iD(){return this._d.valueOf()-(this._offset||0)*6e4}function aD(){return Math.floor(this.valueOf()/1e3)}function sD(){return new Date(this.valueOf())}function lD(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function cD(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function dD(){return this.isValid()?this.toISOString():null}function uD(){return Td(this)}function hD(){return ho({},kt(this))}function pD(){return kt(this).overflow}function fD(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}yt("N",0,0,"eraAbbr"),yt("NN",0,0,"eraAbbr"),yt("NNN",0,0,"eraAbbr"),yt("NNNN",0,0,"eraName"),yt("NNNNN",0,0,"eraNarrow"),yt("y",["y",1],"yo","eraYear"),yt("y",["yy",2],0,"eraYear"),yt("y",["yyy",3],0,"eraYear"),yt("y",["yyyy",4],0,"eraYear"),mt("N",ul),mt("NN",ul),mt("NNN",ul),mt("NNNN",xD),mt("NNNNN",AD),Yt(["N","NN","NNN","NNNN","NNNNN"],function(e,o,r,i){var a=r._locale.erasParse(e,i,r._strict);a?kt(r).era=a:kt(r).invalidEra=e}),mt("y",cr),mt("yy",cr),mt("yyy",cr),mt("yyyy",cr),mt("yo",ED),Yt(["y","yy","yyy","yyyy"],Ie),Yt(["yo"],function(e,o,r,i){var a;r._locale._eraYearOrdinalRegex&&(a=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?o[Ie]=r._locale.eraYearOrdinalParse(e,a):o[Ie]=parseInt(e,10)});function mD(e,o){var r,i,a,s=this._eras||Zn("en")._eras;for(r=0,i=s.length;r<i;++r)switch(typeof s[r].since==="string"&&(a=ft(s[r].since).startOf("day"),s[r].since=a.valueOf()),typeof s[r].until){case"undefined":s[r].until=1/0;break;case"string":a=ft(s[r].until).startOf("day").valueOf(),s[r].until=a.valueOf();break}return s}function gD(e,o,r){var i,a,s=this.eras(),l,c,d;for(e=e.toUpperCase(),i=0,a=s.length;i<a;++i)if(l=s[i].name.toUpperCase(),c=s[i].abbr.toUpperCase(),d=s[i].narrow.toUpperCase(),r)switch(o){case"N":case"NN":case"NNN":if(c===e)return s[i];break;case"NNNN":if(l===e)return s[i];break;case"NNNNN":if(d===e)return s[i];break}else if([l,c,d].indexOf(e)>=0)return s[i]}function yD(e,o){var r=e.since<=e.until?1:-1;return o===void 0?ft(e.since).year():ft(e.since).year()+(o-e.offset)*r}function vD(){var e,o,r,i=this.localeData().eras();for(e=0,o=i.length;e<o;++e)if(r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return i[e].name;return""}function bD(){var e,o,r,i=this.localeData().eras();for(e=0,o=i.length;e<o;++e)if(r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return i[e].narrow;return""}function _D(){var e,o,r,i=this.localeData().eras();for(e=0,o=i.length;e<o;++e)if(r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return i[e].abbr;return""}function CD(){var e,o,r,i,a=this.localeData().eras();for(e=0,o=a.length;e<o;++e)if(r=a[e].since<=a[e].until?1:-1,i=this.clone().startOf("day").valueOf(),a[e].since<=i&&i<=a[e].until||a[e].until<=i&&i<=a[e].since)return(this.year()-ft(a[e].since).year())*r+a[e].offset;return this.year()}function wD(e){return Rt(this,"_erasNameRegex")||Fd.call(this),e?this._erasNameRegex:this._erasRegex}function kD(e){return Rt(this,"_erasAbbrRegex")||Fd.call(this),e?this._erasAbbrRegex:this._erasRegex}function SD(e){return Rt(this,"_erasNarrowRegex")||Fd.call(this),e?this._erasNarrowRegex:this._erasRegex}function ul(e,o){return o.erasAbbrRegex(e)}function xD(e,o){return o.erasNameRegex(e)}function AD(e,o){return o.erasNarrowRegex(e)}function ED(e,o){return o._eraYearOrdinalRegex||cr}function Fd(){var e=[],o=[],r=[],i=[],a,s,l,c,d,u=this.eras();for(a=0,s=u.length;a<s;++a)l=zn(u[a].name),c=zn(u[a].abbr),d=zn(u[a].narrow),o.push(l),e.push(c),r.push(d),i.push(l),i.push(c),i.push(d);this._erasRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+o.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}yt(0,["gg",2],0,function(){return this.weekYear()%100}),yt(0,["GG",2],0,function(){return this.isoWeekYear()%100});function qi(e,o){yt(0,[e,e.length],0,o)}qi("gggg","weekYear"),qi("ggggg","weekYear"),qi("GGGG","isoWeekYear"),qi("GGGGG","isoWeekYear"),mt("G",Ua),mt("g",Ua),mt("GG",qt,Xe),mt("gg",qt,Xe),mt("GGGG",tc,Ql),mt("gggg",tc,Ql),mt("GGGGG",Ba,Va),mt("ggggg",Ba,Va),_i(["gggg","ggggg","GGGG","GGGGG"],function(e,o,r,i){o[i.substr(0,2)]=It(e)}),_i(["gg","GG"],function(e,o,r,i){o[i]=ft.parseTwoDigitYear(e)});function ND(e){return Qm.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function TD(e){return Qm.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function MD(){return Gn(this.year(),1,4)}function ID(){return Gn(this.isoWeekYear(),1,4)}function OD(){var e=this.localeData()._week;return Gn(this.year(),e.dow,e.doy)}function LD(){var e=this.localeData()._week;return Gn(this.weekYear(),e.dow,e.doy)}function Qm(e,o,r,i,a){var s;return e==null?ki(this,i,a).year:(s=Gn(e,i,a),o>s&&(o=s),DD.call(this,e,o,r,i,a))}function DD(e,o,r,i,a){var s=Pm(e,o,r,i,a),l=wi(s.year,0,s.dayOfYear);return this.year(l.getUTCFullYear()),this.month(l.getUTCMonth()),this.date(l.getUTCDate()),this}yt("Q",0,"Qo","quarter"),mt("Q",Tm),Yt("Q",function(e,o){o[$n]=(It(e)-1)*3});function RD(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}yt("D",["DD",2],"Do","date"),mt("D",qt,Dr),mt("DD",qt,Xe),mt("Do",function(e,o){return e?o._dayOfMonthOrdinalParse||o._ordinalParse:o._dayOfMonthOrdinalParseLenient}),Yt(["D","DD"],_n),Yt("Do",function(e,o){o[_n]=It(e.match(qt)[0])});var mp=Br("Date",!0);yt("DDD",["DDDD",3],"DDDo","dayOfYear"),mt("DDD",ga),mt("DDDD",Mm),Yt(["DDD","DDDD"],function(e,o,r){r._dayOfYear=It(e)});function PD(e){var o=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?o:this.add(e-o,"d")}yt("m",["mm",2],0,"minute"),mt("m",qt,Dd),mt("mm",qt,Xe),Yt(["m","mm"],dn);var $D=Br("Minutes",!1);yt("s",["ss",2],0,"second"),mt("s",qt,Dd),mt("ss",qt,Xe),Yt(["s","ss"],Vn);var VD=Br("Seconds",!1);yt("S",0,0,function(){return~~(this.millisecond()/100)}),yt(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),yt(0,["SSS",3],0,"millisecond"),yt(0,["SSSS",4],0,function(){return this.millisecond()*10}),yt(0,["SSSSS",5],0,function(){return this.millisecond()*100}),yt(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),yt(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),yt(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),yt(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),mt("S",ga,Tm),mt("SS",ga,Xe),mt("SSS",ga,Mm);var po,tg;for(po="SSSS";po.length<=9;po+="S")mt(po,cr);function BD(e,o){o[Vo]=It(("0."+e)*1e3)}for(po="S";po.length<=9;po+="S")Yt(po,BD);tg=Br("Milliseconds",!1),yt("z",0,0,"zoneAbbr"),yt("zz",0,0,"zoneName");function UD(){return this._isUTC?"UTC":""}function HD(){return this._isUTC?"Coordinated Universal Time":""}var nt=Oi.prototype;nt.add=LL,nt.calendar=UL,nt.clone=HL,nt.diff=WL,nt.endOf=rD,nt.format=KL,nt.from=QL,nt.fromNow=tD,nt.to=eD,nt.toNow=nD,nt.get=J7,nt.invalidAt=pD,nt.isAfter=zL,nt.isBefore=GL,nt.isBetween=FL,nt.isSame=YL,nt.isSameOrAfter=XL,nt.isSameOrBefore=jL,nt.isValid=uD,nt.lang=Wm,nt.locale=jm,nt.localeData=qm,nt.max=uL,nt.min=dL,nt.parsingFlags=hD,nt.set=K7,nt.startOf=oD,nt.subtract=DL,nt.toArray=lD,nt.toObject=cD,nt.toDate=sD,nt.toISOString=ZL,nt.inspect=JL,typeof Symbol<"u"&&Symbol.for!=null&&(nt[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),nt.toJSON=dD,nt.toString=qL,nt.unix=aD,nt.valueOf=iD,nt.creationData=fD,nt.eraName=vD,nt.eraNarrow=bD,nt.eraAbbr=_D,nt.eraYear=CD,nt.year=sp,nt.isLeapYear=Z7,nt.weekYear=ND,nt.isoWeekYear=TD,nt.quarter=nt.quarters=RD,nt.month=lp,nt.daysInMonth=s9,nt.week=nt.weeks=m9,nt.isoWeek=nt.isoWeeks=g9,nt.weeksInYear=OD,nt.weeksInWeekYear=LD,nt.isoWeeksInYear=MD,nt.isoWeeksInISOWeekYear=ID,nt.date=mp,nt.day=nt.days=T9,nt.weekday=M9,nt.isoWeekday=I9,nt.dayOfYear=PD,nt.hour=nt.hours=V9,nt.minute=nt.minutes=$D,nt.second=nt.seconds=VD,nt.millisecond=nt.milliseconds=tg,nt.utcOffset=_L,nt.utc=wL,nt.local=kL,nt.parseZone=SL,nt.hasAlignedHourOffset=xL,nt.isDST=AL,nt.isLocal=NL,nt.isUtcOffset=TL,nt.isUtc=pp,nt.isUTC=pp,nt.zoneAbbr=UD,nt.zoneName=HD,nt.dates=Ke("dates accessor is deprecated. Use date instead.",mp),nt.months=Ke("months accessor is deprecated. Use month instead",lp),nt.years=Ke("years accessor is deprecated. Use year instead",sp),nt.zone=Ke("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",CL),nt.isDSTShifted=Ke("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",EL);function zD(e){return Zt(e*1e3)}function GD(){return Zt.apply(null,arguments).parseZone()}function gp(e){return e}var Dt=Id.prototype;Dt.calendar=N7,Dt.longDateFormat=O7,Dt.invalidDate=D7,Dt.ordinal=$7,Dt.preparse=gp,Dt.postformat=gp,Dt.relativeTime=B7,Dt.pastFuture=U7,Dt.set=A7,Dt.eras=mD,Dt.erasParse=gD,Dt.erasConvertYear=yD,Dt.erasAbbrRegex=kD,Dt.erasNameRegex=wD,Dt.erasNarrowRegex=SD,Dt.months=o9,Dt.monthsShort=r9,Dt.monthsParse=a9,Dt.monthsRegex=c9,Dt.monthsShortRegex=l9,Dt.week=u9,Dt.firstDayOfYear=f9,Dt.firstDayOfWeek=p9,Dt.weekdays=S9,Dt.weekdaysMin=A9,Dt.weekdaysShort=x9,Dt.weekdaysParse=N9,Dt.weekdaysRegex=O9,Dt.weekdaysShortRegex=L9,Dt.weekdaysMinRegex=D9,Dt.isPM=P9,Dt.meridiem=B9;function Ya(e,o,r,i){var a=Zn(),s=En().set(i,o);return a[r](s,e)}function eg(e,o,r){if(jn(e)&&(o=e,e=void 0),e=e||"",o!=null)return Ya(e,o,r,"month");var i,a=[];for(i=0;i<12;i++)a[i]=Ya(e,i,r,"month");return a}function Yd(e,o,r,i){typeof e=="boolean"?(jn(o)&&(r=o,o=void 0),o=o||""):(o=e,r=o,e=!1,jn(o)&&(r=o,o=void 0),o=o||"");var a=Zn(),s=e?a._week.dow:0,l,c=[];if(r!=null)return Ya(o,(r+s)%7,i,"day");for(l=0;l<7;l++)c[l]=Ya(o,(l+s)%7,i,"day");return c}function FD(e,o){return eg(e,o,"months")}function YD(e,o){return eg(e,o,"monthsShort")}function XD(e,o,r){return Yd(e,o,r,"weekdays")}function jD(e,o,r){return Yd(e,o,r,"weekdaysShort")}function WD(e,o,r){return Yd(e,o,r,"weekdaysMin")}go("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var o=e%10,r=It(e%100/10)===1?"th":o===1?"st":o===2?"nd":o===3?"rd":"th";return e+r}}),ft.lang=Ke("moment.lang is deprecated. Use moment.locale instead.",go),ft.langData=Ke("moment.langData is deprecated. Use moment.localeData instead.",Zn);var Ln=Math.abs;function qD(){var e=this._data;return this._milliseconds=Ln(this._milliseconds),this._days=Ln(this._days),this._months=Ln(this._months),e.milliseconds=Ln(e.milliseconds),e.seconds=Ln(e.seconds),e.minutes=Ln(e.minutes),e.hours=Ln(e.hours),e.months=Ln(e.months),e.years=Ln(e.years),this}function ng(e,o,r,i){var a=fn(o,r);return e._milliseconds+=i*a._milliseconds,e._days+=i*a._days,e._months+=i*a._months,e._bubble()}function ZD(e,o){return ng(this,e,o,1)}function JD(e,o){return ng(this,e,o,-1)}function yp(e){return e<0?Math.floor(e):Math.ceil(e)}function KD(){var e=this._milliseconds,o=this._days,r=this._months,i=this._data,a,s,l,c,d;return e>=0&&o>=0&&r>=0||e<=0&&o<=0&&r<=0||(e+=yp(rc(r)+o)*864e5,o=0,r=0),i.milliseconds=e%1e3,a=Je(e/1e3),i.seconds=a%60,s=Je(a/60),i.minutes=s%60,l=Je(s/60),i.hours=l%24,o+=Je(l/24),d=Je(og(o)),r+=d,o-=yp(rc(d)),c=Je(r/12),r%=12,i.days=o,i.months=r,i.years=c,this}function og(e){return e*4800/146097}function rc(e){return e*146097/4800}function QD(e){if(!this.isValid())return NaN;var o,r,i=this._milliseconds;if(e=on(e),e==="month"||e==="quarter"||e==="year")switch(o=this._days+i/864e5,r=this._months+og(o),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(o=this._days+Math.round(rc(this._months)),e){case"week":return o/7+i/6048e5;case"day":return o+i/864e5;case"hour":return o*24+i/36e5;case"minute":return o*1440+i/6e4;case"second":return o*86400+i/1e3;case"millisecond":return Math.floor(o*864e5)+i;default:throw new Error("Unknown unit "+e)}}function Jn(e){return function(){return this.as(e)}}var rg=Jn("ms"),tR=Jn("s"),eR=Jn("m"),nR=Jn("h"),oR=Jn("d"),rR=Jn("w"),iR=Jn("M"),aR=Jn("Q"),sR=Jn("y"),lR=rg;function cR(){return fn(this)}function dR(e){return e=on(e),this.isValid()?this[e+"s"]():NaN}function Jo(e){return function(){return this.isValid()?this._data[e]:NaN}}var uR=Jo("milliseconds"),hR=Jo("seconds"),pR=Jo("minutes"),fR=Jo("hours"),mR=Jo("days"),gR=Jo("months"),yR=Jo("years");function vR(){return Je(this.days()/7)}var Rn=Math.round,dr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function bR(e,o,r,i,a){return a.relativeTime(o||1,!!r,e,i)}function _R(e,o,r,i){var a=fn(e).abs(),s=Rn(a.as("s")),l=Rn(a.as("m")),c=Rn(a.as("h")),d=Rn(a.as("d")),u=Rn(a.as("M")),h=Rn(a.as("w")),p=Rn(a.as("y")),m=s<=r.ss&&["s",s]||s<r.s&&["ss",s]||l<=1&&["m"]||l<r.m&&["mm",l]||c<=1&&["h"]||c<r.h&&["hh",c]||d<=1&&["d"]||d<r.d&&["dd",d];return r.w!=null&&(m=m||h<=1&&["w"]||h<r.w&&["ww",h]),m=m||u<=1&&["M"]||u<r.M&&["MM",u]||p<=1&&["y"]||["yy",p],m[2]=o,m[3]=+e>0,m[4]=i,bR.apply(null,m)}function CR(e){return e===void 0?Rn:typeof e=="function"?(Rn=e,!0):!1}function wR(e,o){return dr[e]===void 0?!1:o===void 0?dr[e]:(dr[e]=o,e==="s"&&(dr.ss=o-1),!0)}function kR(e,o){if(!this.isValid())return this.localeData().invalidDate();var r=!1,i=dr,a,s;return typeof e=="object"&&(o=e,e=!1),typeof e=="boolean"&&(r=e),typeof o=="object"&&(i=Object.assign({},dr,o),o.s!=null&&o.ss==null&&(i.ss=o.s-1)),a=this.localeData(),s=_R(this,!r,i,a),r&&(s=a.pastFuture(+this,s)),a.postformat(s)}var hl=Math.abs;function rr(e){return(e>0)-(e<0)||+e}function Zi(){if(!this.isValid())return this.localeData().invalidDate();var e=hl(this._milliseconds)/1e3,o=hl(this._days),r=hl(this._months),i,a,s,l,c=this.asSeconds(),d,u,h,p;return c?(i=Je(e/60),a=Je(i/60),e%=60,i%=60,s=Je(r/12),r%=12,l=e?e.toFixed(3).replace(/\.?0+$/,""):"",d=c<0?"-":"",u=rr(this._months)!==rr(c)?"-":"",h=rr(this._days)!==rr(c)?"-":"",p=rr(this._milliseconds)!==rr(c)?"-":"",d+"P"+(s?u+s+"Y":"")+(r?u+r+"M":"")+(o?h+o+"D":"")+(a||i||e?"T":"")+(a?p+a+"H":"")+(i?p+i+"M":"")+(e?p+l+"S":"")):"P0D"}var Ot=Ms.prototype;Ot.isValid=gL,Ot.abs=qD,Ot.add=ZD,Ot.subtract=JD,Ot.as=QD,Ot.asMilliseconds=rg,Ot.asSeconds=tR,Ot.asMinutes=eR,Ot.asHours=nR,Ot.asDays=oR,Ot.asWeeks=rR,Ot.asMonths=iR,Ot.asQuarters=aR,Ot.asYears=sR,Ot.valueOf=lR,Ot._bubble=KD,Ot.clone=cR,Ot.get=dR,Ot.milliseconds=uR,Ot.seconds=hR,Ot.minutes=pR,Ot.hours=fR,Ot.days=mR,Ot.weeks=vR,Ot.months=gR,Ot.years=yR,Ot.humanize=kR,Ot.toISOString=Zi,Ot.toString=Zi,Ot.toJSON=Zi,Ot.locale=jm,Ot.localeData=qm,Ot.toIsoString=Ke("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zi),Ot.lang=Wm,yt("X",0,0,"unix"),yt("x",0,0,"valueOf"),mt("x",Ua),mt("X",F7),Yt("X",function(e,o,r){r._d=new Date(parseFloat(e)*1e3)}),Yt("x",function(e,o,r){r._d=new Date(It(e))});ft.version="2.30.1",S7(Zt),ft.fn=nt,ft.min=hL,ft.max=pL,ft.now=fL,ft.utc=En,ft.unix=zD,ft.months=FD,ft.isDate=Ii,ft.locale=go,ft.invalid=Es,ft.duration=fn,ft.isMoment=pn,ft.weekdays=XD,ft.parseZone=GD,ft.localeData=Zn,ft.isDuration=va,ft.monthsShort=YD,ft.weekdaysMin=WD,ft.defineLocale=Vd,ft.updateLocale=G9,ft.locales=F9,ft.weekdaysShort=jD,ft.normalizeUnits=on,ft.relativeTimeRounding=CR,ft.relativeTimeThreshold=wR,ft.calendarFormat=BL,ft.prototype=nt,ft.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const SR={name:"FolderEditOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},xR=["aria-hidden","aria-label"],AR=["fill","width","height"],ER={d:"M4 18H12.13L11 19.13V20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.89 4 4 4H10L12 6H20C21.1 6 22 6.89 22 8V10.15C21.74 10.06 21.46 10 21.17 10C20.75 10 20.36 10.11 20 10.3V8H4V18M22.85 13.47L21.53 12.15C21.33 11.95 21 11.95 20.81 12.15L19.83 13.13L21.87 15.17L22.85 14.19C23.05 14 23.05 13.67 22.85 13.47M13 19.96V22H15.04L21.17 15.88L19.13 13.83L13 19.96Z"},NR={key:0};function TR(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon folder-edit-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",ER,[r.title?(f(),k("title",NR,O(r.title),1)):R("",!0)])],8,AR))],16,xR)}const MR=tt(SR,[["render",TR]]);async function IR(e,o){let r=e.groups.map(i=>encodeURIComponent(i));return r=r.filter(i=>i!==encodeURIComponent(o)),oe.patch(e.url,{},{headers:{"X-PROPERTY":"CATEGORIES","X-PROPERTY-REPLACE":r.join(",")}})}async function OR(e,o,r){const i=e.groups;i.push(r);let a=i.map(s=>encodeURIComponent(s));return a=a.filter(s=>s!==encodeURIComponent(o)),oe.patch(e.url,{},{headers:{"X-PROPERTY":"CATEGORIES","X-PROPERTY-REPLACE":a.join(",")}})}const LR={name:"GroupNavigationItem",components:{ActionButton:xn,NcCounterBubble:ns,AppNavigationItem:kc,ActionInput:Sc,IconContact:_o,IconAdd:Rr,IconDownload:As,IconEmail:wp,IconRename:MR,IconDelete:Sn,IconLoading:We,IconContactFilled:Cm},props:{group:{type:Object,required:!0},routeState:{type:String,required:!0}},data(){return{newGroupName:"",renaming:!1,deleting:!1}},computed:{contacts(){return this.$store.getters.getContacts},isEmpty(){return this.group.contacts.length===0}},methods:{isInGroup(e,o){return e.includes(o)},async onDrop(e,o){try{const r=JSON.parse(e.dataTransfer.getData("item")),i=this.$store.getters.getContact(en.from(`${r.uid}~${r.addressbookId}`,"utf-8").toString("base64"));if(i&&!this.isInGroup(i.groups,o.id)){const a=this.$store.getters.getContact(en.from(`${r.uid}~${r.addressbookId}`,"utf-8").toString("base64"));await this.$store.dispatch("updateContactGroups",{groupNames:[...i.groups,o.name],contact:a});const s=Object.assign(Object.create(Object.getPrototypeOf(a)),a);s.groups=[...i.groups,o.name],await this.$store.dispatch("updateContact",s)}}catch(r){console.error(r),bt(this.t("contacts","Tried to drop an invalid contact!"))}finally{e.target.closest(".group-drop-area").removeAttribute("drop-active")}},onDragOver(e){e.preventDefault(),e.target.closest(".group-drop-area").setAttribute("drop-active",!0)},onDragLeave(e){e.target.closest(".group-drop-area").removeAttribute("drop-active")},addContactsToGroup(){vr("contacts:group:append",this.group.name)},downloadGroup(e){let o={};e.contacts.forEach(i=>{const a=this.contacts[i].addressbook.id;o={[a]:{addressbook:this.contacts[i].addressbook,contacts:[]},...o},o[a].contacts.push(this.contacts[i].url)});const r=Promise.all(Object.keys(o).map(i=>o[i].addressbook.dav.addressbookMultigetExport(o[i].contacts))).then(i=>({groupName:e.name,data:i.map(a=>a.body).join("")}));this.downloadVcardPromise(r)},async downloadVcardPromise(e){e.then(o=>{const r=ft().format("YYYY-MM-DD_HH-mm")+"_"+o.groupName+".vcf",i="data:text/plain;charset=utf-8,"+window.encodeURIComponent(o.data);k7(i,r,"text/vcard")})},emailGroup(e,o="to"){const r=[];e.contacts.filter(i=>this.contacts[i].email!==null).forEach(i=>{const a=this.contacts[i].email.replace(/(.*<)([^>]*)(>)/g,"$2").trim(),s=this.contacts[i].fullName.replace(/[,<>]/g,"").trim();if(a!==""){if(s===null||s===""){r.push(a);return}r.push(`${s} <${a}>`)}}),window.location.href=`mailto:?${o}=${r.map(encodeURIComponent).join(",")}`},async renameGroup(){if(this.newGroupName!==""){this.renaming=!0;for(const e of this.group.contacts){const o=this.$store.getters.getContact(e);if(o===void 0)return;try{await OR(o,this.group.name,this.newGroupName)}catch(r){console.error("Error renaming group",r)}}this.$store.commit("renameGroup",{oldGroupName:this.group.name,newGroupName:this.newGroupName}),this.renaming=!1}},async deleteGroup(){this.deleting=!0;for(const e of this.group.contacts){const o=this.$store.getters.getContact(e);if(o===void 0)return;try{await IR(o,this.group.name)}catch(r){console.error("Error deleting group",r)}}this.$store.commit("removeGroup",this.group.name),this.deleting=!1}}};function DR(e,o,r,i,a,s){const l=w("IconContactFilled"),c=w("IconContact"),d=w("IconAdd"),u=w("ActionButton"),h=w("IconLoading"),p=w("IconRename"),m=w("ActionInput"),g=w("IconDownload"),_=w("IconEmail"),C=w("IconDelete"),M=w("NcCounterBubble"),N=w("AppNavigationItem");return s.isEmpty?R("",!0):(f(),k("div",{key:0,class:"group-drop-area","data-testid":"group-drop-area",onDrop:o[6]||(o[6]=P=>s.onDrop(P,r.group)),onDragenter:o[7]||(o[7]=ae(()=>{},["prevent"])),onDragover:o[8]||(o[8]=P=>s.onDragOver(P)),onDragleave:o[9]||(o[9]=P=>s.onDragLeave(P))},[(f(),T(N,{key:r.group.key,to:r.group.router,name:r.group.name,active:r.routeState===`group:${r.group.id}`,onClick:o[5]||(o[5]=P=>e.$emit("updateRouteState",`group:${r.group.id}`))},{icon:S(()=>[r.routeState===`group:${r.group.id}`?(f(),T(l,{key:0,size:20})):(f(),T(c,{key:1,size:20}))]),actions:S(()=>[E(u,{"close-after-click":!0,onClick:o[0]||(o[0]=P=>s.addContactsToGroup(r.group))},{icon:S(()=>[E(d,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Add contacts")),1)]),_:1}),E(m,{"model-value":a.newGroupName,"onUpdate:modelValue":o[1]||(o[1]=P=>a.newGroupName=P),disabled:a.renaming,onSubmit:s.renameGroup},{icon:S(()=>[a.renaming?(f(),T(h,{key:0,size:20})):(f(),T(p,{key:1,size:20}))]),default:S(()=>[Z(" "+O(e.t("contacts","Rename")),1)]),_:1},8,["model-value","disabled","onSubmit"]),E(u,{"close-after-click":!0,onClick:o[2]||(o[2]=P=>s.downloadGroup(r.group))},{icon:S(()=>[E(g,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Export")),1)]),_:1}),E(u,{onClick:o[3]||(o[3]=P=>s.emailGroup(r.group))},{icon:S(()=>[E(_,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Send email")),1)]),_:1}),E(u,{onClick:o[4]||(o[4]=P=>s.emailGroup(r.group,"bcc"))},{icon:S(()=>[E(_,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Send email as BCC")),1)]),_:1}),E(u,{disabled:a.deleting,onClick:s.deleteGroup},{icon:S(()=>[a.deleting?(f(),T(h,{key:0,size:20})):(f(),T(C,{key:1,size:20}))]),default:S(()=>[Z(" "+O(e.t("contacts","Delete")),1)]),_:1},8,["disabled","onClick"])]),counter:S(()=>[r.group.contacts.length>0?(f(),T(M,{key:0,count:r.group.contacts.length},null,8,["count"])):R("",!0)]),_:1},8,["to","name","active"]))],32))}const RR=tt(LR,[["render",DR],["__scopeId","data-v-6296cf32"]]),PR=Yo("contacts","isContactsInteractionEnabled",!1),$R={name:"RootNavigation",components:{ActionInput:Sc,ActionText:wc,NcActionButton:xn,AppNavigation:cy,NcCounterBubble:ns,AppNavigationItem:kc,AppNavigationCaption:ly,CircleNavigationItem:pO,Cog:gd,ContactsSettings:b7,GroupNavigationItem:RR,IconContact:_o,IconContactFilled:Cm,IconUser:si,IconUserFilled:kI,IconAdd:Rr,IconError:wm,IconLoading:We,IconRecentlyContacted:ZI,NewCircleIntro:YI,NcButton:he},mixins:[ko],props:{loading:{type:Boolean,default:!1}},data(){return{CIRCLE_DESC:Sp,CONTACTS_SETTINGS:p0,ELLIPSIS_COUNT:Us,GROUP_ALL_CONTACTS:Qi,CHART_ALL_CONTACTS:h0,GROUP_NO_GROUP_CONTACTS:Ki,GROUP_RECENTLY_CONTACTED:Bs,isNewGroupMenuOpen:!1,createGroupError:null,isNewCircleModalOpen:!1,createCircleLoading:!1,createCircleError:null,isCirclesEnabled:gl,isContactsInteractionEnabled:PR,collapsedGroups:!0,collapsedCircles:!0,showSettings:!1,routeState:"all"}},computed:{circles(){return this.$store.getters.getCircles},contacts(){const e=this.$store.getters.getContacts;return e.undefined&&(e[this.selectedContact]=e.undefined,delete e.undefined),this.$store.getters.getContacts},groups(){return this.$store.getters.getGroups},sortedContacts(){return this.$store.getters.getSortedContacts},userGroups(){return this.userGroupStore.userGroupList},ungroupedContacts(){return this.sortedContacts.filter(e=>this.contacts[e.key]?.groups&&this.contacts[e.key]?.groups?.length===0)},existChart(){return!!Object.keys(this.contacts).filter(e=>this.contacts[e].managersName).length},groupsMenu(){const e=this.groups.map(r=>({...r,id:r.name.replace(" ","_"),key:r.name.replace(" ","_"),router:{name:"group",params:{selectedGroup:r.name}},toString:()=>r.name}));e.sort((r,i)=>Wl(r.toString(),i.toString(),{caseInsensitive:!0}));const o=e.findIndex(r=>r.name===Bs);return o>=0&&e.splice(o,1),e},ellipsisGroupsMenu(){return this.isCirclesEnabled&&this.collapsedGroups?this.groupsMenu.slice(0,Us):this.groupsMenu},circlesMenu(){const e=[...this.circles||[],...this.userGroups||[]];return e.sort((o,r)=>o?.initiator?.level!==r?.initiator?.level&&o?.initiator?.level&&r?.initiator?.level?r.initiator.level-o.initiator.level:o.initiator&&!r.initiator?-1:!o.initiator&&r.initiator?1:Wl(o.toString(),r.toString(),{caseInsensitive:!0})),e},ellipsisCirclesMenu(){return this.collapsedCircles?this.circlesMenu.slice(0,Us):this.circlesMenu},recentlyContactedContacts(){return this.groups.find(e=>e.name===Bs)},collapseGroupsTitle(){return this.collapsedGroups?t("contacts","Show all groups"):t("contacts","Collapse groups")},collapseCirclesTitle(){return this.collapsedCircles?t("contacts","Show all teams"):t("contacts","Collapse teams")},...Cp(kd)},methods:{toggleNewGroupMenu(){this.isNewGroupMenuOpen=!this.isNewGroupMenuOpen},createNewGroup(e){const o=e.target.querySelector("input[type=text]").value.trim();if(o.length===0){bt(t("contacts","Group name cannot be empty"));return}if(this.logger.debug("Creating new group",{groupName:o}),this.groups.find(r=>r.name===o)){this.createGroupError=t("contacts","This group already exists"),vr("contacts:group:append",this.groups.find(r=>r.name===o).name);return}this.createGroupError=null,this.logger.debug("Created new local group",{groupName:o});try{this.$store.dispatch("addGroup",o),this.isNewGroupMenuOpen=!1,vr("contacts:group:append",o)}catch{bt(t("contacts","An error occurred while creating the group"))}},onToggleGroups(){this.collapsedGroups=!this.collapsedGroups},onToggleCircles(){this.collapsedCircles=!this.collapsedCircles},toggleNewCircleModal(){this.isNewCircleModalOpen=!0},async createNewCircle(e,o,r){if(this.logger.debug("Creating new team",{circleName:e}),this.createCircleLoading=!0,this.circles.find(i=>i.name===e)){this.createCircleError=t("contacts","This team already exists");return}this.createCircleError=null;try{const i=await this.$store.dispatch("createCircle",{circleName:e,isPersonal:o,isLocal:r});this.closeNewCircleIntro(),this.$router.push({name:"circle",params:{selectedCircle:i.id}})}catch{bt(t("contacts","An error happened during the creation of the team"))}finally{this.createCircleLoading=!1}},closeNewCircleIntro(){this.isNewCircleModalOpen=!1},showContactsSettings(){this.showSettings=!0},updateRouteState(e){this.routeState=e}}},VR={class:"header"},BR={class:"app-navigation__circle-desc"},UR={class:"contacts-settings"};function HR(e,o,r,i,a,s){const l=w("IconLoading"),c=w("IconContactFilled"),d=w("IconContact"),u=w("NcCounterBubble"),h=w("AppNavigationItem"),p=w("IconUserFilled"),m=w("IconUser"),g=w("IconRecentlyContacted"),_=w("IconAdd"),C=w("IconError"),M=w("ActionText"),N=w("ActionInput"),P=w("AppNavigationCaption"),V=w("GroupNavigationItem"),K=w("NcActionButton"),X=w("NewCircleIntro"),rt=w("CircleNavigationItem"),pt=w("Cog"),it=w("NcButton"),et=w("ContactsSettings"),ut=w("AppNavigation");return f(),T(ut,null,{icon:S(()=>[r.loading?(f(),T(l,{key:0,size:20})):R("",!0)]),search:S(()=>[D("header",VR,[$t(e.$slots,"default",{},void 0,!0)])]),list:S(()=>[E(h,{id:"everyone",name:a.GROUP_ALL_CONTACTS,to:{name:"group",params:{selectedGroup:a.GROUP_ALL_CONTACTS}},active:a.routeState==="all",onClick:o[0]||(o[0]=L=>s.updateRouteState("all"))},{icon:S(()=>[a.routeState==="all"?(f(),T(c,{key:0,size:20})):(f(),T(d,{key:1,size:20}))]),counter:S(()=>[s.sortedContacts.length?(f(),T(u,{key:0,count:s.sortedContacts.length},null,8,["count"])):R("",!0)]),_:1},8,["name","to","active"]),s.existChart?(f(),T(h,{key:0,id:"chart",name:a.CHART_ALL_CONTACTS,to:{name:"chart",params:{selectedChart:a.GROUP_ALL_CONTACTS}},active:a.routeState==="orgchart",icon:"icon-category-monitoring",onClick:o[1]||(o[1]=L=>s.updateRouteState("orgchart"))},null,8,["name","to","active"])):R("",!0),s.ungroupedContacts.length>0?(f(),T(h,{key:1,id:"notgrouped",name:a.GROUP_NO_GROUP_CONTACTS,to:{name:"group",params:{selectedGroup:a.GROUP_NO_GROUP_CONTACTS}},active:a.routeState==="notgrouped",onClick:o[2]||(o[2]=L=>s.updateRouteState("notgrouped"))},{icon:S(()=>[a.routeState==="notgrouped"?(f(),T(p,{key:0,size:20})):(f(),T(m,{key:1,size:20}))]),counter:S(()=>[s.ungroupedContacts.length?(f(),T(u,{key:0,count:s.ungroupedContacts.length},null,8,["count"])):R("",!0)]),_:1},8,["name","to","active"])):R("",!0),a.isContactsInteractionEnabled&&s.recentlyContactedContacts&&s.recentlyContactedContacts.contacts.length>0?(f(),T(h,{key:2,id:"recentlycontacted",name:e.t("contacts","Recently contacted"),to:{name:"group",params:{selectedGroup:a.GROUP_RECENTLY_CONTACTED}},active:a.routeState==="recentlycontacted",onClick:o[3]||(o[3]=L=>s.updateRouteState("recentlycontacted"))},{icon:S(()=>[E(g,{size:20})]),counter:S(()=>[s.recentlyContactedContacts.contacts.length?(f(),T(u,{key:0,count:s.recentlyContactedContacts.contacts.length},null,8,["count"])):R("",!0)]),_:1},8,["name","to","active"])):R("",!0),E(P,{id:"newgroup","menu-open":a.isNewGroupMenuOpen,"onUpdate:menuOpen":o[4]||(o[4]=L=>a.isNewGroupMenuOpen=L),"force-menu":!0,name:e.t("contacts","Contact groups"),onClick:ae(s.toggleNewGroupMenu,["prevent","stop"])},{actionsTriggerIcon:S(()=>[E(_,{size:20})]),actions:S(()=>[Yn(E(M,null,{icon:S(()=>[a.createGroupError?(f(),T(C,{key:0,size:20})):a.createGroupError?R("",!0):(f(),T(d,{key:1,size:20}))]),default:S(()=>[Z(" "+O(a.createGroupError?a.createGroupError:e.t("contacts","Create a new contact group")),1)]),_:1},512),[[yl,a.isNewGroupMenuOpen]]),Yn(E(N,{icon:"",placeholder:e.t("contacts","Contact group name"),onSubmit:ae(s.createNewGroup,["prevent","stop"])},null,8,["placeholder","onSubmit"]),[[yl,a.isNewGroupMenuOpen]])]),_:1},8,["menu-open","name","onClick"]),(f(!0),k(_t,null,jt(s.ellipsisGroupsMenu,L=>(f(),T(V,{key:L.key,"route-state":a.routeState,group:L,onUpdateRouteState:s.updateRouteState},null,8,["route-state","group","onUpdateRouteState"]))),128)),a.isCirclesEnabled?(f(),k(_t,{key:3},[s.groupsMenu.length>a.ELLIPSIS_COUNT?(f(),T(h,{key:0,name:s.collapseGroupsTitle,class:"app-navigation__collapse",icon:"",onClick:s.onToggleGroups},null,8,["name","onClick"])):R("",!0),E(P,{id:"newcircle",name:e.t("contacts","Teams")},{actions:S(()=>[E(K,{onClick:s.toggleNewCircleModal},{icon:S(()=>[E(_,{size:20})]),default:S(()=>[Z(" "+O(e.t("contacts","Create a new team")),1)]),_:1},8,["onClick"])]),_:1},8,["name"]),a.isNewCircleModalOpen?(f(),T(X,{key:1,loading:a.createCircleLoading,onClose:s.closeNewCircleIntro,onSubmit:s.createNewCircle},null,8,["loading","onClose","onSubmit"])):R("",!0),s.circlesMenu.length>0?(f(),k(_t,{key:2},[(f(!0),k(_t,null,jt(s.ellipsisCirclesMenu,L=>(f(),T(rt,{key:L.key,circle:L,onClick:q=>s.updateRouteState(`circle:${L.id}`)},null,8,["circle","onClick"]))),128)),s.circlesMenu.length>a.ELLIPSIS_COUNT?(f(),T(h,{key:0,name:s.collapseCirclesTitle,class:"app-navigation__collapse",icon:"",onClick:s.onToggleCircles},null,8,["name","onClick"])):R("",!0)],64)):R("",!0),D("li",BR,O(a.CIRCLE_DESC),1)],64)):R("",!0)]),footer:S(()=>[D("div",UR,[E(it,{"aria-label":e.t("contacts","Open the contacts app settings"),variant:"tertiary",wide:!0,onClick:s.showContactsSettings},{icon:S(()=>[E(pt,{size:20})]),default:S(()=>[Z(" "+O(a.CONTACTS_SETTINGS),1)]),_:1},8,["aria-label","onClick"])])]),default:S(()=>[E(et,{open:a.showSettings,"onUpdate:open":o[5]||(o[5]=L=>a.showSettings=L)},null,8,["open"])]),_:3})}const zR=tt($R,[["render",HR],["__scopeId","data-v-a8d44b03"]]),GR={name:"ProcessingScreen",components:{EmptyContent:yo,IconContact:_o},props:{total:{type:Number,required:!0},progress:{type:Number,required:!0},desc:{type:String,required:!0},title:{type:String,required:!0}}},FR={class:"processing-screen__progress"},YR=["max","value"];function XR(e,o,r,i,a,s){const l=w("IconContact"),c=w("EmptyContent");return f(),k("div",null,[E(c,{description:r.desc,name:r.title,class:"processing-screen__wrapper"},{icon:S(()=>[E(l,{size:20})]),_:1},8,["description","name"]),D("div",FR,[D("progress",{max:r.total,value:r.progress},null,8,YR)])])}const ig=tt(GR,[["render",XR],["__scopeId","data-v-5b1ffeb8"]]),jR={name:"AddToGroupView",components:{ProcessingScreen:ig,NcButton:he},props:{failed:{type:Number,default:0},progress:{type:Number,default:0},success:{type:Number,default:0},total:{type:Number,default:0},name:{type:String,default:""}},computed:{progressHeader(){return n("contacts","{success} contact added to {name}","{success} contacts added to {name}",this.success,{success:this.success,name:this.name})},finishedHeader(){return n("contacts","Adding {success} contact to {name}","Adding {success} contacts to {name}",this.success,{success:this.success,name:this.name})},messageFailed(){return n("contacts","{count} error","{count} errors",this.failed,{count:this.failed})}},methods:{onClose(){this.$emit("close")}}},WR={class:"close__button"};function qR(e,o,r,i,a,s){const l=w("ProcessingScreen"),c=w("NcButton");return f(),k("div",null,[E(l,{progress:r.progress,total:r.total,desc:r.failed>0?s.messageFailed:"",title:r.total===r.progress?s.finishedHeader:s.progressHeader},null,8,["progress","total","desc","title"]),D("div",WR,[r.total===r.progress?(f(),T(c,{key:0,class:"primary",onClick:s.onClose},{default:S(()=>[Z(O(e.t("contacts","Close")),1)]),_:1},8,["onClick"])):R("",!0)])])}const ZR=tt(jR,[["render",qR],["__scopeId","data-v-1e72e682"]]),JR={name:"ContactsPicker",components:{AddToGroupView:ZR,EntityPicker:Y1,Modal:qn},data(){return{showPicker:!1,pickerforGroup:null,pickerData:[],pickerTypes:[{id:"contact",label:t("contacts","Contacts")}],isProcessing:!1,isProcessDone:!1,processStatus:{failed:0,progress:0,success:0,total:0,name:""},passedGroupName:""}},computed:{contacts(){return this.$store.getters.getContacts},groups(){return this.$store.getters.getGroups},sortedContacts(){return this.$store.getters.getSortedContacts}},mounted(){_a("contacts:group:append",this.addContactsToGroup)},methods:{addContactsToGroup(e){if(console.debug("Contacts picker opened for group",e),this.passedGroupName=e.name?e.name:e,typeof e=="string"&&(e=this.groups.find(o=>o.name===e),!e)){console.error("Cannot add contact to an undefined group",e);return}this.pickerData=this.sortedContacts.map(({key:o})=>{const r=this.contacts[o];return{id:r.key,label:r.displayName,type:"contact",readOnly:r.addressbook.readOnly,groups:r.groups}}).filter(o=>!o.readOnly).filter(o=>o.groups.indexOf(e.name)===-1),this.showPicker=!0,this.pickerforGroup=e},onContactPickerClose(){this.pickerData=[],this.showPicker=!1},onContactPickerPick(e){console.debug("Adding",e,"to group",this.pickerforGroup);const o=this.pickerforGroup.name;this.isProcessing=!0,this.showPicker=!1,this.processStatus.total=e.length,this.processStatus.name=this.pickerforGroup.name,this.processStatus.progress=0,this.processStatus.failed=0;const r=f0(3),i=[];e.map(async a=>{try{const s=this.contacts[a.id];i.push(r(()=>_m(s,o).then(()=>{this.$store.dispatch("addContactToGroup",{contact:s,groupName:o}),this.processStatus.progress++,this.processStatus.success++}).catch(l=>{this.processStatus.progress++,this.processStatus.error++,console.error(l)})))}catch(s){console.error(s)}}),Promise.all(i).then(()=>{this.isProcessDone=!0,this.showPicker=!1,this.$router.push({name:"group",params:{selectedGroup:typeof this.passedGroupName=="string"?this.passedGroupName:this.passedGroupName.name}}),this.processStatus.failed===0&&setTimeout(this.closeProcess,3e3)})},closeProcess(){this.pickerforGroup=null,this.isProcessing=!1,this.isProcessDone=!1,this.processStatus.failed=0,this.processStatus.progress=0,this.processStatus.success=0,this.processStatus.total=0,!(this.passedGroupName===""||this.passedGroupName===void 0)&&this.$router.push({name:"group",params:{selectedGroup:typeof this.passedGroupName=="string"?this.passedGroupName:this.passedGroupName.name}})}}};function KR(e,o,r,i,a,s){const l=w("AddToGroupView"),c=w("Modal"),d=w("EntityPicker");return a.isProcessing||a.isProcessDone?(f(),T(c,{key:0,"clear-view-delay":-1,"can-close":a.isProcessDone,onClose:s.closeProcess},{default:S(()=>[E(l,gt(a.processStatus,{onClose:s.closeProcess}),null,16,["onClose"])]),_:1},8,["can-close","onClose"])):a.showPicker?(f(),T(d,{key:1,"confirm-label":e.t("contacts","Add to {group}",{group:a.pickerforGroup.name}),"title-label":e.t("contacts","Add members to {group}",{group:a.pickerforGroup.name}),"data-types":a.pickerTypes,"data-set":a.pickerData,"empty-data-set-description":e.t("contacts","Please note that you can only add contacts from writable address books to contact groups. Contacts from read-only address books, such as the system address book, cannot be added."),onClose:s.onContactPickerClose,onSubmit:s.onContactPickerPick},null,8,["confirm-label","title-label","data-types","data-set","empty-data-set-description","onClose","onSubmit"])):R("",!0)}const QR=tt(JR,[["render",KR]]),tP={name:"ImportView",components:{ProcessingScreen:ig,NcButton:he},computed:{importState(){return this.$store.getters.getImportState},addressbook(){return this.importState.addressbook},total(){return this.importState.total},accepted(){return this.importState.accepted},failed(){return this.importState.denied},progress(){return this.accepted+this.failed},importingHeader(){return n("contacts","Importing %n contact into {addressbook}","Importing %n contacts into {addressbook}",this.total,{addressbook:this.addressbook})},importedHeader(){return n("contacts","Done importing %n contact into {addressbook}","Done importing %n contacts into {addressbook}",this.total,{addressbook:this.addressbook})},importFailed(){return n("contacts","{count} error","{count} errors",this.failed,{count:this.failed})}},methods:{onClose(){this.$emit("close")}}},eP={class:"close__button"};function nP(e,o,r,i,a,s){const l=w("ProcessingScreen"),c=w("NcButton");return f(),k("div",null,[E(l,{progress:s.progress,total:s.total,desc:s.failed>0?s.importFailed:"",title:s.total===s.progress?s.importedHeader:s.importingHeader},null,8,["progress","total","desc","title"]),D("div",eP,[s.total===s.progress?(f(),T(c,{key:0,class:"primary",onClick:s.onClose},{default:S(()=>[Z(O(e.t("contacts","Close")),1)]),_:1},8,["onClick"])):R("",!0)])])}const oP=tt(tP,[["render",nP],["__scopeId","data-v-50dd203a"]]),rP={name:"Contacts",components:{NcButton:he,CircleContent:Y8,ChartContent:nS,ContactsContent:gI,ContactsPicker:QR,Content:dy,ImportView:oP,IconAdd:Rr,Modal:qn,RootNavigation:zR,SettingsImportContacts:km},mixins:[ja,ko],data(){return{appName:Bg,loadingCircles:gl,loadingContacts:!0}},computed:{addressbooks(){return this.$store.getters.getAddressbooks},contacts(){return this.$store.getters.getContacts},sortedContacts(){return this.$store.getters.getSortedContacts},groups(){return this.$store.getters.getGroups},circles(){return this.$store.getters.getCircles},orderKey(){return this.$store.getters.getOrderKey},importState(){return this.$store.getters.getImportState},isEmptyGroup(){return this.contactsList.length===0},isChartView(){return!!this.selectedChart},isImporting(){return this.importState.stage!=="default"},isImportDone(){return this.importState.stage==="done"},defaultAddressbook(){return this.addressbooks.find(e=>!e.readOnly&&e.enabled)},contactsList(){if(this.selectedGroup===Qi)return this.sortedContacts;if(this.selectedGroup===Ki)return this.ungroupedContacts.map(o=>this.sortedContacts.find(r=>r.key===o.key));if(this.selectedGroup===ta||this.selectedGroup===ei)return[];const e=this.groups.filter(o=>o.name===this.selectedGroup)[0];return e?this.sortedContacts.filter(o=>e.contacts.indexOf(o.key)>=0):[]},isCirclesView(){return this.selectedGroup===ta||this.selectedGroup===ei},ungroupedContacts(){return this.sortedContacts.filter(e=>this.contacts[e.key].groups&&this.contacts[e.key].groups.length===0)}},watch:{selectedGroup(){!this.isMobile&&!this.selectedChart&&this.selectFirstContactIfNone()},selectedContact(){!this.isMobile&&!this.selectedChart&&this.selectFirstContactIfNone()}},mounted(){this.isCirclesEnabled?this.logger.info("Circles frontend enabled"):this.logger.info("No compatible version of circles found")},async beforeMount(){if(Ji.connect({enableCardDAV:!0}).then(()=>{this.logger.debug("Connected to dav!",{client:Ji}),xp().setCurrentUserPrincipal(Ji),this.$store.dispatch("getAddressbooks").then(e=>{e.filter(o=>!o.readOnly).length===0?this.$store.dispatch("appendAddressbook",{displayName:t("contacts","Contacts")}).then(()=>{this.fetchContacts()}):this.fetchContacts()}),localStorage.getItem("orderKey")&&this.$store.commit("setOrder",localStorage.getItem("orderKey"))}),gl){const e=kd();this.$store.dispatch("getCircles").then(e.getUserGroups(br().uid)).then(()=>{this.loadingCircles=!1})}},methods:{async newContact(){if(this.isCirclesView){vr("contacts:circles:append",this.selectedCircle.id);return}const e=new cc(` BEGIN:VCARD VERSION:4.0 PRODID:-//Nextcloud Contacts v${Ug} END:VCARD `.trim().replace(/\t/gm,""),this.defaultAddressbook);e.fullName=t("contacts","Name"),e.rev=Wa.Time.fromJSDate(new Date,!0);const o=Cn.properties;for(const r in o)if(o[r].default){const i=o[r].defaultValue;let a=i.value;Array.isArray(a)&&(a=[...a]);const s=e.vCard.addPropertyWithValue(r,a);i.type&&s.setParameter("type",i.type)}[Qi,Ki].indexOf(this.selectedGroup)===-1&&(e.groups=[this.selectedGroup]);try{await this.$store.dispatch("addContact",e),await this.$router.push({name:"contact",params:{selectedGroup:this.selectedGroup,selectedContact:e.key}})}catch(r){bt(t("contacts","Unable to create the contact.")),console.error(r)}},updateSorting(e="displayName"){this.$store.commit("setOrder",e),this.$store.commit("sortContacts")},fetchContacts(){Promise.all(this.addressbooks.map(e=>e.enabled?this.$store.dispatch("getContactsFromAddressBook",{addressbook:e}):Promise.resolve())).then(()=>{this.loadingContacts=!1,!this.isMobile&&!this.selectedChart&&this.selectFirstContactIfNone()})},selectFirstContactIfNone(){if(this.$route.name==="import")return;const e=this.contactsList.findIndex(o=>o.key===this.selectedContact)>-1;if(!this.selectedContact||!e){if(this.selectedContact&&!e&&(bt(t("contacts","Contact not found")),this.$router.push({name:"group",params:{selectedGroup:this.selectedGroup}})),!this.selectedCircle&&!this.selectedUserGroup&&!this.groups.find(o=>o.name===this.selectedGroup)&&Qi!==this.selectedGroup&&Ki!==this.selectedGroup&&ta!==this.selectedGroup&&ei!==this.selectedGroup){bt(t("contacts","Group {group} not found",{group:this.selectedGroup})),console.error("Group not found",this.selectedGroup),this.$router.push({name:"root"});return}Object.keys(this.contactsList).length&&this.$router.push({name:"contact",params:{selectedGroup:this.selectedGroup,selectedContact:Object.values(this.contactsList)[0].key}})}},closeImport(){this.$store.dispatch("changeStage","default")}}},iP={class:"import-and-new-contact-buttons"};function aP(e,o,r,i,a,s){const l=w("SettingsImportContacts"),c=w("IconAdd"),d=w("NcButton"),u=w("RootNavigation"),h=w("UserGroupContent"),p=w("CircleContent"),m=w("ChartContent"),g=w("ContactsContent"),_=w("ImportView"),C=w("Modal"),M=w("ContactsPicker"),N=w("Content");return f(),T(N,{"app-name":a.appName},{default:S(()=>[E(u,{"contacts-list":s.contactsList,loading:a.loadingContacts||a.loadingCircles,"selected-group":e.selectedGroup,"selected-contact":e.selectedContact},{default:S(()=>[D("div",iP,[!a.loadingContacts&&s.isEmptyGroup&&!s.isChartView&&!s.isCirclesView?(f(),T(l,{key:0})):R("",!0),a.loadingContacts?R("",!0):(f(),T(d,{key:1,disabled:!s.defaultAddressbook,variant:"secondary",wide:"",onClick:s.newContact},{icon:S(()=>[E(c,{size:20})]),default:S(()=>[Z(" "+O(s.isCirclesView?e.t("contacts","Add member"):e.t("contacts","New contact")),1)]),_:1},8,["disabled","onClick"]))])]),_:1},8,["contacts-list","loading","selected-group","selected-contact"]),e.selectedUserGroup?(f(),T(h,{key:0,loding:a.loadingCircles},null,8,["loding"])):R("",!0),e.selectedCircle||e.selectedUserGroup?(f(),T(p,{key:1,loading:a.loadingCircles},null,8,["loading"])):e.selectedChart?(f(),T(m,{key:2,"contacts-list":s.contacts},null,8,["contacts-list"])):(f(),T(g,{key:3,"contacts-list":s.contactsList,loading:a.loadingContacts,onNewContact:s.newContact},null,8,["contacts-list","loading","onNewContact"])),s.isImporting?(f(),T(C,{key:4,"clear-view-delay":-1,"can-close":s.isImportDone,onClose:s.closeImport},{default:S(()=>[E(_,{onClose:s.closeImport},null,8,["onClose"])]),_:1},8,["can-close","onClose"])):R("",!0),E(M)]),_:1},8,["app-name"])}const Io=tt(rP,[["render",aP],["__scopeId","data-v-647041df"]]),sP=qy(Fo("/apps/contacts","")),ic=yv({history:sP,linkActiveClass:"active",routes:[{path:"/",component:Io,props:!0,name:"root",redirect:{name:"group",params:{selectedGroup:t("contacts","All contacts")}},children:[{path:`/${m0}/:selectedChart`,name:"chart",component:Io},{path:"import",name:"import",component:Io},{path:`${ta}/:selectedCircle`,name:"circle",component:Io},{path:":selectedGroup",name:"group",component:Io},{path:":selectedGroup/:selectedContact",name:"contact",component:Io},{path:`${ei}/:selectedUserGroup`,name:"user_group",component:Io}]}]}),sr=Tp(py);sr.config.errorHandler=async function(e,o,r){vc.error(`[Vue error]: Error in ${r}: ${e}`,{error:e,vm:o,info:r}),window.onerror?.(e)};const lP=g0();sr.use(lP),sr.use(y0),sr.use(ic),sr.mixin(Mp),window.location.pathname.split("/")[1]==="index.php"&&window.OC.config.modRewriteWorking&&ic.push({name:"group",params:{selectedGroup:t("contacts","All contacts")}}),sr.mount("#content"); //# sourceMappingURL=contacts-main.mjs.map
Save File
Cancel