Files
nextcloud-server-mirror/dist/externalStorageUtils-mlnj1LcU.chunk.mjs
2026-10-07 08:58:40 +00:00

12 lines
39 KiB
JavaScript

import{p as Y}from"./index-D6fZh9CR.chunk.mjs";import{o as _r}from"./star-outline-BpDZzOb8.chunk.mjs";import{g as Tr,i as Ht,e as zr,m as Wr,h as Qt,j as Cr}from"./livePhotoUtils-CVUhgL4S.chunk.mjs";import"./translations-pLZlvQeM.chunk.mjs";const Vt=Object.freeze({Folder:"folder",File:"file"}),yt=Object.freeze({NONE:0,READ:1,UPDATE:2,CREATE:4,WRITE:4,DELETE:8,SHARE:16,ALL:31}),Gr=Object.freeze({NEW:"new",FAILED:"failed",LOADING:"loading",LOCKED:"locked"});function Ir(t,e){return t.match(e)!==null}function H(t,e){if(t.id&&typeof t.id!="number"&&typeof t.id!="string")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.root)throw new Error("Missing mandatory root");if(typeof t.root!="string")throw new Error("Invalid root type");if(!t.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(!t.source.includes(t.root))throw new Error("Root must be part of the source");if(Ir(t.source,e)){const i=t.source.match(e)[0];if(!t.source.includes(Cr(i,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.displayname&&typeof t.displayname!="string")throw new Error("Invalid displayname type");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||typeof t.mime!="string"||!t.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in t&&typeof t.size!="number"&&t.size!==void 0)throw new Error("Invalid size type");if("permissions"in t&&t.permissions!==void 0&&!(typeof t.permissions=="number"&&t.permissions>=yt.NONE&&t.permissions<=yt.ALL))throw new Error("Invalid permissions");if(t.owner&&t.owner!==null&&typeof t.owner!="string")throw new Error("Invalid owner type");if(t.attributes&&typeof t.attributes!="object")throw new Error("Invalid attributes type");if(t.status&&!Object.values(Gr).includes(t.status))throw new Error("Status must be a valid NodeStatus")}function $r(t){t.mtime&&typeof t.mtime=="string"&&!isNaN(Date.parse(t.mtime))&&JSON.stringify(new Date(t.mtime))===JSON.stringify(t.mtime)&&(t.mtime=new Date(t.mtime)),t.crtime&&typeof t.crtime=="string"&&!isNaN(Date.parse(t.crtime))&&JSON.stringify(new Date(t.crtime))===JSON.stringify(t.crtime)&&(t.crtime=new Date(t.crtime))}function Jr(t){if(t instanceof RegExp)return t;const e=t.match(/(\/?)(.+)\1([a-z]*)/i);if(!e)throw new Error("Invalid regular expression format.");const i=Array.from(new Set(e[3])).filter(u=>"gimsuy".includes(u)).join("");return new RegExp(e[2],i)}class lt{_attributes;_data;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(lt.prototype)).filter(e=>typeof e[1].get=="function"&&e[0]!=="__proto__").map(e=>e[0]);handler={set:(e,i,u)=>this.readonlyAttributes.includes(i)?!1:Reflect.set(e,i,u),deleteProperty:(e,i)=>this.readonlyAttributes.includes(i)?!1:Reflect.deleteProperty(e,i)};constructor(...[e,i]){e.mime||(e.mime="application/octet-stream"),$r(e),i=Jr(i||this._knownDavService),H(e,i),this._data={...e,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(e.attributes??{}),i&&(this._knownDavService=i)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:e}=new URL(this.source);return e+Ht(this.source.slice(e.length))}get basename(){return zr(this.source)}get displayname(){return this._data.displayname||this.basename}set displayname(e){H({...this._data,displayname:e},this._knownDavService),this._data.displayname=e}get extension(){return Wr(this.source)}get dirname(){return Qt(this.path)}get mime(){return this._data.mime||"application/octet-stream"}set mime(e){e??="application/octet-stream",H({...this._data,mime:e},this._knownDavService),this._data.mime=e}get mtime(){return this._data.mtime}set mtime(e){H({...this._data,mtime:e},this._knownDavService),this._data.mtime=e}get crtime(){return this._data.crtime}get size(){return this._data.size}set size(e){H({...this._data,size:e},this._knownDavService),this.updateMtime(),this._data.size=e}get attributes(){return this._attributes}get permissions(){return this.owner===null&&!this.isDavResource?yt.READ:this._data.permissions!==void 0?this._data.permissions:yt.NONE}set permissions(e){H({...this._data,permissions:e},this._knownDavService),this.updateMtime(),this._data.permissions=e}get owner(){return this.isDavResource?this._data.owner:null}get isDavResource(){return Ir(this.source,this._knownDavService)}get root(){return this._data.root.replace(/^(.+)\/$/,"$1")}get path(){const e=this.source.indexOf("://"),i=this.source.slice(0,e),u=this.source.slice(e+3),f=u.indexOf("/"),g=u.slice(0,f),s=u.slice(f),a=`${i}://${g}${Ht(s)}`,y=new URL(a);let h=decodeURIComponent(y.pathname);this.isDavResource&&(h=h.split(this._knownDavService).pop());const p=h.indexOf(this.root),b=this.root.replace(/\/$/,"");return h.slice(p+b.length)||"/"}get fileid(){return typeof this._data?.id=="number"?this._data.id:void 0}get id(){if(!(typeof this._data?.id>"u"||typeof this._data.id=="number"&&this._data.id<0))return String(this._data.id)}get status(){return this._data?.status}set status(e){H({...this._data,status:e},this._knownDavService),this._data.status=e}move(e){H({...this._data,source:e},this._knownDavService);const i=this.basename;this._data.source=e,this.displayname===i&&this.basename!==i&&(this.displayname=this.basename)}rename(e){if(e.includes("/"))throw new Error("Invalid basename");this.move(Qt(this.source)+"/"+e)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}update(e){for(const[i,u]of Object.entries(e))try{u===void 0?delete this.attributes[i]:this.attributes[i]=u}catch(f){if(f instanceof TypeError)continue;throw f}}clone(){return new this.constructor(structuredClone(this._data),this._knownDavService)}toJSON(){return JSON.stringify([structuredClone(this._data),this._knownDavService.toString()])}}class Rn extends lt{constructor(...[e,i]){super(e,i)}get type(){return Vt.File}}class kn extends lt{constructor(...[e,i]){super({...e,mime:"httpd/unix-directory"},i)}get type(){return Vt.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}window._nc_files_scope??={},window._nc_files_scope.v4_0??={};const Un=window._nc_files_scope.v4_0,Mn=Tr().setApp("@nextcloud/files").detectUser().build();var ht={exports:{}},Xt;function Lr(){return Xt||(Xt=1,typeof Object.create=="function"?ht.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:ht.exports=function(t,e){if(e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}}),ht.exports}var te={},ee={},re,ne;function xr(){return ne||(ne=1,re=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),i=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var u=42;t[e]=u;for(var f in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var g=Object.getOwnPropertySymbols(t);if(g.length!==1||g[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,e);if(s.value!==u||s.enumerable!==!0)return!1}return!0}),re}var bt,oe;function gt(){if(oe)return bt;oe=1;var t=xr();return bt=function(){return t()&&!!Symbol.toStringTag},bt}var ie,ae;function Fr(){return ae||(ae=1,ie=Object),ie}var ue,ce;function Vr(){return ce||(ce=1,ue=Error),ue}var se,fe;function qr(){return fe||(fe=1,se=EvalError),se}var pe,ye;function Zr(){return ye||(ye=1,pe=RangeError),pe}var le,ge;function Kr(){return ge||(ge=1,le=ReferenceError),le}var me,he;function Dr(){return he||(he=1,me=SyntaxError),me}var be,ve;function at(){return ve||(ve=1,be=TypeError),be}var de,we;function Yr(){return we||(we=1,de=URIError),de}var Ae,Se;function Hr(){return Se||(Se=1,Ae=Math.abs),Ae}var Oe,je;function Qr(){return je||(je=1,Oe=Math.floor),Oe}var Ee,Pe;function Xr(){return Pe||(Pe=1,Ee=Math.max),Ee}var _e,Ie;function tn(){return Ie||(Ie=1,_e=Math.min),_e}var xe,Fe;function en(){return Fe||(Fe=1,xe=Math.pow),xe}var De,Re;function rn(){return Re||(Re=1,De=Math.round),De}var ke,Ue;function nn(){return Ue||(Ue=1,ke=Number.isNaN||function(t){return t!==t}),ke}var vt,Me;function on(){if(Me)return vt;Me=1;var t=nn();return vt=function(e){return t(e)||e===0?e:e<0?-1:1},vt}var Be,Ne;function an(){return Ne||(Ne=1,Be=Object.getOwnPropertyDescriptor),Be}var dt,Te;function ot(){if(Te)return dt;Te=1;var t=an();if(t)try{t([],"length")}catch{t=null}return dt=t,dt}var wt,ze;function mt(){if(ze)return wt;ze=1;var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return wt=t,wt}var At,We;function un(){if(We)return At;We=1;var t=typeof Symbol<"u"&&Symbol,e=xr();return At=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},At}var Ce,Ge;function Rr(){return Ge||(Ge=1,Ce=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Ce}var St,$e;function kr(){if($e)return St;$e=1;var t=Fr();return St=t.getPrototypeOf||null,St}var Ot,Je;function cn(){if(Je)return Ot;Je=1;var t="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,i=Math.max,u="[object Function]",f=function(a,y){for(var h=[],p=0;p<a.length;p+=1)h[p]=a[p];for(var b=0;b<y.length;b+=1)h[b+a.length]=y[b];return h},g=function(a,y){for(var h=[],p=y,b=0;p<a.length;p+=1,b+=1)h[b]=a[p];return h},s=function(a,y){for(var h="",p=0;p<a.length;p+=1)h+=a[p],p+1<a.length&&(h+=y);return h};return Ot=function(a){var y=this;if(typeof y!="function"||e.apply(y)!==u)throw new TypeError(t+y);for(var h=g(arguments,1),p,b=function(){if(this instanceof p){var A=y.apply(this,f(h,arguments));return Object(A)===A?A:this}return y.apply(a,f(h,arguments))},R=i(0,y.length-h.length),U=[],D=0;D<R;D++)U[D]="$"+D;if(p=Function("binder","return function ("+s(U,",")+"){ return binder.apply(this,arguments); }")(b),y.prototype){var O=function(){};O.prototype=y.prototype,p.prototype=new O,O.prototype=null}return p},Ot}var jt,Le;function ut(){if(Le)return jt;Le=1;var t=cn();return jt=Function.prototype.bind||t,jt}var Ve,qe;function qt(){return qe||(qe=1,Ve=Function.prototype.call),Ve}var Ze,Ke;function Zt(){return Ke||(Ke=1,Ze=Function.prototype.apply),Ze}var Ye,He;function sn(){return He||(He=1,Ye=typeof Reflect<"u"&&Reflect&&Reflect.apply),Ye}var Et,Qe;function Ur(){if(Qe)return Et;Qe=1;var t=ut(),e=Zt(),i=qt(),u=sn();return Et=u||t.call(i,e),Et}var Pt,Xe;function Kt(){if(Xe)return Pt;Xe=1;var t=ut(),e=at(),i=qt(),u=Ur();return Pt=function(f){if(f.length<1||typeof f[0]!="function")throw new e("a function is required");return u(t,i,f)},Pt}var _t,tr;function fn(){if(tr)return _t;tr=1;var t=Kt(),e=ot(),i;try{i=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var u=!!i&&e&&e(Object.prototype,"__proto__"),f=Object,g=f.getPrototypeOf;return _t=u&&typeof u.get=="function"?t([u.get]):typeof g=="function"?function(s){return g(s==null?s:f(s))}:!1,_t}var It,er;function Yt(){if(er)return It;er=1;var t=Rr(),e=kr(),i=fn();return It=t?function(u){return t(u)}:e?function(u){if(!u||typeof u!="object"&&typeof u!="function")throw new TypeError("getProto: not an object");return e(u)}:i?function(u){return i(u)}:null,It}var xt,rr;function Mr(){if(rr)return xt;rr=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,i=ut();return xt=i.call(t,e),xt}var Ft,nr;function Br(){if(nr)return Ft;nr=1;var t,e=Fr(),i=Vr(),u=qr(),f=Zr(),g=Kr(),s=Dr(),a=at(),y=Yr(),h=Hr(),p=Qr(),b=Xr(),R=tn(),U=en(),D=rn(),O=on(),A=Function,E=function(l){try{return A('"use strict"; return ('+l+").constructor;")()}catch{}},v=ot(),_=mt(),Q=function(){throw new a},tt=v?(function(){try{return arguments.callee,Q}catch{try{return v(arguments,"callee").get}catch{return Q}}})():Q,N=un()(),I=Yt(),z=kr(),L=Rr(),W=Zt(),T=qt(),k={},K=typeof Uint8Array>"u"||!I?t:I(Uint8Array),M={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?t:ArrayBuffer,"%ArrayIteratorPrototype%":N&&I?I([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":k,"%AsyncGenerator%":k,"%AsyncGeneratorFunction%":k,"%AsyncIteratorPrototype%":k,"%Atomics%":typeof Atomics>"u"?t:Atomics,"%BigInt%":typeof BigInt>"u"?t:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?t:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":u,"%Float16Array%":typeof Float16Array>"u"?t:Float16Array,"%Float32Array%":typeof Float32Array>"u"?t:Float32Array,"%Float64Array%":typeof Float64Array>"u"?t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?t:FinalizationRegistry,"%Function%":A,"%GeneratorFunction%":k,"%Int8Array%":typeof Int8Array>"u"?t:Int8Array,"%Int16Array%":typeof Int16Array>"u"?t:Int16Array,"%Int32Array%":typeof Int32Array>"u"?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":N&&I?I(I([][Symbol.iterator]())):t,"%JSON%":typeof JSON=="object"?JSON:t,"%Map%":typeof Map>"u"?t:Map,"%MapIteratorPrototype%":typeof Map>"u"||!N||!I?t:I(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":v,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?t:Promise,"%Proxy%":typeof Proxy>"u"?t:Proxy,"%RangeError%":f,"%ReferenceError%":g,"%Reflect%":typeof Reflect>"u"?t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?t:Set,"%SetIteratorPrototype%":typeof Set>"u"||!N||!I?t:I(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":N&&I?I(""[Symbol.iterator]()):t,"%Symbol%":N?Symbol:t,"%SyntaxError%":s,"%ThrowTypeError%":tt,"%TypedArray%":K,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?t:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?t:Uint32Array,"%URIError%":y,"%WeakMap%":typeof WeakMap>"u"?t:WeakMap,"%WeakRef%":typeof WeakRef>"u"?t:WeakRef,"%WeakSet%":typeof WeakSet>"u"?t:WeakSet,"%Function.prototype.call%":T,"%Function.prototype.apply%":W,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":z,"%Math.abs%":h,"%Math.floor%":p,"%Math.max%":b,"%Math.min%":R,"%Math.pow%":U,"%Math.round%":D,"%Math.sign%":O,"%Reflect.getPrototypeOf%":L};if(I)try{null.error}catch(l){var X=I(I(l));M["%Error.prototype%"]=X}var J=function l(d){var m;if(d==="%AsyncFunction%")m=E("async function () {}");else if(d==="%GeneratorFunction%")m=E("function* () {}");else if(d==="%AsyncGeneratorFunction%")m=E("async function* () {}");else if(d==="%AsyncGenerator%"){var j=l("%AsyncGeneratorFunction%");j&&(m=j.prototype)}else if(d==="%AsyncIteratorPrototype%"){var x=l("%AsyncGenerator%");x&&I&&(m=I(x.prototype))}return M[d]=m,m},et={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=ut(),V=Mr(),B=C.call(T,Array.prototype.concat),rt=C.call(W,Array.prototype.splice),q=C.call(T,String.prototype.replace),r=C.call(T,String.prototype.slice),n=C.call(T,RegExp.prototype.exec),c=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,w=/\\(\\)?/g,P=function(l){var d=r(l,0,1),m=r(l,-1);if(d==="%"&&m!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(m==="%"&&d!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var j=[];return q(l,c,function(x,G,F,Z){j[j.length]=F?q(Z,w,"$1"):G||x}),j},S=function(l,d){var m=l,j;if(V(et,m)&&(j=et[m],m="%"+j[0]+"%"),V(M,m)){var x=M[m];if(x===k&&(x=J(m)),typeof x>"u"&&!d)throw new a("intrinsic "+l+" exists, but is not available. Please file an issue!");return{alias:j,name:m,value:x}}throw new s("intrinsic "+l+" does not exist!")};return Ft=function(l,d){if(typeof l!="string"||l.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof d!="boolean")throw new a('"allowMissing" argument must be a boolean');if(n(/^%?[^%]*%?$/,l)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var m=P(l),j=m.length>0?m[0]:"",x=S("%"+j+"%",d),G=x.name,F=x.value,Z=!1,it=x.alias;it&&(j=it[0],rt(m,B([0,1],it)));for(var nt=1,o=!0;nt<m.length;nt+=1){var $=m[nt],st=r($,0,1),ft=r($,-1);if((st==='"'||st==="'"||st==="`"||ft==='"'||ft==="'"||ft==="`")&&st!==ft)throw new s("property names with quotes must have matching quotes");if(($==="constructor"||!o)&&(Z=!0),j+="."+$,G="%"+j+"%",V(M,G))F=M[G];else if(F!=null){if(!($ in F)){if(!d)throw new a("base intrinsic for "+l+" exists, but the property is not available.");return}if(v&&nt+1>=m.length){var pt=v(F,$);o=!!pt,o&&"get"in pt&&!("originalValue"in pt.get)?F=pt.get:F=F[$]}else o=V(F,$),F=F[$];o&&!Z&&(M[G]=F)}}return F},Ft}var Dt,or;function ct(){if(or)return Dt;or=1;var t=Br(),e=Kt(),i=e([t("%String.prototype.indexOf%")]);return Dt=function(u,f){var g=t(u,!!f);return typeof g=="function"&&i(u,".prototype.")>-1?e([g]):g},Dt}var Rt,ir;function pn(){if(ir)return Rt;ir=1;var t=gt()(),e=ct(),i=e("Object.prototype.toString"),u=function(s){return t&&s&&typeof s=="object"&&Symbol.toStringTag in s?!1:i(s)==="[object Arguments]"},f=function(s){return u(s)?!0:s!==null&&typeof s=="object"&&"length"in s&&typeof s.length=="number"&&s.length>=0&&i(s)!=="[object Array]"&&"callee"in s&&i(s.callee)==="[object Function]"},g=(function(){return u(arguments)})();return u.isLegacyArguments=f,Rt=g?u:f,Rt}var kt,ar;function yn(){if(ar)return kt;ar=1;var t=ct(),e=gt()(),i=Mr(),u=ot(),f;if(e){var g=t("RegExp.prototype.exec"),s={},a=function(){throw s},y={toString:a,valueOf:a};typeof Symbol.toPrimitive=="symbol"&&(y[Symbol.toPrimitive]=a),f=function(b){if(!b||typeof b!="object")return!1;var R=u(b,"lastIndex"),U=R&&i(R,"value");if(!U)return!1;try{g(b,y)}catch(D){return D===s}}}else{var h=t("Object.prototype.toString"),p="[object RegExp]";f=function(b){return!b||typeof b!="object"&&typeof b!="function"?!1:h(b)===p}}return kt=f,kt}var Ut,ur;function ln(){if(ur)return Ut;ur=1;var t=ct(),e=yn(),i=t("RegExp.prototype.exec"),u=at();return Ut=function(f){if(!e(f))throw new u("`regex` must be a RegExp");return function(g){return i(f,g)!==null}},Ut}var Mt,cr;function gn(){if(cr)return Mt;cr=1;const t=function*(){}.constructor;return Mt=()=>t,Mt}var Bt,sr;function mn(){if(sr)return Bt;sr=1;var t=ct(),e=ln(),i=e(/^\s*(?:function)?\*/),u=gt()(),f=Yt(),g=t("Object.prototype.toString"),s=t("Function.prototype.toString"),a=gn();return Bt=function(y){if(typeof y!="function")return!1;if(i(s(y)))return!0;if(!u){var h=g(y);return h==="[object GeneratorFunction]"}if(!f)return!1;var p=a();return p&&f(y)===p.prototype},Bt}var Nt,fr;function hn(){if(fr)return Nt;fr=1;var t=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,i,u;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{i=Object.defineProperty({},"length",{get:function(){throw u}}),u={},e(function(){throw 42},null,i)}catch(v){v!==u&&(e=null)}else e=null;var f=/^\s*class\b/,g=function(v){try{var _=t.call(v);return f.test(_)}catch{return!1}},s=function(v){try{return g(v)?!1:(t.call(v),!0)}catch{return!1}},a=Object.prototype.toString,y="[object Object]",h="[object Function]",p="[object GeneratorFunction]",b="[object HTMLAllCollection]",R="[object HTML document.all class]",U="[object HTMLCollection]",D=typeof Symbol=="function"&&!!Symbol.toStringTag,O=!(0 in[,]),A=function(){return!1};if(typeof document=="object"){var E=document.all;a.call(E)===a.call(document.all)&&(A=function(v){if((O||!v)&&(typeof v>"u"||typeof v=="object"))try{var _=a.call(v);return(_===b||_===R||_===U||_===y)&&v("")==null}catch{}return!1})}return Nt=e?function(v){if(A(v))return!0;if(!v||typeof v!="function"&&typeof v!="object")return!1;try{e(v,null,i)}catch(_){if(_!==u)return!1}return!g(v)&&s(v)}:function(v){if(A(v))return!0;if(!v||typeof v!="function"&&typeof v!="object")return!1;if(D)return s(v);if(g(v))return!1;var _=a.call(v);return _!==h&&_!==p&&!/^\[object HTML/.test(_)?!1:s(v)},Nt}var Tt,pr;function bn(){if(pr)return Tt;pr=1;var t=hn(),e=Object.prototype.toString,i=Object.prototype.hasOwnProperty,u=function(a,y,h){for(var p=0,b=a.length;p<b;p++)i.call(a,p)&&(h==null?y(a[p],p,a):y.call(h,a[p],p,a))},f=function(a,y,h){for(var p=0,b=a.length;p<b;p++)h==null?y(a.charAt(p),p,a):y.call(h,a.charAt(p),p,a)},g=function(a,y,h){for(var p in a)i.call(a,p)&&(h==null?y(a[p],p,a):y.call(h,a[p],p,a))};function s(a){return e.call(a)==="[object Array]"}return Tt=function(a,y,h){if(!t(y))throw new TypeError("iterator must be a function");var p;arguments.length>=3&&(p=h),s(a)?u(a,y,p):typeof a=="string"?f(a,y,p):g(a,y,p)},Tt}var yr,lr;function vn(){return lr||(lr=1,yr=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),yr}var zt,gr;function dn(){if(gr)return zt;gr=1;var t=vn(),e=typeof globalThis>"u"?_r:globalThis;return zt=function(){for(var i=[],u=0;u<t.length;u++)typeof e[t[u]]=="function"&&(i[i.length]=t[u]);return i},zt}var mr={exports:{}},Wt,hr;function wn(){if(hr)return Wt;hr=1;var t=mt(),e=Dr(),i=at(),u=ot();return Wt=function(f,g,s){if(!f||typeof f!="object"&&typeof f!="function")throw new i("`obj` must be an object or a function`");if(typeof g!="string"&&typeof g!="symbol")throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new i("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,y=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,b=!!u&&u(f,g);if(t)t(f,g,{configurable:h===null&&b?b.configurable:!h,enumerable:a===null&&b?b.enumerable:!a,value:s,writable:y===null&&b?b.writable:!y});else if(p||!a&&!y&&!h)f[g]=s;else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Wt}var Ct,br;function An(){if(br)return Ct;br=1;var t=mt(),e=function(){return!!t};return e.hasArrayLengthDefineBug=function(){if(!t)return null;try{return t([],"length",{value:1}).length!==1}catch{return!0}},Ct=e,Ct}var Gt,vr;function Sn(){if(vr)return Gt;vr=1;var t=Br(),e=wn(),i=An()(),u=ot(),f=at(),g=t("%Math.floor%");return Gt=function(s,a){if(typeof s!="function")throw new f("`fn` is not a function");if(typeof a!="number"||a<0||a>4294967295||g(a)!==a)throw new f("`length` must be a positive 32-bit integer");var y=arguments.length>2&&!!arguments[2],h=!0,p=!0;if("length"in s&&u){var b=u(s,"length");b&&!b.configurable&&(h=!1),b&&!b.writable&&(p=!1)}return(h||p||!y)&&(i?e(s,"length",a,!0,!0):e(s,"length",a)),s},Gt}var $t,dr;function On(){if(dr)return $t;dr=1;var t=ut(),e=Zt(),i=Ur();return $t=function(){return i(t,e,arguments)},$t}var wr;function jn(){return wr||(wr=1,(function(t){var e=Sn(),i=mt(),u=Kt(),f=On();t.exports=function(g){var s=u(arguments),a=g.length-(arguments.length-1);return e(s,1+(a>0?a:0),!0)},i?i(t.exports,"apply",{value:f}):t.exports.apply=f})(mr)),mr.exports}var Jt,Ar;function Nr(){if(Ar)return Jt;Ar=1;var t=bn(),e=dn(),i=jn(),u=ct(),f=ot(),g=Yt(),s=u("Object.prototype.toString"),a=gt()(),y=typeof globalThis>"u"?_r:globalThis,h=e(),p=u("String.prototype.slice"),b=u("Array.prototype.indexOf",!0)||function(O,A){for(var E=0;E<O.length;E+=1)if(O[E]===A)return E;return-1},R={__proto__:null};a&&f&&g?t(h,function(O){var A=new y[O];if(Symbol.toStringTag in A&&g){var E=g(A),v=f(E,Symbol.toStringTag);if(!v&&E){var _=g(E);v=f(_,Symbol.toStringTag)}R["$"+O]=i(v.get)}}):t(h,function(O){var A=new y[O],E=A.slice||A.set;E&&(R["$"+O]=i(E))});var U=function(O){var A=!1;return t(R,function(E,v){if(!A)try{"$"+E(O)===v&&(A=p(v,1))}catch{}}),A},D=function(O){var A=!1;return t(R,function(E,v){if(!A)try{E(O),A=p(v,1)}catch{}}),A};return Jt=function(O){if(!O||typeof O!="object")return!1;if(!a){var A=p(s(O),8,-1);return b(h,A)>-1?A:A!=="Object"?!1:D(O)}return f?U(O):null},Jt}var Lt,Sr;function En(){if(Sr)return Lt;Sr=1;var t=Nr();return Lt=function(e){return!!t(e)},Lt}var Or;function Pn(){return Or||(Or=1,(function(t){var e=pn(),i=mn(),u=Nr(),f=En();function g(o){return o.call.bind(o)}var s=typeof BigInt<"u",a=typeof Symbol<"u",y=g(Object.prototype.toString),h=g(Number.prototype.valueOf),p=g(String.prototype.valueOf),b=g(Boolean.prototype.valueOf);if(s)var R=g(BigInt.prototype.valueOf);if(a)var U=g(Symbol.prototype.valueOf);function D(o,$){if(typeof o!="object")return!1;try{return $(o),!0}catch{return!1}}t.isArgumentsObject=e,t.isGeneratorFunction=i,t.isTypedArray=f;function O(o){return typeof Promise<"u"&&o instanceof Promise||o!==null&&typeof o=="object"&&typeof o.then=="function"&&typeof o.catch=="function"}t.isPromise=O;function A(o){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(o):f(o)||r(o)}t.isArrayBufferView=A;function E(o){return u(o)==="Uint8Array"}t.isUint8Array=E;function v(o){return u(o)==="Uint8ClampedArray"}t.isUint8ClampedArray=v;function _(o){return u(o)==="Uint16Array"}t.isUint16Array=_;function Q(o){return u(o)==="Uint32Array"}t.isUint32Array=Q;function tt(o){return u(o)==="Int8Array"}t.isInt8Array=tt;function N(o){return u(o)==="Int16Array"}t.isInt16Array=N;function I(o){return u(o)==="Int32Array"}t.isInt32Array=I;function z(o){return u(o)==="Float32Array"}t.isFloat32Array=z;function L(o){return u(o)==="Float64Array"}t.isFloat64Array=L;function W(o){return u(o)==="BigInt64Array"}t.isBigInt64Array=W;function T(o){return u(o)==="BigUint64Array"}t.isBigUint64Array=T;function k(o){return y(o)==="[object Map]"}k.working=typeof Map<"u"&&k(new Map);function K(o){return typeof Map>"u"?!1:k.working?k(o):o instanceof Map}t.isMap=K;function M(o){return y(o)==="[object Set]"}M.working=typeof Set<"u"&&M(new Set);function X(o){return typeof Set>"u"?!1:M.working?M(o):o instanceof Set}t.isSet=X;function J(o){return y(o)==="[object WeakMap]"}J.working=typeof WeakMap<"u"&&J(new WeakMap);function et(o){return typeof WeakMap>"u"?!1:J.working?J(o):o instanceof WeakMap}t.isWeakMap=et;function C(o){return y(o)==="[object WeakSet]"}C.working=typeof WeakSet<"u"&&C(new WeakSet);function V(o){return C(o)}t.isWeakSet=V;function B(o){return y(o)==="[object ArrayBuffer]"}B.working=typeof ArrayBuffer<"u"&&B(new ArrayBuffer);function rt(o){return typeof ArrayBuffer>"u"?!1:B.working?B(o):o instanceof ArrayBuffer}t.isArrayBuffer=rt;function q(o){return y(o)==="[object DataView]"}q.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&q(new DataView(new ArrayBuffer(1),0,1));function r(o){return typeof DataView>"u"?!1:q.working?q(o):o instanceof DataView}t.isDataView=r;var n=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function c(o){return y(o)==="[object SharedArrayBuffer]"}function w(o){return typeof n>"u"?!1:(typeof c.working>"u"&&(c.working=c(new n)),c.working?c(o):o instanceof n)}t.isSharedArrayBuffer=w;function P(o){return y(o)==="[object AsyncFunction]"}t.isAsyncFunction=P;function S(o){return y(o)==="[object Map Iterator]"}t.isMapIterator=S;function l(o){return y(o)==="[object Set Iterator]"}t.isSetIterator=l;function d(o){return y(o)==="[object Generator]"}t.isGeneratorObject=d;function m(o){return y(o)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=m;function j(o){return D(o,h)}t.isNumberObject=j;function x(o){return D(o,p)}t.isStringObject=x;function G(o){return D(o,b)}t.isBooleanObject=G;function F(o){return s&&D(o,R)}t.isBigIntObject=F;function Z(o){return a&&D(o,U)}t.isSymbolObject=Z;function it(o){return j(o)||x(o)||G(o)||F(o)||Z(o)}t.isBoxedPrimitive=it;function nt(o){return typeof Uint8Array<"u"&&(rt(o)||w(o))}t.isAnyArrayBuffer=nt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(o){Object.defineProperty(t,o,{enumerable:!1,value:function(){throw new Error(o+" is not supported in userland")}})})})(ee)),ee}var jr,Er;function _n(){return Er||(Er=1,jr=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}),jr}var Pr;function Bn(){return Pr||(Pr=1,(function(t){var e={},i=Object.getOwnPropertyDescriptors||function(r){for(var n=Object.keys(r),c={},w=0;w<n.length;w++)c[n[w]]=Object.getOwnPropertyDescriptor(r,n[w]);return c},u=/%[sdj%]/g;t.format=function(r){if(!N(r)){for(var n=[],c=0;c<arguments.length;c++)n.push(a(arguments[c]));return n.join(" ")}for(var c=1,w=arguments,P=w.length,S=String(r).replace(u,function(m){if(m==="%%")return"%";if(c>=P)return m;switch(m){case"%s":return String(w[c++]);case"%d":return Number(w[c++]);case"%j":try{return JSON.stringify(w[c++])}catch{return"[Circular]"}default:return m}}),l=w[c];c<P;l=w[++c])_(l)||!W(l)?S+=" "+l:S+=" "+a(l);return S},t.deprecate=function(r,n){if(typeof Y<"u"&&Y.noDeprecation===!0)return r;if(typeof Y>"u")return function(){return t.deprecate(r,n).apply(this,arguments)};var c=!1;function w(){if(!c){if(Y.throwDeprecation)throw new Error(n);Y.traceDeprecation?console.trace(n):console.error(n),c=!0}return r.apply(this,arguments)}return w};var f={},g=/^$/;if(e.NODE_DEBUG){var s=e.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),g=new RegExp("^"+s+"$","i")}t.debuglog=function(r){if(r=r.toUpperCase(),!f[r])if(g.test(r)){var n=Y.pid;f[r]=function(){var c=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,c)}}else f[r]=function(){};return f[r]};function a(r,n){var c={seen:[],stylize:h};return arguments.length>=3&&(c.depth=arguments[2]),arguments.length>=4&&(c.colors=arguments[3]),v(n)?c.showHidden=n:n&&t._extend(c,n),z(c.showHidden)&&(c.showHidden=!1),z(c.depth)&&(c.depth=2),z(c.colors)&&(c.colors=!1),z(c.customInspect)&&(c.customInspect=!0),c.colors&&(c.stylize=y),b(c,r,c.depth)}t.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function y(r,n){var c=a.styles[n];return c?"\x1B["+a.colors[c][0]+"m"+r+"\x1B["+a.colors[c][1]+"m":r}function h(r,n){return r}function p(r){var n={};return r.forEach(function(c,w){n[c]=!0}),n}function b(r,n,c){if(r.customInspect&&n&&K(n.inspect)&&n.inspect!==t.inspect&&!(n.constructor&&n.constructor.prototype===n)){var w=n.inspect(c,r);return N(w)||(w=b(r,w,c)),w}var P=R(r,n);if(P)return P;var S=Object.keys(n),l=p(S);if(r.showHidden&&(S=Object.getOwnPropertyNames(n)),k(n)&&(S.indexOf("message")>=0||S.indexOf("description")>=0))return U(n);if(S.length===0){if(K(n)){var d=n.name?": "+n.name:"";return r.stylize("[Function"+d+"]","special")}if(L(n))return r.stylize(RegExp.prototype.toString.call(n),"regexp");if(T(n))return r.stylize(Date.prototype.toString.call(n),"date");if(k(n))return U(n)}var m="",j=!1,x=["{","}"];if(E(n)&&(j=!0,x=["[","]"]),K(n)){var G=n.name?": "+n.name:"";m=" [Function"+G+"]"}if(L(n)&&(m=" "+RegExp.prototype.toString.call(n)),T(n)&&(m=" "+Date.prototype.toUTCString.call(n)),k(n)&&(m=" "+U(n)),S.length===0&&(!j||n.length==0))return x[0]+m+x[1];if(c<0)return L(n)?r.stylize(RegExp.prototype.toString.call(n),"regexp"):r.stylize("[Object]","special");r.seen.push(n);var F;return j?F=D(r,n,c,l,S):F=S.map(function(Z){return O(r,n,c,l,Z,j)}),r.seen.pop(),A(F,m,x)}function R(r,n){if(z(n))return r.stylize("undefined","undefined");if(N(n)){var c="'"+JSON.stringify(n).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(c,"string")}if(tt(n))return r.stylize(""+n,"number");if(v(n))return r.stylize(""+n,"boolean");if(_(n))return r.stylize("null","null")}function U(r){return"["+Error.prototype.toString.call(r)+"]"}function D(r,n,c,w,P){for(var S=[],l=0,d=n.length;l<d;++l)V(n,String(l))?S.push(O(r,n,c,w,String(l),!0)):S.push("");return P.forEach(function(m){m.match(/^\d+$/)||S.push(O(r,n,c,w,m,!0))}),S}function O(r,n,c,w,P,S){var l,d,m;if(m=Object.getOwnPropertyDescriptor(n,P)||{value:n[P]},m.get?m.set?d=r.stylize("[Getter/Setter]","special"):d=r.stylize("[Getter]","special"):m.set&&(d=r.stylize("[Setter]","special")),V(w,P)||(l="["+P+"]"),d||(r.seen.indexOf(m.value)<0?(_(c)?d=b(r,m.value,null):d=b(r,m.value,c-1),d.indexOf(`
`)>-1&&(S?d=d.split(`
`).map(function(j){return" "+j}).join(`
`).slice(2):d=`
`+d.split(`
`).map(function(j){return" "+j}).join(`
`))):d=r.stylize("[Circular]","special")),z(l)){if(S&&P.match(/^\d+$/))return d;l=JSON.stringify(""+P),l.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(l=l.slice(1,-1),l=r.stylize(l,"name")):(l=l.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),l=r.stylize(l,"string"))}return l+": "+d}function A(r,n,c){var w=r.reduce(function(P,S){return S.indexOf(`
`)>=0,P+S.replace(/\u001b\[\d\d?m/g,"").length+1},0);return w>60?c[0]+(n===""?"":n+`
`)+" "+r.join(`,
`)+" "+c[1]:c[0]+n+" "+r.join(", ")+" "+c[1]}t.types=Pn();function E(r){return Array.isArray(r)}t.isArray=E;function v(r){return typeof r=="boolean"}t.isBoolean=v;function _(r){return r===null}t.isNull=_;function Q(r){return r==null}t.isNullOrUndefined=Q;function tt(r){return typeof r=="number"}t.isNumber=tt;function N(r){return typeof r=="string"}t.isString=N;function I(r){return typeof r=="symbol"}t.isSymbol=I;function z(r){return r===void 0}t.isUndefined=z;function L(r){return W(r)&&X(r)==="[object RegExp]"}t.isRegExp=L,t.types.isRegExp=L;function W(r){return typeof r=="object"&&r!==null}t.isObject=W;function T(r){return W(r)&&X(r)==="[object Date]"}t.isDate=T,t.types.isDate=T;function k(r){return W(r)&&(X(r)==="[object Error]"||r instanceof Error)}t.isError=k,t.types.isNativeError=k;function K(r){return typeof r=="function"}t.isFunction=K;function M(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r>"u"}t.isPrimitive=M,t.isBuffer=_n();function X(r){return Object.prototype.toString.call(r)}function J(r){return r<10?"0"+r.toString(10):r.toString(10)}var et=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(){var r=new Date,n=[J(r.getHours()),J(r.getMinutes()),J(r.getSeconds())].join(":");return[r.getDate(),et[r.getMonth()],n].join(" ")}t.log=function(){console.log("%s - %s",C(),t.format.apply(t,arguments))},t.inherits=Lr(),t._extend=function(r,n){if(!n||!W(n))return r;for(var c=Object.keys(n),w=c.length;w--;)r[c[w]]=n[c[w]];return r};function V(r,n){return Object.prototype.hasOwnProperty.call(r,n)}var B=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;t.promisify=function(r){if(typeof r!="function")throw new TypeError('The "original" argument must be of type Function');if(B&&r[B]){var n=r[B];if(typeof n!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(n,B,{value:n,enumerable:!1,writable:!1,configurable:!0}),n}function n(){for(var c,w,P=new Promise(function(d,m){c=d,w=m}),S=[],l=0;l<arguments.length;l++)S.push(arguments[l]);S.push(function(d,m){d?w(d):c(m)});try{r.apply(this,S)}catch(d){w(d)}return P}return Object.setPrototypeOf(n,Object.getPrototypeOf(r)),B&&Object.defineProperty(n,B,{value:n,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(n,i(r))},t.promisify.custom=B;function rt(r,n){if(!r){var c=new Error("Promise was rejected with a falsy value");c.reason=r,r=c}return n(r)}function q(r){if(typeof r!="function")throw new TypeError('The "original" argument must be of type Function');function n(){for(var c=[],w=0;w<arguments.length;w++)c.push(arguments[w]);var P=c.pop();if(typeof P!="function")throw new TypeError("The last argument must be of type Function");var S=this,l=function(){return P.apply(S,arguments)};r.apply(this,c).then(function(d){Y.nextTick(l.bind(null,null,d))},function(d){Y.nextTick(rt.bind(null,d,l))})}return Object.setPrototypeOf(n,Object.getPrototypeOf(r)),Object.defineProperties(n,i(r)),n}t.callbackify=q})(te)),te}function Nn(t){if(t.type===Vt.File)return!1;const e=t.attributes;return!e.scope||!e.backend?!1:e.scope==="personal"||e.scope==="system"}function Tn(t,e,i){const u=new Set(i.flatMap(f=>Object.keys(f??{})));for(const f of Object.keys(e??{}))u.has(f)||delete t[f]}function zn(t,e){return!t?.length&&!e?.length}export{Vt as F,Gr as N,yt as P,Rn as a,kn as b,zn as c,lt as d,Lr as e,Nn as i,Mn as l,Tn as p,Bn as r,Un as s};
//# sourceMappingURL=externalStorageUtils-mlnj1LcU.chunk.mjs.map