PageSourceSearch

https://nextcloud.benjic.xyz/apps/files_pdfviewer/js/files_pdfview…?v=e0be6b70122b1381cb50

js benjic.xyz collected 2026-10-07 19:08:09 UTC 10,787 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkfiles_pdfviewer=self.webpackChunkfiles_pdfviewer||[]).push([["vendors-node_modules_nextcloud_dialogs_dist_chunks__plugin-vue_export-helper_mjs-node_modules-2cea7f"],{7485(e,t,i){i.d(t,{F:()=>s});var r=i(1222);function s(){try{return(0,r.C)("core","capabilities")}catch(e){return console.debug("Could not find capabilities initial state fall back to _oc_capabilities"),"_oc_capabilities"in window?window._oc_capabilities:{}}}},9616(e,t,i){i.d(t,{_:()=>r});const r=(e,t)=>{const i=e.__vccOpts||e;for(const[e,r]of t)i[e]=r;return i}},970(e,t,i){i.d(t,{F:()=>o,P:()=>a,a:()=>m,b:()=>h,c:()=>c,s:()=>n});var r=i(5947),s=i(1225);window._nc_files_scope??={},window._nc_files_scope.v4_0??={};const n=window._nc_files_scope.v4_0,o=((0,r.YK)().setApp("@nextcloud/files").detectUser().build(),Object.freeze({Folder:"folder",File:"file"})),a=Object.freeze({NONE:0,READ:1,UPDATE:2,CREATE:4,WRITE:4,DELETE:8,SHARE:16,ALL:31}),c=Object.freeze({NEW:"new",FAILED:"failed",LOADING:"loading",LOCKED:"locked"});function d(e,t){return null!==e.match(t)}function u(e,t){if(e.id&&"number"!=typeof e.id&&"string"!=typeof e.id)throw new Error("Invalid id type of value");if(!e.source)throw new Error("Missing mandatory source");try{new URL(e.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!e.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(!e.root)throw new Error("Missing mandatory root");if("string"!=typeof e.root)throw new Error("Invalid root type");if(!e.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(!e.source.includes(e.root))throw new Error("Root must be part of the source");if(d(e.source,t)){const i=e.source.match(t)[0];if(!e.source.includes((0,s.fj)(i,e.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(e.displayname&&"string"!=typeof e.displayname)throw new Error("Invalid displayname type");if(e.mtime&&!(e.mtime instanceof Date))throw new Error("Invalid mtime type");if(e.crtime&&!(e.crtime instanceof Date))throw new Error("Invalid crtime type");if(!e.mime||"string"!=typeof e.mime||!e.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in e&&"number"!=typeof e.size&&void 0!==e.size)throw new Error("Invalid size type");if("permissions"in e&&void 0!==e.permissions&&!("number"==typeof e.permissions&&e.permissions>=a.NONE&&e.permissions<=a.ALL))throw new Error("Invalid permissions");if(e.owner&&null!==e.owner&&"string"!=typeof e.owner)throw new Error("Invalid owner type");if(e.attributes&&"object"!=typeof e.attributes)throw new Error("Invalid attributes type");if(e.status&&!Object.values(c).includes(e.status))throw new Error("Status must be a valid NodeStatus")}class l{_attributes;_data;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(l.prototype)).filter((e=>"function"==typeof e[1].get&&"__proto__"!==e[0])).map((e=>e[0]));handler={set:(e,t,i)=>!this.readonlyAttributes.includes(t)&&Reflect.set(e,t,i),deleteProperty:(e,t)=>!this.readonlyAttributes.includes(t)&&Reflect.deleteProperty(e,t)};constructor(...[e,t]){e.mime||(e.mime="application/octet-stream"),function(e){e.mtime&&"string"==typeof e.mtime&&(isNaN(Date.parse(e.mtime))||JSON.stringify(new Date(e.mtime))!==JSON.stringify(e.mtime)||(e.mtime=new Date(e.mtime))),e.crtime&&"string"==typeof e.crtime&&(isNaN(Date.parse(e.crtime))||JSON.stringify(new Date(e.crtime))!==JSON.stringify(e.crtime)||(e.crtime=new Date(e.crtime)))}(e),u(e,t=function(e){if(e instanceof RegExp)return e;const t=e.match(/(\/?)(.+)\1([a-z]*)/i);if(!t)throw new Error("Invalid regular expression format.");const i=Array.from(new Set(t[3])).filter((e=>"gimsuy".includes(e))).join("");return new RegExp(t[2],i)}(t||this._knownDavService)),this._data={...e,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(e.attributes??{}),t&&(this._knownDavService=t)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:e}=new URL(this.source);return e+(0,s.O0)(this.source.slice(e.length))}get basename(){return(0,s.P8)(this.source)}get displayname(){return this._data.displayname||this.basename}set displayname(e){u({...this._data,displayname:e},this._knownDavService),this._data.displayname=e}get extension(){return(0,s.LC)(this.source)}get dirname(){return(0,s.pD)(this.path)}get mime(){return this._data.mime||"application/octet-stream"}set mime(e){e??="application/octet-stream",u({...this._data,mime:e},this._knownDavService),this._data.mime=e}get mtime(){return this._data.mtime}set mtime(e){u({...this._data,mtime:e},this._knownDavService),this._data.mtime=e}get crtime(){return this._data.crtime}get size(){return this._data.size}
1set size(e){u({...this._data,size:e},this._knownDavService),this.updateMtime(),this._data.size=e}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavResource?void 0!==this._data.permissions?this._data.permissions:a.NONE:a.READ}set permissions(e){u({...this._data,permissions:e},this._knownDavService),this.updateMtime(),this._data.permissions=e}get owner(){return this.isDavResource?this._data.owner:null}get isDavResource(){return d(this.source,this._knownDavService)}get root(){return this._data.root.replace(/^(.+)\/$/,"$1")}get path(){const e=this.source.indexOf("://"),t=this.source.slice(0,e),i=this.source.slice(e+3),r=i.indexOf("/"),n=i.slice(0,r),o=i.slice(r),a=`${t}://${n}${(0,s.O0)(o)}`,c=new URL(a);let d=decodeURIComponent(c.pathname);this.isDavResource&&(d=d.split(this._knownDavService).pop());const u=d.indexOf(this.root),l=this.root.replace(/\/$/,"");return d.slice(u+l.length)||"/"}get fileid(){return"number"==typeof this._data?.id?this._data.id:void 0}get id(){if(!(void 0===this._data?.id||"number"==typeof this._data.id&&this._data.id<0))return String(this._data.id)}get status(){return this._data?.status}set status(e){u({...this._data,status:e},this._knownDavService),this._data.status=e}move(e){u({...this._data,source:e},this._knownDavService);const t=this.basename;this._data.source=e,this.displayname===t&&this.basename!==t&&(this.displayname=this.basename)}rename(e){if(e.includes("/"))throw new Error("Invalid basename");this.move((0,s.pD)(this.source)+"/"+e)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}update(e){for(const[t,i]of Object.entries(e))try{void 0===i?delete this.attributes[t]:this.attributes[t]=i}catch(e){if(e instanceof TypeError)continue;throw e}}clone(){return new this.constructor(structuredClone(this._data),this._knownDavService)}toJSON(){return JSON.stringify([structuredClone(this._data),this._knownDavService.toString()])}}class m extends l{constructor(...[e,t]){super(e,t)}get type(){return o.File}}class h extends l{constructor(...[e,t]){super({...e,mime:"httpd/unix-directory"},t)}get type(){return o.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}},1379(e,t,i){i.d(t,{pt:()=>r.F,di:()=>a,nF:()=>o,aX:()=>r.P,v7:()=>l,ur:()=>f,KT:()=>c});var r=i(970),s=(EventTarget,i(7485)),n=i(3334);Object.freeze({DEFAULT:"default",HIDDEN:"hidden"});Object.freeze({UploadFromDevice:0,CreateNew:1,Other:2});const o=Object.freeze({ReservedName:"reserved name",Character:"character",Extension:"extension"});class a extends Error{constructor(e){super(`Invalid ${e.reason} '${e.segment}' in filename '${e.filename}'`,{cause:e})}get filename(){return this.cause.filename}get reason(){return this.cause.reason}get segment(){return this.cause.segment}}function c(e){const t=(0,s.F)().files,i=t.forbidden_filename_characters??["/","\\"];for(const t of i)if(e.includes(t))throw new a({segment:t,reason:o.Character,filename:e});e=e.toLocaleLowerCase();if((t.forbidden_filenames??[".htaccess"]).includes(e))throw new a({filename:e,segment:e,reason:o.ReservedName});const r=e.indexOf(".",1),n=e.substring(0,-1===r?void 0:r);if((t.forbidden_filename_basenames??[]).includes(n))throw new a({filename:e,segment:n,reason:o.ReservedName});const c=t.forbidden_filename_extensions??[];for(const t of c)if(e.length>t.length&&e.endsWith(t))throw new a({segment:t,reason:o.Extension,filename:e})}const d=["B","KB","MB","GB","TB","PB"],u=["B","KiB","MiB","GiB","TiB","PiB"];function l(e,t=!1,i=!1,r=!1){i=i&&!r,"string"==typeof e&&(e=Number(e));let s=e>0?Math.floor(Math.log(e)/Math.log(r?1e3:1024)):0;s=Math.min((i?u.length:d.length)-1,s);const o=i?u[s]:d[s];let a=(e/Math.pow(r?1e3:1024,s)).toFixed(1);return!0===t&&0===s?("0.0"!==a?"< 1 ":"0 ")+(i?u[1]:d[1]):(a=s<2?parseFloat(a).toFixed(0):parseFloat(a).toLocaleString((0,n.lO)()),a+" "+o)}function m(e){return e instanceof Date?e.toISOString():String(e)}const h=Object.freeze({Name:"basename",Modified:"mtime",Size:"size"});function f(e,t={}){const i={sortingMode:h.Name,sortingOrder:"asc",...t};return function(e,t,i){i=i??[];const r=(t=t??[e=>e]).map(((e,t)=>"asc"===(i[t]??"asc")?1:-1)),s=Intl.Collator([(0,n.Z0)(),(0,n.lO)()],{numeric:!0,usage:"sort"});return[...e].sort(((e,i)=>{for(const[n,o]of t.entries()){const t=s.compare(m(o(e)),m(o(i)));if(0!==t)return t*r[n]}return 0}))}(e,[...i.sortFavoritesFirst?[e=>1!==e.attributes?.favorite]:[],...i.sortFoldersFirst?[e=>"folder"!==e.type]:[],...i.sortingMode!==h.Name?[e=>e[i.sortingMode]??e.attributes[i.sortingMode]]:[],e=>
1function(e){const t=e.displayname||e.attributes?.displayname||e.basename||"";return e.type===r.F.Folder?t:t.lastIndexOf(".")>0?t.slice(0,t.lastIndexOf(".")):t}(e),e=>e.basename],[...i.sortFavoritesFirst?["asc"]:[],...i.sortFoldersFirst?["asc"]:[],...i.sortingMode===h.Modified?["asc"===i.sortingOrder?"desc":"asc"]:[],...i.sortingMode!==h.Modified&&i.sortingMode!==h.Name?[i.sortingOrder]:[],i.sortingOrder,i.sortingOrder])}},1225(e,t,i){function r(e){return e?e.split("/").map(encodeURIComponent).join("/"):e}function s(e,t){return e=e.replace(/\\/g,"/").replace(/\/+$/g,"").replace(/.*\//,""),t&&t!==e&&e.endsWith(t)?e.substring(0,e.length-t.length):e}function n(e){const t=(e=e.replaceAll(/\\/g,"/")).split("/");return t.length<=1?".":(t.pop(),1===t.length&&""===t[0]?"/":t.join("/"))}function o(e){const t=s(e),i=t.lastIndexOf(".");return i>0?t.substring(i):""}function a(...e){if(arguments.length<1)return"";const t=e.filter((e=>e.length>0));if(t.length<1)return"";const i=t[t.length-1],r="/"===t[0].charAt(0),s="/"===i.charAt(i.length-1),n=t.reduce(((e,t)=>e.concat(t.split("/"))),[]);let o=!r;const a=n.reduce(((e,t)=>""===t?e:o?(o=!1,e+t):e+"/"+t),"");return s?a+"/":a}i.d(t,{LC:()=>o,O0:()=>r,P8:()=>s,fj:()=>a,pD:()=>n})}}]);
2//# sourceMappingURL=files_pdfviewer-vendors-node_modules_nextcloud_dialogs_dist_chunks__plugin-vue_export-helper_mjs-node_modules-2cea7f.js.map?v=e0be6b70122b1381cb50

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.