{"version":3,"sources":["webpack://git/webpack/universalModuleDefinition","webpack://git/webpack/bootstrap","webpack://git/./src/models/GitError.js","webpack://git/./src/models/FileSystem.js","webpack://git/./src/utils/normalizePath.js","webpack://git/./src/utils/join.js","webpack://git/./src/utils/plugins.js","webpack://git/./src/models/GitPackedRefs.js","webpack://git/./src/utils/compareRefNames.js","webpack://git/./src/managers/GitRefManager.js","webpack://git/./node_modules/marky/lib/marky.browser.es.js","webpack://git/./src/storage/readObject.js","webpack://git/./src/models/GitCommit.js","webpack://git/./src/models/GitPktLine.js","webpack://git/./src/utils/log.js","webpack://git/./node_modules/node-libs-browser/node_modules/buffer/index.js","webpack://git/./src/utils/shasum.js","webpack://git/./src/utils/normalizeNewlines.js","webpack://git/./src/models/GitAnnotatedTag.js","webpack://git/./src/models/GitTree.js","webpack://git/./node_modules/pify/index.js","webpack://git/./src/managers/GitIndexManager.js","webpack://git/./node_modules/pako/index.js","webpack://git/./src/utils/BufferCursor.js","webpack://git/./src/models/GitObject.js","webpack://git/./src/utils/dirname.js","webpack://git/./src/managers/GitConfigManager.js","webpack://git/./node_modules/pako/lib/utils/common.js","webpack://git/./src/utils/pkg.js","webpack://git/./src/utils/forAwait.js","webpack://git/./src/storage/writeObject.js","webpack://git/./src/utils/normalizeMode.js","webpack://git/./src/utils/normalizeStats.js","webpack://git/./node_modules/sha.js/sha1.js","webpack://git/./src/utils/padHex.js","webpack://git/./src/utils/basename.js","webpack://git/./src/utils/parseAuthor.js","webpack://git/./src/utils/indent.js","webpack://git/./src/utils/collect.js","webpack://git/./node_modules/clean-git-ref/lib/index.js","webpack://git/./src/utils/comparePath.js","webpack://git/./src/models/GitPackIndex.js","webpack://git/./src/utils/symbols.js","webpack://git/./src/utils/compareStrings.js","webpack://git/./src/utils/extractAuthFromUrl.js","webpack://git/./src/managers/GitRemoteHTTP.js","webpack://git/./node_modules/async-lock/index.js","webpack://git/./src/utils/formatAuthor.js","webpack://git/./src/utils/calculateBasicAuthUsernamePasswordPair.js","webpack://git/./src/utils/calculateBasicAuthHeader.js","webpack://git/./src/utils/FIFO.js","webpack://git/./node_modules/process/browser.js","webpack://git/./src/managers/GitIgnoreManager.js","webpack://git/./src/utils/oauth2.js","webpack://git/./src/models/GitSideBand.js","webpack://git/./src/models/GitRefSpec.js","webpack://git/./src/storage/readPackIndex.js","webpack://git/./src/utils/StreamReader.js","webpack://git/./src/utils/getIterator.js","webpack://git/./src/utils/AsyncIterator.js","webpack://git/./src/utils/http-browser.js","webpack://git/./src/managers/GitShallowManager.js","webpack://git/./node_modules/base64-js/lib/b64.js","webpack://git/./node_modules/pako/lib/zlib/messages.js","webpack://git/./src/utils/sleep.js","webpack://git/./src/models/GitIndex.js","webpack://git/./src/models/GitConfig.js","webpack://git/./src/models/GitRefSpecSet.js","webpack://git/./src/utils/resolveTree.js","webpack://git/./src/managers/GitRemoteManager.js","webpack://git/./src/wire/parseRefsAdResponse.js","webpack://git/./src/utils/flatFileListToDirectoryStructure.js","webpack://git/./src/commands/pack.js","webpack://git/./src/models/SignedGitCommit.js","webpack://git/./node_modules/path-browserify/index.js","webpack://git/(webpack)/buildin/global.js","webpack://git/./node_modules/safe-buffer/index.js","webpack://git/./node_modules/pako/lib/zlib/adler32.js","webpack://git/./node_modules/pako/lib/zlib/crc32.js","webpack://git/./node_modules/pako/lib/utils/strings.js","webpack://git/./node_modules/pako/lib/zlib/zstream.js","webpack://git/./node_modules/pako/lib/zlib/constants.js","webpack://git/./node_modules/bops/typedarray/mapped.js","webpack://git/./src/wire/writeUploadPackRequest.js","webpack://git/./src/wire/parseUploadPackResponse.js","webpack://git/./src/commands/listCommitsAndTags.js","webpack://git/./src/commands/listObjects.js","webpack://git/./src/wire/writeReceivePackRequest.js","webpack://git/./src/wire/parseReceivePackResponse.js","webpack://git/./src/utils/auth.js","webpack://git/./node_modules/ignore/index.js","webpack://git/./src/storage/writeObjectLoose.js","webpack://git/./src/storage/readObjectLoose.js","webpack://git/./src/storage/readObjectPacked.js","webpack://git/./node_modules/crc-32/crc32.js","webpack://git/./node_modules/git-apply-delta/index.js","webpack://git/./src/utils/git-list-pack.js","webpack://git/./src/utils/outdent.js","webpack://git/./src/commands/types.js","webpack://git/./node_modules/globrex/index.js","webpack://git/./node_modules/ieee754/index.js","webpack://git/./node_modules/isarray/index.js","webpack://git/./node_modules/async-lock/lib/index.js","webpack://git/./node_modules/inherits/inherits_browser.js","webpack://git/./node_modules/sha.js/hash.js","webpack://git/./node_modules/pako/lib/deflate.js","webpack://git/./node_modules/pako/lib/zlib/deflate.js","webpack://git/./node_modules/pako/lib/zlib/trees.js","webpack://git/./node_modules/pako/lib/inflate.js","webpack://git/./node_modules/pako/lib/zlib/inflate.js","webpack://git/./node_modules/pako/lib/zlib/inffast.js","webpack://git/./node_modules/pako/lib/zlib/inftrees.js","webpack://git/./node_modules/pako/lib/zlib/gzheader.js","webpack://git/./node_modules/bops/index.js","webpack://git/./node_modules/bops/typedarray/from.js","webpack://git/./node_modules/bops/typedarray/to.js","webpack://git/./node_modules/to-utf8/index.js","webpack://git/./node_modules/bops/typedarray/is.js","webpack://git/./node_modules/bops/typedarray/subarray.js","webpack://git/./node_modules/bops/typedarray/join.js","webpack://git/./node_modules/bops/typedarray/copy.js","webpack://git/./node_modules/bops/typedarray/create.js","webpack://git/./node_modules/bops/typedarray/read.js","webpack://git/./node_modules/bops/typedarray/write.js","webpack://git/./node_modules/varint/decode.js","webpack://git/./src/commands/writeObject.js","webpack://git/./node_modules/globalyzer/src/index.js","webpack://git/./node_modules/os-browserify/browser.js","webpack://git/./src/commands/add.js","webpack://git/./src/commands/addRemote.js","webpack://git/./src/commands/config.js","webpack://git/./src/utils/normalizeAuthorObject.js","webpack://git/./src/commands/annotatedTag.js","webpack://git/./src/commands/branch.js","webpack://git/./src/utils/patternRoot.js","webpack://git/./src/utils/worthWalking.js","webpack://git/./src/models/GitWalkerRepo.js","webpack://git/./src/commands/TREE.js","webpack://git/./src/utils/compareStats.js","webpack://git/./src/models/GitWalkerFs.js","webpack://git/./src/commands/WORKDIR.js","webpack://git/./src/models/RunningMinimum.js","webpack://git/./src/utils/unionOfIterators.js","webpack://git/./src/commands/walkBeta1.js","webpack://git/./src/utils/arrayRange.js","webpack://git/./src/commands/checkout.js","webpack://git/./src/storage/hasObjectLoose.js","webpack://git/./src/storage/hasObjectPacked.js","webpack://git/./src/storage/hasObject.js","webpack://git/./src/utils/filterCapabilities.js","webpack://git/./src/utils/splitLines.js","webpack://git/./src/commands/fetch.js","webpack://git/./src/utils/emptyPackfile.js","webpack://git/./src/commands/init.js","webpack://git/./src/commands/clone.js","webpack://git/./src/commands/commit.js","webpack://git/./src/commands/currentBranch.js","webpack://git/./src/commands/deleteBranch.js","webpack://git/./src/commands/deleteRef.js","webpack://git/./src/commands/deleteRemote.js","webpack://git/./src/commands/deleteTag.js","webpack://git/./src/storage/expandOidLoose.js","webpack://git/./src/storage/expandOidPacked.js","webpack://git/./src/storage/expandOid.js","webpack://git/./src/commands/expandOid.js","webpack://git/./src/commands/expandRef.js","webpack://git/./src/commands/findMergeBase.js","webpack://git/./src/commands/findRoot.js","webpack://git/./src/commands/getRemoteInfo.js","webpack://git/./src/commands/indexPack.js","webpack://git/./src/commands/isDescendent.js","webpack://git/./src/commands/listBranches.js","webpack://git/./src/commands/readObject.js","webpack://git/./src/commands/listFiles.js","webpack://git/./src/commands/listRemotes.js","webpack://git/./src/commands/listTags.js","webpack://git/./src/utils/compareAge.js","webpack://git/./src/utils/logCommit.js","webpack://git/./src/commands/log.js","webpack://git/./src/commands/merge.js","webpack://git/./src/commands/packObjects.js","webpack://git/./src/commands/pull.js","webpack://git/./src/commands/push.js","webpack://git/./src/commands/remove.js","webpack://git/./src/utils/hashObject.js","webpack://git/./src/commands/resetIndex.js","webpack://git/./src/commands/resolveRef.js","webpack://git/./src/commands/sign.js","webpack://git/./src/commands/status.js","webpack://git/./src/models/GitWalkerIndex.js","webpack://git/./src/commands/STAGE.js","webpack://git/./src/commands/statusMatrix.js","webpack://git/./src/commands/tag.js","webpack://git/./src/commands/verify.js","webpack://git/./src/commands/version.js","webpack://git/./src/commands/writeRef.js","webpack://git/./src/index.js"],"names":["root","factory","exports","module","define","amd","self","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__webpack_exports__","E","GitError","messages","FileReadError","MissingRequiredParameterError","InvalidRefNameError","InvalidParameterCombinationError","RefExistsError","RefNotExistsError","BranchDeleteError","NoHeadCommitError","CommitNotFetchedError","ObjectTypeUnknownFail","ObjectTypeAssertionFail","ObjectTypeAssertionInTreeFail","ObjectTypeAssertionInRefFail","ObjectTypeAssertionInPathFail","MissingAuthorError","MissingCommitterError","MissingTaggerError","GitRootNotFoundError","UnparseableServerResponseFail","InvalidDepthParameterError","RemoteDoesNotSupportShallowFail","RemoteDoesNotSupportDeepenSinceFail","RemoteDoesNotSupportDeepenNotFail","RemoteDoesNotSupportDeepenRelativeFail","RemoteDoesNotSupportSmartHTTP","CorruptShallowOidFail","FastForwardFail","MergeNotSupportedFail","DirectorySeparatorsError","ResolveTreeError","ResolveCommitError","DirectoryIsAFileError","TreeOrBlobNotFoundError","NotImplementedFail","ReadObjectFail","NotAnOidFail","NoRefspecConfiguredError","MismatchRefValueError","ResolveRefError","ExpandRefError","EmptyServerResponseFail","AssertServerResponseFail","HTTPError","RemoteUrlParseError","UnknownTransportError","AcquireLockFileFail","DoubleReleaseLockFileFail","InternalFail","UnknownOauth2Format","MissingPasswordTokenError","MissingUsernameError","MixPasswordTokenError","MixUsernamePasswordTokenError","MissingTokenError","MixUsernameOauth2formatMissingTokenError","MixPasswordOauth2formatMissingTokenError","MixUsernamePasswordOauth2formatMissingTokenError","MixUsernameOauth2formatTokenError","MixPasswordOauth2formatTokenError","MixUsernamePasswordOauth2formatTokenError","MaxSearchDepthExceeded","PushRejectedNonFastForward","PushRejectedTagExists","AddingRemoteWouldOverwrite","PluginUndefined","CoreNotFound","PluginSchemaViolation","PluginUnrecognized","AmbiguousShortOid","ShortOidNotFound","Error","constructor","code","data","super","this","message","template","values","result","keys","subs","Array","isArray","join","String","replace","RegExp","renderTemplate","captureStackTrace","toJSON","caller","toString","stack","delayedReleases","Map","FileSystem","fs","undefined","plugin","_readFile","promises","readFile","_writeFile","writeFile","_mkdir","mkdir","_rmdir","rmdir","_unlink","unlink","_stat","stat","_lstat","lstat","_readdir","readdir","_readlink","readlink","_symlink","symlink","pify","exists","filepath","options","_this","_asyncToGenerator","err","console","log","read","_this2","buffer","Buffer","from","write","contents","_this3","dirname","_selfCall","_this4","parent","rm","_this5","_this6","names","sort","compareStrings","readdirDeep","dir","_this7","subdirs","Promise","all","map","_ref","subdir","res","isDirectory","_x","apply","arguments","reduce","a","f","concat","filename","_this8","opts","encoding","_this9","writelink","_this10","lock","triesLeft","_this11","has","clearTimeout","delete","sleep","unlock","delayRelease","_this12","set","setTimeout","normalizePath","path","parts","plugins","cores","_models_GitError__WEBPACK_IMPORTED_MODULE_0__","pluginSchemas","credentialManager","emitter","pgp","http","method","verifySchema","critical","Set","_cores","core","GitPackedRefs","text","refs","parsedConfig","trim","split","line","test","comment","indexOf","startsWith","slice","ref","peeled","oid","[object Object]","filter","entry","compareRefNames","b","_a","_b","tmp","endsWith","refpaths","GIT_FILES","GitRefManager","_fs","gitdir","remote","symrefs","tags","refspecs","match","config","GitConfigManager","getall","length","unshift","refspec","GitRefSpecSet","actualRefsToWrite","serverRef","refTranslations","translate","translatedRef","symrefTranslations","symtarget","translateOne","packed","depth","sha","resolve","packedMap","packedRefs","allpaths","includes","expand","fullref","resolveAgainstMap","files","x","push","listRefs","mark","stop","perf","performance","now","Date","throwIfEmpty","measure","entries","getEntriesByName","getEntriesByType","clearMarks","clearMeasures","marks","startTime","endTime","duration","entryType","arr","item","mid","low","high","splice","insertSorted","readObject","_readObject","format","getExternalRefDelta","readObjectLoose","readObjectPacked","pako","inflate","source","shasum","type","GitObject","unwrap","GitCommit","commit","_commit","isBuffer","render","payload","signature","headers","justHeaders","justMessage","normalizeNewlines","indent","toObject","parseHeaders","parse","assign","hs","h","obj","author","parseAuthor","committer","tree","formatAuthor","gpgsig","renderHeaders","withoutSignature","isolateSignature","outdent","secretKey","sign","signedCommit","publicKey","verify","GitPktLine","hexlength","padHex","stream","reader","StreamReader","_read","parseInt","process","shouldLog","args","env","DEBUG","window","localStorage","debug","global","base64","ieee754","kMaxLength","TYPED_ARRAY_SUPPORT","createBuffer","that","RangeError","Uint8Array","__proto__","arg","encodingOrOffset","allocUnsafe","TypeError","ArrayBuffer","array","byteOffset","byteLength","fromArrayLike","fromArrayBuffer","string","isEncoding","actual","fromString","len","checked","copy","val","fromObject","assertSize","size","isView","loweredCase","utf8ToBytes","base64ToBytes","toLowerCase","swap","bidirectionalIndexOf","isNaN","arrayIndexOf","lastIndexOf","indexSize","arrLength","valLength","buf","readUInt16BE","foundIndex","found","j","hexWrite","offset","Number","remaining","strLen","parsed","substr","utf8Write","blitBuffer","asciiWrite","str","byteArray","charCodeAt","asciiToBytes","latin1Write","base64Write","ucs2Write","units","hi","lo","utf16leToBytes","base64Slice","start","end","fromByteArray","utf8Slice","Math","min","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","codePoints","MAX_ARGUMENTS_LENGTH","fromCharCode","decodeCodePointsArray","SlowBuffer","alloc","INSPECT_MAX_BYTES","foo","subarray","e","typedArraySupport","poolSize","_augment","species","configurable","fill","allocUnsafeSlow","_isBuffer","compare","y","list","pos","swap16","swap32","swap64","hexSlice","asciiSlice","latin1Slice","utf16leSlice","equals","inspect","max","target","thisStart","thisEnd","thisCopy","targetCopy","isFinite","_arr","ret","out","toHex","bytes","checkOffset","ext","checkInt","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","writeDouble","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","floor","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","INVALID_BASE64_RE","Infinity","leadSurrogate","toByteArray","stringtrim","base64clean","src","dst","sha_js_sha1__WEBPACK_IMPORTED_MODULE_0__","sha_js_sha1__WEBPACK_IMPORTED_MODULE_0___default","Hash","update","digest","GitAnnotatedTag","tag","_tag","tagger","signedTag","GitTree","_models_GitError_js__WEBPACK_IMPORTED_MODULE_0__","_utils_comparePath_js__WEBPACK_IMPORTED_MODULE_1__","mode2type","nudgeIntoShape","limitModeToAllowed","_entries","cursor","space","nullchar","parseBuffer","comparePath","iterator","processFn","fn","P","promiseModule","reject","multiArgs","errorFirst","shift","error","input","exclude","objType","pattern","include","some","excludeMain","getPrototypeOf","GitIndexManager","closure","AsyncLock","maxPending","acquire","index","rawIndexFile","GitIndex","_dirty","BufferCursor","_start","eof","tell","seek","enc","actualLength","last","GitConfig","TYPED_OK","Uint16Array","Int32Array","_has","sources","shrinkBuf","fnTyped","arraySet","dest","src_offs","dest_offs","flattenChunks","chunks","chunk","fnUntyped","setTyped","on","Buf8","Buf16","Buf32","pkg","version","agent","forAwait","_x2","_forAwait","iterable","cb","iter","getIterator","done","next","return","writeObject","_writeObject","wrap","deflate","writeObjectLoose","normalizeMode","permissions","normalizeStats","MAX_UINT32","SecondsNanoseconds","givenSeconds","givenNanoseconds","milliseconds","date","valueOf","seconds","ctimeSeconds","ctimeNanoseconds","ctimeMs","ctime","mtimeSeconds","mtimeNanoseconds","mtimeMs","mtime","dev","ino","uid","gid","inherits","K","W","Sha1","init","_w","rotl5","num","rotl30","ft","_c","_d","_e","_update","M","_hash","H","repeat","basename","email","timestamp","timezoneOffset","parseTimezoneOffset","hours","minutes","collect","_collect","buffers","CleanGitRef","clean","_compareStrings__WEBPACK_IMPORTED_MODULE_0__","GitPackIndex","stuff","offsetCache","idx","marky","hashes","hash","offsets","packfileSha","crcs","pack","emitterPrefix","listpackTypes","1","2","3","4","6","7","offsetToObject","totalObjectCount","lastPercent","times","readSlice","histogram","blob","ofs-delta","ref-delta","bytesProcessed","listpack","reference","percent","emit","phase","loaded","total","lengthComputable","offsetArray","crc","crc32","count","callsToReadSlice","callsToGetExternal","timeByDepth","objectsByDepth","readDepth","externalReadDepth","time","totalElapsedTime","misc","toBuffer","fanoutBuffer","crcsBuffer","offsetsBuffer","totalBuffer","shaBuffer","load","unload","raw","byte","btype","16","32","48","64","96","112","lastFour","startWith","otherVarIntDecode","base","multibyte","lastSeven","decodeVarInt","baseOffset","applyDelta","GitWalkerSymbol","extractAuthFromUrl","url","userpass","username","password","corsProxify","corsProxy","GitRemoteHTTP","service","noGitSuffix","auth","_origUrl","urlAuth","builtinHttp","_auth","calculateBasicAuthUsernamePasswordPair","calculateBasicAuthHeader","statusCode","rejected","approved","statusMessage","remoteHTTP","parseRefsAdResponse","body","expected","is","simpleSign","abs","strHours","strMinutes","formatTimezoneOffset","_oauth2__WEBPACK_IMPORTED_MODULE_1__","token","oauth2format","oauth2","FIFO","_queue","_ended","_waiting","destroy","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","run","marker","runClearTimeout","Item","noop","nextTick","title","browser","argv","versions","addListener","once","off","removeListener","removeAllListeners","prependListener","prependOnceListener","listeners","binding","cwd","chdir","umask","GitIgnoreManager","pairs","gitignore","pieces","folder","file","ignoredStatus","ign","ignore","add","parentdir","ignores","unignored","ignored","company","GitSideBand","streamReader","packetlines","packfile","progress","nextBit","GitRefSpec","remotePath","localPath","force","matchPrefix","forceMatch","remoteGlobMatch","localGlobMatch","remoteIsGlob","remoteBranch","PackfileCache","fromIdx","readPackIndex","loadPackIndex","undoCursor","started","_discardedBytes","_init","_loadnext","_moveCursor","_trim","_accumulate","skip","undo","_next","lengthBuffers","nextbuffer","acc","_AsyncIterator_js__WEBPACK_IMPORTED_MODULE_0__","asyncIterator","fromValue","fromStream","getReader","releaseLock","pop","_http","fetch","arrayBuffer","status","statusText","GitShallowManager","oids","lookup","b64","placeHolders","uint8","temp","extraBytes","output","0","-1","-2","-3","-4","-5","-6","_sleep","ms","_utils_BufferCursor_js__WEBPACK_IMPORTED_MODULE_0__","_utils_normalizeStats_js__WEBPACK_IMPORTED_MODULE_2__","_utils_shasum_js__WEBPACK_IMPORTED_MODULE_3__","_GitError_js__WEBPACK_IMPORTED_MODULE_4__","shaComputed","shaClaimed","magic","numEntries","flags","bits","assumeValid","Boolean","extended","stage","nameLength","pathlength","padding","entriesMap","insert","stats","bfilepath","clear","header","writer","bpath","ceil","written","renderCacheEntryFlags","main","sum","bool","schema","filemode","bare","logallrefupdates","symlinks","ignorecase","bigFileThreshold","SECTION_LINE_REGEX","SECTION_REGEX","VARIABLE_LINE_REGEX","VARIABLE_NAME_REGEX","VARIABLE_VALUE_COMMENT_REGEX","extractSectionLine","matches","exec","section","subsection","extractVariableLine","rawValue","valueWithoutComments","removeComments","removeQuotes","commentMatches","valueWithoutComment","hasOddNumberOfQuotes","newText","isQuote","isEscapeForQuote","lower","getPath","findLastIndex","callback","lastIndex","trimmedLine","extractedSection","isSection","extractedVariable","allValues","getSubsections","deleteSection","append","configIndex","modifiedConfig","modified","sectionPath","sectionIndex","findIndex","newConfig","newSection","_GitRefSpec__WEBPACK_IMPORTED_MODULE_0__","rules","rule","remoteRefs","remoteRef","localRef","resolveTree","_resolveTree","GitRemoteManager","_GitRemoteHTTP__WEBPACK_IMPORTED_MODULE_1__","remoteHelpers","transport","address","parseRemoteUrl","_parseRefsAdResponse","capabilities","lineOne","lineTwo","firstRef","capabilitiesLine","cap","flatFileListToDirectoryStructure","_utils_basename_js__WEBPACK_IMPORTED_MODULE_0__","_utils_dirname_js__WEBPACK_IMPORTED_MODULE_1__","inodes","fullpath","metadata","children","mkfile","_pack","outputStream","buff","stype","types","SignedGitCommit","openpgp","privateKeys","privKeyObj","readArmored","util","str2Uint8Array","detached","armor","listSigningKeys","readSignedContent","getSigningKeyIds","keyid","publicKeys","pubKeyObj","valid","normalizeArray","allowAboveRoot","up","splitPathRe","splitPath","xs","resolvedPath","resolvedAbsolute","charAt","normalize","isAbsolute","trailingSlash","paths","relative","to","fromParts","toParts","samePartsLength","outputParts","sep","delimiter","extname","g","Function","copyProps","SafeBuffer","adler","s1","s2","crcTable","table","k","makeTable","utils","STR_APPLY_OK","STR_APPLY_UIA_OK","__","_utf8len","q","buf2binstring","string2buf","c2","m_pos","str_len","buf_len","binstring2buf","buf2string","c_len","utf16buf","utf8border","next_in","avail_in","total_in","next_out","avail_out","total_out","msg","state","data_type","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_SYNC_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_BLOCK","Z_TREES","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_ERRNO","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","Z_NO_COMPRESSION","Z_BEST_SPEED","Z_BEST_COMPRESSION","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_RLE","Z_FIXED","Z_DEFAULT_STRATEGY","Z_BINARY","Z_TEXT","Z_UNKNOWN","Z_DEFLATED","proto","WeakMap","DataView","writeUploadPackRequest","_models_GitPktLine_js__WEBPACK_IMPORTED_MODULE_0__","wants","haves","shallows","since","packstream","firstLineCapabilities","encode","flush","parseUploadPackResponse","_parseUploadPackResponse","demux","unshallows","acks","nak","listCommitsAndTags","_listCommitsAndTags","finish","startingSet","finishingSet","visited","walk","_walk","parents","listObjects","_listObjects","writeReceivePackRequest","_writeReceivePackRequest","triplets","capsFirstLine","trip","oldoid","fullRef","parseReceivePackResponse","_parseReceivePackResponse","response","lines","ok","errors","refAndMessage","makeArray","subject","REGEX_TEST_BLANK_LINE","REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION","REGEX_REPLACE_LEADING_EXCAPED_HASH","REGEX_SPLITALL_CRLF","REGEX_TEST_INVALID_PATH","SLASH","KEY_IGNORE","for","REGEX_REGEXP_RANGE","DEFAULT_REPLACER_PREFIX","p1","p2","range","sanitizeRange","DEFAULT_REPLACER_SUFFIX","_","POSITIVE_REPLACERS","NEGATIVE_REPLACERS","regexCache","isString","checkPattern","splitPattern","IgnoreRule","origin","negative","regex","createRule","prev","current","makeRegex","throwError","Ctor","returnFalse","checkPath","doThrow","Ignore","_rules","_ignorecase","_initCache","_ignoreCache","_testCache","_added","forEach","_addPattern","checkUnignored","cache","slices","_testOne","_test","createFilter","isPathValid","default","IGNORE_TEST_WIN32","platform","makePosix","_writeObjectLoose","_readObjectLoose","_readObjectPacked","indexFile","packFile","CRC32","T","signed_crc_table","bstr","seed","C","L","crc32_buf_8","DO_NOT_EXPORT_CRC","delta","output_buffer","out_idx","command","base_size_info","resized_size_info","delta_header","binary","OFFSET_BUFFER","LENGTH_BUFFER","check","vi","ondata","_listpack","onData","PACK","numObjects","ofs","parseHeader","inflator","Inflate","ended","strm","ofs_delta","ref_delta","isWin","SEP","SEP_ESC","GLOBSTAR","WILDCARD","GLOBSTAR_SEGMENT","WILDCARD_SEGMENT","glob","globstar","strict","segment","segments","inGroup","inRange","only","prevChar","starCount","nextChar","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","NaN","rt","LN2","queues","domains","domainReentrant","DEFAULT_TIMEOUT","DEFAULT_MAX_PENDING","_acquireBatch","deferred","_deferPromise","resolved","timer","locked","domain","called","_promiseTry","then","taskFn","skipQueue","promise","fnx","reverse","getFn","isBusy","defer","ctor","superCtor","super_","writable","TempCtor","blockSize","finalSize","_block","_finalSize","_blockSize","_len","block","accum","assigned","remainder","rem","lowBits","highBits","zlib_deflate","strings","ZStream","Deflate","level","chunkSize","windowBits","memLevel","strategy","opt","gzip","deflateInit2","deflateSetHeader","dictionary","dict","deflateSetDictionary","_dict_set","deflator","_mode","onEnd","deflateEnd","deflateRaw","configuration_table","trees","adler32","MAX_MEM_LEVEL","MAX_WBITS","DEF_MEM_LEVEL","L_CODES","LITERALS","D_CODES","BL_CODES","HEAP_SIZE","MAX_BITS","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","PRESET_DICT","INIT_STATE","EXTRA_STATE","NAME_STATE","COMMENT_STATE","HCRC_STATE","BUSY_STATE","FINISH_STATE","BS_NEED_MORE","BS_BLOCK_DONE","BS_FINISH_STARTED","BS_FINISH_DONE","OS_CODE","errorCode","rank","zero","flush_pending","pending","pending_buf","pending_out","flush_block_only","_tr_flush_block","block_start","strstart","put_byte","putShortMSB","longest_match","cur_match","chain_length","max_chain_length","scan","best_len","prev_length","nice_match","w_size","_win","wmask","w_mask","strend","scan_end1","scan_end","good_match","lookahead","match_start","fill_window","more","_w_size","window_size","hash_size","head","ins_h","hash_shift","hash_mask","deflate_fast","hash_head","bflush","match_length","_tr_tally","max_lazy_match","last_lit","deflate_slow","max_insert","prev_match","match_available","Config","good_length","max_lazy","nice_length","max_chain","func","DeflateState","pending_buf_size","gzhead","gzindex","last_flush","w_bits","hash_bits","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","bl_count","heap","heap_len","heap_max","l_buf","lit_bufsize","d_buf","opt_len","static_len","bi_buf","bi_valid","deflateResetKeep","_tr_init","deflateReset","max_block_size","max_start","deflateInit","old_flush","beg","hcrc","extra","os","bstate","deflate_huff","deflate_rle","_tr_align","_tr_stored_block","avail","tmpDict","dictLength","deflateInfo","STORED_BLOCK","STATIC_TREES","DYN_TREES","LENGTH_CODES","Buf_size","MAX_BL_BITS","END_BLOCK","REP_3_6","REPZ_3_10","REPZ_11_138","extra_lbits","extra_dbits","extra_blbits","bl_order","static_ltree","static_dtree","_dist_code","_length_code","base_length","static_l_desc","static_d_desc","static_bl_desc","base_dist","StaticTreeDesc","static_tree","extra_bits","extra_base","elems","max_length","has_stree","TreeDesc","dyn_tree","stat_desc","max_code","d_code","dist","put_short","w","send_bits","send_code","bi_reverse","gen_codes","next_code","init_block","bi_windup","smaller","_n2","_m2","pqdownheap","v","compress_block","ltree","dtree","lc","lx","build_tree","desc","node","stree","xbits","overflow","gen_bitlen","scan_tree","curlen","prevlen","nextlen","max_count","min_count","send_tree","static_init_done","stored_len","copy_block","tr_static_init","opt_lenb","static_lenb","max_blindex","black_mask","detect_data_type","build_bl_tree","lcodes","dcodes","blcodes","send_all_trees","bi_flush","zlib_inflate","GZheader","inflateInit2","inflateGetHeader","next_out_utf8","tail","utf8str","allowBufError","inflateSetDictionary","inflateEnd","inflateRaw","ungzip","inflate_fast","inflate_table","CODES","LENS","DISTS","Z_MEM_ERROR","HEAD","FLAGS","TIME","OS","EXLEN","EXTRA","NAME","COMMENT","HCRC","DICTID","DICT","TYPE","TYPEDO","STORED","COPY_","COPY","TABLE","LENLENS","CODELENS","LEN_","LEN","LENEXT","DIST","DISTEXT","MATCH","LIT","CHECK","LENGTH","DONE","BAD","MEM","SYNC","ENOUGH_LENS","ENOUGH_DISTS","DEF_WBITS","zswap32","InflateState","havedict","dmax","wbits","wsize","whave","wnext","hold","lencode","distcode","lenbits","distbits","ncode","nlen","ndist","have","lens","work","lendyn","distdyn","sane","back","was","inflateResetKeep","inflateReset","inflateReset2","lenfix","distfix","virgin","fixedtables","sym","updatewindow","inflateInit","put","left","_in","_out","from_source","here_bits","here_op","here_val","last_bits","last_op","last_val","here","hbuf","order","inf_leave","xflags","extra_len","inflateInfo","s_window","lcode","dcode","lmask","dmask","op","top","dolen","dodist","lbase","lext","dbase","dext","lens_index","codes","table_index","incr","mask","curr","drop","used","huff","base_index","MAXBITS","offs","extra_index","mix","into","decoders","hex","character","utf8","ch","encodeURIComponent","jlen","encoders","toutf8","byt","by","collecting","col","find_pad_position","unmask","fcc","reduced","targets","hint","get_length","cur","curidx","curoff","target_start","source_start","source_end","fast_copy","jend","iend","slow_copy","at","getUint16","getUint32","getInt16","getInt32","getFloat32","getFloat64","setUint16","setUint32","setInt16","setInt32","setFloat32","setFloat64","Decoder","MSB","REST","msb","_writeObject2","_format","CHARS","{","(","[","STRICT","RELAXED","isglob","rgx","open","close","isGlob","endianness","hostname","location","loadavg","uptime","freemem","MAX_VALUE","totalmem","cpus","release","navigator","appVersion","networkInterfaces","getNetworkInterfaces","arch","tmpdir","tmpDir","EOL","homedir","_add","addToIndex","_x3","isIgnored","child","isSymbolicLink","addRemote","_addRemote","function","parameter","cleanGitRef","verb","noun","suggestion","save","_config","normalizeAuthorObject","_normalizeAuthorObject","getTimezoneOffset","annotatedTag","_annotatedTag","signingKey","parameters","tagObject","writeRef","branch","_branch","checkout","patternRoot","globalyzer","worthWalking","GitWalkerRepo","mapPromise","GitWalkerRepo_asyncToGenerator","walker","ConstructEntry","populateStat","populateContent","populateHash","JSON","stringify","content","TREE","freeze","compareStats","staleness","enabled","justWhatMatters","GitWalkerFs","GitWalkerFs_asyncToGenerator","isFile","WORKDIR","RunningMinimum","consider","reset","unionOfIterators","sets","minimum","heads","numsets","walkBeta1","_walkBeta","walkBeta1_asyncToGenerator","_ref2","_ref3","flatten","_x4","iterate","walkers","proxy","arrayRange","unionWalkerFromReaddir","_ref4","iterators","_x5","_ref5","walkedChildren","_x6","_checkout","noCheckout","patternGlobrex","globrex","patternBase","checkout_asyncToGenerator","workdir","thing","entrypath","hasObject","_hasObject","_hasObjectLoose","hasObjectLoose","_hasObjectPacked","hasObjectPacked","filterCapabilities","server","client","serverNames","findSplit","splitLines","_fetch","authUsername","authPassword","singleBranch","onprogress","warn","fetchPackfile","defaultBranch","fetchHead","FETCH_HEAD","pheader","fromPack","getRemoteHelperFor","discover","haveRefs","packbuffer","connect","bail","updateRemoteRefs","folders","clone","_clone","noTags","commit_asyncToGenerator","inode","treeRef","constructTree","comm","abbreviateRx","currentBranch","_currentBranch","fullname","abbreviate","deleteBranch","_deleteBranch","deleteRef","_deleteRef","deleteRemote","_deleteRemote","deleteTag","_deleteTag","short","prefix","suffix","_oid","results","results1","_expandOidLoose","expandOidLoose","results2","_expandOidPacked","expandOidPacked","expandOid","_expandOid2","_expandOid","expandRef","_expandRef","findMergeBase","_findMergeBase","counts","passes","newheads","findRoot","_findRoot2","_findRoot","getRemoteInfo","_getRemoteInfo","forPush","part","symref","indexPack","_indexPack","isDescendent","_isDescendent","ancestor","searchdepth","listBranches","_listBranches","_readObject2","pathArray","resolveFile","listFiles","_listFiles","filenames","accumulateFilesFromOid","listFiles_asyncToGenerator","listRemotes","_listRemotes","remoteNames","listRemotes_asyncToGenerator","listTags","_listTags","compareAge","logCommit","_logCommit","signing","_log","sinceTimestamp","commits","shallowCommits","tips","merge","_merge","ours","theirs","fastForwardOnly","ourOid","theirOid","baseOid","alreadyMerged","fastForward","every","candidate","find","packObjects","_packObjects","pull","_pull","_push","httpRemote","fullRemoteRef","expandAgainstMap","mergebase","objects","packstream1","packstream2","remove","_remove","remove_asyncToGenerator","hashObject","_hashObject","resetIndex","_resetIndex","workdirOid","resetIndex_asyncToGenerator","resolveRef","_resolveRef","_sign","newOid","_status","headTree","getHeadTree","treeOid","getOidAtPath","indexEntry","status_asyncToGenerator","I","getWorkdirOid","getTree","GitWalkerIndex","treePromise","GitWalkerIndex_asyncToGenerator","STAGE","statusMatrix","_statusMatrix","statusMatrix_asyncToGenerator","_verify","invalid","_writeRef","symbolic","writeSymbolicRef","branch_branch","checkout_checkout","commit_commit","config_config","expandOid_expandOid","log_log","readObject_readObject","status_status","tag_tag","commands_writeObject"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,OAAA,GAAAH,GACA,iBAAAC,QACAA,QAAA,IAAAD,IAEAD,EAAA,IAAAC,IARA,CASCK,KAAA,WACD,mBCTA,IAAAC,EAAA,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AAAQ,EAAA0B,EAAA,iCAAAmgE,KAAAriE,EAAAQ,EAAA0B,EAAA,wBAAAmhE,KAAArjE,EAAAQ,EAAA0B,EAAA,2BAAAqV,KAAAvX,EAAAQ,EAAA0B,EAAA,4BAAAinB,KAAAnpB,EAAAQ,EAAA0B,EAAA,8BAAAm0D,KAAAr2D,EAAAQ,EAAA0B,EAAA,gCAAAohE,GAAA,IAAAtjE,EAAAQ,EAAA0B,EAAA,6BAAA+xD,KAAAj0D,EAAAQ,EAAA0B,EAAA,4BAAA0zD,KAAA51D,EAAAQ,EAAA0B,EAAA,0BAAAkgE,KAAApiE,EAAAQ,EAAA0B,EAAA,yBAAAizD,IAAAn1D,EAAAQ,EAAA0B,EAAA,sBAAAE,EAAA,IAAApC,EAAAQ,EAAA0B,EAAA,4BAAAgM,EAAA,IAAAlO,EAAAQ,EAAA0B,EAAA,0BAAAgM,EAAA,IAmDO,MAAMk4B,GAAQ,CAAEnT,SAAMwB","file":"bundle.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"git\"] = factory();\n\telse\n\t\troot[\"git\"] = factory();\n})(self, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 121);\n","// modeled after Therror https://github.com/therror/therror/\n// but with the goal of being much lighter weight.\n\nconst messages = {\n FileReadError: `Could not read file \"{ filepath }\".`,\n MissingRequiredParameterError: `The function \"{ function }\" requires a \"{ parameter }\" parameter but none was provided.`,\n InvalidRefNameError: `Failed to { verb } { noun } \"{ ref }\" because that name would not be a valid git reference. A valid alternative would be \"{ suggestion }\".`,\n InvalidParameterCombinationError: `The function \"{ function }\" doesn't take these parameters simultaneously: { parameters }`,\n RefExistsError: `Failed to create { noun } \"{ ref }\" because { noun } \"{ ref }\" already exists.`,\n RefNotExistsError: `Failed to { verb } { noun } \"{ ref }\" because { noun } \"{ ref }\" does not exists.`,\n BranchDeleteError: `Failed to delete branch \"{ ref }\" because branch \"{ ref }\" checked out now.`,\n NoHeadCommitError: `Failed to create { noun } \"{ ref }\" because the HEAD ref could not be resolved to a commit.`,\n CommitNotFetchedError: `Failed to checkout \"{ ref }\" because commit { oid } is not available locally. Do a git fetch to make the branch available locally.`,\n ObjectTypeUnknownFail: `Object { oid } has unknown type \"{ type }\".`,\n ObjectTypeAssertionFail: `Object { oid } was anticipated to be a { expected } but it is a { type }. This is probably a bug deep in isomorphic-git!`,\n ObjectTypeAssertionInTreeFail: `Object { oid } in tree for \"{ entrypath }\" was an unexpected object type \"{ type }\".`,\n ObjectTypeAssertionInRefFail: `{ ref } is not pointing to a \"{ expected }\" object but a \"{ type }\" object.`,\n ObjectTypeAssertionInPathFail: `Found a blob { oid } in the path \"{ path }\" where a tree was expected.`,\n MissingAuthorError: `Author name and email must be specified as an argument or in the .git/config file.`,\n MissingCommitterError: `Committer name and email must be specified if a committer object is passed.`,\n MissingTaggerError: `Tagger name and email must be specified as an argument or in the .git/config file.`,\n GitRootNotFoundError: `Unable to find git root for { filepath }.`,\n UnparseableServerResponseFail: `Unparsable response from server! Expected \"unpack ok\" or \"unpack [error message]\" but received \"{ line }\".`,\n InvalidDepthParameterError: `Invalid value for depth parameter: { depth }`,\n RemoteDoesNotSupportShallowFail: `Remote does not support shallow fetches.`,\n RemoteDoesNotSupportDeepenSinceFail: `Remote does not support shallow fetches by date.`,\n RemoteDoesNotSupportDeepenNotFail: `Remote does not support shallow fetches excluding commits reachable by refs.`,\n RemoteDoesNotSupportDeepenRelativeFail: `Remote does not support shallow fetches relative to the current shallow depth.`,\n RemoteDoesNotSupportSmartHTTP: `Remote does not support the \"smart\" HTTP protocol, and isomorphic-git does not support the \"dumb\" HTTP protocol, so they are incompatible.`,\n CorruptShallowOidFail: `non-40 character shallow oid: { oid }`,\n FastForwardFail: `A simple fast-forward merge was not possible.`,\n MergeNotSupportedFail: `Non-fast-forward merges are not supported yet.`,\n DirectorySeparatorsError: `\"filepath\" parameter should not include leading or trailing directory separators because these can cause problems on some platforms`,\n ResolveTreeError: `Could not resolve { oid } to a tree.`,\n ResolveCommitError: `Could not resolve { oid } to a commit.`,\n DirectoryIsAFileError: `Unable to read \"{ oid }:{ filepath }\" because encountered a file where a directory was expected.`,\n TreeOrBlobNotFoundError: `No file or directory found at \"{ oid }:{ filepath }\".`,\n NotImplementedFail: `TODO: { thing } still needs to be implemented!`,\n ReadObjectFail: `Failed to read git object with oid { oid }`,\n NotAnOidFail: `Expected a 40-char hex object id but saw \"{ value }\".`,\n NoRefspecConfiguredError: `Could not find a fetch refspec for remote \"{ remote }\".\\\\nMake sure the config file has an entry like the following:\\\\n[remote \"{ remote }\"]\\\\nfetch = +refs/heads/*:refs/remotes/origin/*`,\n MismatchRefValueError: `Provided oldValue doesn\\\\'t match the actual value of \"{ ref }\".`,\n ResolveRefError: `Could not resolve reference \"{ ref }\".`,\n ExpandRefError: `Could not expand reference \"{ ref }\".`,\n EmptyServerResponseFail: `Empty response from git server.`,\n AssertServerResponseFail: `Expected \"{ expected }\" but got \"{ actual }\".`,\n HTTPError: `HTTP Error: { statusCode } { statusMessage }`,\n RemoteUrlParseError: `Cannot parse remote URL: \"{ url }\"`,\n UnknownTransportError: `Git remote \"{ url }\" uses an unrecognized transport protocol: \"{ transport }\"`,\n AcquireLockFileFail: `Unable to acquire lockfile \"{ filename }\". Exhausted tries.`,\n DoubleReleaseLockFileFail: `Cannot double-release lockfile \"{ filename }\".`,\n InternalFail: `An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: { message }`,\n UnknownOauth2Format: `I do not know how { company } expects its Basic Auth headers to be formatted for OAuth2 usage. If you do, you can use the regular username and password parameters to set the basic auth header yourself.`,\n MissingPasswordTokenError: `Missing password or token`,\n MissingUsernameError: `Missing username`,\n MixPasswordTokenError: `Cannot mix \"password\" with \"token\"`,\n MixUsernamePasswordTokenError: `Cannot mix \"username\" and \"password\" with \"token\"`,\n MissingTokenError: `Missing token`,\n MixUsernameOauth2formatMissingTokenError: `Cannot mix \"username\" with \"oauth2format\". Missing token.`,\n MixPasswordOauth2formatMissingTokenError: `Cannot mix \"password\" with \"oauth2format\". Missing token.`,\n MixUsernamePasswordOauth2formatMissingTokenError: `Cannot mix \"username\" and \"password\" with \"oauth2format\". Missing token.`,\n MixUsernameOauth2formatTokenError: `Cannot mix \"username\" with \"oauth2format\" and \"token\"`,\n MixPasswordOauth2formatTokenError: `Cannot mix \"password\" with \"oauth2format\" and \"token\"`,\n MixUsernamePasswordOauth2formatTokenError: `Cannot mix \"username\" and \"password\" with \"oauth2format\" and \"token\"`,\n MaxSearchDepthExceeded: `Maximum search depth of { depth } exceeded.`,\n PushRejectedNonFastForward: `Push rejected because it was not a simple fast-forward. Use \"force: true\" to override.`,\n PushRejectedTagExists: `Push rejected because tag already exists. Use \"force: true\" to override.`,\n AddingRemoteWouldOverwrite: `Adding remote { remote } would overwrite the existing remote. Use \"force: true\" to override.`,\n PluginUndefined: `A command required the \"{ plugin }\" plugin but it was undefined.`,\n CoreNotFound: `No plugin core with the name \"{ core }\" is registered.`,\n PluginSchemaViolation: `Schema check failed for \"{ plugin }\" plugin; missing { method } method.`,\n PluginUnrecognized: `Unrecognized plugin type \"{ plugin }\"`,\n AmbiguousShortOid: `Found multiple oids matching \"{ short }\" ({ matches }). Use a longer abbreviation length to disambiguate them.`,\n ShortOidNotFound: `Could not find an object matching \"{ short }\".`\n}\n\nexport const E = {\n FileReadError: `FileReadError`,\n MissingRequiredParameterError: `MissingRequiredParameterError`,\n InvalidRefNameError: `InvalidRefNameError`,\n InvalidParameterCombinationError: `InvalidParameterCombinationError`,\n RefExistsError: `RefExistsError`,\n RefNotExistsError: `RefNotExistsError`,\n BranchDeleteError: `BranchDeleteError`,\n NoHeadCommitError: `NoHeadCommitError`,\n CommitNotFetchedError: `CommitNotFetchedError`,\n ObjectTypeUnknownFail: `ObjectTypeUnknownFail`,\n ObjectTypeAssertionFail: `ObjectTypeAssertionFail`,\n ObjectTypeAssertionInTreeFail: `ObjectTypeAssertionInTreeFail`,\n ObjectTypeAssertionInRefFail: `ObjectTypeAssertionInRefFail`,\n ObjectTypeAssertionInPathFail: `ObjectTypeAssertionInPathFail`,\n MissingAuthorError: `MissingAuthorError`,\n MissingCommitterError: `MissingCommitterError`,\n MissingTaggerError: `MissingTaggerError`,\n GitRootNotFoundError: `GitRootNotFoundError`,\n UnparseableServerResponseFail: `UnparseableServerResponseFail`,\n InvalidDepthParameterError: `InvalidDepthParameterError`,\n RemoteDoesNotSupportShallowFail: `RemoteDoesNotSupportShallowFail`,\n RemoteDoesNotSupportDeepenSinceFail: `RemoteDoesNotSupportDeepenSinceFail`,\n RemoteDoesNotSupportDeepenNotFail: `RemoteDoesNotSupportDeepenNotFail`,\n RemoteDoesNotSupportDeepenRelativeFail: `RemoteDoesNotSupportDeepenRelativeFail`,\n RemoteDoesNotSupportSmartHTTP: `RemoteDoesNotSupportSmartHTTP`,\n CorruptShallowOidFail: `CorruptShallowOidFail`,\n FastForwardFail: `FastForwardFail`,\n MergeNotSupportedFail: `MergeNotSupportedFail`,\n DirectorySeparatorsError: `DirectorySeparatorsError`,\n ResolveTreeError: `ResolveTreeError`,\n ResolveCommitError: `ResolveCommitError`,\n DirectoryIsAFileError: `DirectoryIsAFileError`,\n TreeOrBlobNotFoundError: `TreeOrBlobNotFoundError`,\n NotImplementedFail: `NotImplementedFail`,\n ReadObjectFail: `ReadObjectFail`,\n NotAnOidFail: `NotAnOidFail`,\n NoRefspecConfiguredError: `NoRefspecConfiguredError`,\n MismatchRefValueError: `MismatchRefValueError`,\n ResolveRefError: `ResolveRefError`,\n ExpandRefError: `ExpandRefError`,\n EmptyServerResponseFail: `EmptyServerResponseFail`,\n AssertServerResponseFail: `AssertServerResponseFail`,\n HTTPError: `HTTPError`,\n RemoteUrlParseError: `RemoteUrlParseError`,\n UnknownTransportError: `UnknownTransportError`,\n AcquireLockFileFail: `AcquireLockFileFail`,\n DoubleReleaseLockFileFail: `DoubleReleaseLockFileFail`,\n InternalFail: `InternalFail`,\n UnknownOauth2Format: `UnknownOauth2Format`,\n MissingPasswordTokenError: `MissingPasswordTokenError`,\n MissingUsernameError: `MissingUsernameError`,\n MixPasswordTokenError: `MixPasswordTokenError`,\n MixUsernamePasswordTokenError: `MixUsernamePasswordTokenError`,\n MissingTokenError: `MissingTokenError`,\n MixUsernameOauth2formatMissingTokenError: `MixUsernameOauth2formatMissingTokenError`,\n MixPasswordOauth2formatMissingTokenError: `MixPasswordOauth2formatMissingTokenError`,\n MixUsernamePasswordOauth2formatMissingTokenError: `MixUsernamePasswordOauth2formatMissingTokenError`,\n MixUsernameOauth2formatTokenError: `MixUsernameOauth2formatTokenError`,\n MixPasswordOauth2formatTokenError: `MixPasswordOauth2formatTokenError`,\n MixUsernamePasswordOauth2formatTokenError: `MixUsernamePasswordOauth2formatTokenError`,\n MaxSearchDepthExceeded: `MaxSearchDepthExceeded`,\n PushRejectedNonFastForward: `PushRejectedNonFastForward`,\n PushRejectedTagExists: `PushRejectedTagExists`,\n AddingRemoteWouldOverwrite: `AddingRemoteWouldOverwrite`,\n PluginUndefined: `PluginUndefined`,\n CoreNotFound: `CoreNotFound`,\n PluginSchemaViolation: `PluginSchemaViolation`,\n PluginUnrecognized: `PluginUnrecognized`,\n AmbiguousShortOid: `AmbiguousShortOid`,\n ShortOidNotFound: `ShortOidNotFound`\n}\n\nfunction renderTemplate (template, values) {\n let result = template\n for (const key of Object.keys(values)) {\n let subs\n if (Array.isArray(values[key])) {\n subs = values[key].join(', ')\n } else {\n subs = String(values[key])\n }\n result = result.replace(new RegExp(`{ ${key} }`, 'g'), subs)\n }\n return result\n}\n\nexport class GitError extends Error {\n constructor (code, data) {\n super()\n this.name = code\n this.code = code\n this.data = data\n this.message = renderTemplate(messages[code], data || {})\n if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor)\n }\n toJSON () {\n return {\n code: this.code,\n data: this.data,\n caller: this.caller,\n message: this.message\n }\n }\n toString () {\n return this.stack.toString()\n }\n}\n","import pify from 'pify'\n\nimport { E, GitError } from '../models/GitError.js'\nimport { compareStrings } from '../utils/compareStrings.js'\nimport { dirname } from '../utils/dirname.js'\nimport { sleep } from '../utils/sleep.js'\n\nconst delayedReleases = new Map()\n/**\n * This is just a collection of helper functions really. At least that's how it started.\n */\nexport class FileSystem {\n constructor (fs) {\n // This is not actually the most logical place to put this, but in practice\n // putting the check here should work great.\n if (fs === undefined) {\n throw new GitError(E.PluginUndefined, { plugin: 'fs' })\n }\n if (typeof fs._readFile !== 'undefined') return fs\n if (fs.promises) {\n this._readFile = fs.promises.readFile.bind(fs.promises)\n this._writeFile = fs.promises.writeFile.bind(fs.promises)\n this._mkdir = fs.promises.mkdir.bind(fs.promises)\n this._rmdir = fs.promises.rmdir.bind(fs.promises)\n this._unlink = fs.promises.unlink.bind(fs.promises)\n this._stat = fs.promises.stat.bind(fs.promises)\n this._lstat = fs.promises.lstat.bind(fs.promises)\n this._readdir = fs.promises.readdir.bind(fs.promises)\n this._readlink = fs.promises.readlink.bind(fs.promises)\n this._symlink = fs.promises.symlink.bind(fs.promises)\n } else {\n this._readFile = pify(fs.readFile.bind(fs))\n this._writeFile = pify(fs.writeFile.bind(fs))\n this._mkdir = pify(fs.mkdir.bind(fs))\n this._rmdir = pify(fs.rmdir.bind(fs))\n this._unlink = pify(fs.unlink.bind(fs))\n this._stat = pify(fs.stat.bind(fs))\n this._lstat = pify(fs.lstat.bind(fs))\n this._readdir = pify(fs.readdir.bind(fs))\n this._readlink = pify(fs.readlink.bind(fs))\n this._symlink = pify(fs.symlink.bind(fs))\n }\n }\n /**\n * Return true if a file exists, false if it doesn't exist.\n * Rethrows errors that aren't related to file existance.\n */\n async exists (filepath, options = {}) {\n try {\n await this._stat(filepath)\n return true\n } catch (err) {\n if (err.code === 'ENOENT' || err.code === 'ENOTDIR') {\n return false\n } else {\n console.log('Unhandled error in \"FileSystem.exists()\" function', err)\n throw err\n }\n }\n }\n /**\n * Return the contents of a file if it exists, otherwise returns null.\n */\n async read (filepath, options = {}) {\n try {\n let buffer = await this._readFile(filepath, options)\n // Convert plain ArrayBuffers to Buffers\n if (typeof buffer !== 'string') {\n buffer = Buffer.from(buffer)\n }\n return buffer\n } catch (err) {\n return null\n }\n }\n /**\n * Write a file (creating missing directories if need be) without throwing errors.\n */\n async write (filepath, contents, options = {}) {\n try {\n await this._writeFile(filepath, contents, options)\n return\n } catch (err) {\n // Hmm. Let's try mkdirp and try again.\n await this.mkdir(dirname(filepath))\n await this._writeFile(filepath, contents, options)\n }\n }\n /**\n * Make a directory (or series of nested directories) without throwing an error if it already exists.\n */\n async mkdir (filepath, _selfCall = false) {\n try {\n await this._mkdir(filepath)\n return\n } catch (err) {\n // If err is null then operation succeeded!\n if (err === null) return\n // If the directory already exists, that's OK!\n if (err.code === 'EEXIST') return\n // Avoid infinite loops of failure\n if (_selfCall) throw err\n // If we got a \"no such file or directory error\" backup and try again.\n if (err.code === 'ENOENT') {\n let parent = dirname(filepath)\n // Check to see if we've gone too far\n if (parent === '.' || parent === '/' || parent === filepath) throw err\n // Infinite recursion, what could go wrong?\n await this.mkdir(parent)\n await this.mkdir(filepath, true)\n }\n }\n }\n /**\n * Delete a file without throwing an error if it is already deleted.\n */\n async rm (filepath) {\n try {\n await this._unlink(filepath)\n } catch (err) {\n if (err.code !== 'ENOENT') throw err\n }\n }\n /**\n * Read a directory without throwing an error is the directory doesn't exist\n */\n async readdir (filepath) {\n try {\n let names = await this._readdir(filepath)\n // Ordering is not guaranteed, and system specific (Windows vs Unix)\n // so we must sort them ourselves.\n names.sort(compareStrings)\n return names\n } catch (err) {\n if (err.code === 'ENOTDIR') return null\n return []\n }\n }\n /**\n * Return a flast list of all the files nested inside a directory\n *\n * Based on an elegant concurrent recursive solution from SO\n * https://stackoverflow.com/a/45130990/2168416\n */\n async readdirDeep (dir) {\n const subdirs = await this._readdir(dir)\n const files = await Promise.all(\n subdirs.map(async subdir => {\n const res = dir + '/' + subdir\n return (await this._stat(res)).isDirectory()\n ? this.readdirDeep(res)\n : res\n })\n )\n return files.reduce((a, f) => a.concat(f), [])\n }\n /**\n * Return the Stats of a file/symlink if it exists, otherwise returns null.\n * Rethrows errors that aren't related to file existance.\n */\n async lstat (filename) {\n try {\n let stats = await this._lstat(filename)\n return stats\n } catch (err) {\n if (err.code === 'ENOENT') {\n return null\n }\n throw err\n }\n }\n /**\n * Reads the contents of a symlink if it exists, otherwise returns null.\n * Rethrows errors that aren't related to file existance.\n */\n async readlink (filename, opts = { encoding: 'buffer' }) {\n // Note: FileSystem.readlink returns a buffer by default\n // so we can dump it into GitObject.write just like any other file.\n try {\n return this._readlink(filename, opts)\n } catch (err) {\n if (err.code === 'ENOENT') {\n return null\n }\n throw err\n }\n }\n /**\n * Write the contents of buffer to a symlink.\n */\n async writelink (filename, buffer) {\n return this._symlink(buffer.toString('utf8'), filename)\n }\n\n async lock (filename, triesLeft = 3) {\n // check to see if we still have it\n if (delayedReleases.has(filename)) {\n clearTimeout(delayedReleases.get(filename))\n delayedReleases.delete(filename)\n return\n }\n if (triesLeft === 0) {\n throw new GitError(E.AcquireLockFileFail, { filename })\n }\n try {\n await this._mkdir(`${filename}.lock`)\n } catch (err) {\n if (err.code === 'EEXIST') {\n await sleep(100)\n await this.lock(filename, triesLeft - 1)\n }\n }\n }\n\n async unlock (filename, delayRelease = 50) {\n if (delayedReleases.has(filename)) {\n throw new GitError(E.DoubleReleaseLockFileFail, { filename })\n }\n // Basically, we lie and say it was deleted ASAP.\n // But really we wait a bit to see if you want to acquire it again.\n delayedReleases.set(\n filename,\n setTimeout(async () => {\n delayedReleases.delete(filename)\n await this._rmdir(`${filename}.lock`)\n }, delayRelease)\n )\n }\n}\n","export function normalizePath (path) {\n return path\n .replace(/\\/\\.\\//g, '/') // Replace '/./' with '/'\n .replace(/\\/{2,}/g, '/') // Replace consecutive '/'\n .replace(/^\\/\\.$/, '/') // if path === '/.' return '/'\n .replace(/^\\.\\/$/, '.') // if path === './' return '.'\n .replace(/^\\.\\//, '') // Remove leading './'\n .replace(/\\/\\.$/, '') // Remove trailing '/.'\n .replace(/(.+)\\/$/, '$1') // Remove trailing '/'\n .replace(/^$/, '.') // if path === '' return '.'\n}\n","// For some reason path.posix.join is undefined in webpack\n// Also, this is just much smaller\nimport { normalizePath } from './normalizePath.js'\n\nexport function join (...parts) {\n return normalizePath(parts.map(normalizePath).join('/'))\n}\n","import { E, GitError } from '../models/GitError'\n\n// A collection of plugins is called a core.\n// 99.99% of the time you will only need a single core,\n// Because if you load isomorphic-git in an entirely new execution context\n// (say a WebWorker) you'll have an entirely separate instance of the module itself\n// and therefore a separate core. HOWEVER, for testing purposes, or a weird\n// multi-tenant environment where you need two distinct instances of isomorphic-git's\n// plugin stack but they share the same module instance - IDK maybe you are writing\n// a tool that copies git objects between different filesystems so you want two\n// cores with different filesystem modules. Anyway, it is architected that way.\n\nclass PluginCore extends Map {\n set (key, value) {\n const verifySchema = (key, value) => {\n // ugh. this sucks\n if (key === 'fs' && value.promises) {\n value = value.promises\n }\n const pluginSchemas = {\n credentialManager: ['fill', 'approved', 'rejected'],\n emitter: ['emit'],\n fs: [\n 'lstat',\n 'mkdir',\n 'readdir',\n 'readFile',\n 'rmdir',\n 'stat',\n 'unlink',\n 'writeFile'\n ],\n pgp: ['sign', 'verify'],\n http: []\n }\n if (!pluginSchemas.hasOwnProperty(key)) {\n throw new GitError(E.PluginUnrecognized, { plugin: key })\n }\n for (let method of pluginSchemas[key]) {\n if (value[method] === undefined) {\n throw new GitError(E.PluginSchemaViolation, { plugin: key, method })\n }\n }\n }\n verifySchema(key, value)\n // There can be only one.\n super.set(key, value)\n }\n get (key) {\n // Critical plugins throw an error instead of returning undefined.\n const critical = new Set(['credentialManager', 'fs', 'pgp'])\n if (!super.has(key) && critical.has(key)) {\n throw new GitError(E.PluginUndefined, { plugin: key })\n }\n return super.get(key)\n }\n}\n\n// 99.99% of the time you can simply import { plugins } instead of cores.\nexport const plugins = new PluginCore()\n\nconst _cores = new Map([['default', plugins]])\n\nexport const cores = {\n // 'get' validates that a core has been registered\n get (key) {\n if (_cores.has(key)) {\n return _cores.get(key)\n } else {\n throw new GitError(E.CoreNotFound, { core: key })\n }\n },\n // 'create' works just like get but will create the core if it doesn't exist yet\n create (key) {\n if (_cores.has(key)) {\n return _cores.get(key)\n } else {\n _cores.set(key, new Map())\n return _cores.get(key)\n }\n }\n}\n","export class GitPackedRefs {\n constructor (text) {\n this.refs = new Map()\n this.parsedConfig = []\n if (text) {\n let key = null\n this.parsedConfig = text\n .trim()\n .split('\\n')\n .map(line => {\n if (/^\\s*#/.test(line)) {\n return { line, comment: true }\n }\n const i = line.indexOf(' ')\n if (line.startsWith('^')) {\n // This is a oid for the commit associated with the annotated tag immediately preceding this line.\n // Trim off the '^'\n const value = line.slice(1)\n // The tagname^{} syntax is based on the output of `git show-ref --tags -d`\n this.refs.set(key + '^{}', value)\n return { line, ref: key, peeled: value }\n } else {\n // This is an oid followed by the ref name\n const value = line.slice(0, i)\n key = line.slice(i + 1)\n this.refs.set(key, value)\n return { line, ref: key, oid: value }\n }\n })\n }\n return this\n }\n static from (text) {\n return new GitPackedRefs(text)\n }\n delete (ref) {\n this.parsedConfig = this.parsedConfig.filter(entry => entry.ref !== ref)\n this.refs.delete(ref)\n }\n toString () {\n return this.parsedConfig.map(({ line }) => line).join('\\n') + '\\n'\n }\n}\n","export function compareRefNames (a, b) {\n // https://stackoverflow.com/a/40355107/2168416\n let _a = a.replace(/\\^\\{\\}$/, '')\n let _b = b.replace(/\\^\\{\\}$/, '')\n let tmp = -(_a < _b) || +(_a > _b)\n if (tmp === 0) {\n return a.endsWith('^{}') ? 1 : -1\n }\n return tmp\n}\n","// This is a convenience wrapper for reading and writing files in the 'refs' directory.\nimport { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { GitPackedRefs } from '../models/GitPackedRefs.js'\nimport { GitRefSpecSet } from '../models/GitRefSpecSet.js'\nimport { compareRefNames } from '../utils/compareRefNames.js'\nimport { join } from '../utils/join.js'\n\nimport { GitConfigManager } from './GitConfigManager'\n\n// @see https://git-scm.com/docs/git-rev-parse.html#_specifying_revisions\nconst refpaths = ref => [\n `${ref}`,\n `refs/${ref}`,\n `refs/tags/${ref}`,\n `refs/heads/${ref}`,\n `refs/remotes/${ref}`,\n `refs/remotes/${ref}/HEAD`\n]\n\n// @see https://git-scm.com/docs/gitrepository-layout\nconst GIT_FILES = ['config', 'description', 'index', 'shallow', 'commondir']\n\nexport class GitRefManager {\n static async updateRemoteRefs ({\n fs: _fs,\n gitdir,\n remote,\n refs,\n symrefs,\n tags,\n refspecs = undefined\n }) {\n const fs = new FileSystem(_fs)\n // Validate input\n for (let value of refs.values()) {\n if (!value.match(/[0-9a-f]{40}/)) {\n throw new GitError(E.NotAnOidFail, { value })\n }\n }\n const config = await GitConfigManager.get({ fs, gitdir })\n if (!refspecs) {\n refspecs = await config.getall(`remote.${remote}.fetch`)\n if (refspecs.length === 0) {\n throw new GitError(E.NoRefspecConfiguredError, { remote })\n }\n // There's some interesting behavior with HEAD that doesn't follow the refspec.\n refspecs.unshift(`+HEAD:refs/remotes/${remote}/HEAD`)\n }\n const refspec = GitRefSpecSet.from(refspecs)\n let actualRefsToWrite = new Map()\n // Add all tags if the fetch tags argument is true.\n if (tags) {\n for (const serverRef of refs.keys()) {\n if (serverRef.startsWith('refs/tags') && !serverRef.endsWith('^{}')) {\n const filename = join(gitdir, serverRef)\n // Git's behavior is to only fetch tags that do not conflict with tags already present.\n if (!(await fs.exists(filename))) {\n // If there is a dereferenced an annotated tag value available, prefer that.\n const oid = refs.get(serverRef + '^{}') || refs.get(serverRef)\n actualRefsToWrite.set(serverRef, oid)\n }\n }\n }\n }\n // Combine refs and symrefs giving symrefs priority\n let refTranslations = refspec.translate([...refs.keys()])\n for (let [serverRef, translatedRef] of refTranslations) {\n let value = refs.get(serverRef)\n actualRefsToWrite.set(translatedRef, value)\n }\n let symrefTranslations = refspec.translate([...symrefs.keys()])\n for (let [serverRef, translatedRef] of symrefTranslations) {\n let value = symrefs.get(serverRef)\n let symtarget = refspec.translateOne(value)\n if (symtarget) {\n actualRefsToWrite.set(translatedRef, `ref: ${symtarget}`)\n }\n }\n // Update files\n // TODO: For large repos with a history of thousands of pull requests\n // (i.e. gitlab-ce) it would be vastly more efficient to write them\n // to .git/packed-refs.\n // The trick is to make sure we a) don't write a packed ref that is\n // already shadowed by a loose ref and b) don't loose any refs already\n // in packed-refs. Doing this efficiently may be difficult. A\n // solution that might work is\n // a) load the current packed-refs file\n // b) add actualRefsToWrite, overriding the existing values if present\n // c) enumerate all the loose refs currently in .git/refs/remotes/${remote}\n // d) overwrite their value with the new value.\n // Examples of refs we need to avoid writing in loose format for efficieny's sake\n // are .git/refs/remotes/origin/refs/remotes/remote_mirror_3059\n // and .git/refs/remotes/origin/refs/merge-requests\n for (let [key, value] of actualRefsToWrite) {\n await fs.write(join(gitdir, key), `${value.trim()}\\n`, 'utf8')\n }\n }\n // TODO: make this less crude?\n static async writeRef ({ fs: _fs, gitdir, ref, value }) {\n const fs = new FileSystem(_fs)\n // Validate input\n if (!value.match(/[0-9a-f]{40}/)) {\n throw new GitError(E.NotAnOidFail, { value })\n }\n await fs.write(join(gitdir, ref), `${value.trim()}\\n`, 'utf8')\n }\n static async writeSymbolicRef ({ fs: _fs, gitdir, ref, value }) {\n const fs = new FileSystem(_fs)\n await fs.write(join(gitdir, ref), 'ref: ' + `${value.trim()}\\n`, 'utf8')\n }\n static async deleteRef ({ fs: _fs, gitdir, ref }) {\n const fs = new FileSystem(_fs)\n // Delete regular ref\n await fs.rm(join(gitdir, ref))\n // Delete any packed ref\n let text = await fs.read(`${gitdir}/packed-refs`, { encoding: 'utf8' })\n const packed = GitPackedRefs.from(text)\n if (packed.refs.has(ref)) {\n packed.delete(ref)\n text = packed.toString()\n await fs.write(`${gitdir}/packed-refs`, text, { encoding: 'utf8' })\n }\n }\n static async resolve ({ fs: _fs, gitdir, ref, depth = undefined }) {\n const fs = new FileSystem(_fs)\n if (depth !== undefined) {\n depth--\n if (depth === -1) {\n return ref\n }\n }\n let sha\n // Is it a ref pointer?\n if (ref.startsWith('ref: ')) {\n ref = ref.slice('ref: '.length)\n return GitRefManager.resolve({ fs, gitdir, ref, depth })\n }\n // Is it a complete and valid SHA?\n if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) {\n return ref\n }\n // We need to alternate between the file system and the packed-refs\n let packedMap = await GitRefManager.packedRefs({ fs, gitdir })\n // Look in all the proper paths, in this order\n const allpaths = refpaths(ref).filter(p => !GIT_FILES.includes(p)) // exclude git system files (#709)\n\n for (let ref of allpaths) {\n sha =\n (await fs.read(`${gitdir}/${ref}`, { encoding: 'utf8' })) ||\n packedMap.get(ref)\n if (sha) {\n return GitRefManager.resolve({ fs, gitdir, ref: sha.trim(), depth })\n }\n }\n // Do we give up?\n throw new GitError(E.ResolveRefError, { ref })\n }\n static async exists ({ fs, gitdir, ref }) {\n try {\n await GitRefManager.expand({ fs, gitdir, ref })\n return true\n } catch (err) {\n return false\n }\n }\n static async expand ({ fs: _fs, gitdir, ref }) {\n const fs = new FileSystem(_fs)\n // Is it a complete and valid SHA?\n if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) {\n return ref\n }\n // We need to alternate between the file system and the packed-refs\n let packedMap = await GitRefManager.packedRefs({ fs, gitdir })\n // Look in all the proper paths, in this order\n const allpaths = refpaths(ref)\n for (let ref of allpaths) {\n if (await fs.exists(`${gitdir}/${ref}`)) return ref\n if (packedMap.has(ref)) return ref\n }\n // Do we give up?\n throw new GitError(E.ExpandRefError, { ref })\n }\n static async expandAgainstMap ({ ref, map }) {\n // Look in all the proper paths, in this order\n const allpaths = refpaths(ref)\n for (let ref of allpaths) {\n if (await map.has(ref)) return ref\n }\n // Do we give up?\n throw new GitError(E.ExpandRefError, { ref })\n }\n static resolveAgainstMap ({ ref, fullref = ref, depth = undefined, map }) {\n if (depth !== undefined) {\n depth--\n if (depth === -1) {\n return { fullref, oid: ref }\n }\n }\n // Is it a ref pointer?\n if (ref.startsWith('ref: ')) {\n ref = ref.slice('ref: '.length)\n return GitRefManager.resolveAgainstMap({ ref, fullref, depth, map })\n }\n // Is it a complete and valid SHA?\n if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) {\n return { fullref, oid: ref }\n }\n // Look in all the proper paths, in this order\n const allpaths = refpaths(ref)\n for (let ref of allpaths) {\n let sha = map.get(ref)\n if (sha) {\n return GitRefManager.resolveAgainstMap({\n ref: sha.trim(),\n fullref: ref,\n depth,\n map\n })\n }\n }\n // Do we give up?\n throw new GitError(E.ResolveRefError, { ref })\n }\n static async packedRefs ({ fs: _fs, gitdir }) {\n const fs = new FileSystem(_fs)\n const text = await fs.read(`${gitdir}/packed-refs`, { encoding: 'utf8' })\n const packed = GitPackedRefs.from(text)\n return packed.refs\n }\n // List all the refs that match the `filepath` prefix\n static async listRefs ({ fs: _fs, gitdir, filepath }) {\n const fs = new FileSystem(_fs)\n let packedMap = GitRefManager.packedRefs({ fs, gitdir })\n let files = null\n try {\n files = await fs.readdirDeep(`${gitdir}/${filepath}`)\n files = files.map(x => x.replace(`${gitdir}/${filepath}/`, ''))\n } catch (err) {\n files = []\n }\n\n for (let key of (await packedMap).keys()) {\n // filter by prefix\n if (key.startsWith(filepath)) {\n // remove prefix\n key = key.replace(filepath + '/', '')\n // Don't include duplicates; the loose files have precedence anyway\n if (!files.includes(key)) {\n files.push(key)\n }\n }\n }\n // since we just appended things onto an array, we need to sort them now\n files.sort(compareRefNames)\n return files\n }\n static async listBranches ({ fs: _fs, gitdir, remote }) {\n const fs = new FileSystem(_fs)\n if (remote) {\n return GitRefManager.listRefs({\n fs,\n gitdir,\n filepath: `refs/remotes/${remote}`\n })\n } else {\n return GitRefManager.listRefs({ fs, gitdir, filepath: `refs/heads` })\n }\n }\n static async listTags ({ fs: _fs, gitdir }) {\n const fs = new FileSystem(_fs)\n let tags = await GitRefManager.listRefs({\n fs,\n gitdir,\n filepath: `refs/tags`\n })\n return tags.filter(x => !x.endsWith('^{}'))\n }\n}\n","/* global performance */\nvar perf = typeof performance !== 'undefined' && performance;\n\nvar now = perf && perf.now ? function () { return perf.now(); } : function () { return Date.now(); };\n\nfunction throwIfEmpty (name) {\n if (!name) {\n throw new Error('name must be non-empty')\n }\n}\n\n// simple binary sort insertion\nfunction insertSorted (arr, item) {\n var low = 0;\n var high = arr.length;\n var mid;\n while (low < high) {\n mid = (low + high) >>> 1; // like (num / 2) but faster\n if (arr[mid].startTime < item.startTime) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n arr.splice(low, 0, item);\n}\n\nvar mark;\nvar stop;\nvar getEntries;\nvar clear;\n\nif (perf && perf.mark) {\n mark = function (name) {\n throwIfEmpty(name);\n perf.mark((\"start \" + name));\n };\n stop = function (name) {\n throwIfEmpty(name);\n perf.mark((\"end \" + name));\n perf.measure(name, (\"start \" + name), (\"end \" + name));\n var entries = perf.getEntriesByName(name);\n return entries[entries.length - 1]\n };\n getEntries = function () { return perf.getEntriesByType('measure'); };\n clear = function () {\n perf.clearMarks();\n perf.clearMeasures();\n };\n} else {\n var marks = {};\n var entries = [];\n mark = function (name) {\n throwIfEmpty(name);\n var startTime = now();\n marks['$' + name] = startTime;\n };\n stop = function (name) {\n throwIfEmpty(name);\n var endTime = now();\n var startTime = marks['$' + name];\n if (!startTime) {\n throw new Error((\"no known mark: \" + name))\n }\n var entry = {\n startTime: startTime,\n name: name,\n duration: endTime - startTime,\n entryType: 'measure'\n };\n // per the spec this should be at least 150:\n // https://www.w3.org/TR/resource-timing-1/#extensions-performance-interface\n // we just have no limit, per Chrome and Edge's de-facto behavior\n insertSorted(entries, entry);\n return entry\n };\n getEntries = function () { return entries; };\n clear = function () {\n marks = {};\n entries = [];\n };\n}\n\nexport { mark, stop, getEntries, clear };\n","import pako from 'pako'\n\nimport { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { GitObject } from '../models/GitObject.js'\nimport { readObjectLoose } from '../storage/readObjectLoose.js'\nimport { readObjectPacked } from '../storage/readObjectPacked.js'\nimport { shasum } from '../utils/shasum.js'\n\nexport async function readObject ({ fs: _fs, gitdir, oid, format = 'content' }) {\n const fs = new FileSystem(_fs)\n // Curry the current read method so that the packfile un-deltification\n // process can acquire external ref-deltas.\n const getExternalRefDelta = oid => readObject({ fs, gitdir, oid })\n\n // Look for it in the loose object directory.\n let result = await readObjectLoose({ fs, gitdir, oid })\n // Check to see if it's in a packfile.\n if (!result) {\n result = await readObjectPacked({ fs, gitdir, oid, getExternalRefDelta })\n }\n // Finally\n if (!result) {\n throw new GitError(E.ReadObjectFail, { oid })\n }\n if (format === 'deflated') {\n return result\n }\n // BEHOLD! THE ONLY TIME I'VE EVER WANTED TO USE A CASE STATEMENT WITH FOLLOWTHROUGH!\n // eslint-ignore\n /* eslint-disable no-fallthrough */\n switch (result.format) {\n case 'deflated':\n let buffer = Buffer.from(pako.inflate(result.object))\n result = { format: 'wrapped', object: buffer, source: result.source }\n case 'wrapped':\n if (format === 'wrapped' && result.format === 'wrapped') {\n return result\n }\n let sha = shasum(result.object)\n if (sha !== oid) {\n throw new GitError(E.InternalFail, {\n message: `SHA check failed! Expected ${oid}, computed ${sha}`\n })\n }\n let { object, type } = GitObject.unwrap(buffer)\n result = { type, format: 'content', object, source: result.source }\n case 'content':\n if (format === 'content') return result\n break\n default:\n throw new GitError(E.InternalFail, {\n message: `invalid format \"${result.format}\"`\n })\n }\n /* eslint-enable no-fallthrough */\n}\n","import { E, GitError } from '../models/GitError.js'\nimport { formatAuthor } from '../utils/formatAuthor.js'\nimport { indent } from '../utils/indent.js'\nimport { normalizeNewlines } from '../utils/normalizeNewlines.js'\nimport { outdent } from '../utils/outdent.js'\nimport { parseAuthor } from '../utils/parseAuthor.js'\n\nexport class GitCommit {\n constructor (commit) {\n if (typeof commit === 'string') {\n this._commit = commit\n } else if (Buffer.isBuffer(commit)) {\n this._commit = commit.toString('utf8')\n } else if (typeof commit === 'object') {\n this._commit = GitCommit.render(commit)\n } else {\n throw new GitError(E.InternalFail, {\n message: 'invalid type passed to GitCommit constructor'\n })\n }\n }\n\n static fromPayloadSignature ({ payload, signature }) {\n let headers = GitCommit.justHeaders(payload)\n let message = GitCommit.justMessage(payload)\n let commit = normalizeNewlines(\n headers + '\\ngpgsig' + indent(signature) + '\\n' + message\n )\n return new GitCommit(commit)\n }\n\n static from (commit) {\n return new GitCommit(commit)\n }\n\n toObject () {\n return Buffer.from(this._commit, 'utf8')\n }\n\n // Todo: allow setting the headers and message\n headers () {\n return this.parseHeaders()\n }\n\n // Todo: allow setting the headers and message\n message () {\n return GitCommit.justMessage(this._commit)\n }\n\n parse () {\n return Object.assign({ message: this.message() }, this.headers())\n }\n\n static justMessage (commit) {\n return normalizeNewlines(commit.slice(commit.indexOf('\\n\\n') + 2))\n }\n\n static justHeaders (commit) {\n return commit.slice(0, commit.indexOf('\\n\\n'))\n }\n\n parseHeaders () {\n let headers = GitCommit.justHeaders(this._commit).split('\\n')\n let hs = []\n for (let h of headers) {\n if (h[0] === ' ') {\n // combine with previous header (without space indent)\n hs[hs.length - 1] += '\\n' + h.slice(1)\n } else {\n hs.push(h)\n }\n }\n let obj = {\n parent: []\n }\n for (let h of hs) {\n let key = h.slice(0, h.indexOf(' '))\n let value = h.slice(h.indexOf(' ') + 1)\n if (Array.isArray(obj[key])) {\n obj[key].push(value)\n } else {\n obj[key] = value\n }\n }\n if (obj.author) {\n obj.author = parseAuthor(obj.author)\n }\n if (obj.committer) {\n obj.committer = parseAuthor(obj.committer)\n }\n return obj\n }\n\n static renderHeaders (obj) {\n let headers = ''\n if (obj.tree) {\n headers += `tree ${obj.tree}\\n`\n } else {\n headers += `tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\\n` // the null tree\n }\n if (obj.parent) {\n if (obj.parent.length === undefined) {\n throw new GitError(E.InternalFail, {\n message: `commit 'parent' property should be an array`\n })\n }\n for (let p of obj.parent) {\n headers += `parent ${p}\\n`\n }\n }\n let author = obj.author\n headers += `author ${formatAuthor(author)}\\n`\n let committer = obj.committer || obj.author\n headers += `committer ${formatAuthor(committer)}\\n`\n if (obj.gpgsig) {\n headers += 'gpgsig' + indent(obj.gpgsig)\n }\n return headers\n }\n\n static render (obj) {\n return GitCommit.renderHeaders(obj) + '\\n' + normalizeNewlines(obj.message)\n }\n\n render () {\n return this._commit\n }\n\n withoutSignature () {\n let commit = normalizeNewlines(this._commit)\n if (commit.indexOf('\\ngpgsig') === -1) return commit\n let headers = commit.slice(0, commit.indexOf('\\ngpgsig'))\n let message = commit.slice(\n commit.indexOf('-----END PGP SIGNATURE-----\\n') +\n '-----END PGP SIGNATURE-----\\n'.length\n )\n return normalizeNewlines(headers + '\\n' + message)\n }\n\n isolateSignature () {\n let signature = this._commit.slice(\n this._commit.indexOf('-----BEGIN PGP SIGNATURE-----'),\n this._commit.indexOf('-----END PGP SIGNATURE-----') +\n '-----END PGP SIGNATURE-----'.length\n )\n return outdent(signature)\n }\n\n static async sign (commit, pgp, secretKey) {\n const payload = commit.withoutSignature()\n const message = GitCommit.justMessage(commit._commit)\n let { signature } = await pgp.sign({ payload, secretKey })\n // renormalize the line endings to the one true line-ending\n signature = normalizeNewlines(signature)\n const headers = GitCommit.justHeaders(commit._commit)\n let signedCommit =\n headers + '\\n' + 'gpgsig' + indent(signature) + '\\n' + message\n // return a new commit object\n return GitCommit.from(signedCommit)\n }\n\n static async verify (commit, pgp, publicKey) {\n const payload = commit.withoutSignature()\n const signature = commit.isolateSignature()\n return pgp.verify({ payload, publicKey, signature })\n }\n}\n","/**\npkt-line Format\n---------------\n\nMuch (but not all) of the payload is described around pkt-lines.\n\nA pkt-line is a variable length binary string. The first four bytes\nof the line, the pkt-len, indicates the total length of the line,\nin hexadecimal. The pkt-len includes the 4 bytes used to contain\nthe length's hexadecimal representation.\n\nA pkt-line MAY contain binary data, so implementors MUST ensure\npkt-line parsing/formatting routines are 8-bit clean.\n\nA non-binary line SHOULD BE terminated by an LF, which if present\nMUST be included in the total length. Receivers MUST treat pkt-lines\nwith non-binary data the same whether or not they contain the trailing\nLF (stripping the LF if present, and not complaining when it is\nmissing).\n\nThe maximum length of a pkt-line's data component is 65516 bytes.\nImplementations MUST NOT send pkt-line whose length exceeds 65520\n(65516 bytes of payload + 4 bytes of length data).\n\nImplementations SHOULD NOT send an empty pkt-line (\"0004\").\n\nA pkt-line with a length field of 0 (\"0000\"), called a flush-pkt,\nis a special case and MUST be handled differently than an empty\npkt-line (\"0004\").\n\n----\n pkt-line = data-pkt / flush-pkt\n\n data-pkt = pkt-len pkt-payload\n pkt-len = 4*(HEXDIG)\n pkt-payload = (pkt-len - 4)*(OCTET)\n\n flush-pkt = \"0000\"\n----\n\nExamples (as C-style strings):\n\n----\n pkt-line actual value\n ---------------------------------\n \"0006a\\n\" \"a\\n\"\n \"0005a\" \"a\"\n \"000bfoobar\\n\" \"foobar\\n\"\n \"0004\" \"\"\n----\n*/\nimport { StreamReader } from '../utils/StreamReader.js'\nimport { padHex } from '../utils/padHex.js'\n\n// I'm really using this more as a namespace.\n// There's not a lot of \"state\" in a pkt-line\n\nexport class GitPktLine {\n static flush () {\n return Buffer.from('0000', 'utf8')\n }\n\n static encode (line) {\n if (typeof line === 'string') {\n line = Buffer.from(line)\n }\n let length = line.length + 4\n let hexlength = padHex(4, length)\n return Buffer.concat([Buffer.from(hexlength, 'utf8'), line])\n }\n\n static streamReader (stream) {\n const reader = new StreamReader(stream)\n return async function read () {\n try {\n let length = await reader.read(4)\n if (length == null) return true\n length = parseInt(length.toString('utf8'), 16)\n if (length === 0) return null\n let buffer = await reader.read(length - 4)\n if (buffer == null) return true\n return buffer\n } catch (err) {\n console.log('error', err)\n return true\n }\n }\n }\n}\n","let shouldLog = null\n\nexport function log (...args) {\n if (shouldLog === null) {\n shouldLog =\n (process &&\n process.env &&\n process.env.DEBUG &&\n (process.env.DEBUG === '*' ||\n process.env.DEBUG === 'isomorphic-git')) ||\n (typeof window !== 'undefined' &&\n typeof window.localStorage !== 'undefined' &&\n (window.localStorage.debug === '*' ||\n window.localStorage.debug === 'isomorphic-git'))\n }\n if (shouldLog) {\n console.log(...args)\n }\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","import Hash from 'sha.js/sha1'\n\n// This is modeled after @dominictarr's \"shasum\" module,\n// but without the 'json-stable-stringify' dependency and\n// extra type-casting features.\nexport function shasum (buffer) {\n return new Hash().update(buffer).digest('hex')\n}\n","export function normalizeNewlines (str) {\n // remove all \n str = str.replace(/\\r/g, '')\n // no extra newlines up front\n str = str.replace(/^\\n+/, '')\n // and a single newline at the end\n str = str.replace(/\\n+$/, '') + '\\n'\n return str\n}\n","import { E, GitError } from '../models/GitError.js'\nimport { formatAuthor } from '../utils/formatAuthor.js'\nimport { normalizeNewlines } from '../utils/normalizeNewlines.js'\nimport { parseAuthor } from '../utils/parseAuthor.js'\n\nexport class GitAnnotatedTag {\n constructor (tag) {\n if (typeof tag === 'string') {\n this._tag = tag\n } else if (Buffer.isBuffer(tag)) {\n this._tag = tag.toString('utf8')\n } else if (typeof tag === 'object') {\n this._tag = GitAnnotatedTag.render(tag)\n } else {\n throw new GitError(E.InternalFail, {\n message: 'invalid type passed to GitAnnotatedTag constructor'\n })\n }\n }\n\n static from (tag) {\n return new GitAnnotatedTag(tag)\n }\n\n static render (obj) {\n return `object ${obj.object}\ntype ${obj.type}\ntag ${obj.tag}\ntagger ${formatAuthor(obj.tagger)}\n\n${obj.message}\n${obj.signature ? obj.signature : ''}`\n }\n\n justHeaders () {\n return this._tag.slice(0, this._tag.indexOf('\\n\\n'))\n }\n\n message () {\n let tag = this.withoutSignature()\n return tag.slice(tag.indexOf('\\n\\n') + 2)\n }\n\n parse () {\n return Object.assign(this.headers(), {\n message: this.message(),\n signature: this.signature()\n })\n }\n\n render () {\n return this._tag\n }\n\n headers () {\n let headers = this.justHeaders().split('\\n')\n let hs = []\n for (let h of headers) {\n if (h[0] === ' ') {\n // combine with previous header (without space indent)\n hs[hs.length - 1] += '\\n' + h.slice(1)\n } else {\n hs.push(h)\n }\n }\n let obj = {}\n for (let h of hs) {\n let key = h.slice(0, h.indexOf(' '))\n let value = h.slice(h.indexOf(' ') + 1)\n if (Array.isArray(obj[key])) {\n obj[key].push(value)\n } else {\n obj[key] = value\n }\n }\n if (obj.tagger) {\n obj.tagger = parseAuthor(obj.tagger)\n }\n if (obj.committer) {\n obj.committer = parseAuthor(obj.committer)\n }\n return obj\n }\n\n withoutSignature () {\n let tag = normalizeNewlines(this._tag)\n if (tag.indexOf('\\n-----BEGIN PGP SIGNATURE-----') === -1) return tag\n return tag.slice(0, tag.lastIndexOf('\\n-----BEGIN PGP SIGNATURE-----'))\n }\n\n signature () {\n let signature = this._tag.slice(\n this._tag.indexOf('-----BEGIN PGP SIGNATURE-----'),\n this._tag.indexOf('-----END PGP SIGNATURE-----') +\n '-----END PGP SIGNATURE-----'.length\n )\n return normalizeNewlines(signature)\n }\n\n toObject () {\n return Buffer.from(this._tag, 'utf8')\n }\n\n static async sign (tag, pgp, secretKey) {\n const payload = tag.withoutSignature() + '\\n'\n let { signature } = await pgp.sign({ payload, secretKey })\n // renormalize the line endings to the one true line-ending\n signature = normalizeNewlines(signature)\n let signedTag = payload + signature\n // return a new tag object\n return GitAnnotatedTag.from(signedTag)\n }\n\n static async verify (tag, pgp, publicKey) {\n const payload = tag.withoutSignature() + '\\n'\n const signature = tag.signature()\n return pgp.verify({ payload, publicKey, signature })\n }\n}\n","import { E, GitError } from '../models/GitError.js'\nimport { comparePath } from '../utils/comparePath.js'\n\n/*::\ntype TreeEntry = {\n mode: string,\n path: string,\n oid: string,\n type?: string\n}\n*/\n\nfunction mode2type (mode) {\n // prettier-ignore\n switch (mode) {\n case '040000': return 'tree'\n case '100644': return 'blob'\n case '100755': return 'blob'\n case '120000': return 'blob'\n case '160000': return 'commit'\n }\n throw new GitError(E.InternalFail, {\n message: `Unexpected GitTree entry mode: ${mode}`\n })\n}\n\nfunction parseBuffer (buffer) {\n let _entries = []\n let cursor = 0\n while (cursor < buffer.length) {\n let space = buffer.indexOf(32, cursor)\n if (space === -1) {\n throw new GitError(E.InternalFail, {\n message: `GitTree: Error parsing buffer at byte location ${cursor}: Could not find the next space character.`\n })\n }\n let nullchar = buffer.indexOf(0, cursor)\n if (nullchar === -1) {\n throw new GitError(E.InternalFail, {\n message: `GitTree: Error parsing buffer at byte location ${cursor}: Could not find the next null character.`\n })\n }\n let mode = buffer.slice(cursor, space).toString('utf8')\n if (mode === '40000') mode = '040000' // makes it line up neater in printed output\n let type = mode2type(mode)\n let path = buffer.slice(space + 1, nullchar).toString('utf8')\n let oid = buffer.slice(nullchar + 1, nullchar + 21).toString('hex')\n cursor = nullchar + 21\n _entries.push({ mode, path, oid, type })\n }\n return _entries\n}\n\nfunction limitModeToAllowed (mode) {\n if (typeof mode === 'number') {\n mode = mode.toString(8)\n }\n // tree\n if (mode.match(/^0?4.*/)) return '040000' // Directory\n if (mode.match(/^1006.*/)) return '100644' // Regular non-executable file\n if (mode.match(/^1007.*/)) return '100755' // Regular executable file\n if (mode.match(/^120.*/)) return '120000' // Symbolic link\n if (mode.match(/^160.*/)) return '160000' // Commit (git submodule reference)\n throw new GitError(E.InternalFail, {\n message: `Could not understand file mode: ${mode}`\n })\n}\n\nfunction nudgeIntoShape (entry) {\n if (!entry.oid && entry.sha) {\n entry.oid = entry.sha // Github\n }\n entry.mode = limitModeToAllowed(entry.mode) // index\n if (!entry.type) {\n entry.type = 'blob' // index\n }\n return entry\n}\n\nexport class GitTree {\n /*::\n _entries: Array\n */\n constructor (entries) {\n if (Buffer.isBuffer(entries)) {\n this._entries = parseBuffer(entries)\n // There appears to be an edge case (in this repo no less) where\n // the tree is NOT sorted as expected if some directories end with \".git\"\n this._entries.sort(comparePath)\n } else if (Array.isArray(entries)) {\n this._entries = entries.map(nudgeIntoShape)\n } else {\n throw new GitError(E.InternalFail, {\n message: 'invalid type passed to GitTree constructor'\n })\n }\n }\n static from (tree) {\n return new GitTree(tree)\n }\n render () {\n return this._entries\n .map(entry => `${entry.mode} ${entry.type} ${entry.oid} ${entry.path}`)\n .join('\\n')\n }\n toObject () {\n return Buffer.concat(\n this._entries.map(entry => {\n let mode = Buffer.from(entry.mode.replace(/^0/, ''))\n let space = Buffer.from(' ')\n let path = Buffer.from(entry.path, 'utf8')\n let nullchar = Buffer.from([0])\n let oid = Buffer.from(entry.oid, 'hex')\n return Buffer.concat([mode, space, path, nullchar, oid])\n })\n )\n }\n entries () {\n return this._entries\n }\n * [Symbol.iterator] () {\n for (let entry of this._entries) {\n yield entry\n }\n }\n}\n","'use strict';\n\nconst processFn = (fn, options) => function (...args) {\n\tconst P = options.promiseModule;\n\n\treturn new P((resolve, reject) => {\n\t\tif (options.multiArgs) {\n\t\t\targs.push((...result) => {\n\t\t\t\tif (options.errorFirst) {\n\t\t\t\t\tif (result[0]) {\n\t\t\t\t\t\treject(result);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult.shift();\n\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (options.errorFirst) {\n\t\t\targs.push((error, result) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\targs.push(resolve);\n\t\t}\n\n\t\tfn.apply(this, args);\n\t});\n};\n\nmodule.exports = (input, options) => {\n\toptions = Object.assign({\n\t\texclude: [/.+(Sync|Stream)$/],\n\t\terrorFirst: true,\n\t\tpromiseModule: Promise\n\t}, options);\n\n\tconst objType = typeof input;\n\tif (!(input !== null && (objType === 'object' || objType === 'function'))) {\n\t\tthrow new TypeError(`Expected \\`input\\` to be a \\`Function\\` or \\`Object\\`, got \\`${input === null ? 'null' : objType}\\``);\n\t}\n\n\tconst filter = key => {\n\t\tconst match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);\n\t\treturn options.include ? options.include.some(match) : !options.exclude.some(match);\n\t};\n\n\tlet ret;\n\tif (objType === 'function') {\n\t\tret = function (...args) {\n\t\t\treturn options.excludeMain ? input(...args) : processFn(input, options).apply(this, args);\n\t\t};\n\t} else {\n\t\tret = Object.create(Object.getPrototypeOf(input));\n\t}\n\n\tfor (const key in input) { // eslint-disable-line guard-for-in\n\t\tconst property = input[key];\n\t\tret[key] = typeof property === 'function' && filter(key) ? processFn(property, options) : property;\n\t}\n\n\treturn ret;\n};\n","// import LockManager from 'travix-lock-manager'\nimport AsyncLock from 'async-lock'\n\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitIndex } from '../models/GitIndex.js'\n\n// import Lock from '../utils.js'\n\n// TODO: replace with an LRU cache?\nconst map = new Map()\n// const lm = new LockManager()\nlet lock = null\n\nexport class GitIndexManager {\n static async acquire ({ fs: _fs, filepath }, closure) {\n const fs = new FileSystem(_fs)\n if (lock === null) lock = new AsyncLock({ maxPending: Infinity })\n await lock.acquire(filepath, async function () {\n let index = map.get(filepath)\n if (index === undefined) {\n // Acquire a file lock while we're reading the index\n // to make sure other processes aren't writing to it\n // simultaneously, which could result in a corrupted index.\n // const fileLock = await Lock(filepath)\n const rawIndexFile = await fs.read(filepath)\n index = GitIndex.from(rawIndexFile)\n // cache the GitIndex object so we don't need to re-read it\n // every time.\n // TODO: save the stat data for the index so we know whether\n // the cached file is stale (modified by an outside process).\n map.set(filepath, index)\n // await fileLock.cancel()\n }\n await closure(index)\n if (index._dirty) {\n // Acquire a file lock while we're writing the index file\n // let fileLock = await Lock(filepath)\n const buffer = index.toObject()\n await fs.write(filepath, buffer)\n index._dirty = false\n }\n // For now, discard our cached object so that external index\n // manipulation is picked up. TODO: use lstat and compare\n // file times to determine if our cached object should be\n // discarded.\n map.delete(filepath)\n })\n }\n}\n","// Top level file is just a mixin of submodules & constants\n'use strict';\n\nvar assign = require('./lib/utils/common').assign;\n\nvar deflate = require('./lib/deflate');\nvar inflate = require('./lib/inflate');\nvar constants = require('./lib/zlib/constants');\n\nvar pako = {};\n\nassign(pako, deflate, inflate, constants);\n\nmodule.exports = pako;\n","// Modeled after https://github.com/tjfontaine/node-buffercursor\n// but with the goal of being much lighter weight.\nexport class BufferCursor {\n constructor (buffer) {\n this.buffer = buffer\n this._start = 0\n }\n eof () {\n return this._start >= this.buffer.length\n }\n tell () {\n return this._start\n }\n seek (n) {\n this._start = n\n }\n slice (n) {\n const r = this.buffer.slice(this._start, this._start + n)\n this._start += n\n return r\n }\n toString (enc, length) {\n const r = this.buffer.toString(enc, this._start, this._start + length)\n this._start += length\n return r\n }\n write (value, length, enc) {\n const r = this.buffer.write(value, this._start, length, enc)\n this._start += length\n return r\n }\n readUInt8 () {\n const r = this.buffer.readUInt8(this._start)\n this._start += 1\n return r\n }\n writeUInt8 (value) {\n const r = this.buffer.writeUInt8(value, this._start)\n this._start += 1\n return r\n }\n readUInt16BE () {\n const r = this.buffer.readUInt16BE(this._start)\n this._start += 2\n return r\n }\n writeUInt16BE (value) {\n const r = this.buffer.writeUInt16BE(value, this._start)\n this._start += 2\n return r\n }\n readUInt32BE () {\n const r = this.buffer.readUInt32BE(this._start)\n this._start += 4\n return r\n }\n writeUInt32BE (value) {\n const r = this.buffer.writeUInt32BE(value, this._start)\n this._start += 4\n return r\n }\n}\n","import { E, GitError } from '../models/GitError.js'\n\nexport class GitObject {\n static wrap ({ type, object }) {\n return Buffer.concat([\n Buffer.from(`${type} ${object.byteLength.toString()}\\x00`),\n Buffer.from(object)\n ])\n }\n static unwrap (buffer) {\n let s = buffer.indexOf(32) // first space\n let i = buffer.indexOf(0) // first null value\n let type = buffer.slice(0, s).toString('utf8') // get type of object\n let length = buffer.slice(s + 1, i).toString('utf8') // get type of object\n let actualLength = buffer.length - (i + 1)\n // verify length\n if (parseInt(length) !== actualLength) {\n throw new GitError(E.InternalFail, {\n message: `Length mismatch: expected ${length} bytes but got ${actualLength} instead.`\n })\n }\n return {\n type,\n object: Buffer.from(buffer.slice(i + 1))\n }\n }\n}\n","export function dirname (path) {\n let last = Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\\\'))\n if (last === -1) return '.'\n if (last === 0) return '/'\n return path.slice(0, last)\n}\n","import { FileSystem } from '../models/FileSystem.js'\nimport { GitConfig } from '../models/GitConfig.js'\n\nexport class GitConfigManager {\n static async get ({ fs: _fs, gitdir }) {\n const fs = new FileSystem(_fs)\n // We can improve efficiency later if needed.\n // TODO: read from full list of git config files\n let text = await fs.read(`${gitdir}/config`, { encoding: 'utf8' })\n return GitConfig.from(text)\n }\n static async save ({ fs: _fs, gitdir, config }) {\n const fs = new FileSystem(_fs)\n // We can improve efficiency later if needed.\n // TODO: handle saving to the correct global/user/repo location\n await fs.write(`${gitdir}/config`, config.toString(), {\n encoding: 'utf8'\n })\n }\n}\n","'use strict';\n\n\nvar TYPED_OK = (typeof Uint8Array !== 'undefined') &&\n (typeof Uint16Array !== 'undefined') &&\n (typeof Int32Array !== 'undefined');\n\nfunction _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (var p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n if (buf.length === size) { return buf; }\n if (buf.subarray) { return buf.subarray(0, size); }\n buf.length = size;\n return buf;\n};\n\n\nvar fnTyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n // Fallback to ordinary array\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n var i, l, len, pos, chunk, result;\n\n // calculate data length\n len = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n result = new Uint8Array(len);\n pos = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n }\n};\n\nvar fnUntyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n return [].concat.apply([], chunks);\n }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n if (on) {\n exports.Buf8 = Uint8Array;\n exports.Buf16 = Uint16Array;\n exports.Buf32 = Int32Array;\n exports.assign(exports, fnTyped);\n } else {\n exports.Buf8 = Array;\n exports.Buf16 = Array;\n exports.Buf32 = Array;\n exports.assign(exports, fnUntyped);\n }\n};\n\nexports.setTyped(TYPED_OK);\n","export const pkg = {\n name: 'isomorphic-git',\n version: '0.55.1',\n agent: 'git/isomorphic-git@0.55.1'\n}\n","import { getIterator } from './getIterator.js'\n\n// Currently 'for await' upsets my linters.\nexport async function forAwait (iterable, cb) {\n let iter = getIterator(iterable)\n while (true) {\n let { value, done } = await iter.next()\n if (value) await cb(value)\n if (done) break\n }\n if (iter.return) iter.return()\n}\n","import pako from 'pako'\n\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitObject } from '../models/GitObject.js'\nimport { writeObjectLoose } from '../storage/writeObjectLoose.js'\nimport { shasum } from '../utils/shasum.js'\n\nexport async function writeObject ({\n fs: _fs,\n gitdir,\n type,\n object,\n format = 'content',\n oid = undefined\n}) {\n const fs = new FileSystem(_fs)\n if (format !== 'deflated') {\n if (format !== 'wrapped') {\n object = GitObject.wrap({ type, object })\n }\n oid = shasum(object)\n object = Buffer.from(pako.deflate(object))\n }\n await writeObjectLoose({ fs, gitdir, object, format: 'deflated', oid })\n return oid\n}\n","/**\n * From https://github.com/git/git/blob/master/Documentation/technical/index-format.txt\n *\n * 32-bit mode, split into (high to low bits)\n *\n * 4-bit object type\n * valid values in binary are 1000 (regular file), 1010 (symbolic link)\n * and 1110 (gitlink)\n *\n * 3-bit unused\n *\n * 9-bit unix permission. Only 0755 and 0644 are valid for regular files.\n * Symbolic links and gitlinks have value 0 in this field.\n */\nexport function normalizeMode (mode) {\n // Note: BrowserFS will use -1 for \"unknown\"\n // I need to make it non-negative for these bitshifts to work.\n let type = mode > 0 ? mode >> 12 : 0\n // If it isn't valid, assume it as a \"regular file\"\n // 0100 = directory\n // 1000 = regular file\n // 1010 = symlink\n // 1110 = gitlink\n if (\n type !== 0b0100 &&\n type !== 0b1000 &&\n type !== 0b1010 &&\n type !== 0b1110\n ) {\n type = 0b1000\n }\n let permissions = mode & 0o777\n // Is the file executable? then 755. Else 644.\n if (permissions & 0b001001001) {\n permissions = 0o755\n } else {\n permissions = 0o644\n }\n // If it's not a regular file, scrub all permissions\n if (type !== 0b1000) permissions = 0\n return (type << 12) + permissions\n}\n","import { normalizeMode } from './normalizeMode'\n\nconst MAX_UINT32 = 2 ** 32\n\nfunction SecondsNanoseconds (\n givenSeconds,\n givenNanoseconds,\n milliseconds,\n date\n) {\n if (givenSeconds !== undefined && givenNanoseconds !== undefined) {\n return [givenSeconds, givenNanoseconds]\n }\n if (milliseconds === undefined) {\n milliseconds = date.valueOf()\n }\n const seconds = Math.floor(milliseconds / 1000)\n const nanoseconds = (milliseconds - seconds * 1000) * 1000000\n return [seconds, nanoseconds]\n}\n\nexport function normalizeStats (e) {\n const [ctimeSeconds, ctimeNanoseconds] = SecondsNanoseconds(\n e.ctimeSeconds,\n e.ctimeNanoseconds,\n e.ctimeMs,\n e.ctime\n )\n const [mtimeSeconds, mtimeNanoseconds] = SecondsNanoseconds(\n e.mtimeSeconds,\n e.mtimeNanoseconds,\n e.mtimeMs,\n e.mtime\n )\n\n return {\n ctimeSeconds: ctimeSeconds % MAX_UINT32,\n ctimeNanoseconds: ctimeNanoseconds % MAX_UINT32,\n mtimeSeconds: mtimeSeconds % MAX_UINT32,\n mtimeNanoseconds: mtimeNanoseconds % MAX_UINT32,\n dev: e.dev % MAX_UINT32,\n ino: e.ino % MAX_UINT32,\n mode: normalizeMode(e.mode % MAX_UINT32),\n uid: e.uid % MAX_UINT32,\n gid: e.gid % MAX_UINT32,\n // size of -1 happens over a BrowserFS HTTP Backend that doesn't serve Content-Length headers\n // (like the Karma webserver) because BrowserFS HTTP Backend uses HTTP HEAD requests to do fs.stat\n size: e.size > -1 ? e.size % MAX_UINT32 : 0\n }\n}\n","/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined\n * in FIPS PUB 180-1\n * Version 2.1a Copyright Paul Johnston 2000 - 2002.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for details.\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0\n]\n\nvar W = new Array(80)\n\nfunction Sha1 () {\n this.init()\n this._w = W\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha1, Hash)\n\nSha1.prototype.init = function () {\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n\n return this\n}\n\nfunction rotl1 (num) {\n return (num << 1) | (num >>> 31)\n}\n\nfunction rotl5 (num) {\n return (num << 5) | (num >>> 27)\n}\n\nfunction rotl30 (num) {\n return (num << 30) | (num >>> 2)\n}\n\nfunction ft (s, b, c, d) {\n if (s === 0) return (b & c) | ((~b) & d)\n if (s === 2) return (b & c) | (b & d) | (c & d)\n return b ^ c ^ d\n}\n\nSha1.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16])\n\n for (var j = 0; j < 80; ++j) {\n var s = ~~(j / 20)\n var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0\n\n e = d\n d = c\n c = rotl30(b)\n b = a\n a = t\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n}\n\nSha1.prototype._hash = function () {\n var H = Buffer.allocUnsafe(20)\n\n H.writeInt32BE(this._a | 0, 0)\n H.writeInt32BE(this._b | 0, 4)\n H.writeInt32BE(this._c | 0, 8)\n H.writeInt32BE(this._d | 0, 12)\n H.writeInt32BE(this._e | 0, 16)\n\n return H\n}\n\nmodule.exports = Sha1\n","export function padHex (b, n) {\n let s = n.toString(16)\n return '0'.repeat(b - s.length) + s\n}\n","export function basename (path) {\n let last = Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\\\'))\n if (last > -1) {\n path = path.slice(last + 1)\n }\n return path\n}\n","export function parseAuthor (author) {\n let [, name, email, timestamp, offset] = author.match(\n /^(.*) <(.*)> (.*) (.*)$/\n )\n return {\n name: name,\n email: email,\n timestamp: Number(timestamp),\n timezoneOffset: parseTimezoneOffset(offset)\n }\n}\n\n// The amount of effort that went into crafting these cases to handle\n// -0 (just so we don't lose that information when parsing and reconstructing)\n// but can also default to +0 was extraordinary.\n\nfunction parseTimezoneOffset (offset) {\n let [, sign, hours, minutes] = offset.match(/(\\+|-)(\\d\\d)(\\d\\d)/)\n minutes = (sign === '+' ? 1 : -1) * (Number(hours) * 60 + Number(minutes))\n return negateExceptForZero(minutes)\n}\n\nfunction negateExceptForZero (n) {\n return n === 0 ? n : -n\n}\n","export function indent (str) {\n return (\n str\n .trim()\n .split('\\n')\n .map(x => ' ' + x)\n .join('\\n') + '\\n'\n )\n}\n","import { forAwait } from './forAwait.js'\n\nexport async function collect (iterable) {\n let buffers = []\n // This will be easier once `for await ... of` loops are available.\n await forAwait(iterable, value => buffers.push(Buffer.from(value)))\n return Buffer.concat(buffers)\n}\n","'use strict';\n\nvar CleanGitRef = {\n clean: function clean(value) {\n if (typeof value !== 'string') {\n throw new Error('Expected a string, received: ' + value);\n }\n\n return value.replace('./', '/').replace('..', '.').replace(' ', '-').replace(/^[~^:?*\\\\\\-]/, '').replace(/[~^:?*\\\\]/, '-').replace(/[~^:?*\\\\\\-]$/, '').replace('@{', '-').replace(/\\.$/, '').replace(/\\/$/, '').replace(/\\.lock$/, '');\n }\n};\n\nmodule.exports = CleanGitRef;","import { compareStrings } from './compareStrings'\n\nexport function comparePath (a, b) {\n // https://stackoverflow.com/a/40355107/2168416\n return compareStrings(a.path, b.path)\n}\n","import crc32 from 'crc-32'\nimport applyDelta from 'git-apply-delta'\nimport * as marky from 'marky'\nimport pako from 'pako'\n\nimport { E, GitError } from '../models/GitError.js'\nimport { BufferCursor } from '../utils/BufferCursor.js'\nimport { listpack } from '../utils/git-list-pack.js'\nimport { log } from '../utils/log.js'\nimport { shasum } from '../utils/shasum.js'\n\nimport { GitObject } from './GitObject'\n\nfunction decodeVarInt (reader) {\n let bytes = []\n let byte = 0\n let multibyte = 0\n do {\n byte = reader.readUInt8()\n // We keep bits 6543210\n const lastSeven = byte & 0b01111111\n bytes.push(lastSeven)\n // Whether the next byte is part of the variable-length encoded number\n // is encoded in bit 7\n multibyte = byte & 0b10000000\n } while (multibyte)\n // Now that all the bytes are in big-endian order,\n // alternate shifting the bits left by 7 and OR-ing the next byte.\n // And... do a weird increment-by-one thing that I don't quite understand.\n return bytes.reduce((a, b) => ((a + 1) << 7) | b, -1)\n}\n\n// I'm pretty much copying this one from the git C source code,\n// because it makes no sense.\nfunction otherVarIntDecode (reader, startWith) {\n let result = startWith\n let shift = 4\n let byte = null\n do {\n byte = reader.readUInt8()\n result |= (byte & 0b01111111) << shift\n shift += 7\n } while (byte & 0b10000000)\n return result\n}\n\nexport class GitPackIndex {\n constructor (stuff) {\n Object.assign(this, stuff)\n this.offsetCache = {}\n }\n static async fromIdx ({ idx, getExternalRefDelta }) {\n marky.mark('fromIdx')\n let reader = new BufferCursor(idx)\n let magic = reader.slice(4).toString('hex')\n // Check for IDX v2 magic number\n if (magic !== 'ff744f63') {\n return // undefined\n }\n let version = reader.readUInt32BE()\n if (version !== 2) {\n throw new GitError(E.InternalFail, {\n message: `Unable to read version ${version} packfile IDX. (Only version 2 supported)`\n })\n }\n if (idx.byteLength > 2048 * 1024 * 1024) {\n throw new GitError(E.InternalFail, {\n message: `To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.`\n })\n }\n // Skip over fanout table\n reader.seek(reader.tell() + 4 * 255)\n // Get hashes\n let size = reader.readUInt32BE()\n marky.mark('hashes')\n let hashes = []\n for (let i = 0; i < size; i++) {\n let hash = reader.slice(20).toString('hex')\n hashes[i] = hash\n }\n log(`hashes ${marky.stop('hashes').duration}`)\n reader.seek(reader.tell() + 4 * size)\n // Skip over CRCs\n marky.mark('offsets')\n // Get offsets\n let offsets = new Map()\n for (let i = 0; i < size; i++) {\n offsets.set(hashes[i], reader.readUInt32BE())\n }\n log(`offsets ${marky.stop('offsets').duration}`)\n let packfileSha = reader.slice(20).toString('hex')\n log(`fromIdx ${marky.stop('fromIdx').duration}`)\n return new GitPackIndex({\n hashes,\n crcs: {},\n offsets,\n packfileSha,\n getExternalRefDelta\n })\n }\n static async fromPack ({ pack, getExternalRefDelta, emitter, emitterPrefix }) {\n const listpackTypes = {\n 1: 'commit',\n 2: 'tree',\n 3: 'blob',\n 4: 'tag',\n 6: 'ofs-delta',\n 7: 'ref-delta'\n }\n let offsetToObject = {}\n\n // Older packfiles do NOT use the shasum of the pack itself,\n // so it is recommended to just use whatever bytes are in the trailer.\n // Source: https://github.com/git/git/commit/1190a1acf800acdcfd7569f87ac1560e2d077414\n let packfileSha = pack.slice(-20).toString('hex')\n\n let hashes = []\n let crcs = {}\n let offsets = new Map()\n let totalObjectCount = null\n let lastPercent = null\n let times = {\n hash: 0,\n readSlice: 0,\n offsets: 0,\n crcs: 0,\n sort: 0\n }\n let histogram = {\n commit: 0,\n tree: 0,\n blob: 0,\n tag: 0,\n 'ofs-delta': 0,\n 'ref-delta': 0\n }\n let bytesProcessed = 0\n\n log('Indexing objects')\n log(\n `percent\\tmilliseconds\\tbytesProcessed\\tcommits\\ttrees\\tblobs\\ttags\\tofs-deltas\\tref-deltas`\n )\n marky.mark('total')\n marky.mark('offsets')\n marky.mark('percent')\n await listpack([pack], ({ data, type, reference, offset, num }) => {\n if (totalObjectCount === null) totalObjectCount = num\n let percent = Math.floor(\n ((totalObjectCount - num) * 100) / totalObjectCount\n )\n if (percent !== lastPercent) {\n if (emitter) {\n emitter.emit(`${emitterPrefix}progress`, {\n phase: 'Receiving objects',\n loaded: totalObjectCount - num,\n total: totalObjectCount,\n lengthComputable: true\n })\n }\n log(\n `${percent}%\\t${Math.floor(\n marky.stop('percent').duration\n )}\\t${bytesProcessed}\\t${histogram.commit}\\t${histogram.tree}\\t${\n histogram.blob\n }\\t${histogram.tag}\\t${histogram['ofs-delta']}\\t${\n histogram['ref-delta']\n }`\n )\n\n histogram = {\n commit: 0,\n tree: 0,\n blob: 0,\n tag: 0,\n 'ofs-delta': 0,\n 'ref-delta': 0\n }\n bytesProcessed = 0\n marky.mark('percent')\n }\n lastPercent = percent\n // Change type from a number to a meaningful string\n type = listpackTypes[type]\n\n histogram[type]++\n bytesProcessed += data.byteLength\n\n if (['commit', 'tree', 'blob', 'tag'].includes(type)) {\n offsetToObject[offset] = {\n type,\n offset\n }\n } else if (type === 'ofs-delta') {\n offsetToObject[offset] = {\n type,\n offset\n }\n } else if (type === 'ref-delta') {\n offsetToObject[offset] = {\n type,\n offset\n }\n }\n })\n times['offsets'] = Math.floor(marky.stop('offsets').duration)\n\n log('Computing CRCs')\n marky.mark('crcs')\n // We need to know the lengths of the slices to compute the CRCs.\n let offsetArray = Object.keys(offsetToObject).map(Number)\n for (let [i, start] of offsetArray.entries()) {\n let end =\n i + 1 === offsetArray.length ? pack.byteLength - 20 : offsetArray[i + 1]\n let o = offsetToObject[start]\n let crc = crc32.buf(pack.slice(start, end)) >>> 0\n o.end = end\n o.crc = crc\n }\n times['crcs'] = Math.floor(marky.stop('crcs').duration)\n\n // We don't have the hashes yet. But we can generate them using the .readSlice function!\n const p = new GitPackIndex({\n pack: Promise.resolve(pack),\n packfileSha,\n crcs,\n hashes,\n offsets,\n getExternalRefDelta\n })\n\n // Resolve deltas and compute the oids\n log('Resolving deltas')\n log(`percent2\\tmilliseconds2\\tcallsToReadSlice\\tcallsToGetExternal`)\n marky.mark('percent')\n lastPercent = null\n let count = 0\n let callsToReadSlice = 0\n let callsToGetExternal = 0\n let timeByDepth = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n let objectsByDepth = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n for (let offset in offsetToObject) {\n offset = Number(offset)\n let percent = Math.floor((count++ * 100) / totalObjectCount)\n if (percent !== lastPercent) {\n log(\n `${percent}%\\t${Math.floor(\n marky.stop('percent').duration\n )}\\t${callsToReadSlice}\\t${callsToGetExternal}`\n )\n if (emitter) {\n emitter.emit(`${emitterPrefix}progress`, {\n phase: 'Resolving deltas',\n loaded: count,\n total: totalObjectCount,\n lengthComputable: true\n })\n }\n marky.mark('percent')\n callsToReadSlice = 0\n callsToGetExternal = 0\n }\n lastPercent = percent\n\n let o = offsetToObject[offset]\n if (o.oid) continue\n try {\n p.readDepth = 0\n p.externalReadDepth = 0\n marky.mark('readSlice')\n let { type, object } = await p.readSlice({ start: offset })\n let time = marky.stop('readSlice').duration\n times.readSlice += time\n callsToReadSlice += p.readDepth\n callsToGetExternal += p.externalReadDepth\n timeByDepth[p.readDepth] += time\n objectsByDepth[p.readDepth] += 1\n marky.mark('hash')\n let oid = shasum(GitObject.wrap({ type, object }))\n times.hash += marky.stop('hash').duration\n o.oid = oid\n hashes.push(oid)\n offsets.set(oid, offset)\n crcs[oid] = o.crc\n } catch (err) {\n log('ERROR', err)\n continue\n }\n }\n\n marky.mark('sort')\n hashes.sort()\n times['sort'] = Math.floor(marky.stop('sort').duration)\n let totalElapsedTime = marky.stop('total').duration\n times.hash = Math.floor(times.hash)\n times.readSlice = Math.floor(times.readSlice)\n times.misc = Math.floor(\n Object.values(times).reduce((a, b) => a - b, totalElapsedTime)\n )\n log(Object.keys(times).join('\\t'))\n log(Object.values(times).join('\\t'))\n log('by depth:')\n log([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].join('\\t'))\n log(objectsByDepth.slice(0, 12).join('\\t'))\n log(\n timeByDepth\n .map(Math.floor)\n .slice(0, 12)\n .join('\\t')\n )\n return p\n }\n toBuffer () {\n let buffers = []\n let write = (str, encoding) => {\n buffers.push(Buffer.from(str, encoding))\n }\n // Write out IDX v2 magic number\n write('ff744f63', 'hex')\n // Write out version number 2\n write('00000002', 'hex')\n // Write fanout table\n let fanoutBuffer = new BufferCursor(Buffer.alloc(256 * 4))\n for (let i = 0; i < 256; i++) {\n let count = 0\n for (let hash of this.hashes) {\n if (parseInt(hash.slice(0, 2), 16) <= i) count++\n }\n fanoutBuffer.writeUInt32BE(count)\n }\n buffers.push(fanoutBuffer.buffer)\n // Write out hashes\n for (let hash of this.hashes) {\n write(hash, 'hex')\n }\n // Write out crcs\n let crcsBuffer = new BufferCursor(Buffer.alloc(this.hashes.length * 4))\n for (let hash of this.hashes) {\n crcsBuffer.writeUInt32BE(this.crcs[hash])\n }\n buffers.push(crcsBuffer.buffer)\n // Write out offsets\n let offsetsBuffer = new BufferCursor(Buffer.alloc(this.hashes.length * 4))\n for (let hash of this.hashes) {\n offsetsBuffer.writeUInt32BE(this.offsets.get(hash))\n }\n buffers.push(offsetsBuffer.buffer)\n // Write out packfile checksum\n write(this.packfileSha, 'hex')\n // Write out shasum\n let totalBuffer = Buffer.concat(buffers)\n let sha = shasum(totalBuffer)\n let shaBuffer = Buffer.alloc(20)\n shaBuffer.write(sha, 'hex')\n return Buffer.concat([totalBuffer, shaBuffer])\n }\n async load ({ pack }) {\n this.pack = pack\n }\n async unload () {\n this.pack = null\n }\n async read ({ oid }) {\n if (!this.offsets.get(oid)) {\n if (this.getExternalRefDelta) {\n this.externalReadDepth++\n return this.getExternalRefDelta(oid)\n } else {\n throw new GitError(E.InternalFail, {\n message: `Could not read object ${oid} from packfile`\n })\n }\n }\n let start = this.offsets.get(oid)\n return this.readSlice({ start })\n }\n async readSlice ({ start }) {\n if (this.offsetCache[start]) {\n return Object.assign({}, this.offsetCache[start])\n }\n this.readDepth++\n const types = {\n 0b0010000: 'commit',\n 0b0100000: 'tree',\n 0b0110000: 'blob',\n 0b1000000: 'tag',\n 0b1100000: 'ofs_delta',\n 0b1110000: 'ref_delta'\n }\n if (!this.pack) {\n throw new GitError(E.InternalFail, {\n message:\n 'Tried to read from a GitPackIndex with no packfile loaded into memory'\n })\n }\n let raw = (await this.pack).slice(start)\n let reader = new BufferCursor(raw)\n let byte = reader.readUInt8()\n // Object type is encoded in bits 654\n let btype = byte & 0b1110000\n let type = types[btype]\n if (type === undefined) {\n throw new GitError(E.InternalFail, {\n message: 'Unrecognized type: 0b' + btype.toString(2)\n })\n }\n // The length encoding get complicated.\n // Last four bits of length is encoded in bits 3210\n let lastFour = byte & 0b1111\n let length = lastFour\n // Whether the next byte is part of the variable-length encoded number\n // is encoded in bit 7\n let multibyte = byte & 0b10000000\n if (multibyte) {\n length = otherVarIntDecode(reader, lastFour)\n }\n let base = null\n let object = null\n // Handle deltified objects\n if (type === 'ofs_delta') {\n let offset = decodeVarInt(reader)\n let baseOffset = start - offset\n ;({ object: base, type } = await this.readSlice({ start: baseOffset }))\n }\n if (type === 'ref_delta') {\n let oid = reader.slice(20).toString('hex')\n ;({ object: base, type } = await this.read({ oid }))\n }\n // Handle undeltified objects\n let buffer = raw.slice(reader.tell())\n object = Buffer.from(pako.inflate(buffer))\n // Assert that the object length is as expected.\n if (object.byteLength !== length) {\n throw new GitError(E.InternalFail, {\n message: `Packfile told us object would have length ${length} but it had length ${\n object.byteLength\n }`\n })\n }\n if (base) {\n object = Buffer.from(applyDelta(object, base))\n }\n // Cache the result based on depth.\n if (this.readDepth > 3) {\n // hand tuned for speed / memory usage tradeoff\n this.offsetCache[start] = { type, object }\n }\n return { type, format: 'content', object }\n }\n}\n","// This is part of an elaborate system to facilitate code-splitting / tree-shaking.\n// commands/walk.js can depend on only this, and the actual Walker classes exported\n// can be opaque - only having a single property (this symbol) that is not enumerable,\n// and thus the constructor can be passed as an argument to walk while being \"unusable\"\n// outside of it.\nexport const GitWalkerSymbol = Symbol('GitWalkerSymbol')\n","export function compareStrings (a, b) {\n // https://stackoverflow.com/a/40355107/2168416\n return -(a < b) || +(a > b)\n}\n","export function extractAuthFromUrl (url) {\n // For whatever reason, the `fetch` API does not convert credentials embedded in the URL\n // into Basic Authentication headers automatically. Instead it throws an error!\n // So we must manually parse the URL, rip out the user:password portion if it is present\n // and compute the Authorization header.\n // Note: I tried using new URL(url) but that throws a security exception in Edge. :rolleyes:\n let userpass = url.match(/^https?:\\/\\/([^/]+)@/)\n if (userpass == null) return null\n userpass = userpass[1]\n let [username, password] = userpass.split(':')\n url = url.replace(`${userpass}@`, '')\n return { url, username, password }\n}\n","import { E, GitError } from '../models/GitError.js'\nimport { calculateBasicAuthHeader } from '../utils/calculateBasicAuthHeader.js'\nimport { calculateBasicAuthUsernamePasswordPair } from '../utils/calculateBasicAuthUsernamePasswordPair.js'\nimport { extractAuthFromUrl } from '../utils/extractAuthFromUrl.js'\nimport { http as builtinHttp } from '../utils/http.js'\nimport { pkg } from '../utils/pkg.js'\nimport { cores } from '../utils/plugins.js'\nimport { parseRefsAdResponse } from '../wire/parseRefsAdResponse.js'\n\n// Try to accomodate known CORS proxy implementations:\n// - https://jcubic.pl/proxy.php? <-- uses query string\n// - https://cors.isomorphic-git.org <-- uses path\nconst corsProxify = (corsProxy, url) =>\n corsProxy.endsWith('?')\n ? `${corsProxy}${url}`\n : `${corsProxy}/${url.replace(/^https?:\\/\\//, '')}`\n\nexport class GitRemoteHTTP {\n static async capabilities () {\n return ['discover', 'connect']\n }\n static async discover ({\n core,\n corsProxy,\n service,\n url,\n noGitSuffix,\n auth,\n headers\n }) {\n const _origUrl = url\n // Auto-append the (necessary) .git if it's missing.\n if (!url.endsWith('.git') && !noGitSuffix) url = url += '.git'\n let urlAuth = extractAuthFromUrl(url)\n if (urlAuth) {\n url = urlAuth.url\n // To try to be backwards compatible with simple-get's behavior, which uses Node's http.request\n // setting an Authorization header will override what is in the URL.\n // Ergo manually specified auth parameters will override those in the URL.\n auth.username = auth.username || urlAuth.username\n auth.password = auth.password || urlAuth.password\n }\n if (corsProxy) {\n url = corsProxify(corsProxy, url)\n }\n // Get the 'http' plugin\n const http = cores.get(core).get('http') || builtinHttp\n // headers['Accept'] = `application/x-${service}-advertisement`\n // Only send a user agent in Node and to CORS proxies by default,\n // because Gogs and others might not whitelist 'user-agent' in allowed headers.\n // Solutions using 'process.browser' can't be used as they rely on bundler shims,\n // ans solutions using 'process.versions.node' had to be discarded because the\n // BrowserFS 'process' shim is too complete.\n if (typeof window === 'undefined' || corsProxy) {\n headers['user-agent'] = headers['user-agent'] || pkg.agent\n }\n let _auth = calculateBasicAuthUsernamePasswordPair(auth)\n if (_auth) {\n headers['Authorization'] = calculateBasicAuthHeader(_auth)\n }\n let res = await http({\n core,\n method: 'GET',\n url: `${url}/info/refs?service=${service}`,\n headers\n })\n if (res.statusCode === 401 && cores.get(core).has('credentialManager')) {\n // Acquire credentials and try again\n const credentialManager = cores.get(core).get('credentialManager')\n auth = await credentialManager.fill({ url: _origUrl })\n let _auth = calculateBasicAuthUsernamePasswordPair(auth)\n if (_auth) {\n headers['Authorization'] = calculateBasicAuthHeader(_auth)\n }\n res = await http({\n core,\n method: 'GET',\n url: `${url}/info/refs?service=${service}`,\n headers\n })\n // Tell credential manager if the credentials were no good\n if (res.statusCode === 401) {\n await credentialManager.rejected({ url: _origUrl, auth })\n } else if (res.statusCode === 200) {\n await credentialManager.approved({ url: _origUrl, auth })\n }\n }\n if (res.statusCode !== 200) {\n throw new GitError(E.HTTPError, {\n statusCode: res.statusCode,\n statusMessage: res.statusMessage\n })\n }\n // I'm going to be nice and ignore the content-type requirement unless there is a problem.\n try {\n let remoteHTTP = await parseRefsAdResponse(res.body, {\n service\n })\n remoteHTTP.auth = auth\n return remoteHTTP\n } catch (err) {\n // Detect \"dumb\" HTTP protocol responses and throw more specific error message\n if (\n err.code === E.AssertServerResponseFail &&\n err.data.expected === `# service=${service}\\\\n` &&\n res.headers['content-type'] !== `application/x-${service}-advertisement`\n ) {\n // Ooooooh that's why it failed.\n throw new GitError(E.RemoteDoesNotSupportSmartHTTP, {})\n }\n throw err\n }\n }\n static async connect ({\n core,\n emitter,\n emitterPrefix,\n corsProxy,\n service,\n url,\n noGitSuffix,\n auth,\n body,\n headers\n }) {\n // Auto-append the (necessary) .git if it's missing.\n if (!url.endsWith('.git') && !noGitSuffix) url = url += '.git'\n let urlAuth = extractAuthFromUrl(url)\n if (urlAuth) {\n url = urlAuth.url\n // To try to be backwards compatible with simple-get's behavior, which uses Node's http.request\n // setting an Authorization header will override what is in the URL.\n // Ergo manually specified auth parameters will override those in the URL.\n auth.username = auth.username || urlAuth.username\n auth.password = auth.password || urlAuth.password\n }\n if (corsProxy) {\n url = corsProxify(corsProxy, url)\n }\n headers['content-type'] = `application/x-${service}-request`\n headers['accept'] = `application/x-${service}-result`\n // Get the 'http' plugin\n const http = cores.get(core).get('http') || builtinHttp\n // Only send a user agent in Node and to CORS proxies by default,\n // because Gogs and others might not whitelist 'user-agent' in allowed headers.\n // Solutions using 'process.browser' can't be used as they rely on bundler shims,\n // ans solutions using 'process.versions.node' had to be discarded because the\n // BrowserFS 'process' shim is too complete.\n if (typeof window === 'undefined' || corsProxy) {\n headers['user-agent'] = headers['user-agent'] || pkg.agent\n }\n auth = calculateBasicAuthUsernamePasswordPair(auth)\n if (auth) {\n headers['Authorization'] = calculateBasicAuthHeader(auth)\n }\n let res = await http({\n core,\n emitter,\n emitterPrefix,\n method: 'POST',\n url: `${url}/${service}`,\n body,\n headers\n })\n if (res.statusCode !== 200) {\n throw new GitError(E.HTTPError, {\n statusCode: res.statusCode,\n statusMessage: res.statusMessage\n })\n }\n return res\n }\n}\n","'use strict';\nmodule.exports = require('./lib');\n","export function formatAuthor ({ name, email, timestamp, timezoneOffset }) {\n timezoneOffset = formatTimezoneOffset(timezoneOffset)\n return `${name} <${email}> ${timestamp} ${timezoneOffset}`\n}\n\n// The amount of effort that went into crafting these cases to handle\n// -0 (just so we don't lose that information when parsing and reconstructing)\n// but can also default to +0 was extraordinary.\n\nfunction formatTimezoneOffset (minutes) {\n let sign = simpleSign(negateExceptForZero(minutes))\n minutes = Math.abs(minutes)\n let hours = Math.floor(minutes / 60)\n minutes -= hours * 60\n let strHours = String(hours)\n let strMinutes = String(minutes)\n if (strHours.length < 2) strHours = '0' + strHours\n if (strMinutes.length < 2) strMinutes = '0' + strMinutes\n return (sign === -1 ? '-' : '+') + strHours + strMinutes\n}\n\nfunction simpleSign (n) {\n return Math.sign(n) || (Object.is(n, -0) ? -1 : 1)\n}\n\nfunction negateExceptForZero (n) {\n return n === 0 ? n : -n\n}\n","import { E, GitError } from '../models/GitError.js'\n\nimport { oauth2 } from './oauth2'\n\nexport function calculateBasicAuthUsernamePasswordPair ({\n username,\n password,\n token,\n oauth2format\n} = {}) {\n // This checks for the presense and/or absense of each of the 4 parameters,\n // converts that to a 4-bit binary representation, and then handles\n // every possible combination (2^4 or 16 cases) with a lookup table.\n const key = [!!username, !!password, !!token, !!oauth2format]\n .map(Number)\n .join('')\n // See the truth table on https://isomorphic-git.github.io/docs/authentication.html\n // prettier-ignore\n switch (key) {\n case '0000': return null\n case '1000': throw new GitError(E.MissingPasswordTokenError)\n case '0100': throw new GitError(E.MissingUsernameError)\n case '1100': return { username, password }\n case '0010': return { username: token, password: '' } // Github's alternative format\n case '1010': return { username, password: token }\n case '0110': throw new GitError(E.MixPasswordTokenError)\n case '1110': throw new GitError(E.MixUsernamePasswordTokenError)\n case '0001': throw new GitError(E.MissingTokenError)\n case '1001': throw new GitError(E.MixUsernameOauth2formatMissingTokenError)\n case '0101': throw new GitError(E.MixPasswordOauth2formatMissingTokenError)\n case '1101': throw new GitError(E.MixUsernamePasswordOauth2formatMissingTokenError)\n case '0011': return oauth2(oauth2format, token)\n case '1011': throw new GitError(E.MixUsernameOauth2formatTokenError)\n case '0111': throw new GitError(E.MixPasswordOauth2formatTokenError)\n case '1111': throw new GitError(E.MixUsernamePasswordOauth2formatTokenError)\n }\n}\n","export function calculateBasicAuthHeader ({ username, password }) {\n return `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}`\n}\n","export class FIFO {\n constructor () {\n this._queue = []\n }\n write (chunk) {\n if (this._ended) {\n throw Error('You cannot write to a FIFO that has already been ended!')\n }\n if (this._waiting) {\n let resolve = this._waiting\n this._waiting = null\n resolve({ value: chunk })\n } else {\n this._queue.push(chunk)\n }\n }\n end () {\n this._ended = true\n if (this._waiting) {\n let resolve = this._waiting\n this._waiting = null\n resolve({ done: true })\n }\n }\n destroy (err) {\n this._ended = true\n this.error = err\n }\n async next () {\n if (this._queue.length > 0) {\n return { value: this._queue.shift() }\n }\n if (this._ended) {\n return { done: true }\n }\n if (this._waiting) {\n throw Error(\n 'You cannot call read until the previous call to read has returned!'\n )\n }\n return new Promise(resolve => {\n this._waiting = resolve\n })\n }\n}\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","import ignore from 'ignore'\n\nimport { FileSystem } from '../models/FileSystem.js'\nimport { basename } from '../utils/basename.js'\nimport { dirname } from '../utils/dirname.js'\nimport { join } from '../utils/join.js'\n\n// I'm putting this in a Manager because I reckon it could benefit\n// from a LOT of cacheing.\n\n// TODO: Implement .git/info/exclude\n\nexport class GitIgnoreManager {\n static async isIgnored ({\n fs: _fs,\n dir,\n gitdir = join(dir, '.git'),\n filepath\n }) {\n const fs = new FileSystem(_fs)\n // ALWAYS ignore \".git\" folders.\n if (basename(filepath) === '.git') return true\n // '.' is not a valid gitignore entry, so '.' is never ignored\n if (filepath === '.') return false\n // Find all the .gitignore files that could affect this file\n let pairs = [\n {\n gitignore: join(dir, '.gitignore'),\n filepath\n }\n ]\n let pieces = filepath.split('/')\n for (let i = 1; i < pieces.length; i++) {\n let folder = pieces.slice(0, i).join('/')\n let file = pieces.slice(i).join('/')\n pairs.push({\n gitignore: join(dir, folder, '.gitignore'),\n filepath: file\n })\n }\n let ignoredStatus = false\n for (let p of pairs) {\n let file\n try {\n file = await fs.read(p.gitignore, 'utf8')\n } catch (err) {\n if (err.code === 'NOENT') continue\n }\n let ign = ignore().add(file)\n // If the parent directory is excluded, we are done.\n // \"It is not possible to re-include a file if a parent directory of that file is excluded. Git doesn’t list excluded directories for performance reasons, so any patterns on contained files have no effect, no matter where they are defined.\"\n // source: https://git-scm.com/docs/gitignore\n let parentdir = dirname(p.filepath)\n if (parentdir !== '.' && ign.ignores(parentdir)) return true\n // If the file is currently ignored, test for UNignoring.\n if (ignoredStatus) {\n ignoredStatus = !ign.test(p.filepath).unignored\n } else {\n ignoredStatus = ign.test(p.filepath).ignored\n }\n }\n return ignoredStatus\n }\n}\n","import { E, GitError } from '../models/GitError.js'\n\n/**\n * Use with push and fetch to set Basic Authentication headers.\n *\n * @link https://isomorphic-git.github.io/docs/utils_oauth2.html\n */\nexport function oauth2 (company, token) {\n switch (company) {\n case 'github':\n return {\n username: token,\n password: 'x-oauth-basic'\n }\n case 'githubapp':\n return {\n username: 'x-access-token',\n password: token\n }\n case 'bitbucket':\n return {\n username: 'x-token-auth',\n password: token\n }\n case 'gitlab':\n return {\n username: 'oauth2',\n password: token\n }\n default:\n throw new GitError(E.UnknownOauth2Format, { company })\n }\n}\n","/*\nIf 'side-band' or 'side-band-64k' capabilities have been specified by\nthe client, the server will send the packfile data multiplexed.\n\nEach packet starting with the packet-line length of the amount of data\nthat follows, followed by a single byte specifying the sideband the\nfollowing data is coming in on.\n\nIn 'side-band' mode, it will send up to 999 data bytes plus 1 control\ncode, for a total of up to 1000 bytes in a pkt-line. In 'side-band-64k'\nmode it will send up to 65519 data bytes plus 1 control code, for a\ntotal of up to 65520 bytes in a pkt-line.\n\nThe sideband byte will be a '1', '2' or a '3'. Sideband '1' will contain\npackfile data, sideband '2' will be used for progress information that the\nclient will generally print to stderr and sideband '3' is used for error\ninformation.\n\nIf no 'side-band' capability was specified, the server will stream the\nentire packfile without multiplexing.\n*/\nimport { FIFO } from '../utils/FIFO.js'\n\nimport { GitPktLine } from './GitPktLine.js'\n\nexport class GitSideBand {\n static demux (input) {\n let read = GitPktLine.streamReader(input)\n // And now for the ridiculous side-band or side-band-64k protocol\n let packetlines = new FIFO()\n let packfile = new FIFO()\n let progress = new FIFO()\n // TODO: Use a proper through stream?\n const nextBit = async function () {\n let line = await read()\n // Skip over flush packets\n if (line === null) return nextBit()\n // A made up convention to signal there's no more to read.\n if (line === true) {\n packetlines.end()\n progress.end()\n packfile.end()\n return\n }\n // Examine first byte to determine which output \"stream\" to use\n switch (line[0]) {\n case 1: // pack data\n packfile.write(line.slice(1))\n break\n case 2: // progress message\n progress.write(line.slice(1))\n break\n case 3: // fatal error message just before stream aborts\n let error = line.slice(1)\n progress.write(error)\n packfile.destroy(new Error(error.toString('utf8')))\n return\n default:\n // Not part of the side-band-64k protocol\n packetlines.write(line.slice(0))\n }\n // Careful not to blow up the stack.\n // I think Promises in a tail-call position should be OK.\n nextBit()\n }\n nextBit()\n return {\n packetlines,\n packfile,\n progress\n }\n }\n // static mux ({\n // protocol, // 'side-band' or 'side-band-64k'\n // packetlines,\n // packfile,\n // progress,\n // error\n // }) {\n // const MAX_PACKET_LENGTH = protocol === 'side-band-64k' ? 999 : 65519\n // let output = new PassThrough()\n // packetlines.on('data', data => {\n // if (data === null) {\n // output.write(GitPktLine.flush())\n // } else {\n // output.write(GitPktLine.encode(data))\n // }\n // })\n // let packfileWasEmpty = true\n // let packfileEnded = false\n // let progressEnded = false\n // let errorEnded = false\n // let goodbye = Buffer.concat([\n // GitPktLine.encode(Buffer.from('010A', 'hex')),\n // GitPktLine.flush()\n // ])\n // packfile\n // .on('data', data => {\n // packfileWasEmpty = false\n // const buffers = splitBuffer(data, MAX_PACKET_LENGTH)\n // for (const buffer of buffers) {\n // output.write(\n // GitPktLine.encode(Buffer.concat([Buffer.from('01', 'hex'), buffer]))\n // )\n // }\n // })\n // .on('end', () => {\n // packfileEnded = true\n // if (!packfileWasEmpty) output.write(goodbye)\n // if (progressEnded && errorEnded) output.end()\n // })\n // progress\n // .on('data', data => {\n // const buffers = splitBuffer(data, MAX_PACKET_LENGTH)\n // for (const buffer of buffers) {\n // output.write(\n // GitPktLine.encode(Buffer.concat([Buffer.from('02', 'hex'), buffer]))\n // )\n // }\n // })\n // .on('end', () => {\n // progressEnded = true\n // if (packfileEnded && errorEnded) output.end()\n // })\n // error\n // .on('data', data => {\n // const buffers = splitBuffer(data, MAX_PACKET_LENGTH)\n // for (const buffer of buffers) {\n // output.write(\n // GitPktLine.encode(Buffer.concat([Buffer.from('03', 'hex'), buffer]))\n // )\n // }\n // })\n // .on('end', () => {\n // errorEnded = true\n // if (progressEnded && packfileEnded) output.end()\n // })\n // return output\n // }\n}\n","import { E, GitError } from '../models/GitError.js'\n\nexport class GitRefSpec {\n constructor ({ remotePath, localPath, force, matchPrefix }) {\n Object.assign(this, {\n remotePath,\n localPath,\n force,\n matchPrefix\n })\n }\n static from (refspec) {\n const [\n forceMatch,\n remotePath,\n remoteGlobMatch,\n localPath,\n localGlobMatch\n ] = refspec.match(/^(\\+?)(.*?)(\\*?):(.*?)(\\*?)$/).slice(1)\n const force = forceMatch === '+'\n const remoteIsGlob = remoteGlobMatch === '*'\n const localIsGlob = localGlobMatch === '*'\n // validate\n // TODO: Make this check more nuanced, and depend on whether this is a fetch refspec or a push refspec\n if (remoteIsGlob !== localIsGlob) {\n throw new GitError(E.InternalFail, { message: 'Invalid refspec' })\n }\n return new GitRefSpec({\n remotePath,\n localPath,\n force,\n matchPrefix: remoteIsGlob\n })\n // TODO: We need to run resolveRef on both paths to expand them to their full name.\n }\n translate (remoteBranch) {\n if (this.matchPrefix) {\n if (remoteBranch.startsWith(this.remotePath)) {\n return this.localPath + remoteBranch.replace(this.remotePath, '')\n }\n } else {\n if (remoteBranch === this.remotePath) return this.localPath\n }\n return null\n }\n}\n","import { GitPackIndex } from '../models/GitPackIndex.js'\n\nconst PackfileCache = new Map()\n\nasync function loadPackIndex ({\n fs,\n filename,\n getExternalRefDelta,\n emitter,\n emitterPrefix\n}) {\n const idx = await fs.read(filename)\n return GitPackIndex.fromIdx({ idx, getExternalRefDelta })\n}\n\nexport function readPackIndex ({\n fs,\n filename,\n getExternalRefDelta,\n emitter,\n emitterPrefix\n}) {\n // Try to get the packfile index from the in-memory cache\n let p = PackfileCache.get(filename)\n if (!p) {\n p = loadPackIndex({\n fs,\n filename,\n getExternalRefDelta,\n emitter,\n emitterPrefix\n })\n PackfileCache.set(filename, p)\n }\n return p\n}\n","import { getIterator } from './getIterator.js'\n\n// inspired by 'gartal' but lighter-weight and more battle-tested.\nexport class StreamReader {\n constructor (stream) {\n this.stream = getIterator(stream)\n this.buffer = null\n this.cursor = 0\n this.undoCursor = 0\n this.started = false\n this._ended = false\n this._discardedBytes = 0\n }\n eof () {\n return this._ended && this.cursor === this.buffer.length\n }\n tell () {\n return this._discardedBytes + this.cursor\n }\n async byte () {\n if (this.eof()) return\n if (!this.started) await this._init()\n if (this.cursor === this.buffer.length) {\n await this._loadnext()\n if (this._ended) return\n }\n this._moveCursor(1)\n return this.buffer[this.undoCursor]\n }\n async chunk () {\n if (this.eof()) return\n if (!this.started) await this._init()\n if (this.cursor === this.buffer.length) {\n await this._loadnext()\n if (this._ended) return\n }\n this._moveCursor(this.buffer.length)\n return this.buffer.slice(this.undoCursor, this.cursor)\n }\n async read (n) {\n if (this.eof()) return\n if (!this.started) await this._init()\n if (this.cursor + n > this.buffer.length) {\n this._trim()\n await this._accumulate(n)\n }\n this._moveCursor(n)\n return this.buffer.slice(this.undoCursor, this.cursor)\n }\n async skip (n) {\n if (this.eof()) return\n if (!this.started) await this._init()\n if (this.cursor + n > this.buffer.length) {\n this._trim()\n await this._accumulate(n)\n }\n this._moveCursor(n)\n }\n async undo () {\n this.cursor = this.undoCursor\n }\n async _next () {\n this.started = true\n let { done, value } = await this.stream.next()\n if (done) {\n this._ended = true\n }\n if (value) {\n value = Buffer.from(value)\n }\n return value\n }\n _trim () {\n // Throw away parts of the buffer we don't need anymore\n // assert(this.cursor <= this.buffer.length)\n this.buffer = this.buffer.slice(this.undoCursor)\n this.cursor -= this.undoCursor\n this._discardedBytes += this.undoCursor\n this.undoCursor = 0\n }\n _moveCursor (n) {\n this.undoCursor = this.cursor\n this.cursor += n\n if (this.cursor > this.buffer.length) {\n this.cursor = this.buffer.length\n }\n }\n async _accumulate (n) {\n if (this._ended) return\n // Expand the buffer until we have N bytes of data\n // or we've reached the end of the stream\n let buffers = [this.buffer]\n while (this.cursor + n > lengthBuffers(buffers)) {\n let nextbuffer = await this._next()\n if (this._ended) break\n buffers.push(nextbuffer)\n }\n this.buffer = Buffer.concat(buffers)\n }\n async _loadnext () {\n this._discardedBytes += this.buffer.length\n this.undoCursor = 0\n this.cursor = 0\n this.buffer = await this._next()\n }\n async _init () {\n this.buffer = await this._next()\n }\n}\n\n// This helper function helps us postpone concatenating buffers, which\n// would create intermediate buffer objects,\nfunction lengthBuffers (buffers) {\n return buffers.reduce((acc, buffer) => acc + buffer.length, 0)\n}\n","import { fromValue } from './AsyncIterator.js'\n\nexport function getIterator (iterable) {\n if (iterable[Symbol.asyncIterator]) {\n return iterable[Symbol.asyncIterator]()\n }\n if (iterable[Symbol.iterator]) {\n return iterable[Symbol.iterator]()\n }\n if (iterable.next) {\n return iterable\n }\n return fromValue(iterable)\n}\n","// Convert a web ReadableStream (not Node stream!) to an Async Iterator\n// adapted from https://jakearchibald.com/2017/async-iterators-and-generators/\nexport function fromStream (stream) {\n // Use native async iteration if it's available.\n if (stream[Symbol.asyncIterator]) return stream\n const reader = stream.getReader()\n return {\n next () {\n return reader.read()\n },\n return () {\n reader.releaseLock()\n return {}\n },\n [Symbol.asyncIterator] () {\n return this\n }\n }\n}\n\n// This will be easier with async generator functions.\nexport function fromValue (value) {\n let queue = [value]\n return {\n next () {\n return Promise.resolve({ done: queue.length === 0, value: queue.pop() })\n },\n return () {\n queue = []\n return {}\n },\n [Symbol.asyncIterator] () {\n return this\n }\n }\n}\n\n// Convert a Node stream to an Async Iterator\nexport function fromNodeStream (stream) {\n // Use native async iteration if it's available.\n if (stream[Symbol.asyncIterator]) return stream\n // Author's Note\n // I tried many MANY ways to do this.\n // I tried two npm modules (stream-to-async-iterator and streams-to-async-iterator) with no luck.\n // I tried using 'readable' and .read(), and .pause() and .resume()\n // It took me two loooong evenings to get to this point.\n // So if you are horrified that this solution just builds up a queue with no backpressure,\n // and turns Promises inside out, too bad. This is the first code that worked reliably.\n let ended = false\n let queue = []\n let defer = {}\n stream.on('data', chunk => {\n queue.push(chunk)\n if (defer.resolve) {\n defer.resolve({ value: queue.shift(), done: false })\n defer = {}\n }\n })\n stream.on('error', err => {\n if (defer.reject) {\n defer.reject(err)\n defer = {}\n }\n })\n stream.on('end', () => {\n ended = true\n if (defer.resolve) {\n defer.resolve({ done: true })\n defer = {}\n }\n })\n return {\n next () {\n return new Promise((resolve, reject) => {\n if (queue.length === 0 && ended) {\n return resolve({ done: true })\n } else if (queue.length > 0) {\n return resolve({ value: queue.shift(), done: false })\n } else if (queue.length === 0 && !ended) {\n defer = { resolve, reject }\n }\n })\n },\n return () {\n stream.removeAllListeners()\n if (stream.destroy) stream.destroy()\n },\n [Symbol.asyncIterator] () {\n return this\n }\n }\n}\n","import { fromStream } from './AsyncIterator.js'\nimport { collect } from './collect.js'\n\nexport async function http ({\n core,\n emitter,\n emitterPrefix,\n url,\n method = 'GET',\n headers = {},\n body\n}) {\n // streaming uploads aren't possible yet in the browser\n if (body) {\n body = await collect(body)\n }\n let res = await global.fetch(url, { method, headers, body })\n let iter =\n res.body && res.body.getReader\n ? fromStream(res.body)\n : [new Uint8Array(await res.arrayBuffer())]\n // convert Header object to ordinary JSON\n headers = {}\n for (let [key, value] of res.headers.entries()) {\n headers[key] = value\n }\n return {\n url: res.url,\n method: res.method,\n statusCode: res.status,\n statusMessage: res.statusText,\n body: iter,\n headers: headers\n }\n}\n","import AsyncLock from 'async-lock'\n\nimport { FileSystem } from '../models/FileSystem.js'\nimport { join } from '../utils/join.js'\n\nlet lock = null\n\nexport class GitShallowManager {\n static async read ({ fs: _fs, gitdir }) {\n const fs = new FileSystem(_fs)\n if (lock === null) lock = new AsyncLock()\n const filepath = join(gitdir, 'shallow')\n let oids = new Set()\n await lock.acquire(filepath, async function () {\n let text = await fs.read(filepath, { encoding: 'utf8' })\n if (text === null) return oids // no file\n if (text.trim() === '') return oids // empty file\n text\n .trim()\n .split('\\n')\n .map(oid => oids.add(oid))\n })\n return oids\n }\n static async write ({ fs: _fs, gitdir, oids }) {\n const fs = new FileSystem(_fs)\n if (lock === null) lock = new AsyncLock()\n const filepath = join(gitdir, 'shallow')\n if (oids.size > 0) {\n let text = [...oids].join('\\n') + '\\n'\n await lock.acquire(filepath, async function () {\n await fs.write(filepath, text, {\n encoding: 'utf8'\n })\n })\n } else {\n // No shallows\n await lock.acquire(filepath, async function () {\n await fs.rm(filepath)\n })\n }\n }\n}\n","(function (exports) {\n\t'use strict';\n\n\tvar lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n\tfunction b64ToByteArray(b64) {\n\t\tvar i, j, l, tmp, placeHolders, arr;\n\t\n\t\tif (b64.length % 4 > 0) {\n\t\t\tthrow 'Invalid string. Length must be a multiple of 4';\n\t\t}\n\n\t\t// the number of equal signs (place holders)\n\t\t// if there are two placeholders, than the two characters before it\n\t\t// represent one byte\n\t\t// if there is only one, then the three characters before it represent 2 bytes\n\t\t// this is just a cheap hack to not do indexOf twice\n\t\tplaceHolders = b64.indexOf('=');\n\t\tplaceHolders = placeHolders > 0 ? b64.length - placeHolders : 0;\n\n\t\t// base64 is 4/3 + up to two characters of the original data\n\t\tarr = [];//new Uint8Array(b64.length * 3 / 4 - placeHolders);\n\n\t\t// if there are placeholders, only get up to the last complete 4 chars\n\t\tl = placeHolders > 0 ? b64.length - 4 : b64.length;\n\n\t\tfor (i = 0, j = 0; i < l; i += 4, j += 3) {\n\t\t\ttmp = (lookup.indexOf(b64[i]) << 18) | (lookup.indexOf(b64[i + 1]) << 12) | (lookup.indexOf(b64[i + 2]) << 6) | lookup.indexOf(b64[i + 3]);\n\t\t\tarr.push((tmp & 0xFF0000) >> 16);\n\t\t\tarr.push((tmp & 0xFF00) >> 8);\n\t\t\tarr.push(tmp & 0xFF);\n\t\t}\n\n\t\tif (placeHolders === 2) {\n\t\t\ttmp = (lookup.indexOf(b64[i]) << 2) | (lookup.indexOf(b64[i + 1]) >> 4);\n\t\t\tarr.push(tmp & 0xFF);\n\t\t} else if (placeHolders === 1) {\n\t\t\ttmp = (lookup.indexOf(b64[i]) << 10) | (lookup.indexOf(b64[i + 1]) << 4) | (lookup.indexOf(b64[i + 2]) >> 2);\n\t\t\tarr.push((tmp >> 8) & 0xFF);\n\t\t\tarr.push(tmp & 0xFF);\n\t\t}\n\n\t\treturn arr;\n\t}\n\n\tfunction uint8ToBase64(uint8) {\n\t\tvar i,\n\t\t\textraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes\n\t\t\toutput = \"\",\n\t\t\ttemp, length;\n\n\t\tfunction tripletToBase64 (num) {\n\t\t\treturn lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];\n\t\t};\n\n\t\t// go through the array every three bytes, we'll deal with trailing stuff later\n\t\tfor (i = 0, length = uint8.length - extraBytes; i < length; i += 3) {\n\t\t\ttemp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]);\n\t\t\toutput += tripletToBase64(temp);\n\t\t}\n\n\t\t// pad the end with zeros, but make sure to not forget the extra bytes\n\t\tswitch (extraBytes) {\n\t\t\tcase 1:\n\t\t\t\ttemp = uint8[uint8.length - 1];\n\t\t\t\toutput += lookup[temp >> 2];\n\t\t\t\toutput += lookup[(temp << 4) & 0x3F];\n\t\t\t\toutput += '==';\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttemp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]);\n\t\t\t\toutput += lookup[temp >> 10];\n\t\t\t\toutput += lookup[(temp >> 4) & 0x3F];\n\t\t\t\toutput += lookup[(temp << 2) & 0x3F];\n\t\t\t\toutput += '=';\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn output;\n\t}\n\n\tmodule.exports.toByteArray = b64ToByteArray;\n\tmodule.exports.fromByteArray = uint8ToBase64;\n}());\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n","export async function sleep (ms) {\n return new Promise((resolve, reject) => setTimeout(resolve, ms))\n}\n","import { BufferCursor } from '../utils/BufferCursor.js'\nimport { comparePath } from '../utils/comparePath.js'\nimport { normalizeStats } from '../utils/normalizeStats.js'\nimport { shasum } from '../utils/shasum.js'\n\nimport { E, GitError } from './GitError.js'\n\n// Extract 1-bit assume-valid, 1-bit extended flag, 2-bit merge state flag, 12-bit path length flag\nfunction parseCacheEntryFlags (bits) {\n return {\n assumeValid: Boolean(bits & 0b1000000000000000),\n extended: Boolean(bits & 0b0100000000000000),\n stage: (bits & 0b0011000000000000) >> 12,\n nameLength: bits & 0b0000111111111111\n }\n}\n\nfunction renderCacheEntryFlags (entry) {\n let flags = entry.flags\n // 1-bit extended flag (must be zero in version 2)\n flags.extended = false\n // 12-bit name length if the length is less than 0xFFF; otherwise 0xFFF\n // is stored in this field.\n flags.nameLength = Math.min(Buffer.from(entry.path).length, 0xfff)\n return (\n (flags.assumeValid ? 0b1000000000000000 : 0) +\n (flags.extended ? 0b0100000000000000 : 0) +\n ((flags.stage & 0b11) << 12) +\n (flags.nameLength & 0b111111111111)\n )\n}\n\nfunction parseBuffer (buffer) {\n // Verify shasum\n let shaComputed = shasum(buffer.slice(0, -20))\n let shaClaimed = buffer.slice(-20).toString('hex')\n if (shaClaimed !== shaComputed) {\n throw new GitError(E.InternalFail, {\n message: `Invalid checksum in GitIndex buffer: expected ${shaClaimed} but saw ${shaComputed}`\n })\n }\n let reader = new BufferCursor(buffer)\n let _entries = new Map()\n let magic = reader.toString('utf8', 4)\n if (magic !== 'DIRC') {\n throw new GitError(E.InternalFail, {\n message: `Inavlid dircache magic file number: ${magic}`\n })\n }\n let version = reader.readUInt32BE()\n if (version !== 2) {\n throw new GitError(E.InternalFail, {\n message: `Unsupported dircache version: ${version}`\n })\n }\n let numEntries = reader.readUInt32BE()\n let i = 0\n while (!reader.eof() && i < numEntries) {\n let entry = {}\n entry.ctimeSeconds = reader.readUInt32BE()\n entry.ctimeNanoseconds = reader.readUInt32BE()\n entry.mtimeSeconds = reader.readUInt32BE()\n entry.mtimeNanoseconds = reader.readUInt32BE()\n entry.dev = reader.readUInt32BE()\n entry.ino = reader.readUInt32BE()\n entry.mode = reader.readUInt32BE()\n entry.uid = reader.readUInt32BE()\n entry.gid = reader.readUInt32BE()\n entry.size = reader.readUInt32BE()\n entry.oid = reader.slice(20).toString('hex')\n let flags = reader.readUInt16BE()\n entry.flags = parseCacheEntryFlags(flags)\n // TODO: handle if (version === 3 && entry.flags.extended)\n let pathlength = buffer.indexOf(0, reader.tell() + 1) - reader.tell()\n if (pathlength < 1) {\n throw new GitError(E.InternalFail, {\n message: `Got a path length of: ${pathlength}`\n })\n }\n // TODO: handle pathnames larger than 12 bits\n entry.path = reader.toString('utf8', pathlength)\n // The next bit is awkward. We expect 1 to 8 null characters\n // such that the total size of the entry is a multiple of 8 bits.\n // (Hence subtract 12 bytes for the header.)\n let padding = 8 - ((reader.tell() - 12) % 8)\n if (padding === 0) padding = 8\n while (padding--) {\n let tmp = reader.readUInt8()\n if (tmp !== 0) {\n throw new GitError(E.InternalFail, {\n message: `Expected 1-8 null characters but got '${tmp}' after ${\n entry.path\n }`\n })\n } else if (reader.eof()) {\n throw new GitError(E.InternalFail, {\n message: 'Unexpected end of file'\n })\n }\n }\n // end of awkward part\n _entries.set(entry.path, entry)\n i++\n }\n return _entries\n}\n\nexport class GitIndex {\n /*::\n _entries: Map\n _dirty: boolean // Used to determine if index needs to be saved to filesystem\n */\n constructor (index) {\n this._dirty = false\n if (Buffer.isBuffer(index)) {\n this._entries = parseBuffer(index)\n } else if (index === null) {\n this._entries = new Map()\n } else {\n throw new GitError(E.InternalFail, {\n message: 'invalid type passed to GitIndex constructor'\n })\n }\n }\n static from (buffer) {\n return new GitIndex(buffer)\n }\n get entries () {\n return [...this._entries.values()].sort(comparePath)\n }\n get entriesMap () {\n return this._entries\n }\n * [Symbol.iterator] () {\n for (let entry of this.entries) {\n yield entry\n }\n }\n insert ({ filepath, stats, oid }) {\n stats = normalizeStats(stats)\n let bfilepath = Buffer.from(filepath)\n let entry = {\n ctimeSeconds: stats.ctimeSeconds,\n ctimeNanoseconds: stats.ctimeNanoseconds,\n mtimeSeconds: stats.mtimeSeconds,\n mtimeNanoseconds: stats.mtimeNanoseconds,\n dev: stats.dev,\n ino: stats.ino,\n // We provide a fallback value for `mode` here because not all fs\n // implementations assign it, but we use it in GitTree.\n // '100644' is for a \"regular non-executable file\"\n mode: stats.mode || 0o100644,\n uid: stats.uid,\n gid: stats.gid,\n size: stats.size,\n path: filepath,\n oid: oid,\n flags: {\n assumeValid: false,\n extended: false,\n stage: 0,\n nameLength: bfilepath.length < 0xfff ? bfilepath.length : 0xfff\n }\n }\n this._entries.set(entry.path, entry)\n this._dirty = true\n }\n delete ({ filepath }) {\n if (this._entries.has(filepath)) {\n this._entries.delete(filepath)\n } else {\n for (let key of this._entries.keys()) {\n if (key.startsWith(filepath + '/')) {\n this._entries.delete(key)\n }\n }\n }\n this._dirty = true\n }\n clear () {\n this._entries.clear()\n this._dirty = true\n }\n render () {\n return this.entries\n .map(entry => `${entry.mode.toString(8)} ${entry.oid} ${entry.path}`)\n .join('\\n')\n }\n toObject () {\n let header = Buffer.alloc(12)\n let writer = new BufferCursor(header)\n writer.write('DIRC', 4, 'utf8')\n writer.writeUInt32BE(2)\n writer.writeUInt32BE(this.entries.length)\n let body = Buffer.concat(\n this.entries.map(entry => {\n const bpath = Buffer.from(entry.path)\n // the fixed length + the filename + at least one null char => align by 8\n let length = Math.ceil((62 + bpath.length + 1) / 8) * 8\n let written = Buffer.alloc(length)\n let writer = new BufferCursor(written)\n const stat = normalizeStats(entry)\n writer.writeUInt32BE(stat.ctimeSeconds)\n writer.writeUInt32BE(stat.ctimeNanoseconds)\n writer.writeUInt32BE(stat.mtimeSeconds)\n writer.writeUInt32BE(stat.mtimeNanoseconds)\n writer.writeUInt32BE(stat.dev)\n writer.writeUInt32BE(stat.ino)\n writer.writeUInt32BE(stat.mode)\n writer.writeUInt32BE(stat.uid)\n writer.writeUInt32BE(stat.gid)\n writer.writeUInt32BE(stat.size)\n writer.write(entry.oid, 20, 'hex')\n writer.writeUInt16BE(renderCacheEntryFlags(entry))\n writer.write(entry.path, bpath.length, 'utf8')\n return written\n })\n )\n let main = Buffer.concat([header, body])\n let sum = shasum(main)\n return Buffer.concat([main, Buffer.from(sum, 'hex')])\n }\n}\n","// This is straight from parse_unit_factor in config.c of canonical git\nconst num = val => {\n val = val.toLowerCase()\n let n = parseInt(val)\n if (val.endsWith('k')) n *= 1024\n if (val.endsWith('m')) n *= 1024 * 1024\n if (val.endsWith('g')) n *= 1024 * 1024 * 1024\n return n\n}\n\n// This is straight from git_parse_maybe_bool_text in config.c of canonical git\nconst bool = val => {\n val = val.trim().toLowerCase()\n if (val === 'true' || val === 'yes' || val === 'on') return true\n if (val === 'false' || val === 'no' || val === 'off') return false\n throw Error(\n `Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${val}`\n )\n}\n\nconst schema = {\n core: {\n filemode: bool,\n bare: bool,\n logallrefupdates: bool,\n symlinks: bool,\n ignorecase: bool,\n bigFileThreshold: num\n }\n}\n\n// https://git-scm.com/docs/git-config\n\n// section starts with [ and ends with ]\n// section is alphanumeric (ASCII) with _ and .\n// section is case insensitive\n// subsection is optionnal\n// subsection is specified after section and one or more spaces\n// subsection is specified between double quotes\nconst SECTION_LINE_REGEX = /^\\[([A-Za-z0-9_.]+)(?: \"(.*)\")?\\]$/\nconst SECTION_REGEX = /^[A-Za-z0-9_.]+$/\n\n// variable lines contain a name, and equal sign and then a value\n// variable lines can also only contain a name (the implicit value is a boolean true)\n// variable name is alphanumeric (ASCII) with _\n// variable name starts with an alphabetic character\n// variable name is case insensitive\nconst VARIABLE_LINE_REGEX = /^([A-Za-z]\\w*)(?: *= *(.*))?$/\nconst VARIABLE_NAME_REGEX = /^[A-Za-z]\\w*$/\n\nconst VARIABLE_VALUE_COMMENT_REGEX = /^(.*?)( *[#;].*)$/\n\nconst extractSectionLine = line => {\n const matches = SECTION_LINE_REGEX.exec(line)\n if (matches != null) {\n const [section, subsection] = matches.slice(1)\n return [section, subsection]\n }\n return null\n}\n\nconst extractVariableLine = line => {\n const matches = VARIABLE_LINE_REGEX.exec(line)\n if (matches != null) {\n const [name, rawValue = 'true'] = matches.slice(1)\n const valueWithoutComments = removeComments(rawValue)\n const valueWithoutQuotes = removeQuotes(valueWithoutComments)\n return [name, valueWithoutQuotes]\n }\n return null\n}\n\nconst removeComments = rawValue => {\n const commentMatches = VARIABLE_VALUE_COMMENT_REGEX.exec(rawValue)\n if (commentMatches == null) {\n return rawValue\n }\n const [valueWithoutComment, comment] = commentMatches.slice(1)\n // if odd number of quotes before and after comment => comment is escaped\n if (\n hasOddNumberOfQuotes(valueWithoutComment) &&\n hasOddNumberOfQuotes(comment)\n ) {\n return `${valueWithoutComment}${comment}`\n }\n return valueWithoutComment\n}\n\nconst hasOddNumberOfQuotes = text => {\n const numberOfQuotes = (text.match(/(?:^|[^\\\\])\"/g) || []).length\n return numberOfQuotes % 2 !== 0\n}\n\nconst removeQuotes = text => {\n return text.split('').reduce((newText, c, idx, text) => {\n const isQuote = c === '\"' && text[idx - 1] !== '\\\\'\n const isEscapeForQuote = c === '\\\\' && text[idx + 1] === '\"'\n if (isQuote || isEscapeForQuote) {\n return newText\n }\n return newText + c\n }, '')\n}\n\nconst lower = text => {\n return text != null ? text.toLowerCase() : null\n}\n\nconst getPath = (section, subsection, name) => {\n return [lower(section), subsection, lower(name)]\n .filter(a => a != null)\n .join('.')\n}\n\nconst findLastIndex = (array, callback) => {\n return array.reduce((lastIndex, item, index) => {\n return callback(item) ? index : lastIndex\n }, -1)\n}\n\n// Note: there are a LOT of edge cases that aren't covered (e.g. keys in sections that also\n// have subsections, [include] directives, etc.\nexport class GitConfig {\n constructor (text) {\n let section = null\n let subsection = null\n this.parsedConfig = text.split('\\n').map(line => {\n let name = null\n let value = null\n\n const trimmedLine = line.trim()\n const extractedSection = extractSectionLine(trimmedLine)\n const isSection = extractedSection != null\n if (isSection) {\n ;[section, subsection] = extractedSection\n } else {\n const extractedVariable = extractVariableLine(trimmedLine)\n const isVariable = extractedVariable != null\n if (isVariable) {\n ;[name, value] = extractedVariable\n }\n }\n\n const path = getPath(section, subsection, name)\n return { line, isSection, section, subsection, name, value, path }\n })\n }\n static from (text) {\n return new GitConfig(text)\n }\n async get (path, getall = false) {\n const allValues = this.parsedConfig\n .filter(config => config.path === path.toLowerCase())\n .map(({ section, name, value }) => {\n const fn = schema[section] && schema[section][name]\n return fn ? fn(value) : value\n })\n return getall ? allValues : allValues.pop()\n }\n async getall (path) {\n return this.get(path, true)\n }\n async getSubsections (section) {\n return this.parsedConfig\n .filter(config => config.section === section && config.isSection)\n .map(config => config.subsection)\n }\n async deleteSection (section, subsection) {\n this.parsedConfig = this.parsedConfig.filter(\n config =>\n !(config.section === section && config.subsection === subsection)\n )\n }\n async append (path, value) {\n return this.set(path, value, true)\n }\n async set (path, value, append = false) {\n const configIndex = findLastIndex(\n this.parsedConfig,\n config => config.path === path.toLowerCase()\n )\n if (value == null) {\n if (configIndex !== -1) {\n this.parsedConfig.splice(configIndex, 1)\n }\n } else {\n if (configIndex !== -1) {\n const config = this.parsedConfig[configIndex]\n const modifiedConfig = Object.assign({}, config, {\n value,\n modified: true\n })\n if (append) {\n this.parsedConfig.splice(configIndex + 1, 0, modifiedConfig)\n } else {\n this.parsedConfig[configIndex] = modifiedConfig\n }\n } else {\n const sectionPath = path\n .split('.')\n .slice(0, -1)\n .join('.')\n .toLowerCase()\n const sectionIndex = this.parsedConfig.findIndex(\n config => config.path === sectionPath\n )\n const [section, subsection] = sectionPath.split('.')\n const name = path.split('.').pop()\n const newConfig = {\n section,\n subsection,\n name,\n value,\n modified: true,\n path: getPath(section, subsection, name)\n }\n if (SECTION_REGEX.test(section) && VARIABLE_NAME_REGEX.test(name)) {\n if (sectionIndex >= 0) {\n // Reuse existing section\n this.parsedConfig.splice(sectionIndex + 1, 0, newConfig)\n } else {\n // Add a new section\n const newSection = {\n section,\n subsection,\n modified: true,\n path: getPath(section, subsection, null)\n }\n this.parsedConfig.push(newSection, newConfig)\n }\n }\n }\n }\n }\n toString () {\n return this.parsedConfig\n .map(({ line, section, subsection, name, value, modified = false }) => {\n if (!modified) {\n return line\n }\n if (name != null && value != null) {\n return `\\t${name} = ${value}`\n }\n if (subsection != null) {\n return `[${section} \"${subsection}\"]`\n }\n return `[${section}]`\n })\n .join('\\n')\n }\n}\n","import { GitRefSpec } from './GitRefSpec'\n\nexport class GitRefSpecSet {\n constructor (rules = []) {\n this.rules = rules\n }\n static from (refspecs) {\n const rules = []\n for (const refspec of refspecs) {\n rules.push(GitRefSpec.from(refspec)) // might throw\n }\n return new GitRefSpecSet(rules)\n }\n add (refspec) {\n const rule = GitRefSpec.from(refspec) // might throw\n this.rules.push(rule)\n }\n translate (remoteRefs) {\n const result = []\n for (const rule of this.rules) {\n for (const remoteRef of remoteRefs) {\n const localRef = rule.translate(remoteRef)\n if (localRef) {\n result.push([remoteRef, localRef])\n }\n }\n }\n return result\n }\n translateOne (remoteRef) {\n let result = null\n for (const rule of this.rules) {\n const localRef = rule.translate(remoteRef)\n if (localRef) {\n result = localRef\n }\n }\n return result\n }\n}\n","import { GitAnnotatedTag } from '../models/GitAnnotatedTag.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { GitTree } from '../models/GitTree.js'\nimport { readObject } from '../storage/readObject.js'\n\nexport async function resolveTree ({ fs, gitdir, oid }) {\n let { type, object } = await readObject({ fs, gitdir, oid })\n // Resolve annotated tag objects to whatever\n if (type === 'tag') {\n oid = GitAnnotatedTag.from(object).parse().object\n return resolveTree({ fs, gitdir, oid })\n }\n // Resolve commits to trees\n if (type === 'commit') {\n oid = GitCommit.from(object).parse().tree\n return resolveTree({ fs, gitdir, oid })\n }\n if (type !== 'tree') {\n throw new GitError(E.ResolveTreeError, { oid })\n }\n return { tree: GitTree.from(object), oid }\n}\n","import { E, GitError } from '../models/GitError.js'\n\nimport { GitRemoteHTTP } from './GitRemoteHTTP'\n\nfunction parseRemoteUrl ({ url }) {\n let matches = url.match(/(\\w+)(:\\/\\/|::)(.*)/)\n if (matches === null) return\n /*\n * When git encounters a URL of the form ://
, where is\n * a protocol that it cannot handle natively, it automatically invokes git remote-\n * with the full URL as the second argument.\n *\n * @see https://git-scm.com/docs/git-remote-helpers\n */\n if (matches[2] === '://') {\n return {\n transport: matches[1],\n address: matches[0]\n }\n }\n /*\n * A URL of the form ::
explicitly instructs git to invoke\n * git remote- with
as the second argument.\n *\n * @see https://git-scm.com/docs/git-remote-helpers\n */\n if (matches[2] === '::') {\n return {\n transport: matches[1],\n address: matches[3]\n }\n }\n}\n\nexport class GitRemoteManager {\n static getRemoteHelperFor ({ url }) {\n // TODO: clean up the remoteHelper API and move into PluginCore\n const remoteHelpers = new Map()\n remoteHelpers.set('http', GitRemoteHTTP)\n remoteHelpers.set('https', GitRemoteHTTP)\n\n let parts = parseRemoteUrl({ url })\n if (!parts) {\n throw new GitError(E.RemoteUrlParseError, { url })\n }\n if (remoteHelpers.has(parts.transport)) {\n return remoteHelpers.get(parts.transport)\n }\n throw new GitError(E.UnknownTransportError, {\n url,\n transport: parts.transport\n })\n }\n}\n","import { E, GitError } from '../models/GitError.js'\nimport { GitPktLine } from '../models/GitPktLine.js'\n\nexport async function parseRefsAdResponse (stream, { service }) {\n const capabilities = new Set()\n const refs = new Map()\n const symrefs = new Map()\n\n // There is probably a better way to do this, but for now\n // let's just throw the result parser inline here.\n let read = GitPktLine.streamReader(stream)\n let lineOne = await read()\n // skip past any flushes\n while (lineOne === null) lineOne = await read()\n if (lineOne === true) throw new GitError(E.EmptyServerResponseFail)\n // Clients MUST ignore an LF at the end of the line.\n if (lineOne.toString('utf8').replace(/\\n$/, '') !== `# service=${service}`) {\n throw new GitError(E.AssertServerResponseFail, {\n expected: `# service=${service}\\\\n`,\n actual: lineOne.toString('utf8')\n })\n }\n let lineTwo = await read()\n // skip past any flushes\n while (lineTwo === null) lineTwo = await read()\n // In the edge case of a brand new repo, zero refs (and zero capabilities)\n // are returned.\n if (lineTwo === true) return { capabilities, refs, symrefs }\n let [firstRef, capabilitiesLine] = lineTwo\n .toString('utf8')\n .trim()\n .split('\\x00')\n capabilitiesLine.split(' ').map(x => capabilities.add(x))\n let [ref, name] = firstRef.split(' ')\n refs.set(name, ref)\n while (true) {\n let line = await read()\n if (line === true) break\n if (line !== null) {\n let [ref, name] = line\n .toString('utf8')\n .trim()\n .split(' ')\n refs.set(name, ref)\n }\n }\n // Symrefs are thrown into the \"capabilities\" unfortunately.\n for (let cap of capabilities) {\n if (cap.startsWith('symref=')) {\n let m = cap.match(/symref=([^:]+):(.*)/)\n if (m.length === 3) {\n symrefs.set(m[1], m[2])\n }\n }\n }\n return { capabilities, refs, symrefs }\n}\n","import { basename } from '../utils/basename.js'\nimport { dirname } from '../utils/dirname.js'\n\n/*::\ntype Node = {\n type: string,\n fullpath: string,\n basename: string,\n metadata: Object, // mode, oid\n parent?: Node,\n children: Array\n}\n*/\n\nexport function flatFileListToDirectoryStructure (files) {\n const inodes = new Map()\n const mkdir = function (name) {\n if (!inodes.has(name)) {\n let dir = {\n type: 'tree',\n fullpath: name,\n basename: basename(name),\n metadata: {},\n children: []\n }\n inodes.set(name, dir)\n // This recursively generates any missing parent folders.\n // We do it after we've added the inode to the set so that\n // we don't recurse infinitely trying to create the root '.' dirname.\n dir.parent = mkdir(dirname(name))\n if (dir.parent && dir.parent !== dir) dir.parent.children.push(dir)\n }\n return inodes.get(name)\n }\n\n const mkfile = function (name, metadata) {\n if (!inodes.has(name)) {\n let file = {\n type: 'blob',\n fullpath: name,\n basename: basename(name),\n metadata: metadata,\n // This recursively generates any missing parent folders.\n parent: mkdir(dirname(name)),\n children: []\n }\n if (file.parent) file.parent.children.push(file)\n inodes.set(name, file)\n }\n return inodes.get(name)\n }\n\n mkdir('.')\n for (let file of files) {\n mkfile(file.path, file)\n }\n return inodes\n}\n","import pako from 'pako'\nimport Hash from 'sha.js/sha1'\n\nimport { FileSystem } from '../models/FileSystem.js'\nimport { readObject } from '../storage/readObject.js'\nimport { join } from '../utils/join.js'\nimport { padHex } from '../utils/padHex.js'\nimport { cores } from '../utils/plugins.js'\n\nimport { types } from './types'\n\n/**\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string[]} args.oids\n */\nexport async function pack ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n oids\n}) {\n const fs = new FileSystem(_fs)\n let hash = new Hash()\n let outputStream = []\n function write (chunk, enc) {\n let buff = Buffer.from(chunk, enc)\n outputStream.push(buff)\n hash.update(buff)\n }\n function writeObject ({ stype, object }) {\n let lastFour, multibyte, length\n // Object type is encoded in bits 654\n let type = types[stype]\n // The length encoding gets complicated.\n length = object.length\n // Whether the next byte is part of the variable-length encoded number\n // is encoded in bit 7\n multibyte = length > 0b1111 ? 0b10000000 : 0b0\n // Last four bits of length is encoded in bits 3210\n lastFour = length & 0b1111\n // Discard those bits\n length = length >>> 4\n // The first byte is then (1-bit multibyte?), (3-bit type), (4-bit least sig 4-bits of length)\n let byte = (multibyte | type | lastFour).toString(16)\n write(byte, 'hex')\n // Now we keep chopping away at length 7-bits at a time until its zero,\n // writing out the bytes in what amounts to little-endian order.\n while (multibyte) {\n multibyte = length > 0b01111111 ? 0b10000000 : 0b0\n byte = multibyte | (length & 0b01111111)\n write(padHex(2, byte), 'hex')\n length = length >>> 7\n }\n // Lastly, we can compress and write the object.\n write(Buffer.from(pako.deflate(object)))\n }\n write('PACK')\n write('00000002', 'hex')\n // Write a 4 byte (32-bit) int\n write(padHex(8, oids.length), 'hex')\n for (let oid of oids) {\n let { type, object } = await readObject({ fs, gitdir, oid })\n writeObject({ write, object, stype: type })\n }\n // Write SHA1 checksum\n let digest = hash.digest()\n outputStream.push(digest)\n return outputStream\n}\n","import { indent } from '../utils/indent.js'\nimport { normalizeNewlines } from '../utils/normalizeNewlines.js'\n\nimport { GitCommit } from './GitCommit'\n\nexport class SignedGitCommit extends GitCommit {\n static from (commit) {\n return new SignedGitCommit(commit)\n }\n async sign (openpgp, privateKeys) {\n let commit = this.withoutSignature()\n let headers = GitCommit.justHeaders(this._commit)\n let message = GitCommit.justMessage(this._commit)\n let privKeyObj = openpgp.key.readArmored(privateKeys).keys\n let { signature } = await openpgp.sign({\n data: openpgp.util.str2Uint8Array(commit),\n privateKeys: privKeyObj,\n detached: true,\n armor: true\n })\n // renormalize the line endings to the one true line-ending\n signature = normalizeNewlines(signature)\n let signedCommit =\n headers + '\\n' + 'gpgsig' + indent(signature) + '\\n' + message\n // return a new commit object\n return GitCommit.from(signedCommit)\n }\n\n async listSigningKeys (openpgp) {\n let msg = openpgp.message.readSignedContent(\n this.withoutSignature(),\n this.isolateSignature()\n )\n return msg.getSigningKeyIds().map(keyid => keyid.toHex())\n }\n\n async verify (openpgp, publicKeys) {\n let pubKeyObj = openpgp.key.readArmored(publicKeys).keys\n let msg = openpgp.message.readSignedContent(\n this.withoutSignature(),\n this.isolateSignature()\n )\n let results = msg.verify(pubKeyObj)\n let validity = results.reduce((a, b) => a.valid && b.valid, { valid: true })\n return validity\n }\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe =\n /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\nvar splitPath = function(filename) {\n return splitPathRe.exec(filename).slice(1);\n};\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = substr(path, -1) === '/';\n\n // Normalize the path\n path = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n if (typeof p !== 'string') {\n throw new TypeError('Arguments to path.join must be strings');\n }\n return p;\n }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function(path) {\n var result = splitPath(path),\n root = result[0],\n dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n};\n\n\nexports.basename = function(path, ext) {\n var f = splitPath(path)[2];\n // TODO: make this comparison case-insensitive on windows?\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\n\nexports.extname = function(path) {\n return splitPath(path)[3];\n};\n\nfunction filter (xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n ? function (str, start, len) { return str.substr(start, len) }\n : function (str, start, len) {\n if (start < 0) start = str.length + start;\n return str.substr(start, len);\n }\n;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction adler32(adler, buf, len, pos) {\n var s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n","'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n var c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n var t = crcTable,\n end = pos + len;\n\n crc ^= -1;\n\n for (var i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n","// String encode/decode helpers\n'use strict';\n\n\nvar utils = require('./common');\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new utils.Buf8(256);\nfor (var q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new utils.Buf8(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n }\n }\n\n var result = '';\n for (var i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function (buf) {\n return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function (str) {\n var buf = new utils.Buf8(str.length);\n for (var i = 0, len = buf.length; i < len; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n var i, out, c, c_len;\n var len = max || buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n var utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nexports.utf8border = function (buf, max) {\n var pos;\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nmodule.exports = ZStream;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n //Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n","var proto\n , map\n\nmodule.exports = proto = {}\n\nmap = typeof WeakMap === 'undefined' ? null : new WeakMap\n\nproto.get = !map ? no_weakmap_get : get\n\nfunction no_weakmap_get(target) {\n return new DataView(target.buffer, 0)\n}\n\nfunction get(target) {\n var out = map.get(target.buffer)\n if(!out) {\n map.set(target.buffer, out = new DataView(target.buffer, 0))\n }\n return out\n}\n","import { GitPktLine } from '../models/GitPktLine.js'\n\nexport function writeUploadPackRequest ({\n capabilities = [],\n wants = [],\n haves = [],\n shallows = [],\n depth = null,\n since = null,\n exclude = []\n}) {\n let packstream = []\n wants = [...new Set(wants)] // remove duplicates\n let firstLineCapabilities = ` ${capabilities.join(' ')}`\n for (const oid of wants) {\n packstream.push(GitPktLine.encode(`want ${oid}${firstLineCapabilities}\\n`))\n firstLineCapabilities = ''\n }\n for (const oid of shallows) {\n packstream.push(GitPktLine.encode(`shallow ${oid}\\n`))\n }\n if (depth !== null) {\n packstream.push(GitPktLine.encode(`deepen ${depth}\\n`))\n }\n if (since !== null) {\n packstream.push(\n GitPktLine.encode(`deepen-since ${Math.floor(since.valueOf() / 1000)}\\n`)\n )\n }\n for (const oid of exclude) {\n packstream.push(GitPktLine.encode(`deepen-not ${oid}\\n`))\n }\n packstream.push(GitPktLine.flush())\n for (const oid of haves) {\n packstream.push(GitPktLine.encode(`have ${oid}\\n`))\n }\n packstream.push(GitPktLine.encode(`done\\n`))\n return packstream\n}\n","import { E, GitError } from '../models/GitError.js'\nimport { GitSideBand } from '../models/GitSideBand.js'\nimport { forAwait } from '../utils/forAwait.js'\n\nexport async function parseUploadPackResponse (stream) {\n const { packetlines, packfile, progress } = GitSideBand.demux(stream)\n let shallows = []\n let unshallows = []\n let acks = []\n let nak = false\n let done = false\n return new Promise((resolve, reject) => {\n // Parse the response\n forAwait(packetlines, data => {\n let line = data.toString('utf8').trim()\n if (line.startsWith('shallow')) {\n let oid = line.slice(-41).trim()\n if (oid.length !== 40) {\n reject(new GitError(E.CorruptShallowOidFail, { oid }))\n }\n shallows.push(oid)\n } else if (line.startsWith('unshallow')) {\n let oid = line.slice(-41).trim()\n if (oid.length !== 40) {\n reject(new GitError(E.CorruptShallowOidFail, { oid }))\n }\n unshallows.push(oid)\n } else if (line.startsWith('ACK')) {\n let [, oid, status] = line.split(' ')\n acks.push({ oid, status })\n if (!status) done = true\n } else if (line.startsWith('NAK')) {\n nak = true\n done = true\n }\n if (done) {\n resolve({ shallows, unshallows, acks, nak, packfile, progress })\n }\n })\n })\n}\n","import { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitAnnotatedTag } from '../models/GitAnnotatedTag.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { readObject } from '../storage/readObject.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\nexport async function listCommitsAndTags ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n start,\n finish\n}) {\n const fs = new FileSystem(_fs)\n let startingSet = new Set()\n let finishingSet = new Set()\n for (let ref of start) {\n startingSet.add(await GitRefManager.resolve({ fs, gitdir, ref }))\n }\n for (let ref of finish) {\n // We may not have these refs locally so we must try/catch\n try {\n let oid = await GitRefManager.resolve({ fs, gitdir, ref })\n finishingSet.add(oid)\n } catch (err) {}\n }\n let visited = new Set()\n // Because git commits are named by their hash, there is no\n // way to construct a cycle. Therefore we won't worry about\n // setting a default recursion limit.\n async function walk (oid) {\n visited.add(oid)\n let { type, object } = await readObject({ fs, gitdir, oid })\n // Recursively resolve annotated tags\n if (type === 'tag') {\n let tag = GitAnnotatedTag.from(object)\n let commit = tag.headers().object\n return walk(commit)\n }\n if (type !== 'commit') {\n throw new GitError(E.ObjectTypeAssertionFail, {\n oid,\n type,\n expected: 'commit'\n })\n }\n let commit = GitCommit.from(object)\n let parents = commit.headers().parent\n for (oid of parents) {\n if (!finishingSet.has(oid) && !visited.has(oid)) {\n await walk(oid)\n }\n }\n }\n // Let's go walking!\n for (let oid of startingSet) {\n await walk(oid)\n }\n return visited\n}\n","import { FileSystem } from '../models/FileSystem.js'\nimport { GitAnnotatedTag } from '../models/GitAnnotatedTag.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { GitTree } from '../models/GitTree.js'\nimport { readObject } from '../storage/readObject.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\nexport async function listObjects ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n oids\n}) {\n const fs = new FileSystem(_fs)\n let visited = new Set()\n // We don't do the purest simplest recursion, because we can\n // avoid reading Blob objects entirely since the Tree objects\n // tell us which oids are Blobs and which are Trees.\n async function walk (oid) {\n visited.add(oid)\n let { type, object } = await readObject({ fs, gitdir, oid })\n if (type === 'tag') {\n let tag = GitAnnotatedTag.from(object)\n let obj = tag.headers().object\n await walk(obj)\n } else if (type === 'commit') {\n let commit = GitCommit.from(object)\n let tree = commit.headers().tree\n await walk(tree)\n } else if (type === 'tree') {\n let tree = GitTree.from(object)\n for (let entry of tree) {\n // only add blobs and trees to the set,\n // skipping over submodules whose type is 'commit'\n if (entry.type === 'blob' || entry.type === 'tree') {\n visited.add(entry.oid)\n }\n // only recurse for trees\n if (entry.type === 'tree') {\n await walk(entry.oid)\n }\n }\n }\n }\n // Let's go walking!\n for (let oid of oids) {\n await walk(oid)\n }\n return visited\n}\n","import { GitPktLine } from '../models/GitPktLine.js'\n\nexport async function writeReceivePackRequest ({\n capabilities = [],\n triplets = []\n}) {\n let packstream = []\n let capsFirstLine = `\\x00 ${capabilities.join(' ')}`\n for (let trip of triplets) {\n packstream.push(\n GitPktLine.encode(\n `${trip.oldoid} ${trip.oid} ${trip.fullRef}${capsFirstLine}\\n`\n )\n )\n capsFirstLine = ''\n }\n packstream.push(GitPktLine.flush())\n return packstream\n}\n","import { E, GitError } from '../models/GitError.js'\nimport { GitPktLine } from '../models/GitPktLine.js'\n\nexport async function parseReceivePackResponse (packfile) {\n let result = {}\n let response = ''\n let read = GitPktLine.streamReader(packfile)\n let line = await read()\n while (line !== true) {\n if (line !== null) response += line.toString('utf8') + '\\n'\n line = await read()\n }\n\n let lines = response.toString('utf8').split('\\n')\n // We're expecting \"unpack {unpack-result}\"\n line = lines.shift()\n if (!line.startsWith('unpack ')) {\n throw new GitError(E.UnparseableServerResponseFail, { line })\n }\n if (line === 'unpack ok') {\n result.ok = ['unpack']\n } else {\n result.errors = [line.trim()]\n }\n for (let line of lines) {\n let status = line.slice(0, 2)\n let refAndMessage = line.slice(3)\n if (status === 'ok') {\n result.ok = result.ok || []\n result.ok.push(refAndMessage)\n } else if (status === 'ng') {\n result.errors = result.errors || []\n result.errors.push(refAndMessage)\n }\n }\n return result\n}\n","/**\n * Use with push and fetch to set Basic Authentication headers.\n *\n * @link https://isomorphic-git.github.io/docs/utils_auth.html\n */\nexport function auth (username, password) {\n // Allow specifying it as one argument (mostly for CLI inputability)\n if (password === undefined) {\n let i = username.indexOf(':')\n if (i > -1) {\n password = username.slice(i + 1)\n username = username.slice(0, i)\n } else {\n password = '' // Enables the .auth(GITHUB_TOKEN) no-username shorthand\n }\n }\n return { username, password }\n}\n","// A simple implementation of make-array\nfunction makeArray (subject) {\n return Array.isArray(subject)\n ? subject\n : [subject]\n}\n\nconst REGEX_TEST_BLANK_LINE = /^\\s+$/\nconst REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\\\!/\nconst REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\\\#/\nconst REGEX_SPLITALL_CRLF = /\\r?\\n/g\n// /foo,\n// ./foo,\n// ../foo,\n// .\n// ..\nconst REGEX_TEST_INVALID_PATH = /^\\.*\\/|^\\.+$/\n\nconst SLASH = '/'\nconst KEY_IGNORE = typeof Symbol !== 'undefined'\n ? Symbol.for('node-ignore')\n /* istanbul ignore next */\n : 'node-ignore'\n\nconst define = (object, key, value) =>\n Object.defineProperty(object, key, {value})\n\nconst REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g\n\n// Sanitize the range of a regular expression\n// The cases are complicated, see test cases for details\nconst sanitizeRange = range => range.replace(\n REGEX_REGEXP_RANGE,\n (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0)\n ? match\n // Invalid range (out of order) which is ok for gitignore rules but\n // fatal for JavaScript regular expression, so eliminate it.\n : ''\n)\n\n// > If the pattern ends with a slash,\n// > it is removed for the purpose of the following description,\n// > but it would only find a match with a directory.\n// > In other words, foo/ will match a directory foo and paths underneath it,\n// > but will not match a regular file or a symbolic link foo\n// > (this is consistent with the way how pathspec works in general in Git).\n// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`'\n// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call\n// you could use option `mark: true` with `glob`\n\n// '`foo/`' should not continue with the '`..`'\nconst DEFAULT_REPLACER_PREFIX = [\n\n // > Trailing spaces are ignored unless they are quoted with backslash (\"\\\")\n [\n // (a\\ ) -> (a )\n // (a ) -> (a)\n // (a \\ ) -> (a )\n /\\\\?\\s+$/,\n match => match.indexOf('\\\\') === 0\n ? ' '\n : ''\n ],\n\n // replace (\\ ) with ' '\n [\n /\\\\\\s/g,\n () => ' '\n ],\n\n // Escape metacharacters\n // which is written down by users but means special for regular expressions.\n\n // > There are 12 characters with special meanings:\n // > - the backslash \\,\n // > - the caret ^,\n // > - the dollar sign $,\n // > - the period or dot .,\n // > - the vertical bar or pipe symbol |,\n // > - the question mark ?,\n // > - the asterisk or star *,\n // > - the plus sign +,\n // > - the opening parenthesis (,\n // > - the closing parenthesis ),\n // > - and the opening square bracket [,\n // > - the opening curly brace {,\n // > These special characters are often called \"metacharacters\".\n [\n /[\\\\^$.|*+(){]/g,\n match => `\\\\${match}`\n ],\n\n [\n // > [abc] matches any character inside the brackets\n // > (in this case a, b, or c);\n /\\[([^\\]/]*)($|\\])/g,\n (match, p1, p2) => p2 === ']'\n ? `[${sanitizeRange(p1)}]`\n : `\\\\${match}`\n ],\n\n [\n // > a question mark (?) matches a single character\n /(?!\\\\)\\?/g,\n () => '[^/]'\n ],\n\n // leading slash\n [\n\n // > A leading slash matches the beginning of the pathname.\n // > For example, \"/*.c\" matches \"cat-file.c\" but not \"mozilla-sha1/sha1.c\".\n // A leading slash matches the beginning of the pathname\n /^\\//,\n () => '^'\n ],\n\n // replace special metacharacter slash after the leading slash\n [\n /\\//g,\n () => '\\\\/'\n ],\n\n [\n // > A leading \"**\" followed by a slash means match in all directories.\n // > For example, \"**/foo\" matches file or directory \"foo\" anywhere,\n // > the same as pattern \"foo\".\n // > \"**/foo/bar\" matches file or directory \"bar\" anywhere that is directly\n // > under directory \"foo\".\n // Notice that the '*'s have been replaced as '\\\\*'\n /^\\^*\\\\\\*\\\\\\*\\\\\\//,\n\n // '**/foo' <-> 'foo'\n () => '^(?:.*\\\\/)?'\n ]\n]\n\nconst DEFAULT_REPLACER_SUFFIX = [\n // starting\n [\n // there will be no leading '/'\n // (which has been replaced by section \"leading slash\")\n // If starts with '**', adding a '^' to the regular expression also works\n /^(?=[^^])/,\n function startingReplacer () {\n return !/\\/(?!$)/.test(this)\n // > If the pattern does not contain a slash /,\n // > Git treats it as a shell glob pattern\n // Actually, if there is only a trailing slash,\n // git also treats it as a shell glob pattern\n ? '(?:^|\\\\/)'\n\n // > Otherwise, Git treats the pattern as a shell glob suitable for\n // > consumption by fnmatch(3)\n : '^'\n }\n ],\n\n // two globstars\n [\n // Use lookahead assertions so that we could match more than one `'/**'`\n /\\\\\\/\\\\\\*\\\\\\*(?=\\\\\\/|$)/g,\n\n // Zero, one or several directories\n // should not use '*', or it will be replaced by the next replacer\n\n // Check if it is not the last `'/**'`\n (_, index, str) => index + 6 < str.length\n\n // case: /**/\n // > A slash followed by two consecutive asterisks then a slash matches\n // > zero or more directories.\n // > For example, \"a/**/b\" matches \"a/b\", \"a/x/b\", \"a/x/y/b\" and so on.\n // '/**/'\n ? '(?:\\\\/[^\\\\/]+)*'\n\n // case: /**\n // > A trailing `\"/**\"` matches everything inside.\n\n // #21: everything inside but it should not include the current folder\n : '\\\\/.+'\n ],\n\n // intermediate wildcards\n [\n // Never replace escaped '*'\n // ignore rule '\\*' will match the path '*'\n\n // 'abc.*/' -> go\n // 'abc.*' -> skip this rule\n /(^|[^\\\\]+)\\\\\\*(?=.+)/g,\n\n // '*.js' matches '.js'\n // '*.js' doesn't match 'abc'\n (_, p1) => `${p1}[^\\\\/]*`\n ],\n\n // trailing wildcard\n [\n /(\\^|\\\\\\/)?\\\\\\*$/,\n (_, p1) => {\n const prefix = p1\n // '\\^':\n // '/*' does not match ''\n // '/*' does not match everything\n\n // '\\\\\\/':\n // 'abc/*' does not match 'abc/'\n ? `${p1}[^/]+`\n\n // 'a*' matches 'a'\n // 'a*' matches 'aa'\n : '[^/]*'\n\n return `${prefix}(?=$|\\\\/$)`\n }\n ],\n\n [\n // unescape\n /\\\\\\\\\\\\/g,\n () => '\\\\'\n ]\n]\n\nconst POSITIVE_REPLACERS = [\n ...DEFAULT_REPLACER_PREFIX,\n\n // 'f'\n // matches\n // - /f(end)\n // - /f/\n // - (start)f(end)\n // - (start)f/\n // doesn't match\n // - oof\n // - foo\n // pseudo:\n // -> (^|/)f(/|$)\n\n // ending\n [\n // 'js' will not match 'js.'\n // 'ab' will not match 'abc'\n /(?:[^*/])$/,\n\n // 'js*' will not match 'a.js'\n // 'js/' will not match 'a.js'\n // 'js' will match 'a.js' and 'a.js/'\n match => `${match}(?=$|\\\\/)`\n ],\n\n ...DEFAULT_REPLACER_SUFFIX\n]\n\nconst NEGATIVE_REPLACERS = [\n ...DEFAULT_REPLACER_PREFIX,\n\n // #24, #38\n // The MISSING rule of [gitignore docs](https://git-scm.com/docs/gitignore)\n // A negative pattern without a trailing wildcard should not\n // re-include the things inside that directory.\n\n // eg:\n // ['node_modules/*', '!node_modules']\n // should ignore `node_modules/a.js`\n [\n /(?:[^*])$/,\n match => `${match}(?=$|\\\\/$)`\n ],\n\n ...DEFAULT_REPLACER_SUFFIX\n]\n\n// A simple cache, because an ignore rule only has only one certain meaning\nconst regexCache = Object.create(null)\n\n// @param {pattern}\nconst makeRegex = (pattern, negative, ignorecase) => {\n const r = regexCache[pattern]\n if (r) {\n return r\n }\n\n const replacers = negative\n ? NEGATIVE_REPLACERS\n : POSITIVE_REPLACERS\n\n const source = replacers.reduce(\n (prev, current) => prev.replace(current[0], current[1].bind(pattern)),\n pattern\n )\n\n return regexCache[pattern] = ignorecase\n ? new RegExp(source, 'i')\n : new RegExp(source)\n}\n\nconst isString = subject => typeof subject === 'string'\n\n// > A blank line matches no files, so it can serve as a separator for readability.\nconst checkPattern = pattern => pattern\n && isString(pattern)\n && !REGEX_TEST_BLANK_LINE.test(pattern)\n\n // > A line starting with # serves as a comment.\n && pattern.indexOf('#') !== 0\n\nconst splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF)\n\nclass IgnoreRule {\n constructor (\n origin,\n pattern,\n negative,\n regex\n ) {\n this.origin = origin\n this.pattern = pattern\n this.negative = negative\n this.regex = regex\n }\n}\n\nconst createRule = (pattern, ignorecase) => {\n const origin = pattern\n let negative = false\n\n // > An optional prefix \"!\" which negates the pattern;\n if (pattern.indexOf('!') === 0) {\n negative = true\n pattern = pattern.substr(1)\n }\n\n pattern = pattern\n // > Put a backslash (\"\\\") in front of the first \"!\" for patterns that\n // > begin with a literal \"!\", for example, `\"\\!important!.txt\"`.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!')\n // > Put a backslash (\"\\\") in front of the first hash for patterns that\n // > begin with a hash.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#')\n\n const regex = makeRegex(pattern, negative, ignorecase)\n\n return new IgnoreRule(\n origin,\n pattern,\n negative,\n regex\n )\n}\n\nconst throwError = (message, Ctor) => {\n throw new Ctor(message)\n}\n\nconst returnFalse = () => false\n\nconst checkPath = (path, doThrow) => {\n if (!isString(path)) {\n return doThrow(\n `path must be a string, but got \\`${path}\\``,\n TypeError\n )\n }\n\n // We don't know if we should ignore '', so throw\n if (!path) {\n return doThrow(`path must not be empty`, TypeError)\n }\n\n //\n if (REGEX_TEST_INVALID_PATH.test(path)) {\n const r = '`path.relative()`d'\n return doThrow(\n `path should be a ${r} string, but got \"${path}\"`,\n RangeError\n )\n }\n\n return true\n}\n\nclass Ignore {\n constructor ({\n ignorecase = true\n } = {}) {\n this._rules = []\n this._ignorecase = ignorecase\n define(this, KEY_IGNORE, true)\n this._initCache()\n }\n\n _initCache () {\n this._ignoreCache = Object.create(null)\n this._testCache = Object.create(null)\n }\n\n _addPattern (pattern) {\n // #32\n if (pattern && pattern[KEY_IGNORE]) {\n this._rules = this._rules.concat(pattern._rules)\n this._added = true\n return\n }\n\n if (checkPattern(pattern)) {\n const rule = createRule(pattern, this._ignorecase)\n this._added = true\n this._rules.push(rule)\n }\n }\n\n // @param {Array | string | Ignore} pattern\n add (pattern) {\n this._added = false\n\n makeArray(\n isString(pattern)\n ? splitPattern(pattern)\n : pattern\n ).forEach(this._addPattern, this)\n\n // Some rules have just added to the ignore,\n // making the behavior changed.\n if (this._added) {\n this._initCache()\n }\n\n return this\n }\n\n // legacy\n addPattern (pattern) {\n return this.add(pattern)\n }\n\n // | ignored : unignored\n // negative | 0:0 | 0:1 | 1:0 | 1:1\n // -------- | ------- | ------- | ------- | --------\n // 0 | TEST | TEST | SKIP | X\n // 1 | TESTIF | SKIP | TEST | X\n\n // - SKIP: always skip\n // - TEST: always test\n // - TESTIF: only test if checkUnignored\n // - X: that never happen\n\n // @param {boolean} whether should check if the path is unignored,\n // setting `checkUnignored` to `false` could reduce additional\n // path matching.\n\n // @returns {TestResult} true if a file is ignored\n _testOne (path, checkUnignored) {\n let ignored = false\n let unignored = false\n\n this._rules.forEach(rule => {\n const {negative} = rule\n if (\n unignored === negative && ignored !== unignored\n || negative && !ignored && !unignored && !checkUnignored\n ) {\n return\n }\n\n const matched = rule.regex.test(path)\n\n if (matched) {\n ignored = !negative\n unignored = negative\n }\n })\n\n return {\n ignored,\n unignored\n }\n }\n\n // @returns {TestResult}\n _test (path, cache, checkUnignored, slices) {\n checkPath(path, throwError)\n\n if (path in cache) {\n return cache[path]\n }\n\n if (!slices) {\n // path/to/a.js\n // ['path', 'to', 'a.js']\n slices = path.split(SLASH)\n }\n\n slices.pop()\n\n // If the path has no parent directory, just test it\n if (!slices.length) {\n return cache[path] = this._testOne(path, checkUnignored)\n }\n\n const parent = this._test(\n slices.join(SLASH) + SLASH,\n cache,\n checkUnignored,\n slices\n )\n\n // If the path contains a parent directory, check the parent first\n return cache[path] = parent.ignored\n // > It is not possible to re-include a file if a parent directory of\n // > that file is excluded.\n ? parent\n : this._testOne(path, checkUnignored)\n }\n\n ignores (path) {\n return this._test(path, this._ignoreCache, false).ignored\n }\n\n createFilter () {\n return path => !this.ignores(path)\n }\n\n filter (paths) {\n return makeArray(paths).filter(this.createFilter())\n }\n\n // @returns {TestResult}\n test (path) {\n return this._test(path, this._testCache, true)\n }\n}\n\nconst factory = options => new Ignore(options)\n\nconst isPathValid = path => checkPath(path, returnFalse)\n\n\nfactory.isPathValid = isPathValid\n\n// Fixes typescript\nfactory.default = factory\n\nmodule.exports = factory\n\n// Windows\n// --------------------------------------------------------------\n/* istanbul ignore if */\nif (\n // Detect `process` so that it can run in browsers.\n typeof process !== 'undefined'\n && (\n process.env && process.env.IGNORE_TEST_WIN32\n || process.platform === 'win32'\n )\n) {\n const test = Ignore.prototype._test\n\n /* eslint no-control-regex: \"off\" */\n const makePosix = str => /^\\\\\\\\\\?\\\\/.test(str)\n || /[\"<>|\\u0000-\\u001F]+/u.test(str)\n ? str\n : str.replace(/\\\\/g, '/')\n\n Ignore.prototype._test = function testWin32 (path, ...args) {\n path = makePosix(path)\n return test.call(this, path, ...args)\n }\n\n factory.isPathValid = path => path\n ? isPathValid(makePosix(path))\n : isPathValid(path)\n}\n","import { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\n\nexport async function writeObjectLoose ({\n fs: _fs,\n gitdir,\n type,\n object,\n format,\n oid\n}) {\n const fs = new FileSystem(_fs)\n if (format !== 'deflated') {\n throw new GitError(E.InternalFail, {\n message:\n 'GitObjectStoreLoose expects objects to write to be in deflated format'\n })\n }\n let source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`\n let filepath = `${gitdir}/${source}`\n // Don't overwrite existing git objects - this helps avoid EPERM errors.\n // Although I don't know how we'd fix corrupted objects then. Perhaps delete them\n // on read?\n if (!(await fs.exists(filepath))) await fs.write(filepath, object)\n}\n","import { FileSystem } from '../models/FileSystem.js'\n\nexport async function readObjectLoose ({ fs: _fs, gitdir, oid }) {\n const fs = new FileSystem(_fs)\n let source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`\n let file = await fs.read(`${gitdir}/${source}`)\n if (!file) {\n return null\n }\n return { object: file, format: 'deflated', source }\n}\n","import { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { readPackIndex } from '../storage/readPackIndex.js'\nimport { join } from '../utils/join.js'\n\nexport async function readObjectPacked ({\n fs: _fs,\n gitdir,\n oid,\n format = 'content',\n getExternalRefDelta\n}) {\n const fs = new FileSystem(_fs)\n // Check to see if it's in a packfile.\n // Iterate through all the .idx files\n let list = await fs.readdir(join(gitdir, '/objects/pack'))\n list = list.filter(x => x.endsWith('.idx'))\n for (let filename of list) {\n const indexFile = `${gitdir}/objects/pack/${filename}`\n let p = await readPackIndex({\n fs,\n filename: indexFile,\n getExternalRefDelta\n })\n if (p.error) throw new GitError(E.InternalFail, { message: p.error })\n // If the packfile DOES have the oid we're looking for...\n if (p.offsets.has(oid)) {\n // Get the resolved git object from the packfile\n if (!p.pack) {\n const packFile = indexFile.replace(/idx$/, 'pack')\n p.pack = fs.read(packFile)\n }\n let result = await p.read({ oid, getExternalRefDelta })\n result.format = 'content'\n result.source = `objects/pack/${filename.replace(/idx$/, 'pack')}`\n return result\n }\n }\n // Failed to find it\n return null\n}\n","/* crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */\n/* vim: set ts=2: */\n/*exported CRC32 */\nvar CRC32;\n(function (factory) {\n\t/*jshint ignore:start */\n\t/*eslint-disable */\n\tif(typeof DO_NOT_EXPORT_CRC === 'undefined') {\n\t\tif('object' === typeof exports) {\n\t\t\tfactory(exports);\n\t\t} else if ('function' === typeof define && define.amd) {\n\t\t\tdefine(function () {\n\t\t\t\tvar module = {};\n\t\t\t\tfactory(module);\n\t\t\t\treturn module;\n\t\t\t});\n\t\t} else {\n\t\t\tfactory(CRC32 = {});\n\t\t}\n\t} else {\n\t\tfactory(CRC32 = {});\n\t}\n\t/*eslint-enable */\n\t/*jshint ignore:end */\n}(function(CRC32) {\nCRC32.version = '1.2.0';\n/* see perf/crc32table.js */\n/*global Int32Array */\nfunction signed_crc_table() {\n\tvar c = 0, table = new Array(256);\n\n\tfor(var n =0; n != 256; ++n){\n\t\tc = n;\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\ttable[n] = c;\n\t}\n\n\treturn typeof Int32Array !== 'undefined' ? new Int32Array(table) : table;\n}\n\nvar T = signed_crc_table();\nfunction crc32_bstr(bstr, seed) {\n\tvar C = seed ^ -1, L = bstr.length - 1;\n\tfor(var i = 0; i < L;) {\n\t\tC = (C>>>8) ^ T[(C^bstr.charCodeAt(i++))&0xFF];\n\t\tC = (C>>>8) ^ T[(C^bstr.charCodeAt(i++))&0xFF];\n\t}\n\tif(i === L) C = (C>>>8) ^ T[(C ^ bstr.charCodeAt(i))&0xFF];\n\treturn C ^ -1;\n}\n\nfunction crc32_buf(buf, seed) {\n\tif(buf.length > 10000) return crc32_buf_8(buf, seed);\n\tvar C = seed ^ -1, L = buf.length - 3;\n\tfor(var i = 0; i < L;) {\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t}\n\twhile(i < L+3) C = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\treturn C ^ -1;\n}\n\nfunction crc32_buf_8(buf, seed) {\n\tvar C = seed ^ -1, L = buf.length - 7;\n\tfor(var i = 0; i < L;) {\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t}\n\twhile(i < L+7) C = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\treturn C ^ -1;\n}\n\nfunction crc32_str(str, seed) {\n\tvar C = seed ^ -1;\n\tfor(var i = 0, L=str.length, c, d; i < L;) {\n\t\tc = str.charCodeAt(i++);\n\t\tif(c < 0x80) {\n\t\t\tC = (C>>>8) ^ T[(C ^ c)&0xFF];\n\t\t} else if(c < 0x800) {\n\t\t\tC = (C>>>8) ^ T[(C ^ (192|((c>>6)&31)))&0xFF];\n\t\t\tC = (C>>>8) ^ T[(C ^ (128|(c&63)))&0xFF];\n\t\t} else if(c >= 0xD800 && c < 0xE000) {\n\t\t\tc = (c&1023)+64; d = str.charCodeAt(i++)&1023;\n\t\t\tC = (C>>>8) ^ T[(C ^ (240|((c>>8)&7)))&0xFF];\n\t\t\tC = (C>>>8) ^ T[(C ^ (128|((c>>2)&63)))&0xFF];\n\t\t\tC = (C>>>8) ^ T[(C ^ (128|((d>>6)&15)|((c&3)<<4)))&0xFF];\n\t\t\tC = (C>>>8) ^ T[(C ^ (128|(d&63)))&0xFF];\n\t\t} else {\n\t\t\tC = (C>>>8) ^ T[(C ^ (224|((c>>12)&15)))&0xFF];\n\t\t\tC = (C>>>8) ^ T[(C ^ (128|((c>>6)&63)))&0xFF];\n\t\t\tC = (C>>>8) ^ T[(C ^ (128|(c&63)))&0xFF];\n\t\t}\n\t}\n\treturn C ^ -1;\n}\nCRC32.table = T;\n// $FlowIgnore\nCRC32.bstr = crc32_bstr;\n// $FlowIgnore\nCRC32.buf = crc32_buf;\n// $FlowIgnore\nCRC32.str = crc32_str;\n}));\n","module.exports = apply_delta\n\nvar binary = require('bops')\n , Decoder = require('varint/decode.js')\n , vi = new Decoder\n\n// we use writeUint[8|32][LE|BE] instead of indexing\n// into buffers so that we get buffer-browserify compat.\nvar OFFSET_BUFFER = binary.create(4)\n , LENGTH_BUFFER = binary.create(4)\n\nfunction apply_delta(delta, target) {\n var base_size_info = {size: null, buffer: null}\n , resized_size_info = {size: null, buffer: null}\n , output_buffer\n , out_idx\n , command\n , len\n , idx\n\n delta_header(delta, base_size_info)\n delta_header(base_size_info.buffer, resized_size_info)\n\n delta = resized_size_info.buffer\n\n idx =\n out_idx = 0\n output_buffer = binary.create(resized_size_info.size)\n\n len = delta.length\n\n while(idx < len) {\n command = delta[idx++]\n command & 0x80 ? copy() : insert()\n }\n\n return output_buffer\n\n function copy() {\n binary.writeUInt32LE(OFFSET_BUFFER, 0, 0)\n binary.writeUInt32LE(LENGTH_BUFFER, 0, 0)\n\n var check = 1\n , length\n , offset\n\n for(var x = 0; x < 4; ++x) {\n if(command & check) {\n OFFSET_BUFFER[3 - x] = delta[idx++]\n }\n check <<= 1\n }\n\n for(var x = 0; x < 3; ++x) {\n if(command & check) {\n LENGTH_BUFFER[3 - x] = delta[idx++]\n }\n check <<= 1\n }\n LENGTH_BUFFER[0] = 0\n\n length = binary.readUInt32BE(LENGTH_BUFFER, 0) || 0x10000\n offset = binary.readUInt32BE(OFFSET_BUFFER, 0)\n\n binary.copy(target, output_buffer, out_idx, offset, offset + length)\n out_idx += length\n }\n\n function insert() {\n binary.copy(delta, output_buffer, out_idx, idx, command + idx)\n idx += command\n out_idx += command\n }\n}\n\nfunction delta_header(buf, output) {\n var done = false\n , idx = 0\n , size = 0\n\n vi.ondata = function(s) {\n size = s\n done = true\n }\n\n do {\n vi.write(buf[idx++])\n } while(!done)\n\n output.size = size\n output.buffer = binary.subarray(buf, idx)\n}\n","// My version of git-list-pack - roughly 15x faster than the original\n// It's used slightly differently - instead of returning a through stream it wraps a stream.\n// (I tried to make it API identical, but that ended up being 2x slower than this version.)\nimport pako from 'pako'\nimport Hash from 'sha.js/sha1'\n\nimport { E, GitError } from '../models/GitError.js'\n\nimport { StreamReader } from './StreamReader.js'\n\nexport async function listpack (stream, onData) {\n let reader = new StreamReader(stream)\n let hash = new Hash()\n let PACK = await reader.read(4)\n hash.update(PACK)\n PACK = PACK.toString('utf8')\n if (PACK !== 'PACK') {\n throw new GitError(E.InternalFail, {\n message: `Invalid PACK header '${PACK}'`\n })\n }\n\n let version = await reader.read(4)\n hash.update(version)\n version = version.readUInt32BE(0)\n if (version !== 2) {\n throw new GitError(E.InternalFail, {\n message: `Invalid packfile version: ${version}`\n })\n }\n\n let numObjects = await reader.read(4)\n hash.update(numObjects)\n numObjects = numObjects.readUInt32BE(0)\n // If (for some godforsaken reason) this is an empty packfile, abort now.\n if (numObjects < 1) return\n\n while (!reader.eof() && numObjects--) {\n let offset = reader.tell()\n let { type, length, ofs, reference } = await parseHeader(reader, hash)\n let inflator = new pako.Inflate()\n while (!inflator.result) {\n let chunk = await reader.chunk()\n if (reader.ended) break\n inflator.push(chunk, false)\n if (inflator.err) {\n throw new GitError(E.InternalFail, {\n message: `Pako error: ${inflator.msg}`\n })\n }\n if (inflator.result) {\n if (inflator.result.length !== length) {\n throw new GitError(E.InternalFail, {\n message: `Inflated object size is different from that stated in packfile.`\n })\n }\n\n // Backtrack parser to where deflated data ends\n await reader.undo()\n let buf = await reader.read(chunk.length - inflator.strm.avail_in)\n hash.update(buf)\n let end = reader.tell()\n onData({\n data: inflator.result,\n type,\n num: numObjects,\n offset,\n end,\n reference,\n ofs\n })\n } else {\n hash.update(chunk)\n }\n }\n }\n}\n\nasync function parseHeader (reader, hash) {\n // Object type is encoded in bits 654\n let byte = await reader.byte()\n hash.update(Buffer.from([byte]))\n let type = (byte >> 4) & 0b111\n // The length encoding get complicated.\n // Last four bits of length is encoded in bits 3210\n let length = byte & 0b1111\n // Whether the next byte is part of the variable-length encoded number\n // is encoded in bit 7\n if (byte & 0b10000000) {\n let shift = 4\n do {\n byte = await reader.byte()\n hash.update(Buffer.from([byte]))\n length |= (byte & 0b01111111) << shift\n shift += 7\n } while (byte & 0b10000000)\n }\n // Handle deltified objects\n let ofs\n let reference\n if (type === 6) {\n let shift = 0\n ofs = 0\n let bytes = []\n do {\n byte = await reader.byte()\n hash.update(Buffer.from([byte]))\n ofs |= (byte & 0b01111111) << shift\n shift += 7\n bytes.push(byte)\n } while (byte & 0b10000000)\n reference = Buffer.from(bytes)\n }\n if (type === 7) {\n let buf = await reader.read(20)\n hash.update(buf)\n reference = buf\n }\n return { type, length, ofs, reference }\n}\n","export function outdent (str) {\n return str\n .split('\\n')\n .map(x => x.replace(/^ /, ''))\n .join('\\n')\n}\n","export const types = {\n commit: 0b0010000,\n tree: 0b0100000,\n blob: 0b0110000,\n tag: 0b1000000,\n ofs_delta: 0b1100000,\n ref_delta: 0b1110000\n}\n","const isWin = process.platform === 'win32';\nconst SEP = isWin ? `\\\\\\\\+` : `\\\\/`;\nconst SEP_ESC = isWin ? `\\\\\\\\` : `/`;\nconst GLOBSTAR = `((?:[^/]*(?:/|$))*)`;\nconst WILDCARD = `([^/]*)`;\nconst GLOBSTAR_SEGMENT = `((?:[^${SEP_ESC}]*(?:${SEP_ESC}|$))*)`;\nconst WILDCARD_SEGMENT = `([^${SEP_ESC}]*)`;\n\n/**\n * Convert any glob pattern to a JavaScript Regexp object\n * @param {String} glob Glob pattern to convert\n * @param {Object} opts Configuration object\n * @param {Boolean} [opts.extended=false] Support advanced ext globbing\n * @param {Boolean} [opts.globstar=false] Support globstar\n * @param {Boolean} [opts.strict=true] be laissez faire about mutiple slashes\n * @param {Boolean} [opts.filepath=''] Parse as filepath for extra path related features\n * @param {String} [opts.flags=''] RegExp globs\n * @returns {Object} converted object with string, segments and RegExp object\n */\nfunction globrex(glob, {extended = false, globstar = false, strict = false, filepath = false, flags = ''} = {}) {\n let regex = '';\n let segment = '';\n let path = { regex: '', segments: [] };\n\n // If we are doing extended matching, this boolean is true when we are inside\n // a group (eg {*.html,*.js}), and false otherwise.\n let inGroup = false;\n let inRange = false;\n\n // extglob stack. Keep track of scope\n const ext = [];\n\n // Helper function to build string and segments\n function add(str, {split, last, only}={}) {\n if (only !== 'path') regex += str;\n if (filepath && only !== 'regex') {\n path.regex += (str === '\\\\/' ? SEP : str);\n if (split) {\n if (last) segment += str;\n if (segment !== '') {\n if (!flags.includes('g')) segment = `^${segment}$`; // change it 'includes'\n path.segments.push(new RegExp(segment, flags));\n }\n segment = '';\n } else {\n segment += str;\n }\n }\n }\n\n let c, n;\n for (let i = 0; i < glob.length; i++) {\n c = glob[i];\n n = glob[i + 1];\n\n if (['\\\\', '$', '^', '.', '='].includes(c)) {\n add(`\\\\${c}`);\n continue;\n }\n\n if (c === '/') {\n add(`\\\\${c}`, {split: true});\n if (n === '/' && !strict) regex += '?';\n continue;\n }\n\n if (c === '(') {\n if (ext.length) {\n add(c);\n continue;\n }\n add(`\\\\${c}`);\n continue;\n }\n\n if (c === ')') {\n if (ext.length) {\n add(c);\n let type = ext.pop();\n if (type === '@') {\n add('{1}');\n } else if (type === '!') {\n add('([^\\/]*)');\n } else {\n add(type);\n }\n continue;\n }\n add(`\\\\${c}`);\n continue;\n }\n \n if (c === '|') {\n if (ext.length) {\n add(c);\n continue;\n }\n add(`\\\\${c}`);\n continue;\n }\n\n if (c === '+') {\n if (n === '(' && extended) {\n ext.push(c);\n continue;\n }\n add(`\\\\${c}`);\n continue;\n }\n\n if (c === '@' && extended) {\n if (n === '(') {\n ext.push(c);\n continue;\n }\n }\n\n if (c === '!') {\n if (extended) {\n if (inRange) {\n add('^');\n continue\n }\n if (n === '(') {\n ext.push(c);\n add('(?!');\n i++;\n continue;\n }\n add(`\\\\${c}`);\n continue;\n }\n add(`\\\\${c}`);\n continue;\n }\n\n if (c === '?') {\n if (extended) {\n if (n === '(') {\n ext.push(c);\n } else {\n add('.');\n }\n continue;\n }\n add(`\\\\${c}`);\n continue;\n }\n\n if (c === '[') {\n if (inRange && n === ':') {\n i++; // skip [\n let value = '';\n while(glob[++i] !== ':') value += glob[i];\n if (value === 'alnum') add('(\\\\w|\\\\d)');\n else if (value === 'space') add('\\\\s');\n else if (value === 'digit') add('\\\\d');\n i++; // skip last ]\n continue;\n }\n if (extended) {\n inRange = true;\n add(c);\n continue;\n }\n add(`\\\\${c}`);\n continue;\n }\n\n if (c === ']') {\n if (extended) {\n inRange = false;\n add(c);\n continue;\n }\n add(`\\\\${c}`);\n continue;\n }\n\n if (c === '{') {\n if (extended) {\n inGroup = true;\n add('(');\n continue;\n }\n add(`\\\\${c}`);\n continue;\n }\n\n if (c === '}') {\n if (extended) {\n inGroup = false;\n add(')');\n continue;\n }\n add(`\\\\${c}`);\n continue;\n }\n\n if (c === ',') {\n if (inGroup) {\n add('|');\n continue;\n }\n add(`\\\\${c}`);\n continue;\n }\n\n if (c === '*') {\n if (n === '(' && extended) {\n ext.push(c);\n continue;\n }\n // Move over all consecutive \"*\"'s.\n // Also store the previous and next characters\n let prevChar = glob[i - 1];\n let starCount = 1;\n while (glob[i + 1] === '*') {\n starCount++;\n i++;\n }\n let nextChar = glob[i + 1];\n if (!globstar) {\n // globstar is disabled, so treat any number of \"*\" as one\n add('.*');\n } else {\n // globstar is enabled, so determine if this is a globstar segment\n let isGlobstar =\n starCount > 1 && // multiple \"*\"'s\n (prevChar === '/' || prevChar === undefined) && // from the start of the segment\n (nextChar === '/' || nextChar === undefined); // to the end of the segment\n if (isGlobstar) {\n // it's a globstar, so match zero or more path segments\n add(GLOBSTAR, {only:'regex'});\n add(GLOBSTAR_SEGMENT, {only:'path', last:true, split:true});\n i++; // move over the \"/\"\n } else {\n // it's not a globstar, so only match one path segment\n add(WILDCARD, {only:'regex'});\n add(WILDCARD_SEGMENT, {only:'path'});\n }\n }\n continue;\n }\n\n add(c);\n }\n\n\n // When regexp 'g' flag is specified don't\n // constrain the regular expression with ^ & $\n if (!flags.includes('g')) {\n regex = `^${regex}$`;\n segment = `^${segment}$`;\n if (filepath) path.regex = `^${path.regex}$`;\n }\n\n const result = {regex: new RegExp(regex, flags)};\n\n // Push the last segment\n if (filepath) {\n path.segments.push(new RegExp(segment, flags));\n path.regex = new RegExp(path.regex, flags);\n path.globstar = new RegExp(!flags.includes('g') ? `^${GLOBSTAR_SEGMENT}$` : GLOBSTAR_SEGMENT, flags);\n result.path = path;\n }\n\n return result;\n}\n\nmodule.exports = globrex;\n","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","'use strict';\n\nvar AsyncLock = function (opts) {\n\topts = opts || {};\n\n\tthis.Promise = opts.Promise || Promise;\n\n\t// format: {key : [fn, fn]}\n\t// queues[key] = null indicates no job running for key\n\tthis.queues = {};\n\n\t// domain of current running func {key : fn}\n\tthis.domains = {};\n\n\t// lock is reentrant for same domain\n\tthis.domainReentrant = opts.domainReentrant || false;\n\n\tthis.timeout = opts.timeout || AsyncLock.DEFAULT_TIMEOUT;\n\tthis.maxPending = opts.maxPending || AsyncLock.DEFAULT_MAX_PENDING;\n};\n\nAsyncLock.DEFAULT_TIMEOUT = 0; //Never\nAsyncLock.DEFAULT_MAX_PENDING = 1000;\n\n/**\n * Acquire Locks\n *\n * @param {String|Array} key \tresource key or keys to lock\n * @param {function} fn \tasync function\n * @param {function} cb \tcallback function, otherwise will return a promise\n * @param {Object} opts \toptions\n */\nAsyncLock.prototype.acquire = function (key, fn, cb, opts) {\n\tif (Array.isArray(key)) {\n\t\treturn this._acquireBatch(key, fn, cb, opts);\n\t}\n\n\tif (typeof (fn) !== 'function') {\n\t\tthrow new Error('You must pass a function to execute');\n\t}\n\n\tvar deferred = null;\n\tif (typeof (cb) !== 'function') {\n\t\topts = cb;\n\t\tcb = null;\n\n\t\t// will return a promise\n\t\tdeferred = this._deferPromise();\n\t}\n\n\topts = opts || {};\n\n\tvar resolved = false;\n\tvar timer = null;\n\tvar self = this;\n\n\tvar done = function (locked, err, ret) {\n\t\tif (locked) {\n\t\t\tif (self.queues[key].length === 0) {\n\t\t\t\tdelete self.queues[key];\n\t\t\t}\n\t\t\tdelete self.domains[key];\n\t\t}\n\n\t\tif (!resolved) {\n\t\t\tif (!deferred) {\n\t\t\t\tif (typeof (cb) === 'function') {\n\t\t\t\t\tcb(err, ret);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//promise mode\n\t\t\t\tif (err) {\n\t\t\t\t\tdeferred.reject(err);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdeferred.resolve(ret);\n\t\t\t\t}\n\t\t\t}\n\t\t\tresolved = true;\n\t\t}\n\n\t\tif (locked) {\n\t\t\t//run next func\n\t\t\tif (!!self.queues[key] && self.queues[key].length > 0) {\n\t\t\t\tself.queues[key].shift()();\n\t\t\t}\n\t\t}\n\t};\n\n\tvar exec = function (locked) {\n\t\tif (resolved) { // may due to timed out\n\t\t\treturn done(locked);\n\t\t}\n\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = null;\n\t\t}\n\n\t\tif (locked) {\n\t\t\tself.domains[key] = process.domain;\n\t\t}\n\n\t\t// Callback mode\n\t\tif (fn.length === 1) {\n\t\t\tvar called = false;\n\t\t\tfn(function (err, ret) {\n\t\t\t\tif (!called) {\n\t\t\t\t\tcalled = true;\n\t\t\t\t\tdone(locked, err, ret);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\t// Promise mode\n\t\t\tself._promiseTry(function () {\n\t\t\t\treturn fn();\n\t\t\t})\n\t\t\t.then(function(ret){\n\t\t\t\tdone(locked, undefined, ret);\n\t\t\t}, function(error){\n\t\t\t\tdone(locked, error);\n\t\t\t});\n\t\t}\n\t};\n\tif (!!process.domain) {\n\t\texec = process.domain.bind(exec);\n\t}\n\n\tif (!self.queues[key]) {\n\t\tself.queues[key] = [];\n\t\texec(true);\n\t}\n\telse if (self.domainReentrant && !!process.domain && process.domain === self.domains[key]) {\n\t\t// If code is in the same domain of current running task, run it directly\n\t\t// Since lock is re-enterable\n\t\texec(false);\n\t}\n\telse if (self.queues[key].length >= self.maxPending) {\n\t\tdone(false, new Error('Too much pending tasks'));\n\t}\n\telse {\n\t\tvar taskFn = function () {\n\t\t\texec(true);\n\t\t};\n\t\tif (opts.skipQueue) {\n\t\t\tself.queues[key].unshift(taskFn);\n\t\t} else {\n\t\t\tself.queues[key].push(taskFn);\n\t\t}\n\n\t\tvar timeout = opts.timeout || self.timeout;\n\t\tif (timeout) {\n\t\t\ttimer = setTimeout(function () {\n\t\t\t\ttimer = null;\n\t\t\t\tdone(false, new Error('async-lock timed out'));\n\t\t\t}, timeout);\n\t\t}\n\t}\n\n\tif (deferred) {\n\t\treturn deferred.promise;\n\t}\n};\n\n/*\n * Below is how this function works:\n *\n * Equivalent code:\n * self.acquire(key1, function(cb){\n * self.acquire(key2, function(cb){\n * self.acquire(key3, fn, cb);\n * }, cb);\n * }, cb);\n *\n * Equivalent code:\n * var fn3 = getFn(key3, fn);\n * var fn2 = getFn(key2, fn3);\n * var fn1 = getFn(key1, fn2);\n * fn1(cb);\n */\nAsyncLock.prototype._acquireBatch = function (keys, fn, cb, opts) {\n\tif (typeof (cb) !== 'function') {\n\t\topts = cb;\n\t\tcb = null;\n\t}\n\n\tvar self = this;\n\tvar getFn = function (key, fn) {\n\t\treturn function (cb) {\n\t\t\tself.acquire(key, fn, cb, opts);\n\t\t};\n\t};\n\n\tvar fnx = fn;\n\tkeys.reverse().forEach(function (key) {\n\t\tfnx = getFn(key, fnx);\n\t});\n\n\tif (typeof (cb) === 'function') {\n\t\tfnx(cb);\n\t}\n\telse {\n\t\tvar deferred = this._deferPromise();\n\t\t// check for promise mode in case keys is empty array\n\t\tif (fnx.length === 1) {\n\t\t\tfnx(function (err, ret) {\n\t\t\t\tif (err) {\n\t\t\t\t\tdeferred.reject(err);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdeferred.resolve(ret);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tdeferred.resolve(fnx());\n\t\t}\n\t\treturn deferred.promise;\n\t}\n};\n\n/*\n *\tWhether there is any running or pending asyncFunc\n *\n *\t@param {String} key\n */\nAsyncLock.prototype.isBusy = function (key) {\n\tif (!key) {\n\t\treturn Object.keys(this.queues).length > 0;\n\t}\n\telse {\n\t\treturn !!this.queues[key];\n\t}\n};\n\n/**\n * Promise.try() implementation to become independent of Q-specific methods\n */\nAsyncLock.prototype._promiseTry = function(fn) {\n\ttry {\n\t\treturn this.Promise.resolve(fn());\n\t} catch (e) {\n\t\treturn this.Promise.reject(e);\n\t}\n};\n\n/**\n * Promise.defer() implementation to become independent of Q-specific methods\n */\nAsyncLock.prototype._deferPromise = function() {\n\tif (typeof this.Promise.defer === 'function') {\n\t\t// note that Q does not have a constructor with reject/resolve functions so we have no option but use its defer() method\n\t\treturn this.Promise.defer();\n\t} else {\n\t\t// for promise implementations that don't have a defer() method we create one ourselves\n\t\tvar result = {\n\t\t\treject: function(err) {\n\t\t\t\t// some promise libraries e.g. Q take some time setting the reject property while others do it synchronously\n\t\t\t\treturn Promise.resolve().then(function() {\n\t\t\t\t\tresult.reject(err);\n\t\t\t\t});\n\t\t\t},\n\t\t\tresolve: function(ret) {\n\t\t\t\t// some promise libraries e.g. Q take some time setting the reject property while others do it synchronously\n\t\t\t\treturn Promise.resolve().then(function() {\n\t\t\t\t\tresult.resolve(ret);\n\t\t\t\t});\n\t\t\t},\n\t\t\tpromise: undefined\n\t\t};\n\t\tresult.promise = new this.Promise(function(resolve, reject) {\n\t\t\tresult.reject = reject;\n\t\t\tresult.resolve = resolve;\n\t\t});\n\t\treturn result;\n\t}\n};\n\nmodule.exports = AsyncLock;\n\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n","var Buffer = require('safe-buffer').Buffer\n\n// prototype class for hash functions\nfunction Hash (blockSize, finalSize) {\n this._block = Buffer.alloc(blockSize)\n this._finalSize = finalSize\n this._blockSize = blockSize\n this._len = 0\n}\n\nHash.prototype.update = function (data, enc) {\n if (typeof data === 'string') {\n enc = enc || 'utf8'\n data = Buffer.from(data, enc)\n }\n\n var block = this._block\n var blockSize = this._blockSize\n var length = data.length\n var accum = this._len\n\n for (var offset = 0; offset < length;) {\n var assigned = accum % blockSize\n var remainder = Math.min(length - offset, blockSize - assigned)\n\n for (var i = 0; i < remainder; i++) {\n block[assigned + i] = data[offset + i]\n }\n\n accum += remainder\n offset += remainder\n\n if ((accum % blockSize) === 0) {\n this._update(block)\n }\n }\n\n this._len += length\n return this\n}\n\nHash.prototype.digest = function (enc) {\n var rem = this._len % this._blockSize\n\n this._block[rem] = 0x80\n\n // zero (rem + 1) trailing bits, where (rem + 1) is the smallest\n // non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize\n this._block.fill(0, rem + 1)\n\n if (rem >= this._finalSize) {\n this._update(this._block)\n this._block.fill(0)\n }\n\n var bits = this._len * 8\n\n // uint32\n if (bits <= 0xffffffff) {\n this._block.writeUInt32BE(bits, this._blockSize - 4)\n\n // uint64\n } else {\n var lowBits = (bits & 0xffffffff) >>> 0\n var highBits = (bits - lowBits) / 0x100000000\n\n this._block.writeUInt32BE(highBits, this._blockSize - 8)\n this._block.writeUInt32BE(lowBits, this._blockSize - 4)\n }\n\n this._update(this._block)\n var hash = this._hash()\n\n return enc ? hash.toString(enc) : hash\n}\n\nHash.prototype._update = function () {\n throw new Error('_update must be implemented by subclass')\n}\n\nmodule.exports = Hash\n","'use strict';\n\n\nvar zlib_deflate = require('./zlib/deflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\n\nvar toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nvar Z_NO_FLUSH = 0;\nvar Z_FINISH = 4;\n\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_SYNC_FLUSH = 2;\n\nvar Z_DEFAULT_COMPRESSION = -1;\n\nvar Z_DEFAULT_STRATEGY = 0;\n\nvar Z_DEFLATED = 8;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array|Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Deflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n if (!(this instanceof Deflate)) return new Deflate(options);\n\n this.options = utils.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_deflate.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n if (opt.header) {\n zlib_deflate.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n var dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = zlib_deflate.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the compression context.\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * array format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var status, _mode;\n\n if (this.ended) { return false; }\n\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n status = zlib_deflate.deflate(strm, _mode); /* no bad return value */\n\n if (status !== Z_STREAM_END && status !== Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {\n if (this.options.to === 'string') {\n this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);\n\n // Finalize on the last chunk.\n if (_mode === Z_FINISH) {\n status = zlib_deflate.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === Z_SYNC_FLUSH) {\n this.onEnd(Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , data = Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n var deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || msg[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate(input, options);\n}\n\n\nexports.Deflate = Deflate;\nexports.deflate = deflate;\nexports.deflateRaw = deflateRaw;\nexports.gzip = gzip;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar trees = require('./trees');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar msg = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\nvar Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\n//var Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\n//var Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\n//var Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION = 0;\n//var Z_BEST_SPEED = 1;\n//var Z_BEST_COMPRESSION = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED = 1;\nvar Z_HUFFMAN_ONLY = 2;\nvar Z_RLE = 3;\nvar Z_FIXED = 4;\nvar Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY = 0;\n//var Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES = 30;\n/* number of distance codes */\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}\n\nfunction rank(f) {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n var s = strm.state;\n\n //_tr_flush_bits(s);\n var len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n}\n\n\nfunction flush_block_only(s, last) {\n trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n// put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n utils.arraySet(buf, strm.input, strm.next_in, len, start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n var chain_length = s.max_chain_length; /* max hash chain length */\n var scan = s.strstart; /* current string */\n var match; /* matched string */\n var len; /* length of current match */\n var best_len = s.prev_length; /* best match length so far */\n var nice_match = s.nice_match; /* stop if match long enough */\n var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n var _win = s.window; // shortcut\n\n var wmask = s.w_mask;\n var prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n var strend = s.strstart + MAX_MATCH;\n var scan_end1 = _win[scan + best_len - 1];\n var scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nfunction fill_window(s) {\n var _w_size = s.w_size;\n var p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// var curr = s.strstart + s.lookahead;\n// var init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n var hash_head; /* head of the hash chain */\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n var hash_head; /* head of hash chain */\n var bflush; /* set if current block must be flushed */\n\n var max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n var bflush; /* set if current block must be flushed */\n var prev; /* byte at distance one to match */\n var scan, strend; /* scan goes up to strend for length of run */\n\n var _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nvar configuration_table;\n\nconfiguration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2);\n this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2);\n this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new utils.Buf16(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nfunction deflateResetKeep(strm) {\n var s;\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n trees._tr_init(s);\n return Z_OK;\n}\n\n\nfunction deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n}\n\n\nfunction deflateSetHeader(strm, head) {\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n strm.state.gzhead = head;\n return Z_OK;\n}\n\n\nfunction deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n var wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n var s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new utils.Buf8(s.w_size * 2);\n s.head = new utils.Buf16(s.hash_size);\n s.prev = new utils.Buf16(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new utils.Buf8(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n}\n\nfunction deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nfunction deflate(strm, flush) {\n var old_flush, s;\n var beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n var level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n trees._tr_align(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n trees._tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nfunction deflateEnd(strm) {\n var status;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nfunction deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var s;\n var str, n;\n var wrap;\n var avail;\n var next;\n var input;\n var tmpDict;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n s = strm.state;\n wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n tmpDict = new utils.Buf8(s.w_size);\n utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n avail = strm.avail_in;\n next = strm.next_in;\n input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart;\n n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n}\n\n\nexports.deflateInit = deflateInit;\nexports.deflateInit2 = deflateInit2;\nexports.deflateReset = deflateReset;\nexports.deflateResetKeep = deflateResetKeep;\nexports.deflateSetHeader = deflateSetHeader;\nexports.deflate = deflate;\nexports.deflateEnd = deflateEnd;\nexports.deflateSetDictionary = deflateSetDictionary;\nexports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED = 1;\n//var Z_HUFFMAN_ONLY = 2;\n//var Z_RLE = 3;\nvar Z_FIXED = 4;\n//var Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY = 0;\nvar Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES = 30;\n/* number of distance codes */\n\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK = 256;\n/* end of block literal code */\n\nvar REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nvar extra_lbits = /* extra bits for each length code */\n [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];\n\nvar extra_dbits = /* extra bits for each distance code */\n [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];\n\nvar extra_blbits = /* extra bits for each bit length code */\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];\n\nvar bl_order =\n [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nfunction d_code(dist) {\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short(s, w) {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n}\n\n\nfunction send_code(s, c, tree) {\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n var res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nfunction gen_bitlen(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var max_code = desc.max_code;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var extra = desc.stat_desc.extra_bits;\n var base = desc.stat_desc.extra_base;\n var max_length = desc.stat_desc.max_length;\n var h; /* heap index */\n var n, m; /* iterate over the tree elements */\n var bits; /* bit length */\n var xbits; /* extra bits */\n var f; /* frequency */\n var overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count)\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n var code = 0; /* running code value */\n var bits; /* bit index */\n var n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n var n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s)\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header)\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n var _n2 = n * 2;\n var _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n var dist; /* distance of matched string */\n var lc; /* match length or unmatched char (if dist == 0) */\n var lx = 0; /* running index in l_buf */\n var code; /* the code to send */\n var extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var elems = desc.stat_desc.elems;\n var n, m; /* iterate over heap elements */\n var max_code = -1; /* largest code with non zero frequency */\n var node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n var max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n var rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n var black_mask = 0xf3ffc07f;\n var n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nfunction _tr_init(s)\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nfunction _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nfunction _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nfunction _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n var opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n var max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nfunction _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}\n\nexports._tr_init = _tr_init;\nexports._tr_stored_block = _tr_stored_block;\nexports._tr_flush_block = _tr_flush_block;\nexports._tr_tally = _tr_tally;\nexports._tr_align = _tr_align;\n","'use strict';\n\n\nvar zlib_inflate = require('./zlib/inflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar c = require('./zlib/constants');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\nvar GZheader = require('./zlib/gzheader');\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n if (!(this instanceof Inflate)) return new Inflate(options);\n\n this.options = utils.assign({\n chunkSize: 16384,\n windowBits: 0,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_inflate.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n\n this.header = new GZheader();\n\n zlib_inflate.inflateGetHeader(this.strm, this.header);\n}\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var dictionary = this.options.dictionary;\n var status, _mode;\n var next_out_utf8, tail, utf8str;\n var dict;\n\n // Flag to properly process Z_BUF_ERROR on testing inflate call\n // when we check that all output data was flushed.\n var allowBufError = false;\n\n if (this.ended) { return false; }\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // Only binary strings can be decompressed on practice\n strm.input = strings.binstring2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */\n\n if (status === c.Z_NEED_DICT && dictionary) {\n // Convert data if needed\n if (typeof dictionary === 'string') {\n dict = strings.string2buf(dictionary);\n } else if (toString.call(dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(dictionary);\n } else {\n dict = dictionary;\n }\n\n status = zlib_inflate.inflateSetDictionary(this.strm, dict);\n\n }\n\n if (status === c.Z_BUF_ERROR && allowBufError === true) {\n status = c.Z_OK;\n allowBufError = false;\n }\n\n if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n if (this.options.to === 'string') {\n\n next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n tail = strm.next_out - next_out_utf8;\n utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n this.onData(utf8str);\n\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n }\n\n // When no more input data, we should check that internal inflate buffers\n // are flushed. The only way to do it when avail_out = 0 - run one more\n // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n // Here we set flag to process this error properly.\n //\n // NOTE. Deflate does not return error in this case and does not needs such\n // logic.\n if (strm.avail_in === 0 && strm.avail_out === 0) {\n allowBufError = true;\n }\n\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);\n\n if (status === c.Z_STREAM_END) {\n _mode = c.Z_FINISH;\n }\n\n // Finalize on the last chunk.\n if (_mode === c.Z_FINISH) {\n status = zlib_inflate.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === c.Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === c.Z_SYNC_FLUSH) {\n this.onEnd(c.Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === c.Z_OK) {\n if (this.options.to === 'string') {\n // Glue & convert here, until we teach pako to send\n // utf8 aligned strings to onData\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n * , output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err)\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n var inflator = new Inflate(options);\n\n inflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) { throw inflator.msg || msg[inflator.err]; }\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip = inflate;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar inflate_fast = require('./inffast');\nvar inflate_table = require('./inftrees');\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\n//var Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\nvar Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\nvar Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar HEAD = 1; /* i: waiting for magic header */\nvar FLAGS = 2; /* i: waiting for method and flags (gzip) */\nvar TIME = 3; /* i: waiting for modification time (gzip) */\nvar OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nvar EXLEN = 5; /* i: waiting for extra length (gzip) */\nvar EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nvar NAME = 7; /* i: waiting for end of file name (gzip) */\nvar COMMENT = 8; /* i: waiting for end of comment (gzip) */\nvar HCRC = 9; /* i: waiting for header crc (gzip) */\nvar DICTID = 10; /* i: waiting for dictionary check value */\nvar DICT = 11; /* waiting for inflateSetDictionary() call */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nvar TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nvar STORED = 14; /* i: waiting for stored size (length and complement) */\nvar COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nvar COPY = 16; /* i/o: waiting for input or output to copy stored block */\nvar TABLE = 17; /* i: waiting for dynamic block table lengths */\nvar LENLENS = 18; /* i: waiting for code length code lengths */\nvar CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nvar LEN_ = 20; /* i: same as LEN below, but only first time in */\nvar LEN = 21; /* i: waiting for length/lit/eob code */\nvar LENEXT = 22; /* i: waiting for length extra bits */\nvar DIST = 23; /* i: waiting for distance code */\nvar DISTEXT = 24; /* i: waiting for distance extra bits */\nvar MATCH = 25; /* o: waiting for output space to copy string */\nvar LIT = 26; /* o: waiting for output space to write literal */\nvar CHECK = 27; /* i: waiting for 32-bit check value */\nvar LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nvar DONE = 29; /* finished check, done -- remain here until reset */\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar MEM = 31; /* got an inflate() memory error -- remain here until reset */\nvar SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n this.work = new utils.Buf16(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n}\n\nfunction inflateReset(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n var wrap;\n var state;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n var ret;\n var state;\n\n if (!strm) { return Z_STREAM_ERROR; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n}\n\nfunction inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n var sym;\n\n lenfix = new utils.Buf32(512);\n distfix = new utils.Buf32(32);\n\n /* literal/length table */\n sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}\n\nfunction inflate(strm, flush) {\n var state;\n var input, output; // input/output buffers\n var next; /* next input INDEX */\n var put; /* next output INDEX */\n var have, left; /* available input and output */\n var hold; /* bit buffer */\n var bits; /* bits in bit buffer */\n var _in, _out; /* save starting available input and output */\n var copy; /* number of stored or match bytes to copy */\n var from; /* where to copy match bytes from */\n var from_source;\n var here = 0; /* current decoding table entry */\n var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //var last; /* parent table entry */\n var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n var len; /* length to copy for repeats, bits to drop */\n var ret; /* return code */\n var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */\n var opts;\n\n var n; // temporary var for NEED_BITS\n\n var order = /* permutation of code lengths */\n [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n state.dmax = 1 << len;\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Array(state.head.extra_len);\n }\n utils.arraySet(\n state.head.extra,\n input,\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n copy,\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n utils.arraySet(output, input, next, copy, put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n}\n\nfunction inflateEnd(strm) {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR;\n }\n\n var state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n var state;\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n}\n\nfunction inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var state;\n var dictid;\n var ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n}\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n var state;\n var _in; /* local strm.input */\n var last; /* have enough input while in < last */\n var _out; /* local strm.output */\n var beg; /* inflate()'s initial strm.output */\n var end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n var dmax; /* maximum distance from zlib header */\n//#endif\n var wsize; /* window size or zero if not using window */\n var whave; /* valid bytes in the window */\n var wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n var s_window; /* allocated sliding window, if wsize != 0 */\n var hold; /* local strm.hold */\n var bits; /* local strm.bits */\n var lcode; /* local strm.lencode */\n var dcode; /* local strm.distcode */\n var lmask; /* mask for first level of length codes */\n var dmask; /* mask for first level of distance codes */\n var here; /* retrieved table entry */\n var op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n var len; /* match length, unused bytes */\n var dist; /* match distance */\n var from; /* where to copy match from */\n var from_source;\n\n\n var input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n var bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n var len = 0; /* a code's length in bits */\n var sym = 0; /* index of code symbols */\n var min = 0, max = 0; /* minimum and maximum code lengths */\n var root = 0; /* number of index bits for root table */\n var curr = 0; /* number of index bits for current table */\n var drop = 0; /* code bits to drop for sub-table */\n var left = 0; /* number of prefix codes available */\n var used = 0; /* code entries in table used */\n var huff = 0; /* Huffman code */\n var incr; /* for incrementing code, index */\n var fill; /* index for replicating entries */\n var low; /* low bits for current root entry */\n var mask; /* mask for low root bits */\n var next; /* next available space in table */\n var base = null; /* base value table to use */\n var base_index = 0;\n// var shoextra; /* extra bits table to use */\n var end; /* use base and extra for symbol > end */\n var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n var extra = null;\n var extra_index = 0;\n\n var here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nmodule.exports = GZheader;\n","var proto = {}\nmodule.exports = proto\n\nproto.from = require('./from.js')\nproto.to = require('./to.js')\nproto.is = require('./is.js')\nproto.subarray = require('./subarray.js')\nproto.join = require('./join.js')\nproto.copy = require('./copy.js')\nproto.create = require('./create.js')\n\nmix(require('./read.js'), proto)\nmix(require('./write.js'), proto)\n\nfunction mix(from, into) {\n for(var key in from) {\n into[key] = from[key]\n }\n}\n","module.exports = from\n\nvar base64 = require('base64-js')\n\nvar decoders = {\n hex: from_hex\n , utf8: from_utf\n , base64: from_base64\n}\n\nfunction from(source, encoding) {\n if(Array.isArray(source)) {\n return new Uint8Array(source)\n }\n\n return decoders[encoding || 'utf8'](source)\n}\n\nfunction from_hex(str) {\n var size = str.length / 2\n , buf = new Uint8Array(size)\n , character = ''\n\n for(var i = 0, len = str.length; i < len; ++i) {\n character += str.charAt(i)\n\n if(i > 0 && (i % 2) === 1) {\n buf[i>>>1] = parseInt(character, 16)\n character = '' \n }\n }\n\n return buf \n}\n\nfunction from_utf(str) {\n var bytes = []\n , tmp\n , ch\n\n for(var i = 0, len = str.length; i < len; ++i) {\n ch = str.charCodeAt(i)\n if(ch & 0x80) {\n tmp = encodeURIComponent(str.charAt(i)).substr(1).split('%')\n for(var j = 0, jlen = tmp.length; j < jlen; ++j) {\n bytes[bytes.length] = parseInt(tmp[j], 16)\n }\n } else {\n bytes[bytes.length] = ch \n }\n }\n\n return new Uint8Array(bytes)\n}\n\nfunction from_base64(str) {\n return new Uint8Array(base64.toByteArray(str)) \n}\n","module.exports = to\n\nvar base64 = require('base64-js')\n , toutf8 = require('to-utf8')\n\nvar encoders = {\n hex: to_hex\n , utf8: to_utf\n , base64: to_base64\n}\n\nfunction to(buf, encoding) {\n return encoders[encoding || 'utf8'](buf)\n}\n\nfunction to_hex(buf) {\n var str = ''\n , byt\n\n for(var i = 0, len = buf.length; i < len; ++i) {\n byt = buf[i]\n str += ((byt & 0xF0) >>> 4).toString(16)\n str += (byt & 0x0F).toString(16)\n }\n\n return str\n}\n\nfunction to_utf(buf) {\n return toutf8(buf)\n}\n\nfunction to_base64(buf) {\n return base64.fromByteArray(buf)\n}\n\n","module.exports = to_utf8\n\nvar out = []\n , col = []\n , fcc = String.fromCharCode\n , mask = [0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01]\n , unmask = [\n 0x00\n , 0x01\n , 0x02 | 0x01\n , 0x04 | 0x02 | 0x01\n , 0x08 | 0x04 | 0x02 | 0x01\n , 0x10 | 0x08 | 0x04 | 0x02 | 0x01\n , 0x20 | 0x10 | 0x08 | 0x04 | 0x02 | 0x01\n , 0x40 | 0x20 | 0x10 | 0x08 | 0x04 | 0x02 | 0x01\n ]\n\nfunction to_utf8(bytes, start, end) {\n start = start === undefined ? 0 : start\n end = end === undefined ? bytes.length : end\n\n var idx = 0\n , hi = 0x80\n , collecting = 0\n , pos\n , by\n\n col.length =\n out.length = 0\n\n while(idx < bytes.length) {\n by = bytes[idx]\n if(!collecting && by & hi) {\n pos = find_pad_position(by)\n collecting += pos\n if(pos < 8) {\n col[col.length] = by & unmask[6 - pos]\n }\n } else if(collecting) {\n col[col.length] = by & unmask[6]\n --collecting\n if(!collecting && col.length) {\n out[out.length] = fcc(reduced(col, pos))\n col.length = 0\n }\n } else { \n out[out.length] = fcc(by)\n }\n ++idx\n }\n if(col.length && !collecting) {\n out[out.length] = fcc(reduced(col, pos))\n col.length = 0\n }\n return out.join('')\n}\n\nfunction find_pad_position(byt) {\n for(var i = 0; i < 7; ++i) {\n if(!(byt & mask[i])) {\n break\n }\n }\n return i\n}\n\nfunction reduced(list) {\n var out = 0\n for(var i = 0, len = list.length; i < len; ++i) {\n out |= list[i] << ((len - i - 1) * 6)\n }\n return out\n}\n","\nmodule.exports = function(buffer) {\n return buffer instanceof Uint8Array;\n}\n","module.exports = subarray\n\nfunction subarray(buf, from, to) {\n return buf.subarray(from || 0, to || buf.length)\n}\n","module.exports = join\n\nfunction join(targets, hint) {\n if(!targets.length) {\n return new Uint8Array(0)\n }\n\n var len = hint !== undefined ? hint : get_length(targets)\n , out = new Uint8Array(len)\n , cur = targets[0]\n , curlen = cur.length\n , curidx = 0\n , curoff = 0\n , i = 0\n\n while(i < len) {\n if(curoff === curlen) {\n curoff = 0\n ++curidx\n cur = targets[curidx]\n curlen = cur && cur.length\n continue\n }\n out[i++] = cur[curoff++] \n }\n\n return out\n}\n\nfunction get_length(targets) {\n var size = 0\n for(var i = 0, len = targets.length; i < len; ++i) {\n size += targets[i].byteLength\n }\n return size\n}\n","module.exports = copy\n\nvar slice = [].slice\n\nfunction copy(source, target, target_start, source_start, source_end) {\n target_start = arguments.length < 3 ? 0 : target_start\n source_start = arguments.length < 4 ? 0 : source_start\n source_end = arguments.length < 5 ? source.length : source_end\n\n if(source_end === source_start) {\n return\n }\n\n if(target.length === 0 || source.length === 0) {\n return\n }\n\n if(source_end > source.length) {\n source_end = source.length\n }\n\n if(target.length - target_start < source_end - source_start) {\n source_end = target.length - target_start + source_start\n }\n\n if(source.buffer !== target.buffer) {\n return fast_copy(source, target, target_start, source_start, source_end)\n }\n return slow_copy(source, target, target_start, source_start, source_end)\n}\n\nfunction fast_copy(source, target, target_start, source_start, source_end) {\n var len = (source_end - source_start) + target_start\n\n for(var i = target_start, j = source_start;\n i < len;\n ++i,\n ++j) {\n target[i] = source[j]\n }\n}\n\nfunction slow_copy(from, to, j, i, jend) {\n // the buffers could overlap.\n var iend = jend + i\n , tmp = new Uint8Array(slice.call(from, i, iend))\n , x = 0\n\n for(; i < iend; ++i, ++x) {\n to[j++] = tmp[x]\n }\n}\n","module.exports = function(size) {\n return new Uint8Array(size)\n}\n","module.exports = {\n readUInt8: read_uint8\n , readInt8: read_int8\n , readUInt16LE: read_uint16_le\n , readUInt32LE: read_uint32_le\n , readInt16LE: read_int16_le\n , readInt32LE: read_int32_le\n , readFloatLE: read_float_le\n , readDoubleLE: read_double_le\n , readUInt16BE: read_uint16_be\n , readUInt32BE: read_uint32_be\n , readInt16BE: read_int16_be\n , readInt32BE: read_int32_be\n , readFloatBE: read_float_be\n , readDoubleBE: read_double_be\n}\n\nvar map = require('./mapped.js')\n\nfunction read_uint8(target, at) {\n return target[at]\n}\n\nfunction read_int8(target, at) {\n var v = target[at];\n return v < 0x80 ? v : v - 0x100\n}\n\nfunction read_uint16_le(target, at) {\n var dv = map.get(target);\n return dv.getUint16(at + target.byteOffset, true)\n}\n\nfunction read_uint32_le(target, at) {\n var dv = map.get(target);\n return dv.getUint32(at + target.byteOffset, true)\n}\n\nfunction read_int16_le(target, at) {\n var dv = map.get(target);\n return dv.getInt16(at + target.byteOffset, true)\n}\n\nfunction read_int32_le(target, at) {\n var dv = map.get(target);\n return dv.getInt32(at + target.byteOffset, true)\n}\n\nfunction read_float_le(target, at) {\n var dv = map.get(target);\n return dv.getFloat32(at + target.byteOffset, true)\n}\n\nfunction read_double_le(target, at) {\n var dv = map.get(target);\n return dv.getFloat64(at + target.byteOffset, true)\n}\n\nfunction read_uint16_be(target, at) {\n var dv = map.get(target);\n return dv.getUint16(at + target.byteOffset, false)\n}\n\nfunction read_uint32_be(target, at) {\n var dv = map.get(target);\n return dv.getUint32(at + target.byteOffset, false)\n}\n\nfunction read_int16_be(target, at) {\n var dv = map.get(target);\n return dv.getInt16(at + target.byteOffset, false)\n}\n\nfunction read_int32_be(target, at) {\n var dv = map.get(target);\n return dv.getInt32(at + target.byteOffset, false)\n}\n\nfunction read_float_be(target, at) {\n var dv = map.get(target);\n return dv.getFloat32(at + target.byteOffset, false)\n}\n\nfunction read_double_be(target, at) {\n var dv = map.get(target);\n return dv.getFloat64(at + target.byteOffset, false)\n}\n","module.exports = {\n writeUInt8: write_uint8\n , writeInt8: write_int8\n , writeUInt16LE: write_uint16_le\n , writeUInt32LE: write_uint32_le\n , writeInt16LE: write_int16_le\n , writeInt32LE: write_int32_le\n , writeFloatLE: write_float_le\n , writeDoubleLE: write_double_le\n , writeUInt16BE: write_uint16_be\n , writeUInt32BE: write_uint32_be\n , writeInt16BE: write_int16_be\n , writeInt32BE: write_int32_be\n , writeFloatBE: write_float_be\n , writeDoubleBE: write_double_be\n}\n\nvar map = require('./mapped.js')\n\nfunction write_uint8(target, value, at) {\n return target[at] = value\n}\n\nfunction write_int8(target, value, at) {\n return target[at] = value < 0 ? value + 0x100 : value\n}\n\nfunction write_uint16_le(target, value, at) {\n var dv = map.get(target);\n return dv.setUint16(at + target.byteOffset, value, true)\n}\n\nfunction write_uint32_le(target, value, at) {\n var dv = map.get(target);\n return dv.setUint32(at + target.byteOffset, value, true)\n}\n\nfunction write_int16_le(target, value, at) {\n var dv = map.get(target);\n return dv.setInt16(at + target.byteOffset, value, true)\n}\n\nfunction write_int32_le(target, value, at) {\n var dv = map.get(target);\n return dv.setInt32(at + target.byteOffset, value, true)\n}\n\nfunction write_float_le(target, value, at) {\n var dv = map.get(target);\n return dv.setFloat32(at + target.byteOffset, value, true)\n}\n\nfunction write_double_le(target, value, at) {\n var dv = map.get(target);\n return dv.setFloat64(at + target.byteOffset, value, true)\n}\n\nfunction write_uint16_be(target, value, at) {\n var dv = map.get(target);\n return dv.setUint16(at + target.byteOffset, value, false)\n}\n\nfunction write_uint32_be(target, value, at) {\n var dv = map.get(target);\n return dv.setUint32(at + target.byteOffset, value, false)\n}\n\nfunction write_int16_be(target, value, at) {\n var dv = map.get(target);\n return dv.setInt16(at + target.byteOffset, value, false)\n}\n\nfunction write_int32_be(target, value, at) {\n var dv = map.get(target);\n return dv.setInt32(at + target.byteOffset, value, false)\n}\n\nfunction write_float_be(target, value, at) {\n var dv = map.get(target);\n return dv.setFloat32(at + target.byteOffset, value, false)\n}\n\nfunction write_double_be(target, value, at) {\n var dv = map.get(target);\n return dv.setFloat64(at + target.byteOffset, value, false)\n}\n","module.exports = Decoder\n\nvar MSB = 0x80\n , REST = 0x7F\n\n\nfunction Decoder() {\n this.accum = []\n}\nDecoder.prototype.write = write;\n\nfunction write(byte) {\n var msb = byte & MSB\n , accum = this.accum\n , len\n , out\n\n accum[accum.length] = byte & REST\n if(msb) {\n return\n }\n\n len = accum.length\n out = 0\n\n for(var i = 0; i < len; ++i) {\n out |= accum[i] << (7 * i)\n }\n\n accum.length = 0\n this.ondata(out)\n return\n}","// @ts-check\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitAnnotatedTag } from '../models/GitAnnotatedTag.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { GitTree } from '../models/GitTree.js'\nimport { writeObject as _writeObject } from '../storage/writeObject.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Write a git object directly\n *\n * `format` can have the following values:\n *\n * | param | description |\n * | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | 'deflated' | Treat `object` as the raw deflate-compressed buffer for an object, meaning can be written to `.git/objects/**` as-is. |\n * | 'wrapped' | Treat `object` as the inflated object buffer wrapped in the git object header. This is the raw buffer used when calculating the SHA-1 object id of a git object. |\n * | 'content' | Treat `object` as the object buffer without the git header. |\n * | 'parsed' | Treat `object` as a parsed representation of the object. |\n *\n * If `format` is `'parsed'`, then `object` must match one of the schemas for `CommitDescription`, `TreeDescription`, or `TagDescription` described in...\n * shucks I haven't written that page yet. :( Well, described in the [TypeScript definition](https://github.com/isomorphic-git/isomorphic-git/blob/master/src/index.d.ts) for now.\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {Buffer|string|Object} args.object - The object to write.\n * @param {'blob'|'tree'|'commit'|'tag'} args.type - The kind of object to write.\n * @param {'deflated' | 'wrapped' | 'content' | 'parsed'} [args.format = 'parsed'] - What format the object is in. The possible choices are listed below.\n * @param {string} args.oid - If `format` is `'deflated'` then this param is required. Otherwise it is calculated.\n * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the object at that filepath. To return the root directory of a tree set filepath to `''`\n * @param {string} [args.encoding] - If `type` is `'blob'` then `content` will be converted to a Buffer using `encoding`.\n *\n * @returns {Promise} Resolves successfully with the SHA-1 object id of the newly written object.\n *\n * @example\n * // Manually create an annotated tag.\n * let sha = await git.resolveRef({ dir: '$input((/))', ref: '$input((HEAD))' })\n * console.log('commit', sha)\n *\n * let oid = await git.writeObject({\n * dir: '$input((/))',\n * type: 'tag',\n * object: {\n * object: sha,\n * type: 'commit',\n * tag: '$input((my-tag))',\n * tagger: {\n * name: '$input((your name))',\n * email: '$input((email@example.com))',\n * timestamp: Math.floor(Date.now()/1000),\n * timezoneOffset: new Date().getTimezoneOffset()\n * },\n * message: '$input((Optional message))',\n * signature: ''\n * }\n * })\n *\n * console.log('tag', oid)\n *\n */\nexport async function writeObject ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n type,\n object,\n format = 'parsed',\n oid,\n encoding = undefined\n}) {\n try {\n const fs = new FileSystem(_fs)\n // Convert object to buffer\n if (format === 'parsed') {\n switch (type) {\n case 'commit':\n object = GitCommit.from(object).toObject()\n break\n case 'tree':\n object = GitTree.from(object.entries).toObject()\n break\n case 'blob':\n object = Buffer.from(object, encoding)\n break\n case 'tag':\n object = GitAnnotatedTag.from(object).toObject()\n break\n default:\n throw new GitError(E.ObjectTypeUnknownFail, { type })\n }\n }\n // GitObjectManager does not know how to parse content, so we tweak that parameter before passing it.\n const _format = format === 'parsed' ? 'content' : format\n oid = await _writeObject({\n fs,\n gitdir,\n type,\n object,\n oid,\n format: _format\n })\n return oid\n } catch (err) {\n err.caller = 'git.writeObject'\n throw err\n }\n}\n","'use strict';\n\nconst os = require('os');\nconst path = require('path');\nconst isWin = os.platform() === 'win32';\n\nconst CHARS = { '{': '}', '(': ')', '[': ']'};\nconst STRICT = /\\\\(.)|(^!|\\*|[\\].+)]\\?|\\[[^\\\\\\]]+\\]|\\{[^\\\\}]+\\}|\\(\\?[:!=][^\\\\)]+\\)|\\([^|]+\\|[^\\\\)]+\\)|(\\\\).|([@?!+*]\\(.*\\)))/;\nconst RELAXED = /\\\\(.)|(^!|[*?{}()[\\]]|\\(\\?)/;\n\n/**\n * Detect if a string cointains glob\n * @param {String} str Input string\n * @param {Object} [options] Configuration object\n * @param {Boolean} [options.strict=true] Use relaxed regex if true\n * @returns {Boolean} true if string contains glob\n */\nfunction isglob(str, { strict = true } = {}) {\n if (str === '') return false;\n let match, rgx = strict ? STRICT : RELAXED;\n\n while ((match = rgx.exec(str))) {\n if (match[2]) return true;\n let idx = match.index + match[0].length;\n\n // if an open bracket/brace/paren is escaped,\n // set the index to the next closing character\n let open = match[1];\n let close = open ? CHARS[open] : null;\n if (open && close) {\n let n = str.indexOf(close, idx);\n if (n !== -1) idx = n + 1;\n }\n\n str = str.slice(idx);\n }\n return false;\n}\n\n\n/**\n * Find the static part of a glob-path,\n * split path and return path part\n * @param {String} str Path/glob string\n * @returns {String} static path section of glob\n */\nfunction parent(str, { strict = false } = {}) {\n if (isWin && str.includes('/'))\n str = str.split('\\\\').join('/');\n\n\t// special case for strings ending in enclosure containing path separator\n\tif (/[\\{\\[].*[\\/]*.*[\\}\\]]$/.test(str)) str += '/';\n\n\t// preserves full path in case of trailing path separator\n\tstr += 'a';\n\n\tdo {str = path.dirname(str)}\n\twhile (isglob(str, {strict}) || /(^|[^\\\\])([\\{\\[]|\\([^\\)]+$)/.test(str));\n\n\t// remove escape chars and return result\n\treturn str.replace(/\\\\([\\*\\?\\|\\[\\]\\(\\)\\{\\}])/g, '$1');\n};\n\n\n/**\n * Parse a glob path, and split it by static/glob part\n * @param {String} pattern String path\n * @param {Object} [opts] Options\n * @param {Object} [opts.strict=false] Use strict parsing\n * @returns {Object} object with parsed path\n */\nfunction globalyzer(pattern, opts = {}) {\n let base = parent(pattern, opts);\n let isGlob = isglob(pattern, opts);\n let glob;\n\n if (base != '.') {\n glob = pattern.substr(base.length);\n if (glob.startsWith('/')) glob = glob.substr(1);\n } else {\n glob = pattern;\n }\n\n if (!isGlob) {\n base = path.dirname(pattern);\n glob = base !== '.' ? pattern.substr(base.length) : pattern;\n }\n\n if (glob.startsWith('./')) glob = glob.substr(2);\n if (glob.startsWith('/')) glob = glob.substr(1);\n\n return { base, glob, isGlob };\n}\n\n\nmodule.exports = globalyzer;\n","exports.endianness = function () { return 'LE' };\n\nexports.hostname = function () {\n if (typeof location !== 'undefined') {\n return location.hostname\n }\n else return '';\n};\n\nexports.loadavg = function () { return [] };\n\nexports.uptime = function () { return 0 };\n\nexports.freemem = function () {\n return Number.MAX_VALUE;\n};\n\nexports.totalmem = function () {\n return Number.MAX_VALUE;\n};\n\nexports.cpus = function () { return [] };\n\nexports.type = function () { return 'Browser' };\n\nexports.release = function () {\n if (typeof navigator !== 'undefined') {\n return navigator.appVersion;\n }\n return '';\n};\n\nexports.networkInterfaces\n= exports.getNetworkInterfaces\n= function () { return {} };\n\nexports.arch = function () { return 'javascript' };\n\nexports.platform = function () { return 'browser' };\n\nexports.tmpdir = exports.tmpDir = function () {\n return '/tmp';\n};\n\nexports.EOL = '\\n';\n\nexports.homedir = function () {\n\treturn '/'\n};\n","// @ts-check\nimport { GitIgnoreManager } from '../managers/GitIgnoreManager.js'\nimport { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { writeObject } from '../storage/writeObject.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Add a file to the git index (aka staging area)\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.filepath - The path to the file to add to the index\n *\n * @returns {Promise} Resolves successfully once the git index has been updated\n *\n * @example\n * await new Promise((resolve, reject) => fs.writeFile(\n * '$input((/README.md))',\n * `$textarea((# TEST))`,\n * (err) => err ? reject(err) : resolve()\n * ))\n * await git.add({ dir: '$input((/))', filepath: '$input((README.md))' })\n * console.log('done')\n *\n */\nexport async function add ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n filepath\n}) {\n try {\n const fs = new FileSystem(_fs)\n\n await GitIndexManager.acquire(\n { fs, filepath: `${gitdir}/index` },\n async function (index) {\n await addToIndex({ dir, gitdir, fs, filepath, index })\n }\n )\n // TODO: return all oids for all files added?\n } catch (err) {\n err.caller = 'git.add'\n throw err\n }\n}\n\nasync function addToIndex ({ dir, gitdir, fs, filepath, index }) {\n // TODO: Should ignore UNLESS it's already in the index.\n const ignored = await GitIgnoreManager.isIgnored({\n fs,\n dir,\n gitdir,\n filepath\n })\n if (ignored) return\n let stats = await fs.lstat(join(dir, filepath))\n if (!stats) throw new GitError(E.FileReadError, { filepath })\n if (stats.isDirectory()) {\n const children = await fs.readdir(join(dir, filepath))\n const promises = children.map(child =>\n addToIndex({ dir, gitdir, fs, filepath: join(filepath, child), index })\n )\n await Promise.all(promises)\n } else {\n const object = stats.isSymbolicLink()\n ? await fs.readlink(join(dir, filepath))\n : await fs.read(join(dir, filepath))\n if (object === null) throw new GitError(E.FileReadError, { filepath })\n const oid = await writeObject({ fs, gitdir, type: 'blob', object })\n index.insert({ filepath, stats, oid })\n }\n}\n","// @ts-check\nimport cleanGitRef from 'clean-git-ref'\n\nimport { GitConfigManager } from '../managers/GitConfigManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Add or update a remote\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.remote - The name of the remote\n * @param {string} args.url - The URL of the remote\n * @param {boolean} [args.force = false] - Instead of throwing an error if a remote named `remote` already exists, overwrite the existing remote.\n *\n * @returns {Promise} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.addRemote({ dir: '$input((/))', remote: '$input((upstream))', url: '$input((https://github.com/isomorphic-git/isomorphic-git))' })\n * console.log('done')\n *\n */\nexport async function addRemote ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n remote,\n url,\n force = false\n}) {\n try {\n const fs = new FileSystem(_fs)\n if (remote === undefined) {\n throw new GitError(E.MissingRequiredParameterError, {\n function: 'addRemote',\n parameter: 'remote'\n })\n }\n if (url === undefined) {\n throw new GitError(E.MissingRequiredParameterError, {\n function: 'addRemote',\n parameter: 'url'\n })\n }\n if (remote !== cleanGitRef.clean(remote)) {\n throw new GitError(E.InvalidRefNameError, {\n verb: 'add',\n noun: 'remote',\n ref: remote,\n suggestion: cleanGitRef.clean(remote)\n })\n }\n const config = await GitConfigManager.get({ fs, gitdir })\n if (!force) {\n // Check that setting it wouldn't overwrite.\n const remoteNames = await config.getSubsections('remote')\n if (remoteNames.includes(remote)) {\n // Throw an error if it would overwrite an existing remote,\n // but not if it's simply setting the same value again.\n if (url !== (await config.get(`remote.${remote}.url`))) {\n throw new GitError(E.AddingRemoteWouldOverwrite, { remote })\n }\n }\n }\n await config.set(`remote.${remote}.url`, url)\n await config.set(\n `remote.${remote}.fetch`,\n `+refs/heads/*:refs/remotes/${remote}/*`\n )\n await GitConfigManager.save({ fs, gitdir, config })\n } catch (err) {\n err.caller = 'git.addRemote'\n throw err\n }\n}\n","// @ts-check\nimport { GitConfigManager } from '../managers/GitConfigManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Read and/or write to the git config files.\n *\n * *Caveats:*\n * - Currently only the local `$GIT_DIR/config` file can be read or written. However support for the global `~/.gitconfig` and system `$(prefix)/etc/gitconfig` will be added in the future.\n * - The current parser does not support the more exotic features of the git-config file format such as `[include]` and `[includeIf]`.\n *\n * @param {Object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.path - The key of the git config entry\n * @param {string} [args.value] - (Optional) A value to store at that path\n * @param {boolean} [args.all = false] - If the config file contains multiple values, return them all as an array.\n * @param {boolean} [args.append = false] - If true, will append rather than replace when setting (use with multi-valued config options).\n *\n * @returns {Promise} Resolves with the config value\n *\n * @example\n * // Write config value\n * await git.config({\n * dir: '$input((/))',\n * path: '$input((user.name))',\n * value: '$input((Mr. Test))'\n * })\n *\n * // Read config value\n * let value = await git.config({\n * dir: '$input((/))',\n * path: '$input((user.name))'\n * })\n * console.log(value)\n *\n */\nexport async function config (args) {\n // These arguments are not in the function signature but destructured separately\n // as a result of a bit of a design flaw that requires the un-destructured argument object\n // in order to call args.hasOwnProperty('value') later on.\n let {\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n all = false,\n append = false,\n path,\n value\n } = args\n try {\n const fs = new FileSystem(_fs)\n const config = await GitConfigManager.get({ fs, gitdir })\n // This carefully distinguishes between\n // 1) there is no 'value' argument (do a \"get\")\n // 2) there is a 'value' argument with a value of undefined (do a \"set\")\n // Because setting a key to undefined is how we delete entries from the ini.\n if (value === undefined && !args.hasOwnProperty('value')) {\n if (all) {\n return config.getall(path)\n } else {\n return config.get(path)\n }\n } else {\n if (append) {\n await config.append(path, value)\n } else {\n await config.set(path, value)\n }\n await GitConfigManager.save({ fs, gitdir, config })\n }\n } catch (err) {\n err.caller = 'git.config'\n throw err\n }\n}\n","import { config } from '../commands/config'\n\nexport async function normalizeAuthorObject ({ fs, gitdir, author = {} }) {\n let { name, email, date, timestamp, timezoneOffset } = author\n name = name || (await config({ fs, gitdir, path: 'user.name' }))\n email = email || (await config({ fs, gitdir, path: 'user.email' }))\n\n if (name === undefined || email === undefined) {\n return undefined\n }\n\n date = date || new Date()\n timestamp = timestamp != null ? timestamp : Math.floor(date.valueOf() / 1000)\n timezoneOffset =\n timezoneOffset != null ? timezoneOffset : date.getTimezoneOffset()\n\n return { name, email, date, timestamp, timezoneOffset }\n}\n","// @ts-check\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitAnnotatedTag } from '../models/GitAnnotatedTag'\nimport { E, GitError } from '../models/GitError.js'\nimport { readObject } from '../storage/readObject.js'\nimport { writeObject } from '../storage/writeObject.js'\nimport { join } from '../utils/join.js'\nimport { normalizeAuthorObject } from '../utils/normalizeAuthorObject.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Create an annotated tag.\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - What to name the tag\n * @param {string} [args.message = ''] - The tag message to use.\n * @param {string} [args.object = 'HEAD'] - The SHA-1 object id the tag points to. (Will resolve to a SHA-1 object id if value is a ref.) By default, the commit object which is referred by the current `HEAD` is used.\n * @param {object} [args.tagger] - The details about the tagger.\n * @param {string} [args.tagger.name] - Default is `user.name` config.\n * @param {string} [args.tagger.email] - Default is `user.email` config.\n * @param {string} [args.tagger.date] - Set the tagger timestamp field. Default is the current date.\n * @param {string} [args.tagger.timestamp] - Set the tagger timestamp field. This is an alternative to using `date` using an integer number of seconds since the Unix epoch instead of a JavaScript date object.\n * @param {string} [args.tagger.timezoneOffset] - Set the tagger timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`.\n * @param {string} [args.signature] - The signature attatched to the tag object. (Mutually exclusive with the `signingKey` option.)\n * @param {string} [args.signingKey] - Sign the tag object using this private PGP key. (Mutually exclusive with the `signature` option.)\n * @param {boolean} [args.force = false] - Instead of throwing an error if a tag named `ref` already exists, overwrite the existing tag. Note that this option does not modify the original tag object itself.\n *\n * @returns {Promise} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.annotatedTag({\n * dir: '$input((/))',\n * ref: '$input((test-tag))',\n * message: '$input((This commit is awesome))',\n * tagger: {\n * name: '$input((Mr. Test))',\n * email: '$input((mrtest@example.com))'\n * }\n * })\n * console.log('done')\n *\n */\nexport async function annotatedTag ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n ref,\n tagger,\n message = ref,\n signature,\n object,\n signingKey,\n force = false\n}) {\n try {\n const fs = new FileSystem(_fs)\n\n if (ref === undefined) {\n throw new GitError(E.MissingRequiredParameterError, {\n function: 'annotatedTag',\n parameter: 'ref'\n })\n }\n\n ref = ref.startsWith('refs/tags/') ? ref : `refs/tags/${ref}`\n\n if (!force && (await GitRefManager.exists({ fs, gitdir, ref }))) {\n throw new GitError(E.RefExistsError, { noun: 'tag', ref })\n }\n\n // Resolve passed value\n let oid = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: object || 'HEAD'\n })\n\n if (signature && signingKey) {\n throw new GitError(E.InvalidParameterCombinationError, {\n function: 'annotatedTag',\n parameters: ['signature', 'signingKey']\n })\n }\n\n // Fill in missing arguments with default values\n tagger = await normalizeAuthorObject({ fs, gitdir, author: tagger })\n if (tagger === undefined) {\n throw new GitError(E.MissingTaggerError)\n }\n\n const { type } = await readObject({ fs, gitdir, oid })\n let tagObject = GitAnnotatedTag.from({\n object: oid,\n type,\n tag: ref.replace('refs/tags/', ''),\n tagger,\n message,\n signature\n })\n if (signingKey) {\n let pgp = cores.get(core).get('pgp')\n tagObject = await GitAnnotatedTag.sign(tagObject, pgp, signingKey)\n }\n let value = await writeObject({\n fs,\n gitdir,\n type: 'tag',\n object: tagObject.toObject()\n })\n\n await GitRefManager.writeRef({ fs, gitdir, ref, value })\n } catch (err) {\n err.caller = 'git.annotatedTag'\n throw err\n }\n}\n","// @ts-check\nimport cleanGitRef from 'clean-git-ref'\n\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Create a branch\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - What to name the branch\n * @param {boolean} [args.checkout = false] - Update `HEAD` to point at the newly created branch\n *\n * @returns {Promise} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.branch({ dir: '$input((/))', ref: '$input((develop))' })\n * console.log('done')\n *\n */\nexport async function branch ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n ref,\n checkout = false\n}) {\n try {\n const fs = new FileSystem(_fs)\n if (ref === undefined) {\n throw new GitError(E.MissingRequiredParameterError, {\n function: 'branch',\n parameter: 'ref'\n })\n }\n\n if (ref !== cleanGitRef.clean(ref)) {\n throw new GitError(E.InvalidRefNameError, {\n verb: 'create',\n noun: 'branch',\n ref,\n suggestion: cleanGitRef.clean(ref)\n })\n }\n\n const exist = await fs.exists(`${gitdir}/refs/heads/${ref}`)\n if (exist) {\n throw new GitError(E.RefExistsError, { noun: 'branch', ref })\n }\n // Get tree oid\n let oid\n try {\n oid = await GitRefManager.resolve({ fs, gitdir, ref: 'HEAD' })\n } catch (e) {\n throw new GitError(E.NoHeadCommitError, { noun: 'branch', ref })\n }\n // Create a new branch that points at that same commit\n await fs.write(`${gitdir}/refs/heads/${ref}`, oid + '\\n')\n if (checkout) {\n // Update HEAD\n await fs.write(`${gitdir}/HEAD`, `ref: refs/heads/${ref}`)\n }\n } catch (err) {\n err.caller = 'git.branch'\n throw err\n }\n}\n","import globalyzer from 'globalyzer'\n\nexport const patternRoot = pattern => {\n // return pattern.split('*', 1)[0]\n const base = globalyzer(pattern).base\n return base === '.' ? '' : base\n}\n","export const worthWalking = (filepath, root) => {\n if (root.length === 0) return true\n if (root.length >= filepath.length) {\n return root.startsWith(filepath)\n } else {\n return filepath.startsWith(root)\n }\n}\n","import { GitRefManager } from '../managers/GitRefManager.js'\nimport { readObject } from '../storage/readObject.js'\nimport { join } from '../utils/join'\nimport { resolveTree } from '../utils/resolveTree.js'\n\nimport { FileSystem } from './FileSystem.js'\nimport { GitTree } from './GitTree.js'\n\nexport class GitWalkerRepo {\n constructor ({ fs: _fs, gitdir, ref }) {\n const fs = new FileSystem(_fs)\n this.fs = fs\n this.gitdir = gitdir\n this.mapPromise = (async () => {\n let map = new Map()\n let oid = await GitRefManager.resolve({ fs, gitdir, ref })\n let tree = await resolveTree({ fs, gitdir, oid })\n map.set('.', tree)\n return map\n })()\n let walker = this\n this.ConstructEntry = class RepoEntry {\n constructor (entry) {\n Object.assign(this, entry)\n }\n async populateStat () {\n if (!this.exists) return\n await walker.populateStat(this)\n }\n async populateContent () {\n if (!this.exists) return\n await walker.populateContent(this)\n }\n async populateHash () {\n if (!this.exists) return\n await walker.populateHash(this)\n }\n }\n }\n async readdir (entry) {\n if (!entry.exists) return []\n let filepath = entry.fullpath\n let { fs, gitdir } = this\n let map = await this.mapPromise\n let obj = map.get(filepath)\n if (!obj) throw new Error(`No obj for ${filepath}`)\n let oid = obj.oid\n if (!oid) throw new Error(`No oid for obj ${JSON.stringify(obj)}`)\n if (obj.type === 'commit') {\n // TODO: support submodules\n return null\n }\n let { type, object } = await readObject({ fs, gitdir, oid })\n if (type === 'blob') return null\n if (type !== 'tree') {\n throw new Error(`ENOTDIR: not a directory, scandir '${filepath}'`)\n }\n let tree = GitTree.from(object)\n // cache all entries\n for (const entry of tree) {\n map.set(join(filepath, entry.path), entry)\n }\n return tree.entries().map(entry => ({\n fullpath: join(filepath, entry.path),\n basename: entry.path,\n exists: true\n }))\n }\n async populateStat (entry) {\n // All we can add here is mode and type.\n let map = await this.mapPromise\n let stats = map.get(entry.fullpath)\n if (!stats) {\n throw new Error(\n `ENOENT: no such file or directory, lstat '${entry.fullpath}'`\n )\n }\n let { mode, type } = stats\n Object.assign(entry, { mode, type })\n }\n async populateContent (entry) {\n let map = await this.mapPromise\n let { fs, gitdir } = this\n let obj = map.get(entry.fullpath)\n if (!obj) throw new Error(`No obj for ${entry.fullpath}`)\n let oid = obj.oid\n if (!oid) throw new Error(`No oid for entry ${JSON.stringify(obj)}`)\n let { type, object } = await readObject({ fs, gitdir, oid })\n if (type === 'tree') {\n throw new Error(`EISDIR: illegal operation on a directory, read`)\n }\n Object.assign(entry, { content: object })\n }\n async populateHash (entry) {\n let map = await this.mapPromise\n let obj = map.get(entry.fullpath)\n if (!obj) {\n throw new Error(\n `ENOENT: no such file or directory, open '${entry.fullpath}'`\n )\n }\n let oid = obj.oid\n Object.assign(entry, { oid })\n }\n}\n","// @ts-check\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitWalkerRepo } from '../models/GitWalkerRepo.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\nimport { GitWalkerSymbol } from '../utils/symbols.js'\n\n/**\n *\n * @typedef Walker\n * @property {Symbol} Symbol('GitWalkerSymbol')\n */\n\n/**\n * Get a git commit Walker\n *\n * See [walkBeta1](./walkBeta1.md)\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ref='HEAD'] - [required] The commit to walk\n *\n * @returns {Walker} Returns a git commit Walker\n *\n */\nexport function TREE ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n ref = 'HEAD'\n}) {\n const fs = new FileSystem(_fs)\n let o = Object.create(null)\n Object.defineProperty(o, GitWalkerSymbol, {\n value: function () {\n return new GitWalkerRepo({ fs, gitdir, ref })\n }\n })\n Object.freeze(o)\n return o\n}\n","import { log } from './log.js'\nimport { normalizeStats } from './normalizeStats.js'\n\nexport function compareStats (entry, stats) {\n // Comparison based on the description in Paragraph 4 of\n // https://www.kernel.org/pub/software/scm/git/docs/technical/racy-git.txt\n const e = normalizeStats(entry)\n const s = normalizeStats(stats)\n const staleness =\n e.mode !== s.mode ||\n e.mtimeSeconds !== s.mtimeSeconds ||\n e.ctimeSeconds !== s.ctimeSeconds ||\n e.uid !== s.uid ||\n e.gid !== s.gid ||\n e.ino !== s.ino ||\n e.size !== s.size\n // console.log(staleness ? 'stale:' : 'fresh:')\n if (staleness && log.enabled) {\n console.table([justWhatMatters(e), justWhatMatters(s)])\n }\n return staleness\n}\n\nfunction justWhatMatters (e) {\n return {\n mode: e.mode,\n mtimeSeconds: e.mtimeSeconds,\n ctimeSeconds: e.ctimeSeconds,\n uid: e.uid,\n gid: e.gid,\n ino: e.ino,\n size: e.size\n }\n}\n","import { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { compareStats } from '../utils/compareStats.js'\nimport { join } from '../utils/join'\nimport { log } from '../utils/log.js'\nimport { normalizeStats } from '../utils/normalizeStats.js'\nimport { shasum } from '../utils/shasum.js'\n\nimport { FileSystem } from './FileSystem.js'\nimport { GitObject } from './GitObject.js'\n\nexport class GitWalkerFs {\n constructor ({ fs: _fs, dir, gitdir }) {\n const fs = new FileSystem(_fs)\n this.fs = fs\n this.dir = dir\n this.gitdir = gitdir\n let walker = this\n this.ConstructEntry = class FSEntry {\n constructor (entry) {\n Object.assign(this, entry)\n }\n async populateStat () {\n if (!this.exists) return\n await walker.populateStat(this)\n }\n async populateContent () {\n if (!this.exists) return\n await walker.populateContent(this)\n }\n async populateHash () {\n if (!this.exists) return\n await walker.populateHash(this)\n }\n }\n }\n async readdir (entry) {\n if (!entry.exists) return []\n let filepath = entry.fullpath\n let { fs, dir } = this\n let names = await fs.readdir(join(dir, filepath))\n if (names === null) return null\n return names.map(name => ({\n fullpath: join(filepath, name),\n basename: name,\n exists: true\n }))\n }\n async populateStat (entry) {\n if (!entry.exists) return\n let { fs, dir } = this\n let stats = await fs.lstat(`${dir}/${entry.fullpath}`)\n let type = stats.isDirectory() ? 'tree' : 'blob'\n if (type === 'blob' && !stats.isFile() && !stats.isSymbolicLink()) {\n type = 'special'\n }\n if (!stats) {\n throw new Error(\n `ENOENT: no such file or directory, lstat '${entry.fullpath}'`\n )\n }\n stats = normalizeStats(stats)\n Object.assign(entry, { type }, stats)\n }\n async populateContent (entry) {\n if (!entry.exists) return\n let { fs, dir } = this\n let content = await fs.read(`${dir}/${entry.fullpath}`)\n // workaround for a BrowserFS edge case\n if (entry.size === -1) entry.size = content.length\n Object.assign(entry, { content })\n }\n async populateHash (entry) {\n if (!entry.exists) return\n let { fs, gitdir } = this\n let oid\n // See if we can use the SHA1 hash in the index.\n await GitIndexManager.acquire(\n { fs, filepath: `${gitdir}/index` },\n async function (index) {\n let stage = index.entriesMap.get(entry.fullpath)\n if (!stage || compareStats(entry, stage)) {\n log(`INDEX CACHE MISS: calculating SHA for ${entry.fullpath}`)\n if (!entry.content) await entry.populateContent()\n oid = shasum(GitObject.wrap({ type: 'blob', object: entry.content }))\n if (stage && oid === stage.oid) {\n index.insert({\n filepath: entry.fullpath,\n stats: entry,\n oid: oid\n })\n }\n } else {\n // Use the index SHA1 rather than compute it\n oid = stage.oid\n }\n }\n )\n Object.assign(entry, { oid })\n }\n}\n","// @ts-check\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitWalkerFs } from '../models/GitWalkerFs.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\nimport { GitWalkerSymbol } from '../utils/symbols.js'\n\n/**\n *\n * @typedef Walker\n * @property {Symbol} Symbol('GitWalkerSymbol')\n */\n\n/**\n * Get a working directory Walker\n *\n * See [walkBeta1](./walkBeta1.md)\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - The [git directory](dir-vs-gitdir.md) path\n *\n * @returns {Walker} Returns a working directory Walker\n *\n */\nexport function WORKDIR ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs')\n}) {\n const fs = new FileSystem(_fs)\n let o = Object.create(null)\n Object.defineProperty(o, GitWalkerSymbol, {\n value: function () {\n return new GitWalkerFs({ fs, dir, gitdir })\n }\n })\n Object.freeze(o)\n return o\n}\n","// This is convenient for computing unions/joins of sorted lists.\nexport class RunningMinimum {\n constructor () {\n // Using a getter for 'value' would just bloat the code.\n // You know better than to set it directly right?\n this.value = null\n }\n consider (value) {\n if (value === null || value === undefined) return\n if (this.value === null) {\n this.value = value\n } else if (value < this.value) {\n this.value = value\n }\n }\n reset () {\n this.value = null\n }\n}\n","import { RunningMinimum } from '../models/RunningMinimum'\nimport { basename } from '../utils/basename.js'\n\n// Take an array of length N of\n// iterators of length Q_n\n// of objects with a property 'fullname'\n// and return an iterator of length max(Q_n) for all n\n// of arrays of length N\n// of objects who all have the same value for 'fullname'\nexport function * unionOfIterators (sets) {\n /* NOTE: We can assume all arrays are sorted.\n * Indexes are sorted because they are defined that way:\n *\n * > Index entries are sorted in ascending order on the name field,\n * > interpreted as a string of unsigned bytes (i.e. memcmp() order, no\n * > localization, no special casing of directory separator '/'). Entries\n * > with the same name are sorted by their stage field.\n *\n * Trees should be sorted because they are created directly from indexes.\n * They definitely should be sorted, or else they wouldn't have a unique SHA1.\n * So that would be very naughty on the part of the tree-creator.\n *\n * Lastly, the working dir entries are sorted because I choose to sort them\n * in my FileSystem.readdir() implementation.\n */\n\n // Init\n let min = new RunningMinimum()\n let minimum\n let heads = []\n const numsets = sets.length\n for (let i = 0; i < numsets; i++) {\n // Abuse the fact that iterators continue to return 'undefined' for value\n // once they are done\n heads[i] = sets[i].next().value\n if (heads[i] !== undefined) {\n min.consider(heads[i].fullpath)\n }\n }\n if (min.value === null) return\n // Iterate\n while (true) {\n let result = []\n minimum = min.value\n min.reset()\n for (let i = 0; i < numsets; i++) {\n if (heads[i] !== undefined && heads[i].fullpath === minimum) {\n result[i] = heads[i]\n heads[i] = sets[i].next().value\n } else {\n // A little hacky, but eh\n result[i] = {\n fullpath: minimum,\n basename: basename(minimum),\n exists: false\n }\n }\n if (heads[i] !== undefined) {\n min.consider(heads[i].fullpath)\n }\n }\n // if (result.reduce((y, a) => y && (a === null), true)) {\n // return\n // }\n yield result\n if (min.value === null) return\n }\n}\n","// @ts-check\nimport { arrayRange } from '../utils/arrayRange.js'\nimport { GitWalkerSymbol } from '../utils/symbols.js'\nimport { unionOfIterators } from '../utils/unionOfIterators.js'\n\n/**\n *\n * @typedef {Object} Walker\n * @property {Symbol} Symbol('GitWalkerSymbol')\n */\n\n/**\n *\n * @typedef {Object} WalkerEntry The `WalkerEntry` is an interface that abstracts computing many common tree / blob stats.\n * @property {string} fullpath\n * @property {string} basename\n * @property {boolean} exists\n * @property {Function} populateStat\n * @property {'tree'|'blob'|'special'|'commit'} [type]\n * @property {number} [ctimeSeconds]\n * @property {number} [ctimeNanoseconds]\n * @property {number} [mtimeSeconds]\n * @property {number} [mtimeNanoseconds]\n * @property {number} [dev]\n * @property {number} [ino]\n * @property {number|string} [mode] WORKDIR and STAGE return numbers, TREE returns a string... I'll fix this in walkBeta2\n * @property {number} [uid]\n * @property {number} [gid]\n * @property {number} [size]\n * @property {Function} populateContent\n * @property {Buffer} [content]\n * @property {Function} populateHash\n * @property {string} [oid]\n */\n\n/**\n * A powerful recursive tree-walking utility.\n *\n * The `walk` API (tentatively named `walkBeta1`) simplifies gathering detailed information about a tree or comparing all the filepaths in two or more trees.\n * Trees can be file directories, git commits, or git indexes (aka staging areas).\n * So you can compare two file directories, or 10 commits, or the stage of one repo with the working directory of another repo... etc.\n * As long as a file or directory is present in at least one of the trees, it will be traversed.\n * Entries are traversed in alphabetical order.\n *\n * The arguments to `walk` are the `trees` you want to traverse, and 4 optional transform functions:\n * `filter`, `map`, `reduce`, and `iterate`.\n *\n * The trees are represented by three magic functions that can be imported:\n * ```js\n * import { TREE, WORKDIR, STAGE } from 'isomorphic-git'\n * ```\n *\n * These functions return objects that implement the `Walker` interface.\n * The only thing they are good for is passing into `walkBeta1`'s `trees` argument.\n * Here are the three `Walker`s passed into `walkBeta1` by the `statusMatrix` command for example:\n *\n * ```js\n * let gitdir = '.git'\n * let dir = '.'\n * let ref = 'HEAD'\n *\n * let trees = [\n * TREE({fs, gitdir, ref}),\n * WORKDIR({fs, dir, gitdir}),\n * STAGE({fs, gitdir})\n * ]\n * ```\n *\n * See the doc pages for [TREE](./TREE.md), [WORKDIR](./WORKDIR.md), and [STAGE](./STAGE.md).\n *\n * `filter`, `map`, `reduce`, and `iterate` allow you control the recursive walk by pruning and transforming `WalkerTree`s into the desired result.\n *\n * ## WalkerEntry\n * The `WalkerEntry` is an interface that abstracts computing many common tree / blob stats.\n * `filter` and `map` each receive an array of `WalkerEntry[]` as their main argument, one `WalkerEntry` for each `Walker` in the `trees` argument.\n *\n * By default, `WalkerEntry`s only have three properties:\n * ```js\n * {\n * fullpath: string;\n * basename: string;\n * exists: boolean;\n * }\n * ```\n *\n * Additional properties can be computed only when needed. This lets you build lean, mean, efficient walking machines.\n * ```js\n * await entry.populateStat()\n * // populates\n * entry.type // 'tree', 'blob'\n * // and where applicable, these properties:\n * entry.ctimeSeconds // number;\n * entry.ctimeNanoseconds // number;\n * entry.mtimeSeconds // number;\n * entry.mtimeNanoseconds // number;\n * entry.dev // number;\n * entry.ino // number;\n * entry.mode // number;\n * entry.uid // number;\n * entry.gid // number;\n * entry.size // number;\n * ```\n *\n * ```js\n * await entry.populateContent()\n * // populates\n * entry.content // Buffer\n * // except for STAGE which does not currently provide content\n * ```\n *\n * ```js\n * await entry.populateHash()\n * // populates\n * entry.oid // SHA1 string\n * ```\n *\n * ## filter(WalkerEntry[]) => boolean\n *\n * Default: `async () => true`.\n *\n * This is a good place to put limiting logic such as skipping entries with certain filenames.\n * If you return false for directories, then none of the children of that directory will be walked.\n *\n * Example:\n * ```js\n * let path = require('path')\n * let cwd = 'src/app'\n * // Only examine files in the directory `cwd`\n * async function filter ([head, workdir, stage]) {\n * // It doesn't matter which tree (head, workdir, or stage) you use here.\n * return (\n * // return true for the root directory\n * head.fullpath === '.' ||\n * // return true for 'src' and 'src/app'\n * cwd.startsWith(head.fullpath) ||\n * // return true for 'src/app/*'\n * path.dirname(head.fullpath) === cwd\n * )\n * }\n * ```\n *\n * ## map(WalkerEntry[]) => any\n *\n * Default: `async entry => entry`\n *\n * This is a good place for query logic, such as examining the contents of a file.\n * Ultimately, compare all the entries and return any values you are interested in.\n * If you do not return a value (or return undefined) that entry will be filtered from the results.\n *\n * Example 1: Find all the files containing the word 'foo'.\n * ```js\n * async function map([head, workdir]) {\n * await workdir.populateContent()\n * let content = workdir.content.toString('utf8')\n * if (content.contains('foo')) {\n * return {\n * fullpath: workdir.fullpath,\n * content\n * }\n * }\n * }\n *\n * ```\n *\n * Example 2: Return the difference between the working directory and the HEAD commit\n * ```js\n * const diff = require('diff-lines')\n * async function map([head, workdir]) {\n * await head.populateContent()\n * await head.populateHash()\n * await workdir.populateContent()\n * return {\n * filename: head.fullpath,\n * oid: head.oid,\n * diff: diff(head.content.toString('utf8'), workdir.content.toString('utf8'))\n * }\n * }\n * ```\n *\n * ## reduce(parent, children)\n *\n * Default: `async (parent, children) => parent === undefined ? children.flat() : [parent, children].flat()`\n *\n * The default implementation of this function returns all directories and children in a giant flat array.\n * You can define a different accumulation method though.\n *\n * Example: Return a hierarchical structure\n * ```js\n * async function reduce (parent, children) {\n * return Object.assign(parent, { children })\n * }\n * ```\n *\n * ## iterate(walk, children)\n *\n * Default: `(walk, children) => Promise.all([...children].map(walk))`\n *\n * The default implementation recurses all children concurrently using Promise.all.\n * However you could use a custom function to traverse children serially or use a global queue to throttle recursion.\n *\n * > Note: For a complete example, look at the implementation of `statusMatrix`.\n *\n * @param {object} args\n * @param {Walker[]} args.trees - The trees you want to traverse\n * @param {function(WalkerEntry[]): Promise} [args.filter] - Filter which `WalkerEntry`s to process\n * @param {function(WalkerEntry[]): Promise} [args.map] - Transform `WalkerEntry`s into a result form\n * @param {function(any, any[]): Promise} [args.reduce] - Control how mapped entries are combined with their parent result\n * @param {function(function(WalkerEntry[]): Promise, IterableIterator): Promise} [args.iterate] - Fine-tune how entries within a tree are iterated over\n *\n * @returns {Promise} The finished tree-walking result\n *\n * @see WalkerEntry\n *\n */\nexport async function walkBeta1 ({\n trees,\n filter = async () => true,\n // @ts-ignore\n map = async entry => entry,\n // The default reducer is a flatmap that filters out undefineds.\n reduce = async (parent, children) => {\n // TODO: can we just do [parent, ...children]?\n // TODO: replace with `[parent, children].flat()` once that gets standardized\n let flatten = children.reduce((acc, x) => acc.concat(x), [])\n if (parent !== undefined) flatten.unshift(parent)\n return flatten\n },\n // The default iterate function walks all children concurrently\n iterate = (walk, children) => Promise.all([...children].map(walk))\n}) {\n try {\n let walkers = trees.map(proxy => proxy[GitWalkerSymbol]())\n\n let root = new Array(walkers.length).fill({\n fullpath: '.',\n basename: '.',\n exists: true\n })\n const range = arrayRange(0, walkers.length)\n const unionWalkerFromReaddir = async entry => {\n const subdirs = await Promise.all(\n range.map(i => walkers[i].readdir(entry[i]))\n )\n range.map(i => {\n entry[i] = new walkers[i].ConstructEntry(entry[i])\n })\n // Now process child directories\n let iterators = subdirs\n .map(array => (array === null ? [] : array))\n .map(array => array[Symbol.iterator]())\n return {\n entry,\n children: unionOfIterators(iterators)\n }\n }\n\n const walk = async root => {\n let { children, entry } = await unionWalkerFromReaddir(root)\n if (await filter(entry)) {\n let parent = await map(entry)\n let walkedChildren = await iterate(walk, children)\n walkedChildren = walkedChildren.filter(x => x !== undefined)\n return reduce(parent, walkedChildren)\n }\n }\n return walk(root)\n } catch (err) {\n err.caller = 'git.walk'\n throw err\n }\n}\n","// https://dev.to/namirsab/comment/2050\nexport function arrayRange (start, end) {\n const length = end - start\n return Array.from({ length }, (_, i) => start + i)\n}\n","// @ts-check\nimport globrex from 'globrex'\n\nimport { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { join } from '../utils/join.js'\nimport { patternRoot } from '../utils/patternRoot.js'\nimport { cores } from '../utils/plugins.js'\nimport { worthWalking } from '../utils/worthWalking.js'\n\nimport { TREE } from './TREE.js'\nimport { WORKDIR } from './WORKDIR'\nimport { config } from './config'\nimport { walkBeta1 } from './walkBeta1.js'\n\n/**\n * Checkout a branch\n *\n * If the branch already exists it will check out that branch. Otherwise, it will create a new remote tracking branch set to track the remote branch of that name.\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {import('events').EventEmitter} [args.emitter] - [deprecated] Overrides the emitter set via the ['emitter' plugin](./plugin_emitter.md)\n * @param {string} [args.emitterPrefix = ''] - Scope emitted events by prepending `emitterPrefix` to the event name\n * @param {string} args.ref - Which branch to checkout\n * @param {string} [args.pattern = null] - Filter the results to only those filepath matches a glob pattern\n * @param {string} [args.remote = 'origin'] - Which remote repository to use\n * @param {boolean} [args.noCheckout = false] - If true, will update HEAD but won't update the working directory\n *\n * @returns {Promise} Resolves successfully when filesystem operations are complete\n *\n * @example\n * // checkout the master branch\n * await git.checkout({ dir: '$input((/))', ref: '$input((master))' })\n * console.log('done')\n *\n * @example\n * // checkout only JSON and Markdown files from master branch\n * await git.checkout({ dir: '$input((/))', ref: '$input((master))', pattern: '$input((**\\/*.{json,md}))' })\n * console.log('done')\n *\n */\nexport async function checkout ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n emitter = cores.get(core).get('emitter'),\n emitterPrefix = '',\n remote = 'origin',\n ref,\n pattern = null,\n noCheckout = false\n}) {\n try {\n const fs = new FileSystem(_fs)\n if (ref === undefined) {\n throw new GitError(E.MissingRequiredParameterError, {\n function: 'checkout',\n parameter: 'ref'\n })\n }\n let patternGlobrex =\n pattern && globrex(pattern, { globstar: true, extended: true })\n let patternBase = pattern && patternRoot(pattern)\n // Get tree oid\n let oid\n try {\n oid = await GitRefManager.resolve({ fs, gitdir, ref })\n // TODO: Figure out what to do if both 'ref' and 'remote' are specified, ref already exists,\n // and is configured to track a different remote.\n } catch (err) {\n // If `ref` doesn't exist, create a new remote tracking branch\n // Figure out the commit to checkout\n let remoteRef = `${remote}/${ref}`\n oid = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: remoteRef\n })\n // Set up remote tracking branch\n await config({\n gitdir,\n fs,\n path: `branch.${ref}.remote`,\n value: `${remote}`\n })\n await config({\n gitdir,\n fs,\n path: `branch.${ref}.merge`,\n value: `refs/heads/${ref}`\n })\n // Create a new branch that points at that same commit\n await fs.write(`${gitdir}/refs/heads/${ref}`, oid + '\\n')\n }\n let fullRef = await GitRefManager.expand({ fs, gitdir, ref })\n\n if (!noCheckout) {\n let count = 0\n // Acquire a lock on the index\n await GitIndexManager.acquire(\n { fs, filepath: `${gitdir}/index` },\n async function (index) {\n // TODO: Big optimization possible here.\n // Instead of deleting and rewriting everything, only delete files\n // that are not present in the new branch, and only write files that\n // are not in the index or are in the index but have the wrong SHA.\n for (let entry of index) {\n try {\n await fs.rm(join(dir, entry.path))\n if (emitter) {\n emitter.emit(`${emitterPrefix}progress`, {\n phase: 'Updating workdir',\n loaded: ++count,\n lengthComputable: false\n })\n }\n } catch (err) {}\n }\n index.clear()\n try {\n await walkBeta1({\n trees: [TREE({ fs, gitdir, ref }), WORKDIR({ fs, dir, gitdir })],\n filter: async function ([head, workdir]) {\n // match against 'pattern' parameter\n if (pattern == null) return true\n return worthWalking(head.fullpath, patternBase)\n },\n map: async function ([head, workdir]) {\n if (head.fullpath === '.') return\n if (!head.exists) return\n // Late filter against file names\n if (\n patternGlobrex &&\n !patternGlobrex.regex.test(head.fullpath)\n ) {\n return\n }\n await head.populateStat()\n const filepath = `${dir}/${head.fullpath}`\n switch (head.type) {\n case 'tree': {\n // ignore directories for now\n if (!workdir.exists) await fs.mkdir(filepath)\n break\n }\n case 'commit': {\n // gitlinks\n console.log(\n new GitError(E.NotImplementedFail, {\n thing: 'submodule support'\n })\n )\n break\n }\n case 'blob': {\n await head.populateContent()\n await head.populateHash()\n if (head.mode === '100644') {\n // regular file\n await fs.write(filepath, head.content)\n } else if (head.mode === '100755') {\n // executable file\n await fs.write(filepath, head.content, { mode: 0o777 })\n } else if (head.mode === '120000') {\n // symlink\n await fs.writelink(filepath, head.content)\n } else {\n throw new GitError(E.InternalFail, {\n message: `Invalid mode \"${\n head.mode\n }\" detected in blob ${head.oid}`\n })\n }\n let stats = await fs.lstat(filepath)\n // We can't trust the executable bit returned by lstat on Windows,\n // so we need to preserve this value from the TREE.\n // TODO: Figure out how git handles this internally.\n if (head.mode === '100755') {\n stats.mode = 0o755\n }\n index.insert({\n filepath: head.fullpath,\n stats,\n oid: head.oid\n })\n if (emitter) {\n emitter.emit(`${emitterPrefix}progress`, {\n phase: 'Updating workdir',\n loaded: ++count,\n lengthComputable: false\n })\n }\n break\n }\n default: {\n throw new GitError(E.ObjectTypeAssertionInTreeFail, {\n type: head.type,\n oid: head.oid,\n entrypath: head.fullpath\n })\n }\n }\n }\n })\n } catch (err) {\n // Throw a more helpful error message for this common mistake.\n if (err.code === E.ReadObjectFail && err.data.oid === oid) {\n throw new GitError(E.CommitNotFetchedError, { ref, oid })\n } else {\n throw err\n }\n }\n }\n )\n }\n // Update HEAD\n const content = fullRef.startsWith('refs/heads') ? `ref: ${fullRef}` : oid\n await fs.write(`${gitdir}/HEAD`, `${content}\\n`)\n } catch (err) {\n err.caller = 'git.checkout'\n throw err\n }\n}\n","import { FileSystem } from '../models/FileSystem.js'\n\nexport async function hasObjectLoose ({ fs: _fs, gitdir, oid }) {\n const fs = new FileSystem(_fs)\n let source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`\n return fs.exists(`${gitdir}/${source}`)\n}\n","import { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { readPackIndex } from '../storage/readPackIndex.js'\nimport { join } from '../utils/join.js'\n\nexport async function hasObjectPacked ({\n fs: _fs,\n gitdir,\n oid,\n getExternalRefDelta\n}) {\n const fs = new FileSystem(_fs)\n // Check to see if it's in a packfile.\n // Iterate through all the .idx files\n let list = await fs.readdir(join(gitdir, '/objects/pack'))\n list = list.filter(x => x.endsWith('.idx'))\n for (let filename of list) {\n const indexFile = `${gitdir}/objects/pack/${filename}`\n let p = await readPackIndex({\n fs,\n filename: indexFile,\n getExternalRefDelta\n })\n if (p.error) throw new GitError(E.InternalFail, { message: p.error })\n // If the packfile DOES have the oid we're looking for...\n if (p.offsets.has(oid)) {\n return true\n }\n }\n // Failed to find it\n return false\n}\n","import { FileSystem } from '../models/FileSystem.js'\nimport { hasObjectLoose } from '../storage/hasObjectLoose.js'\nimport { hasObjectPacked } from '../storage/hasObjectPacked.js'\nimport { readObject } from '../storage/readObject.js'\n\nexport async function hasObject ({ fs: _fs, gitdir, oid, format = 'content' }) {\n const fs = new FileSystem(_fs)\n // Curry the current read method so that the packfile un-deltification\n // process can acquire external ref-deltas.\n const getExternalRefDelta = oid => readObject({ fs, gitdir, oid })\n\n // Look for it in the loose object directory.\n let result = await hasObjectLoose({ fs, gitdir, oid })\n // Check to see if it's in a packfile.\n if (!result) {\n result = await hasObjectPacked({ fs, gitdir, oid, getExternalRefDelta })\n }\n // Finally\n return result\n}\n","export function filterCapabilities (server, client) {\n let serverNames = server.map(cap => cap.split('=', 1)[0])\n return client.filter(cap => {\n let name = cap.split('=', 1)[0]\n return serverNames.includes(name)\n })\n}\n","import { FIFO } from './FIFO.js'\nimport { forAwait } from './forAwait.js'\n\n// Note: progress messages are designed to be written directly to the terminal,\n// so they are often sent with just a carriage return to overwrite the last line of output.\n// But there are also messages delimited with newlines.\n// I also include CRLF just in case.\nfunction findSplit (str) {\n let r = str.indexOf('\\r')\n let n = str.indexOf('\\n')\n if (r === -1 && n === -1) return -1\n if (r === -1) return n + 1 // \\n\n if (n === -1) return r + 1 // \\r\n if (n === r + 1) return n + 1 // \\r\\n\n return Math.min(r, n) + 1 // \\r or \\n\n}\n\nexport function splitLines (input) {\n let output = new FIFO()\n let tmp = ''\n ;(async () => {\n await forAwait(input, chunk => {\n chunk = chunk.toString('utf8')\n tmp += chunk\n while (true) {\n let i = findSplit(tmp)\n if (i === -1) break\n output.write(tmp.slice(0, i))\n tmp = tmp.slice(i)\n }\n })\n if (tmp.length > 0) {\n output.write(tmp)\n }\n output.end()\n })()\n return output\n}\n","// @ts-check\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { GitRemoteManager } from '../managers/GitRemoteManager.js'\nimport { GitShallowManager } from '../managers/GitShallowManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { GitPackIndex } from '../models/GitPackIndex.js'\nimport { hasObject } from '../storage/hasObject.js'\nimport { readObject } from '../storage/readObject.js'\nimport { collect } from '../utils/collect.js'\nimport { emptyPackfile } from '../utils/emptyPackfile.js'\nimport { filterCapabilities } from '../utils/filterCapabilities.js'\nimport { forAwait } from '../utils/forAwait.js'\nimport { join } from '../utils/join.js'\nimport { pkg } from '../utils/pkg.js'\nimport { cores } from '../utils/plugins.js'\nimport { splitLines } from '../utils/splitLines.js'\nimport { parseUploadPackResponse } from '../wire/parseUploadPackResponse.js'\nimport { writeUploadPackRequest } from '../wire/writeUploadPackRequest.js'\n\nimport { config } from './config'\n\n/**\n *\n * @typedef {object} FetchResponse - The object returned has the following schema:\n * @property {string | null} defaultBranch - The branch that is cloned if no branch is specified (typically \"master\")\n * @property {string | null} fetchHead - The SHA-1 object id of the fetched head commit\n * @property {object} [headers] - The HTTP response headers returned by the git server\n *\n */\n\n/**\n * Fetch commits from a remote repository\n *\n * Future versions of isomorphic-git might return additional metadata.\n *\n * To monitor progress events, see the documentation for the [`'emitter'` plugin](./plugin_emitter.md).\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.url] - The URL of the remote repository. Will be gotten from gitconfig if absent.\n * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config.\n * @param {string} [args.ref = 'HEAD'] - Which branch to fetch. By default this is the currently checked out branch.\n * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch.\n * @param {boolean} [args.noGitSuffix = false] - If true, clone will not auto-append a `.git` suffix to the `url`. (**AWS CodeCommit needs this option**)\n * @param {boolean} [args.tags = false] - Also fetch tags\n * @param {string} [args.remote] - What to name the remote that is created.\n * @param {number} [args.depth] - Integer. Determines how much of the git repository's history to retrieve\n * @param {Date} [args.since] - Only fetch commits created after the given date. Mutually exclusive with `depth`.\n * @param {string[]} [args.exclude = []] - A list of branches or tags. Instructs the remote server not to send us any commits reachable from these refs.\n * @param {boolean} [args.relative = false] - Changes the meaning of `depth` to be measured from the current shallow depth rather than from the branch tip.\n * @param {string} [args.username] - See the [Authentication](./authentication.html) documentation\n * @param {string} [args.password] - See the [Authentication](./authentication.html) documentation\n * @param {string} [args.token] - See the [Authentication](./authentication.html) documentation\n * @param {string} [args.oauth2format] - See the [Authentication](./authentication.html) documentation\n * @param {object} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config\n * @param {import('events').EventEmitter} [args.emitter] - [deprecated] Overrides the emitter set via the ['emitter' plugin](./plugin_emitter.md).\n * @param {string} [args.emitterPrefix = ''] - Scope emitted events by prepending `emitterPrefix` to the event name.\n *\n * @returns {Promise} Resolves successfully when fetch completes\n * @see FetchResponse\n *\n * @example\n * await git.fetch({\n * dir: '$input((/))',\n * corsProxy: 'https://cors.isomorphic-git.org',\n * url: '$input((https://github.com/isomorphic-git/isomorphic-git))',\n * ref: '$input((master))',\n * depth: $input((1)),\n * singleBranch: $input((true)),\n * tags: $input((false))\n * })\n * console.log('done')\n *\n */\nexport async function fetch ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n emitter = cores.get(core).get('emitter'),\n emitterPrefix = '',\n ref = 'HEAD',\n // @ts-ignore\n refs,\n remote,\n url,\n noGitSuffix = false,\n corsProxy,\n // @ts-ignore\n authUsername,\n // @ts-ignore\n authPassword,\n username = authUsername,\n password = authPassword,\n token,\n oauth2format,\n depth = null,\n since = null,\n exclude = [],\n relative = false,\n tags = false,\n singleBranch = false,\n headers = {},\n // @ts-ignore\n onprogress // deprecated\n}) {\n try {\n if (onprogress !== undefined) {\n console.warn(\n 'The `onprogress` callback has been deprecated. Please use the more generic `emitter` EventEmitter argument instead.'\n )\n }\n const fs = new FileSystem(_fs)\n let response = await fetchPackfile({\n core,\n gitdir,\n fs,\n emitter,\n emitterPrefix,\n ref,\n refs,\n remote,\n url,\n noGitSuffix,\n corsProxy,\n username,\n password,\n token,\n oauth2format,\n depth,\n since,\n exclude,\n relative,\n tags,\n singleBranch,\n headers\n })\n if (response === null) {\n return {\n defaultBranch: null,\n fetchHead: null\n }\n }\n if (emitter) {\n let lines = splitLines(response.progress)\n forAwait(lines, line => {\n // As a historical accident, 'message' events were trimmed removing valuable information,\n // such as \\r by itself which was a single to update the existing line instead of appending a new one.\n // TODO NEXT BREAKING RELEASE: make 'message' behave like 'rawmessage' and remove 'rawmessage'.\n emitter.emit(`${emitterPrefix}message`, line.trim())\n emitter.emit(`${emitterPrefix}rawmessage`, line)\n let matches = line.match(/([^:]*).*\\((\\d+?)\\/(\\d+?)\\)/)\n if (matches) {\n emitter.emit(`${emitterPrefix}progress`, {\n phase: matches[1].trim(),\n loaded: parseInt(matches[2], 10),\n total: parseInt(matches[3], 10),\n lengthComputable: true\n })\n }\n })\n }\n let packfile = await collect(response.packfile)\n let packfileSha = packfile.slice(-20).toString('hex')\n // TODO: Return more metadata?\n let res = {\n defaultBranch: response.HEAD,\n fetchHead: response.FETCH_HEAD\n }\n if (response.headers) {\n res.headers = response.headers\n }\n // This is a quick fix for the empty .git/objects/pack/pack-.pack file error,\n // which due to the way `git-list-pack` works causes the program to hang when it tries to read it.\n // TODO: Longer term, we should actually:\n // a) NOT concatenate the entire packfile into memory (line 78),\n // b) compute the SHA of the stream except for the last 20 bytes, using the same library used in push.js, and\n // c) compare the computed SHA with the last 20 bytes of the stream before saving to disk, and throwing a \"packfile got corrupted during download\" error if the SHA doesn't match.\n if (packfileSha !== '' && !emptyPackfile(packfile)) {\n res.packfile = `objects/pack/pack-${packfileSha}.pack`\n const fullpath = join(gitdir, res.packfile)\n await fs.write(fullpath, packfile)\n const getExternalRefDelta = oid => readObject({ fs, gitdir, oid })\n const idx = await GitPackIndex.fromPack({\n pack: packfile,\n getExternalRefDelta,\n emitter,\n emitterPrefix\n })\n await fs.write(fullpath.replace(/\\.pack$/, '.idx'), idx.toBuffer())\n }\n return res\n } catch (err) {\n err.caller = 'git.fetch'\n throw err\n }\n}\n\nasync function fetchPackfile ({\n core,\n gitdir,\n fs: _fs,\n emitter,\n emitterPrefix,\n ref,\n refs = [ref],\n remote,\n url,\n noGitSuffix,\n corsProxy,\n username,\n password,\n token,\n oauth2format,\n depth,\n since,\n exclude,\n relative,\n tags,\n singleBranch,\n headers\n}) {\n const fs = new FileSystem(_fs)\n // Sanity checks\n if (depth !== null) {\n if (Number.isNaN(parseInt(depth))) {\n throw new GitError(E.InvalidDepthParameterError, { depth })\n }\n depth = parseInt(depth)\n }\n // Set missing values\n remote = remote || 'origin'\n if (url === undefined) {\n url = await config({\n fs,\n gitdir,\n path: `remote.${remote}.url`\n })\n }\n if (corsProxy === undefined) {\n corsProxy = await config({ fs, gitdir, path: 'http.corsProxy' })\n }\n let auth = { username, password, token, oauth2format }\n let GitRemoteHTTP = GitRemoteManager.getRemoteHelperFor({ url })\n let remoteHTTP = await GitRemoteHTTP.discover({\n core,\n corsProxy,\n service: 'git-upload-pack',\n url,\n noGitSuffix,\n auth,\n headers\n })\n auth = remoteHTTP.auth // hack to get new credentials from CredentialManager API\n const remoteRefs = remoteHTTP.refs\n // For the special case of an empty repository with no refs, return null.\n if (remoteRefs.size === 0) {\n return null\n }\n // Check that the remote supports the requested features\n if (depth !== null && !remoteHTTP.capabilities.has('shallow')) {\n throw new GitError(E.RemoteDoesNotSupportShallowFail)\n }\n if (since !== null && !remoteHTTP.capabilities.has('deepen-since')) {\n throw new GitError(E.RemoteDoesNotSupportDeepenSinceFail)\n }\n if (exclude.length > 0 && !remoteHTTP.capabilities.has('deepen-not')) {\n throw new GitError(E.RemoteDoesNotSupportDeepenNotFail)\n }\n if (relative === true && !remoteHTTP.capabilities.has('deepen-relative')) {\n throw new GitError(E.RemoteDoesNotSupportDeepenRelativeFail)\n }\n // Figure out the SHA for the requested ref\n let { oid, fullref } = GitRefManager.resolveAgainstMap({\n ref,\n map: remoteRefs\n })\n // Filter out refs we want to ignore: only keep ref we're cloning, HEAD, branches, and tags (if we're keeping them)\n for (let remoteRef of remoteRefs.keys()) {\n if (\n remoteRef === fullref ||\n remoteRef === 'HEAD' ||\n remoteRef.startsWith('refs/heads/') ||\n (tags && remoteRef.startsWith('refs/tags/'))\n ) {\n continue\n }\n remoteRefs.delete(remoteRef)\n }\n // Assemble the application/x-git-upload-pack-request\n const capabilities = filterCapabilities(\n [...remoteHTTP.capabilities],\n [\n 'multi_ack_detailed',\n 'no-done',\n 'side-band-64k',\n 'thin-pack',\n 'ofs-delta',\n `agent=${pkg.agent}`\n ]\n )\n if (relative) capabilities.push('deepen-relative')\n // Start figuring out which oids from the remote we want to request\n let wants = singleBranch ? [oid] : remoteRefs.values()\n // Come up with a reasonable list of oids to tell the remote we already have\n // (preferably oids that are close ancestors of the branch heads we're fetching)\n let haveRefs = singleBranch\n ? refs\n : await GitRefManager.listRefs({\n fs,\n gitdir,\n filepath: `refs`\n })\n let haves = []\n for (let ref of haveRefs) {\n try {\n ref = await GitRefManager.expand({ fs, gitdir, ref })\n const oid = await GitRefManager.resolve({ fs, gitdir, ref })\n if (await hasObject({ fs, gitdir, oid })) {\n haves.push(oid)\n }\n } catch (err) {}\n }\n haves = [...new Set(haves)]\n let oids = await GitShallowManager.read({ fs, gitdir })\n let shallows = remoteHTTP.capabilities.has('shallow') ? [...oids] : []\n let packstream = writeUploadPackRequest({\n capabilities,\n wants,\n haves,\n shallows,\n depth,\n since,\n exclude\n })\n // CodeCommit will hang up if we don't send a Content-Length header\n // so we can't stream the body.\n let packbuffer = await collect(packstream)\n let raw = await GitRemoteHTTP.connect({\n core,\n emitter,\n emitterPrefix,\n corsProxy,\n service: 'git-upload-pack',\n url,\n noGitSuffix,\n auth,\n body: [packbuffer],\n headers\n })\n let response = await parseUploadPackResponse(raw.body)\n if (raw.headers) {\n response.headers = raw.headers\n }\n // Apply all the 'shallow' and 'unshallow' commands\n for (const oid of response.shallows) {\n oids.add(oid)\n }\n for (const oid of response.unshallows) {\n oids.delete(oid)\n }\n await GitShallowManager.write({ fs, gitdir, oids })\n // Update local remote refs\n if (singleBranch) {\n const refs = new Map([[fullref, oid]])\n // But wait, maybe it was a symref, like 'HEAD'!\n // We need to save all the refs in the symref chain (sigh).\n const symrefs = new Map()\n let bail = 10\n let key = fullref\n while (bail--) {\n let value = remoteHTTP.symrefs.get(key)\n if (value === undefined) break\n symrefs.set(key, value)\n key = value\n }\n // final value must not be a symref but a real ref\n refs.set(key, remoteRefs.get(key))\n await GitRefManager.updateRemoteRefs({\n fs,\n gitdir,\n remote,\n refs,\n symrefs,\n tags\n })\n } else {\n await GitRefManager.updateRemoteRefs({\n fs,\n gitdir,\n remote,\n refs: remoteRefs,\n symrefs: remoteHTTP.symrefs,\n tags\n })\n }\n // We need this value later for the `clone` command.\n response.HEAD = remoteHTTP.symrefs.get('HEAD')\n // AWS CodeCommit doesn't list HEAD as a symref, but we can reverse engineer it\n // Find the SHA of the branch called HEAD\n if (response.HEAD === undefined) {\n let { oid } = GitRefManager.resolveAgainstMap({\n ref: 'HEAD',\n map: remoteRefs\n })\n // Use the name of the first branch that's not called HEAD that has\n // the same SHA as the branch called HEAD.\n for (let [key, value] of remoteRefs.entries()) {\n if (key !== 'HEAD' && value === oid) {\n response.HEAD = key\n break\n }\n }\n }\n response.FETCH_HEAD = oid\n return response\n}\n","// TODO: make a function that just returns obCount. then emptyPackfile = () => sizePack(pack) === 0\nexport function emptyPackfile (pack) {\n const pheader = '5041434b'\n const version = '00000002'\n const obCount = '00000000'\n const header = pheader + version + obCount\n return pack.slice(0, 12).toString('hex') === header\n}\n","// @ts-check\nimport { FileSystem } from '../models/FileSystem.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Initialize a new repository\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {boolean} [args.bare = false] - Initialize a bare repository\n * @returns {Promise} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.init({ dir: '$input((/))' })\n * console.log('done')\n *\n */\nexport async function init ({\n core = 'default',\n bare = false,\n dir,\n gitdir = bare ? dir : join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs')\n}) {\n try {\n const fs = new FileSystem(_fs)\n let folders = [\n 'hooks',\n 'info',\n 'objects/info',\n 'objects/pack',\n 'refs/heads',\n 'refs/tags'\n ]\n folders = folders.map(dir => gitdir + '/' + dir)\n for (let folder of folders) {\n await fs.mkdir(folder)\n }\n await fs.write(\n gitdir + '/config',\n '[core]\\n' +\n '\\trepositoryformatversion = 0\\n' +\n '\\tfilemode = false\\n' +\n `\\tbare = ${bare}\\n` +\n (bare ? '' : '\\tlogallrefupdates = true\\n') +\n '\\tsymlinks = false\\n' +\n '\\tignorecase = true\\n'\n )\n await fs.write(gitdir + '/HEAD', 'ref: refs/heads/master\\n')\n } catch (err) {\n err.caller = 'git.init'\n throw err\n }\n}\n","// @ts-check\nimport { FileSystem } from '../models/FileSystem.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\nimport { checkout } from './checkout.js'\nimport { config } from './config.js'\nimport { fetch } from './fetch.js'\nimport { init } from './init.js'\n\n/**\n * Clone a repository\n *\n * To monitor progress events, see the documentation for the [`'emitter'` plugin](./plugin_emitter.md).\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.url - The URL of the remote repository\n * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Value is stored in the git config file for that repo.\n * @param {string} [args.ref] - Which branch to clone. By default this is the designated \"main branch\" of the repository.\n * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch.\n * @param {boolean} [args.noCheckout = false] - If true, clone will only fetch the repo, not check out a branch. Skipping checkout can save a lot of time normally spent writing files to disk.\n * @param {boolean} [args.noGitSuffix = false] - If true, clone will not auto-append a `.git` suffix to the `url`. (**AWS CodeCommit needs this option**.)\n * @param {boolean} [args.noTags = false] - By default clone will fetch all tags. `noTags` disables that behavior.\n * @param {string} [args.remote = 'origin'] - What to name the remote that is created.\n * @param {number} [args.depth] - Integer. Determines how much of the git repository's history to retrieve\n * @param {Date} [args.since] - Only fetch commits created after the given date. Mutually exclusive with `depth`.\n * @param {string[]} [args.exclude = []] - A list of branches or tags. Instructs the remote server not to send us any commits reachable from these refs.\n * @param {boolean} [args.relative = false] - Changes the meaning of `depth` to be measured from the current shallow depth rather than from the branch tip.\n * @param {string} [args.username] - See the [Authentication](./authentication.html) documentation\n * @param {string} [args.password] - See the [Authentication](./authentication.html) documentation\n * @param {string} [args.token] - See the [Authentication](./authentication.html) documentation\n * @param {string} [args.oauth2format] - See the [Authentication](./authentication.html) documentation\n * @param {object} [args.headers = {}] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config\n * @param {import('events').EventEmitter} [args.emitter] - [deprecated] Overrides the emitter set via the ['emitter' plugin](./plugin_emitter.md)\n * @param {string} [args.emitterPrefix = ''] - Scope emitted events by prepending `emitterPrefix` to the event name\n *\n * @returns {Promise} Resolves successfully when clone completes\n *\n * @example\n * await git.clone({\n * dir: '$input((/))',\n * corsProxy: 'https://cors.isomorphic-git.org',\n * url: '$input((https://github.com/isomorphic-git/isomorphic-git))',\n * $textarea((singleBranch: true,\n * depth: 1))\n * })\n * console.log('done')\n *\n */\nexport async function clone ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n emitter = cores.get(core).get('emitter'),\n emitterPrefix = '',\n url,\n noGitSuffix = false,\n corsProxy = undefined,\n ref = undefined,\n remote = 'origin',\n // @ts-ignore\n authUsername,\n // @ts-ignore\n authPassword,\n username = undefined,\n password = undefined,\n token = undefined,\n oauth2format = undefined,\n depth = undefined,\n since = undefined,\n exclude = [],\n relative = false,\n singleBranch = false,\n noCheckout = false,\n noTags = false,\n headers = {},\n // @ts-ignore\n onprogress\n}) {\n try {\n if (onprogress !== undefined) {\n console.warn(\n 'The `onprogress` callback has been deprecated. Please use the more generic `emitter` EventEmitter argument instead.'\n )\n }\n const fs = new FileSystem(_fs)\n username = username === undefined ? authUsername : username\n password = password === undefined ? authPassword : password\n await init({ gitdir, fs })\n // Add remote\n await config({\n gitdir,\n fs,\n path: `remote.${remote}.url`,\n value: url\n })\n await config({\n gitdir,\n fs,\n path: `remote.${remote}.fetch`,\n value: `+refs/heads/*:refs/remotes/${remote}/*`\n })\n if (corsProxy) {\n await config({\n gitdir,\n fs,\n path: `http.corsProxy`,\n value: corsProxy\n })\n }\n // Fetch commits\n const { defaultBranch, fetchHead } = await fetch({\n core,\n gitdir,\n fs,\n emitter,\n emitterPrefix,\n noGitSuffix,\n ref,\n remote,\n username,\n password,\n token,\n oauth2format,\n depth,\n since,\n exclude,\n relative,\n singleBranch,\n headers,\n tags: !noTags\n })\n if (fetchHead === null) return\n ref = ref || defaultBranch\n ref = ref.replace('refs/heads/', '')\n // Checkout that branch\n await checkout({\n dir,\n gitdir,\n fs,\n emitter,\n emitterPrefix,\n ref,\n remote,\n noCheckout\n })\n } catch (err) {\n err.caller = 'git.clone'\n throw err\n }\n}\n","// @ts-check\nimport { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { GitTree } from '../models/GitTree.js'\nimport { writeObject } from '../storage/writeObject.js'\nimport { flatFileListToDirectoryStructure } from '../utils/flatFileListToDirectoryStructure.js'\nimport { join } from '../utils/join.js'\nimport { normalizeAuthorObject } from '../utils/normalizeAuthorObject.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Create a new commit\n *\n * @param {Object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.message - The commit message to use.\n * @param {Object} [args.author] - The details about the author.\n * @param {string} [args.author.name] - Default is `user.name` config.\n * @param {string} [args.author.email] - Default is `user.email` config.\n * @param {string} [args.author.date] - Set the author timestamp field. Default is the current date.\n * @param {string} [args.author.timestamp] - Set the author timestamp field. This is an alternative to using `date` using an integer number of seconds since the Unix epoch instead of a JavaScript date object.\n * @param {string} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`.\n * @param {Object} [args.committer = author] - The details about the commit committer, in the same format as the author parameter. If not specified, the author details are used.\n * @param {string} [args.signingKey] - Sign the tag object using this private PGP key.\n *\n * @returns {Promise} Resolves successfully with the SHA-1 object id of the newly created commit.\n *\n * @example\n * let sha = await git.commit({\n * dir: '$input((/))',\n * author: {\n * name: '$input((Mr. Test))',\n * email: '$input((mrtest@example.com))'\n * },\n * message: '$input((Added the a.txt file))'\n * })\n * console.log(sha)\n *\n */\nexport async function commit ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n message,\n author,\n committer,\n signingKey\n}) {\n try {\n const fs = new FileSystem(_fs)\n\n if (message === undefined) {\n throw new GitError(E.MissingRequiredParameterError, {\n function: 'commit',\n parameter: 'message'\n })\n }\n\n // Fill in missing arguments with default values\n author = await normalizeAuthorObject({ fs, gitdir, author })\n if (author === undefined) {\n throw new GitError(E.MissingAuthorError)\n }\n\n committer = Object.assign({}, committer || author)\n // Match committer's date to author's one, if omitted\n committer.date = committer.date || author.date\n committer = await normalizeAuthorObject({ fs, gitdir, author: committer })\n if (committer === undefined) {\n throw new GitError(E.MissingCommitterError)\n }\n\n let oid\n await GitIndexManager.acquire(\n { fs, filepath: `${gitdir}/index` },\n async function (index) {\n const inodes = flatFileListToDirectoryStructure(index.entries)\n const inode = inodes.get('.')\n const treeRef = await constructTree({ fs, gitdir, inode })\n let parents\n try {\n let parent = await GitRefManager.resolve({ fs, gitdir, ref: 'HEAD' })\n parents = [parent]\n } catch (err) {\n // Probably an initial commit\n parents = []\n }\n let comm = GitCommit.from({\n tree: treeRef,\n parent: parents,\n author,\n committer,\n message\n })\n if (signingKey) {\n let pgp = cores.get(core).get('pgp')\n comm = await GitCommit.sign(comm, pgp, signingKey)\n }\n oid = await writeObject({\n fs,\n gitdir,\n type: 'commit',\n object: comm.toObject()\n })\n // Update branch pointer\n const branch = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: 'HEAD',\n depth: 2\n })\n await fs.write(join(gitdir, branch), oid + '\\n')\n }\n )\n return oid\n } catch (err) {\n err.caller = 'git.commit'\n throw err\n }\n}\n\nasync function constructTree ({ fs, gitdir, inode }) {\n // use depth first traversal\n let children = inode.children\n for (let inode of children) {\n if (inode.type === 'tree') {\n inode.metadata.mode = '040000'\n inode.metadata.oid = await constructTree({ fs, gitdir, inode })\n }\n }\n let entries = children.map(inode => ({\n mode: inode.metadata.mode,\n path: inode.basename,\n oid: inode.metadata.oid,\n type: inode.type\n }))\n const tree = GitTree.from(entries)\n let oid = await writeObject({\n fs,\n gitdir,\n type: 'tree',\n object: tree.toObject()\n })\n return oid\n}\n","// @ts-check\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n// @see https://git-scm.com/docs/git-rev-parse.html#_specifying_revisions\nconst abbreviateRx = new RegExp('^refs/(heads/|tags/|remotes/)?(.*)')\n\nfunction abbreviate (ref) {\n const match = abbreviateRx.exec(ref)\n if (match) {\n if (match[1] === 'remotes/' && ref.endsWith('/HEAD')) {\n return match[2].slice(0, -5)\n } else {\n return match[2]\n }\n }\n return ref\n}\n\n/**\n * Get the name of the branch currently pointed to by .git/HEAD\n *\n * @param {Object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {boolean} [args.fullname = false] - Return the full path (e.g. \"refs/heads/master\") instead of the abbreviated form.\n *\n * @returns {Promise} The name of the current branch or undefined if the HEAD is detached.\n *\n * @example\n * // Get the current branch name\n * let branch = await git.currentBranch({ dir: '$input((/))', fullname: $input((false)) })\n * console.log(branch)\n *\n */\nexport async function currentBranch ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n fullname = false\n}) {\n try {\n const fs = new FileSystem(_fs)\n let ref = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: 'HEAD',\n depth: 2\n })\n // Return `undefined` for detached HEAD\n if (!ref.startsWith('refs/')) return\n return fullname ? ref : abbreviate(ref)\n } catch (err) {\n err.caller = 'git.currentBranch'\n throw err\n }\n}\n","// @ts-check\nimport cleanGitRef from 'clean-git-ref'\n\nimport { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\nimport { currentBranch } from './currentBranch'\n\n/**\n * Delete a local branch\n *\n * > Note: This only deletes loose branches - it should be fixed in the future to delete packed branches as well.\n *\n * @param {Object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The branch to delete\n *\n * @returns {Promise} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.deleteBranch({ dir: '$input((/))', ref: '$input((local-branch))' })\n * console.log('done')\n *\n */\nexport async function deleteBranch ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n ref\n}) {\n try {\n const fs = new FileSystem(_fs)\n if (ref === undefined) {\n throw new GitError(E.MissingRequiredParameterError, {\n function: 'deleteBranch',\n parameter: 'ref'\n })\n }\n\n if (ref !== cleanGitRef.clean(ref)) {\n throw new GitError(E.InvalidRefNameError, {\n verb: 'delete',\n noun: 'branch',\n ref,\n suggestion: cleanGitRef.clean(ref)\n })\n }\n\n const exist = await fs.exists(`${gitdir}/refs/heads/${ref}`)\n if (!exist) {\n throw new GitError(E.RefNotExistsError, {\n verb: 'delete',\n noun: 'branch',\n ref\n })\n }\n\n const currentRef = await currentBranch({ fs, gitdir })\n if (ref === currentRef) {\n throw new GitError(E.BranchDeleteError, { ref })\n }\n\n // Delete a specified branch\n await fs.rm(`${gitdir}/refs/heads/${ref}`)\n } catch (err) {\n err.caller = 'git.deleteBranch'\n throw err\n }\n}\n","// @ts-check\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Delete a local ref\n *\n * > Note: This only deletes loose refs - it should be fixed in the future to delete packed refs as well.\n *\n * @param {Object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The ref to delete\n *\n * @returns {Promise} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.deleteRef({ dir: '$input((/))', ref: '$input((refs/tags/test-tag))' })\n * console.log('done')\n *\n */\nexport async function deleteRef ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n ref\n}) {\n try {\n const fs = new FileSystem(_fs)\n await GitRefManager.deleteRef({ fs, gitdir, ref })\n } catch (err) {\n err.caller = 'git.deleteRef'\n throw err\n }\n}\n","// @ts-check\nimport { GitConfigManager } from '../managers/GitConfigManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Removes the local config entry for a given remote\n *\n * @param {Object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.remote - The name of the remote to delete\n *\n * @returns {Promise} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.deleteRemote({ dir: '$input((/))', remote: '$input((upstream))' })\n * console.log('done')\n *\n */\nexport async function deleteRemote ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n remote\n}) {\n try {\n const fs = new FileSystem(_fs)\n if (remote === undefined) {\n throw new GitError(E.MissingRequiredParameterError, {\n function: 'deleteRemote',\n parameter: 'remote'\n })\n }\n const config = await GitConfigManager.get({ fs, gitdir })\n await config.deleteSection('remote', remote)\n await GitConfigManager.save({ fs, gitdir, config })\n } catch (err) {\n err.caller = 'git.deleteRemote'\n throw err\n }\n}\n","// @ts-check\nimport { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\nimport { deleteRef } from './deleteRef'\n\n/**\n * Delete a local tag ref\n *\n * @param {Object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The tag to delete\n *\n * @returns {Promise} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.deleteTag({ dir: '$input((/))', ref: '$input((test-tag))' })\n * console.log('done')\n *\n */\nexport async function deleteTag ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n ref\n}) {\n try {\n const fs = new FileSystem(_fs)\n if (ref === undefined) {\n throw new GitError(E.MissingRequiredParameterError, {\n function: 'deleteTag',\n parameter: 'ref'\n })\n }\n ref = ref.startsWith('refs/tags/') ? ref : `refs/tags/${ref}`\n await deleteRef({ fs, gitdir, ref })\n } catch (err) {\n err.caller = 'git.deleteTag'\n throw err\n }\n}\n","import { FileSystem } from '../models/FileSystem.js'\n\nexport async function expandOidLoose ({ fs: _fs, gitdir, oid: short }) {\n const fs = new FileSystem(_fs)\n const prefix = short.slice(0, 2)\n const objectsSuffixes = await fs.readdir(`${gitdir}/objects/${prefix}`)\n return objectsSuffixes\n .map(suffix => `${prefix}${suffix}`)\n .filter(_oid => _oid.startsWith(short))\n}\n","import { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { readPackIndex } from '../storage/readPackIndex.js'\nimport { join } from '../utils/join.js'\n\nexport async function expandOidPacked ({\n fs: _fs,\n gitdir,\n oid: short,\n getExternalRefDelta\n}) {\n const fs = new FileSystem(_fs)\n // Iterate through all the .pack files\n let results = []\n let list = await fs.readdir(join(gitdir, '/objects/pack'))\n list = list.filter(x => x.endsWith('.idx'))\n for (let filename of list) {\n const indexFile = `${gitdir}/objects/pack/${filename}`\n let p = await readPackIndex({\n fs,\n filename: indexFile,\n getExternalRefDelta\n })\n if (p.error) throw new GitError(E.InternalFail, { message: p.error })\n // Search through the list of oids in the packfile\n for (let oid of p.offsets.keys()) {\n if (oid.startsWith(short)) results.push(oid)\n }\n }\n return results\n}\n","import { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { expandOidLoose } from '../storage/expandOidLoose.js'\nimport { expandOidPacked } from '../storage/expandOidPacked.js'\nimport { readObject } from '../storage/readObject.js'\n\nexport async function expandOid ({ fs: _fs, gitdir, oid: short }) {\n const fs = new FileSystem(_fs)\n // Curry the current read method so that the packfile un-deltification\n // process can acquire external ref-deltas.\n const getExternalRefDelta = oid => readObject({ fs: _fs, gitdir, oid })\n\n const results1 = await expandOidLoose({ fs, gitdir, oid: short })\n const results2 = await expandOidPacked({\n fs,\n gitdir,\n oid: short,\n getExternalRefDelta\n })\n const results = results1.concat(results2)\n\n if (results.length === 1) {\n return results[0]\n }\n if (results.length > 1) {\n throw new GitError(E.AmbiguousShortOid, {\n short,\n matches: results.join(', ')\n })\n }\n throw new GitError(E.ShortOidNotFound, { short })\n}\n","// @ts-check\nimport { FileSystem } from '../models/FileSystem.js'\nimport { expandOid as _expandOid } from '../storage/expandOid.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Expand and resolve a short oid into a full oid\n *\n * @param {Object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.oid - The shortened oid prefix to expand (like \"0414d2a\")\n *\n * @returns {Promise} Resolves successfully with the full oid (like \"0414d2a286d7bbc7a4a326a61c1f9f888a8ab87f\")\n *\n * @example\n * let oid = await git.expandOid({ dir: '$input((/))', oid: '$input((0414d2a))'})\n * console.log(oid)\n *\n */\nexport async function expandOid ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n oid\n}) {\n try {\n const fs = new FileSystem(_fs)\n const fullOid = await _expandOid({\n fs,\n gitdir,\n oid\n })\n return fullOid\n } catch (err) {\n err.caller = 'git.expandOid'\n throw err\n }\n}\n","// @ts-check\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Expand an abbreviated ref to its full name\n *\n * @param {Object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The ref to expand (like \"v1.0.0\")\n *\n * @returns {Promise} Resolves successfully with a full ref name (\"refs/tags/v1.0.0\")\n *\n * @example\n * let fullRef = await git.expandRef({ dir: '$input((/))', ref: '$input((master))'})\n * console.log(fullRef)\n *\n */\nexport async function expandRef ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n ref\n}) {\n try {\n const fs = new FileSystem(_fs)\n const fullref = await GitRefManager.expand({\n fs,\n gitdir,\n ref\n })\n return fullref\n } catch (err) {\n err.caller = 'git.expandRef'\n throw err\n }\n}\n","// @ts-check\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { readObject } from '../storage/readObject.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Find the merge base for a set of commits\n *\n * @link https://isomorphic-git.github.io/docs/findMergeBase.html\n */\n// TODO: Should I rename this nearestCommonAncestor?\nexport async function findMergeBase ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n oids\n}) {\n // Note: right now, the tests are geared so that the output should match that of\n // `git merge-base --all --octopus`\n // because without the --octopus flag, git's output seems to depend on the ORDER of the oids,\n // and computing virtual merge bases is just too much for me to fathom right now.\n try {\n const fs = new FileSystem(_fs)\n // If we start N independent walkers, one at each of the given `oids`, and walk backwards\n // through ancestors, eventually we'll discover a commit where each one of these N walkers\n // has passed through. So we just need to keep tallies until we find one where we've walked\n // through N times.\n // TODO: I think it would be much safer if we actually tracked the identities of the walkers\n // rather than the sum.\n const counts = {}\n let passes = oids.length\n let heads = oids\n while (heads.length) {\n // Count how many times we've passed each commit\n let result = []\n for (let oid of heads) {\n if (counts[oid]) {\n counts[oid] += 1\n } else {\n counts[oid] = 1\n }\n if (counts[oid] === passes) {\n result.push(oid)\n }\n }\n if (result.length > 0) {\n return result\n }\n // We haven't found a common ancestor yet\n let newheads = []\n for (let oid of heads) {\n try {\n let { object } = await readObject({ fs, gitdir, oid })\n let commit = GitCommit.from(object)\n let { parent } = commit.parseHeaders()\n for (let oid of parent) {\n newheads.push(oid)\n }\n } catch (err) {\n // do nothing\n }\n }\n heads = newheads\n }\n return []\n } catch (err) {\n err.caller = 'git.findMergeBase'\n throw err\n }\n}\n","// @ts-check\nimport { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { dirname } from '../utils/dirname.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Find the root git directory\n *\n * Starting at `filepath`, walks upward until it finds a directory that contains a subdirectory called '.git'.\n *\n * @param {Object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} args.filepath - The file directory to start searching in.\n *\n * @returns {Promise} Resolves successfully with a root git directory path\n * @throws {GitRootNotFoundError}\n *\n * @example\n * let gitroot = await git.findRoot({\n * filepath: '$input((/path/to/some/gitrepo/path/to/some/file.txt))'\n * })\n * console.log(gitroot) // '/path/to/some/gitrepo'\n *\n */\nexport async function findRoot ({\n core = 'default',\n fs: _fs = cores.get(core).get('fs'),\n filepath\n}) {\n try {\n const fs = new FileSystem(_fs)\n return _findRoot(fs, filepath)\n } catch (err) {\n err.caller = 'git.findRoot'\n throw err\n }\n}\n\nasync function _findRoot (fs, filepath) {\n if (await fs.exists(join(filepath, '.git'))) {\n return filepath\n } else {\n let parent = dirname(filepath)\n if (parent === filepath) {\n throw new GitError(E.GitRootNotFoundError, { filepath })\n }\n return _findRoot(fs, parent)\n }\n}\n","// @ts-check\nimport { GitRemoteHTTP } from '../managers/GitRemoteHTTP.js'\n\n/**\n *\n * @typedef {Object} RemoteDescription - The object returned has the following schema:\n * @property {string[]} capabilities - The list of capabilities returned by the server (part of the Git protocol)\n * @property {Object} [refs]\n * @property {Object} [refs.heads] - The branches on the remote\n * @property {Object} [refs.pull] - The special branches representing pull requests (non-standard)\n * @property {Object} [refs.tags] - The tags on the remote\n *\n */\n\n/**\n * List a remote servers branches, tags, and capabilities.\n *\n * This is a rare command that doesn't require an `fs`, `dir`, or even `gitdir` argument.\n * It just communicates to a remote git server, using the first step of the `git-upload-pack` handshake, but stopping short of fetching the packfile.\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {string} args.url - The URL of the remote repository. Will be gotten from gitconfig if absent.\n * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config.\n * @param {boolean} [args.forPush = false] - By default, the command queries the 'fetch' capabilities. If true, it will ask for the 'push' capabilities.\n * @param {boolean} [args.noGitSuffix = false] - If true, clone will not auto-append a `.git` suffix to the `url`. (**AWS CodeCommit needs this option**)\n * @param {string} [args.username] - See the [Authentication](./authentication.html) documentation\n * @param {string} [args.password] - See the [Authentication](./authentication.html) documentation\n * @param {string} [args.token] - See the [Authentication](./authentication.html) documentation\n * @param {string} [args.oauth2format] - See the [Authentication](./authentication.html) documentation\n * @param {object} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config\n *\n * @returns {Promise} Resolves successfully with an object listing the branches, tags, and capabilities of the remote.\n * @see RemoteDescription\n *\n * @example\n * let info = await git.getRemoteInfo({\n * url:\n * \"$input((https://cors.isomorphic-git.org/github.com/isomorphic-git/isomorphic-git.git))\"\n * });\n * console.log(info);\n *\n */\nexport async function getRemoteInfo ({\n core = 'default',\n corsProxy,\n url,\n // @ts-ignore\n authUsername,\n // @ts-ignore\n authPassword,\n noGitSuffix = false,\n username = authUsername,\n password = authPassword,\n token,\n oauth2format,\n headers = {},\n forPush = false\n}) {\n try {\n let auth = { username, password, token, oauth2format }\n const remote = await GitRemoteHTTP.discover({\n core,\n corsProxy,\n service: forPush ? 'git-receive-pack' : 'git-upload-pack',\n url,\n noGitSuffix,\n auth,\n headers\n })\n auth = remote.auth // hack to get new credentials from CredentialManager API\n // Note: remote.capabilities, remote.refs, and remote.symrefs are Set and Map objects,\n // but one of the objectives of the public API is to always return JSON-compatible objects\n // so we must JSONify them.\n const result = {\n capabilities: [...remote.capabilities]\n }\n // Convert the flat list into an object tree, because I figure 99% of the time\n // that will be easier to use.\n for (const [ref, oid] of remote.refs) {\n let parts = ref.split('/')\n let last = parts.pop()\n let o = result\n for (let part of parts) {\n o[part] = o[part] || {}\n o = o[part]\n }\n o[last] = oid\n }\n // Merge symrefs on top of refs to more closely match actual git repo layouts\n for (const [symref, ref] of remote.symrefs) {\n let parts = symref.split('/')\n let last = parts.pop()\n let o = result\n for (let part of parts) {\n o[part] = o[part] || {}\n o = o[part]\n }\n o[last] = ref\n }\n return result\n } catch (err) {\n err.caller = 'git.getRemoteInfo'\n throw err\n }\n}\n","// @ts-check\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitPackIndex } from '../models/GitPackIndex.js'\nimport { readObject } from '../storage/readObject.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Create the .idx file for a given .pack file\n *\n * To monitor progress events, see the documentation for the [`'emitter'` plugin](./plugin_emitter.md).\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.filepath - The path to the .pack file to index\n * @param {import('events').EventEmitter} [args.emitter] - [deprecated] Overrides the emitter set via the ['emitter' plugin](./plugin_emitter.md).\n * @param {string} [args.emitterPrefix = ''] - Scope emitted events by prepending `emitterPrefix` to the event name.\n *\n * @returns {Promise} Resolves when filesystem operations are complete\n *\n * @example\n * await git.indexPack({ dir: '$input((/))', filepath: '$input((pack-9cbd243a1caa4cb4bef976062434a958d82721a9.pack))' })\n * console.log('done')\n *\n */\nexport async function indexPack ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n emitter = cores.get(core).get('emitter'),\n emitterPrefix = '',\n filepath\n}) {\n try {\n const fs = new FileSystem(_fs)\n filepath = join(dir, filepath)\n const pack = await fs.read(filepath)\n const getExternalRefDelta = oid => readObject({ fs, gitdir, oid })\n const idx = await GitPackIndex.fromPack({\n pack,\n getExternalRefDelta,\n emitter,\n emitterPrefix\n })\n await fs.write(filepath.replace(/\\.pack$/, '.idx'), idx.toBuffer())\n } catch (err) {\n err.caller = 'git.indexPack'\n throw err\n }\n}\n","// @ts-check\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { readObject } from '../storage/readObject.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Check whether a git commit is descended from another\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.oid - The descendent commit\n * @param {string} args.ancestor - The (proposed) ancestor commit\n * @param {number} [args.depth = -1] - Maximum depth to search before giving up. -1 means no maximum depth.\n *\n * @returns {Promise} Resolves to true if `oid` is a descendent of `ancestor`\n *\n * @example\n * let oid = await git.resolveRef({ dir: '$input((/))', ref: '$input((master))' })\n * let ancestor = await git.resolveRef({ dir: '$input((/))', ref: '$input((v0.20.0))' })\n * console.log(oid, ancestor)\n * await git.isDescendent({ dir: '$input((/))', oid, ancestor, depth: $input((-1)) })\n *\n */\nexport async function isDescendent ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n oid,\n ancestor,\n depth = -1\n}) {\n try {\n const fs = new FileSystem(_fs)\n if (!oid) {\n throw new GitError(E.MissingRequiredParameterError, {\n function: 'isDescendent',\n parameter: 'oid'\n })\n }\n if (!ancestor) {\n throw new GitError(E.MissingRequiredParameterError, {\n function: 'isDescendent',\n parameter: 'ancestor'\n })\n }\n // If you don't like this behavior, add your own check.\n // Edge cases are hard to define a perfect solution.\n if (oid === ancestor) return false\n // We do not use recursion here, because that would lead to depth-first traversal,\n // and we want to maintain a breadth-first traversal to avoid hitting shallow clone depth cutoffs.\n const queue = [oid]\n let visited = new Set()\n let searchdepth = 0\n while (queue.length) {\n if (searchdepth++ === depth) {\n throw new GitError(E.MaxSearchDepthExceeded, { depth })\n }\n let oid = queue.shift()\n let { type, object } = await readObject({\n fs,\n gitdir,\n oid\n })\n if (type !== 'commit') {\n throw new GitError(E.ResolveCommitError, { oid })\n }\n const commit = GitCommit.from(object).parse()\n // Are any of the parents the sought-after ancestor?\n for (const parent of commit.parent) {\n if (parent === ancestor) return true\n }\n // If not, add them to heads\n for (const parent of commit.parent) {\n if (!visited.has(parent)) {\n queue.push(parent)\n visited.add(parent)\n }\n }\n // Eventually, we'll travel entire tree to the roots where all the parents are empty arrays,\n // or hit the shallow depth and throw an error. Excluding the possibility of grafts, or\n // different branches cloned to different depths, you would hit this error at the same time\n // for all parents, so trying to continue is futile.\n }\n return false\n } catch (err) {\n err.caller = 'git.isDescendent'\n throw err\n }\n}\n","// @ts-check\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * List branches\n *\n * By default it lists local branches. If a 'remote' is specified, it lists the remote's branches. When listing remote branches, the HEAD branch is not filtered out, so it may be included in the list of results.\n *\n * Note that specifying a remote does not actually contact the server and update the list of branches.\n * If you want an up-to-date list, first do a `fetch` to that remote.\n * (Which branch you fetch doesn't matter - the list of branches available on the remote is updated during the fetch handshake.)\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.remote] - Instead of the branches in `refs/heads`, list the branches in `refs/remotes/${remote}`.\n *\n * @returns {Promise>} Resolves successfully with an array of branch names\n *\n * @example\n * let branches = await git.listBranches({ dir: '$input((/))' })\n * console.log(branches)\n * let remoteBranches = await git.listBranches({ dir: '$input((/))', remote: '$input((origin))' })\n * console.log(remoteBranches)\n *\n */\nexport async function listBranches ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n remote = undefined\n}) {\n try {\n const fs = new FileSystem(_fs)\n return GitRefManager.listBranches({ fs, gitdir, remote })\n } catch (err) {\n err.caller = 'git.listBranches'\n throw err\n }\n}\n","// @ts-check\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitAnnotatedTag } from '../models/GitAnnotatedTag.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { GitTree } from '../models/GitTree.js'\nimport { readObject as _readObject } from '../storage/readObject.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\nimport { resolveTree } from '../utils/resolveTree.js'\n\n/**\n *\n * @typedef {Object} CommitDescription\n * @property {string} oid - SHA-1 object id of this commit\n * @property {string} message - commit message\n * @property {string} tree - SHA-1 object id of corresponding file tree\n * @property {string[]} parent - an array of zero or more SHA-1 object ids\n * @property {Object} author\n * @property {string} author.name - the author's name\n * @property {string} author.email - the author's email\n * @property {number} author.timestamp - UTC Unix timestamp in seconds\n * @property {number} author.timezoneOffset - timezone difference from UTC in minutes\n * @property {Object} committer\n * @property {string} committer.name - the committer's name\n * @property {string} committer.email - the committer's email\n * @property {number} committer.timestamp - UTC Unix timestamp in seconds\n * @property {number} committer.timezoneOffset - timezone difference from UTC in minutes\n * @property {string} [gpgsig] - PGP signature (if present)\n */\n\n/**\n *\n * @typedef {Object} TreeEntry\n * @property {string} mode\n * @property {string} path\n * @property {string} oid\n * @property {string} [type]\n */\n\n/**\n *\n * @typedef {Object} TreeDescription\n * @property {TreeEntry[]} entries\n */\n\n/**\n *\n * @typedef {Object} GitObjectDescription - The object returned has the following schema:\n * @property {string} oid\n * @property {'blob' | 'tree' | 'commit' | 'tag'} [type]\n * @property {'deflated' | 'wrapped' | 'content' | 'parsed'} format\n * @property {Buffer | String | CommitDescription | TreeDescription} object\n * @property {string} [source]\n *\n */\n\n/**\n * Read a git object directly by its SHA-1 object id\n *\n * Regarding `GitObjectDescription`:\n *\n * - `oid` will be the same as the `oid` argument unless the `filepath` argument is provided, in which case it will be the oid of the tree or blob being returned.\n * - `type` is not included for 'deflated' and 'wrapped' formatted objects because you likely don't care or plan to decode that information yourself.\n * - `format` is usually, but not always, the format you requested. Packfiles do not store each object individually compressed so if you end up reading the object from a packfile it will be returned in format 'content' even if you requested 'deflated' or 'wrapped'.\n * - `object` will be an actual Object if format is 'parsed' and the object is a commit, tree, or annotated tag. Blobs are still formatted as Buffers unless an encoding is provided in which case they'll be strings. If format is anything other than 'parsed', object will be a Buffer.\n * - `source` is the name of the packfile or loose object file where the object was found.\n *\n * The `format` parameter can have the following values:\n *\n * | param | description |\n * | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | 'deflated' | Return the raw deflate-compressed buffer for an object if possible. Useful for efficiently shuffling around loose objects when you don't care about the contents and can save time by not inflating them. |\n * | 'wrapped' | Return the inflated object buffer wrapped in the git object header if possible. This is the raw data used when calculating the SHA-1 object id of a git object. |\n * | 'content' | Return the object buffer without the git header. |\n * | 'parsed' | Returns a parsed representation of the object. |\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.oid - The SHA-1 object id to get\n * @param {'deflated' | 'wrapped' | 'content' | 'parsed'} [args.format = 'parsed'] - What format to return the object in. The choices are described in more detail below.\n * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the object at that filepath. To return the root directory of a tree set filepath to `''`\n * @param {string} [args.encoding] - A convenience argument that only affects blobs. Instead of returning `object` as a buffer, it returns a string parsed using the given encoding.\n *\n * @returns {Promise} Resolves successfully with a git object description\n * @see GitObjectDescription\n *\n * @example\n * // Get the contents of 'README.md' in the master branch.\n * let sha = await git.resolveRef({ dir: '$input((/))', ref: '$input((master))' })\n * console.log(sha)\n * let { object: blob } = await git.readObject({\n * dir: '$input((/))',\n * oid: $input((sha)),\n * $textarea((filepath: 'README.md',\n * encoding: 'utf8'))\n * })\n * console.log(blob)\n *\n * @example\n * // Find all the .js files in the current master branch containing the word 'commit'\n * let sha = await git.resolveRef({ dir: '$input((/))', ref: '$input((master))' })\n * console.log(sha)\n * let { object: commit } = await git.readObject({ dir: '$input((/))', oid: sha })\n * console.log(commit)\n *\n * const searchTree = async ({oid, prefix = ''}) => {\n * let { object: tree } = await git.readObject({ dir: '$input((/))', oid })\n * for (let entry of tree.entries) {\n * if (entry.type === 'tree') {\n * await searchTree({oid: entry.oid, prefix: `${prefix}/${entry.path}`})\n * } else if (entry.type === 'blob') {\n * if ($input((entry.path.endsWith('.js')))) {\n * let { object: blob } = await git.readObject({ dir: '$input((/))', oid: entry.oid })\n * if ($input((blob.toString('utf8').includes('commit')))) {\n * console.log(`${prefix}/${entry.path}`)\n * }\n * }\n * }\n * }\n * }\n *\n * await searchTree({oid: commit.tree})\n * console.log('done')\n *\n */\nexport async function readObject ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n oid,\n format = 'parsed',\n filepath = undefined,\n encoding = undefined\n}) {\n try {\n const fs = new FileSystem(_fs)\n if (filepath !== undefined) {\n // Ensure there are no leading or trailing directory separators.\n // I was going to do this automatically, but then found that the Git Terminal for Windows\n // auto-expands --filepath=/src/utils to --filepath=C:/Users/Will/AppData/Local/Programs/Git/src/utils\n // so I figured it would be wise to promote the behavior in the application layer not just the library layer.\n if (filepath.startsWith('/') || filepath.endsWith('/')) {\n throw new GitError(E.DirectorySeparatorsError)\n }\n const _oid = oid\n let result = await resolveTree({ fs, gitdir, oid })\n let tree = result.tree\n if (filepath === '') {\n oid = result.oid\n } else {\n let pathArray = filepath.split('/')\n oid = await resolveFile({\n fs,\n gitdir,\n tree,\n pathArray,\n oid: _oid,\n filepath\n })\n }\n }\n // GitObjectManager does not know how to parse content, so we tweak that parameter before passing it.\n const _format = format === 'parsed' ? 'content' : format\n let result = await _readObject({\n fs,\n gitdir,\n oid,\n format: _format\n })\n result.oid = oid\n if (format === 'parsed') {\n result.format = 'parsed'\n switch (result.type) {\n case 'commit':\n result.object = GitCommit.from(result.object).parse()\n break\n case 'tree':\n result.object = { entries: GitTree.from(result.object).entries() }\n break\n case 'blob':\n // Here we consider returning a raw Buffer as the 'content' format\n // and returning a string as the 'parsed' format\n if (encoding) {\n result.object = result.object.toString(encoding)\n } else {\n result.format = 'content'\n }\n break\n case 'tag':\n result.object = GitAnnotatedTag.from(result.object).parse()\n break\n default:\n throw new GitError(E.ObjectTypeUnknownFail, { type: result.type })\n }\n }\n // @ts-ignore\n return result\n } catch (err) {\n err.caller = 'git.readObject'\n throw err\n }\n}\n\nasync function resolveFile ({ fs, gitdir, tree, pathArray, oid, filepath }) {\n let name = pathArray.shift()\n for (let entry of tree) {\n if (entry.path === name) {\n if (pathArray.length === 0) {\n return entry.oid\n } else {\n let { type, object } = await _readObject({\n fs,\n gitdir,\n oid: entry.oid\n })\n if (type === 'blob') {\n throw new GitError(E.DirectoryIsAFileError, { oid, filepath })\n }\n if (type !== 'tree') {\n throw new GitError(E.ObjectTypeAssertionInTreeFail, {\n oid: entry.oid,\n entrypath: filepath,\n type\n })\n }\n tree = GitTree.from(object)\n return resolveFile({ fs, gitdir, tree, pathArray, oid, filepath })\n }\n }\n }\n throw new GitError(E.TreeOrBlobNotFoundError, { oid, filepath })\n}\n","// @ts-check\nimport { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { join } from '../utils/join'\nimport { cores } from '../utils/plugins.js'\n\nimport { readObject } from './readObject'\n\n/**\n * List all the files in the git index or a commit\n *\n * > Note: This function is efficient for listing the files in the staging area, but listing all the files in a commit requires recursively walking through the git object store.\n * > If you do not require a complete list of every file, better can be achieved by using [readObject](./readObject.html) directly and ignoring subdirectories you don't care about.\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ref] - Return a list of all the files in the commit at `ref` instead of the files currently in the git index (aka staging area)\n *\n * @returns {Promise>} Resolves successfully with an array of filepaths\n *\n * @example\n * // All the files in the previous commit\n * let files = await git.listFiles({ dir: '$input((/))', ref: '$input((HEAD))' })\n * console.log(files)\n * // All the files in the current staging area\n * files = await git.listFiles({ dir: '$input((/))' })\n * console.log(files)\n *\n */\nexport async function listFiles ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n ref\n}) {\n try {\n const fs = new FileSystem(_fs)\n let filenames\n if (ref) {\n const oid = await GitRefManager.resolve({ gitdir, fs, ref })\n filenames = []\n await accumulateFilesFromOid({ gitdir, fs, oid, filenames, prefix: '' })\n } else {\n await GitIndexManager.acquire(\n { fs, filepath: `${gitdir}/index` },\n async function (index) {\n filenames = index.entries.map(x => x.path)\n }\n )\n }\n return filenames\n } catch (err) {\n err.caller = 'git.listFiles'\n throw err\n }\n}\n\nasync function accumulateFilesFromOid ({ gitdir, fs, oid, filenames, prefix }) {\n const { object } = await readObject({ gitdir, fs, oid, filepath: '' })\n // Note: this isn't parallelized because I'm too lazy to figure that out right now\n // @ts-ignore\n for (const entry of object.entries) {\n if (entry.type === 'tree') {\n await accumulateFilesFromOid({\n gitdir,\n fs,\n oid: entry.oid,\n filenames,\n prefix: join(prefix, entry.path)\n })\n } else {\n filenames.push(join(prefix, entry.path))\n }\n }\n}\n","// @ts-check\nimport { GitConfigManager } from '../managers/GitConfigManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * List remotes\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n *\n * @returns {Promise>} Resolves successfully with an array of `{remote, url}` objects\n *\n * @example\n * let remotes = await git.listRemotes({ dir: '$input((/))' })\n * console.log(remotes)\n *\n */\nexport async function listRemotes ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs')\n}) {\n try {\n const fs = new FileSystem(_fs)\n const config = await GitConfigManager.get({ fs, gitdir })\n const remoteNames = await config.getSubsections('remote')\n const remotes = Promise.all(\n remoteNames.map(async remote => {\n const url = await config.get(`remote.${remote}.url`)\n return { remote, url }\n })\n )\n return remotes\n } catch (err) {\n err.caller = 'git.listRemotes'\n throw err\n }\n}\n","// @ts-check\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * List tags\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n *\n * @returns {Promise>} Resolves successfully with an array of tag names\n *\n * @example\n * let tags = await git.listTags({ dir: '$input((/))' })\n * console.log(tags)\n *\n */\nexport async function listTags ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs')\n}) {\n try {\n const fs = new FileSystem(_fs)\n return GitRefManager.listTags({ fs, gitdir })\n } catch (err) {\n err.caller = 'git.listTags'\n throw err\n }\n}\n","export function compareAge (a, b) {\n return a.committer.timestamp - b.committer.timestamp\n}\n","import { GitCommit } from '../models/GitCommit.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { readObject } from '../storage/readObject.js'\n\nexport async function logCommit ({ fs, gitdir, oid, signing }) {\n try {\n let { type, object } = await readObject({ fs, gitdir, oid })\n if (type !== 'commit') {\n throw new GitError(E.ObjectTypeAssertionFail, {\n oid,\n expected: 'commit',\n type\n })\n }\n const commit = GitCommit.from(object)\n const result = Object.assign({ oid }, commit.parse())\n if (signing) {\n result.payload = commit.withoutSignature()\n }\n return result\n } catch (err) {\n return {\n oid,\n error: err\n }\n }\n}\n","// @ts-check\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { GitShallowManager } from '../managers/GitShallowManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { compareAge } from '../utils/compareAge.js'\nimport { join } from '../utils/join.js'\nimport { logCommit } from '../utils/logCommit.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n *\n * @typedef {Object} CommitDescription - Returns an array of objects with a schema like this:\n * @property {string} oid - SHA-1 object id of this commit\n * @property {string} message - Commit message\n * @property {string} tree - SHA-1 object id of corresponding file tree\n * @property {string[]} parent - an array of zero or more SHA-1 object ids\n * @property {Object} author\n * @property {string} author.name - The author's name\n * @property {string} author.email - The author's email\n * @property {number} author.timestamp - UTC Unix timestamp in seconds\n * @property {number} author.timezoneOffset - Timezone difference from UTC in minutes\n * @property {Object} committer\n * @property {string} committer.name - The committer's name\n * @property {string} committer.email - The committer's email\n * @property {number} committer.timestamp - UTC Unix timestamp in seconds\n * @property {number} committer.timezoneOffset - Timezone difference from UTC in minutes\n * @property {string} [gpgsig] - PGP signature (if present)\n * @property {string} [payload] - PGP signing payload (if requested)\n */\n\n/**\n * Get commit descriptions from the git history\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ref = 'HEAD'] - The commit to begin walking backwards through the history from\n * @param {number} [args.depth] - Limit the number of commits returned. No limit by default.\n * @param {Date} [args.since] - Return history newer than the given date. Can be combined with `depth` to get whichever is shorter.\n * @param {boolean} [args.signing = false] - Include the PGP signing payload\n *\n * @returns {Promise>} Resolves to an array of CommitDescription objects\n * @see CommitDescription\n *\n * @example\n * let commits = await git.log({ dir: '$input((/))', depth: $input((5)), ref: '$input((master))' })\n * console.log(commits)\n *\n */\nexport async function log ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n ref = 'HEAD',\n depth = undefined,\n since = undefined, // Date\n signing = false\n}) {\n try {\n const fs = new FileSystem(_fs)\n let sinceTimestamp =\n since === undefined ? undefined : Math.floor(since.valueOf() / 1000)\n // TODO: In the future, we may want to have an API where we return a\n // async iterator that emits commits.\n let commits = []\n let shallowCommits = await GitShallowManager.read({ fs, gitdir })\n let oid = await GitRefManager.resolve({ fs, gitdir, ref })\n let tips /*: Array */ = [await logCommit({ fs, gitdir, oid, signing })]\n\n while (true) {\n let commit = tips.pop()\n\n // Stop the loop if we encounter an error\n if (commit.error) {\n commits.push(commit)\n break\n }\n\n // Stop the log if we've hit the age limit\n if (\n sinceTimestamp !== undefined &&\n commit.committer.timestamp <= sinceTimestamp\n ) {\n break\n }\n\n commits.push(commit)\n\n // Stop the loop if we have enough commits now.\n if (depth !== undefined && commits.length === depth) break\n\n // If this is not a shallow commit...\n if (!shallowCommits.has(commit.oid)) {\n // Add the parents of this commit to the queue\n // Note: for the case of a commit with no parents, it will concat an empty array, having no net effect.\n for (const oid of commit.parent) {\n let commit = await logCommit({ fs, gitdir, oid, signing })\n if (!tips.map(commit => commit.oid).includes(commit.oid)) {\n tips.push(commit)\n }\n }\n }\n\n // Stop the loop if there are no more commit parents\n if (tips.length === 0) break\n\n // Process tips in order by age\n tips.sort(compareAge)\n }\n // @ts-ignore\n return commits\n } catch (err) {\n err.caller = 'git.log'\n throw err\n }\n}\n","// @ts-check\n// import diff3 from 'node-diff3'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\nimport { currentBranch } from './currentBranch.js'\nimport { log } from './log'\n\n/**\n *\n * @typedef {Object} MergeReport - Returns an object with a schema like this:\n * @property {string} oid - The SHA-1 object id that is now at the head of the branch\n * @property {boolean} [alreadyMerged] - True if the branch was already merged so no changes were made\n * @property {boolean} [fastForward] - True if it was a fast-forward merge\n *\n */\n\n/**\n * Merge one or more branches *(Currently, only fast-forward merges are implemented.)*\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ours] - The branch receiving the merge. If undefined, defaults to the current branch.\n * @param {string} args.theirs - The branch to be merged\n * @param {boolean} [args.fastForwardOnly = false] - If true, then non-fast-forward merges will throw an Error instead of performing a merge.\n *\n * @returns {Promise} Resolves to a description of the merge operation\n * @see MergeReport\n *\n * @example\n * let m = await git.merge({ dir: '$input((/))', ours: '$input((master))', theirs: '$input((remotes/origin/master))' })\n * console.log(m)\n *\n */\nexport async function merge ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n ours,\n theirs,\n fastForwardOnly\n}) {\n try {\n const fs = new FileSystem(_fs)\n if (ours === undefined) {\n ours = await currentBranch({ fs, gitdir, fullname: true })\n }\n ours = await GitRefManager.expand({\n fs,\n gitdir,\n ref: ours\n })\n theirs = await GitRefManager.expand({\n fs,\n gitdir,\n ref: theirs\n })\n let ourOid = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: ours\n })\n let theirOid = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: theirs\n })\n // find most recent common ancestor of ref a and ref b\n let baseOid = await findMergeBase({ gitdir, fs, refs: [ourOid, theirOid] })\n // handle fast-forward case\n if (baseOid === theirOid) {\n return {\n oid: ourOid,\n alreadyMerged: true\n }\n }\n if (baseOid === ourOid) {\n await GitRefManager.writeRef({ fs, gitdir, ref: ours, value: theirOid })\n return {\n oid: theirOid,\n fastForward: true\n }\n } else {\n // not a simple fast-forward\n if (fastForwardOnly) {\n throw new GitError(E.FastForwardFail)\n }\n throw new GitError(E.MergeNotSupportedFail)\n }\n } catch (err) {\n err.caller = 'git.merge'\n throw err\n }\n}\n\nfunction compareAge (a, b) {\n return a.committer.timestamp - b.committer.timestamp\n}\n\nasync function findMergeBase ({ gitdir, fs, refs }) {\n // Where is async flatMap when you need it?\n let commits = []\n for (const ref of refs) {\n let list = await log({ gitdir, fs, ref, depth: 1 })\n commits.push(list[0])\n }\n // Are they actually the same commit?\n if (commits.every(commit => commit.oid === commits[0].oid)) {\n return commits[0].oid\n }\n // Is the oldest commit an ancestor of the others?\n let sorted = commits.sort(compareAge)\n let candidate = sorted[0]\n let since = new Date(candidate.author.timestamp - 1)\n for (const ref of refs) {\n let list = await log({ gitdir, fs, ref, since })\n if (!list.find(commit => commit.oid === candidate.oid)) {\n candidate = null\n break\n }\n }\n if (candidate) return candidate.oid\n // Is...\n throw new GitError(E.MergeNotSupportedFail)\n}\n","// @ts-check\nimport { FileSystem } from '../models/FileSystem.js'\nimport { collect } from '../utils/collect.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\nimport { pack } from './pack'\n\n/**\n *\n * @typedef {Object} PackObjectsResponse The packObjects command returns an object with two properties:\n * @property {string} filename - The suggested filename for the packfile if you want to save it to disk somewhere. It includes the packfile SHA.\n * @property {Buffer} [packfile] - The packfile contents. Not present if `write` parameter was true, in which case the packfile was written straight to disk.\n */\n\n/**\n * Create a packfile from an array of SHA-1 object ids\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string[]} args.oids - An array of SHA-1 object ids to be included in the packfile\n * @param {boolean} [args.write = false] - Whether to save the packfile to disk or not\n *\n * @returns {Promise} Resolves successfully when the packfile is ready with the filename and buffer\n * @see PackObjectsResponse\n *\n * @example\n * // Create a packfile containing only an empty tree\n * let { packfile } = await git.packObjects({\n * dir: '$input((/))',\n * oids: [$input(('4b825dc642cb6eb9a060e54bf8d69288fbee4904'))]\n * })\n * console.log(packfile)\n *\n */\nexport async function packObjects ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n oids,\n write = false\n}) {\n try {\n const fs = new FileSystem(_fs)\n const buffers = await pack({ core, gitdir, fs, oids })\n let packfile = await collect(buffers)\n let packfileSha = packfile.slice(-20).toString('hex')\n let filename = `pack-${packfileSha}.pack`\n if (write) {\n await fs.write(join(gitdir, `objects/pack/${filename}`), packfile)\n return { filename }\n }\n return {\n filename,\n packfile\n }\n } catch (err) {\n err.caller = 'git.packObjects'\n throw err\n }\n}\n","// @ts-check\n// import diff3 from 'node-diff3'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\nimport { checkout } from './checkout'\nimport { config } from './config'\nimport { currentBranch } from './currentBranch'\nimport { fetch } from './fetch'\nimport { merge } from './merge'\n\n/**\n * Fetch and merge commits from a remote repository *(Currently, only fast-forward merges are implemented.)*\n *\n * To monitor progress events, see the documentation for the [`'emitter'` plugin](./plugin_emitter.md).\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ref] - Which branch to fetch. By default this is the currently checked out branch.\n * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch.\n * @param {boolean} [args.fastForwardOnly = false] - Only perform simple fast-forward merges. (Don't create merge commits.)\n * @param {boolean} [args.noGitSuffix = false] - If true, do not auto-append a `.git` suffix to the `url`. (**AWS CodeCommit needs this option**)\n * @param {string} [args.username] - See the [Authentication](./authentication.html) documentation\n * @param {string} [args.password] - See the [Authentication](./authentication.html) documentation\n * @param {string} [args.token] - See the [Authentication](./authentication.html) documentation\n * @param {string} [args.oauth2format] - See the [Authentication](./authentication.html) documentation\n * @param {object} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config\n * @param {import('events').EventEmitter} [args.emitter] - [deprecated] Overrides the emitter set via the ['emitter' plugin](./plugin_emitter.md).\n * @param {string} [args.emitterPrefix = ''] - Scope emitted events by prepending `emitterPrefix` to the event name.\n *\n * @returns {Promise} Resolves successfully when pull operation completes\n *\n * @example\n * await git.pull({\n * dir: '$input((/))',\n * ref: '$input((master))',\n * singleBranch: $input((true))\n * })\n * console.log('done')\n *\n */\nexport async function pull ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n ref,\n fastForwardOnly = false,\n noGitSuffix = false,\n emitter = cores.get(core).get('emitter'),\n emitterPrefix = '',\n // @ts-ignore\n authUsername,\n // @ts-ignore\n authPassword,\n username = authUsername,\n password = authPassword,\n token,\n oauth2format,\n singleBranch,\n headers = {}\n}) {\n try {\n const fs = new FileSystem(_fs)\n // If ref is undefined, use 'HEAD'\n if (!ref) {\n ref = await currentBranch({ fs, gitdir })\n }\n // Fetch from the correct remote.\n let remote = await config({\n gitdir,\n fs,\n path: `branch.${ref}.remote`\n })\n let { fetchHead } = await fetch({\n dir,\n gitdir,\n fs,\n emitter,\n emitterPrefix,\n noGitSuffix,\n ref,\n remote,\n username,\n password,\n token,\n oauth2format,\n singleBranch,\n headers\n })\n // Merge the remote tracking branch into the local one.\n await merge({\n gitdir,\n fs,\n ours: ref,\n theirs: fetchHead,\n fastForwardOnly\n })\n await checkout({\n dir,\n gitdir,\n fs,\n ref,\n emitter,\n emitterPrefix\n })\n } catch (err) {\n err.caller = 'git.pull'\n throw err\n }\n}\n","// @ts-check\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { GitRemoteManager } from '../managers/GitRemoteManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { GitSideBand } from '../models/GitSideBand.js'\nimport { filterCapabilities } from '../utils/filterCapabilities.js'\nimport { forAwait } from '../utils/forAwait.js'\nimport { join } from '../utils/join.js'\nimport { pkg } from '../utils/pkg.js'\nimport { cores } from '../utils/plugins.js'\nimport { splitLines } from '../utils/splitLines.js'\nimport { parseReceivePackResponse } from '../wire/parseReceivePackResponse.js'\nimport { writeReceivePackRequest } from '../wire/writeReceivePackRequest.js'\n\nimport { config } from './config.js'\nimport { findMergeBase } from './findMergeBase.js'\nimport { isDescendent } from './isDescendent.js'\nimport { listCommitsAndTags } from './listCommitsAndTags.js'\nimport { listObjects } from './listObjects.js'\nimport { pack } from './pack.js'\n\n/**\n *\n * @typedef {Object} PushResponse - Returns an object with a schema like this:\n * @property {string[]} [ok]\n * @property {string[]} [errors]\n * @property {object} [headers]\n *\n */\n\n/**\n * Push a branch or tag\n *\n * > *Note:* The behavior of `remoteRef` is reasonable but not the _correct_ behavior. It _should_ be using the configured remote tracking branch! TODO: I need to fix this\n *\n * The push command returns an object that describes the result of the attempted push operation.\n * *Notes:* If there were no errors, then there will be no `errors` property. There can be a mix of `ok` messages and `errors` messages.\n *\n * | param | type [= default] | description |\n * | ------ | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | ok | Array\\ | The first item is \"unpack\" if the overall operation was successful. The remaining items are the names of refs that were updated successfully. |\n * | errors | Array\\ | If the overall operation threw and error, the first item will be \"unpack {Overall error message}\". The remaining items are individual refs that failed to be updated in the format \"{ref name} {error message}\". |\n *\n * To monitor progress events, see the documentation for the [`'emitter'` plugin](./plugin_emitter.md).\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ref] - Which branch to push. By default this is the currently checked out branch.\n * @param {string} [args.remoteRef] - The name of the receiving branch on the remote. By default this is the same as `ref`. (See note below)\n * @param {string} [args.remote] - If URL is not specified, determines which remote to use.\n * @param {boolean} [args.force = false] - If true, behaves the same as `git push --force`\n * @param {boolean} [args.noGitSuffix = false] - If true, do not auto-append a `.git` suffix to the `url`. (**AWS CodeCommit needs this option**)\n * @param {string} [args.url] - The URL of the remote git server. The default is the value set in the git config for that remote.\n * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config.\n * @param {string} [args.username] - See the [Authentication](./authentication.html) documentation\n * @param {string} [args.password] - See the [Authentication](./authentication.html) documentation\n * @param {string} [args.token] - See the [Authentication](./authentication.html) documentation\n * @param {string} [args.oauth2format] - See the [Authentication](./authentication.html) documentation\n * @param {object} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config\n * @param {import('events').EventEmitter} [args.emitter] - [deprecated] Overrides the emitter set via the ['emitter' plugin](./plugin_emitter.md).\n * @param {string} [args.emitterPrefix = ''] - Scope emitted events by prepending `emitterPrefix` to the event name.\n *\n * @returns {Promise} Resolves successfully when push completes with a detailed description of the operation from the server.\n * @see PushResponse\n *\n * @example\n * let pushResponse = await git.push({\n * dir: '$input((/))',\n * remote: '$input((origin))',\n * ref: '$input((master))',\n * token: $input((process.env.GITHUB_TOKEN)),\n * })\n * console.log(pushResponse)\n *\n */\nexport async function push ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n emitter = cores.get(core).get('emitter'),\n emitterPrefix = '',\n ref,\n remoteRef,\n remote = 'origin',\n url,\n force = false,\n noGitSuffix = false,\n corsProxy,\n // @ts-ignore\n authUsername,\n // @ts-ignore\n authPassword,\n username = authUsername,\n password = authPassword,\n token,\n oauth2format,\n headers = {}\n}) {\n try {\n const fs = new FileSystem(_fs)\n // TODO: Figure out how pushing tags works. (This only works for branches.)\n if (url === undefined) {\n url = await config({ fs, gitdir, path: `remote.${remote}.url` })\n }\n if (corsProxy === undefined) {\n corsProxy = await config({ fs, gitdir, path: 'http.corsProxy' })\n }\n let fullRef\n if (!ref) {\n fullRef = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: 'HEAD',\n depth: 2\n })\n } else {\n fullRef = await GitRefManager.expand({ fs, gitdir, ref })\n }\n let oid = await GitRefManager.resolve({ fs, gitdir, ref: fullRef })\n let auth = { username, password, token, oauth2format }\n let GitRemoteHTTP = GitRemoteManager.getRemoteHelperFor({ url })\n const httpRemote = await GitRemoteHTTP.discover({\n core,\n corsProxy,\n service: 'git-receive-pack',\n url,\n noGitSuffix,\n auth,\n headers\n })\n auth = httpRemote.auth // hack to get new credentials from CredentialManager API\n let fullRemoteRef\n if (!remoteRef) {\n fullRemoteRef = fullRef\n } else {\n try {\n fullRemoteRef = await GitRefManager.expandAgainstMap({\n ref: remoteRef,\n map: httpRemote.refs\n })\n } catch (err) {\n if (err.code === E.ExpandRefError) {\n // The remote reference doesn't exist yet.\n // If it is fully specified, use that value. Otherwise, treat it as a branch.\n fullRemoteRef = remoteRef.startsWith('refs/')\n ? remoteRef\n : `refs/heads/${remoteRef}`\n } else {\n throw err\n }\n }\n }\n let oldoid =\n httpRemote.refs.get(fullRemoteRef) ||\n '0000000000000000000000000000000000000000'\n let finish = [...httpRemote.refs.values()]\n // hack to speed up common force push scenarios\n // @ts-ignore\n let mergebase = await findMergeBase({ fs, gitdir, oids: [oid, oldoid] })\n for (let oid of mergebase) finish.push(oid)\n // @ts-ignore\n let commits = await listCommitsAndTags({\n fs,\n gitdir,\n start: [oid],\n finish\n })\n // @ts-ignore\n let objects = await listObjects({ fs, gitdir, oids: commits })\n if (!force) {\n // Is it a tag that already exists?\n if (\n fullRef.startsWith('refs/tags') &&\n oldoid !== '0000000000000000000000000000000000000000'\n ) {\n throw new GitError(E.PushRejectedTagExists, {})\n }\n // Is it a non-fast-forward commit?\n if (\n oid !== '0000000000000000000000000000000000000000' &&\n oldoid !== '0000000000000000000000000000000000000000' &&\n !(await isDescendent({ fs, gitdir, oid, ancestor: oldoid }))\n ) {\n throw new GitError(E.PushRejectedNonFastForward, {})\n }\n }\n // We can only safely use capabilities that the server also understands.\n // For instance, AWS CodeCommit aborts a push if you include the `agent`!!!\n const capabilities = filterCapabilities(\n [...httpRemote.capabilities],\n ['report-status', 'side-band-64k', `agent=${pkg.agent}`]\n )\n let packstream1 = await writeReceivePackRequest({\n capabilities,\n triplets: [{ oldoid, oid, fullRef: fullRemoteRef }]\n })\n let packstream2 = await pack({\n fs,\n gitdir,\n oids: [...objects]\n })\n let res = await GitRemoteHTTP.connect({\n core,\n emitter,\n emitterPrefix,\n corsProxy,\n service: 'git-receive-pack',\n url,\n noGitSuffix,\n auth,\n headers,\n body: [...packstream1, ...packstream2]\n })\n let { packfile, progress } = await GitSideBand.demux(res.body)\n if (emitter) {\n let lines = splitLines(progress)\n forAwait(lines, line => {\n emitter.emit(`${emitterPrefix}message`, line)\n })\n }\n // Parse the response!\n let result = await parseReceivePackResponse(packfile)\n if (res.headers) {\n result.headers = res.headers\n }\n return result\n } catch (err) {\n err.caller = 'git.push'\n throw err\n }\n}\n","// @ts-check\nimport { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Remove a file from the git index (aka staging area)\n *\n * Note that this does NOT delete the file in the working directory.\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.filepath - The path to the file to remove from the index\n *\n * @returns {Promise} Resolves successfully once the git index has been updated\n *\n * @example\n * await git.remove({ dir: '$input((/))', filepath: '$input((README.md))' })\n * console.log('done')\n *\n */\nexport async function remove ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n filepath\n}) {\n try {\n const fs = new FileSystem(_fs)\n await GitIndexManager.acquire(\n { fs, filepath: `${gitdir}/index` },\n async function (index) {\n index.delete({ filepath })\n }\n )\n // TODO: return oid?\n } catch (err) {\n err.caller = 'git.remove'\n throw err\n }\n}\n","import { GitObject } from '../models/GitObject.js'\nimport { shasum } from '../utils/shasum.js'\n\nexport async function hashObject ({ gitdir, type, object }) {\n return shasum(GitObject.wrap({ type, object }))\n}\n","// @ts-check\nimport { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { hashObject } from '../utils/hashObject.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\nimport { readObject } from './readObject.js'\n\n/**\n * Reset a file in the git index (aka staging area)\n *\n * Note that this does NOT modify the file in the working directory.\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.filepath - The path to the file to reset in the index\n * @param {string} [args.ref = 'HEAD'] - A ref to the commit to use\n *\n * @returns {Promise} Resolves successfully once the git index has been updated\n *\n * @example\n * await git.resetIndex({ dir: '$input((/))', filepath: '$input((README.md))' })\n * console.log('done')\n *\n */\nexport async function resetIndex ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n filepath,\n ref = 'HEAD'\n}) {\n try {\n const fs = new FileSystem(_fs)\n // Resolve commit\n let oid = await GitRefManager.resolve({ fs, gitdir, ref })\n let workdirOid\n try {\n // Resolve blob\n const obj = await readObject({\n gitdir,\n fs,\n oid,\n filepath,\n format: 'deflated'\n })\n oid = obj && obj.oid\n } catch (e) {\n // This means we're resetting the file to a \"deleted\" state\n oid = null\n }\n // For files that aren't in the workdir use zeros\n let stats = {\n ctime: new Date(0),\n mtime: new Date(0),\n dev: 0,\n ino: 0,\n mode: 0,\n uid: 0,\n gid: 0,\n size: 0\n }\n // If the file exists in the workdir...\n const object = dir && (await fs.read(join(dir, filepath)))\n if (object) {\n // ... and has the same hash as the desired state...\n workdirOid = await hashObject({\n gitdir,\n type: 'blob',\n object\n })\n if (oid === workdirOid) {\n // ... use the workdir Stats object\n stats = await fs.lstat(join(dir, filepath))\n }\n }\n await GitIndexManager.acquire(\n { fs, filepath: `${gitdir}/index` },\n async function (index) {\n index.delete({ filepath })\n if (oid) {\n index.insert({ filepath, stats, oid })\n }\n }\n )\n } catch (err) {\n err.caller = 'git.reset'\n throw err\n }\n}\n","// @ts-check\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Get the value of a symbolic ref or resolve a ref to its SHA-1 object id\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The ref to resolve\n * @param {number} [args.depth = undefined] - How many symbolic references to follow before returning\n *\n * @returns {Promise} Resolves successfully with a SHA-1 object id or the value of a symbolic ref\n *\n * @example\n * let currentCommit = await git.resolveRef({ dir: '$input((/))', ref: '$input((HEAD))' })\n * console.log(currentCommit)\n * let currentBranch = await git.resolveRef({ dir: '$input((/))', ref: '$input((HEAD))', depth: $input((2)) })\n * console.log(currentBranch)\n *\n */\nexport async function resolveRef ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n ref,\n depth\n}) {\n try {\n const fs = new FileSystem(_fs)\n const oid = await GitRefManager.resolve({\n fs,\n gitdir,\n ref,\n depth\n })\n return oid\n } catch (err) {\n err.caller = 'git.resolveRef'\n throw err\n }\n}\n","// @ts-check\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { SignedGitCommit } from '../models/SignedGitCommit.js'\nimport { readObject } from '../storage/readObject.js'\nimport { writeObject } from '../storage/writeObject.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Create a signed commit\n *\n * \n *\n * It creates a signed version of whatever commit HEAD currently points to, and then updates the current branch,\n * leaving the original commit dangling.\n *\n * The `privateKeys` argument is a single string in ASCII armor format. However, it is plural \"keys\" because\n * you can technically have multiple private keys in a single ASCII armor string. The openpgp.sign() function accepts\n * multiple keys, so while I haven't tested it, it should support signing a single commit with multiple keys.\n *\n * @deprecated\n * > **Deprecated**\n * > This command will be removed in the 1.0.0 version of `isomorphic-git` as it is no longer necessary.\n * >\n * > Previously, to sign commits you needed two steps, `commit` and then `sign`.\n * > Now commits can be signed when they are created with the [`commit`](./commit.md) command, provided you use a [`pgp`](./plugin_pgp.md) plugin.\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.openpgp - An instance of the [OpenPGP library](https://unpkg.com/openpgp%402.6.2)\n * @param {string} args.privateKeys - A PGP private key in ASCII armor format\n *\n * @returns {Promise} Resolves successfully when filesystem operations are completed\n *\n * @example\n * let sha = await git.sign({\n * dir: '$input((/))',\n * openpgp,\n * privateKeys: `$textarea((\n * -----BEGIN PGP PRIVATE KEY BLOCK-----\n * ...\n * ))`\n * })\n * console.log(sha)\n *\n */\nexport async function sign ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n privateKeys,\n openpgp\n}) {\n try {\n const fs = new FileSystem(_fs)\n const oid = await GitRefManager.resolve({ fs, gitdir, ref: 'HEAD' })\n const { type, object } = await readObject({ fs, gitdir, oid })\n if (type !== 'commit') {\n throw new GitError(E.ObjectTypeAssertionInRefFail, {\n expected: 'commit',\n ref: 'HEAD',\n type\n })\n }\n let commit\n if (openpgp) {\n // Old API\n commit = SignedGitCommit.from(object)\n commit = await commit.sign(openpgp, privateKeys)\n } else {\n // Newer plugin API\n let pgp = cores.get(core).get('pgp')\n commit = GitCommit.from(object)\n commit = await GitCommit.sign(commit, pgp, privateKeys)\n }\n const newOid = await writeObject({\n fs,\n gitdir,\n type: 'commit',\n object: commit.toObject()\n })\n // Update branch pointer\n // TODO: Use an updateBranch function instead of this.\n const branch = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: 'HEAD',\n depth: 2\n })\n await fs.write(join(gitdir, branch), newOid + '\\n')\n } catch (err) {\n err.caller = 'git.sign'\n throw err\n }\n}\n","// @ts-check\nimport { GitIgnoreManager } from '../managers/GitIgnoreManager.js'\nimport { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { GitTree } from '../models/GitTree.js'\nimport { readObject } from '../storage/readObject.js'\nimport { compareStats } from '../utils/compareStats.js'\nimport { hashObject } from '../utils/hashObject.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Tell whether a file has been changed\n *\n * The possible resolve values are:\n *\n * | status | description |\n * | --------------- | ------------------------------------------------------------------------ |\n * | `\"ignored\"` | file ignored by a .gitignore rule |\n * | `\"unmodified\"` | file unchanged from HEAD commit |\n * | `\"*modified\"` | file has modifications, not yet staged |\n * | `\"*deleted\"` | file has been removed, but the removal is not yet staged |\n * | `\"*added\"` | file is untracked, not yet staged |\n * | `\"absent\"` | file not present in HEAD commit, staging area, or working dir |\n * | `\"modified\"` | file has modifications, staged |\n * | `\"deleted\"` | file has been removed, staged |\n * | `\"added\"` | previously untracked file, staged |\n * | `\"*unmodified\"` | working dir and HEAD commit match, but index differs |\n * | `\"*absent\"` | file not present in working dir or HEAD commit, but present in the index |\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.filepath - The path to the file to query\n *\n * @returns {Promise} Resolves successfully with the file's git status\n *\n * @example\n * let status = await git.status({ dir: '$input((/))', filepath: '$input((README.md))' })\n * console.log(status)\n *\n */\nexport async function status ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n filepath\n}) {\n try {\n const fs = new FileSystem(_fs)\n let ignored = await GitIgnoreManager.isIgnored({\n gitdir,\n dir,\n filepath,\n fs\n })\n if (ignored) {\n return 'ignored'\n }\n let headTree = await getHeadTree({ fs, gitdir })\n let treeOid = await getOidAtPath({\n fs,\n gitdir,\n tree: headTree,\n path: filepath\n })\n let indexEntry = null\n // Acquire a lock on the index\n await GitIndexManager.acquire(\n { fs, filepath: `${gitdir}/index` },\n async function (index) {\n for (let entry of index) {\n if (entry.path === filepath) {\n indexEntry = entry\n break\n }\n }\n }\n )\n let stats = await fs.lstat(join(dir, filepath))\n\n let H = treeOid !== null // head\n let I = indexEntry !== null // index\n let W = stats !== null // working dir\n\n const getWorkdirOid = async () => {\n if (I && !compareStats(indexEntry, stats)) {\n return indexEntry.oid\n } else {\n let object = await fs.read(join(dir, filepath))\n let workdirOid = await hashObject({\n gitdir,\n type: 'blob',\n object\n })\n // If the oid in the index === working dir oid but stats differed update cache\n if (I && indexEntry.oid === workdirOid) {\n // and as long as our fs.stats aren't bad.\n // size of -1 happens over a BrowserFS HTTP Backend that doesn't serve Content-Length headers\n // (like the Karma webserver) because BrowserFS HTTP Backend uses HTTP HEAD requests to do fs.stat\n if (stats.size !== -1) {\n // We don't await this so we can return faster for one-off cases.\n GitIndexManager.acquire(\n { fs, filepath: `${gitdir}/index` },\n async function (index) {\n index.insert({ filepath, stats, oid: workdirOid })\n }\n )\n }\n }\n return workdirOid\n }\n }\n\n if (!H && !W && !I) return 'absent' // ---\n if (!H && !W && I) return '*absent' // -A-\n if (!H && W && !I) return '*added' // --A\n if (!H && W && I) {\n let workdirOid = await getWorkdirOid()\n // @ts-ignore\n return workdirOid === indexEntry.oid ? 'added' : '*added' // -AA : -AB\n }\n if (H && !W && !I) return 'deleted' // A--\n if (H && !W && I) {\n // @ts-ignore\n return treeOid === indexEntry.oid ? '*deleted' : '*deleted' // AA- : AB-\n }\n if (H && W && !I) {\n let workdirOid = await getWorkdirOid()\n return workdirOid === treeOid ? '*undeleted' : '*undeletemodified' // A-A : A-B\n }\n if (H && W && I) {\n let workdirOid = await getWorkdirOid()\n if (workdirOid === treeOid) {\n // @ts-ignore\n return workdirOid === indexEntry.oid ? 'unmodified' : '*unmodified' // AAA : ABA\n } else {\n // @ts-ignore\n return workdirOid === indexEntry.oid ? 'modified' : '*modified' // ABB : AAB\n }\n }\n /*\n ---\n -A-\n --A\n -AA\n -AB\n A--\n AA-\n AB-\n A-A\n A-B\n AAA\n ABA\n ABB\n AAB\n */\n } catch (err) {\n err.caller = 'git.status'\n throw err\n }\n}\n\nasync function getOidAtPath ({ fs, gitdir, tree, path }) {\n if (typeof path === 'string') path = path.split('/')\n let dirname = path.shift()\n for (let entry of tree) {\n if (entry.path === dirname) {\n if (path.length === 0) {\n return entry.oid\n }\n let { type, object } = await readObject({\n fs,\n gitdir,\n oid: entry.oid\n })\n if (type === 'tree') {\n let tree = GitTree.from(object)\n return getOidAtPath({ fs, gitdir, tree, path })\n }\n if (type === 'blob') {\n throw new GitError(E.ObjectTypeAssertionInPathFail, {\n oid: entry.oid,\n path: path.join('/')\n })\n }\n }\n }\n return null\n}\n\nasync function getHeadTree ({ fs, gitdir }) {\n // Get the tree from the HEAD commit.\n let oid = await GitRefManager.resolve({ fs, gitdir, ref: 'HEAD' })\n let { type, object } = await readObject({ fs, gitdir, oid })\n if (type !== 'commit') {\n throw new GitError(E.ResolveCommitError, { oid })\n }\n let commit = GitCommit.from(object)\n oid = commit.parseHeaders().tree\n return getTree({ fs, gitdir, oid })\n}\n\nasync function getTree ({ fs, gitdir, oid }) {\n let { type, object } = await readObject({\n fs,\n gitdir,\n oid\n })\n if (type !== 'tree') {\n throw new GitError(E.ResolveTreeError, { oid })\n }\n let tree = GitTree.from(object).entries()\n return tree\n}\n","import { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { compareStrings } from '../utils/compareStrings.js'\nimport { flatFileListToDirectoryStructure } from '../utils/flatFileListToDirectoryStructure.js'\nimport { normalizeStats } from '../utils/normalizeStats'\n\nimport { FileSystem } from './FileSystem.js'\n\nexport class GitWalkerIndex {\n constructor ({ fs: _fs, gitdir }) {\n const fs = new FileSystem(_fs)\n this.treePromise = (async () => {\n let result\n await GitIndexManager.acquire(\n { fs, filepath: `${gitdir}/index` },\n async function (index) {\n result = flatFileListToDirectoryStructure(index.entries)\n }\n )\n return result\n })()\n let walker = this\n this.ConstructEntry = class IndexEntry {\n constructor (entry) {\n Object.assign(this, entry)\n }\n async populateStat () {\n if (!this.exists) return\n await walker.populateStat(this)\n }\n async populateContent () {\n if (!this.exists) return\n await walker.populateContent(this)\n }\n async populateHash () {\n if (!this.exists) return\n await walker.populateHash(this)\n }\n }\n }\n async readdir (entry) {\n if (!entry.exists) return []\n let filepath = entry.fullpath\n let tree = await this.treePromise\n let inode = tree.get(filepath)\n if (!inode) return null\n if (inode.type === 'blob') return null\n if (inode.type !== 'tree') {\n throw new Error(`ENOTDIR: not a directory, scandir '${filepath}'`)\n }\n return inode.children\n .map(inode => ({\n fullpath: inode.fullpath,\n basename: inode.basename,\n exists: true\n // TODO: Figure out why flatFileListToDirectoryStructure is not returning children\n // sorted correctly for \"__tests__/__fixtures__/test-push.git\"\n }))\n .sort((a, b) => compareStrings(a.fullpath, b.fullpath))\n }\n async populateStat (entry) {\n let tree = await this.treePromise\n let inode = tree.get(entry.fullpath)\n if (!inode) {\n throw new Error(\n `ENOENT: no such file or directory, lstat '${entry.fullpath}'`\n )\n }\n let stats = inode.type === 'tree' ? {} : normalizeStats(inode.metadata)\n Object.assign(entry, { type: inode.type }, stats)\n }\n async populateContent (entry) {\n // Cannot get content for an index entry\n }\n async populateHash (entry) {\n let tree = await this.treePromise\n let inode = tree.get(entry.fullpath)\n if (!inode) return null\n if (inode.type === 'tree') {\n throw new Error(`EISDIR: illegal operation on a directory, read`)\n }\n Object.assign(entry, {\n oid: inode.metadata.oid\n })\n }\n}\n","// @ts-check\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitWalkerIndex } from '../models/GitWalkerIndex.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\nimport { GitWalkerSymbol } from '../utils/symbols.js'\n\n/**\n *\n * @typedef Walker\n * @property {Symbol} Symbol('GitWalkerSymbol')\n */\n\n/**\n * Get a git index Walker\n *\n * See [walkBeta1](./walkBeta1.md)\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n *\n * @returns {Walker} Returns a git index Walker\n *\n */\nexport function STAGE ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs')\n}) {\n const fs = new FileSystem(_fs)\n let o = Object.create(null)\n Object.defineProperty(o, GitWalkerSymbol, {\n value: function () {\n return new GitWalkerIndex({ fs, gitdir })\n }\n })\n Object.freeze(o)\n return o\n}\n","// @ts-check\nimport globrex from 'globrex'\n\nimport { GitIgnoreManager } from '../managers/GitIgnoreManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { join } from '../utils/join.js'\nimport { patternRoot } from '../utils/patternRoot.js'\nimport { cores } from '../utils/plugins.js'\nimport { worthWalking } from '../utils/worthWalking.js'\n\nimport { STAGE } from './STAGE.js'\nimport { TREE } from './TREE.js'\nimport { WORKDIR } from './WORKDIR.js'\nimport { walkBeta1 } from './walkBeta1.js'\n\n/**\n * Efficiently get the status of multiple files at once.\n *\n * The returned `StatusMatrix` is admittedly not the easiest format to read.\n * However it conveys a large amount of information in dense format that should make it easy to create reports about the current state of the repository;\n * without having to do multiple, time-consuming isomorphic-git calls.\n * My hope is that the speed and flexibility of the function will make up for the learning curve of interpreting the return value.\n *\n * ```js live\n * // get the status of all the files in 'src'\n * let status = await git.statusMatrix({ dir: '$input((/))', pattern: '$input((src/**))' })\n * console.log(status)\n * ```\n *\n * ```js live\n * // get the status of all the JSON and Markdown files\n * let status = await git.statusMatrix({ dir: '$input((/))', pattern: '$input((**\\/*.{json,md}))' })\n * console.log(status)\n * ```\n *\n * The result is returned as a 2D array.\n * The outer array represents the files and/or blobs in the repo, in alphabetical order.\n * The inner arrays describe the status of the file:\n * the first value is the filepath, and the next three are integers\n * representing the HEAD status, WORKDIR status, and STAGE status of the entry.\n *\n * ```js\n * // example StatusMatrix\n * [\n * [\"a.txt\", 0, 2, 0], // new, untracked\n * [\"b.txt\", 0, 2, 2], // added, staged\n * [\"c.txt\", 0, 2, 3], // added, staged, with unstaged changes\n * [\"d.txt\", 1, 1, 1], // unmodified\n * [\"e.txt\", 1, 2, 1], // modified, unstaged\n * [\"f.txt\", 1, 2, 2], // modified, staged\n * [\"g.txt\", 1, 2, 3], // modified, staged, with unstaged changes\n * [\"h.txt\", 1, 0, 1], // deleted, unstaged\n * [\"i.txt\", 1, 0, 0], // deleted, staged\n * ]\n * ```\n *\n * - The HEAD status is either absent (0) or present (1).\n * - The WORKDIR status is either absent (0), identical to HEAD (1), or different from HEAD (2).\n * - The STAGE status is either absent (0), identical to HEAD (1), identical to WORKDIR (2), or different from WORKDIR (3).\n *\n * ```ts\n * type Filename = string\n * type HeadStatus = 0 | 1\n * type WorkdirStatus = 0 | 1 | 2\n * type StageStatus = 0 | 1 | 2 | 3\n *\n * type StatusRow = [Filename, HeadStatus, WorkdirStatus, StageStatus]\n *\n * type StatusMatrix = StatusRow[]\n * ```\n *\n * > Think of the natural progression of file modifications as being from HEAD (previous) -> WORKDIR (current) -> STAGE (next).\n * > Then HEAD is \"version 1\", WORKDIR is \"version 2\", and STAGE is \"version 3\".\n * > Then, imagine a \"version 0\" which is before the file was created.\n * > Then the status value in each column corresponds to the oldest version of the file it is identical to.\n * > (For a file to be identical to \"version 0\" means the file is deleted.)\n *\n * Here are some examples of queries you can answer using the result:\n *\n * #### Q: What files have been deleted?\n * ```js\n * const FILE = 0, WORKDIR = 2\n *\n * const filenames = (await statusMatrix({ dir }))\n * .filter(row => row[WORKDIR] === 0)\n * .map(row => row[FILE])\n * ```\n *\n * #### Q: What files have unstaged changes?\n * ```js\n * const FILE = 0, WORKDIR = 2, STAGE = 3\n *\n * const filenames = (await statusMatrix({ dir }))\n * .filter(row => row[WORKDIR] !== row[STAGE])\n * .map(row => row[FILE])\n * ```\n *\n * #### Q: What files have been modified since the last commit?\n * ```js\n * const FILE = 0, HEAD = 1, WORKDIR = 2\n *\n * const filenames = (await statusMatrix({ dir }))\n * .filter(row => row[HEAD] !== row[WORKDIR])\n * .map(row => row[FILE])\n * ```\n *\n * #### Q: What files will NOT be changed if I commit right now?\n * ```js\n * const FILE = 0, HEAD = 1, STAGE = 3\n *\n * const filenames = (await statusMatrix({ dir }))\n * .filter(row => row[HEAD] === row[STAGE])\n * .map(row => row[FILE])\n * ```\n *\n * For reference, here are all possible combinations:\n *\n * | HEAD | WORKDIR | STAGE | `git status --short` equivalent |\n * | ---- | ------- | ----- | ------------------------------- |\n * | 0 | 0 | 0 | `` |\n * | 0 | 0 | 3 | `AD` |\n * | 0 | 2 | 0 | `??` |\n * | 0 | 2 | 2 | `A ` |\n * | 0 | 2 | 3 | `AM` |\n * | 1 | 0 | 0 | `D ` |\n * | 1 | 0 | 1 | ` D` |\n * | 1 | 0 | 3 | `MD` |\n * | 1 | 1 | 0 | `D ` + `??` |\n * | 1 | 1 | 1 | `` |\n * | 1 | 1 | 3 | `MM` |\n * | 1 | 2 | 0 | `D ` + `??` |\n * | 1 | 2 | 1 | ` M` |\n * | 1 | 2 | 2 | `M ` |\n * | 1 | 2 | 3 | `MM` |\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ref = 'HEAD'] - Optionally specify a different commit to compare against the workdir and stage instead of the HEAD\n * @param {string} [args.pattern] - Filter the results to only those whose filepath matches a glob pattern\n *\n * @returns {Promise} Resolves with a status matrix, described below.\n */\nexport async function statusMatrix ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n ref = 'HEAD',\n pattern = null\n}) {\n try {\n const fs = new FileSystem(_fs)\n let patternGlobrex =\n pattern && globrex(pattern, { globstar: true, extended: true })\n let patternBase = pattern && patternRoot(pattern)\n let results = await walkBeta1({\n trees: [\n TREE({ fs, gitdir, ref }),\n WORKDIR({ fs, dir, gitdir }),\n STAGE({ fs, gitdir })\n ],\n filter: async function ([head, workdir, stage]) {\n // We need an awkward exception for the root directory\n if (head.fullpath === '.') return true\n // Ignore ignored files, but only if they are not already tracked.\n if (!head.exists && !stage.exists && workdir.exists) {\n if (\n await GitIgnoreManager.isIgnored({\n fs,\n dir,\n filepath: workdir.fullpath\n })\n ) {\n return false\n }\n }\n // match against 'pattern' parameter\n if (pattern === null) return true\n return worthWalking(head.fullpath, patternBase)\n },\n map: async function ([head, workdir, stage]) {\n // Late filter against file names\n if (patternGlobrex && !patternGlobrex.regex.test(head.fullpath)) return\n // For now, just bail on directories\n await head.populateStat()\n if (head.type === 'tree' || head.type === 'special') return\n await workdir.populateStat()\n if (workdir.type === 'tree' || workdir.type === 'special') return\n await stage.populateStat()\n if (stage.type === 'tree' || stage.type === 'special') return\n // Figure out the oids, using the staged oid for the working dir oid if the stats match.\n await head.populateHash()\n await stage.populateHash()\n if (!head.exists && workdir.exists && !stage.exists) {\n // We don't actually NEED the sha. Any sha will do\n // TODO: update this logic to handle N trees instead of just 3.\n workdir.oid = '42'\n } else if (workdir.exists) {\n await workdir.populateHash()\n }\n let entry = [undefined, head.oid, workdir.oid, stage.oid]\n let result = entry.map(value => entry.indexOf(value))\n result.shift() // remove leading undefined entry\n let fullpath = head.fullpath || workdir.fullpath || stage.fullpath\n return [fullpath, ...result]\n }\n })\n return results\n } catch (err) {\n err.caller = 'git.statusMatrix'\n throw err\n }\n}\n","// @ts-check\nimport { GitRefManager } from '../managers/GitRefManager'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Create a lightweight tag\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - What to name the tag\n * @param {string} [args.object = 'HEAD'] - What oid the tag refers to. (Will resolve to oid if value is a ref.) By default, the commit object which is referred by the current `HEAD` is used.\n * @param {boolean} [args.force = false] - Instead of throwing an error if a tag named `ref` already exists, overwrite the existing tag.\n *\n * @returns {Promise} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.tag({ dir: '$input((/))', ref: '$input((test-tag))' })\n * console.log('done')\n *\n */\nexport async function tag ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n ref,\n object,\n force = false\n}) {\n try {\n const fs = new FileSystem(_fs)\n\n if (ref === undefined) {\n throw new GitError(E.MissingRequiredParameterError, {\n function: 'tag',\n parameter: 'ref'\n })\n }\n\n ref = ref.startsWith('refs/tags/') ? ref : `refs/tags/${ref}`\n\n // Resolve passed object\n let value = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: object || 'HEAD'\n })\n\n if (!force && (await GitRefManager.exists({ fs, gitdir, ref }))) {\n throw new GitError(E.RefExistsError, { noun: 'tag', ref })\n }\n\n await GitRefManager.writeRef({ fs, gitdir, ref, value })\n } catch (err) {\n err.caller = 'git.tag'\n throw err\n }\n}\n","// @ts-check\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitAnnotatedTag } from '../models/GitAnnotatedTag.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { SignedGitCommit } from '../models/SignedGitCommit.js'\nimport { readObject } from '../storage/readObject.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Verify a signed commit or tag\n *\n * For now, key management is beyond the scope of isomorphic-git's PGP features.\n * It is up to you to figure out what the commit's or tag's public key _should_ be.\n * I would use the \"author\" or \"committer\" name and email, and look up\n * that person's public key from a trusted source such as the GitHub API.\n *\n * The function returns `false` if any of the signatures on a signed git commit are invalid.\n * Otherwise, it returns an array of the key ids that were used to sign it.\n *\n * The `publicKeys` argument is a single string in ASCII armor format. However, it is plural \"keys\" because\n * you can technically have multiple public keys in a single ASCII armor string. While I haven't tested it, it\n * should support verifying a single commit signed with multiple keys. Hence why the returned result is an array of key ids.\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - A reference to the commit or tag to verify\n * @param {string} args.publicKeys - A PGP public key in ASCII armor format.\n * @param {OpenPGP} [args.openpgp] - [deprecated] An instance of the [OpenPGP library](https://unpkg.com/openpgp@2.6.2). Deprecated in favor of using a [PGP plugin](./plugin_pgp.md).\n *\n * @returns {Promise} The value `false` or the valid key ids (in hex format) used to sign the commit.\n *\n * @example\n * let keyids = await git.verify({\n * dir: '$input((/))',\n * openpgp,\n * ref: '$input((HEAD))',\n * publicKeys: `$textarea((\n * -----BEGIN PGP PUBLIC KEY BLOCK-----\n * ...\n * ))`\n * })\n * console.log(keyids)\n *\n */\nexport async function verify ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n ref,\n publicKeys,\n openpgp\n}) {\n try {\n const fs = new FileSystem(_fs)\n const oid = await GitRefManager.resolve({ fs, gitdir, ref })\n const { type, object } = await readObject({ fs, gitdir, oid })\n if (type !== 'commit' && type !== 'tag') {\n throw new GitError(E.ObjectTypeAssertionInRefFail, {\n expected: 'commit/tag',\n ref,\n type\n })\n }\n if (openpgp) {\n // Old API\n let commit = SignedGitCommit.from(object)\n let keys = await commit.listSigningKeys(openpgp)\n let validity = await commit.verify(openpgp, publicKeys)\n if (!validity) return false\n return keys\n } else {\n // Newer plugin API\n let pgp = cores.get(core).get('pgp')\n if (type === 'commit') {\n let commit = GitCommit.from(object)\n let { valid, invalid } = await GitCommit.verify(commit, pgp, publicKeys)\n if (invalid.length > 0) return false\n return valid\n } else if (type === 'tag') {\n let tag = GitAnnotatedTag.from(object)\n let { valid, invalid } = await GitAnnotatedTag.verify(\n tag,\n pgp,\n publicKeys\n )\n if (invalid.length > 0) return false\n return valid\n }\n }\n } catch (err) {\n err.caller = 'git.verify'\n throw err\n }\n}\n","// @ts-check\nimport { pkg } from '../utils/pkg.js'\n\n/**\n * Return the version number of isomorphic-git\n *\n * I don't know why you might need this. I added it just so I could check that I was getting\n * the correct version of the library and not a cached version.\n *\n * @returns {string} the version string taken from package.json at publication time\n *\n * @example\n * console.log(git.version())\n *\n */\nexport function version () {\n try {\n return pkg.version\n } catch (err) {\n err.caller = 'git.version'\n throw err\n }\n}\n","// @ts-check\nimport cleanGitRef from 'clean-git-ref'\n\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { E, GitError } from '../models/GitError.js'\nimport { join } from '../utils/join.js'\nimport { cores } from '../utils/plugins.js'\n\n/**\n * Write a ref which refers to the specified SHA-1 object id, or a symbolic ref which refers to the specified ref.\n *\n * @param {object} args\n * @param {string} [args.core = 'default'] - The plugin core identifier to use for plugin injection\n * @param {FileSystem} [args.fs] - [deprecated] The filesystem containing the git repo. Overrides the fs provided by the [plugin system](./plugin_fs.md).\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The name of the ref to write\n * @param {string} args.value - When `symbolic` is false, a ref or an SHA-1 object id. When true, a ref starting with `refs/`.\n * @param {boolean} [args.force = false] - Instead of throwing an error if a ref named `ref` already exists, overwrite the existing ref.\n * @param {boolean} [args.symbolic = false] - Whether the ref is symbolic or not.\n *\n * @returns {Promise} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.writeRef({\n * dir: '$input((/))',\n * ref: '$input((refs/heads/another-branch))',\n * value: '$input((HEAD))'\n * })\n * await git.writeRef({\n * dir: '$input((/))',\n * ref: '$input((HEAD))',\n * value: '$input((refs/heads/another-branch))',\n * force: $input((true)),\n * symbolic: $input((true))\n * })\n * console.log('done')\n *\n */\nexport async function writeRef ({\n core = 'default',\n dir,\n gitdir = join(dir, '.git'),\n fs: _fs = cores.get(core).get('fs'),\n ref,\n value,\n force = false,\n symbolic = false\n}) {\n try {\n const fs = new FileSystem(_fs)\n\n if (ref !== cleanGitRef.clean(ref)) {\n throw new GitError(E.InvalidRefNameError, {\n verb: 'write',\n noun: 'ref',\n ref,\n suggestion: cleanGitRef.clean(ref)\n })\n }\n\n if (!force && (await GitRefManager.exists({ fs, gitdir, ref }))) {\n throw new GitError(E.RefExistsError, { noun: 'ref', ref })\n }\n\n if (symbolic) {\n await GitRefManager.writeSymbolicRef({\n fs,\n gitdir,\n ref,\n value\n })\n } else {\n value = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: value\n })\n await GitRefManager.writeRef({\n fs,\n gitdir,\n ref,\n value\n })\n }\n } catch (err) {\n err.caller = 'git.writeRef'\n throw err\n }\n}\n","import { auth } from './utils/auth.js'\nimport { oauth2 } from './utils/oauth2.js'\n\nexport * from './commands/add.js'\nexport * from './commands/addRemote.js'\nexport * from './commands/annotatedTag.js'\nexport * from './commands/branch.js'\nexport * from './commands/checkout.js'\nexport * from './commands/clone.js'\nexport * from './commands/commit.js'\nexport * from './commands/config.js'\nexport * from './commands/currentBranch.js'\nexport * from './commands/deleteBranch.js'\nexport * from './commands/deleteRef.js'\nexport * from './commands/deleteRemote.js'\nexport * from './commands/deleteTag.js'\nexport * from './commands/expandOid.js'\nexport * from './commands/expandRef.js'\nexport * from './commands/fetch.js'\nexport * from './commands/findMergeBase.js'\nexport * from './commands/findRoot.js'\nexport * from './commands/getRemoteInfo.js'\nexport * from './commands/indexPack.js'\nexport * from './commands/init.js'\nexport * from './commands/isDescendent.js'\nexport * from './commands/listBranches.js'\nexport * from './commands/listFiles.js'\nexport * from './commands/listRemotes.js'\nexport * from './commands/listTags.js'\nexport * from './commands/log.js'\nexport * from './commands/merge.js'\nexport * from './commands/packObjects.js'\nexport * from './commands/pull.js'\nexport * from './commands/push.js'\nexport * from './commands/readObject.js'\nexport * from './commands/remove.js'\nexport * from './commands/resetIndex.js'\nexport * from './commands/resolveRef.js'\nexport * from './commands/sign.js'\nexport * from './commands/status.js'\nexport * from './commands/statusMatrix.js'\nexport * from './commands/tag.js'\nexport * from './commands/verify.js'\nexport * from './commands/version.js'\nexport * from './commands/walkBeta1.js'\nexport * from './commands/writeObject.js'\nexport * from './commands/writeRef.js'\nexport * from './commands/WORKDIR.js'\nexport * from './commands/STAGE.js'\nexport * from './commands/TREE.js'\n\nexport const utils = { auth, oauth2 }\nexport { E } from './models/GitError'\n\nexport * from './utils/plugins.js'\n"],"sourceRoot":""}