@visulima/task-runner 1.0.0-alpha.2 → 1.0.0-alpha.20
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/CHANGELOG.md +310 -0
- package/README.md +198 -52
- package/dist/index.d.ts +3795 -34
- package/dist/index.js +1 -20
- package/dist/packem_chunks/index.js +31 -0
- package/dist/packem_shared/Cache-C8FfeXpg.js +2 -0
- package/dist/packem_shared/CompositeLifeCycle-C6aee9GK.js +1 -0
- package/dist/packem_shared/FileAccessTracker-DBz_w4wl.js +50 -0
- package/dist/packem_shared/FingerprintManager-CYW2EwLc.js +2 -0
- package/dist/packem_shared/HttpRemoteCache-CpPl6lzE.js +1 -0
- package/dist/packem_shared/INPUT_URI_SCHEMES-Csrd0tlg.js +1 -0
- package/dist/packem_shared/IncrementalFileHasher-B-V3i2x-.js +1 -0
- package/dist/packem_shared/LogReporter-3R3oWj-Q.js +13 -0
- package/dist/packem_shared/ReapiRemoteCache-BXJip5wH.js +251 -0
- package/dist/packem_shared/TaskOrchestrator-CYj5MLwz.js +6 -0
- package/dist/packem_shared/TerminalBuffer-BtZy7TpT.js +3 -0
- package/dist/packem_shared/TrackedTaskExecutor-CtYLL3vS.js +1 -0
- package/dist/packem_shared/V2_ROOT-injxWBrl.js +1 -0
- package/dist/packem_shared/actionDigestForTaskHash-BOL4fZ9v.js +1 -0
- package/dist/packem_shared/archive-CDfGy5Lm.js +1 -0
- package/dist/packem_shared/buildForwardDependencyMap-DudUDFze.js +3 -0
- package/dist/packem_shared/collectFiles-W4bnBRpb.js +1 -0
- package/dist/packem_shared/collectNodeModulesBinDirs-CD-eDrtO.js +1 -0
- package/dist/packem_shared/computeTaskHash-CaPdG1BA.js +1 -0
- package/dist/packem_shared/containsBlob-DAU8R7GH.js +1 -0
- package/dist/packem_shared/createInputHandler-CkDCpPYy.js +1 -0
- package/dist/packem_shared/createTaskGraph-D8Jn_Dn9.js +1 -0
- package/dist/packem_shared/defaultTaskRunner-DMHpavzm.js +2 -0
- package/dist/packem_shared/detectFrameworks-WVZJOPgN.js +1 -0
- package/dist/packem_shared/detectScriptShell-CaTDk5cW.js +1 -0
- package/dist/packem_shared/digestBuffer-g11aCaDx.js +1 -0
- package/dist/packem_shared/enforceProjectConstraints-dNc1SwRi.js +1 -0
- package/dist/packem_shared/expandArguments-D7qvc6Rp.js +1 -0
- package/dist/packem_shared/expandShortcut-BErNHNXZ.js +1 -0
- package/dist/packem_shared/expandTokensInString-DVSFEdWu.js +1 -0
- package/dist/packem_shared/expandWildcard-DE0dOOZF.js +1 -0
- package/dist/packem_shared/extractPackageName-BeL6Gc3a.js +1 -0
- package/dist/packem_shared/findCycle-BY8-jmzB.js +1 -0
- package/dist/packem_shared/formatTimingTable-CP3rsDwf.js +7 -0
- package/dist/packem_shared/generateRunSummary-L9Z2NfWn.js +1 -0
- package/dist/packem_shared/getCurrentBranch-D-qoZByx.js +1 -0
- package/dist/packem_shared/getMainWorktreeRoot-DB9P2wDL.js +1 -0
- package/dist/packem_shared/isNativeAvailable-CkTjxb7P.js +1 -0
- package/dist/packem_shared/parseCommands-BHsXoUCd.js +1 -0
- package/dist/packem_shared/parsePartition-Bt1jBjZH.js +1 -0
- package/dist/packem_shared/projectGraphToDot-FN6oHDGH.js +250 -0
- package/dist/packem_shared/resolveCacheMode--4y60ODd.js +1 -0
- package/dist/packem_shared/resolveOutputs-CzGGEbcP.js +1 -0
- package/dist/packem_shared/runConcurrentFallback-BhJCT2LA.js +3 -0
- package/dist/packem_shared/runConcurrently-D1Ytsjaj.js +1 -0
- package/dist/packem_shared/runTeardown-DAn1xFWJ.js +1 -0
- package/dist/packem_shared/shell-quote-BhmqDUL1.js +1 -0
- package/dist/packem_shared/stripQuotes-jkZb0CL9.js +1 -0
- package/dist/packem_shared/toChromeTrace-DxN5NQIU.js +1 -0
- package/dist/packem_shared/tracked-executor-B90U4Um3.js +3 -0
- package/dist/packem_shared/utils-BH2W5Wml.js +1 -0
- package/dist/packem_shared/withRestart-DKtEGsQA.js +1 -0
- package/index.js +603 -0
- package/package.json +31 -19
- package/binding.js +0 -204
- package/dist/affected.d.ts +0 -48
- package/dist/cache.d.ts +0 -103
- package/dist/default-task-runner.d.ts +0 -44
- package/dist/file-access-tracker.d.ts +0 -53
- package/dist/fingerprint.d.ts +0 -45
- package/dist/framework-inference.d.ts +0 -35
- package/dist/graph-visualizer.d.ts +0 -74
- package/dist/incremental-hasher.d.ts +0 -58
- package/dist/life-cycle.d.ts +0 -36
- package/dist/lockfile-hasher.d.ts +0 -73
- package/dist/native-binding.d.ts +0 -64
- package/dist/packem_shared/Cache-IYpTYVUC.js +0 -298
- package/dist/packem_shared/CompositeLifeCycle-7AtYw1dv.js +0 -112
- package/dist/packem_shared/FileAccessTracker-CrtBAt5D.js +0 -239
- package/dist/packem_shared/FingerprintManager-D6Y0erg-.js +0 -227
- package/dist/packem_shared/IncrementalFileHasher-Ds3J6dgb.js +0 -151
- package/dist/packem_shared/RemoteCache-BDqrnDEi.js +0 -179
- package/dist/packem_shared/TaskOrchestrator-BvYs3ONw.js +0 -342
- package/dist/packem_shared/TaskScheduler-CJilHDta.js +0 -111
- package/dist/packem_shared/TrackedTaskExecutor-BGUKFE-7.js +0 -164
- package/dist/packem_shared/collectFiles-ClXHnHhg.js +0 -22
- package/dist/packem_shared/computeTaskHash-BoCnnvIJ.js +0 -356
- package/dist/packem_shared/createTaskGraph-CcsFaSrz.js +0 -164
- package/dist/packem_shared/defaultTaskRunner-CrW4v5Ye.js +0 -79
- package/dist/packem_shared/detectFrameworks-CeFzKE6J.js +0 -101
- package/dist/packem_shared/extractPackageName-CbVNW-dr.js +0 -189
- package/dist/packem_shared/filterAffectedTasks-I-18zPg6.js +0 -135
- package/dist/packem_shared/findCycle-DF4_BRdO.js +0 -212
- package/dist/packem_shared/generateRunSummary-qn-_jKwt.js +0 -134
- package/dist/packem_shared/isNativeAvailable-BWhnZ4ES.js +0 -19
- package/dist/packem_shared/projectGraphToDot-VdTjHcVp.js +0 -202
- package/dist/packem_shared/utils-zO0ZRgtf.js +0 -390
- package/dist/remote-cache.d.ts +0 -55
- package/dist/run-summary.d.ts +0 -89
- package/dist/task-graph-utils.d.ts +0 -39
- package/dist/task-graph.d.ts +0 -22
- package/dist/task-hasher.d.ts +0 -67
- package/dist/task-orchestrator.d.ts +0 -38
- package/dist/task-scheduler.d.ts +0 -18
- package/dist/tracked-executor.d.ts +0 -46
- package/dist/types.d.ts +0 -385
- package/dist/utils.d.ts +0 -39
package/dist/index.js
CHANGED
|
@@ -1,20 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { Cache, formatCacheSize, parseCacheSize } from './packem_shared/Cache-IYpTYVUC.js';
|
|
3
|
-
export { defaultTaskRunner } from './packem_shared/defaultTaskRunner-CrW4v5Ye.js';
|
|
4
|
-
export { FileAccessTracker, generatePreloadScript } from './packem_shared/FileAccessTracker-CrtBAt5D.js';
|
|
5
|
-
export { FingerprintManager } from './packem_shared/FingerprintManager-D6Y0erg-.js';
|
|
6
|
-
export { detectFrameworks, getFrameworkEnvVariables, inferFrameworkEnvPatterns } from './packem_shared/detectFrameworks-CeFzKE6J.js';
|
|
7
|
-
export { projectGraphToDot, toGraphAscii, toGraphHtml, toGraphJson, toGraphvizDot } from './packem_shared/projectGraphToDot-VdTjHcVp.js';
|
|
8
|
-
export { IncrementalFileHasher } from './packem_shared/IncrementalFileHasher-Ds3J6dgb.js';
|
|
9
|
-
export { CompositeLifeCycle, ConsoleLifeCycle, EmptyLifeCycle } from './packem_shared/CompositeLifeCycle-7AtYw1dv.js';
|
|
10
|
-
export { LockfileHasher, extractPackageName, parseNpmLockfile, parsePnpmLockfile, parseYarnLockfile } from './packem_shared/extractPackageName-CbVNW-dr.js';
|
|
11
|
-
export { isNativeAvailable, loadNativeBindings } from './packem_shared/isNativeAvailable-BWhnZ4ES.js';
|
|
12
|
-
export { RemoteCache } from './packem_shared/RemoteCache-BDqrnDEi.js';
|
|
13
|
-
export { generateRunSummary, writeRunSummary } from './packem_shared/generateRunSummary-qn-_jKwt.js';
|
|
14
|
-
export { createTaskGraph, getTaskId, parseTaskId } from './packem_shared/createTaskGraph-CcsFaSrz.js';
|
|
15
|
-
export { findCycle, findCycles, getDependentTasks, getLeafTasks, getTransitiveDependencies, makeAcyclic, reverseTaskGraph, walkTaskGraph } from './packem_shared/findCycle-DF4_BRdO.js';
|
|
16
|
-
export { InProcessTaskHasher, computeTaskHash } from './packem_shared/computeTaskHash-BoCnnvIJ.js';
|
|
17
|
-
export { TaskOrchestrator } from './packem_shared/TaskOrchestrator-BvYs3ONw.js';
|
|
18
|
-
export { TaskScheduler } from './packem_shared/TaskScheduler-CJilHDta.js';
|
|
19
|
-
export { TrackedTaskExecutor } from './packem_shared/TrackedTaskExecutor-BGUKFE-7.js';
|
|
20
|
-
export { c as collectFiles, a as createFailureResult, h as hashFile, b as hashStrings, r as readPackageDeps, d as resolveTaskCwd, s as sortObjectKeys, u as uniqueId } from './packem_shared/utils-zO0ZRgtf.js';
|
|
1
|
+
import{buildForwardDependencyMap as o,buildReverseDependencyMap as t,expandAffected as a,filterAffectedTasks as s,getAffectedProjects as p,getChangedFiles as n}from"./packem_shared/buildForwardDependencyMap-DudUDFze.js";import{createRemoteCacheBackend as i,resolveCacheMode as c,resolveTurboEnvCompat as f}from"./packem_shared/resolveCacheMode--4y60ODd.js";import{actionDigestForTaskHash as x,containsByTaskHash as h,retrieveByTaskHash as d,storeByTaskHash as u}from"./packem_shared/actionDigestForTaskHash-BOL4fZ9v.js";import{HttpRemoteCache as T}from"./packem_shared/HttpRemoteCache-CpPl6lzE.js";import{ReapiRemoteCache as g}from"./packem_shared/ReapiRemoteCache-BXJip5wH.js";import{Cache as R,DEFAULT_CACHE_DIRECTORY_NAME as v,formatCacheSize as F,parseCacheSize as B}from"./packem_shared/Cache-C8FfeXpg.js";import{digestBuffer as E,digestFile as P}from"./packem_shared/digestBuffer-g11aCaDx.js";import{V2_AC as I,V2_CAS as L,V2_INDEX as H,V2_ROOT as A,V2_TMP as w,acEntryPath as D,casBlobPath as _,taskHashIndexPath as M}from"./packem_shared/V2_ROOT-injxWBrl.js";import{containsBlob as N,fetchBlobToFile as O,putBlobFromBytes as U,putBlobFromFile as V,touchBlob as W,verifyBlob as j}from"./packem_shared/containsBlob-DAU8R7GH.js";import{toChromeTrace as Y,writeChromeTrace as q}from"./packem_shared/toChromeTrace-DxN5NQIU.js";import{parseCommands as K}from"./packem_shared/parseCommands-BHsXoUCd.js";import{runConcurrently as X}from"./packem_shared/runConcurrently-D1Ytsjaj.js";import{runConcurrentFallback as $}from"./packem_shared/runConcurrentFallback-BhJCT2LA.js";import{defaultTaskRunner as re}from"./packem_shared/defaultTaskRunner-DMHpavzm.js";import{detectScriptShell as te}from"./packem_shared/detectScriptShell-CaTDk5cW.js";import{FileAccessTracker as se,generatePreloadScript as pe}from"./packem_shared/FileAccessTracker-DBz_w4wl.js";import{FingerprintManager as me}from"./packem_shared/FingerprintManager-CYW2EwLc.js";import{detectFrameworks as ce,getFrameworkEnvVariables as fe,inferFrameworkEnvPatterns as le}from"./packem_shared/detectFrameworks-WVZJOPgN.js";import{projectGraphToDot as he,toGraphAscii as de,toGraphHtml as ue,toGraphJson as ke,toGraphvizDot as Te}from"./packem_shared/projectGraphToDot-FN6oHDGH.js";import{IncrementalFileHasher as ge}from"./packem_shared/IncrementalFileHasher-B-V3i2x-.js";import{CompositeLifeCycle as Re,ConsoleLifeCycle as ve,EmptyLifeCycle as Fe}from"./packem_shared/CompositeLifeCycle-C6aee9GK.js";import{LockfileHasher as be,extractPackageName as Ee,parseNpmLockfile as Pe,parsePnpmLockfile as Se,parseYarnLockfile as Ie}from"./packem_shared/extractPackageName-BeL6Gc3a.js";import{LogReporter as He,createLogReporter as Ae}from"./packem_shared/LogReporter-3R3oWj-Q.js";import{isNativeAvailable as De,loadNativeBindings as _e}from"./packem_shared/isNativeAvailable-CkTjxb7P.js";import{resolveOutputs as Ge}from"./packem_shared/resolveOutputs-CzGGEbcP.js";import{INPUT_URI_SCHEMES as Oe,InvalidInputUriError as Ue,looksLikeInputUri as Ve,parseInputUri as We}from"./packem_shared/INPUT_URI_SCHEMES-Csrd0tlg.js";import{buildEnhancedPath as ze,collectNodeModulesBinDirs as Ye,withEnhancedPath as qe}from"./packem_shared/collectNodeModulesBinDirs-CD-eDrtO.js";import{enforceProjectConstraints as Ke}from"./packem_shared/enforceProjectConstraints-dNc1SwRi.js";import{generateRunSummary as Xe,getLastRunSummaryPath as Ze,readLastRunSummary as $e,writeLastRunSummary as er,writeRunSummary as rr}from"./packem_shared/generateRunSummary-L9Z2NfWn.js";import{createTaskGraph as tr,getTaskId as ar,parseTaskId as sr}from"./packem_shared/createTaskGraph-D8Jn_Dn9.js";import{findCycle as nr,findCycles as mr,getDependentTasks as ir,getLeafTasks as cr,getTransitiveDependencies as fr,makeAcyclic as lr,reverseTaskGraph as xr,walkTaskGraph as hr}from"./packem_shared/findCycle-BY8-jmzB.js";import{InProcessTaskHasher as ur,computeTaskHash as kr}from"./packem_shared/computeTaskHash-CaPdG1BA.js";import{TaskOrchestrator as Cr}from"./packem_shared/TaskOrchestrator-CYj5MLwz.js";import{TaskScheduler as yr,parsePartition as Rr}from"./packem_shared/parsePartition-Bt1jBjZH.js";import{TerminalBuffer as Fr}from"./packem_shared/TerminalBuffer-BtZy7TpT.js";import{T as br}from"./packem_shared/tracked-executor-B90U4Um3.js";import{d as Pr,j as Sr,T as Ir,b as Lr,E as Hr,v as Ar,h as wr,O as Dr}from"./packem_shared/utils-BH2W5Wml.js";import{evaluateWhen as Mr,explainWhen as Gr,getCurrentBranch as Nr,resetBranchCache as Or}from"./packem_shared/getCurrentBranch-D-qoZByx.js";import{getMainWorktreeRoot as Vr,isLinkedWorktree as Wr,resetWorktreeCache as jr}from"./packem_shared/getMainWorktreeRoot-DB9P2wDL.js";import{createInputHandler as Yr}from"./packem_shared/createInputHandler-CkDCpPYy.js";import{expandArguments as Jr}from"./packem_shared/expandArguments-D7qvc6Rp.js";import{expandShortcut as Qr}from"./packem_shared/expandShortcut-BErNHNXZ.js";import{expandTokens as Zr,expandTokensInString as $r}from"./packem_shared/expandTokensInString-DVSFEdWu.js";import{expandWildcard as ro}from"./packem_shared/expandWildcard-DE0dOOZF.js";import{formatTimingTable as to,logTimings as ao}from"./packem_shared/formatTimingTable-CP3rsDwf.js";import{runTeardown as po}from"./packem_shared/runTeardown-DAn1xFWJ.js";import{stripQuotes as mo}from"./packem_shared/stripQuotes-jkZb0CL9.js";import{withRestart as co}from"./packem_shared/withRestart-DKtEGsQA.js";export{R as Cache,Re as CompositeLifeCycle,ve as ConsoleLifeCycle,v as DEFAULT_CACHE_DIRECTORY_NAME,Fe as EmptyLifeCycle,se as FileAccessTracker,me as FingerprintManager,T as HttpRemoteCache,Oe as INPUT_URI_SCHEMES,ur as InProcessTaskHasher,ge as IncrementalFileHasher,Ue as InvalidInputUriError,be as LockfileHasher,He as LogReporter,g as ReapiRemoteCache,Cr as TaskOrchestrator,yr as TaskScheduler,Fr as TerminalBuffer,br as TrackedTaskExecutor,I as V2_AC,L as V2_CAS,H as V2_INDEX,A as V2_ROOT,w as V2_TMP,D as acEntryPath,x as actionDigestForTaskHash,ze as buildEnhancedPath,o as buildForwardDependencyMap,t as buildReverseDependencyMap,_ as casBlobPath,Pr as collectFiles,Ye as collectNodeModulesBinDirs,kr as computeTaskHash,N as containsBlob,h as containsByTaskHash,Sr as createFailureResult,Yr as createInputHandler,Ae as createLogReporter,i as createRemoteCacheBackend,tr as createTaskGraph,re as defaultTaskRunner,ce as detectFrameworks,te as detectScriptShell,E as digestBuffer,P as digestFile,Ke as enforceProjectConstraints,Mr as evaluateWhen,a as expandAffected,Jr as expandArguments,Qr as expandShortcut,Zr as expandTokens,$r as expandTokensInString,ro as expandWildcard,Gr as explainWhen,Ee as extractPackageName,O as fetchBlobToFile,s as filterAffectedTasks,nr as findCycle,mr as findCycles,F as formatCacheSize,to as formatTimingTable,pe as generatePreloadScript,Xe as generateRunSummary,p as getAffectedProjects,n as getChangedFiles,Nr as getCurrentBranch,ir as getDependentTasks,fe as getFrameworkEnvVariables,Ze as getLastRunSummaryPath,cr as getLeafTasks,Vr as getMainWorktreeRoot,ar as getTaskId,fr as getTransitiveDependencies,Ir as hashFile,Lr as hashStrings,le as inferFrameworkEnvPatterns,Wr as isLinkedWorktree,De as isNativeAvailable,_e as loadNativeBindings,ao as logTimings,Ve as looksLikeInputUri,lr as makeAcyclic,B as parseCacheSize,K as parseCommands,We as parseInputUri,Pe as parseNpmLockfile,Rr as parsePartition,Se as parsePnpmLockfile,sr as parseTaskId,Ie as parseYarnLockfile,he as projectGraphToDot,U as putBlobFromBytes,V as putBlobFromFile,$e as readLastRunSummary,Hr as readPackageDeps,Or as resetBranchCache,jr as resetWorktreeCache,c as resolveCacheMode,Ge as resolveOutputs,Ar as resolveTaskCwd,f as resolveTurboEnvCompat,d as retrieveByTaskHash,xr as reverseTaskGraph,$ as runConcurrentFallback,X as runConcurrently,po as runTeardown,wr as sortObjectKeys,u as storeByTaskHash,mo as stripQuotes,M as taskHashIndexPath,Y as toChromeTrace,de as toGraphAscii,ue as toGraphHtml,ke as toGraphJson,Te as toGraphvizDot,W as touchBlob,Dr as uniqueId,j as verifyBlob,hr as walkTaskGraph,qe as withEnhancedPath,co as withRestart,q as writeChromeTrace,er as writeLastRunSummary,rr as writeRunSummary};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import __cjs_mod__ from "node:module"; // -- packem CommonJS require shim --
|
|
2
|
+
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
3
|
+
var Hr=Object.defineProperty;var g=(w,s)=>Hr(w,"name",{value:s,configurable:!0});function Kr(w,s){for(var y=0;y<s.length;y++){const f=s[y];if(typeof f!="string"&&!Array.isArray(f))for(const v in f)v!=="default"&&!(v in w)&&(w[v]=f[v])}return Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})}g(Kr,"_mergeNamespaces");var Gr=Object.defineProperty,ve=g((w,s)=>Gr(w,"name",{value:s,configurable:!0}),"t"),de=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fr(w){return w&&w.__esModule&&Object.prototype.hasOwnProperty.call(w,"default")?w.default:w}g(Fr,"getDefaultExportFromCjs");ve(Fr,"getDefaultExportFromCjs");function Xr(w){return w&&Object.prototype.hasOwnProperty.call(w,"default")?w.default:w}g(Xr,"getDefaultExportFromNamespaceIfPresent");ve(Xr,"getDefaultExportFromNamespaceIfPresent");function Yr(w){return w&&Object.prototype.hasOwnProperty.call(w,"default")&&Object.keys(w).length===1?w.default:w}g(Yr,"getDefaultExportFromNamespaceIfNotNamed");ve(Yr,"getDefaultExportFromNamespaceIfNotNamed");function Qr(w){if(Object.prototype.hasOwnProperty.call(w,"__esModule"))return w;var s=w.default;if(typeof s=="function"){var y=ve(g(function f(){var v=!1;try{v=this instanceof f}catch{}return v?Reflect.construct(s,arguments,this.constructor):s.apply(this,arguments)},"a"),"a");y.prototype=s.prototype}else y={};return Object.defineProperty(y,"__esModule",{value:!0}),Object.keys(w).forEach(function(f){var v=Object.getOwnPropertyDescriptor(w,f);Object.defineProperty(y,f,v.get?v:{enumerable:!0,get:ve(function(){return w[f]},"get")})}),y}g(Qr,"getAugmentedNamespace");ve(Qr,"getAugmentedNamespace");var Se={exports:{}},Te={exports:{}},Pe={},Re={},xe,Jt;function Ir(){if(Jt)return xe;Jt=1;var w=Object.defineProperty,s=g((f,v)=>w(f,"name",{value:v,configurable:!0}),"n");xe=y;function y(f,v){for(var p=new Array(arguments.length-1),n=0,r=2,u=!0;r<arguments.length;)p[n++]=arguments[r++];return new Promise(s(function(o,e){p[n]=s(function(c){if(u)if(u=!1,c)e(c);else{for(var i=new Array(arguments.length-1),t=0;t<i.length;)i[t++]=arguments[t];o.apply(null,i)}},"callback");try{f.apply(v||null,p)}catch(c){u&&(u=!1,e(c))}},"executor"))}return g(y,"asPromise"),s(y,"asPromise"),xe}g(Ir,"requireAspromise");var qe={},Vt;function ei(){return Vt||(Vt=1,(function(w){var s=Object.defineProperty,y=g((c,i)=>s(c,"name",{value:i,configurable:!0}),"c"),f=w;f.length=y(function(c){var i=c.length;if(!i)return 0;for(;i>0&&c.charAt(i-1)==="=";)--i;return Math.floor(i*3/4)},"length");for(var v=new Array(64),p=new Array(123),n=0;n<64;)p[v[n]=n<26?n+65:n<52?n+71:n<62?n-4:n-59|43]=n++;p[45]=62,p[95]=63,f.encode=y(function(c,i,t){for(var a=null,h=[],m=0,b=0,S;i<t;){var d=c[i++];switch(b){case 0:h[m++]=v[d>>2],S=(d&3)<<4,b=1;break;case 1:h[m++]=v[S|d>>4],S=(d&15)<<2,b=2;break;case 2:h[m++]=v[S|d>>6],h[m++]=v[d&63],b=0;break}m>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,h)),m=0)}return b&&(h[m++]=v[S],h[m++]=61,b===1&&(h[m++]=61)),a?(m&&a.push(String.fromCharCode.apply(String,h.slice(0,m))),a.join("")):String.fromCharCode.apply(String,h.slice(0,m))},"encode");var r="invalid encoding";f.decode=y(function(c,i,t){for(var a=t,h=0,m,b=0;b<c.length;){var S=c.charCodeAt(b++);if(S===61&&h>1)break;if((S=p[S])===void 0)throw Error(r);switch(h){case 0:m=S,h=1;break;case 1:i[t++]=m<<2|(S&48)>>4,m=S,h=2;break;case 2:i[t++]=(m&15)<<4|(S&60)>>2,m=S,h=3;break;case 3:i[t++]=(m&3)<<6|S,h=0;break}}if(h===1)throw Error(r);return t-a},"decode");var u=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,o=/[-_]/,e=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2}(?:==)?|[A-Za-z0-9_-]{3}=?)?$/;f.test=y(function(c){return u.test(c)||o.test(c)&&e.test(c)},"test")})(qe)),qe}g(ei,"requireBase64");var Be,Ut;function ti(){if(Ut)return Be;Ut=1;var w=Object.defineProperty,s=g((f,v)=>w(f,"name",{value:v,configurable:!0}),"r");Be=y;function y(){this._listeners={}}return g(y,"EventEmitter"),s(y,"EventEmitter"),y.prototype.on=s(function(f,v,p){return(this._listeners[f]||(this._listeners[f]=[])).push({fn:v,ctx:p||this}),this},"on"),y.prototype.off=s(function(f,v){if(f===void 0)this._listeners={};else if(v===void 0)this._listeners[f]=[];else for(var p=this._listeners[f],n=0;n<p.length;)p[n].fn===v?p.splice(n,1):++n;return this},"off"),y.prototype.emit=s(function(f){var v=this._listeners[f];if(v){for(var p=[],n=1;n<arguments.length;)p.push(arguments[n++]);for(n=0;n<v.length;)v[n].fn.apply(v[n++].ctx,p)}return this},"emit"),Be}g(ti,"requireEventemitter");var Fe,$t;function ri(){if($t)return Fe;$t=1;var w=Object.defineProperty,s=g((r,u)=>w(r,"name",{value:u,configurable:!0}),"F");Fe=y(y);function y(r){return typeof Float32Array<"u"?(function(){var u=new Float32Array([-0]),o=new Uint8Array(u.buffer),e=o[3]===128;function c(h,m,b){u[0]=h,m[b]=o[0],m[b+1]=o[1],m[b+2]=o[2],m[b+3]=o[3]}g(c,"E"),s(c,"writeFloat_f32_cpy");function i(h,m,b){u[0]=h,m[b]=o[3],m[b+1]=o[2],m[b+2]=o[1],m[b+3]=o[0]}g(i,"_"),s(i,"writeFloat_f32_rev"),r.writeFloatLE=e?c:i,r.writeFloatBE=e?i:c;function t(h,m){return o[0]=h[m],o[1]=h[m+1],o[2]=h[m+2],o[3]=h[m+3],u[0]}g(t,"d"),s(t,"readFloat_f32_cpy");function a(h,m){return o[3]=h[m],o[2]=h[m+1],o[1]=h[m+2],o[0]=h[m+3],u[0]}g(a,"c"),s(a,"readFloat_f32_rev"),r.readFloatLE=e?t:a,r.readFloatBE=e?a:t})():(function(){function u(e,c,i,t){var a=c<0?1:0;if(a&&(c=-c),c===0)e(1/c>0?0:2147483648,i,t);else if(isNaN(c))e(2143289344,i,t);else if(c>34028234663852886e22)e((a<<31|2139095040)>>>0,i,t);else if(c<11754943508222875e-54)e((a<<31|Math.round(c/1401298464324817e-60))>>>0,i,t);else{var h=Math.floor(Math.log(c)/Math.LN2),m=Math.round(c*Math.pow(2,-h)*8388608)&8388607;e((a<<31|h+127<<23|m)>>>0,i,t)}}g(u,"t"),s(u,"writeFloat_ieee754"),r.writeFloatLE=u.bind(null,f),r.writeFloatBE=u.bind(null,v);function o(e,c,i){var t=e(c,i),a=(t>>31)*2+1,h=t>>>23&255,m=t&8388607;return h===255?m?NaN:a*(1/0):h===0?a*1401298464324817e-60*m:a*Math.pow(2,h-150)*(m+8388608)}g(o,"n"),s(o,"readFloat_ieee754"),r.readFloatLE=o.bind(null,p),r.readFloatBE=o.bind(null,n)})(),typeof Float64Array<"u"?(function(){var u=new Float64Array([-0]),o=new Uint8Array(u.buffer),e=o[7]===128;function c(h,m,b){u[0]=h,m[b]=o[0],m[b+1]=o[1],m[b+2]=o[2],m[b+3]=o[3],m[b+4]=o[4],m[b+5]=o[5],m[b+6]=o[6],m[b+7]=o[7]}g(c,"E"),s(c,"writeDouble_f64_cpy");function i(h,m,b){u[0]=h,m[b]=o[7],m[b+1]=o[6],m[b+2]=o[5],m[b+3]=o[4],m[b+4]=o[3],m[b+5]=o[2],m[b+6]=o[1],m[b+7]=o[0]}g(i,"_"),s(i,"writeDouble_f64_rev"),r.writeDoubleLE=e?c:i,r.writeDoubleBE=e?i:c;function t(h,m){return o[0]=h[m],o[1]=h[m+1],o[2]=h[m+2],o[3]=h[m+3],o[4]=h[m+4],o[5]=h[m+5],o[6]=h[m+6],o[7]=h[m+7],u[0]}g(t,"d"),s(t,"readDouble_f64_cpy");function a(h,m){return o[7]=h[m],o[6]=h[m+1],o[5]=h[m+2],o[4]=h[m+3],o[3]=h[m+4],o[2]=h[m+5],o[1]=h[m+6],o[0]=h[m+7],u[0]}g(a,"c"),s(a,"readDouble_f64_rev"),r.readDoubleLE=e?t:a,r.readDoubleBE=e?a:t})():(function(){function u(e,c,i,t,a,h){var m=t<0?1:0;if(m&&(t=-t),t===0)e(0,a,h+c),e(1/t>0?0:2147483648,a,h+i);else if(isNaN(t))e(0,a,h+c),e(2146959360,a,h+i);else if(t>17976931348623157e292)e(0,a,h+c),e((m<<31|2146435072)>>>0,a,h+i);else{var b;if(t<22250738585072014e-324)b=t/5e-324,e(b>>>0,a,h+c),e((m<<31|b/4294967296)>>>0,a,h+i);else{var S=Math.floor(Math.log(t)/Math.LN2);S===1024&&(S=1023),b=t*Math.pow(2,-S),e(b*4503599627370496>>>0,a,h+c),e((m<<31|S+1023<<20|b*1048576&1048575)>>>0,a,h+i)}}}g(u,"t"),s(u,"writeDouble_ieee754"),r.writeDoubleLE=u.bind(null,f,0,4),r.writeDoubleBE=u.bind(null,v,4,0);function o(e,c,i,t,a){var h=e(t,a+c),m=e(t,a+i),b=(m>>31)*2+1,S=m>>>20&2047,d=4294967296*(m&1048575)+h;return S===2047?d?NaN:b*(1/0):S===0?b*5e-324*d:b*Math.pow(2,S-1075)*(d+4503599627370496)}g(o,"n"),s(o,"readDouble_ieee754"),r.readDoubleLE=o.bind(null,p,0,4),r.readDoubleBE=o.bind(null,n,4,0)})(),r}g(y,"factory"),s(y,"factory");function f(r,u,o){u[o]=r&255,u[o+1]=r>>>8&255,u[o+2]=r>>>16&255,u[o+3]=r>>>24}g(f,"writeUintLE"),s(f,"writeUintLE");function v(r,u,o){u[o]=r>>>24,u[o+1]=r>>>16&255,u[o+2]=r>>>8&255,u[o+3]=r&255}g(v,"writeUintBE"),s(v,"writeUintBE");function p(r,u){return(r[u]|r[u+1]<<8|r[u+2]<<16|r[u+3]<<24)>>>0}g(p,"readUintLE"),s(p,"readUintLE");function n(r,u){return(r[u]<<24|r[u+1]<<16|r[u+2]<<8|r[u+3])>>>0}return g(n,"readUintBE"),s(n,"readUintBE"),Fe}g(ri,"requireFloat");function zt(w){throw new Error('Could not dynamically require "'+w+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}g(zt,"commonjsRequire");var Ie,Zt;function ii(){if(Zt)return Ie;Zt=1;var w=Object.defineProperty,s=g((f,v)=>w(f,"name",{value:v,configurable:!0}),"t");Ie=y;function y(f){try{if(typeof zt!="function")return null;var v=zt(f);return v&&(v.length||Object.keys(v).length)?v:null}catch{return null}}return g(y,"inquire"),s(y,"inquire"),Ie}g(ii,"requireInquire");var Le={},Wt;function ni(){return Wt||(Wt=1,(function(w){var s=Object.defineProperty,y=g((n,r)=>s(n,"name",{value:r,configurable:!0}),"l"),f=w,v="�";f.length=y(function(n){for(var r=0,u=0,o=0;o<n.length;++o)u=n.charCodeAt(o),u<128?r+=1:u<2048?r+=2:(u&64512)===55296&&(n.charCodeAt(o+1)&64512)===56320?(++o,r+=4):r+=3;return r},"utf8_length");function p(n,r,u,o){for(var e=r;e<u;){var c=n[e++];if(c<=127)o+=String.fromCharCode(c);else if(c>=192&&c<224){var i=(c&31)<<6|n[e++]&63;o+=i>=128?String.fromCharCode(i):v}else if(c>=224&&c<240){var t=(c&15)<<12|(n[e++]&63)<<6|n[e++]&63;o+=t>=2048?String.fromCharCode(t):v}else if(c>=240){var a=(c&7)<<18|(n[e++]&63)<<12|(n[e++]&63)<<6|n[e++]&63;a<65536||a>1114111?o+=v:(a-=65536,o+=String.fromCharCode(55296+(a>>10)),o+=String.fromCharCode(56320+(a&1023)))}}return o}g(p,"utf8_read_js"),y(p,"utf8_read_js"),f.read=y(function(n,r,u){if(u-r<1)return"";for(var o="",e=r,c,i,t,a,h,m,b,S;e+7<u;e+=8){if(c=n[e],i=n[e+1],t=n[e+2],a=n[e+3],h=n[e+4],m=n[e+5],b=n[e+6],S=n[e+7],(c|i|t|a|h|m|b|S)&128)return p(n,e,u,o);o+=String.fromCharCode(c,i,t,a,h,m,b,S)}for(;e<u;++e){if(c=n[e],c&128)return p(n,e,u,o);o+=String.fromCharCode(c)}return o},"utf8_read_ascii"),f.write=y(function(n,r,u){for(var o=u,e,c,i=0;i<n.length;++i)e=n.charCodeAt(i),e<128?r[u++]=e:e<2048?(r[u++]=e>>6|192,r[u++]=e&63|128):(e&64512)===55296&&((c=n.charCodeAt(i+1))&64512)===56320?(e=65536+((e&1023)<<10)+(c&1023),++i,r[u++]=e>>18|240,r[u++]=e>>12&63|128,r[u++]=e>>6&63|128,r[u++]=e&63|128):(r[u++]=e>>12|224,r[u++]=e>>6&63|128,r[u++]=e&63|128);return u-o},"utf8_write")})(Le)),Le}g(ni,"requireUtf8");var De,Ht;function oi(){if(Ht)return De;Ht=1;var w=Object.defineProperty,s=g((f,v)=>w(f,"name",{value:v,configurable:!0}),"l");De=y;function y(f,v,p){var n=p||8192,r=n>>>1,u=null,o=n;return s(function(e){if(e<1||e>r)return f(e);o+e>n&&(u=f(n),o=0);var c=v.call(u,o,o+=e);return o&7&&(o=(o|7)+1),c},"pool_alloc")}return g(y,"pool"),s(y,"pool"),De}g(oi,"requirePool");var Ce,Kt;function si(){if(Kt)return Ce;Kt=1;var w=Object.defineProperty,s=g((r,u)=>w(r,"name",{value:u,configurable:!0}),"r");Ce=f;var y=fe();function f(r,u){this.lo=r>>>0,this.hi=u>>>0}g(f,"LongBits"),s(f,"LongBits");var v=f.zero=new f(0,0);v.toNumber=function(){return 0},v.zzEncode=v.zzDecode=function(){return this},v.length=function(){return 1};var p=f.zeroHash="\0\0\0\0\0\0\0\0";f.fromNumber=s(function(r){if(r===0)return v;var u=r<0;u&&(r=-r);var o=r>>>0,e=(r-o)/4294967296>>>0;return u&&(e=~e>>>0,o=~o>>>0,++o>4294967295&&(o=0,++e>4294967295&&(e=0))),new f(o,e)},"fromNumber"),f.from=s(function(r){if(typeof r=="number")return f.fromNumber(r);if(y.isString(r))if(y.Long)r=y.Long.fromString(r);else return f.fromNumber(parseInt(r,10));return r.low||r.high?new f(r.low>>>0,r.high>>>0):v},"from"),f.prototype.toNumber=s(function(r){if(!r&&this.hi>>>31){var u=~this.lo+1>>>0,o=~this.hi>>>0;return u||(o=o+1>>>0),-(u+o*4294967296)}return this.lo+this.hi*4294967296},"toNumber"),f.prototype.toLong=s(function(r){return y.Long?new y.Long(this.lo|0,this.hi|0,!!r):{low:this.lo|0,high:this.hi|0,unsigned:!!r}},"toLong");var n=String.prototype.charCodeAt;return f.fromHash=s(function(r){return r===p?v:new f((n.call(r,0)|n.call(r,1)<<8|n.call(r,2)<<16|n.call(r,3)<<24)>>>0,(n.call(r,4)|n.call(r,5)<<8|n.call(r,6)<<16|n.call(r,7)<<24)>>>0)},"fromHash"),f.prototype.toHash=s(function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},"toHash"),f.prototype.zzEncode=s(function(){var r=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^r)>>>0,this.lo=(this.lo<<1^r)>>>0,this},"zzEncode"),f.prototype.zzDecode=s(function(){var r=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^r)>>>0,this.hi=(this.hi>>>1^r)>>>0,this},"zzDecode"),f.prototype.length=s(function(){var r=this.lo,u=(this.lo>>>28|this.hi<<4)>>>0,o=this.hi>>>24;return o===0?u===0?r<16384?r<128?1:2:r<2097152?3:4:u<16384?u<128?5:6:u<2097152?7:8:o<128?9:10},"length"),Ce}g(si,"requireLongbits");var we={exports:{}},ai=we.exports,Gt;function ui(){return Gt||(Gt=1,(function(w,s){var y=Object.defineProperty,f=g((v,p)=>y(v,"name",{value:p,configurable:!0}),"h");(function(v,p){function n(r){return r.default||r}g(n,"r"),f(n,"preferDefault"),p(s),w.exports=n(s)})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:ai,function(v){Object.defineProperty(v,"__esModule",{value:!0}),v.default=void 0;/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2009 The Closure Library Authors
|
|
6
|
+
* Copyright 2020 Daniel Wirtz / The long.js Authors.
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
21
|
+
*/var p=null;try{p=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function n(l,O,x){this.low=l|0,this.high=O|0,this.unsigned=!!x}g(n,"r"),f(n,"Long"),Object.defineProperty(n.prototype,"__isLong__",{value:!0});function r(l){return(l&&l.__isLong__)===!0}g(r,"g"),f(r,"isLong");function u(l){var O=Math.clz32(l&-l);return l?31-O:O}g(u,"R"),f(u,"ctz32"),n.isLong=r;var o={},e={};function c(l,O){var x,q,C;return O?(l>>>=0,(C=0<=l&&l<256)&&(q=e[l],q)?q:(x=t(l,0,!0),C&&(e[l]=x),x)):(l|=0,(C=-128<=l&&l<128)&&(q=o[l],q)?q:(x=t(l,l<0?-1:0,!1),C&&(o[l]=x),x))}g(c,"T"),f(c,"fromInt"),n.fromInt=c;function i(l,O){if(isNaN(l))return O?L:I;if(O){if(l<0)return L;if(l>=_)return B}else{if(l<=-R)return z;if(l+1>=R)return $}return l<0?i(-l,O).neg():t(l%d|0,l/d|0,O)}g(i,"I"),f(i,"fromNumber"),n.fromNumber=i;function t(l,O,x){return new n(l,O,x)}g(t,"f"),f(t,"fromBits"),n.fromBits=t;var a=Math.pow;function h(l,O,x){if(l.length===0)throw Error("empty string");if(typeof O=="number"?(x=O,O=!1):O=!!O,l==="NaN"||l==="Infinity"||l==="+Infinity"||l==="-Infinity")return O?L:I;if(x=x||10,x<2||36<x)throw RangeError("radix");var q;if((q=l.indexOf("-"))>0)throw Error("interior hyphen");if(q===0)return h(l.substring(1),O,x).neg();for(var C=i(a(x,8)),M=I,D=0;D<l.length;D+=8){var V=Math.min(8,l.length-D),U=parseInt(l.substring(D,D+V),x);if(V<8){var Z=i(a(x,V));M=M.mul(Z).add(i(U))}else M=M.mul(C),M=M.add(i(U))}return M.unsigned=O,M}g(h,"M"),f(h,"fromString"),n.fromString=h;function m(l,O){return typeof l=="number"?i(l,O):typeof l=="string"?h(l,O):t(l.low,l.high,typeof O=="boolean"?O:l.unsigned)}g(m,"v"),f(m,"fromValue"),n.fromValue=m;var b=65536,S=1<<24,d=b*b,_=d*d,R=_/2,P=c(S),I=c(0);n.ZERO=I;var L=c(0,!0);n.UZERO=L;var W=c(1);n.ONE=W;var te=c(1,!0);n.UONE=te;var J=c(-1);n.NEG_ONE=J;var $=t(-1,2147483647,!1);n.MAX_VALUE=$;var B=t(-1,-1,!0);n.MAX_UNSIGNED_VALUE=B;var z=t(0,-2147483648,!1);n.MIN_VALUE=z;var j=n.prototype;j.toInt=f(function(){return this.unsigned?this.low>>>0:this.low},"toInt"),j.toNumber=f(function(){return this.unsigned?(this.high>>>0)*d+(this.low>>>0):this.high*d+(this.low>>>0)},"toNumber"),j.toString=f(function(l){if(l=l||10,l<2||36<l)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(z)){var O=i(l),x=this.div(O),q=x.mul(O).sub(this);return x.toString(l)+q.toInt().toString(l)}else return"-"+this.neg().toString(l);for(var C=i(a(l,6),this.unsigned),M=this,D="";;){var V=M.div(C),U=M.sub(V.mul(C)).toInt()>>>0,Z=U.toString(l);if(M=V,M.isZero())return Z+D;for(;Z.length<6;)Z="0"+Z;D=""+Z+D}},"toString"),j.getHighBits=f(function(){return this.high},"getHighBits"),j.getHighBitsUnsigned=f(function(){return this.high>>>0},"getHighBitsUnsigned"),j.getLowBits=f(function(){return this.low},"getLowBits"),j.getLowBitsUnsigned=f(function(){return this.low>>>0},"getLowBitsUnsigned"),j.getNumBitsAbs=f(function(){if(this.isNegative())return this.eq(z)?64:this.neg().getNumBitsAbs();for(var l=this.high!=0?this.high:this.low,O=31;O>0&&(l&1<<O)==0;O--);return this.high!=0?O+33:O+1},"getNumBitsAbs"),j.isSafeInteger=f(function(){var l=this.high>>21;return l?this.unsigned?!1:l===-1&&!(this.low===0&&this.high===-2097152):!0},"isSafeInteger"),j.isZero=f(function(){return this.high===0&&this.low===0},"isZero"),j.eqz=j.isZero,j.isNegative=f(function(){return!this.unsigned&&this.high<0},"isNegative"),j.isPositive=f(function(){return this.unsigned||this.high>=0},"isPositive"),j.isOdd=f(function(){return(this.low&1)===1},"isOdd"),j.isEven=f(function(){return(this.low&1)===0},"isEven"),j.equals=f(function(l){return r(l)||(l=m(l)),this.unsigned!==l.unsigned&&this.high>>>31===1&&l.high>>>31===1?!1:this.high===l.high&&this.low===l.low},"equals"),j.eq=j.equals,j.notEquals=f(function(l){return!this.eq(l)},"notEquals"),j.neq=j.notEquals,j.ne=j.notEquals,j.lessThan=f(function(l){return this.comp(l)<0},"lessThan"),j.lt=j.lessThan,j.lessThanOrEqual=f(function(l){return this.comp(l)<=0},"lessThanOrEqual"),j.lte=j.lessThanOrEqual,j.le=j.lessThanOrEqual,j.greaterThan=f(function(l){return this.comp(l)>0},"greaterThan"),j.gt=j.greaterThan,j.greaterThanOrEqual=f(function(l){return this.comp(l)>=0},"greaterThanOrEqual"),j.gte=j.greaterThanOrEqual,j.ge=j.greaterThanOrEqual,j.compare=f(function(l){if(r(l)||(l=m(l)),this.eq(l))return 0;var O=this.isNegative(),x=l.isNegative();return O&&!x?-1:!O&&x?1:this.unsigned?l.high>>>0>this.high>>>0||l.high===this.high&&l.low>>>0>this.low>>>0?-1:1:this.sub(l).isNegative()?-1:1},"compare"),j.comp=j.compare,j.negate=f(function(){return!this.unsigned&&this.eq(z)?z:this.not().add(W)},"negate"),j.neg=j.negate,j.add=f(function(l){r(l)||(l=m(l));var O=this.high>>>16,x=this.high&65535,q=this.low>>>16,C=this.low&65535,M=l.high>>>16,D=l.high&65535,V=l.low>>>16,U=l.low&65535,Z=0,X=0,Y=0,F=0;return F+=C+U,Y+=F>>>16,F&=65535,Y+=q+V,X+=Y>>>16,Y&=65535,X+=x+D,Z+=X>>>16,X&=65535,Z+=O+M,Z&=65535,t(Y<<16|F,Z<<16|X,this.unsigned)},"add"),j.subtract=f(function(l){return r(l)||(l=m(l)),this.add(l.neg())},"subtract"),j.sub=j.subtract,j.multiply=f(function(l){if(this.isZero())return this;if(r(l)||(l=m(l)),p){var O=p.mul(this.low,this.high,l.low,l.high);return t(O,p.get_high(),this.unsigned)}if(l.isZero())return this.unsigned?L:I;if(this.eq(z))return l.isOdd()?z:I;if(l.eq(z))return this.isOdd()?z:I;if(this.isNegative())return l.isNegative()?this.neg().mul(l.neg()):this.neg().mul(l).neg();if(l.isNegative())return this.mul(l.neg()).neg();if(this.lt(P)&&l.lt(P))return i(this.toNumber()*l.toNumber(),this.unsigned);var x=this.high>>>16,q=this.high&65535,C=this.low>>>16,M=this.low&65535,D=l.high>>>16,V=l.high&65535,U=l.low>>>16,Z=l.low&65535,X=0,Y=0,F=0,oe=0;return oe+=M*Z,F+=oe>>>16,oe&=65535,F+=C*Z,Y+=F>>>16,F&=65535,F+=M*U,Y+=F>>>16,F&=65535,Y+=q*Z,X+=Y>>>16,Y&=65535,Y+=C*U,X+=Y>>>16,Y&=65535,Y+=M*V,X+=Y>>>16,Y&=65535,X+=x*Z+q*U+C*V+M*D,X&=65535,t(F<<16|oe,X<<16|Y,this.unsigned)},"multiply"),j.mul=j.multiply,j.divide=f(function(l){if(r(l)||(l=m(l)),l.isZero())throw Error("division by zero");if(p){if(!this.unsigned&&this.high===-2147483648&&l.low===-1&&l.high===-1)return this;var O=(this.unsigned?p.div_u:p.div_s)(this.low,this.high,l.low,l.high);return t(O,p.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?L:I;var x,q,C;if(this.unsigned){if(l.unsigned||(l=l.toUnsigned()),l.gt(this))return L;if(l.gt(this.shru(1)))return te;C=L}else{if(this.eq(z)){if(l.eq(W)||l.eq(J))return z;if(l.eq(z))return W;var M=this.shr(1);return x=M.div(l).shl(1),x.eq(I)?l.isNegative()?W:J:(q=this.sub(l.mul(x)),C=x.add(q.div(l)),C)}else if(l.eq(z))return this.unsigned?L:I;if(this.isNegative())return l.isNegative()?this.neg().div(l.neg()):this.neg().div(l).neg();if(l.isNegative())return this.div(l.neg()).neg();C=I}for(q=this;q.gte(l);){x=Math.max(1,Math.floor(q.toNumber()/l.toNumber()));for(var D=Math.ceil(Math.log(x)/Math.LN2),V=D<=48?1:a(2,D-48),U=i(x),Z=U.mul(l);Z.isNegative()||Z.gt(q);)x-=V,U=i(x,this.unsigned),Z=U.mul(l);U.isZero()&&(U=W),C=C.add(U),q=q.sub(Z)}return C},"divide"),j.div=j.divide,j.modulo=f(function(l){if(r(l)||(l=m(l)),p){var O=(this.unsigned?p.rem_u:p.rem_s)(this.low,this.high,l.low,l.high);return t(O,p.get_high(),this.unsigned)}return this.sub(this.div(l).mul(l))},"modulo"),j.mod=j.modulo,j.rem=j.modulo,j.not=f(function(){return t(~this.low,~this.high,this.unsigned)},"not"),j.countLeadingZeros=f(function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},"countLeadingZeros"),j.clz=j.countLeadingZeros,j.countTrailingZeros=f(function(){return this.low?u(this.low):u(this.high)+32},"countTrailingZeros"),j.ctz=j.countTrailingZeros,j.and=f(function(l){return r(l)||(l=m(l)),t(this.low&l.low,this.high&l.high,this.unsigned)},"and"),j.or=f(function(l){return r(l)||(l=m(l)),t(this.low|l.low,this.high|l.high,this.unsigned)},"or"),j.xor=f(function(l){return r(l)||(l=m(l)),t(this.low^l.low,this.high^l.high,this.unsigned)},"xor"),j.shiftLeft=f(function(l){return r(l)&&(l=l.toInt()),(l&=63)===0?this:l<32?t(this.low<<l,this.high<<l|this.low>>>32-l,this.unsigned):t(0,this.low<<l-32,this.unsigned)},"shiftLeft"),j.shl=j.shiftLeft,j.shiftRight=f(function(l){return r(l)&&(l=l.toInt()),(l&=63)===0?this:l<32?t(this.low>>>l|this.high<<32-l,this.high>>l,this.unsigned):t(this.high>>l-32,this.high>=0?0:-1,this.unsigned)},"shiftRight"),j.shr=j.shiftRight,j.shiftRightUnsigned=f(function(l){return r(l)&&(l=l.toInt()),(l&=63)===0?this:l<32?t(this.low>>>l|this.high<<32-l,this.high>>>l,this.unsigned):l===32?t(this.high,0,this.unsigned):t(this.high>>>l-32,0,this.unsigned)},"shiftRightUnsigned"),j.shru=j.shiftRightUnsigned,j.shr_u=j.shiftRightUnsigned,j.rotateLeft=f(function(l){var O;return r(l)&&(l=l.toInt()),(l&=63)===0?this:l===32?t(this.high,this.low,this.unsigned):l<32?(O=32-l,t(this.low<<l|this.high>>>O,this.high<<l|this.low>>>O,this.unsigned)):(l-=32,O=32-l,t(this.high<<l|this.low>>>O,this.low<<l|this.high>>>O,this.unsigned))},"rotateLeft"),j.rotl=j.rotateLeft,j.rotateRight=f(function(l){var O;return r(l)&&(l=l.toInt()),(l&=63)===0?this:l===32?t(this.high,this.low,this.unsigned):l<32?(O=32-l,t(this.high<<O|this.low>>>l,this.low<<O|this.high>>>l,this.unsigned)):(l-=32,O=32-l,t(this.low<<O|this.high>>>l,this.high<<O|this.low>>>l,this.unsigned))},"rotateRight"),j.rotr=j.rotateRight,j.toSigned=f(function(){return this.unsigned?t(this.low,this.high,!1):this},"toSigned"),j.toUnsigned=f(function(){return this.unsigned?this:t(this.low,this.high,!0)},"toUnsigned"),j.toBytes=f(function(l){return l?this.toBytesLE():this.toBytesBE()},"toBytes"),j.toBytesLE=f(function(){var l=this.high,O=this.low;return[O&255,O>>>8&255,O>>>16&255,O>>>24,l&255,l>>>8&255,l>>>16&255,l>>>24]},"toBytesLE"),j.toBytesBE=f(function(){var l=this.high,O=this.low;return[l>>>24,l>>>16&255,l>>>8&255,l&255,O>>>24,O>>>16&255,O>>>8&255,O&255]},"toBytesBE"),n.fromBytes=f(function(l,O,x){return x?n.fromBytesLE(l,O):n.fromBytesBE(l,O)},"fromBytes"),n.fromBytesLE=f(function(l,O){return new n(l[0]|l[1]<<8|l[2]<<16|l[3]<<24,l[4]|l[5]<<8|l[6]<<16|l[7]<<24,O)},"fromBytesLE"),n.fromBytesBE=f(function(l,O){return new n(l[4]<<24|l[5]<<16|l[6]<<8|l[7],l[0]<<24|l[1]<<16|l[2]<<8|l[3],O)},"fromBytesBE"),typeof BigInt=="function"&&(n.fromBigInt=f(function(l,O){var x=Number(BigInt.asIntN(32,l)),q=Number(BigInt.asIntN(32,l>>BigInt(32)));return t(x,q,O)},"fromBigInt"),n.fromValue=f(function(l,O){return typeof l=="bigint"?n.fromBigInt(l,O):m(l,O)},"fromValueWithBigInt"),j.toBigInt=f(function(){var l=BigInt(this.low>>>0),O=BigInt(this.unsigned?this.high>>>0:this.high);return O<<BigInt(32)|l},"toBigInt")),v.default=n})})(we,we.exports)),we.exports}g(ui,"requireUmd");var Xt;function fe(){return Xt||(Xt=1,(function(w){var s=Object.defineProperty,y=g((n,r)=>s(n,"name",{value:r,configurable:!0}),"o"),f=w;f.asPromise=Ir(),f.base64=ei(),f.EventEmitter=ti(),f.float=ri(),f.inquire=ii(),f.utf8=ni(),f.pool=oi(),f.LongBits=si(),f.isNode=!!(typeof de<"u"&&de&&de.process&&de.process.versions&&de.process.versions.node),f.global=f.isNode&&de||typeof window<"u"&&window||typeof self<"u"&&self||Re,f.emptyArray=Object.freeze?Object.freeze([]):[],f.emptyObject=Object.freeze?Object.freeze({}):{},f.isInteger=Number.isInteger||y(function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n},"isInteger"),f.isString=y(function(n){return typeof n=="string"||n instanceof String},"isString"),f.isObject=y(function(n){return n&&typeof n=="object"},"isObject"),f.isset=f.isSet=y(function(n,r){var u=n[r];return u!=null&&n.hasOwnProperty(r)?typeof u!="object"||(Array.isArray(u)?u.length:Object.keys(u).length)>0:!1},"isSet"),f.Buffer=(function(){try{var n=f.global.Buffer;return n.prototype.utf8Write?n:null}catch{return null}})(),f._Buffer_from=null,f._Buffer_allocUnsafe=null,f.newBuffer=y(function(n){return typeof n=="number"?f.Buffer?f._Buffer_allocUnsafe(n):new f.Array(n):f.Buffer?f._Buffer_from(n):typeof Uint8Array>"u"?n:new Uint8Array(n)},"newBuffer"),f.Array=typeof Uint8Array<"u"?Uint8Array:Array,f.Long=f.global.dcodeIO&&f.global.dcodeIO.Long||f.global.Long||(function(){try{var n=ui();return n&&n.isLong?n:null}catch{return null}})(),f.key2Re=/^(?:true|false|0|1)$/,f.key32Re=/^-?(?:0|[1-9][0-9]*)$/,f.key64Re=/^(?:[\x00-\xff]{8}|-?(?:0|[1-9][0-9]*))$/,f.longToHash=y(function(n){return n?f.LongBits.from(n).toHash():f.LongBits.zeroHash},"longToHash"),f.longFromHash=y(function(n,r){var u=f.LongBits.fromHash(n);return f.Long?f.Long.fromBits(u.lo,u.hi,r):u.toNumber(!!r)},"longFromHash"),f.longFromKey=y(function(n,r){return f.key64Re.test(n)&&!f.key32Re.test(n)?f.longFromHash(n,r):n},"longFromKey"),f.boolFromKey=y(function(n){return n==="true"||n==="1"},"boolFromKey");function v(n,r,u){for(var o=Object.keys(r),e=0;e<o.length;++e)(n[o[e]]===void 0||!u)&&o[e]!=="__proto__"&&(n[o[e]]=r[o[e]]);return n}g(v,"merge"),y(v,"merge"),f.merge=v,f.nestingLimit=32,f.recursionLimit=100,f.makeProp=y(function(n,r,u){Object.prototype.hasOwnProperty.call(n,r)||Object.defineProperty(n,r,{enumerable:u===void 0?!0:u,configurable:!0,writable:!0})},"makeProp"),f.lcFirst=y(function(n){return n.charAt(0).toLowerCase()+n.substring(1)},"lcFirst");function p(n){function r(u,o){if(!(this instanceof r))return new r(u,o);Object.defineProperty(this,"message",{get:y(function(){return u},"get")}),Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:new Error().stack||""}),o&&v(this,o)}return g(r,"e"),y(r,"CustomError"),r.prototype=Object.create(Error.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0},name:{get:y(function(){return n},"get"),set:void 0,enumerable:!1,configurable:!0},toString:{value:y(function(){return this.name+": "+this.message},"value"),writable:!0,enumerable:!1,configurable:!0}}),r}g(p,"newError"),y(p,"newError"),f.newError=p,f.ProtocolError=p("ProtocolError"),f.oneOfGetter=y(function(n){for(var r={},u=0;u<n.length;++u)r[n[u]]=1;return function(){for(var o=Object.keys(this),e=o.length-1;e>-1;--e)if(r[o[e]]===1&&this[o[e]]!==void 0&&this[o[e]]!==null)return o[e]}},"getOneOf"),f.oneOfSetter=y(function(n){return function(r){for(var u=0;u<n.length;++u)n[u]!==r&&delete this[n[u]]}},"setOneOf"),f.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},f._configure=function(){var n=f.Buffer;if(!n){f._Buffer_from=f._Buffer_allocUnsafe=null;return}f._Buffer_from=n.from!==Uint8Array.from&&n.from||y(function(r,u){return new n(r,u)},"Buffer_from"),f._Buffer_allocUnsafe=n.allocUnsafe||y(function(r){return new n(r)},"Buffer_allocUnsafe")}})(Re)),Re}g(fe,"requireMinimal");var Me,Yt;function _t(){if(Yt)return Me;Yt=1;var w=Object.defineProperty,s=g((d,_)=>w(d,"name",{value:_,configurable:!0}),"n");Me=e;var y=fe(),f,v=y.LongBits,p=y.base64,n=y.utf8;function r(d,_,R){this.fn=d,this.len=_,this.next=void 0,this.val=R}g(r,"Op"),s(r,"Op");function u(){}g(u,"noop"),s(u,"noop");function o(d){this.head=d.head,this.tail=d.tail,this.len=d.len,this.next=d.states}g(o,"State"),s(o,"State");function e(){this.len=0,this.head=new r(u,0,0),this.tail=this.head,this.states=null}g(e,"Writer"),s(e,"Writer");var c=s(function(){return y.Buffer?s(function(){return(e.create=s(function(){return new f},"create_buffer"))()},"create_buffer_setup"):s(function(){return new e},"create_array")},"create");e.create=c(),e.alloc=s(function(d){return new y.Array(d)},"alloc"),y.Array!==Array&&(e.alloc=y.pool(e.alloc,y.Array.prototype.subarray)),e.prototype._push=s(function(d,_,R){return this.tail=this.tail.next=new r(d,_,R),this.len+=_,this},"push");function i(d,_,R){_[R]=d&255}g(i,"writeByte"),s(i,"writeByte");function t(d,_,R){for(var P=0;P<d.length;)_[R++]=d.charCodeAt(P++)}g(t,"writeStringAscii"),s(t,"writeStringAscii");function a(d,_,R){for(;d>127;)_[R++]=d&127|128,d>>>=7;_[R]=d}g(a,"writeVarint32"),s(a,"writeVarint32");function h(d,_){this.len=d,this.next=void 0,this.val=_}g(h,"VarintOp"),s(h,"VarintOp"),h.prototype=Object.create(r.prototype),h.prototype.fn=a,e.prototype.uint32=s(function(d){return this.len+=(this.tail=this.tail.next=new h((d=d>>>0)<128?1:d<16384?2:d<2097152?3:d<268435456?4:5,d)).len,this},"write_uint32"),e.prototype.int32=s(function(d){return d<0?this._push(m,10,v.fromNumber(d)):this.uint32(d)},"write_int32"),e.prototype.sint32=s(function(d){return this.uint32((d<<1^d>>31)>>>0)},"write_sint32");function m(d,_,R){for(;d.hi;)_[R++]=d.lo&127|128,d.lo=(d.lo>>>7|d.hi<<25)>>>0,d.hi>>>=7;for(;d.lo>127;)_[R++]=d.lo&127|128,d.lo=d.lo>>>7;_[R++]=d.lo}g(m,"writeVarint64"),s(m,"writeVarint64"),e.prototype.uint64=s(function(d){var _=v.from(d);return this._push(m,_.length(),_)},"write_uint64"),e.prototype.int64=e.prototype.uint64,e.prototype.sint64=s(function(d){var _=v.from(d).zzEncode();return this._push(m,_.length(),_)},"write_sint64"),e.prototype.bool=s(function(d){return this._push(i,1,d?1:0)},"write_bool");function b(d,_,R){_[R]=d&255,_[R+1]=d>>>8&255,_[R+2]=d>>>16&255,_[R+3]=d>>>24}g(b,"writeFixed32"),s(b,"writeFixed32"),e.prototype.fixed32=s(function(d){return this._push(b,4,d>>>0)},"write_fixed32"),e.prototype.sfixed32=e.prototype.fixed32,e.prototype.fixed64=s(function(d){var _=v.from(d);return this._push(b,4,_.lo)._push(b,4,_.hi)},"write_fixed64"),e.prototype.sfixed64=e.prototype.fixed64,e.prototype.float=s(function(d){return this._push(y.float.writeFloatLE,4,d)},"write_float"),e.prototype.double=s(function(d){return this._push(y.float.writeDoubleLE,8,d)},"write_double");var S=y.Array.prototype.set?s(function(d,_,R){_.set(d,R)},"writeBytes_set"):s(function(d,_,R){for(var P=0;P<d.length;++P)_[R+P]=d[P]},"writeBytes_for");return e.prototype.bytes=s(function(d){var _=d.length>>>0;if(!_)return this._push(i,1,0);if(y.isString(d)){var R=e.alloc(_=p.length(d));p.decode(d,R,0),d=R}return this.uint32(_)._push(S,_,d)},"write_bytes"),e.prototype.raw=s(function(d){var _=d.length>>>0;return _?this._push(S,_,d):this},"write_raw"),e.prototype.string=s(function(d){var _=n.length(d);return _?this.uint32(_)._push(_===d.length?t:n.write,_,d):this._push(i,1,0)},"write_string"),e.prototype.fork=s(function(){return this.states=new o(this),this.head=this.tail=new r(u,0,0),this.len=0,this},"fork"),e.prototype.reset=s(function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new r(u,0,0),this.len=0),this},"reset"),e.prototype.ldelim=s(function(){var d=this.head,_=this.tail,R=this.len;return this.reset().uint32(R),R&&(this.tail.next=d.next,this.tail=_,this.len+=R),this},"ldelim"),e.prototype.finish=s(function(){return this.finishInto(this.constructor.alloc(this.len),0)},"finish"),e.prototype.finishInto=s(function(d,_){_===void 0&&(_=0);for(var R=this.head.next,P=_;R;)R.fn(R.val,d,P),P+=R.len,R=R.next;return d},"finishInto"),e._configure=function(d){f=d,e.create=c(),f._configure()},Me}g(_t,"requireWriter");var Je,Qt;function fi(){if(Qt)return Je;Qt=1;var w=Object.defineProperty,s=g((r,u)=>w(r,"name",{value:u,configurable:!0}),"i");Je=v;var y=_t();(v.prototype=Object.create(y.prototype)).constructor=v;var f=fe();function v(){y.call(this)}g(v,"BufferWriter"),s(v,"BufferWriter"),v._configure=function(){v.alloc=f._Buffer_allocUnsafe,v.writeBytesBuffer=f.Buffer&&f.Buffer.prototype instanceof Uint8Array&&f.Buffer.prototype.set.name==="set"?s(function(r,u,o){u.set(r,o)},"writeBytesBuffer_set"):s(function(r,u,o){if(r.copy)r.copy(u,o,0,r.length);else for(var e=0;e<r.length;)u[o++]=r[e++]},"writeBytesBuffer_copy")},v.prototype.bytes=s(function(r){f.isString(r)&&(r=f._Buffer_from(r,"base64"));var u=r.length>>>0;return this.uint32(u),u&&this._push(v.writeBytesBuffer,u,r),this},"write_bytes_buffer"),v.prototype.raw=s(function(r){var u=r.length>>>0;return u?this._push(v.writeBytesBuffer,u,r):this},"write_raw_buffer");function p(r,u,o){for(var e=0;e<r.length;)u[o++]=r.charCodeAt(e++)}g(p,"writeStringBufferAscii"),s(p,"writeStringBufferAscii");function n(r,u,o){r.length<40?f.utf8.write(r,u,o):u.utf8Write?u.utf8Write(r,o):u.write(r,o)}return g(n,"writeStringBuffer"),s(n,"writeStringBuffer"),v.prototype.string=s(function(r){var u=f.Buffer.byteLength(r);return this.uint32(u),u&&this._push(u===r.length&&u<40?p:n,u,r),this},"write_string_buffer"),v._configure(),Je}g(fi,"requireWriter_buffer");var Ve,er;function wt(){if(er)return Ve;er=1;var w=Object.defineProperty,s=g((t,a)=>w(t,"name",{value:a,configurable:!0}),"o");Ve=r;var y=fe(),f,v=y.LongBits,p=y.utf8;function n(t,a){return RangeError("index out of range: "+t.pos+" + "+(a||1)+" > "+t.len)}g(n,"indexOutOfRange"),s(n,"indexOutOfRange");function r(t){this.buf=t,this.pos=0,this.len=t.length}g(r,"Reader"),s(r,"Reader");var u=typeof Uint8Array<"u"?s(function(t){if(t instanceof Uint8Array||Array.isArray(t))return new r(t);throw Error("illegal buffer")},"create_typed_array"):s(function(t){if(Array.isArray(t))return new r(t);throw Error("illegal buffer")},"create_array"),o=s(function(){return y.Buffer?s(function(t){return(r.create=s(function(a){return y.Buffer.isBuffer(a)?new f(a):u(a)},"create_buffer"))(t)},"create_buffer_setup"):u},"create");r.create=o(),r.prototype._slice=y.Array.prototype.subarray||y.Array.prototype.slice,r.prototype.raw=s(function(t,a){return Array.isArray(this.buf)?this.buf.slice(t,a):t===a?new this.buf.constructor(0):this._slice.call(this.buf,t,a)},"read_raw"),r.prototype.uint32=s(function(){var t=this.buf,a=this.pos,h=(t[a]&127)>>>0;if(t[a++]<128)return this.pos=a,h;if(h=(h|(t[a]&127)<<7)>>>0,t[a++]<128)return this.pos=a,h;if(h=(h|(t[a]&127)<<14)>>>0,t[a++]<128)return this.pos=a,h;if(h=(h|(t[a]&127)<<21)>>>0,t[a++]<128)return this.pos=a,h;if(h=(h|(t[a]&15)<<28)>>>0,t[a++]<128)return this.pos=a,h;for(var m=0;m<5;++m){if(a>=this.len)throw this.pos=a,n(this);if(t[a++]<128)return this.pos=a,h}throw this.pos=a,Error("invalid varint encoding")},"read_uint32"),r.prototype.tag=s(function(){var t=this.buf,a=this.pos,h=(t[a]&127)>>>0;if(t[a++]<128)return this.pos=a,h;if(h=(h|(t[a]&127)<<7)>>>0,t[a++]<128)return this.pos=a,h;if(h=(h|(t[a]&127)<<14)>>>0,t[a++]<128)return this.pos=a,h;if(h=(h|(t[a]&127)<<21)>>>0,t[a++]<128)return this.pos=a,h;if(h=(h|(t[a]&15)<<28)>>>0,t[a]<128&&(t[a]&112)===0)return this.pos=a+1,h;throw this.pos=a+1,Error("invalid tag encoding")},"read_tag"),r.prototype.int32=s(function(){return this.uint32()|0},"read_int32"),r.prototype.sint32=s(function(){var t=this.uint32();return t>>>1^-(t&1)|0},"read_sint32");function e(){var t=new v(0,0),a=0;if(this.len-this.pos>4){for(;a<4;++a)if(t.lo=(t.lo|(this.buf[this.pos]&127)<<a*7)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(this.buf[this.pos]&127)<<28)>>>0,t.hi=(t.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return t;a=0}else{for(;a<3;++a){if(this.pos>=this.len)throw n(this);if(t.lo=(t.lo|(this.buf[this.pos]&127)<<a*7)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(this.buf[this.pos++]&127)<<a*7)>>>0,t}if(this.len-this.pos>4){for(;a<5;++a)if(t.hi=(t.hi|(this.buf[this.pos]&127)<<a*7+3)>>>0,this.buf[this.pos++]<128)return t}else for(;a<5;++a){if(this.pos>=this.len)throw n(this);if(t.hi=(t.hi|(this.buf[this.pos]&127)<<a*7+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}g(e,"readLongVarint"),s(e,"readLongVarint"),r.prototype.bool=s(function(){for(var t=!1,a,h=0;h<10;++h){if(this.pos>=this.len)throw n(this);if(a=this.buf[this.pos++],a&127&&(t=!0),a<128)return t}throw Error("invalid varint encoding")},"read_bool");function c(t,a){return(t[a-4]|t[a-3]<<8|t[a-2]<<16|t[a-1]<<24)>>>0}g(c,"readFixed32_end"),s(c,"readFixed32_end"),r.prototype.fixed32=s(function(){if(this.pos+4>this.len)throw n(this,4);return c(this.buf,this.pos+=4)},"read_fixed32"),r.prototype.sfixed32=s(function(){if(this.pos+4>this.len)throw n(this,4);return c(this.buf,this.pos+=4)|0},"read_sfixed32");function i(){if(this.pos+8>this.len)throw n(this,8);return new v(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}return g(i,"readFixed64"),s(i,"readFixed64"),r.prototype.float=s(function(){if(this.pos+4>this.len)throw n(this,4);var t=y.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},"read_float"),r.prototype.double=s(function(){if(this.pos+8>this.len)throw n(this,4);var t=y.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},"read_double"),r.prototype.bytes=s(function(){var t=this.uint32(),a=this.pos,h=this.pos+t;if(h>this.len)throw n(this,t);return this.pos=h,this.raw(a,h)},"read_bytes"),r.prototype.string=s(function(){var t=this.uint32(),a=this.pos,h=this.pos+t;if(h>this.len)throw n(this,t);return this.pos=h,p.read(this.buf,a,h)},"read_string"),r.prototype.skip=s(function(t){if(typeof t=="number"){if(this.pos+t>this.len)throw n(this,t);this.pos+=t}else do if(this.pos>=this.len)throw n(this);while(this.buf[this.pos++]&128);return this},"skip"),r.recursionLimit=y.recursionLimit,r.prototype.skipType=function(t,a,h){if(a===void 0&&(a=0),a>r.recursionLimit)throw Error("max depth exceeded");if(h===0)throw Error("illegal tag: field number 0");switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){var m=this.tag(),b=m>>>3;if(t=m&7,!b)throw Error("illegal tag: field number 0");if(t===4){if(h!==void 0&&b!==h)throw Error("invalid end group tag");break}this.skipType(t,a+1,b)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},r._configure=function(t){f=t,r.create=o(),f._configure();var a=y.Long?"toLong":"toNumber";y.merge(r.prototype,{int64:s(function(){return e.call(this)[a](!1)},"read_int64"),uint64:s(function(){return e.call(this)[a](!0)},"read_uint64"),sint64:s(function(){return e.call(this).zzDecode()[a](!1)},"read_sint64"),fixed64:s(function(){return i.call(this)[a](!0)},"read_fixed64"),sfixed64:s(function(){return i.call(this)[a](!1)},"read_sfixed64")})},Ve}g(wt,"requireReader");var Ue,tr;function li(){if(tr)return Ue;tr=1;var w=Object.defineProperty,s=g((p,n)=>w(p,"name",{value:n,configurable:!0}),"o");Ue=v;var y=wt();(v.prototype=Object.create(y.prototype)).constructor=v;var f=fe();function v(p){y.call(this,p)}return g(v,"BufferReader"),s(v,"BufferReader"),v._configure=function(){f.Buffer&&(v.prototype._slice=f.Buffer.prototype.slice)},v.prototype.raw=s(function(p,n){return p===n?f.Buffer.alloc(0):this._slice.call(this.buf,p,n)},"read_raw_buffer"),v.prototype.string=s(function(){var p=this.uint32(),n=this.pos,r=this.pos+p;if(r>this.len)throw RangeError("index out of range: "+this.pos+" + "+p+" > "+this.len);return this.pos=r,this.buf.utf8Slice?this.buf.utf8Slice(n,r):this.buf.toString("utf-8",n,r)},"read_string_buffer"),v._configure(),Ue}g(li,"requireReader_buffer");var $e={},ze,rr;function hi(){if(rr)return ze;rr=1;var w=Object.defineProperty,s=g((v,p)=>w(v,"name",{value:p,configurable:!0}),"u");ze=f;var y=fe();(f.prototype=Object.create(y.EventEmitter.prototype)).constructor=f;function f(v,p,n){if(typeof v!="function")throw TypeError("rpcImpl must be a function");y.EventEmitter.call(this),this.rpcImpl=v,this.requestDelimited=!!p,this.responseDelimited=!!n}return g(f,"Service"),s(f,"Service"),f.prototype.rpcCall=s(g(function v(p,n,r,u,o){if(!u)throw TypeError("request must be specified");var e=this;if(!o)return y.asPromise(v,e,p,n,r,u);if(!e.rpcImpl){setTimeout(function(){o(Error("already ended"))},0);return}try{return e.rpcImpl(p,n[e.requestDelimited?"encodeDelimited":"encode"](u).finish(),s(function(c,i){if(c)return e.emit("error",c,p),o(c);if(i===null){e.end(!0);return}if(!(i instanceof r))try{i=r[e.responseDelimited?"decodeDelimited":"decode"](i)}catch(t){return e.emit("error",t,p),o(t)}return e.emit("data",i,p),o(null,i)},"rpcCallback"))}catch(c){e.emit("error",c,p),setTimeout(function(){o(c)},0);return}},"i"),"rpcCall"),f.prototype.end=s(function(v){return this.rpcImpl&&(v||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},"end"),ze}g(hi,"requireService$1");var ir;function Lr(){return ir||(ir=1,(function(w){var s=w;s.Service=hi()})($e)),$e}g(Lr,"requireRpc");var Ze,nr;function Dr(){return nr||(nr=1,Ze={}),Ze}g(Dr,"requireRoots");var or;function ci(){return or||(or=1,(function(w){var s=Object.defineProperty,y=g((p,n)=>s(p,"name",{value:n,configurable:!0}),"r"),f=w;f.build="minimal",f.Writer=_t(),f.BufferWriter=fi(),f.Reader=wt(),f.BufferReader=li(),f.util=fe(),f.rpc=Lr(),f.roots=Dr(),f.configure=v;function v(){f.util._configure(),f.Writer._configure(f.BufferWriter),f.Reader._configure(f.BufferReader)}g(v,"configure"),y(v,"configure"),v()})(Pe)),Pe}g(ci,"requireIndexMinimal");var We={},He={exports:{}},Ke={},sr;function Cr(){return sr||(sr=1,(function(w){var s=w;s.numberRe=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,s.typeRefRe=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,s.reservedRe=/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/,s.unsafePropertyRe=/^(?:__proto__|prototype|constructor)$/})(Ke)),Ke}g(Cr,"requirePatterns");var Ge,ar;function pi(){if(ar)return Ge;ar=1;var w=Object.defineProperty,s=g((n,r)=>w(n,"name",{value:r,configurable:!0}),"i");Ge=v;var y=Cr(),f=y.reservedRe;function v(n,r){typeof n=="string"&&(r=n,n=void 0);var u=[];function o(c){if(typeof c!="string"){var i=e();if(v.verbose&&console.log("codegen: "+i),i="return "+i,c){for(var t=Object.keys(c),a=new Array(t.length+1),h=new Array(t.length),m=0;m<t.length;)a[m]=t[m],h[m]=c[t[m++]];return a[m]=i,Function.apply(null,a).apply(null,h)}return Function(i)()}for(var b=new Array(arguments.length-1),S=0;S<b.length;)b[S]=arguments[++S];if(S=0,c=c.replace(/%([%dfijs])/g,s(function(d,_){var R=b[S++];switch(_){case"d":case"f":return String(Number(R));case"i":return String(Math.floor(R));case"j":return JSON.stringify(R);case"s":return String(R)}return"%"},"replace")),S!==b.length)throw Error("parameter count mismatch");return u.push(c),o}g(o,"v"),s(o,"Codegen");function e(c){return"function "+p(c||r)+"("+(n&&n.join(",")||"")+`){
|
|
22
|
+
`+u.join(`
|
|
23
|
+
`)+`
|
|
24
|
+
}`}return g(e,"f"),s(e,"toString"),o.toString=e,o}g(v,"codegen"),s(v,"codegen"),v.verbose=!1;function p(n){return!n||(n=String(n).replace(/[^\w$]/g,""),!n)?"":(/^\d/.test(n)&&(n="_"+n),f.test(n)?n+"_":n)}return g(p,"safeFunctionName"),s(p,"safeFunctionName"),Ge}g(pi,"requireCodegen");var Xe,ur;function Mr(){if(ur)return Xe;ur=1;var w=null;try{w=require("fs"),(!w||!w.readFile||!w.readFileSync)&&(w=null)}catch{}return Xe=w,Xe}g(Mr,"requireFs");var Ye,fr;function di(){if(fr)return Ye;fr=1;var w=Object.defineProperty,s=g((p,n)=>w(p,"name",{value:n,configurable:!0}),"i");Ye=v;var y=Ir(),f=Mr();function v(p,n,r){return typeof n=="function"?(r=n,n={}):n||(n={}),r?!n.xhr&&f&&f.readFile?f.readFile(p,s(function(u,o){return u&&typeof XMLHttpRequest<"u"?v.xhr(p,n,r):u?r(u):r(null,n.binary?o:o.toString("utf8"))},"fetchReadFileCallback")):v.xhr(p,n,r):y(v,this,p,n)}return g(v,"fetch"),s(v,"fetch"),v.xhr=s(function(p,n,r){var u=new XMLHttpRequest;u.onreadystatechange=s(function(){if(u.readyState===4){if(u.status!==0&&u.status!==200)return r(Error("status "+u.status));if(n.binary){var o=u.response;if(!o){o=[];for(var e=0;e<u.responseText.length;++e)o.push(u.responseText.charCodeAt(e)&255)}return r(null,typeof Uint8Array<"u"?new Uint8Array(o):o)}return r(null,u.responseText)}},"fetchOnReadyStateChange"),n.binary&&("overrideMimeType"in u&&u.overrideMimeType("text/plain; charset=x-user-defined"),u.responseType="arraybuffer"),u.open("GET",p),u.send()},"fetch_xhr"),Ye}g(di,"requireFetch");var Qe={},lr;function vi(){return lr||(lr=1,(function(w){var s=Object.defineProperty,y=g((n,r)=>s(n,"name",{value:r,configurable:!0}),"t"),f=w,v=f.isAbsolute=y(function(n){return/^(?:\/|\w+:|\\\\\w+)/.test(n)},"isAbsolute"),p=f.normalize=y(function(n){var r=n.substring(0,2),u="";r==="\\\\"&&(u=r,n=n.substring(2)),n=n.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var o=n.split("/"),e=v(n),c="";e&&(c=o.shift()+"/");for(var i=0;i<o.length;)o[i]===".."?i>0&&o[i-1]!==".."?o.splice(--i,2):e?o.splice(i,1):++i:o[i]==="."?o.splice(i,1):++i;return u+c+o.join("/")},"normalize");f.resolve=y(function(n,r,u){return u||(r=p(r)),v(r)?r:(u||(n=p(n)),(n=n.replace(/(?:\/|^)[^/]+$/,"")).length?p(n+"/"+r):r)},"resolve")})(Qe)),Qe}g(vi,"requirePath");var et,hr;function Oe(){if(hr)return et;hr=1;var w=Object.defineProperty,s=g((i,t)=>w(i,"name",{value:t,configurable:!0}),"i");et=e;var y=pe();((e.prototype=Object.create(y.prototype)).constructor=e).className="Namespace";var f=ce(),v=ee(),p=ye(),n,r,u;e.fromJSON=s(function(i,t,a){if(a===void 0&&(a=0),a>v.recursionLimit)throw Error("max depth exceeded");return new e(i,t.options).addJSON(t.nested,a)},"fromJSON");function o(i,t){if(i&&i.length){for(var a={},h=0;h<i.length;++h)a[i[h].name]=i[h].toJSON(t);return a}}g(o,"arrayToJSON"),s(o,"arrayToJSON"),e.arrayToJSON=o,e.isReservedId=s(function(i,t){if(i){for(var a=0;a<i.length;++a)if(typeof i[a]!="string"&&i[a][0]<=t&&i[a][1]>t)return!0}return!1},"isReservedId"),e.isReservedName=s(function(i,t){if(i){for(var a=0;a<i.length;++a)if(i[a]===t)return!0}return!1},"isReservedName");function e(i,t){y.call(this,i,t),this.nested=void 0,this._nestedArray=null,this._lookupCache=Object.create(null),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0}g(e,"Namespace"),s(e,"Namespace");function c(i){i._nestedArray=null,i._lookupCache=Object.create(null);for(var t=i;t=t.parent;)t._lookupCache=Object.create(null);return i}return g(c,"clearCache"),s(c,"clearCache"),Object.defineProperty(e.prototype,"nestedArray",{get:s(function(){return this._nestedArray||(this._nestedArray=v.toArray(this.nested))},"get")}),e.prototype.toJSON=s(function(i){return v.toObject(["options",this.options,"nested",o(this.nestedArray,i)])},"toJSON"),e.prototype.addJSON=s(function(i,t){if(t===void 0&&(t=0),t>v.recursionLimit)throw Error("max depth exceeded");var a=this;if(i)for(var h=Object.keys(i),m=0,b;m<h.length;++m)b=i[h[m]],a.add((b.fields!==void 0?n.fromJSON:b.values!==void 0?u.fromJSON:b.methods!==void 0?r.fromJSON:b.id!==void 0?f.fromJSON:e.fromJSON)(h[m],b,t+1));return this},"addJSON"),e.prototype.get=s(function(i){return this.nested&&Object.prototype.hasOwnProperty.call(this.nested,i)?this.nested[i]:null},"get"),e.prototype.getEnum=s(function(i){if(this.nested&&Object.prototype.hasOwnProperty.call(this.nested,i)&&this.nested[i]instanceof u)return this.nested[i].values;throw Error("no such enum: "+i)},"getEnum"),e.prototype.add=s(function(i){if(!(i instanceof f&&i.extend!==void 0||i instanceof n||i instanceof p||i instanceof u||i instanceof r||i instanceof e))throw TypeError("object must be a valid nested object");if(i.name==="__proto__")return this;if(!this.nested)this.nested={};else{var t=this.get(i.name);if(t)if(t instanceof e&&i instanceof e&&!(t instanceof n||t instanceof r)){for(var a=t.nestedArray,h=0;h<a.length;++h)i.add(a[h]);this.remove(t),this.nested||(this.nested={}),i.setOptions(t.options,!0)}else throw Error("duplicate name '"+i.name+"' in "+this)}this.nested[i.name]=i,this instanceof n||this instanceof r||this instanceof u||this instanceof f||i._edition||(i._edition=i._defaultEdition),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0;for(var m=this;m=m.parent;)m._needsRecursiveFeatureResolution=!0,m._needsRecursiveResolve=!0;return i.onAdd(this),c(this)},"add"),e.prototype.remove=s(function(i){if(!(i instanceof y))throw TypeError("object must be a ReflectionObject");if(i.parent!==this)throw Error(i+" is not a member of "+this);return delete this.nested[i.name],Object.keys(this.nested).length||(this.nested=void 0),i.onRemove(this),c(this)},"remove"),e.prototype.define=s(function(i,t){if(v.isString(i))i=i.split(".");else if(!Array.isArray(i))throw TypeError("illegal path");if(i&&i.length&&i[0]==="")throw Error("path must be relative");if(i.length>v.recursionLimit)throw Error("max depth exceeded");for(var a=this;i.length>0;){var h=i.shift();if(a.nested&&a.nested[h]){if(a=a.nested[h],!(a instanceof e))throw Error("path conflicts with non-namespace objects")}else a.add(a=new e(h))}return t&&a.addJSON(t),a},"define"),e.prototype.resolveAll=s(function(){if(!this._needsRecursiveResolve)return this;this._needsRecursiveFeatureResolution&&this._resolveFeaturesRecursive(this._edition);var i=this.nestedArray,t=0;for(this.resolve();t<i.length;)i[t]instanceof e?i[t++].resolveAll():i[t++].resolve();return this._needsRecursiveResolve=!1,this},"resolveAll"),e.prototype._resolveFeaturesRecursive=s(function(i){return this._needsRecursiveFeatureResolution?(this._needsRecursiveFeatureResolution=!1,i=this._edition||i,y.prototype._resolveFeaturesRecursive.call(this,i),this.nestedArray.forEach(t=>{t._resolveFeaturesRecursive(i)}),this):this},"_resolveFeaturesRecursive"),e.prototype.lookup=s(function(i,t,a){if(typeof t=="boolean"?(a=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),v.isString(i)&&i.length){if(i===".")return this.root;i=i.split(".")}else if(!i.length)return this;var h=i.join(".");if(i[0]==="")return this.root.lookup(i.slice(1),t);var m=this.root._fullyQualifiedObjects&&this.root._fullyQualifiedObjects["."+h];if(m&&(!t||t.indexOf(m.constructor)>-1)||(m=this._lookupImpl(i,h),m&&(!t||t.indexOf(m.constructor)>-1)))return m;if(a)return null;for(var b=this;b.parent;){if(m=b.parent._lookupImpl(i,h),m&&(!t||t.indexOf(m.constructor)>-1))return m;b=b.parent}return null},"lookup"),e.prototype._lookupImpl=s(function(i,t){if(Object.prototype.hasOwnProperty.call(this._lookupCache,t))return this._lookupCache[t];var a=this.get(i[0]),h=null;if(a)i.length===1?h=a:a instanceof e&&(i=i.slice(1),h=a._lookupImpl(i,i.join(".")));else for(var m=0;m<this.nestedArray.length;++m)if(this._nestedArray[m]instanceof e&&(a=this._nestedArray[m]._lookupImpl(i,t))){h=a;break}return this._lookupCache[t]=h,h},"lookup"),e.prototype.lookupType=s(function(i){var t=this.lookup(i,[n]);if(!t)throw Error("no such type: "+i);return t},"lookupType"),e.prototype.lookupEnum=s(function(i){var t=this.lookup(i,[u]);if(!t)throw Error("no such Enum '"+i+"' in "+this);return t},"lookupEnum"),e.prototype.lookupTypeOrEnum=s(function(i){var t=this.lookup(i,[n,u]);if(!t)throw Error("no such Type or Enum '"+i+"' in "+this);return t},"lookupTypeOrEnum"),e.prototype.lookupService=s(function(i){var t=this.lookup(i,[r]);if(!t)throw Error("no such Service '"+i+"' in "+this);return t},"lookupService"),e._configure=function(i,t,a){n=i,r=t,u=a},et}g(Oe,"requireNamespace");var tt,cr;function Ot(){if(cr)return tt;cr=1;var w=Object.defineProperty,s=g((n,r)=>w(n,"name",{value:r,configurable:!0}),"i");tt=p;var y=ce();((p.prototype=Object.create(y.prototype)).constructor=p).className="MapField";var f=he(),v=ee();function p(n,r,u,o,e,c){if(y.call(this,n,r,o,void 0,void 0,e,c),!v.isString(u))throw TypeError("keyType must be a string");this.keyType=u,this.resolvedKeyType=null,this.map=!0}return g(p,"MapField"),s(p,"MapField"),p.fromJSON=s(function(n,r){return new p(n,r.id,r.keyType,r.type,r.options,r.comment)},"fromJSON"),p.prototype.toJSON=s(function(n){var r=n?!!n.keepComments:!1;return v.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",r?this.comment:void 0])},"toJSON"),p.prototype.resolve=s(function(){if(this.resolved)return this;if(f.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return y.prototype.resolve.call(this)},"resolve"),p.d=s(function(n,r,u){return typeof u=="function"?u=v.decorateType(u).name:u&&typeof u=="object"&&(u=v.decorateEnum(u).name),s(function(o,e){v.decorateType(o.constructor).add(new p(e,n,r,u))},"mapFieldDecorator")},"decorateMapField"),tt}g(Ot,"requireMapfield");var rt,pr;function jt(){if(pr)return rt;pr=1;var w=Object.defineProperty,s=g((p,n)=>w(p,"name",{value:n,configurable:!0}),"i");rt=v;var y=pe();((v.prototype=Object.create(y.prototype)).constructor=v).className="Method";var f=ee();function v(p,n,r,u,o,e,c,i,t){if(f.isObject(o)?(c=o,o=e=void 0):f.isObject(e)&&(c=e,e=void 0),!(n===void 0||f.isString(n)))throw TypeError("type must be a string");if(!f.isString(r))throw TypeError("requestType must be a string");if(!f.isString(u))throw TypeError("responseType must be a string");y.call(this,p,c),this.type=n||"rpc",this.requestType=r,this.requestStream=o?!0:void 0,this.responseType=u,this.responseStream=e?!0:void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=i,this.parsedOptions=t}return g(v,"Method"),s(v,"Method"),v.fromJSON=s(function(p,n){return new v(p,n.type,n.requestType,n.responseType,n.requestStream,n.responseStream,n.options,n.comment,n.parsedOptions)},"fromJSON"),v.prototype.toJSON=s(function(p){var n=p?!!p.keepComments:!1;return f.toObject(["type",this.type!=="rpc"&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",n?this.comment:void 0,"parsedOptions",this.parsedOptions])},"toJSON"),v.prototype.resolve=s(function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),y.prototype.resolve.call(this))},"resolve"),rt}g(jt,"requireMethod");var it,dr;function kt(){if(dr)return it;dr=1;var w=Object.defineProperty,s=g((o,e)=>w(o,"name",{value:e,configurable:!0}),"o");it=r;var y=Oe();((r.prototype=Object.create(y.prototype)).constructor=r).className="Service";var f=jt(),v=ee(),p=Lr(),n=v.patterns.reservedRe;function r(o,e){y.call(this,o,e),this.methods={},this._methodsArray=null}g(r,"Service"),s(r,"Service"),r.fromJSON=s(function(o,e,c){if(c===void 0&&(c=0),c>v.recursionLimit)throw Error("max depth exceeded");var i=new r(o,e.options);if(e.methods)for(var t=Object.keys(e.methods),a=0;a<t.length;++a)i.add(f.fromJSON(t[a],e.methods[t[a]]));return e.nested&&i.addJSON(e.nested,c),e.edition&&(i._edition=e.edition),i.comment=e.comment,i._defaultEdition="proto3",i},"fromJSON"),r.prototype.toJSON=s(function(o){var e=y.prototype.toJSON.call(this,o),c=o?!!o.keepComments:!1;return v.toObject(["edition",this._editionToJSON(),"options",e&&e.options||void 0,"methods",y.arrayToJSON(this.methodsArray,o)||{},"nested",e&&e.nested||void 0,"comment",c?this.comment:void 0])},"toJSON"),Object.defineProperty(r.prototype,"methodsArray",{get:s(function(){return this._methodsArray||(this._methodsArray=v.toArray(this.methods))},"get")});function u(o){return o._methodsArray=null,o}return g(u,"clearCache"),s(u,"clearCache"),r.prototype.get=s(function(o){return Object.prototype.hasOwnProperty.call(this.methods,o)?this.methods[o]:y.prototype.get.call(this,o)},"get"),r.prototype.resolveAll=s(function(){if(!this._needsRecursiveResolve)return this;y.prototype.resolve.call(this);for(var o=this.methodsArray,e=0;e<o.length;++e)o[e].resolve();return this},"resolveAll"),r.prototype._resolveFeaturesRecursive=s(function(o){return this._needsRecursiveFeatureResolution?(o=this._edition||o,y.prototype._resolveFeaturesRecursive.call(this,o),this.methodsArray.forEach(e=>{e._resolveFeaturesRecursive(o)}),this):this},"_resolveFeaturesRecursive"),r.prototype.add=s(function(o){if(this.get(o.name))throw Error("duplicate name '"+o.name+"' in "+this);return o instanceof f?o.name==="__proto__"?this:(this.methods[o.name]=o,o.parent=this,u(this)):y.prototype.add.call(this,o)},"add"),r.prototype.remove=s(function(o){if(o instanceof f){if(this.methods[o.name]!==o)throw Error(o+" is not a member of "+this);return delete this.methods[o.name],o.parent=null,u(this)}return y.prototype.remove.call(this,o)},"remove"),r.prototype.create=s(function(o,e,c){for(var i=new p.Service(o,e,c),t=0,a;t<this.methodsArray.length;++t){var h=v.lcFirst((a=this._methodsArray[t]).resolve().name).replace(/[^$\w_]/g,"");i[h]=v.codegen(["r","c"],n.test(h)?h+"_":h)("return this.rpcCall(m,q,s,r,c)")({m:a,q:a.resolvedRequestType.ctor,s:a.resolvedResponseType.ctor})}return i},"create"),it}g(kt,"requireService");var nt,vr;function Et(){if(vr)return nt;vr=1;var w=Object.defineProperty,s=g((v,p)=>w(v,"name",{value:p,configurable:!0}),"i");nt=f;var y=fe();function f(v){if(v)for(var p=Object.keys(v),n=0;n<p.length;++n)v[p[n]]!=null&&p[n]!=="__proto__"&&(this[p[n]]=v[p[n]])}return g(f,"Message"),s(f,"Message"),f.create=s(function(v){return this.$type.create(v)},"create"),f.encode=s(function(v,p){return this.$type.encode(v,p)},"encode"),f.encodeDelimited=s(function(v,p){return this.$type.encodeDelimited(v,p)},"encodeDelimited"),f.decode=s(function(v){return this.$type.decode(v)},"decode"),f.decodeDelimited=s(function(v){return this.$type.decodeDelimited(v)},"decodeDelimited"),f.verify=s(function(v){return this.$type.verify(v)},"verify"),f.fromObject=s(function(v){return this.$type.fromObject(v)},"fromObject"),f.toObject=s(function(v,p){return this.$type.toObject(v,p)},"toObject"),f.prototype.toJSON=s(function(){return this.$type.toObject(this,y.toJSONOptions)},"toJSON"),nt}g(Et,"requireMessage");var ot,yr;function Jr(){if(yr)return ot;yr=1;var w=Object.defineProperty,s=g((r,u)=>w(r,"name",{value:u,configurable:!0}),"t");ot=n;var y=ue(),f=he(),v=ee();function p(r){return"missing required '"+r.name+"'"}g(p,"missing"),s(p,"missing");function n(r){for(var u=!1,o=!1,e=0;e<r.fieldsArray.length;++e){var c=r._fieldsArray[e];c.map&&(u=!0),!c.repeated&&!c.map&&!c.hasPresence&&(o=!0)}var i=v.codegen(["r","l","z","q","g"],r.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("if(q===undefined)q=0")("if(q>Reader.recursionLimit)")('throw Error("max depth exceeded")')("var c=l===undefined?r.len:r.pos+l,m=g||new C"+(u?",k,v":o?",v":""))("while(r.pos<c){")("var s=r.pos")("var t=r.tag()")("if(t===z){")("z=undefined")("break")("}");for(r.fieldsArray.length&&i("var u=t&7")("switch(t>>>=3){"),e=0;e<r.fieldsArray.length;++e){var t=r._fieldsArray[e].resolve(),a=t.resolvedType instanceof y?"int32":t.type,h="m"+v.safeProp(t.name);if(t.map){i("case %i:{",t.id)("if(u!==2)")("break")("if(%s===util.emptyObject)",h)("%s={}",h)("var c2=r.uint32()+r.pos"),f.defaults[t.keyType]!==void 0?i("k=%j",f.defaults[t.keyType]):i("k=null"),f.defaults[a]!==void 0?i("v=%j",f.defaults[a]):i("v=null"),i("while(r.pos<c2){")("var t2=r.tag()")("u=t2&7")("switch(t2>>>=3){")("case 1:")("if(u!==%i)",f.mapKey[t.keyType])("break")("k=r.%s()",t.keyType)("continue")("case 2:")("if(u!==%i)",f.basic[a]===void 0?2:f.basic[a])("break"),f.basic[a]===void 0?i("v=types[%i].decode(r,r.uint32(),undefined,q+1)",e):i("v=r.%s()",a),i("continue")("}")("r.skipType(u,q,t2)")("}");var m=f.basic[a]===void 0?"v||new types["+e+"].ctor":"v";f.long[t.keyType]!==void 0?i('%s[typeof k==="object"?util.longToHash(k):k]=%s',h,m):(t.keyType==="string"&&i('if(k==="__proto__")')("util.makeProp(%s,k)",h),i("%s[k]=%s",h,m))}else t.repeated?(i("case %i:",t.id)("{"),f.packed[a]!==void 0&&i("if(u===2){")("if(!(%s&&%s.length))",h,h)("%s=[]",h)("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",h,a)("continue")("}"),i("if(u!==%i)",f.basic[a]===void 0?t.delimited?3:2:f.basic[a])("break")("if(!(%s&&%s.length))",h,h)("%s=[]",h),f.basic[a]===void 0?t.delimited?i("%s.push(types[%i].decode(r,undefined,%i,q+1))",h,e,t.id*8+4):i("%s.push(types[%i].decode(r,r.uint32(),undefined,q+1))",h,e):i("%s.push(r.%s())",h,a)):f.basic[a]===void 0?(i("case %i:{",t.id)("if(u!==%i)",t.delimited?3:2)("break"),t.delimited?i("%s=types[%i].decode(r,undefined,%i,q+1,%s)",h,e,t.id*8+4,h):i("%s=types[%i].decode(r,r.uint32(),undefined,q+1,%s)",h,e,h)):t.hasPresence?i("case %i:{",t.id)("if(u!==%i)",f.basic[a])("break")("%s=r.%s()",h,a):(i("case %i:{",t.id)("if(u!==%i)",f.basic[a])("break"),t.resolvedType instanceof y&&t.typeDefault!==0?i("if((v=r.%s())!==%j)",a,t.typeDefault):a==="string"||a==="bytes"?i("if((v=r.%s()).length)",a):f.long[a]!==void 0?i('if(typeof(v=r.%s())==="object"?v.low||v.high:v!==0)',a):i(a==="double"||a==="float"?"if((v=r.%s())!==0)":"if(v=r.%s())",a),i("%s=v",h)("else")("delete %s",h));t.partOf&&i("m%s=%j",v.safeProp(t.partOf.name),t.name),i("continue")("}")}for(e&&i("}"),i("r.skipType(%s,q,t)",e?"u":"t&7")('util.makeProp(m,"$unknowns",false);')("(m.$unknowns||(m.$unknowns=[])).push(r.raw(s,r.pos))")("}")("if(z!==undefined)")('throw Error("missing end group")'),e=0;e<r._fieldsArray.length;++e){var b=r._fieldsArray[e];b.required&&i("if(!m.hasOwnProperty(%j))",b.name)("throw util.ProtocolError(%j,{instance:m})",p(b))}return i("return m")}return g(n,"decoder"),s(n,"decoder"),ot}g(Jr,"requireDecoder");var st,mr;function Vr(){if(mr)return st;mr=1;var w=Object.defineProperty,s=g((u,o)=>w(u,"name",{value:o,configurable:!0}),"u");st=r;var y=ue(),f=ee();function v(u,o){return u.name+": "+o+(u.repeated&&o!=="array"?"[]":u.map&&o!=="object"?"{k:"+u.keyType+"}":"")+" expected"}g(v,"invalid"),s(v,"invalid");function p(u,o,e,c){if(o.resolvedType)if(o.resolvedType instanceof y){u("switch(%s){",c)("default:")("return%j",v(o,"enum value"));for(var i=Object.keys(o.resolvedType.values),t=0;t<i.length;++t)u("case %i:",o.resolvedType.values[i[t]]);u("break")("}")}else u("{")("var e=types[%i].verify(%s,q+1);",e,c)("if(e)")("return%j+e",o.name+".")("}");else switch(o.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":u("if(!util.isInteger(%s))",c)("return%j",v(o,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":u("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",c,c,c,c)("return%j",v(o,"integer|Long"));break;case"float":case"double":u('if(typeof %s!=="number")',c)("return%j",v(o,"number"));break;case"bool":u('if(typeof %s!=="boolean")',c)("return%j",v(o,"boolean"));break;case"string":u("if(!util.isString(%s))",c)("return%j",v(o,"string"));break;case"bytes":u('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',c,c,c)("return%j",v(o,"buffer"));break}return u}g(p,"genVerifyValue"),s(p,"genVerifyValue");function n(u,o,e){switch(o.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":u("if(!util.key32Re.test(%s))",e)("return%j",v(o,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":u("if(!util.key64Re.test(%s))",e)("return%j",v(o,"integer|Long key"));break;case"bool":u("if(!util.key2Re.test(%s))",e)("return%j",v(o,"boolean key"));break}return u}g(n,"genVerifyKey"),s(n,"genVerifyKey");function r(u){var o=f.codegen(["m","q"],u.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected")("if(q===undefined)q=0")("if(q>util.recursionLimit)")("return%j","max depth exceeded"),e=u.oneofsArray,c={};e.length&&o("var p={}");for(var i=0;i<u.fieldsArray.length;++i){var t=u._fieldsArray[i].resolve(),a="m"+f.safeProp(t.name);if(t.optional&&o("if(%s!=null&&m.hasOwnProperty(%j)){",a,t.name),t.map)o("if(!util.isObject(%s))",a)("return%j",v(t,"object"))("var k=Object.keys(%s)",a)("for(var i=0;i<k.length;++i){"),n(o,t,"k[i]"),p(o,t,i,a+"[k[i]]")("}");else if(t.repeated)o("if(!Array.isArray(%s))",a)("return%j",v(t,"array"))("for(var i=0;i<%s.length;++i){",a),p(o,t,i,a+"[i]")("}");else{if(t.partOf){var h=f.safeProp(t.partOf.name);c[t.partOf.name]===1&&o("if(p%s===1)",h)("return%j",t.partOf.name+": multiple values"),c[t.partOf.name]=1,o("p%s=1",h)}p(o,t,i,a)}t.optional&&o("}")}return o("return null")}return g(r,"verifier"),s(r,"verifier"),st}g(Vr,"requireVerifier");var at={},gr;function Ur(){return gr||(gr=1,(function(w){var s=Object.defineProperty,y=g((o,e)=>s(o,"name",{value:e,configurable:!0}),"m"),f=w,v=ue(),p=he(),n=ee();function r(o,e,c,i){var t=!1;if(e.resolvedType)if(e.resolvedType instanceof v){o("switch(d%s){",i);for(var a=e.resolvedType.values,h=Object.keys(a),m=0;m<h.length;++m)a[h[m]]===e.typeDefault&&!t&&(o("default:")('if(typeof d%s==="number"){m%s=d%s;break}',i,i,i),e.repeated||o("break"),t=!0),o("case%j:",h[m])("case %i:",a[h[m]])("m%s=%j",i,a[h[m]])("break");o("}")}else o('if(typeof d%s!=="object")',i)("throw TypeError(%j)",e.fullName+": object expected")("m%s=types[%i].fromObject(d%s,q+1)",i,c,i);else{var b=!1;switch(e.type){case"double":case"float":o("m%s=Number(d%s)",i,i);break;case"uint32":case"fixed32":o("m%s=d%s>>>0",i,i);break;case"int32":case"sint32":case"sfixed32":o("m%s=d%s|0",i,i);break;case"uint64":b=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":o("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",i,i,b)('else if(typeof d%s==="string")',i)("m%s=parseInt(d%s,10)",i,i)('else if(typeof d%s==="number")',i)("m%s=d%s",i,i)('else if(typeof d%s==="object")',i)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",i,i,i,b?"true":"");break;case"bytes":o('if(typeof d%s==="string")',i)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",i,i,i)("else if(d%s.length>=0)",i)("m%s=d%s",i,i);break;case"string":o("m%s=String(d%s)",i,i);break;case"bool":o("m%s=Boolean(d%s)",i,i);break}}return o}g(r,"genValuePartial_fromObject"),y(r,"genValuePartial_fromObject"),f.fromObject=y(function(o){var e=o.fieldsArray,c=n.codegen(["d","q"],o.name+"$fromObject")("if(d instanceof C)")("return d")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")');if(!e.length)return c("return new C");c("var m=new C");for(var i=0;i<e.length;++i){var t=e[i].resolve(),a=n.safeProp(t.name),h=!t.hasPresence&&!t.repeated&&!t.map&&(t.resolvedType instanceof v||p.basic[t.type]!==void 0);t.map?(c("if(d%s){",a)('if(typeof d%s!=="object")',a)("throw TypeError(%j)",t.fullName+": object expected")("m%s={}",a)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",a),c('if(ks[i]==="__proto__")')("util.makeProp(m%s,ks[i])",a),r(c,t,i,a+"[ks[i]]")("}")("}")):t.repeated?(c("if(d%s){",a)("if(!Array.isArray(d%s))",a)("throw TypeError(%j)",t.fullName+": array expected")("m%s=Array(d%s.length)",a,a)("for(var i=0;i<d%s.length;++i){",a),r(c,t,i,a+"[i]")("}")("}")):(t.resolvedType instanceof v||c("if(d%s!=null){",a),h&&(t.resolvedType instanceof v?c('if(d%s!==%j&&(typeof d%s!=="string"||types[%i].values[d%s]!==%j)){',a,t.typeDefault,a,i,a,t.typeDefault):t.type==="string"?c('if(typeof d%s!=="string"||d%s.length){',a,a):t.type==="bytes"?c("if(d%s.length){",a):t.type==="bool"?c("if(d%s){",a):p.long[t.type]!==void 0?c('if(typeof d%s==="object"?d%s.low||d%s.high:Number(d%s)!==0){',a,a,a,a):c("if(Number(d%s)!==0){",a)),r(c,t,i,a),h&&c("}"),t.resolvedType instanceof v||c("}"))}return c("return m")},"fromObject");function u(o,e,c,i,t){if(t||(t=i),e.resolvedType)e.resolvedType instanceof v?o("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",i,c,t,t,c,t,t):o("d%s=types[%i].toObject(m%s,o)",i,c,t);else{var a=!1;switch(e.type){case"double":case"float":o("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",i,t,t,t);break;case"uint64":a=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":o('if(typeof m%s==="number")',t)("d%s=o.longs===String?String(m%s):m%s",i,t,t)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",i,t,t,t,a?"true":"",t);break;case"bytes":o("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",i,t,t,t,t);break;default:o("d%s=m%s",i,t);break}}return o}g(u,"genValuePartial_toObject"),y(u,"genValuePartial_toObject"),f.toObject=y(function(o){var e=o.fieldsArray.slice().sort(n.compareFieldsById);if(!e.length)return n.codegen()("return {}");for(var c=n.codegen(["m","o"],o.name+"$toObject")("if(!o)")("o={}")("var d={}"),i=[],t=[],a=[],h=0;h<e.length;++h)e[h].partOf||(e[h].resolve().repeated?i:e[h].map?t:a).push(e[h]);if(i.length){for(c("if(o.arrays||o.defaults){"),h=0;h<i.length;++h)c("d%s=[]",n.safeProp(i[h].name));c("}")}if(t.length){for(c("if(o.objects||o.defaults){"),h=0;h<t.length;++h)c("d%s={}",n.safeProp(t[h].name));c("}")}if(a.length){for(c("if(o.defaults){"),h=0;h<a.length;++h){var m=a[h],b=n.safeProp(m.name);if(m.resolvedType instanceof v)c("d%s=o.enums===String?%j:%j",b,m.resolvedType.valuesById[m.typeDefault],m.typeDefault);else if(m.long)c("if(util.Long){")("var n=new util.Long(%i,%i,%j)",m.typeDefault.low,m.typeDefault.high,m.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",b)("}else")("d%s=o.longs===String?%j:%i",b,m.typeDefault.toString(),m.typeDefault.toNumber());else if(m.bytes){var S=Array.prototype.slice.call(m.typeDefault);c("if(o.bytes===String)d%s=%j",b,String.fromCharCode.apply(String,m.typeDefault))("else{")("d%s=%j",b,S)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",b,b)("}")}else c("d%s=%j",b,m.typeDefault)}c("}")}var d=!1;for(h=0;h<e.length;++h){var m=e[h],_=o._fieldsArray.indexOf(m),b=n.safeProp(m.name);if(m.map){d||(d=!0,c("var ks2")),c("if(m%s&&(ks2=Object.keys(m%s)).length){",b,b)("d%s={}",b);var R=p.long[m.keyType]!==void 0,P=b+"[ks2[j]]";c("for(var j=0;j<ks2.length;++j){"),R&&c("var k2=util.longFromKey(ks2[j],%j).toString()",m.keyType==="uint64"||m.keyType==="fixed64"),c('if(ks2[j]==="__proto__")')("util.makeProp(d%s,ks2[j])",b),u(c,m,_,R?b+"[k2]":P,P)("}")}else m.repeated?(c("if(m%s&&m%s.length){",b,b)("d%s=Array(m%s.length)",b,b)("for(var j=0;j<m%s.length;++j){",b),u(c,m,_,b+"[j]")("}")):(c("if(m%s!=null&&m.hasOwnProperty(%j)){",b,m.name),u(c,m,_,b),m.partOf&&c("if(o.oneofs)")("d%s=%j",n.safeProp(m.partOf.name),m.name));c("}")}return c("return d")},"toObject")})(at)),at}g(Ur,"requireConverter");var ut={},br;function $r(){return br||(br=1,(function(w){var s=Object.defineProperty,y=g((p,n)=>s(p,"name",{value:n,configurable:!0}),"l"),f=w,v=Et();f[".google.protobuf.Any"]={fromObject:y(function(p,n){if(p&&p["@type"]){var r=p["@type"].substring(p["@type"].lastIndexOf("/")+1),u=this.lookup(r);if(u){var o=p["@type"].charAt(0)==="."?p["@type"].slice(1):p["@type"];o.indexOf("/")===-1&&(o="/"+o);var e=n===void 0?1:n+1;return this.create({type_url:o,value:u.encode(u.fromObject(p,e)).finish()})}}return this.fromObject(p,n)},"fromObject"),toObject:y(function(p,n){var r="type.googleapis.com/",u="",o="";if(n&&n.json&&p.type_url&&p.value){o=p.type_url.substring(p.type_url.lastIndexOf("/")+1),u=p.type_url.substring(0,p.type_url.lastIndexOf("/")+1);var e=this.lookup(o);e&&(p=e.decode(p.value))}if(!(p instanceof this.ctor)&&p instanceof v){var c=p.$type.toObject(p,n),i=p.$type.fullName[0]==="."?p.$type.fullName.slice(1):p.$type.fullName;return u===""&&(u=r),o=u+i,c["@type"]=o,c}return this.toObject(p,n)},"toObject")}})(ut)),ut}g($r,"requireWrappers");var ft,_r;function Rt(){if(_r)return ft;_r=1;var w=Object.defineProperty,s=g((d,_)=>w(d,"name",{value:_,configurable:!0}),"s");ft=b;var y=Oe();((b.prototype=Object.create(y.prototype)).constructor=b).className="Type";var f=ue(),v=ye(),p=ce(),n=Ot(),r=kt(),u=Et(),o=wt(),e=_t(),c=ee(),i=zr(),t=Jr(),a=Vr(),h=Ur(),m=$r();function b(d,_){d=d.replace(/\W/g,""),y.call(this,d,_),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}g(b,"Type"),s(b,"Type"),Object.defineProperties(b.prototype,{fieldsById:{get:s(function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var d=Object.keys(this.fields),_=0;_<d.length;++_){var R=this.fields[d[_]],P=R.id;if(this._fieldsById[P])throw Error("duplicate id "+P+" in "+this);this._fieldsById[P]=R}return this._fieldsById},"get")},fieldsArray:{get:s(function(){return this._fieldsArray||(this._fieldsArray=c.toArray(this.fields))},"get")},oneofsArray:{get:s(function(){return this._oneofsArray||(this._oneofsArray=c.toArray(this.oneofs))},"get")},ctor:{get:s(function(){return this._ctor||(this.ctor=b.generateConstructor(this)())},"get"),set:s(function(d){var _=d.prototype;_ instanceof u||((d.prototype=new u).constructor=d,c.merge(d.prototype,_)),d.$type=d.prototype.$type=this,c.merge(d,u,!0),this._ctor=d,delete this.decode,delete this.fromObject;for(var R=0,P;R<this.fieldsArray.length;++R)P=this._fieldsArray[R].resolve(),d.prototype[P.name]=P.defaultValue;var I={};for(R=0;R<this.oneofsArray.length;++R)I[this._oneofsArray[R].resolve().name]={get:c.oneOfGetter(this._oneofsArray[R].oneof),set:c.oneOfSetter(this._oneofsArray[R].oneof)};R&&Object.defineProperties(d.prototype,I)},"set")}}),b.generateConstructor=s(function(d){for(var _=c.codegen(["p"],d.name),R=0,P;R<d.fieldsArray.length;++R)(P=d._fieldsArray[R]).map?_("this%s={}",c.safeProp(P.name)):P.repeated&&_("this%s=[]",c.safeProp(P.name));return _('if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null&&ks[i]!=="__proto__")')("this[ks[i]]=p[ks[i]]")},"generateConstructor");function S(d){return d._fieldsById=d._fieldsArray=d._oneofsArray=null,delete d.encode,delete d.decode,delete d.verify,d}return g(S,"clearCache"),s(S,"clearCache"),b.fromJSON=s(function(d,_,R){if(R===void 0&&(R=0),R>c.nestingLimit)throw Error("max depth exceeded");var P=new b(d,_.options);P.extensions=_.extensions,P.reserved=_.reserved;for(var I=Object.keys(_.fields),L=0;L<I.length;++L)P.add((typeof _.fields[I[L]].keyType<"u"?n.fromJSON:p.fromJSON)(I[L],_.fields[I[L]]));if(_.oneofs)for(I=Object.keys(_.oneofs),L=0;L<I.length;++L)P.add(v.fromJSON(I[L],_.oneofs[I[L]]));if(_.nested)for(I=Object.keys(_.nested),L=0;L<I.length;++L){var W=_.nested[I[L]];P.add((W.id!==void 0?p.fromJSON:W.fields!==void 0?b.fromJSON:W.values!==void 0?f.fromJSON:W.methods!==void 0?r.fromJSON:y.fromJSON)(I[L],W,R+1))}return _.extensions&&_.extensions.length&&(P.extensions=_.extensions),_.reserved&&_.reserved.length&&(P.reserved=_.reserved),_.group&&(P.group=!0),_.comment&&(P.comment=_.comment),_.edition&&(P._edition=_.edition),P._defaultEdition="proto3",P},"fromJSON"),b.prototype.toJSON=s(function(d){var _=y.prototype.toJSON.call(this,d),R=d?!!d.keepComments:!1;return c.toObject(["edition",this._editionToJSON(),"options",_&&_.options||void 0,"oneofs",y.arrayToJSON(this.oneofsArray,d),"fields",y.arrayToJSON(this.fieldsArray.filter(function(P){return!P.declaringField}),d)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",_&&_.nested||void 0,"comment",R?this.comment:void 0])},"toJSON"),b.prototype.resolveAll=s(function(){if(!this._needsRecursiveResolve)return this;y.prototype.resolveAll.call(this);var d=this.oneofsArray;for(R=0;R<d.length;)d[R++].resolve();for(var _=this.fieldsArray,R=0;R<_.length;)_[R++].resolve();return this},"resolveAll"),b.prototype._resolveFeaturesRecursive=s(function(d){return this._needsRecursiveFeatureResolution?(d=this._edition||d,y.prototype._resolveFeaturesRecursive.call(this,d),this.oneofsArray.forEach(_=>{_._resolveFeatures(d)}),this.fieldsArray.forEach(_=>{_._resolveFeatures(d)}),this):this},"_resolveFeaturesRecursive"),b.prototype.get=s(function(d){return Object.prototype.hasOwnProperty.call(this.fields,d)?this.fields[d]:this.oneofs&&Object.prototype.hasOwnProperty.call(this.oneofs,d)?this.oneofs[d]:this.nested&&Object.prototype.hasOwnProperty.call(this.nested,d)?this.nested[d]:null},"get"),b.prototype.add=s(function(d){if(this.get(d.name))throw Error("duplicate name '"+d.name+"' in "+this);if(d instanceof p&&d.extend===void 0){if(this._fieldsById?this._fieldsById[d.id]:this.fieldsById[d.id])throw Error("duplicate id "+d.id+" in "+this);if(this.isReservedId(d.id))throw Error("id "+d.id+" is reserved in "+this);if(this.isReservedName(d.name))throw Error("name '"+d.name+"' is reserved in "+this);return d.name==="__proto__"?this:(d.parent&&d.parent.remove(d),this.fields[d.name]=d,d.message=this,d.onAdd(this),S(this))}return d instanceof v?d.name==="__proto__"?this:(this.oneofs||(this.oneofs={}),this.oneofs[d.name]=d,d.onAdd(this),S(this)):y.prototype.add.call(this,d)},"add"),b.prototype.remove=s(function(d){if(d instanceof p&&d.extend===void 0){if(!this.fields||this.fields[d.name]!==d)throw Error(d+" is not a member of "+this);return delete this.fields[d.name],d.parent=null,d.onRemove(this),S(this)}if(d instanceof v){if(!this.oneofs||this.oneofs[d.name]!==d)throw Error(d+" is not a member of "+this);return delete this.oneofs[d.name],d.parent=null,d.onRemove(this),S(this)}return y.prototype.remove.call(this,d)},"remove"),b.prototype.isReservedId=s(function(d){return y.isReservedId(this.reserved,d)},"isReservedId"),b.prototype.isReservedName=s(function(d){return y.isReservedName(this.reserved,d)},"isReservedName"),b.prototype.create=s(function(d){return new this.ctor(d)},"create"),b.prototype.setup=s(function(){for(var d=this.fullName,_=[],R=0;R<this.fieldsArray.length;++R)_.push(this._fieldsArray[R].resolve().resolvedType);this.encode=i(this)({Writer:e,types:_,util:c}),this.decode=t(this)({Reader:o,types:_,util:c,C:this.ctor}),this.verify=a(this)({types:_,util:c}),this.fromObject=h.fromObject(this)({types:_,util:c,C:this.ctor}),this.toObject=h.toObject(this)({types:_,util:c});var P=m[d];if(P){var I=Object.create(this);I._ctor=this.ctor,I.fromObject=this.fromObject,this.fromObject=P.fromObject.bind(I),I.toObject=this.toObject,this.toObject=P.toObject.bind(I)}return this},"setup"),b.prototype.encode=s(function(d,_){return this.setup().encode(d,_)},"encode_setup"),b.prototype.encodeDelimited=s(function(d,_){return this.encode(d,_&&_.len?_.fork():_).ldelim()},"encodeDelimited"),b.prototype.decode=s(function(d,_){return this.setup().decode.apply(this,arguments)},"decode_setup"),b.prototype.decodeDelimited=s(function(d){return d instanceof o||(d=o.create(d)),this.decode(d,d.uint32())},"decodeDelimited"),b.prototype.verify=s(function(d){return this.setup().verify.apply(this,arguments)},"verify_setup"),b.prototype.fromObject=s(function(d){return this.setup().fromObject.apply(this,arguments)},"fromObject"),b.prototype.toObject=s(function(d,_){return this.setup().toObject(d,_)},"toObject"),b.prototype.getTypeUrl=s(function(d){d===void 0&&(d="type.googleapis.com");var _=this.fullName;return d+"/"+(_.charAt(0)==="."?_.substring(1):_)},"getTypeUrl"),b.d=s(function(d){return s(function(_){c.decorateType(_,d)},"typeDecorator")},"decorateType"),ft}g(Rt,"requireType");var lt,wr;function At(){if(wr)return lt;wr=1;var w=Object.defineProperty,s=g((a,h)=>w(a,"name",{value:h,configurable:!0}),"o");lt=e;var y=Oe();((e.prototype=Object.create(y.prototype)).constructor=e).className="Root";var f=ce(),v=ue(),p=ye(),n=ee(),r,u,o;function e(a){y.call(this,"",a),this.deferred=[],this.files=[],this._edition="proto2",this._fullyQualifiedObjects={}}g(e,"Root"),s(e,"Root"),e.fromJSON=s(function(a,h,m){if(m===void 0&&(m=0),m>n.recursionLimit)throw Error("max depth exceeded");return h||(h=new e),a.options&&h.setOptions(a.options),h.addJSON(a.nested,m).resolveAll()},"fromJSON"),e.prototype.resolvePath=n.path.resolve,e.prototype.fetch=n.fetch;function c(){}g(c,"SYNC"),s(c,"SYNC"),e.prototype.load=s(g(function a(h,m,b){typeof m=="function"&&(b=m,m=void 0);var S=this;if(!b)return n.asPromise(a,S,h,m);var d=b===c;function _(J,$){if(b){if(d)throw J;$&&$.resolveAll();var B=b;b=null,B(J,$)}}g(_,"p"),s(_,"finish");function R(J){var $=J.lastIndexOf("google/protobuf/");if($>-1){var B=J.substring($);if(Object.prototype.hasOwnProperty.call(o,B))return B}return Object.prototype.hasOwnProperty.call(o,J)?J:null}g(R,"y"),s(R,"getBundledFileName");function P(J,$){try{if(n.isString($)&&$.charAt(0)==="{"&&($=JSON.parse($)),!n.isString($))S.setOptions($.options).addJSON($.nested);else{u.filename=J;var B=u($,S,m),z,j=0;if(B.imports)for(;j<B.imports.length;++j)(z=R(B.imports[j])||S.resolvePath(J,B.imports[j]))&&I(z);if(B.weakImports)for(j=0;j<B.weakImports.length;++j)(z=R(B.weakImports[j])||S.resolvePath(J,B.weakImports[j]))&&I(z,!0)}}catch(l){_(l)}!d&&!L&&_(null,S)}g(P,"v"),s(P,"process");function I(J,$){if(J=R(J)||J,!(S.files.indexOf(J)>-1)){if(S.files.push(J),Object.prototype.hasOwnProperty.call(o,J)){d?P(J,o[J]):(++L,setTimeout(function(){--L,P(J,o[J])}));return}if(d){var B;try{B=n.fs.readFileSync(J).toString("utf8")}catch(z){$||_(z);return}P(J,B)}else++L,S.fetch(J,function(z,j){if(--L,!!b){if(z){$?L||_(null,S):_(z);return}P(J,j)}})}}g(I,"O"),s(I,"fetch");var L=0;n.isString(h)&&(h=[h]);for(var W=0,te;W<h.length;++W)(te=S.resolvePath("",h[W]))&&I(te);return d?(S.resolveAll(),S):(L||_(null,S),S)},"u"),"load"),e.prototype.loadSync=s(function(a,h){if(!n.isNode)throw Error("not supported");return this.load(a,h,c)},"loadSync"),e.prototype.resolveAll=s(function(){if(!this._needsRecursiveResolve)return this;if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(a){return"'extend "+a.extend+"' in "+a.parent.fullName}).join(", "));return y.prototype.resolveAll.call(this)},"resolveAll");var i=/^[A-Z]/;function t(a,h){var m=h.parent.lookup(h.extend);if(m){var b=new f(h.fullName,h.id,h.type,h.rule,void 0,h.options);return m.get(b.name)||(b.declaringField=h,h.extensionField=b,m.add(b)),!0}return!1}return g(t,"tryHandleExtension"),s(t,"tryHandleExtension"),e.prototype._handleAdd=s(function(a){if(a instanceof f)a.extend!==void 0&&!a.extensionField&&(t(this,a)||this.deferred.push(a));else if(a instanceof v)i.test(a.name)&&(a.parent[a.name]=a.values);else if(!(a instanceof p)){if(a instanceof r)for(var h=0;h<this.deferred.length;)t(this,this.deferred[h])?this.deferred.splice(h,1):++h;for(var m=0;m<a.nestedArray.length;++m)this._handleAdd(a._nestedArray[m]);i.test(a.name)&&(a.parent[a.name]=a)}(a instanceof r||a instanceof v||a instanceof f)&&(this._fullyQualifiedObjects[a.fullName]=a)},"_handleAdd"),e.prototype._handleRemove=s(function(a){if(a instanceof f){if(a.extend!==void 0)if(a.extensionField)a.extensionField.parent.remove(a.extensionField),a.extensionField=null;else{var h=this.deferred.indexOf(a);h>-1&&this.deferred.splice(h,1)}}else if(a instanceof v)i.test(a.name)&&delete a.parent[a.name];else if(a instanceof y){for(var m=0;m<a.nestedArray.length;++m)this._handleRemove(a._nestedArray[m]);i.test(a.name)&&delete a.parent[a.name]}delete this._fullyQualifiedObjects[a.fullName]},"_handleRemove"),e._configure=function(a,h,m){r=a,u=h,o=m},lt}g(At,"requireRoot");var Or;function ee(){if(Or)return He.exports;Or=1;var w=Object.defineProperty,s=g((e,c)=>w(e,"name",{value:c,configurable:!0}),"n"),y=He.exports=fe(),f=Dr(),v,p;y.codegen=pi(),y.fetch=di(),y.path=vi(),y.patterns=Cr();var n=y.patterns.reservedRe,r=y.patterns.unsafePropertyRe;y.fs=Mr(),y.toArray=s(function(e){if(e){for(var c=Object.keys(e),i=new Array(c.length),t=0;t<c.length;)i[t]=e[c[t++]];return i}return[]},"toArray"),y.toObject=s(function(e){for(var c={},i=0;i<e.length;){var t=e[i++],a=e[i++];a!==void 0&&(c[t]=a)}return c},"toObject"),y.isReserved=s(function(e){return n.test(e)},"isReserved"),y.safeProp=s(function(e){return!/^[$\w_]+$/.test(e)||n.test(e)?"["+JSON.stringify(e)+"]":"."+e},"safeProp"),y.ucFirst=s(function(e){return e.charAt(0).toUpperCase()+e.substring(1)},"ucFirst");var u=/_([a-z])/g;y.camelCase=s(function(e){return e.substring(0,1)+e.substring(1).replace(u,function(c,i){return i.toUpperCase()})},"camelCase"),y.compareFieldsById=s(function(e,c){return e.id-c.id},"compareFieldsById"),y.decorateType=s(function(e,c){if(e.$type)return c&&e.$type.name!==c&&(y.decorateRoot.remove(e.$type),e.$type.name=c,y.decorateRoot.add(e.$type)),e.$type;v||(v=Rt());var i=new v(c||e.name);return y.decorateRoot.add(i),i.ctor=e,Object.defineProperty(e,"$type",{value:i,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:i,enumerable:!1}),i},"decorateType");var o=0;return y.decorateEnum=s(function(e){if(e.$type)return e.$type;p||(p=ue());var c=new p("Enum"+o++,e);return y.decorateRoot.add(c),Object.defineProperty(e,"$type",{value:c,enumerable:!1}),c},"decorateEnum"),y.setProperty=s(function(e,c,i,t){function a(h,m,b){var S=m.shift();if(r.test(S))return h;if(m.length>0)h[S]=a(h[S]||{},m,b);else{var d=h[S];if(d&&t)return h;d&&(b=[].concat(d).concat(b)),h[S]=b}return h}if(g(a,"a"),s(a,"setProp"),typeof e!="object")throw TypeError("dst must be an object");if(!c)throw TypeError("path must be specified");if(c=c.split("."),c.length>y.recursionLimit)throw Error("max depth exceeded");return a(e,c,i)},"setProperty"),Object.defineProperty(y,"decorateRoot",{get:s(function(){return f.decorated||(f.decorated=new(At()))},"get")}),He.exports}g(ee,"requireUtil");var jr;function he(){return jr||(jr=1,(function(w){var s=Object.defineProperty,y=g((r,u)=>s(r,"name",{value:u,configurable:!0}),"r"),f=w,v=ee(),p=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function n(r,u){var o=0,e=Object.create(null);for(u|=0;o<r.length;)e[p[o+u]]=r[o++];return e}g(n,"bake"),y(n,"bake"),f.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),f.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",v.emptyArray,null]),f.long=n([0,0,0,1,1],7),f.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),f.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])})(We)),We}g(he,"requireTypes");var ht,kr;function ce(){if(kr)return ht;kr=1;var w=Object.defineProperty,s=g((o,e)=>w(o,"name",{value:e,configurable:!0}),"s");ht=u;var y=pe();((u.prototype=Object.create(y.prototype)).constructor=u).className="Field";var f=ue(),v=he(),p=ee(),n,r=/^required|optional|repeated$/;u.fromJSON=s(function(o,e){var c=new u(o,e.id,e.type,e.rule,e.extend,e.options,e.comment);return e.edition&&(c._edition=e.edition),c._defaultEdition="proto3",c},"fromJSON");function u(o,e,c,i,t,a,h){if(p.isObject(i)?(h=t,a=i,i=t=void 0):p.isObject(t)&&(h=a,a=t,t=void 0),y.call(this,o,a),!p.isInteger(e)||e<0)throw TypeError("id must be a non-negative integer");if(!p.isString(c))throw TypeError("type must be a string");if(i!==void 0&&!r.test(i=i.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(t!==void 0&&!p.isString(t))throw TypeError("extend must be a string");i==="proto3_optional"&&(i="optional"),this.rule=i&&i!=="optional"?i:void 0,this.type=c,this.id=e,this.extend=t||void 0,this.repeated=i==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=p.Long?v.long[c]!==void 0:!1,this.bytes=c==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=h}return g(u,"Field"),s(u,"Field"),Object.defineProperty(u.prototype,"required",{get:s(function(){return this._features.field_presence==="LEGACY_REQUIRED"},"get")}),Object.defineProperty(u.prototype,"optional",{get:s(function(){return!this.required},"get")}),Object.defineProperty(u.prototype,"delimited",{get:s(function(){return this.resolvedType instanceof n&&this._features.message_encoding==="DELIMITED"},"get")}),Object.defineProperty(u.prototype,"packed",{get:s(function(){return this._features.repeated_field_encoding==="PACKED"},"get")}),Object.defineProperty(u.prototype,"hasPresence",{get:s(function(){return this.repeated||this.map?!1:this.partOf||this.declaringField||this.extensionField||this._features.field_presence!=="IMPLICIT"},"get")}),u.prototype.setOption=s(function(o,e,c){return y.prototype.setOption.call(this,o,e,c)},"setOption"),u.prototype.toJSON=s(function(o){var e=o?!!o.keepComments:!1;return p.toObject(["edition",this._editionToJSON(),"rule",this.rule!=="optional"&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:void 0])},"toJSON"),u.prototype.resolve=s(function(){if(this.resolved)return this;if((this.typeDefault=v.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&this.options.default!=null&&(this.typeDefault=this.options.default,this.resolvedType instanceof f&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof f)&&delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=p.Long.fromNumber(this.typeDefault,this.type.charAt(0)==="u"),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&typeof this.typeDefault=="string"){var o;p.base64.test(this.typeDefault)?p.base64.decode(this.typeDefault,o=p.newBuffer(p.base64.length(this.typeDefault)),0):p.utf8.write(this.typeDefault,o=p.newBuffer(p.utf8.length(this.typeDefault)),0),this.typeDefault=o}return this.map?this.defaultValue=p.emptyObject:this.repeated?this.defaultValue=p.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof n&&this.parent._ctor&&(this.parent._ctor.prototype[this.name]=this.defaultValue),y.prototype.resolve.call(this)},"resolve"),u.prototype._inferLegacyProtoFeatures=s(function(o){if(o!=="proto2"&&o!=="proto3")return{};var e={};if(this.rule==="required"&&(e.field_presence="LEGACY_REQUIRED"),this.parent&&v.defaults[this.type]===void 0){var c=this.parent.get(this.type.split(".").pop());c&&c instanceof n&&c.group&&(e.message_encoding="DELIMITED")}return this.getOption("packed")===!0?e.repeated_field_encoding="PACKED":this.getOption("packed")===!1&&(e.repeated_field_encoding="EXPANDED"),e},"_inferLegacyProtoFeatures"),u.prototype._resolveFeatures=s(function(o){return y.prototype._resolveFeatures.call(this,this._edition||o)},"_resolveFeatures"),u.d=s(function(o,e,c,i){return typeof e=="function"?e=p.decorateType(e).name:e&&typeof e=="object"&&(e=p.decorateEnum(e).name),s(function(t,a){p.decorateType(t.constructor).add(new u(a,o,e,c,{default:i}))},"fieldDecorator")},"decorateField"),u._configure=s(function(o){n=o},"configure"),ht}g(ce,"requireField");var ct,Er;function ye(){if(Er)return ct;Er=1;var w=Object.defineProperty,s=g((r,u)=>w(r,"name",{value:u,configurable:!0}),"o");ct=p;var y=pe();((p.prototype=Object.create(y.prototype)).constructor=p).className="OneOf";var f=ce(),v=ee();function p(r,u,o,e){if(Array.isArray(u)||(o=u,u=void 0),y.call(this,r,o),!(u===void 0||Array.isArray(u)))throw TypeError("fieldNames must be an Array");this.oneof=u||[],this.fieldsArray=[],this.comment=e}g(p,"OneOf"),s(p,"OneOf"),p.fromJSON=s(function(r,u){return new p(r,u.oneof,u.options,u.comment)},"fromJSON"),p.prototype.toJSON=s(function(r){var u=r?!!r.keepComments:!1;return v.toObject(["options",this.options,"oneof",this.oneof,"comment",u?this.comment:void 0])},"toJSON");function n(r){if(r.parent)for(var u=0;u<r.fieldsArray.length;++u)r.fieldsArray[u].parent||r.parent.add(r.fieldsArray[u])}return g(n,"addFieldsToParent"),s(n,"addFieldsToParent"),p.prototype.add=s(function(r){if(!(r instanceof f))throw TypeError("field must be a Field");return r.parent&&r.parent!==this.parent&&r.parent.remove(r),this.oneof.push(r.name),this.fieldsArray.push(r),r.partOf=this,n(this),this},"add"),p.prototype.remove=s(function(r){if(!(r instanceof f))throw TypeError("field must be a Field");var u=this.fieldsArray.indexOf(r);if(u<0)throw Error(r+" is not a member of "+this);return this.fieldsArray.splice(u,1),u=this.oneof.indexOf(r.name),u>-1&&this.oneof.splice(u,1),r.partOf=null,this},"remove"),p.prototype.onAdd=s(function(r){y.prototype.onAdd.call(this,r);for(var u=this,o=0;o<this.oneof.length;++o){var e=r.get(this.oneof[o]);e&&!e.partOf&&(e.partOf=u,u.fieldsArray.push(e))}n(this)},"onAdd"),p.prototype.onRemove=s(function(r){for(var u=0,o;u<this.fieldsArray.length;++u)(o=this.fieldsArray[u]).parent&&o.parent.remove(o);y.prototype.onRemove.call(this,r)},"onRemove"),Object.defineProperty(p.prototype,"isProto3Optional",{get:s(function(){if(this.fieldsArray==null||this.fieldsArray.length!==1)return!1;var r=this.fieldsArray[0];return r.options!=null&&r.options.proto3_optional===!0},"get")}),p.d=s(function(){for(var r=new Array(arguments.length),u=0;u<arguments.length;)r[u]=arguments[u++];return s(function(o,e){v.decorateType(o.constructor).add(new p(e,r)),Object.defineProperty(o,e,{get:v.oneOfGetter(r),set:v.oneOfSetter(r)})},"oneOfDecorator")},"decorateOneOf"),ct}g(ye,"requireOneof");var pt,Rr;function pe(){if(Rr)return pt;Rr=1;var w=Object.defineProperty,s=g((e,c)=>w(e,"name",{value:c,configurable:!0}),"s");pt=o,o.className="ReflectionObject";const y=ye();var f=ee(),v,p={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE2024",default_symbol_visibility:"EXPORT_TOP_LEVEL"},n={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"},r={enum_type:"CLOSED",field_presence:"EXPLICIT",json_format:"LEGACY_BEST_EFFORT",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"EXPANDED",utf8_validation:"NONE",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"},u={enum_type:"OPEN",field_presence:"IMPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"};function o(e,c){if(!f.isString(e))throw TypeError("name must be a string");if(c&&!f.isObject(c))throw TypeError("options must be an object");this.options=c,this.parsedOptions=null,this.name=e,this._edition=null,this._defaultEdition="proto2",this._features={},this._featuresResolved=!1,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}return g(o,"ReflectionObject"),s(o,"ReflectionObject"),Object.defineProperties(o.prototype,{root:{get:s(function(){for(var e=this;e.parent!==null;)e=e.parent;return e},"get")},fullName:{get:s(function(){for(var e=[this.name],c=this.parent;c;)e.unshift(c.name),c=c.parent;return e.join(".")},"get")}}),o.prototype.toJSON=s(function(){throw Error()},"toJSON"),o.prototype.onAdd=s(function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var c=e.root;c instanceof v&&c._handleAdd(this)},"onAdd"),o.prototype.onRemove=s(function(e){var c=e.root;c instanceof v&&c._handleRemove(this),this.parent=null,this.resolved=!1},"onRemove"),o.prototype.resolve=s(function(){return this.resolved?this:(this.root instanceof v&&(this.resolved=!0),this)},"resolve"),o.prototype._resolveFeaturesRecursive=s(function(e){return this._resolveFeatures(this._edition||e)},"_resolveFeaturesRecursive"),o.prototype._resolveFeatures=s(function(e){if(!this._featuresResolved){var c={};if(!e)throw new Error("Unknown edition for "+this.fullName);var i=Object.assign(this.options?Object.assign({},this.options.features):{},this._inferLegacyProtoFeatures(e));if(this._edition){if(e==="proto2")c=Object.assign({},r);else if(e==="proto3")c=Object.assign({},u);else if(e==="2023")c=Object.assign({},n);else if(e==="2024")c=Object.assign({},p);else throw new Error("Unknown edition: "+e);this._features=Object.assign(c,i||{})}else if(this.partOf instanceof y){var t=Object.assign({},this.partOf._features);this._features=Object.assign(t,i||{})}else if(!this.declaringField)if(this.parent){var a=Object.assign({},this.parent._features);this._features=Object.assign(a,i||{})}else throw new Error("Unable to find a parent for "+this.fullName);this.extensionField&&(this.extensionField._features=this._features),this._featuresResolved=!0}},"_resolveFeatures"),o.prototype._inferLegacyProtoFeatures=s(function(){return{}},"_inferLegacyProtoFeatures"),o.prototype.getOption=s(function(e){if(this.options)return this.options[e]},"getOption"),o.prototype.setOption=s(function(e,c,i){return e==="__proto__"?this:(this.options||(this.options={}),/^features\./.test(e)?f.setProperty(this.options,e,c,i):(!i||this.options[e]===void 0)&&(this.getOption(e)!==c&&(this.resolved=!1),this.options[e]=c),this)},"setOption"),o.prototype.setParsedOption=s(function(e,c,i){if(e==="__proto__")return this;this.parsedOptions||(this.parsedOptions=[]);var t=this.parsedOptions;if(i){var a=t.find(function(b){return Object.prototype.hasOwnProperty.call(b,e)});if(a){var h=a[e];f.setProperty(h,i,c)}else a={},a[e]=f.setProperty({},i,c),t.push(a)}else{var m={};m[e]=c,t.push(m)}return this},"setParsedOption"),o.prototype.setOptions=s(function(e,c){if(e)for(var i=Object.keys(e),t=0;t<i.length;++t)this.setOption(i[t],e[i[t]],c);return this},"setOptions"),o.prototype.toString=s(function(){var e=this.constructor.className,c=this.fullName;return c.length?e+" "+c:e},"toString"),o.prototype._editionToJSON=s(function(){if(!(!this._edition||this._edition==="proto3"))return this._edition},"_editionToJSON"),o._configure=function(e){v=e},pt}g(pe,"requireObject");var dt,Ar;function ue(){if(Ar)return dt;Ar=1;var w=Object.defineProperty,s=g((n,r)=>w(n,"name",{value:r,configurable:!0}),"r");dt=p;var y=pe();((p.prototype=Object.create(y.prototype)).constructor=p).className="Enum";var f=Oe(),v=ee();function p(n,r,u,o,e,c){if(y.call(this,n,u),r&&typeof r!="object")throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=o,this.comments=e||{},this.valuesOptions=c,this._valuesFeatures={},this.reserved=void 0,r)for(var i=Object.keys(r),t=0;t<i.length;++t)i[t]!=="__proto__"&&typeof r[i[t]]=="number"&&(this.valuesById[this.values[i[t]]=r[i[t]]]=i[t])}return g(p,"Enum"),s(p,"Enum"),p.prototype._resolveFeatures=s(function(n){return n=this._edition||n,y.prototype._resolveFeatures.call(this,n),Object.keys(this.values).forEach(r=>{var u=Object.assign({},this._features);this._valuesFeatures[r]=Object.assign(u,this.valuesOptions&&this.valuesOptions[r]&&this.valuesOptions[r].features)}),this},"_resolveFeatures"),p.fromJSON=s(function(n,r){var u=new p(n,r.values,r.options,r.comment,r.comments,r.valuesOptions);return u.reserved=r.reserved,r.edition&&(u._edition=r.edition),u._defaultEdition="proto3",u},"fromJSON"),p.prototype.toJSON=s(function(n){var r=n?!!n.keepComments:!1;return v.toObject(["edition",this._editionToJSON(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",r?this.comment:void 0,"comments",r?this.comments:void 0])},"toJSON"),p.prototype.add=s(function(n,r,u,o){if(!v.isString(n))throw TypeError("name must be a string");if(!v.isInteger(r))throw TypeError("id must be an integer");if(n==="__proto__")return this;if(this.values[n]!==void 0)throw Error("duplicate name '"+n+"' in "+this);if(this.isReservedId(r))throw Error("id "+r+" is reserved in "+this);if(this.isReservedName(n))throw Error("name '"+n+"' is reserved in "+this);if(this.valuesById[r]!==void 0){if(!(this.options&&this.options.allow_alias))throw Error("duplicate id "+r+" in "+this);this.values[n]=r}else this.valuesById[this.values[n]=r]=n;return o&&(this.valuesOptions===void 0&&(this.valuesOptions={}),this.valuesOptions[n]=o||null),this.comments[n]=u||null,this},"add"),p.prototype.remove=s(function(n){if(!v.isString(n))throw TypeError("name must be a string");var r=this.values[n];if(r==null)throw Error("name '"+n+"' does not exist in "+this);return delete this.valuesById[r],delete this.values[n],delete this.comments[n],this.valuesOptions&&delete this.valuesOptions[n],this},"remove"),p.prototype.isReservedId=s(function(n){return f.isReservedId(this.reserved,n)},"isReservedId"),p.prototype.isReservedName=s(function(n){return f.isReservedName(this.reserved,n)},"isReservedName"),dt}g(ue,"require_enum");var vt,Nr;function zr(){if(Nr)return vt;Nr=1;var w=Object.defineProperty,s=g((r,u)=>w(r,"name",{value:u,configurable:!0}),"a");vt=n;var y=ue(),f=he(),v=ee();function p(r,u,o,e){return u.delimited?r("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",o,e,(u.id<<3|3)>>>0,(u.id<<3|4)>>>0):r("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",o,e,(u.id<<3|2)>>>0)}g(p,"genTypePartial"),s(p,"genTypePartial");function n(r){for(var u=v.codegen(["m","w"],r.name+"$encode")("if(!w)")("w=Writer.create()"),c,o,e=r.fieldsArray.slice().sort(v.compareFieldsById),c=0;c<e.length;++c){var i=e[c].resolve(),t=r._fieldsArray.indexOf(i),a=i.resolvedType instanceof y?"int32":i.type,h=f.basic[a];o="m"+v.safeProp(i.name),i.map?(u("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",o,i.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",o),i.keyType==="bool"?u("w.uint32(%i).fork().uint32(%i).bool(util.boolFromKey(ks[i]))",(i.id<<3|2)>>>0,8|f.mapKey[i.keyType]):f.long[i.keyType]!==void 0?u("w.uint32(%i).fork().uint32(%i).%s(util.longFromKey(ks[i],%j))",(i.id<<3|2)>>>0,8|f.mapKey[i.keyType],i.keyType,i.keyType==="uint64"||i.keyType==="fixed64"):u("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(i.id<<3|2)>>>0,8|f.mapKey[i.keyType],i.keyType),h===void 0?u("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",t,o):u(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,a,o),u("}")("}")):i.repeated?(u("if(%s!=null&&%s.length){",o,o),i.packed&&f.packed[a]!==void 0?u("w.uint32(%i).fork()",(i.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",o)("w.%s(%s[i])",a,o)("w.ldelim()"):(u("for(var i=0;i<%s.length;++i)",o),h===void 0?p(u,i,t,o+"[i]"):u("w.uint32(%i).%s(%s[i])",(i.id<<3|h)>>>0,a,o)),u("}")):(i.required||u("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",o,i.name),h===void 0?p(u,i,t,o):u("w.uint32(%i).%s(%s)",(i.id<<3|h)>>>0,a,o))}return u('if(m.$unknowns!=null&&Object.hasOwnProperty.call(m,"$unknowns"))')("for(var i=0;i<m.$unknowns.length;++i)")("w.raw(m.$unknowns[i])")("return w")}return g(n,"encoder"),s(n,"encoder"),vt}g(zr,"requireEncoder");var Sr;function yi(){if(Sr)return Te.exports;Sr=1;var w=Object.defineProperty,s=g((p,n)=>w(p,"name",{value:n,configurable:!0}),"i"),y=Te.exports=ci();y.build="light";function f(p,n,r){return typeof n=="function"?(r=n,n=new y.Root):n||(n=new y.Root),n.load(p,r)}g(f,"load"),s(f,"load"),y.load=f;function v(p,n){return n||(n=new y.Root),n.loadSync(p)}return g(v,"loadSync"),s(v,"loadSync"),y.loadSync=v,y.encoder=zr(),y.decoder=Jr(),y.verifier=Vr(),y.converter=Ur(),y.ReflectionObject=pe(),y.Namespace=Oe(),y.Root=At(),y.Enum=ue(),y.Type=Rt(),y.Field=ce(),y.OneOf=ye(),y.MapField=Ot(),y.Service=kt(),y.Method=jt(),y.Message=Et(),y.wrappers=$r(),y.types=he(),y.util=ee(),y.ReflectionObject._configure(y.Root),y.Namespace._configure(y.Type,y.Service,y.Enum),y.Root._configure(y.Type),y.Field._configure(y.Type),Te.exports}g(yi,"requireIndexLight");var yt,Tr;function Zr(){if(Tr)return yt;Tr=1;var w=Object.defineProperty,s=g((t,a)=>w(t,"name",{value:a,configurable:!0}),"l");yt=i;var y=/[\s{}=;:[\],'"()<>]/g,f=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,v=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,p=/^ *[*/]+ */,n=/^\s*\*?\/*/,r=/\n/g,u=/\s/,o=/\\(.?)/g,e={0:"\0",r:"\r",n:`
|
|
25
|
+
`,t:" "};function c(t){return t.replace(o,function(a,h){switch(h){case"\\":case"":return h;default:return e[h]||""}})}g(c,"unescape"),s(c,"unescape"),i.unescape=c;function i(t,a){t=t.toString();var h=0,m=t.length,b=1,S=0,d={},_=[],R=null;function P(O){return Error("illegal "+O+" (line "+b+")")}g(P,"k"),s(P,"illegal");function I(){var O=R==="'"?v:f;O.lastIndex=h-1;var x=O.exec(t);if(!x)throw P("string");return h=O.lastIndex,B(R),R=null,c(x[1])}g(I,"D"),s(I,"readString");function L(O){return t.charAt(O)}g(L,"a"),s(L,"charAt");function W(O,x,q){var C={type:t.charAt(O++),lineEmpty:!1,leading:q},M;a?M=2:M=3;var D=O-M,V;do if(--D<0||(V=t.charAt(D))===`
|
|
26
|
+
`){C.lineEmpty=!0;break}while(V===" "||V===" ");for(var U=t.substring(O,x).split(r),Z=0;Z<U.length;++Z)U[Z]=U[Z].replace(a?n:p,"").trim();C.text=U.join(`
|
|
27
|
+
`).trim(),d[b]=C,S=b}g(W,"b"),s(W,"setComment");function te(O){var x=J(O),q=t.substring(O,x),C=/^\s*\/\//.test(q);return C}g(te,"C"),s(te,"isDoubleSlashCommentLine");function J(O){for(var x=O;x<m&&L(x)!==`
|
|
28
|
+
`;)x++;return x}g(J,"y"),s(J,"findEndOfLine");function $(){if(_.length>0)return _.shift();if(R)return I();var O,x,q,C,M,D,V=h===0;do{if(h===m)return null;for(O=!1;u.test(q=L(h));)if(q===`
|
|
29
|
+
`&&(V=!0,++b),++h===m)return null;if(L(h)==="/"){if(++h===m)throw P("comment");if(L(h)==="/")if(a){if(C=h,M=!1,te(h-1)){M=!0;do{if(h=J(h),h===m||(h++,!V))break;D=te(h),D&&b++}while(D)}else h=Math.min(m,J(h)+1);M&&(W(C,h,V),V=!0),b++,O=!0}else{for(M=L(C=h+1)==="/";L(++h)!==`
|
|
30
|
+
`;)if(h===m)return null;++h,M&&(W(C,h-1,V),V=!0),++b,O=!0}else if((q=L(h))==="*"){C=h+1,M=a||L(C)==="*";do{if(q===`
|
|
31
|
+
`&&++b,++h===m)throw P("comment");x=q,q=L(h)}while(x!=="*"||q!=="/");++h,M&&(W(C,h-2,V),V=!0),O=!0}else return"/"}}while(O);var U=h;y.lastIndex=0;var Z=y.test(L(U++));if(!Z)for(;U<m&&!y.test(L(U));)++U;var X=t.substring(h,h=U);return(X==='"'||X==="'")&&(R=X),X}g($,"R"),s($,"next");function B(O){_.push(O)}g(B,"E"),s(B,"push");function z(){if(!_.length){var O=$();if(O===null)return null;B(O)}return _[0]}g(z,"A"),s(z,"peek");function j(O,x){var q=z(),C=q===O;if(C)return $(),!0;if(!x)throw P("token '"+q+"', '"+O+"' expected");return!1}g(j,"I"),s(j,"skip");function l(O){var x=null,q;return O===void 0?(q=d[b-1],delete d[b-1],q&&(a||q.type==="*"||q.lineEmpty)&&(x=q.leading?q.text:null)):(S<O&&z(),q=d[O],delete d[O],q&&!q.lineEmpty&&(a||q.type==="/")&&(x=q.leading?null:q.text)),x}return g(l,"O"),s(l,"cmnt"),Object.defineProperty({next:$,peek:z,push:B,skip:j,cmnt:l},"line",{get:s(function(){return b},"get")})}return g(i,"tokenize"),s(i,"tokenize"),yt}g(Zr,"requireTokenize");var mt,Pr;function mi(){if(Pr)return mt;Pr=1;var w=Object.defineProperty,s=g((L,W)=>w(L,"name",{value:W,configurable:!0}),"u");mt=I,I.filename=null,I.defaults={keepCase:!1};var y=Zr(),f=At(),v=Rt(),p=ce(),n=Ot(),r=ye(),u=ue(),o=kt(),e=jt(),c=pe(),i=he(),t=ee(),a=/^[1-9][0-9]*$/,h=/^-?[1-9][0-9]*$/,m=/^0[x][0-9a-fA-F]+$/,b=/^-?0[x][0-9a-fA-F]+$/,S=/^0[0-7]+$/,d=/^-?0[0-7]+$/,_=t.patterns.numberRe,R=/^[a-zA-Z_][a-zA-Z_0-9]*$/,P=t.patterns.typeRefRe;function I(L,W,te){W instanceof f||(te=W,W=new f),te||(te=I.defaults);var J=te.preferTrailingComment||!1,$=y(L,te.alternateCommentMode||!1),B=$.next,z=$.push,j=$.peek,l=$.skip,O=$.cmnt,x=!0,q,C,M,D="proto2",V=W,U=[],Z={},X=te.keepCase?function(E){return E}:t.camelCase;function Y(){U.forEach(E=>{E._edition=D,Object.keys(Z).forEach(k=>{E.getOption(k)===void 0&&E.setOption(k,Z[k],!0)})})}g(Y,"D"),s(Y,"resolveFileFeatures");function F(E,k,A){var N=I.filename;return A||(I.filename=null),Error("illegal "+(k||"token")+" '"+E+"' ("+(N?N+", ":"")+"line "+$.line+")")}g(F,"f"),s(F,"illegal");function oe(){var E=[],k;do{if((k=B())!=='"'&&k!=="'")throw F(k);E.push(B()),l(k),k=j()}while(k==='"'||k==="'");return E.join("")}g(oe,"R"),s(oe,"readString");function je(E){var k=B();switch(k){case"'":case'"':return z(k),oe();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return Nt(k,!0)}catch{if(E&&P.test(k))return k;throw F(k,"value")}}g(je,"Z"),s(je,"readValue");function me(E,k){var A,N;do if(k&&((A=j())==='"'||A==="'")){var T=oe();if(E.push(T),D>=2023)throw F(T,"id")}else try{E.push([N=le(B()),l("to",!0)?le(B()):N])}catch(K){if(k&&P.test(A)&&D>=2023)E.push(A);else throw K}while(l(",",!0));var H={options:void 0};H.setOption=function(K,G){this.options===void 0&&(this.options={}),this.options[K]=G},se(H,s(function(K){if(K==="option")ae(H,K),l(";");else throw F(K)},"parseRange_block"),s(function(){_e(H)},"parseRange_line"))}g(me,"M"),s(me,"readRanges");function Nt(E,k){var A=1;switch(E.charAt(0)==="-"&&(A=-1,E=E.substring(1)),E){case"inf":case"INF":case"Inf":return A*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(a.test(E))return A*parseInt(E,10);if(m.test(E))return A*parseInt(E,16);if(S.test(E))return A*parseInt(E,8);if(_.test(E))return A*parseFloat(E);throw F(E,"number",k)}g(Nt,"H"),s(Nt,"parseNumber");function le(E,k){switch(E){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!k&&E.charAt(0)==="-")throw F(E,"id");if(h.test(E))return parseInt(E,10);if(b.test(E))return parseInt(E,16);if(d.test(E))return parseInt(E,8);throw F(E,"id")}g(le,"I"),s(le,"parseId");function St(){if(q!==void 0)throw F("package");if(q=B(),!P.test(q))throw F(q,"name");V=V.define(q),l(";")}g(St,"J"),s(St,"parsePackage");function Tt(){var E=j(),k;switch(E){case"option":if(D<"2024")throw F("option");B(),oe(),l(";");return;case"weak":k=M||(M=[]),B();break;case"public":B();default:k=C||(C=[]);break}E=oe(),l(";"),k.push(E)}g(Tt,"Q"),s(Tt,"parseImport");function Pt(){if(l("="),D=oe(),D<2023)throw F(D,"syntax");l(";")}g(Pt,"Y"),s(Pt,"parseSyntax");function xt(){if(l("="),D=oe(),!["2023","2024"].includes(D))throw F(D,"edition");l(";")}g(xt,"j"),s(xt,"parseEdition");function ge(E,k,A){switch(A===void 0&&(A=0),k){case"option":return ae(E,k),l(";"),!0;case"message":return be(E,k,A+1),!0;case"enum":return Ae(E,k),!0;case"export":case"local":return D<"2024"||(k=B(),k==="export"||k==="local")||k!=="message"&&k!=="enum"?!1:ge(E,k,A);case"service":return Dt(E,k,A+1),!0;case"extend":return Mt(E,k,A),!0}return!1}g(ge,"A"),s(ge,"parseCommon");function se(E,k,A){var N=$.line;if(E&&(typeof E.comment!="string"&&(E.comment=O()),E.filename=I.filename),l("{",!0)){for(var T;(T=B())!=="}";)k(T);l(";",!0)}else A&&A(),l(";"),E&&(typeof E.comment!="string"||J)&&(E.comment=O(N)||E.comment)}g(se,"v"),s(se,"ifBlock");function be(E,k,A){if(A===void 0&&(A=0),A>t.nestingLimit)throw Error("max depth exceeded");if(!R.test(k=B()))throw F(k,"type name");var N=new v(k);se(N,s(function(T){if(!ge(N,T,A))switch(T){case";":break;case"map":Bt(N);break;case"required":if(D!=="proto2")throw F(T);case"repeated":ne(N,T,void 0,A+1);break;case"optional":if(D==="proto3")ne(N,"proto3_optional",void 0,A+1);else{if(D!=="proto2")throw F(T);ne(N,"optional",void 0,A+1)}break;case"oneof":Ft(N,T,A+1);break;case"extensions":me(N.extensions||(N.extensions=[]));break;case"reserved":me(N.reserved||(N.reserved=[]),!0);break;default:if(D==="proto2"||!P.test(T))throw F(T);z(T),ne(N,"optional",void 0,A+1);break}},"parseType_block")),E.add(N),E===V&&U.push(N)}g(be,"C"),s(be,"parseType");function ne(E,k,A,N){var T=B();if(T==="group"){qt(E,k,A,N);return}for(;T.endsWith(".")||j().startsWith(".");)T+=B();if(!P.test(T))throw F(T,"type");var H=B();if(!R.test(H))throw F(H,"name");H=X(H),l("=");var K=new p(H,le(B()),T,k,A);if(se(K,s(function(ie){if(ie==="option")ae(K,ie),l(";");else throw F(ie)},"parseField_block"),s(function(){_e(K)},"parseField_line")),k==="proto3_optional"){var G=new r("_"+H);K.setOption("proto3_optional",!0),G.add(K),E.add(G)}else E.add(K);E===V&&U.push(K)}g(ne,"h"),s(ne,"parseField");function qt(E,k,A,N){if(N===void 0&&(N=0),N>t.nestingLimit)throw Error("max depth exceeded");if(D>=2023)throw F("group");var T=B();if(!R.test(T))throw F(T,"name");var H=t.lcFirst(T);T===H&&(T=t.ucFirst(T)),l("=");var K=le(B()),G=new v(T);G.group=!0;var ie=new p(H,K,T,k,A);ie.filename=I.filename,se(G,s(function(Q){switch(Q){case";":break;case"option":ae(G,Q),l(";");break;case"required":case"repeated":ne(G,Q,void 0,N+1);break;case"optional":D==="proto3"?ne(G,"proto3_optional",void 0,N+1):ne(G,"optional",void 0,N+1);break;case"message":be(G,Q,N+1);break;case"enum":Ae(G,Q);break;case"reserved":me(G.reserved||(G.reserved=[]),!0);break;case"export":case"local":if(D<"2024")throw F(Q);switch(Q=B(),Q){case"message":be(G,Q,N+1);break;case"enum":be(G,Q,N+1);break;default:throw F(Q)}break;default:throw F(Q)}},"parseGroup_block")),E.add(G).add(ie),E===V&&(U.push(G),U.push(ie))}g(qt,"k"),s(qt,"parseGroup");function Bt(E){l("<");var k=B();if(i.mapKey[k]===void 0)throw F(k,"type");l(",");var A=B();if(!P.test(A))throw F(A,"type");l(">");var N=B();if(!R.test(N))throw F(N,"name");l("=");var T=new n(X(N),le(B()),k,A);se(T,s(function(H){if(H==="option")ae(T,H),l(";");else throw F(H)},"parseMapField_block"),s(function(){_e(T)},"parseMapField_line")),E.add(T)}g(Bt,"ee"),s(Bt,"parseMapField");function Ft(E,k,A){if(!R.test(k=B()))throw F(k,"name");var N=new r(X(k));se(N,s(function(T){T==="option"?(ae(N,T),l(";")):(z(T),ne(N,"optional",void 0,A))},"parseOneOf_block")),E.add(N)}g(Ft,"re"),s(Ft,"parseOneOf");function Ae(E,k){if(!R.test(k=B()))throw F(k,"name");var A=new u(k);se(A,s(function(N){switch(N){case";":break;case"option":ae(A,N),l(";");break;case"reserved":me(A.reserved||(A.reserved=[]),!0),A.reserved===void 0&&(A.reserved=[]);break;default:It(A,N)}},"parseEnum_block")),E.add(A),E===V&&U.push(A)}g(Ae,"K"),s(Ae,"parseEnum");function It(E,k){if(!R.test(k))throw F(k,"name");l("=");var A=le(B(),!0),N={options:void 0};N.getOption=function(T){return this.options[T]},N.setOption=function(T,H){c.prototype.setOption.call(N,T,H)},N.setParsedOption=function(){},se(N,s(function(T){if(T==="option")ae(N,T),l(";");else throw F(T)},"parseEnumValue_block"),s(function(){_e(N)},"parseEnumValue_line")),E.add(k,A,N.comment,N.parsedOptions||N.options)}g(It,"ie"),s(It,"parseEnumValue");function ae(E,k){var A,N,T=!0;for(k==="option"&&(k=B());k!=="=";){if(k==="("){var H=B();l(")"),k="("+H+")"}if(T){if(T=!1,k.includes(".")&&!k.includes("(")){var K=k.split(".");A=K[0]+".",k=K[1];continue}A=k}else N=N?N+=k:k;k=B()}var G=N?A.concat(N):A,ie=Ne(E,G);N=N&&N[0]==="."?N.slice(1):N,A=A&&A[A.length-1]==="."?A.slice(0,-1):A,Lt(E,A,ie,N)}g(ae,"b"),s(ae,"parseOption");function Ne(E,k,A){if(A===void 0&&(A=0),A>t.recursionLimit)throw Error("max depth exceeded");if(l("{",!0)){for(var N={};!l("}",!0);){if(!R.test(re=B()))throw F(re,"name");if(re===null)throw F(re,"end of input");var T,H=re;if(l(":",!0),j()==="{")T=Ne(E,k+"."+re,A+1);else if(j()==="["){T=[];var K;if(l("[",!0)&&!l("]",!0)){do K=je(!0),T.push(K);while(l(",",!0));l("]"),typeof K<"u"&&ke(E,k+"."+re,K)}}else T=je(!0),ke(E,k+"."+re,T);var G=N[H];G&&(T=[].concat(G).concat(T)),H!=="__proto__"&&(N[H]=T),l(",",!0),l(";",!0)}return N}var ie=je(!0);return ke(E,k,ie),ie}g(Ne,"U"),s(Ne,"parseOptionValue");function ke(E,k,A){if(V===E&&/^features\./.test(k)){Z[k]=A;return}E.setOption&&E.setOption(k,A)}g(ke,"B"),s(ke,"setOption");function Lt(E,k,A,N){E.setParsedOption&&E.setParsedOption(k,A,N)}g(Lt,"ae"),s(Lt,"setParsedOption");function _e(E){if(l("[",!0)){do ae(E,"option");while(l(",",!0));l("]")}return E}g(_e,"L"),s(_e,"parseInlineOptions");function Dt(E,k,A){if(A===void 0&&(A=0),A>t.recursionLimit)throw Error("max depth exceeded");if(!R.test(k=B()))throw F(k,"service name");var N=new o(k);se(N,s(function(T){if(!ge(N,T,A)&&T!==";")if(T==="rpc")Ct(N,T);else throw F(T)},"parseService_block")),E.add(N),E===V&&U.push(N)}g(Dt,"te"),s(Dt,"parseService");function Ct(E,k){var A=O(),N=k;if(!R.test(k=B()))throw F(k,"name");var T=k,H,K,G,ie;if(l("("),l("stream",!0)&&(K=!0),!P.test(k=B())||(H=k,l(")"),l("returns"),l("("),l("stream",!0)&&(ie=!0),!P.test(k=B())))throw F(k);G=k,l(")");var Q=new e(T,N,H,G,K,ie);Q.comment=A,se(Q,s(function(Ee){if(Ee!==";")if(Ee==="option")ae(Q,Ee),l(";");else throw F(Ee)},"parseMethod_block")),E.add(Q)}g(Ct,"se"),s(Ct,"parseMethod");function Mt(E,k,A){if(!P.test(k=B()))throw F(k,"reference");var N=k;se(null,s(function(T){switch(T){case"required":case"repeated":ne(E,T,N,A+1);break;case"optional":D==="proto3"?ne(E,"proto3_optional",N,A+1):ne(E,"optional",N,A+1);break;default:if(D==="proto2"||!P.test(T))throw F(T);z(T),ne(E,"optional",N,A+1);break}},"parseExtension_block"))}g(Mt,"ne"),s(Mt,"parseExtension");for(var re;(re=B())!==null;)switch(re){case";":break;case"package":if(!x)throw F(re);St();break;case"import":Tt();break;case"syntax":if(!x)throw F(re);Pt();break;case"edition":if(!x)throw F(re);xt();break;case"option":ae(V,re),l(";",!0);break;default:if(ge(V,re,0)){x=!1;continue}throw F(re)}return Y(),I.filename=null,{package:q,imports:C,weakImports:M,root:W}}return g(I,"parse"),s(I,"parse"),mt}g(mi,"requireParse");var gt,xr;function gi(){if(xr)return gt;xr=1;var w=Object.defineProperty,s=g((p,n)=>w(p,"name",{value:n,configurable:!0}),"t");gt=f;var y=/\/|\./;function f(p,n){y.test(p)||(p="google/protobuf/"+p+".proto",n={nested:{google:{nested:{protobuf:{nested:n}}}}}),f[p]=n}g(f,"common"),s(f,"common"),f("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var v;return f("duration",{Duration:v={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),f("timestamp",{Timestamp:v}),f("empty",{Empty:{fields:{}}}),f("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),f("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),f("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),f.get=s(function(p){return f[p]||null},"get"),gt}g(gi,"requireCommon");var qr;function bi(){if(qr)return Se.exports;qr=1;var w=Se.exports=yi();return w.build="full",w.tokenize=Zr(),w.parse=mi(),w.common=gi(),w.Root._configure(w.Type,w.parse,w.common),Se.exports}g(bi,"requireSrc");var bt,Br;function _i(){return Br||(Br=1,bt=bi()),bt}g(_i,"requireProtobufjs");var Wr=_i();const wi=Fr(Wr),ji=Kr({__proto__:null,default:wi},[Wr]);export{ji as i};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var J=Object.defineProperty;var O=(s,t)=>J(s,"name",{value:t,configurable:!0});import{createRequire as R}from"node:module";import{parseBytes as G,formatBytes as K}from"@visulima/humanizer";import{dirname as k,join as u,resolve as b,relative as L}from"@visulima/path";import{a as U,b as Y}from"./archive-CDfGy5Lm.js";import{O as m}from"./utils-BH2W5Wml.js";import{acEntryPath as A,tmpDirectory as j,taskHashIndexPath as z,V2_ROOT as x}from"./V2_ROOT-injxWBrl.js";import{fetchBlobToFile as Z,containsBlob as Q,putBlobFromFile as tt}from"./containsBlob-DAU8R7GH.js";import{resolveOutputs as et}from"./resolveOutputs-CzGGEbcP.js";const H=R(import.meta.url),N=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,C=O(s=>{if(typeof N<"u"&&N.versions&&N.versions.node){const[t,e]=N.versions.node.split(".").map(Number);if(t>22||t===22&&e>=3||t===20&&e>=16)return N.getBuiltinModule(s)}return H(s)},"__cjs_getBuiltinModule"),{createWriteStream:q}=C("node:fs"),{mkdir:p,writeFile:v,rename:w,rm:f,readFile:g,utimes:W,open:V,stat:S,readdir:_,cp:D}=C("node:fs/promises"),{pipeline:X}=C("node:stream/promises");var at=Object.defineProperty,E=O((s,t)=>at(s,"name",{value:t,configurable:!0}),"s");const rt=E(async(s,t,e)=>{const r=A(s,t),a=j(s),i=`${a}/${m()}`;await p(a,{recursive:!0}),await p(k(r),{recursive:!0});const n=`${JSON.stringify(e,null,2)}
|
|
2
|
+
`;await v(i,n);try{await w(i,r)}catch(c){throw await f(i,{force:!0}).catch(()=>{}),c}},"writeActionEntry"),st=E(async(s,t)=>{const e=A(s,t);try{const r=await g(e,"utf8"),a=JSON.parse(r),i=new Date;return await W(e,i,i).catch(()=>{}),a}catch{return null}},"readActionEntry"),it=E(async(s,t,e)=>{const r=z(s,t),a=j(s),i=`${a}/${m()}`;await p(a,{recursive:!0}),await p(k(r),{recursive:!0}),await v(i,e);try{await w(i,r)}catch(n){throw await f(i,{force:!0}).catch(()=>{}),n}},"writeTaskHashIndex"),ct=E(async(s,t)=>{try{const e=(await g(z(s,t),"utf8")).trim();return e.length>0?e:null}catch{return null}},"readTaskHashIndex");var nt=Object.defineProperty,y=O((s,t)=>nt(s,"name",{value:t,configurable:!0}),"d");const ot=10080*60*1e3,ut=".task-runner-cache",ht=y(s=>{if(s.includes("\0"))throw new Error("cacheNamespace: null bytes are not allowed.");if(s.includes("/")||s.includes("\\"))throw new Error(`cacheNamespace: path separators are not allowed (received ${JSON.stringify(s)}).`);if(s==="."||s==="..")throw new Error(`cacheNamespace: "${s}" would escape the cache subtree.`)},"assertSafeNamespace"),P=y(async s=>{try{await f(s,{force:!0,recursive:!0})}catch{}},"removeEntry"),B=y(async s=>{let t=0;try{const e=await _(s,{withFileTypes:!0});for(const r of e){const a=u(s,r.name);if(r.isDirectory())t+=await B(a);else if(r.isFile()){const i=await S(a);t+=i.size}}}catch{}return t},"getDirectorySize"),lt=y(s=>{const t=G(s.trim());if(Number.isNaN(t))throw new TypeError(`Invalid cache size format: "${s}". Expected format like "500MB" or "1GB".`);return t},"parseCacheSize"),Nt=y(s=>K(s,{decimals:1,space:!1}),"formatCacheSize");class St{static{O(this,"et")}static{y(this,"Cache")}#e;#t;#r;#a;#s=Promise.resolve();constructor(t){this.#e=t.workspaceRoot;const e=t.cacheDirectory??u(t.workspaceRoot,ut);t.cacheNamespace!==void 0&&t.cacheNamespace.length>0&&ht(t.cacheNamespace),this.#t=t.cacheNamespace&&t.cacheNamespace.length>0?u(e,"ns",t.cacheNamespace):e,this.#r=t.maxCacheAge??ot,this.#a=t.maxCacheSize?lt(t.maxCacheSize):void 0}get cacheDirectory(){return this.#t}get casRoot(){return this.#t}async getActionResult(t){return st(this.#t,t.hash)}async resolveActionDigestForTaskHash(t){return ct(this.#t,t)}async putActionResult(t,e,r,a){await this.#i(a),await rt(this.#t,e.hash,r),await it(this.#t,t,e.hash)}async materializeOutputs(t,e){for(const r of t.outputFiles){const a=b(e,r.path),i=L(e,a);if(i.length===0||i.startsWith("..")||!await Z(this.#t,r.digest,a))return!1}return!0}async#i(t){for(const e of t){if(await Q(this.#t,e.digest))continue;const r=u(this.#t,x,"tmp",`.put-${m()}`);await p(k(r),{recursive:!0});const a=await e.open();await X(a,q(r)),await tt(this.#t,e.digest,r),await f(r,{force:!0}).catch(()=>{})}}async get(t){const e=u(this.#t,t);try{await g(u(e,".commit"));const r=await g(u(e,"code"),"utf8"),a=Number.parseInt(r.trim(),10);if(Number.isNaN(a))return;let i="";try{i=await g(u(e,"terminalOutput"),"utf8")}catch{}let n;try{const c=await g(u(e,"fingerprint.json"),"utf8");n=JSON.parse(c)}catch{}return{code:a,fingerprint:n,hash:t,terminalOutput:i}}catch{return}}async put(t,e,r,a,i,n){const c=u(this.#t,t),h=u(this.#t,`.tmp-${t}-${m()}`);try{await p(h,{recursive:!0});const o=[v(u(h,"code"),String(a)),v(u(h,"terminalOutput"),e),this.#o(h,r,n)];i&&o.push(v(u(h,"fingerprint.json"),JSON.stringify(i))),await Promise.all(o),await v(u(h,".commit"),"");const l=`${c}.trash-${m()}`;let d=!1;try{await w(c,l),d=!0}catch{}try{await w(h,c)}catch(F){throw d&&await w(l,c).catch(()=>{}),F}d&&P(l).catch(()=>{})}catch{await P(h)}}async restoreOutputs(t,e,r){const a=u(this.#t,t);return wt(a,this.#e,r)}async getByTaskId(t){const e=u(this.#t,".task-index.json");try{const r=await g(e,"utf8"),a=JSON.parse(r)[t];return a?this.get(a):void 0}catch{return}}async setTaskIndex(t,e){const r=this.#s.then(()=>this.#c(t,e));return this.#s=r.catch(()=>{}),r}async#c(t,e){const r=u(this.#t,".task-index.json"),a=u(this.#t,`.task-index-${m()}.tmp`);await p(this.#t,{recursive:!0}),await this.#n(async()=>{let i={};try{const n=await g(r,"utf8");i=JSON.parse(n)}catch{}i[t]=e,await v(a,JSON.stringify(i));try{await w(a,r)}catch{await v(r,JSON.stringify(i)),await f(a,{force:!0})}})}async#n(t){const e=u(this.#t,".task-index.lock"),r=3e4,a=1e4,i=Date.now();for(;;){let n;try{n=await V(e,"wx")}catch(c){if(c.code!=="EEXIST")throw c;const h=await S(e).catch(()=>{});if(h&&Date.now()-h.mtimeMs>r){await f(e,{force:!0}).catch(()=>{});continue}if(Date.now()-i>a)throw new Error(`Timed out waiting for task-index lock at ${e}`,{cause:c});await new Promise(o=>{setTimeout(o,50)});continue}try{return await t()}finally{await n.close().catch(()=>{}),await f(e,{force:!0}).catch(()=>{})}}}async removeOldEntries(){try{const t=await _(this.#t),e=Date.now(),r=[];for(const a of t){if(a.startsWith(".")||a===x)continue;const i=u(this.#t,a);try{const n=await S(i);if(e-n.mtimeMs>this.#r)await P(i);else{const c=await B(i);r.push({mtimeMs:n.mtimeMs,name:a,path:i,size:c})}}catch{}}if(this.#a!==void 0){const a=r.toSorted((n,c)=>n.mtimeMs-c.mtimeMs);let i=0;for(const n of a)i+=n.size;for(const n of a){if(i<=this.#a)break;await P(n.path),i-=n.size}}}catch{}}async clear(){const t=b(this.#t);if(!(t===b(this.#e)||k(t)===t))try{await f(this.#t,{force:!0,recursive:!0})}catch{}}async#o(t,e,r){await ft(this.#e,t,e,r)}}const I="outputs.tar.br",M="outputs-manifest.json",ft=y(async(s,t,e,r)=>{if(e.length===0)return;const a=await et(s,e,r);if(a.length===0)return;const i=u(t,`.outputs-stage-${m()}`),n=u(t,I);try{await p(i,{recursive:!0});const c=await $(T,a,async o=>{const l=b(s,o),d=u(i,o);try{return await p(k(d),{recursive:!0}),await D(l,d,{preserveTimestamps:!0,recursive:!0}),!0}catch{return!1}}),h=a.filter((o,l)=>c[l]);if(h.length===0)return;await Y(i,n),await v(u(t,M),JSON.stringify(h))}finally{await f(i,{force:!0,recursive:!0}).catch(()=>{})}},"archiveOutputsCompressed"),T=16,$=y(async(s,t,e)=>{const r=Array.from({length:t.length});let a=0;const i=y(async()=>{for(;a<t.length;){const c=a;a+=1,r[c]=await e(t[c],c)}},"worker"),n=Array.from({length:Math.min(s,t.length)},()=>i());return await Promise.all(n),r},"runBounded"),wt=y(async(s,t,e)=>{const r=u(s,I);try{await S(r)}catch{return!0}const a=u(s,`.restore-${m()}`),i=e?.preserveMtime??!0,n=[];try{await p(a,{recursive:!0}),await U(r,a,e);let c;try{c=JSON.parse(await g(u(s,M),"utf8"))}catch{return!1}const h=m();for(const o of[...c].sort()){const l=b(t,o);if(o.length===0||l===b(t))return!1;n.push({absoluteOutput:l,backupCreated:!1,backupPath:`${l}.old-${h}`,entry:o,installed:!1,prePositioned:`${l}.restoring-${h}`})}return await $(T,n,async o=>{const l=u(a,o.entry);await p(k(o.absoluteOutput),{recursive:!0}),await f(o.prePositioned,{force:!0,recursive:!0}).catch(()=>{});try{await w(l,o.prePositioned)}catch(d){if(d.code==="EXDEV")await D(l,o.prePositioned,{preserveTimestamps:i,recursive:!0});else throw d}}),await $(T,n,async o=>{try{await S(o.absoluteOutput)}catch{return}await w(o.absoluteOutput,o.backupPath),o.backupCreated=!0}),await $(T,n,async o=>{await w(o.prePositioned,o.absoluteOutput),o.installed=!0}),await Promise.all(n.filter(o=>o.backupCreated).map(({backupPath:o})=>f(o,{force:!0,recursive:!0}).catch(()=>{}))),!0}catch{for(const c of n)if(c.installed){const h=`${c.absoluteOutput}.failed-${m()}`;await w(c.absoluteOutput,h).catch(()=>{}),c.backupCreated&&await w(c.backupPath,c.absoluteOutput).catch(()=>{}),c.installed=!1,await f(h,{force:!0,recursive:!0}).catch(()=>{})}else c.backupCreated&&await w(c.backupPath,c.absoluteOutput).catch(()=>{});return!1}finally{await f(a,{force:!0,recursive:!0}).catch(()=>{});for(const c of n)await f(c.prePositioned,{force:!0,recursive:!0}).catch(()=>{}),!(c.backupCreated&&!c.installed)&&await f(c.backupPath,{force:!0,recursive:!0}).catch(()=>{})}},"restoreOutputsCompressed");export{St as Cache,ut as DEFAULT_CACHE_DIRECTORY_NAME,Nt as formatCacheSize,lt as parseCacheSize};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r=Object.defineProperty;var n=(o,s)=>r(o,"name",{value:s,configurable:!0});var c=Object.defineProperty,i=n((o,s)=>c(o,"name",{value:s,configurable:!0}),"o");const l=i(o=>{switch(o){case"failure":return"[failure]";case"local-cache":case"local-cache-kept-existing":case"remote-cache":return"[cache]";case"skipped":return"[skipped]";case"success":return"[success]";default:return"[unknown]"}},"getStatusIcon");class d{static{n(this,"r")}static{i(this,"CompositeLifeCycle")}#s;constructor(s){this.#s=s}startCommand(){for(const s of this.#s)s.startCommand?.()}endCommand(){for(const s of this.#s)s.endCommand?.()}scheduleTask(s){for(const t of this.#s)t.scheduleTask?.(s)}startTasks(s){for(const t of this.#s)t.startTasks?.(s)}endTasks(s){for(const t of this.#s)t.endTasks?.(s)}printTaskTerminalOutput(s,t,e){for(const a of this.#s)a.printTaskTerminalOutput?.(s,t,e)}printCacheMiss(s,t){for(const e of this.#s)e.printCacheMiss?.(s,t)}printCacheDisabledByTask(s){for(const t of this.#s)t.printCacheDisabledByTask?.(s)}printEmptyFingerprintWarning(s,t){for(const e of this.#s)e.printEmptyFingerprintWarning?.(s,t)}printSelfModifyingSkip(s,t){for(const e of this.#s)e.printSelfModifyingSkip?.(s,t)}onTaskStdout(s,t){for(const e of this.#s)e.onTaskStdout?.(s,t)}onTaskStderr(s,t){for(const e of this.#s)e.onTaskStderr?.(s,t)}}class u{static{n(this,"l")}static{i(this,"ConsoleLifeCycle")}#s;constructor(s=!1){this.#s=s}startCommand(){this.#s&&console.log("[task-runner] Starting command execution")}endCommand(){this.#s&&console.log("[task-runner] Command execution complete")}scheduleTask(s){this.#s&&console.log(`[task-runner] Scheduled: ${s.id}`)}startTasks(s){for(const t of s)console.log(`> ${t.id}`)}endTasks(s){for(const t of s){const e=t.startTime&&t.endTime?` (${t.endTime-t.startTime}ms)`:"",a=l(t.status);console.log(`${a} ${t.task.id}${e}`)}}printTaskTerminalOutput(s,t,e){e.trim()&&console.log(e)}printCacheMiss(s,t){this.#s&&console.log(`[task-runner] ${s.id}: ${t}`)}}class h{static{n(this,"u")}static{i(this,"EmptyLifeCycle")}}export{d as CompositeLifeCycle,u as ConsoleLifeCycle,h as EmptyLifeCycle};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var z=Object.defineProperty;var F=(r,t)=>z(r,"name",{value:t,configurable:!0});import{createRequire as U}from"node:module";import{resolve as _,join as m}from"@visulima/path";import{loadNativeBindings as j}from"./isNativeAvailable-CkTjxb7P.js";import{withEnhancedPath as R}from"./collectNodeModulesBinDirs-CD-eDrtO.js";import{O as tt}from"./utils-BH2W5Wml.js";import __cjs_mod__ from "node:module"; // -- packem CommonJS require shim --
|
|
2
|
+
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
3
|
+
const V=U(import.meta.url),T=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,S=F(r=>{if(typeof T<"u"&&T.versions&&T.versions.node){const[t,e]=T.versions.node.split(".").map(Number);if(t>22||t===22&&e>=3||t===20&&e>=16)return T.getBuiltinModule(r)}return V(r)},"__cjs_getBuiltinModule"),{execFile:H,execFileSync:Q}=S("node:child_process"),{accessSync:C,constants:D}=S("node:fs"),{mkdir:X,readFile:Y,rm:Z}=S("node:fs/promises"),{createRequire:L}=S("node:module"),{platform:w}=S("node:os"),{dirname:I}=S("node:path"),{fileURLToPath:M}=S("node:url");var et=Object.defineProperty,i=F((r,t)=>et(r,"name",{value:t,configurable:!0}),"c");let A;const N=i(()=>{if(A===void 0)try{Q("strace",["-V"],{stdio:"ignore"}),A=!0}catch{A=!1}return A},"isStraceAvailable");let x;const B=i(()=>{if(x!==void 0)return x.value===""?void 0:x.value;if(w()!=="linux"){x={value:""};return}const r=[];try{const t=I(M(import.meta.url)),e=L(import.meta.url),o=["@visulima/task-runner-binding-linux-x64-gnu","@visulima/task-runner-binding-linux-x64-musl","@visulima/task-runner-binding-linux-arm64-gnu","@visulima/task-runner-binding-linux-arm64-musl"];for(const a of o)try{const n=e.resolve(`${a}/package.json`);r.push(m(I(n),"fspy-seccomp-helper"))}catch{}r.push(m(t,"..","native","fspy_seccomp","target","debug","fspy-seccomp-helper"),m(t,"..","native","fspy_seccomp","target","release","fspy-seccomp-helper"))}catch{}for(const t of r)try{return C(t,D.X_OK),x={value:t},t}catch{}x={value:""}},"resolveSeccompHelperPath");let $;const G=i(()=>$!==void 0?$:w()!=="linux"||!j()?.trackWithSeccomp?($=!1,!1):($=B()!==void 0,$),"isSeccompAvailable");let E;const J=i(()=>{if(E!==void 0)return E.value===""?void 0:E.value;if(w()!=="darwin"){E={value:""};return}const r=[];try{const t=I(M(import.meta.url)),e=L(import.meta.url);for(const o of["@visulima/task-runner-binding-darwin-arm64","@visulima/task-runner-binding-darwin-x64"])try{const a=e.resolve(`${o}/package.json`);r.push(m(I(a),"fspy-macos.dylib"))}catch{}r.push(m(t,"..","native","fspy_macos","target","debug","libfspy_macos.dylib"),m(t,"..","native","fspy_macos","target","release","libfspy_macos.dylib"))}catch{}for(const t of r)try{return C(t,D.R_OK),E={value:t},t}catch{}E={value:""}},"resolveInterposeDylibPath");let O;const st=i(()=>O!==void 0?O:w()!=="darwin"||!j()?.trackWithInterpose?(O=!1,!1):(O=J()!==void 0,O),"isInterposeAvailable");let W;const K=i(()=>{if(W!==void 0)return W.value===""?void 0:W.value;if(w()!=="win32"){W={value:""};return}const r=[];try{const t=I(M(import.meta.url)),e=L(import.meta.url);for(const o of["@visulima/task-runner-binding-win32-x64-msvc","@visulima/task-runner-binding-win32-arm64-msvc"])try{const a=e.resolve(`${o}/package.json`);r.push(m(I(a),"fspy-windows.dll"))}catch{}r.push(m(t,"..","native","fspy_windows","target","debug","fspy_windows.dll"),m(t,"..","native","fspy_windows","target","release","fspy_windows.dll"))}catch{}for(const t of r)try{return C(t,D.R_OK),W={value:t},t}catch{}W={value:""}},"resolveWindowsDllPath");let P;const rt=i(()=>P!==void 0?P:w()!=="win32"||!j()?.trackWithIatHook?(P=!1,!1):(P=K()!==void 0,P),"isIatHookAvailable"),nt=/[\t\n!"#$&'()*;<>?[\\\]`{|}~]/u,ht=i(r=>{const t=r.trim();if(t===""||nt.test(t))return;const e=t.split(/\s+/u);return e.length>0?e:void 0},"parseDirectExec"),at=[{kind:"open",pattern:/openat\(AT_FDCWD,\s*"([^"]+)"/},{kind:"open",pattern:/^(?:\d+\s+)?open\("([^"]+)"/},{kind:"creat",pattern:/(?:^|\s)creat\("([^"]+)"/},{kind:"stat",pattern:/(?:stat|lstat|newfstatat)\((?:AT_FDCWD,\s*)?"([^"]+)"/},{kind:"stat",pattern:/access\("([^"]+)"/},{kind:"getdents",pattern:/getdents(?:64)?\(\d+/}],ot=i(r=>/O_WRONLY|O_RDWR|O_CREAT|O_TRUNC|O_APPEND/.test(r)?"write":"read","parseOpenAccessType"),q=i((r,t)=>{if(!r)return()=>{};const e=i(()=>{try{t.kill("SIGTERM")}catch{}},"kill");return r.aborted?(e(),()=>{}):(r.addEventListener("abort",e,{once:!0}),()=>{r.removeEventListener("abort",e)})},"wireAbort");class ft{static{F(this,"FileAccessTracker")}static{i(this,"FileAccessTracker")}#t;#n;#e=new Set;constructor(t,e){this.#t=_(t),this.#n=e??[/\/proc\//,/\/sys\//,/\/dev\//,/\/tmp\//,/\/etc\//,/\.so(\.\d+)*$/,/node_modules\/.package-lock\.json$/]}isSupported(){return w()==="linux"&&(G()||N())}isInterposeSupported(){return st()}async trackInterpose(t,e={}){return this.#o(t,e)}isIatHookSupported(){return rt()}async trackIatHook(t,e={}){return this.#i(t,e)}async track(t,e={}){return w()!=="linux"?this.#s(t,e):G()?this.#a(t,e):N()?this.#c(t,e):this.#s(t,e)}async#a(t,e){const o=j(),a=B();if(!o?.trackWithSeccomp||!a)return this.#s(t,e);const n=e.cwd??this.#t,h=R({...process.env,...e.env},n),c={};for(const[s,u]of Object.entries(h))typeof u=="string"&&(c[s]=u);const l=["sh","-c",t];let d,v;const k=new Promise(s=>{v=s}),y=i(s=>{d={kill:i(u=>{try{return process.kill(s,u??"SIGTERM")}catch{return!1}},"kill")},this.#e.add(d),v?.(d)},"onStarted"),p=i(()=>{k.then(s=>{s.kill("SIGTERM")}).catch(()=>{})},"abortHandler");if(e.abortSignal?.aborted)return{accesses:[],code:-1,output:""};e.abortSignal?.addEventListener("abort",p,{once:!0});try{const s=await o.trackWithSeccomp(l,a,{cwd:n,env:c},y),u=[];for(const f of s.accesses){const b=f.path.startsWith("/")?f.path:_(n,f.path);this.#r(b)||!b.startsWith(this.#t)||u.push({path:b,type:f.kind})}const g=`${s.stdout.toString("utf8")}${s.stderr.toString("utf8")}`;return{accesses:u,code:s.exitCode,output:g}}catch{return this.#s(t,e)}finally{d&&this.#e.delete(d),e.abortSignal?.removeEventListener("abort",p)}}async#o(t,e){const o=j(),a=J();if(!o?.trackWithInterpose||!a||t.length===0)return this.#s(t.join(" "),e);const n=e.cwd??this.#t,h=R({...process.env,...e.env},n),c={};for(const[p,s]of Object.entries(h))typeof s=="string"&&(c[p]=s);let l,d;const v=new Promise(p=>{d=p}),k=i(p=>{l={kill:i(s=>{try{return process.kill(p,s??"SIGTERM")}catch{return!1}},"kill")},this.#e.add(l),d?.(l)},"onStarted"),y=i(()=>{v.then(p=>{p.kill("SIGTERM")}).catch(()=>{})},"abortHandler");if(e.abortSignal?.aborted)return{accesses:[],code:-1,output:""};e.abortSignal?.addEventListener("abort",y,{once:!0});try{const p=await o.trackWithInterpose(t,a,{cwd:n,env:c},k),s=[];for(const g of p.accesses){const f=g.path.startsWith("/")?g.path:_(n,g.path);this.#r(f)||!f.startsWith(this.#t)||s.push({path:f,type:g.kind})}const u=`${p.stdout.toString("utf8")}${p.stderr.toString("utf8")}`;return{accesses:s,code:p.exitCode,output:u}}catch{return this.#s(t.join(" "),e)}finally{l&&this.#e.delete(l),e.abortSignal?.removeEventListener("abort",y)}}async#i(t,e){const o=j(),a=K();if(!o?.trackWithIatHook||!a||t.length===0)return this.#s(t.join(" "),e);const n=e.cwd??this.#t,h=R({...process.env,...e.env},n),c={};for(const[s,u]of Object.entries(h))typeof u=="string"&&(c[s]=u);let l,d;const v=new Promise(s=>{d=s}),k=i(s=>{l={kill:i(u=>{try{return process.kill(s,u??"SIGTERM")}catch{return!1}},"kill")},this.#e.add(l),d?.(l)},"onStarted"),y=i(()=>{v.then(s=>{s.kill("SIGTERM")}).catch(()=>{})},"abortHandler");if(e.abortSignal?.aborted)return{accesses:[],code:-1,output:""};e.abortSignal?.addEventListener("abort",y,{once:!0});const p=this.#t.toLowerCase();try{const s=await o.trackWithIatHook(t,a,{cwd:n,env:c},k),u=[];for(const f of s.accesses){const b=/^(?:[a-z]:)?[/\\]/iu.test(f.path)?f.path:_(n,f.path);this.#r(b)||!b.toLowerCase().startsWith(p)||u.push({path:b,type:f.kind})}const g=`${s.stdout.toString("utf8")}${s.stderr.toString("utf8")}`;return{accesses:u,code:s.exitCode,output:g}}catch{return this.#s(t.join(" "),e)}finally{l&&this.#e.delete(l),e.abortSignal?.removeEventListener("abort",y)}}async#c(t,e){const o=m(this.#t,"node_modules",".cache","task-runner");await X(o,{recursive:!0});const a=m(o,`strace-${tt()}.log`),n=["-f","-qq","-e","trace=open,openat,creat,stat,lstat,newfstatat,access,getdents,getdents64,unlink,unlinkat,rename,renameat,renameat2","-o",a,"--","sh","-c",t];return new Promise(h=>{const c=H("strace",n,{cwd:e.cwd??this.#t,env:R({...process.env,...e.env},e.cwd??this.#t),maxBuffer:52428800},async(d,v,k)=>{this.#e.delete(c),l();let y=[];try{const p=await Y(a,"utf8");y=this.#l(p,e.cwd??this.#t)}catch{}await Z(a,{force:!0}).catch(()=>{}),h({accesses:y,code:c.exitCode??1,output:v+k})});this.#e.add(c);const l=q(e.abortSignal,c)})}#l(t,e){const o=[],a=new Set;for(const n of t.split(`
|
|
4
|
+
`)){const h=this.#d(n,e);if(!h)continue;const c=`${h.type}:${h.path}`;a.has(c)||(a.add(c),o.push(h))}return o}#d(t,e){const o=t.includes("ENOENT");for(const{kind:n,pattern:h}of at){const c=h.exec(t);if(!c)continue;if(n==="getdents")return;const l=c[1];if(!l)continue;let d=l;if(d.startsWith("/")||(d=_(e,d)),this.#r(d)||!d.startsWith(this.#t))return;if(o)return{path:d,type:"missing"};const v=n==="open"?ot(t):n==="creat"?"write":"stat";return{path:d,type:v}}const a=/(?:^|\s)(?:unlink|unlinkat|rename|renameat|renameat2)\((?:AT_FDCWD,\s*)?"([^"]+)"/.exec(t);if(a?.[1]){let n=a[1];return n.startsWith("/")||(n=_(e,n)),this.#r(n)||!n.startsWith(this.#t)?void 0:{path:n,type:"write"}}}#r(t){return this.#n.some(e=>e.test(t))}killAll(){for(const t of this.#e)try{t.kill("SIGTERM")}catch{}this.#e.clear()}async#s(t,e){return new Promise(o=>{const a=H("sh",["-c",t],{cwd:e.cwd??this.#t,env:R({...process.env,...e.env},e.cwd??this.#t),maxBuffer:52428800},(h,c,l)=>{this.#e.delete(a),n(),o({accesses:[],code:a.exitCode??1,output:c+l})});this.#e.add(a);const n=q(e.abortSignal,a)})}}const mt=i(r=>String.raw`
|
|
5
|
+
import fs from "node:fs";
|
|
6
|
+
import fsp from "node:fs/promises";
|
|
7
|
+
|
|
8
|
+
// Loaded as ESM (--import + .mjs). Patching the default-imported fs / fsp
|
|
9
|
+
// namespaces mutates the same singletons a require("node:fs") task consumes,
|
|
10
|
+
// so the child's reads/writes are intercepted. (CJS callers; ESM named-import
|
|
11
|
+
// callers bind the function early, so they're out of scope for this approach.)
|
|
12
|
+
const logStream = fs.createWriteStream(${JSON.stringify(r)}, { flags: "a" });
|
|
13
|
+
const log = (type, path) => { logStream.write(JSON.stringify({ type, path }) + "\n"); };
|
|
14
|
+
|
|
15
|
+
// Patch each fs method: save original, replace with logged wrapper
|
|
16
|
+
const patch = (obj, method, type) => {
|
|
17
|
+
const orig = obj[method];
|
|
18
|
+
obj[method] = function(...args) {
|
|
19
|
+
log(type, args[0]?.toString());
|
|
20
|
+
return orig.apply(this, args);
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// Reads / stats / directory listing
|
|
25
|
+
patch(fs, "readFileSync", "read");
|
|
26
|
+
patch(fs, "statSync", "stat");
|
|
27
|
+
patch(fs, "readdirSync", "readdir");
|
|
28
|
+
patch(fs, "readFile", "read");
|
|
29
|
+
patch(fs, "stat", "stat");
|
|
30
|
+
patch(fs, "readdir", "readdir");
|
|
31
|
+
patch(fsp, "readFile", "read");
|
|
32
|
+
patch(fsp, "stat", "stat");
|
|
33
|
+
patch(fsp, "readdir", "readdir");
|
|
34
|
+
|
|
35
|
+
// Writes and path-mutating ops — needed for self-modifying task detection
|
|
36
|
+
patch(fs, "writeFileSync", "write");
|
|
37
|
+
patch(fs, "appendFileSync", "write");
|
|
38
|
+
patch(fs, "unlinkSync", "write");
|
|
39
|
+
patch(fs, "renameSync", "write");
|
|
40
|
+
patch(fs, "writeFile", "write");
|
|
41
|
+
patch(fs, "appendFile", "write");
|
|
42
|
+
patch(fs, "unlink", "write");
|
|
43
|
+
patch(fs, "rename", "write");
|
|
44
|
+
patch(fsp, "writeFile", "write");
|
|
45
|
+
patch(fsp, "appendFile", "write");
|
|
46
|
+
patch(fsp, "unlink", "write");
|
|
47
|
+
patch(fsp, "rename", "write");
|
|
48
|
+
|
|
49
|
+
process.on("beforeExit", () => { logStream.end(); });
|
|
50
|
+
`,"generatePreloadScript");export{ft as FileAccessTracker,mt as generatePreloadScript,ht as parseDirectExec};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var N=Object.defineProperty;var y=(l,e)=>N(l,"name",{value:e,configurable:!0});import{createRequire as J}from"node:module";import{resolve as v,relative as T}from"@visulima/path";import{b,h as $,T as S}from"./utils-BH2W5Wml.js";const P=J(import.meta.url),p=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,M=y(l=>{if(typeof p<"u"&&p.versions&&p.versions.node){const[e,t]=p.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return p.getBuiltinModule(l)}return P(l)},"__cjs_getBuiltinModule"),{readdir:H,stat:C}=M("node:fs/promises");var q=Object.defineProperty,R=y((l,e)=>q(l,"name",{value:e,configurable:!0}),"k");class j{static{y(this,"FingerprintManager")}static{R(this,"FingerprintManager")}#e;#t=new Map;constructor(e){this.#e=v(e)}async createFingerprint(e,t,r,i,u=[],f=[]){const h={},g=new Set,s={},a=new Set,d=new Set;for(const o of e){const c=T(this.#e,o.path);switch(o.type){case"missing":{g.add(c);break}case"read":case"stat":{if(a.add(c),!h[c]){const m=await this.#r(o.path);m&&(h[c]=m)}break}case"readdir":{if(!s[c])try{const m=await H(o.path);s[c]=m.toSorted()}catch{s[c]=[]}break}case"write":{d.add(c);break}}}const n=[];for(const o of d)a.has(o)&&n.push(o);n.sort();const k=b(`${t}:${JSON.stringify($(r))}`),w={},O=j.#s(u,i),_=new Set(f);for(const[o,c]of Object.entries(O))_.has(o)||(w[o]=b(`${o}=${c??""}`));const F=[...g].toSorted();return{commandHash:k,directoryListings:s,envHashes:w,fileHashes:h,missingFiles:F,...n.length>0?{modifiedInputs:n}:{}}}async validate(e){const t=[],r=Object.entries(e.fileHashes).map(async([s,a])=>{const d=v(this.#e,s),n=await S(d);if(!n)return{detail:s,previousHash:a,type:"file-deleted"};if(n!==a)return{currentHash:n,detail:s,previousHash:a,type:"file-changed"}}),i=e.missingFiles.map(async s=>{const a=v(this.#e,s);try{return await C(a),{detail:s,type:"file-created"}}catch{return}}),u=Object.entries(e.directoryListings).map(async([s,a])=>{const d=v(this.#e,s);try{const n=(await H(d)).toSorted();if(JSON.stringify(a)!==JSON.stringify(n))return{currentHash:JSON.stringify(n),detail:s,previousHash:JSON.stringify(a),type:"directory-changed"}}catch{return{detail:s,type:"directory-changed"}}}),[f,h,g]=await Promise.all([Promise.all(r),Promise.all(i),Promise.all(u)]);for(const s of[...f,...h,...g])s&&t.push(s);for(const[s,a]of Object.entries(e.envHashes)){const d=b(`${s}=${process.env[s]??""}`);d!==a&&t.push({currentHash:d,detail:s,previousHash:a,type:"env-changed"})}return t.length>0?t:void 0}validateCommand(e,t,r){const i=b(`${t}:${JSON.stringify($(r))}`);if(i!==e.commandHash)return{currentHash:i,detail:"command arguments",previousHash:e.commandHash,type:"args-changed"}}formatMissReasons(e){const t=["Cache miss reasons:"];for(const r of e)switch(r.type){case"args-changed":{t.push(" - Command arguments changed");break}case"directory-changed":{t.push(` - Directory contents changed: ${r.detail}`);break}case"env-changed":{t.push(` - Environment variable changed: ${r.detail}`);break}case"file-changed":{t.push(` - File modified: ${r.detail}`);break}case"file-created":{t.push(` - File created (was missing): ${r.detail}`);break}case"file-deleted":{t.push(` - File deleted: ${r.detail}`);break}case"no-fingerprint":{t.push(" - No previous fingerprint found (first run)");break}}return t.join(`
|
|
2
|
+
`)}static#s(e,t){const r={};for(const i of e)if(i.includes("*")){const u=i.replace("*","");for(const[f,h]of Object.entries(t))f.startsWith(u)&&(r[f]=h)}else r[i]=t[i];return r}async#r(e){const t=this.#t.get(e);if(t!==void 0)return t;const r=await S(e)??void 0;return this.#t.set(e,r),r}}export{j as FingerprintManager};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var C=Object.defineProperty;var g=(o,t)=>C(o,"name",{value:t,configurable:!0});import{createRequire as P}from"node:module";import{join as d}from"@visulima/path";import{fetchBlobToFile as k,putBlobFromFile as q}from"./containsBlob-DAU8R7GH.js";import{O as E}from"./utils-BH2W5Wml.js";const R=P(import.meta.url),f=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,m=g(o=>{if(typeof f<"u"&&f.versions&&f.versions.node){const[t,e]=f.versions.node.split(".").map(Number);if(t>22||t===22&&e>=3||t===20&&e>=16)return f.getBuiltinModule(o)}return R(o)},"__cjs_getBuiltinModule"),{createHmac:j,timingSafeEqual:B,createHash:F}=m("node:crypto"),{createWriteStream:v,createReadStream:y}=m("node:fs"),{mkdir:b,stat:$,rm:T}=m("node:fs/promises"),{tmpdir:H}=m("node:os"),{pipeline:A}=m("node:stream/promises");var z=Object.defineProperty,p=g((o,t)=>z(o,"name",{value:t,configurable:!0}),"d");const w="X-Artifact-Signature",_="X-Artifact-Attestation",S=16,I="vis-entry.tar.gz",M=p(async o=>{const t=F("sha256");let e=0;for await(const s of y(o)){const r=s;t.update(r),e+=r.byteLength}return{hash:t.digest("hex"),sizeBytes:e}},"digestFile"),x=p(async(o,t,e)=>{const s=j("sha256",o);s.update(t);const r=y(e);for await(const i of r)s.update(i);return s.digest("hex")},"computeArtifactSignatureStream"),N=p((o,t)=>{if(o.length!==t.length)return!1;try{return B(Buffer.from(o,"hex"),Buffer.from(t,"hex"))}catch{return!1}},"signaturesMatch");class X{static{g(this,"_")}static{p(this,"HttpRemoteCache")}#f;#a;#n;#r;#o;#d;#i;#m;#t;#h;#s;#g;#e;#c=new Map;constructor(t){this.#f=t.url.replace(/\/$/,""),this.#a=t.token,this.#n=t.teamId,this.#r=t.timeout??3e4;const e=t.mode??"readwrite";if(this.#o=e==="read"||e==="readwrite",this.#d=e==="write"||e==="readwrite",this.#i=t.onUploadError,this.#m=t.compression??"gzip",this.#e=t.localCasRoot,t.signing){if(t.signing.secret.length<S)throw new Error(`Remote cache signing secret must be at least ${String(S)} characters.`);this.#t=t.signing.secret,this.#h=t.signing.verifyOnDownload??!1}else this.#t=void 0,this.#h=!1;this.#s=t.attestation,this.#g=t.attestation?.requireOnDownload??!1}async close(){}async containsAction(t){if(!this.#o)return!1;try{const e=this.#u(`/v8/artifacts/${t.hash}`);return(await this.#p(e,{headers:this.#l(),method:"HEAD"})).ok}catch{return!1}}async fetchBlob(t,e){return this.#e?k(this.#e,t,e):!1}async retrieveAction(t){if(!this.#o||!this.#e)return null;const e=d(this.#e,"v2","tmp"),s=d(e,`.remote-${t.hash}-${E()}`);try{await b(e,{recursive:!0});const r=this.#u(`/v8/artifacts/${t.hash}`),i=await this.#p(r,{headers:this.#l(),method:"GET"});if(i.status===404)return null;if(!i.ok||!i.body)return this.#i?.(t.hash,new Error(`remote cache GET ${t.hash} returned HTTP ${i.status}`)),null;const h=this.#t?i.headers.get(w.toLowerCase())??i.headers.get(w):null;if(this.#t&&!h&&this.#h)return null;await A(i.body,v(s));const c=i.headers.get("content-length");if(c!==null){const n=Number.parseInt(c,10),{size:u}=await $(s);if(Number.isFinite(n)&&u!==n)return this.#i?.(t.hash,new Error(`remote cache GET ${t.hash} truncated: declared ${n} bytes, received ${u}`)),null}if(this.#t&&h){const n=await x(this.#t,t.hash,s);if(!N(h,n))return null}if(this.#s?.verifyArtifact){const n=i.headers.get(_);if(n){if(!await this.#s.verifyArtifact({archivePath:s,attestation:n,hash:t.hash}))return this.#s.onReject?.(t.hash,"invalid"),null}else if(this.#g)return this.#s.onReject?.(t.hash,"missing"),null}const a=await M(s);return await q(this.#e,a,s),{exitCode:0,outputDirectories:[],outputFiles:[{digest:a,isExecutable:!1,path:I}]}}catch{return null}finally{await T(s,{force:!0}).catch(()=>{})}}async storeAction(t,e,s){if(!this.#d||e.outputFiles.length!==1||s.length===0)return!1;const r=e.outputFiles[0];if(!r)return!1;const i=s.find(a=>a.digest.hash===r.digest.hash);if(!i)return!1;const h=this.#c.get(t.hash);if(h)return h;const c=this.#w(t,i).finally(()=>{this.#c.delete(t.hash)});return this.#c.set(t.hash,c),c}async#w(t,e){const s=this.#e?d(this.#e,"v2","tmp"):d(H(),"visulima-task-runner-uploads"),r=d(s,`.upload-${t.hash}-${E()}`);try{await b(s,{recursive:!0});const i=await e.open();await A(i,v(r));const h=this.#u(`/v8/artifacts/${t.hash}`),{size:c}=await $(r),a={...this.#l(),"Content-Length":String(c),"Content-Type":"application/octet-stream","X-Artifact-Compression":this.#m};if(this.#t&&(a[w]=await x(this.#t,t.hash,r)),this.#s?.signArtifact){const u=await this.#s.signArtifact({archivePath:r,hash:t.hash});u!==null&&(a[_]=u)}const n=await fetch(h,{body:y(r),duplex:"half",headers:a,method:"PUT",signal:AbortSignal.timeout(this.#r)});return n.ok?!0:(this.#i?.(t.hash,new Error(`remote cache PUT ${t.hash} returned HTTP ${n.status}`)),!1)}catch(i){return this.#i?.(t.hash,i),!1}finally{await T(r,{force:!0}).catch(()=>{})}}async#p(t,e){const s=new Set([429,502,503,504]),r=4,i=250;let h;for(let c=0;c<r;c+=1)try{const a=await fetch(t,{...e,signal:AbortSignal.timeout(this.#r)});if(!s.has(a.status)||c===r-1)return a;const n=a.headers.get("retry-after");let u=i*2**c;if(n!==null){const l=Number.parseInt(n,10);Number.isFinite(l)&&l>0&&(u=Math.min(l*1e3,this.#r))}await new Promise(l=>{setTimeout(l,u)})}catch(a){if(h=a,a?.name==="TimeoutError"||c===r-1)throw a;await new Promise(n=>{setTimeout(n,i*2**c)})}throw h instanceof Error?h:new Error("remote cache request exhausted retries",h===void 0?void 0:{cause:h})}#u(t){const e=`${this.#f}${t}`;return this.#n?`${e}?teamId=${encodeURIComponent(this.#n)}`:e}#l(){const t={};return this.#a&&(t.Authorization=`Bearer ${this.#a}`),t}}export{X as HttpRemoteCache};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var d=Object.defineProperty;var p=(e,t)=>d(e,"name",{value:t,configurable:!0});var h=Object.defineProperty,u=p((e,t)=>h(e,"name",{value:t,configurable:!0}),"o");const f=["file","glob","env","func","dep"],l=/^([a-z][a-z0-9+.-]*):\/\//i;class r extends Error{static{p(this,"InvalidInputUriError")}static{u(this,"InvalidInputUriError")}constructor(t){super(t),this.name="InvalidInputUriError"}}const w=u(e=>{const t=e.startsWith("!"),c=t?e.slice(1):e,o=l.exec(c);if(!o)return;const s=o[1].toLowerCase(),n=c.slice(o[0].length);switch(s){case"dep":{if(t)throw new r(`Negation is not supported for dep:// inputs (got "${e}").`);if(n.length===0)throw new r(`dep:// input requires at least one dependency name (got "${e}").`);const i=n.split(",").map(a=>a.trim());if(i.some(a=>a.length===0))throw new r(`dep:// input contains an empty dependency segment (got "${e}"). Remove trailing or repeated commas.`);return{externalDependencies:i}}case"env":{if(t)throw new r(`Negation is not supported for env:// inputs (got "${e}"). Drop env vars from the named-input set instead.`);if(n.length===0)throw new r(`env:// input requires a variable name (got "${e}").`);return{env:n}}case"file":case"glob":{if(n.length===0)throw new r(`${s}:// input requires a path or pattern (got "${e}").`);return{fileset:t?`!${n}`:n}}case"func":{if(t)throw new r(`Negation is not supported for func:// inputs (got "${e}").`);if(n.length===0)throw new r(`func:// input requires a command (got "${e}").`);return{runtime:n}}default:throw new r(`Unknown input URI scheme "${s}://" in "${e}". Recognized schemes: ${f.map(i=>`${i}://`).join(", ")}.`)}},"parseInputUri"),m=u(e=>{const t=e.startsWith("!")?e.slice(1):e;return l.test(t)},"looksLikeInputUri");export{f as INPUT_URI_SCHEMES,r as InvalidInputUriError,m as looksLikeInputUri,w as parseInputUri};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var d=Object.defineProperty;var h=(r,e)=>d(r,"name",{value:e,configurable:!0});import{createRequire as p}from"node:module";import{O as M,d as b,X as k}from"./utils-BH2W5Wml.js";import{join as P,dirname as S,relative as F}from"@visulima/path";const w=p(import.meta.url),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,g=h(r=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[e,s]=c.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return c.getBuiltinModule(r)}return w(r)},"__cjs_getBuiltinModule"),{readFile:m,mkdir:v,writeFile:y,rename:_,rm:j,stat:z}=g("node:fs/promises");var O=Object.defineProperty,R=h((r,e)=>O(r,"name",{value:e,configurable:!0}),"h");const q=new Set([".cache",".git",".task-runner",".task-runner-cache",".vis","coverage","dist","node_modules"]);class D{static{h(this,"z")}static{R(this,"IncrementalFileHasher")}#t;#i;#s;#e=new Map;#r=!1;constructor(e){this.#t=e.workspaceRoot,this.#i=e.ignoredDirs??q,this.#s=e.snapshotPath??P(e.workspaceRoot,"node_modules",".cache","task-runner","file-snapshot.json")}async load(){if(!this.#r&&(this.#r=!0,!!this.#s))try{const e=await m(this.#s,"utf8"),s=JSON.parse(e);for(const[i,t]of Object.entries(s))this.#e.set(i,t)}catch{}}async save(){if(!this.#s)return;const e=S(this.#s);await v(e,{recursive:!0});const s={};for(const[t,a]of this.#e)s[t]=a;const i=`${this.#s}.tmp-${M()}`;try{await y(i,JSON.stringify(s)),await _(i,this.#s)}catch(t){throw await j(i,{force:!0}).catch(()=>{}),t}}async hashDirectory(e){await this.load();const s={},i=await b(e,this.#i),t=64,a=[];for(let o=0;o<i.length;o+=t)a.push(i.slice(o,o+t));for(const o of a){const u=await Promise.all(o.map(async n=>{const l=await this.#a(n),f=F(this.#t,n);return{hash:l,relativePath:f}}));for(const{hash:n,relativePath:l}of u)n&&(s[l]=n)}return s}async#a(e){try{const s=await z(e);if(!s.isFile())return;const i=this.#e.get(e);if(i?.mtimeMs===s.mtimeMs&&i.size===s.size)return i.hash;const t=await m(e),a=k(t);return this.#e.set(e,{hash:a,mtimeMs:s.mtimeMs,size:s.size}),a}catch{this.#e.delete(e);return}}get snapshotSize(){return this.#e.size}clear(){this.#e.clear()}getSnapshotHash(e,s,i){const t=this.#e.get(e);if(t)return t.mtimeMs===s&&t.size===i?t.hash:void 0}recordSnapshot(e,s,i,t){this.#e.set(e,{hash:s,mtimeMs:i,size:t})}}export{D as IncrementalFileHasher};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var u=Object.defineProperty;var c=(t,s)=>u(t,"name",{value:s,configurable:!0});var p=Object.defineProperty,i=c((t,s)=>p(t,"name",{value:s,configurable:!0}),"i");const l=i((t,s)=>{const{length:o}=t,r=t.codePointAt(s);let e=s+1;if(r===27&&t[e]==="]"){for(e+=1;e<o;){const n=t.codePointAt(e);if(n===7||n===156)return e+1;if(n===27&&t[e+1]==="\\")return e+2;e+=1}return o}if(r===155||t[e]==="["){for(r===27&&(e+=1);e<o;){const n=t.codePointAt(e);if(e+=1,n!==void 0&&n>=64&&n<=126)break}return e}return Math.min(e+1,o)},"skipEscapeSequence"),d=i(t=>{const{length:s}=t;let o="",r=0,e=0;for(;e<s;){const n=t.codePointAt(e);if(n!==27&&n!==155){e+=1;continue}o+=t.slice(r,e),e=l(t,e),r=e}return r===0?t:o+t.slice(r)},"stripAnsi"),f=i(()=>process.env.NO_COLOR!==void 0&&process.env.NO_COLOR!==""?!1:process.env.FORCE_COLOR!==void 0&&process.env.FORCE_COLOR!==""&&process.env.FORCE_COLOR!=="0"?!0:process.env.TERM==="dumb"?!1:process.stdout.isTTY??!1,"detectColorSupport"),h=i(t=>`${t.target.project}#${t.target.target}`,"formatTaskLabel"),O=i((t,s)=>{const o=t.endsWith(`
|
|
2
|
+
`)?`
|
|
3
|
+
`:"",r=o?t.slice(0,-1):t;return r.length===0?o:`${r.split(`
|
|
4
|
+
`).map(e=>`[${s}] ${e}`).join(`
|
|
5
|
+
`)}${o}`},"prefixLines");class v{static{c(this,"LogReporter")}static{i(this,"LogReporter")}#t;#e;#r;constructor(s,o=e=>process.stdout.write(e),r="auto"){this.#t=s,this.#e=o,this.#r=r==="never"||r==="auto"&&!f()}printTaskTerminalOutput(s,o,r){if(r.length===0)return;const e=this.#r?d(r):r;if(this.#t==="interleaved"){this.#e(e.endsWith(`
|
|
6
|
+
`)?e:`${e}
|
|
7
|
+
`);return}const n=h(s);if(this.#t==="labeled"){this.#e(O(e.endsWith(`
|
|
8
|
+
`)?e:`${e}
|
|
9
|
+
`,n));return}const a=e.endsWith(`
|
|
10
|
+
`)?e:`${e}
|
|
11
|
+
`;this.#e(`── ${n} ──
|
|
12
|
+
${a}
|
|
13
|
+
`)}endTasks(s){}}const R=i((t,s,o)=>new v(t,s,o),"createLogReporter");export{v as LogReporter,R as createLogReporter};
|