diff --git a/core/src/components/AppItem.vue b/core/src/components/AppItem.vue index b4237f11c87b6..29da5d8a99999 100644 --- a/core/src/components/AppItem.vue +++ b/core/src/components/AppItem.vue @@ -125,10 +125,9 @@ const unreadLabel = computed(() => { &__icon { width: var(--app-item-icon-size); height: var(--app-item-icon-size); - // Force the icon to white on the colored circle, then apply the - // same vertical alpha gradient (--header-menu-icon-mask) used in - // the header so icons read consistently across the design. - filter: brightness(0) invert(1); + // App icons are bright by default; flip them to dark when the + // primary color (circle background) is bright (e.g. white in dark mode). + filter: var(--primary-invert-if-bright); mask: var(--header-menu-icon-mask); } @@ -149,6 +148,9 @@ const unreadLabel = computed(() => { line-height: 1.3; text-align: center; color: var(--color-main-text); + // Needs a matching to actually break with a hyphen. + -webkit-hyphens: auto; + hyphens: auto; word-break: normal; overflow-wrap: break-word; max-width: 100%; @@ -159,7 +161,7 @@ const unreadLabel = computed(() => { font-weight: bold; } - // Outlined variant: no fill or gradient; icon color is unforced. + // Outlined variant: no fill or gradient. &--outlined &__circle { background: transparent; background-image: none; @@ -167,7 +169,7 @@ const unreadLabel = computed(() => { } &--outlined &__icon { - filter: brightness(0); + filter: var(--background-invert-if-dark); mask: none; } } diff --git a/core/src/components/AppMenu.vue b/core/src/components/AppMenu.vue index 02abc8edb0317..09e63b9982ba0 100644 --- a/core/src/components/AppMenu.vue +++ b/core/src/components/AppMenu.vue @@ -74,7 +74,7 @@ import { getCurrentUser } from '@nextcloud/auth' import { subscribe, unsubscribe } from '@nextcloud/event-bus' import { loadState } from '@nextcloud/initial-state' import { isRTL, n, t } from '@nextcloud/l10n' -import { generateFilePath, generateUrl } from '@nextcloud/router' +import { generateUrl, imagePath } from '@nextcloud/router' import { defineComponent, ref } from 'vue' import NcButton from '@nextcloud/vue/components/NcButton' import NcPopover from '@nextcloud/vue/components/NcPopover' @@ -120,7 +120,7 @@ export default defineComponent({ active: false, order: Number.MAX_SAFE_INTEGER, href: generateUrl('/settings/apps'), - icon: generateFilePath('settings', 'img', 'settings_apps.svg'), + icon: imagePath('core', 'actions/add.svg'), type: 'link', name: t('core', 'More apps'), unread: 0, @@ -131,7 +131,7 @@ export default defineComponent({ active: false, order: Number.MAX_SAFE_INTEGER, href: 'https://apps.nextcloud.com/', - icon: generateFilePath('settings', 'img', 'apps.svg'), + icon: imagePath('core', 'actions/add.svg'), type: 'link', name: t('core', 'App store'), unread: 0, diff --git a/core/src/tests/components/AppMenu.spec.ts b/core/src/tests/components/AppMenu.spec.ts index bfacb5538b155..94fdcb79a73b0 100644 --- a/core/src/tests/components/AppMenu.spec.ts +++ b/core/src/tests/components/AppMenu.spec.ts @@ -39,7 +39,7 @@ vi.mock('@nextcloud/event-bus', () => eventBus) // Stub @nextcloud/router so we don't need a webroot for the moreApps URL. vi.mock('@nextcloud/router', () => ({ generateUrl: (path: string) => path, - generateFilePath: (app: string, type: string, file: string) => `/apps/${app}/${type}/${file}`, + imagePath: (app: string, file: string) => `/${app}/img/${file}`, })) // Build a minimal nav entry that satisfies INavigationEntry. diff --git a/dist/core-main.js b/dist/core-main.js index 22ccb8fc6be82..687c62771cf0b 100644 --- a/dist/core-main.js +++ b/dist/core-main.js @@ -1,2 +1,2 @@ -(()=>{var e,r,n,o={30981(e,r,n){"use strict";var o={};n.r(o),n.d(o,{VERSION:()=>f,after:()=>Ue,all:()=>ir,allKeys:()=>wt,any:()=>ar,assign:()=>Ut,before:()=>Fe,bind:()=>ke,bindAll:()=>Ie,chain:()=>Ce,chunk:()=>Hr,clone:()=>Vt,collect:()=>Ze,compact:()=>Rr,compose:()=>Be,constant:()=>it,contains:()=>sr,countBy:()=>wr,create:()=>Ht,debounce:()=>Pe,default:()=>Wr,defaults:()=>Ft,defer:()=>Me,delay:()=>je,detect:()=>Je,difference:()=>Mr,drop:()=>Tr,each:()=>Qe,escape:()=>fe,every:()=>ir,extend:()=>Bt,extendOwn:()=>Ut,filter:()=>nr,find:()=>Je,findIndex:()=>qe,findKey:()=>He,findLastIndex:()=>We,findWhere:()=>Xe,first:()=>Or,flatten:()=>jr,foldl:()=>er,foldr:()=>rr,forEach:()=>Qe,functions:()=>Lt,get:()=>Yt,groupBy:()=>Ar,has:()=>Kt,head:()=>Or,identity:()=>Jt,include:()=>sr,includes:()=>sr,indexBy:()=>br,indexOf:()=>Ye,initial:()=>kr,inject:()=>er,intersection:()=>Dr,invert:()=>Pt,invoke:()=>cr,isArguments:()=>rt,isArray:()=>Z,isArrayBuffer:()=>q,isBoolean:()=>P,isDataView:()=>Q,isDate:()=>F,isElement:()=>L,isEmpty:()=>vt,isEqual:()=>bt,isError:()=>H,isFinite:()=>nt,isFunction:()=>$,isMap:()=>Tt,isMatch:()=>gt,isNaN:()=>ot,isNull:()=>M,isNumber:()=>U,isObject:()=>j,isRegExp:()=>z,isSet:()=>Rt,isString:()=>B,isSymbol:()=>V,isTypedArray:()=>ft,isUndefined:()=>N,isWeakMap:()=>It,isWeakSet:()=>jt,iteratee:()=>ee,keys:()=>ht,last:()=>Ir,lastIndexOf:()=>Ke,map:()=>Ze,mapObject:()=>ne,matcher:()=>Xt,matches:()=>Xt,max:()=>fr,memoize:()=>Re,methods:()=>Lt,min:()=>pr,mixin:()=>qr,negate:()=>De,noop:()=>oe,now:()=>ce,object:()=>Fr,omit:()=>Er,once:()=>ze,pairs:()=>Nt,partial:()=>Ee,partition:()=>xr,pick:()=>Sr,pluck:()=>ur,property:()=>Qt,propertyOf:()=>ie,random:()=>se,range:()=>zr,reduce:()=>er,reduceRight:()=>rr,reject:()=>or,rest:()=>Tr,restArguments:()=>R,result:()=>be,sample:()=>vr,select:()=>nr,shuffle:()=>gr,size:()=>Cr,some:()=>ar,sortBy:()=>yr,sortedIndex:()=>Ge,tail:()=>Tr,take:()=>Or,tap:()=>qt,template:()=>Ae,templateSettings:()=>de,throttle:()=>Ne,times:()=>ae,toArray:()=>hr,toPath:()=>Wt,transpose:()=>Br,unescape:()=>pe,union:()=>Lr,uniq:()=>Pr,unique:()=>Pr,uniqueId:()=>xe,unzip:()=>Br,values:()=>Mt,where:()=>lr,without:()=>Nr,wrap:()=>Le,zip:()=>Ur});var i={};n.r(i),n.d(i,{clearIconCache:()=>fi,getIconUrl:()=>ui});var a={};n.r(a),n.d(a,{deleteKey:()=>Ri,getApps:()=>ki,getKeys:()=>Oi,getValue:()=>Ti,setValue:()=>Ii});var s={};n.r(s),n.d(s,{formatLinksPlain:()=>Fi,formatLinksRich:()=>Ui,plainToRich:()=>Di,richToPlain:()=>Bi});var c=n(21777),u=n(19051),l=n(63814),f="1.13.8",p="object"==typeof self&&self.self===self&&self||"object"==typeof globalThis&&globalThis.global===globalThis&&globalThis||Function("return this")()||{},d=Array.prototype,h=Object.prototype,v="undefined"!=typeof Symbol?Symbol.prototype:null,g=d.push,y=d.slice,m=h.toString,A=h.hasOwnProperty,b="undefined"!=typeof ArrayBuffer,w="undefined"!=typeof DataView,x=Array.isArray,C=Object.keys,_=Object.create,S=b&&ArrayBuffer.isView,E=isNaN,k=isFinite,O=!{toString:null}.propertyIsEnumerable("toString"),T=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],I=Math.pow(2,53)-1;function R(t,e){return e=null==e?t.length-1:+e,function(){for(var r=Math.max(arguments.length-e,0),n=Array(r),o=0;o=0&&r<=I}}function st(t){return function(e){return null==e?void 0:e[t]}}const ct=st("byteLength"),ut=at(ct);var lt=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const ft=b?function(t){return S?S(t)&&!Q(t):ut(t)&<.test(m.call(t))}:it(!1),pt=st("length");function dt(t,e){e=function(t){for(var e={},r=t.length,n=0;n=0))if(n.push(t),o.push(e),r.push(!0),c){if((f=t.length)!==e.length)return!1;for(;f--;)r.push({a:t[f],b:e[f]})}else{var p,d=ht(t);if(f=d.length,ht(e).length!==f)return!1;for(;f--;){if(!tt(e,p=d[f]))return!1;r.push({a:t[p],b:e[p]})}}}else n.pop(),o.pop()}return!0}function wt(t){if(!j(t))return[];var e=[];for(var r in t)e.push(r);return O&&dt(t,e),e}function xt(t){var e=pt(t);return function(r){if(null==r)return!1;var n=wt(r);if(pt(n))return!1;for(var o=0;o":">",'"':""","'":"'","`":"`"},fe=ue(le),pe=ue(Pt(le)),de=yt.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var he=/(.)^/,ve={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},ge=/\\|'|\r|\n|\u2028|\u2029/g;function ye(t){return"\\"+ve[t]}var me=/^\s*(\w|\$)+\s*$/;function Ae(t,e,r){!e&&r&&(e=r),e=Ft({},e,yt.templateSettings);var n=RegExp([(e.escape||he).source,(e.interpolate||he).source,(e.evaluate||he).source].join("|")+"|$","g"),o=0,i="__p+='";t.replace(n,function(e,r,n,a,s){return i+=t.slice(o,s).replace(ge,ye),o=s+e.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":n?i+="'+\n((__t=("+n+"))==null?'':__t)+\n'":a&&(i+="';\n"+a+"\n__p+='"),e}),i+="';\n";var a,s=e.variable;if(s){if(!me.test(s))throw new Error("variable is not a bare identifier: "+s)}else i="with(obj||{}){\n"+i+"}\n",s="obj";i="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{a=new Function(s,"_",i)}catch(t){throw t.source=i,t}var c=function(t){return a.call(this,t,yt)};return c.source="function("+s+"){\n"+i+"}",c}function be(t,e,r){var n=(e=Gt(e)).length;if(!n)return $(r)?r.call(t):r;for(var o=0;o=a){if(!s.length)break;var c=s.pop();i=c.i,t=c.v,a=pt(t)}else{var u=t[i++];s.length>=e?n[o++]=u:Oe(u)&&(Z(u)||rt(u))?(s.push({i,v:t}),i=0,a=pt(t=u)):r||(n[o++]=u)}return n}const Ie=R(function(t,e){var r=(e=Te(e,!1,!1)).length;if(r<1)throw new Error("bindAll must be passed function names");for(;r--;){var n=e[r];t[n]=ke(t[n],t)}return t});function Re(t,e){var r=function(n){var o=r.cache,i=""+(e?e.apply(this,arguments):n);return tt(o,i)||(o[i]=t.apply(this,arguments)),o[i]};return r.cache={},r}const je=R(function(t,e,r){return setTimeout(function(){return t.apply(null,r)},e)}),Me=Ee(je,yt,1);function Ne(t,e,r){var n,o,i,a,s=0;r||(r={});var c=function(){s=!1===r.leading?0:ce(),n=null,a=t.apply(o,i),n||(o=i=null)},u=function(){var u=ce();s||!1!==r.leading||(s=u);var l=e-(u-s);return o=this,i=arguments,l<=0||l>e?(n&&(clearTimeout(n),n=null),s=u,a=t.apply(o,i),n||(o=i=null)):n||!1===r.trailing||(n=setTimeout(c,l)),a};return u.cancel=function(){clearTimeout(n),s=0,n=o=i=null},u}function Pe(t,e,r){var n,o,i,a,s,c=function(){var u=ce()-o;e>u?n=setTimeout(c,e-u):(n=null,r||(a=t.apply(s,i)),n||(i=s=null))},u=R(function(u){return s=this,i=u,o=ce(),n||(n=setTimeout(c,e),r&&(a=t.apply(s,i))),a});return u.cancel=function(){clearTimeout(n),n=i=s=null},u}function Le(t,e){return Ee(e,t)}function De(t){return function(){return!t.apply(this,arguments)}}function Be(){var t=arguments,e=t.length-1;return function(){for(var r=e,n=t[e].apply(this,arguments);r--;)n=t[r].call(this,n);return n}}function Ue(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}function Fe(t,e){var r;return function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=null),r}}const ze=Ee(Fe,2);function He(t,e,r){e=re(e,r);for(var n,o=ht(t),i=0,a=o.length;i0?0:o-1;i>=0&&i0?a=i>=0?i:Math.max(i+s,a):s=i>=0?Math.min(i+1,s):i+s+1;else if(r&&i&&s)return n[i=r(n,o)]===o?i:-1;if(o!=o)return(i=e(y.call(n,a,s),ot))>=0?i+a:-1;for(i=t>0?a:s-1;i>=0&&i=3;return function(e,r,n,o){var i=!Oe(e)&&ht(e),a=(i||e).length,s=t>0?0:a-1;for(o||(n=e[i?i[s]:s],s+=t);s>=0&&s=0}const cr=R(function(t,e,r){var n,o;return $(e)?o=e:(e=Gt(e),n=e.slice(0,-1),e=e[e.length-1]),Ze(t,function(t){var i=o;if(!i){if(n&&n.length&&(t=$t(t,n)),null==t)return;i=t[e]}return null==i?i:i.apply(t,r)})});function ur(t,e){return Ze(t,Qt(e))}function lr(t,e){return nr(t,Xt(e))}function fr(t,e,r){var n,o,i=-1/0,a=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,c=(t=Oe(t)?t:Mt(t)).length;si&&(i=n);else e=re(e,r),Qe(t,function(t,r,n){((o=e(t,r,n))>a||o===-1/0&&i===-1/0)&&(i=t,a=o)});return i}function pr(t,e,r){var n,o,i=1/0,a=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,c=(t=Oe(t)?t:Mt(t)).length;sn||void 0===r)return 1;if(r1&&(n=Zt(n,e[1])),e=wt(t)):(n=_r,e=Te(e,!1,!1),t=Object(t));for(var o=0,i=e.length;o1&&(r=e[1])):(e=Ze(Te(e,!1,!1),String),n=function(t,r){return!sr(e,r)}),Sr(t,n,r)});function kr(t,e,r){return y.call(t,0,Math.max(0,t.length-(null==e||r?1:e)))}function Or(t,e,r){return null==t||t.length<1?null==e||r?void 0:[]:null==e||r?t[0]:kr(t,t.length-e)}function Tr(t,e,r){return y.call(t,null==e||r?1:e)}function Ir(t,e,r){return null==t||t.length<1?null==e||r?void 0:[]:null==e||r?t[t.length-1]:Tr(t,Math.max(0,t.length-e))}function Rr(t){return nr(t,Boolean)}function jr(t,e){return Te(t,e,!1)}const Mr=R(function(t,e){return e=Te(e,!0,!0),nr(t,function(t){return!sr(e,t)})}),Nr=R(function(t,e){return Mr(t,e)});function Pr(t,e,r,n){P(e)||(n=r,r=e,e=!1),null!=r&&(r=re(r,n));for(var o=[],i=[],a=0,s=pt(t);av.value.find(t=>t.teamId===g.value)?.displayName);async function m(t){p.value=""===t?(0,Yr.t)("core","Loading your contacts …"):(0,Yr.t)("core","Looking for {term} …",{term:t}),d.value=!1;try{const{data:e}=await u.Ay.post((0,l.Jv)("/contactsmenu/contacts"),{filter:t,teamId:"$_all_$"!==g.value?g.value:void 0});f.value=e.contacts,s.value=e.contactsAppEnabled,p.value=void 0}catch(e){jn.error("could not load contacts",{error:e,searchTerm:t}),d.value=!0}}(0,Xr.sV)(async()=>{const t=e.getItem("core:contacts:team");if(t&&(g.value=JSON.parse(t)),0===Nn.length)try{const{data:t}=await u.Ay.get((0,l.Jv)("/contactsmenu/teams"));Nn.push(...t)}catch(t){jn.error("could not load user teams",{error:t})}v.value=[...Nn]}),(0,Xr.wB)(g,()=>{e.setItem("core:contacts:team",JSON.stringify(g.value)),m(h.value)});const A=(0,tn.A)(function(){m(h.value)},500);function b(){(0,Xr.dY)(()=>{i.value?.focus(),i.value?.select()})}return{__sfc:!0,userTeams:Nn,storage:e,user:r,contactsAppURL:n,contactsAppMgmtURL:o,contactsMenuInput:i,actions:a,contactsAppEnabled:s,contacts:f,loadingText:p,hasError:d,searchTerm:h,teams:v,selectedTeam:g,selectedTeamName:y,onOpened:async function(){await m("")},getContacts:m,onInputDebounced:A,onReset:function(){h.value="",f.value=[],b()},focusInput:b,mdiAccountGroupOutline:Qr.dgQ,mdiContacts:Qr.aB4,mdiMagnify:Qr.U4M,t:Yr.t,NcActionButton:en.A,NcActions:rn.A,NcButton:nn.A,NcEmptyContent:on.A,NcHeaderMenu:an.A,NcIconSvgWrapper:sn.A,NcLoadingIcon:cn.A,NcTextField:un.A,ContactMenuEntry:In}}}),Ln=Pn;var Dn=n(32351),Bn={};Bn.styleTagTransform=En(),Bn.setAttributes=xn(),Bn.insert=bn().bind(null,"head"),Bn.domAPI=mn(),Bn.insertStyleElement=_n(),gn()(Dn.A,Bn),Dn.A&&Dn.A.locals&&Dn.A.locals;const Un=(0,Tn.A)(Ln,function(){var t=this,e=t._self._c,r=t._self._setupProxy;return e(r.NcHeaderMenu,{staticClass:"contactsmenu",attrs:{id:"contactsmenu","aria-label":r.t("core","Search contacts"),"exclude-click-outside-selectors":".v-popper__popper"},on:{open:r.onOpened},scopedSlots:t._u([{key:"trigger",fn:function(){return[e(r.NcIconSvgWrapper,{staticClass:"contactsmenu__trigger-icon",attrs:{path:r.mdiContacts}})]},proxy:!0}])},[t._v(" "),e("div",{staticClass:"contactsmenu__menu"},[e("div",{staticClass:"contactsmenu__menu__search-container"},[e("div",{staticClass:"contactsmenu__menu__input-wrapper"},[e(r.NcActions,{attrs:{"force-menu":"","aria-label":r.t("core","Filter by team"),variant:"tertiary"},scopedSlots:t._u([{key:"icon",fn:function(){return[e(r.NcIconSvgWrapper,{attrs:{path:r.mdiAccountGroupOutline}})]},proxy:!0},{key:"default",fn:function(){return[e(r.NcActionButton,{attrs:{modelValue:r.selectedTeam,value:"$_all_$",type:"radio"},on:{"update:modelValue":function(t){r.selectedTeam=t},"update:model-value":function(t){r.selectedTeam=t}}},[t._v("\n\t\t\t\t\t\t\t"+t._s(r.t("core","All teams"))+"\n\t\t\t\t\t\t")]),t._v(" "),t._l(r.teams,function(n){return e(r.NcActionButton,{key:n.teamId,attrs:{modelValue:r.selectedTeam,value:n.teamId,type:"radio"},on:{"update:modelValue":function(t){r.selectedTeam=t},"update:model-value":function(t){r.selectedTeam=t}}},[t._v("\n\t\t\t\t\t\t\t"+t._s(n.displayName)+"\n\t\t\t\t\t\t")])})]},proxy:!0}])}),t._v(" "),e(r.NcTextField,{ref:"contactsMenuInput",staticClass:"contactsmenu__menu__search",attrs:{id:"contactsmenu__menu__search","trailing-button-icon":"close",label:r.selectedTeamName?r.t("core","Search contacts in team {team}",{team:r.selectedTeamName}):r.t("core","Search contacts …"),"trailing-button-label":r.t("core","Reset search"),"show-trailing-button":""!==r.searchTerm,type:"search"},on:{input:r.onInputDebounced,"trailing-button-click":r.onReset},model:{value:r.searchTerm,callback:function(t){r.searchTerm=t},expression:"searchTerm"}})],1),t._v(" "),t._l(r.actions,function(n){return e(r.NcButton,{key:n.id,staticClass:"contactsmenu__menu__action",attrs:{"aria-label":n.label,title:n.label,variant:"tertiary-no-background"},on:{click:n.onClick},scopedSlots:t._u([{key:"icon",fn:function(){return[e(r.NcIconSvgWrapper,{attrs:{svg:n.icon}})]},proxy:!0}],null,!0)})})],2),t._v(" "),r.hasError?e(r.NcEmptyContent,{attrs:{name:r.t("core","Could not load your contacts")},scopedSlots:t._u([{key:"icon",fn:function(){return[e(r.NcIconSvgWrapper,{attrs:{path:r.mdiMagnify}})]},proxy:!0}],null,!1,1853740774)}):r.loadingText?e(r.NcEmptyContent,{attrs:{name:r.loadingText},scopedSlots:t._u([{key:"icon",fn:function(){return[e(r.NcLoadingIcon)]},proxy:!0}])}):0===r.contacts.length?e(r.NcEmptyContent,{attrs:{name:r.t("core","No contacts found")},scopedSlots:t._u([{key:"icon",fn:function(){return[e(r.NcIconSvgWrapper,{attrs:{path:r.mdiMagnify}})]},proxy:!0}])}):e("div",{staticClass:"contactsmenu__menu__content"},[e("div",{attrs:{id:"contactsmenu-contacts"}},[e("ul",{attrs:{"aria-label":r.t("core","Contacts list")}},t._l(r.contacts,function(t){return e(r.ContactMenuEntry,{key:t.id,attrs:{contact:t}})}),1)]),t._v(" "),r.contactsAppEnabled?e("div",{staticClass:"contactsmenu__menu__content__footer"},[e(r.NcButton,{attrs:{variant:"tertiary",href:r.contactsAppURL}},[t._v("\n\t\t\t\t\t"+t._s(r.t("core","Show all contacts"))+"\n\t\t\t\t")])],1):r.user.isAdmin?e("div",{staticClass:"contactsmenu__menu__content__footer"},[e(r.NcButton,{attrs:{variant:"tertiary",href:r.contactsAppMgmtURL}},[t._v("\n\t\t\t\t\t"+t._s(r.t("core","Install the Contacts app"))+"\n\t\t\t\t")])],1):t._e()])],1)])},[],!1,null,"253ecd69",null).exports;class Fn{constructor(){(function(t,e,r){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r})(this,"_actions",void 0),this._actions=[]}get actions(){return this._actions}addAction(t){this._actions.push(t)}}var zn=n(61338),Hn=n(81222),Vn=n(54562);const qn={name:"DotsGridIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Wn=(0,Tn.A)(qn,function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon dots-grid-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12 16C13.1 16 14 16.9 14 18S13.1 20 12 20 10 19.1 10 18 10.9 16 12 16M12 10C13.1 10 14 10.9 14 12S13.1 14 12 14 10 13.1 10 12 10.9 10 12 10M12 4C13.1 4 14 4.9 14 6S13.1 8 12 8 10 7.1 10 6 10.9 4 12 4M6 16C7.1 16 8 16.9 8 18S7.1 20 6 20 4 19.1 4 18 4.9 16 6 16M6 10C7.1 10 8 10.9 8 12S7.1 14 6 14 4 13.1 4 12 4.9 10 6 10M6 4C7.1 4 8 4.9 8 6S7.1 8 6 8 4 7.1 4 6 4.9 4 6 4M18 16C19.1 16 20 16.9 20 18S19.1 20 18 20 16 19.1 16 18 16.9 16 18 16M18 10C19.1 10 20 10.9 20 12S19.1 14 18 14 16 13.1 16 12 16.9 10 18 10M18 4C19.1 4 20 4.9 20 6S19.1 8 18 8 16 7.1 16 6 16.9 4 18 4Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])},[],!1,null,null,null).exports,Gn=(0,Xr.pM)({__name:"AppItem",props:{app:null,newTab:{type:Boolean},outlined:{type:Boolean},tabindex:{default:-1}},setup(t){const e=t,r=(0,Xr.EW)(()=>{if(e.app.unread)return(0,Yr.n)("core","{count} notification","{count} notifications",e.app.unread,{count:e.app.unread})});return{__sfc:!0,props:e,unreadLabel:r}}});var $n=n(49180),Yn={};Yn.styleTagTransform=En(),Yn.setAttributes=xn(),Yn.insert=bn().bind(null,"head"),Yn.domAPI=mn(),Yn.insertStyleElement=_n(),gn()($n.A,Yn),$n.A&&$n.A.locals&&$n.A.locals;const Kn=(0,Tn.A)(Gn,function(){var t=this,e=t._self._c,r=t._self._setupProxy;return e("a",{staticClass:"app-item",class:{"app-item--active":t.app.active,"app-item--outlined":t.outlined},attrs:{href:t.app.href,target:t.newTab?"_blank":void 0,rel:t.newTab?"noopener noreferrer":void 0,"aria-current":t.app.active?"page":void 0,tabindex:t.tabindex,title:t.app.name,role:"menuitem"}},[e("span",{staticClass:"app-item__circle"},[e("img",{staticClass:"app-item__icon",attrs:{src:t.app.icon,alt:"","aria-hidden":"true"}}),t._v(" "),t.app.unread?e("span",{staticClass:"app-item__unread",attrs:{"aria-hidden":"true"}}):t._e()]),t._v(" "),e("span",{staticClass:"app-item__label"},[t._v("\n\t\t"+t._s(t.app.name)+"\n\t\t"),t.app.unread?e("span",{staticClass:"hidden-visually"},[t._v(", "+t._s(r.unreadLabel))]):t._e()])])},[],!1,null,"8004ada6",null).exports,Jn=(0,Xr.pM)({name:"AppMenu",components:{AppItem:Kn,IconDotsGrid:Wn,NcButton:nn.A,NcPopover:Vn.A},setup(){const t=(0,Xr.KR)(!1);return{t:Yr.t,n:Yr.n,opened:t}},data:()=>({appList:(0,Hn.C)("core","apps",[]),isAdmin:(0,c.HW)()?.isAdmin??!1,focusedIndex:0,openedFrom:null,moreAppsEntry:{id:"more-apps",active:!1,order:Number.MAX_SAFE_INTEGER,href:(0,l.Jv)("/settings/apps"),icon:(0,l.fg)("settings","img","settings_apps.svg"),type:"link",name:(0,Yr.t)("core","More apps"),unread:0},appStoreEntry:{id:"app-store",active:!1,order:Number.MAX_SAFE_INTEGER,href:"https://apps.nextcloud.com/",icon:(0,l.fg)("settings","img","apps.svg"),type:"link",name:(0,Yr.t)("core","App store"),unread:0},popoverSkidding:(0,Yr.V8)()?82:-82}),computed:{currentApp(){return this.appList.find(t=>t.active)},gridItems(){const t=this.isAdmin?this.moreAppsEntry:this.appStoreEntry;return[...this.appList,t]}},watch:{opened(t){t&&(this.focusedIndex=this.activeGridIndex())}},mounted(){(0,zn.B1)("nextcloud:app-menu.refresh",this.setApps),this.focusedIndex=this.activeGridIndex(),this.$refs.popover.$on("after-hide",this.onPopoverAfterHide)},beforeUnmount(){(0,zn.al)("nextcloud:app-menu.refresh",this.setApps),this.$refs.popover?.$off("after-hide",this.onPopoverAfterHide)},methods:{returnFocusTarget(){return"currentApp"===this.openedFrom?this.$el.querySelector(".app-menu__current-app"):this.$el.querySelector(".app-menu__waffle")},onPopoverAfterHide(){this.openedFrom=null},onTriggerClick(t){this.openedFrom=t,this.opened=!this.opened},setNavigationCounter(t,e){const r=this.appList.find(({app:e})=>e===t);r?r.unread=e:jn.warn(`Could not find app "${t}" for setting navigation count`)},setApps({apps:t}){this.appList=t,this.focusedIndex>=this.gridItems.length&&(this.focusedIndex=this.activeGridIndex())},activeGridIndex(){const t=this.gridItems.findIndex(t=>t.active);return-1===t?0:t},async onGridKeydown(t){if(t.ctrlKey||t.metaKey||t.altKey||t.shiftKey)return;if(0===this.gridItems.length)return;const e=this.gridItems.length,r=this.focusedIndex;let n=r;switch(t.key){case"ArrowRight":r%4!=3&&r+1=0&&(n=r-4);break;case"Home":n=0;break;case"End":n=e-1;break;case"Enter":case" ":{const e=this.$refs.items;return e?.[this.focusedIndex]?.$el?.click(),this.opened=!1,t.preventDefault(),void t.stopPropagation()}default:return}t.preventDefault(),t.stopPropagation(),n!==r&&(this.focusedIndex=n),await this.$nextTick();const o=this.$refs.items;o?.[this.focusedIndex]?.$el?.focus()}}});var Xn=n(50089),Qn={};Qn.styleTagTransform=En(),Qn.setAttributes=xn(),Qn.insert=bn().bind(null,"head"),Qn.domAPI=mn(),Qn.insertStyleElement=_n(),gn()(Xn.A,Qn),Xn.A&&Xn.A.locals&&Xn.A.locals;var Zn=n(91429),to={};to.styleTagTransform=En(),to.setAttributes=xn(),to.insert=bn().bind(null,"head"),to.domAPI=mn(),to.insertStyleElement=_n(),gn()(Zn.A,to),Zn.A&&Zn.A.locals&&Zn.A.locals;const eo=(0,Tn.A)(Jn,function(){var t=this,e=t._self._c;return t._self._setupProxy,e("nav",{staticClass:"app-menu",attrs:{"aria-label":t.t("core","Applications")}},[e("NcPopover",{ref:"popover",attrs:{shown:t.opened,triggers:[],placement:"bottom-start",skidding:t.popoverSkidding,setReturnFocus:t.returnFocusTarget,popoverBaseClass:"app-menu__popover-base",popupRole:"menu"},on:{"update:shown":function(e){t.opened=e}},scopedSlots:t._u([{key:"trigger",fn:function(){return[e("NcButton",{staticClass:"app-menu__waffle",attrs:{variant:"tertiary-no-background","aria-label":t.t("core","Open apps menu"),"aria-haspopup":"menu","aria-expanded":t.opened?"true":"false"},on:{click:function(e){return t.onTriggerClick("waffle")}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconDotsGrid",{attrs:{size:20}})]},proxy:!0}])})]},proxy:!0}])},[t._v(" "),e("div",{staticClass:"app-menu__popover",attrs:{role:"menu","aria-label":t.t("core","Apps")}},[e("div",{staticClass:"app-menu__grid",on:{keydown:t.onGridKeydown}},t._l(t.gridItems,function(r,n){return e("AppItem",{key:r.id,ref:"items",refInFor:!0,attrs:{app:r,outlined:"more-apps"===r.id||"app-store"===r.id,newTab:"app-store"===r.id,tabindex:n===t.focusedIndex?0:-1}})}),1)])]),t._v(" "),t.currentApp?e("NcButton",{staticClass:"app-menu__current-app",attrs:{variant:"tertiary-no-background","aria-label":t.t("core","Open apps menu"),"aria-haspopup":"menu","aria-expanded":t.opened?"true":"false"},on:{click:function(e){return t.onTriggerClick("currentApp")}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("img",{staticClass:"app-menu__current-app-icon",attrs:{src:t.currentApp.icon,alt:"","aria-hidden":"true"}})]},proxy:!0}],null,!1,1350683340)},[t._v(" "),e("span",{staticClass:"app-menu__current-app-name"},[t._v("\n\t\t\t"+t._s(t.currentApp.name)+"\n\t\t")])]):t._e()],1)},[],!1,null,"31b02e26",null).exports;var ro=n(87485),no=n(1522);const oo=(0,Hn.C)("core","versionHash",""),io=(0,Xr.pM)({name:"AccountMenuEntry",components:{NcListItem:no.A,NcLoadingIcon:cn.A},props:{id:{type:String,required:!0},name:{type:String,required:!0},href:{type:String,required:!0},active:{type:Boolean,default:!1},icon:{type:String,default:""}},data:()=>({loading:!1}),computed:{iconSource(){return`${this.icon}?v=${oo}`}},methods:{onClick(t){this.$emit("click",t),t.defaultPrevented||(this.loading=!0)}}});var ao=n(51286),so={};so.styleTagTransform=En(),so.setAttributes=xn(),so.insert=bn().bind(null,"head"),so.domAPI=mn(),so.insertStyleElement=_n(),gn()(ao.A,so),ao.A&&ao.A.locals&&ao.A.locals;const co=(0,Tn.A)(io,function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcListItem",{staticClass:"account-menu-entry",attrs:{id:t.href?void 0:t.id,"anchor-id":t.id,active:t.active,compact:"",href:t.href,name:t.name,target:"_self"},on:{click:t.onClick},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading?e("NcLoadingIcon",{staticClass:"account-menu-entry__loading",attrs:{size:20}}):t.$scopedSlots.icon?t._t("icon"):e("img",{staticClass:"account-menu-entry__icon",class:{"account-menu-entry__icon--active":t.active},attrs:{src:t.iconSource,alt:""}})]},proxy:!0}])})},[],!1,null,"bdb908d2",null).exports;var uo=n(77690),lo=n(98469);const fo={name:"QrcodeScanIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},po=(0,Tn.A)(fo,function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon qrcode-scan-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M4,4H10V10H4V4M20,4V10H14V4H20M14,15H16V13H14V11H16V13H18V11H20V13H18V15H20V18H18V20H16V18H13V20H11V16H14V15M16,15V18H18V15H16M4,20V14H10V20H4M6,6V8H8V6H6M16,6V8H18V6H16M6,16V18H8V16H6M4,11H6V13H4V11M9,11H13V15H11V13H9V11M11,6H13V10H11V6M2,2V6H0V2A2,2 0 0,1 2,0H6V2H2M22,0A2,2 0 0,1 24,2V6H22V2H18V0H22M2,18V22H6V24H2A2,2 0 0,1 0,22V18H2M22,22V18H24V22A2,2 0 0,1 22,24H18V22H22Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])},[],!1,null,null,null).exports;var ho=n(17816),vo=n.n(ho),go=n(55581),yo=n(94219);const mo=(0,Xr.pM)({__name:"AccountQRLoginDialog",props:{data:null},emits:["close"],setup(t,{emit:e}){const r=t,n=window.OC.theme.productName,o=[{label:(0,Yr.t)("spreed","Done"),variant:"primary",callback:()=>{}}],i=3===(r.data?.deviceToken?.type??1),a=(0,Xr.EW)(()=>{const t=r.data?.loginName??"",e=r.data?.token??"";return`nc://${i?"onetime-login":"login"}/user:${t}&password:${e}&server:${(0,l.$_)()}`}),s=(r.data?.deviceToken?.lastActivity?1e3*r.data.deviceToken.lastActivity:Date.now())+12e4,c=setTimeout(()=>{f("expired")},s-Date.now()),u=(0,go.SX)(s);function f(t){clearTimeout(c),e("close",t)}return{__sfc:!0,props:r,emit:e,productName:n,buttons:o,isOneTimeToken:i,qrUrl:a,expirationTimestamp:s,expireTimeout:c,timeCountdown:u,onClosing:f,QR:vo(),t:Yr.t,NcDialog:yo.A}}}),Ao=mo;var bo=n(35644),wo={};wo.styleTagTransform=En(),wo.setAttributes=xn(),wo.insert=bn().bind(null,"head"),wo.domAPI=mn(),wo.insertStyleElement=_n(),gn()(bo.A,wo),bo.A&&bo.A.locals&&bo.A.locals;const xo=(0,Tn.A)(Ao,function(){var t=this,e=t._self._c,r=t._self._setupProxy;return e(r.NcDialog,{attrs:{name:r.t("core","Scan QR code to log in"),buttons:r.buttons},on:{closing:r.onClosing}},[e("div",{staticClass:"qr-login__content"},[e("p",{staticClass:"qr-login__description"},[t._v("\n\t\t\t"+t._s(r.t("core","Use {productName} mobile client you want to connect to scan the code",{productName:r.productName}))+"\n\t\t")]),t._v(" "),e(r.QR,{attrs:{value:r.qrUrl}}),t._v(" "),r.isOneTimeToken?[t._v("\n\t\t\t"+t._s(r.t("core","Code will expire {timeCountdown} or after use",{timeCountdown:r.timeCountdown}))+"\n\t\t")]:t._e()],2)])},[],!1,null,null,null).exports;(0,uo.IF)(u.Ay);const{profileEnabled:Co}=(0,Hn.C)("user_status","profileEnabled",{profileEnabled:!1}),_o=(0,ro.F)().core?.["can-create-app-token"]??!1,So=(0,Xr.pM)({name:"AccountMenuProfileEntry",components:{IconQrcodeScan:po,NcButton:nn.A,NcListItem:no.A,NcLoadingIcon:cn.A},props:{id:{type:String,required:!0},name:{type:String,required:!0},href:{type:String,required:!0},active:{type:Boolean,required:!0}},setup:()=>({canCreateAppToken:_o,profileEnabled:Co,displayName:(0,c.HW)().displayName}),data:()=>({loading:!1}),mounted(){(0,zn.B1)("settings:profile-enabled:updated",this.handleProfileEnabledUpdate),(0,zn.B1)("settings:display-name:updated",this.handleDisplayNameUpdate)},beforeDestroy(){(0,zn.al)("settings:profile-enabled:updated",this.handleProfileEnabledUpdate),(0,zn.al)("settings:display-name:updated",this.handleDisplayNameUpdate)},methods:{handleClick(){this.profileEnabled&&(this.loading=!0)},async handleQrCodeClick(){const{data:t}=await u.Ay.post((0,l.Jv)("/settings/personal/authtokens"),{qrcodeLogin:!0},{confirmPassword:uo.mH.Strict});await(0,lo.S)(xo,{data:t})},handleProfileEnabledUpdate(t){this.profileEnabled=t},handleDisplayNameUpdate(t){this.displayName=t}}}),Eo=So,ko=(0,Tn.A)(Eo,function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcListItem",{attrs:{id:t.profileEnabled?void 0:t.id,"anchor-id":t.id,active:t.active,compact:"",href:t.profileEnabled?t.href:void 0,name:t.displayName,target:"_self"},scopedSlots:t._u([t.profileEnabled?{key:"subname",fn:function(){return[t._v("\n\t\t"+t._s(t.name)+"\n\t")]},proxy:!0}:null,t.canCreateAppToken?{key:"extra-actions",fn:function(){return[e("NcButton",{attrs:{variant:"secondary"},on:{click:t.handleQrCodeClick},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconQrcodeScan",{attrs:{size:20}})]},proxy:!0}],null,!1,3784924786)})]},proxy:!0}:null,t.loading?{key:"indicator",fn:function(){return[e("NcLoadingIcon")]},proxy:!0}:null],null,!0)})},[],!1,null,null,null).exports,Oo=[{type:"online",label:(0,Yr.t)("user_status","Online")},{type:"away",label:(0,Yr.t)("user_status","Away")},{type:"busy",label:(0,Yr.t)("user_status","Busy")},{type:"dnd",label:(0,Yr.t)("user_status","Do not disturb"),subline:(0,Yr.t)("user_status","Mute all notifications")},{type:"invisible",label:(0,Yr.t)("user_status","Invisible"),subline:(0,Yr.t)("user_status","Appear offline")}],To=(0,Xr.pM)({name:"AccountMenu",components:{AccountMenuEntry:co,AccountMenuProfileEntry:ko,NcAvatar:dn.A,NcHeaderMenu:an.A},setup(){const t=(0,Hn.C)("core","settingsNavEntries",{}),{profile:e,...r}=t;return{currentDisplayName:(0,c.HW)()?.displayName??(0,c.HW)().uid,currentUserId:(0,c.HW)().uid,profileEntry:e,otherEntries:r,t:Yr.t}},data:()=>({showUserStatus:!1,userStatus:{status:null,icon:null,message:null}}),computed:{translatedUserStatus(){return{...this.userStatus,status:this.translateStatus(this.userStatus.status)}},avatarDescription(){return[(0,Yr.t)("core","Avatar of {displayName}",{displayName:this.currentDisplayName}),...Object.values(this.translatedUserStatus).filter(Boolean)].join(" — ")}},async created(){if(!(0,ro.F)()?.user_status?.enabled)return;const t=(0,l.KT)("/apps/user_status/api/v1/user_status");try{const e=await u.Ay.get(t),{status:r,icon:n,message:o}=e.data.ocs.data;this.userStatus={status:r,icon:n,message:o}}catch(t){jn.error("Failed to load user status",{error:t})}this.showUserStatus=!0},mounted(){(0,zn.B1)("user_status:status.updated",this.handleUserStatusUpdated),(0,zn.Ic)("core:user-menu:mounted")},methods:{handleUserStatusUpdated(t){this.currentUserId===t.userId&&(this.userStatus={status:t.status,icon:t.icon,message:t.message})},translateStatus(t){const e=Object.fromEntries(Oo.map(({type:t,label:e})=>[t,e]));return e[t]?e[t]:t}}});var Io=n(33096),Ro={};Ro.styleTagTransform=En(),Ro.setAttributes=xn(),Ro.insert=bn().bind(null,"head"),Ro.domAPI=mn(),Ro.insertStyleElement=_n(),gn()(Io.A,Ro),Io.A&&Io.A.locals&&Io.A.locals;const jo=(0,Tn.A)(To,function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcHeaderMenu",{staticClass:"account-menu",attrs:{id:"user-menu","is-nav":"","aria-label":t.t("core","Settings menu"),description:t.avatarDescription},scopedSlots:t._u([{key:"trigger",fn:function(){return[e("NcAvatar",{key:String(t.showUserStatus),staticClass:"account-menu__avatar",attrs:{"disable-menu":"","disable-tooltip":"","hide-user-status":!t.showUserStatus,user:t.currentUserId,"preloaded-user-status":t.userStatus}})]},proxy:!0}])},[t._v(" "),e("ul",{staticClass:"account-menu__list"},[e("AccountMenuProfileEntry",{attrs:{id:t.profileEntry.id,name:t.profileEntry.name,href:t.profileEntry.href,active:t.profileEntry.active}}),t._v(" "),t._l(t.otherEntries,function(t){return e("AccountMenuEntry",{key:t.id,attrs:{id:t.id,name:t.name,href:t.href,active:t.active,icon:t.icon}})})],2)])},[],!1,null,"6c007912",null).exports;function Mo(){return document.head.dataset.requesttoken}const{auto_logout:No,session_keepalive:Po,session_lifetime:Lo}=(0,Hn.C)("core","config",{});async function Do(){try{await async function(){const t=(0,l.Jv)("/csrftoken"),e=await fetch(t);if(!e.ok)throw new Error("Could not fetch CSRF token from API",{cause:e});const{token:r}=await e.json();return function(t){if(!t||"string"!=typeof t)throw new Error("Invalid CSRF token given",{cause:{token:t}});document.head.dataset.requesttoken=t,(0,zn.Ic)("csrf-token-update",{token:t})}(r),r}()}catch(t){jn.error("session heartbeat failed",{error:t})}}function Bo(){const t=window.setInterval(Do,1e3*function(){const t=Lo?Math.floor(Lo/2):900;return Math.min(86400,Math.max(60,t))}());return jn.info("session heartbeat polling started"),t}function Uo(t){const e=document.createElement("textarea"),r=document.createTextNode(t);e.appendChild(r),document.body.appendChild(e),e.focus({preventScroll:!0}),e.select();try{document.execCommand("copy")}catch(e){window.prompt((0,Yr.t)("core","Clipboard not available, please copy manually"),t),jn.error("files Unable to copy to clipboard",{error:e})}document.body.removeChild(e)}function Fo(t){const e=window.location.protocol+"//"+window.location.host+(0,l.aU)();return t.startsWith(e)||function(t){return!t.startsWith("https://")&&!t.startsWith("http://")}(t)&&t.startsWith((0,l.aU)())}async function zo(){if(null!==(0,c.HW)()&&!0!==zo.running){zo.running=!0;try{const{status:t}=await window.fetch((0,l.Jv)("/apps/files"));401===t&&(jn.warn("User session was terminated, forwarding to login page."),await async function(){try{window.localStorage.clear(),window.sessionStorage.clear();const t=await window.indexedDB.databases();for(const e of t)await window.indexedDB.deleteDatabase(e.name);jn.debug("Browser storages cleared")}catch(t){jn.error("Could not clear browser storages",{error:t})}}(),window.location=(0,l.Jv)("/login?redirect_url={url}",{url:window.location.pathname+window.location.search+window.location.hash}))}catch(t){jn.warn("Could not check login-state",{error:t})}finally{delete zo.running}}}const Ho={zh:"zh-cn",zh_Hans:"zh-cn",zh_Hans_CN:"zh-cn",zh_Hans_HK:"zh-cn",zh_Hans_MO:"zh-cn",zh_Hans_SG:"zh-cn",zh_Hant:"zh-hk",zh_Hant_HK:"zh-hk",zh_Hant_MO:"zh-mo",zh_Hant_TW:"zh-tw"};let Vo=(0,Yr.JK)();function qo(){var t;XMLHttpRequest.prototype.open=(t=XMLHttpRequest.prototype.open,function(e,r){t.apply(this,arguments),Fo(r)&&(this.getResponseHeader("X-Requested-With")||this.setRequestHeader("X-Requested-With","XMLHttpRequest"),this.addEventListener("loadend",function(){401===this.status&&zo()}))}),window.fetch=function(t){return async(e,r)=>{if(!Fo(e.url??e.toString()))return await t(e,r);r||(r={}),r.headers||(r.headers=new Headers),r.headers instanceof Headers&&!r.headers.has("X-Requested-With")?r.headers.append("X-Requested-With","XMLHttpRequest"):r.headers instanceof Object&&!r.headers["X-Requested-With"]&&(r.headers["X-Requested-With"]="XMLHttpRequest");const n=await t(e,r);return 401===n.status&&zo(),n}}(window.fetch),window.navigator?.clipboard?.writeText||(jn.info("Clipboard API not available, using fallback"),Object.defineProperty(window.navigator,"clipboard",{value:{writeText:Uo},writable:!1})),function(){if(function(){if(!No||!(0,c.HW)())return;let t=Date.now();window.addEventListener("mousemove",()=>{t=Date.now(),localStorage.setItem("lastActive",JSON.stringify(t))}),window.addEventListener("touchstart",()=>{t=Date.now(),localStorage.setItem("lastActive",JSON.stringify(t))}),window.addEventListener("storage",e=>{"lastActive"===e.key&&null!==e.newValue&&(t=JSON.parse(e.newValue))});let e=0;e=window.setInterval(()=>{const r=Date.now()-1e3*(Lo??86400);if(t{jn.info("Browser is online again, resuming heartbeat"),t=Bo();try{await Do(),jn.info("Session token successfully updated after resuming network"),(0,zn.Ic)("networkOnline",{success:!0})}catch(t){jn.error("could not update session token after resuming network",{error:t}),(0,zn.Ic)("networkOnline",{success:!1})}}),window.addEventListener("offline",()=>{jn.info("Browser is offline, stopping heartbeat"),(0,zn.Ic)("networkOffline",{}),clearInterval(t),jn.info("Session heartbeat polling stopped")})}(),function(){Xr.Ay.mixin({methods:{t:Yr.Tl,n:Yr.zw}});const t=document.getElementById("header-start__appmenu");if(!t)return;const e=new(Xr.Ay.extend(eo))({}).$mount(t);Object.assign(OC,{setNavigationCounter(t,r){e.setNavigationCounter(t,r)}})}(),function(){const t=document.getElementById("user-menu");t&&new Xr.Ay({name:"AccountMenuRoot",el:t,render:t=>t(jo)})}(),function(){const t=document.getElementById("contactsmenu");t&&(window.OC.ContactsMenu=new Fn,new Xr.Ay({name:"ContactsMenuRoot",el:t,render:t=>t(Un)}))}()}Object.hasOwn(Ho,Vo)&&(Vo=Ho[Vo]),Jr().locale(Vo);var Wo=n(71225);const Go=!!window._oc_isadmin,$o=window.oc_appconfig||{},Yo=void 0!==window._oc_appswebroots&&window._oc_appswebroots,Ko=window._oc_config||{},Jo=document.getElementsByTagName("head")[0].getAttribute("data-user"),Xo=document.getElementsByTagName("head")[0].getAttribute("data-user-displayname"),Qo=void 0!==Jo&&Jo,Zo=window._oc_debug;var ti=n(21363),ei=n(85168),ri=n(43627);const ni={YES_NO_BUTTONS:70,OK_BUTTONS:71,FILEPICKER_TYPE_CHOOSE:1,FILEPICKER_TYPE_MOVE:2,FILEPICKER_TYPE_COPY:3,FILEPICKER_TYPE_COPY_MOVE:4,FILEPICKER_TYPE_CUSTOM:5,alert:function(t,e,r,n){this.message(t,e,"alert",ni.OK_BUTTON,r,n)},info:function(t,e,r,n){this.message(t,e,"info",ni.OK_BUTTON,r,n)},confirm:function(t,e,r,n){return this.message(t,e,"notice",ni.YES_NO_BUTTONS,r,n)},confirmDestructive:function(t,e,r=ni.OK_BUTTONS,n=()=>{}){return(new ei.ik).setName(e).setText(t).setButtons(r===ni.OK_BUTTONS?[{label:(0,Yr.t)("core","Yes"),variant:"error",callback:()=>{n.clicked=!0,n(!0)}}]:ni._getLegacyButtons(r,n)).build().show().then(()=>{n.clicked||n(!1)})},confirmHtml:function(t,e,r){return(new ei.ik).setName(e).setText("").setButtons([{label:(0,Yr.t)("core","No"),callback:()=>{}},{label:(0,Yr.t)("core","Yes"),variant:"primary",callback:()=>{r.clicked=!0,r(!0)}}]).build().setHTML(t).show().then(()=>{r.clicked||r(!1)})},prompt:function(t,e,r,o,i,a){return new Promise(o=>{(0,lo.S)((0,Xr.$V)(()=>Promise.all([n.e(4208),n.e(9553)]).then(n.bind(n,99553))),{text:t,name:e,callback:r,inputName:i,isPassword:!!a},(...t)=>{r(...t),o()})})},filepicker(t,e,r=!1,n=void 0,o=void 0,i=ei.bh.Choose,a=void 0,s=void 0){const c=(t,e)=>{const n=t=>{const e=t?.root||"";let r=t?.path||"";return r.startsWith(e)&&(r=r.slice(e.length)||"/"),r};return r?r=>t(r.map(n),e):r=>t(n(r[0]),e)},u=(0,ei.a1)(t);i===this.FILEPICKER_TYPE_CUSTOM?(s.buttons||[]).forEach(t=>{u.addButton({callback:c(e,t.type),label:t.text,variant:t.defaultButton?"primary":"secondary"})}):u.setButtonFactory((t,r)=>{const n=[],[o]=t,a=o?.displayname||o?.basename||(0,ri.basename)(r);return i===ei.bh.Choose&&n.push({callback:c(e,ei.bh.Choose),label:o&&!this.multiSelect?(0,Yr.t)("core","Choose {file}",{file:a}):(0,Yr.t)("core","Choose"),variant:"primary"}),i!==ei.bh.CopyMove&&i!==ei.bh.Copy||n.push({callback:c(e,ei.bh.Copy),label:a?(0,Yr.t)("core","Copy to {target}",{target:a}):(0,Yr.t)("core","Copy"),variant:"primary",icon:ti}),i!==ei.bh.Move&&i!==ei.bh.CopyMove||n.push({callback:c(e,ei.bh.Move),label:a?(0,Yr.t)("core","Move to {target}",{target:a}):(0,Yr.t)("core","Move"),variant:i===ei.bh.Move?"primary":"secondary",icon:''}),n}),n&&u.setMimeTypeFilter("string"==typeof n?[n]:n||[]),"function"==typeof s?.filter&&u.setFilter(t=>s.filter((t=>({id:t.fileid||null,path:t.path,mimetype:t.mime||null,mtime:t.mtime?.getTime()||null,permissions:t.permissions,name:t.attributes?.displayName||t.basename,etag:t.attributes?.etag||null,hasPreview:t.attributes?.hasPreview||null,mountType:t.attributes?.mountType||null,quotaAvailableBytes:t.attributes?.quotaAvailableBytes||null,icon:null,sharePermissions:null}))(t))),u.allowDirectories(!0===s?.allowDirectoryChooser||n?.includes("httpd/unix-directory")||!1).setMultiSelect(r).startAt(a).build().pick()},message:function(t,e,r,n,o=()=>{},i,a){const s=(new ei.ik).setName(e).setText(a?"":t).setButtons(ni._getLegacyButtons(n,o));switch(r){case"alert":s.setSeverity("warning");break;case"notice":s.setSeverity("info")}const c=s.build();return a&&c.setHTML(t),c.show().then(()=>{o._clicked||o(!1)})},_getLegacyButtons(t,e){const r=[];switch("object"==typeof t?t.type:t){case ni.YES_NO_BUTTONS:r.push({label:t?.cancel??(0,Yr.t)("core","No"),callback:()=>{e._clicked=!0,e(!1)}}),r.push({label:t?.confirm??(0,Yr.t)("core","Yes"),variant:"primary",callback:()=>{e._clicked=!0,e(!0)}});break;case ni.OK_BUTTONS:r.push({label:t?.confirm??(0,Yr.t)("core","OK"),variant:"primary",callback:()=>{e._clicked=!0,e(!0)}});break;default:jn.error("Invalid call to OC.dialogs")}return r}},oi=ni;function ii(t,e){let r,n,o="";if(this.typelessListeners=[],this.closed=!1,e)for(r in e)o+=r+"="+encodeURIComponent(e[r])+"&";o+="requesttoken="+encodeURIComponent(Mo()),n="&",-1===t.indexOf("?")&&(n="?"),this.source=new EventSource(t+n+o),this.source.onmessage=function(t){for(let e=0;et.cancel()),r.style.display="block")},finishedSaving(t,e){this.finishedAction(t,e)},finishedAction(t,e){"success"===e.status?this.finishedSuccess(t,e.data.message):this.finishedError(t,e.data.message)},finishedSuccess(t,e){const r=document.querySelector(t);r&&r instanceof HTMLElement&&(r.textContent=e,r.classList.remove("error"),r.classList.add("success"),r.getAnimations?.().forEach(t=>t.cancel()),window.setTimeout(function(){if(!(r&&r instanceof HTMLElement))return;const t=r.animate?.([{opacity:1},{opacity:0}],{duration:900,fill:"forwards"});t?t.addEventListener("finish",()=>{r.style.display="none"}):window.setTimeout(()=>{r.style.display="none"},900)},3e3),r.style.display="block")},finishedError(t,e){const r=document.querySelector(t);r&&r instanceof HTMLElement&&(r.textContent=e,r.classList.remove("success"),r.classList.add("error"),r.style.display="block")}},di={requiresPasswordConfirmation:()=>(0,uo.oB)(),requirePasswordConfirmation(t,e,r){(0,uo.C5)().then(t,r)}},hi={_plugins:{},register(t,e){let r=this._plugins[t];r||(r=this._plugins[t]=[]),r.push(e)},getPlugins(t){return this._plugins[t]||[]},attach(t,e,r){const n=this.getPlugins(t);for(let t=0;t="0"&&r<="9";a!==i&&(o++,e[o]="",i=a),e[o]+=r,n++}return e}const mi={History:{_handlers:[],_pushState(t,e,r){let n;if(n="string"==typeof t?t:wi.buildQueryString(t),window.history.pushState){if(e=e||location.pathname+"?"+n,navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&parseInt(navigator.userAgent.split("/").pop())<51){const t=document.querySelectorAll('[fill^="url(#"], [stroke^="url(#"], [filter^="url(#invert"]');for(let e,r=0,n=t.length;r=0?t.substr(e+1):t.length?t.substr(1):""},_decodeQuery:t=>t.replace(/\+/g," "),parseUrlQuery(){const t=this._parseHashQuery();let e;return t&&(e=wi.parseQueryString(this._decodeQuery(t))),e=$r.extend(e||{},wi.parseQueryString(this._decodeQuery(location.search))),e||{}},_onPopState(t){if(this._cancelPop)return void(this._cancelPop=!1);let e;if(this._handlers.length){e=t&&t.state,$r.isString(e)?e=wi.parseQueryString(e):e||(e=this.parseUrlQuery()||{});for(let t=0;t(void 0===window.TESTING&&wi.debug&&jn.warn("OC.Util.formatDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment"),e=e||"LLL",Jr()(t).format(e)),relativeModifiedDate(e){void 0===window.TESTING&&wi.debug&&jn.warn("OC.Util.relativeModifiedDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment");const r=Jr()().diff(Jr()(e));return r>=0&&r<45e3?t("core","seconds ago"):Jr()(e).fromNow()},getScrollBarWidth(){if(this._scrollBarWidth)return this._scrollBarWidth;const t=document.createElement("p");t.style.width="100%",t.style.height="200px";const e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),document.body.appendChild(e);const r=t.offsetWidth;e.style.overflow="scroll";let n=t.offsetWidth;return r===n&&(n=e.clientWidth),document.body.removeChild(e),this._scrollBarWidth=r-n,this._scrollBarWidth},stripTime:t=>new Date(t.getFullYear(),t.getMonth(),t.getDate()),naturalSortCompare(t,e){let r;const n=yi(t),o=yi(e);for(r=0;n[r]&&o[r];r++)if(n[r]!==o[r]){const t=Number(n[r]),e=Number(o[r]);return t==n[r]&&e==o[r]?t-e:n[r].localeCompare(o[r],wi.getLanguage())}return n.length-o.length},waitFor(t,e){const r=function(){!0!==t()&&setTimeout(r,e)};r()},isCookieSetToValue(t,e){const r=document.cookie.split(";");for(let n=0;n!$_",appConfig:$o,appswebroots:Yo,config:Ko,currentUser:Qo,dialogs:oi,EventSource:ai,MimeType:i,getCurrentUser:function(){return{uid:Qo,displayName:Xo}},isUserAdmin:()=>Go,L10N:si,registerXHRForErrorProcessing:()=>{},getCapabilities:function(){return OC.debug&&jn.warn("OC.getCapabilities is deprecated and will be removed in Nextcloud 21. See @nextcloud/capabilities"),(0,ro.F)()},basename:Wo.P8,encodePath:Wo.O0,dirname:Wo.pD,isSamePath:Wo.ys,joinPaths:Wo.fj,getCanonicalLocale:Yr.lO,getLocale:Yr.JK,getLanguage:Yr.Z0,buildQueryString:function(t){return t?new URLSearchParams(t).toString():""},parseQueryString:function(t){const e=new URLSearchParams(t);return Object.fromEntries(e.entries())},msg:pi,PasswordConfirmation:di,Plugins:hi,theme:vi,Util:mi,debug:Zo,filePath:l.fg,generateUrl:l.Jv,getRootPath:l.aU,imagePath:l.d0,requestToken:Mo(),linkTo:l.uM,linkToOCS:(t,e)=>(0,l.KT)(t,{},{ocsVersion:e||1})+"/",linkToRemote:l.dC,linkToRemoteBase:function(t){return(0,l.aU)()+"/remote.php/"+t},webroot:bi};(0,zn.B1)("csrf-token-update",t=>{OC.requestToken=t.token,jn.info("OC.requestToken changed",{token:t.token})}),n(84315),n(7452);var xi=n(57576),Ci=n.n(xi),_i=n(78112);const Si={disableKeyboardShortcuts:()=>(0,Hn.C)("theming","shortcutsDisabled",!1),setPageHeading:function(t){const e=document.getElementById("page-heading-level-1");e&&(e.textContent=t)}};async function Ei(t,e,r={}){"post"!==t&&"delete"!==t||!(0,uo.oB)(uo.mH.Lax)||await(0,uo.C5)();try{const{data:n}=await u.Ay.request({method:t.toLowerCase(),url:(0,l.KT)("apps/provisioning_api/api/v1/config/apps")+e,data:r.data||{}});r.success?.(n.ocs.data)}catch(t){r.error?.(t)}}function ki(t){Ei("get","",t)}function Oi(t,e){Ei("get","/"+t,e)}function Ti(t,e,r,n){(n=n||{}).data={defaultValue:r},Ei("get","/"+t+"/"+e,n)}function Ii(t,e,r,n){(n=n||{}).data={value:r},Ei("post","/"+t+"/"+e,n)}function Ri(t,e,r){Ei("delete","/"+t+"/"+e,r)}var ji=n(70580),Mi=n.n(ji);const Ni={},Pi={registerType(t,e){Ni[t]=e},trigger:t=>Ni[t].action(),getTypes:()=>Object.keys(Ni),getIcon:t=>Ni[t].typeIconClass||"",getLabel:t=>Mi()(Ni[t].typeString||t),getLink:(t,e)=>void 0!==Ni[t]?Ni[t].link(e):""},Li=/(\s|^)(https?:\/\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|$)/gi;function Di(t){return Ui(t)}function Bi(t){return Fi(t)}function Ui(t){return t.replace(Li,function(t,e,r,n,o){let i=n;return r?"http://"===r&&(i=r+n):r="https://",e+''+i+""+o})}function Fi(t){const e=document.createElement("div");return e.innerHTML=t,e.querySelectorAll("a").forEach(t=>{t.replaceWith(document.createTextNode(t.getAttribute("href")||""))}),e.innerHTML}const zi={},Hi={},Vi={loadScript(t,e){const r=t+e;return Object.hasOwn(zi,r)?Promise.resolve():(zi[r]=!0,new Promise(function(r,n){const o=(0,l.fg)(t,"js",e),i=document.createElement("script");i.src=o,i.setAttribute("nonce",btoa(OC.requestToken)),i.onload=()=>r(),i.onerror=()=>n(new Error(`Failed to load script from ${o}`)),document.head.appendChild(i)}))},loadStylesheet(t,e){const r=t+e;return Object.hasOwn(Hi,r)?Promise.resolve():(Hi[r]=!0,new Promise(function(r,n){const o=(0,l.fg)(t,"css",e),i=document.createElement("link");i.href=o,i.type="text/css",i.rel="stylesheet",i.onload=()=>r(),i.onerror=()=>n(new Error(`Failed to load stylesheet from ${o}`)),document.head.appendChild(i)}))}},qi={success:(t,e)=>(0,ei.Te)(t,e),warning:(t,e)=>(0,ei.I9)(t,e),error:(t,e)=>(0,ei.Qg)(t,e),info:(t,e)=>(0,ei.cf)(t,e),message:(t,e)=>(0,ei.rG)(t,e)},Wi={Accessibility:Si,AppConfig:a,Collaboration:Pi,Comments:s,InitialState:{loadState:Hn.C},Loader:Vi,Toast:qi};function Gi(t,e,r){(Array.isArray(t)?t:[t]).forEach(t=>{void 0!==window[t]&&delete window[t],Object.defineProperty(window,t,{get:()=>(function(){void 0===window.TESTING&&wi.debug&&console.warn.apply(console,arguments)}(r?`${t} is deprecated: ${r}`:`${t} is deprecated`),e())})})}Gi(["_"],()=>$r,"The global underscore is deprecated. It will be removed in a later versions without another warning. Please ship your own."),Gi(["Clipboard","ClipboardJS"],()=>Ci(),"please ship your own, this will be removed in Nextcloud 20"),Gi(["dav"],()=>_i.dav,"please ship your own. It will be removed in a later versions without another warning. Please ship your own."),Gi("moment",()=>Jr(),"please ship your own, this will be removed in Nextcloud 20"),window.OC=wi,Gi("initCore",()=>qo,"this is an internal function"),Gi("oc_appswebroots",()=>wi.appswebroots,"use OC.appswebroots instead, this will be removed in Nextcloud 20"),Gi("oc_config",()=>wi.config,"use OC.config instead, this will be removed in Nextcloud 20"),Gi("oc_current_user",()=>wi.getCurrentUser().uid,"use OC.getCurrentUser().uid instead, this will be removed in Nextcloud 20"),Gi("oc_debug",()=>wi.debug,"use OC.debug instead, this will be removed in Nextcloud 20"),Gi("oc_defaults",()=>wi.theme,"use OC.theme instead, this will be removed in Nextcloud 20"),Gi("oc_isadmin",wi.isUserAdmin,"use OC.isUserAdmin() instead, this will be removed in Nextcloud 20"),Gi("oc_requesttoken",()=>Mo(),"use OC.requestToken instead, this will be removed in Nextcloud 20"),Gi("oc_webroot",()=>wi.webroot,"use OC.getRootPath() instead, this will be removed in Nextcloud 20"),Gi("OCDialogs",()=>wi.dialogs,"use OC.dialogs instead, this will be removed in Nextcloud 20"),window.OCP=Wi,window.OCA={},window.t=$r.bind(wi.L10N.translate,wi.L10N),window.n=$r.bind(wi.L10N.translatePlural,wi.L10N),n.nc=(0,c.aV)(),window.addEventListener("DOMContentLoaded",function(){qo(),window.history.pushState?window.onpopstate=$r.bind(wi.Util.History._onPopState,wi.Util.History):window.onhashchange=$r.bind(wi.Util.History._onPopState,wi.Util.History)}),document.addEventListener("DOMContentLoaded",function(){const t=document.getElementById("password-input-form");t&&t.addEventListener("submit",async function(e){e.preventDefault();const r=document.getElementById("requesttoken");if(r){const t=(0,l.Jv)("/csrftoken"),e=await u.Ay.get(t);r.value=e.data.token}t.submit()})})},57576(t){var e;e=function(){return function(){var t={686:function(t,e,r){"use strict";r.d(e,{default:function(){return b}});var n=r(279),o=r.n(n),i=r(370),a=r.n(i),s=r(817),c=r.n(s);function u(t){try{return document.execCommand(t)}catch(t){return!1}}var l=function(t){var e=c()(t);return u("cut"),e},f=function(t,e){var r=function(t){var e="rtl"===document.documentElement.getAttribute("dir"),r=document.createElement("textarea");r.style.fontSize="12pt",r.style.border="0",r.style.padding="0",r.style.margin="0",r.style.position="absolute",r.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;return r.style.top="".concat(n,"px"),r.setAttribute("readonly",""),r.value=t,r}(t);e.container.appendChild(r);var n=c()(r);return u("copy"),r.remove(),n},p=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},r="";return"string"==typeof t?r=f(t,e):t instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==t?void 0:t.type)?r=f(t.value,e):(r=c()(t),u("copy")),r};function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function v(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===h(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=a()(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,r=this.action(e)||"copy",n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.action,r=void 0===e?"copy":e,n=t.container,o=t.target,i=t.text;if("copy"!==r&&"cut"!==r)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==o){if(!o||"object"!==d(o)||1!==o.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===r&&o.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===r&&(o.hasAttribute("readonly")||o.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return i?p(i,{container:n}):o?"cut"===r?l(o):p(o,{container:n}):void 0}({action:r,container:this.container,target:this.target(e),text:this.text(e)});this.emit(n?"success":"error",{action:r,text:n,trigger:e,clearSelection:function(){e&&e.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(t){return m("action",t)}},{key:"defaultTarget",value:function(t){var e=m("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return m("text",t)}},{key:"destroy",value:function(){this.listener.destroy()}}],n=[{key:"copy",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return p(t,e)}},{key:"cut",value:function(t){return l(t)}},{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,r=!!document.queryCommandSupported;return e.forEach(function(t){r=r&&!!document.queryCommandSupported(t)}),r}}],r&&v(e.prototype,r),n&&v(e,n),c}(o()),b=A},828:function(t){if("undefined"!=typeof Element&&!Element.prototype.matches){var e=Element.prototype;e.matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},438:function(t,e,r){var n=r(828);function o(t,e,r,n,o){var a=i.apply(this,arguments);return t.addEventListener(r,a,o),{destroy:function(){t.removeEventListener(r,a,o)}}}function i(t,e,r,o){return function(r){r.delegateTarget=n(r.target,e),r.delegateTarget&&o.call(t,r)}}t.exports=function(t,e,r,n,i){return"function"==typeof t.addEventListener?o.apply(null,arguments):"function"==typeof r?o.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return o(t,e,r,n,i)}))}},879:function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var r=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===r||"[object HTMLCollection]"===r)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},370:function(t,e,r){var n=r(879),o=r(438);t.exports=function(t,e,r){if(!t&&!e&&!r)throw new Error("Missing required arguments");if(!n.string(e))throw new TypeError("Second argument must be a String");if(!n.fn(r))throw new TypeError("Third argument must be a Function");if(n.node(t))return function(t,e,r){return t.addEventListener(e,r),{destroy:function(){t.removeEventListener(e,r)}}}(t,e,r);if(n.nodeList(t))return function(t,e,r){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,r)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,r)})}}}(t,e,r);if(n.string(t))return function(t,e,r){return o(document.body,t,e,r)}(t,e,r);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(t){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var r=t.hasAttribute("readonly");r||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),r||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var n=window.getSelection(),o=document.createRange();o.selectNodeContents(t),n.removeAllRanges(),n.addRange(o),e=n.toString()}return e}},279:function(t){function e(){}e.prototype={on:function(t,e,r){var n=this.e||(this.e={});return(n[t]||(n[t]=[])).push({fn:e,ctx:r}),this},once:function(t,e,r){var n=this;function o(){n.off(t,o),e.apply(r,arguments)}return o._=e,this.on(t,o,r)},emit:function(t){for(var e=[].slice.call(arguments,1),r=((this.e||(this.e={}))[t]||[]).slice(),n=0,o=r.length;ns});var n=r(71354),o=r.n(n),i=r(76314),a=r.n(i)()(o());a.push([t.id,".account-menu-entry__icon[data-v-bdb908d2]{height:16px;width:16px;margin:calc((var(--default-clickable-area) - 16px)/2);filter:var(--background-invert-if-dark)}.account-menu-entry__icon--active[data-v-bdb908d2]{filter:var(--primary-invert-if-dark)}.account-menu-entry__loading[data-v-bdb908d2]{height:20px;width:20px;margin:calc((var(--default-clickable-area) - 20px)/2)}.account-menu-entry[data-v-bdb908d2] .list-item-content__main{width:fit-content}","",{version:3,sources:["webpack://./core/src/components/AccountMenu/AccountMenuEntry.vue"],names:[],mappings:"AAEC,2CACC,WAAA,CACA,UAAA,CACA,qDAAA,CACA,uCAAA,CAEA,mDACC,oCAAA,CAIF,8CACC,WAAA,CACA,UAAA,CACA,qDAAA,CAGD,8DACC,iBAAA",sourcesContent:["\n.account-menu-entry {\n\t&__icon {\n\t\theight: 16px;\n\t\twidth: 16px;\n\t\tmargin: calc((var(--default-clickable-area) - 16px) / 2); // 16px icon size\n\t\tfilter: var(--background-invert-if-dark);\n\n\t\t&--active {\n\t\t\tfilter: var(--primary-invert-if-dark);\n\t\t}\n\t}\n\n\t&__loading {\n\t\theight: 20px;\n\t\twidth: 20px;\n\t\tmargin: calc((var(--default-clickable-area) - 20px) / 2); // 20px icon size\n\t}\n\n\t:deep(.list-item-content__main) {\n\t\twidth: fit-content;\n\t}\n}\n"],sourceRoot:""}]);const s=a},35644(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(71354),o=r.n(n),i=r(76314),a=r.n(i)()(o());a.push([t.id,".qr-login__content{display:flex;flex-direction:column;align-items:center;gap:var(--default-grid-baseline)}.qr-login__description{text-align:center}","",{version:3,sources:["webpack://./core/src/components/AccountMenu/AccountQRLoginDialog.vue"],names:[],mappings:"AACA,mBACC,YAAA,CACA,qBAAA,CACA,kBAAA,CACA,gCAAA,CAGD,uBACC,iBAAA",sourcesContent:["\n.qr-login__content {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: var(--default-grid-baseline);\n}\n\n.qr-login__description {\n\ttext-align: center;\n}\n"],sourceRoot:""}]);const s=a},49180(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(71354),o=r.n(n),i=r(76314),a=r.n(i)()(o());a.push([t.id,".app-item[data-v-8004ada6]{--app-item-circle-size: calc(var(--default-grid-baseline) * 10);--app-item-icon-size: 22px;display:flex;flex-direction:column;align-items:center;gap:var(--default-grid-baseline);padding-block:var(--default-grid-baseline);border-radius:var(--border-radius-element);text-decoration:none;color:var(--color-main-text);min-width:0}.app-item[data-v-8004ada6]:hover,.app-item[data-v-8004ada6]:focus-visible{background-color:var(--color-background-hover)}.app-item[data-v-8004ada6]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-primary-element)}.app-item__circle[data-v-8004ada6]{box-sizing:border-box;position:relative;width:var(--app-item-circle-size);height:var(--app-item-circle-size);border-radius:50%;background-color:var(--color-primary-element);background-image:linear-gradient(to bottom, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, 0.15) 100%);box-shadow:inset 0 1px 0 0 hsla(0,0%,100%,.25),inset 0 -1px 0 0 rgba(0,0,0,.2),0 2px 4px rgba(0,0,0,.15);display:flex;align-items:center;justify-content:center}.app-item__icon[data-v-8004ada6]{width:var(--app-item-icon-size);height:var(--app-item-icon-size);filter:brightness(0) invert(1);mask:var(--header-menu-icon-mask)}.app-item__unread[data-v-8004ada6]{position:absolute;top:0;inset-inline-end:0;width:calc(var(--default-grid-baseline)*3);height:calc(var(--default-grid-baseline)*3);border-radius:50%;background-color:var(--color-error);border:2px solid var(--color-main-background);box-sizing:content-box}.app-item__label[data-v-8004ada6]{font-size:12px;line-height:1.3;text-align:center;color:var(--color-main-text);word-break:normal;overflow-wrap:break-word;max-width:100%;letter-spacing:-0.3px}.app-item--active .app-item__label[data-v-8004ada6]{font-weight:bold}.app-item--outlined .app-item__circle[data-v-8004ada6]{background:rgba(0,0,0,0);background-image:none;box-shadow:inset 0 0 0 2px var(--color-border-maxcontrast)}.app-item--outlined .app-item__icon[data-v-8004ada6]{filter:brightness(0);mask:none}","",{version:3,sources:["webpack://./core/src/components/AppItem.vue"],names:[],mappings:"AACA,2BACC,+DAAA,CACA,0BAAA,CACA,YAAA,CACA,qBAAA,CACA,kBAAA,CACA,gCAAA,CAGA,0CAAA,CACA,0CAAA,CACA,oBAAA,CACA,4BAAA,CACA,WAAA,CAEA,0EAEC,8CAAA,CAMD,yCACC,YAAA,CACA,uDAAA,CAGD,mCACC,qBAAA,CACA,iBAAA,CACA,iCAAA,CACA,kCAAA,CACA,iBAAA,CACA,6CAAA,CACA,+HAAA,CAMA,wGACC,CAGD,YAAA,CACA,kBAAA,CACA,sBAAA,CAGD,iCACC,+BAAA,CACA,gCAAA,CAIA,8BAAA,CACA,iCAAA,CAGD,mCACC,iBAAA,CACA,KAAA,CACA,kBAAA,CACA,0CAAA,CACA,2CAAA,CACA,iBAAA,CACA,mCAAA,CACA,6CAAA,CACA,sBAAA,CAGD,kCACC,cAAA,CACA,eAAA,CACA,iBAAA,CACA,4BAAA,CACA,iBAAA,CACA,wBAAA,CACA,cAAA,CACA,qBAAA,CAGD,oDACC,gBAAA,CAID,uDACC,wBAAA,CACA,qBAAA,CACA,0DAAA,CAGD,qDACC,oBAAA,CACA,SAAA",sourcesContent:["\n.app-item {\n\t--app-item-circle-size: calc(var(--default-grid-baseline) * 10);\n\t--app-item-icon-size: 22px;\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: var(--default-grid-baseline);\n\t// Inset so the hover/focus highlight floats around the circle and label\n\t// rather than sitting flush against the icon at the top edge.\n\tpadding-block: var(--default-grid-baseline);\n\tborder-radius: var(--border-radius-element);\n\ttext-decoration: none;\n\tcolor: var(--color-main-text);\n\tmin-width: 0;\n\n\t&:hover,\n\t&:focus-visible {\n\t\tbackground-color: var(--color-background-hover);\n\t}\n\n\t// Inset ring instead of outline + offset: the offset version visibly\n\t// clips at the popover's rounded edge for items in the first/last row\n\t// or column. The inset shadow stays inside the highlight rectangle.\n\t&:focus-visible {\n\t\toutline: none;\n\t\tbox-shadow: inset 0 0 0 2px var(--color-primary-element);\n\t}\n\n\t&__circle {\n\t\tbox-sizing: border-box;\n\t\tposition: relative;\n\t\twidth: var(--app-item-circle-size);\n\t\theight: var(--app-item-circle-size);\n\t\tborder-radius: 50%;\n\t\tbackground-color: var(--color-primary-element);\n\t\tbackground-image: linear-gradient(\n\t\t\tto bottom,\n\t\t\trgba(255, 255, 255, 0.18) 0%,\n\t\t\trgba(255, 255, 255, 0) 45%,\n\t\t\trgba(0, 0, 0, 0.15) 100%\n\t\t);\n\t\tbox-shadow:\n\t\t\tinset 0 1px 0 0 rgba(255, 255, 255, 0.25),\n\t\t\tinset 0 -1px 0 0 rgba(0, 0, 0, 0.2),\n\t\t\t0 2px 4px rgba(0, 0, 0, 0.15);\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t}\n\n\t&__icon {\n\t\twidth: var(--app-item-icon-size);\n\t\theight: var(--app-item-icon-size);\n\t\t// Force the icon to white on the colored circle, then apply the\n\t\t// same vertical alpha gradient (--header-menu-icon-mask) used in\n\t\t// the header so icons read consistently across the design.\n\t\tfilter: brightness(0) invert(1);\n\t\tmask: var(--header-menu-icon-mask);\n\t}\n\n\t&__unread {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tinset-inline-end: 0;\n\t\twidth: calc(var(--default-grid-baseline) * 3);\n\t\theight: calc(var(--default-grid-baseline) * 3);\n\t\tborder-radius: 50%;\n\t\tbackground-color: var(--color-error);\n\t\tborder: 2px solid var(--color-main-background);\n\t\tbox-sizing: content-box;\n\t}\n\n\t&__label {\n\t\tfont-size: 12px;\n\t\tline-height: 1.3;\n\t\ttext-align: center;\n\t\tcolor: var(--color-main-text);\n\t\tword-break: normal;\n\t\toverflow-wrap: break-word;\n\t\tmax-width: 100%;\n\t\tletter-spacing: -0.3px;\n\t}\n\n\t&--active &__label {\n\t\tfont-weight: bold;\n\t}\n\n\t// Outlined variant: no fill or gradient; icon color is unforced.\n\t&--outlined &__circle {\n\t\tbackground: transparent;\n\t\tbackground-image: none;\n\t\tbox-shadow: inset 0 0 0 2px var(--color-border-maxcontrast);\n\t}\n\n\t&--outlined &__icon {\n\t\tfilter: brightness(0);\n\t\tmask: none;\n\t}\n}\n"],sourceRoot:""}]);const s=a},50089(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(71354),o=r.n(n),i=r(76314),a=r.n(i)()(o());a.push([t.id,".app-menu[data-v-31b02e26]{display:flex;align-items:center}.app-menu__waffle[data-v-31b02e26]{--color-main-text: var(--color-background-plain-text);color:var(--color-background-plain-text)}.app-menu__waffle[data-v-31b02e26]:hover:not(:disabled){background-color:rgba(0,0,0,.1) !important}.app-menu__waffle[data-v-31b02e26]:active:not(:disabled){background-color:rgba(0,0,0,.15) !important}.app-menu__waffle[data-v-31b02e26]:focus-visible{background-color:rgba(0,0,0,.1) !important;outline:none !important;box-shadow:inset 0 0 0 2px var(--color-background-plain-text) !important}.app-menu__current-app[data-v-31b02e26]{--color-main-text: var(--color-background-plain-text);color:var(--color-background-plain-text)}.app-menu__current-app[data-v-31b02e26]:hover:not(:disabled){background-color:rgba(0,0,0,.1) !important}.app-menu__current-app[data-v-31b02e26]:active:not(:disabled){background-color:rgba(0,0,0,.15) !important}.app-menu__current-app[data-v-31b02e26]:focus-visible{background-color:rgba(0,0,0,.1) !important;outline:none !important;box-shadow:inset 0 0 0 2px var(--color-background-plain-text) !important}.app-menu__current-app-icon[data-v-31b02e26]{width:calc(var(--default-grid-baseline)*5);height:calc(var(--default-grid-baseline)*5);filter:var(--background-image-invert-if-bright);mask:var(--header-menu-icon-mask)}.app-menu__current-app-name[data-v-31b02e26]{font-size:var(--default-font-size);font-weight:500;white-space:nowrap;letter-spacing:-0.5px}.app-menu__popover[data-v-31b02e26]{max-width:calc(100vw - var(--default-grid-baseline)*4);background-color:var(--color-main-background)}.app-menu__grid[data-v-31b02e26]{--app-item-col-width: 69px;--app-item-row-height: 64px;--app-menu-rows-visible: 6;padding:calc(var(--default-grid-baseline)*3) calc(var(--default-grid-baseline)*2);display:grid;grid-template-columns:repeat(4, var(--app-item-col-width));grid-auto-rows:minmax(var(--app-item-row-height), max-content);max-height:calc(var(--app-item-row-height)*var(--app-menu-rows-visible) + var(--default-grid-baseline)*5);overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--color-scrollbar) rgba(0,0,0,0)}","",{version:3,sources:["webpack://./core/src/components/AppMenu.vue"],names:[],mappings:"AACA,2BACC,YAAA,CACA,kBAAA,CAEA,mCAIC,qDAAA,CACA,wCAAA,CAKA,wDACC,0CAAA,CAGD,yDACC,2CAAA,CAGD,iDACC,0CAAA,CACA,uBAAA,CACA,wEAAA,CAIF,wCAIC,qDAAA,CACA,wCAAA,CAMA,6DACC,0CAAA,CAGD,8DACC,2CAAA,CAGD,sDACC,0CAAA,CACA,uBAAA,CACA,wEAAA,CAIF,6CACC,0CAAA,CACA,2CAAA,CAEA,+CAAA,CACA,iCAAA,CAGD,6CACC,kCAAA,CACA,eAAA,CACA,kBAAA,CACA,qBAAA,CAGD,oCACC,sDAAA,CACA,6CAAA,CAGD,iCACC,0BAAA,CACA,2BAAA,CACA,0BAAA,CACA,iFAAA,CACA,YAAA,CACA,0DAAA,CACA,8DAAA,CACA,yGAAA,CACA,eAAA,CAIA,oBAAA,CACA,oDAAA",sourcesContent:["\n.app-menu {\n\tdisplay: flex;\n\talign-items: center;\n\n\t&__waffle {\n\t\t// NcButton's tertiary-no-background variant uses --color-main-text,\n\t\t// which is dark on light themes. The header sits on the theme primary\n\t\t// background, so override to use the matching plain-text color.\n\t\t--color-main-text: var(--color-background-plain-text);\n\t\tcolor: var(--color-background-plain-text);\n\n\t\t// Class merges onto NcButton's root