123 |
- /*! For license information please see files-reference-files.js.LICENSE.txt */
- (()=>{"use strict";var e,i,n,r={84214:(e,i,n)=>{var r=n(85471),o=n(53334),s=(n(35384),n(78460)),a=(n(66957),n(63814)),l=n(92457),c=n(85168);n(35810);const d={name:"FileIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var u=n(14486);const p=(0,u.A)(d,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon file-icon",attrs:{"aria-hidden":!t.title||null,"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:"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"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var h=n(11358),f=n(43627),m=n.n(f),g=n(96763);const A=(0,r.pM)({name:"ReferenceFileWidget",components:{FolderIcon:h.A,FileIcon:p},props:{richObject:{type:Object,required:!0},accessible:{type:Boolean,default:!0},interactive:{type:Boolean,default:!0}},data:()=>({previewUrl:null,failedViewer:!1}),computed:{availableViewerHandlers(){var t;return(null===(t=window)||void 0===t||null===(t=t.OCA)||void 0===t||null===(t=t.Viewer)||void 0===t?void 0:t.availableHandlers)||[]},viewerHandler(){return this.availableViewerHandlers.find((t=>t.mimes.includes(this.richObject.mimetype)))},viewerFile(){var t;const e=(0,a.dC)("dav/files/".concat(null===(t=(0,l.HW)())||void 0===t?void 0:t.uid,"/").concat(this.richObject.path)).replace(/\/\/$/,"/");return{filename:this.richObject.path,basename:this.richObject.name,lastmod:new Date(1e3*this.richObject.mtime),size:this.richObject.size,type:"file",mime:this.richObject.mimetype,fileid:this.richObject.id,failed:!1,loaded:!0,davPath:e,source:e}},fileSize(){return window.OC.Util.humanFileSize(this.richObject.size)},fileMtime(){return window.OC.Util.relativeModifiedDate(1e3*this.richObject.mtime)},filePath(){return m().dirname(this.richObject.path)},filePreviewStyle(){return this.previewUrl?{backgroundImage:"url("+this.previewUrl+")"}:{}},filePreviewClass(){return this.previewUrl?"widget-file__image--preview":"widget-file__image--icon"},isFolder(){return"httpd/unix-directory"===this.richObject.mimetype}},mounted(){if(this.richObject["preview-available"]){const t=(0,a.Jv)("/core/preview?fileId={fileId}&x=250&y=250",{fileId:this.richObject.id}),e=new Image;e.onload=()=>{this.previewUrl=t},e.onerror=t=>{g.error("could not load recommendation preview",t)},e.src=t}},methods:{navigate(t){var e,i;if(this.isFolder)t.stopPropagation(),t.preventDefault(),this.openFilePicker();else if(-1!==(null===(e=window)||void 0===e||null===(e=e.OCA)||void 0===e||null===(e=e.Viewer)||void 0===e?void 0:e.mimetypes.indexOf(this.richObject.mimetype))&&(null===(i=window)||void 0===i||null===(i=i.OCA)||void 0===i||null===(i=i.Viewer)||void 0===i||!i.file)){var n;t.stopPropagation(),t.preventDefault(),null===(n=window)||void 0===n||null===(n=n.OCA)||void 0===n||null===(n=n.Viewer)||void 0===n||n.open({path:this.richObject.path})}},openFilePicker(){(0,c.a1)(t("settings","Your files")).allowDirectories(!0).setMultiSelect(!1).addButton({id:"open",label:this.t("settings","Open in files"),callback(t){t[0]&&window.open((0,a.Jv)("/f/{fileid}",{fileid:t[0].fileid}))},type:"primary"}).disableNavigation().startAt(this.richObject.path).build().pick()}}});var v=n(85072),w=n.n(v),b=n(97825),y=n.n(b),C=n(77659),x=n.n(C),_=n(55056),N=n.n(_),E=n(10540),O=n.n(E),P=n(41113),k=n.n(P),j=n(71699),F={};F.styleTagTransform=k(),F.setAttributes=N(),F.insert=x().bind(null,"head"),F.domAPI=y(),F.insertStyleElement=O(),w()(j.A,F),j.A&&j.A.locals&&j.A.locals;const D=(0,u.A)(A,(function(){var t=this,e=t._self._c;return t._self._setupProxy,t.accessible?t.interactive&&t.viewerHandler&&!t.failedViewer?e(t.viewerHandler.component,t._b({tag:"component",staticClass:"widget-file widget-file--interactive",attrs:{active:!1,"can-swipe":!1,"can-zoom":!1,"is-embedded":!0,"file-list":[t.viewerFile],"is-full-screen":!1,"is-sidebar-shown":!1},on:{error:function(e){t.failedViewer=!0}}},"component",t.viewerFile,!1)):e("a",{staticClass:"widget-file widget-file--link",attrs:{href:t.richObject.link,target:"_blank"},on:{click:t.navigate}},[e("span",{staticClass:"widget-file__image",class:t.filePreviewClass,style:t.filePreviewStyle},[t.previewUrl?t._e():[t.isFolder?e("FolderIcon",{attrs:{size:88,"fill-color":"var(--color-primary-element)"}}):e("FileIcon",{attrs:{size:88}})]],2),t._v(" "),e("span",{staticClass:"widget-file__details"},[e("p",{staticClass:"widget-file__title"},[t._v(t._s(t.richObject.name))]),t._v(" "),e("p",{staticClass:"widget-file__description"},[t._v(t._s(t.fileSize)),e("br"),t._v(t._s(t.fileMtime))]),t._v(" "),e("p",{staticClass:"widget-file__link"},[t._v(t._s(t.filePath))])])]):e("div",{staticClass:"widget-file widget-file--no-access"},[e("span",{staticClass:"widget-file__image widget-file__image--icon"},[t.isFolder?e("FolderIcon",{attrs:{size:88}}):e("FileIcon",{attrs:{size:88}})],1),t._v(" "),e("span",{staticClass:"widget-file__details"},[e("p",{staticClass:"widget-file__title"},[t._v("\n\t\t\t"+t._s(t.t("files","File cannot be accessed"))+"\n\t\t")]),t._v(" "),e("p",{staticClass:"widget-file__description"},[t._v("\n\t\t\t"+t._s(t.t("files","The file could not be found or you do not have permissions to view it. Ask the sender to share it."))+"\n\t\t")])])])}),[],!1,null,"182c70c3",null).exports;var $=n(91110);const T=(0,r.pM)({name:"FileReferencePickerElement",components:{FilePicker:$.FilePickerVue},props:{providerId:{type:String,required:!0},accessible:{type:Boolean,default:!1}},computed:{containerId:()=>"filepicker-".concat(Math.random().toString(36).slice(7)),filepickerOptions(){return{allowPickDirectory:!1,buttons:this.buttonFactory,container:"#".concat(this.containerId),multiselect:!1,name:(0,o.Tl)("files","Select file or folder to link to")}}},methods:{t:o.Tl,buttonFactory(t){const e=[];return 0===t.length?e.push({label:(0,o.Tl)("files","Choose file"),type:"tertiary",callback:this.onClose}):e.push({label:(0,o.Tl)("files","Choose {file}",{file:t[0].basename}),type:"primary",callback:this.onClose}),e},onClose(t){void 0===t||0===t.length?this.$emit("cancel"):this.onSubmit(t[0])},onSubmit(t){const e=new URL(window.location.href);e.pathname=(0,a.Jv)("/f/{fileId}",{fileId:t.fileid}),e.search="",this.$emit("submit",e.href)}}}),S=(0,u.A)(T,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",{attrs:{id:t.containerId}},[e("FilePicker",t._b({on:{close:t.onClose}},"FilePicker",t.filepickerOptions,!1))],1)}),[],!1,null,null,null).exports;r.Ay.mixin({methods:{t:o.Tl}}),(0,s.r)("file",((t,e)=>{let{richObjectType:i,richObject:n,accessible:o,interactive:s}=e;new(r.Ay.extend(D))({propsData:{richObjectType:i,richObject:n,accessible:o,interactive:s}}).$mount(t)}),(()=>{}),{hasInteractiveView:!0}),(0,s.b)("files",((t,e)=>{let{providerId:i,accessible:n}=e;const o=new(r.Ay.extend(S))({propsData:{providerId:i,accessible:n}}).$mount(t);return new s.N(o.$el,o)}),((t,e)=>{e.object.$destroy()}))},71699:(t,e,i)=>{i.d(e,{A:()=>a});var n=i(71354),r=i.n(n),o=i(76314),s=i.n(o)()(r());s.push([t.id,".widget-file[data-v-182c70c3]{display:flex;flex-grow:1;color:var(--color-main-text) !important;text-decoration:none !important;padding:0 !important}.widget-file__image[data-v-182c70c3]{width:30%;min-width:160px;max-width:320px;background-position:center;background-size:cover;background-repeat:no-repeat}.widget-file__image--icon[data-v-182c70c3]{min-width:88px;max-width:88px;padding:12px;padding-right:0;display:flex;align-items:center;justify-content:center}.widget-file__title[data-v-182c70c3]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:bold}.widget-file__details[data-v-182c70c3]{padding:12px;flex-grow:1;display:flex;flex-direction:column}.widget-file__details p[data-v-182c70c3]{margin:0;padding:0}.widget-file__description[data-v-182c70c3]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical}.widget-file--link[data-v-182c70c3]{color:var(--color-text-maxcontrast)}.widget-file--interactive[data-v-182c70c3]{position:relative;height:400px;max-height:50vh;margin:0}","",{version:3,sources:["webpack://./apps/files/src/views/ReferenceFileWidget.vue"],names:[],mappings:"AACA,8BACC,YAAA,CACA,WAAA,CACA,uCAAA,CACA,+BAAA,CACA,oBAAA,CAEA,qCACC,SAAA,CACA,eAAA,CACA,eAAA,CACA,0BAAA,CACA,qBAAA,CACA,2BAAA,CAEA,2CACC,cAAA,CACA,cAAA,CACA,YAAA,CACA,eAAA,CACA,YAAA,CACA,kBAAA,CACA,sBAAA,CAIF,qCACC,eAAA,CACA,sBAAA,CACA,kBAAA,CACA,gBAAA,CAGD,uCACC,YAAA,CACA,WAAA,CACA,YAAA,CACA,qBAAA,CAEA,yCACC,QAAA,CACA,SAAA,CAIF,2CACC,eAAA,CACA,sBAAA,CACA,mBAAA,CACA,oBAAA,CACA,YAAA,CACA,2BAAA,CAID,oCACC,mCAAA,CAGD,2CACC,iBAAA,CACA,YAAA,CACA,eAAA,CACA,QAAA",sourcesContent:["\n.widget-file {\n\tdisplay: flex;\n\tflex-grow: 1;\n\tcolor: var(--color-main-text) !important;\n\ttext-decoration: none !important;\n\tpadding: 0 !important;\n\n\t&__image {\n\t\twidth: 30%;\n\t\tmin-width: 160px;\n\t\tmax-width: 320px;\n\t\tbackground-position: center;\n\t\tbackground-size: cover;\n\t\tbackground-repeat: no-repeat;\n\n\t\t&--icon {\n\t\t\tmin-width: 88px;\n\t\t\tmax-width: 88px;\n\t\t\tpadding: 12px;\n\t\t\tpadding-right: 0;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t}\n\t}\n\n\t&__title {\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t\tfont-weight: bold;\n\t}\n\n\t&__details {\n\t\tpadding: 12px;\n\t\tflex-grow: 1;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\tp {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t}\n\n\t&__description {\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\tdisplay: -webkit-box;\n\t\t-webkit-line-clamp: 3;\n\t\tline-clamp: 3;\n\t\t-webkit-box-orient: vertical;\n\t}\n\n\t// No preview, standard link to ressource\n\t&--link {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&--interactive {\n\t\tposition: relative;\n\t\theight: 400px;\n\t\tmax-height: 50vh;\n\t\tmargin: 0;\n\t}\n}\n"],sourceRoot:""}]);const a=s},91110:(t,e,i)=>{i.d(e,{FilePickerVue:()=>n});const n=(0,i(85471).$V)((()=>Promise.all([i.e(4208),i.e(5455)]).then(i.bind(i,80401))))},35810:(t,e,i)=>{i.d(e,{Al:()=>$,H4:()=>F,PY:()=>j,Q$:()=>D,R3:()=>y,VL:()=>b,lJ:()=>k,pt:()=>C,v7:()=>f});var n,r=i(92457),o=i(53529),s=i(53334),a=i(43627),l=i(71089),c=i(63814),d=i(44719),u=i(36117);null===(n=(0,r.HW)())?(0,o.YK)().setApp("files").build():(0,o.YK)().setApp("files").setUid(n.uid).build();const p=["B","KB","MB","GB","TB","PB"],h=["B","KiB","MiB","GiB","TiB","PiB"];function f(t,e=!1,i=!1,n=!1){i=i&&!n,"string"==typeof t&&(t=Number(t));let r=t>0?Math.floor(Math.log(t)/Math.log(n?1e3:1024)):0;r=Math.min((i?h.length:p.length)-1,r);const o=i?h[r]:p[r];let a=(t/Math.pow(n?1e3:1024,r)).toFixed(1);return!0===e&&0===r?("0.0"!==a?"< 1 ":"0 ")+(i?h[1]:p[1]):(a=r<2?parseFloat(a).toFixed(0):parseFloat(a).toLocaleString((0,s.lO)()),a+" "+o)}var m=(t=>(t[t.NONE=0]="NONE",t[t.CREATE=4]="CREATE",t[t.READ=1]="READ",t[t.UPDATE=2]="UPDATE",t[t.DELETE=8]="DELETE",t[t.SHARE=16]="SHARE",t[t.ALL=31]="ALL",t))(m||{});const g=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],A={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},v=function(){return typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...g]),window._nc_dav_properties.map((t=>`<${t} />`)).join(" ")},w=function(){return typeof window._nc_dav_namespaces>"u"&&(window._nc_dav_namespaces={...A}),Object.keys(window._nc_dav_namespaces).map((t=>`xmlns:${t}="${window._nc_dav_namespaces?.[t]}"`)).join(" ")},b=function(){return`<?xml version="1.0"?>\n\t\t<d:propfind ${w()}>\n\t\t\t<d:prop>\n\t\t\t\t${v()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`},y=function(t){return`<?xml version="1.0" encoding="UTF-8"?>\n<d:searchrequest ${w()}\n\txmlns:ns="https://github.com/icewind1991/SearchDAV/ns">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${v()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${(0,r.HW)()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${t}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`};var C=(t=>(t.Folder="folder",t.File="file",t))(C||{});const x=function(t,e){return null!==t.match(e)},_=(t,e)=>{if(t.id&&"number"!=typeof t.id)throw new Error("Invalid id type of value");if(!t.source)throw new Error("Missing mandatory source");try{new URL(t.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!t.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(t.mtime&&!(t.mtime instanceof Date))throw new Error("Invalid mtime type");if(t.crtime&&!(t.crtime instanceof Date))throw new Error("Invalid crtime type");if(!t.mime||"string"!=typeof t.mime||!t.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in t&&"number"!=typeof t.size&&void 0!==t.size)throw new Error("Invalid size type");if("permissions"in t&&void 0!==t.permissions&&!("number"==typeof t.permissions&&t.permissions>=m.NONE&&t.permissions<=m.ALL))throw new Error("Invalid permissions");if(t.owner&&null!==t.owner&&"string"!=typeof t.owner)throw new Error("Invalid owner type");if(t.attributes&&"object"!=typeof t.attributes)throw new Error("Invalid attributes type");if(t.root&&"string"!=typeof t.root)throw new Error("Invalid root type");if(t.root&&!t.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(t.root&&!t.source.includes(t.root))throw new Error("Root must be part of the source");if(t.root&&x(t.source,e)){const i=t.source.match(e)[0];if(!t.source.includes((0,a.join)(i,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(N).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var N=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(N||{});class E{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;constructor(t,e){_(t,e||this._knownDavService),this._data=t;const i={set:(t,e,i)=>(this.updateMtime(),Reflect.set(t,e,i)),deleteProperty:(t,e)=>(this.updateMtime(),Reflect.deleteProperty(t,e))};this._attributes=new Proxy(t.attributes||{},i),delete this._data.attributes,e&&(this._knownDavService=e)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+(0,l.O0)(this.source.slice(t.length))}get basename(){return(0,a.basename)(this.source)}get extension(){return(0,a.extname)(this.source)}get dirname(){if(this.root){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),i=this.root.replace(/\/$/,"");return(0,a.dirname)(t.slice(e+i.length)||"/")}const t=new URL(this.source);return(0,a.dirname)(t.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}get crtime(){return this._data.crtime}get size(){return this._data.size}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:m.NONE:m.READ}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return x(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,a.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),i=this.root.replace(/\/$/,"");return t.slice(e+i.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id||this.attributes?.fileid}get status(){return this._data?.status}set status(t){this._data.status=t}move(t){_({...this._data,source:t},this._knownDavService),this._data.source=t,this.updateMtime()}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move((0,a.dirname)(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}}class O extends E{get type(){return C.File}}class P extends E{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return C.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const k=`/files/${(0,r.HW)()?.uid}`,j=(0,c.dC)("dav"),F=function(t=j,e={}){const i=(0,d.UU)(t,{headers:e});function n(t){i.setHeaders({...e,"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}return(0,r.zo)(n),n((0,r.do)()),(0,d.Gu)().patch("fetch",((t,e)=>{const i=e.headers;return i?.method&&(e.method=i.method,delete i.method),fetch(t,e)})),i},D=(t,e="/",i=k)=>{const n=new AbortController;return new u.CancelablePromise((async(r,o,s)=>{s((()=>n.abort()));try{r((await t.getDirectoryContents(`${i}${e}`,{signal:n.signal,details:!0,data:`<?xml version="1.0"?>\n\t\t<oc:filter-files ${w()}>\n\t\t\t<d:prop>\n\t\t\t\t${v()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((t=>t.filename!==e)).map((t=>$(t,i))))}catch(t){o(t)}}))},$=function(t,e=k,i=j){const n=(0,r.HW)()?.uid;if(!n)throw new Error("No user id found");const o=t.props,s=function(t=""){let e=m.NONE;return t&&((t.includes("C")||t.includes("K"))&&(e|=m.CREATE),t.includes("G")&&(e|=m.READ),(t.includes("W")||t.includes("N")||t.includes("V"))&&(e|=m.UPDATE),t.includes("D")&&(e|=m.DELETE),t.includes("R")&&(e|=m.SHARE)),e}(o?.permissions),a=(o?.["owner-id"]||n).toString(),l={id:o?.fileid||0,source:`${i}${t.filename}`,mtime:new Date(Date.parse(t.lastmod)),mime:t.mime||"application/octet-stream",size:o?.size||Number.parseInt(o.getcontentlength||"0"),permissions:s,owner:a,root:e,attributes:{...t,...o,hasPreview:o?.["has-preview"]}};return delete l.attributes?.props,"file"===t.type?new O(l):new P(l)};var T={};!function(t){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+i+"$");t.isExist=function(t){return typeof t<"u"},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,i){if(e){const n=Object.keys(e),r=n.length;for(let o=0;o<r;o++)t[n[o]]="strict"===i?[e[n[o]]]:e[n[o]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(t){const e=n.exec(t);return!(null===e||typeof e>"u")},t.getAllMatches=function(t,e){const i=[];let n=e.exec(t);for(;n;){const r=[];r.startIndex=e.lastIndex-n[0].length;const o=n.length;for(let t=0;t<o;t++)r.push(n[t]);i.push(r),n=e.exec(t)}return i},t.nameRegexp=i}(T);new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");var S={};const I={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,i){return t}};S.buildOptions=function(t){return Object.assign({},I,t)},S.defaultOptions=I,!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat),new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");var B={};function R(t,e,i){let n;const r={};for(let o=0;o<t.length;o++){const s=t[o],a=V(s);let l="";if(l=void 0===i?a:i+"."+a,a===e.textNodeName)void 0===n?n=s[a]:n+=""+s[a];else{if(void 0===a)continue;if(s[a]){let t=R(s[a],e,l);const i=z(t,e);s[":@"]?L(t,s[":@"],l,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==r[a]&&r.hasOwnProperty(a)?(Array.isArray(r[a])||(r[a]=[r[a]]),r[a].push(t)):e.isArray(a,l,i)?r[a]=[t]:r[a]=t}}}return"string"==typeof n?n.length>0&&(r[e.textNodeName]=n):void 0!==n&&(r[e.textNodeName]=n),r}function V(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const i=e[t];if(":@"!==i)return i}}function L(t,e,i,n){if(e){const r=Object.keys(e),o=r.length;for(let s=0;s<o;s++){const o=r[s];n.isArray(o,i+"."+o,!0,!0)?t[o]=[e[o]]:t[o]=e[o]}}}function z(t,e){const{textNodeName:i}=e,n=Object.keys(t).length;return!(0!==n&&(1!==n||!t[i]&&"boolean"!=typeof t[i]&&0!==t[i]))}B.prettify=function(t,e){return R(t,e)};const{buildOptions:M}=S,{prettify:U}=B;function H(t,e,i,n){let r="",o=!1;for(let s=0;s<t.length;s++){const a=t[s],l=q(a);if(void 0===l)continue;let c="";if(c=0===i.length?l:`${i}.${l}`,l===e.textNodeName){let t=a[l];G(c,e)||(t=e.tagValueProcessor(l,t),t=Y(t,e)),o&&(r+=n),r+=t,o=!1;continue}if(l===e.cdataPropName){o&&(r+=n),r+=`<![CDATA[${a[l][0][e.textNodeName]}]]>`,o=!1;continue}if(l===e.commentPropName){r+=n+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,o=!0;continue}if("?"===l[0]){const t=W(a[":@"],e),i="?xml"===l?"":n;let s=a[l][0][e.textNodeName];s=0!==s.length?" "+s:"",r+=i+`<${l}${s}${t}?>`,o=!0;continue}let d=n;""!==d&&(d+=e.indentBy);const u=n+`<${l}${W(a[":@"],e)}`,p=H(a[l],e,c,d);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?r+=u+">":r+=u+"/>":p&&0!==p.length||!e.suppressEmptyNode?p&&p.endsWith(">")?r+=u+`>${p}${n}</${l}>`:(r+=u+">",p&&""!==n&&(p.includes("/>")||p.includes("</"))?r+=n+e.indentBy+p+n:r+=p,r+=`</${l}>`):r+=u+"/>",o=!0}return r}function q(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const n=e[i];if(t.hasOwnProperty(n)&&":@"!==n)return n}}function W(t,e){let i="";if(t&&!e.ignoreAttributes)for(let n in t){if(!t.hasOwnProperty(n))continue;let r=e.attributeValueProcessor(n,t[n]);r=Y(r,e),!0===r&&e.suppressBooleanAttributes?i+=` ${n.substr(e.attributeNamePrefix.length)}`:i+=` ${n.substr(e.attributeNamePrefix.length)}="${r}"`}return i}function G(t,e){let i=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+i)return!0;return!1}function Y(t,e){if(t&&t.length>0&&e.processEntities)for(let i=0;i<e.entities.length;i++){const n=e.entities[i];t=t.replace(n.regex,n.val)}return t}const K=function(t,e){let i="";return e.format&&e.indentBy.length>0&&(i="\n"),H(t,e,"",i)},J={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Q(t){this.options=Object.assign({},J,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=tt),this.processTextOrObjNode=Z,this.options.format?(this.indentate=X,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Z(t,e,i){const n=this.j2x(t,i+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,n.attrStr,i):this.buildObjectNode(n.val,e,n.attrStr,i)}function X(t){return this.options.indentBy.repeat(t)}function tt(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}Q.prototype.build=function(t){return this.options.preserveOrder?K(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},Q.prototype.j2x=function(t,e){let i="",n="";for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r))if(typeof t[r]>"u")this.isAttribute(r)&&(n+="");else if(null===t[r])this.isAttribute(r)?n+="":"?"===r[0]?n+=this.indentate(e)+"<"+r+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+r+"/"+this.tagEndChar;else if(t[r]instanceof Date)n+=this.buildTextValNode(t[r],r,"",e);else if("object"!=typeof t[r]){const o=this.isAttribute(r);if(o)i+=this.buildAttrPairStr(o,""+t[r]);else if(r===this.options.textNodeName){let e=this.options.tagValueProcessor(r,""+t[r]);n+=this.replaceEntitiesValue(e)}else n+=this.buildTextValNode(t[r],r,"",e)}else if(Array.isArray(t[r])){const i=t[r].length;let o="";for(let s=0;s<i;s++){const i=t[r][s];typeof i>"u"||(null===i?"?"===r[0]?n+=this.indentate(e)+"<"+r+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+r+"/"+this.tagEndChar:"object"==typeof i?this.options.oneListGroup?o+=this.j2x(i,e+1).val:o+=this.processTextOrObjNode(i,r,e):o+=this.buildTextValNode(i,r,"",e))}this.options.oneListGroup&&(o=this.buildObjectNode(o,r,"",e)),n+=o}else if(this.options.attributesGroupName&&r===this.options.attributesGroupName){const e=Object.keys(t[r]),n=e.length;for(let o=0;o<n;o++)i+=this.buildAttrPairStr(e[o],""+t[r][e[o]])}else n+=this.processTextOrObjNode(t[r],r,e);return{attrStr:i,val:n}},Q.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},Q.prototype.buildObjectNode=function(t,e,i,n){if(""===t)return"?"===e[0]?this.indentate(n)+"<"+e+i+"?"+this.tagEndChar:this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar;{let r="</"+e+this.tagEndChar,o="";return"?"===e[0]&&(o="?",r=""),!i&&""!==i||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===o.length?this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(n)+"<"+e+i+o+this.tagEndChar+t+this.indentate(n)+r:this.indentate(n)+"<"+e+i+o+">"+t+r}},Q.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},Q.prototype.buildTextValNode=function(t,e,i,n){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+i+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(e,t);return r=this.replaceEntitiesValue(r),""===r?this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+i+">"+r+"</"+e+this.tagEndChar}},Q.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const i=this.options.entities[e];t=t.replace(i.regex,i.val)}return t}}},o={};function s(t){var e=o[t];if(void 0!==e)return e.exports;var i=o[t]={id:t,loaded:!1,exports:{}};return r[t].call(i.exports,i,i.exports,s),i.loaded=!0,i.exports}s.m=r,e=[],s.O=(t,i,n,r)=>{if(!i){var o=1/0;for(d=0;d<e.length;d++){i=e[d][0],n=e[d][1],r=e[d][2];for(var a=!0,l=0;l<i.length;l++)(!1&r||o>=r)&&Object.keys(s.O).every((t=>s.O[t](i[l])))?i.splice(l--,1):(a=!1,r<o&&(o=r));if(a){e.splice(d--,1);var c=n();void 0!==c&&(t=c)}}return t}r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[i,n,r]},s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.f={},s.e=t=>Promise.all(Object.keys(s.f).reduce(((e,i)=>(s.f[i](t,e),e)),[])),s.u=t=>t+"-"+t+".js?v="+{1110:"b004475d49f882b902d2",5455:"f307561ce3954558c689"}[t],s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i={},n="nextcloud:",s.l=(t,e,r,o)=>{if(i[t])i[t].push(e);else{var a,l;if(void 0!==r)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==t||u.getAttribute("data-webpack")==n+r){a=u;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",n+r),a.src=t),i[t]=[e];var p=(e,n)=>{a.onerror=a.onload=null,clearTimeout(h);var r=i[t];if(delete i[t],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((t=>t(n))),e)return e(n)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),l&&document.head.appendChild(a)}},s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),s.j=54,(()=>{var t;s.g.importScripts&&(t=s.g.location+"");var e=s.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var i=e.getElementsByTagName("script");if(i.length)for(var n=i.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=i[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=t})(),(()=>{s.b=document.baseURI||self.location.href;var t={54:0,1110:0};s.f.j=(e,i)=>{var n=s.o(t,e)?t[e]:void 0;if(0!==n)if(n)i.push(n[2]);else{var r=new Promise(((i,r)=>n=t[e]=[i,r]));i.push(n[2]=r);var o=s.p+s.u(e),a=new Error;s.l(o,(i=>{if(s.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var r=i&&("load"===i.type?"missing":i.type),o=i&&i.target&&i.target.src;a.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",a.name="ChunkLoadError",a.type=r,a.request=o,n[1](a)}}),"chunk-"+e,e)}},s.O.j=e=>0===t[e];var e=(e,i)=>{var n,r,o=i[0],a=i[1],l=i[2],c=0;if(o.some((e=>0!==t[e]))){for(n in a)s.o(a,n)&&(s.m[n]=a[n]);if(l)var d=l(s)}for(e&&e(i);c<o.length;c++)r=o[c],s.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return s.O(d)},i=self.webpackChunknextcloud=self.webpackChunknextcloud||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})(),s.nc=void 0;var a=s.O(void 0,[4208],(()=>s(84214)));a=s.O(a)})();
- //# sourceMappingURL=files-reference-files.js.map?v=49629b6f50ee4118f8d1
|