(()=>{var e,t,n,i={5487:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(71354),r=n.n(i),s=n(76314),a=n.n(s)()(r());a.push([e.id,".file-list-filter-accounts__item[data-v-b80388c4]{min-width:250px}.file-list-filter-accounts__avatar[data-v-b80388c4]{margin:calc((var(--default-clickable-area) - 24px)/2)}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/FileListFilterAccount.vue"],names:[],mappings:"AAEC,kDACC,eAAA,CAGD,oDAEC,qDAAA",sourcesContent:["\n.file-list-filter-accounts {\n\t&__item {\n\t\tmin-width: 250px;\n\t}\n\n\t&__avatar {\n\t\t// 24px is the avatar size\n\t\tmargin: calc((var(--default-clickable-area) - 24px) / 2)\n\t}\n}\n"],sourceRoot:""}]);const o=a},7145:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(87485),r=n(81222);class s{constructor(){var e,t,n;e=this,n=void 0,(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t="_capabilities"))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,this._capabilities=(0,i.F)()}get defaultPermissions(){return this._capabilities.files_sharing?.default_permissions}get isPublicUploadEnabled(){return!0===this._capabilities.files_sharing?.public?.upload}get federatedShareDocLink(){return window.OC.appConfig.core.federatedCloudShareDoc}get defaultExpirationDate(){return this.isDefaultExpireDateEnabled&&null!==this.defaultExpireDate?new Date((new Date).setDate((new Date).getDate()+this.defaultExpireDate)):null}get defaultInternalExpirationDate(){return this.isDefaultInternalExpireDateEnabled&&null!==this.defaultInternalExpireDate?new Date((new Date).setDate((new Date).getDate()+this.defaultInternalExpireDate)):null}get defaultRemoteExpirationDateString(){return this.isDefaultRemoteExpireDateEnabled&&null!==this.defaultRemoteExpireDate?new Date((new Date).setDate((new Date).getDate()+this.defaultRemoteExpireDate)):null}get enforcePasswordForPublicLink(){return!0===window.OC.appConfig.core.enforcePasswordForPublicLink}get enableLinkPasswordByDefault(){return!0===window.OC.appConfig.core.enableLinkPasswordByDefault}get isDefaultExpireDateEnforced(){return!0===window.OC.appConfig.core.defaultExpireDateEnforced}get isDefaultExpireDateEnabled(){return!0===window.OC.appConfig.core.defaultExpireDateEnabled}get isDefaultInternalExpireDateEnforced(){return!0===window.OC.appConfig.core.defaultInternalExpireDateEnforced}get isDefaultInternalExpireDateEnabled(){return!0===window.OC.appConfig.core.defaultInternalExpireDateEnabled}get isDefaultRemoteExpireDateEnforced(){return!0===window.OC.appConfig.core.defaultRemoteExpireDateEnforced}get isDefaultRemoteExpireDateEnabled(){return!0===window.OC.appConfig.core.defaultRemoteExpireDateEnabled}get isRemoteShareAllowed(){return!0===window.OC.appConfig.core.remoteShareAllowed}get isFederationEnabled(){return!0===this._capabilities?.files_sharing?.federation?.outgoing}get isPublicShareAllowed(){return!0===this._capabilities?.files_sharing?.public?.enabled}get isMailShareAllowed(){return!0===this._capabilities?.files_sharing?.sharebymail?.enabled&&!0===this.isPublicShareAllowed}get defaultExpireDate(){return window.OC.appConfig.core.defaultExpireDate}get defaultInternalExpireDate(){return window.OC.appConfig.core.defaultInternalExpireDate}get defaultRemoteExpireDate(){return window.OC.appConfig.core.defaultRemoteExpireDate}get isResharingAllowed(){return!0===window.OC.appConfig.core.resharingAllowed}get isPasswordForMailSharesRequired(){return!0===this._capabilities.files_sharing?.sharebymail?.password?.enforced}get shouldAlwaysShowUnique(){return!0===this._capabilities.files_sharing?.sharee?.always_show_unique}get allowGroupSharing(){return!0===window.OC.appConfig.core.allowGroupSharing}get maxAutocompleteResults(){return parseInt(window.OC.config["sharing.maxAutocompleteResults"],10)||25}get minSearchStringLength(){return parseInt(window.OC.config["sharing.minSearchStringLength"],10)||0}get passwordPolicy(){return this._capabilities?.password_policy||{}}get allowCustomTokens(){return this._capabilities?.files_sharing?.public?.custom_tokens}get showFederatedSharesAsInternal(){return(0,r.C)("files_sharing","showFederatedSharesAsInternal",!1)}get showFederatedSharesToTrustedServersAsInternal(){return(0,r.C)("files_sharing","showFederatedSharesToTrustedServersAsInternal",!1)}}},9165:(e,t,n)=>{"use strict";n.d(t,{Brj:()=>d,DvY:()=>l,HzW:()=>m,IyB:()=>r,K5o:()=>s,NZC:()=>a,ZL5:()=>f,aie:()=>i,fEr:()=>c,hyP:()=>o,jUz:()=>h,kHm:()=>p,kOJ:()=>u});var i="M13.07 10.41A5 5 0 0 0 13.07 4.59A3.39 3.39 0 0 1 15 4A3.5 3.5 0 0 1 15 11A3.39 3.39 0 0 1 13.07 10.41M5.5 7.5A3.5 3.5 0 1 1 9 11A3.5 3.5 0 0 1 5.5 7.5M7.5 7.5A1.5 1.5 0 1 0 9 6A1.5 1.5 0 0 0 7.5 7.5M16 17V19H2V17S2 13 9 13 16 17 16 17M14 17C13.86 16.22 12.67 15 9 15S4.07 16.31 4 17M15.95 13A5.32 5.32 0 0 1 18 17V19H22V17S22 13.37 15.94 13Z",r="M15,14C12.33,14 7,15.33 7,18V20H23V18C23,15.33 17.67,14 15,14M6,10V7H4V10H1V12H4V15H6V12H9V10M15,12A4,4 0 0,0 19,8A4,4 0 0,0 15,4A4,4 0 0,0 11,8A4,4 0 0,0 15,12Z",s="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z",a="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M16.2,16.2L11,13V7H12.5V12.2L17,14.9L16.2,16.2Z",o="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",l="M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z",c="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",u="M1,1V5H2V19H1V23H5V22H19V23H23V19H22V5H23V1H19V2H5V1M5,4H19V5H20V19H19V20H5V19H4V5H5M6,6V14H9V18H18V9H14V6M8,8H12V12H8M14,11H16V16H11V14H14",d="M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z",p="M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z",h="M17,3A2,2 0 0,1 19,5V15A2,2 0 0,1 17,17H13V19H14A1,1 0 0,1 15,20H22V22H15A1,1 0 0,1 14,23H10A1,1 0 0,1 9,22H2V20H9A1,1 0 0,1 10,19H11V17H7C5.89,17 5,16.1 5,15V5A2,2 0 0,1 7,3H17Z",f="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",m="M5.5,7A1.5,1.5 0 0,1 4,5.5A1.5,1.5 0 0,1 5.5,4A1.5,1.5 0 0,1 7,5.5A1.5,1.5 0 0,1 5.5,7M21.41,11.58L12.41,2.58C12.05,2.22 11.55,2 11,2H4C2.89,2 2,2.89 2,4V11C2,11.55 2.22,12.05 2.59,12.41L11.58,21.41C11.95,21.77 12.45,22 13,22C13.55,22 14.05,21.77 14.41,21.41L21.41,14.41C21.78,14.05 22,13.55 22,13C22,12.44 21.77,11.94 21.41,11.58Z"},14311:(e,t,n)=>{"use strict";var i=n(35810),r=n(1822),s=n(61338),a=n(40715),o=n(32505),l=n(85471),c=n(9165),u=n(53334),d=n(57505),p=n(44131),h=n(41944),f=n(6695),m=n(24764),g=n(15502);const A=(0,l.pM)({__name:"FileListFilter",props:{isActive:{type:Boolean},filterName:null},emits:["reset-filter"],setup:e=>({__sfc:!0,t:u.t,NcActionButton:d.A,NcActions:m.A,NcActionSeparator:g.A})});var w=n(85072),b=n.n(w),v=n(97825),y=n.n(v),_=n(77659),C=n.n(_),x=n(55056),H=n.n(x),V=n(10540),S=n.n(V),D=n(41113),E=n.n(D),L=n(15433),N={};N.styleTagTransform=E(),N.setAttributes=H(),N.insert=C().bind(null,"head"),N.domAPI=y(),N.insertStyleElement=S(),b()(L.A,N),L.A&&L.A.locals&&L.A.locals;var M=n(14486);const I=(0,M.A)(A,function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t(n.NcActions,{attrs:{"force-menu":"",variant:e.isActive?"secondary":"tertiary","menu-name":e.filterName},scopedSlots:e._u([{key:"icon",fn:function(){return[e._t("icon")]},proxy:!0}],null,!0)},[e._v(" "),e._t("default"),e._v(" "),e.isActive?[t(n.NcActionSeparator),e._v(" "),t(n.NcActionButton,{staticClass:"files-list-filter__clear-button",attrs:{"close-after-click":""},on:{click:function(t){return e.$emit("reset-filter")}}},[e._v("\n\t\t\t"+e._s(n.t("files","Clear filter"))+"\n\t\t")])]:e._e()],2)},[],!1,null,"3b04956e",null).exports,T=(0,l.pM)({__name:"FileListFilterAccount",emits:["update:accounts"],setup(e,{expose:t,emit:n}){const i=(0,l.KR)(""),r=(0,l.KR)([]),s=(0,l.KR)([]),a=(0,l.EW)(()=>{if(!i.value)return r.value;const e=i.value.toLocaleLowerCase().trim().split(" ");return r.value.filter(t=>e.every(e=>t.user.toLocaleLowerCase().includes(e)||t.displayName.toLocaleLowerCase().includes(e)))});function o(e){const t=r.value.find(({id:t})=>t===e);t&&s.value.includes(t)?s.value=s.value.filter(({id:t})=>t!==e):t&&(s.value=[...s.value,t])}function m(){s.value=[],i.value=""}function g(e){r.value=e.map(({uid:e,displayName:t})=>({displayName:t,id:e,user:e}))}return(0,l.wB)(s,()=>{const e=s.value.map(({id:e,displayName:t})=>({uid:e,displayName:t}));n("update:accounts",e)}),t({resetFilter:m,setAvailableAccounts:g,toggleAccount:o}),{__sfc:!0,emit:n,accountFilter:i,availableAccounts:r,selectedAccounts:s,shownAccounts:a,toggleAccount:o,resetFilter:m,setAvailableAccounts:g,mdiAccountMultipleOutline:c.aie,t:u.Tl,NcActionButton:d.A,NcActionInput:p.A,NcAvatar:h.A,NcIconSvgWrapper:f.A,FileListFilter:I}}});var O=n(5487),P={};P.styleTagTransform=E(),P.setAttributes=H(),P.insert=C().bind(null,"head"),P.domAPI=y(),P.insertStyleElement=S(),b()(O.A,P),O.A&&O.A.locals&&O.A.locals;const F=(0,M.A)(T,function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t(n.FileListFilter,{staticClass:"file-list-filter-accounts",attrs:{"is-active":n.selectedAccounts.length>0,"filter-name":n.t("files_sharing","People")},on:{"reset-filter":n.resetFilter},scopedSlots:e._u([{key:"icon",fn:function(){return[t(n.NcIconSvgWrapper,{attrs:{path:n.mdiAccountMultipleOutline}})]},proxy:!0}])},[e._v(" "),n.availableAccounts.length>1?t(n.NcActionInput,{attrs:{label:n.t("files_sharing","Filter accounts"),"label-outside":!1,"show-trailing-button":!1,type:"search",value:n.accountFilter},on:{"update:value":function(e){n.accountFilter=e}}}):e._e(),e._v(" "),e._l(n.shownAccounts,function(i){return t(n.NcActionButton,{key:i.id,staticClass:"file-list-filter-accounts__item",attrs:{type:"radio","model-value":n.selectedAccounts.includes(i),value:i.id},on:{click:function(e){return n.toggleAccount(i.id)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t(n.NcAvatar,e._b({staticClass:"file-list-filter-accounts__avatar",attrs:{size:24,"disable-menu":"","hide-status":""}},"NcAvatar",i,!1))]},proxy:!0}],null,!0)},[e._v("\n\t\t"+e._s(i.displayName)+"\n\t")])})],2)},[],!1,null,"b80388c4",null).exports;var k=n(3153),B=n(63814),R=n(21777);const j=`/trashbin/${(0,R.HW)()?.uid}/trash`,$=(0,i.H4)(),Z=`\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t${(0,i.VX)()}\n\t\n`;function z(e){const t=(0,i.Al)(e,j);return t.attributes.previewUrl=(0,B.Jv)("/apps/files_trashbin/preview?fileId={fileid}&x=32&y=32",{fileid:t.fileid}),t}var q=n(71225),G=n(77764);const K=new i.VP({id:"files_trashbin--original-location",title:(0,u.t)("files_trashbin","Original location"),render(e){const t=W(e),n=document.createElement("span");return n.title=t,n.textContent=t,n},sort(e,t){const n=W(e),i=W(t);return n.localeCompare(i,[(0,u.Z0)(),(0,u.lO)()],{numeric:!0,usage:"sort"})}}),U=new i.VP({id:"files_trashbin--deleted-by",title:(0,u.t)("files_trashbin","Deleted by"),render(e){const{userId:t,displayName:n,label:i}=X(e);if(i){const e=document.createElement("span");return e.textContent=i,e}return new(l.Ay.extend(G.A))({propsData:{size:32,user:t??void 0,displayName:n??t}}).$mount().$el},sort(e,t){const n=X(e),i=n.label??n.displayName??n.userId,r=X(t),s=r.label??r.displayName??r.userId;return i.localeCompare(s,[(0,u.Z0)(),(0,u.lO)()],{numeric:!0,usage:"sort"})}}),Y=new i.VP({id:"files_trashbin--deleted",title:(0,u.t)("files_trashbin","Deleted"),render(e){const t=e.attributes?.["trashbin-deletion-time"]||(e?.mtime?.getTime()??0)/1e3,n=document.createElement("span");if(t){const e=Intl.DateTimeFormat([(0,u.lO)()],{dateStyle:"long",timeStyle:"short"}),i=new Date(1e3*t);return n.title=e.format(i),n.textContent=(0,u.fw)(i,{ignoreSeconds:(0,u.t)("files","few seconds ago")}),n}return n.textContent=(0,u.t)("files_trashbin","A long time ago"),n},sort(e,t){const n=e.attributes?.["trashbin-deletion-time"]||(e?.mtime?.getTime()??0)/1e3;return(t.attributes?.["trashbin-deletion-time"]||(t?.mtime?.getTime()??0)/1e3)-n}});function W(e){const t=J(e.attributes?.["trashbin-original-location"]);if(!t)return(0,u.t)("files_trashbin","Unknown");const n=(0,q.pD)(t);return n===t?(0,u.t)("files_trashbin","All files"):n.replace(/^\//,"")}function X(e){const t=J(e.attributes?.["trashbin-deleted-by-id"]),n=J(e.attributes?.["trashbin-deleted-by-display-name"]);let i;const r=(0,R.HW)()?.uid;return t===r&&(i=(0,u.t)("files_trashbin","You")),t||n||(i=(0,u.t)("files_trashbin","Unknown")),{userId:t,displayName:n,label:i}}function J(e){return e?String(e):null}const Q="trashbin";function ee(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}new i.Ss({id:Q,name:(0,u.t)("files_trashbin","Deleted files"),caption:(0,u.t)("files_trashbin","List of files that have been deleted."),emptyTitle:(0,u.t)("files_trashbin","No deleted files"),emptyCaption:(0,u.t)("files_trashbin","Files and folders you have deleted will show up here"),icon:k,order:50,sticky:!0,defaultSortKey:"deleted",columns:[K,U,Y],getContents:async function(e="/"){const t=(await $.getDirectoryContents(`${j}${e}`,{details:!0,data:Z,includeSelf:!0})).data.map(z),[n]=t.splice(t.findIndex(t=>t.path===e),1);return{folder:n,contents:t}}});class te extends i.L3{constructor(){super("files_sharing:account",100),ee(this,"availableAccounts",void 0),ee(this,"currentInstance",void 0),ee(this,"filterAccounts",void 0),this.availableAccounts=[],(0,s.B1)("files:list:updated",({contents:e})=>{this.updateAvailableAccounts(e)})}mount(e){this.currentInstance&&this.currentInstance.$destroy();const t=l.Ay.extend(F);this.currentInstance=new t({el:e}).$on("update:accounts",e=>this.setAccounts(e)).$mount(),this.currentInstance.setAvailableAccounts(this.availableAccounts)}filter(e){if(!this.filterAccounts||0===this.filterAccounts.length)return e;const t=this.filterAccounts.map(({uid:e})=>e);return e.filter(e=>{if(window.OCP.Files.Router.params.view===Q){const n=e.attributes?.["trashbin-deleted-by-id"];return!(!n||!t.includes(n))}if(e.owner&&t.includes(e.owner))return!0;const n=e.attributes.sharees?.sharee;return!(!n||![n].flat().some(({id:e})=>t.includes(e)))||!e.owner&&!n})}reset(){this.currentInstance?.resetFilter()}setAccounts(e){this.filterAccounts=e;let t=[];this.filterAccounts&&this.filterAccounts.length>0&&(t=this.filterAccounts.map(({displayName:e,uid:t})=>({text:e,user:t,onclick:()=>this.currentInstance?.toggleAccount(t)}))),this.updateChips(t),this.filterUpdated()}updateAvailableAccounts(e){const t=new Map;for(const n of e){const e=n.owner;e&&!t.has(e)&&t.set(e,{uid:e,displayName:n.attributes["owner-display-name"]??n.owner});const i=[n.attributes.sharees?.sharee].flat().filter(Boolean);for(const e of[i].flat())""!==e.id&&(e.type!==a.I.User&&e.type!==a.I.Remote||t.has(e.id)||t.set(e.id,{uid:e.id,displayName:e["display-name"]}));const r=n.attributes?.["trashbin-deleted-by-id"];r&&t.set(r,{uid:r,displayName:n.attributes?.["trashbin-deleted-by-display-name"]||r})}this.availableAccounts=[...t.values()],this.currentInstance&&this.currentInstance.setAvailableAccounts(this.availableAccounts)}}const ne='';var ie=n(98469);const re=new(n(7145).A),se=(0,l.$V)(()=>Promise.all([n.e(4208),n.e(4081)]).then(n.bind(n,74081))),ae={id:"file-request",displayName:(0,u.t)("files_sharing","Create file request"),iconSvgInline:ne,order:10,enabled:()=>!(0,o.f)()&&!!re.isPublicUploadEnabled&&re.isPublicShareAllowed,async handler(e,t){(0,ie.S)(se,{context:e,content:t})}},oe='',le='',ce='';var ue=n(81222),de=n(18709);const pe="shareoverview",he="sharingin",fe="sharingout",me="sharinglinks",ge="deletedshares",Ae="pendingshares";var we=n(65659),be=n(19051);const ve=new i.hY({id:"accept-share",displayName:e=>(0,u.zw)("files_sharing","Accept share","Accept shares",e.length),iconSvgInline:()=>we,enabled:(e,t)=>e.length>0&&t.id===Ae,async exec(e){try{const t=!!e.attributes.remote,n=(0,B.KT)("apps/files_sharing/api/v1/{shareBase}/pending/{id}",{shareBase:t?"remote_shares":"shares",id:e.attributes.id});return await be.Ay.post(n),(0,s.Ic)("files:node:deleted",e),!0}catch{return!1}},async execBatch(e,t,n){return Promise.all(e.map(e=>this.exec(e,t,n)))},order:1,inline:()=>!0});(0,i.Gg)(ve);const ye=new i.hY({id:"files_sharing:open-in-files",displayName:()=>(0,u.Tl)("files_sharing","Open in Files"),iconSvgInline:()=>"",enabled:(e,t)=>[pe,he,fe,me].includes(t.id),async exec(e){const t=e.type===i.pt.Folder;return window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:String(e.fileid)},{dir:t?e.path:e.dirname,openfile:t?void 0:"true"}),null},order:-1e3,default:i.m9.HIDDEN});(0,i.Gg)(ye);var _e=n(5655);const Ce=new i.hY({id:"reject-share",displayName:e=>(0,u.zw)("files_sharing","Reject share","Reject shares",e.length),iconSvgInline:()=>_e,enabled:(e,t)=>t.id===Ae&&0!==e.length&&!e.some(e=>e.attributes.remote_id&&e.attributes.share_type===a.I.RemoteGroup),async exec(e){try{const t=e.attributes.remote?"remote_shares":"shares",n=e.attributes.id;let i;return i=0===e.attributes.accepted?(0,B.KT)("apps/files_sharing/api/v1/{shareBase}/pending/{id}",{shareBase:t,id:n}):(0,B.KT)("apps/files_sharing/api/v1/{shareBase}/{id}",{shareBase:t,id:n}),await be.Ay.delete(i),(0,s.Ic)("files:node:deleted",e),!0}catch{return!1}},async execBatch(e,t,n){return Promise.all(e.map(e=>this.exec(e,t,n)))},order:2,inline:()=>!0});(0,i.Gg)(Ce);const xe=new i.hY({id:"restore-share",displayName:e=>(0,u.zw)("files_sharing","Restore share","Restore shares",e.length),iconSvgInline:()=>'',enabled:(e,t)=>e.length>0&&t.id===ge,async exec(e){try{const t=(0,B.KT)("apps/files_sharing/api/v1/deletedshares/{id}",{id:e.attributes.id});return await be.Ay.post(t),(0,s.Ic)("files:node:deleted",e),!0}catch{return!1}},async execBatch(e,t,n){return Promise.all(e.map(e=>this.exec(e,t,n)))},order:1,inline:()=>!0});(0,i.Gg)(xe);var He=n(85168),Ve=n(61780);const Se=(0,n(35947).YK)().setApp("files").detectUser().build(),De=new i.hY({id:"details",displayName:()=>(0,u.Tl)("files","Details"),iconSvgInline:()=>Ve,enabled:e=>!(0,o.f)()&&1===e.length&&!!e[0]&&!!window?.OCA?.Files?.Sidebar&&((e[0].root?.startsWith("/files/")&&e[0].permissions!==i.aX.NONE)??!1),async exec(e,t,n){try{return window.OCA.Files.Sidebar.file===e.path?(Se.debug("Sidebar already open for this file",{node:e}),null):(window.OCA.Files.Sidebar.setActiveTab("sharing"),await window.OCA.Files.Sidebar.open(e.path),window.OCP?.Files?.Router?.goToRoute(null,{view:t.id,fileid:String(e.fileid)},{...window.OCP.Files.Router.query,dir:n,opendetails:"true"},!0),null)}catch(e){return Se.error("Error while opening sidebar",{error:e}),!1}},order:-50});var Ee=n(53168),Le={};function Ne(e){return e.attributes?.["is-federated"]??!1}Le.styleTagTransform=E(),Le.setAttributes=H(),Le.insert=C().bind(null,"head"),Le.domAPI=y(),Le.insertStyleElement=S(),b()(Ee.A,Le),Ee.A&&Ee.A.locals&&Ee.A.locals;const Me=new i.hY({id:"sharing-status",displayName(e){const t=e[0];return Object.values(t?.attributes?.["share-types"]||{}).flat().length>0||t.owner!==(0,R.HW)()?.uid||Ne(t)?(0,u.Tl)("files_sharing","Shared"):""},title(e){const t=e[0];if(t.owner&&(t.owner!==(0,R.HW)()?.uid||Ne(t))){const e=t?.attributes?.["owner-display-name"];return(0,u.Tl)("files_sharing","Shared by {ownerDisplayName}",{ownerDisplayName:e})}if(Object.values(t?.attributes?.["share-types"]||{}).flat().length>1)return(0,u.Tl)("files_sharing","Shared multiple times with different people");const n=t.attributes.sharees?.sharee;if(!n)return(0,u.Tl)("files_sharing","Sharing options");const i=[n].flat()[0];switch(i.type){case a.I.User:return(0,u.Tl)("files_sharing","Shared with {user}",{user:i["display-name"]});case a.I.Group:return(0,u.Tl)("files_sharing","Shared with group {group}",{group:i["display-name"]??i.id});default:return(0,u.Tl)("files_sharing","Shared with others")}},iconSvgInline(e){const t=e[0],n=Object.values(t?.attributes?.["share-types"]||{}).flat();return Array.isArray(t.attributes?.["share-types"])&&t.attributes?.["share-types"].length>1?le:n.includes(a.I.Link)||n.includes(a.I.Email)?ce:n.includes(a.I.Group)||n.includes(a.I.RemoteGroup)?oe:n.includes(a.I.Team)?'':t.owner&&(t.owner!==(0,R.HW)()?.uid||Ne(t))?function(e,t=!1){const n=`${t?`/avatar/guest/${e}`:`/avatar/${e}`}/32${!0===window?.matchMedia?.("(prefers-color-scheme: dark)")?.matches||null!==document.querySelector("[data-themes*=dark]")?"/dark":""}${t?"":"?guestFallback=true"}`;return`\n\t\t\n\t`}(t.owner,Ne(t)):le},enabled(e){if(1!==e.length)return!1;if((0,o.f)())return!1;const t=e[0],n=t.attributes?.["share-types"];return!!(Array.isArray(n)&&n.length>0)||!(t.owner===(0,R.HW)()?.uid&&!Ne(t))||0!==(t.permissions&i.aX.SHARE)&&0!==(t.permissions&i.aX.READ)},exec:async(e,t,n)=>0!==(e.permissions&i.aX.READ)?(window.OCA?.Files?.Sidebar?.setActiveTab?.("sharing"),De.exec(e,t,n),null):((0,He.Qg)((0,u.Tl)("files_sharing","You do not have enough permissions to share this file.")),null),inline:()=>!0});(0,i.Gg)(Me),(()=>{const e=(0,i.bh)();e.register(new i.Ss({id:pe,name:(0,u.t)("files_sharing","Shares"),caption:(0,u.t)("files_sharing","Overview of shared files."),emptyTitle:(0,u.t)("files_sharing","No shares"),emptyCaption:(0,u.t)("files_sharing","Files and folders you shared or have been shared with you will show up here"),icon:le,order:20,columns:[],getContents:()=>(0,de.h)()})),e.register(new i.Ss({id:he,name:(0,u.t)("files_sharing","Shared with you"),caption:(0,u.t)("files_sharing","List of files that are shared with you."),emptyTitle:(0,u.t)("files_sharing","Nothing shared with you yet"),emptyCaption:(0,u.t)("files_sharing","Files and folders others shared with you will show up here"),icon:'',order:1,parent:pe,columns:[],getContents:()=>(0,de.h)(!0,!1,!1,!1)})),0!==(0,ue.C)("files","storageStats",{quota:-1}).quota&&e.register(new i.Ss({id:fe,name:(0,u.t)("files_sharing","Shared with others"),caption:(0,u.t)("files_sharing","List of files that you shared with others."),emptyTitle:(0,u.t)("files_sharing","Nothing shared yet"),emptyCaption:(0,u.t)("files_sharing","Files and folders you shared will show up here"),icon:oe,order:2,parent:pe,columns:[],getContents:()=>(0,de.h)(!1,!0,!1,!1)})),e.register(new i.Ss({id:me,name:(0,u.t)("files_sharing","Shared by link"),caption:(0,u.t)("files_sharing","List of files that are shared by link."),emptyTitle:(0,u.t)("files_sharing","No shared links"),emptyCaption:(0,u.t)("files_sharing","Files and folders you shared by link will show up here"),icon:ce,order:3,parent:pe,columns:[],getContents:()=>(0,de.h)(!1,!0,!1,!1,[a.I.Link])})),e.register(new i.Ss({id:"filerequest",name:(0,u.t)("files_sharing","File requests"),caption:(0,u.t)("files_sharing","List of file requests."),emptyTitle:(0,u.t)("files_sharing","No file requests"),emptyCaption:(0,u.t)("files_sharing","File requests you have created will show up here"),icon:ne,order:4,parent:pe,columns:[],getContents:()=>(0,de.h)(!1,!0,!1,!1,[a.I.Link,a.I.Email]).then(({folder:e,contents:t})=>({folder:e,contents:t.filter(e=>(0,de.C)(e.attributes?.["share-attributes"]||[]))}))})),e.register(new i.Ss({id:ge,name:(0,u.t)("files_sharing","Deleted shares"),caption:(0,u.t)("files_sharing","List of shares you left."),emptyTitle:(0,u.t)("files_sharing","No deleted shares"),emptyCaption:(0,u.t)("files_sharing","Shares you have left will show up here"),icon:k,order:5,parent:pe,columns:[],getContents:()=>(0,de.h)(!1,!1,!1,!0)})),e.register(new i.Ss({id:Ae,name:(0,u.t)("files_sharing","Pending shares"),caption:(0,u.t)("files_sharing","List of unapproved shares."),emptyTitle:(0,u.t)("files_sharing","No pending shares"),emptyCaption:(0,u.t)("files_sharing","Shares you have received but not approved will show up here"),icon:'',order:6,parent:pe,columns:[],getContents:()=>(0,de.h)(!1,!1,!0,!1)}))})(),(0,i.zj)(ae),(0,r.i)("nc:note",{nc:"http://nextcloud.org/ns"}),(0,r.i)("nc:sharees",{nc:"http://nextcloud.org/ns"}),(0,r.i)("nc:hide-download",{nc:"http://nextcloud.org/ns"}),(0,r.i)("nc:share-attributes",{nc:"http://nextcloud.org/ns"}),(0,r.i)("oc:share-types",{oc:"http://owncloud.org/ns"}),(0,r.i)("ocs:share-permissions",{ocs:"http://open-collaboration-services.org/ns"}),(0,o.f)()||(0,i.cZ)(new te),function(){let e,t;(0,i.Up)(new i.Y9({id:"note-to-recipient",order:0,enabled:e=>Boolean(e.attributes.note),updated:e=>{t&&t.updateFolder(e)},render:async(i,r)=>{if(void 0===e){const{default:t}=await Promise.all([n.e(4208),n.e(8741)]).then(n.bind(n,38741));e=l.Ay.extend(t)}t=(new e).$mount(i),t.updateFolder(r)}}))}()},15340:()=>{},15433:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(71354),r=n.n(i),s=n(76314),a=n.n(s)()(r());a.push([e.id,"\n.files-list-filter__clear-button[data-v-3b04956e] .action-button__text {\n\tcolor: var(--color-text-error, var(--color-error-text));\n}\n[data-v-3b04956e] .button-vue {\n\tfont-weight: normal !important;\n*[data-v-3b04956e] {\n\t\tfont-weight: normal !important;\n}\n}\n","",{version:3,sources:["webpack://./apps/files/src/components/FileListFilter/FileListFilter.vue"],names:[],mappings:";AA2CA;CACA,uDAAA;AACA;AAEA;CACA,8BAAA;AAEA;EACA,8BAAA;AACA;AACA",sourcesContent:["\x3c!--\n - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n--\x3e\n\n\n