2&&void 0!==arguments[2]&&arguments[2],n=this.options;if(this.isWindows){var i=""===t[0]&&""===t[1]&&"?"===t[2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3]),o=""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3]);if(i&&o){var a=t[3],s=e[3];a.toLowerCase()===s.toLowerCase()&&(t[3]=s)}else if(o&&"string"==typeof t[0]){var u=e[3],l=t[0];u.toLowerCase()===l.toLowerCase()&&(e[3]=l,e=e.slice(3))}else if(i&&"string"==typeof e[0]){var c=t[3];c.toLowerCase()===e[0].toLowerCase()&&(e[0]=c,t=t.slice(3))}}var f=this.options.optimizationLevel;(void 0===f?1:f)>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var h=0,d=0,p=t.length,g=e.length;h>> no match, partial?",t,y,e,b),y!==p))}var _=void 0;if("string"==typeof m?(_=v===m,this.debug("string match",m,v,_)):(_=m.test(v),this.debug("pattern match",m,v,_)),!_)return!1}if(h===p&&d===g)return!0;if(h===p)return r;if(d===g)return h===p-1&&""===t[h];throw new Error("wtf?")}},{key:"braceExpand",value:function(){return ue(this.pattern,this.options)}},{key:"parse",value:function(t){var e=this;le(t);var r,n=this.options;if("**"===t)return te;if(""===t)return"";var i=null;(r=t.match(Vt))?i=n.dot?zt:Ht:(r=t.match(Rt))?i=(n.nocase?n.dot?Ft:Mt:n.dot?Lt:It)(r[1]):(r=t.match(Wt))?i=(n.nocase?n.dot?Zt:Gt:n.dot?Xt:Kt)(r):(r=t.match(Dt))?i=n.dot?Ut:Bt:(r=t.match($t))&&(i=qt);for(var o,a,s="",u=!1,l=!1,c=[],f=[],h=!1,d=!1,p="."===t.charAt(0),g=n.dot||p,m=function(t){return"."===t.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)"},v=function(){if(h){switch(h){case"*":s+=ne,u=!0;break;case"?":s+=re,u=!0;break;default:s+="\\"+h}e.debug("clearStateChar %j %j",h,s),h=!1}},y=0;y-1;P--){for(var C=f[P],j=s.slice(0,C.reStart),R=s.slice(C.reStart,C.reEnd-8),I=s.slice(C.reEnd),L=s.slice(C.reEnd-8,C.reEnd)+I,M=j.split(")").length,F=j.split("(").length-M,D=I,B=0;B1&&void 0!==arguments[1]?arguments[1]:this.partial;if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;var r=this.options;this.isWindows&&(t=t.split("\\").join("/"));var n=this.slashSplit(t);this.debug(this.pattern,"split",n);var i=this.set;this.debug(this.pattern,"set",i);var o=n[n.length-1];if(!o)for(var a=n.length-2;!o&&a>=0;a--)o=n[a];for(var s=0;s1&&void 0!==arguments[1]?arguments[1]:"","Invalid response: ").concat(t.status," ").concat(t.statusText));return e.status=t.status,e.response=t,e}function pe(t,e){var r=e.status;if(401===r&&t.digest)return e;if(r>=400)throw de(e);return e}function ge(t,e){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?{data:e,headers:t.headers?Q(t.headers):{},status:t.status,statusText:t.statusText}:e}Ct.Minimatch=he,Ct.escape=function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).windowsPathsNoEscape;return void 0!==e&&e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&")},Ct.unescape=function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).windowsPathsNoEscape;return void 0!==e&&e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")};var me,ve=function(t){return function(){for(var e=[],r=0;r3&&void 0!==arguments[3]?arguments[3]:{},a=ft({url:O(t.remoteURL,x(e)),method:"COPY",headers:{Destination:O(t.remoteURL,x(r))}},t,o);return i=function(e){pe(t,e)},(n=ct(a))&&n.then||(n=Promise.resolve(n)),i?n.then(i):n})),ye=v(5),be=v(421),we=v.n(be);function _e(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:me.Original,n=we().get(t,e);return"array"===r&&!1===Array.isArray(n)?[n]:"object"===r&&Array.isArray(n)?n[0]:n}function Ee(t){return new Promise((function(e){e(function(t){var e=t.multistatus;if(""===e)return{multistatus:{response:[]}};if(!e)throw new Error("Invalid response: No root multistatus found");var r={multistatus:Array.isArray(e)?e[0]:e};return we().set(r,"multistatus.response",Se(r,"multistatus.response",me.Array)),we().set(r,"multistatus.response",we().get(r,"multistatus.response").map((function(t){return function(t){var e=Object.assign({},t);return e.status?we().set(e,"status",Se(e,"status",me.Object)):(we().set(e,"propstat",Se(e,"propstat",me.Object)),we().set(e,"propstat.prop",Se(e,"propstat.prop",me.Object))),e}(t)}))),r}(new ye.XMLParser({removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1}}).parse(t)))}))}function Oe(t,e){var r,n,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=t.getlastmodified,a=void 0===o?null:o,s=t.getcontentlength,u=void 0===s?"0":s,l=t.resourcetype,c=void 0===l?null:l,f=t.getcontenttype,h=void 0===f?null:f,d=t.getetag,p=void 0===d?null:d,g=c&&"object"===xe(c)&&void 0!==c.collection?"directory":"file",m=(r=e,(n=document.createElement("textarea")).innerHTML=r,n.value),v={filename:m,basename:b().basename(m),lastmod:a,size:parseInt(u,10),type:g,etag:"string"==typeof p?p.replace(/"/g,""):null};return"file"===g&&(v.mime=h&&"string"==typeof h?h.split(";")[0]:""),i&&(v.props=t),v}function Ne(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=null;try{t.multistatus.response[0].propstat&&(n=t.multistatus.response[0])}catch(t){}if(!n)throw new Error("Failed getting item stat: bad response");var i,o,a=n.propstat,s=a.prop,u=(o=3,function(t){if(Array.isArray(t))return t}(i=a.status.split(" ",3))||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}}(i,o)||function(t,e){if(t){if("string"==typeof t)return _e(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_e(t,e):void 0}}(i,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=(u[0],u[1]),c=u[2],f=parseInt(l,10);if(f>=400){var h=new Error("Invalid response: ".concat(f," ").concat(c));throw h.status=f,h}return Oe(s,E(e),r)}function Ae(t){switch(t.toString()){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(t,10)}}function Te(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}!function(t){t.Array="array",t.Object="object",t.Original="original"}(me||(me={}));var ke=function(t){return function(){for(var e=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:{},n=r.details,i=void 0!==n&&n,o=ft({url:O(t.remoteURL,x(e)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},t,r);return Te(ct(o),(function(r){return pe(t,r),Te(r.text(),(function(t){return Te(Ee(t),(function(t){var n=Ne(t,e,i);return ge(r,n,i)}))}))}))}));function Pe(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function Ce(t){return function(){for(var e=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:{},n=function(t){if(!t||"/"===t)return[];var e=t,r=[];do{r.push(e),e=b().dirname(e)}while(e&&"/"!==e);return r}(E(e));n.sort((function(t,e){return t.length>e.length?1:e.length>t.length?-1:0}));var i=!1;return function(t,e,r){if("function"==typeof t[Ie]){var n,i,o,a=t[Ie]();if(function t(r){try{for(;!(n=a.next()).done;)if((r=e(n.value))&&r.then){if(!Fe(r))return void r.then(t,o||(o=Le.bind(null,i=new Me,2)));r=r.v}i?Le(i,1,r):i=r}catch(t){Le(i||(i=new Me),2,t)}}(),a.return){var s=function(t){try{n.done||a.return()}catch(t){}return t};if(i&&i.then)return i.then(s,(function(t){throw s(t)}));s()}return i}if(!("length"in t))throw new TypeError("Object is not iterable");for(var u=[],l=0;l2&&void 0!==arguments[2]?arguments[2]:{};if(!0===r.recursive)return $e(t,e,r);var n,i=ft({url:O(t.remoteURL,(n=x(e),n.endsWith("/")?n:n+"/")),method:"MKCOL"},t,r);return Pe(ct(i),(function(e){pe(t,e)}))})),Ve=v(227),He=v.n(Ve);function ze(t){return ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ze(t)}var We=function(t){return function(){for(var e=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:{},n={};if("object"===ze(r.range)&&"number"==typeof r.range.start){var i="bytes=".concat(r.range.start,"-");"number"==typeof r.range.end&&(i="".concat(i).concat(r.range.end)),n.Range=i}var o,a,s=ft({url:O(t.remoteURL,x(e)),method:"GET",headers:n},t,r);return a=function(e){if(pe(t,e),n.Range&&206!==e.status){var i=new Error("Invalid response code for partial request: ".concat(e.status));throw i.status=e.status,i}return r.callback&&setTimeout((function(){r.callback(e)}),0),e.body},(o=ct(s))&&o.then||(o=Promise.resolve(o)),a?o.then(a):o})),Ge=function(){},Ze=function(t){return function(){for(var e=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:{},o=ft({url:O(t.remoteURL,x(e)),method:"DELETE"},t,i);return n=function(e){pe(t,e)},(r=ct(o))&&r.then||(r=Promise.resolve(r)),n?r.then(n):r})),Ke=function(t){return function(){for(var e=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return function(n,i){try{var o=(a=ke(t,e,r),s=function(){return!0},a&&a.then||(a=Promise.resolve(a)),s?a.then(s):a)}catch(t){return i(t)}var a,s;return o&&o.then?o.then(void 0,i):o}(0,(function(t){if(404===t.status)return!1;throw t}))}));function Ye(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}var Je=function(t){return function(){for(var e=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:{},n=ft({url:O(t.remoteURL,x(e),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:r.deep?"infinity":"1"}},t,r);return Ye(ct(n),(function(n){return pe(t,n),Ye(n.text(),(function(i){if(!i)throw new Error("Failed parsing directory contents: Empty response");return Ye(Ee(i),(function(i){var o=S(e),a=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=b().join(e,"/"),a=t.multistatus.response.map((function(t){var e=function(t){try{return t.replace(/^https?:\/\/[^\/]+/,"")}catch(t){throw new d(t,"Failed normalising HREF")}}(t.href);return Oe(t.propstat.prop,"/"===o?decodeURIComponent(E(e)):decodeURIComponent(E(b().relative(o,e))),n)}));return i?a:a.filter((function(t){return t.basename&&("file"===t.type||t.filename!==r.replace(/\/$/,""))}))}(i,S(t.remoteBasePath||t.remotePath),o,r.details,r.includeSelf);return r.glob&&(a=function(t,e){return t.filter((function(t){return jt(t.filename,e,{matchBase:!0})}))}(a,r.glob)),ge(n,a,r.details)}))}))}))}));function Qe(t){return function(){for(var e=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:{},n=ft({url:O(t.remoteURL,x(e)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[ir]},t,r);return er(ct(n),(function(e){return pe(t,e),er(e.text(),(function(t){return ge(e,t,r.details)}))}))}));function er(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}var rr=Qe((function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=ft({url:O(t.remoteURL,x(e)),method:"GET"},t,r);return er(ct(n),(function(e){var n;return pe(t,e),function(t,e){var r=t();return r&&r.then?r.then(e):e()}((function(){return er(e.arrayBuffer(),(function(t){n=t}))}),(function(){return ge(e,n,r.details)}))}))})),nr=Qe((function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.format,i=void 0===n?"binary":n;if("binary"!==i&&"text"!==i)throw new d({info:{code:R.InvalidOutputFormat}},"Invalid output format: ".concat(i));return"text"===i?tr(t,e,r):rr(t,e,r)})),ir=function(t){return t};function or(t){return or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},or(t)}function ar(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function sr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ur(t){return new ye.XMLBuilder({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(lr({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:t}}},"d"))}function lr(t,e){var r=function(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:{},i=ft({url:O(t.remoteURL,x(e)),method:"UNLOCK",headers:{"Lock-Token":r}},t,n);return cr(ct(i),(function(e){if(pe(t,e),204!==e.status&&200!==e.status)throw de(e)}))})),dr=fr((function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.refreshToken,i=r.timeout,o={Accept:"text/plain,application/xml",Timeout:void 0===i?pr:i};n&&(o.If=n);var a=ft({url:O(t.remoteURL,x(e)),method:"LOCK",headers:o,data:ur(t.contactHref)},t,r);return cr(ct(a),(function(e){return pe(t,e),cr(e.text(),(function(t){var r,n=(r=t,new ye.XMLParser({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(r)),i=we().get(n,"prop.lockdiscovery.activelock.locktoken.href"),o=we().get(n,"prop.lockdiscovery.activelock.timeout");if(!i)throw de(e,"No lock token received: ");return{token:i,serverTimeout:o}}))}))})),pr="Infinite, Second-4100000000";function gr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{},r=e.path||"/",n=ft({url:O(t.remoteURL,r),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},t,e);return mr(ct(n),(function(r){return pe(t,r),mr(r.text(),(function(t){return mr(Ee(t),(function(t){var n=function(t){try{var e=(i=t.multistatus.response,1,function(t){if(Array.isArray(t))return t}(i)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(o.push(n.value),1!==o.length);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}}(i)||function(t,e){if(t){if("string"==typeof t)return gr(t,1);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?gr(t,1):void 0}}(i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0].propstat.prop,r=e["quota-used-bytes"],n=e["quota-available-bytes"];return void 0!==r&&void 0!==n?{used:parseInt(r,10),available:Ae(n)}:null}catch(t){}var i;return null}(t);return ge(r,n,e.details)}))}))}))}));function yr(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}var br=function(t){return function(){for(var e=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:{},n=r.details,i=void 0!==n&&n,o=ft({url:O(t.remoteURL,x(e)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":t.headers["Content-Type"]||"application/xml; charset=utf-8"}},t,r);return yr(ct(o),(function(r){return pe(t,r),yr(r.text(),(function(t){return yr(Ee(t),(function(t){var n=function(t,e,r){var n={truncated:!1,results:[]};return n.truncated=t.multistatus.response.some((function(t){var r,n;return"507"===(null===(r=(t.status||(null===(n=t.propstat)||void 0===n?void 0:n.status)).split(" ",3))||void 0===r?void 0:r[1])&&t.href.replace(/\/$/,"").endsWith(x(e).replace(/\/$/,""))})),t.multistatus.response.forEach((function(t){if(void 0!==t.propstat){var e=t.href.split("/").map(decodeURIComponent).join("/");n.results.push(Oe(t.propstat.prop,e,r))}})),n}(t,e,i);return ge(r,n,i)}))}))}))})),wr=function(t){return function(){for(var e=[],r=0;r3&&void 0!==arguments[3]?arguments[3]:{},a=ft({url:O(t.remoteURL,x(e)),method:"MOVE",headers:{Destination:O(t.remoteURL,x(r))}},t,o);return i=function(e){pe(t,e)},(n=ct(a))&&n.then||(n=Promise.resolve(n)),i?n.then(i):n})),_r=v(918),xr=function(t){return function(){for(var e=[],r=0;r3&&void 0!==arguments[3]?arguments[3]:{},i=n.contentLength,o=void 0===i||i,a=n.overwrite,s=void 0===a||a,u={"Content-Type":"application/octet-stream"};!1===o||(u["Content-Length"]="".concat("number"==typeof o?o:function(t){if(nt(t))return t.byteLength;if(it(t))return t.length;if("string"==typeof t)return(0,_r.k)(t);throw new d({info:{code:R.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}(r))),s||(u["If-None-Match"]="*");var l,c,f=ft({url:O(t.remoteURL,x(e)),method:"PUT",headers:u,data:r},t,n);return c=function(e){try{pe(t,e)}catch(t){var r=t;if(412!==r.status||s)throw r;return!1}return!0},(l=ct(f))&&l.then||(l=Promise.resolve(l)),c?l.then(c):l})),Sr="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function Er(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.authType,i=void 0===n?null:n,o=r.remoteBasePath,a=r.contactHref,s=void 0===a?Sr:a,u=r.ha1,l=r.headers,c=void 0===l?{}:l,f=r.httpAgent,h=r.httpsAgent,p=r.password,g=r.token,m=r.username,v=r.withCredentials,y=i;y||(y=m||p?j.Password:j.None);var b,w,_={authType:y,remoteBasePath:o,contactHref:s,ha1:u,headers:Object.assign({},c),httpAgent:f,httpsAgent:h,password:p,remotePath:(b=t,w=new(e())(b).pathname,w.length<=0&&(w="/"),E(w)),remoteURL:t,token:g,username:m,withCredentials:v};return function(t,e,r,n,i){switch(t.authType){case j.Digest:t.digest=function(t,e,r){return{username:t,password:e,ha1:r,nc:0,algorithm:"md5",hasDigestAuth:!1}}(e,r,i);break;case j.None:break;case j.Password:t.headers.Authorization=function(t,e){var r,n=(r="".concat(t,":").concat(e),P().encode(r));return"Basic ".concat(n)}(e,r);break;case j.Token:t.headers.Authorization="".concat((o=n).token_type," ").concat(o.access_token);break;default:throw new d({info:{code:R.InvalidAuthType}},"Invalid auth type: ".concat(t.authType))}var o}(_,m,p,g,u),{copyFile:function(t,e,r){return ve(_,t,e,r)},createDirectory:function(t,e){return qe(_,t,e)},createReadStream:function(t,e){return function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=new(0,He().PassThrough);return We(t,e,r).then((function(t){t.pipe(n)})).catch((function(t){n.emit("error",t)})),n}(_,t,e)},createWriteStream:function(t,e,r){return function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ge,i=new(0,He().PassThrough),o={};!1===r.overwrite&&(o["If-None-Match"]="*");var a=ft({url:O(t.remoteURL,x(e)),method:"PUT",headers:o,data:i,maxRedirects:0},t,r);return ct(a).then((function(e){return pe(t,e)})).then((function(t){setTimeout((function(){n(t)}),0)})).catch((function(t){i.emit("error",t)})),i}(_,t,e,r)},customRequest:function(t,e){return Ze(_,t,e)},deleteFile:function(t,e){return Xe(_,t,e)},exists:function(t,e){return Ke(_,t,e)},getDirectoryContents:function(t,e){return Je(_,t,e)},getFileContents:function(t,e){return nr(_,t,e)},getFileDownloadLink:function(t){return function(t,e){var r=O(t.remoteURL,x(e)),n=/^https:/i.test(r)?"https":"http";switch(t.authType){case j.None:break;case j.Password:var i=C(t.headers.Authorization.replace(/^Basic /i,"").trim());r=r.replace(/^https?:\/\//,"".concat(n,"://").concat(i,"@"));break;default:throw new d({info:{code:R.LinkUnsupportedAuthType}},"Unsupported auth type for file link: ".concat(t.authType))}return r}(_,t)},getFileUploadLink:function(t){return function(t,e){var r="".concat(O(t.remoteURL,x(e)),"?Content-Type=application/octet-stream"),n=/^https:/i.test(r)?"https":"http";switch(t.authType){case j.None:break;case j.Password:var i=C(t.headers.Authorization.replace(/^Basic /i,"").trim());r=r.replace(/^https?:\/\//,"".concat(n,"://").concat(i,"@"));break;default:throw new d({info:{code:R.LinkUnsupportedAuthType}},"Unsupported auth type for file link: ".concat(t.authType))}return r}(_,t)},getHeaders:function(){return Object.assign({},_.headers)},getQuota:function(t){return vr(_,t)},lock:function(t,e){return dr(_,t,e)},moveFile:function(t,e,r){return wr(_,t,e,r)},putFileContents:function(t,e,r){return xr(_,t,e,r)},search:function(t,e){return br(_,t,e)},setHeaders:function(t){_.headers=Object.assign({},t)},stat:function(t,e){return ke(_,t,e)},unlock:function(t,e,r){return hr(_,t,e,r)}}}})();var b=y.eI,w=y.lD,_=r(5635),x=r(9267);const S="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:"undefined"!=typeof window?window:globalThis,E=S.fetch.bind(S);S.Headers,S.Request,S.Response;const O="@@HOTPATCHER",N=()=>{};function A(t){return{original:t,methods:[t],final:!1}}class T{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=O}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(t){this.configuration.getEmptyAction=t}control(t,e=!1){if(!t||t.__type__!==O)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(t.configuration.registry).forEach((r=>{this.configuration.registry.hasOwnProperty(r)?e&&(this.configuration.registry[r]=Object.assign({},t.configuration.registry[r])):this.configuration.registry[r]=Object.assign({},t.configuration.registry[r])})),t._configuration=this.configuration,this}execute(t,...e){return(this.get(t)||N)(...e)}get(t){const e=this.configuration.registry[t];if(!e)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${t}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return function(...t){if(0===t.length)throw new Error("Failed creating sequence: No functions provided");return function(...e){let r=e;const n=this;for(;t.length>0;)r=[t.shift().apply(n,r)];return r[0]}}(...e.methods)}isPatched(t){return!!this.configuration.registry[t]}patch(t,e,r={}){const{chain:n=!1}=r;if(this.configuration.registry[t]&&this.configuration.registry[t].final)throw new Error(`Failed patching '${t}': Method marked as being final`);if("function"!=typeof e)throw new Error(`Failed patching '${t}': Provided method is not a function`);if(n)this.configuration.registry[t]?this.configuration.registry[t].methods.push(e):this.configuration.registry[t]=A(e);else if(this.isPatched(t)){const{original:r}=this.configuration.registry[t];this.configuration.registry[t]=Object.assign(A(e),{original:r})}else this.configuration.registry[t]=A(e);return this}patchInline(t,e,...r){return this.isPatched(t)||this.patch(t,e),this.execute(t,...r)}plugin(t,...e){return e.forEach((e=>{this.patch(t,e,{chain:!0})})),this}restore(t){if(!this.isPatched(t))throw new Error(`Failed restoring method: No method present for key: ${t}`);if("function"!=typeof this.configuration.registry[t].original)throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${t}`);return this.configuration.registry[t].methods=[this.configuration.registry[t].original],this}setFinal(t){if(!this.configuration.registry.hasOwnProperty(t))throw new Error(`Failed marking '${t}' as final: No method found for key`);return this.configuration.registry[t].final=!0,this}}let k=null;function P(){return"boolean"==typeof WEB&&!0===WEB}var C=r(2568);const j="abcdef0123456789";function R(t,e){const r=t.url.replace("//",""),n=-1==r.indexOf("/")?"/":r.slice(r.indexOf("/")),i=t.method?t.method.toUpperCase():"GET",o=!!/(^|,)\s*auth\s*($|,)/.test(e.qop)&&"auth",a=`00000000${e.nc}`.slice(-8),s=function(t,e,r,n,i,o,a){const s=a||C(`${e}:${r}:${n}`);return t&&"md5-sess"===t.toLowerCase()?C(`${s}:${i}:${o}`):s}(e.algorithm,e.username,e.realm,e.password,e.nonce,e.cnonce,e.ha1),u=C(`${i}:${n}`),l=C(o?`${s}:${e.nonce}:${a}:${e.cnonce}:${o}:${u}`:`${s}:${e.nonce}:${u}`),c={username:e.username,realm:e.realm,nonce:e.nonce,uri:n,qop:o,response:l,nc:a,cnonce:e.cnonce,algorithm:e.algorithm,opaque:e.opaque},f=[];for(const t in c)c[t]&&("qop"===t||"nc"===t||"algorithm"===t?f.push(`${t}=${c[t]}`):f.push(`${t}="${c[t]}"`));return`Digest ${f.join(", ")}`}function I(t,e){const r=t.headers&&t.headers.get("www-authenticate")||"";if("digest"!==r.split(/\s/)[0].toLowerCase())return!1;const n=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const t=n.exec(r);if(!t)break;e[t[1]]=t[2]||t[3]}return e.nc+=1,e.cnonce=function(){let t="";for(let e=0;e<32;++e)t=`${t}${j[Math.floor(Math.random()*j.length)]}`;return t}(),!0}function L(t){return function(t){if("object"!=typeof t||null===t||"[object Object]"!=Object.prototype.toString.call(t))return!1;if(null===Object.getPrototypeOf(t))return!0;let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t)?Object.assign({},t):Object.setPrototypeOf(Object.assign({},t),Object.getPrototypeOf(t))}function M(...t){let e=null,r=[...t];for(;r.length>0;){const t=r.shift();e=e?F(e,t):L(t)}return e}function F(t,e){const r=L(t);return Object.keys(e).forEach((t=>{r.hasOwnProperty(t)?Array.isArray(e[t])?r[t]=Array.isArray(r[t])?[...r[t],...e[t]]:[...e[t]]:"object"==typeof e[t]&&e[t]?r[t]="object"==typeof r[t]&&r[t]?F(r[t],e[t]):L(e[t]):r[t]=e[t]:r[t]=e[t]})),r}function D(...t){if(0===t.length)return{};const e={};return t.reduce(((t,r)=>(Object.keys(r).forEach((n=>{const i=n.toLowerCase();e.hasOwnProperty(i)?t[e[i]]=r[n]:(e[i]=n,t[n]=r[n])})),t)),{})}var B=r(2830);const U="function"==typeof ArrayBuffer,{toString:$}=Object.prototype;function q(t){if(!P()&&t instanceof B.Readable)return[t,{}];if("string"==typeof t)return[t,{}];if(null!=(e=t)&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e))return[t,{}];if(function(t){return U&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===$.call(t))}(t))return[t,{}];if(t&&"object"==typeof t)return[JSON.stringify(t),{"content-type":"application/json"}];var e;throw new Error("Unable to convert request body: Unexpected body type: "+typeof t)}function V(t){const e=(k||(k=new T),k);return e.patchInline("request",(t=>e.patchInline("fetch",E,t.url,function(t){let e={};const r={method:t.method};t.headers&&(e=D(e,t.headers));if(void 0!==t.data){const[n,i]=q(t.data);r.body=n,e=D(e,i)}t.signal&&(r.signal=t.signal);t.withCredentials&&(r.credentials="include");P()||(t.httpAgent||t.httpsAgent)&&(r.agent=e=>"http:"===e.protocol?t.httpAgent||new _.Agent:t.httpsAgent||new x.Agent);return r.headers=e,r}(t))),t)}(t=>{null===t?(0,l.IY)().setApp("files").build():(0,l.IY)().setApp("files").setUid(t.uid).build()})((0,u.ts)());const H=["B","KB","MB","GB","TB","PB"],z=["B","KiB","MiB","GiB","TiB","PiB"];function W(t,e=!1,r=!1){"string"==typeof t&&(t=Number(t));let n=t>0?Math.floor(Math.log(t)/Math.log(r?1024:1e3)):0;n=Math.min((r?z.length:H.length)-1,n);const i=r?z[n]:H[n];let o=(t/Math.pow(r?1024:1e3,n)).toFixed(1);return!0===e&&0===n?("0.0"!==o?"< 1 ":"0 ")+(r?z[1]:H[1]):(o=n<2?parseFloat(o).toFixed(0):parseFloat(o).toLocaleString(h()),o+" "+i)}var G=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(G||{});var Z=(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))(Z||{});const X=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","nc:share-attributes","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:share-types","oc:size","ocs:share-permissions"],K={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},Y=function(){return typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...X]),window._nc_dav_properties.map((t=>`<${t} />`)).join(" ")},J=function(){return typeof window._nc_dav_namespaces>"u"&&(window._nc_dav_namespaces={...K}),Object.keys(window._nc_dav_namespaces).map((t=>`xmlns:${t}="${window._nc_dav_namespaces?.[t]}"`)).join(" ")},Q=function(){return`\n\t\t\n\t\t\t\n\t\t\t\t${Y()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`},tt=function(t){return`\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${Y()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${(0,u.ts)()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${t}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`};var et=(t=>(t.Folder="folder",t.File="file",t))(et||{});const rt=function(t,e){return null!==t.match(e)},nt=(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>=Z.NONE&&t.permissions<=Z.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&&rt(t.source,e)){const r=t.source.match(e)[0];if(!t.source.includes((0,d.join)(r,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(it).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var it=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(it||{});class ot{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;constructor(t,e){nt(t,e||this._knownDavService),this._data=t;const r={set:(t,e,r)=>(this.updateMtime(),Reflect.set(t,e,r)),deleteProperty:(t,e)=>(this.updateMtime(),Reflect.deleteProperty(t,e))};this._attributes=new Proxy(t.attributes||{},r),delete this._data.attributes,e&&(this._knownDavService=e)}get source(){return this._data.source.replace(/\/$/i,"")}get basename(){return(0,d.basename)(this.source)}get extension(){return(0,d.extname)(this.source)}get dirname(){if(this.root){const t=this.source.indexOf(this.root);return(0,d.dirname)(this.source.slice(t+this.root.length)||"/")}const t=new URL(this.source);return(0,d.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:Z.NONE:Z.READ}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return rt(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,d.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){const t=this.source.indexOf(this.root);return this.source.slice(t+this.root.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){nt({...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,d.dirname)(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}}class at extends ot{get type(){return et.File}}class st extends ot{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return et.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const ut=`/files/${(0,u.ts)()?.uid}`,lt=(0,c.generateRemoteUrl)("dav"),ct=function(t=lt){const e=b(t,{headers:{requesttoken:(0,u.IH)()||""}});return w().patch("request",(t=>(t.headers?.method&&(t.method=t.headers.method,delete t.headers.method),async function(t){if(!t._digest)return V(t);const e=t._digest;delete t._digest,e.hasDigestAuth&&(t=M(t,{headers:{Authorization:R(t,e)}}));const r=await V(t);if(401==r.status){if(e.hasDigestAuth=I(r,e),e.hasDigestAuth){t=M(t,{headers:{Authorization:R(t,e)}});const r=await V(t);return 401==r.status?e.hasDigestAuth=!1:e.nc++,r}}else e.nc++;return r}(t)))),e},ft=function(t,e=ut,r=lt){const n=t.props,i=function(t=""){let e=Z.NONE;return t&&((t.includes("C")||t.includes("K"))&&(e|=Z.CREATE),t.includes("G")&&(e|=Z.READ),(t.includes("W")||t.includes("N")||t.includes("V"))&&(e|=Z.UPDATE),t.includes("D")&&(e|=Z.DELETE),t.includes("R")&&(e|=Z.SHARE)),e}(n?.permissions),o=(0,u.ts)()?.uid,a={id:n?.fileid||0,source:`${r}${t.filename}`,mtime:new Date(Date.parse(t.lastmod)),mime:t.mime,size:n?.size||Number.parseInt(n.getcontentlength||"0"),permissions:i,owner:o,root:e,attributes:{...t,...n,hasPreview:n?.["has-preview"]}};return delete a.attributes?.props,"file"===t.type?new at(a):new st(a)};var ht={},dt={};!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",r="["+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\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+r+"$");t.isExist=function(t){return typeof t<"u"},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,r){if(e){const n=Object.keys(e),i=n.length;for(let o=0;o"u")},t.getAllMatches=function(t,e){const r=[];let n=e.exec(t);for(;n;){const i=[];i.startIndex=e.lastIndex-n[0].length;const o=n.length;for(let t=0;t5&&"xml"===n)return St("InvalidXml","XML declaration allowed only at the start of the document.",Nt(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}continue}return e}function yt(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let r=1;for(e+=8;e"===t[e]&&(r--,0===r))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e"===t[e+2]){e+=2;break}return e}ht.validate=function(t,e){e=Object.assign({},gt,e);const r=[];let n=!1,i=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let o=0;o"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)u+=t[o];if(u=u.trim(),"/"===u[u.length-1]&&(u=u.substring(0,u.length-1),o--),!Ot(u)){let e;return e=0===u.trim().length?"Invalid space after '<'.":"Tag '"+u+"' is an invalid name.",St("InvalidTag",e,Nt(t,o))}const l=bt(t,o);if(!1===l)return St("InvalidAttr","Attributes for '"+u+"' have open quote.",Nt(t,o));let c=l.value;if(o=l.index,"/"===c[c.length-1]){const r=o-c.length;c=c.substring(0,c.length-1);const i=_t(c,e);if(!0!==i)return St(i.err.code,i.err.msg,Nt(t,r+i.err.line));n=!0}else if(s){if(!l.tagClosed)return St("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",Nt(t,o));if(c.trim().length>0)return St("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",Nt(t,a));{const e=r.pop();if(u!==e.tagName){let r=Nt(t,e.tagStartPos);return St("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+u+"'.",Nt(t,a))}0==r.length&&(i=!0)}}else{const s=_t(c,e);if(!0!==s)return St(s.err.code,s.err.msg,Nt(t,o-c.length+s.err.line));if(!0===i)return St("InvalidXml","Multiple possible root nodes found.",Nt(t,o));-1!==e.unpairedTags.indexOf(u)||r.push({tagName:u,tagStartPos:a}),n=!0}for(o++;o0)||St("InvalidXml","Invalid '"+JSON.stringify(r.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):St("InvalidXml","Start tag expected.",1)};function bt(t,e){let r="",n="",i=!1;for(;e"===t[e]&&""===n){i=!0;break}r+=t[e]}return""===n&&{value:r,index:e,tagClosed:i}}const wt=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function _t(t,e){const r=pt.getAllMatches(t,wt),n={};for(let t=0;t!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t}};Tt.buildOptions=function(t){return Object.assign({},kt,t)},Tt.defaultOptions=kt;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const Pt=dt;"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,Pt.nameRegexp);new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");var Ct={};function jt(t,e,r){let n;const i={};for(let o=0;o0&&(i[e.textNodeName]=n):void 0!==n&&(i[e.textNodeName]=n),i}function Rt(t){const e=Object.keys(t);for(let t=0;t`,o=!1;continue}if(u===e.commentPropName){i+=n+`\x3c!--${s[u][0][e.textNodeName]}--\x3e`,o=!0;continue}if("?"===u[0]){const t=Ut(s[":@"],e),r="?xml"===u?"":n;let a=s[u][0][e.textNodeName];a=0!==a.length?" "+a:"",i+=r+`<${u}${a}${t}?>`,o=!0;continue}let c=n;""!==c&&(c+=e.indentBy);const f=n+`<${u}${Ut(s[":@"],e)}`,h=Dt(s[u],e,l,c);-1!==e.unpairedTags.indexOf(u)?e.suppressUnpairedNode?i+=f+">":i+=f+"/>":h&&0!==h.length||!e.suppressEmptyNode?h&&h.endsWith(">")?i+=f+`>${h}${n}${u}>`:(i+=f+">",h&&""!==n&&(h.includes("/>")||h.includes(""))?i+=n+e.indentBy+h+n:i+=h,i+=`${u}>`):i+=f+"/>",o=!0}return i}function Bt(t){const e=Object.keys(t);for(let t=0;t0&&e.processEntities)for(let r=0;r0&&(r="\n"),Dt(t,e,"",r)};const Ht=Vt,zt={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 Wt(t){this.options=Object.assign({},zt,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Xt),this.processTextOrObjNode=Gt,this.options.format?(this.indentate=Zt,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Gt(t,e,r){const n=this.j2x(t,r+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,n.attrStr,r):this.buildObjectNode(n.val,e,n.attrStr,r)}function Zt(t){return this.options.indentBy.repeat(t)}function Xt(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}Wt.prototype.build=function(t){return this.options.preserveOrder?Ht(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},Wt.prototype.j2x=function(t,e){let r="",n="";for(let i in t)if(typeof t[i]>"u")this.isAttribute(i)&&(n+="");else if(null===t[i])this.isAttribute(i)?n+="":"?"===i[0]?n+=this.indentate(e)+"<"+i+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+i+"/"+this.tagEndChar;else if(t[i]instanceof Date)n+=this.buildTextValNode(t[i],i,"",e);else if("object"!=typeof t[i]){const o=this.isAttribute(i);if(o)r+=this.buildAttrPairStr(o,""+t[i]);else if(i===this.options.textNodeName){let e=this.options.tagValueProcessor(i,""+t[i]);n+=this.replaceEntitiesValue(e)}else n+=this.buildTextValNode(t[i],i,"",e)}else if(Array.isArray(t[i])){const r=t[i].length;let o="";for(let a=0;a"u"||(null===r?"?"===i[0]?n+=this.indentate(e)+"<"+i+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+i+"/"+this.tagEndChar:"object"==typeof r?this.options.oneListGroup?o+=this.j2x(r,e+1).val:o+=this.processTextOrObjNode(r,i,e):o+=this.buildTextValNode(r,i,"",e))}this.options.oneListGroup&&(o=this.buildObjectNode(o,i,"",e)),n+=o}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){const e=Object.keys(t[i]),n=e.length;for(let o=0;o"+t+i}},Wt.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>${t}`,e},Wt.prototype.buildTextValNode=function(t,e,r,n){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(n)+``+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+r+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(e,t);return i=this.replaceEntitiesValue(i),""===i?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+i+""+e+this.tagEndChar}},Wt.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e({__sfc:!0,fileListIconStyles:pe})});var me=(0,s.n)(ge,(function(){var t=this,e=t._self._c,r=t._self._setupProxy;return e("tr",{staticClass:"file-picker__row loading-row",attrs:{"aria-hidden":"true"}},[t.showCheckbox?e("td",{staticClass:"row-checkbox"},[e("span")]):t._e(),e("td",{staticClass:"row-name"},[e("div",{staticClass:"row-wrapper"},[e("span",{class:r.fileListIconStyles["file-picker__file-icon"]}),e("span")])]),t._m(0),t._m(1)])}),[function(){var t=this._self._c;return this._self._setupProxy,t("td",{staticClass:"row-size"},[t("span")])},function(){var t=this._self._c;return this._self._setupProxy,t("td",{staticClass:"row-modified"},[t("span")])}],!1,null,"6aded0d9",null,null);const ve=me.exports,ye={long:(0,Yt.t)("a few seconds ago"),short:(0,Yt.t)("seconds ago"),narrow:(0,Yt.t)("sec. ago")},be=(0,n.defineComponent)({name:"NcDatetime",props:{timestamp:{type:[Date,Number],required:!0},format:{type:Object,default:()=>({timeStyle:"medium",dateStyle:"short"})},relativeTime:{type:[Boolean,String],default:"long",validator:t=>!1===t||["long","short","narrow"].includes(t)},ignoreSeconds:{type:Boolean,default:!1}},data:()=>({currentTime:Date.now(),intervalId:void 0}),computed:{dateObject(){return new Date(this.timestamp)},formattedTime(){if(!1!==this.relativeTime){const t=new Intl.RelativeTimeFormat(h(),{numeric:"auto",style:this.relativeTime}),e=(this.dateObject.valueOf()-this.currentTime)/1e3;if(Math.abs(e)<=90)return this.ignoreSeconds?ye[this.relativeTime]:t.format(Math.round(e),"second");const r=e/60;if(Math.abs(r)<=90)return t.format(Math.round(r),"minute");const n=r/60;if(Math.abs(n)<=72)return t.format(Math.round(n),"hour");const i=n/24;if(Math.abs(i)<=6)return t.format(Math.round(i),"day");const o=i/7;return Math.abs(o)<=52?t.format(Math.round(o),"week"):t.format(Math.round(i/365),"year")}return this.formattedFullTime},formattedFullTime(){return new Intl.DateTimeFormat(h(),this.format).format(this.dateObject)}},watch:{relativeTime(t){window.clearInterval(this.intervalId),this.intervalId=void 0,t&&(this.intervalId=window.setInterval(this.setCurrentTime,1e3))}},mounted(){!1!==this.relativeTime&&(this.intervalId=window.setInterval(this.setCurrentTime,1e3))},destroyed(){window.clearInterval(this.intervalId)},methods:{setCurrentTime(){this.currentTime=Date.now()}}});var we=(0,s.n)(be,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("span",{staticClass:"nc-datetime",attrs:{"data-timestamp":t.timestamp,title:t.formattedFullTime}},[t._v(t._s(t.formattedTime))])}),[],!1,null,null,null,null);const _e=we.exports,xe=(0,n.defineComponent)({__name:"FileListRow",props:{allowPickDirectory:{type:Boolean},selected:{type:Boolean},showCheckbox:{type:Boolean},canPick:{type:Boolean},node:null},emits:["update:selected","enter-directory"],setup(t,{emit:e}){const r=t,i=(0,n.computed)((()=>{var t;return(null==(t=r.node.attributes)?void 0:t.displayName)||r.node.basename.slice(0,r.node.extension?-r.node.extension.length:void 0)})),o=(0,n.computed)((()=>r.node.extension)),a=(0,n.computed)((()=>r.node.type===et.Folder)),s=(0,n.computed)((()=>r.canPick&&(r.allowPickDirectory||!a.value))),u=(0,n.computed)((()=>"url(".concat(window.OC.MimeType.getIconUrl(r.node.mime),")")));function l(){e("update:selected",!r.selected)}function c(){a.value?e("enter-directory",r.node):l()}return{__sfc:!0,props:r,emit:e,displayName:i,fileExtension:o,isDirectory:a,isPickable:s,backgroundImage:u,toggleSelected:l,handleClick:c,handleKeyDown:function(t){"Enter"===t.key&&c()},formatFileSize:W,NcCheckboxRadioSwitch:Kt.rw,t:Yt.t,NcDatetime:_e,fileListIconStyles:pe}}});var Se=(0,s.n)(xe,(function(){var t=this,e=t._self._c,r=t._self._setupProxy;return e("tr",t._g({class:["file-picker__row",{"file-picker__row--selected":t.selected&&!t.showCheckbox}],attrs:{tabindex:t.showCheckbox&&!r.isDirectory?void 0:0,"aria-selected":r.isPickable?t.selected:void 0,"data-filename":t.node.basename,"data-testid":"file-list-row"},on:{click:r.handleClick}},!t.showCheckbox||r.isDirectory?{keydown:r.handleKeyDown}:{}),[t.showCheckbox?e("td",{staticClass:"row-checkbox"},[e(r.NcCheckboxRadioSwitch,{attrs:{disabled:!r.isPickable,checked:t.selected,"aria-label":r.t("Select the row for {nodename}",{nodename:r.displayName}),"data-testid":"row-checkbox"},on:{click:function(t){t.stopPropagation()},"update:checked":r.toggleSelected}})],1):t._e(),e("td",{staticClass:"row-name"},[e("div",{staticClass:"file-picker__name-container",attrs:{"data-testid":"row-name"}},[e("div",{class:r.fileListIconStyles["file-picker__file-icon"],style:{backgroundImage:r.backgroundImage}}),e("div",{staticClass:"file-picker__file-name",attrs:{title:r.displayName},domProps:{textContent:t._s(r.displayName)}}),e("div",{staticClass:"file-picker__file-extension",domProps:{textContent:t._s(r.fileExtension)}})])]),e("td",{staticClass:"row-size"},[t._v(" "+t._s(r.formatFileSize(t.node.size||0))+" ")]),e("td",{staticClass:"row-modified"},[t.node.mtime?e(r.NcDatetime,{attrs:{timestamp:t.node.mtime,"ignore-seconds":!0}}):e("span",[t._v(t._s(r.t("Unset")))])],1)])}),[],!1,null,"3987593d",null,null);const Ee=Se.exports,Oe=(0,n.defineComponent)({__name:"FileList",props:{multiselect:{type:Boolean},allowPickDirectory:{type:Boolean},loading:{type:Boolean},files:null,selectedFiles:null,path:null},emits:["update:path","update:selectedFiles"],setup(t,{emit:e}){const r=t,i=(0,n.ref)("ascending"),o=(0,n.ref)(void 0),a=(0,n.ref)(void 0),s={ascending:(t,e,r)=>r(t,e),descending:(t,e,r)=>r(e,t),none:(t,e,r)=>0},u=(t,e)=>{var r,n;return((null==(r=t.attributes)?void 0:r.displayName)||t.basename).localeCompare((null==(n=e.attributes)?void 0:n.displayName)||e.basename,h())},l=(t,e)=>(e.size||0)-(t.size||0),c=(t,e)=>{var r,n;return((null==(r=t.mtime)?void 0:r.getTime())||0)-((null==(n=e.mtime)?void 0:n.getTime())||0)},f=t=>{const e=t.value;a.value=o.value=i.value=void 0,t.value="ascending"===e?"descending":"ascending"},p=(0,n.computed)((()=>[...r.files].sort(((t,e)=>(e.type===et.Folder?1:0)-(t.type===et.Folder?1:0)||s[i.value||"none"](t,e,u)||s[o.value||"none"](t,e,l)||s[a.value||"none"](t,e,c))))),g=(0,n.computed)((()=>r.files.filter((t=>r.allowPickDirectory||t.type!==et.Folder)))),m=(0,n.computed)((()=>!r.loading&&r.selectedFiles.length>0&&r.selectedFiles.length>=g.value.length));const v=(0,n.ref)(4),y=(0,n.ref)();{const t=()=>(0,n.nextTick)((()=>{var t,e,r,n,i;const o=(null==(e=null==(t=y.value)?void 0:t.parentElement)?void 0:e.children)||[];let a=(null==(n=null==(r=y.value)?void 0:r.parentElement)?void 0:n.clientHeight)||450;for(let t=0;t{window.addEventListener("resize",t),t()})),(0,n.onUnmounted)((()=>{window.removeEventListener("resize",t)}))}return{__sfc:!0,props:r,emit:e,sortByName:i,sortBySize:o,sortByModified:a,ordering:s,byName:u,bySize:l,byDate:c,toggleSorting:f,toggleSortByName:()=>f(i),toggleSortBySize:()=>f(o),toggleSortByModified:()=>f(a),sortedFiles:p,selectableFiles:g,allSelected:m,onSelectAll:function(){r.selectedFiles.lengthe.path!==t.path))):r.multiselect?e("update:selectedFiles",[...r.selectedFiles,t]):e("update:selectedFiles",[t])},onChangeDirectory:function(t){e("update:path",(0,d.join)(r.path,t.basename))},skeletonNumber:v,fileContainer:y,NcButton:Kt.P2,NcCheckboxRadioSwitch:Kt.rw,t:Yt.t,IconSortAscending:Qt,IconSortDescending:ee,LoadingTableRow:ve,FileListRow:Ee}}});var Ne=(0,s.n)(Oe,(function(){var t=this,e=t._self._c,r=t._self._setupProxy;return e("div",{ref:"fileContainer",staticClass:"file-picker__files"},[e("table",[e("thead",[e("tr",[t.multiselect?e("th",{staticClass:"row-checkbox"},[e("span",{staticClass:"hidden-visually"},[t._v(" "+t._s(r.t("Select entry"))+" ")]),t.multiselect?e(r.NcCheckboxRadioSwitch,{attrs:{"aria-label":r.t("Select all entries"),checked:r.allSelected,"data-testid":"select-all-checkbox"},on:{"update:checked":r.onSelectAll}}):t._e()],1):t._e(),e("th",{staticClass:"row-name",attrs:{"aria-sort":r.sortByName}},[e("div",{staticClass:"header-wrapper"},[e("span",{staticClass:"file-picker__header-preview"}),e(r.NcButton,{attrs:{wide:!0,type:"tertiary","data-test":"file-picker_sort-name"},on:{click:r.toggleSortByName},scopedSlots:t._u([{key:"icon",fn:function(){return["ascending"===r.sortByName?e(r.IconSortAscending,{attrs:{size:20}}):"descending"===r.sortByName?e(r.IconSortDescending,{attrs:{size:20}}):e("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[t._v(" "+t._s(r.t("Name"))+" ")])],1)]),e("th",{staticClass:"row-size",attrs:{"aria-sort":r.sortBySize}},[e(r.NcButton,{attrs:{wide:!0,type:"tertiary"},on:{click:r.toggleSortBySize},scopedSlots:t._u([{key:"icon",fn:function(){return["ascending"===r.sortBySize?e(r.IconSortAscending,{attrs:{size:20}}):"descending"===r.sortBySize?e(r.IconSortDescending,{attrs:{size:20}}):e("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[t._v(" "+t._s(r.t("Size"))+" ")])],1),e("th",{staticClass:"row-modified",attrs:{"aria-sort":r.sortByModified}},[e(r.NcButton,{attrs:{wide:!0,type:"tertiary"},on:{click:r.toggleSortByModified},scopedSlots:t._u([{key:"icon",fn:function(){return["ascending"===r.sortByModified?e(r.IconSortAscending,{attrs:{size:20}}):"descending"===r.sortByModified?e(r.IconSortDescending,{attrs:{size:20}}):e("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[t._v(" "+t._s(r.t("Modified"))+" ")])],1)])]),e("tbody",[t.loading?t._l(r.skeletonNumber,(function(n){return e(r.LoadingTableRow,{key:n,attrs:{"show-checkbox":t.multiselect}})})):t._l(r.sortedFiles,(function(n){return e(r.FileListRow,{key:n.fileid||n.path,attrs:{"allow-pick-directory":t.allowPickDirectory,"show-checkbox":t.multiselect,"can-pick":t.multiselect||0===t.selectedFiles.length||t.selectedFiles.includes(n),selected:t.selectedFiles.includes(n),node:n},on:{"update:selected":function(t){return r.onNodeSelected(n)},"enter-directory":r.onChangeDirectory}})}))],2)])])}),[],!1,null,"0fbc158c",null,null);const Ae=Ne.exports,Te=(0,n.defineComponent)({__name:"FilePickerBreadcrumbs",props:{path:null,showMenu:{type:Boolean}},emits:["update:path","create-node"],setup(t,{emit:e}){const r=t,i=(0,n.ref)(""),o=(0,n.ref)();function a(){var t,e,r,n;const a=i.value.trim(),s=null==(e=null==(t=o.value)?void 0:t.$el)?void 0:e.querySelector("input");let u="";return 0===a.length?u=(0,Yt.t)("File name cannot be empty."):a.includes("/")?u=(0,Yt.t)('"/" is not allowed inside a file name.'):["..","."].includes(a)?u=(0,Yt.t)('"{name}" is an invalid file name.',{name:a}):null!=(r=window.OC.config)&&r.blacklist_files_regex&&a.match(null==(n=window.OC.config)?void 0:n.blacklist_files_regex)&&(u=(0,Yt.t)('"{name}" is not an allowed filetype',{name:a})),s&&s.setCustomValidity(u),""===u}const s=(0,n.computed)((()=>r.path.split("/").filter((t=>""!==t)).map(((t,e,r)=>({name:t,path:"/"+r.slice(0,e+1).join("/")})))));return{__sfc:!0,props:r,emit:e,newNodeName:i,nameInput:o,validateInput:a,onSubmit:function(){const t=i.value.trim();a()&&(e("create-node",t),i.value="")},pathElements:s,IconFolder:re.default,IconHome:ie,IconPlus:ae,NcActions:Kt.O3,NcActionInput:Kt.Iw,NcBreadcrumbs:Kt.fg,NcBreadcrumb:Kt.$U,t:Yt.t}}});var ke=(0,s.n)(Te,(function(){var t=this,e=t._self._c,r=t._self._setupProxy;return e(r.NcBreadcrumbs,{staticClass:"file-picker__breadcrumbs",scopedSlots:t._u([{key:"default",fn:function(){return[e(r.NcBreadcrumb,{attrs:{name:r.t("Home"),title:r.t("Home")},on:{click:function(t){return r.emit("update:path","/")}},scopedSlots:t._u([{key:"icon",fn:function(){return[e(r.IconHome,{attrs:{size:20}})]},proxy:!0}])}),t._l(r.pathElements,(function(t){return e(r.NcBreadcrumb,{key:t.path,attrs:{name:t.name,title:t.path},on:{click:function(e){return r.emit("update:path",t.path)}}})}))]},proxy:!0},t.showMenu?{key:"actions",fn:function(){return[e(r.NcActions,{attrs:{"aria-label":r.t("Create directory"),"force-menu":!0,"force-title":!0,"menu-title":r.t("New"),type:"secondary"},on:{close:function(t){r.newNodeName=""}},scopedSlots:t._u([{key:"icon",fn:function(){return[e(r.IconPlus,{attrs:{size:20}})]},proxy:!0}],null,!1,2971667417)},[e(r.NcActionInput,{ref:"nameInput",attrs:{value:r.newNodeName,label:r.t("New folder"),placeholder:r.t("New folder name")},on:{"update:value":function(t){r.newNodeName=t},submit:r.onSubmit,input:r.validateInput},scopedSlots:t._u([{key:"icon",fn:function(){return[e(r.IconFolder,{attrs:{size:20}})]},proxy:!0}],null,!1,1614167509)})],1)]},proxy:!0}:null],null,!0)})}),[],!1,null,"f35f86d4",null,null);const Pe=ke.exports,Ce=(0,n.defineComponent)({__name:"FilePickerNavigation",props:{currentView:null,filterString:null,isCollapsed:{type:Boolean}},emits:["update:currentView","update:filterString"],setup(t,{emit:e}){const r=t,i=[{id:"files",label:(0,Yt.t)("All files"),icon:re.default},{id:"recent",label:(0,Yt.t)("Recent"),icon:ue},{id:"favorites",label:(0,Yt.t)("Favorites"),icon:fe.default}],o=(0,n.computed)((()=>i.filter((t=>t.id===r.currentView))[0]));return{__sfc:!0,allViews:i,props:r,emit:e,currentViewObject:o,updateFilterValue:t=>e("update:filterString",t),IconClose:le.default,IconMagnify:ce.default,NcButton:Kt.P2,NcSelect:Kt.QG,NcTextField:Kt.h3,t:Yt.t,Fragment:he.Fragment}}});var je=(0,s.n)(Ce,(function(){var t=this,e=t._self._c,r=t._self._setupProxy;return e(r.Fragment,[e(r.NcTextField,{staticClass:"file-picker__filter-input",attrs:{value:t.filterString,label:r.t("Filter file list"),"show-trailing-button":!!t.filterString},on:{"update:value":r.updateFilterValue,"trailing-button-click":function(t){return r.updateFilterValue("")}},scopedSlots:t._u([{key:"trailing-button-icon",fn:function(){return[e(r.IconClose,{attrs:{size:16}})]},proxy:!0}])},[e(r.IconMagnify,{attrs:{size:16}})],1),t.isCollapsed?e(r.NcSelect,{attrs:{"aria-label":r.t("Current view selector"),clearable:!1,searchable:!1,options:r.allViews,value:r.currentViewObject},on:{input:t=>r.emit("update:currentView",t.id)}}):e("ul",{staticClass:"file-picker__side",attrs:{role:"tablist","aria-label":r.t("Filepicker sections")}},t._l(r.allViews,(function(n){return e("li",{key:n.id},[e(r.NcButton,{attrs:{"aria-selected":t.currentView===n.id,type:t.currentView===n.id?"primary":"tertiary",wide:!0,role:"tab"},on:{click:function(e){return t.$emit("update:currentView",n.id)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e(n.icon,{tag:"component",attrs:{size:20}})]},proxy:!0}],null,!0)},[t._v(" "+t._s(n.label)+" ")])],1)})),0)],1)}),[],!1,null,"fcfd0f23",null,null);const Re=je.exports,Ie=(0,n.defineComponent)({name:"FilePicker",props:{buttons:null,name:null,allowPickDirectory:{type:Boolean,default:!1},container:{default:"body"},filterFn:{default:void 0},mimetypeFilter:{default:()=>[]},multiselect:{type:Boolean,default:!0},path:{default:"/"}},emits:["close"],setup(t,{emit:e}){const r=t,i=(0,n.computed)((()=>({container:r.container,name:r.name,buttons:o.value,size:"large",contentClasses:["file-picker__content"],dialogClasses:["file-picker"],navigationClasses:["file-picker__navigation"]}))),o=(0,n.computed)((()=>("function"==typeof r.buttons?r.buttons(f.value,g.value,u.value):r.buttons).map((t=>({...t,callback:async()=>{const n=0===f.value.length&&r.allowPickDirectory?[await _(g.value)]:f.value;t.callback(n),e("close",f.value)}}))))),u=(0,n.ref)("files"),l=(0,n.computed)((()=>"favorites"===u.value?(0,Yt.t)("Favorites"):"recent"===u.value?(0,Yt.t)("Recent"):"")),f=(0,n.ref)([]),h=(0,n.ref)((null==window?void 0:window.sessionStorage.getItem("NC.FilePicker.LastPath"))||"/"),p=(0,n.ref)(),g=(0,n.computed)({get:()=>"files"===u.value?p.value||r.path||h.value:"/",set:t=>{void 0===r.path&&window.sessionStorage.setItem("NC.FilePicker.LastPath",t),p.value=t,f.value=[]}}),m=(0,n.ref)(""),{isSupportedMimeType:v}=function(t){const e=(0,n.computed)((()=>t.value.map((t=>t.split("/")))));return{isSupportedMimeType:t=>{const r=t.split("/");return e.value.some((([t,e])=>!(r[0]!==t&&"*"!==t||r[1]!==e&&"*"!==e)))}}}((0,n.toRef)(r,"mimetypeFilter")),{files:y,isLoading:b,loadFiles:w,getFile:_,client:x}=function(t,e){const r=ct((0,c.generateRemoteUrl)("dav")),i=(0,n.ref)([]),o=(0,n.ref)(!0);async function a(){if(o.value=!0,"favorites"===t.value)i.value=await r.getDirectoryContents("".concat(ut).concat(e.value),{details:!0,data:Q(),headers:{method:"REPORT"},includeSelf:!1}).then((t=>t.data.map((t=>ft(t)))));else if("recent"===t.value){const t=Math.round(Date.now()/1e3)-1209600,n=await r.getDirectoryContents(e.value,{details:!0,data:tt(t),headers:{method:"SEARCH","Content-Type":"application/xml; charset=utf-8"},deep:!0});i.value=n.data.map((t=>ft(t)))}else{const t=await r.getDirectoryContents("".concat(ut).concat(e.value),{details:!0,data:`\n\t\t\n\t\t\t\n\t\t\t\t${Y()}\n\t\t\t\n\t\t`});i.value=t.data.map((t=>ft(t)))}o.value=!1}return(0,n.watch)([t,e],(()=>a())),{isLoading:o,files:i,loadFiles:()=>a(),getFile:async function(t){const e=await r.stat("".concat(ut).concat(t),{details:!0});return ft(e.data)},client:r}}(u,g);(0,n.onMounted)((()=>w()));const S=(0,n.computed)((()=>{let t=y.value;return r.mimetypeFilter.length>0&&(t=t.filter((t=>"folder"===t.type||t.mime&&v(t.mime)))),m.value&&(t=t.filter((t=>t.basename.toLowerCase().includes(m.value.toLowerCase())))),r.filterFn&&(t=t.filter((t=>r.filterFn(t)))),t})),E=(0,n.computed)((()=>"files"===u.value?(0,Yt.t)("Upload some content or sync with your devices!"):"recent"===u.value?(0,Yt.t)("Files and folders you recently modified will show up here."):(0,Yt.t)("Files and folders you mark as favorite will show up here.")));return{__sfc:!0,props:r,emit:e,dialogProps:i,dialogButtons:o,currentView:u,viewHeadline:l,selectedFiles:f,savedPath:h,navigatedPath:p,currentPath:g,filterString:m,isSupportedMimeType:v,files:y,isLoading:b,loadFiles:w,getFile:_,client:x,filteredFiles:S,noFilesDescription:E,onCreateFolder:t=>{x.createDirectory((0,d.join)(ut,g.value,t)).then((()=>w())).catch((t=>(0,de.i)((0,Yt.t)("Could not create the new folder"))))},IconFile:a,DialogBase:s.D,FileList:Ae,FilePickerBreadcrumbs:Pe,FilePickerNavigation:Re,NcEmptyContent:Kt.SL,t:Yt.t}}});var Le=(0,s.n)(Ie,(function(){var t=this,e=t._self._c,r=t._self._setupProxy;return e(r.DialogBase,t._b({on:{close:function(t){return r.emit("close")}},scopedSlots:t._u([{key:"navigation",fn:function({isCollapsed:t}){return[e(r.FilePickerNavigation,{attrs:{"is-collapsed":t,"current-view":r.currentView,"filter-string":r.filterString},on:{"update:currentView":function(t){r.currentView=t},"update:current-view":function(t){r.currentView=t},"update:filterString":function(t){r.filterString=t},"update:filter-string":function(t){r.filterString=t}}})]}}])},"DialogBase",r.dialogProps,!1),[e("div",{staticClass:"file-picker__main"},["files"===r.currentView?e(r.FilePickerBreadcrumbs,{attrs:{path:r.currentPath,"show-menu":t.allowPickDirectory},on:{"update:path":function(t){r.currentPath=t},"create-node":r.onCreateFolder}}):e("div",{staticClass:"file-picker__view"},[e("h3",[t._v(t._s(r.viewHeadline))])]),r.isLoading||r.filteredFiles.length>0?e(r.FileList,{attrs:{"allow-pick-directory":t.allowPickDirectory,files:r.filteredFiles,multiselect:t.multiselect,loading:r.isLoading,path:r.currentPath,"selected-files":r.selectedFiles,name:r.viewHeadline},on:{"update:path":[function(t){r.currentPath=t},function(t){r.currentView="files"}],"update:selectedFiles":function(t){r.selectedFiles=t},"update:selected-files":function(t){r.selectedFiles=t}}}):r.filterString?e(r.NcEmptyContent,{attrs:{name:r.t("No matching files"),description:r.t("No files matching your filter were found.")},scopedSlots:t._u([{key:"icon",fn:function(){return[e(r.IconFile)]},proxy:!0}])}):e(r.NcEmptyContent,{attrs:{name:r.t("No files in here"),description:r.noFilesDescription},scopedSlots:t._u([{key:"icon",fn:function(){return[e(r.IconFile)]},proxy:!0}])})],1)])}),[],!1,null,"52b54391",null,null);const Me=Le.exports}}]);
-//# sourceMappingURL=terms_of_service-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-c25de498_mjs.js.map?v=485b6e6f26dadc59513b
\ No newline at end of file
+(self.webpackChunkterms_of_service=self.webpackChunkterms_of_service||[]).push([["vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-c25de498_mjs"],{584:t=>{t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},7187:t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}g(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&g(t,"error",e,r)}(t,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function l(t,e,r,n){var i,o,a,l;if(s(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"==typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=u(t))>0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=a.length,l=c,console&&console.warn&&console.warn(l)}return t}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function h(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else{var l=u.length,c=p(u,l);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return h(this,t,!0)},o.prototype.rawListeners=function(t){return h(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},9267:(t,e,r)=>{var n=r(5635),i=r(8575),o=t.exports;for(var a in n)n.hasOwnProperty(a)&&(o[a]=n[a]);function s(t){if("string"==typeof t&&(t=i.parse(t)),t.protocol||(t.protocol="https:"),"https:"!==t.protocol)throw new Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}o.request=function(t,e){return t=s(t),n.request.call(this,t,e)},o.get=function(t,e){return t=s(t),n.get.call(this,t,e)}},5717:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},2587:t=>{"use strict";function e(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,r,n,i){r=r||"&",n=n||"=";var o={};if("string"!=typeof t||0===t.length)return o;var a=/\+/g;t=t.split(r);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=t.length;s>0&&u>s&&(u=s);for(var l=0;l=0?(c=p.substr(0,g),f=p.substr(g+1)):(c=p,f=""),h=decodeURIComponent(c),d=decodeURIComponent(f),e(o,h)?Array.isArray(o[h])?o[h].push(d):o[h]=[o[h],d]:o[h]=d}return o}},2182:t=>{"use strict";var e=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,r,n,i){return r=r||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(i){var o=encodeURIComponent(e(i))+n;return Array.isArray(t[i])?t[i].map((function(t){return o+encodeURIComponent(e(t))})).join(r):o+encodeURIComponent(e(t[i]))})).join(r):i?encodeURIComponent(e(i))+n+encodeURIComponent(e(t)):""}},7673:(t,e,r)=>{"use strict";e.decode=e.parse=r(2587),e.encode=e.stringify=r(2182)},4281:t=>{"use strict";var e={};function r(t,r,n){n||(n=Error);var i=function(t){var e,n;function i(e,n,i){return t.call(this,function(t,e,n){return"string"==typeof r?r:r(t,e,n)}(e,n,i))||this}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=t,e[t]=i}function n(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,o,a,s;if("string"==typeof e&&(o="not ",e.substr(!a||a<0?0:+a,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(u," ").concat(i," ").concat(n(e,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},6753:(t,e,r)=>{"use strict";var n=r(4155),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var o=r(9481),a=r(4229);r(5717)(c,o);for(var s=i(a.prototype),u=0;u{"use strict";t.exports=i;var n=r(4605);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(5717)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},9481:(t,e,r)=>{"use strict";var n,i=r(4155);t.exports=O,O.ReadableState=E;r(7187).EventEmitter;var o=function(t,e){return t.listeners(e).length},a=r(2503),s=r(8764).Buffer,u=r.g.Uint8Array||function(){};var l,c=r(4616);l=c&&c.debuglog?c.debuglog("stream"):function(){};var f,h,d,p=r(7086),g=r(1195),m=r(2457).getHighWaterMark,v=r(4281).q,y=v.ERR_INVALID_ARG_TYPE,b=v.ERR_STREAM_PUSH_AFTER_EOF,w=v.ERR_METHOD_NOT_IMPLEMENTED,_=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5717)(O,a);var x=g.errorOrDestroy,S=["error","close","destroy","pause","resume"];function E(t,e,i){n=n||r(6753),t=t||{},"boolean"!=typeof i&&(i=e instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(f||(f=r(2553).s),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function O(t){if(n=n||r(6753),!(this instanceof O))return new O(t);var e=this instanceof n;this._readableState=new E(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function N(t,e,r,n,i){l("readableAddChunk",e);var o,a=t._readableState;if(null===e)a.reading=!1,function(t,e){if(l("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?P(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,C(t)))}(t,a);else if(i||(o=function(t,e){var r;n=e,s.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(a,e)),o)x(t,o);else if(a.objectMode||e&&e.length>0)if("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),n)a.endEmitted?x(t,new _):A(t,a,e,!0);else if(a.ended)x(t,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?A(t,a,e,!1):j(t,a)):A(t,a,e,!1)}else n||(a.reading=!1,j(t,a));return!a.ended&&(a.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=T?t=T:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function P(t){var e=t._readableState;l("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(l("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(C,t))}function C(t){var e=t._readableState;l("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,F(t)}function j(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(R,t,e))}function R(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function L(t){l("readable nexttick read 0"),t.read(0)}function M(t,e){l("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),F(t),e.flowing&&!e.reading&&t.read(0)}function F(t){var e=t._readableState;for(l("flow",e.flowing);e.flowing&&null!==t.read(););}function D(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function B(t){var e=t._readableState;l("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(U,e,t))}function U(t,e){if(l("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function $(t,e){for(var r=0,n=t.length;r=e.highWaterMark:e.length>0)||e.ended))return l("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?B(this):P(this),null;if(0===(t=k(t,e))&&e.ended)return 0===e.length&&B(this),null;var n,i=e.needReadable;return l("need readable",i),(0===e.length||e.length-t0?D(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&B(this)),null!==n&&this.emit("data",n),n},O.prototype._read=function(t){x(this,new w("_read()"))},O.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,l("pipe count=%d opts=%j",n.pipesCount,e);var a=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr?u:m;function s(e,i){l("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,l("cleanup"),t.removeListener("close",p),t.removeListener("finish",g),t.removeListener("drain",c),t.removeListener("error",d),t.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",h),f=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}function u(){l("onend"),t.end()}n.endEmitted?i.nextTick(a):r.once("end",a),t.on("unpipe",s);var c=function(t){return function(){var e=t._readableState;l("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,F(t))}}(r);t.on("drain",c);var f=!1;function h(e){l("ondata");var i=t.write(e);l("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==$(n.pipes,t))&&!f&&(l("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(e){l("onerror",e),m(),t.removeListener("error",d),0===o(t,"error")&&x(t,e)}function p(){t.removeListener("finish",g),m()}function g(){l("onfinish"),t.removeListener("close",p),m()}function m(){l("unpipe"),r.unpipe(t)}return r.on("data",h),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",g),t.emit("pipe",r),n.flowing||(l("pipe resume"),r.resume()),t},O.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,l("on readable",n.length,n.reading),n.length?P(this):n.reading||i.nextTick(L,this))),r},O.prototype.addListener=O.prototype.on,O.prototype.removeListener=function(t,e){var r=a.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(I,this),r},O.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(I,this),e},O.prototype.resume=function(){var t=this._readableState;return t.flowing||(l("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(M,t,e))}(this,t)),t.paused=!1,this},O.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},O.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(l("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(l("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o{"use strict";t.exports=c;var n=r(4281).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(6753);function l(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{"use strict";var n,i=r(4155);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=O,O.WritableState=E;var a={deprecate:r(4927)},s=r(2503),u=r(8764).Buffer,l=r.g.Uint8Array||function(){};var c,f=r(1195),h=r(2457).getHighWaterMark,d=r(4281).q,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,m=d.ERR_MULTIPLE_CALLBACK,v=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,_=d.ERR_UNKNOWN_ENCODING,x=f.errorOrDestroy;function S(){}function E(t,e,a){n=n||r(6753),t=t||{},"boolean"!=typeof a&&(a=e instanceof n),this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=h(this,t,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new m;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,o){--e.pendingcb,r?(i.nextTick(o,n),i.nextTick(C,t,e),t._writableState.errorEmitted=!0,x(t,n)):(o(n),t._writableState.errorEmitted=!0,x(t,n),C(t,e))}(t,r,n,e,o);else{var a=k(r)||t.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||T(t,r),n?i.nextTick(A,t,r,a,o):A(t,r,a,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function O(t){var e=this instanceof(n=n||r(6753));if(!e&&!c.call(O,this))return new O(t);this._writableState=new E(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),s.call(this)}function N(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function A(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),C(t,e)}function T(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),a=e.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,N(t,e,!0,e.length,i,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,c=r.encoding,f=r.callback;if(N(t,e,!1,e.objectMode?1:l.length,l,c,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function P(t,e){t._final((function(r){e.pendingcb--,r&&x(t,r),e.prefinished=!0,t.emit("prefinish"),C(t,e)}))}function C(t,e){var r=k(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,i.nextTick(P,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}r(5717)(O,s),E.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(E.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(O,Symbol.hasInstance,{value:function(t){return!!c.call(this,t)||this===O&&(t&&t._writableState instanceof E)}})):c=function(t){return t instanceof this},O.prototype.pipe=function(){x(this,new v)},O.prototype.write=function(t,e,r){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=t,u.isBuffer(n)||n instanceof l);return s&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),s?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(t,e){var r=new w;x(t,r),i.nextTick(e,r)}(this,r):(s||function(t,e,r,n){var o;return null===r?o=new b:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(x(t,o),i.nextTick(n,o),!1)}(this,o,t,r))&&(o.pendingcb++,a=function(t,e,r,n,i,o){if(!r){var a=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=e.objectMode?1:n.length;e.length+=s;var l=e.length-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),O.prototype._write=function(t,e,r){r(new g("_write()"))},O.prototype._writev=null,O.prototype.end=function(t,e,r){var n=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,C(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),O.prototype.destroy=f.destroy,O.prototype._undestroy=f.undestroy,O.prototype._destroy=function(t,e){e(t)}},5850:(t,e,r)=>{"use strict";var n,i=r(4155);function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var a=r(8610),s=Symbol("lastResolve"),u=Symbol("lastReject"),l=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function p(t,e){return{value:t,done:e}}function g(t){var e=t[s];if(null!==e){var r=t[d].read();null!==r&&(t[f]=null,t[s]=null,t[u]=null,e(p(r,!1)))}}function m(t){i.nextTick(g,t)}var v=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((o(n={get stream(){return this[d]},next:function(){var t=this,e=this[l];if(null!==e)return Promise.reject(e);if(this[c])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(e,r){i.nextTick((function(){t[l]?r(t[l]):e(p(void 0,!0))}))}));var r,n=this[f];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(p(void 0,!0)):e[h](r,n)}),n)}}(n,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(p(o,!1));r=new Promise(this[h])}return this[f]=r,r}},Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var t=this;return new Promise((function(e,r){t[d].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),n),v);t.exports=function(t){var e,r=Object.create(y,(o(e={},d,{value:t,writable:!0}),o(e,s,{value:null,writable:!0}),o(e,u,{value:null,writable:!0}),o(e,l,{value:null,writable:!0}),o(e,c,{value:t._readableState.endEmitted,writable:!0}),o(e,h,{value:function(t,e){var n=r[d].read();n?(r[f]=null,r[s]=null,r[u]=null,t(p(n,!1))):(r[s]=t,r[u]=e)},writable:!0}),e));return r[f]=null,a(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[u];return null!==e&&(r[f]=null,r[s]=null,r[u]=null,e(t)),void(r[l]=t)}var n=r[s];null!==n&&(r[f]=null,r[s]=null,r[u]=null,n(p(void 0,!0))),r[c]=!0})),t.on("readable",m.bind(null,r)),r}},7086:(t,e,r)=>{"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return a.alloc(0);for(var e,r,n,i=a.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=o.data,r=i,n=s,a.prototype.copy.call(e,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return ti.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=a.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return s(this,function(t){for(var e=1;e{"use strict";var n=r(4155);function i(t,e){a(t,e),o(t)}function o(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function a(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,t)):n.nextTick(a,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e?(n.nextTick(o,r),e(t)):n.nextTick(o,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}},8610:(t,e,r)=>{"use strict";var n=r(4281).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i{t.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:(t,e,r)=>{"use strict";var n;var i=r(4281).q,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var s=!1;t.on("close",(function(){s=!0})),void 0===n&&(n=r(8610)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);s=!0,o()}));var u=!1;return function(e){if(!s&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new a("pipe"))}}function l(t){t()}function c(t,e){return t.pipe(e)}function f(t){return t.length?"function"!=typeof t[t.length-1]?s:t.pop():s}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r0,(function(t){n||(n=t),t&&a.forEach(l),o||(a.forEach(l),i(n))}))}));return e.reduce(c)}},2457:(t,e,r)=>{"use strict";var n=r(4281).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},2503:(t,e,r)=>{t.exports=r(7187).EventEmitter},8473:(t,e,r)=>{(e=t.exports=r(9481)).Stream=e,e.Readable=e,e.Writable=r(4229),e.Duplex=r(6753),e.Transform=r(4605),e.PassThrough=r(2725),e.finished=r(8610),e.pipeline=r(9946)},2830:(t,e,r)=>{t.exports=i;var n=r(7187).EventEmitter;function i(){n.call(this)}r(5717)(i,n),i.Readable=r(9481),i.Writable=r(4229),i.Duplex=r(6753),i.Transform=r(4605),i.PassThrough=r(2725),i.finished=r(8610),i.pipeline=r(9946),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,t.end())}function u(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function l(t){if(c(),0===n.listenerCount(this,"error"))throw t}function c(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",l),t.removeListener("error",l),r.removeListener("end",c),r.removeListener("close",c),t.removeListener("close",c)}return r.on("error",l),t.on("error",l),r.on("end",c),r.on("close",c),t.on("close",c),t.emit("pipe",r),t}},5635:(t,e,r)=>{var n=r(1989),i=r(5676),o=r(7529),a=r(584),s=r(8575),u=e;u.request=function(t,e){t="string"==typeof t?s.parse(t):o(t);var i=-1===r.g.location.protocol.search(/^https?:$/)?"http:":"",a=t.protocol||i,u=t.hostname||t.host,l=t.port,c=t.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),t.url=(u?a+"//"+u:"")+(l?":"+l:"")+c,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var f=new n(t);return e&&f.on("response",e),f},u.get=function(t,e){var r=u.request(t,e);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},8725:(t,e,r)=>{var n;function i(){if(void 0!==n)return n;if(r.g.XMLHttpRequest){n=new r.g.XMLHttpRequest;try{n.open("GET",r.g.XDomainRequest?"/":"https://example.com")}catch(t){n=null}}else n=null;return n}function o(t){var e=i();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(t){}return!1}function a(t){return"function"==typeof t}e.fetch=a(r.g.fetch)&&a(r.g.ReadableStream),e.writableStream=a(r.g.WritableStream),e.abortController=a(r.g.AbortController),e.arraybuffer=e.fetch||o("arraybuffer"),e.msstream=!e.fetch&&o("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&o("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!i()&&a(i().overrideMimeType),n=null},1989:(t,e,r)=>{var n=r(4155),i=r(8725),o=r(5717),a=r(5676),s=r(8473),u=a.IncomingMessage,l=a.readyStates;var c=t.exports=function(t){var e,r=this;s.Writable.call(r),r._opts=t,r._body=[],r._headers={},t.auth&&r.setHeader("Authorization","Basic "+Buffer.from(t.auth).toString("base64")),Object.keys(t.headers).forEach((function(e){r.setHeader(e,t.headers[e])}));var n=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!i.abortController)n=!1,e=!0;else if("prefer-streaming"===t.mode)e=!1;else if("allow-wrong-content-type"===t.mode)e=!i.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");e=!0}r._mode=function(t,e){return i.fetch&&e?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&t?"arraybuffer":"text"}(e,n),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};o(c,s.Writable),c.prototype.setHeader=function(t,e){var r=t.toLowerCase();-1===f.indexOf(r)&&(this._headers[r]={name:t,value:e})},c.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null},c.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},c.prototype._onFinish=function(){var t=this;if(!t._destroyed){var e=t._opts;"timeout"in e&&0!==e.timeout&&t.setTimeout(e.timeout);var o=t._headers,a=null;"GET"!==e.method&&"HEAD"!==e.method&&(a=new Blob(t._body,{type:(o["content-type"]||{}).value||""}));var s=[];if(Object.keys(o).forEach((function(t){var e=o[t].name,r=o[t].value;Array.isArray(r)?r.forEach((function(t){s.push([e,t])})):s.push([e,r])})),"fetch"===t._mode){var u=null;if(i.abortController){var c=new AbortController;u=c.signal,t._fetchAbortController=c,"requestTimeout"in e&&0!==e.requestTimeout&&(t._fetchTimer=r.g.setTimeout((function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()}),e.requestTimeout))}r.g.fetch(t._opts.url,{method:t._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:e.withCredentials?"include":"same-origin",signal:u}).then((function(e){t._fetchResponse=e,t._resetTimers(!1),t._connect()}),(function(e){t._resetTimers(!0),t._destroyed||t.emit("error",e)}))}else{var f=t._xhr=new r.g.XMLHttpRequest;try{f.open(t._opts.method,t._opts.url,!0)}catch(e){return void n.nextTick((function(){t.emit("error",e)}))}"responseType"in f&&(f.responseType=t._mode),"withCredentials"in f&&(f.withCredentials=!!e.withCredentials),"text"===t._mode&&"overrideMimeType"in f&&f.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in e&&(f.timeout=e.requestTimeout,f.ontimeout=function(){t.emit("requestTimeout")}),s.forEach((function(t){f.setRequestHeader(t[0],t[1])})),t._response=null,f.onreadystatechange=function(){switch(f.readyState){case l.LOADING:case l.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(f.onprogress=function(){t._onXHRProgress()}),f.onerror=function(){t._destroyed||(t._resetTimers(!0),t.emit("error",new Error("XHR error")))};try{f.send(a)}catch(e){return void n.nextTick((function(){t.emit("error",e)}))}}}},c.prototype._onXHRProgress=function(){var t=this;t._resetTimers(!1),function(t){try{var e=t.status;return null!==e&&0!==e}catch(t){return!1}}(t._xhr)&&!t._destroyed&&(t._response||t._connect(),t._response._onXHRProgress(t._resetTimers.bind(t)))},c.prototype._connect=function(){var t=this;t._destroyed||(t._response=new u(t._xhr,t._fetchResponse,t._mode,t._resetTimers.bind(t)),t._response.on("error",(function(e){t.emit("error",e)})),t.emit("response",t._response))},c.prototype._write=function(t,e,r){this._body.push(t),r()},c.prototype._resetTimers=function(t){var e=this;r.g.clearTimeout(e._socketTimer),e._socketTimer=null,t?(r.g.clearTimeout(e._fetchTimer),e._fetchTimer=null):e._socketTimeout&&(e._socketTimer=r.g.setTimeout((function(){e.emit("timeout")}),e._socketTimeout))},c.prototype.abort=c.prototype.destroy=function(t){var e=this;e._destroyed=!0,e._resetTimers(!0),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort(),t&&e.emit("error",t)},c.prototype.end=function(t,e,r){"function"==typeof t&&(r=t,t=void 0),s.Writable.prototype.end.call(this,t,e,r)},c.prototype.setTimeout=function(t,e){var r=this;e&&r.once("timeout",e),r._socketTimeout=t,r._resetTimers(!1)},c.prototype.flushHeaders=function(){},c.prototype.setNoDelay=function(){},c.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},5676:(t,e,r)=>{var n=r(4155),i=r(8725),o=r(5717),a=r(8473),s=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=e.IncomingMessage=function(t,e,r,o){var s=this;if(a.Readable.call(s),s._mode=r,s.headers={},s.rawHeaders=[],s.trailers={},s.rawTrailers=[],s.on("end",(function(){n.nextTick((function(){s.emit("close")}))})),"fetch"===r){if(s._fetchResponse=e,s.url=e.url,s.statusCode=e.status,s.statusMessage=e.statusText,e.headers.forEach((function(t,e){s.headers[e.toLowerCase()]=t,s.rawHeaders.push(e,t)})),i.writableStream){var u=new WritableStream({write:function(t){return o(!1),new Promise((function(e,r){s._destroyed?r():s.push(Buffer.from(t))?e():s._resumeFetch=e}))},close:function(){o(!0),s._destroyed||s.push(null)},abort:function(t){o(!0),s._destroyed||s.emit("error",t)}});try{return void e.body.pipeTo(u).catch((function(t){o(!0),s._destroyed||s.emit("error",t)}))}catch(t){}}var l=e.body.getReader();!function t(){l.read().then((function(e){s._destroyed||(o(e.done),e.done?s.push(null):(s.push(Buffer.from(e.value)),t()))})).catch((function(t){o(!0),s._destroyed||s.emit("error",t)}))}()}else{if(s._xhr=t,s._pos=0,s.url=t.responseURL,s.statusCode=t.status,s.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var r=e[1].toLowerCase();"set-cookie"===r?(void 0===s.headers[r]&&(s.headers[r]=[]),s.headers[r].push(e[2])):void 0!==s.headers[r]?s.headers[r]+=", "+e[2]:s.headers[r]=e[2],s.rawHeaders.push(e[1],e[2])}})),s._charset="x-user-defined",!i.overrideMimeType){var c=s.rawHeaders["mime-type"];if(c){var f=c.match(/;\s*charset=([^;])(;|$)/);f&&(s._charset=f[1].toLowerCase())}s._charset||(s._charset="utf-8")}}};o(u,a.Readable),u.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},u.prototype._onXHRProgress=function(t){var e=this,n=e._xhr,i=null;switch(e._mode){case"text":if((i=n.responseText).length>e._pos){var o=i.substr(e._pos);if("x-user-defined"===e._charset){for(var a=Buffer.alloc(o.length),u=0;ue._pos&&(e.push(Buffer.from(new Uint8Array(l.result.slice(e._pos)))),e._pos=l.result.byteLength)},l.onload=function(){t(!0),e.push(null)},l.readAsArrayBuffer(i)}e._xhr.readyState===s.DONE&&"ms-stream"!==e._mode&&(t(!0),e.push(null))}},2553:(t,e,r)=>{"use strict";var n=r(396).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=l,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=c,this.end=f,e=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function l(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function c(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.s=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},396:(t,e,r)=>{var n=r(8764),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},2511:function(t,e,r){var n;t=r.nmd(t),function(i){e&&e.nodeType,t&&t.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var a,s=2147483647,u=36,l=/^xn--/,c=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function g(t){throw RangeError(h[t])}function m(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function v(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+m((t=t.replace(f,".")).split("."),e).join(".")}function y(t){for(var e,r,n=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(e+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=p(t)})).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function _(t,e,r){var n=0;for(t=r?d(t/700):t>>1,t+=d(t/e);t>455;n+=u)t=d(t/35);return d(n+36*t/(t+38))}function x(t){var e,r,n,i,o,a,l,c,f,h,p,m=[],v=t.length,y=0,w=128,x=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&g("not-basic"),m.push(t.charCodeAt(n));for(i=r>0?r+1:0;i=v&&g("invalid-input"),((c=(p=t.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:u)>=u||c>d((s-y)/a))&&g("overflow"),y+=c*a,!(c<(f=l<=x?1:l>=x+26?26:l-x));l+=u)a>d(s/(h=u-f))&&g("overflow"),a*=h;x=_(y-o,e=m.length+1,0==o),d(y/e)>s-w&&g("overflow"),w+=d(y/e),y%=e,m.splice(y++,0,w)}return b(m)}function S(t){var e,r,n,i,o,a,l,c,f,h,m,v,b,x,S,E=[];for(v=(t=y(t)).length,e=128,r=0,o=72,a=0;a=e&&md((s-r)/(b=n+1))&&g("overflow"),r+=(l-e)*b,e=l,a=0;as&&g("overflow"),m==e){for(c=r,f=u;!(c<(h=f<=o?1:f>=o+26?26:f-o));f+=u)S=c-h,x=u-h,E.push(p(w(h+S%x,0))),c=d(S/x);E.push(p(w(c,0))),o=_(r,b,n==i),r=0,++n}++r,++e}return E.join("")}a={version:"1.3.2",ucs2:{decode:y,encode:b},decode:x,encode:S,toASCII:function(t){return v(t,(function(t){return c.test(t)?"xn--"+S(t):t}))},toUnicode:function(t){return v(t,(function(t){return l.test(t)?x(t.slice(4).toLowerCase()):t}))}},void 0===(n=function(){return a}.call(e,r,e,t))||(t.exports=n)}()},8575:(t,e,r)=>{"use strict";var n=r(2511),i=r(2502);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){i.isString(t)&&(t=b(t));return t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(l),f=["%","/","?",";","#"].concat(c),h=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=r(7673);function b(t,e,r){if(t&&i.isObject(t)&&t instanceof o)return t;var n=new o;return n.parse(t,e,r),n}o.prototype.parse=function(t,e,r){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o127?R+="x":R+=j[I];if(!R.match(d)){var M=P.slice(0,A),F=P.slice(A+1),D=j.match(p);D&&(M.push(D[1]),F.unshift(D[2])),F.length&&(b="/"+F.join(".")+b),this.hostname=M.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),k||(this.hostname=n.toASCII(this.hostname));var B=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+B,this.href+=this.host,k&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!g[x])for(A=0,C=c.length;A0)&&r.host.split("@"))&&(r.auth=k.shift(),r.host=r.hostname=k.shift());return r.search=t.search,r.query=t.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!S.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var O=S.slice(-1)[0],N=(r.host||t.host||S.length>1)&&("."===O||".."===O)||""===O,A=0,T=S.length;T>=0;T--)"."===(O=S[T])?S.splice(T,1):".."===O?(S.splice(T,1),A++):A&&(S.splice(T,1),A--);if(!_&&!x)for(;A--;A)S.unshift("..");!_||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),N&&"/"!==S.join("/").substr(-1)&&S.push("");var k,P=""===S[0]||S[0]&&"/"===S[0].charAt(0);E&&(r.hostname=r.host=P?"":S.length?S.shift():"",(k=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=k.shift(),r.host=r.hostname=k.shift()));return(_=_||r.host&&S.length)&&!P&&S.unshift(""),S.length?r.pathname=S.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},2502:t=>{"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},4927:(t,e,r)=>{function n(t){try{if(!r.g.localStorage)return!1}catch(t){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},7529:t=>{t.exports=function(){for(var t={},r=0;r{"use strict";r.r(e),r.d(e,{default:()=>Me});var n=r(144);const i={name:"FileIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var o=r(1900);const a=(0,o.Z)(i,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon file-icon",attrs:{"aria-hidden":!t.title,"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 s=r(8169),u=r(7958),l=r(7499),c=r(9753);r(7856),r(5573);function f(){return document.documentElement.dataset.locale||"en"}function h(){return f().replace(/_/g,"-")}var d=r(6470),p=r(4155),g={584:t=>{function e(t,e,i){t instanceof RegExp&&(t=r(t,i)),e instanceof RegExp&&(e=r(e,i));var o=n(t,e,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+t.length,o[1]),post:i.slice(o[1]+e.length)}}function r(t,e){var r=e.match(t);return r?r[0]:null}function n(t,e,r){var n,i,o,a,s,u=r.indexOf(t),l=r.indexOf(e,u+1),c=u;if(u>=0&&l>0){for(n=[],o=r.length;c>=0&&!s;)c==u?(n.push(c),u=r.indexOf(t,c+1)):1==n.length?s=[n.pop(),l]:((i=n.pop())=0?u:l;n.length&&(s=[o,a])}return s}t.exports=e,e.range=n},146:function(t,e,r){var n;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}t=r.nmd(t),function(o){var a="object"==i(e)&&e,s="object"==i(t)&&t&&t.exports==a&&t,u="object"==("undefined"==typeof global?"undefined":i(global))&&global;u.global!==u&&u.window!==u||(o=u);var l=function(t){this.message=t};(l.prototype=new Error).name="InvalidCharacterError";var c=function(t){throw new l(t)},f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=/[\t\n\f\r ]/g,d={encode:function(t){t=String(t),/[^\0-\xFF]/.test(t)&&c("The string to be encoded contains characters outside of the Latin1 range.");for(var e,r,n,i,o=t.length%3,a="",s=-1,u=t.length-o;++s>18&63)+f.charAt(i>>12&63)+f.charAt(i>>6&63)+f.charAt(63&i);return 2==o?(e=t.charCodeAt(s)<<8,r=t.charCodeAt(++s),a+=f.charAt((i=e+r)>>10)+f.charAt(i>>4&63)+f.charAt(i<<2&63)+"="):1==o&&(i=t.charCodeAt(s),a+=f.charAt(i>>2)+f.charAt(i<<4&63)+"=="),a},decode:function(t){var e=(t=String(t).replace(h,"")).length;e%4==0&&(e=(t=t.replace(/==?$/,"")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&c("Invalid character: the string to be decoded is not correctly encoded.");for(var r,n,i=0,o="",a=-1;++a>(-2*i&6)));return o},version:"1.0.0"};if("object"==i(r.amdO)&&r.amdO)void 0===(n=function(){return d}.call(e,r,e,t))||(t.exports=n);else if(a&&!a.nodeType)if(s)s.exports=d;else for(var p in d)d.hasOwnProperty(p)&&(a[p]=d[p]);else o.base64=d}(this)},918:(t,e)=>{e.k=function(t){if(!t)return 0;for(var e=(t=t.toString()).length,r=t.length;r--;){var n=t.charCodeAt(r);56320<=n&&n<=57343&&r--,127{var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],r=0;r{var e,r;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(t,e){return t<>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&r.rotl(t,8)|4278255360&r.rotl(t,24);for(var e=0;e0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],r=0,n=0;r>>5]|=t[r]<<24-n%32;return e},wordsToBytes:function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},bytesToHex:function(t){for(var e=[],r=0;r>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],r=0;r>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,i=0;n