0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-05-21 05:30:55 +00:00
nextcloud_server/dist/files-init.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

2 lines
449 KiB
JavaScript
Raw Normal View History

(()=>{"use strict";var e,t,s,n={5365:(e,t,s)=>{s.d(t,{a:()=>be,b:()=>de,h:()=>Ee,i:()=>ye,l:()=>ue,n:()=>Le,o:()=>Oe,t:()=>ce});var n=s(85072),i=s.n(n),a=s(97825),o=s.n(a),r=s(77659),l=s.n(r),m=s(55056),d=s.n(m),c=s(10540),g=s.n(c),u=s(41113),f=s.n(u),p=s(6436),h={};h.styleTagTransform=f(),h.setAttributes=d(),h.insert=l().bind(null,"head"),h.domAPI=o(),h.insertStyleElement=g(),i()(p.A,h),p.A&&p.A.locals&&p.A.locals;var w=s(82680),v=s(85471),b=s(21777),y=s(35810),k=s(71225),T=s(43627),x=s(87485),C=s(65043);class L extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}}const S=Object.freeze({pending:Symbol("pending"),canceled:Symbol("canceled"),resolved:Symbol("resolved"),rejected:Symbol("rejected")});class U{static fn(e){return(...t)=>new U(((s,n,i)=>{t.push(i),e(...t).then(s,n)}))}#e=[];#t=!0;#s=S.pending;#n;#i;constructor(e){this.#n=new Promise(((t,s)=>{this.#i=s;const n=e=>{if(this.#s!==S.pending)throw new Error(`The \`onCancel\` handler was attached after the promise ${this.#s.description}.`);this.#e.push(e)};Object.defineProperties(n,{shouldReject:{get:()=>this.#t,set:e=>{this.#t=e}}}),e((e=>{this.#s===S.canceled&&n.shouldReject||(t(e),this.#a(S.resolved))}),(e=>{this.#s===S.canceled&&n.shouldReject||(s(e),this.#a(S.rejected))}),n)}))}then(e,t){return this.#n.then(e,t)}catch(e){return this.#n.catch(e)}finally(e){return this.#n.finally(e)}cancel(e){if(this.#s===S.pending){if(this.#a(S.canceled),this.#e.length>0)try{for(const e of this.#e)e()}catch(e){return void this.#i(e)}this.#t&&this.#i(new L(e))}}get isCanceled(){return this.#s===S.canceled}#a(e){this.#s===S.pending&&(this.#s=e)}}Object.setPrototypeOf(U.prototype,Promise.prototype);var A=s(9052);class N extends Error{constructor(e){super(e),this.name="TimeoutError"}}class _ extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const E=e=>void 0===globalThis.DOMException?new _(e):new DOMException(e),F=e=>{const t=void 0===e.reason?E("This operation was aborted."):e.reason;return t instanceof Error?t:E(t)};class P{#o=[];enqueue(e,t){const s={priority:(t={priority:0,...t}).priority,id:t.id,run:e};if(0===this.size||this.#o[this.size-1].priority>=t.priority)return void this.#o.push(s);const n=function(e,t){let s=0,n=e.length;for(;n>0;){const a=Math.trunc(n/2);let o=s+a;i=e[o],t.priority-i.priority<=0?(s=++o,n-=a+1):n=a}var i;return s}(this.#o,s);this.#o.splice(n,0,s)}setPriority(e,t){const s=this.#o.findIndex((t=>t.id===e));if(-1===s)throw new ReferenceError(`No promise function with the id "${e}" exists in the queue.`);const[n]=this.#o.splice(s,1);this.enqueue(n.run,{priority:t,id:e})}dequeue(){const e=this.#o.shift();return e?.run}filter(e){return this.#o.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this.#o.length}}class I extends A{#r;#l;#m=0;#d;#c;#g=0;#u;#f;#o;#p;#h=0;#w;#v;#b;#y=1n;timeout;constructor(e){if(super(),!("number"==typeof(e={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:P,...e}).intervalCap&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??""}\` (${typeof e.interval})`);this.#r=e.carryoverConcurrencyCount,this.#l=e.intervalCap===Number.POSITIVE_INFINITY||0===e.interval,this.#d=e.intervalCap,this.#c=e.interval,this.#o=new e.queueClass,this.#p=e.queueClass,this.concurrency=e.concurrency,this.timeout=e.timeout,this.#b=!0===e.throwOnTimeout,this.#v=!1===e.autoStart}get#k(){return this.#l||this.#m<this.#d}get#T(){return this.#h<this.#w}#x(){this.#h--,this.#C(),this.emit("next")}#L(){this.#S(),this.#U(),this.#f=void 0}get#A(){const e=Date.now();if(void 0===this.#u){const t=this.#g-e;if(!(t<0))return void 0===this.#f&&(this.#f=setTimeout((()=>{this.#L()}),t)),!0;this.#m=this.#r?thi
//# sourceMappingURL=files-init.js.map?v=28b04ac044f071851e3d