← Back
Editing: index-NjYp13Ld.chunk.mjs
var Fe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function re(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function le(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ne={exports:{}},u=ne.exports={},f,d;function j(){throw new Error("setTimeout has not been defined")}function k(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?f=setTimeout:f=j}catch{f=j}try{typeof clearTimeout=="function"?d=clearTimeout:d=k}catch{d=k}})();function se(r){if(f===setTimeout)return setTimeout(r,0);if((f===j||!f)&&setTimeout)return f=setTimeout,setTimeout(r,0);try{return f(r,0)}catch{try{return f.call(null,r,0)}catch{return f.call(this,r,0)}}}function pe(r){if(d===clearTimeout)return clearTimeout(r);if((d===k||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(r);try{return d(r)}catch{try{return d.call(null,r)}catch{return d.call(this,r)}}}var N=[],g=!1,m,y=-1;function Ie(){!g||!m||(g=!1,m.length?N=m.concat(N):y=-1,N.length&&ie())}function ie(){if(!g){var r=se(Ie);g=!0;for(var e=N.length;e;){for(m=N,N=[];++y<e;)m&&m[y].run();y=-1,e=N.length}m=null,g=!1,pe(r)}}u.nextTick=function(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];N.push(new oe(r,e)),N.length===1&&!g&&se(ie)};function oe(r,e){this.fun=r,this.array=e}oe.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={};function R(){}u.on=R,u.addListener=R,u.once=R,u.off=R,u.removeListener=R,u.removeAllListeners=R,u.emit=R,u.prependListener=R,u.prependOnceListener=R,u.listeners=function(r){return[]},u.binding=function(r){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(r){throw new Error("process.chdir is not supported")},u.umask=function(){return 0};var fe=ne.exports;const de=le(fe);var D,H;function ae(){if(H)return D;H=1;var r={};return D=typeof de=="object"&&r&&r.NODE_DEBUG&&/\bsemver\b/i.test(r.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{},D}var _,W;function Ee(){if(W)return _;W=1;const r="2.0.0",e=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,o=16,h=e-6;return _={MAX_LENGTH:e,MAX_SAFE_COMPONENT_LENGTH:o,MAX_SAFE_BUILD_LENGTH:h,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:r,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},_}var C={exports:{}},z;function Le(){return z||(z=1,(function(r,e){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:h}=Ee(),O=ae();e=r.exports={};const v=e.re=[],I=e.safeRe=[],s=e.src=[],i=e.safeSrc=[],t=e.t={};let E=0;const c="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",h],[c,o]],ue=$=>{for(const[L,w]of p)$=$.split(`${L}*`).join(`${L}{0,${w}}`).split(`${L}+`).join(`${L}{1,${w}}`);return $},a=($,L,w)=>{const V=ue(L),T=E++;O($,T,L),t[$]=T,s[T]=L,i[T]=V,v[T]=new RegExp(L,w?"g":void 0),I[T]=new RegExp(V,w?"g":void 0)};a("NUMERICIDENTIFIER","0|[1-9]\\d*"),a("NUMERICIDENTIFIERLOOSE","\\d+"),a("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${c}*`),a("MAINVERSION",`(${s[t.NUMERICIDENTIFIER]})\\.(${s[t.NUMERICIDENTIFIER]})\\.(${s[t.NUMERICIDENTIFIER]})`),a("MAINVERSIONLOOSE",`(${s[t.NUMERICIDENTIFIERLOOSE]})\\.(${s[t.NUMERICIDENTIFIERLOOSE]})\\.(${s[t.NUMERICIDENTIFIERLOOSE]})`),a("PRERELEASEIDENTIFIER",`(?:${s[t.NONNUMERICIDENTIFIER]}|${s[t.NUMERICIDENTIFIER]})`),a("PRERELEASEIDENTIFIERLOOSE",`(?:${s[t.NONNUMERICIDENTIFIER]}|${s[t.NUMERICIDENTIFIERLOOSE]})`),a("PRERELEASE",`(?:-(${s[t.PRERELEASEIDENTIFIER]}(?:\\.${s[t.PRERELEASEIDENTIFIER]})*))`),a("PRERELEASELOOSE",`(?:-?(${s[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[t.PRERELEASEIDENTIFIERLOOSE]})*))`),a("BUILDIDENTIFIER",`${c}+`),a("BUILD",`(?:\\+(${s[t.BUILDIDENTIFIER]}(?:\\.${s[t.BUILDIDENTIFIER]})*))`),a("FULLPLAIN",`v?${s[t.MAINVERSION]}${s[t.PRERELEASE]}?${s[t.BUILD]}?`),a("FULL",`^${s[t.FULLPLAIN]}$`),a("LOOSEPLAIN",`[v=\\s]*${s[t.MAINVERSIONLOOSE]}${s[t.PRERELEASELOOSE]}?${s[t.BUILD]}?`),a("LOOSE",`^${s[t.LOOSEPLAIN]}$`),a("GTLT","((?:<|>)?=?)"),a("XRANGEIDENTIFIERLOOSE",`${s[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),a("XRANGEIDENTIFIER",`${s[t.NUMERICIDENTIFIER]}|x|X|\\*`),a("XRANGEPLAIN",`[v=\\s]*(${s[t.XRANGEIDENTIFIER]})(?:\\.(${s[t.XRANGEIDENTIFIER]})(?:\\.(${s[t.XRANGEIDENTIFIER]})(?:${s[t.PRERELEASE]})?${s[t.BUILD]}?)?)?`),a("XRANGEPLAINLOOSE",`[v=\\s]*(${s[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[t.XRANGEIDENTIFIERLOOSE]})(?:${s[t.PRERELEASELOOSE]})?${s[t.BUILD]}?)?)?`),a("XRANGE",`^${s[t.GTLT]}\\s*${s[t.XRANGEPLAIN]}$`),a("XRANGELOOSE",`^${s[t.GTLT]}\\s*${s[t.XRANGEPLAINLOOSE]}$`),a("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),a("COERCE",`${s[t.COERCEPLAIN]}(?:$|[^\\d])`),a("COERCEFULL",s[t.COERCEPLAIN]+`(?:${s[t.PRERELEASE]})?(?:${s[t.BUILD]})?(?:$|[^\\d])`),a("COERCERTL",s[t.COERCE],!0),a("COERCERTLFULL",s[t.COERCEFULL],!0),a("LONETILDE","(?:~>?)"),a("TILDETRIM",`(\\s*)${s[t.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",a("TILDE",`^${s[t.LONETILDE]}${s[t.XRANGEPLAIN]}$`),a("TILDELOOSE",`^${s[t.LONETILDE]}${s[t.XRANGEPLAINLOOSE]}$`),a("LONECARET","(?:\\^)"),a("CARETTRIM",`(\\s*)${s[t.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",a("CARET",`^${s[t.LONECARET]}${s[t.XRANGEPLAIN]}$`),a("CARETLOOSE",`^${s[t.LONECARET]}${s[t.XRANGEPLAINLOOSE]}$`),a("COMPARATORLOOSE",`^${s[t.GTLT]}\\s*(${s[t.LOOSEPLAIN]})$|^$`),a("COMPARATOR",`^${s[t.GTLT]}\\s*(${s[t.FULLPLAIN]})$|^$`),a("COMPARATORTRIM",`(\\s*)${s[t.GTLT]}\\s*(${s[t.LOOSEPLAIN]}|${s[t.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",a("HYPHENRANGE",`^\\s*(${s[t.XRANGEPLAIN]})\\s+-\\s+(${s[t.XRANGEPLAIN]})\\s*$`),a("HYPHENRANGELOOSE",`^\\s*(${s[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[t.XRANGEPLAINLOOSE]})\\s*$`),a("STAR","(<|>)?=?\\s*\\*"),a("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),a("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(C,C.exports)),C.exports}var F,K;function Re(){if(K)return F;K=1;const r=Object.freeze({loose:!0}),e=Object.freeze({});return F=n=>n?typeof n!="object"?r:n:e,F}var G,Y;function Ne(){if(Y)return G;Y=1;const r=/^[0-9]+$/,e=(n,o)=>{if(typeof n=="number"&&typeof o=="number")return n===o?0:n<o?-1:1;const h=r.test(n),O=r.test(o);return h&&O&&(n=+n,o=+o),n===o?0:h&&!O?-1:O&&!h?1:n<o?-1:1};return G={compareIdentifiers:e,rcompareIdentifiers:(n,o)=>e(o,n)},G}var M,q;function ce(){if(q)return M;q=1;const r=ae(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:n}=Ee(),{safeRe:o,t:h}=Le(),O=Re(),{compareIdentifiers:v}=Ne();class I{constructor(i,t){if(t=O(t),i instanceof I){if(i.loose===!!t.loose&&i.includePrerelease===!!t.includePrerelease)return i;i=i.version}else if(typeof i!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof i}".`);if(i.length>e)throw new TypeError(`version is longer than ${e} characters`);r("SemVer",i,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const E=i.trim().match(t.loose?o[h.LOOSE]:o[h.FULL]);if(!E)throw new TypeError(`Invalid Version: ${i}`);if(this.raw=i,this.major=+E[1],this.minor=+E[2],this.patch=+E[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");E[4]?this.prerelease=E[4].split(".").map(c=>{if(/^[0-9]+$/.test(c)){const p=+c;if(p>=0&&p<n)return p}return c}):this.prerelease=[],this.build=E[5]?E[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(i){if(r("SemVer.compare",this.version,this.options,i),!(i instanceof I)){if(typeof i=="string"&&i===this.version)return 0;i=new I(i,this.options)}return i.version===this.version?0:this.compareMain(i)||this.comparePre(i)}compareMain(i){return i instanceof I||(i=new I(i,this.options)),this.major<i.major?-1:this.major>i.major?1:this.minor<i.minor?-1:this.minor>i.minor?1:this.patch<i.patch?-1:this.patch>i.patch?1:0}comparePre(i){if(i instanceof I||(i=new I(i,this.options)),this.prerelease.length&&!i.prerelease.length)return-1;if(!this.prerelease.length&&i.prerelease.length)return 1;if(!this.prerelease.length&&!i.prerelease.length)return 0;let t=0;do{const E=this.prerelease[t],c=i.prerelease[t];if(r("prerelease compare",t,E,c),E===void 0&&c===void 0)return 0;if(c===void 0)return 1;if(E===void 0)return-1;if(E!==c)return v(E,c)}while(++t)}compareBuild(i){i instanceof I||(i=new I(i,this.options));let t=0;do{const E=this.build[t],c=i.build[t];if(r("build compare",t,E,c),E===void 0&&c===void 0)return 0;if(c===void 0)return 1;if(E===void 0)return-1;if(E!==c)return v(E,c)}while(++t)}inc(i,t,E){if(i.startsWith("pre")){if(!t&&E===!1)throw new Error("invalid increment argument: identifier is empty");if(t){const c=`-${t}`.match(this.options.loose?o[h.PRERELEASELOOSE]:o[h.PRERELEASE]);if(!c||c[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(i){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,E);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,E);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,E),this.inc("pre",t,E);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,E),this.inc("pre",t,E);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const c=Number(E)?1:0;if(this.prerelease.length===0)this.prerelease=[c];else{let p=this.prerelease.length;for(;--p>=0;)typeof this.prerelease[p]=="number"&&(this.prerelease[p]++,p=-2);if(p===-1){if(t===this.prerelease.join(".")&&E===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(c)}}if(t){let p=[t,c];E===!1&&(p=[t]),v(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=p):this.prerelease=p}break}default:throw new Error(`invalid increment argument: ${i}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return M=I,M}var U,Z;function Oe(){if(Z)return U;Z=1;const r=ce();return U=(e,n)=>new r(e,n).major,U}var me=Oe();const J=re(me);var x,Q;function $e(){if(Q)return x;Q=1;const r=ce();return x=(e,n,o=!1)=>{if(e instanceof r)return e;try{return new r(e,n)}catch(h){if(!o)return null;throw h}},x}var X,ee;function Te(){if(ee)return X;ee=1;const r=$e();return X=(e,n)=>{const o=r(e,n);return o?o.version:null},X}var Ae=Te();const ge=re(Ae);class ve{bus;constructor(e){typeof e.getVersion!="function"||!ge(e.getVersion())?console.warn("Proxying an event bus with an unknown or invalid version"):J(e.getVersion())!==J(this.getVersion())&&console.warn("Proxying an event bus of version "+e.getVersion()+" with "+this.getVersion()),this.bus=e}getVersion(){return"3.3.3"}subscribe(e,n){this.bus.subscribe(e,n)}unsubscribe(e,n){this.bus.unsubscribe(e,n)}emit(e,...n){this.bus.emit(e,...n)}}class we{handlers=new Map;getVersion(){return"3.3.3"}subscribe(e,n){this.handlers.set(e,(this.handlers.get(e)||[]).concat(n))}unsubscribe(e,n){this.handlers.set(e,(this.handlers.get(e)||[]).filter(o=>o!==n))}emit(e,...n){(this.handlers.get(e)||[]).forEach(o=>{try{o(n[0])}catch(h){console.error("could not invoke event listener",h)}})}}let b=null;function B(){return b!==null?b:typeof window>"u"?new Proxy({},{get:()=>()=>console.error("Window not available, EventBus can not be established!")}):(window.OC?._eventBus&&typeof window._nc_event_bus>"u"&&(console.warn("found old event bus instance at OC._eventBus. Update your version!"),window._nc_event_bus=window.OC._eventBus),typeof window?._nc_event_bus<"u"?b=new ve(window._nc_event_bus):b=window._nc_event_bus=new we,b)}function be(r,e){B().subscribe(r,e)}function Ge(r,e){B().unsubscribe(r,e)}function Me(r,...e){B().emit(r,...e)}class P{static GLOBAL_SCOPE_VOLATILE="nextcloud_vol";static GLOBAL_SCOPE_PERSISTENT="nextcloud_per";scope;wrapped;constructor(e,n,o){this.scope=`${o?P.GLOBAL_SCOPE_PERSISTENT:P.GLOBAL_SCOPE_VOLATILE}_${btoa(e)}_`,this.wrapped=n}scopeKey(e){return`${this.scope}${e}`}setItem(e,n){this.wrapped.setItem(this.scopeKey(e),n)}getItem(e){return this.wrapped.getItem(this.scopeKey(e))}removeItem(e){this.wrapped.removeItem(this.scopeKey(e))}clear(){Object.keys(this.wrapped).filter(e=>e.startsWith(this.scope)).map(this.wrapped.removeItem.bind(this.wrapped))}}class Se{appId;persisted=!1;clearedOnLogout=!1;constructor(e){this.appId=e}persist(e=!0){return this.persisted=e,this}clearOnLogout(e=!0){return this.clearedOnLogout=e,this}build(){return new P(this.appId,this.persisted?window.localStorage:window.sessionStorage,!this.clearedOnLogout)}}function ye(r){return new Se(r)}let S;const he=[];function Ue(){return S===void 0&&(S=document.head.dataset.requesttoken??null),S}function xe(r){he.push(r)}be("csrf-token-update",r=>{S=r.token,he.forEach(e=>{try{e(S)}catch(n){console.error("Error updating CSRF token observer",n)}})});ye("public").persist().build();let A;function te(r,e){return r?r.getAttribute(e):null}function Pe(){if(A!==void 0)return A;const r=document?.getElementsByTagName("head")[0];if(!r)return null;const e=te(r,"data-user");return e===null?(A=null,A):(A={uid:e,displayName:te(r,"data-user-displayname"),isAdmin:!!window._oc_isadmin},A)}var l=(r=>(r[r.Debug=0]="Debug",r[r.Info=1]="Info",r[r.Warn=2]="Warn",r[r.Error=3]="Error",r[r.Fatal=4]="Fatal",r))(l||{});class De{context;constructor(e){this.context=e||{}}formatMessage(e,n,o){let h="["+l[n].toUpperCase()+"] ";return o&&o.app&&(h+=o.app+": "),typeof e=="string"?h+e:(h+=`Unexpected ${e.name}`,e.message&&(h+=` "${e.message}"`),n===l.Debug&&e.stack&&(h+=` Stack trace: ${e.stack}`),h)}log(e,n,o){if(!(typeof this.context?.level=="number"&&e<this.context?.level))switch(typeof n=="object"&&o?.error===void 0&&(o.error=n),e){case l.Debug:console.debug(this.formatMessage(n,l.Debug,o),o);break;case l.Info:console.info(this.formatMessage(n,l.Info,o),o);break;case l.Warn:console.warn(this.formatMessage(n,l.Warn,o),o);break;case l.Error:console.error(this.formatMessage(n,l.Error,o),o);break;case l.Fatal:default:console.error(this.formatMessage(n,l.Fatal,o),o);break}}debug(e,n){this.log(l.Debug,e,Object.assign({},this.context,n))}info(e,n){this.log(l.Info,e,Object.assign({},this.context,n))}warn(e,n){this.log(l.Warn,e,Object.assign({},this.context,n))}error(e,n){this.log(l.Error,e,Object.assign({},this.context,n))}fatal(e,n){this.log(l.Fatal,e,Object.assign({},this.context,n))}}function _e(r){return new De(r)}class Ce{context;factory;constructor(e){this.context={},this.factory=e}setApp(e){return this.context.app=e,this}setLogLevel(e){return this.context.level=e,this}setUid(e){return this.context.uid=e,this}detectUser(){const e=Pe();return e!==null&&(this.context.uid=e.uid),this}detectLogLevel(){const e=this,n=()=>{document.readyState==="complete"||document.readyState==="interactive"?(e.context.level=window._oc_config?.loglevel??l.Warn,window._oc_debug&&(e.context.level=l.Debug),document.removeEventListener("readystatechange",n)):document.addEventListener("readystatechange",n)};return n(),this}build(){return this.context.level===void 0&&this.detectLogLevel(),this.factory(this.context)}}function Xe(){return new Ce(_e)}export{Xe as a,re as b,Fe as c,Pe as d,Me as e,Ue as f,ye as g,xe as o,de as p,be as s,Ge as u}; //# sourceMappingURL=index-NjYp13Ld.chunk.mjs.map
Save File
Cancel