12 |
- "use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[1957],{9165:(e,t,i)=>{i.d(t,{$BT:()=>c,Ckb:()=>u,EYN:()=>f,F5c:()=>C,Fzw:()=>h,KR_:()=>p,MXC:()=>v,NZC:()=>s,Tfj:()=>r,ZL5:()=>m,dF:()=>g,fEr:()=>d,lWO:()=>a,mbi:()=>l,qFD:()=>n,vrq:()=>o,zY6:()=>w});var l="M16.61 15.15C16.15 15.15 15.77 14.78 15.77 14.32S16.15 13.5 16.61 13.5H16.61C17.07 13.5 17.45 13.86 17.45 14.32C17.45 14.78 17.07 15.15 16.61 15.15M7.41 15.15C6.95 15.15 6.57 14.78 6.57 14.32C6.57 13.86 6.95 13.5 7.41 13.5H7.41C7.87 13.5 8.24 13.86 8.24 14.32C8.24 14.78 7.87 15.15 7.41 15.15M16.91 10.14L18.58 7.26C18.67 7.09 18.61 6.88 18.45 6.79C18.28 6.69 18.07 6.75 18 6.92L16.29 9.83C14.95 9.22 13.5 8.9 12 8.91C10.47 8.91 9 9.24 7.73 9.82L6.04 6.91C5.95 6.74 5.74 6.68 5.57 6.78C5.4 6.87 5.35 7.08 5.44 7.25L7.1 10.13C4.25 11.69 2.29 14.58 2 18H22C21.72 14.59 19.77 11.7 16.91 10.14H16.91Z",n="M2.09 16.8H3.75V9.76H2.09M2.92 8.84C3.44 8.84 3.84 8.44 3.84 7.94C3.84 7.44 3.44 7.04 2.92 7.04C2.4 7.04 2 7.44 2 7.94C2 8.44 2.4 8.84 2.92 8.84M9.25 7.06C6.46 7.06 4.7 8.96 4.7 12C4.7 15.06 6.46 16.96 9.25 16.96C12.04 16.96 13.8 15.06 13.8 12C13.8 8.96 12.04 7.06 9.25 7.06M9.25 8.5C10.96 8.5 12.05 9.87 12.05 12C12.05 14.15 10.96 15.5 9.25 15.5C7.54 15.5 6.46 14.15 6.46 12C6.46 9.87 7.54 8.5 9.25 8.5M14.5 14.11C14.57 15.87 16 16.96 18.22 16.96C20.54 16.96 22 15.82 22 14C22 12.57 21.18 11.77 19.23 11.32L18.13 11.07C16.95 10.79 16.47 10.42 16.47 9.78C16.47 9 17.2 8.45 18.28 8.45C19.38 8.45 20.13 9 20.21 9.89H21.84C21.8 8.2 20.41 7.06 18.29 7.06C16.21 7.06 14.73 8.21 14.73 9.91C14.73 11.28 15.56 12.13 17.33 12.53L18.57 12.82C19.78 13.11 20.27 13.5 20.27 14.2C20.27 15 19.47 15.57 18.31 15.57C17.15 15.57 16.26 15 16.16 14.11H14.5Z",a="M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,14.09 4.8,16 6.11,17.41L9.88,9.88L17.41,6.11C16,4.8 14.09,4 12,4M12,20A8,8 0 0,0 20,12C20,9.91 19.2,8 17.89,6.59L14.12,14.12L6.59,17.89C8,19.2 9.91,20 12,20M12,12L11.23,11.23L9.7,14.3L12.77,12.77L12,12M12,17.5H13V19H12V17.5M15.88,15.89L16.59,15.18L17.65,16.24L16.94,16.95L15.88,15.89M17.5,12V11H19V12H17.5M12,6.5H11V5H12V6.5M8.12,8.11L7.41,8.82L6.35,7.76L7.06,7.05L8.12,8.11M6.5,12V13H5V12H6.5Z",o="M17,19H7V5H17M17,1H7C5.89,1 5,1.89 5,3V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3C19,1.89 18.1,1 17,1Z",r="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",s="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",c="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z",u="M9.27 7.94C9.27 7.94 9.27 7.94 9.27 7.94M6.85 6.74C6.86 6.74 6.86 6.74 6.85 6.74M21.28 8.6C20.85 7.55 19.96 6.42 19.27 6.06C19.83 7.17 20.16 8.28 20.29 9.1L20.29 9.12C19.16 6.3 17.24 5.16 15.67 2.68C15.59 2.56 15.5 2.43 15.43 2.3C15.39 2.23 15.36 2.16 15.32 2.09C15.26 1.96 15.2 1.83 15.17 1.69C15.17 1.68 15.16 1.67 15.15 1.67H15.13L15.12 1.67L15.12 1.67L15.12 1.67C12.9 2.97 11.97 5.26 11.74 6.71C11.05 6.75 10.37 6.92 9.75 7.22C9.63 7.27 9.58 7.41 9.62 7.53C9.67 7.67 9.83 7.74 9.96 7.68C10.5 7.42 11.1 7.27 11.7 7.23L11.75 7.23C11.83 7.22 11.92 7.22 12 7.22C12.5 7.21 12.97 7.28 13.44 7.42L13.5 7.44C13.6 7.46 13.67 7.5 13.75 7.5C13.8 7.54 13.86 7.56 13.91 7.58L14.05 7.64C14.12 7.67 14.19 7.7 14.25 7.73C14.28 7.75 14.31 7.76 14.34 7.78C14.41 7.82 14.5 7.85 14.54 7.89C14.58 7.91 14.62 7.94 14.66 7.96C15.39 8.41 16 9.03 16.41 9.77C15.88 9.4 14.92 9.03 14 9.19C17.6 11 16.63 17.19 11.64 16.95C11.2 16.94 10.76 16.85 10.34 16.7C10.24 16.67 10.14 16.63 10.05 16.58C10 16.56 9.93 16.53 9.88 16.5C8.65 15.87 7.64 14.68 7.5 13.23C7.5 13.23 8 11.5 10.83 11.5C11.14 11.5 12 10.64 12.03 10.4C12.03 10.31 10.29 9.62 9.61 8.95C9.24 8.59 9.07 8.42 8.92 8.29C8.84 8.22 8.75 8.16 8.66 8.1C8.43 7.3 8.42 6.45 8.63 5.65C7.6 6.12 6.8 6.86 6.22 7.5H6.22C5.82 7 5.85 5.35 5.87 5C5.86 5 5.57 5.16 5.54 5.18C5.19 5.43 4.86 5.71 4.56 6C4.21 6.37 3.9 6.74 3.62 7.14C3 8.05 2.5 9.09 2.28 10.18C2.28 10.19 2.18 10.59 2.11 11.1L2.08 11.33C2.06 11.5 2.04 11.65 2 11.91L2 11.94L2 12.27L2 12.32C2 17.85 6.5 22.33 12 22.33C16.97 22.33 21.08 18.74 21.88 14C21.9 13.89 21.91 13.76 21.93 13.63C22.13 11.91 21.91 10.11 21.28 8.6Z",d="M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z",p="M12,20L15.46,14H15.45C15.79,13.4 16,12.73 16,12C16,10.8 15.46,9.73 14.62,9H19.41C19.79,9.93 20,10.94 20,12A8,8 0 0,1 12,20M4,12C4,10.54 4.39,9.18 5.07,8L8.54,14H8.55C9.24,15.19 10.5,16 12,16C12.45,16 12.88,15.91 13.29,15.77L10.89,19.91C7,19.37 4,16.04 4,12M15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9A3,3 0 0,1 15,12M12,4C14.96,4 17.54,5.61 18.92,8H12C10.06,8 8.45,9.38 8.08,11.21L5.7,7.08C7.16,5.21 9.44,4 12,4M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",f="M7 14C5.9 14 5 13.1 5 12S5.9 10 7 10 9 10.9 9 12 8.1 14 7 14M12.6 10C11.8 7.7 9.6 6 7 6C3.7 6 1 8.7 1 12S3.7 18 7 18C9.6 18 11.8 16.3 12.6 14H16V18H20V14H23V10H12.6Z",v="M10.86 15.37C10.17 14.6 9.7 13.68 9.55 12.65C9.25 13.11 9 13.61 8.82 14.15C7.9 16.9 9.5 20.33 12.22 21.33C14.56 22.11 17.19 20.72 18.92 19.2C19.18 18.85 21.23 17.04 20.21 16.84C17.19 18.39 13.19 17.95 10.86 15.37M11.46 9.56C12.5 9.55 11.5 9.13 11.07 8.81C10.03 8.24 8.81 7.96 7.63 7.96C3.78 8 .995 10.41 2.3 14.4C3.24 18.28 6.61 21.4 10.59 21.9C8.54 20.61 7.3 18.19 7.3 15.78C7.38 13.25 8.94 10.28 11.46 9.56M2.78 8.24C5.82 6 10.66 6.18 13.28 9C14.3 10.11 15 12 14.07 13.37C12.33 15.25 17.15 15.5 18.18 15.22C21.92 14.5 22.91 10.15 21.13 7.15C19.43 3.75 15.66 1.97 11.96 2C7.9 1.93 4.25 4.5 2.78 8.24Z",C="M21,16H3V4H21M21,2H3C1.89,2 1,2.89 1,4V16A2,2 0 0,0 3,18H10V20H8V22H16V20H14V18H21A2,2 0 0,0 23,16V4C23,2.89 22.1,2 21,2Z",m="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",g="M12,15.39L8.24,17.66L9.23,13.38L5.91,10.5L10.29,10.13L12,6.09L13.71,10.13L18.09,10.5L14.77,13.38L15.76,17.66M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z",h="M19,18H5V6H19M21,4H3C1.89,4 1,4.89 1,6V18A2,2 0 0,0 3,20H21A2,2 0 0,0 23,18V6C23,4.89 22.1,4 21,4Z",w="M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},27518:e=>{e.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M15.4%2016.6L10.8%2012l4.6-4.6L14%206l-6%206%206%206%201.4-1.4z%27/%3e%3c/svg%3e"},27514:e=>{e.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M18.4%207.4L17%206l-6%206%206%206%201.4-1.4-4.6-4.6%204.6-4.6m-6%200L11%206l-6%206%206%206%201.4-1.4L7.8%2012l4.6-4.6z%27/%3e%3c/svg%3e"},79722:e=>{e.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M5.6%207.4L7%206l6%206-6%206-1.4-1.4%204.6-4.6-4.6-4.6m6%200L13%206l6%206-6%206-1.4-1.4%204.6-4.6-4.6-4.6z%27/%3e%3c/svg%3e"},86886:e=>{e.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M8.6%2016.6l4.6-4.6-4.6-4.6L10%206l6%206-6%206-1.4-1.4z%27/%3e%3c/svg%3e"},8518:(e,t,i)=>{i.r(t),i.d(t,{default:()=>xe});var l=i(85471),n=i(30385),a=i(78791),o=i(76333),r=i(32981),s=i(63814),c=i(82680);function u(e){return"function"==typeof e?e():(0,l.R1)(e)}function d(e){const t=Object.create(null);return i=>t[i]||(t[i]=e(i))}l.Ay.util.warn,i(96763),"undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope),Object.prototype.toString;const p=/\B([A-Z])/g,f=(d((e=>e.replace(p,"-$1").toLowerCase())),/-(\w)/g);d((e=>e.replace(f,((e,t)=>t?t.toUpperCase():""))));var v=i(65043),C=i(21777),m=i(54914),g=i(9165),h=i(61338),w=i(43627),_=i(36117),y=i(96763);const b={name:"FileIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var L=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon file-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"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"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},k=[];const N=(0,n.a)(b,L,k,!1,null,null,null,null).exports,S=()=>{var e,t,i;const a=(0,r.C)("files","config",null),o=(0,l.KR)(null==(e=null==a?void 0:a.show_hidden)||e),u=(0,l.KR)(null==(t=null==a?void 0:a.sort_favorites_first)||t),d=(0,l.KR)(null==(i=null==a?void 0:a.crop_image_previews)||i);return(0,l.sV)((async()=>{var e,t,i,l,a,r;if((0,c.f)())y.debug("Skip loading files settings - currently on public share");else try{const{data:n}=await v.Ay.get((0,s.Jv)("/apps/files/api/v1/configs"));o.value=null!=(t=null==(e=null==n?void 0:n.data)?void 0:e.show_hidden)&&t,u.value=null==(l=null==(i=null==n?void 0:n.data)?void 0:i.sort_favorites_first)||l,d.value=null==(r=null==(a=null==n?void 0:n.data)?void 0:a.crop_image_previews)||r}catch(e){y.error("Could not load files settings",e),(0,n.l)((0,n.t)("Could not load files settings"))}})),{showHiddenFiles:o,sortFavoritesFirst:u,cropImagePreviews:d}},F={name:"MenuUpIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var A=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon menu-up-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M7,15L12,10L17,15H7Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},x=[];const H=(0,n.a)(F,A,x,!1,null,null,null,null).exports,M={name:"MenuDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var V=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon menu-down-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M7,10L12,15L17,10H7Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},P=[];const B=(0,n.a)(M,V,P,!1,null,null,null,null).exports,I={"file-picker__file-icon":"_file-picker__file-icon_19mjt_9"},z=(0,l.pM)({__name:"LoadingTableRow",props:{showCheckbox:{type:Boolean}},setup:e=>({__sfc:!0,fileListIconStyles:I})});var E=function(){var e=this,t=e._self._c,i=e._self._setupProxy;return t("tr",{staticClass:"file-picker__row loading-row",attrs:{"aria-hidden":"true"}},[e.showCheckbox?t("td",{staticClass:"row-checkbox"},[t("span")]):e._e(),t("td",{staticClass:"row-name"},[t("div",{staticClass:"row-wrapper"},[t("span",{class:i.fileListIconStyles["file-picker__file-icon"]}),t("span")])]),e._m(0),e._m(1)])},R=[function(){var e=this._self._c;return this._self._setupProxy,e("td",{staticClass:"row-size"},[e("span")])},function(){var e=this._self._c;return this._self._setupProxy,e("td",{staticClass:"row-modified"},[e("span")])}];const D=(0,n.a)(z,E,R,!1,null,"15187afc",null,null).exports,W={name:"FolderIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Z=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon folder-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},K=[];const T=(0,n.a)(W,Z,K,!1,null,null,null,null).exports,$=(0,l.pM)({name:"FilePreview",props:{node:null,cropImagePreviews:{type:Boolean}},setup(e){const t=e,i=(0,l.KR)(I),n=(0,l.EW)((()=>function(e,t={}){var i;t={size:32,cropPreview:!1,mimeFallback:!0,...t};try{const l=(null==(i=e.attributes)?void 0:i.previewUrl)||(0,s.Jv)("/core/preview?fileId={fileid}",{fileid:e.fileid});let n;try{n=new URL(l)}catch(e){n=new URL(l,window.location.origin)}return n.searchParams.set("x","".concat(t.size)),n.searchParams.set("y","".concat(t.size)),n.searchParams.set("mimeFallback","".concat(t.mimeFallback)),n.searchParams.set("a",!0===t.cropPreview?"0":"1"),n.searchParams.set("c","".concat(e.attributes.etag)),n}catch(e){return null}}(t.node,{cropPreview:t.cropImagePreviews}))),o=(0,l.EW)((()=>t.node.type===a.pt.File)),r=(0,l.KR)(!1);return(0,l.nT)((()=>{if(r.value=!1,n.value){const e=new Image;e.src=n.value.href,e.onerror=()=>e.remove(),e.onload=()=>{r.value=!0,e.remove()}}})),{__sfc:!0,fileListIconStyles:i,props:t,previewURL:n,isFile:o,canLoadPreview:r,IconFile:N,IconFolder:T}}});var O=function(){var e=this,t=e._self._c,i=e._self._setupProxy;return t("div",{class:i.fileListIconStyles["file-picker__file-icon"],style:i.canLoadPreview?{backgroundImage:"url(".concat(i.previewURL,")")}:void 0},[i.canLoadPreview?e._e():[i.isFile?t(i.IconFile,{attrs:{size:20}}):t(i.IconFolder,{attrs:{size:20}})]],2)},j=[];const X=(0,n.a)($,O,j,!1,null,null,null,null).exports,J=(0,l.pM)({__name:"FileListRow",props:{allowPickDirectory:{type:Boolean},selected:{type:Boolean},showCheckbox:{type:Boolean},canPick:{type:Boolean},node:null,cropImagePreviews:{type:Boolean}},emits:["update:selected","enter-directory"],setup(e,{emit:t}){const i=e,r=(0,l.EW)((()=>{var e;return(null==(e=i.node.attributes)?void 0:e.displayName)||i.node.basename.slice(0,i.node.extension?-i.node.extension.length:void 0)})),s=(0,l.EW)((()=>i.node.extension)),c=(0,l.EW)((()=>i.node.type===a.pt.Folder)),u=(0,l.EW)((()=>i.canPick&&(i.allowPickDirectory||!c.value)));function d(){t("update:selected",!i.selected)}function p(){c.value?t("enter-directory",i.node):d()}return{__sfc:!0,props:i,emit:t,displayName:r,fileExtension:s,isDirectory:c,isPickable:u,toggleSelected:d,handleClick:p,handleKeyDown:function(e){"Enter"===e.key&&p()},formatFileSize:a.v7,NcCheckboxRadioSwitch:o.AO,NcDateTime:o.lT,t:n.t,FilePreview:X}}});var U=function(){var e=this,t=e._self._c,i=e._self._setupProxy;return t("tr",e._g({class:["file-picker__row",{"file-picker__row--selected":e.selected&&!e.showCheckbox}],attrs:{tabindex:e.showCheckbox&&!i.isDirectory?void 0:0,"aria-selected":i.isPickable?e.selected:void 0,"data-filename":e.node.basename,"data-testid":"file-list-row"}},{click:i.handleClick,...!e.showCheckbox||i.isDirectory?{keydown:i.handleKeyDown}:{}}),[e.showCheckbox?t("td",{staticClass:"row-checkbox",on:{click:function(e){return e.stopPropagation(),(()=>{}).apply(null,arguments)}}},[t(i.NcCheckboxRadioSwitch,{attrs:{"aria-label":i.t("Select the row for {nodename}",{nodename:i.displayName}),checked:e.selected,disabled:!i.isPickable,"data-testid":"row-checkbox"},on:{"update:checked":i.toggleSelected}})],1):e._e(),t("td",{staticClass:"row-name"},[t("div",{staticClass:"file-picker__name-container",attrs:{"data-testid":"row-name"}},[t(i.FilePreview,{attrs:{node:e.node,"crop-image-previews":e.cropImagePreviews}}),t("div",{staticClass:"file-picker__file-name",attrs:{title:i.displayName},domProps:{textContent:e._s(i.displayName)}}),t("div",{staticClass:"file-picker__file-extension",domProps:{textContent:e._s(i.fileExtension)}})],1)]),t("td",{staticClass:"row-size"},[e._v(" "+e._s(i.formatFileSize(e.node.size||0))+" ")]),t("td",{staticClass:"row-modified"},[t(i.NcDateTime,{attrs:{timestamp:e.node.mtime,"ignore-seconds":!0}})],1)])},G=[];const Q=(0,n.a)(J,U,G,!1,null,"cb12dccb",null,null).exports,Y=(0,l.pM)({__name:"FileList",props:{currentView:null,multiselect:{type:Boolean},allowPickDirectory:{type:Boolean},loading:{type:Boolean},files:null,selectedFiles:null,path:null},emits:["update:path","update:selectedFiles"],setup(e,{emit:t}){const i=e,d=(0,l.KR)(),{currentConfig:p}=(e=>{var t,i,a,o,d,p,f,C,m,g,h,w;const _=e=>"asc"===e?"ascending":"desc"===e?"descending":"none",b=(0,r.C)("files","viewConfigs",null),L=(0,l.KR)({sortBy:null!=(i=null==(t=null==b?void 0:b.files)?void 0:t.sorting_mode)?i:"basename",order:_(null!=(o=null==(a=null==b?void 0:b.files)?void 0:a.sorting_direction)?o:"asc")}),k=(0,l.KR)({sortBy:null!=(p=null==(d=null==b?void 0:b.recent)?void 0:d.sorting_mode)?p:"basename",order:_(null!=(C=null==(f=null==b?void 0:b.recent)?void 0:f.sorting_direction)?C:"asc")}),N=(0,l.KR)({sortBy:null!=(g=null==(m=null==b?void 0:b.favorites)?void 0:m.sorting_mode)?g:"basename",order:_(null!=(w=null==(h=null==b?void 0:b.favorites)?void 0:h.sorting_direction)?w:"asc")});(0,l.sV)((async()=>{var e,t,i,l,a,o,r,u,d,p,f,C,m,g,h;if((0,c.f)())y.debug("Skip loading files views - currently on public share");else try{const{data:n}=await v.Ay.get((0,s.Jv)("/apps/files/api/v1/views"));L.value={sortBy:null!=(i=null==(t=null==(e=null==n?void 0:n.data)?void 0:e.files)?void 0:t.sorting_mode)?i:"basename",order:_(null==(a=null==(l=null==n?void 0:n.data)?void 0:l.files)?void 0:a.sorting_direction)},N.value={sortBy:null!=(u=null==(r=null==(o=null==n?void 0:n.data)?void 0:o.favorites)?void 0:r.sorting_mode)?u:"basename",order:_(null==(p=null==(d=null==n?void 0:n.data)?void 0:d.favorites)?void 0:p.sorting_direction)},k.value={sortBy:null!=(m=null==(C=null==(f=null==n?void 0:n.data)?void 0:f.recent)?void 0:C.sorting_mode)?m:"basename",order:_(null==(h=null==(g=null==n?void 0:n.data)?void 0:g.recent)?void 0:h.sorting_direction)}}catch(e){y.error("Could not load files views",e),(0,n.l)((0,n.t)("Could not load files views"))}}));const S=(0,l.EW)((()=>"files"===u(e||"files")?L.value:"recent"===u(e)?k.value:N.value)),F=(0,l.EW)((()=>S.value.sortBy)),A=(0,l.EW)((()=>S.value.order));return{filesViewConfig:L,favoritesViewConfig:N,recentViewConfig:k,currentConfig:S,sortBy:F,order:A}})(i.currentView),f=(0,l.EW)((()=>{var e;return null!=(e=d.value)?e:p.value})),C=(0,l.EW)((()=>"basename"===f.value.sortBy?"none"===f.value.order?void 0:f.value.order:void 0)),m=(0,l.EW)((()=>"size"===f.value.sortBy?"none"===f.value.order?void 0:f.value.order:void 0)),g=(0,l.EW)((()=>"mtime"===f.value.sortBy?"none"===f.value.order?void 0:f.value.order:void 0)),{sortFavoritesFirst:h,cropImagePreviews:w}=S(),_=(0,l.EW)((()=>(0,a.ur)(i.files,{sortFoldersFirst:!0,sortFavoritesFirst:h.value,sortingOrder:"descending"===f.value.order?"desc":"asc",sortingMode:f.value.sortBy}))),b=(0,l.EW)((()=>i.files.filter((e=>i.allowPickDirectory||e.type!==a.pt.Folder)))),L=(0,l.EW)((()=>!i.loading&&i.selectedFiles.length>0&&i.selectedFiles.length>=b.value.length)),k=(0,l.KR)(4),N=(0,l.KR)();{const e=()=>(0,l.dY)((()=>{var e,t,i,l,n;const a=(null==(t=null==(e=N.value)?void 0:e.parentElement)?void 0:t.children)||[];let o=(null==(l=null==(i=N.value)?void 0:i.parentElement)?void 0:l.clientHeight)||450;for(let e=0;e<a.length;e++)(null==(n=N.value)?void 0:n.isSameNode(a[e]))||(o-=a[e].clientHeight);k.value=Math.max(1,Math.floor((o-50)/50))}));(0,l.sV)((()=>{window.addEventListener("resize",e),e()})),(0,l.hi)((()=>{window.removeEventListener("resize",e)}))}return{__sfc:!0,props:i,emit:t,customSortingConfig:d,filesAppSorting:p,sortingConfig:f,sortByName:C,sortBySize:m,sortByModified:g,toggleSorting:e=>{f.value.sortBy===e?"ascending"===f.value.order?d.value={sortBy:f.value.sortBy,order:"descending"}:d.value={sortBy:f.value.sortBy,order:"ascending"}:d.value={sortBy:e,order:"ascending"}},sortFavoritesFirst:h,cropImagePreviews:w,sortedFiles:_,selectableFiles:b,allSelected:L,onSelectAll:function(){i.selectedFiles.length<b.value.length?t("update:selectedFiles",b.value):t("update:selectedFiles",[])},onNodeSelected:function(e){i.selectedFiles.includes(e)?t("update:selectedFiles",i.selectedFiles.filter((t=>t.path!==e.path))):i.multiselect?t("update:selectedFiles",[...i.selectedFiles,e]):t("update:selectedFiles",[e])},onChangeDirectory:function(e){t("update:path",e.path)},skeletonNumber:k,fileContainer:N,NcButton:o.x1,NcCheckboxRadioSwitch:o.AO,t:n.t,IconSortAscending:H,IconSortDescending:B,LoadingTableRow:D,FileListRow:Q}}});var q=function(){var e=this,t=e._self._c,i=e._self._setupProxy;return t("div",{ref:"fileContainer",staticClass:"file-picker__files"},[t("table",[t("thead",[t("tr",[e.multiselect?t("th",{staticClass:"row-checkbox"},[t("span",{staticClass:"hidden-visually"},[e._v(" "+e._s(i.t("Select entry"))+" ")]),e.multiselect?t(i.NcCheckboxRadioSwitch,{attrs:{"aria-label":i.t("Select all entries"),checked:i.allSelected,"data-testid":"select-all-checkbox"},on:{"update:checked":i.onSelectAll}}):e._e()],1):e._e(),t("th",{staticClass:"row-name",attrs:{"aria-sort":i.sortByName}},[t("div",{staticClass:"header-wrapper"},[t("span",{staticClass:"file-picker__header-preview"}),t(i.NcButton,{attrs:{wide:!0,type:"tertiary","data-test":"file-picker_sort-name"},on:{click:function(e){return i.toggleSorting("basename")}},scopedSlots:e._u([{key:"icon",fn:function(){return["ascending"===i.sortByName?t(i.IconSortAscending,{attrs:{size:20}}):"descending"===i.sortByName?t(i.IconSortDescending,{attrs:{size:20}}):t("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[e._v(" "+e._s(i.t("Name"))+" ")])],1)]),t("th",{staticClass:"row-size",attrs:{"aria-sort":i.sortBySize}},[t(i.NcButton,{attrs:{wide:!0,type:"tertiary"},on:{click:function(e){return i.toggleSorting("size")}},scopedSlots:e._u([{key:"icon",fn:function(){return["ascending"===i.sortBySize?t(i.IconSortAscending,{attrs:{size:20}}):"descending"===i.sortBySize?t(i.IconSortDescending,{attrs:{size:20}}):t("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[e._v(" "+e._s(i.t("Size"))+" ")])],1),t("th",{staticClass:"row-modified",attrs:{"aria-sort":i.sortByModified}},[t(i.NcButton,{attrs:{wide:!0,type:"tertiary"},on:{click:function(e){return i.toggleSorting("mtime")}},scopedSlots:e._u([{key:"icon",fn:function(){return["ascending"===i.sortByModified?t(i.IconSortAscending,{attrs:{size:20}}):"descending"===i.sortByModified?t(i.IconSortDescending,{attrs:{size:20}}):t("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[e._v(" "+e._s(i.t("Modified"))+" ")])],1)])]),t("tbody",[e.loading?e._l(i.skeletonNumber,(function(l){return t(i.LoadingTableRow,{key:l,attrs:{"show-checkbox":e.multiselect}})})):e._l(i.sortedFiles,(function(l){return t(i.FileListRow,{key:l.fileid||l.path,attrs:{"allow-pick-directory":e.allowPickDirectory,"show-checkbox":e.multiselect,"can-pick":e.multiselect||0===e.selectedFiles.length||e.selectedFiles.includes(l),selected:e.selectedFiles.includes(l),node:l,"crop-image-previews":i.cropImagePreviews},on:{"update:selected":function(e){return i.onNodeSelected(l)},"enter-directory":i.onChangeDirectory}})}))],2)])])},ee=[];const te=(0,n.a)(Y,q,ee,!1,null,"006fdbd0",null,null).exports,ie={name:"HomeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var le=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon home-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},ne=[];const ae=(0,n.a)(ie,le,ne,!1,null,null,null,null).exports,oe={name:"PlusIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var re=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon plus-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},se=[];const ce=(0,n.a)(oe,re,se,!1,null,null,null,null).exports,ue=(0,l.pM)({__name:"FilePickerBreadcrumbs",props:{path:null,showMenu:{type:Boolean}},emits:["update:path","create-node"],setup(e,{emit:t}){const i=e,a=(0,l.KR)(!1),r=(0,l.KR)(""),s=(0,l.KR)();function c(){var e,t,i,l;const a=r.value.trim(),o=null==(t=null==(e=s.value)?void 0:e.$el)?void 0:t.querySelector("input");let c="";return 0===a.length?c=(0,n.t)("Folder name cannot be empty."):a.includes("/")?c=(0,n.t)('"/" is not allowed inside a folder name.'):["..","."].includes(a)?c=(0,n.t)('"{name}" is an invalid folder name.',{name:a}):(null==(i=window.OC.config)?void 0:i.blacklist_files_regex)&&a.match(null==(l=window.OC.config)?void 0:l.blacklist_files_regex)&&(c=(0,n.t)('"{name}" is not an allowed folder name',{name:a})),o&&o.setCustomValidity(c),""===c}const u=(0,l.EW)((()=>i.path.split("/").filter((e=>""!==e)).map(((e,t,i)=>({name:e,path:"/"+i.slice(0,t+1).join("/")})))));return{__sfc:!0,props:i,emit:t,actionsOpen:a,newNodeName:r,nameInput:s,validateInput:c,onSubmit:function(){const e=r.value.trim();c()&&(a.value=!1,t("create-node",e),r.value="")},pathElements:u,IconFolder:T,IconHome:ae,IconPlus:ce,NcActions:o.B6,NcActionInput:o.Az,NcBreadcrumbs:o.Qz,NcBreadcrumb:o.R1,t:n.t}}});var de=function(){var e=this,t=e._self._c,i=e._self._setupProxy;return t(i.NcBreadcrumbs,{staticClass:"file-picker__breadcrumbs",scopedSlots:e._u([{key:"default",fn:function(){return[t(i.NcBreadcrumb,{attrs:{name:i.t("All files"),title:i.t("Home")},on:{click:function(e){return i.emit("update:path","/")}},scopedSlots:e._u([{key:"icon",fn:function(){return[t(i.IconHome,{attrs:{size:20}})]},proxy:!0}])}),e._l(i.pathElements,(function(e){return t(i.NcBreadcrumb,{key:e.path,attrs:{name:e.name,title:e.path},on:{click:function(t){return i.emit("update:path",e.path)}}})}))]},proxy:!0},e.showMenu?{key:"actions",fn:function(){return[t(i.NcActions,{attrs:{"aria-label":i.t("Create directory"),"force-menu":!0,"force-name":!0,"menu-name":i.t("New"),open:i.actionsOpen,type:"secondary"},on:{"update:open":function(e){i.actionsOpen=e},close:function(e){i.newNodeName=""}},scopedSlots:e._u([{key:"icon",fn:function(){return[t(i.IconPlus,{attrs:{size:20}})]},proxy:!0}],null,!1,2971667417)},[t(i.NcActionInput,{ref:"nameInput",attrs:{value:i.newNodeName,label:i.t("New folder"),placeholder:i.t("New folder name")},on:{"update:value":function(e){i.newNodeName=e},submit:i.onSubmit,input:i.validateInput},scopedSlots:e._u([{key:"icon",fn:function(){return[t(i.IconFolder,{attrs:{size:20}})]},proxy:!0}],null,!1,1614167509)})],1)]},proxy:!0}:null],null,!0)})},pe=[];const fe=(0,n.a)(ue,de,pe,!1,null,"b357227a",null,null).exports,ve={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Ce=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon close-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},me=[];const ge=(0,n.a)(ve,Ce,me,!1,null,null,null,null).exports,he={name:"MagnifyIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var we=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon magnify-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},_e=[];const ye=(0,n.a)(he,we,_e,!1,null,null,null,null).exports,be=(0,l.pM)({__name:"FilePickerNavigation",props:{currentView:null,filterString:null,isCollapsed:{type:Boolean},disabledNavigation:{type:Boolean}},emits:["update:currentView","update:filterString"],setup(e,{emit:t}){const i=e,{availableViews:a}=(e=>{const t=[{id:"files",label:(0,n.t)("All files"),icon:g.fEr},{id:"recent",label:(0,n.t)("Recent"),icon:g.NZC},{id:"favorites",label:(0,n.t)("Favorites"),icon:g.ZL5}],i=e.value?t.filter((({id:e})=>"files"===e)):t;return{allViews:t,availableViews:i}})((0,l.KR)(null===(0,C.HW)())),r=(0,l.EW)((()=>{var e;return null!=(e=a.filter((e=>e.id===i.currentView))[0])?e:a[0]}));return{__sfc:!0,props:i,emit:t,availableViews:a,currentViewObject:r,updateFilterValue:e=>t("update:filterString",e),IconClose:ge,IconMagnify:ye,NcButton:o.x1,NcIconSvgWrapper:o.K1,NcSelect:o.EQ,NcTextField:o.v,Fragment:m.F,t:n.t}}});var Le=function(){var e=this,t=e._self._c,i=e._self._setupProxy;return t(i.Fragment,[t(i.NcTextField,{staticClass:"file-picker__filter-input",attrs:{value:e.filterString,label:i.t("Filter file list"),"show-trailing-button":!!e.filterString},on:{"update:value":i.updateFilterValue,"trailing-button-click":function(e){return i.updateFilterValue("")}},scopedSlots:e._u([{key:"trailing-button-icon",fn:function(){return[t(i.IconClose,{attrs:{size:16}})]},proxy:!0}])},[t(i.IconMagnify,{attrs:{size:16}})],1),i.availableViews.length>1&&!e.disabledNavigation?[e.isCollapsed?t(i.NcSelect,{attrs:{"aria-label":i.t("Current view selector"),clearable:!1,searchable:!1,options:i.availableViews,value:i.currentViewObject},on:{input:e=>i.emit("update:currentView",e.id)}}):t("ul",{staticClass:"file-picker__side"},e._l(i.availableViews,(function(l){return t("li",{key:l.id},[t(i.NcButton,{attrs:{type:e.currentView===l.id?"primary":"tertiary",wide:!0},on:{click:function(t){return e.$emit("update:currentView",l.id)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t(i.NcIconSvgWrapper,{attrs:{path:l.icon,size:20}})]},proxy:!0}],null,!0)},[e._v(" "+e._s(l.label)+" ")])],1)})),0)]:e._e()],2)},ke=[];const Ne=(0,n.a)(be,Le,ke,!1,null,"b42054b8",null,null).exports,Se=(0,l.pM)({name:"FilePicker",props:{buttons:null,name:null,allowPickDirectory:{type:Boolean,default:!1},disabledNavigation:{type:Boolean,default:!1},container:{default:"body"},filterFn:{default:void 0},mimetypeFilter:{default:()=>[]},multiselect:{type:Boolean,default:!0},path:{default:void 0}},emits:["close"],setup(e,{emit:t}){const i=e,r=(0,l.KR)(!0),u=(0,l.EW)((()=>{const e=0===C.value.length&&i.allowPickDirectory&&A.value?[A.value]:C.value;return("function"==typeof i.buttons?i.buttons(e,b.value,f.value):i.buttons).map((t=>({...t,disabled:t.disabled||x.value,callback:()=>{d=!0,p(t.callback,e)}})))}));let d=!1;const p=async(e,i)=>{e(i),t("close",i),d=!1},f=(0,l.KR)("files"),v=(0,l.EW)((()=>"favorites"===f.value?(0,n.t)("Favorites"):"recent"===f.value?(0,n.t)("Recent"):"")),C=(0,l.IJ)([]),m=(0,l.KR)((null==window?void 0:window.sessionStorage.getItem("NC.FilePicker.LastPath"))||"/"),g=(0,l.KR)("");(0,l.wB)([g],(()=>{void 0===i.path&&g.value&&window.sessionStorage.setItem("NC.FilePicker.LastPath",g.value),C.value=[]}));const b=(0,l.EW)({get:()=>"files"===f.value?g.value||i.path||m.value:"/",set:e=>{g.value=e}}),L=(0,l.KR)(""),{isSupportedMimeType:k}=function(e){const t=(0,l.EW)((()=>e.value.map((e=>e.split("/")))));return{isSupportedMimeType:e=>{const i=e.split("/");return t.value.some((([e,t])=>!(i[0]!==e&&"*"!==e||i[1]!==t&&"*"!==t)))}}}((0,l.lW)(i,"mimetypeFilter")),{files:F,folder:A,isLoading:x,loadFiles:H,createDirectory:M}=function(e,t){const i=(0,c.f)(),n=i?"/":a.lJ,o=(0,l.EW)((()=>i?(0,s.dC)("webdav").replace("/remote.php","/public.php"):a.PY)),r=(0,l.EW)((()=>{if(i){const e=document.getElementById("sharingToken").value,t=btoa("".concat(e,":null"));return(0,a.H4)(o.value,{Authorization:"Basic ".concat(t)})}return(0,a.H4)()})),u=e=>(0,a.Al)(e,n,o.value),d=(0,l.IJ)([]),p=(0,l.IJ)(null),f=(0,l.KR)(!0),v=(0,l.KR)(null);async function C(){v.value&&v.value.cancel(),f.value=!0,"favorites"===e.value?v.value=(0,a.Q$)(r.value,t.value,n):"recent"===e.value?v.value=(()=>{const e=new AbortController,t=Math.round(Date.now()/1e3)-1209600;return new _.CancelablePromise((async(i,l,n)=>{n((()=>e.abort()));try{const{data:l}=await r.value.search("/",{signal:e.signal,details:!0,data:(0,a.R3)(t)});i(l.results.map(u))}catch(e){l(e)}}))})():v.value=(()=>{const e=new AbortController;return new _.CancelablePromise((async(i,l,o)=>{o((()=>e.abort()));try{const l=(await r.value.getDirectoryContents("".concat(n).concat(t.value),{signal:e.signal,details:!0,includeSelf:!0,data:(0,a.VL)()})).data.map(u);i({folder:l.find((e=>e.path===t.value)),contents:l.filter((e=>e.path!==t.value))})}catch(e){l(e)}}))})();const i=await v.value;"folder"in i?(p.value=i.folder,d.value=i.contents):(p.value=null,d.value=i),v.value=null,f.value=!1}return(0,l.wB)([e,t],(()=>C())),(0,l.sV)((()=>C())),{isLoading:f,files:d,folder:p,loadFiles:C,createDirectory:async function(e){const i=(0,w.join)(t.value,e);await r.value.createDirectory((0,w.join)(n,i));const l=await async function(e,t){t=null!=t?t:n;const{data:i}=await r.value.stat("".concat(t).concat(e),{details:!0,data:(0,a.VL)()});return u(i)}(i);return d.value=[...d.value,l],l}}}(f,b);(0,l.sV)((()=>H()));const{showHiddenFiles:V}=S(),P=(0,l.EW)((()=>{let e=F.value;return V.value||(e=e.filter((e=>!e.basename.startsWith(".")))),i.mimetypeFilter.length>0&&(e=e.filter((e=>"folder"===e.type||e.mime&&k(e.mime)))),L.value&&(e=e.filter((e=>e.basename.toLowerCase().includes(L.value.toLowerCase())))),i.filterFn&&(e=e.filter((e=>i.filterFn(e)))),e})),B=(0,l.EW)((()=>"files"===f.value?(0,n.t)("Upload some content or sync with your devices!"):"recent"===f.value?(0,n.t)("Files and folders you recently modified will show up here."):(0,n.t)("Files and folders you mark as favorite will show up here.")));return{__sfc:!0,props:i,emit:t,isOpen:r,dialogButtons:u,isHandlingCallback:d,handleButtonClick:p,currentView:f,viewHeadline:v,selectedFiles:C,savedPath:m,navigatedPath:g,currentPath:b,filterString:L,isSupportedMimeType:k,files:F,currentFolder:A,isLoading:x,loadFiles:H,createDirectory:M,showHiddenFiles:V,filteredFiles:P,noFilesDescription:B,onCreateFolder:async e=>{try{const t=await M(e);g.value=t.path,(0,h.Ic)("files:node:created",F.value.filter((t=>t.basename===e))[0])}catch(t){y.warn("Could not create new folder",{name:e,error:t}),(0,n.l)((0,n.t)("Could not create the new folder"))}},handleClose:e=>{e||d||t("close")},IconFile:N,FileList:te,FilePickerBreadcrumbs:fe,FilePickerNavigation:Ne,NcDialog:o.i$,NcEmptyContent:o.yI,t:n.t}}});var Fe=function(){var e=this,t=e._self._c,i=e._self._setupProxy;return t(i.NcDialog,{attrs:{container:e.container,buttons:i.dialogButtons,name:e.name,size:"large","content-classes":"file-picker__content","dialog-classes":"file-picker","navigation-classes":"file-picker__navigation",open:i.isOpen},on:{"update:open":[function(e){i.isOpen=e},i.handleClose]},scopedSlots:e._u([{key:"navigation",fn:function({isCollapsed:l}){return[t(i.FilePickerNavigation,{attrs:{"is-collapsed":l,"current-view":i.currentView,"filter-string":i.filterString,"disabled-navigation":e.disabledNavigation},on:{"update:currentView":function(e){i.currentView=e},"update:current-view":function(e){i.currentView=e},"update:filterString":function(e){i.filterString=e},"update:filter-string":function(e){i.filterString=e}}})]}}])},[t("div",{staticClass:"file-picker__main"},["files"===i.currentView?t(i.FilePickerBreadcrumbs,{attrs:{path:i.currentPath,"show-menu":e.allowPickDirectory},on:{"update:path":function(e){i.currentPath=e},"create-node":i.onCreateFolder}}):t("div",{staticClass:"file-picker__view"},[t("h3",[e._v(e._s(i.viewHeadline))])]),i.isLoading||i.filteredFiles.length>0?t(i.FileList,{attrs:{"allow-pick-directory":e.allowPickDirectory,"current-view":i.currentView,files:i.filteredFiles,multiselect:e.multiselect,loading:i.isLoading,path:i.currentPath,"selected-files":i.selectedFiles,name:i.viewHeadline},on:{"update:path":[function(e){i.currentPath=e},function(e){i.currentView="files"}],"update:selectedFiles":function(e){i.selectedFiles=e},"update:selected-files":function(e){i.selectedFiles=e}}}):i.filterString?t(i.NcEmptyContent,{attrs:{name:i.t("No matching files"),description:i.t("No files matching your filter were found.")},scopedSlots:e._u([{key:"icon",fn:function(){return[t(i.IconFile)]},proxy:!0}])}):t(i.NcEmptyContent,{attrs:{name:i.t("No files in here"),description:i.noFilesDescription},scopedSlots:e._u([{key:"icon",fn:function(){return[t(i.IconFile)]},proxy:!0}])})],1)])},Ae=[];const xe=(0,n.a)(Se,Fe,Ae,!1,null,"20b719ba",null,null).exports},76333:(e,t,i)=>{i.d(t,{AO:()=>z.N,Az:()=>r.N,B6:()=>d.N,C7:()=>_e.N,EQ:()=>ve.N,K1:()=>ee.N,Qz:()=>B.N,R1:()=>P.N,gb:()=>ye.A,i$:()=>j.N,lT:()=>T.N,mQ:()=>oe.A,rE:()=>we.N,v:()=>Ce.N,x1:()=>I.A,yI:()=>G.A}),i(28054);var l=i(89257),n=i(59602),a=i(30567),o=i(4703),r=i(3771),s=i(73267),c=i(15683),u=i(93806),d=i(54657),p=i(80114),f=i(32831),v=i(98060),C=i(36412),m=i(47611),g=i(10363),h=i(85794),w=i(71265),_=i(20377),y=i(10603),b=i(80329),L=i(62720),k=i(4747),N=i(24551),S=i(72076),F=i(66687),A=i(91774),x=i(85948),H=i(89802),M=i(46503),V=i(79935),P=i(29723),B=i(93355),I=i(54332),z=i(99006),E=i(34894),R=i(51218),D=i(25971),W=i(28331),Z=i(33101),K=i(11134),T=i(92433),$=i(54028),O=i(31126),j=i(7271),X=i(17635),J=i(68296),U=i(6245),G=i(34196),Q=i(78298),Y=i(49708),q=i(94659),ee=i(15676),te=i(66394),ie=i(201),le=i(2509),ne=i(84237),ae=i(71650),oe=i(80910),re=i(54306),se=i(28640),ce=i(97595),ue=i(11868),de=i(23596),pe=i(78914),fe=i(59079),ve=(i(40708),i(41364),i(65043),i(21777),i(30600)),Ce=i(71906),me=(i(61338),i(12679)),ge=i(16160),he=i(48274),we=i(97896),_e=i(8063),ye=i(42740),be=i(65193),Le=i(47741),ke=i(3507),Ne=i(23610),Se=(i(23020),i(53429),i(9050),i(69257),i(42892)),Fe=i(65842),Ae=(i(18300),i(75105),i(92471),i(16406),i(2508));l.A,n.N,a.A,o.A,r.N,s.A,c.A,u.A,p.A,f.A,v.A,d.N,C.N,m.A,g.A,h.N,w.N,_.A,y.N,b.A,L.A,k.N,N.N,S.N,F.A,A.N,x.A,H.N,M.A,pe.N,V.N,P.N,B.N,I.A,z.N,E.N,R.N,D.N,W.A,Z.N,K.N,T.N,$.A,O.A,j.N,X.N,J.A,U.N,G.A,Q.A,Y.N,q.N,ee.N,te.A,ie.N,le.N,ne.A,de.N,ae.A,oe.A,re.N,se.N,ce.N,ue.N,pe.a,fe.N,me.N,ve.N,ge.N,he.N,we.N,_e.N,ye.A,Ce.N,be.N,Le.N,ke.N,Ne.A,Symbol.toStringTag,Se.u,Fe.u,Ae.yw,Symbol.toStringTag},53110:(e,t,i)=>{i.d(t,{F0:()=>p,FZ:()=>r,pe:()=>a});var l=i(33319);const{Axios:n,AxiosError:a,CanceledError:o,isCancel:r,CancelToken:s,VERSION:c,all:u,Cancel:d,isAxiosError:p,spread:f,toFormData:v,AxiosHeaders:C,HttpStatusCode:m,formToJSON:g,getAdapter:h,mergeConfig:w}=l.A}}]);
|