zeed 0.15.2 → 0.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-FK3HJCZ4.js → chunk-5FQ2VPF7.js} +8 -8
- package/dist/chunk-5FQ2VPF7.js.map +1 -0
- package/dist/index.all.d.cts +24 -1
- package/dist/index.all.d.ts +24 -1
- package/dist/index.browser.cjs +228 -228
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +2 -2
- package/dist/index.browser.d.ts +2 -2
- package/dist/index.browser.js +2 -2
- package/dist/index.node.cjs +258 -256
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.d.cts +5 -3
- package/dist/index.node.d.ts +5 -3
- package/dist/index.node.js +3 -3
- package/dist/index.node.js.map +1 -1
- package/dist/{uuid-SUiCz6WF.d.cts → uuid-naw6hsUu.d.cts} +21 -0
- package/dist/{uuid-SUiCz6WF.d.ts → uuid-naw6hsUu.d.ts} +21 -0
- package/package.json +1 -1
- package/dist/chunk-FK3HJCZ4.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
`)}r(Wt,"Uint8ArrayToHexDump");var
|
|
1
|
+
var nr=Object.defineProperty;var r=(e,t)=>nr(e,"name",{value:t,configurable:!0});function rr(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;if(typeof globalThis<"u")return globalThis;throw new Error("unable to locate global object")}r(rr,"_global");function q(){let e=rr();return e._zeedGlobal==null&&(e._zeedGlobal={}),e._zeedGlobal}r(q,"getGlobalContext");var re=-1,pe=0,Ne=1,je=2,He=3,ze=4,Ge=9007199254740991,_t={"*":-1,a:-1,all:-1,d:0,dbg:0,debug:0,i:1,inf:1,info:1,w:2,warn:2,warning:2,e:3,err:3,error:3,fatal:4,off:9007199254740991,"-":9007199254740991};function or(){return crypto.getRandomValues(new Uint32Array(1))[0]/4294967295}r(or,"getSecureRandom");function I(){return typeof crypto<"u"?or():Math.random()}r(I,"getSecureRandomIfPossible");function ni(e=.25){return I()<e}r(ni,"randomBoolean");function ri(e=100,t=0){return t+Math.floor(I()*(e-t))}r(ri,"randomInt");function oi(e=100,t=0){return t+I()*(e-t)}r(oi,"randomFloat");function ii(e,t,n){return Math.max(e,Math.min(n,t))}r(ii,"between");function ir(e){return e.reduce((t,n)=>t+n,0)}r(ir,"sum");function si(e){return ir(e)/e.length}r(si,"avg");function ai(e){return !/^1?$|^(11+?)\1+$/.test("1".repeat(e))}r(ai,"isPrimeRX");function ui(e){for(let t=2;t<e;t++)if(e%t===0)return !1;return e>1}r(ui,"isPrime");var qe=6;function ci(e=0,t=1,n){qe=((n??qe)*9301+49297)%233280;let o=qe/233280;return t+o*(e-t)}r(ci,"seededRandom");function sr(e=""){let[t="",n="asc"]=e.split(" ");return n=n.toLowerCase(),{field:t,orderby:n,asc:n!=="desc",desc:n==="desc"}}r(sr,"parseOrderby");function pi(e,t=!0){return `${e} ${t?"asc":"desc"}`}r(pi,"composeOrderby");function We(e,t,n=!0){let o=e||0,i=t||0;return o>i?n?1:-1:o<i?n?-1:1:0}r(We,"cmp");function di(e,...t){if(t.length>0){let n=t.map(sr),o=Array.from(e);return o.sort((i,s)=>{for(let{field:a,asc:c}of n){let u=We(i[a],s[a],c);if(u!==0)return u}return 0}),o}return e}r(di,"sortedOrderby");function Je(e){return e.filter((t,n)=>e.indexOf(t)===n)}r(Je,"arrayUnique");function ar(e,t){return Je(e.filter(n=>!t.includes(n)))}r(ar,"arrayMinus");function ur(...e){return Je(e.reduce((t=[],n)=>t.concat(n),[]))}r(ur,"arrayUnion");function W(...e){return e.flat(Number.POSITIVE_INFINITY)}r(W,"arrayFlatten");function cr(e,t){return Je(e).filter(n=>t.includes(n))}r(cr,"arrayIntersection");function bi(e,t){return ar(ur(e,t),cr(e,t))}r(bi,"arraySymmetricDifference");function Vt(e,t){if(e&&Array.isArray(e)){let n;for(;(n=e.indexOf(t))!==-1;)e.splice(n,1);return e}return []}r(Vt,"arrayRemoveElement");function xi(e,t){return e.includes(t)||e.push(t),e}r(xi,"arraySetElement");function Ze(e,t){return e.splice(0,e.length,...e.filter(t)),e}r(Ze,"arrayFilterInPlace");function wi(e,t){let n=e.findIndex(o=>o===t);return n>=0?e.splice(n,1):e.push(t),e}r(wi,"arrayToggleInPlace");function Ti(e){return e.splice(0,e.length),e}r(Ti,"arrayEmptyInPlace");function Li(e,t){return e.splice(0,e.length,...t),e}r(Li,"arraySetArrayInPlace");function lr(e,t=We){return Array.from(e).sort(t)}r(lr,"arraySorted");function Ai(e){return lr(e,(t,n)=>t-n)}r(Ai,"arraySortedNumbers");function fr(e,t){return e.length===t.length&&e.every((n,o)=>n===t[o])}r(fr,"arrayIsEqual");function Nt(e){return e.sort(()=>I()>.5?1:-1),e}r(Nt,"arrayShuffleInPlace");function vi(e){return Nt(Array.from(e))}r(vi,"arrayShuffle");function Ci(e){for(;e.length>1;){let t=Array.from(e);if(Nt(t),!fr(e,t))return t}return e}r(Ci,"arrayShuffleForce");function Ui(e){return e[Math.floor(I()*e.length)]}r(Ui,"arrayRandomElement");function Di(...e){return W(e).reduce((t,n)=>t!=null?n>t?n:t:n,void 0)}r(Di,"arrayMax");function Ei(...e){return W(e).reduce((t,n)=>t!=null?n<t?n:t:n,void 0)}r(Ei,"arrayMin");function Fi(...e){return W(e).reduce((t,n)=>t+n,0)}r(Fi,"arraySum");function Pi(...e){let t=W(e);return t.reduce((n,o)=>n+o,0)/t.length}r(Pi,"arrayAvg");function Ii(e,t){let n=[],o=0,i=e.length;for(;o<i;)n.push(e.slice(o,o+=t));return n}r(Ii,"arrayBatches");function ki(e=0,t){if(e<=0)return [];let n=Array.from({length:e});for(let o=0;o<e;o++)n[o]=t instanceof Function?t(o):t;return n}r(ki,"createArray");var pr=r((e,t)=>t instanceof Object&&!Array.isArray(t)?Object.keys(t).sort().reduce((n,o)=>(n[o]=t[o],n),{}):t,"_sortedReplacer");function Mi(e,t=void 0){return JSON.stringify(e,pr,t)}r(Mi,"jsonStringifySorted");function dr(e,t){let n=[],o=[];return t==null&&(t=r(function(i,s){return n[0]===s?"[Circular ~]":`[Circular ~.${o.slice(0,n.indexOf(s)).join(".")}]`},"cycleReplacer")),function(i,s){if(n.length>0){let a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?o.splice(a,Number.POSITIVE_INFINITY,i):o.push(i),~n.indexOf(s)&&(s=t?.call(this,i,s));}else n.push(s);try{return e==null?s:e.call(this,i,s)}catch{}return String(s)}}r(dr,"serializer");function M(e,t,n,o){return JSON.stringify(e,dr(t??void 0,o),n??void 0)}r(M,"jsonStringifySafe");var Bi=M;function gr(e){let t=unescape(encodeURIComponent(e)),n=t.length,o=new Uint8Array(n);for(let i=0;i<n;i++)o[i]=t.codePointAt(i)||0;return o}r(gr,"_encodeUtf8Polyfill");function mr(e){let t=e.length,n="",o=0;for(;t>0;){let i=t<1e4?t:1e4,s=e.subarray(o,o+i);o+=i,n+=String.fromCodePoint.apply(null,s),t-=i;}return decodeURIComponent(escape(n))}r(mr,"_decodeUtf8Polyfill");var de;function jt(e){if(de==null&&(de=gr,typeof TextEncoder<"u")){let t=new TextEncoder;de=r(n=>t.encode(n),"_textEncoder");}return de(e.normalize("NFC"))}r(jt,"stringToUInt8Array");var ge;function Ht(e){if(ge==null&&(ge=mr,typeof TextDecoder<"u")){let t=new TextDecoder("utf-8",{ignoreBOM:!0});ge=r(n=>t.decode(n),"_textDecoder");}return ge(e).normalize("NFC")}r(Ht,"Uint8ArrayToString");function v(e){return e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?jt(e):e.length?new Uint8Array(e):e}r(v,"toUint8Array");function Vi(...e){let t=0,n=e.flat(1).map(s=>{let a=v(s);return t+=a.length,a}),o=new Uint8Array(t),i=0;for(let s of n)o.set(s,i),i+=s.length;return o}r(Vi,"joinToUint8Array");function zt(e){if(typeof Buffer<"u")return Buffer.from(v(e)).toString("hex");let t="0123456789abcdef",n="";for(let o of [...v(e)])n+=t[o>>4]+t[o&15];return n}r(zt,"toHex");function Gt(e){return Uint8Array.from(e.match(/.{1,2}/g).map(t=>Number.parseInt(t,16)))}r(Gt,"fromHex");function oe(e,t=!1){let n=v(e),o="";if(typeof Buffer<"u")o=Buffer.from(n).toString("base64");else {let i="";for(let s=0;s<n.byteLength;s++)i+=String.fromCharCode(n[s]);o=btoa(i);}return t?o.replaceAll("=",""):o}r(oe,"toBase64");function Ni(e){let t=v(e);if(typeof Buffer<"u")return Buffer.from(t).toString("base64url").replaceAll("=","");let n="";for(let o=0;o<t.byteLength;o++)n+=String.fromCharCode(t[o]);return btoa(n).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}r(Ni,"toBase64Url");function me(e){if(e=e.replaceAll("-","+").replaceAll("_","/"),typeof Buffer<"u"){let o=Buffer.from(e,"base64");return new Uint8Array(o.buffer,o.byteOffset,o.byteLength)}let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}r(me,"fromBase64");function ji(e){return Ht(me(e))}r(ji,"fromBase64String");function qt(e,t){if(e.byteLength!==t.byteLength)return !1;let n=v(e),o=v(t);for(let i=0;i<n.length;i++)if(n[i]!==o[i])return !1;return !0}r(qt,"equalBinary");function Ke(e){return jt(M(e))}r(Ke,"jsonToUint8Array");function Ye(e){return JSON.parse(Ht(e))}r(Ye,"Uint8ArrayToJson");function Wt(e,t){if(typeof e!="string")if(e instanceof ArrayBuffer&&e.byteLength!==void 0)e=String.fromCharCode.apply(String,[].slice.call(new Uint8Array(e)));else if(Array.isArray(e))e=String.fromCharCode.apply(String,e);else if(e.constructor===Uint8Array)e=String.fromCharCode.apply(String,[].slice.call(e));else return !1;t=t||16;let n=[],o="0123456789ABCDEF";for(let i=0;i<e.length;i+=t){let s=e.slice(i,Math.min(i+t,e.length)),a=`0000${i.toString(16)}`.slice(-4),c=s.split("").map(l=>{let p=l.charCodeAt(0);return ` ${o[(240&p)>>4]}${o[15&p]}`}).join("");c+=" ".repeat(t-s.length);let u=s.replace(/[\x00-\x1F\x20\x7F-\xA0\xAD]/g,".");u+=" ".repeat(t-s.length),n.push(`${a} ${c} ${u}`);}return n.join(`
|
|
2
|
+
`)}r(Wt,"Uint8ArrayToHexDump");var yr={2:"01",8:"01234567",11:"0123456789a",16:"0123456789abcdef",32:"0123456789abcdefghjkmnpqrtuvwxyz","32-crockford":"0123456789ABCDEFGHJKMNPQRSTVWXYZ","32-geohash":"0123456789bcdefghjkmnpqrstuvwxyz","32-agnoster":"0123456789abcdefghjkmnpqrtuvwxyz","32-rfc":"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567","32-hex":"0123456789ABCDEFGHIJKLMNOPQRSTUV","32-zbase":"ybndrfg8ejkmcpqxot1uwisza345h769",36:"0123456789abcdefghijklmnopqrstuvwxyz",58:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",62:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",64:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/","64-url":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",66:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.!~",85:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~"};function hr(e){let t=yr[String(e)];if(!t)if(typeof e=="string")t=e;else throw new Error(`Unknown base ${e}`);if(t.length>=255)throw new TypeError("Alphabet too long");let n=new Uint8Array(256);for(let l=0;l<n.length;l++)n[l]=255;for(let l=0;l<t.length;l++){let p=t.charAt(l),f=p.charCodeAt(0);if(n[f]!==255)throw new TypeError(`${p} is ambiguous`);n[f]=l;}let o=t.length,i=t.charAt(0),s=Math.log(o)/Math.log(256),a=Math.log(256)/Math.log(o);function c(l,p=-1){let f=v(l);if(f.byteLength===0)return "";let m=0,g=0,d=f.byteLength;for(;g!==d&&f[g]===0;)g++;let x=(d-g)*a+1>>>0,T=new Uint8Array(x);for(;g!==d;){let F=f[g],$=0;for(let b=x-1;(F!==0||$<m)&&b!==-1;b--,$++)F+=256*T[b]>>>0,T[b]=F%o>>>0,F=F/o>>>0;if(F!==0)throw new Error("Non-zero carry");m=$,g++;}let y=x-m;for(;y!==x&&T[y]===0;)y++;let L="";for(;y<x;++y)L+=t.charAt(T[y]);return p>0?L.padStart(p,i):L}r(c,"encode");function u(l,p=-1){if(typeof l!="string")throw new TypeError("Expected String");if(l.length===0)return new Uint8Array;l=l.replace(/\s+/gi,"");let f=0,m=0;for(;l[f]===i;)f++;let g=(l.length-f)*s+1>>>0,d=new Uint8Array(g);for(;l[f];){let T=n[l.charCodeAt(f)];if(T===255)throw new Error(`Unsupported character "${l[f]}"`);let y=0;for(let L=g-1;(T!==0||y<m)&&L!==-1;L--,y++)T+=o*d[L]>>>0,d[L]=T%256>>>0,T=T/256>>>0;if(T!==0)throw new Error("Non-zero carry");m=y,f++;}let x=g-m;for(;x!==g&&d[x]===0;)x++;return p>0?new Uint8Array([...new Uint8Array(p-d.length+x),...d.slice(x)]):d.slice(x)}return r(u,"decode"),{encode:c,decode:u}}r(hr,"_useBase");var ye;function N(e){ye==null&&(ye=new Map);function t(){let i=ye.get(e);return i==null&&(i=hr(e),ye.set(e,i)),i}r(t,"getFromCache");function n(i,s=-1){return t().encode(i,s)}r(n,"encode");function o(i,s=-1){return t().decode(i,s)}return r(o,"decode"),{encode:n,decode:o}}r(N,"useBase");function Qe(e,t=-1){return N(32).encode(e,t)}r(Qe,"encodeBase32");function Jt(e,t=-1){return N(32).decode(e.toLocaleLowerCase().replaceAll("l","1").replaceAll("s","5").replaceAll("o","0").replaceAll("i","1"),t)}r(Jt,"decodeBase32");function qi(e,t=-1){return N(16).encode(e,t)}r(qi,"encodeBase16");function Wi(e,t=-1){return N(16).decode(e,t)}r(Wi,"decodeBase16");function Ji(e,t=-1){return N(58).encode(e,t)}r(Ji,"encodeBase58");function Zi(e,t=-1){return N(58).decode(e,t)}r(Zi,"decodeBase58");function Xe(e,t=-1){return N(62).encode(e,t)}r(Xe,"encodeBase62");function Zt(e,t=-1){return N(62).decode(e,t)}r(Zt,"decodeBase62");function Ki(e,t){return Math.ceil(e*(Math.log(256)/Math.log(t)))}r(Ki,"estimateSizeForBase");function Xi(e){return e.length>0&&(/^[A-Z0-9_\-\ ]*$/g.test(e)&&(e=e.toLowerCase()),e=e.replace(/^[-_\ ]+/gi,"").replace(/[-_\ ]+$/gi,"").replace(/[-_\ ]+([a-z0-9])/gi,(t,n)=>n.toUpperCase()),e=e[0].toLowerCase()+e.substring(1)),e}r(Xi,"toCamelCase");function br(e){return e.charAt(0).toUpperCase()+e.toLowerCase().slice(1)}r(br,"toCapitalize");function es(e){return e.replace(/\w\S*/g,br)}r(es,"toCapitalizeWords");function ts(e,t="-"){return t=typeof t>"u"?"_":t,e.replace(/([a-z\d])([A-Z])/g,`$1${t}$2`).replace(/([A-Z]+)([A-Z][a-z\d]+)/g,`$1${t}$2`).toLowerCase()}r(ts,"fromCamelCase");var Kt=["1","true","yes","y","on"];function is(e,t=!1){return e==null||typeof e!="string"?t:Kt.includes(String(e).trim().toLowerCase())}r(is,"stringToBoolean");function ss(e,t=0){return e==null||typeof e!="string"?t:Number.parseInt(e.trim(),10)??t}r(ss,"stringToInteger");function as(e,t=0){return e==null||typeof e!="string"?t:Number.parseFloat(e.trim())??t}r(as,"stringToFloat");function xr(e,t=!1){return e==null?t:typeof e=="boolean"?e:typeof e=="number"?e!==0:Kt.includes(String(e).trim().toLowerCase())}r(xr,"valueToBoolean");function wr(e,t=0){return e==null?t:typeof e=="boolean"?e?1:0:typeof e=="number"?Math.floor(e):Number.parseInt(String(e).trim(),10)??t}r(wr,"valueToInteger");function Tr(e,t=0){return e==null?t:typeof e=="boolean"?e?1:0:typeof e=="number"?Math.floor(e):Number.parseFloat(String(e).trim())??t}r(Tr,"valueToFloat");function et(e,t=""){return e==null?t:String(e)??t}r(et,"valueToString");var us=Tr,cs=wr,ls=et,fs=xr;function Lr(e,t={}){let{trace:n=!0,pretty:o=!0}=t;return e.map(i=>{if(i&&typeof i=="object"){if(o&&(i instanceof Uint8Array||i instanceof ArrayBuffer))return `
|
|
3
3
|
${Wt(i)}
|
|
4
4
|
`;if(i instanceof Error)return n?`${i.name||"Error"}: ${i.message}
|
|
5
|
-
${i.stack}`:`${i.name||"Error"}: ${i.message}`;try{return o?JSON.stringify(i,null,2):JSON.stringify(i)}catch{}}return String(i)})}r(Tr,"formatMessages");function fs(e,t={}){return Tr(e,t).join(" ")}r(fs,"renderMessages");function ps(e){try{return decodeURIComponent(escape(e))}catch{}return e}r(ps,"fixBrokenUth8String");function ys(e){if(e.startsWith("data:"))return me(e.split(",",2)[1])}r(ys,"dataUriToUint8Array");function hs(e){if(e.startsWith("data:"))return e.slice(5).split(",",2)[0]}r(hs,"dataUriToMimeType");function bs(e){if(e.startsWith("data:")){let[t,n]=e.slice(5).split(",",2);return new Blob([me(n)],{type:t})}}r(bs,"dataUriToBlob");async function xs(e){let t=await e.arrayBuffer();if(t)return `data:${e.type},${oe(t)}`}r(xs,"blobToDataUri");function ws(e,t="application/octet-stream"){return `data:${t},${oe(e)}`}r(ws,"Uint8ArrayToDataUri");function Yt(){let e,t;return [new Promise((o,i)=>{e=o,t=i;}),e,t]}r(Yt,"createPromise");async function As(e){return new Promise(t=>setTimeout(t,e))}r(As,"sleep");async function vs(){return new Promise(e=>setTimeout(e,0))}r(vs,"immediate");async function Cs(e,t,n="timeoutReached"){return new Promise(async(o,i)=>{let s=!1,a=setTimeout(()=>{s=!0,o(n);},t);try{let c=await e;clearTimeout(a),s||o(c);}catch(c){clearTimeout(a),s||i(c);}})}r(Cs,"timeout");function Us(e){return e==="timeoutReached"||e?.name==="Timeout reached"}r(Us,"isTimeout");async function Qt(e,t){return t<=0?await e:new Promise(async(n,o)=>{let i=!1,s=setTimeout(()=>{i=!0,o(new Error("Timeout reached"));},t);try{let a=await e;clearTimeout(s),i||n(a);}catch(a){clearTimeout(s),i||o(a);}})}r(Qt,"tryTimeout");function Ds(e,t,n=1e3){return new Promise((o,i)=>{let s=r(u=>{c&&(clearTimeout(c),a(),o(u));},"fn"),a=r(()=>{c=null,e.off?e.off(t,s):e.removeEventListener&&e.removeEventListener(t,s);},"done"),c=setTimeout(()=>{a(),i(new Error("Did not response in time"));},n);e.on?e.on(t,s):e.addEventListener&&e.addEventListener(t,s);})}r(Ds,"waitOn");function k(e){return !!(e&&(e instanceof Promise||typeof e.then=="function"))}r(k,"isPromise");function j(e){return Promise.resolve(e)}r(j,"promisify");var Xt=864e5;function nt(e){return Math.floor(e/1e4)}r(nt,"dayYear");function en(e){return Math.floor(e/100%100)}r(en,"dayMonth");function Lr(e){return Math.floor(e%100)}r(Lr,"dayDay");function Ps(e){return [nt(e),en(e),Lr(e)]}r(Ps,"dayToParts");function tn(e,t=!1){return t?new Date(`${vr(e)}T00:00:00.000Z`):new Date(e/1e4,e/100%100-1,e%100)}r(tn,"dayToDate");function nn(){return be(new Date)}r(nn,"dayFromToday");function Is(e,t=!1){if(typeof e=="number")return e<100?void 0:e;if(typeof e=="string")return rn(e);if(Array.isArray(e)&&e.length===3){let[n,o,i]=e;return rt(n,o,i)}else if(e instanceof Date)return be(e,t)}r(Is,"dayFromAny");function ks(e){return tn(e,!0)}r(ks,"dayToDateGMT");function be(e,t=!1){return t?rn(e.toISOString()):e.getFullYear()*1e4+(e.getMonth()+1)*100+e.getDate()}r(be,"dayFromDate");function Ss(e){return be(e,!0)}r(Ss,"dayFromDateGMT");function tt(e,t=!0){return tn(e,t).getTime()}r(tt,"dayToTimestamp");function Ar(e,t=!0){return be(new Date(e),t)}r(Ar,"dayFromTimestamp");function vr(e,t="-"){let n=String(e);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}r(vr,"dayToString");function rt(e,t=1,n=1){if(!(t<1||t>12||n<1||n>31))return e*1e4+t*100+n}r(rt,"dayFromParts");function rn(e){let t=String(e).replace(/[^0-9]/g,"").slice(0,8);if(t.length===8)return +t}r(rn,"dayFromString");function Rs(e,t=0){let n=nt(e),o=en(e);return t!==0&&(o+=t,n+=Math.floor((o-1)/12),o=Math.floor((o-1)%12)+1,o===0&&(o=12)),rt(n,o,1)}r(Rs,"dayMonthStart");function Ms(e,t=0){let n=nt(e);return rt(n+t,1,1)}r(Ms,"dayYearStart");function he(e,t){return Ar(tt(e)+t*864e5)}r(he,"dayOffset");function Bs(e,t){return Math.round((tt(t)-tt(e))/864e5)}r(Bs,"dayDiff");function Os(e,t){let n=[];for(t==null&&(t=nn()),e<0&&(e=he(t,e+1));e<=t;)n.push(e),e=he(e,1);return n}r(Os,"dayRange");function*$s(e,t){let n=[];for(t==null&&(t=nn()),e<0&&(e=he(t,e+1));e<=t;)yield e,e=he(e,1);return n}r($s,"dayIterator");var D=class D{get value(){return this.days}constructor(t){if(typeof t=="number"){this.days=t;return}if(t!=null&&(t=D.from(t)?.days),t==null){let n=new Date;this.days=n.getFullYear()*1e4+(n.getMonth()+1)*100+n.getDate();}else this.days=t;}static fromNumber(t){return new D(t)}static fromString(t){return D.from(+t.replace(/[^0-9]/g,"").slice(0,8))}static fromDate(t,n=!1){return n?D.fromString(t.toISOString().substr(0,10)):D.from(t.getFullYear()*1e4+(t.getMonth()+1)*100+t.getDate())}static fromDateGMT(t){return D.fromDate(t,!0)}static from(t,n=!1){if(typeof t=="number")return t<100?void 0:new D(t);if(typeof t=="string")return D.fromString(t);if(Array.isArray(t)&&t.length===3){let[o,i=1,s=1]=t;return i<1||i>12||s<1||s>31?void 0:new D(o*1e4+i*100+s)}else {if(t instanceof Date)return D.fromDate(t,n);if(t instanceof D)return t}}toNumber(){return this.days}toJson(){return this.days}toString(t="-"){let n=String(this.days);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}toDate(t=!1){return t?new Date(`${this.toString()}T00:00:00.000Z`):new Date(this.days/1e4,this.days/100%100-1,this.days%100)}toDateGMT(){return this.toDate(!0)}get year(){return Math.floor(this.days/1e4)}get month(){return Math.floor(this.days/100%100)}get day(){return Math.floor(this.days%100)}dayOffset(t){return D.fromDateGMT(new Date(this.toDateGMT().getTime()+t*864e5))}monthStart(){return D.from([this.year,this.month,1])}yearStart(){return D.from([this.year,1,1])}monthOffset(t){let n=this.month+t,o=Math.floor((n-1)%12)+1;o===0&&(o=12);let i=Math.floor((n-1)/12);return D.from([this.year+i,o,this.day])}daysUntil(t){return Math.round((new D(t)?.toDateGMT().getTime()-this.toDateGMT().getTime())/864e5)}yesterday(){return this.dayOffset(-1)}tomorrow(){return this.dayOffset(1)}};r(D,"Day");var H=D;async function js(e,t,n){let o=H.from(e),i=H.from(t);for(;o&&i&&o?.days<=i?.days;){let s=n(o);k(s)&&await s,o=o.dayOffset(1);}}r(js,"forEachDay");function Hs(){return new H}r(Hs,"today");function zs(e){return new H(e)}r(zs,"day");function Gs(e){return H.fromDate(new Date(e)).days}r(Gs,"dateStringToDays");function Cr(e,t=2){return +(+e).toFixed(t)}r(Cr,"decimal");function Js(e,t=2){return +(+e/10**t).toFixed(t)}r(Js,"decimalFromCents");function Zs(e,t=2){return Math.round(+e*10**t)}r(Zs,"decimalToCents");function Ks(e,t=2){return t*(Cr(e,t)%1)}r(Ks,"decimalCentsPart");function ea(e,t,n){let o=e[t];return o===void 0&&(o=n(t,e),e[t]=o),o}r(ea,"ensureKey");async function ta(e,t,n){let o=e[t];return o===void 0&&(o=await n(t,e),e[t]=o),o}r(ta,"ensureKeyAsync");function on(e){return e!=null?e.size!=null?e.size:e.length!=null?e.length:Object.keys(e).length:0}r(on,"size");function na(e){return e!=null&&e.length>0?e[0]:void 0}r(na,"first");function ra(e){return e!=null&&e.length>0?e[e.length-1]:void 0}r(ra,"last");function oa(e){try{if(e!=null)return Array.isArray(e)||typeof e=="string"?e.length<=0:e?.size!=null?e.size<=0:Object.keys(e).length<=0}catch(t){console.warn("Failed to check if empty for",e,t);}return !0}r(oa,"empty");function ot(e){return Object(e)!==e?e:JSON.parse(M(e))}r(ot,"cloneObject");function ia(e){return Object(e)!==e?e:JSON.parse(M(e))}r(ia,"cloneJsonObject");function sa(e){let t=new Map;return n=>{if(t.has(n))return t.get(n);let o=e(n);return t.set(n,o),o}}r(sa,"memoize");function aa(e){let t=new Map;return async(...n)=>{let o=M(n);if(t.has(o))return t.get(o);let i=await e(...n);return t.set(o,i),i}}r(aa,"memoizeAsync");function ua(e,t){let n=[];for(let o=0;o<e;o++)n.push(t(o,e));return n}r(ua,"forTimes");function O(e){return e!=null&&typeof e=="object"}r(O,"isObject");function it(e){return Object(e)!==e}r(it,"isPrimitive");function _(e){return Array.isArray(e)}r(_,"isArray");function xe(e){return O(e)&&!_(e)}r(xe,"isRecord");function pa(e){return e?.constructor===Object}r(pa,"isRecordPlain");function we(e){return typeof e=="string"}r(we,"isString");function sn(e){return typeof e=="number"&&!Number.isNaN(e)}r(sn,"isNumber");function da(e){return sn(e)&&Number.isInteger(e)}r(da,"isInteger");function ga(e){return sn(e)&&Number.isSafeInteger(e)}r(ga,"isSafeInteger");function an(e){return typeof e=="boolean"}r(an,"isBoolean");function ma(e){return e==null}r(ma,"isNullOrUndefined");function ya(e){return e==null}r(ya,"isNull");function ha(e){return O(e)&&e.constructor.name==="Uint8Array"}r(ha,"isUint8Array");function ba(e){return e!=null}r(ba,"isNotNull");function Ur(e){return e==null||e===""||O(e)&&on(e)<=0}r(Ur,"isEmpty");function xa(e){return !Ur(e)}r(xa,"isNotEmpty");function wa(e){return e!=null&&e!==!1&&e!==!0}r(wa,"isValue");function Ta(e){return e!=null&&e!==!1&&e!==0&&e!==""}r(Ta,"isTruthy");function Dr(e,t,n=new WeakSet){if(e===t)return !0;if(n.has(t)||(it(t)||n.add(t),!(e instanceof Object)||!(t instanceof Object))||e.constructor!==t.constructor||e.length!==t.length)return !1;for(let o in e){if(!e.hasOwnProperty(o))continue;if(!t.hasOwnProperty(o))return !1;let i=e[o],s=t[o];if(!Dr(i,s,n))return !1}for(let o in t)if(t.hasOwnProperty(o)&&!e.hasOwnProperty(o))return !1;return !0}r(Dr,"deepEqual");function Er(e,t=new WeakSet){if(t.has(e))return "[Circular ~]";if(it(e)||t.add(e),xe(e)){for(let n in e)if(e.hasOwnProperty(n)){if(e[n]===void 0){delete e[n];continue}Er(e[n],t);}}else if(_(e))for(let n=e.length-1;n>=0;n--)e[n]===void 0&&e.splice(n,1);return e}r(Er,"deepStripUndefinedInPlace");function Te(e,...t){for(let n of t)O(e)||(e={}),!(n==null||!O(n))&&Object.keys(n).forEach(o=>{let i=e[o],s=n[o];Array.isArray(i)&&Array.isArray(s)?e[o]=i.concat(s):O(i)&&O(s)?e[o]=Te(Object.assign({},i),s):e[o]=s;});return e}r(Te,"deepMerge");function Fr(e,t,n={cyclesFix:!0},o=[]){let i=[],s=Array.isArray(e);for(let c in e){let u=e[c],l=s?+c:c;if(!(c in t)){i.push({type:"del",path:[l]});continue}let p=t[c],f=typeof u=="object"&&typeof p=="object";if(u&&p&&f&&!["Date","RegExp","String","Number"].includes(Object.getPrototypeOf(u).constructor.name)&&(!n.cyclesFix||!o.includes(u))){let m=Fr(u,p,n,n.cyclesFix?o.concat([u]):[]);i=[...i,...m.map(g=>(g.path.unshift(l),g))];}else u!==p&&!(f&&(Number.isNaN(u)?`${u}`==`${p}`:+u==+p))&&i.push({path:[l],type:"upd",value:p});}let a=Array.isArray(t);for(let c in t)c in e||i.push({type:"new",path:[a?+c:c],value:t[c]});return i}r(Fr,"diffObjects");function un(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""")}r(un,"escapeHTML");function Fa(e){return e.replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&/gi,"&")}r(Fa,"unescapeHTML");function ka(e,t,n=[]){return e.filter(o=>!t.some(i=>!i(o))).map(o=>{for(let i of n)o=i(o);return o}).filter(o=>o!=null)}r(ka,"listQuery");function Sa(e,t){return e.reduce((n,o)=>{let i=String(o[t]);return (n[i]=n[i]||[]).push(o),n},{})}r(Sa,"listGroupBy");function Ra(e,t){return Array.from(e.reduce((n,o)=>n.add(o[t]),new Set))}r(Ra,"listDistinctUnion");function Ma(e,t){return e.map(n=>n[t])}r(Ma,"listOfKey");function _a(e,t){return O(e)?Object.fromEntries(Object.entries(e).map(([n,o])=>{let i=t(n,o);return _(i)&&i.length===2?i:[n,i]}).filter(n=>n!=null)):{}}r(_a,"objectMap");function Va(e,t){return t.dispose&&e.dispose&&t.dispose.add(e.dispose),Object.assign(e,t)}r(Va,"objectMergeDisposable");function Na(e){return Object.keys(e).length<=0}r(Na,"objectIsEmpty");var Pr=/[\\\-\[\]\/{}()*+?.^$|]/g;function Le(e){return e?e instanceof RegExp?e.source:e.replace(Pr,"\\$&"):""}r(Le,"escapeRegExp");var Ir=100,kr=/^\.+/,Sr=/\.+$/,Rr=/[<>:\"/\\|?*\u0000-\u001F\u0080-\u009F]+/gm;function cn(){return Rr}r(cn,"filenameReservedRegex");function Mr(){return /^(con|prn|aux|nul|com\d|lpt\d)$/i}r(Mr,"windowsReservedNameRegex");function Wa(e,t="_"){if(typeof e!="string")throw new TypeError("Expected a string");if(cn().test(t))throw new Error("Replacement string cannot contain reserved filename characters");let n=`(${Le(t)})+`;return e=e.replace(cn(),t).replace(kr,t).replace(Sr,"").replace(new RegExp(n,"gm"),t).trim(),e=Mr().test(e)?e+t:e,e.slice(0,Ir)}r(Wa,"toValidFilename");function ie(e){return Math.abs(e)%1===.5}r(ie,"isHalf");function ln(e){return e%2===0}r(ln,"isEven");var Ka=r(e=>Math.ceil(e),"roundUp"),Ya=r(e=>Math.floor(e),"roundDown"),Qa=r(e=>Math.round(e),"roundHalfUp"),Xa=r(e=>{let t=Math.round(e);return ie(e)&&ln(t)?t-1:t},"roundHalfOdd"),eu=r(e=>ie(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e),"roundHalfAwayFromZero"),tu=r(e=>ie(e)?Math.floor(e):Math.round(e),"roundHalfDown"),nu=r(e=>{let t=Math.round(e);return ie(e)?ln(t)?t:t-1:t},"roundHalfEven"),ru=r(e=>ie(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e),"roundHalfTowardsZero");function fn(e){return e.reduce((t,n)=>Math.min(t,n.sort_weight||0),0)-1-I()}r(fn,"startSortWeight");function pn(e){return e.reduce((t,n)=>Math.max(t,n.sort_weight||0),0)+1+I()}r(pn,"endSortWeight");function au(e,t,n){let o=n.length,i=e<t;if(o<=0||e>=o-1)return pn(n);if(e<=0)return fn(n);n=Br([...n]);let s=i?-1:0,a=n[e+s].sort_weight||0,u=(n[e+s+1].sort_weight||0)-a;if(u===0)return i?fn(n):pn(n);let l=a+u/2,p=u*.01*(I()-.5);return l+p}r(au,"moveSortWeight");function Br(e){return e.sort((t,n)=>(t.sort_weight||0)-(n.sort_weight||0)),e}r(Br,"sortedItems");function fu(e={}){let{getter:t=r(c=>c.sort,"getter")}=e;function n(c){return c.sort((u,l)=>(t(u)||0)-(t(l)||0)),c}r(n,"items");function o(c){return c.reduce((u,l)=>Math.min(u,t(l)||0),0)-1-I()}r(o,"start");function i(c){return c.reduce((u,l)=>Math.max(u,t(l)||0),0)+1+I()}r(i,"end");function s(c,u){c==null&&(c=(u??0)-1),u==null&&(u=(c??0)+1);let l=u-c,p=c+l/2,f=l*.01*(I()-.5);return p+f}r(s,"between");function a(c,u,l){let p=l.length,f=c<u;if(p<=0||c>=p-1)return i(l);if(c<=0)return o(l);l=n([...l]);let m=f?-1:0,g=t(l[c+m])||0,x=(t(l[c+m+1])||0)-g;if(x===0)return f?o(l):i(l);let T=g+x/2,y=x*.01*(I()-.5);return T+y}return r(a,"move"),{start:o,end:i,between:s,move:a,items:n}}r(fu,"useSorted");function Or(e){return t=>e?.[t]}r(Or,"basePropertyOf");var $r={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},_r=Or($r),Vr=/[\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0100-\u017F]/g,Nr="\\u0300-\\u036f",jr="\\ufe20-\\ufe2f",Hr="\\u20d0-\\u20ff",zr="\\u1ab0-\\u1aff",Gr="\\u1dc0-\\u1dff",qr=Nr+jr+Hr+zr+Gr,Wr=`[${qr}]`,Jr=RegExp(Wr,"g");function dn(e){return e&&e.replace(Vr,_r).replace(Jr,"")}r(dn,"deburr");var Zr=/((?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00A1-\uFFFF][a-z0-9\u00A1-\uFFFF_-]{0,62})?[a-z0-9\u00A1-\uFFFF]\.)+(?:[a-z\u00A1-\uFFFF]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?)/gim;function hu(e){return e.split(Zr).map((t,n)=>{let o=un(t);return n%2?`<a target="_blank" href="${o}">${Kr(o)}</a>`:o}).join("")}r(hu,"linkifyPlainText");function Kr(e){return e.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")}r(Kr,"toHumanReadableUrl");function gn(e,t){let n=[];for(let[o,i]of Object.entries(e))if(i!=null){Array.isArray(i)||(i=[i]);for(let s of i)t&&!t(s)||s!=null&&n.push(`${encodeURIComponent(o)}=${encodeURIComponent(String(s))}`);}return n.join("&")}r(gn,"encodeQuery");function bu(e){let t={},n=(e[0]==="?"?e.substr(1):e).split("&");for(let o=0;o<n.length;o++){let i=n[o].split("="),s=decodeURIComponent(i[0]),a=decodeURIComponent(i[1]||"");t[s]!=null?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(a)):t[s]=a;}return t}r(bu,"parseQuery");var mn=["aardvark","absurd","accrue","acme","adrift","adult","afflict","ahead","aimless","Algol","allow","alone","ammo","ancient","apple","artist","assume","Athens","atlas","Aztec","baboon","backfield","backward","basalt","beaming","bedlamp","beehive","beeswax","befriend","Belfast","berserk","billiard","bison","blackjack","blockade","blowtorch","bluebird","bombast","bookshelf","brackish","breadline","breakup","brickyard","briefcase","Burbank","button","buzzard","cement","chairlift","chatter","checkup","chisel","choking","chopper","Christmas","clamshell","classic","classroom","cleanup","clockwork","cobra","commence","concert","cowbell","crackdown","cranky","crowfoot","crucial","crumpled","crusade","cubic","deadbolt","deckhand","dogsled","dosage","dragnet","drainage","dreadful","drifter","dropper","drumbeat","drunken","Dupont","dwelling","eating","edict","egghead","eightball","endorse","endow","enlist","erase","escape","exceed","eyeglass","eyetooth","facial","fallout","flagpole","flatfoot","flytrap","fracture","fragile","framework","freedom","frighten","gazelle","Geiger","Glasgow","glitter","glucose","goggles","goldfish","gremlin","guidance","hamlet","highchair","hockey","hotdog","indoors","indulge","inverse","involve","island","Janus","jawbone","keyboard","kickoff","kiwi","klaxon","lockup","merit","minnow","miser","Mohawk","mural","music","Neptune","newborn","nightbird","obtuse","offload","oilfield","optic","orca","payday","peachy","pheasant","physique","playhouse","Pluto","preclude","prefer","preshrunk","printer","profile","prowler","pupil","puppy","python","quadrant","quiver","quota","ragtime","ratchet","rebirth","reform","regain","reindeer","rematch","repay","retouch","revenge","reward","rhythm","ringbolt","robust","rocker","ruffled","sawdust","scallion","scenic","scorecard","Scotland","seabird","select","sentence","shadow","showgirl","skullcap","skydive","slingshot","slothful","slowdown","snapline","snapshot","snowcap","snowslide","solo","spaniel","spearhead","spellbind","spheroid","spigot","spindle","spoilage","spyglass","stagehand","stagnate","stairway","standard","stapler","steamship","stepchild","sterling","stockman","stopwatch","stormy","sugar","surmount","suspense","swelter","tactics","talon","tapeworm","tempest","tiger","tissue","tonic","tracker","transit","trauma","treadmill","Trojan","trouble","tumor","tunnel","tycoon","umpire","uncut","unearth","unwind","uproot","upset","upshot","vapor","village","virus","Vulcan","waffle","wallet","watchword","wayside","willow","woodlark","Zulu"],yn=["adroitness","adviser","aggregate","alkali","almighty","amulet","amusement","antenna","applicant","Apollo","armistice","article","asteroid","Atlantic","atmosphere","autopsy","Babylon","backwater","barbecue","belowground","bifocals","bodyguard","borderline","bottomless","Bradbury","Brazilian","breakaway","Burlington","businessman","butterfat","Camelot","candidate","cannonball","Capricorn","caravan","caretaker","celebrate","cellulose","certify","chambermaid","Cherokee","Chicago","clergyman","coherence","combustion","commando","company","component","concurrent","confidence","conformist","congregate","consensus","consulting","corporate","corrosion","councilman","crossover","cumbersome","customer","Dakota","decadence","December","decimal","designing","detector","detergent","determine","dictator","dinosaur","direction","disable","disbelief","disruptive","distortion","divisive","document","embezzle","enchanting","enrollment","enterprise","equation","equipment","escapade","Eskimo","everyday","examine","existence","exodus","fascinate","filament","finicky","forever","fortitude","frequency","gadgetry","Galveston","getaway","glossary","gossamer","graduate","gravity","guitarist","hamburger","Hamilton","handiwork","hazardous","headwaters","hemisphere","hesitate","hideaway","holiness","hurricane","hydraulic","impartial","impetus","inception","indigo","inertia","infancy","inferno","informant","insincere","insurgent","integrate","intention","inventive","Istanbul","Jamaica","Jupiter","leprosy","letterhead","liberty","maritime","matchmaker","maverick","Medusa","megaton","microscope","microwave","midsummer","millionaire","miracle","misnomer","molasses","molecule","Montana","monument","mosquito","narrative","nebula","newsletter","Norwegian","October","Ohio","onlooker","opulent","Orlando","outfielder","Pacific","pandemic","pandora","paperweight","paragon","paragraph","paramount","passenger","pedigree","Pegasus","penetrate","perceptive","performance","pharmacy","phonetic","photograph","pioneer","pocketful","politeness","positive","potato","processor","prophecy","provincial","proximate","puberty","publisher","pyramid","quantity","racketeer","rebellion","recipe","recover","repellent","replica","reproduce","resistor","responsive","retraction","retrieval","retrospect","revenue","revival","revolver","Sahara","sandalwood","sardonic","Saturday","savagery","scavenger","sensation","sociable","souvenir","specialist","speculate","stethoscope","stupendous","supportive","surrender","suspicious","sympathy","tambourine","telephone","therapist","tobacco","tolerance","tomorrow","torpedo","tradition","travesty","trombonist","truncated","typewriter","ultimate","undaunted","underfoot","unicorn","unify","universe","unravel","upcoming","vacancy","vagabond","versatile","vertigo","Virginia","visitor","vocalist","voyager","warranty","Waterloo","whimsical","Wichita","Wilmington","Wyoming","yesteryear","Yucatan"];function Au(e,t=" ",n=" "){return Array.from(e).map((o,i)=>i%2?yn[o]+n:mn[o]+t).join("").slice(0,-(e.length%2?t:n).length)}r(Au,"Uint8ArrayToWords");function vu(e){return v(e.map((t,n)=>(n%2?yn:mn).findIndex(o=>o.toLocaleLowerCase()===dn(t).toLocaleLowerCase().trim())))}r(vu,"wordsToUint8Array");var Yr=/\\\s|\s+|#[^\n]*\n?/gm,Qr=/\(\?P?<(\w[\w\d_]+)>|\((?!\?(:|\!|=|<=|<\!))/gm,hn=/^((?:\(\?[\w$]+\))?)\(\?<([=!])([\s\S]*?)\)/gm;function Xr(e){return typeof e=="string"?e:e.source||""}r(Xr,"regExpString");function Du(e){return e.replace(/[-\[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}r(Du,"regExpEscape");var st=class st{constructor(t,n){this.namedGroups={};this.names=[];let o=n??"",i;if(t instanceof RegExp?(n==null&&(o=t.flags),i=t.source):i=t,o&&o.includes("x")&&(o=o.replace("x",""),i=i.replace(Yr,c=>c[0]==="\\"?c:"")),!(t instanceof RegExp)){let c=0;i=i.replace(Qr,(u,l)=>(c+=1,l?(l!=="index"&&l!=="length"&&!this.namedGroups[l]&&(this.namedGroups[l]=c),"("):u)),this.names=Object.keys(this.namedGroups);}i=Xr(i),hn.lastIndex=0;let a=hn.exec(i);a&&(this.lookBehind={rx:new RegExp(`${a[3]}$(?!\\s)`),expect:a?a[2]==="=":!a},i=i.substr(a[0].length)),this.rx=new RegExp(i,o);}get lastIndex(){return this.rx.lastIndex}set lastIndex(t){this.rx.lastIndex=t;}_handleMatch(t){if(this.lookBehind){let n=t.input.slice(0,t.index);if(this.lookBehind.expect!==this.lookBehind.rx.test(n))return null}for(let n of this.names)t[n]=t[this.namedGroups[n]];return t}exec(t){let n;for(;n=this.rx.exec(t);)if(this.rx.lastIndex===n.index&&this.rx.lastIndex++,n=this._handleMatch(n),n!=null)return n}execAll(t){let n=[],o;for(this.rx.lastIndex=0;o=this.exec(t);)n.push(o);return this.rx.lastIndex=0,n}replace(t,n){let o=typeof n=="function"?n:()=>n;return t.replace(this.rx,i=>o(i))}};r(st,"XRX");var bn=st;function eo(e){return e===!0||e==="true"||e==="1"||typeof e=="number"&&e!==0?e="*":e===!1||e==="false"||e===0||e==="0"||e==null||e==="null"||e==="undefined"?e="":e=String(e),e}r(eo,"getNamespaceFilterString");function to(){return eo(typeof process<"u"?process.env.ZEED??process.env.DEBUG:typeof localStorage<"u"?localStorage.zeed??localStorage.debug:"*")}r(to,"getDefaultNamespaceFilter");function J(e=to()){let t,n=[],o=[];if(!e)t=r(function(i){return !1},"fn");else if(e==="*")t=r(function(i){return !0},"fn");else {let i,s=e.split(/[\s,]+/),a=s.length;for(i=0;i<a;i++){if(!s[i])continue;let c=s[i].replace(/\*/g,".*?");c[0]==="-"?n.push(new RegExp(`^${c.substr(1)}`)):o.push(new RegExp(`^${c}`));}t=r(function(c){if(n.length===0&&o.length===0)return !0;let u,l;for(u=0,l=n.length;u<l;u++)if(n[u].test(c))return !1;for(u=0,l=o.length;u<l;u++)if(o[u].test(c))return !0;return !1},"fn");}return t.accept=o,t.reject=n,t.filter=e,t}r(J,"useNamespaceFilter");function no(){return typeof process<"u"?process.env.ZEED_LEVEL??process.env.LEVEL??process.env.DEBUG_LEVEL:typeof localStorage<"u"?localStorage.zeed_level??localStorage.level??localStorage.debug_level:void 0}r(no,"getDefaultLevelFilter");function at(e){if(e===!1)return 9007199254740991;if(typeof e=="number")return e;if(typeof e=="string"){let t=_t[e.toLocaleLowerCase().trim()];if(t!=null)return t}return -1}r(at,"parseLogLevel");function Ae(e=no()){let t=at(e);return n=>n>=t}r(Ae,"useLevelFilter");function se(...e){return we(e[1])?[`${String(e[0])} ${String(e[1])}`,...e.slice(2)]:e}r(se,"joinLogStrings");function ve(e={}){let{level:t=void 0,filter:n=void 0}=e,o=J(n),i=Ae(t);return s=>{if(!i(s.level)||!o(s.name))return;let a=s.name?`[${s.name}]`:"";switch(s.level){case 1:console.info(...se(`I|* ${a}`,...s.messages));break;case 2:console.warn(...se(`W|** ${a}`,...s.messages));break;case 3:console.error(...se(`E|*** ${a}`,...s.messages));break;default:console.debug(...se(`D| ${a}`,...s.messages));break}}}r(ve,"LoggerConsoleHandler");function xn(e=""){let t=[ve()],n=r(u=>!0,"logCheckNamespace"),o=!1,i=a,s=!1;function a(u="",l){let p=at(l??-1);function f(d,x){return p<=d?x:()=>{}}r(f,"defineForLogLevel");let m=r(d=>{if(n(u))for(let x of t)x&&x(d);},"emit"),g=f(0,(...d)=>{m({name:u,messages:d,level:0});});return g.label=u,g.extend=function(d){return i(u?`${u}:${d}`:d)},g.debug=f(0,(...d)=>{m({name:u,messages:d,level:0});}),g.info=f(1,(...d)=>{m({name:u,messages:d,level:1});}),g.warn=f(2,(...d)=>{m({name:u,messages:d,level:2});}),g.error=f(3,(...d)=>{m({name:u,messages:d,level:3});}),g.fatal=f(4,(...d)=>{throw m({name:u,messages:d,level:4}),new Error(`${d.map(String).join(" ")}`)}),g.assert=f(4,(d,...x)=>{(d==null||typeof d=="number"&&Number.isNaN(d)||!d)&&g.fatal(...x);}),g}r(a,"LoggerBaseFactory");function c(u="",l){let p=i(u,l);return s&&p.debug(`+++ init of logger "${u}" on level "${p.level}".`),p}return r(c,"Logger"),c.registerHandler=function(u){t.push(u);},c.setFilter=function(u){n=J(u);},c.setLock=(u=!0)=>o=u,c.setDebug=(u=!0)=>s=u,c.setHandlers=function(u=[]){i!==a&&(i=a),!o&&(t=[...u].filter(l=>typeof l=="function"));},c.level=-1,c.setLogLevel=function(u=-1){o||(c.level=u);},c.setFactory=function(u){o||(i=u);},c}r(xn,"LoggerContext");var V;function ut(e){let t=xn();return e?e(t):t.setHandlers([ve()]),t}r(ut,"getLoggerContext");function ro(e){if(V==null)try{let t=q();t!=null?t?.logger==null?(V=ut(e),t.logger=V):V=t.logger:V=ut(e);}catch{V=ut(e);}return V}r(ro,"getGlobalLogger");function wn(){if(V!=null)return V;try{let e=q();if(e?.logger!=null)return e.logger}catch{}}r(wn,"getGlobalLoggerIfExists");function S(e,t){return ro()(e,t)}r(S,"DefaultLogger");var Tn=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function qu(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Tn[Math.abs(t)%Tn.length]}r(qu,"browserSelectColorByName");function Ce(){return Date.now()}r(Ce,"getTimestamp");function oo(e){return e>999?`${(e/1e3).toFixed(1)} s`:`${e.toFixed(2)} ms`}r(oo,"formatMilliseconds");function Zu(...e){for(let t of e){if(t instanceof Date)return t;if(typeof t=="string"){let n=null;if(t.includes(":"))try{n=new Date(t);}catch{}if(!(n instanceof Date)){let o=/(\d\d\d\d)-(\d\d)-(\d\d)/.exec(t);o&&(n=new Date(+o[1],+o[2]-1,+o[3],12,0));}if(n instanceof Date)return n}}}r(Zu,"parseDate");function Ln(){return typeof performance<"u"?performance.now():Date.now()}r(Ln,"getPerformanceTimestamp");function Ku(){let e=Ln();return function(){let t=Ln()-e;return oo(t)}}r(Ku,"duration");function tc(e){let{level:t=void 0,filter:n=void 0,messages:o=[]}=e,i=J(n),s=Ae(t);return a=>{s(a.level)&&i(a.name)&&(a.timestamp=Ce(),o.push(a));}}r(tc,"LoggerMemoryHandler");function io(...e){throw wn()?.("assert")?.fatal(...e),new Error(`${e.map(String).join(" ")}`)}r(io,"fatal");function so(e,...t){(e==null||typeof e=="number"&&Number.isNaN(e)||!e)&&io(...t);}r(so,"assert");function An(e,...t){so(e,...t);}r(An,"assertCondition");function ae(e,t,n){return new Uint8Array(e,t,n)}r(ae,"createUint8ArrayViewFromArrayBuffer");function ao(e){let t=unescape(encodeURIComponent(e)),n=t.length,o=new Uint8Array(n);for(let i=0;i<n;i++)o[i]=t.codePointAt(i);return o}r(ao,"_encodeUtf8Polyfill");var Ue;function De(){return Ue===void 0&&(Ue=typeof TextEncoder<"u"?new TextEncoder:null),Ue}r(De,"getUtf8TextEncoder");function vn(e){return De()?Ue.encode(e):ao(e)}r(vn,"encodeUtf8");var Z;function Cn(){return Z===void 0&&(Z=(typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0}))??null,Z&&Z.decode(new Uint8Array).length===1&&(Z=null)),Z}r(Cn,"getUtf8TextDecoder");var gt=class gt{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[];}};r(gt,"Encoder");var ct=gt;function Pe(){return new ct}r(Pe,"createEncoder");function lt(e){let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t}r(lt,"length");function Ie(e){let t=new Uint8Array(lt(e)),n=0;for(let o=0;o<e.bufs.length;o++){let i=e.bufs[o];t.set(i,n),n+=i.length;}return t.set(ae(e.cbuf.buffer,0,e.cpos),n),t}r(Ie,"encodeToUint8Array");function co(e,t){let n=e.cbuf.length;n-e.cpos<t&&(e.bufs.push(ae(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(Math.max(n,t)*2),e.cpos=0);}r(co,"verifyLen");function U(e,t){let n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t;}r(U,"write");var Fn=U;function Pn(e,t){U(e,t&255),U(e,t>>>8&255);}r(Pn,"writeUint16");function In(e,t){for(let n=0;n<4;n++)U(e,t&255),t>>>=8;}r(In,"writeUint32");function z(e,t){for(;t>127;)U(e,128|127&t),t=Math.floor(t/128);U(e,127&t);}r(z,"writeVarUint");function lo(e){return e!==0?e<0:1/e<0}r(lo,"isNegativeZero");function ft(e,t){let n=lo(t);for(n&&(t=-t),U(e,(t>63?128:0)|(n?64:0)|63&t),t=Math.floor(t/64);t>0;)U(e,(t>127?128:0)|127&t),t=Math.floor(t/128);}r(ft,"writeVarInt");function ke(e,t){let n=e.cbuf.length,o=e.cpos,i=Math.min(n-o,t.length),s=t.length-i;e.cbuf.set(t.subarray(0,i),o),e.cpos+=i,s>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(Math.max(n*2,s)),e.cbuf.set(t.subarray(i)),e.cpos=s);}r(ke,"writeUint8Array");function Se(e,t){z(e,t.byteLength),ke(e,t);}r(Se,"writeVarUint8Array");var ue,En;function fo(e,t){if(ue==null&&(ue=new Uint8Array(3e4),En=ue.length/3),t.length<En){let n=De().encodeInto(t,ue).written||0;z(e,n);for(let o=0;o<n;o++)U(e,ue[o]);}else Se(e,vn(t));}r(fo,"_writeVarStringNative");function po(e,t){let n=unescape(encodeURIComponent(t)),o=n.length;z(e,o);for(let i=0;i<o;i++)U(e,n.codePointAt(i));}r(po,"_writeVarStringPolyfill");function Fe(e,t){return De()?.encodeInto?fo(e,t):po(e,t)}r(Fe,"writeVarString");function pt(e,t){co(e,t);let n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n}r(pt,"writeOnDataView");function dt(e,t){return pt(e,4).setFloat32(0,t,!1)}r(dt,"writeFloat32");function go(e,t){return pt(e,8).setFloat64(0,t,!1)}r(go,"writeFloat64");function mo(e,t){return pt(e,8).setBigInt64(0,t,!1)}r(mo,"writeBigInt64");var Ee;function yo(e){return Ee==null&&(Ee=new DataView(new ArrayBuffer(4))),Ee.setFloat32(0,e),Ee.getFloat32(0)===e}r(yo,"isFloat32");function Y(e,t){switch(typeof t){case"string":U(e,119),Fe(e,t);break;case"number":Number.isInteger(t)&&Math.abs(t)<=2147483647?(U(e,125),ft(e,t)):yo(t)?(U(e,124),dt(e,t)):(U(e,123),go(e,t));break;case"bigint":U(e,122),mo(e,t);break;case"object":if(t===null)U(e,126);else if(Array.isArray(t)){U(e,117),z(e,t.length);for(let n=0;n<t.length;n++)Y(e,t[n]);}else if(t instanceof Uint8Array)U(e,116),Se(e,t);else {U(e,118);let n=Object.keys(t);z(e,n.length);for(let o=0;o<n.length;o++){let i=n[o];Fe(e,i),Y(e,t[i]);}}break;case"boolean":U(e,t?120:121);break;default:U(e,127);}}r(Y,"writeAny");var kn="Unexpected end of array",Sn="Integer out of Range",wt=class wt{constructor(t){this.arr=t,this.pos=0;}};r(wt,"Decoder");var mt=wt;function Me(e){return new mt(e)}r(Me,"createDecoder");function yt(e,t){let n=ae(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n}r(yt,"readUint8Array");function Q(e){let t=0,n=1,o=e.arr.length;for(;e.pos<o;){let i=e.arr[e.pos++];if(t=t+(i&127)*n,n*=128,i<128)return t;if(t>Number.MAX_SAFE_INTEGER)throw new Error(Sn)}throw new Error(kn)}r(Q,"readVarUint");function Be(e){return yt(e,Q(e))}r(Be,"readVarUint8Array");function le(e){return e.arr[e.pos++]}r(le,"readUint8");function Rn(e){let t=e.arr[e.pos]+(e.arr[e.pos+1]<<8);return e.pos+=2,t}r(Rn,"readUint16");function Mn(e){let t=e.arr[e.pos]+(e.arr[e.pos+1]<<8)+(e.arr[e.pos+2]<<16)+(e.arr[e.pos+3]<<24)>>>0;return e.pos+=4,t}r(Mn,"readUint32");function ht(e){let t=e.arr[e.pos++],n=t&63,o=64,i=(t&64)>0?-1:1;if(!(t&128))return i*n;let s=e.arr.length;for(;e.pos<s;){if(t=e.arr[e.pos++],n=n+(t&127)*o,o*=128,t<128)return i*n;if(n>Number.MAX_SAFE_INTEGER)throw new Error(Sn)}throw new Error(kn)}r(ht,"readVarInt");function ho(e){let t=Q(e);if(t===0)return "";{let n=String.fromCodePoint(le(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(le(e));else for(;t>0;){let o=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+o);e.pos+=o,n+=String.fromCodePoint.apply(null,i),t-=o;}return decodeURIComponent(escape(n))}}r(ho,"_readVarStringPolyfill");function Re(e){let t=Cn();return t?t.decode(Be(e)):ho(e)}r(Re,"readVarString");function bt(e,t){let n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n}r(bt,"readFromDataView");function xt(e){return bt(e,4).getFloat32(0,!1)}r(xt,"readFloat32");function bo(e){return bt(e,8).getFloat64(0,!1)}r(bo,"readFloat64");function xo(e){return bt(e,8).getBigInt64(0,!1)}r(xo,"readBigInt64");var wo=[e=>{},e=>null,ht,xt,bo,xo,e=>!1,e=>!0,Re,e=>{let t=Q(e),n={};for(let o=0;o<t;o++){let i=Re(e);n[i]=X(e);}return n},e=>{let t=Q(e),n=[];for(let o=0;o<t;o++)n.push(X(e));return n},Be];function X(e){return wo[127-le(e)](e)}r(X,"readAny");var Tt=class Tt{async encode(t){let n=Pe();return Y(n,t),Ie(n)}async decode(t){return X(Me(v(t)))}};r(Tt,"BinaryEncoder");var Bn=Tt;function Uc(e){let t=Pe();return Y(t,e),Ie(t)}r(Uc,"encodeJson");function Dc(e){return X(Me(v(e)))}r(Dc,"decodeJson");function Ec(e){let t=Pe();return e!=null&&ke(t,v(e)),{writeBytes:(n,o)=>{let i=v(n);An(!(o!=null&&i.length!==o),`Expected ${o} bytes, got ${i.length}`),ke(t,i);},writeBytesVar:n=>Se(t,v(n)),writeUintVar:n=>z(t,n),writeUint8:n=>Fn(t,n),writeUint16:n=>Pn(t,n),writeUint32:n=>In(t,n),writeIntVar:n=>ft(t,n),writeFloat:n=>dt(t,n),writeStringVar:n=>Fe(t,n),write:n=>Y(t,n),getUint8Array:()=>Ie(t),getLength:()=>lt(t)}}r(Ec,"createBinaryStreamEncoder");function Fc(e){let t=Me(v(e));return {readBytes:n=>yt(t,n),readBytesVar:()=>Be(t),readUintVar:()=>Q(t),readUint8:()=>le(t),readUint16:()=>Rn(t),readUint32:()=>Mn(t),readIntVar:()=>ht(t),readFloat:()=>xt(t),readStringVar:()=>Re(t),read:()=>X(t),getOffset:()=>t.pos||0}}r(Fc,"createBinaryStreamDecoder");function Pc(e=0){return {setBit:(t,n=!0)=>n?e|=1<<t:e&=~(1<<t),unsetBit:t=>e&=1<<t,toggleBit:t=>e^=1<<t,getBit:t=>(e&1<<t)!==0,getValue:()=>e}}r(Pc,"bitfield");async function To(e){return await e.arrayBuffer()}r(To,"blobToArrayBuffer");async function Ic(e){let t=await To(e);if(t!=null)return v(t)}r(Ic,"blobToUint8Array");function ee(e=16){let t=new Uint8Array(e);if(typeof crypto<"u"&&crypto.getRandomValues)crypto.getRandomValues(t);else for(let n=0;n<e;n++)t[n]=Math.floor(Math.random()*256);return t}r(ee,"randomUint8Array");var $n="SHA-256",Lt="AES-GCM",On="PBKDF2",Lo=1e5;async function Mc(e,t=$n){return v(await crypto.subtle.digest(t,v(e)))}r(Mc,"digest");async function Bc(e,t={}){let n=v(e),o=await crypto.subtle.importKey("raw",n,On,!1,["deriveKey"]);return await crypto.subtle.deriveKey({name:On,salt:t.salt?v(t.salt):new Uint8Array(0),iterations:t.iterations??Lo,hash:$n},o,{name:Lt,length:256},!0,["encrypt","decrypt"])}r(Bc,"deriveKeyPbkdf2");function _n(){return new Uint8Array([1,1])}r(_n,"getMagicId");async function Vn(e,t){let n=_n(),o=ee(12),i=await crypto.subtle.encrypt({name:Lt,iv:o},t,e),s=new Uint8Array(i),a=n.length+o.length+s.length,c=new Uint8Array(a),u=0;return c.set(n,u),u+=n.length,c.set(o,u),u+=o.length,c.set(s,u),c}r(Vn,"encrypt");async function Nn(e,t){let n=e.subarray(0,2);if(!qt(n,_n()))return Promise.reject(new Error(`Unknown magic ${n}`));let o=e.subarray(2,14),i=e.subarray(14,e.length),s=await crypto.subtle.decrypt({name:Lt,iv:o},t,i);return new Uint8Array(s)}r(Nn,"decrypt");var Ao=",";function Vc(e,t={}){let{separator:n=Ao}=t,o="";for(let i=0;i<e.length;i++)o+=`${e[i].map(s=>{if(s==null||s==="")return "";if(an(s))return s?1:0;let a=String(s);return (xe(s)||_(s))&&(a=M(s)),a.includes('"')||a.includes(`
|
|
5
|
+
${i.stack}`:`${i.name||"Error"}: ${i.message}`;try{return o?JSON.stringify(i,null,2):JSON.stringify(i)}catch{}}return String(i)})}r(Lr,"formatMessages");function ps(e,t={}){return Lr(e,t).join(" ")}r(ps,"renderMessages");function ds(e){try{return decodeURIComponent(escape(e))}catch{}return e}r(ds,"fixBrokenUth8String");function hs(e){if(e.startsWith("data:"))return me(e.split(",",2)[1])}r(hs,"dataUriToUint8Array");function bs(e){if(e.startsWith("data:"))return e.slice(5).split(",",2)[0]}r(bs,"dataUriToMimeType");function xs(e){if(e.startsWith("data:")){let[t,n]=e.slice(5).split(",",2);return new Blob([me(n)],{type:t})}}r(xs,"dataUriToBlob");async function ws(e){let t=await e.arrayBuffer();if(t)return `data:${e.type},${oe(t)}`}r(ws,"blobToDataUri");function Ts(e,t="application/octet-stream"){return `data:${t},${oe(e)}`}r(Ts,"Uint8ArrayToDataUri");function Yt(){let e,t;return [new Promise((o,i)=>{e=o,t=i;}),e,t]}r(Yt,"createPromise");async function vs(e){return new Promise(t=>setTimeout(t,e))}r(vs,"sleep");async function Cs(){return new Promise(e=>setTimeout(e,0))}r(Cs,"immediate");async function Us(e,t,n="timeoutReached"){return new Promise(async(o,i)=>{let s=!1,a=setTimeout(()=>{s=!0,o(n);},t);try{let c=await e;clearTimeout(a),s||o(c);}catch(c){clearTimeout(a),s||i(c);}})}r(Us,"timeout");function Ds(e){return e==="timeoutReached"||e?.name==="Timeout reached"}r(Ds,"isTimeout");async function Qt(e,t){return t<=0?await e:new Promise(async(n,o)=>{let i=!1,s=setTimeout(()=>{i=!0,o(new Error("Timeout reached"));},t);try{let a=await e;clearTimeout(s),i||n(a);}catch(a){clearTimeout(s),i||o(a);}})}r(Qt,"tryTimeout");function Es(e,t,n=1e3){return new Promise((o,i)=>{let s=r(u=>{c&&(clearTimeout(c),a(),o(u));},"fn"),a=r(()=>{c=null,e.off?e.off(t,s):e.removeEventListener&&e.removeEventListener(t,s);},"done"),c=setTimeout(()=>{a(),i(new Error("Did not response in time"));},n);e.on?e.on(t,s):e.addEventListener&&e.addEventListener(t,s);})}r(Es,"waitOn");function k(e){return !!(e&&(e instanceof Promise||typeof e.then=="function"))}r(k,"isPromise");function j(e){return Promise.resolve(e)}r(j,"promisify");var Xt=864e5;function nt(e){return Math.floor(e/1e4)}r(nt,"dayYear");function en(e){return Math.floor(e/100%100)}r(en,"dayMonth");function Ar(e){return Math.floor(e%100)}r(Ar,"dayDay");function Is(e){return [nt(e),en(e),Ar(e)]}r(Is,"dayToParts");function tn(e,t=!1){return t?new Date(`${Cr(e)}T00:00:00.000Z`):new Date(e/1e4,e/100%100-1,e%100)}r(tn,"dayToDate");function nn(){return be(new Date)}r(nn,"dayFromToday");function ks(e,t=!1){if(typeof e=="number")return e<100?void 0:e;if(typeof e=="string")return rn(e);if(Array.isArray(e)&&e.length===3){let[n,o,i]=e;return rt(n,o,i)}else if(e instanceof Date)return be(e,t)}r(ks,"dayFromAny");function Ss(e){return tn(e,!0)}r(Ss,"dayToDateGMT");function be(e,t=!1){return t?rn(e.toISOString()):e.getFullYear()*1e4+(e.getMonth()+1)*100+e.getDate()}r(be,"dayFromDate");function Rs(e){return be(e,!0)}r(Rs,"dayFromDateGMT");function tt(e,t=!0){return tn(e,t).getTime()}r(tt,"dayToTimestamp");function vr(e,t=!0){return be(new Date(e),t)}r(vr,"dayFromTimestamp");function Cr(e,t="-"){let n=String(e);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}r(Cr,"dayToString");function rt(e,t=1,n=1){if(!(t<1||t>12||n<1||n>31))return e*1e4+t*100+n}r(rt,"dayFromParts");function rn(e){let t=String(e).replace(/[^0-9]/g,"").slice(0,8);if(t.length===8)return +t}r(rn,"dayFromString");function Ms(e,t=0){let n=nt(e),o=en(e);return t!==0&&(o+=t,n+=Math.floor((o-1)/12),o=Math.floor((o-1)%12)+1,o===0&&(o=12)),rt(n,o,1)}r(Ms,"dayMonthStart");function Bs(e,t=0){let n=nt(e);return rt(n+t,1,1)}r(Bs,"dayYearStart");function he(e,t){return vr(tt(e)+t*864e5)}r(he,"dayOffset");function Os(e,t){return Math.round((tt(t)-tt(e))/864e5)}r(Os,"dayDiff");function $s(e,t){let n=[];for(t==null&&(t=nn()),e<0&&(e=he(t,e+1));e<=t;)n.push(e),e=he(e,1);return n}r($s,"dayRange");function*_s(e,t){let n=[];for(t==null&&(t=nn()),e<0&&(e=he(t,e+1));e<=t;)yield e,e=he(e,1);return n}r(_s,"dayIterator");var D=class D{get value(){return this.days}constructor(t){if(typeof t=="number"){this.days=t;return}if(t!=null&&(t=D.from(t)?.days),t==null){let n=new Date;this.days=n.getFullYear()*1e4+(n.getMonth()+1)*100+n.getDate();}else this.days=t;}static fromNumber(t){return new D(t)}static fromString(t){return D.from(+t.replace(/[^0-9]/g,"").slice(0,8))}static fromDate(t,n=!1){return n?D.fromString(t.toISOString().substr(0,10)):D.from(t.getFullYear()*1e4+(t.getMonth()+1)*100+t.getDate())}static fromDateGMT(t){return D.fromDate(t,!0)}static from(t,n=!1){if(typeof t=="number")return t<100?void 0:new D(t);if(typeof t=="string")return D.fromString(t);if(Array.isArray(t)&&t.length===3){let[o,i=1,s=1]=t;return i<1||i>12||s<1||s>31?void 0:new D(o*1e4+i*100+s)}else {if(t instanceof Date)return D.fromDate(t,n);if(t instanceof D)return t}}toNumber(){return this.days}toJson(){return this.days}toString(t="-"){let n=String(this.days);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}toDate(t=!1){return t?new Date(`${this.toString()}T00:00:00.000Z`):new Date(this.days/1e4,this.days/100%100-1,this.days%100)}toDateGMT(){return this.toDate(!0)}get year(){return Math.floor(this.days/1e4)}get month(){return Math.floor(this.days/100%100)}get day(){return Math.floor(this.days%100)}dayOffset(t){return D.fromDateGMT(new Date(this.toDateGMT().getTime()+t*864e5))}monthStart(){return D.from([this.year,this.month,1])}yearStart(){return D.from([this.year,1,1])}monthOffset(t){let n=this.month+t,o=Math.floor((n-1)%12)+1;o===0&&(o=12);let i=Math.floor((n-1)/12);return D.from([this.year+i,o,this.day])}daysUntil(t){return Math.round((new D(t)?.toDateGMT().getTime()-this.toDateGMT().getTime())/864e5)}yesterday(){return this.dayOffset(-1)}tomorrow(){return this.dayOffset(1)}};r(D,"Day");var H=D;async function Hs(e,t,n){let o=H.from(e),i=H.from(t);for(;o&&i&&o?.days<=i?.days;){let s=n(o);k(s)&&await s,o=o.dayOffset(1);}}r(Hs,"forEachDay");function zs(){return new H}r(zs,"today");function Gs(e){return new H(e)}r(Gs,"day");function qs(e){return H.fromDate(new Date(e)).days}r(qs,"dateStringToDays");function Ur(e,t=2){return +(+e).toFixed(t)}r(Ur,"decimal");function Zs(e,t=2){return +(+e/10**t).toFixed(t)}r(Zs,"decimalFromCents");function Ks(e,t=2){return Math.round(+e*10**t)}r(Ks,"decimalToCents");function Ys(e,t=2){return t*(Ur(e,t)%1)}r(Ys,"decimalCentsPart");function ta(e,t,n){let o=e[t];return o===void 0&&(o=n(t,e),e[t]=o),o}r(ta,"ensureKey");async function na(e,t,n){let o=e[t];return o===void 0&&(o=await n(t,e),e[t]=o),o}r(na,"ensureKeyAsync");function on(e){return e!=null?e.size!=null?e.size:e.length!=null?e.length:Object.keys(e).length:0}r(on,"size");function ra(e){return e!=null&&e.length>0?e[0]:void 0}r(ra,"first");function oa(e){return e!=null&&e.length>0?e[e.length-1]:void 0}r(oa,"last");function ia(e){try{if(e!=null)return Array.isArray(e)||typeof e=="string"?e.length<=0:e?.size!=null?e.size<=0:Object.keys(e).length<=0}catch(t){console.warn("Failed to check if empty for",e,t);}return !0}r(ia,"empty");function ot(e){return Object(e)!==e?e:JSON.parse(M(e))}r(ot,"cloneObject");function sa(e){return Object(e)!==e?e:JSON.parse(M(e))}r(sa,"cloneJsonObject");function aa(e){let t=new Map;return n=>{if(t.has(n))return t.get(n);let o=e(n);return t.set(n,o),o}}r(aa,"memoize");function ua(e){let t=new Map;return async(...n)=>{let o=M(n);if(t.has(o))return t.get(o);let i=await e(...n);return t.set(o,i),i}}r(ua,"memoizeAsync");function ca(e,t){let n=[];for(let o=0;o<e;o++)n.push(t(o,e));return n}r(ca,"forTimes");function O(e){return e!=null&&typeof e=="object"}r(O,"isObject");function it(e){return Object(e)!==e}r(it,"isPrimitive");function _(e){return Array.isArray(e)}r(_,"isArray");function xe(e){return O(e)&&!_(e)}r(xe,"isRecord");function da(e){return e?.constructor===Object}r(da,"isRecordPlain");function we(e){return typeof e=="string"}r(we,"isString");function sn(e){return typeof e=="number"&&!Number.isNaN(e)}r(sn,"isNumber");function ga(e){return sn(e)&&Number.isInteger(e)}r(ga,"isInteger");function ma(e){return sn(e)&&Number.isSafeInteger(e)}r(ma,"isSafeInteger");function an(e){return typeof e=="boolean"}r(an,"isBoolean");function ya(e){return e==null}r(ya,"isNullOrUndefined");function ha(e){return e==null}r(ha,"isNull");function ba(e){return O(e)&&e.constructor.name==="Uint8Array"}r(ba,"isUint8Array");function xa(e){return e!=null}r(xa,"isNotNull");function Dr(e){return e==null||e===""||O(e)&&on(e)<=0}r(Dr,"isEmpty");function wa(e){return !Dr(e)}r(wa,"isNotEmpty");function Ta(e){return e!=null&&e!==!1&&e!==!0}r(Ta,"isValue");function La(e){return e!=null&&e!==!1&&e!==0&&e!==""}r(La,"isTruthy");function Er(e,t,n=new WeakSet){if(e===t)return !0;if(n.has(t)||(it(t)||n.add(t),!(e instanceof Object)||!(t instanceof Object))||e.constructor!==t.constructor||e.length!==t.length)return !1;for(let o in e){if(!e.hasOwnProperty(o))continue;if(!t.hasOwnProperty(o))return !1;let i=e[o],s=t[o];if(!Er(i,s,n))return !1}for(let o in t)if(t.hasOwnProperty(o)&&!e.hasOwnProperty(o))return !1;return !0}r(Er,"deepEqual");function Fr(e,t=new WeakSet){if(t.has(e))return "[Circular ~]";if(it(e)||t.add(e),xe(e)){for(let n in e)if(e.hasOwnProperty(n)){if(e[n]===void 0){delete e[n];continue}Fr(e[n],t);}}else if(_(e))for(let n=e.length-1;n>=0;n--)e[n]===void 0&&e.splice(n,1);return e}r(Fr,"deepStripUndefinedInPlace");function Te(e,...t){for(let n of t)O(e)||(e={}),!(n==null||!O(n))&&Object.keys(n).forEach(o=>{let i=e[o],s=n[o];Array.isArray(i)&&Array.isArray(s)?e[o]=i.concat(s):O(i)&&O(s)?e[o]=Te(Object.assign({},i),s):e[o]=s;});return e}r(Te,"deepMerge");function Pr(e,t,n={cyclesFix:!0},o=[]){let i=[],s=Array.isArray(e);for(let c in e){let u=e[c],l=s?+c:c;if(!(c in t)){i.push({type:"del",path:[l]});continue}let p=t[c],f=typeof u=="object"&&typeof p=="object";if(u&&p&&f&&!["Date","RegExp","String","Number"].includes(Object.getPrototypeOf(u).constructor.name)&&(!n.cyclesFix||!o.includes(u))){let m=Pr(u,p,n,n.cyclesFix?o.concat([u]):[]);i=[...i,...m.map(g=>(g.path.unshift(l),g))];}else u!==p&&!(f&&(Number.isNaN(u)?`${u}`==`${p}`:+u==+p))&&i.push({path:[l],type:"upd",value:p});}let a=Array.isArray(t);for(let c in t)c in e||i.push({type:"new",path:[a?+c:c],value:t[c]});return i}r(Pr,"diffObjects");function un(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""")}r(un,"escapeHTML");function Pa(e){return e.replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&/gi,"&")}r(Pa,"unescapeHTML");function Sa(e,t,n=[]){return e.filter(o=>!t.some(i=>!i(o))).map(o=>{for(let i of n)o=i(o);return o}).filter(o=>o!=null)}r(Sa,"listQuery");function Ra(e,t){return e.reduce((n,o)=>{let i=String(o[t]);return (n[i]=n[i]||[]).push(o),n},{})}r(Ra,"listGroupBy");function Ma(e,t){return Array.from(e.reduce((n,o)=>n.add(o[t]),new Set))}r(Ma,"listDistinctUnion");function Ba(e,t){return e.map(n=>n[t])}r(Ba,"listOfKey");function Va(e,t){return O(e)?Object.fromEntries(Object.entries(e).map(([n,o])=>{let i=t(n,o);return _(i)&&i.length===2?i:[n,i]}).filter(n=>n!=null)):{}}r(Va,"objectMap");function Na(e,t){return t.dispose&&e.dispose&&t.dispose.add(e.dispose),Object.assign(e,t)}r(Na,"objectMergeDisposable");function ja(e){return Object.keys(e).length<=0}r(ja,"objectIsEmpty");var Ir=/[\\\-\[\]\/{}()*+?.^$|]/g;function Le(e){return e?e instanceof RegExp?e.source:e.replace(Ir,"\\$&"):""}r(Le,"escapeRegExp");var kr=100,Sr=/^\.+/,Rr=/\.+$/,Mr=/[<>:\"/\\|?*\u0000-\u001F\u0080-\u009F]+/gm;function cn(){return Mr}r(cn,"filenameReservedRegex");function Br(){return /^(con|prn|aux|nul|com\d|lpt\d)$/i}r(Br,"windowsReservedNameRegex");function Ja(e,t="_"){if(typeof e!="string")throw new TypeError("Expected a string");if(cn().test(t))throw new Error("Replacement string cannot contain reserved filename characters");let n=`(${Le(t)})+`;return e=e.replace(cn(),t).replace(Sr,t).replace(Rr,"").replace(new RegExp(n,"gm"),t).trim(),e=Br().test(e)?e+t:e,e.slice(0,kr)}r(Ja,"toValidFilename");function ie(e){return Math.abs(e)%1===.5}r(ie,"isHalf");function ln(e){return e%2===0}r(ln,"isEven");var Ya=r(e=>Math.ceil(e),"roundUp"),Qa=r(e=>Math.floor(e),"roundDown"),Xa=r(e=>Math.round(e),"roundHalfUp"),eu=r(e=>{let t=Math.round(e);return ie(e)&&ln(t)?t-1:t},"roundHalfOdd"),tu=r(e=>ie(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e),"roundHalfAwayFromZero"),nu=r(e=>ie(e)?Math.floor(e):Math.round(e),"roundHalfDown"),ru=r(e=>{let t=Math.round(e);return ie(e)?ln(t)?t:t-1:t},"roundHalfEven"),ou=r(e=>ie(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e),"roundHalfTowardsZero");function fn(e){return e.reduce((t,n)=>Math.min(t,n.sort_weight||0),0)-1-I()}r(fn,"startSortWeight");function pn(e){return e.reduce((t,n)=>Math.max(t,n.sort_weight||0),0)+1+I()}r(pn,"endSortWeight");function uu(e,t,n){let o=n.length,i=e<t;if(o<=0||e>=o-1)return pn(n);if(e<=0)return fn(n);n=Or([...n]);let s=i?-1:0,a=n[e+s].sort_weight||0,u=(n[e+s+1].sort_weight||0)-a;if(u===0)return i?fn(n):pn(n);let l=a+u/2,p=u*.01*(I()-.5);return l+p}r(uu,"moveSortWeight");function Or(e){return e.sort((t,n)=>(t.sort_weight||0)-(n.sort_weight||0)),e}r(Or,"sortedItems");function pu(e={}){let{getter:t=r(c=>c.sort,"getter")}=e;function n(c){return c.sort((u,l)=>(t(u)||0)-(t(l)||0)),c}r(n,"items");function o(c){return c.reduce((u,l)=>Math.min(u,t(l)||0),0)-1-I()}r(o,"start");function i(c){return c.reduce((u,l)=>Math.max(u,t(l)||0),0)+1+I()}r(i,"end");function s(c,u){c==null&&(c=(u??0)-1),u==null&&(u=(c??0)+1);let l=u-c,p=c+l/2,f=l*.01*(I()-.5);return p+f}r(s,"between");function a(c,u,l){let p=l.length,f=c<u;if(p<=0||c>=p-1)return i(l);if(c<=0)return o(l);l=n([...l]);let m=f?-1:0,g=t(l[c+m])||0,x=(t(l[c+m+1])||0)-g;if(x===0)return f?o(l):i(l);let T=g+x/2,y=x*.01*(I()-.5);return T+y}return r(a,"move"),{start:o,end:i,between:s,move:a,items:n}}r(pu,"useSorted");function $r(e){return t=>e?.[t]}r($r,"basePropertyOf");var _r={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Vr=$r(_r),Nr=/[\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0100-\u017F]/g,jr="\\u0300-\\u036f",Hr="\\ufe20-\\ufe2f",zr="\\u20d0-\\u20ff",Gr="\\u1ab0-\\u1aff",qr="\\u1dc0-\\u1dff",Wr=jr+Hr+zr+Gr+qr,Jr=`[${Wr}]`,Zr=RegExp(Jr,"g");function dn(e){return e&&e.replace(Nr,Vr).replace(Zr,"")}r(dn,"deburr");var Kr=/((?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00A1-\uFFFF][a-z0-9\u00A1-\uFFFF_-]{0,62})?[a-z0-9\u00A1-\uFFFF]\.)+(?:[a-z\u00A1-\uFFFF]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?)/gim;function bu(e){return e.split(Kr).map((t,n)=>{let o=un(t);return n%2?`<a target="_blank" href="${o}">${Yr(o)}</a>`:o}).join("")}r(bu,"linkifyPlainText");function Yr(e){return e.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")}r(Yr,"toHumanReadableUrl");function gn(e,t){let n=[];for(let[o,i]of Object.entries(e))if(i!=null){Array.isArray(i)||(i=[i]);for(let s of i)t&&!t(s)||s!=null&&n.push(`${encodeURIComponent(o)}=${encodeURIComponent(String(s))}`);}return n.join("&")}r(gn,"encodeQuery");function xu(e){let t={},n=(e[0]==="?"?e.substr(1):e).split("&");for(let o=0;o<n.length;o++){let i=n[o].split("="),s=decodeURIComponent(i[0]),a=decodeURIComponent(i[1]||"");t[s]!=null?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(a)):t[s]=a;}return t}r(xu,"parseQuery");var mn=["aardvark","absurd","accrue","acme","adrift","adult","afflict","ahead","aimless","Algol","allow","alone","ammo","ancient","apple","artist","assume","Athens","atlas","Aztec","baboon","backfield","backward","basalt","beaming","bedlamp","beehive","beeswax","befriend","Belfast","berserk","billiard","bison","blackjack","blockade","blowtorch","bluebird","bombast","bookshelf","brackish","breadline","breakup","brickyard","briefcase","Burbank","button","buzzard","cement","chairlift","chatter","checkup","chisel","choking","chopper","Christmas","clamshell","classic","classroom","cleanup","clockwork","cobra","commence","concert","cowbell","crackdown","cranky","crowfoot","crucial","crumpled","crusade","cubic","deadbolt","deckhand","dogsled","dosage","dragnet","drainage","dreadful","drifter","dropper","drumbeat","drunken","Dupont","dwelling","eating","edict","egghead","eightball","endorse","endow","enlist","erase","escape","exceed","eyeglass","eyetooth","facial","fallout","flagpole","flatfoot","flytrap","fracture","fragile","framework","freedom","frighten","gazelle","Geiger","Glasgow","glitter","glucose","goggles","goldfish","gremlin","guidance","hamlet","highchair","hockey","hotdog","indoors","indulge","inverse","involve","island","Janus","jawbone","keyboard","kickoff","kiwi","klaxon","lockup","merit","minnow","miser","Mohawk","mural","music","Neptune","newborn","nightbird","obtuse","offload","oilfield","optic","orca","payday","peachy","pheasant","physique","playhouse","Pluto","preclude","prefer","preshrunk","printer","profile","prowler","pupil","puppy","python","quadrant","quiver","quota","ragtime","ratchet","rebirth","reform","regain","reindeer","rematch","repay","retouch","revenge","reward","rhythm","ringbolt","robust","rocker","ruffled","sawdust","scallion","scenic","scorecard","Scotland","seabird","select","sentence","shadow","showgirl","skullcap","skydive","slingshot","slothful","slowdown","snapline","snapshot","snowcap","snowslide","solo","spaniel","spearhead","spellbind","spheroid","spigot","spindle","spoilage","spyglass","stagehand","stagnate","stairway","standard","stapler","steamship","stepchild","sterling","stockman","stopwatch","stormy","sugar","surmount","suspense","swelter","tactics","talon","tapeworm","tempest","tiger","tissue","tonic","tracker","transit","trauma","treadmill","Trojan","trouble","tumor","tunnel","tycoon","umpire","uncut","unearth","unwind","uproot","upset","upshot","vapor","village","virus","Vulcan","waffle","wallet","watchword","wayside","willow","woodlark","Zulu"],yn=["adroitness","adviser","aggregate","alkali","almighty","amulet","amusement","antenna","applicant","Apollo","armistice","article","asteroid","Atlantic","atmosphere","autopsy","Babylon","backwater","barbecue","belowground","bifocals","bodyguard","borderline","bottomless","Bradbury","Brazilian","breakaway","Burlington","businessman","butterfat","Camelot","candidate","cannonball","Capricorn","caravan","caretaker","celebrate","cellulose","certify","chambermaid","Cherokee","Chicago","clergyman","coherence","combustion","commando","company","component","concurrent","confidence","conformist","congregate","consensus","consulting","corporate","corrosion","councilman","crossover","cumbersome","customer","Dakota","decadence","December","decimal","designing","detector","detergent","determine","dictator","dinosaur","direction","disable","disbelief","disruptive","distortion","divisive","document","embezzle","enchanting","enrollment","enterprise","equation","equipment","escapade","Eskimo","everyday","examine","existence","exodus","fascinate","filament","finicky","forever","fortitude","frequency","gadgetry","Galveston","getaway","glossary","gossamer","graduate","gravity","guitarist","hamburger","Hamilton","handiwork","hazardous","headwaters","hemisphere","hesitate","hideaway","holiness","hurricane","hydraulic","impartial","impetus","inception","indigo","inertia","infancy","inferno","informant","insincere","insurgent","integrate","intention","inventive","Istanbul","Jamaica","Jupiter","leprosy","letterhead","liberty","maritime","matchmaker","maverick","Medusa","megaton","microscope","microwave","midsummer","millionaire","miracle","misnomer","molasses","molecule","Montana","monument","mosquito","narrative","nebula","newsletter","Norwegian","October","Ohio","onlooker","opulent","Orlando","outfielder","Pacific","pandemic","pandora","paperweight","paragon","paragraph","paramount","passenger","pedigree","Pegasus","penetrate","perceptive","performance","pharmacy","phonetic","photograph","pioneer","pocketful","politeness","positive","potato","processor","prophecy","provincial","proximate","puberty","publisher","pyramid","quantity","racketeer","rebellion","recipe","recover","repellent","replica","reproduce","resistor","responsive","retraction","retrieval","retrospect","revenue","revival","revolver","Sahara","sandalwood","sardonic","Saturday","savagery","scavenger","sensation","sociable","souvenir","specialist","speculate","stethoscope","stupendous","supportive","surrender","suspicious","sympathy","tambourine","telephone","therapist","tobacco","tolerance","tomorrow","torpedo","tradition","travesty","trombonist","truncated","typewriter","ultimate","undaunted","underfoot","unicorn","unify","universe","unravel","upcoming","vacancy","vagabond","versatile","vertigo","Virginia","visitor","vocalist","voyager","warranty","Waterloo","whimsical","Wichita","Wilmington","Wyoming","yesteryear","Yucatan"];function vu(e,t=" ",n=" "){return Array.from(e).map((o,i)=>i%2?yn[o]+n:mn[o]+t).join("").slice(0,-(e.length%2?t:n).length)}r(vu,"Uint8ArrayToWords");function Cu(e){return v(e.map((t,n)=>(n%2?yn:mn).findIndex(o=>o.toLocaleLowerCase()===dn(t).toLocaleLowerCase().trim())))}r(Cu,"wordsToUint8Array");var Qr=/\\\s|\s+|#[^\n]*\n?/gm,Xr=/\(\?P?<(\w[\w\d_]+)>|\((?!\?(:|\!|=|<=|<\!))/gm,hn=/^((?:\(\?[\w$]+\))?)\(\?<([=!])([\s\S]*?)\)/gm;function eo(e){return typeof e=="string"?e:e.source||""}r(eo,"regExpString");function Eu(e){return e.replace(/[-\[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}r(Eu,"regExpEscape");var st=class st{constructor(t,n){this.namedGroups={};this.names=[];let o=n??"",i;if(t instanceof RegExp?(n==null&&(o=t.flags),i=t.source):i=t,o&&o.includes("x")&&(o=o.replace("x",""),i=i.replace(Qr,c=>c[0]==="\\"?c:"")),!(t instanceof RegExp)){let c=0;i=i.replace(Xr,(u,l)=>(c+=1,l?(l!=="index"&&l!=="length"&&!this.namedGroups[l]&&(this.namedGroups[l]=c),"("):u)),this.names=Object.keys(this.namedGroups);}i=eo(i),hn.lastIndex=0;let a=hn.exec(i);a&&(this.lookBehind={rx:new RegExp(`${a[3]}$(?!\\s)`),expect:a?a[2]==="=":!a},i=i.substr(a[0].length)),this.rx=new RegExp(i,o);}get lastIndex(){return this.rx.lastIndex}set lastIndex(t){this.rx.lastIndex=t;}_handleMatch(t){if(this.lookBehind){let n=t.input.slice(0,t.index);if(this.lookBehind.expect!==this.lookBehind.rx.test(n))return null}for(let n of this.names)t[n]=t[this.namedGroups[n]];return t}exec(t){let n;for(;n=this.rx.exec(t);)if(this.rx.lastIndex===n.index&&this.rx.lastIndex++,n=this._handleMatch(n),n!=null)return n}execAll(t){let n=[],o;for(this.rx.lastIndex=0;o=this.exec(t);)n.push(o);return this.rx.lastIndex=0,n}replace(t,n){let o=typeof n=="function"?n:()=>n;return t.replace(this.rx,i=>o(i))}};r(st,"XRX");var bn=st;function to(e){return e===!0||e==="true"||e==="1"||typeof e=="number"&&e!==0?e="*":e===!1||e==="false"||e===0||e==="0"||e==null||e==="null"||e==="undefined"?e="":e=String(e),e}r(to,"getNamespaceFilterString");function no(){return to(typeof process<"u"?process.env.ZEED??process.env.DEBUG:typeof localStorage<"u"?localStorage.zeed??localStorage.debug:"*")}r(no,"getDefaultNamespaceFilter");function J(e=no()){let t,n=[],o=[];if(!e)t=r(function(i){return !1},"fn");else if(e==="*")t=r(function(i){return !0},"fn");else {let i,s=e.split(/[\s,]+/),a=s.length;for(i=0;i<a;i++){if(!s[i])continue;let c=s[i].replace(/\*/g,".*?");c[0]==="-"?n.push(new RegExp(`^${c.substr(1)}`)):o.push(new RegExp(`^${c}`));}t=r(function(c){if(n.length===0&&o.length===0)return !0;let u,l;for(u=0,l=n.length;u<l;u++)if(n[u].test(c))return !1;for(u=0,l=o.length;u<l;u++)if(o[u].test(c))return !0;return !1},"fn");}return t.accept=o,t.reject=n,t.filter=e,t}r(J,"useNamespaceFilter");function ro(){return typeof process<"u"?process.env.ZEED_LEVEL??process.env.LEVEL??process.env.DEBUG_LEVEL:typeof localStorage<"u"?localStorage.zeed_level??localStorage.level??localStorage.debug_level:void 0}r(ro,"getDefaultLevelFilter");function at(e){if(e===!1)return 9007199254740991;if(typeof e=="number")return e;if(typeof e=="string"){let t=_t[e.toLocaleLowerCase().trim()];if(t!=null)return t}return -1}r(at,"parseLogLevel");function Ae(e=ro()){let t=at(e);return n=>n>=t}r(Ae,"useLevelFilter");function se(...e){return we(e[1])?[`${String(e[0])} ${String(e[1])}`,...e.slice(2)]:e}r(se,"joinLogStrings");function ve(e={}){let{level:t=void 0,filter:n=void 0}=e,o=J(n),i=Ae(t);return s=>{if(!i(s.level)||!o(s.name))return;let a=s.name?`[${s.name}]`:"";switch(s.level){case 1:console.info(...se(`I|* ${a}`,...s.messages));break;case 2:console.warn(...se(`W|** ${a}`,...s.messages));break;case 3:console.error(...se(`E|*** ${a}`,...s.messages));break;default:console.debug(...se(`D| ${a}`,...s.messages));break}}}r(ve,"LoggerConsoleHandler");function xn(e=""){let t=[ve()],n=r(u=>!0,"logCheckNamespace"),o=!1,i=a,s=!1;function a(u="",l){let p=at(l??-1);function f(d,x){return p<=d?x:()=>{}}r(f,"defineForLogLevel");let m=r(d=>{if(n(u))for(let x of t)x&&x(d);},"emit"),g=f(0,(...d)=>{m({name:u,messages:d,level:0});});return g.label=u,g.extend=function(d){return i(u?`${u}:${d}`:d)},g.debug=f(0,(...d)=>{m({name:u,messages:d,level:0});}),g.info=f(1,(...d)=>{m({name:u,messages:d,level:1});}),g.warn=f(2,(...d)=>{m({name:u,messages:d,level:2});}),g.error=f(3,(...d)=>{m({name:u,messages:d,level:3});}),g.fatal=f(4,(...d)=>{throw m({name:u,messages:d,level:4}),new Error(`${d.map(String).join(" ")}`)}),g.assert=f(4,(d,...x)=>{(d==null||typeof d=="number"&&Number.isNaN(d)||!d)&&g.fatal(...x);}),g}r(a,"LoggerBaseFactory");function c(u="",l){let p=i(u,l);return s&&p.debug(`+++ init of logger "${u}" on level "${p.level}".`),p}return r(c,"Logger"),c.registerHandler=function(u){t.push(u);},c.setFilter=function(u){n=J(u);},c.setLock=(u=!0)=>o=u,c.setDebug=(u=!0)=>s=u,c.setHandlers=function(u=[]){i!==a&&(i=a),!o&&(t=[...u].filter(l=>typeof l=="function"));},c.level=-1,c.setLogLevel=function(u=-1){o||(c.level=u);},c.setFactory=function(u){o||(i=u);},c}r(xn,"LoggerContext");var V;function ut(e){let t=xn();return e?e(t):t.setHandlers([ve()]),t}r(ut,"getLoggerContext");function oo(e){if(V==null)try{let t=q();t!=null?t?.logger==null?(V=ut(e),t.logger=V):V=t.logger:V=ut(e);}catch{V=ut(e);}return V}r(oo,"getGlobalLogger");function wn(){if(V!=null)return V;try{let e=q();if(e?.logger!=null)return e.logger}catch{}}r(wn,"getGlobalLoggerIfExists");function S(e,t){return oo()(e,t)}r(S,"DefaultLogger");var Tn=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Wu(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Tn[Math.abs(t)%Tn.length]}r(Wu,"browserSelectColorByName");function Ce(){return Date.now()}r(Ce,"getTimestamp");function io(e){return e>999?`${(e/1e3).toFixed(1)} s`:`${e.toFixed(2)} ms`}r(io,"formatMilliseconds");function Ku(...e){for(let t of e){if(t instanceof Date)return t;if(typeof t=="string"){let n=null;if(t.includes(":"))try{n=new Date(t);}catch{}if(!(n instanceof Date)){let o=/(\d\d\d\d)-(\d\d)-(\d\d)/.exec(t);o&&(n=new Date(+o[1],+o[2]-1,+o[3],12,0));}if(n instanceof Date)return n}}}r(Ku,"parseDate");function Ln(){return typeof performance<"u"?performance.now():Date.now()}r(Ln,"getPerformanceTimestamp");function Yu(){let e=Ln();return function(){let t=Ln()-e;return io(t)}}r(Yu,"duration");function nc(e){let{level:t=void 0,filter:n=void 0,messages:o=[]}=e,i=J(n),s=Ae(t);return a=>{s(a.level)&&i(a.name)&&(a.timestamp=Ce(),o.push(a));}}r(nc,"LoggerMemoryHandler");function so(...e){throw wn()?.("assert")?.fatal(...e),new Error(`${e.map(String).join(" ")}`)}r(so,"fatal");function ao(e,...t){(e==null||typeof e=="number"&&Number.isNaN(e)||!e)&&so(...t);}r(ao,"assert");function An(e,...t){ao(e,...t);}r(An,"assertCondition");function ae(e,t,n){return new Uint8Array(e,t,n)}r(ae,"createUint8ArrayViewFromArrayBuffer");function uo(e){let t=unescape(encodeURIComponent(e)),n=t.length,o=new Uint8Array(n);for(let i=0;i<n;i++)o[i]=t.codePointAt(i);return o}r(uo,"_encodeUtf8Polyfill");var Ue;function De(){return Ue===void 0&&(Ue=typeof TextEncoder<"u"?new TextEncoder:null),Ue}r(De,"getUtf8TextEncoder");function vn(e){return De()?Ue.encode(e):uo(e)}r(vn,"encodeUtf8");var Z;function Cn(){return Z===void 0&&(Z=(typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0}))??null,Z&&Z.decode(new Uint8Array).length===1&&(Z=null)),Z}r(Cn,"getUtf8TextDecoder");var gt=class gt{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[];}};r(gt,"Encoder");var ct=gt;function Pe(){return new ct}r(Pe,"createEncoder");function lt(e){let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t}r(lt,"length");function Ie(e){let t=new Uint8Array(lt(e)),n=0;for(let o=0;o<e.bufs.length;o++){let i=e.bufs[o];t.set(i,n),n+=i.length;}return t.set(ae(e.cbuf.buffer,0,e.cpos),n),t}r(Ie,"encodeToUint8Array");function lo(e,t){let n=e.cbuf.length;n-e.cpos<t&&(e.bufs.push(ae(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(Math.max(n,t)*2),e.cpos=0);}r(lo,"verifyLen");function U(e,t){let n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t;}r(U,"write");var Fn=U;function Pn(e,t){U(e,t&255),U(e,t>>>8&255);}r(Pn,"writeUint16");function In(e,t){for(let n=0;n<4;n++)U(e,t&255),t>>>=8;}r(In,"writeUint32");function z(e,t){for(;t>127;)U(e,128|127&t),t=Math.floor(t/128);U(e,127&t);}r(z,"writeVarUint");function fo(e){return e!==0?e<0:1/e<0}r(fo,"isNegativeZero");function ft(e,t){let n=fo(t);for(n&&(t=-t),U(e,(t>63?128:0)|(n?64:0)|63&t),t=Math.floor(t/64);t>0;)U(e,(t>127?128:0)|127&t),t=Math.floor(t/128);}r(ft,"writeVarInt");function ke(e,t){let n=e.cbuf.length,o=e.cpos,i=Math.min(n-o,t.length),s=t.length-i;e.cbuf.set(t.subarray(0,i),o),e.cpos+=i,s>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(Math.max(n*2,s)),e.cbuf.set(t.subarray(i)),e.cpos=s);}r(ke,"writeUint8Array");function Se(e,t){z(e,t.byteLength),ke(e,t);}r(Se,"writeVarUint8Array");var ue,En;function po(e,t){if(ue==null&&(ue=new Uint8Array(3e4),En=ue.length/3),t.length<En){let n=De().encodeInto(t,ue).written||0;z(e,n);for(let o=0;o<n;o++)U(e,ue[o]);}else Se(e,vn(t));}r(po,"_writeVarStringNative");function go(e,t){let n=unescape(encodeURIComponent(t)),o=n.length;z(e,o);for(let i=0;i<o;i++)U(e,n.codePointAt(i));}r(go,"_writeVarStringPolyfill");function Fe(e,t){return De()?.encodeInto?po(e,t):go(e,t)}r(Fe,"writeVarString");function pt(e,t){lo(e,t);let n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n}r(pt,"writeOnDataView");function dt(e,t){return pt(e,4).setFloat32(0,t,!1)}r(dt,"writeFloat32");function mo(e,t){return pt(e,8).setFloat64(0,t,!1)}r(mo,"writeFloat64");function yo(e,t){return pt(e,8).setBigInt64(0,t,!1)}r(yo,"writeBigInt64");var Ee;function ho(e){return Ee==null&&(Ee=new DataView(new ArrayBuffer(4))),Ee.setFloat32(0,e),Ee.getFloat32(0)===e}r(ho,"isFloat32");function Y(e,t){switch(typeof t){case"string":U(e,119),Fe(e,t);break;case"number":Number.isInteger(t)&&Math.abs(t)<=2147483647?(U(e,125),ft(e,t)):ho(t)?(U(e,124),dt(e,t)):(U(e,123),mo(e,t));break;case"bigint":U(e,122),yo(e,t);break;case"object":if(t===null)U(e,126);else if(Array.isArray(t)){U(e,117),z(e,t.length);for(let n=0;n<t.length;n++)Y(e,t[n]);}else if(t instanceof Uint8Array)U(e,116),Se(e,t);else {U(e,118);let n=Object.keys(t);z(e,n.length);for(let o=0;o<n.length;o++){let i=n[o];Fe(e,i),Y(e,t[i]);}}break;case"boolean":U(e,t?120:121);break;default:U(e,127);}}r(Y,"writeAny");var kn="Unexpected end of array",Sn="Integer out of Range",wt=class wt{constructor(t){this.arr=t,this.pos=0;}};r(wt,"Decoder");var mt=wt;function Me(e){return new mt(e)}r(Me,"createDecoder");function yt(e,t){let n=ae(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n}r(yt,"readUint8Array");function Q(e){let t=0,n=1,o=e.arr.length;for(;e.pos<o;){let i=e.arr[e.pos++];if(t=t+(i&127)*n,n*=128,i<128)return t;if(t>Number.MAX_SAFE_INTEGER)throw new Error(Sn)}throw new Error(kn)}r(Q,"readVarUint");function Be(e){return yt(e,Q(e))}r(Be,"readVarUint8Array");function le(e){return e.arr[e.pos++]}r(le,"readUint8");function Rn(e){let t=e.arr[e.pos]+(e.arr[e.pos+1]<<8);return e.pos+=2,t}r(Rn,"readUint16");function Mn(e){let t=e.arr[e.pos]+(e.arr[e.pos+1]<<8)+(e.arr[e.pos+2]<<16)+(e.arr[e.pos+3]<<24)>>>0;return e.pos+=4,t}r(Mn,"readUint32");function ht(e){let t=e.arr[e.pos++],n=t&63,o=64,i=(t&64)>0?-1:1;if(!(t&128))return i*n;let s=e.arr.length;for(;e.pos<s;){if(t=e.arr[e.pos++],n=n+(t&127)*o,o*=128,t<128)return i*n;if(n>Number.MAX_SAFE_INTEGER)throw new Error(Sn)}throw new Error(kn)}r(ht,"readVarInt");function bo(e){let t=Q(e);if(t===0)return "";{let n=String.fromCodePoint(le(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(le(e));else for(;t>0;){let o=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+o);e.pos+=o,n+=String.fromCodePoint.apply(null,i),t-=o;}return decodeURIComponent(escape(n))}}r(bo,"_readVarStringPolyfill");function Re(e){let t=Cn();return t?t.decode(Be(e)):bo(e)}r(Re,"readVarString");function bt(e,t){let n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n}r(bt,"readFromDataView");function xt(e){return bt(e,4).getFloat32(0,!1)}r(xt,"readFloat32");function xo(e){return bt(e,8).getFloat64(0,!1)}r(xo,"readFloat64");function wo(e){return bt(e,8).getBigInt64(0,!1)}r(wo,"readBigInt64");var To=[e=>{},e=>null,ht,xt,xo,wo,e=>!1,e=>!0,Re,e=>{let t=Q(e),n={};for(let o=0;o<t;o++){let i=Re(e);n[i]=X(e);}return n},e=>{let t=Q(e),n=[];for(let o=0;o<t;o++)n.push(X(e));return n},Be];function X(e){return To[127-le(e)](e)}r(X,"readAny");var Tt=class Tt{async encode(t){let n=Pe();return Y(n,t),Ie(n)}async decode(t){return X(Me(v(t)))}};r(Tt,"BinaryEncoder");var Bn=Tt;function Dc(e){let t=Pe();return Y(t,e),Ie(t)}r(Dc,"encodeJson");function Ec(e){return X(Me(v(e)))}r(Ec,"decodeJson");function Fc(e){let t=Pe();return e!=null&&ke(t,v(e)),{writeBytes:(n,o)=>{let i=v(n);An(!(o!=null&&i.length!==o),`Expected ${o} bytes, got ${i.length}`),ke(t,i);},writeBytesVar:n=>Se(t,v(n)),writeUintVar:n=>z(t,n),writeUint8:n=>Fn(t,n),writeUint16:n=>Pn(t,n),writeUint32:n=>In(t,n),writeIntVar:n=>ft(t,n),writeFloat:n=>dt(t,n),writeStringVar:n=>Fe(t,n),write:n=>Y(t,n),getUint8Array:()=>Ie(t),getLength:()=>lt(t)}}r(Fc,"createBinaryStreamEncoder");function Pc(e){let t=Me(v(e));return {readBytes:n=>yt(t,n),readBytesVar:()=>Be(t),readUintVar:()=>Q(t),readUint8:()=>le(t),readUint16:()=>Rn(t),readUint32:()=>Mn(t),readIntVar:()=>ht(t),readFloat:()=>xt(t),readStringVar:()=>Re(t),read:()=>X(t),getOffset:()=>t.pos||0}}r(Pc,"createBinaryStreamDecoder");function Ic(e=0){return {setBit:(t,n=!0)=>n?e|=1<<t:e&=~(1<<t),unsetBit:t=>e&=1<<t,toggleBit:t=>e^=1<<t,getBit:t=>(e&1<<t)!==0,getValue:()=>e}}r(Ic,"bitfield");async function Lo(e){return await e.arrayBuffer()}r(Lo,"blobToArrayBuffer");async function kc(e){let t=await Lo(e);if(t!=null)return v(t)}r(kc,"blobToUint8Array");function ee(e=16){let t=new Uint8Array(e);if(typeof crypto<"u"&&crypto.getRandomValues)crypto.getRandomValues(t);else for(let n=0;n<e;n++)t[n]=Math.floor(Math.random()*256);return t}r(ee,"randomUint8Array");var $n="SHA-256",Lt="AES-GCM",On="PBKDF2",Ao=1e5;async function Bc(e,t=$n){return v(await crypto.subtle.digest(t,v(e)))}r(Bc,"digest");async function Oc(e,t={}){let n=v(e),o=await crypto.subtle.importKey("raw",n,On,!1,["deriveKey"]);return await crypto.subtle.deriveKey({name:On,salt:t.salt?v(t.salt):new Uint8Array(0),iterations:t.iterations??Ao,hash:$n},o,{name:Lt,length:256},!0,["encrypt","decrypt"])}r(Oc,"deriveKeyPbkdf2");function _n(){return new Uint8Array([1,1])}r(_n,"getMagicId");async function Vn(e,t){let n=_n(),o=ee(12),i=await crypto.subtle.encrypt({name:Lt,iv:o},t,e),s=new Uint8Array(i),a=n.length+o.length+s.length,c=new Uint8Array(a),u=0;return c.set(n,u),u+=n.length,c.set(o,u),u+=o.length,c.set(s,u),c}r(Vn,"encrypt");async function Nn(e,t){let n=e.subarray(0,2);if(!qt(n,_n()))return Promise.reject(new Error(`Unknown magic ${n}`));let o=e.subarray(2,14),i=e.subarray(14,e.length),s=await crypto.subtle.decrypt({name:Lt,iv:o},t,i);return new Uint8Array(s)}r(Nn,"decrypt");var vo=",";function Nc(e,t={}){let{separator:n=vo}=t,o="";for(let i=0;i<e.length;i++)o+=`${e[i].map(s=>{if(s==null||s==="")return "";if(an(s))return s?1:0;let a=String(s);return (xe(s)||_(s))&&(a=M(s)),a.includes('"')||a.includes(`
|
|
6
6
|
`)||a.includes(n)?`"${a.replace(/"/g,'""')}"`:a}).join(n)}
|
|
7
|
-
`;return o}r(
|
|
7
|
+
`;return o}r(Nc,"csvStringify");function Co(e,t={}){let n=/("((?:(?:[^"]*?)(?:"")?)*)"|([^,;\t\n]*))([,;\t]|\n|\r\n)/g;t.separator&&(n=new RegExp(n.source.replaceAll(",;\\t",Le(t.separator)),n.flags));let o=[],i=[],s,a=`${e.replaceAll(`\r
|
|
8
8
|
`,`
|
|
9
9
|
`).trim()}
|
|
10
10
|
`;for(;s=n.exec(a);){let c=s[2]??s[3]??"";c=c.replaceAll('""','"'),i.push(c),s[4]===`
|
|
11
|
-
`&&(o.push(i),i=[]);}return o}r(vo,"csvParse");function Nc(e,t={}){let n=vo(e,t),o=n[0];return n.slice(1).map(i=>Object.fromEntries(i.map((s,a)=>[o[a],s])))}r(Nc,"csvParseToObjects");function Co(e){let t;if(typeof e=="function"?t=e():k(e)?t=e:typeof e.dispose=="function"?t=e.dispose():k(e.dispose)&&(t=e.dispose),k(t))return t}r(Co,"callDisposer");function te(e){let t=e;t!=null&&(we(t)?t={name:t}:"debug"in t&&"label"in t&&(t={name:t.label,log:t}));let n=t?.name,o=t?.log??S("zeed:dispose"),i=0,s=[];function a(p){if(p!=null&&s.includes(p)){Ze(s,m=>m!==p);let f=Co(p);if(k(f))return f}}r(a,"untrack");function c(p){if(p!=null)return s.unshift(p),()=>a(p)}r(c,"track");function u(p=!1){n&&o.debug(`dispose "${n}": ${s.length} entries`),i+=1;let f=[];for(;s.length>0;){let m=s[0],g=a(m);if(k(g)){if(p)throw new Error(`Async disposable found: ${m} -> ${g}`);f.push(g);}}if(f.length>0)return Promise.all(f)}r(u,"dispose");function l(){u(!0);}return r(l,"disposeSync"),Object.assign(u,{disposed:i,add:c,remove:a,track:c,untrack:a,dispose:u,disposeSync:l,sync:l,exec:u,getSize(){return s.length},isDisposed(){return s.length<=0}})}r(te,"useDispose");function Jc(e={}){let{mode:t="fifo"}=e,n=[],o=r(async(s=!1)=>{for(;n.length>0;){let a=n[0];if(Ze(n,c=>c!==a),typeof a=="function"){let c=a();if(k(c)){if(s)throw new Error(`Expected sync only function, but found async: ${a}`);await c;}}else if(k(a)){if(s)throw new Error(`Expected sync only function, but found async: ${a}`);await a;}else throw new Error(`Unhandled disposable: ${a}`)}},"exec");return Object.assign(o,{add:r(s=>{t==="lifo"?n.unshift(s):n.push(s);},"add"),exec:o,getSize(){return n.length}})}r(Jc,"useDefer");function Qc(){let e=!0;return (t,n)=>{let o=!1;if(e){e=!1;try{t(),o=!0;}finally{e=!0;}}else n!==void 0&&n();return o}}r(Qc,"useMutex");function Xc(){let e=!0;return async(t,n)=>{let o=!1;if(e){e=!1;try{let i=t();k(i)&&await i,o=!0;}finally{e=!0;}}else if(n!==void 0){let i=n();k(i)&&await i;}return o}}r(Xc,"useAsyncMutex");var At=class At{constructor(){this.subscribers={};this.subscribersOnAny=[];this._logEmitter=S("zeed:emitter","warn");this.call=new Proxy({},{get:(t,n)=>async(...o)=>await this.emit(n,...o)});}async emit(t,...n){let o=!1;try{let i=this.subscribers[t]||[];if(this._logEmitter.debug("emit",this?.constructor?.name,t,...n,i),this.subscribersOnAny.forEach(s=>s(t,...n)),i.length>0){let s=i.map(({fn:a})=>{try{return j(a(...n))}catch(c){this._logEmitter.warn("emit warning:",c);}return null}).filter(a=>a!=null);o=!0,await Promise.all(s);}}catch(i){this._logEmitter.error("emit exception",i);}return o}onAny(t){this.subscribersOnAny.push(t);}on(t,n,o={}){let{priority:i=0}=o,s=this.subscribers[t]||[],a=s.length,c={fn:n,priority:i};if(a<=0)this.subscribers[t]=[c];else {let u=a;for(let l=s.length-1;l>=0;l--){let p=s[l];if(i<=p.priority)break;u-=1;}s.splice(u,0,c);}return ()=>{this.off(t,n);}}onCall(t){for(let[n,o]of Object.entries(t))this.on(n,o);}once(t,n){let o=r(async(...i)=>(this.off(t,o),await j(n(...i))),"onceListener");return this.on(t,o),()=>{this.off(t,n);}}off(t,n){return this.subscribers[t]=(this.subscribers[t]||[]).filter(o=>n&&o.fn!==n),this}removeAllListeners(){return this.subscribers={},this}};r(At,"Emitter");var R=At;function il(){let e=q().emitter;return e||(e=new R,q().emitter=e),e}r(il,"getGlobalEmitter");var Oe=16;function Ct(){return ee(Oe)}r(Ct,"uuidBytes");function Uo(e=Ct()){return Xe(e,22)}r(Uo,"uuidB62");function Do(e){return Xe(e,22)}r(Do,"uuidEncodeB62");function Eo(e){return Zt(e,Oe)}r(Eo,"uuidDecodeB62");function Fo(e=Ct()){return Qe(e,26)}r(Fo,"uuidB32");function Po(e){return Qe(e,26)}r(Po,"uuidEncodeB32");function Io(e){return Jt(e,Oe)}r(Io,"uuidDecodeB32");var ko="10000000-1000-4000-8000-100000000000",So=r(function(){return typeof crypto<"u"&&crypto.randomUUID!=null?crypto.randomUUID():ko.replace(/[018]/g,e=>(e^ee(1)[0]&15>>e/4).toString(16))},"uuidv4");function Ro(e){let t=zt(e);return `${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16)}`}r(Ro,"uuidEncodeV4");function Mo(e){return Gt(e.replaceAll("-",""))}r(Mo,"uuidDecodeV4");var jn=16e11;function Bo(e){let t=new Uint8Array([0,0,0,0,0,0]),n=t.length-1;for(let o=0;o<t.length;o++){let i=e&255;t[n-o]=i,e=(e-i)/256;}return t}r(Bo,"longToByteArray");function Hn(){let e=Ce()-jn;return new Uint8Array([...Bo(e),...ee(10)])}r(Hn,"suidBytes");function pl(){return $o(Hn())}r(pl,"suid");function dl(e){return Oo(Gn(e))}r(dl,"suidDate");function Oo(e){return new Date(jn+e.slice(0,6).reduce((t,n)=>t*256+n,0))}r(Oo,"suidBytesDate");function gl(){return new Uint32Array(ee(4))[0]}r(gl,"uuid32bit");var Ut={base62:{uuid:Uo,uuidDecode:Eo,uuidEncode:Do},base32:{uuid:Fo,uuidDecode:Io,uuidEncode:Po},uuidv4:{uuid:So,uuidDecode:Mo,uuidEncode:Ro}},$e="base62",zn=!1;function ml(e,t=!1){$e=e,zn=t;}r(ml,"setUuidDefaultEncoding");function G(){return Ut[$e].uuid(zn?Hn():Ct())}r(G,"uuid");function Gn(e){return Ut[$e].uuidDecode(e)}r(Gn,"uuidDecode");function $o(e){return Ut[$e].uuidEncode(e)}r($o,"uuidEncode");function yl(e){try{return Gn(e).length===Oe}catch{}return !1}r(yl,"uuidIsValid");var vt={};function B(e="id"){return vt[e]==null&&(vt[e]=0),`${e}-${vt[e]++}`}r(B,"uname");var _o=0;function hl(){return `id-${_o++}`}r(hl,"qid");var Et=class Et extends R{constructor(){super(...arguments);this.id=G();}};r(Et,"Channel");var Dt=Et,Ft=class Ft extends Dt{constructor(){super(...arguments);this.isConnected=!0;}postMessage(n){this.other?.emit("message",{data:n,origin:"local",lastEventId:G()});}};r(Ft,"LocalChannel");var _e=Ft;function Ll(){let e=new _e,t=new _e;return e.other=t,t.other=e,[e,t]}r(Ll,"createLocalChannelPair");var Pt=class Pt{async encode(t){return t}async decode(t){return t}};r(Pt,"NoopEncoder");var qn=Pt,It=class It{async encode(t){return Ke(t)}async decode(t){return Ye(t)}};r(It,"JsonEncoder");var ne=It,kt=class kt{constructor(t){this.key=t;}async encode(t){let n=Ke(t);return await Vn(n,this.key)}async decode(t){let n=await Nn(t,this.key);return Ye(n)}};r(kt,"CryptoEncoder");var Wn=kt;function Jn(e,t,n={}){return new Proxy(n,{get:(o,i)=>i in o?o[i]:(...s)=>e(i,s,t)})}r(Jn,"createPromiseProxy");function Rl(e={}){let{name:t=B("hub"),encoder:n=new ne,retryAfter:o=1e3,ignoreUnhandled:i=!0,logLevel:s=!1}=e,a=S(t,s),c={},u,l=[],p,f={},m=r(()=>{clearTimeout(p);},"dispose"),g=r(async()=>{if(clearTimeout(p),u){if(u.isConnected)for(;l.length;){let y=l[0];try{u.postMessage(await n.encode(y)),l.shift();}catch(L){a.warn("postMessage",L);break}}l.length>0&&o>0&&(p=setTimeout(g,o));}},"postNext"),d=r(async y=>{a("enqueue postMessage",y),l.push(y),await g();},"postMessage"),x=r(async y=>{u=y,u.on("connect",g),u.on("message",async L=>{a("onmessage",typeof L);let{name:F,args:$,id:b,result:h,error:A}=await n.decode(L.data);if(F){a(`name ${F} id ${b}`);try{if(c[F]==null)throw new Error(`handler for ${F} was not found`);let C=c[F](...$);k(C)&&(C=await C),a(`result ${C}`),b&&await d({id:b,result:C});}catch(C){let w=C instanceof Error?C:new Error(et(C));a.warn("execution error",w.name),await d({id:b,error:{message:w.message,stack:w.stack,name:w.name}});}}else if(b)if(a(`response for id=${b}: result=${h}, error=${A}`),f[b]==null)h===void 0?a(`skip response for ${b}`):a.warn(`no response hook for ${b}`);else {let[C,w]=f[b];if(C&&w)if(delete f[b],A){let E=new Error(A.message);E.stack=A.stack,E.name=A.name,a.warn("reject",E.name),w(E);}else a("resolve",h),C(h);}else i||a.warn("Unhandled message",L);}),await g();},"connect"),T=r(async(y,L,F={})=>{let{timeout:$=5e3}=F,b=G();return await d({name:y,args:L,id:b}),Qt(new Promise((h,A)=>f[b]=[h,A]),$)},"fetchMessage");return e.channel&&x(e.channel),{dispose:m,connect:x,listen(y){Object.assign(c,y);},send(){return Jn(T,{},{options(y){return Jn(T,{...y})}})}}}r(Rl,"useMessageHub");var Rt=class Rt extends R{constructor(n){super();this.publish=this.emit.bind(this);this.subscribe=this.on.bind(this);let{name:o,encoder:i=new ne,channel:s,debug:a=!1}=n;this.channel=s,this.encoder=i,this.debug=a,this.name=o??this.channel.id??B("pubsub"),this.log=S(`${this.shortId}`),this.debug&&(this.channel.on("connect",()=>{this.log("channel connected");}),this.channel.on("disconnect",()=>{this.log("channel disconnected");})),this.channel.on("message",async({data:c})=>{let u=await this.encoder.decode(c);if(this.debug?this.log(`channel message, event=${u?.event}, info=`,u):this.log(`channel message, event=${u?.event}`),u){let{event:l,args:p}=u;await this.emitSuper(l,...p);}});}get shortId(){return this.name.substr(0,6)}async emitSuper(n,...o){return await super.emit(n,...o)}async emit(n,...o){try{if(this.debug?this.log(`emit(${String(n)})`,n):this.log(`emit(${String(n)})`,o.length),!this.channel.isConnected)return this.log.warn("channel not connected"),!1;let i=await this.encoder.encode({event:n,args:o});return this.channel.postMessage(i),!0}catch(i){this.log.warn(`emit(${String(n)})`,i);}return !1}};r(Rt,"PubSub");var St=Rt;function Nl(e){return new St(e)}r(Nl,"usePubSub");var Vo=1;var Zn=r(e=>e,"defaultSerialize"),No=Zn;function Kn(e,t,n=[]){let{post:o,on:i,serialize:s=Zn,deserialize:a=No,log:c}=e,u=new Map;return i(async p=>{try{let f=a(p),[m,g,d,x]=f;if(m===1||m===2){let T,y;if(x!=null)try{let L=t[x];T=await L(...g);}catch(L){y=String(L);}else y="Method implementation missing";y&&c?.warn("error",f,y),m===1&&d&&o(s(y?[4,y,d]:[3,T,d]));}else if(d){let T=u.get(d);T!=null&&(m===4?T.reject(g):T.resolve(g)),u.delete(d);}}catch(f){c?.warn("Error on handling RPC data. Invalid?",f,p);}}),{post:o,serialize:s,rpcPromiseMap:u,proxyHandler:{get(p,f){let m=r((...d)=>{o(s([2,d,null,f]));},"sendEvent");if(e.onlyEvents||n.includes(f))return m.asEvent=m,m;let g=r((...d)=>new Promise((x,T)=>{let y=Vo++;u.set(y,{resolve:x,reject:T}),o(s([1,d,y,f]));}),"sendCall");return g.asEvent=m,g}}}}r(Kn,"setupRPCBasic");function zl(e,t){let{eventNames:n=[]}=t,{proxyHandler:o}=Kn(t,e,n);return new Proxy({},o)}r(zl,"useRPC");function Gl(e){let t=[],n={},{proxyHandler:o}=Kn(e,n);function i(){return new Proxy({},o)}return r(i,"createRPCProxy"),function(s,a=[]){return Object.assign(n,s??{}),t.push(...a),i()}}r(Gl,"useRPCHub");var Ve=class Ve extends R{constructor(n={}){super();this._isCancelled=!1;this._resetWhenFinished=!0;this._children=[];this.dispose=te();this._totalUnits=n.totalUnits??0,this._completedUnits=n.completeUnits??0,this._resetWhenFinished=n.resetWhenFinished??!0,this.name=n.name??B("progress"),this.dispose.add(async()=>{for(let o of this._children)await o.dispose();await this.emit("progressDispose",this);});}update(){this.emit("progressChanged",this),this._isCancelled&&this._resetWhenFinished&&this.getTotalUnits()<=this.getCompletedUnits()&&this.reset();}reset(){if(this._isCancelled){this._isCancelled=!1;for(let n of this._children)n.reset();this.update();}}async cancel(){if(!this._isCancelled){this._isCancelled=!0,await this.emit("progressCancelled",this);for(let n of this._children)await n.cancel();this.update();}}addChild(n){n.on("progressDispose",()=>this.removeChild(n)),n.on("progressChanged",()=>this.update()),this._children.includes(n)||this._children.push(n),this.update();}createChildProgress(n){let o=new Ve(n);return this.addChild(o),o}removeChild(n){Vt(this._children,n),this.update();}getTotalUnits(){if(this.isIndeterminate())return 0;let n=this._totalUnits;for(let o of this._children)n+=o.getTotalUnits();return n}getCompletedUnits(){if(this.isIndeterminate())return 0;let n=this._completedUnits;for(let o of this._children)n+=o.getCompletedUnits();return n}isIndeterminate(){return this._totalUnits<=0&&this._children.length<=0}isCancelled(){return this._isCancelled}isFinished(){return this.dispose.isDisposed()||!this.isIndeterminate()&&this.getTotalUnits()<=this.getCompletedUnits()}getFraction(){if(this.isIndeterminate())return 0;let n=this.getCompletedUnits()/this.getTotalUnits();return Number.isNaN(n)&&(n=0),Math.min(1,Math.max(0,n))}getChildrenCount(){return this._children.length}setTotalUnits(n,o){this._totalUnits=n,o!=null&&(this._completedUnits=o),this.update();}incTotalUnits(n=1){this._totalUnits+=n,this.update();}setCompletetedUnits(n){this._completedUnits=n,this.update();}setCompleted(){this._completedUnits=this._totalUnits,this.update();}incCompletedUnits(n=1){this._completedUnits+=n,this.update();}toString(n=0){let o=`${" ".repeat(n)}${this.name}: ${this._completedUnits} of ${this._totalUnits} units, ${Math.floor(this.getFraction()*100)} %, cancel=${this._isCancelled}
|
|
12
|
-
`;for(let i of this._children)o+=i.toString(n+1);return n===0?o.trim():o}};r(Ve,"Progress");var fe=Ve;function sf(e={}){let{maxParallel:t=3,name:n=B("pool"),idConflictResolution:o="memoize"}=e,i=new R,s=te();s.add(L);let a=new fe({name:n});a.on("progressCancelled",L);let c=0,u=0,l=0,p=0,f={};async function m(){if(c>0){let[b,h]=Yt();return i.once("didFinish",h),b}}r(m,"waitFinishAll");async function g(){for(let b of Object.keys(f))f[b].state==="finished"&&(await f[b].progress.dispose(),delete f[b]);}r(g,"cleanupFinished");function d(){i.emit("didFinish"),c=0,u=0,g(),a.reset();}r(d,"didFinish");function x(){let b=0,h=0;for(let{max:A,resolved:C,state:w}of Object.values(f))b+=A,h+=w==="finished"?A:Math.min(A,C);i.emit("didUpdate",c,u,b,h);}r(x,"didUpdate");function T(){if(x(),c>0&&c===u&&d(),l>=t)return;let b=Object.values(f).filter(h=>h.state==="waiting");if(b.length>0){let h;for(let A of b)A.group!=null&&Object.values(f).some(C=>C.state==="running"&&C.id!==A.id&&C.group===A.group)||(h==null||A.priority<h.priority)&&(h=A);if(h!=null){let A=h.id,C=h.done;h.state="running",++l,i.emit("didStart",A);let w=r(E=>{h&&(h.result=E,h.state="finished",h.resolved=h.max,h.progress?.setCompleted()),--l,++u,T();},"taskFinished");h.task(h).then(E=>{C(E),i.emit("didResolve",A,E),w(E);}).catch(E=>{C(),i.emit("didReject",A,E),w();});}}}r(T,"performNext");function y(b){let h=f[b];h&&h.state==="waiting"&&(f[b].state="finished",++u,i.emit("didCancel",b),f[b].progress.dispose(),x());}r(y,"cancel");function L(){Object.keys(f).forEach(y);}r(L,"cancelAll");function F(b){return f[b]!=null}r(F,"hasById");function $(b,h={}){let A,C=new Promise(P=>A=P),w=h.id??G();if(f[w]!=null){let P=h.idConflictResolution??o;if(P==="replace")y(w);else if(P==="memoize"||P==="prioritize"){let $t=f[w];return P==="prioritize"&&($t.priority=++p),{id:w,promise:(async()=>{if($t.state==="finished")return f[w].result})(),dispose:()=>y(w),cancel:()=>y(w)}}else throw new Error(`Pool task with id=${w} already exists!`)}let E=new fe({name:w,totalUnits:h.max??1,completeUnits:h.resolved??0});return a.addChild(E),f[w]={id:w,task:b,priority:++p,group:h.group,state:"waiting",max:h.max??1,resolved:h.resolved??0,done:A,payload:h.payload,progress:E,setMax(P){E.setTotalUnits(P),f[w].max=P,x();},setResolved(P){E.setCompletetedUnits(P),f[w].resolved=P,x();},incResolved(P=1){E.incCompletedUnits(P),f[w].resolved+=P,x();}},++c,T(),{id:w,promise:C,dispose:()=>y(w),cancel:()=>y(w)}}return r($,"enqueue"),{events:i,cancel:y,cancelAll:L,hasById:F,progress:a,enqueue:$,dispose:s,waitFinishAll:m}}r(sf,"usePool");var Mt=class Mt extends R{constructor(n={}){super();this.queue=[];this.waitToFinish=[];this.countMax=0;this.countResolved=0;this.paused=!1;let{name:o=B("queue"),logLevel:i}=n;this.name=o,this.log=S(`zeed:queue:${o}`,i??9007199254740991);}async performNext(){if(this.log("performNext, queue.length =",this.queue.length),this.currentTask!=null){this.log("performNext => skip while another task is running");return}if(this.paused){this.log("performNext => skip while is paused");return}for(;this.currentTask==null&&!this.paused;){let n=this.queue.shift();if(this.log(`performNext => ${n?.name}`),n==null)break;this.countResolved===0&&this.emit("didStart",this.countMax);let{name:o,task:i,resolve:s}=n;this.currentTask=i();let a;try{this.log.info(`start task ${o}`),a=await this.currentTask,this.log(`finished task ${o} with result =`,a);}catch(c){this.log.warn("Error performing task",c);}s(a),this.currentTask=void 0,this.countResolved+=1,this.emit("didUpdate",this.countMax,this.countResolved);}for(this.queue.length===0&&(this.emit("didFinish"),this.countMax=0,this.countResolved=0);this.waitToFinish.length>0;)this.waitToFinish.shift()();}async enqueue(n,o={}){let{immediate:i=!1,name:s=B(this.name)}=o;return i?(this.log.info(`immediate execution ${s}`),await n()):(this.log(`enqueue ${s}`),new Promise(a=>{this.queue.push({name:s,task:n,resolve:a}),this.countMax+=1,this.emit("didUpdate",this.countMax,this.countResolved),this.performNext();}))}async enqueueReentrant(n,o={}){return this.enqueue(n,{immediate:this.currentTask!=null,name:o.name})}async cancelAll(n=!0){this.log("cancelAll"),this.emit("didCancel");let o=this.queue.map(i=>i.resolve);this.queue=[],o.forEach(i=>i(void 0)),await this.wait();}async pause(){this.log("pause"),this.paused=!0,await this.wait();}resume(){this.log("resume"),this.paused=!1,this.performNext();}async wait(){if(this.log("wait"),!(this.currentTask==null&&(this.queue.length===0||this.paused)))return new Promise(n=>{this.waitToFinish.push(n);})}get isPaused(){return this.paused}get hasTasks(){return this.queue.length!==0}};r(Mt,"SerialQueue");var Yn=Mt;function mf(e,t={}){let{delay:n=100,trailing:o=!0,leading:i=!0}=t,s=0,a=0,c=0,u;function l(){return s?(clearTimeout(s),s=void 0,!0):!1}r(l,"clearExistingTimeout");function p(...f){let m=Date.now(),g=m-a,d=r(()=>{c=0,a=Date.now(),e.apply(this,f);},"exec");if(u=d,g>n||!s){i&&(g>n?d():++c);let x=g>n?n:n-g;l(),a=m,s=setTimeout(()=>{s=0,o&&(!i||c>0)&&u?.();},x);}else ++c;}return r(p,"wrapper"),p.cancel=l,p.stop=()=>{l()&&u&&u();},p.immediate=r(async function(...m){l(),a=Date.now(),e.apply(this,m);},"immediate"),p.dispose=()=>p.stop(),p}r(mf,"throttle");function yf(e,t={}){let{delay:n=100}=t,o=0,i=!1,s;function a(){o&&(clearTimeout(o),o=0);}r(a,"clearExistingTimeout");async function c(){try{if(a(),s!=null){let p=[...s];s=void 0,i=!0,await j(e(...p)),i=!1,s!=null&&(a(),o=setTimeout(c,n));}}catch{}}r(c,"exec");function u(...p){s=[...p],a(),i===!1&&(o=setTimeout(c,n));}r(u,"wrapper");async function l(...p){a(),s=[...p],await c();}return r(l,"immediate"),u.cancel=a,u.dispose=a,u.immediate=l,u}r(yf,"debounce");function jo(e,t=0){let n=setTimeout(e,t);return ()=>{n&&(clearTimeout(n),n=void 0);}}r(jo,"useTimeout");function Ho(e,t){let n=setInterval(e,t);return ()=>{n&&(clearInterval(n),n=void 0);}}r(Ho,"useInterval");function zo(e,t,n=!1){let o,i=!1;async function s(a=!1){a&&await j(e()),i||(o=setTimeout(()=>s(!0),t));}return r(s,"loop"),s(n),()=>{o&&(i=!0,clearInterval(o),o=void 0);}}r(zo,"useIntervalPause");function Go(e,t,n,...o){return e==null?()=>{}:(e.on?e.on(t,n,...o):e.addEventListener&&e.addEventListener(t,n,...o),()=>{e.off?e.off(t,n,...o):e.removeEventListener&&e.removeEventListener(t,n,...o);})}r(Go,"useEventListener");function qo(e,t,n,...o){return e==null?()=>{}:(e.on?e.once(t,n,...o):e.addEventListener&&e.addEventListener(t,n,...o),()=>{e.off?e.off(t,n,...o):e.removeEventListener&&e.removeEventListener(t,n,...o);})}r(qo,"useEventListenerOnce");function Tf(e){let t=te(e);return Object.assign(t,{timeout:(n,o=0)=>t.add(jo(n,o)),interval:(n,o=0)=>t.add(Ho(n,o)),intervalPause:(n,o=0)=>t.add(zo(n,o)),on:(n,o,i,...s)=>t.add(Go(n,o,i,...s)),once:(n,o,i,...s)=>t.add(qo(n,o,i,...s))})}r(Tf,"useDisposeWithUtils");function vf(e=globalThis?.location?.hostname??""){return ["::ffff:127.0.0.1","localhost","127.0.0.1","","::1","::"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")}r(vf,"isLocalHost");var Bt={cache:"no-cache",redirect:"follow",headers:{}};function Wo(e){let t=/:\/\/([^@]*)@/gi.exec(e);if(t&&t[1]){let[n,o]=t[1].split(":",2);return {url:e.replace(`${t[1]}@`,""),username:n,password:o}}}r(Wo,"parseBasicAuth");async function Qn(e,t={},n=fetch){try{_(t)&&(t=Te({},...W(t)));let o=Wo(String(e));o&&(e=o.url,t=Te({},t,Jo(o.username,o.password))),t.headers!=null&&!(t.headers instanceof Headers)&&(t.headers=new Headers(t.headers));let i=await n(String(e),t);if(i.status<400)return i;let s=S("zeed:network");try{s.warn(`Fetch of ${String(e)} returned status=${i.status}. Options:`,t),s.warn(`Response: ${await i.text()}`);}catch(a){s.error("Exception:",a);}}catch(o){S("zeed:network").error("fetchBasic",o);}}r(Qn,"fetchBasic");async function Pf(e,t={},n=fetch){try{let o=await Qn(e,[{method:"GET",headers:{Accept:"application/json"}},t],n);if(o)return await o.json()}catch(o){S("zeed:network").error("fetchJSON error:",o);}}r(Pf,"fetchJson");async function If(e,t={},n=fetch){try{let o=await Qn(e,[Bt,{method:"GET"},t],n);if(o)return await o.text()}catch(o){S("zeed:network").error("fetchHTML error:",o);}}r(If,"fetchText");function kf(e,t="POST"){return {method:t,...Bt,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:gn(e)}}r(kf,"fetchOptionsFormURLEncoded");function Sf(e,t="POST"){return {method:t,...Bt,headers:{"Content-Type":"application/json; charset=utf-8"},body:M(e)}}r(Sf,"fetchOptionsJson");function Jo(e,t){return {headers:{Authorization:`Basic ${oe(`${e}:${t}`)}`}}}r(Jo,"fetchOptionsBasicAuth");function Xn(){if(typeof window<"u")return window}r(Xn,"getWindow");function Zo(){if(typeof navigator<"u")return navigator}r(Zo,"getNavigator");function Bf(){return Xn()??typeof WorkerGlobalScope<"u"?self:typeof global<"u"?global:Function("return this;")()}r(Bf,"getGlobal");function Of(e={ios:!1,macos:!1,windows:!1,beaker:!1,electron:!1,wkwebview:!1,pwa:!1,pwaInstalled:!1,browser:!1,node:!1,worker:!1,test:!1,jest:!1,macosNative:!1,iosNative:!1,appleNative:!1,touch:!1}){let t=Zo(),n=Xn();return e.ios=t?.platform?.match(/(iPhone|iPod|iPad)/i)!=null,e.macos=!!t?.platform?.startsWith("Mac"),e.windows=!!t?.platform?.startsWith("Win"),e.beaker=n?.beaker!=null,e.electron=(t?.userAgent?.toLowerCase()?.indexOf(" electron/")||-1)>-1&&!e.beaker,e.wkwebview=n?.webkit?.messageHandlers!=null,e.pwa=t?.serviceWorker!=null,e.pwaInstalled=t?.standalone||n?.matchMedia?.("(display-mode: standalone)")?.matches,e.node=typeof process<"u"&&process?.release?.name==="node",e.browser=!e.electron&&!e.wkwebview&&!e.node,e.worker=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,e.jest=typeof jest<"u"||typeof vitest<"u",e.test=e.jest,e.macosNative=e.wkwebview&&e.macos,e.iosNative=e.wkwebview&&e.ios,e.appleNative=e.wkwebview,e.touch=n&&"ontouchstart"in n||(t?.maxTouchPoints||0)>1||t?.msPointerEnabled&&n?.MSGesture||n?.DocumentTouch&&document instanceof DocumentTouch,e}r(Of,"detect");function Ko(){return typeof window<"u"&&globalThis===window}r(Ko,"isBrowser");function $f(e){Ko()?window.addEventListener("beforeunload",e):typeof process<"u"&&process.on("exit",()=>e);}r($f,"useExitHandler");var Ot=class Ot{constructor(t={}){this.store={};}setItem(t,n){this.store[t]=ot(n);}getItem(t){return ot(this.store[t])}removeItem(t){delete this.store[t];}clear(){this.store={};}allKeys(){return Object.keys(this.store)}};r(Ot,"MemStorage");var er=Ot;function zf(){}r(zf,"noop");
|
|
11
|
+
`&&(o.push(i),i=[]);}return o}r(Co,"csvParse");function jc(e,t={}){let n=Co(e,t),o=n[0];return n.slice(1).map(i=>Object.fromEntries(i.map((s,a)=>[o[a],s])))}r(jc,"csvParseToObjects");function Uo(e){let t;if(typeof e=="function"?t=e():k(e)?t=e:typeof e.dispose=="function"?t=e.dispose():k(e.dispose)&&(t=e.dispose),k(t))return t}r(Uo,"callDisposer");function te(e){let t=e;t!=null&&(we(t)?t={name:t}:"debug"in t&&"label"in t&&(t={name:t.label,log:t}));let n=t?.name,o=t?.log??S("zeed:dispose"),i=0,s=[];function a(p){if(p!=null&&s.includes(p)){Ze(s,m=>m!==p);let f=Uo(p);if(k(f))return f}}r(a,"untrack");function c(p){if(p!=null)return s.unshift(p),()=>a(p)}r(c,"track");function u(p=!1){n&&o.debug(`dispose "${n}": ${s.length} entries`),i+=1;let f=[];for(;s.length>0;){let m=s[0],g=a(m);if(k(g)){if(p)throw new Error(`Async disposable found: ${m} -> ${g}`);f.push(g);}}if(f.length>0)return Promise.all(f)}r(u,"dispose");function l(){u(!0);}return r(l,"disposeSync"),Object.assign(u,{disposed:i,add:c,remove:a,track:c,untrack:a,dispose:u,disposeSync:l,sync:l,exec:u,getSize(){return s.length},isDisposed(){return s.length<=0}})}r(te,"useDispose");function Zc(e={}){let{mode:t="fifo"}=e,n=[],o=r(async(s=!1)=>{for(;n.length>0;){let a=n[0];if(Ze(n,c=>c!==a),typeof a=="function"){let c=a();if(k(c)){if(s)throw new Error(`Expected sync only function, but found async: ${a}`);await c;}}else if(k(a)){if(s)throw new Error(`Expected sync only function, but found async: ${a}`);await a;}else throw new Error(`Unhandled disposable: ${a}`)}},"exec");return Object.assign(o,{add:r(s=>{t==="lifo"?n.unshift(s):n.push(s);},"add"),exec:o,getSize(){return n.length}})}r(Zc,"useDefer");function Xc(){let e=!0;return (t,n)=>{let o=!1;if(e){e=!1;try{t(),o=!0;}finally{e=!0;}}else n!==void 0&&n();return o}}r(Xc,"useMutex");function el(){let e=!0;return async(t,n)=>{let o=!1;if(e){e=!1;try{let i=t();k(i)&&await i,o=!0;}finally{e=!0;}}else if(n!==void 0){let i=n();k(i)&&await i;}return o}}r(el,"useAsyncMutex");var At=class At{constructor(){this.subscribers={};this.subscribersOnAny=[];this._logEmitter=S("zeed:emitter","warn");this.call=new Proxy({},{get:(t,n)=>async(...o)=>await this.emit(n,...o)});}async emit(t,...n){let o=!1;try{let i=this.subscribers[t]||[];if(this._logEmitter.debug("emit",this?.constructor?.name,t,...n,i),this.subscribersOnAny.forEach(s=>s(t,...n)),i.length>0){let s=i.map(({fn:a})=>{try{return j(a(...n))}catch(c){this._logEmitter.warn("emit warning:",c);}return null}).filter(a=>a!=null);o=!0,await Promise.all(s);}}catch(i){this._logEmitter.error("emit exception",i);}return o}onAny(t){this.subscribersOnAny.push(t);}on(t,n,o={}){let{priority:i=0}=o,s=this.subscribers[t]||[],a=s.length,c={fn:n,priority:i};if(a<=0)this.subscribers[t]=[c];else {let u=a;for(let l=s.length-1;l>=0;l--){let p=s[l];if(i<=p.priority)break;u-=1;}s.splice(u,0,c);}return ()=>{this.off(t,n);}}onCall(t){for(let[n,o]of Object.entries(t))this.on(n,o);}once(t,n){let o=r(async(...i)=>(this.off(t,o),await j(n(...i))),"onceListener");return this.on(t,o),()=>{this.off(t,n);}}off(t,n){return this.subscribers[t]=(this.subscribers[t]||[]).filter(o=>n&&o.fn!==n),this}removeAllListeners(){return this.subscribers={},this}};r(At,"Emitter");var R=At;function sl(){let e=q().emitter;return e||(e=new R,q().emitter=e),e}r(sl,"getGlobalEmitter");var Oe=16;function Ct(){return ee(Oe)}r(Ct,"uuidBytes");function Do(e=Ct()){return Xe(e,22)}r(Do,"uuidB62");function Eo(e){return Xe(e,22)}r(Eo,"uuidEncodeB62");function Fo(e){return Zt(e,Oe)}r(Fo,"uuidDecodeB62");function Po(e=Ct()){return Qe(e,26)}r(Po,"uuidB32");function Io(e){return Qe(e,26)}r(Io,"uuidEncodeB32");function ko(e){return Jt(e,Oe)}r(ko,"uuidDecodeB32");var So="10000000-1000-4000-8000-100000000000",Ro=r(function(){return typeof crypto<"u"&&crypto.randomUUID!=null?crypto.randomUUID():So.replace(/[018]/g,e=>(e^ee(1)[0]&15>>e/4).toString(16))},"uuidv4");function Mo(e){let t=zt(e);return `${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16)}`}r(Mo,"uuidEncodeV4");function Bo(e){return Gt(e.replaceAll("-",""))}r(Bo,"uuidDecodeV4");var jn=16e11;function Oo(e){let t=new Uint8Array([0,0,0,0,0,0]),n=t.length-1;for(let o=0;o<t.length;o++){let i=e&255;t[n-o]=i,e=(e-i)/256;}return t}r(Oo,"longToByteArray");function Hn(){let e=Ce()-jn;return new Uint8Array([...Oo(e),...ee(10)])}r(Hn,"suidBytes");function dl(){return _o(Hn())}r(dl,"suid");function gl(e){return $o(Gn(e))}r(gl,"suidDate");function $o(e){return new Date(jn+e.slice(0,6).reduce((t,n)=>t*256+n,0))}r($o,"suidBytesDate");function ml(){return new Uint32Array(ee(4))[0]}r(ml,"uuid32bit");var Ut={base62:{uuid:Do,uuidDecode:Fo,uuidEncode:Eo},base32:{uuid:Po,uuidDecode:ko,uuidEncode:Io},uuidv4:{uuid:Ro,uuidDecode:Bo,uuidEncode:Mo}},$e="base62",zn=!1;function yl(e,t=!1){$e=e,zn=t;}r(yl,"setUuidDefaultEncoding");function G(){return Ut[$e].uuid(zn?Hn():Ct())}r(G,"uuid");function Gn(e){return Ut[$e].uuidDecode(e)}r(Gn,"uuidDecode");function _o(e){return Ut[$e].uuidEncode(e)}r(_o,"uuidEncode");function hl(e){try{return Gn(e).length===Oe}catch{}return !1}r(hl,"uuidIsValid");var vt={};function B(e="id"){return vt[e]==null&&(vt[e]=0),`${e}-${vt[e]++}`}r(B,"uname");var Vo=0;function bl(){return `id-${Vo++}`}r(bl,"qid");var Dt=class Dt{async encode(t){return t}async decode(t){return t}};r(Dt,"NoopEncoder");var qn=Dt,Et=class Et{async encode(t){return Ke(t)}async decode(t){return Ye(t)}};r(Et,"JsonEncoder");var ne=Et,Ft=class Ft{constructor(t){this.key=t;}async encode(t){let n=Ke(t);return await Vn(n,this.key)}async decode(t){let n=await Nn(t,this.key);return Ye(n)}};r(Ft,"CryptoEncoder");var Wn=Ft;function Jn(e,t,n={}){return new Proxy(n,{get:(o,i)=>i in o?o[i]:(...s)=>e(i,s,t)})}r(Jn,"createPromiseProxy");function Pl(e={}){let{name:t=B("hub"),encoder:n=new ne,retryAfter:o=1e3,ignoreUnhandled:i=!0,logLevel:s=!1}=e,a=S(t,s),c={},u,l=[],p,f={},m=r(()=>{clearTimeout(p);},"dispose"),g=r(async()=>{if(clearTimeout(p),u){if(u.isConnected)for(;l.length;){let y=l[0];try{u.postMessage(await n.encode(y)),l.shift();}catch(L){a.warn("postMessage",L);break}}l.length>0&&o>0&&(p=setTimeout(g,o));}},"postNext"),d=r(async y=>{a("enqueue postMessage",y),l.push(y),await g();},"postMessage"),x=r(async y=>{u=y,u.on("connect",g),u.on("message",async L=>{a("onmessage",typeof L);let{name:F,args:$,id:b,result:h,error:A}=await n.decode(L.data);if(F){a(`name ${F} id ${b}`);try{if(c[F]==null)throw new Error(`handler for ${F} was not found`);let C=c[F](...$);k(C)&&(C=await C),a(`result ${C}`),b&&await d({id:b,result:C});}catch(C){let w=C instanceof Error?C:new Error(et(C));a.warn("execution error",w.name),await d({id:b,error:{message:w.message,stack:w.stack,name:w.name}});}}else if(b)if(a(`response for id=${b}: result=${h}, error=${A}`),f[b]==null)h===void 0?a(`skip response for ${b}`):a.warn(`no response hook for ${b}`);else {let[C,w]=f[b];if(C&&w)if(delete f[b],A){let E=new Error(A.message);E.stack=A.stack,E.name=A.name,a.warn("reject",E.name),w(E);}else a("resolve",h),C(h);}else i||a.warn("Unhandled message",L);}),await g();},"connect"),T=r(async(y,L,F={})=>{let{timeout:$=5e3}=F,b=G();return await d({name:y,args:L,id:b}),Qt(new Promise((h,A)=>f[b]=[h,A]),$)},"fetchMessage");return e.channel&&x(e.channel),{dispose:m,connect:x,listen(y){Object.assign(c,y);},send(){return Jn(T,{},{options(y){return Jn(T,{...y})}})}}}r(Pl,"useMessageHub");var It=class It extends R{constructor(n){super();this.publish=this.emit.bind(this);this.subscribe=this.on.bind(this);let{name:o,encoder:i=new ne,channel:s,debug:a=!1}=n;this.channel=s,this.encoder=i,this.debug=a,this.name=o??this.channel.id??B("pubsub"),this.log=S(`${this.shortId}`),this.debug&&(this.channel.on("connect",()=>{this.log("channel connected");}),this.channel.on("disconnect",()=>{this.log("channel disconnected");})),this.channel.on("message",async({data:c})=>{let u=await this.encoder.decode(c);if(this.debug?this.log(`channel message, event=${u?.event}, info=`,u):this.log(`channel message, event=${u?.event}`),u){let{event:l,args:p}=u;await this.emitSuper(l,...p);}});}get shortId(){return this.name.substr(0,6)}async emitSuper(n,...o){return await super.emit(n,...o)}async emit(n,...o){try{if(this.debug?this.log(`emit(${String(n)})`,n):this.log(`emit(${String(n)})`,o.length),!this.channel.isConnected)return this.log.warn("channel not connected"),!1;let i=await this.encoder.encode({event:n,args:o});return this.channel.postMessage(i),!0}catch(i){this.log.warn(`emit(${String(n)})`,i);}return !1}};r(It,"PubSub");var Pt=It;function Ol(e){return new Pt(e)}r(Ol,"usePubSub");var No=1;var Zn=r(e=>e,"defaultSerialize"),jo=Zn;function Kn(e,t,n=[]){let{post:o,on:i,serialize:s=Zn,deserialize:a=jo,log:c}=e,u=new Map;return i(async p=>{try{let f=a(p),[m,g,d,x]=f;if(m===1||m===2){let T,y;if(x!=null)try{let L=t[x];T=await L(...g);}catch(L){y=String(L);}else y="Method implementation missing";y&&c?.warn("error",f,y),m===1&&d&&o(s(y?[4,y,d]:[3,T,d]));}else if(d){let T=u.get(d);T!=null&&(m===4?T.reject(g):T.resolve(g)),u.delete(d);}}catch(f){c?.warn("Error on handling RPC data. Invalid?",f,p);}}),{post:o,serialize:s,rpcPromiseMap:u,proxyHandler:{get(p,f){let m=r((...d)=>{o(s([2,d,null,f]));},"sendEvent");if(e.onlyEvents||n.includes(f))return m.asEvent=m,m;let g=r((...d)=>new Promise((x,T)=>{let y=No++;u.set(y,{resolve:x,reject:T}),o(s([1,d,y,f]));}),"sendCall");return g.asEvent=m,g}}}}r(Kn,"setupRPCBasic");function Vl(e,t){let{eventNames:n=[]}=t,{proxyHandler:o}=Kn(t,e,n);return new Proxy({},o)}r(Vl,"useRPC");function Nl(e){let t=[],n={},{proxyHandler:o}=Kn(e,n);function i(){return new Proxy({},o)}return r(i,"createRPCProxy"),function(s,a=[]){return Object.assign(n,s??{}),t.push(...a),i()}}r(Nl,"useRPCHub");var _e=class _e extends R{constructor(n={}){super();this._isCancelled=!1;this._resetWhenFinished=!0;this._children=[];this.dispose=te();this._totalUnits=n.totalUnits??0,this._completedUnits=n.completeUnits??0,this._resetWhenFinished=n.resetWhenFinished??!0,this.name=n.name??B("progress"),this.dispose.add(async()=>{for(let o of this._children)await o.dispose();await this.emit("progressDispose",this);});}update(){this.emit("progressChanged",this),this._isCancelled&&this._resetWhenFinished&&this.getTotalUnits()<=this.getCompletedUnits()&&this.reset();}reset(){if(this._isCancelled){this._isCancelled=!1;for(let n of this._children)n.reset();this.update();}}async cancel(){if(!this._isCancelled){this._isCancelled=!0,await this.emit("progressCancelled",this);for(let n of this._children)await n.cancel();this.update();}}addChild(n){n.on("progressDispose",()=>this.removeChild(n)),n.on("progressChanged",()=>this.update()),this._children.includes(n)||this._children.push(n),this.update();}createChildProgress(n){let o=new _e(n);return this.addChild(o),o}removeChild(n){Vt(this._children,n),this.update();}getTotalUnits(){if(this.isIndeterminate())return 0;let n=this._totalUnits;for(let o of this._children)n+=o.getTotalUnits();return n}getCompletedUnits(){if(this.isIndeterminate())return 0;let n=this._completedUnits;for(let o of this._children)n+=o.getCompletedUnits();return n}isIndeterminate(){return this._totalUnits<=0&&this._children.length<=0}isCancelled(){return this._isCancelled}isFinished(){return this.dispose.isDisposed()||!this.isIndeterminate()&&this.getTotalUnits()<=this.getCompletedUnits()}getFraction(){if(this.isIndeterminate())return 0;let n=this.getCompletedUnits()/this.getTotalUnits();return Number.isNaN(n)&&(n=0),Math.min(1,Math.max(0,n))}getChildrenCount(){return this._children.length}setTotalUnits(n,o){this._totalUnits=n,o!=null&&(this._completedUnits=o),this.update();}incTotalUnits(n=1){this._totalUnits+=n,this.update();}setCompletetedUnits(n){this._completedUnits=n,this.update();}setCompleted(){this._completedUnits=this._totalUnits,this.update();}incCompletedUnits(n=1){this._completedUnits+=n,this.update();}toString(n=0){let o=`${" ".repeat(n)}${this.name}: ${this._completedUnits} of ${this._totalUnits} units, ${Math.floor(this.getFraction()*100)} %, cancel=${this._isCancelled}
|
|
12
|
+
`;for(let i of this._children)o+=i.toString(n+1);return n===0?o.trim():o}};r(_e,"Progress");var fe=_e;function tf(e={}){let{maxParallel:t=3,name:n=B("pool"),idConflictResolution:o="memoize"}=e,i=new R,s=te();s.add(L);let a=new fe({name:n});a.on("progressCancelled",L);let c=0,u=0,l=0,p=0,f={};async function m(){if(c>0){let[b,h]=Yt();return i.once("didFinish",h),b}}r(m,"waitFinishAll");async function g(){for(let b of Object.keys(f))f[b].state==="finished"&&(await f[b].progress.dispose(),delete f[b]);}r(g,"cleanupFinished");function d(){i.emit("didFinish"),c=0,u=0,g(),a.reset();}r(d,"didFinish");function x(){let b=0,h=0;for(let{max:A,resolved:C,state:w}of Object.values(f))b+=A,h+=w==="finished"?A:Math.min(A,C);i.emit("didUpdate",c,u,b,h);}r(x,"didUpdate");function T(){if(x(),c>0&&c===u&&d(),l>=t)return;let b=Object.values(f).filter(h=>h.state==="waiting");if(b.length>0){let h;for(let A of b)A.group!=null&&Object.values(f).some(C=>C.state==="running"&&C.id!==A.id&&C.group===A.group)||(h==null||A.priority<h.priority)&&(h=A);if(h!=null){let A=h.id,C=h.done;h.state="running",++l,i.emit("didStart",A);let w=r(E=>{h&&(h.result=E,h.state="finished",h.resolved=h.max,h.progress?.setCompleted()),--l,++u,T();},"taskFinished");h.task(h).then(E=>{C(E),i.emit("didResolve",A,E),w(E);}).catch(E=>{C(),i.emit("didReject",A,E),w();});}}}r(T,"performNext");function y(b){let h=f[b];h&&h.state==="waiting"&&(f[b].state="finished",++u,i.emit("didCancel",b),f[b].progress.dispose(),x());}r(y,"cancel");function L(){Object.keys(f).forEach(y);}r(L,"cancelAll");function F(b){return f[b]!=null}r(F,"hasById");function $(b,h={}){let A,C=new Promise(P=>A=P),w=h.id??G();if(f[w]!=null){let P=h.idConflictResolution??o;if(P==="replace")y(w);else if(P==="memoize"||P==="prioritize"){let $t=f[w];return P==="prioritize"&&($t.priority=++p),{id:w,promise:(async()=>{if($t.state==="finished")return f[w].result})(),dispose:()=>y(w),cancel:()=>y(w)}}else throw new Error(`Pool task with id=${w} already exists!`)}let E=new fe({name:w,totalUnits:h.max??1,completeUnits:h.resolved??0});return a.addChild(E),f[w]={id:w,task:b,priority:++p,group:h.group,state:"waiting",max:h.max??1,resolved:h.resolved??0,done:A,payload:h.payload,progress:E,setMax(P){E.setTotalUnits(P),f[w].max=P,x();},setResolved(P){E.setCompletetedUnits(P),f[w].resolved=P,x();},incResolved(P=1){E.incCompletedUnits(P),f[w].resolved+=P,x();}},++c,T(),{id:w,promise:C,dispose:()=>y(w),cancel:()=>y(w)}}return r($,"enqueue"),{events:i,cancel:y,cancelAll:L,hasById:F,progress:a,enqueue:$,dispose:s,waitFinishAll:m}}r(tf,"usePool");var kt=class kt extends R{constructor(n={}){super();this.queue=[];this.waitToFinish=[];this.countMax=0;this.countResolved=0;this.paused=!1;let{name:o=B("queue"),logLevel:i}=n;this.name=o,this.log=S(`zeed:queue:${o}`,i??9007199254740991);}async performNext(){if(this.log("performNext, queue.length =",this.queue.length),this.currentTask!=null){this.log("performNext => skip while another task is running");return}if(this.paused){this.log("performNext => skip while is paused");return}for(;this.currentTask==null&&!this.paused;){let n=this.queue.shift();if(this.log(`performNext => ${n?.name}`),n==null)break;this.countResolved===0&&this.emit("didStart",this.countMax);let{name:o,task:i,resolve:s}=n;this.currentTask=i();let a;try{this.log.info(`start task ${o}`),a=await this.currentTask,this.log(`finished task ${o} with result =`,a);}catch(c){this.log.warn("Error performing task",c);}s(a),this.currentTask=void 0,this.countResolved+=1,this.emit("didUpdate",this.countMax,this.countResolved);}for(this.queue.length===0&&(this.emit("didFinish"),this.countMax=0,this.countResolved=0);this.waitToFinish.length>0;)this.waitToFinish.shift()();}async enqueue(n,o={}){let{immediate:i=!1,name:s=B(this.name)}=o;return i?(this.log.info(`immediate execution ${s}`),await n()):(this.log(`enqueue ${s}`),new Promise(a=>{this.queue.push({name:s,task:n,resolve:a}),this.countMax+=1,this.emit("didUpdate",this.countMax,this.countResolved),this.performNext();}))}async enqueueReentrant(n,o={}){return this.enqueue(n,{immediate:this.currentTask!=null,name:o.name})}async cancelAll(n=!0){this.log("cancelAll"),this.emit("didCancel");let o=this.queue.map(i=>i.resolve);this.queue=[],o.forEach(i=>i(void 0)),await this.wait();}async pause(){this.log("pause"),this.paused=!0,await this.wait();}resume(){this.log("resume"),this.paused=!1,this.performNext();}async wait(){if(this.log("wait"),!(this.currentTask==null&&(this.queue.length===0||this.paused)))return new Promise(n=>{this.waitToFinish.push(n);})}get isPaused(){return this.paused}get hasTasks(){return this.queue.length!==0}};r(kt,"SerialQueue");var Yn=kt;function ff(e,t={}){let{delay:n=100,trailing:o=!0,leading:i=!0}=t,s=0,a=0,c=0,u;function l(){return s?(clearTimeout(s),s=void 0,!0):!1}r(l,"clearExistingTimeout");function p(...f){let m=Date.now(),g=m-a,d=r(()=>{c=0,a=Date.now(),e.apply(this,f);},"exec");if(u=d,g>n||!s){i&&(g>n?d():++c);let x=g>n?n:n-g;l(),a=m,s=setTimeout(()=>{s=0,o&&(!i||c>0)&&u?.();},x);}else ++c;}return r(p,"wrapper"),p.cancel=l,p.stop=()=>{l()&&u&&u();},p.immediate=r(async function(...m){l(),a=Date.now(),e.apply(this,m);},"immediate"),p.dispose=()=>p.stop(),p}r(ff,"throttle");function pf(e,t={}){let{delay:n=100}=t,o=0,i=!1,s;function a(){o&&(clearTimeout(o),o=0);}r(a,"clearExistingTimeout");async function c(){try{if(a(),s!=null){let p=[...s];s=void 0,i=!0,await j(e(...p)),i=!1,s!=null&&(a(),o=setTimeout(c,n));}}catch{}}r(c,"exec");function u(...p){s=[...p],a(),i===!1&&(o=setTimeout(c,n));}r(u,"wrapper");async function l(...p){a(),s=[...p],await c();}return r(l,"immediate"),u.cancel=a,u.dispose=a,u.immediate=l,u}r(pf,"debounce");function Ho(e,t=0){let n=setTimeout(e,t);return ()=>{n&&(clearTimeout(n),n=void 0);}}r(Ho,"useTimeout");function zo(e,t){let n=setInterval(e,t);return ()=>{n&&(clearInterval(n),n=void 0);}}r(zo,"useInterval");function Go(e,t,n=!1){let o,i=!1;async function s(a=!1){a&&await j(e()),i||(o=setTimeout(()=>s(!0),t));}return r(s,"loop"),s(n),()=>{o&&(i=!0,clearInterval(o),o=void 0);}}r(Go,"useIntervalPause");function qo(e,t,n,...o){return e==null?()=>{}:(e.on?e.on(t,n,...o):e.addEventListener&&e.addEventListener(t,n,...o),()=>{e.off?e.off(t,n,...o):e.removeEventListener&&e.removeEventListener(t,n,...o);})}r(qo,"useEventListener");function Wo(e,t,n,...o){return e==null?()=>{}:(e.on?e.once(t,n,...o):e.addEventListener&&e.addEventListener(t,n,...o),()=>{e.off?e.off(t,n,...o):e.removeEventListener&&e.removeEventListener(t,n,...o);})}r(Wo,"useEventListenerOnce");function Qn(e){let t=te(e);return Object.assign(t,{timeout:(n,o=0)=>t.add(Ho(n,o)),interval:(n,o=0)=>t.add(zo(n,o)),intervalPause:(n,o=0)=>t.add(Go(n,o)),on:(n,o,i,...s)=>t.add(qo(n,o,i,...s)),once:(n,o,i,...s)=>t.add(Wo(n,o,i,...s))})}r(Qn,"useDisposeWithUtils");function xf(e=globalThis?.location?.hostname??""){return ["::ffff:127.0.0.1","localhost","127.0.0.1","","::1","::"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")}r(xf,"isLocalHost");var St={cache:"no-cache",redirect:"follow",headers:{}};function Jo(e){let t=/:\/\/([^@]*)@/gi.exec(e);if(t&&t[1]){let[n,o]=t[1].split(":",2);return {url:e.replace(`${t[1]}@`,""),username:n,password:o}}}r(Jo,"parseBasicAuth");async function Xn(e,t={},n=fetch){try{_(t)&&(t=Te({},...W(t)));let o=Jo(String(e));o&&(e=o.url,t=Te({},t,Zo(o.username,o.password))),t.headers!=null&&!(t.headers instanceof Headers)&&(t.headers=new Headers(t.headers));let i=await n(String(e),t);if(i.status<400)return i;let s=S("zeed:network");try{s.warn(`Fetch of ${String(e)} returned status=${i.status}. Options:`,t),s.warn(`Response: ${await i.text()}`);}catch(a){s.error("Exception:",a);}}catch(o){S("zeed:network").error("fetchBasic",o);}}r(Xn,"fetchBasic");async function Cf(e,t={},n=fetch){try{let o=await Xn(e,[{method:"GET",headers:{Accept:"application/json"}},t],n);if(o)return await o.json()}catch(o){S("zeed:network").error("fetchJSON error:",o);}}r(Cf,"fetchJson");async function Uf(e,t={},n=fetch){try{let o=await Xn(e,[St,{method:"GET"},t],n);if(o)return await o.text()}catch(o){S("zeed:network").error("fetchHTML error:",o);}}r(Uf,"fetchText");function Df(e,t="POST"){return {method:t,...St,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:gn(e)}}r(Df,"fetchOptionsFormURLEncoded");function Ef(e,t="POST"){return {method:t,...St,headers:{"Content-Type":"application/json; charset=utf-8"},body:M(e)}}r(Ef,"fetchOptionsJson");function Zo(e,t){return {headers:{Authorization:`Basic ${oe(`${e}:${t}`)}`}}}r(Zo,"fetchOptionsBasicAuth");function er(){if(typeof window<"u")return window}r(er,"getWindow");function Ko(){if(typeof navigator<"u")return navigator}r(Ko,"getNavigator");function If(){return er()??typeof WorkerGlobalScope<"u"?self:typeof global<"u"?global:Function("return this;")()}r(If,"getGlobal");function kf(e={ios:!1,macos:!1,windows:!1,beaker:!1,electron:!1,wkwebview:!1,pwa:!1,pwaInstalled:!1,browser:!1,node:!1,worker:!1,test:!1,jest:!1,macosNative:!1,iosNative:!1,appleNative:!1,touch:!1}){let t=Ko(),n=er();return e.ios=t?.platform?.match(/(iPhone|iPod|iPad)/i)!=null,e.macos=!!t?.platform?.startsWith("Mac"),e.windows=!!t?.platform?.startsWith("Win"),e.beaker=n?.beaker!=null,e.electron=(t?.userAgent?.toLowerCase()?.indexOf(" electron/")||-1)>-1&&!e.beaker,e.wkwebview=n?.webkit?.messageHandlers!=null,e.pwa=t?.serviceWorker!=null,e.pwaInstalled=t?.standalone||n?.matchMedia?.("(display-mode: standalone)")?.matches,e.node=typeof process<"u"&&process?.release?.name==="node",e.browser=!e.electron&&!e.wkwebview&&!e.node,e.worker=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,e.jest=typeof jest<"u"||typeof vitest<"u",e.test=e.jest,e.macosNative=e.wkwebview&&e.macos,e.iosNative=e.wkwebview&&e.ios,e.appleNative=e.wkwebview,e.touch=n&&"ontouchstart"in n||(t?.maxTouchPoints||0)>1||t?.msPointerEnabled&&n?.MSGesture||n?.DocumentTouch&&document instanceof DocumentTouch,e}r(kf,"detect");function Yo(){return typeof window<"u"&&globalThis===window}r(Yo,"isBrowser");function Sf(e){Yo()?window.addEventListener("beforeunload",e):typeof process<"u"&&process.on("exit",()=>e);}r(Sf,"useExitHandler");var Rt=class Rt{constructor(t={}){this.store={};}setItem(t,n){this.store[t]=ot(n);}getItem(t){return ot(this.store[t])}removeItem(t){delete this.store[t];}clear(){this.store={};}allKeys(){return Object.keys(this.store)}};r(Rt,"MemStorage");var tr=Rt;function _f(){}r(_f,"noop");var Bt=class Bt extends R{constructor(){super(...arguments);this.id=G();this.dispose=Qn();}close(){this.dispose();}};r(Bt,"Channel");var Mt=Bt,Ot=class Ot extends Mt{constructor(){super(...arguments);this.isConnected=!0;}postMessage(n){this.other?.emit("message",{data:n,origin:"local",lastEventId:G()});}};r(Ot,"LocalChannel");var Ve=Ot;function Gf(){let e=new Ve,t=new Ve;return e.other=t,t.other=e,[e,t]}r(Gf,"createLocalChannelPair");
|
|
13
13
|
|
|
14
|
-
export {
|
|
14
|
+
export { gr as $, Ds as $a, ga as $b, Ae as $c, dl as $d, ar as A, Xi as Aa, H as Ab, ln as Ac, Lt as Ad, pf as Ae, ur as B, br as Ba, Hs as Bb, Ya as Bc, On as Bd, Ho as Be, W as C, es as Ca, zs as Cb, Qa as Cc, Ao as Cd, zo as Ce, cr as D, ts as Da, Gs as Db, Xa as Dc, Bc as Dd, Go as De, bi as E, is as Ea, qs as Eb, eu as Ec, Oc as Ed, qo as Ee, Vt as F, ss as Fa, Ur as Fb, tu as Fc, Vn as Fd, Wo as Fe, xi as G, as as Ga, Zs as Gb, nu as Gc, Nn as Gd, Qn as Ge, Ze as H, xr as Ha, Ks as Hb, ru as Hc, Nc as Hd, xf as He, wi as I, wr as Ia, Ys as Ib, ou as Ic, Co as Id, Jo as Ie, Ti as J, Tr as Ja, ta as Jb, fn as Jc, jc as Jd, Xn as Je, Li as K, et as Ka, na as Kb, pn as Kc, te as Kd, Cf as Ke, lr as L, us as La, on as Lb, uu as Lc, Zc as Ld, Uf as Le, Ai as M, cs as Ma, ra as Mb, Or as Mc, Xc as Md, Df as Me, fr as N, ls as Na, oa as Nb, pu as Nc, el as Nd, Ef as Ne, Nt as O, fs as Oa, ia as Ob, dn as Oc, R as Od, Zo as Oe, vi as P, Lr as Pa, ot as Pb, bu as Pc, sl as Pd, er as Pe, Ci as Q, ps as Qa, sa as Qb, Yr as Qc, Ct as Qd, Ko as Qe, Ui as R, ds as Ra, aa as Rb, gn as Rc, Do as Rd, If as Re, Di as S, hs as Sa, ua as Sb, xu as Sc, Eo as Sd, kf as Se, Ei as T, bs as Ta, ca as Tb, vu as Tc, Fo as Td, Yo as Te, Fi as U, xs as Ua, O as Ub, Cu as Uc, Po as Ud, Sf as Ue, Pi as V, ws as Va, it as Vb, eo as Vc, Io as Vd, tr as Ve, Ii as W, Ts as Wa, _ as Wb, Eu as Wc, ko as Wd, _f as We, ki as X, Yt as Xa, xe as Xb, bn as Xc, Ro as Xd, Mi as Y, vs as Ya, da as Yb, to as Yc, Mo as Yd, M as Z, Cs as Za, we as Zb, J as Zc, Bo as Zd, Bi as _, Us as _a, sn as _b, at as _c, Hn as _d, r as a, mr as aa, Qt as ab, ma as ac, se as ad, gl as ae, q as b, jt as ba, Es as bb, an as bc, ve as bd, $o as be, re as c, Ht as ca, k as cb, ya as cc, xn as cd, ml as ce, pe as d, v as da, j as db, ha as dc, oo as dd, yl as de, Ne as e, Vi as ea, Xt as eb, ba as ec, wn as ed, G as ee, je as f, zt as fa, nt as fb, xa as fc, S as fd, Gn as fe, He as g, Gt as ga, en as gb, Dr as gc, Wu as gd, _o as ge, ze as h, oe as ha, Ar as hb, wa as hc, Ce as hd, hl as he, Ge as i, Ni as ia, Is as ib, Ta as ic, io as id, B as ie, _t as j, me as ja, tn as jb, La as jc, Ku as jd, bl as je, or as k, ji as ka, nn as kb, Er as kc, Ln as kd, Mt as ke, I as l, qt as la, ks as lb, Fr as lc, Yu as ld, Ve as le, ni as m, Ke as ma, Ss as mb, Te as mc, nc as md, Gf as me, ri as n, Ye as na, be as nb, Pr as nc, so as nd, qn as ne, oi as o, Wt as oa, Rs as ob, un as oc, ao as od, ne as oe, ii as p, hr as pa, tt as pb, Pa as pc, An as pd, Wn as pe, ir as q, N as qa, vr as qb, Sa as qc, Bn as qd, Jn as qe, si as r, Qe as ra, Cr as rb, Ra as rc, Dc as rd, Pl as re, ai as s, Jt as sa, rt as sb, Ma as sc, Ec as sd, Pt as se, ui as t, qi as ta, rn as tb, Ba as tc, Fc as td, Ol as te, ci as u, Wi as ua, Ms as ub, Va as uc, Pc as ud, Vl as ue, sr as v, Ji as va, Bs as vb, Na as vc, Ic as vd, Nl as ve, pi as w, Zi as wa, he as wb, ja as wc, Lo as wd, fe as we, We as x, Xe as xa, Os as xb, Le as xc, kc as xd, tf as xe, di as y, Zt as ya, $s as yb, Ja as yc, ee as yd, Yn as ye, Je as z, Ki as za, _s as zb, ie as zc, $n as zd, ff as ze };
|
|
15
15
|
//# sourceMappingURL=out.js.map
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-5FQ2VPF7.js.map
|