@supraio/client-daemon-js 0.0.1-changedeploystructure.6 → 0.0.1-master.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/daemon/plain.d.ts +1 -0
- package/daemon/wasm.d.ts +2 -0
- package/daemon.d.ts +1 -0
- package/daemon.js +334 -91
- package/daemon.js.map +3 -3
- package/dom/script.d.ts +1 -0
- package/env/consts.d.ts +1 -0
- package/fs/browserfs.d.ts +5 -0
- package/go/go.d.ts +25 -0
- package/package.json +7 -4
- package/screen/options.d.ts +10 -0
- package/screen/plain.d.ts +1 -0
- package/screen/wasm.d.ts +10 -0
- package/screen.d.ts +1 -0
- package/screen.js +33 -17
- package/screen.js.map +3 -3
- package/sdk.d.ts +4 -0
- package/sdk.js +17563 -0
- package/sdk.js.map +7 -0
- package/supra-client-daemon.js +1343 -825
- package/supra-client-daemon.js.map +1 -1
- package/supra-client-daemon.wasm +0 -0
- package/supra-client-screen.js +1861 -937
- package/supra-client-screen.js.map +1 -1
- package/supra-client-screen.wasm +0 -0
- package/wasm_exec.js +7 -0
package/supra-client-screen.js
CHANGED
|
@@ -25008,8 +25008,8 @@ $packages["time"] = (function() {
|
|
|
25008
25008
|
return [nhi, nlo];
|
|
25009
25009
|
};
|
|
25010
25010
|
Date = function(year, month, day, hour, min, sec, nsec, loc) {
|
|
25011
|
-
var _r, _r$1,
|
|
25012
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1;
|
|
25011
|
+
var _r, _r$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, abs, d, day, end, hour, loc, m, min, month, nsec, offset, sec, start, t, unix, utc, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, year, $s, $r;
|
|
25012
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; abs = $f.abs; d = $f.d; day = $f.day; end = $f.end; hour = $f.hour; loc = $f.loc; m = $f.m; min = $f.min; month = $f.month; nsec = $f.nsec; offset = $f.offset; sec = $f.sec; start = $f.start; t = $f.t; unix = $f.unix; utc = $f.utc; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; year = $f.year; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
25013
25013
|
if (loc === ptrType$2.nil) {
|
|
25014
25014
|
$panic(new $String("time: missing Location in call to Date"));
|
|
25015
25015
|
}
|
|
@@ -25047,27 +25047,20 @@ $packages["time"] = (function() {
|
|
|
25047
25047
|
/* */ if (!((offset === 0))) { $s = 2; continue; }
|
|
25048
25048
|
/* */ $s = 3; continue;
|
|
25049
25049
|
/* if (!((offset === 0))) { */ case 2:
|
|
25050
|
-
|
|
25051
|
-
|
|
25052
|
-
|
|
25053
|
-
|
|
25054
|
-
|
|
25055
|
-
|
|
25056
|
-
|
|
25057
|
-
|
|
25058
|
-
$s = 7; continue;
|
|
25059
|
-
/* } else if ((utc.$high > end.$high || (utc.$high === end.$high && utc.$low >= end.$low))) { */ case 6:
|
|
25060
|
-
_r$2 = loc.lookup(end); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
25061
|
-
_tuple$7 = _r$2;
|
|
25062
|
-
offset = _tuple$7[1];
|
|
25063
|
-
/* } */ case 7:
|
|
25064
|
-
case 4:
|
|
25050
|
+
utc = (x$7 = (new $Int64(0, offset)), new $Int64(unix.$high - x$7.$high, unix.$low - x$7.$low));
|
|
25051
|
+
/* */ if ((utc.$high < start.$high || (utc.$high === start.$high && utc.$low < start.$low)) || (utc.$high > end.$high || (utc.$high === end.$high && utc.$low >= end.$low))) { $s = 4; continue; }
|
|
25052
|
+
/* */ $s = 5; continue;
|
|
25053
|
+
/* if ((utc.$high < start.$high || (utc.$high === start.$high && utc.$low < start.$low)) || (utc.$high > end.$high || (utc.$high === end.$high && utc.$low >= end.$low))) { */ case 4:
|
|
25054
|
+
_r$1 = loc.lookup(utc); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
25055
|
+
_tuple$6 = _r$1;
|
|
25056
|
+
offset = _tuple$6[1];
|
|
25057
|
+
/* } */ case 5:
|
|
25065
25058
|
unix = (x$8 = (new $Int64(0, offset)), new $Int64(unix.$high - x$8.$high, unix.$low - x$8.$low));
|
|
25066
25059
|
/* } */ case 3:
|
|
25067
25060
|
t = $clone(unixTime(unix, ((nsec >> 0))), Time);
|
|
25068
25061
|
t.setLoc(loc);
|
|
25069
25062
|
$s = -1; return t;
|
|
25070
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: Date }; } $f._r = _r; $f._r$1 = _r$1; $f.
|
|
25063
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: Date }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f.abs = abs; $f.d = d; $f.day = day; $f.end = end; $f.hour = hour; $f.loc = loc; $f.m = m; $f.min = min; $f.month = month; $f.nsec = nsec; $f.offset = offset; $f.sec = sec; $f.start = start; $f.t = t; $f.unix = unix; $f.utc = utc; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.year = year; $f.$s = $s; $f.$r = $r; return $f;
|
|
25071
25064
|
};
|
|
25072
25065
|
$pkg.Date = Date;
|
|
25073
25066
|
Time.ptr.prototype.Truncate = function(d) {
|
|
@@ -114931,7 +114924,7 @@ $packages["vendor/golang.org/x/net/http2/hpack"] = (function() {
|
|
|
114931
114924
|
return $pkg;
|
|
114932
114925
|
})();
|
|
114933
114926
|
$packages["net/http"] = (function() {
|
|
114934
|
-
var $pkg = {}, $init, bufio, bytes, gzip, list, context, rand, tls, base64, binary, errors, fmt, io, fs, ioutil, log, math, rand$1, mime, multipart, net, httptrace, internal, textproto, url, os, path, filepath, reflect, runtime, sort, strconv, strings, sync, atomic, js, time, utf8, httpguts, httpproxy, hpack, idna, Cookie, SameSite, http2dataBuffer, http2ErrCode, http2ConnectionError, http2StreamError, http2goAwayFlowError, http2connError, http2pseudoHeaderError, http2duplicatePseudoHeaderError, http2headerFieldNameError, http2headerFieldValueError, http2flow, http2FrameType, http2Flags, http2FrameHeader, http2Frame, http2Framer, http2frameCache, http2DataFrame, http2SettingsFrame, http2PingFrame, http2GoAwayFrame, http2UnknownFrame, http2WindowUpdateFrame, http2HeadersFrame, http2HeadersFrameParam, http2PriorityFrame, http2PriorityParam, http2RSTStreamFrame, http2ContinuationFrame, http2PushPromiseFrame, http2PushPromiseParam, http2MetaHeadersFrame, http2goroutineLock, http2streamState, http2Setting, http2SettingID, http2gate, http2closeWaiter, http2bufferedWriter, http2connectionStater, http2sorter, http2incomparable, http2pipe, http2pipeBuffer, http2Server, http2serverInternalState, http2ServeConnOpts, http2serverConn, http2stream, http2readFrameResult, http2frameWriteResult, http2serverMessage, http2requestParam, http2bodyReadMsg, http2requestBody, http2responseWriter, http2responseWriterState, http2chunkWriter, http2startPushRequest, http2writeFramer, http2writeContext, http2flushFrameWriter, http2writeSettings, http2writeGoAway, http2writeData, http2handlerPanicRST, http2writePingAck, http2writeSettingsAck, http2writeResHeaders, http2writePushPromise, http2write100ContinueHeadersFrame, http2writeWindowUpdate, http2WriteScheduler, http2OpenStreamOptions, http2FrameWriteRequest, http2writeQueue, http2writeQueuePool, http2PriorityWriteSchedulerConfig, http2priorityNodeState, http2priorityNode, http2sortPriorityNodeSiblings, http2priorityWriteScheduler, http2randomWriteScheduler, Header, stringWriter, keyValues, headerSorter, incomparable, contextKey, noBody, PushOptions, ProtocolError, Request, requestBodyReadError, maxBytesReader, Response, Handler, ResponseWriter, conn, chunkWriter, response, atomicBool, writerOnly, readResult, connReader, expectContinueReader, extraHeader, closeWriter, statusError, HandlerFunc, redirectHandler, ServeMux, muxEntry, Server, ConnState, serverHandler, onceCloseListener, globalOptionsHandler, initALPNRequest, loggingConn, checkConnErrorWriter, sniffSig, exactSig, maskedSig, htmlSig, mp4Sig, textSig, errorReader, byteReader, transferWriter, transferReader, unsupportedTEError, body, bodyLocked, finishAsyncByteRead, bufioFlushWriter, readTrackingBody, baseContexter, I, requestTooLarger, ptrType, sliceType, sliceType$1, ptrType$1, sliceType$2, sliceType$3, sliceType$4, ptrType$4, funcType, arrayType, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, chanType, ptrType$11, sliceType$5, sliceType$6, sliceType$7, ptrType$15, ptrType$17, ptrType$18, ptrType$19, ptrType$20, ptrType$21, structType, ptrType$24, ptrType$26, sliceType$9, ptrType$27, sliceType$10, ptrType$28, arrayType$1, ptrType$34, ptrType$35, ptrType$36, arrayType$3, ptrType$37, ptrType$38, ptrType$39, arrayType$4, sliceType$15, ptrType$40, ptrType$41, ptrType$42, ptrType$43, ptrType$44, ptrType$45, ptrType$46, ptrType$47, ptrType$48, ptrType$49, ptrType$50, ptrType$51, ptrType$52, sliceType$16, sliceType$17, ptrType$53, arrayType$5, sliceType$18, sliceType$19, ptrType$54, ptrType$55, sliceType$20, ptrType$56, ptrType$57, ptrType$58, ptrType$59, sliceType$21, sliceType$22, ptrType$60, ptrType$61, funcType$1, ptrType$62, ptrType$63, ptrType$64, ptrType$65, ptrType$66, ptrType$67, ptrType$68, ptrType$69, ptrType$70, ptrType$71, ptrType$72, ptrType$74, ptrType$75, sliceType$23, ptrType$76, sliceType$24, ptrType$80, ptrType$81, ptrType$82, sliceType$25, ptrType$83, ptrType$84, ptrType$85, ptrType$86, ptrType$87, ptrType$88, ptrType$89, ptrType$90, arrayType$6, sliceType$26, structType$1, ptrType$91, ptrType$92, ptrType$93, structType$2, ptrType$94, ptrType$95, ptrType$96, ptrType$97, arrayType$7, arrayType$8, sliceType$27, ptrType$98, ptrType$99, ptrType$100, ptrType$101, arrayType$9, ptrType$102, ptrType$105, ptrType$106, ptrType$107, ptrType$108, funcType$2, funcType$3, chanType$2, ptrType$117, ptrType$118, funcType$6, funcType$7, ptrType$119, chanType$3, funcType$8, mapType$5, funcType$9, chanType$4, chanType$5, chanType$6, chanType$7, chanType$8, mapType$6, mapType$7, chanType$9, chanType$10, ptrType$123, funcType$12, ptrType$124, funcType$13, ptrType$125, mapType$10, ptrType$126, mapType$11, mapType$12, ptrType$127, ptrType$128, funcType$14, ptrType$131, ptrType$132, ptrType$133, mapType$13, funcType$15, mapType$14, funcType$16, funcType$17, funcType$18, mapType$15, mapType$16, ptrType$135, ptrType$136, ptrType$137, ptrType$138, ptrType$141, chanType$12, ptrType$142, cookieNameSanitizer, errSeeker, errNoOverlap, unixEpochTime, errMissingSeek, errMissingReadDir, http2dataChunkSizeClasses, http2dataChunkPools, http2errReadEmpty, http2errCodeName, http2errMixPseudoHeaderTypes, http2errPseudoAfterRegular, http2padZeros, http2frameName, http2flagName, http2frameParsers, http2fhBytes, http2ErrFrameTooLarge, http2errStreamID, http2errDepStreamID, http2errPadLength, http2errPadBytes, http2DebugGoroutines, http2goroutineSpace, http2littleBuf, http2commonBuildOnce, http2commonLowerHeader, http2commonCanonHeader, http2VerboseLogs, http2logFrameWrites, http2logFrameReads, http2inTests, http2clientPreface, http2stateName, http2settingName, http2bufWriterPool, http2sorterPool, http2errClosedPipeWrite, http2errClientDisconnected, http2errClosedBody, http2errHandlerComplete, http2errStreamClosed, http2responseWriterStatePool, http2testHookOnConn, http2testHookGetServerConn, http2testHookOnPanicMu, http2testHookOnPanic, http2settingsTimerMsg, http2idleTimerMsg, http2shutdownTimerMsg, http2gracefulShutdownMsg, http2errPrefaceTimeout, http2errChanPool, http2writeDataPool, http2errHandlerPanicked, http2goAwayTimeout, http2ErrRecursivePush, http2ErrPushLimitReached, http2connHeaders, http2errClientConnClosed, http2errClientConnUnusable, http2errClientConnGotGoAway, http2errRequestCanceled, http2errStopReqBodyWrite, http2errStopReqBodyWriteAndCancel, http2errReqBodyTooLong, http2errClosedResponseBody, http2errResponseHeaderListSize, http2errRequestHeaderListSize, http2noBody, headerNewlineToSpace, headerSorterPool, aLongTimeAgo, omitBundledHTTP2, reqWriteExcludeHeader, multipartByReader, errMissingHost, textprotoReaderPool, respExcludeHeader, uint8Array, useFakeNetwork, errClosed, crlf, colonSpace, bufioReaderPool, bufioWriter2kPool, bufioWriter2kPool$24ptr, bufioWriter4kPool, bufioWriter4kPool$24ptr, copyBufPool, errTooLarge, extraHeaderKeys, headerContentLength, headerDate, htmlReplacer, defaultServeMux, defaultServeMux$24ptr, stateName, testHookServerServe, uniqNameMu, uniqNameNext, sniffSignatures, mp4ftype, mp4, socksaLongTimeAgo, statusText, suppressedHeaders304, suppressedHeadersNoBody, singleCRLF, doubleCRLF, errTrailerEOF, nopCloserType, errCannotRewind, errKeepAlivesDisabled, errConnBroken, errCloseIdle, errTooManyIdle, errTooManyIdleHost, errCloseIdleConns, errReadLoopExiting, errIdleConnTimeout, errServerClosedIdle, errCallerOwnsConn, errRequestCanceledConn, errReadOnClosedResBody, _r, x$1, x$2, _r$1, basicAuth, cloneURLValues, cloneURL, cloneMultipartForm, cloneMultipartFileHeader, readSetCookies, readCookies, validCookieDomain, validCookieExpires, isCookieDomainName, sanitizeCookieName, sanitizeCookieValue, validCookieValueByte, sanitizeCookiePath, validCookiePathByte, sanitizeOrWarn, parseCookieValue, isCookieNameValid, http2isBadCipher, http2getDataBufferChunk, http2putDataBufferChunk, http2streamError, http2typeFrameParser, http2readFrameHeader, http2NewFramer, http2terminalReadFrameError, http2parseDataFrame, http2validStreamIDOrZero, http2validStreamID, http2parseSettingsFrame, http2parsePingFrame, http2parseGoAwayFrame, http2parseUnknownFrame, http2parseWindowUpdateFrame, http2parseHeadersFrame, http2parsePriorityFrame, http2parseRSTStreamFrame, http2parseContinuationFrame, http2parsePushPromise, http2readByte, http2readUint32, http2summarizeFrame, http2newGoroutineLock, http2curGoroutineID, http2parseUintBytes, http2cutoff64, http2buildCommonHeaderMapsOnce, http2buildCommonHeaderMaps, http2lowerHeader, init, http2validWireHeaderFieldName, http2httpCodeString, http2newBufferedWriter, http2bodyAllowedForStatus, http2ConfigureServer, http2serverConnBaseContext, http2errno, http2isClosedConnError, http2checkPriority, http2handleHeaderListTooLong, http2checkWriteHeaderCode, http2cloneHeader, http2foreachHeaderElement, http2checkValidHTTP2RequestHeaders, http2new400Handler, http2h1ServerKeepAlivesDisabled, http2strSliceContains, http2writeEndsStream, http2splitHeaderBlock, http2encKV, http2encodeHeaders, http2NewPriorityWriteScheduler, http2NewRandomWriteScheduler, CanonicalHeaderKey, hasToken, isTokenBoundary, isNotToken, isASCII, stringContainsCTLByte, hexEscapeNonASCII, badStringError, valueOrDefault, idnaASCII, cleanHost, removeZone, ParseHTTPVersion, validMethod, parseBasicAuth, parseRequestLine, newTextprotoReader, putTextprotoReader, readRequest, MaxBytesReader, copyValues, parsePostForm, requestMethodUsuallyLacksBody, fixPragmaCacheControl, isProtocolSwitchResponse, isProtocolSwitchHeader, bufioWriterPool, newBufioReader, putBufioReader, newBufioWriterSize, putBufioWriter, appendTime, http1ServerSupportsRequest, checkWriteHeaderCode, relevantCaller, foreachHeaderElement, writeStatusLine, validNextProto, badRequestError, isCommonNetReadError, registerOnHitEOF, requestBodyRemains, Error, NotFound, NotFoundHandler, Redirect, htmlEscape, RedirectHandler, cleanPath, stripHostPort, appendSorted, newLoggingConn, numLeadingCRorLF, strSliceContains, tlsRecordHeaderLooksLikeHTTP, DetectContentType, isWS, isTT, StatusText, newTransferWriter, noResponseBodyExpected, bodyAllowedForStatus, suppressedHeaders, readTransfer, chunked, isIdentity, isUnsupportedTEError, fixLength, shouldClose, fixTrailer, seeUpcomingDoubleCRLF, mergeSetHeader, parseContentLength, isKnownInMemoryReader, cloneTLSConfig;
|
|
114927
|
+
var $pkg = {}, $init, bufio, bytes, gzip, list, context, rand, tls, base64, binary, errors, fmt, io, fs, ioutil, log, math, rand$1, mime, multipart, net, httptrace, internal, textproto, url, os, path, filepath, reflect, runtime, sort, strconv, strings, sync, atomic, js, time, utf8, httpguts, httpproxy, hpack, idna, Cookie, SameSite, http2dataBuffer, http2ErrCode, http2ConnectionError, http2StreamError, http2goAwayFlowError, http2connError, http2pseudoHeaderError, http2duplicatePseudoHeaderError, http2headerFieldNameError, http2headerFieldValueError, http2flow, http2FrameType, http2Flags, http2FrameHeader, http2Frame, http2Framer, http2frameCache, http2DataFrame, http2SettingsFrame, http2PingFrame, http2GoAwayFrame, http2UnknownFrame, http2WindowUpdateFrame, http2HeadersFrame, http2HeadersFrameParam, http2PriorityFrame, http2PriorityParam, http2RSTStreamFrame, http2ContinuationFrame, http2PushPromiseFrame, http2PushPromiseParam, http2MetaHeadersFrame, http2goroutineLock, http2streamState, http2Setting, http2SettingID, http2gate, http2closeWaiter, http2bufferedWriter, http2connectionStater, http2sorter, http2incomparable, http2pipe, http2pipeBuffer, http2Server, http2serverInternalState, http2ServeConnOpts, http2serverConn, http2stream, http2readFrameResult, http2frameWriteResult, http2serverMessage, http2requestParam, http2bodyReadMsg, http2requestBody, http2responseWriter, http2responseWriterState, http2chunkWriter, http2startPushRequest, http2writeFramer, http2writeContext, http2flushFrameWriter, http2writeSettings, http2writeGoAway, http2writeData, http2handlerPanicRST, http2writePingAck, http2writeSettingsAck, http2writeResHeaders, http2writePushPromise, http2write100ContinueHeadersFrame, http2writeWindowUpdate, http2WriteScheduler, http2OpenStreamOptions, http2FrameWriteRequest, http2writeQueue, http2writeQueuePool, http2PriorityWriteSchedulerConfig, http2priorityNodeState, http2priorityNode, http2sortPriorityNodeSiblings, http2priorityWriteScheduler, http2randomWriteScheduler, Header, stringWriter, keyValues, headerSorter, incomparable, contextKey, noBody, PushOptions, ProtocolError, Request, requestBodyReadError, maxBytesReader, Response, Handler, ResponseWriter, conn, chunkWriter, response, atomicBool, writerOnly, readResult, connReader, expectContinueReader, extraHeader, closeWriter, statusError, HandlerFunc, redirectHandler, ServeMux, muxEntry, Server, ConnState, serverHandler, onceCloseListener, globalOptionsHandler, initALPNRequest, loggingConn, checkConnErrorWriter, sniffSig, exactSig, maskedSig, htmlSig, mp4Sig, textSig, errorReader, byteReader, transferWriter, transferReader, unsupportedTEError, body, bodyLocked, finishAsyncByteRead, bufioFlushWriter, readTrackingBody, baseContexter, I, requestTooLarger, ptrType, sliceType, sliceType$1, ptrType$1, sliceType$2, sliceType$3, sliceType$4, ptrType$4, funcType, arrayType, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, chanType, ptrType$11, sliceType$5, sliceType$6, sliceType$7, ptrType$15, ptrType$17, ptrType$18, ptrType$19, ptrType$20, ptrType$21, structType, ptrType$24, ptrType$26, sliceType$9, ptrType$27, sliceType$10, ptrType$28, arrayType$1, ptrType$34, ptrType$35, ptrType$36, arrayType$3, ptrType$37, ptrType$38, ptrType$39, arrayType$4, sliceType$15, ptrType$40, ptrType$41, ptrType$42, ptrType$43, ptrType$44, ptrType$45, ptrType$46, ptrType$47, ptrType$48, ptrType$49, ptrType$50, ptrType$51, ptrType$52, sliceType$16, sliceType$17, ptrType$53, arrayType$5, sliceType$18, sliceType$19, ptrType$54, ptrType$55, sliceType$20, ptrType$56, ptrType$57, ptrType$58, ptrType$59, sliceType$21, sliceType$22, ptrType$60, ptrType$61, funcType$1, ptrType$62, ptrType$63, ptrType$64, ptrType$65, ptrType$66, ptrType$67, ptrType$68, ptrType$69, ptrType$70, ptrType$71, ptrType$72, ptrType$73, ptrType$76, ptrType$77, sliceType$23, ptrType$78, arrayType$6, sliceType$24, ptrType$81, ptrType$82, ptrType$83, sliceType$25, ptrType$84, ptrType$85, ptrType$86, ptrType$87, ptrType$88, ptrType$89, ptrType$90, ptrType$91, sliceType$26, structType$1, ptrType$92, ptrType$93, ptrType$94, structType$2, ptrType$95, ptrType$96, ptrType$97, ptrType$98, arrayType$7, arrayType$8, sliceType$27, ptrType$99, ptrType$100, ptrType$101, arrayType$9, ptrType$102, ptrType$105, ptrType$106, ptrType$107, ptrType$108, funcType$2, funcType$3, chanType$2, ptrType$117, ptrType$118, funcType$6, funcType$7, ptrType$119, chanType$3, funcType$8, mapType$5, funcType$9, chanType$4, chanType$5, chanType$6, chanType$7, chanType$8, mapType$6, mapType$7, chanType$9, chanType$10, ptrType$123, funcType$12, ptrType$124, funcType$13, ptrType$125, mapType$10, ptrType$126, mapType$11, mapType$12, ptrType$127, ptrType$128, funcType$14, ptrType$131, ptrType$132, ptrType$133, mapType$13, funcType$15, mapType$14, funcType$16, funcType$17, funcType$18, mapType$15, mapType$16, ptrType$135, ptrType$136, ptrType$137, ptrType$138, ptrType$141, chanType$11, ptrType$142, cookieNameSanitizer, errSeeker, errNoOverlap, unixEpochTime, errMissingSeek, errMissingReadDir, http2dataChunkSizeClasses, http2dataChunkPools, http2errReadEmpty, http2errCodeName, http2errFromPeer, http2errMixPseudoHeaderTypes, http2errPseudoAfterRegular, http2padZeros, http2frameName, http2flagName, http2frameParsers, http2fhBytes, http2ErrFrameTooLarge, http2errStreamID, http2errDepStreamID, http2errPadLength, http2errPadBytes, http2DebugGoroutines, http2goroutineSpace, http2littleBuf, http2commonBuildOnce, http2commonLowerHeader, http2commonCanonHeader, http2VerboseLogs, http2logFrameWrites, http2logFrameReads, http2inTests, http2clientPreface, http2stateName, http2settingName, http2bufWriterPool, http2sorterPool, http2errClosedPipeWrite, http2errClientDisconnected, http2errClosedBody, http2errHandlerComplete, http2errStreamClosed, http2responseWriterStatePool, http2testHookOnConn, http2testHookGetServerConn, http2testHookOnPanicMu, http2testHookOnPanic, http2settingsTimerMsg, http2idleTimerMsg, http2shutdownTimerMsg, http2gracefulShutdownMsg, http2errPrefaceTimeout, http2errChanPool, http2writeDataPool, http2errHandlerPanicked, http2goAwayTimeout, http2ErrRecursivePush, http2ErrPushLimitReached, http2connHeaders, http2errClientConnClosed, http2errClientConnUnusable, http2errClientConnGotGoAway, http2errRequestCanceled, http2errStopReqBodyWrite, http2errStopReqBodyWriteAndCancel, http2errReqBodyTooLong, http2errNilRequestURL, http2errClosedResponseBody, http2errResponseHeaderListSize, http2errRequestHeaderListSize, http2noBody, headerNewlineToSpace, headerSorterPool, aLongTimeAgo, omitBundledHTTP2, reqWriteExcludeHeader, multipartByReader, errMissingHost, textprotoReaderPool, respExcludeHeader, uint8Array, useFakeNetwork, errClosed, crlf, colonSpace, bufioReaderPool, bufioWriter2kPool, bufioWriter2kPool$24ptr, bufioWriter4kPool, bufioWriter4kPool$24ptr, copyBufPool, errTooLarge, extraHeaderKeys, headerContentLength, headerDate, htmlReplacer, defaultServeMux, defaultServeMux$24ptr, stateName, testHookServerServe, uniqNameMu, uniqNameNext, sniffSignatures, mp4ftype, mp4, socksaLongTimeAgo, statusText, suppressedHeaders304, suppressedHeadersNoBody, singleCRLF, doubleCRLF, errTrailerEOF, nopCloserType, errCannotRewind, errKeepAlivesDisabled, errConnBroken, errCloseIdle, errTooManyIdle, errTooManyIdleHost, errCloseIdleConns, errReadLoopExiting, errIdleConnTimeout, errServerClosedIdle, errCallerOwnsConn, errRequestCanceledConn, errReadOnClosedResBody, _r, x$1, x$2, _r$1, basicAuth, cloneURLValues, cloneURL, cloneMultipartForm, cloneMultipartFileHeader, readSetCookies, readCookies, validCookieDomain, validCookieExpires, isCookieDomainName, sanitizeCookieName, sanitizeCookieValue, validCookieValueByte, sanitizeCookiePath, validCookiePathByte, sanitizeOrWarn, parseCookieValue, isCookieNameValid, http2asciiEqualFold, http2lower, http2isASCIIPrint, http2asciiToLower, http2isBadCipher, http2getDataBufferChunk, http2putDataBufferChunk, http2streamError, http2typeFrameParser, http2readFrameHeader, http2NewFramer, http2terminalReadFrameError, http2parseDataFrame, http2validStreamIDOrZero, http2validStreamID, http2parseSettingsFrame, http2parsePingFrame, http2parseGoAwayFrame, http2parseUnknownFrame, http2parseWindowUpdateFrame, http2parseHeadersFrame, http2parsePriorityFrame, http2parseRSTStreamFrame, http2parseContinuationFrame, http2parsePushPromise, http2readByte, http2readUint32, http2summarizeFrame, http2newGoroutineLock, http2curGoroutineID, http2parseUintBytes, http2cutoff64, http2buildCommonHeaderMapsOnce, http2buildCommonHeaderMaps, http2lowerHeader, init, http2validWireHeaderFieldName, http2httpCodeString, http2newBufferedWriter, http2bodyAllowedForStatus, http2ConfigureServer, http2serverConnBaseContext, http2errno, http2isClosedConnError, http2checkPriority, http2handleHeaderListTooLong, http2checkWriteHeaderCode, http2cloneHeader, http2foreachHeaderElement, http2checkValidHTTP2RequestHeaders, http2new400Handler, http2h1ServerKeepAlivesDisabled, http2strSliceContains, http2writeEndsStream, http2splitHeaderBlock, http2encKV, http2encodeHeaders, http2NewPriorityWriteScheduler, http2NewRandomWriteScheduler, CanonicalHeaderKey, hasToken, isTokenBoundary, isNotToken, isASCII, stringContainsCTLByte, hexEscapeNonASCII, badStringError, valueOrDefault, idnaASCII, cleanHost, removeZone, ParseHTTPVersion, validMethod, parseBasicAuth, parseRequestLine, newTextprotoReader, putTextprotoReader, readRequest, MaxBytesReader, copyValues, parsePostForm, requestMethodUsuallyLacksBody, fixPragmaCacheControl, isProtocolSwitchResponse, isProtocolSwitchHeader, bufioWriterPool, newBufioReader, putBufioReader, newBufioWriterSize, putBufioWriter, appendTime, http1ServerSupportsRequest, checkWriteHeaderCode, relevantCaller, foreachHeaderElement, writeStatusLine, validNextProto, badRequestError, isCommonNetReadError, registerOnHitEOF, requestBodyRemains, Error, NotFound, NotFoundHandler, Redirect, htmlEscape, RedirectHandler, cleanPath, stripHostPort, appendSorted, newLoggingConn, numLeadingCRorLF, strSliceContains, tlsRecordHeaderLooksLikeHTTP, DetectContentType, isWS, isTT, StatusText, newTransferWriter, noResponseBodyExpected, bodyAllowedForStatus, suppressedHeaders, readTransfer, chunked, isIdentity, isUnsupportedTEError, fixLength, shouldClose, fixTrailer, seeUpcomingDoubleCRLF, mergeSetHeader, parseContentLength, isKnownInMemoryReader, cloneTLSConfig;
|
|
114935
114928
|
bufio = $packages["bufio"];
|
|
114936
114929
|
bytes = $packages["bytes"];
|
|
114937
114930
|
gzip = $packages["compress/gzip"];
|
|
@@ -115873,10 +115866,10 @@ $packages["net/http"] = (function() {
|
|
|
115873
115866
|
this.state = 0;
|
|
115874
115867
|
this.bytes = new $Int64(0, 0);
|
|
115875
115868
|
this.subtreeBytes = new $Int64(0, 0);
|
|
115876
|
-
this.parent = ptrType$
|
|
115877
|
-
this.kids = ptrType$
|
|
115878
|
-
this.prev = ptrType$
|
|
115879
|
-
this.next = ptrType$
|
|
115869
|
+
this.parent = ptrType$83.nil;
|
|
115870
|
+
this.kids = ptrType$83.nil;
|
|
115871
|
+
this.prev = ptrType$83.nil;
|
|
115872
|
+
this.next = ptrType$83.nil;
|
|
115880
115873
|
return;
|
|
115881
115874
|
}
|
|
115882
115875
|
this.q = q_;
|
|
@@ -115894,7 +115887,7 @@ $packages["net/http"] = (function() {
|
|
|
115894
115887
|
http2priorityWriteScheduler = $pkg.http2priorityWriteScheduler = $newType(0, $kindStruct, "http.http2priorityWriteScheduler", true, "net/http", false, function(root_, nodes_, maxID_, closedNodes_, idleNodes_, maxClosedNodesInTree_, maxIdleNodesInTree_, writeThrottleLimit_, enableWriteThrottle_, tmp_, queuePool_) {
|
|
115895
115888
|
this.$val = this;
|
|
115896
115889
|
if (arguments.length === 0) {
|
|
115897
|
-
this.root = new http2priorityNode.ptr(new http2writeQueue.ptr(sliceType$24.nil), 0, 0, 0, new $Int64(0, 0), new $Int64(0, 0), ptrType$
|
|
115890
|
+
this.root = new http2priorityNode.ptr(new http2writeQueue.ptr(sliceType$24.nil), 0, 0, 0, new $Int64(0, 0), new $Int64(0, 0), ptrType$83.nil, ptrType$83.nil, ptrType$83.nil, ptrType$83.nil);
|
|
115898
115891
|
this.nodes = false;
|
|
115899
115892
|
this.maxID = 0;
|
|
115900
115893
|
this.closedNodes = sliceType$25.nil;
|
|
@@ -116108,8 +116101,8 @@ $packages["net/http"] = (function() {
|
|
|
116108
116101
|
this.remoteAddr = "";
|
|
116109
116102
|
this.tlsState = ptrType$21.nil;
|
|
116110
116103
|
this.werr = $ifaceNil;
|
|
116111
|
-
this.r = ptrType$
|
|
116112
|
-
this.bufr = ptrType$
|
|
116104
|
+
this.r = ptrType$94.nil;
|
|
116105
|
+
this.bufr = ptrType$77.nil;
|
|
116113
116106
|
this.bufw = ptrType$9.nil;
|
|
116114
116107
|
this.lastMethod = "";
|
|
116115
116108
|
this.curReq = new atomic.Value.ptr($ifaceNil);
|
|
@@ -116136,7 +116129,7 @@ $packages["net/http"] = (function() {
|
|
|
116136
116129
|
chunkWriter = $pkg.chunkWriter = $newType(0, $kindStruct, "http.chunkWriter", true, "net/http", false, function(res_, header_, wroteHeader_, chunking_) {
|
|
116137
116130
|
this.$val = this;
|
|
116138
116131
|
if (arguments.length === 0) {
|
|
116139
|
-
this.res = ptrType$
|
|
116132
|
+
this.res = ptrType$95.nil;
|
|
116140
116133
|
this.header = false;
|
|
116141
116134
|
this.wroteHeader = false;
|
|
116142
116135
|
this.chunking = false;
|
|
@@ -116150,7 +116143,7 @@ $packages["net/http"] = (function() {
|
|
|
116150
116143
|
response = $pkg.response = $newType(0, $kindStruct, "http.response", true, "net/http", false, function(conn_, req_, reqBody_, cancelCtx_, wroteHeader_, wroteContinue_, wants10KeepAlive_, wantsClose_, canWriteContinue_, writeContinueMu_, w_, cw_, handlerHeader_, calledHeader_, written_, contentLength_, status_, closeAfterReply_, requestBodyLimitHit_, trailers_, handlerDone_, dateBuf_, clenBuf_, statusBuf_, closeNotifyCh_, didCloseNotify_) {
|
|
116151
116144
|
this.$val = this;
|
|
116152
116145
|
if (arguments.length === 0) {
|
|
116153
|
-
this.conn = ptrType$
|
|
116146
|
+
this.conn = ptrType$98.nil;
|
|
116154
116147
|
this.req = ptrType$6.nil;
|
|
116155
116148
|
this.reqBody = $ifaceNil;
|
|
116156
116149
|
this.cancelCtx = $throwNilPointerError;
|
|
@@ -116161,7 +116154,7 @@ $packages["net/http"] = (function() {
|
|
|
116161
116154
|
this.canWriteContinue = 0;
|
|
116162
116155
|
this.writeContinueMu = new sync.Mutex.ptr(0, 0);
|
|
116163
116156
|
this.w = ptrType$9.nil;
|
|
116164
|
-
this.cw = new chunkWriter.ptr(ptrType$
|
|
116157
|
+
this.cw = new chunkWriter.ptr(ptrType$95.nil, false, false, false);
|
|
116165
116158
|
this.handlerHeader = false;
|
|
116166
116159
|
this.calledHeader = false;
|
|
116167
116160
|
this.written = new $Int64(0, 0);
|
|
@@ -116231,11 +116224,11 @@ $packages["net/http"] = (function() {
|
|
|
116231
116224
|
connReader = $pkg.connReader = $newType(0, $kindStruct, "http.connReader", true, "net/http", false, function(conn_, mu_, hasByte_, byteBuf_, cond_, inRead_, aborted_, remain_) {
|
|
116232
116225
|
this.$val = this;
|
|
116233
116226
|
if (arguments.length === 0) {
|
|
116234
|
-
this.conn = ptrType$
|
|
116227
|
+
this.conn = ptrType$98.nil;
|
|
116235
116228
|
this.mu = new sync.Mutex.ptr(0, 0);
|
|
116236
116229
|
this.hasByte = false;
|
|
116237
116230
|
this.byteBuf = arrayType$6.zero();
|
|
116238
|
-
this.cond = ptrType$
|
|
116231
|
+
this.cond = ptrType$73.nil;
|
|
116239
116232
|
this.inRead = false;
|
|
116240
116233
|
this.aborted = false;
|
|
116241
116234
|
this.remain = new $Int64(0, 0);
|
|
@@ -116253,7 +116246,7 @@ $packages["net/http"] = (function() {
|
|
|
116253
116246
|
expectContinueReader = $pkg.expectContinueReader = $newType(0, $kindStruct, "http.expectContinueReader", true, "net/http", false, function(resp_, readCloser_, closed_, sawEOF_) {
|
|
116254
116247
|
this.$val = this;
|
|
116255
116248
|
if (arguments.length === 0) {
|
|
116256
|
-
this.resp = ptrType$
|
|
116249
|
+
this.resp = ptrType$95.nil;
|
|
116257
116250
|
this.readCloser = $ifaceNil;
|
|
116258
116251
|
this.closed = 0;
|
|
116259
116252
|
this.sawEOF = 0;
|
|
@@ -116407,7 +116400,7 @@ $packages["net/http"] = (function() {
|
|
|
116407
116400
|
this.$val = this;
|
|
116408
116401
|
if (arguments.length === 0) {
|
|
116409
116402
|
this.ctx = $ifaceNil;
|
|
116410
|
-
this.c = ptrType$
|
|
116403
|
+
this.c = ptrType$76.nil;
|
|
116411
116404
|
this.h = new serverHandler.ptr(ptrType$51.nil);
|
|
116412
116405
|
return;
|
|
116413
116406
|
}
|
|
@@ -116428,7 +116421,7 @@ $packages["net/http"] = (function() {
|
|
|
116428
116421
|
checkConnErrorWriter = $pkg.checkConnErrorWriter = $newType(0, $kindStruct, "http.checkConnErrorWriter", true, "net/http", false, function(c_) {
|
|
116429
116422
|
this.$val = this;
|
|
116430
116423
|
if (arguments.length === 0) {
|
|
116431
|
-
this.c = ptrType$
|
|
116424
|
+
this.c = ptrType$98.nil;
|
|
116432
116425
|
return;
|
|
116433
116426
|
}
|
|
116434
116427
|
this.c = c_;
|
|
@@ -116560,7 +116553,7 @@ $packages["net/http"] = (function() {
|
|
|
116560
116553
|
if (arguments.length === 0) {
|
|
116561
116554
|
this.src = $ifaceNil;
|
|
116562
116555
|
this.hdr = $ifaceNil;
|
|
116563
|
-
this.r = ptrType$
|
|
116556
|
+
this.r = ptrType$77.nil;
|
|
116564
116557
|
this.closing = false;
|
|
116565
116558
|
this.doEarlyClose = false;
|
|
116566
116559
|
this.mu = new sync.Mutex.ptr(0, 0);
|
|
@@ -116584,7 +116577,7 @@ $packages["net/http"] = (function() {
|
|
|
116584
116577
|
bodyLocked = $pkg.bodyLocked = $newType(0, $kindStruct, "http.bodyLocked", true, "net/http", false, function(b_) {
|
|
116585
116578
|
this.$val = this;
|
|
116586
116579
|
if (arguments.length === 0) {
|
|
116587
|
-
this.b = ptrType$
|
|
116580
|
+
this.b = ptrType$97.nil;
|
|
116588
116581
|
return;
|
|
116589
116582
|
}
|
|
116590
116583
|
this.b = b_;
|
|
@@ -116706,41 +116699,41 @@ $packages["net/http"] = (function() {
|
|
|
116706
116699
|
ptrType$70 = $ptrType(http2responseWriterState);
|
|
116707
116700
|
ptrType$71 = $ptrType(http2sorter);
|
|
116708
116701
|
ptrType$72 = $ptrType(PushOptions);
|
|
116709
|
-
ptrType$
|
|
116710
|
-
ptrType$
|
|
116702
|
+
ptrType$73 = $ptrType(sync.Cond);
|
|
116703
|
+
ptrType$76 = $ptrType(tls.Conn);
|
|
116704
|
+
ptrType$77 = $ptrType(bufio.Reader);
|
|
116711
116705
|
sliceType$23 = $sliceType(http2Setting);
|
|
116712
|
-
ptrType$
|
|
116713
|
-
sliceType$24 = $sliceType(http2FrameWriteRequest);
|
|
116714
|
-
ptrType$80 = $ptrType(http2writeQueue);
|
|
116715
|
-
ptrType$81 = $ptrType(http2PriorityWriteSchedulerConfig);
|
|
116716
|
-
ptrType$82 = $ptrType(http2priorityNode);
|
|
116717
|
-
sliceType$25 = $sliceType(ptrType$82);
|
|
116718
|
-
ptrType$83 = $ptrType(http2writeQueuePool);
|
|
116719
|
-
ptrType$84 = $ptrType(sliceType$25);
|
|
116720
|
-
ptrType$85 = $ptrType(headerSorter);
|
|
116721
|
-
ptrType$86 = $ptrType(multipart.Reader);
|
|
116722
|
-
ptrType$87 = $ptrType(bytes.Reader);
|
|
116723
|
-
ptrType$88 = $ptrType(strings.Reader);
|
|
116724
|
-
ptrType$89 = $ptrType(textproto.Reader);
|
|
116725
|
-
ptrType$90 = $ptrType(maxBytesReader);
|
|
116706
|
+
ptrType$78 = $ptrType(Header);
|
|
116726
116707
|
arrayType$6 = $arrayType($Uint8, 1);
|
|
116708
|
+
sliceType$24 = $sliceType(http2FrameWriteRequest);
|
|
116709
|
+
ptrType$81 = $ptrType(http2writeQueue);
|
|
116710
|
+
ptrType$82 = $ptrType(http2PriorityWriteSchedulerConfig);
|
|
116711
|
+
ptrType$83 = $ptrType(http2priorityNode);
|
|
116712
|
+
sliceType$25 = $sliceType(ptrType$83);
|
|
116713
|
+
ptrType$84 = $ptrType(http2writeQueuePool);
|
|
116714
|
+
ptrType$85 = $ptrType(sliceType$25);
|
|
116715
|
+
ptrType$86 = $ptrType(headerSorter);
|
|
116716
|
+
ptrType$87 = $ptrType(multipart.Reader);
|
|
116717
|
+
ptrType$88 = $ptrType(bytes.Reader);
|
|
116718
|
+
ptrType$89 = $ptrType(strings.Reader);
|
|
116719
|
+
ptrType$90 = $ptrType(textproto.Reader);
|
|
116720
|
+
ptrType$91 = $ptrType(maxBytesReader);
|
|
116727
116721
|
sliceType$26 = $sliceType(io.Reader);
|
|
116728
116722
|
structType$1 = $structType("", [{prop: "Reader", name: "Reader", embedded: true, exported: true, typ: io.Reader, tag: ""}, {prop: "Closer", name: "Closer", embedded: true, exported: true, typ: io.Closer, tag: ""}]);
|
|
116729
|
-
ptrType$
|
|
116730
|
-
ptrType$
|
|
116731
|
-
ptrType$
|
|
116723
|
+
ptrType$92 = $ptrType(bufio.ReadWriter);
|
|
116724
|
+
ptrType$93 = $ptrType($Int32);
|
|
116725
|
+
ptrType$94 = $ptrType(connReader);
|
|
116732
116726
|
structType$2 = $structType("net/http", [{prop: "atomic", name: "atomic", embedded: false, exported: false, typ: $Uint64, tag: ""}]);
|
|
116733
|
-
ptrType$
|
|
116734
|
-
ptrType$
|
|
116735
|
-
ptrType$
|
|
116736
|
-
ptrType$
|
|
116727
|
+
ptrType$95 = $ptrType(response);
|
|
116728
|
+
ptrType$96 = $ptrType(sync.Pool);
|
|
116729
|
+
ptrType$97 = $ptrType(body);
|
|
116730
|
+
ptrType$98 = $ptrType(conn);
|
|
116737
116731
|
arrayType$7 = $arrayType($Uint8, 10);
|
|
116738
116732
|
arrayType$8 = $arrayType($Uint8, 3);
|
|
116739
116733
|
sliceType$27 = $sliceType($Uintptr);
|
|
116740
|
-
ptrType$
|
|
116741
|
-
ptrType$
|
|
116742
|
-
ptrType$
|
|
116743
|
-
ptrType$101 = $ptrType(tls.Conn);
|
|
116734
|
+
ptrType$99 = $ptrType(runtime.Func);
|
|
116735
|
+
ptrType$100 = $ptrType(expectContinueReader);
|
|
116736
|
+
ptrType$101 = $ptrType($Uint64);
|
|
116744
116737
|
arrayType$9 = $arrayType($Uint8, 5);
|
|
116745
116738
|
ptrType$102 = $ptrType(net.Listener);
|
|
116746
116739
|
ptrType$105 = $ptrType(transferWriter);
|
|
@@ -116771,11 +116764,11 @@ $packages["net/http"] = (function() {
|
|
|
116771
116764
|
ptrType$123 = $ptrType(http2writeGoAway);
|
|
116772
116765
|
funcType$12 = $funcType([], [$Uint32, $error], false);
|
|
116773
116766
|
ptrType$124 = $ptrType(http2FrameWriteRequest);
|
|
116774
|
-
funcType$13 = $funcType([ptrType$
|
|
116767
|
+
funcType$13 = $funcType([ptrType$83, $Bool], [$Bool], false);
|
|
116775
116768
|
ptrType$125 = $ptrType(http2priorityWriteScheduler);
|
|
116776
|
-
mapType$10 = $mapType($Uint32, ptrType$
|
|
116769
|
+
mapType$10 = $mapType($Uint32, ptrType$83);
|
|
116777
116770
|
ptrType$126 = $ptrType(http2randomWriteScheduler);
|
|
116778
|
-
mapType$11 = $mapType($Uint32, ptrType$
|
|
116771
|
+
mapType$11 = $mapType($Uint32, ptrType$81);
|
|
116779
116772
|
mapType$12 = $mapType($String, $Bool);
|
|
116780
116773
|
ptrType$127 = $ptrType(contextKey);
|
|
116781
116774
|
ptrType$128 = $ptrType(ProtocolError);
|
|
@@ -116784,19 +116777,19 @@ $packages["net/http"] = (function() {
|
|
|
116784
116777
|
ptrType$132 = $ptrType(redirectHandler);
|
|
116785
116778
|
ptrType$133 = $ptrType(ServeMux);
|
|
116786
116779
|
mapType$13 = $mapType($String, muxEntry);
|
|
116787
|
-
funcType$15 = $funcType([ptrType$51, ptrType$
|
|
116780
|
+
funcType$15 = $funcType([ptrType$51, ptrType$76, Handler], [], false);
|
|
116788
116781
|
mapType$14 = $mapType($String, funcType$15);
|
|
116789
116782
|
funcType$16 = $funcType([net.Conn, ConnState], [], false);
|
|
116790
116783
|
funcType$17 = $funcType([net.Listener], [context.Context], false);
|
|
116791
116784
|
funcType$18 = $funcType([context.Context, net.Conn], [context.Context], false);
|
|
116792
116785
|
mapType$15 = $mapType(ptrType$102, structType);
|
|
116793
|
-
mapType$16 = $mapType(ptrType$
|
|
116786
|
+
mapType$16 = $mapType(ptrType$98, structType);
|
|
116794
116787
|
ptrType$135 = $ptrType(onceCloseListener);
|
|
116795
116788
|
ptrType$136 = $ptrType(loggingConn);
|
|
116796
116789
|
ptrType$137 = $ptrType(exactSig);
|
|
116797
116790
|
ptrType$138 = $ptrType(maskedSig);
|
|
116798
116791
|
ptrType$141 = $ptrType(byteReader);
|
|
116799
|
-
chanType$
|
|
116792
|
+
chanType$11 = $chanType(readResult, false, false);
|
|
116800
116793
|
ptrType$142 = $ptrType(transferReader);
|
|
116801
116794
|
basicAuth = function(username, password) {
|
|
116802
116795
|
var auth, password, username;
|
|
@@ -117352,6 +117345,60 @@ $packages["net/http"] = (function() {
|
|
|
117352
117345
|
$s = -1; return _r$2 < 0;
|
|
117353
117346
|
/* */ } return; } if ($f === undefined) { $f = { $blk: isCookieNameValid }; } $f._r$2 = _r$2; $f.raw = raw; $f.$s = $s; $f.$r = $r; return $f;
|
|
117354
117347
|
};
|
|
117348
|
+
http2asciiEqualFold = function(s, t) {
|
|
117349
|
+
var i, s, t;
|
|
117350
|
+
if (!((s.length === t.length))) {
|
|
117351
|
+
return false;
|
|
117352
|
+
}
|
|
117353
|
+
i = 0;
|
|
117354
|
+
while (true) {
|
|
117355
|
+
if (!(i < s.length)) { break; }
|
|
117356
|
+
if (!((http2lower(s.charCodeAt(i)) === http2lower(t.charCodeAt(i))))) {
|
|
117357
|
+
return false;
|
|
117358
|
+
}
|
|
117359
|
+
i = i + (1) >> 0;
|
|
117360
|
+
}
|
|
117361
|
+
return true;
|
|
117362
|
+
};
|
|
117363
|
+
http2lower = function(b) {
|
|
117364
|
+
var b;
|
|
117365
|
+
if (65 <= b && b <= 90) {
|
|
117366
|
+
return b + 32 << 24 >>> 24;
|
|
117367
|
+
}
|
|
117368
|
+
return b;
|
|
117369
|
+
};
|
|
117370
|
+
http2isASCIIPrint = function(s) {
|
|
117371
|
+
var i, s;
|
|
117372
|
+
i = 0;
|
|
117373
|
+
while (true) {
|
|
117374
|
+
if (!(i < s.length)) { break; }
|
|
117375
|
+
if (s.charCodeAt(i) < 32 || s.charCodeAt(i) > 126) {
|
|
117376
|
+
return false;
|
|
117377
|
+
}
|
|
117378
|
+
i = i + (1) >> 0;
|
|
117379
|
+
}
|
|
117380
|
+
return true;
|
|
117381
|
+
};
|
|
117382
|
+
http2asciiToLower = function(s) {
|
|
117383
|
+
var _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, lower, ok, s, $s, $r;
|
|
117384
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; lower = $f.lower; ok = $f.ok; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
117385
|
+
lower = "";
|
|
117386
|
+
ok = false;
|
|
117387
|
+
if (!http2isASCIIPrint(s)) {
|
|
117388
|
+
_tmp = "";
|
|
117389
|
+
_tmp$1 = false;
|
|
117390
|
+
lower = _tmp;
|
|
117391
|
+
ok = _tmp$1;
|
|
117392
|
+
$s = -1; return [lower, ok];
|
|
117393
|
+
}
|
|
117394
|
+
_r$2 = strings.ToLower(s); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
117395
|
+
_tmp$2 = _r$2;
|
|
117396
|
+
_tmp$3 = true;
|
|
117397
|
+
lower = _tmp$2;
|
|
117398
|
+
ok = _tmp$3;
|
|
117399
|
+
$s = -1; return [lower, ok];
|
|
117400
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: http2asciiToLower }; } $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f.lower = lower; $f.ok = ok; $f.s = s; $f.$s = $s; $f.$r = $r; return $f;
|
|
117401
|
+
};
|
|
117355
117402
|
http2isBadCipher = function(cipher) {
|
|
117356
117403
|
var _1, cipher;
|
|
117357
117404
|
_1 = cipher;
|
|
@@ -118432,7 +118479,7 @@ $packages["net/http"] = (function() {
|
|
|
118432
118479
|
return [_, err];
|
|
118433
118480
|
}
|
|
118434
118481
|
}
|
|
118435
|
-
if ((p.$length - ((padLength >> 0)) >> 0)
|
|
118482
|
+
if ((p.$length - ((padLength >> 0)) >> 0) < 0) {
|
|
118436
118483
|
_tmp$6 = $ifaceNil;
|
|
118437
118484
|
_tmp$7 = (x$5 = http2streamError(fh.StreamID, 1), new x$5.constructor.elem(x$5));
|
|
118438
118485
|
_ = _tmp$6;
|
|
@@ -119260,18 +119307,27 @@ $packages["net/http"] = (function() {
|
|
|
119260
119307
|
/* */ } return; } if ($f === undefined) { $f = { $blk: http2buildCommonHeaderMaps }; } $f._i = _i; $f._key = _key; $f._key$1 = _key$1; $f._r$2 = _r$2; $f._ref = _ref; $f.chk = chk; $f.common = common; $f.v = v; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f;
|
|
119261
119308
|
};
|
|
119262
119309
|
http2lowerHeader = function(v) {
|
|
119263
|
-
var _entry, _r$2, _tuple, ok, s, v, $s, $r;
|
|
119264
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r$2 = $f._r$2; _tuple = $f._tuple; ok = $f.ok; s = $f.s; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
119310
|
+
var _entry, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, ascii, lower, ok, s, v, $s, $r;
|
|
119311
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; ascii = $f.ascii; lower = $f.lower; ok = $f.ok; s = $f.s; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
119312
|
+
lower = "";
|
|
119313
|
+
ascii = false;
|
|
119265
119314
|
$r = http2buildCommonHeaderMapsOnce(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
119266
119315
|
_tuple = (_entry = http2commonLowerHeader[$String.keyFor(v)], _entry !== undefined ? [_entry.v, true] : ["", false]);
|
|
119267
119316
|
s = _tuple[0];
|
|
119268
119317
|
ok = _tuple[1];
|
|
119269
119318
|
if (ok) {
|
|
119270
|
-
|
|
119319
|
+
_tmp = s;
|
|
119320
|
+
_tmp$1 = true;
|
|
119321
|
+
lower = _tmp;
|
|
119322
|
+
ascii = _tmp$1;
|
|
119323
|
+
$s = -1; return [lower, ascii];
|
|
119271
119324
|
}
|
|
119272
|
-
_r$2 =
|
|
119273
|
-
$
|
|
119274
|
-
|
|
119325
|
+
_r$2 = http2asciiToLower(v); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
119326
|
+
_tuple$1 = _r$2;
|
|
119327
|
+
lower = _tuple$1[0];
|
|
119328
|
+
ascii = _tuple$1[1];
|
|
119329
|
+
$s = -1; return [lower, ascii];
|
|
119330
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: http2lowerHeader }; } $f._entry = _entry; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.ascii = ascii; $f.lower = lower; $f.ok = ok; $f.s = s; $f.v = v; $f.$s = $s; $f.$r = $r; return $f;
|
|
119275
119331
|
};
|
|
119276
119332
|
init = function() {
|
|
119277
119333
|
var _r$2, e, $s, $r;
|
|
@@ -119838,8 +119894,8 @@ $packages["net/http"] = (function() {
|
|
|
119838
119894
|
};
|
|
119839
119895
|
http2serverInternalState.prototype.startGracefulShutdown = function() { return this.$val.startGracefulShutdown(); };
|
|
119840
119896
|
http2ConfigureServer = function(s, conf) {
|
|
119841
|
-
var _1, _i,
|
|
119842
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _i = $f._i;
|
|
119897
|
+
var _1, _i, _key, _r$2, _r$3, _ref, _tmp, _tmp$1, conf, cs, h1, h2, haveRequired, i, protoHandler, s, sawBad, x$4, x$5, $s, $r;
|
|
119898
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _i = $f._i; _key = $f._key; _r$2 = $f._r$2; _r$3 = $f._r$3; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; conf = $f.conf; cs = $f.cs; h1 = $f.h1; h2 = $f.h2; haveRequired = $f.haveRequired; i = $f.i; protoHandler = $f.protoHandler; s = $f.s; sawBad = $f.sawBad; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
119843
119899
|
conf = [conf];
|
|
119844
119900
|
if (s === ptrType$51.nil) {
|
|
119845
119901
|
$panic(new $String("nil *http.Server"));
|
|
@@ -119899,21 +119955,12 @@ $packages["net/http"] = (function() {
|
|
|
119899
119955
|
/* } */ case 12:
|
|
119900
119956
|
/* } */ case 4:
|
|
119901
119957
|
s.TLSConfig.PreferServerCipherSuites = true;
|
|
119902
|
-
|
|
119903
|
-
_ref$1 = s.TLSConfig.NextProtos;
|
|
119904
|
-
_i$1 = 0;
|
|
119905
|
-
while (true) {
|
|
119906
|
-
if (!(_i$1 < _ref$1.$length)) { break; }
|
|
119907
|
-
p = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]);
|
|
119908
|
-
if (p === "h2") {
|
|
119909
|
-
haveNPN = true;
|
|
119910
|
-
break;
|
|
119911
|
-
}
|
|
119912
|
-
_i$1++;
|
|
119913
|
-
}
|
|
119914
|
-
if (!haveNPN) {
|
|
119958
|
+
if (!http2strSliceContains(s.TLSConfig.NextProtos, "h2")) {
|
|
119915
119959
|
s.TLSConfig.NextProtos = $append(s.TLSConfig.NextProtos, "h2");
|
|
119916
119960
|
}
|
|
119961
|
+
if (!http2strSliceContains(s.TLSConfig.NextProtos, "http/1.1")) {
|
|
119962
|
+
s.TLSConfig.NextProtos = $append(s.TLSConfig.NextProtos, "http/1.1");
|
|
119963
|
+
}
|
|
119917
119964
|
if (s.TLSNextProto === false) {
|
|
119918
119965
|
s.TLSNextProto = $makeMap($String.keyFor, []);
|
|
119919
119966
|
}
|
|
@@ -119941,7 +119988,7 @@ $packages["net/http"] = (function() {
|
|
|
119941
119988
|
}; })(conf);
|
|
119942
119989
|
_key = "h2"; (s.TLSNextProto || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: protoHandler };
|
|
119943
119990
|
$s = -1; return $ifaceNil;
|
|
119944
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: http2ConfigureServer }; } $f._1 = _1; $f._i = _i; $f.
|
|
119991
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: http2ConfigureServer }; } $f._1 = _1; $f._i = _i; $f._key = _key; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.conf = conf; $f.cs = cs; $f.h1 = h1; $f.h2 = h2; $f.haveRequired = haveRequired; $f.i = i; $f.protoHandler = protoHandler; $f.s = s; $f.sawBad = sawBad; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f;
|
|
119945
119992
|
};
|
|
119946
119993
|
http2ServeConnOpts.ptr.prototype.context = function() {
|
|
119947
119994
|
var o;
|
|
@@ -120301,7 +120348,9 @@ $packages["net/http"] = (function() {
|
|
|
120301
120348
|
}
|
|
120302
120349
|
_r$2 = CanonicalHeaderKey(v); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
120303
120350
|
cv = _r$2;
|
|
120304
|
-
|
|
120351
|
+
if ($keys(sc.canonHeader).length < 32) {
|
|
120352
|
+
_key = v; (sc.canonHeader || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: cv };
|
|
120353
|
+
}
|
|
120305
120354
|
$s = -1; return cv;
|
|
120306
120355
|
/* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.canonicalHeader }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._key = _key; $f._r$2 = _r$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.cv = cv; $f.ok = ok; $f.sc = sc; $f.v = v; $f.$s = $s; $f.$r = $r; return $f;
|
|
120307
120356
|
};
|
|
@@ -121430,11 +121479,11 @@ $packages["net/http"] = (function() {
|
|
|
121430
121479
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; data = $f.data; err = $f.err; f = $f.f; id = $f.id; pad = $f.pad; sc = $f.sc; st = $f.st; state = $f.state; wrote = $f.wrote; x$10 = $f.x$10; x$11 = $f.x$11; x$12 = $f.x$12; x$13 = $f.x$13; x$14 = $f.x$14; x$15 = $f.x$15; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; x$9 = $f.x$9; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
121431
121480
|
sc = this;
|
|
121432
121481
|
$r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
121433
|
-
|
|
121482
|
+
id = $clone(f.http2FrameHeader, http2FrameHeader).Header().StreamID;
|
|
121483
|
+
if (sc.inGoAway && (!((sc.goAwayCode === 0)) || id > sc.maxClientStreamID)) {
|
|
121434
121484
|
$s = -1; return $ifaceNil;
|
|
121435
121485
|
}
|
|
121436
121486
|
data = f.Data();
|
|
121437
|
-
id = $clone(f.http2FrameHeader, http2FrameHeader).Header().StreamID;
|
|
121438
121487
|
_r$2 = sc.state(id); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
121439
121488
|
_tuple = _r$2;
|
|
121440
121489
|
state = _tuple[0];
|
|
@@ -122633,8 +122682,8 @@ $packages["net/http"] = (function() {
|
|
|
122633
122682
|
};
|
|
122634
122683
|
http2responseWriter.prototype.handlerDone = function() { return this.$val.handlerDone(); };
|
|
122635
122684
|
http2responseWriter.ptr.prototype.Push = function(target, opts) {
|
|
122636
|
-
var
|
|
122637
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true;
|
|
122685
|
+
var _entry, _i, _keys, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _selection, _selection$1, _tuple, err, err$1, err$2, k, msg, opts, sc, st, target, u, w, wantScheme, $s, $r;
|
|
122686
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _selection = $f._selection; _selection$1 = $f._selection$1; _tuple = $f._tuple; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; k = $f.k; msg = $f.msg; opts = $f.opts; sc = $f.sc; st = $f.st; target = $f.target; u = $f.u; w = $f.w; wantScheme = $f.wantScheme; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
122638
122687
|
w = this;
|
|
122639
122688
|
st = w.rws.stream;
|
|
122640
122689
|
sc = st.sc;
|
|
@@ -122702,44 +122751,41 @@ $packages["net/http"] = (function() {
|
|
|
122702
122751
|
_r$5 = fmt.Errorf("promised request headers cannot include pseudo header %q", new sliceType([new $String(k)])); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
|
|
122703
122752
|
$s = -1; return _r$5;
|
|
122704
122753
|
/* } */ case 15:
|
|
122705
|
-
|
|
122706
|
-
|
|
122707
|
-
|
|
122708
|
-
/* */ $s =
|
|
122709
|
-
|
|
122710
|
-
|
|
122711
|
-
$s = -1; return _r$7;
|
|
122712
|
-
/* } */ case 20:
|
|
122713
|
-
case 17:
|
|
122754
|
+
/* */ if (http2asciiEqualFold(k, "content-length") || http2asciiEqualFold(k, "content-encoding") || http2asciiEqualFold(k, "trailer") || http2asciiEqualFold(k, "te") || http2asciiEqualFold(k, "expect") || http2asciiEqualFold(k, "host")) { $s = 17; continue; }
|
|
122755
|
+
/* */ $s = 18; continue;
|
|
122756
|
+
/* if (http2asciiEqualFold(k, "content-length") || http2asciiEqualFold(k, "content-encoding") || http2asciiEqualFold(k, "trailer") || http2asciiEqualFold(k, "te") || http2asciiEqualFold(k, "expect") || http2asciiEqualFold(k, "host")) { */ case 17:
|
|
122757
|
+
_r$6 = fmt.Errorf("promised request headers cannot include %q", new sliceType([new $String(k)])); /* */ $s = 19; case 19: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
|
|
122758
|
+
$s = -1; return _r$6;
|
|
122759
|
+
/* } */ case 18:
|
|
122714
122760
|
_i++;
|
|
122715
122761
|
/* } */ $s = 12; continue; case 13:
|
|
122716
|
-
_r$
|
|
122717
|
-
err$1 = _r$
|
|
122762
|
+
_r$7 = http2checkValidHTTP2RequestHeaders(opts.Header); /* */ $s = 20; case 20: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
|
|
122763
|
+
err$1 = _r$7;
|
|
122718
122764
|
if (!($interfaceIsEqual(err$1, $ifaceNil))) {
|
|
122719
122765
|
$s = -1; return err$1;
|
|
122720
122766
|
}
|
|
122721
|
-
/* */ if (!(opts.Method === "GET") && !(opts.Method === "HEAD")) { $s =
|
|
122722
|
-
/* */ $s =
|
|
122723
|
-
/* if (!(opts.Method === "GET") && !(opts.Method === "HEAD")) { */ case
|
|
122724
|
-
_r$
|
|
122725
|
-
$s = -1; return _r$
|
|
122726
|
-
/* } */ case
|
|
122727
|
-
_r$
|
|
122728
|
-
msg = new http2startPushRequest.ptr(st, opts.Method, u, http2cloneHeader(opts.Header), $assertType(_r$
|
|
122729
|
-
_r$
|
|
122730
|
-
_selection = _r$
|
|
122731
|
-
/* */ if (_selection[0] === 0) { $s =
|
|
122732
|
-
/* */ if (_selection[0] === 1) { $s =
|
|
122733
|
-
/* */ if (_selection[0] === 2) { $s =
|
|
122734
|
-
/* */ $s =
|
|
122735
|
-
/* if (_selection[0] === 0) { */ case
|
|
122767
|
+
/* */ if (!(opts.Method === "GET") && !(opts.Method === "HEAD")) { $s = 21; continue; }
|
|
122768
|
+
/* */ $s = 22; continue;
|
|
122769
|
+
/* if (!(opts.Method === "GET") && !(opts.Method === "HEAD")) { */ case 21:
|
|
122770
|
+
_r$8 = fmt.Errorf("method %q must be GET or HEAD", new sliceType([new $String(opts.Method)])); /* */ $s = 23; case 23: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; }
|
|
122771
|
+
$s = -1; return _r$8;
|
|
122772
|
+
/* } */ case 22:
|
|
122773
|
+
_r$9 = http2errChanPool.Get(); /* */ $s = 24; case 24: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; }
|
|
122774
|
+
msg = new http2startPushRequest.ptr(st, opts.Method, u, http2cloneHeader(opts.Header), $assertType(_r$9, chanType));
|
|
122775
|
+
_r$10 = $select([[sc.doneServing], [st.cw], [sc.serveMsgCh, msg]]); /* */ $s = 25; case 25: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; }
|
|
122776
|
+
_selection = _r$10;
|
|
122777
|
+
/* */ if (_selection[0] === 0) { $s = 26; continue; }
|
|
122778
|
+
/* */ if (_selection[0] === 1) { $s = 27; continue; }
|
|
122779
|
+
/* */ if (_selection[0] === 2) { $s = 28; continue; }
|
|
122780
|
+
/* */ $s = 29; continue;
|
|
122781
|
+
/* if (_selection[0] === 0) { */ case 26:
|
|
122736
122782
|
$s = -1; return http2errClientDisconnected;
|
|
122737
|
-
/* } else if (_selection[0] === 1) { */ case
|
|
122783
|
+
/* } else if (_selection[0] === 1) { */ case 27:
|
|
122738
122784
|
$s = -1; return http2errStreamClosed;
|
|
122739
|
-
/* } else if (_selection[0] === 2) { */ case
|
|
122740
|
-
/* } */ case
|
|
122741
|
-
_r$
|
|
122742
|
-
_selection$1 = _r$
|
|
122785
|
+
/* } else if (_selection[0] === 2) { */ case 28:
|
|
122786
|
+
/* } */ case 29:
|
|
122787
|
+
_r$11 = $select([[sc.doneServing], [st.cw], [msg.done]]); /* */ $s = 30; case 30: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; }
|
|
122788
|
+
_selection$1 = _r$11;
|
|
122743
122789
|
if (_selection$1[0] === 0) {
|
|
122744
122790
|
$s = -1; return http2errClientDisconnected;
|
|
122745
122791
|
} else if (_selection$1[0] === 1) {
|
|
@@ -122750,7 +122796,7 @@ $packages["net/http"] = (function() {
|
|
|
122750
122796
|
$s = -1; return err$2;
|
|
122751
122797
|
}
|
|
122752
122798
|
$s = -1; return $ifaceNil;
|
|
122753
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: http2responseWriter.ptr.prototype.Push }; } $f.
|
|
122799
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: http2responseWriter.ptr.prototype.Push }; } $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._selection = _selection; $f._selection$1 = _selection$1; $f._tuple = _tuple; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.k = k; $f.msg = msg; $f.opts = opts; $f.sc = sc; $f.st = st; $f.target = target; $f.u = u; $f.w = w; $f.wantScheme = wantScheme; $f.$s = $s; $f.$r = $r; return $f;
|
|
122754
122800
|
};
|
|
122755
122801
|
http2responseWriter.prototype.Push = function(target, opts) { return this.$val.Push(target, opts); };
|
|
122756
122802
|
http2serverConn.ptr.prototype.startPush = function(msg) {
|
|
@@ -123243,8 +123289,8 @@ $packages["net/http"] = (function() {
|
|
|
123243
123289
|
};
|
|
123244
123290
|
http2writeWindowUpdate.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); };
|
|
123245
123291
|
http2encodeHeaders = function(enc, h, keys) {
|
|
123246
|
-
var _entry, _i, _i$1, _r$2, _r$3, _r$4, _ref, _ref$1, enc, h, isTE, k, keys, sorter, v, vv, $s, $deferred, $r;
|
|
123247
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _i$1 = $f._i$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _ref = $f._ref; _ref$1 = $f._ref$1; enc = $f.enc; h = $f.h; isTE = $f.isTE; k = $f.k; keys = $f.keys; sorter = $f.sorter; v = $f.v; vv = $f.vv; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred);
|
|
123292
|
+
var _entry, _i, _i$1, _r$2, _r$3, _r$4, _ref, _ref$1, _tuple, ascii, enc, h, isTE, k, k$1, keys, sorter, v, vv, $s, $deferred, $r;
|
|
123293
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _i$1 = $f._i$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _ref = $f._ref; _ref$1 = $f._ref$1; _tuple = $f._tuple; ascii = $f.ascii; enc = $f.enc; h = $f.h; isTE = $f.isTE; k = $f.k; k$1 = $f.k$1; keys = $f.keys; sorter = $f.sorter; v = $f.v; vv = $f.vv; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred);
|
|
123248
123294
|
/* */ if (keys === sliceType$2.nil) { $s = 1; continue; }
|
|
123249
123295
|
/* */ $s = 2; continue;
|
|
123250
123296
|
/* if (keys === sliceType$2.nil) { */ case 1:
|
|
@@ -123261,38 +123307,46 @@ $packages["net/http"] = (function() {
|
|
|
123261
123307
|
k = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
|
|
123262
123308
|
vv = (_entry = h[$String.keyFor(k)], _entry !== undefined ? _entry.v : sliceType$2.nil);
|
|
123263
123309
|
_r$4 = http2lowerHeader(k); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
123264
|
-
|
|
123265
|
-
|
|
123310
|
+
_tuple = _r$4;
|
|
123311
|
+
k$1 = _tuple[0];
|
|
123312
|
+
ascii = _tuple[1];
|
|
123313
|
+
/* */ if (!ascii) { $s = 8; continue; }
|
|
123266
123314
|
/* */ $s = 9; continue;
|
|
123267
|
-
/* if (!
|
|
123315
|
+
/* if (!ascii) { */ case 8:
|
|
123268
123316
|
_i++;
|
|
123269
123317
|
/* continue; */ $s = 5; continue;
|
|
123270
123318
|
/* } */ case 9:
|
|
123271
|
-
|
|
123319
|
+
/* */ if (!http2validWireHeaderFieldName(k$1)) { $s = 10; continue; }
|
|
123320
|
+
/* */ $s = 11; continue;
|
|
123321
|
+
/* if (!http2validWireHeaderFieldName(k$1)) { */ case 10:
|
|
123322
|
+
_i++;
|
|
123323
|
+
/* continue; */ $s = 5; continue;
|
|
123324
|
+
/* } */ case 11:
|
|
123325
|
+
isTE = k$1 === "transfer-encoding";
|
|
123272
123326
|
_ref$1 = vv;
|
|
123273
123327
|
_i$1 = 0;
|
|
123274
|
-
/* while (true) { */ case
|
|
123275
|
-
/* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s =
|
|
123328
|
+
/* while (true) { */ case 12:
|
|
123329
|
+
/* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 13; continue; }
|
|
123276
123330
|
v = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]);
|
|
123277
|
-
/* */ if (!httpguts.ValidHeaderFieldValue(v)) { $s =
|
|
123278
|
-
/* */ $s = 13; continue;
|
|
123279
|
-
/* if (!httpguts.ValidHeaderFieldValue(v)) { */ case 12:
|
|
123280
|
-
_i$1++;
|
|
123281
|
-
/* continue; */ $s = 10; continue;
|
|
123282
|
-
/* } */ case 13:
|
|
123283
|
-
/* */ if (isTE && !(v === "trailers")) { $s = 14; continue; }
|
|
123331
|
+
/* */ if (!httpguts.ValidHeaderFieldValue(v)) { $s = 14; continue; }
|
|
123284
123332
|
/* */ $s = 15; continue;
|
|
123285
|
-
/* if (
|
|
123333
|
+
/* if (!httpguts.ValidHeaderFieldValue(v)) { */ case 14:
|
|
123286
123334
|
_i$1++;
|
|
123287
|
-
/* continue; */ $s =
|
|
123335
|
+
/* continue; */ $s = 12; continue;
|
|
123288
123336
|
/* } */ case 15:
|
|
123289
|
-
|
|
123337
|
+
/* */ if (isTE && !(v === "trailers")) { $s = 16; continue; }
|
|
123338
|
+
/* */ $s = 17; continue;
|
|
123339
|
+
/* if (isTE && !(v === "trailers")) { */ case 16:
|
|
123340
|
+
_i$1++;
|
|
123341
|
+
/* continue; */ $s = 12; continue;
|
|
123342
|
+
/* } */ case 17:
|
|
123343
|
+
$r = http2encKV(enc, k$1, v); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
123290
123344
|
_i$1++;
|
|
123291
|
-
/* } */ $s =
|
|
123345
|
+
/* } */ $s = 12; continue; case 13:
|
|
123292
123346
|
_i++;
|
|
123293
123347
|
/* } */ $s = 5; continue; case 6:
|
|
123294
123348
|
$s = -1; return;
|
|
123295
|
-
/* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2encodeHeaders }; } $f._entry = _entry; $f._i = _i; $f._i$1 = _i$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._ref = _ref; $f._ref$1 = _ref$1; $f.enc = enc; $f.h = h; $f.isTE = isTE; $f.k = k; $f.keys = keys; $f.sorter = sorter; $f.v = v; $f.vv = vv; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } }
|
|
123349
|
+
/* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2encodeHeaders }; } $f._entry = _entry; $f._i = _i; $f._i$1 = _i$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._ref = _ref; $f._ref$1 = _ref$1; $f._tuple = _tuple; $f.ascii = ascii; $f.enc = enc; $f.h = h; $f.isTE = isTE; $f.k = k; $f.k$1 = k$1; $f.keys = keys; $f.sorter = sorter; $f.v = v; $f.vv = vv; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } }
|
|
123296
123350
|
};
|
|
123297
123351
|
http2FrameWriteRequest.ptr.prototype.StreamID = function() {
|
|
123298
123352
|
var _tuple, ok, se, wr;
|
|
@@ -123471,16 +123525,16 @@ $packages["net/http"] = (function() {
|
|
|
123471
123525
|
}
|
|
123472
123526
|
x$4 = ln - 1 >> 0;
|
|
123473
123527
|
q = (x$5 = p.$get(), ((x$4 < 0 || x$4 >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + x$4]));
|
|
123474
|
-
(x$6 = p.$get(), ((x$4 < 0 || x$4 >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + x$4] = ptrType$
|
|
123528
|
+
(x$6 = p.$get(), ((x$4 < 0 || x$4 >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + x$4] = ptrType$81.nil));
|
|
123475
123529
|
p.$set($subslice((p.$get()), 0, x$4));
|
|
123476
123530
|
return q;
|
|
123477
123531
|
};
|
|
123478
123532
|
http2NewPriorityWriteScheduler = function(cfg) {
|
|
123479
123533
|
var _key, cfg, ws;
|
|
123480
|
-
if (cfg === ptrType$
|
|
123534
|
+
if (cfg === ptrType$82.nil) {
|
|
123481
123535
|
cfg = new http2PriorityWriteSchedulerConfig.ptr(10, 10, false);
|
|
123482
123536
|
}
|
|
123483
|
-
ws = new http2priorityWriteScheduler.ptr(new http2priorityNode.ptr(new http2writeQueue.ptr(sliceType$24.nil), 0, 0, 0, new $Int64(0, 0), new $Int64(0, 0), ptrType$
|
|
123537
|
+
ws = new http2priorityWriteScheduler.ptr(new http2priorityNode.ptr(new http2writeQueue.ptr(sliceType$24.nil), 0, 0, 0, new $Int64(0, 0), new $Int64(0, 0), ptrType$83.nil, ptrType$83.nil, ptrType$83.nil, ptrType$83.nil), {}, 0, sliceType$25.nil, sliceType$25.nil, cfg.MaxClosedNodesInTree, cfg.MaxIdleNodesInTree, 0, cfg.ThrottleOutOfOrderWrites, sliceType$25.nil, http2writeQueuePool.nil);
|
|
123484
123538
|
_key = 0; (ws.nodes || $throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(_key)] = { k: _key, v: ws.root };
|
|
123485
123539
|
if (cfg.ThrottleOutOfOrderWrites) {
|
|
123486
123540
|
ws.writeThrottleLimit = 1024;
|
|
@@ -123499,24 +123553,24 @@ $packages["net/http"] = (function() {
|
|
|
123499
123553
|
return;
|
|
123500
123554
|
}
|
|
123501
123555
|
parent$1 = n.parent;
|
|
123502
|
-
if (!(parent$1 === ptrType$
|
|
123503
|
-
if (n.prev === ptrType$
|
|
123556
|
+
if (!(parent$1 === ptrType$83.nil)) {
|
|
123557
|
+
if (n.prev === ptrType$83.nil) {
|
|
123504
123558
|
parent$1.kids = n.next;
|
|
123505
123559
|
} else {
|
|
123506
123560
|
n.prev.next = n.next;
|
|
123507
123561
|
}
|
|
123508
|
-
if (!(n.next === ptrType$
|
|
123562
|
+
if (!(n.next === ptrType$83.nil)) {
|
|
123509
123563
|
n.next.prev = n.prev;
|
|
123510
123564
|
}
|
|
123511
123565
|
}
|
|
123512
123566
|
n.parent = parent;
|
|
123513
|
-
if (parent === ptrType$
|
|
123514
|
-
n.next = ptrType$
|
|
123515
|
-
n.prev = ptrType$
|
|
123567
|
+
if (parent === ptrType$83.nil) {
|
|
123568
|
+
n.next = ptrType$83.nil;
|
|
123569
|
+
n.prev = ptrType$83.nil;
|
|
123516
123570
|
} else {
|
|
123517
123571
|
n.next = parent.kids;
|
|
123518
|
-
n.prev = ptrType$
|
|
123519
|
-
if (!(n.next === ptrType$
|
|
123572
|
+
n.prev = ptrType$83.nil;
|
|
123573
|
+
if (!(n.next === ptrType$83.nil)) {
|
|
123520
123574
|
n.next.prev = n;
|
|
123521
123575
|
}
|
|
123522
123576
|
parent.kids = n;
|
|
@@ -123528,7 +123582,7 @@ $packages["net/http"] = (function() {
|
|
|
123528
123582
|
n = this;
|
|
123529
123583
|
n.bytes = (x$4 = n.bytes, x$5 = b, new $Int64(x$4.$high + x$5.$high, x$4.$low + x$5.$low));
|
|
123530
123584
|
while (true) {
|
|
123531
|
-
if (!(!(n === ptrType$
|
|
123585
|
+
if (!(!(n === ptrType$83.nil))) { break; }
|
|
123532
123586
|
n.subtreeBytes = (x$6 = n.subtreeBytes, x$7 = b, new $Int64(x$6.$high + x$7.$high, x$6.$low + x$7.$low));
|
|
123533
123587
|
n = n.parent;
|
|
123534
123588
|
}
|
|
@@ -123546,7 +123600,7 @@ $packages["net/http"] = (function() {
|
|
|
123546
123600
|
/* if (_v) { */ case 1:
|
|
123547
123601
|
$s = -1; return true;
|
|
123548
123602
|
/* } */ case 2:
|
|
123549
|
-
if (n.kids === ptrType$
|
|
123603
|
+
if (n.kids === ptrType$83.nil) {
|
|
123550
123604
|
$s = -1; return false;
|
|
123551
123605
|
}
|
|
123552
123606
|
if (!((n.id === 0))) {
|
|
@@ -123556,7 +123610,7 @@ $packages["net/http"] = (function() {
|
|
|
123556
123610
|
needSort = false;
|
|
123557
123611
|
k = n.kids.next;
|
|
123558
123612
|
while (true) {
|
|
123559
|
-
if (!(!(k === ptrType$
|
|
123613
|
+
if (!(!(k === ptrType$83.nil))) { break; }
|
|
123560
123614
|
if (!((k.weight === w))) {
|
|
123561
123615
|
needSort = true;
|
|
123562
123616
|
break;
|
|
@@ -123568,7 +123622,7 @@ $packages["net/http"] = (function() {
|
|
|
123568
123622
|
/* if (!needSort) { */ case 5:
|
|
123569
123623
|
k$1 = n.kids;
|
|
123570
123624
|
/* while (true) { */ case 7:
|
|
123571
|
-
/* if (!(!(k$1 === ptrType$
|
|
123625
|
+
/* if (!(!(k$1 === ptrType$83.nil))) { break; } */ if(!(!(k$1 === ptrType$83.nil))) { $s = 8; continue; }
|
|
123572
123626
|
_r$3 = k$1.walkReadyInOrder(openParent, tmp, f); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
123573
123627
|
/* */ if (_r$3) { $s = 9; continue; }
|
|
123574
123628
|
/* */ $s = 10; continue;
|
|
@@ -123581,9 +123635,9 @@ $packages["net/http"] = (function() {
|
|
|
123581
123635
|
/* } */ case 6:
|
|
123582
123636
|
tmp.$set($subslice((tmp.$get()), 0, 0));
|
|
123583
123637
|
while (true) {
|
|
123584
|
-
if (!(!(n.kids === ptrType$
|
|
123638
|
+
if (!(!(n.kids === ptrType$83.nil))) { break; }
|
|
123585
123639
|
tmp.$set($append(tmp.$get(), n.kids));
|
|
123586
|
-
n.kids.setParent(ptrType$
|
|
123640
|
+
n.kids.setParent(ptrType$83.nil);
|
|
123587
123641
|
}
|
|
123588
123642
|
$r = sort.Sort(((x$4 = tmp.$get(), $subslice(new http2sortPriorityNodeSiblings(x$4.$array), x$4.$offset, x$4.$offset + x$4.$length)))); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
123589
123643
|
i = tmp.$get().$length - 1 >> 0;
|
|
@@ -123594,7 +123648,7 @@ $packages["net/http"] = (function() {
|
|
|
123594
123648
|
}
|
|
123595
123649
|
k$2 = n.kids;
|
|
123596
123650
|
/* while (true) { */ case 13:
|
|
123597
|
-
/* if (!(!(k$2 === ptrType$
|
|
123651
|
+
/* if (!(!(k$2 === ptrType$83.nil))) { break; } */ if(!(!(k$2 === ptrType$83.nil))) { $s = 14; continue; }
|
|
123598
123652
|
_r$4 = k$2.walkReadyInOrder(openParent, tmp, f); /* */ $s = 17; case 17: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
123599
123653
|
/* */ if (_r$4) { $s = 15; continue; }
|
|
123600
123654
|
/* */ $s = 16; continue;
|
|
@@ -123646,10 +123700,10 @@ $packages["net/http"] = (function() {
|
|
|
123646
123700
|
var _entry, _entry$1, _key, _r$2, curr, n, options, parent, streamID, ws, $s, $r;
|
|
123647
123701
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _key = $f._key; _r$2 = $f._r$2; curr = $f.curr; n = $f.n; options = $f.options; parent = $f.parent; streamID = $f.streamID; ws = $f.ws; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
123648
123702
|
ws = this;
|
|
123649
|
-
curr = (_entry = ws.nodes[$Uint32.keyFor(streamID)], _entry !== undefined ? _entry.v : ptrType$
|
|
123650
|
-
/* */ if (!(curr === ptrType$
|
|
123703
|
+
curr = (_entry = ws.nodes[$Uint32.keyFor(streamID)], _entry !== undefined ? _entry.v : ptrType$83.nil);
|
|
123704
|
+
/* */ if (!(curr === ptrType$83.nil)) { $s = 1; continue; }
|
|
123651
123705
|
/* */ $s = 2; continue;
|
|
123652
|
-
/* if (!(curr === ptrType$
|
|
123706
|
+
/* if (!(curr === ptrType$83.nil)) { */ case 1:
|
|
123653
123707
|
/* */ if (!((curr.state === 2))) { $s = 3; continue; }
|
|
123654
123708
|
/* */ $s = 4; continue;
|
|
123655
123709
|
/* if (!((curr.state === 2))) { */ case 3:
|
|
@@ -123659,11 +123713,11 @@ $packages["net/http"] = (function() {
|
|
|
123659
123713
|
curr.state = 0;
|
|
123660
123714
|
$s = -1; return;
|
|
123661
123715
|
/* } */ case 2:
|
|
123662
|
-
parent = (_entry$1 = ws.nodes[$Uint32.keyFor(options.PusherID)], _entry$1 !== undefined ? _entry$1.v : ptrType$
|
|
123663
|
-
if (parent === ptrType$
|
|
123716
|
+
parent = (_entry$1 = ws.nodes[$Uint32.keyFor(options.PusherID)], _entry$1 !== undefined ? _entry$1.v : ptrType$83.nil);
|
|
123717
|
+
if (parent === ptrType$83.nil) {
|
|
123664
123718
|
parent = ws.root;
|
|
123665
123719
|
}
|
|
123666
|
-
n = new http2priorityNode.ptr($clone((ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$
|
|
123720
|
+
n = new http2priorityNode.ptr($clone((ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$84(function() { return this.$target.queuePool; }, function($v) { this.$target.queuePool = $v; }, ws))).get(), http2writeQueue), streamID, 15, 0, new $Int64(0, 0), new $Int64(0, 0), ptrType$83.nil, ptrType$83.nil, ptrType$83.nil, ptrType$83.nil);
|
|
123667
123721
|
n.setParent(parent);
|
|
123668
123722
|
_key = streamID; (ws.nodes || $throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(_key)] = { k: _key, v: n };
|
|
123669
123723
|
if (streamID > ws.maxID) {
|
|
@@ -123681,26 +123735,26 @@ $packages["net/http"] = (function() {
|
|
|
123681
123735
|
if (streamID === 0) {
|
|
123682
123736
|
$panic(new $String("violation of WriteScheduler interface: cannot close stream 0"));
|
|
123683
123737
|
}
|
|
123684
|
-
/* */ if ((_entry = ws.nodes[$Uint32.keyFor(streamID)], _entry !== undefined ? _entry.v : ptrType$
|
|
123738
|
+
/* */ if ((_entry = ws.nodes[$Uint32.keyFor(streamID)], _entry !== undefined ? _entry.v : ptrType$83.nil) === ptrType$83.nil) { $s = 1; continue; }
|
|
123685
123739
|
/* */ $s = 2; continue;
|
|
123686
|
-
/* if ((_entry = ws.nodes[$Uint32.keyFor(streamID)], _entry !== undefined ? _entry.v : ptrType$
|
|
123740
|
+
/* if ((_entry = ws.nodes[$Uint32.keyFor(streamID)], _entry !== undefined ? _entry.v : ptrType$83.nil) === ptrType$83.nil) { */ case 1:
|
|
123687
123741
|
_r$2 = fmt.Sprintf("violation of WriteScheduler interface: unknown stream %d", new sliceType([new $Uint32(streamID)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
123688
123742
|
$panic(new $String(_r$2));
|
|
123689
123743
|
/* } */ case 2:
|
|
123690
|
-
/* */ if (!(((_entry$1 = ws.nodes[$Uint32.keyFor(streamID)], _entry$1 !== undefined ? _entry$1.v : ptrType$
|
|
123744
|
+
/* */ if (!(((_entry$1 = ws.nodes[$Uint32.keyFor(streamID)], _entry$1 !== undefined ? _entry$1.v : ptrType$83.nil).state === 0))) { $s = 4; continue; }
|
|
123691
123745
|
/* */ $s = 5; continue;
|
|
123692
|
-
/* if (!(((_entry$1 = ws.nodes[$Uint32.keyFor(streamID)], _entry$1 !== undefined ? _entry$1.v : ptrType$
|
|
123746
|
+
/* if (!(((_entry$1 = ws.nodes[$Uint32.keyFor(streamID)], _entry$1 !== undefined ? _entry$1.v : ptrType$83.nil).state === 0))) { */ case 4:
|
|
123693
123747
|
_r$3 = fmt.Sprintf("violation of WriteScheduler interface: stream %d already closed", new sliceType([new $Uint32(streamID)])); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
123694
123748
|
$panic(new $String(_r$3));
|
|
123695
123749
|
/* } */ case 5:
|
|
123696
|
-
n = (_entry$2 = ws.nodes[$Uint32.keyFor(streamID)], _entry$2 !== undefined ? _entry$2.v : ptrType$
|
|
123750
|
+
n = (_entry$2 = ws.nodes[$Uint32.keyFor(streamID)], _entry$2 !== undefined ? _entry$2.v : ptrType$83.nil);
|
|
123697
123751
|
n.state = 1;
|
|
123698
123752
|
n.addBytes((x$4 = n.bytes, new $Int64(-x$4.$high, -x$4.$low)));
|
|
123699
123753
|
q[0] = $clone(n.q, http2writeQueue);
|
|
123700
|
-
(ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$
|
|
123754
|
+
(ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$84(function() { return this.$target.queuePool; }, function($v) { this.$target.queuePool = $v; }, ws))).put(q[0]);
|
|
123701
123755
|
n.q.s = sliceType$24.nil;
|
|
123702
123756
|
if (ws.maxClosedNodesInTree > 0) {
|
|
123703
|
-
ws.addClosedOrIdleNode((ws.$ptr_closedNodes || (ws.$ptr_closedNodes = new ptrType$
|
|
123757
|
+
ws.addClosedOrIdleNode((ws.$ptr_closedNodes || (ws.$ptr_closedNodes = new ptrType$85(function() { return this.$target.closedNodes; }, function($v) { this.$target.closedNodes = $v; }, ws))), ws.maxClosedNodesInTree, n);
|
|
123704
123758
|
} else {
|
|
123705
123759
|
ws.removeNode(n);
|
|
123706
123760
|
}
|
|
@@ -123714,19 +123768,19 @@ $packages["net/http"] = (function() {
|
|
|
123714
123768
|
if (streamID === 0) {
|
|
123715
123769
|
$panic(new $String("adjustPriority on root"));
|
|
123716
123770
|
}
|
|
123717
|
-
n = (_entry = ws.nodes[$Uint32.keyFor(streamID)], _entry !== undefined ? _entry.v : ptrType$
|
|
123718
|
-
if (n === ptrType$
|
|
123771
|
+
n = (_entry = ws.nodes[$Uint32.keyFor(streamID)], _entry !== undefined ? _entry.v : ptrType$83.nil);
|
|
123772
|
+
if (n === ptrType$83.nil) {
|
|
123719
123773
|
if (streamID <= ws.maxID || (ws.maxIdleNodesInTree === 0)) {
|
|
123720
123774
|
return;
|
|
123721
123775
|
}
|
|
123722
123776
|
ws.maxID = streamID;
|
|
123723
|
-
n = new http2priorityNode.ptr($clone((ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$
|
|
123777
|
+
n = new http2priorityNode.ptr($clone((ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$84(function() { return this.$target.queuePool; }, function($v) { this.$target.queuePool = $v; }, ws))).get(), http2writeQueue), streamID, 15, 2, new $Int64(0, 0), new $Int64(0, 0), ptrType$83.nil, ptrType$83.nil, ptrType$83.nil, ptrType$83.nil);
|
|
123724
123778
|
n.setParent(ws.root);
|
|
123725
123779
|
_key = streamID; (ws.nodes || $throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(_key)] = { k: _key, v: n };
|
|
123726
|
-
ws.addClosedOrIdleNode((ws.$ptr_idleNodes || (ws.$ptr_idleNodes = new ptrType$
|
|
123780
|
+
ws.addClosedOrIdleNode((ws.$ptr_idleNodes || (ws.$ptr_idleNodes = new ptrType$85(function() { return this.$target.idleNodes; }, function($v) { this.$target.idleNodes = $v; }, ws))), ws.maxIdleNodesInTree, n);
|
|
123727
123781
|
}
|
|
123728
|
-
parent = (_entry$1 = ws.nodes[$Uint32.keyFor(priority.StreamDep)], _entry$1 !== undefined ? _entry$1.v : ptrType$
|
|
123729
|
-
if (parent === ptrType$
|
|
123782
|
+
parent = (_entry$1 = ws.nodes[$Uint32.keyFor(priority.StreamDep)], _entry$1 !== undefined ? _entry$1.v : ptrType$83.nil);
|
|
123783
|
+
if (parent === ptrType$83.nil) {
|
|
123730
123784
|
n.setParent(ws.root);
|
|
123731
123785
|
n.weight = 15;
|
|
123732
123786
|
return;
|
|
@@ -123736,7 +123790,7 @@ $packages["net/http"] = (function() {
|
|
|
123736
123790
|
}
|
|
123737
123791
|
x$4 = parent.parent;
|
|
123738
123792
|
while (true) {
|
|
123739
|
-
if (!(!(x$4 === ptrType$
|
|
123793
|
+
if (!(!(x$4 === ptrType$83.nil))) { break; }
|
|
123740
123794
|
if (x$4 === n) {
|
|
123741
123795
|
parent.setParent(n.parent);
|
|
123742
123796
|
break;
|
|
@@ -123746,7 +123800,7 @@ $packages["net/http"] = (function() {
|
|
|
123746
123800
|
if (priority.Exclusive) {
|
|
123747
123801
|
k = parent.kids;
|
|
123748
123802
|
while (true) {
|
|
123749
|
-
if (!(!(k === ptrType$
|
|
123803
|
+
if (!(!(k === ptrType$83.nil))) { break; }
|
|
123750
123804
|
next = k.next;
|
|
123751
123805
|
if (!(k === n)) {
|
|
123752
123806
|
k.setParent(n);
|
|
@@ -123761,13 +123815,13 @@ $packages["net/http"] = (function() {
|
|
|
123761
123815
|
http2priorityWriteScheduler.ptr.prototype.Push = function(wr) {
|
|
123762
123816
|
var _entry, id, n, wr, ws;
|
|
123763
123817
|
ws = this;
|
|
123764
|
-
n = ptrType$
|
|
123818
|
+
n = ptrType$83.nil;
|
|
123765
123819
|
id = $clone(wr, http2FrameWriteRequest).StreamID();
|
|
123766
123820
|
if (id === 0) {
|
|
123767
123821
|
n = ws.root;
|
|
123768
123822
|
} else {
|
|
123769
|
-
n = (_entry = ws.nodes[$Uint32.keyFor(id)], _entry !== undefined ? _entry.v : ptrType$
|
|
123770
|
-
if (n === ptrType$
|
|
123823
|
+
n = (_entry = ws.nodes[$Uint32.keyFor(id)], _entry !== undefined ? _entry.v : ptrType$83.nil);
|
|
123824
|
+
if (n === ptrType$83.nil) {
|
|
123771
123825
|
if ($clone(wr, http2FrameWriteRequest).DataSize() > 0) {
|
|
123772
123826
|
$panic(new $String("add DATA on non-open stream"));
|
|
123773
123827
|
}
|
|
@@ -123786,7 +123840,7 @@ $packages["net/http"] = (function() {
|
|
|
123786
123840
|
wr[0] = new http2FrameWriteRequest.ptr($ifaceNil, ptrType$5.nil, $chanNil);
|
|
123787
123841
|
ok[0] = false;
|
|
123788
123842
|
ws[0] = this;
|
|
123789
|
-
_r$2 = ws[0].root.walkReadyInOrder(false, (ws[0].$ptr_tmp || (ws[0].$ptr_tmp = new ptrType$
|
|
123843
|
+
_r$2 = ws[0].root.walkReadyInOrder(false, (ws[0].$ptr_tmp || (ws[0].$ptr_tmp = new ptrType$85(function() { return this.$target.tmp; }, function($v) { this.$target.tmp = $v; }, ws[0]))), (function(ok, wr, ws) { return function(n, openParent) {
|
|
123790
123844
|
var _tuple, limit, n, openParent;
|
|
123791
123845
|
limit = 2147483647;
|
|
123792
123846
|
if (openParent) {
|
|
@@ -123838,11 +123892,11 @@ $packages["net/http"] = (function() {
|
|
|
123838
123892
|
ws = this;
|
|
123839
123893
|
k = n.kids;
|
|
123840
123894
|
while (true) {
|
|
123841
|
-
if (!(!(k === ptrType$
|
|
123895
|
+
if (!(!(k === ptrType$83.nil))) { break; }
|
|
123842
123896
|
k.setParent(n.parent);
|
|
123843
123897
|
k = k.next;
|
|
123844
123898
|
}
|
|
123845
|
-
n.setParent(ptrType$
|
|
123899
|
+
n.setParent(ptrType$83.nil);
|
|
123846
123900
|
delete ws.nodes[$Uint32.keyFor(n.id)];
|
|
123847
123901
|
};
|
|
123848
123902
|
http2priorityWriteScheduler.prototype.removeNode = function(n) { return this.$val.removeNode(n); };
|
|
@@ -123857,14 +123911,14 @@ $packages["net/http"] = (function() {
|
|
|
123857
123911
|
http2randomWriteScheduler.ptr.prototype.CloseStream = function(streamID) {
|
|
123858
123912
|
var _entry, _tuple, ok, q, streamID, ws;
|
|
123859
123913
|
ws = this;
|
|
123860
|
-
_tuple = (_entry = ws.sq[$Uint32.keyFor(streamID)], _entry !== undefined ? [_entry.v, true] : [ptrType$
|
|
123914
|
+
_tuple = (_entry = ws.sq[$Uint32.keyFor(streamID)], _entry !== undefined ? [_entry.v, true] : [ptrType$81.nil, false]);
|
|
123861
123915
|
q = _tuple[0];
|
|
123862
123916
|
ok = _tuple[1];
|
|
123863
123917
|
if (!ok) {
|
|
123864
123918
|
return;
|
|
123865
123919
|
}
|
|
123866
123920
|
delete ws.sq[$Uint32.keyFor(streamID)];
|
|
123867
|
-
(ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$
|
|
123921
|
+
(ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$84(function() { return this.$target.queuePool; }, function($v) { this.$target.queuePool = $v; }, ws))).put(q);
|
|
123868
123922
|
};
|
|
123869
123923
|
http2randomWriteScheduler.prototype.CloseStream = function(streamID) { return this.$val.CloseStream(streamID); };
|
|
123870
123924
|
http2randomWriteScheduler.ptr.prototype.AdjustStream = function(streamID, priority) {
|
|
@@ -123880,11 +123934,11 @@ $packages["net/http"] = (function() {
|
|
|
123880
123934
|
ws.zero.push($clone(wr, http2FrameWriteRequest));
|
|
123881
123935
|
return;
|
|
123882
123936
|
}
|
|
123883
|
-
_tuple = (_entry = ws.sq[$Uint32.keyFor(id)], _entry !== undefined ? [_entry.v, true] : [ptrType$
|
|
123937
|
+
_tuple = (_entry = ws.sq[$Uint32.keyFor(id)], _entry !== undefined ? [_entry.v, true] : [ptrType$81.nil, false]);
|
|
123884
123938
|
q = _tuple[0];
|
|
123885
123939
|
ok = _tuple[1];
|
|
123886
123940
|
if (!ok) {
|
|
123887
|
-
q = (ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$
|
|
123941
|
+
q = (ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$84(function() { return this.$target.queuePool; }, function($v) { this.$target.queuePool = $v; }, ws))).get();
|
|
123888
123942
|
_key = id; (ws.sq || $throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(_key)] = { k: _key, v: q };
|
|
123889
123943
|
}
|
|
123890
123944
|
q.push($clone(wr, http2FrameWriteRequest));
|
|
@@ -123914,7 +123968,7 @@ $packages["net/http"] = (function() {
|
|
|
123914
123968
|
if (ok) {
|
|
123915
123969
|
if (q.empty()) {
|
|
123916
123970
|
delete ws.sq[$Uint32.keyFor(streamID)];
|
|
123917
|
-
(ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$
|
|
123971
|
+
(ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$84(function() { return this.$target.queuePool; }, function($v) { this.$target.queuePool = $v; }, ws))).put(q);
|
|
123918
123972
|
}
|
|
123919
123973
|
return [wr, true];
|
|
123920
123974
|
}
|
|
@@ -124086,10 +124140,10 @@ $packages["net/http"] = (function() {
|
|
|
124086
124140
|
var _entry, _entry$1, _i, _keys, _r$2, _ref, _tmp, _tmp$1, exclude, h, hs, k, kvs, vv, $s, $r;
|
|
124087
124141
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _keys = $f._keys; _r$2 = $f._r$2; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; exclude = $f.exclude; h = $f.h; hs = $f.hs; k = $f.k; kvs = $f.kvs; vv = $f.vv; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
124088
124142
|
kvs = sliceType$5.nil;
|
|
124089
|
-
hs = ptrType$
|
|
124143
|
+
hs = ptrType$86.nil;
|
|
124090
124144
|
h = this.$val;
|
|
124091
124145
|
_r$2 = headerSorterPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
124092
|
-
hs = $assertType(_r$2, ptrType$
|
|
124146
|
+
hs = $assertType(_r$2, ptrType$86);
|
|
124093
124147
|
if (hs.kvs.$capacity < $keys(h).length) {
|
|
124094
124148
|
hs.kvs = $makeSlice(sliceType$5, 0, $keys(h).length);
|
|
124095
124149
|
}
|
|
@@ -124454,10 +124508,10 @@ $packages["net/http"] = (function() {
|
|
|
124454
124508
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
124455
124509
|
r = this;
|
|
124456
124510
|
if (r.MultipartForm === multipartByReader) {
|
|
124457
|
-
$s = -1; return [ptrType$
|
|
124511
|
+
$s = -1; return [ptrType$87.nil, errors.New("http: MultipartReader called twice")];
|
|
124458
124512
|
}
|
|
124459
124513
|
if (!(r.MultipartForm === ptrType$20.nil)) {
|
|
124460
|
-
$s = -1; return [ptrType$
|
|
124514
|
+
$s = -1; return [ptrType$87.nil, errors.New("http: multipart handled by ParseMultipartForm")];
|
|
124461
124515
|
}
|
|
124462
124516
|
r.MultipartForm = multipartByReader;
|
|
124463
124517
|
_r$2 = r.multipartReader(true); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
@@ -124472,7 +124526,7 @@ $packages["net/http"] = (function() {
|
|
|
124472
124526
|
_r$2 = new Header(r.Header).Get("Content-Type"); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
124473
124527
|
v = _r$2;
|
|
124474
124528
|
if (v === "") {
|
|
124475
|
-
$s = -1; return [ptrType$
|
|
124529
|
+
$s = -1; return [ptrType$87.nil, $pkg.ErrNotMultipart];
|
|
124476
124530
|
}
|
|
124477
124531
|
_r$3 = mime.ParseMediaType(v); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
124478
124532
|
_tuple = _r$3;
|
|
@@ -124480,13 +124534,13 @@ $packages["net/http"] = (function() {
|
|
|
124480
124534
|
params = _tuple[1];
|
|
124481
124535
|
err = _tuple[2];
|
|
124482
124536
|
if (!($interfaceIsEqual(err, $ifaceNil)) || !(d === "multipart/form-data" || allowMixed && d === "multipart/mixed")) {
|
|
124483
|
-
$s = -1; return [ptrType$
|
|
124537
|
+
$s = -1; return [ptrType$87.nil, $pkg.ErrNotMultipart];
|
|
124484
124538
|
}
|
|
124485
124539
|
_tuple$1 = (_entry = params[$String.keyFor("boundary")], _entry !== undefined ? [_entry.v, true] : ["", false]);
|
|
124486
124540
|
boundary = _tuple$1[0];
|
|
124487
124541
|
ok = _tuple$1[1];
|
|
124488
124542
|
if (!ok) {
|
|
124489
|
-
$s = -1; return [ptrType$
|
|
124543
|
+
$s = -1; return [ptrType$87.nil, $pkg.ErrMissingBoundary];
|
|
124490
124544
|
}
|
|
124491
124545
|
$s = -1; return [multipart.NewReader(r.Body, boundary), $ifaceNil];
|
|
124492
124546
|
/* */ } return; } if ($f === undefined) { $f = { $blk: Request.ptr.prototype.multipartReader }; } $f._entry = _entry; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.allowMixed = allowMixed; $f.boundary = boundary; $f.d = d; $f.err = err; $f.ok = ok; $f.params = params; $f.r = r; $f.v = v; $f.$s = $s; $f.$r = $r; return $f;
|
|
@@ -124971,7 +125025,7 @@ $packages["net/http"] = (function() {
|
|
|
124971
125025
|
_r$2 = textprotoReaderPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
124972
125026
|
v = _r$2;
|
|
124973
125027
|
if (!($interfaceIsEqual(v, $ifaceNil))) {
|
|
124974
|
-
tr = $assertType(v, ptrType$
|
|
125028
|
+
tr = $assertType(v, ptrType$90);
|
|
124975
125029
|
tr.R = br;
|
|
124976
125030
|
$s = -1; return tr;
|
|
124977
125031
|
}
|
|
@@ -124981,7 +125035,7 @@ $packages["net/http"] = (function() {
|
|
|
124981
125035
|
};
|
|
124982
125036
|
putTextprotoReader = function(r) {
|
|
124983
125037
|
var r;
|
|
124984
|
-
r.R = ptrType$
|
|
125038
|
+
r.R = ptrType$77.nil;
|
|
124985
125039
|
textprotoReaderPool.Put(r);
|
|
124986
125040
|
};
|
|
124987
125041
|
readRequest = function(b, deleteHostHeader) {
|
|
@@ -125225,7 +125279,7 @@ $packages["net/http"] = (function() {
|
|
|
125225
125279
|
/* if (ct === "application/x-www-form-urlencoded") { */ case 4:
|
|
125226
125280
|
reader = r.Body;
|
|
125227
125281
|
maxFormSize = new $Int64(2147483647, 4294967295);
|
|
125228
|
-
_tuple$1 = $assertType(r.Body, ptrType$
|
|
125282
|
+
_tuple$1 = $assertType(r.Body, ptrType$91, true);
|
|
125229
125283
|
ok = _tuple$1[1];
|
|
125230
125284
|
if (!ok) {
|
|
125231
125285
|
maxFormSize = new $Int64(0, 10485760);
|
|
@@ -125669,12 +125723,12 @@ $packages["net/http"] = (function() {
|
|
|
125669
125723
|
var _r$2, _r$3, _r$4, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, buf, c, err, err$1, rwc, $s, $r;
|
|
125670
125724
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; buf = $f.buf; c = $f.c; err = $f.err; err$1 = $f.err$1; rwc = $f.rwc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
125671
125725
|
rwc = $ifaceNil;
|
|
125672
|
-
buf = ptrType$
|
|
125726
|
+
buf = ptrType$92.nil;
|
|
125673
125727
|
err = $ifaceNil;
|
|
125674
125728
|
c = this;
|
|
125675
125729
|
if (c.hijackedv) {
|
|
125676
125730
|
_tmp = $ifaceNil;
|
|
125677
|
-
_tmp$1 = ptrType$
|
|
125731
|
+
_tmp$1 = ptrType$92.nil;
|
|
125678
125732
|
_tmp$2 = $pkg.ErrHijacked;
|
|
125679
125733
|
rwc = _tmp;
|
|
125680
125734
|
buf = _tmp$1;
|
|
@@ -125697,7 +125751,7 @@ $packages["net/http"] = (function() {
|
|
|
125697
125751
|
/* */ $s = 7; continue;
|
|
125698
125752
|
/* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 6:
|
|
125699
125753
|
_tmp$3 = $ifaceNil;
|
|
125700
|
-
_tmp$4 = ptrType$
|
|
125754
|
+
_tmp$4 = ptrType$92.nil;
|
|
125701
125755
|
_r$4 = fmt.Errorf("unexpected Peek failure reading buffered byte: %v", new sliceType([err$1])); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
125702
125756
|
_tmp$5 = _r$4;
|
|
125703
125757
|
rwc = _tmp$3;
|
|
@@ -125859,17 +125913,17 @@ $packages["net/http"] = (function() {
|
|
|
125859
125913
|
$ptrType(atomicBool).prototype.isSet = function() {
|
|
125860
125914
|
var _ptr, b;
|
|
125861
125915
|
b = this;
|
|
125862
|
-
return !((atomic.LoadInt32(((_ptr = b, new ptrType$
|
|
125916
|
+
return !((atomic.LoadInt32(((_ptr = b, new ptrType$93(function() { return (_ptr.$get() >> 0); }, function($v) { _ptr.$set(($v >> 0)); }, _ptr.$target)))) === 0));
|
|
125863
125917
|
};
|
|
125864
125918
|
$ptrType(atomicBool).prototype.setTrue = function() {
|
|
125865
125919
|
var _ptr, b;
|
|
125866
125920
|
b = this;
|
|
125867
|
-
atomic.StoreInt32(((_ptr = b, new ptrType$
|
|
125921
|
+
atomic.StoreInt32(((_ptr = b, new ptrType$93(function() { return (_ptr.$get() >> 0); }, function($v) { _ptr.$set(($v >> 0)); }, _ptr.$target))), 1);
|
|
125868
125922
|
};
|
|
125869
125923
|
$ptrType(atomicBool).prototype.setFalse = function() {
|
|
125870
125924
|
var _ptr, b;
|
|
125871
125925
|
b = this;
|
|
125872
|
-
atomic.StoreInt32(((_ptr = b, new ptrType$
|
|
125926
|
+
atomic.StoreInt32(((_ptr = b, new ptrType$93(function() { return (_ptr.$get() >> 0); }, function($v) { _ptr.$set(($v >> 0)); }, _ptr.$target))), 0);
|
|
125873
125927
|
};
|
|
125874
125928
|
response.ptr.prototype.declareTrailer = function(k) {
|
|
125875
125929
|
var _r$2, _r$3, k, w, $s, $r;
|
|
@@ -125976,7 +126030,7 @@ $packages["net/http"] = (function() {
|
|
|
125976
126030
|
var _r$2, c, rwc, srv, $s, $r;
|
|
125977
126031
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; c = $f.c; rwc = $f.rwc; srv = $f.srv; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
125978
126032
|
srv = this;
|
|
125979
|
-
c = new conn.ptr(srv, $throwNilPointerError, rwc, "", ptrType$21.nil, $ifaceNil, ptrType$
|
|
126033
|
+
c = new conn.ptr(srv, $throwNilPointerError, rwc, "", ptrType$21.nil, $ifaceNil, ptrType$94.nil, ptrType$77.nil, ptrType$9.nil, "", new atomic.Value.ptr($ifaceNil), new structType$2.ptr(new $Uint64(0, 0)), new sync.Mutex.ptr(0, 0), false);
|
|
125980
126034
|
/* */ if (false) { $s = 1; continue; }
|
|
125981
126035
|
/* */ $s = 2; continue;
|
|
125982
126036
|
/* if (false) { */ case 1:
|
|
@@ -125992,7 +126046,7 @@ $packages["net/http"] = (function() {
|
|
|
125992
126046
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; cr = $f.cr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
125993
126047
|
cr = this;
|
|
125994
126048
|
$r = cr.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
125995
|
-
if (cr.cond === ptrType$
|
|
126049
|
+
if (cr.cond === ptrType$73.nil) {
|
|
125996
126050
|
cr.cond = sync.NewCond(cr.mu);
|
|
125997
126051
|
}
|
|
125998
126052
|
$s = -1; return;
|
|
@@ -126116,11 +126170,11 @@ $packages["net/http"] = (function() {
|
|
|
126116
126170
|
var _tuple, cr, res, $s, $r;
|
|
126117
126171
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _tuple = $f._tuple; cr = $f.cr; res = $f.res; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
126118
126172
|
cr = this;
|
|
126119
|
-
_tuple = $assertType(cr.conn.curReq.Load(), ptrType$
|
|
126173
|
+
_tuple = $assertType(cr.conn.curReq.Load(), ptrType$95, true);
|
|
126120
126174
|
res = _tuple[0];
|
|
126121
|
-
/* */ if (!(res === ptrType$
|
|
126175
|
+
/* */ if (!(res === ptrType$95.nil) && atomic.CompareAndSwapInt32((res.$ptr_didCloseNotify || (res.$ptr_didCloseNotify = new ptrType$93(function() { return this.$target.didCloseNotify; }, function($v) { this.$target.didCloseNotify = $v; }, res))), 0, 1)) { $s = 1; continue; }
|
|
126122
126176
|
/* */ $s = 2; continue;
|
|
126123
|
-
/* if (!(res === ptrType$
|
|
126177
|
+
/* if (!(res === ptrType$95.nil) && atomic.CompareAndSwapInt32((res.$ptr_didCloseNotify || (res.$ptr_didCloseNotify = new ptrType$93(function() { return this.$target.didCloseNotify; }, function($v) { this.$target.didCloseNotify = $v; }, res))), 0, 1)) { */ case 1:
|
|
126124
126178
|
$r = $send(res.closeNotifyCh, true); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
126125
126179
|
/* } */ case 2:
|
|
126126
126180
|
$s = -1; return;
|
|
@@ -126213,7 +126267,7 @@ $packages["net/http"] = (function() {
|
|
|
126213
126267
|
} else if (_1 === (4096)) {
|
|
126214
126268
|
return bufioWriter4kPool;
|
|
126215
126269
|
}
|
|
126216
|
-
return ptrType$
|
|
126270
|
+
return ptrType$96.nil;
|
|
126217
126271
|
};
|
|
126218
126272
|
newBufioReader = function(r) {
|
|
126219
126273
|
var _r$2, br, r, v, $s, $r;
|
|
@@ -126221,7 +126275,7 @@ $packages["net/http"] = (function() {
|
|
|
126221
126275
|
_r$2 = bufioReaderPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
126222
126276
|
v = _r$2;
|
|
126223
126277
|
if (!($interfaceIsEqual(v, $ifaceNil))) {
|
|
126224
|
-
br = $assertType(v, ptrType$
|
|
126278
|
+
br = $assertType(v, ptrType$77);
|
|
126225
126279
|
br.Reset(r);
|
|
126226
126280
|
$s = -1; return br;
|
|
126227
126281
|
}
|
|
@@ -126237,9 +126291,9 @@ $packages["net/http"] = (function() {
|
|
|
126237
126291
|
var _r$2, bw, pool, size, v, w, $s, $r;
|
|
126238
126292
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; bw = $f.bw; pool = $f.pool; size = $f.size; v = $f.v; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
126239
126293
|
pool = bufioWriterPool(size);
|
|
126240
|
-
/* */ if (!(pool === ptrType$
|
|
126294
|
+
/* */ if (!(pool === ptrType$96.nil)) { $s = 1; continue; }
|
|
126241
126295
|
/* */ $s = 2; continue;
|
|
126242
|
-
/* if (!(pool === ptrType$
|
|
126296
|
+
/* if (!(pool === ptrType$96.nil)) { */ case 1:
|
|
126243
126297
|
_r$2 = pool.Get(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
126244
126298
|
v = _r$2;
|
|
126245
126299
|
if (!($interfaceIsEqual(v, $ifaceNil))) {
|
|
@@ -126255,7 +126309,7 @@ $packages["net/http"] = (function() {
|
|
|
126255
126309
|
var bw, pool;
|
|
126256
126310
|
bw.Reset($ifaceNil);
|
|
126257
126311
|
pool = bufioWriterPool(bw.Available());
|
|
126258
|
-
if (!(pool === ptrType$
|
|
126312
|
+
if (!(pool === ptrType$96.nil)) {
|
|
126259
126313
|
pool.Put(bw);
|
|
126260
126314
|
}
|
|
126261
126315
|
};
|
|
@@ -126353,14 +126407,14 @@ $packages["net/http"] = (function() {
|
|
|
126353
126407
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _i$1 = $f._i$1; _keys = $f._keys; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _ref$1 = $f._ref$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$18 = $f._tmp$18; _tmp$19 = $f._tmp$19; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; body$1 = $f.body$1; c = $f.c; cancelCtx = $f.cancelCtx; ctx = $f.ctx; d = $f.d; d$1 = $f.d$1; d$2 = $f.d$2; err = $f.err; haveHost = $f.haveHost; hdrDeadline = $f.hdrDeadline; hosts = $f.hosts; isH2Upgrade = $f.isH2Upgrade; k = $f.k; ok = $f.ok; peek = $f.peek; req = $f.req; t0 = $f.t0; v = $f.v; vv = $f.vv; w = $f.w; wholeReqDeadline = $f.wholeReqDeadline; x$4 = $f.x$4; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred);
|
|
126354
126408
|
c = [c];
|
|
126355
126409
|
d = [d];
|
|
126356
|
-
w = ptrType$
|
|
126410
|
+
w = ptrType$95.nil;
|
|
126357
126411
|
err = $ifaceNil;
|
|
126358
126412
|
c[0] = this;
|
|
126359
126413
|
_r$2 = c[0].hijacked(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
126360
126414
|
/* */ if (_r$2) { $s = 1; continue; }
|
|
126361
126415
|
/* */ $s = 2; continue;
|
|
126362
126416
|
/* if (_r$2) { */ case 1:
|
|
126363
|
-
_tmp = ptrType$
|
|
126417
|
+
_tmp = ptrType$95.nil;
|
|
126364
126418
|
_tmp$1 = $pkg.ErrHijacked;
|
|
126365
126419
|
w = _tmp;
|
|
126366
126420
|
err = _tmp$1;
|
|
@@ -126408,20 +126462,20 @@ $packages["net/http"] = (function() {
|
|
|
126408
126462
|
err = _tuple$1[1];
|
|
126409
126463
|
if (!($interfaceIsEqual(err, $ifaceNil))) {
|
|
126410
126464
|
if (c[0].r.hitReadLimit()) {
|
|
126411
|
-
_tmp$2 = ptrType$
|
|
126465
|
+
_tmp$2 = ptrType$95.nil;
|
|
126412
126466
|
_tmp$3 = errTooLarge;
|
|
126413
126467
|
w = _tmp$2;
|
|
126414
126468
|
err = _tmp$3;
|
|
126415
126469
|
$s = -1; return [w, err];
|
|
126416
126470
|
}
|
|
126417
|
-
_tmp$4 = ptrType$
|
|
126471
|
+
_tmp$4 = ptrType$95.nil;
|
|
126418
126472
|
_tmp$5 = err;
|
|
126419
126473
|
w = _tmp$4;
|
|
126420
126474
|
err = _tmp$5;
|
|
126421
126475
|
$s = -1; return [w, err];
|
|
126422
126476
|
}
|
|
126423
126477
|
if (!http1ServerSupportsRequest(req)) {
|
|
126424
|
-
_tmp$6 = ptrType$
|
|
126478
|
+
_tmp$6 = ptrType$95.nil;
|
|
126425
126479
|
_tmp$7 = (x$4 = new statusError.ptr(505, "unsupported protocol version"), new x$4.constructor.elem(x$4));
|
|
126426
126480
|
w = _tmp$6;
|
|
126427
126481
|
err = _tmp$7;
|
|
@@ -126434,21 +126488,21 @@ $packages["net/http"] = (function() {
|
|
|
126434
126488
|
haveHost = _tuple$2[1];
|
|
126435
126489
|
isH2Upgrade = req.isH2Upgrade();
|
|
126436
126490
|
if (req.ProtoAtLeast(1, 1) && (!haveHost || (hosts.$length === 0)) && !isH2Upgrade && !(req.Method === "CONNECT")) {
|
|
126437
|
-
_tmp$8 = ptrType$
|
|
126491
|
+
_tmp$8 = ptrType$95.nil;
|
|
126438
126492
|
_tmp$9 = badRequestError("missing required Host header");
|
|
126439
126493
|
w = _tmp$8;
|
|
126440
126494
|
err = _tmp$9;
|
|
126441
126495
|
$s = -1; return [w, err];
|
|
126442
126496
|
}
|
|
126443
126497
|
if (hosts.$length > 1) {
|
|
126444
|
-
_tmp$10 = ptrType$
|
|
126498
|
+
_tmp$10 = ptrType$95.nil;
|
|
126445
126499
|
_tmp$11 = badRequestError("too many Host headers");
|
|
126446
126500
|
w = _tmp$10;
|
|
126447
126501
|
err = _tmp$11;
|
|
126448
126502
|
$s = -1; return [w, err];
|
|
126449
126503
|
}
|
|
126450
126504
|
if ((hosts.$length === 1) && !httpguts.ValidHostHeader((0 >= hosts.$length ? ($throwRuntimeError("index out of range"), undefined) : hosts.$array[hosts.$offset + 0]))) {
|
|
126451
|
-
_tmp$12 = ptrType$
|
|
126505
|
+
_tmp$12 = ptrType$95.nil;
|
|
126452
126506
|
_tmp$13 = badRequestError("malformed Host header");
|
|
126453
126507
|
w = _tmp$12;
|
|
126454
126508
|
err = _tmp$13;
|
|
@@ -126467,7 +126521,7 @@ $packages["net/http"] = (function() {
|
|
|
126467
126521
|
k = _entry$1.k;
|
|
126468
126522
|
vv = _entry$1.v;
|
|
126469
126523
|
if (!httpguts.ValidHeaderFieldName(k)) {
|
|
126470
|
-
_tmp$14 = ptrType$
|
|
126524
|
+
_tmp$14 = ptrType$95.nil;
|
|
126471
126525
|
_tmp$15 = badRequestError("invalid header name");
|
|
126472
126526
|
w = _tmp$14;
|
|
126473
126527
|
err = _tmp$15;
|
|
@@ -126479,7 +126533,7 @@ $packages["net/http"] = (function() {
|
|
|
126479
126533
|
if (!(_i$1 < _ref$1.$length)) { break; }
|
|
126480
126534
|
v = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]);
|
|
126481
126535
|
if (!httpguts.ValidHeaderFieldValue(v)) {
|
|
126482
|
-
_tmp$16 = ptrType$
|
|
126536
|
+
_tmp$16 = ptrType$95.nil;
|
|
126483
126537
|
_tmp$17 = badRequestError("invalid header value");
|
|
126484
126538
|
w = _tmp$16;
|
|
126485
126539
|
err = _tmp$17;
|
|
@@ -126497,7 +126551,7 @@ $packages["net/http"] = (function() {
|
|
|
126497
126551
|
req.ctx = ctx;
|
|
126498
126552
|
req.RemoteAddr = c[0].remoteAddr;
|
|
126499
126553
|
req.TLS = c[0].tlsState;
|
|
126500
|
-
_tuple$4 = $assertType(req.Body, ptrType$
|
|
126554
|
+
_tuple$4 = $assertType(req.Body, ptrType$97, true);
|
|
126501
126555
|
body$1 = _tuple$4[0];
|
|
126502
126556
|
ok = _tuple$4[1];
|
|
126503
126557
|
if (ok) {
|
|
@@ -126509,7 +126563,7 @@ $packages["net/http"] = (function() {
|
|
|
126509
126563
|
_r$8 = c[0].rwc.SetReadDeadline($clone(wholeReqDeadline, time.Time)); /* */ $s = 15; case 15: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; }
|
|
126510
126564
|
_r$8;
|
|
126511
126565
|
/* } */ case 14:
|
|
126512
|
-
w = new response.ptr(c[0], req, req.Body, cancelCtx, false, false, req.wantsHttp10KeepAlive(), req.wantsClose(), 0, new sync.Mutex.ptr(0, 0), ptrType$9.nil, new chunkWriter.ptr(ptrType$
|
|
126566
|
+
w = new response.ptr(c[0], req, req.Body, cancelCtx, false, false, req.wantsHttp10KeepAlive(), req.wantsClose(), 0, new sync.Mutex.ptr(0, 0), ptrType$9.nil, new chunkWriter.ptr(ptrType$95.nil, false, false, false), {}, false, new $Int64(0, 0), new $Int64(-1, 4294967295), 0, false, false, sliceType$2.nil, 0, arrayType$1.zero(), arrayType$7.zero(), arrayType$8.zero(), new $Chan($Bool, 1), 0);
|
|
126513
126567
|
if (isH2Upgrade) {
|
|
126514
126568
|
w.closeAfterReply = true;
|
|
126515
126569
|
}
|
|
@@ -126561,7 +126615,7 @@ $packages["net/http"] = (function() {
|
|
|
126561
126615
|
pc = $makeSlice(sliceType$27, 16);
|
|
126562
126616
|
n = runtime.Callers(1, pc);
|
|
126563
126617
|
frames = runtime.CallersFrames($subslice(pc, 0, n));
|
|
126564
|
-
frame = new runtime.Frame.ptr(0, ptrType$
|
|
126618
|
+
frame = new runtime.Frame.ptr(0, ptrType$99.nil, "", "", 0, 0);
|
|
126565
126619
|
while (true) {
|
|
126566
126620
|
_tuple = frames.Next();
|
|
126567
126621
|
frame$1 = $clone(_tuple[0], runtime.Frame);
|
|
@@ -126766,7 +126820,7 @@ $packages["net/http"] = (function() {
|
|
|
126766
126820
|
if (new Header(header[0]).get("Connection") === "close" || !keepAlivesEnabled) {
|
|
126767
126821
|
w.closeAfterReply = true;
|
|
126768
126822
|
}
|
|
126769
|
-
_tuple$1 = $assertType(w.req.Body, ptrType$
|
|
126823
|
+
_tuple$1 = $assertType(w.req.Body, ptrType$100, true);
|
|
126770
126824
|
ecr = _tuple$1[0];
|
|
126771
126825
|
ok = _tuple$1[1];
|
|
126772
126826
|
if (ok && !(ecr.$ptr_sawEOF || (ecr.$ptr_sawEOF = new ptrType$24(function() { return this.$target.sawEOF; }, function($v) { this.$target.sawEOF = $v; }, ecr))).isSet()) {
|
|
@@ -126780,16 +126834,16 @@ $packages["net/http"] = (function() {
|
|
|
126780
126834
|
discard = _tmp;
|
|
126781
126835
|
tooBig = _tmp$1;
|
|
126782
126836
|
_ref$2 = w.req.Body;
|
|
126783
|
-
/* */ if ($assertType(_ref$2, ptrType$
|
|
126784
|
-
/* */ if ($assertType(_ref$2, ptrType$
|
|
126837
|
+
/* */ if ($assertType(_ref$2, ptrType$100, true)[1]) { $s = 6; continue; }
|
|
126838
|
+
/* */ if ($assertType(_ref$2, ptrType$97, true)[1]) { $s = 7; continue; }
|
|
126785
126839
|
/* */ $s = 8; continue;
|
|
126786
|
-
/* if ($assertType(_ref$2, ptrType$
|
|
126840
|
+
/* if ($assertType(_ref$2, ptrType$100, true)[1]) { */ case 6:
|
|
126787
126841
|
bdy = _ref$2.$val;
|
|
126788
126842
|
if (bdy.resp.wroteContinue) {
|
|
126789
126843
|
discard = true;
|
|
126790
126844
|
}
|
|
126791
126845
|
$s = 9; continue;
|
|
126792
|
-
/* } else if ($assertType(_ref$2, ptrType$
|
|
126846
|
+
/* } else if ($assertType(_ref$2, ptrType$97, true)[1]) { */ case 7:
|
|
126793
126847
|
bdy$1 = _ref$2.$val;
|
|
126794
126848
|
$r = bdy$1.mu.Lock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
126795
126849
|
if (bdy$1.closed) {
|
|
@@ -126882,27 +126936,25 @@ $packages["net/http"] = (function() {
|
|
|
126882
126936
|
$r = delHeader("Content-Length"); /* */ $s = 42; case 42: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
126883
126937
|
hasCL = false;
|
|
126884
126938
|
/* } */ case 40:
|
|
126885
|
-
/* */ if (w.req.Method === "HEAD" || !bodyAllowedForStatus(code)) { $s = 43; continue; }
|
|
126886
|
-
/* */ if (
|
|
126887
|
-
/* */ if (
|
|
126888
|
-
/* */
|
|
126889
|
-
/*
|
|
126890
|
-
|
|
126891
|
-
$s =
|
|
126892
|
-
/* } else if (
|
|
126939
|
+
/* */ if (w.req.Method === "HEAD" || !bodyAllowedForStatus(code) || (code === 204)) { $s = 43; continue; }
|
|
126940
|
+
/* */ if (hasCL) { $s = 44; continue; }
|
|
126941
|
+
/* */ if (w.req.ProtoAtLeast(1, 1)) { $s = 45; continue; }
|
|
126942
|
+
/* */ $s = 46; continue;
|
|
126943
|
+
/* if (w.req.Method === "HEAD" || !bodyAllowedForStatus(code) || (code === 204)) { */ case 43:
|
|
126944
|
+
$r = delHeader("Transfer-Encoding"); /* */ $s = 48; case 48: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
126945
|
+
$s = 47; continue;
|
|
126946
|
+
/* } else if (hasCL) { */ case 44:
|
|
126893
126947
|
$r = delHeader("Transfer-Encoding"); /* */ $s = 49; case 49: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
126894
|
-
$s =
|
|
126895
|
-
/* } else if (
|
|
126896
|
-
|
|
126897
|
-
$s =
|
|
126898
|
-
|
|
126899
|
-
/* */ if (hasTE && te === "identity") { $s = 51; continue; }
|
|
126900
|
-
/* */ $s = 52; continue;
|
|
126901
|
-
/* if (hasTE && te === "identity") { */ case 51:
|
|
126948
|
+
$s = 47; continue;
|
|
126949
|
+
/* } else if (w.req.ProtoAtLeast(1, 1)) { */ case 45:
|
|
126950
|
+
/* */ if (hasTE && te === "identity") { $s = 50; continue; }
|
|
126951
|
+
/* */ $s = 51; continue;
|
|
126952
|
+
/* if (hasTE && te === "identity") { */ case 50:
|
|
126902
126953
|
cw.chunking = false;
|
|
126903
126954
|
w.closeAfterReply = true;
|
|
126904
|
-
$s = 53;
|
|
126905
|
-
|
|
126955
|
+
$r = delHeader("Transfer-Encoding"); /* */ $s = 53; case 53: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
126956
|
+
$s = 52; continue;
|
|
126957
|
+
/* } else { */ case 51:
|
|
126906
126958
|
cw.chunking = true;
|
|
126907
126959
|
setHeader.transferEncoding = "chunked";
|
|
126908
126960
|
/* */ if (hasTE && te === "chunked") { $s = 54; continue; }
|
|
@@ -126910,12 +126962,12 @@ $packages["net/http"] = (function() {
|
|
|
126910
126962
|
/* if (hasTE && te === "chunked") { */ case 54:
|
|
126911
126963
|
$r = delHeader("Transfer-Encoding"); /* */ $s = 56; case 56: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
126912
126964
|
/* } */ case 55:
|
|
126913
|
-
/* } */ case
|
|
126914
|
-
$s =
|
|
126915
|
-
/* } else { */ case
|
|
126965
|
+
/* } */ case 52:
|
|
126966
|
+
$s = 47; continue;
|
|
126967
|
+
/* } else { */ case 46:
|
|
126916
126968
|
w.closeAfterReply = true;
|
|
126917
126969
|
$r = delHeader("Transfer-Encoding"); /* */ $s = 57; case 57: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
126918
|
-
/* } */ case
|
|
126970
|
+
/* } */ case 47:
|
|
126919
126971
|
/* */ if (cw.chunking) { $s = 58; continue; }
|
|
126920
126972
|
/* */ $s = 59; continue;
|
|
126921
126973
|
/* if (cw.chunking) { */ case 58:
|
|
@@ -127178,7 +127230,7 @@ $packages["net/http"] = (function() {
|
|
|
127178
127230
|
var _r$2, _tuple, _v, body$1, ok, w, $s, $r;
|
|
127179
127231
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; _tuple = $f._tuple; _v = $f._v; body$1 = $f.body$1; ok = $f.ok; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
127180
127232
|
w = this;
|
|
127181
|
-
_tuple = $assertType(w.req.Body, ptrType$
|
|
127233
|
+
_tuple = $assertType(w.req.Body, ptrType$97, true);
|
|
127182
127234
|
body$1 = _tuple[0];
|
|
127183
127235
|
ok = _tuple[1];
|
|
127184
127236
|
if (!(ok)) { _v = false; $s = 1; continue s; }
|
|
@@ -127208,9 +127260,9 @@ $packages["net/http"] = (function() {
|
|
|
127208
127260
|
var _r$2, c, $s, $r;
|
|
127209
127261
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; c = $f.c; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
127210
127262
|
c = this;
|
|
127211
|
-
if (!(c.bufr === ptrType$
|
|
127263
|
+
if (!(c.bufr === ptrType$77.nil)) {
|
|
127212
127264
|
putBufioReader(c.bufr);
|
|
127213
|
-
c.bufr = ptrType$
|
|
127265
|
+
c.bufr = ptrType$77.nil;
|
|
127214
127266
|
}
|
|
127215
127267
|
/* */ if (!(c.bufw === ptrType$9.nil)) { $s = 1; continue; }
|
|
127216
127268
|
/* */ $s = 2; continue;
|
|
@@ -127282,7 +127334,7 @@ $packages["net/http"] = (function() {
|
|
|
127282
127334
|
$panic(new $String("internal error"));
|
|
127283
127335
|
}
|
|
127284
127336
|
packedState = (x$4 = ((x$5 = $shiftLeft64($clone(time.Now(), time.Time).Unix(), 8), new $Uint64(x$5.$high, x$5.$low))), x$6 = (new $Uint64(0, state)), new $Uint64(x$4.$high | x$6.$high, (x$4.$low | x$6.$low) >>> 0));
|
|
127285
|
-
atomic.StoreUint64((x$7 = c.curState, (x$7.$ptr_atomic || (x$7.$ptr_atomic = new ptrType$
|
|
127337
|
+
atomic.StoreUint64((x$7 = c.curState, (x$7.$ptr_atomic || (x$7.$ptr_atomic = new ptrType$101(function() { return this.$target.atomic; }, function($v) { this.$target.atomic = $v; }, x$7)))), packedState);
|
|
127286
127338
|
if (!runHook) {
|
|
127287
127339
|
$s = -1; return;
|
|
127288
127340
|
}
|
|
@@ -127301,7 +127353,7 @@ $packages["net/http"] = (function() {
|
|
|
127301
127353
|
state = 0;
|
|
127302
127354
|
unixSec = new $Int64(0, 0);
|
|
127303
127355
|
c = this;
|
|
127304
|
-
packedState = atomic.LoadUint64((x$4 = c.curState, (x$4.$ptr_atomic || (x$4.$ptr_atomic = new ptrType$
|
|
127356
|
+
packedState = atomic.LoadUint64((x$4 = c.curState, (x$4.$ptr_atomic || (x$4.$ptr_atomic = new ptrType$101(function() { return this.$target.atomic; }, function($v) { this.$target.atomic = $v; }, x$4)))));
|
|
127305
127357
|
_tmp = ((new $Uint64(packedState.$high & 0, (packedState.$low & 255) >>> 0).$low >> 0));
|
|
127306
127358
|
_tmp$1 = ((x$5 = $shiftRightUint64(packedState, 8), new $Int64(x$5.$high, x$5.$low)));
|
|
127307
127359
|
state = _tmp;
|
|
@@ -127380,7 +127432,7 @@ $packages["net/http"] = (function() {
|
|
|
127380
127432
|
$s = -1; return;
|
|
127381
127433
|
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$6 = _r$6; $f.buf = buf; $f.err = err; $f.$s = $s; $f.$r = $r; return $f;
|
|
127382
127434
|
}; })(c), []]);
|
|
127383
|
-
_tuple = $assertType(c[0].rwc, ptrType$
|
|
127435
|
+
_tuple = $assertType(c[0].rwc, ptrType$76, true);
|
|
127384
127436
|
tlsConn = _tuple[0];
|
|
127385
127437
|
ok = _tuple[1];
|
|
127386
127438
|
/* */ if (ok) { $s = 5; continue; }
|
|
@@ -127447,7 +127499,7 @@ $packages["net/http"] = (function() {
|
|
|
127447
127499
|
cancelCtx = _tuple$2[1];
|
|
127448
127500
|
c[0].cancelCtx = cancelCtx;
|
|
127449
127501
|
$deferred.push([cancelCtx, []]);
|
|
127450
|
-
c[0].r = new connReader.ptr(c[0], new sync.Mutex.ptr(0, 0), false, arrayType$6.zero(), ptrType$
|
|
127502
|
+
c[0].r = new connReader.ptr(c[0], new sync.Mutex.ptr(0, 0), false, arrayType$6.zero(), ptrType$73.nil, false, false, new $Int64(0, 0));
|
|
127451
127503
|
_r$14 = newBufioReader(c[0].r); /* */ $s = 30; case 30: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; }
|
|
127452
127504
|
c[0].bufr = _r$14;
|
|
127453
127505
|
_r$15 = newBufioWriterSize((x$4 = new checkConnErrorWriter.ptr(c[0]), new x$4.constructor.elem(x$4)), 4096); /* */ $s = 31; case 31: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; }
|
|
@@ -127548,7 +127600,7 @@ $packages["net/http"] = (function() {
|
|
|
127548
127600
|
$s = -1; return;
|
|
127549
127601
|
/* } */ case 71:
|
|
127550
127602
|
$r = c[0].setState(c[0].rwc, 2, true); /* */ $s = 78; case 78: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
127551
|
-
c[0].curReq.Store((ptrType$
|
|
127603
|
+
c[0].curReq.Store((ptrType$95.nil));
|
|
127552
127604
|
if (!w.conn.server.doKeepAlives()) {
|
|
127553
127605
|
$s = -1; return;
|
|
127554
127606
|
}
|
|
@@ -127587,7 +127639,7 @@ $packages["net/http"] = (function() {
|
|
|
127587
127639
|
var _r$2, _tmp, _tmp$1, _tmp$2, _tuple, buf, c, err, rwc, w, $s, $deferred, $r;
|
|
127588
127640
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tuple = $f._tuple; buf = $f.buf; c = $f.c; err = $f.err; rwc = $f.rwc; w = $f.w; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred);
|
|
127589
127641
|
rwc = $ifaceNil;
|
|
127590
|
-
buf = ptrType$
|
|
127642
|
+
buf = ptrType$92.nil;
|
|
127591
127643
|
err = $ifaceNil;
|
|
127592
127644
|
w = this;
|
|
127593
127645
|
if ((w.$ptr_handlerDone || (w.$ptr_handlerDone = new ptrType$24(function() { return this.$target.handlerDone; }, function($v) { this.$target.handlerDone = $v; }, w))).isSet()) {
|
|
@@ -127633,14 +127685,14 @@ $packages["net/http"] = (function() {
|
|
|
127633
127685
|
var _r$2, _ref, fn, rc, v, v$1, v$2, $s, $r;
|
|
127634
127686
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; _ref = $f._ref; fn = $f.fn; rc = $f.rc; v = $f.v; v$1 = $f.v$1; v$2 = $f.v$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
127635
127687
|
_ref = rc;
|
|
127636
|
-
/* */ if ($assertType(_ref, ptrType$
|
|
127637
|
-
/* */ if ($assertType(_ref, ptrType$
|
|
127688
|
+
/* */ if ($assertType(_ref, ptrType$100, true)[1]) { $s = 1; continue; }
|
|
127689
|
+
/* */ if ($assertType(_ref, ptrType$97, true)[1]) { $s = 2; continue; }
|
|
127638
127690
|
/* */ $s = 3; continue;
|
|
127639
|
-
/* if ($assertType(_ref, ptrType$
|
|
127691
|
+
/* if ($assertType(_ref, ptrType$100, true)[1]) { */ case 1:
|
|
127640
127692
|
v = _ref.$val;
|
|
127641
127693
|
$r = registerOnHitEOF(v.readCloser, fn); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
127642
127694
|
$s = 4; continue;
|
|
127643
|
-
/* } else if ($assertType(_ref, ptrType$
|
|
127695
|
+
/* } else if ($assertType(_ref, ptrType$97, true)[1]) { */ case 2:
|
|
127644
127696
|
v$1 = _ref.$val;
|
|
127645
127697
|
$r = v$1.registerOnHitEOF(fn); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
127646
127698
|
$s = 4; continue;
|
|
@@ -127659,14 +127711,14 @@ $packages["net/http"] = (function() {
|
|
|
127659
127711
|
$s = -1; return false;
|
|
127660
127712
|
}
|
|
127661
127713
|
_ref = rc;
|
|
127662
|
-
/* */ if ($assertType(_ref, ptrType$
|
|
127663
|
-
/* */ if ($assertType(_ref, ptrType$
|
|
127714
|
+
/* */ if ($assertType(_ref, ptrType$100, true)[1]) { $s = 1; continue; }
|
|
127715
|
+
/* */ if ($assertType(_ref, ptrType$97, true)[1]) { $s = 2; continue; }
|
|
127664
127716
|
/* */ $s = 3; continue;
|
|
127665
|
-
/* if ($assertType(_ref, ptrType$
|
|
127717
|
+
/* if ($assertType(_ref, ptrType$100, true)[1]) { */ case 1:
|
|
127666
127718
|
v = _ref.$val;
|
|
127667
127719
|
_r$2 = requestBodyRemains(v.readCloser); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
127668
127720
|
$s = -1; return _r$2;
|
|
127669
|
-
/* } else if ($assertType(_ref, ptrType$
|
|
127721
|
+
/* } else if ($assertType(_ref, ptrType$97, true)[1]) { */ case 2:
|
|
127670
127722
|
v$1 = _ref.$val;
|
|
127671
127723
|
_r$3 = v$1.bodyRemains(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
127672
127724
|
$s = -1; return _r$3;
|
|
@@ -128148,7 +128200,7 @@ $packages["net/http"] = (function() {
|
|
|
128148
128200
|
c = _entry.k;
|
|
128149
128201
|
_r$3 = c.rwc.Close(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
128150
128202
|
_r$3;
|
|
128151
|
-
delete srv.activeConn[ptrType$
|
|
128203
|
+
delete srv.activeConn[ptrType$98.keyFor(c)];
|
|
128152
128204
|
_i++;
|
|
128153
128205
|
/* } */ $s = 3; continue; case 4:
|
|
128154
128206
|
$s = -1; return err;
|
|
@@ -128274,7 +128326,7 @@ $packages["net/http"] = (function() {
|
|
|
128274
128326
|
/* } */ case 5:
|
|
128275
128327
|
_r$2 = c.rwc.Close(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
128276
128328
|
_r$2;
|
|
128277
|
-
delete s.activeConn[ptrType$
|
|
128329
|
+
delete s.activeConn[ptrType$98.keyFor(c)];
|
|
128278
128330
|
_i++;
|
|
128279
128331
|
/* } */ $s = 2; continue; case 3:
|
|
128280
128332
|
$s = -1; return quiescent;
|
|
@@ -128528,9 +128580,9 @@ $packages["net/http"] = (function() {
|
|
|
128528
128580
|
s.activeConn = {};
|
|
128529
128581
|
}
|
|
128530
128582
|
if (add) {
|
|
128531
|
-
_key = c; (s.activeConn || $throwRuntimeError("assignment to entry in nil map"))[ptrType$
|
|
128583
|
+
_key = c; (s.activeConn || $throwRuntimeError("assignment to entry in nil map"))[ptrType$98.keyFor(_key)] = { k: _key, v: new structType.ptr() };
|
|
128532
128584
|
} else {
|
|
128533
|
-
delete s.activeConn[ptrType$
|
|
128585
|
+
delete s.activeConn[ptrType$98.keyFor(c)];
|
|
128534
128586
|
}
|
|
128535
128587
|
$s = -1; return;
|
|
128536
128588
|
/* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Server.ptr.prototype.trackConn }; } $f._key = _key; $f.add = add; $f.c = c; $f.s = s; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } }
|
|
@@ -128557,7 +128609,7 @@ $packages["net/http"] = (function() {
|
|
|
128557
128609
|
Server.ptr.prototype.doKeepAlives = function() {
|
|
128558
128610
|
var s;
|
|
128559
128611
|
s = this;
|
|
128560
|
-
return (atomic.LoadInt32((s.$ptr_disableKeepAlives || (s.$ptr_disableKeepAlives = new ptrType$
|
|
128612
|
+
return (atomic.LoadInt32((s.$ptr_disableKeepAlives || (s.$ptr_disableKeepAlives = new ptrType$93(function() { return this.$target.disableKeepAlives; }, function($v) { this.$target.disableKeepAlives = $v; }, s)))) === 0) && !s.shuttingDown();
|
|
128561
128613
|
};
|
|
128562
128614
|
Server.prototype.doKeepAlives = function() { return this.$val.doKeepAlives(); };
|
|
128563
128615
|
Server.ptr.prototype.shuttingDown = function() {
|
|
@@ -128571,10 +128623,10 @@ $packages["net/http"] = (function() {
|
|
|
128571
128623
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; srv = $f.srv; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
128572
128624
|
srv = this;
|
|
128573
128625
|
if (v) {
|
|
128574
|
-
atomic.StoreInt32((srv.$ptr_disableKeepAlives || (srv.$ptr_disableKeepAlives = new ptrType$
|
|
128626
|
+
atomic.StoreInt32((srv.$ptr_disableKeepAlives || (srv.$ptr_disableKeepAlives = new ptrType$93(function() { return this.$target.disableKeepAlives; }, function($v) { this.$target.disableKeepAlives = $v; }, srv))), 0);
|
|
128575
128627
|
$s = -1; return;
|
|
128576
128628
|
}
|
|
128577
|
-
atomic.StoreInt32((srv.$ptr_disableKeepAlives || (srv.$ptr_disableKeepAlives = new ptrType$
|
|
128629
|
+
atomic.StoreInt32((srv.$ptr_disableKeepAlives || (srv.$ptr_disableKeepAlives = new ptrType$93(function() { return this.$target.disableKeepAlives; }, function($v) { this.$target.disableKeepAlives = $v; }, srv))), 1);
|
|
128578
128630
|
_r$2 = srv.closeIdleConns(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
128579
128631
|
_r$2;
|
|
128580
128632
|
$s = -1; return;
|
|
@@ -128669,7 +128721,7 @@ $packages["net/http"] = (function() {
|
|
|
128669
128721
|
/* */ $s = 7; continue;
|
|
128670
128722
|
/* if (srv.TLSNextProto === false) { */ case 6:
|
|
128671
128723
|
conf = new http2Server.ptr(0, 0, 0, false, new time.Duration(0, 0), 0, 0, (function() {
|
|
128672
|
-
return http2NewPriorityWriteScheduler(ptrType$
|
|
128724
|
+
return http2NewPriorityWriteScheduler(ptrType$82.nil);
|
|
128673
128725
|
}), ptrType$50.nil);
|
|
128674
128726
|
_r$4 = http2ConfigureServer(srv, conf); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
128675
128727
|
srv.nextProtoErr = _r$4;
|
|
@@ -129626,9 +129678,9 @@ $packages["net/http"] = (function() {
|
|
|
129626
129678
|
} else if ((realLength.$high === 0 && realLength.$low === 0)) {
|
|
129627
129679
|
t.Body = new $pkg.NoBody.constructor.elem($pkg.NoBody);
|
|
129628
129680
|
} else if ((realLength.$high > 0 || (realLength.$high === 0 && realLength.$low > 0))) {
|
|
129629
|
-
t.Body = new body.ptr(io.LimitReader(r, realLength), $ifaceNil, ptrType$
|
|
129681
|
+
t.Body = new body.ptr(io.LimitReader(r, realLength), $ifaceNil, ptrType$77.nil, t.Close, false, new sync.Mutex.ptr(0, 0), false, false, false, $throwNilPointerError);
|
|
129630
129682
|
} else if (t.Close) {
|
|
129631
|
-
t.Body = new body.ptr(r, $ifaceNil, ptrType$
|
|
129683
|
+
t.Body = new body.ptr(r, $ifaceNil, ptrType$77.nil, t.Close, false, new sync.Mutex.ptr(0, 0), false, false, false, $throwNilPointerError);
|
|
129632
129684
|
} else {
|
|
129633
129685
|
t.Body = new $pkg.NoBody.constructor.elem($pkg.NoBody);
|
|
129634
129686
|
}
|
|
@@ -130001,10 +130053,10 @@ $packages["net/http"] = (function() {
|
|
|
130001
130053
|
_ref = b.hdr;
|
|
130002
130054
|
if ($assertType(_ref, ptrType$6, true)[1]) {
|
|
130003
130055
|
rr = _ref.$val;
|
|
130004
|
-
mergeSetHeader((rr.$ptr_Trailer || (rr.$ptr_Trailer = new ptrType$
|
|
130056
|
+
mergeSetHeader((rr.$ptr_Trailer || (rr.$ptr_Trailer = new ptrType$78(function() { return this.$target.Trailer; }, function($v) { this.$target.Trailer = $v; }, rr))), (hdr));
|
|
130005
130057
|
} else if ($assertType(_ref, ptrType$18, true)[1]) {
|
|
130006
130058
|
rr$1 = _ref.$val;
|
|
130007
|
-
mergeSetHeader((rr$1.$ptr_Trailer || (rr$1.$ptr_Trailer = new ptrType$
|
|
130059
|
+
mergeSetHeader((rr$1.$ptr_Trailer || (rr$1.$ptr_Trailer = new ptrType$78(function() { return this.$target.Trailer; }, function($v) { this.$target.Trailer = $v; }, rr$1))), (hdr));
|
|
130008
130060
|
}
|
|
130009
130061
|
$s = -1; return $ifaceNil;
|
|
130010
130062
|
/* */ } return; } if ($f === undefined) { $f = { $blk: body.ptr.prototype.readTrailer }; } $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.b = b; $f.buf = buf; $f.err = err; $f.hdr = hdr; $f.rr = rr; $f.rr$1 = rr$1; $f.$s = $s; $f.$r = $r; return $f;
|
|
@@ -130193,7 +130245,7 @@ $packages["net/http"] = (function() {
|
|
|
130193
130245
|
var _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _ref, _tuple, ok, r, r$1, $s, $r;
|
|
130194
130246
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _ref = $f._ref; _tuple = $f._tuple; ok = $f.ok; r = $f.r; r$1 = $f.r$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
130195
130247
|
_ref = r;
|
|
130196
|
-
if ($assertType(_ref, ptrType$
|
|
130248
|
+
if ($assertType(_ref, ptrType$88, true)[1] || $assertType(_ref, ptrType$38, true)[1] || $assertType(_ref, ptrType$89, true)[1]) {
|
|
130197
130249
|
$s = -1; return true;
|
|
130198
130250
|
}
|
|
130199
130251
|
_r$2 = reflect.TypeOf(r); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
@@ -130311,7 +130363,7 @@ $packages["net/http"] = (function() {
|
|
|
130311
130363
|
ptrType$69.methods = [{prop: "Init", name: "Init", pkg: "", typ: $funcType([], [], false)}];
|
|
130312
130364
|
ptrType$56.methods = [{prop: "Available", name: "Available", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}, {prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [$error], false)}];
|
|
130313
130365
|
ptrType$71.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Keys", name: "Keys", pkg: "", typ: $funcType([Header], [sliceType$2], false)}, {prop: "SortStrings", name: "SortStrings", pkg: "", typ: $funcType([sliceType$2], [], false)}];
|
|
130314
|
-
ptrType$68.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}, {prop: "CloseWithError", name: "CloseWithError", pkg: "", typ: $funcType([$error], [], false)}, {prop: "BreakWithError", name: "BreakWithError", pkg: "", typ: $funcType([$error], [], false)}, {prop: "closeWithErrorAndCode", name: "closeWithErrorAndCode", pkg: "net/http", typ: $funcType([$error, funcType], [], false)}, {prop: "closeWithError", name: "closeWithError", pkg: "net/http", typ: $funcType([ptrType$49, $error, funcType], [], false)}, {prop: "closeDoneLocked", name: "closeDoneLocked", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "Err", name: "Err", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Done", name: "Done", pkg: "", typ: $funcType([], [chanType$3], false)}];
|
|
130366
|
+
ptrType$68.methods = [{prop: "setBuffer", name: "setBuffer", pkg: "net/http", typ: $funcType([http2pipeBuffer], [], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}, {prop: "CloseWithError", name: "CloseWithError", pkg: "", typ: $funcType([$error], [], false)}, {prop: "BreakWithError", name: "BreakWithError", pkg: "", typ: $funcType([$error], [], false)}, {prop: "closeWithErrorAndCode", name: "closeWithErrorAndCode", pkg: "net/http", typ: $funcType([$error, funcType], [], false)}, {prop: "closeWithError", name: "closeWithError", pkg: "net/http", typ: $funcType([ptrType$49, $error, funcType], [], false)}, {prop: "closeDoneLocked", name: "closeDoneLocked", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "Err", name: "Err", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Done", name: "Done", pkg: "", typ: $funcType([], [chanType$3], false)}];
|
|
130315
130367
|
ptrType$52.methods = [{prop: "initialConnRecvWindowSize", name: "initialConnRecvWindowSize", pkg: "net/http", typ: $funcType([], [$Int32], false)}, {prop: "initialStreamRecvWindowSize", name: "initialStreamRecvWindowSize", pkg: "net/http", typ: $funcType([], [$Int32], false)}, {prop: "maxReadFrameSize", name: "maxReadFrameSize", pkg: "net/http", typ: $funcType([], [$Uint32], false)}, {prop: "maxConcurrentStreams", name: "maxConcurrentStreams", pkg: "net/http", typ: $funcType([], [$Uint32], false)}, {prop: "maxQueuedControlFrames", name: "maxQueuedControlFrames", pkg: "net/http", typ: $funcType([], [$Int], false)}, {prop: "ServeConn", name: "ServeConn", pkg: "", typ: $funcType([net.Conn, ptrType$54], [], false)}];
|
|
130316
130368
|
ptrType$50.methods = [{prop: "registerConn", name: "registerConn", pkg: "net/http", typ: $funcType([ptrType$8], [], false)}, {prop: "unregisterConn", name: "unregisterConn", pkg: "net/http", typ: $funcType([ptrType$8], [], false)}, {prop: "startGracefulShutdown", name: "startGracefulShutdown", pkg: "net/http", typ: $funcType([], [], false)}];
|
|
130317
130369
|
ptrType$54.methods = [{prop: "context", name: "context", pkg: "net/http", typ: $funcType([], [context.Context], false)}, {prop: "baseConfig", name: "baseConfig", pkg: "net/http", typ: $funcType([], [ptrType$51], false)}, {prop: "handler", name: "handler", pkg: "net/http", typ: $funcType([], [Handler], false)}];
|
|
@@ -130334,33 +130386,33 @@ $packages["net/http"] = (function() {
|
|
|
130334
130386
|
http2writeWindowUpdate.methods = [{prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}, {prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}];
|
|
130335
130387
|
http2FrameWriteRequest.methods = [{prop: "StreamID", name: "StreamID", pkg: "", typ: $funcType([], [$Uint32], false)}, {prop: "isControl", name: "isControl", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "DataSize", name: "DataSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Consume", name: "Consume", pkg: "", typ: $funcType([$Int32], [http2FrameWriteRequest, http2FrameWriteRequest, $Int], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
|
|
130336
130388
|
ptrType$124.methods = [{prop: "replyToWriter", name: "replyToWriter", pkg: "net/http", typ: $funcType([$error], [], false)}];
|
|
130337
|
-
ptrType$
|
|
130338
|
-
ptrType$
|
|
130339
|
-
ptrType$
|
|
130389
|
+
ptrType$81.methods = [{prop: "empty", name: "empty", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "push", name: "push", pkg: "net/http", typ: $funcType([http2FrameWriteRequest], [], false)}, {prop: "shift", name: "shift", pkg: "net/http", typ: $funcType([], [http2FrameWriteRequest], false)}, {prop: "consume", name: "consume", pkg: "net/http", typ: $funcType([$Int32], [http2FrameWriteRequest, $Bool], false)}];
|
|
130390
|
+
ptrType$84.methods = [{prop: "put", name: "put", pkg: "net/http", typ: $funcType([ptrType$81], [], false)}, {prop: "get", name: "get", pkg: "net/http", typ: $funcType([], [ptrType$81], false)}];
|
|
130391
|
+
ptrType$83.methods = [{prop: "setParent", name: "setParent", pkg: "net/http", typ: $funcType([ptrType$83], [], false)}, {prop: "addBytes", name: "addBytes", pkg: "net/http", typ: $funcType([$Int64], [], false)}, {prop: "walkReadyInOrder", name: "walkReadyInOrder", pkg: "net/http", typ: $funcType([$Bool, ptrType$85, funcType$13], [$Bool], false)}];
|
|
130340
130392
|
http2sortPriorityNodeSiblings.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}];
|
|
130341
|
-
ptrType$125.methods = [{prop: "OpenStream", name: "OpenStream", pkg: "", typ: $funcType([$Uint32, http2OpenStreamOptions], [], false)}, {prop: "CloseStream", name: "CloseStream", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "AdjustStream", name: "AdjustStream", pkg: "", typ: $funcType([$Uint32, http2PriorityParam], [], false)}, {prop: "Push", name: "Push", pkg: "", typ: $funcType([http2FrameWriteRequest], [], false)}, {prop: "Pop", name: "Pop", pkg: "", typ: $funcType([], [http2FrameWriteRequest, $Bool], false)}, {prop: "addClosedOrIdleNode", name: "addClosedOrIdleNode", pkg: "net/http", typ: $funcType([ptrType$
|
|
130393
|
+
ptrType$125.methods = [{prop: "OpenStream", name: "OpenStream", pkg: "", typ: $funcType([$Uint32, http2OpenStreamOptions], [], false)}, {prop: "CloseStream", name: "CloseStream", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "AdjustStream", name: "AdjustStream", pkg: "", typ: $funcType([$Uint32, http2PriorityParam], [], false)}, {prop: "Push", name: "Push", pkg: "", typ: $funcType([http2FrameWriteRequest], [], false)}, {prop: "Pop", name: "Pop", pkg: "", typ: $funcType([], [http2FrameWriteRequest, $Bool], false)}, {prop: "addClosedOrIdleNode", name: "addClosedOrIdleNode", pkg: "net/http", typ: $funcType([ptrType$85, $Int, ptrType$83], [], false)}, {prop: "removeNode", name: "removeNode", pkg: "net/http", typ: $funcType([ptrType$83], [], false)}];
|
|
130342
130394
|
ptrType$126.methods = [{prop: "OpenStream", name: "OpenStream", pkg: "", typ: $funcType([$Uint32, http2OpenStreamOptions], [], false)}, {prop: "CloseStream", name: "CloseStream", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "AdjustStream", name: "AdjustStream", pkg: "", typ: $funcType([$Uint32, http2PriorityParam], [], false)}, {prop: "Push", name: "Push", pkg: "", typ: $funcType([http2FrameWriteRequest], [], false)}, {prop: "Pop", name: "Pop", pkg: "", typ: $funcType([], [http2FrameWriteRequest, $Bool], false)}];
|
|
130343
|
-
Header.methods = [{prop: "Add", name: "Add", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "Values", name: "Values", pkg: "", typ: $funcType([$String], [sliceType$2], false)}, {prop: "get", name: "get", pkg: "net/http", typ: $funcType([$String], [$String], false)}, {prop: "has", name: "has", pkg: "net/http", typ: $funcType([$String], [$Bool], false)}, {prop: "Del", name: "Del", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([io.Writer], [$error], false)}, {prop: "write", name: "write", pkg: "net/http", typ: $funcType([io.Writer, ptrType$48], [$error], false)}, {prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [Header], false)}, {prop: "sortedKeyValues", name: "sortedKeyValues", pkg: "net/http", typ: $funcType([mapType$12], [sliceType$5, ptrType$
|
|
130395
|
+
Header.methods = [{prop: "Add", name: "Add", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "Values", name: "Values", pkg: "", typ: $funcType([$String], [sliceType$2], false)}, {prop: "get", name: "get", pkg: "net/http", typ: $funcType([$String], [$String], false)}, {prop: "has", name: "has", pkg: "net/http", typ: $funcType([$String], [$Bool], false)}, {prop: "Del", name: "Del", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([io.Writer], [$error], false)}, {prop: "write", name: "write", pkg: "net/http", typ: $funcType([io.Writer, ptrType$48], [$error], false)}, {prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [Header], false)}, {prop: "sortedKeyValues", name: "sortedKeyValues", pkg: "net/http", typ: $funcType([mapType$12], [sliceType$5, ptrType$86], false)}, {prop: "WriteSubset", name: "WriteSubset", pkg: "", typ: $funcType([io.Writer, mapType$12], [$error], false)}, {prop: "writeSubset", name: "writeSubset", pkg: "net/http", typ: $funcType([io.Writer, mapType$12, ptrType$48], [$error], false)}];
|
|
130344
130396
|
stringWriter.methods = [{prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}];
|
|
130345
|
-
ptrType$
|
|
130397
|
+
ptrType$86.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}];
|
|
130346
130398
|
ptrType$127.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
|
|
130347
130399
|
noBody.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([io.Writer], [$Int64, $error], false)}];
|
|
130348
130400
|
ptrType$128.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}];
|
|
130349
|
-
ptrType$6.methods = [{prop: "Context", name: "Context", pkg: "", typ: $funcType([], [context.Context], false)}, {prop: "WithContext", name: "WithContext", pkg: "", typ: $funcType([context.Context], [ptrType$6], false)}, {prop: "Clone", name: "Clone", pkg: "", typ: $funcType([context.Context], [ptrType$6], false)}, {prop: "ProtoAtLeast", name: "ProtoAtLeast", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "UserAgent", name: "UserAgent", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Cookies", name: "Cookies", pkg: "", typ: $funcType([], [sliceType$9], false)}, {prop: "Cookie", name: "Cookie", pkg: "", typ: $funcType([$String], [ptrType$26, $error], false)}, {prop: "AddCookie", name: "AddCookie", pkg: "", typ: $funcType([ptrType$26], [], false)}, {prop: "Referer", name: "Referer", pkg: "", typ: $funcType([], [$String], false)}, {prop: "MultipartReader", name: "MultipartReader", pkg: "", typ: $funcType([], [ptrType$
|
|
130350
|
-
ptrType$
|
|
130401
|
+
ptrType$6.methods = [{prop: "Context", name: "Context", pkg: "", typ: $funcType([], [context.Context], false)}, {prop: "WithContext", name: "WithContext", pkg: "", typ: $funcType([context.Context], [ptrType$6], false)}, {prop: "Clone", name: "Clone", pkg: "", typ: $funcType([context.Context], [ptrType$6], false)}, {prop: "ProtoAtLeast", name: "ProtoAtLeast", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "UserAgent", name: "UserAgent", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Cookies", name: "Cookies", pkg: "", typ: $funcType([], [sliceType$9], false)}, {prop: "Cookie", name: "Cookie", pkg: "", typ: $funcType([$String], [ptrType$26, $error], false)}, {prop: "AddCookie", name: "AddCookie", pkg: "", typ: $funcType([ptrType$26], [], false)}, {prop: "Referer", name: "Referer", pkg: "", typ: $funcType([], [$String], false)}, {prop: "MultipartReader", name: "MultipartReader", pkg: "", typ: $funcType([], [ptrType$87, $error], false)}, {prop: "multipartReader", name: "multipartReader", pkg: "net/http", typ: $funcType([$Bool], [ptrType$87, $error], false)}, {prop: "isH2Upgrade", name: "isH2Upgrade", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([io.Writer], [$error], false)}, {prop: "WriteProxy", name: "WriteProxy", pkg: "", typ: $funcType([io.Writer], [$error], false)}, {prop: "write", name: "write", pkg: "net/http", typ: $funcType([io.Writer, $Bool, Header, funcType$3], [$error], false)}, {prop: "BasicAuth", name: "BasicAuth", pkg: "", typ: $funcType([], [$String, $String, $Bool], false)}, {prop: "SetBasicAuth", name: "SetBasicAuth", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "ParseForm", name: "ParseForm", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ParseMultipartForm", name: "ParseMultipartForm", pkg: "", typ: $funcType([$Int64], [$error], false)}, {prop: "FormValue", name: "FormValue", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "PostFormValue", name: "PostFormValue", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "FormFile", name: "FormFile", pkg: "", typ: $funcType([$String], [multipart.File, ptrType$27, $error], false)}, {prop: "expectsContinue", name: "expectsContinue", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "wantsHttp10KeepAlive", name: "wantsHttp10KeepAlive", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "wantsClose", name: "wantsClose", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "closeBody", name: "closeBody", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "isReplayable", name: "isReplayable", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "outgoingLength", name: "outgoingLength", pkg: "net/http", typ: $funcType([], [$Int64], false)}, {prop: "requiresHTTP1", name: "requiresHTTP1", pkg: "net/http", typ: $funcType([], [$Bool], false)}];
|
|
130402
|
+
ptrType$91.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}];
|
|
130351
130403
|
ptrType$18.methods = [{prop: "Cookies", name: "Cookies", pkg: "", typ: $funcType([], [sliceType$9], false)}, {prop: "Location", name: "Location", pkg: "", typ: $funcType([], [ptrType$19, $error], false)}, {prop: "ProtoAtLeast", name: "ProtoAtLeast", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([io.Writer], [$error], false)}, {prop: "closeBody", name: "closeBody", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "bodyIsWritable", name: "bodyIsWritable", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "isProtocolSwitch", name: "isProtocolSwitch", pkg: "net/http", typ: $funcType([], [$Bool], false)}];
|
|
130352
|
-
ptrType$
|
|
130404
|
+
ptrType$98.methods = [{prop: "hijacked", name: "hijacked", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "hijackLocked", name: "hijackLocked", pkg: "net/http", typ: $funcType([], [net.Conn, ptrType$92, $error], false)}, {prop: "readRequest", name: "readRequest", pkg: "net/http", typ: $funcType([context.Context], [ptrType$95, $error], false)}, {prop: "finalFlush", name: "finalFlush", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "close", name: "close", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "closeWriteAndWait", name: "closeWriteAndWait", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "setState", name: "setState", pkg: "net/http", typ: $funcType([net.Conn, ConnState, $Bool], [], false)}, {prop: "getState", name: "getState", pkg: "net/http", typ: $funcType([], [ConnState, $Int64], false)}, {prop: "serve", name: "serve", pkg: "net/http", typ: $funcType([context.Context], [], false)}];
|
|
130353
130405
|
ptrType$131.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}, {prop: "flush", name: "flush", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "close", name: "close", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "writeHeader", name: "writeHeader", pkg: "net/http", typ: $funcType([sliceType$4], [], false)}];
|
|
130354
|
-
ptrType$
|
|
130406
|
+
ptrType$95.methods = [{prop: "finalTrailers", name: "finalTrailers", pkg: "net/http", typ: $funcType([], [Header], false)}, {prop: "declareTrailer", name: "declareTrailer", pkg: "net/http", typ: $funcType([$String], [], false)}, {prop: "requestTooLarge", name: "requestTooLarge", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "needsSniff", name: "needsSniff", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([io.Reader], [$Int64, $error], false)}, {prop: "Header", name: "Header", pkg: "", typ: $funcType([], [Header], false)}, {prop: "WriteHeader", name: "WriteHeader", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "bodyAllowed", name: "bodyAllowed", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "write", name: "write", pkg: "net/http", typ: $funcType([$Int, sliceType$4, $String], [$Int, $error], false)}, {prop: "finishRequest", name: "finishRequest", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "shouldReuseConnection", name: "shouldReuseConnection", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "closedRequestBodyEarly", name: "closedRequestBodyEarly", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [], false)}, {prop: "sendExpectationFailed", name: "sendExpectationFailed", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "Hijack", name: "Hijack", pkg: "", typ: $funcType([], [net.Conn, ptrType$92, $error], false)}, {prop: "CloseNotify", name: "CloseNotify", pkg: "", typ: $funcType([], [chanType$9], false)}];
|
|
130355
130407
|
ptrType$24.methods = [{prop: "isSet", name: "isSet", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "setTrue", name: "setTrue", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "setFalse", name: "setFalse", pkg: "net/http", typ: $funcType([], [], false)}];
|
|
130356
|
-
ptrType$
|
|
130357
|
-
ptrType$
|
|
130408
|
+
ptrType$94.methods = [{prop: "lock", name: "lock", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "unlock", name: "unlock", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "startBackgroundRead", name: "startBackgroundRead", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "backgroundRead", name: "backgroundRead", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "abortPendingRead", name: "abortPendingRead", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "setReadLimit", name: "setReadLimit", pkg: "net/http", typ: $funcType([$Int64], [], false)}, {prop: "setInfiniteReadLimit", name: "setInfiniteReadLimit", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "hitReadLimit", name: "hitReadLimit", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "handleReadError", name: "handleReadError", pkg: "net/http", typ: $funcType([$error], [], false)}, {prop: "closeNotify", name: "closeNotify", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}];
|
|
130409
|
+
ptrType$100.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}];
|
|
130358
130410
|
extraHeader.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([ptrType$9], [], false)}];
|
|
130359
130411
|
statusError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}];
|
|
130360
130412
|
HandlerFunc.methods = [{prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$6], [], false)}];
|
|
130361
130413
|
ptrType$132.methods = [{prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$6], [], false)}];
|
|
130362
130414
|
ptrType$133.methods = [{prop: "match", name: "match", pkg: "net/http", typ: $funcType([$String], [Handler, $String], false)}, {prop: "redirectToPathSlash", name: "redirectToPathSlash", pkg: "net/http", typ: $funcType([$String, $String, ptrType$19], [ptrType$19, $Bool], false)}, {prop: "shouldRedirectRLocked", name: "shouldRedirectRLocked", pkg: "net/http", typ: $funcType([$String, $String], [$Bool], false)}, {prop: "Handler", name: "Handler", pkg: "", typ: $funcType([ptrType$6], [Handler, $String], false)}, {prop: "handler", name: "handler", pkg: "net/http", typ: $funcType([$String, $String], [Handler, $String], false)}, {prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$6], [], false)}, {prop: "Handle", name: "Handle", pkg: "", typ: $funcType([$String, Handler], [], false)}, {prop: "HandleFunc", name: "HandleFunc", pkg: "", typ: $funcType([$String, funcType$9], [], false)}];
|
|
130363
|
-
ptrType$51.methods = [{prop: "newConn", name: "newConn", pkg: "net/http", typ: $funcType([net.Conn], [ptrType$
|
|
130415
|
+
ptrType$51.methods = [{prop: "newConn", name: "newConn", pkg: "net/http", typ: $funcType([net.Conn], [ptrType$98], false)}, {prop: "maxHeaderBytes", name: "maxHeaderBytes", pkg: "net/http", typ: $funcType([], [$Int], false)}, {prop: "initialReadLimitSize", name: "initialReadLimitSize", pkg: "net/http", typ: $funcType([], [$Int64], false)}, {prop: "getDoneChan", name: "getDoneChan", pkg: "net/http", typ: $funcType([], [chanType$3], false)}, {prop: "getDoneChanLocked", name: "getDoneChanLocked", pkg: "net/http", typ: $funcType([], [chanType$2], false)}, {prop: "closeDoneChanLocked", name: "closeDoneChanLocked", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Shutdown", name: "Shutdown", pkg: "", typ: $funcType([context.Context], [$error], false)}, {prop: "RegisterOnShutdown", name: "RegisterOnShutdown", pkg: "", typ: $funcType([funcType], [], false)}, {prop: "numListeners", name: "numListeners", pkg: "net/http", typ: $funcType([], [$Int], false)}, {prop: "closeIdleConns", name: "closeIdleConns", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "closeListenersLocked", name: "closeListenersLocked", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "ListenAndServe", name: "ListenAndServe", pkg: "", typ: $funcType([], [$error], false)}, {prop: "shouldConfigureHTTP2ForServe", name: "shouldConfigureHTTP2ForServe", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "Serve", name: "Serve", pkg: "", typ: $funcType([net.Listener], [$error], false)}, {prop: "ServeTLS", name: "ServeTLS", pkg: "", typ: $funcType([net.Listener, $String, $String], [$error], false)}, {prop: "trackListener", name: "trackListener", pkg: "net/http", typ: $funcType([ptrType$102, $Bool], [$Bool], false)}, {prop: "trackConn", name: "trackConn", pkg: "net/http", typ: $funcType([ptrType$98, $Bool], [], false)}, {prop: "idleTimeout", name: "idleTimeout", pkg: "net/http", typ: $funcType([], [time.Duration], false)}, {prop: "readHeaderTimeout", name: "readHeaderTimeout", pkg: "net/http", typ: $funcType([], [time.Duration], false)}, {prop: "doKeepAlives", name: "doKeepAlives", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "shuttingDown", name: "shuttingDown", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "SetKeepAlivesEnabled", name: "SetKeepAlivesEnabled", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "logf", name: "logf", pkg: "net/http", typ: $funcType([$String, sliceType], [], true)}, {prop: "ListenAndServeTLS", name: "ListenAndServeTLS", pkg: "", typ: $funcType([$String, $String], [$error], false)}, {prop: "setupHTTP2_ServeTLS", name: "setupHTTP2_ServeTLS", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "setupHTTP2_Serve", name: "setupHTTP2_Serve", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "onceSetNextProtoDefaults_Serve", name: "onceSetNextProtoDefaults_Serve", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "onceSetNextProtoDefaults", name: "onceSetNextProtoDefaults", pkg: "net/http", typ: $funcType([], [], false)}];
|
|
130364
130416
|
ConnState.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
|
|
130365
130417
|
serverHandler.methods = [{prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$6], [], false)}];
|
|
130366
130418
|
ptrType$135.methods = [{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "close", name: "close", pkg: "net/http", typ: $funcType([], [], false)}];
|
|
@@ -130378,7 +130430,7 @@ $packages["net/http"] = (function() {
|
|
|
130378
130430
|
ptrType$105.methods = [{prop: "shouldSendChunkedRequestBody", name: "shouldSendChunkedRequestBody", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "probeRequestBody", name: "probeRequestBody", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "shouldSendContentLength", name: "shouldSendContentLength", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "writeHeader", name: "writeHeader", pkg: "net/http", typ: $funcType([io.Writer, ptrType$48], [$error], false)}, {prop: "writeBody", name: "writeBody", pkg: "net/http", typ: $funcType([io.Writer], [$error], false)}, {prop: "doBodyCopy", name: "doBodyCopy", pkg: "net/http", typ: $funcType([io.Writer, io.Reader], [$Int64, $error], false)}, {prop: "unwrapBody", name: "unwrapBody", pkg: "net/http", typ: $funcType([], [io.Reader], false)}];
|
|
130379
130431
|
ptrType$142.methods = [{prop: "protoAtLeast", name: "protoAtLeast", pkg: "net/http", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "parseTransferEncoding", name: "parseTransferEncoding", pkg: "net/http", typ: $funcType([], [$error], false)}];
|
|
130380
130432
|
ptrType$107.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}];
|
|
130381
|
-
ptrType$
|
|
130433
|
+
ptrType$97.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}, {prop: "readLocked", name: "readLocked", pkg: "net/http", typ: $funcType([sliceType$4], [$Int, $error], false)}, {prop: "readTrailer", name: "readTrailer", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "unreadDataSizeLocked", name: "unreadDataSizeLocked", pkg: "net/http", typ: $funcType([], [$Int64], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "didEarlyClose", name: "didEarlyClose", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "bodyRemains", name: "bodyRemains", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "registerOnHitEOF", name: "registerOnHitEOF", pkg: "net/http", typ: $funcType([funcType], [], false)}];
|
|
130382
130434
|
bodyLocked.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}];
|
|
130383
130435
|
finishAsyncByteRead.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}];
|
|
130384
130436
|
bufioFlushWriter.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}];
|
|
@@ -130448,10 +130500,10 @@ $packages["net/http"] = (function() {
|
|
|
130448
130500
|
http2OpenStreamOptions.init("", [{prop: "PusherID", name: "PusherID", embedded: false, exported: true, typ: $Uint32, tag: ""}]);
|
|
130449
130501
|
http2FrameWriteRequest.init("net/http", [{prop: "write", name: "write", embedded: false, exported: false, typ: http2writeFramer, tag: ""}, {prop: "stream", name: "stream", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: chanType, tag: ""}]);
|
|
130450
130502
|
http2writeQueue.init("net/http", [{prop: "s", name: "s", embedded: false, exported: false, typ: sliceType$24, tag: ""}]);
|
|
130451
|
-
http2writeQueuePool.init(ptrType$
|
|
130503
|
+
http2writeQueuePool.init(ptrType$81);
|
|
130452
130504
|
http2PriorityWriteSchedulerConfig.init("", [{prop: "MaxClosedNodesInTree", name: "MaxClosedNodesInTree", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "MaxIdleNodesInTree", name: "MaxIdleNodesInTree", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "ThrottleOutOfOrderWrites", name: "ThrottleOutOfOrderWrites", embedded: false, exported: true, typ: $Bool, tag: ""}]);
|
|
130453
|
-
http2priorityNode.init("net/http", [{prop: "q", name: "q", embedded: false, exported: false, typ: http2writeQueue, tag: ""}, {prop: "id", name: "id", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "weight", name: "weight", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "state", name: "state", embedded: false, exported: false, typ: http2priorityNodeState, tag: ""}, {prop: "bytes", name: "bytes", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "subtreeBytes", name: "subtreeBytes", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "parent", name: "parent", embedded: false, exported: false, typ: ptrType$
|
|
130454
|
-
http2sortPriorityNodeSiblings.init(ptrType$
|
|
130505
|
+
http2priorityNode.init("net/http", [{prop: "q", name: "q", embedded: false, exported: false, typ: http2writeQueue, tag: ""}, {prop: "id", name: "id", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "weight", name: "weight", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "state", name: "state", embedded: false, exported: false, typ: http2priorityNodeState, tag: ""}, {prop: "bytes", name: "bytes", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "subtreeBytes", name: "subtreeBytes", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "parent", name: "parent", embedded: false, exported: false, typ: ptrType$83, tag: ""}, {prop: "kids", name: "kids", embedded: false, exported: false, typ: ptrType$83, tag: ""}, {prop: "prev", name: "prev", embedded: false, exported: false, typ: ptrType$83, tag: ""}, {prop: "next", name: "next", embedded: false, exported: false, typ: ptrType$83, tag: ""}]);
|
|
130506
|
+
http2sortPriorityNodeSiblings.init(ptrType$83);
|
|
130455
130507
|
http2priorityWriteScheduler.init("net/http", [{prop: "root", name: "root", embedded: false, exported: false, typ: http2priorityNode, tag: ""}, {prop: "nodes", name: "nodes", embedded: false, exported: false, typ: mapType$10, tag: ""}, {prop: "maxID", name: "maxID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "closedNodes", name: "closedNodes", embedded: false, exported: false, typ: sliceType$25, tag: ""}, {prop: "idleNodes", name: "idleNodes", embedded: false, exported: false, typ: sliceType$25, tag: ""}, {prop: "maxClosedNodesInTree", name: "maxClosedNodesInTree", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "maxIdleNodesInTree", name: "maxIdleNodesInTree", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "writeThrottleLimit", name: "writeThrottleLimit", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "enableWriteThrottle", name: "enableWriteThrottle", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "tmp", name: "tmp", embedded: false, exported: false, typ: sliceType$25, tag: ""}, {prop: "queuePool", name: "queuePool", embedded: false, exported: false, typ: http2writeQueuePool, tag: ""}]);
|
|
130456
130508
|
http2randomWriteScheduler.init("net/http", [{prop: "zero", name: "zero", embedded: false, exported: false, typ: http2writeQueue, tag: ""}, {prop: "sq", name: "sq", embedded: false, exported: false, typ: mapType$11, tag: ""}, {prop: "queuePool", name: "queuePool", embedded: false, exported: false, typ: http2writeQueuePool, tag: ""}]);
|
|
130457
130509
|
Header.init($String, sliceType$2);
|
|
@@ -130469,13 +130521,13 @@ $packages["net/http"] = (function() {
|
|
|
130469
130521
|
Response.init("", [{prop: "Status", name: "Status", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "StatusCode", name: "StatusCode", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Proto", name: "Proto", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "ProtoMajor", name: "ProtoMajor", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "ProtoMinor", name: "ProtoMinor", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Header", name: "Header", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "Body", name: "Body", embedded: false, exported: true, typ: io.ReadCloser, tag: ""}, {prop: "ContentLength", name: "ContentLength", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "TransferEncoding", name: "TransferEncoding", embedded: false, exported: true, typ: sliceType$2, tag: ""}, {prop: "Close", name: "Close", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Uncompressed", name: "Uncompressed", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Trailer", name: "Trailer", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "Request", name: "Request", embedded: false, exported: true, typ: ptrType$6, tag: ""}, {prop: "TLS", name: "TLS", embedded: false, exported: true, typ: ptrType$21, tag: ""}]);
|
|
130470
130522
|
Handler.init([{prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$6], [], false)}]);
|
|
130471
130523
|
ResponseWriter.init([{prop: "Header", name: "Header", pkg: "", typ: $funcType([], [Header], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}, {prop: "WriteHeader", name: "WriteHeader", pkg: "", typ: $funcType([$Int], [], false)}]);
|
|
130472
|
-
conn.init("net/http", [{prop: "server", name: "server", embedded: false, exported: false, typ: ptrType$51, tag: ""}, {prop: "cancelCtx", name: "cancelCtx", embedded: false, exported: false, typ: context.CancelFunc, tag: ""}, {prop: "rwc", name: "rwc", embedded: false, exported: false, typ: net.Conn, tag: ""}, {prop: "remoteAddr", name: "remoteAddr", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "tlsState", name: "tlsState", embedded: false, exported: false, typ: ptrType$21, tag: ""}, {prop: "werr", name: "werr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: ptrType$
|
|
130473
|
-
chunkWriter.init("net/http", [{prop: "res", name: "res", embedded: false, exported: false, typ: ptrType$
|
|
130474
|
-
response.init("net/http", [{prop: "conn", name: "conn", embedded: false, exported: false, typ: ptrType$
|
|
130524
|
+
conn.init("net/http", [{prop: "server", name: "server", embedded: false, exported: false, typ: ptrType$51, tag: ""}, {prop: "cancelCtx", name: "cancelCtx", embedded: false, exported: false, typ: context.CancelFunc, tag: ""}, {prop: "rwc", name: "rwc", embedded: false, exported: false, typ: net.Conn, tag: ""}, {prop: "remoteAddr", name: "remoteAddr", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "tlsState", name: "tlsState", embedded: false, exported: false, typ: ptrType$21, tag: ""}, {prop: "werr", name: "werr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: ptrType$94, tag: ""}, {prop: "bufr", name: "bufr", embedded: false, exported: false, typ: ptrType$77, tag: ""}, {prop: "bufw", name: "bufw", embedded: false, exported: false, typ: ptrType$9, tag: ""}, {prop: "lastMethod", name: "lastMethod", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "curReq", name: "curReq", embedded: false, exported: false, typ: atomic.Value, tag: ""}, {prop: "curState", name: "curState", embedded: false, exported: false, typ: structType$2, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "hijackedv", name: "hijackedv", embedded: false, exported: false, typ: $Bool, tag: ""}]);
|
|
130525
|
+
chunkWriter.init("net/http", [{prop: "res", name: "res", embedded: false, exported: false, typ: ptrType$95, tag: ""}, {prop: "header", name: "header", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "wroteHeader", name: "wroteHeader", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "chunking", name: "chunking", embedded: false, exported: false, typ: $Bool, tag: ""}]);
|
|
130526
|
+
response.init("net/http", [{prop: "conn", name: "conn", embedded: false, exported: false, typ: ptrType$98, tag: ""}, {prop: "req", name: "req", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "reqBody", name: "reqBody", embedded: false, exported: false, typ: io.ReadCloser, tag: ""}, {prop: "cancelCtx", name: "cancelCtx", embedded: false, exported: false, typ: context.CancelFunc, tag: ""}, {prop: "wroteHeader", name: "wroteHeader", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "wroteContinue", name: "wroteContinue", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "wants10KeepAlive", name: "wants10KeepAlive", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "wantsClose", name: "wantsClose", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "canWriteContinue", name: "canWriteContinue", embedded: false, exported: false, typ: atomicBool, tag: ""}, {prop: "writeContinueMu", name: "writeContinueMu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: ptrType$9, tag: ""}, {prop: "cw", name: "cw", embedded: false, exported: false, typ: chunkWriter, tag: ""}, {prop: "handlerHeader", name: "handlerHeader", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "calledHeader", name: "calledHeader", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "written", name: "written", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "contentLength", name: "contentLength", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "status", name: "status", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "closeAfterReply", name: "closeAfterReply", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "requestBodyLimitHit", name: "requestBodyLimitHit", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "trailers", name: "trailers", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "handlerDone", name: "handlerDone", embedded: false, exported: false, typ: atomicBool, tag: ""}, {prop: "dateBuf", name: "dateBuf", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "clenBuf", name: "clenBuf", embedded: false, exported: false, typ: arrayType$7, tag: ""}, {prop: "statusBuf", name: "statusBuf", embedded: false, exported: false, typ: arrayType$8, tag: ""}, {prop: "closeNotifyCh", name: "closeNotifyCh", embedded: false, exported: false, typ: chanType$10, tag: ""}, {prop: "didCloseNotify", name: "didCloseNotify", embedded: false, exported: false, typ: $Int32, tag: ""}]);
|
|
130475
130527
|
writerOnly.init("", [{prop: "Writer", name: "Writer", embedded: true, exported: true, typ: io.Writer, tag: ""}]);
|
|
130476
130528
|
readResult.init("net/http", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: incomparable, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "b", name: "b", embedded: false, exported: false, typ: $Uint8, tag: ""}]);
|
|
130477
|
-
connReader.init("net/http", [{prop: "conn", name: "conn", embedded: false, exported: false, typ: ptrType$
|
|
130478
|
-
expectContinueReader.init("net/http", [{prop: "resp", name: "resp", embedded: false, exported: false, typ: ptrType$
|
|
130529
|
+
connReader.init("net/http", [{prop: "conn", name: "conn", embedded: false, exported: false, typ: ptrType$98, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "hasByte", name: "hasByte", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "byteBuf", name: "byteBuf", embedded: false, exported: false, typ: arrayType$6, tag: ""}, {prop: "cond", name: "cond", embedded: false, exported: false, typ: ptrType$73, tag: ""}, {prop: "inRead", name: "inRead", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "aborted", name: "aborted", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "remain", name: "remain", embedded: false, exported: false, typ: $Int64, tag: ""}]);
|
|
130530
|
+
expectContinueReader.init("net/http", [{prop: "resp", name: "resp", embedded: false, exported: false, typ: ptrType$95, tag: ""}, {prop: "readCloser", name: "readCloser", embedded: false, exported: false, typ: io.ReadCloser, tag: ""}, {prop: "closed", name: "closed", embedded: false, exported: false, typ: atomicBool, tag: ""}, {prop: "sawEOF", name: "sawEOF", embedded: false, exported: false, typ: atomicBool, tag: ""}]);
|
|
130479
130531
|
extraHeader.init("net/http", [{prop: "contentType", name: "contentType", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "connection", name: "connection", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "transferEncoding", name: "transferEncoding", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "date", name: "date", embedded: false, exported: false, typ: sliceType$4, tag: ""}, {prop: "contentLength", name: "contentLength", embedded: false, exported: false, typ: sliceType$4, tag: ""}]);
|
|
130480
130532
|
closeWriter.init([{prop: "CloseWrite", name: "CloseWrite", pkg: "", typ: $funcType([], [$error], false)}]);
|
|
130481
130533
|
statusError.init("net/http", [{prop: "code", name: "code", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "text", name: "text", embedded: false, exported: false, typ: $String, tag: ""}]);
|
|
@@ -130487,9 +130539,9 @@ $packages["net/http"] = (function() {
|
|
|
130487
130539
|
serverHandler.init("net/http", [{prop: "srv", name: "srv", embedded: false, exported: false, typ: ptrType$51, tag: ""}]);
|
|
130488
130540
|
onceCloseListener.init("net/http", [{prop: "Listener", name: "Listener", embedded: true, exported: true, typ: net.Listener, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "closeErr", name: "closeErr", embedded: false, exported: false, typ: $error, tag: ""}]);
|
|
130489
130541
|
globalOptionsHandler.init("", []);
|
|
130490
|
-
initALPNRequest.init("net/http", [{prop: "ctx", name: "ctx", embedded: false, exported: false, typ: context.Context, tag: ""}, {prop: "c", name: "c", embedded: false, exported: false, typ: ptrType$
|
|
130542
|
+
initALPNRequest.init("net/http", [{prop: "ctx", name: "ctx", embedded: false, exported: false, typ: context.Context, tag: ""}, {prop: "c", name: "c", embedded: false, exported: false, typ: ptrType$76, tag: ""}, {prop: "h", name: "h", embedded: false, exported: false, typ: serverHandler, tag: ""}]);
|
|
130491
130543
|
loggingConn.init("net/http", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "Conn", name: "Conn", embedded: true, exported: true, typ: net.Conn, tag: ""}]);
|
|
130492
|
-
checkConnErrorWriter.init("net/http", [{prop: "c", name: "c", embedded: false, exported: false, typ: ptrType$
|
|
130544
|
+
checkConnErrorWriter.init("net/http", [{prop: "c", name: "c", embedded: false, exported: false, typ: ptrType$98, tag: ""}]);
|
|
130493
130545
|
sniffSig.init([{prop: "match", name: "match", pkg: "net/http", typ: $funcType([sliceType$4, $Int], [$String], false)}]);
|
|
130494
130546
|
exactSig.init("net/http", [{prop: "sig", name: "sig", embedded: false, exported: false, typ: sliceType$4, tag: ""}, {prop: "ct", name: "ct", embedded: false, exported: false, typ: $String, tag: ""}]);
|
|
130495
130547
|
maskedSig.init("net/http", [{prop: "mask", name: "mask", embedded: false, exported: false, typ: sliceType$4, tag: ""}, {prop: "pat", name: "pat", embedded: false, exported: false, typ: sliceType$4, tag: ""}, {prop: "skipWS", name: "skipWS", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "ct", name: "ct", embedded: false, exported: false, typ: $String, tag: ""}]);
|
|
@@ -130498,11 +130550,11 @@ $packages["net/http"] = (function() {
|
|
|
130498
130550
|
textSig.init("", []);
|
|
130499
130551
|
errorReader.init("net/http", [{prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]);
|
|
130500
130552
|
byteReader.init("net/http", [{prop: "b", name: "b", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: $Bool, tag: ""}]);
|
|
130501
|
-
transferWriter.init("net/http", [{prop: "Method", name: "Method", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Body", name: "Body", embedded: false, exported: true, typ: io.Reader, tag: ""}, {prop: "BodyCloser", name: "BodyCloser", embedded: false, exported: true, typ: io.Closer, tag: ""}, {prop: "ResponseToHEAD", name: "ResponseToHEAD", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "ContentLength", name: "ContentLength", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "Close", name: "Close", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "TransferEncoding", name: "TransferEncoding", embedded: false, exported: true, typ: sliceType$2, tag: ""}, {prop: "Header", name: "Header", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "Trailer", name: "Trailer", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "IsResponse", name: "IsResponse", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "bodyReadError", name: "bodyReadError", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "FlushHeaders", name: "FlushHeaders", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "ByteReadCh", name: "ByteReadCh", embedded: false, exported: true, typ: chanType$
|
|
130553
|
+
transferWriter.init("net/http", [{prop: "Method", name: "Method", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Body", name: "Body", embedded: false, exported: true, typ: io.Reader, tag: ""}, {prop: "BodyCloser", name: "BodyCloser", embedded: false, exported: true, typ: io.Closer, tag: ""}, {prop: "ResponseToHEAD", name: "ResponseToHEAD", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "ContentLength", name: "ContentLength", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "Close", name: "Close", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "TransferEncoding", name: "TransferEncoding", embedded: false, exported: true, typ: sliceType$2, tag: ""}, {prop: "Header", name: "Header", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "Trailer", name: "Trailer", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "IsResponse", name: "IsResponse", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "bodyReadError", name: "bodyReadError", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "FlushHeaders", name: "FlushHeaders", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "ByteReadCh", name: "ByteReadCh", embedded: false, exported: true, typ: chanType$11, tag: ""}]);
|
|
130502
130554
|
transferReader.init("", [{prop: "Header", name: "Header", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "StatusCode", name: "StatusCode", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "RequestMethod", name: "RequestMethod", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "ProtoMajor", name: "ProtoMajor", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "ProtoMinor", name: "ProtoMinor", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Body", name: "Body", embedded: false, exported: true, typ: io.ReadCloser, tag: ""}, {prop: "ContentLength", name: "ContentLength", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "Chunked", name: "Chunked", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Close", name: "Close", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Trailer", name: "Trailer", embedded: false, exported: true, typ: Header, tag: ""}]);
|
|
130503
130555
|
unsupportedTEError.init("net/http", [{prop: "err", name: "err", embedded: false, exported: false, typ: $String, tag: ""}]);
|
|
130504
|
-
body.init("net/http", [{prop: "src", name: "src", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "hdr", name: "hdr", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: ptrType$
|
|
130505
|
-
bodyLocked.init("net/http", [{prop: "b", name: "b", embedded: false, exported: false, typ: ptrType$
|
|
130556
|
+
body.init("net/http", [{prop: "src", name: "src", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "hdr", name: "hdr", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: ptrType$77, tag: ""}, {prop: "closing", name: "closing", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "doEarlyClose", name: "doEarlyClose", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "sawEOF", name: "sawEOF", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "closed", name: "closed", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "earlyClose", name: "earlyClose", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "onHitEOF", name: "onHitEOF", embedded: false, exported: false, typ: funcType, tag: ""}]);
|
|
130557
|
+
bodyLocked.init("net/http", [{prop: "b", name: "b", embedded: false, exported: false, typ: ptrType$97, tag: ""}]);
|
|
130506
130558
|
finishAsyncByteRead.init("net/http", [{prop: "tw", name: "tw", embedded: false, exported: false, typ: ptrType$105, tag: ""}]);
|
|
130507
130559
|
bufioFlushWriter.init("net/http", [{prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}]);
|
|
130508
130560
|
readTrackingBody.init("net/http", [{prop: "ReadCloser", name: "ReadCloser", embedded: true, exported: true, typ: io.ReadCloser, tag: ""}, {prop: "didRead", name: "didRead", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "didClose", name: "didClose", embedded: false, exported: false, typ: $Bool, tag: ""}]);
|
|
@@ -130593,6 +130645,7 @@ $packages["net/http"] = (function() {
|
|
|
130593
130645
|
}))]);
|
|
130594
130646
|
http2errReadEmpty = errors.New("read from empty dataBuffer");
|
|
130595
130647
|
http2errCodeName = $makeMap(http2ErrCode.keyFor, [{ k: 0, v: "NO_ERROR" }, { k: 1, v: "PROTOCOL_ERROR" }, { k: 2, v: "INTERNAL_ERROR" }, { k: 3, v: "FLOW_CONTROL_ERROR" }, { k: 4, v: "SETTINGS_TIMEOUT" }, { k: 5, v: "STREAM_CLOSED" }, { k: 6, v: "FRAME_SIZE_ERROR" }, { k: 7, v: "REFUSED_STREAM" }, { k: 8, v: "CANCEL" }, { k: 9, v: "COMPRESSION_ERROR" }, { k: 10, v: "CONNECT_ERROR" }, { k: 11, v: "ENHANCE_YOUR_CALM" }, { k: 12, v: "INADEQUATE_SECURITY" }, { k: 13, v: "HTTP_1_1_REQUIRED" }]);
|
|
130648
|
+
http2errFromPeer = errors.New("received from peer");
|
|
130596
130649
|
http2errMixPseudoHeaderTypes = errors.New("mix of request and response pseudo headers");
|
|
130597
130650
|
http2errPseudoAfterRegular = errors.New("pseudo header field after regular");
|
|
130598
130651
|
http2padZeros = $makeSlice(sliceType$4, 255);
|
|
@@ -130660,6 +130713,7 @@ $packages["net/http"] = (function() {
|
|
|
130660
130713
|
http2errStopReqBodyWrite = errors.New("http2: aborting request body write");
|
|
130661
130714
|
http2errStopReqBodyWriteAndCancel = errors.New("http2: canceling request");
|
|
130662
130715
|
http2errReqBodyTooLong = errors.New("http2: request body larger than specified content length");
|
|
130716
|
+
http2errNilRequestURL = errors.New("http2: Request.URI is nil");
|
|
130663
130717
|
http2errClosedResponseBody = errors.New("http2: response body closed");
|
|
130664
130718
|
http2errResponseHeaderListSize = errors.New("http2: response header list larger than advertised limit");
|
|
130665
130719
|
http2errRequestHeaderListSize = errors.New("http2: request header list larger than peer's advertised limit");
|
|
@@ -135657,6 +135711,21 @@ $packages["github.com/supraio/client-daemon/pkg/window"] = (function() {
|
|
|
135657
135711
|
$pkg.$init = $init;
|
|
135658
135712
|
return $pkg;
|
|
135659
135713
|
})();
|
|
135714
|
+
$packages["github.com/supraio/client-daemon/pkg/x264/general"] = (function() {
|
|
135715
|
+
var $pkg = {}, $init, image, OutputBuffer, ptrType;
|
|
135716
|
+
image = $packages["image"];
|
|
135717
|
+
OutputBuffer = $pkg.OutputBuffer = $newType(8, $kindInterface, "general.OutputBuffer", true, "github.com/supraio/client-daemon/pkg/x264/general", true, null);
|
|
135718
|
+
ptrType = $ptrType(image.YCbCr);
|
|
135719
|
+
OutputBuffer.init([{prop: "YCbCr", name: "YCbCr", pkg: "", typ: $funcType([], [ptrType], false)}]);
|
|
135720
|
+
$init = function() {
|
|
135721
|
+
$pkg.$init = function() {};
|
|
135722
|
+
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
135723
|
+
$r = image.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
135724
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
135725
|
+
};
|
|
135726
|
+
$pkg.$init = $init;
|
|
135727
|
+
return $pkg;
|
|
135728
|
+
})();
|
|
135660
135729
|
$packages["github.com/nuberu/webgl/types"] = (function() {
|
|
135661
135730
|
var $pkg = {}, $init, js, ActiveInfo, Attributes, GLEnum, PowerPreference, Buffer, FrameBuffer, RenderBuffer, Program, Shader, ShaderPrecisionFormat, Texture, UniformLocation, VertexArray, ptrType, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, NewActiveInfo, NewBuffer, NewFrameBuffer, NewRenderBuffer, NewProgram, NewShader, NewShaderPrecisionFormat, NewTexture, NewUniformLocation, NewVertexArray;
|
|
135662
135731
|
js = $packages["syscall/js"];
|
|
@@ -136021,7 +136090,7 @@ $packages["github.com/nuberu/webgl/extensions"] = (function() {
|
|
|
136021
136090
|
return $pkg;
|
|
136022
136091
|
})();
|
|
136023
136092
|
$packages["github.com/nuberu/webgl"] = (function() {
|
|
136024
|
-
var $pkg = {}, $init, errors, fmt, extensions, types, reflect, runtime, js, RenderingContext, sliceType, sliceType$1, sliceType$2, sliceType$3, sliceType$4, sliceType$5, sliceType$6, sliceType$7, sliceType$8, sliceType$9, ptrType, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, sliceType$10, ptrType$10, ptrType$11, ptrType$12, ptrType$13, ptrType$14, ptrType$15, ptrType$16, sliceType$11, ptrType$17, arrayType, arrayType$1, arrayType$2, sliceType$12, sliceType$13, sliceType$14, sliceType$15, ptrType$18, ptrType$19, ptrType$20, ptrType$21, ptrType$22, ptrType$23, sliceToByteSlice, TypedArrayOf, WrapContext, FromCanvas;
|
|
136093
|
+
var $pkg = {}, $init, errors, fmt, extensions, types, reflect, runtime, js, RenderingContext, sliceType, sliceType$1, sliceType$2, sliceType$3, sliceType$4, sliceType$5, sliceType$6, sliceType$7, sliceType$8, sliceType$9, ptrType, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, sliceType$10, ptrType$10, ptrType$11, ptrType$12, ptrType$13, ptrType$14, ptrType$15, ptrType$16, sliceType$11, ptrType$17, arrayType, arrayType$1, arrayType$2, sliceType$12, sliceType$13, sliceType$14, sliceType$15, ptrType$18, ptrType$19, ptrType$20, ptrType$21, ptrType$22, ptrType$23, sliceToByteSlice, TypedArrayOf, WrapContext, FromCanvas, polyfillOldVersion;
|
|
136025
136094
|
errors = $packages["errors"];
|
|
136026
136095
|
fmt = $packages["fmt"];
|
|
136027
136096
|
extensions = $packages["github.com/nuberu/webgl/extensions"];
|
|
@@ -136109,24 +136178,24 @@ $packages["github.com/nuberu/webgl"] = (function() {
|
|
|
136109
136178
|
/* */ if ($assertType(_ref, sliceType$9, true)[1]) { $s = 10; continue; }
|
|
136110
136179
|
/* */ $s = 11; continue;
|
|
136111
136180
|
/* if ($assertType(_ref, sliceType, true)[1]) { */ case 1:
|
|
136112
|
-
s$
|
|
136113
|
-
h = ($pointerOfStructConversion(((s$
|
|
136181
|
+
s$4[0] = _ref.$val;
|
|
136182
|
+
h = ($pointerOfStructConversion(((s$4.$ptr || (s$4.$ptr = new ptrType$1(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$4)))), ptrType));
|
|
136114
136183
|
$s = -1; return ((h)).$get();
|
|
136115
136184
|
/* } else if ($assertType(_ref, sliceType$1, true)[1]) { */ case 2:
|
|
136116
|
-
s$
|
|
136117
|
-
h$1 = ($pointerOfStructConversion(((s$
|
|
136185
|
+
s$8[0] = _ref.$val;
|
|
136186
|
+
h$1 = ($pointerOfStructConversion(((s$8.$ptr || (s$8.$ptr = new ptrType$2(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$8)))), ptrType));
|
|
136118
136187
|
h$1.Len = $imul(h$1.Len, (2));
|
|
136119
136188
|
h$1.Cap = $imul(h$1.Cap, (2));
|
|
136120
136189
|
$s = -1; return ((h$1)).$get();
|
|
136121
136190
|
/* } else if ($assertType(_ref, sliceType$2, true)[1]) { */ case 3:
|
|
136122
|
-
s$
|
|
136123
|
-
h$2 = ($pointerOfStructConversion(((s$
|
|
136191
|
+
s$5[0] = _ref.$val;
|
|
136192
|
+
h$2 = ($pointerOfStructConversion(((s$5.$ptr || (s$5.$ptr = new ptrType$3(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$5)))), ptrType));
|
|
136124
136193
|
h$2.Len = $imul(h$2.Len, (4));
|
|
136125
136194
|
h$2.Cap = $imul(h$2.Cap, (4));
|
|
136126
136195
|
$s = -1; return ((h$2)).$get();
|
|
136127
136196
|
/* } else if ($assertType(_ref, sliceType$3, true)[1]) { */ case 4:
|
|
136128
|
-
s$
|
|
136129
|
-
h$3 = ($pointerOfStructConversion(((s$
|
|
136197
|
+
s$6[0] = _ref.$val;
|
|
136198
|
+
h$3 = ($pointerOfStructConversion(((s$6.$ptr || (s$6.$ptr = new ptrType$4(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$6)))), ptrType));
|
|
136130
136199
|
h$3.Len = $imul(h$3.Len, (8));
|
|
136131
136200
|
h$3.Cap = $imul(h$3.Cap, (8));
|
|
136132
136201
|
$s = -1; return ((h$3)).$get();
|
|
@@ -136134,32 +136203,32 @@ $packages["github.com/nuberu/webgl"] = (function() {
|
|
|
136134
136203
|
s$10 = _ref.$val;
|
|
136135
136204
|
$s = -1; return s$10;
|
|
136136
136205
|
/* } else if ($assertType(_ref, sliceType$5, true)[1]) { */ case 6:
|
|
136137
|
-
s$
|
|
136138
|
-
h$4 = ($pointerOfStructConversion(((s$
|
|
136206
|
+
s$7[0] = _ref.$val;
|
|
136207
|
+
h$4 = ($pointerOfStructConversion(((s$7.$ptr || (s$7.$ptr = new ptrType$5(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$7)))), ptrType));
|
|
136139
136208
|
h$4.Len = $imul(h$4.Len, (2));
|
|
136140
136209
|
h$4.Cap = $imul(h$4.Cap, (2));
|
|
136141
136210
|
$s = -1; return ((h$4)).$get();
|
|
136142
136211
|
/* } else if ($assertType(_ref, sliceType$6, true)[1]) { */ case 7:
|
|
136143
|
-
s$
|
|
136144
|
-
h$5 = ($pointerOfStructConversion(((s$
|
|
136212
|
+
s$9[0] = _ref.$val;
|
|
136213
|
+
h$5 = ($pointerOfStructConversion(((s$9.$ptr || (s$9.$ptr = new ptrType$6(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$9)))), ptrType));
|
|
136145
136214
|
h$5.Len = $imul(h$5.Len, (4));
|
|
136146
136215
|
h$5.Cap = $imul(h$5.Cap, (4));
|
|
136147
136216
|
$s = -1; return ((h$5)).$get();
|
|
136148
136217
|
/* } else if ($assertType(_ref, sliceType$7, true)[1]) { */ case 8:
|
|
136149
|
-
s$
|
|
136150
|
-
h$6 = ($pointerOfStructConversion(((s$
|
|
136218
|
+
s$1[0] = _ref.$val;
|
|
136219
|
+
h$6 = ($pointerOfStructConversion(((s$1.$ptr || (s$1.$ptr = new ptrType$7(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$1)))), ptrType));
|
|
136151
136220
|
h$6.Len = $imul(h$6.Len, (8));
|
|
136152
136221
|
h$6.Cap = $imul(h$6.Cap, (8));
|
|
136153
136222
|
$s = -1; return ((h$6)).$get();
|
|
136154
136223
|
/* } else if ($assertType(_ref, sliceType$8, true)[1]) { */ case 9:
|
|
136155
|
-
s$
|
|
136156
|
-
h$7 = ($pointerOfStructConversion(((s$
|
|
136224
|
+
s$2[0] = _ref.$val;
|
|
136225
|
+
h$7 = ($pointerOfStructConversion(((s$2.$ptr || (s$2.$ptr = new ptrType$8(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$2)))), ptrType));
|
|
136157
136226
|
h$7.Len = $imul(h$7.Len, (4));
|
|
136158
136227
|
h$7.Cap = $imul(h$7.Cap, (4));
|
|
136159
136228
|
$s = -1; return ((h$7)).$get();
|
|
136160
136229
|
/* } else if ($assertType(_ref, sliceType$9, true)[1]) { */ case 10:
|
|
136161
|
-
s$
|
|
136162
|
-
h$8 = ($pointerOfStructConversion(((s$
|
|
136230
|
+
s$3[0] = _ref.$val;
|
|
136231
|
+
h$8 = ($pointerOfStructConversion(((s$3.$ptr || (s$3.$ptr = new ptrType$9(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$3)))), ptrType));
|
|
136163
136232
|
h$8.Len = $imul(h$8.Len, (8));
|
|
136164
136233
|
h$8.Cap = $imul(h$8.Cap, (8));
|
|
136165
136234
|
$s = -1; return ((h$8)).$get();
|
|
@@ -136302,25 +136371,47 @@ $packages["github.com/nuberu/webgl"] = (function() {
|
|
|
136302
136371
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; canvasEl = $f.canvasEl; jsContext = $f.jsContext; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
136303
136372
|
_r = $clone(canvasEl, js.Value).Call("getContext", new sliceType$10([new $String("webgl2")])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
136304
136373
|
jsContext = $clone(_r, js.Value);
|
|
136305
|
-
/* */ if ($clone(jsContext, js.Value).IsUndefined()) { $s = 2; continue; }
|
|
136374
|
+
/* */ if ($clone(jsContext, js.Value).IsUndefined() || $clone(jsContext, js.Value).IsNull()) { $s = 2; continue; }
|
|
136306
136375
|
/* */ $s = 3; continue;
|
|
136307
|
-
/* if ($clone(jsContext, js.Value).IsUndefined()) { */ case 2:
|
|
136376
|
+
/* if ($clone(jsContext, js.Value).IsUndefined() || $clone(jsContext, js.Value).IsNull()) { */ case 2:
|
|
136308
136377
|
_r$1 = $clone(canvasEl, js.Value).Call("getContext", new sliceType$10([new $String("webgl")])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
136309
136378
|
js.Value.copy(jsContext, _r$1);
|
|
136379
|
+
$r = polyfillOldVersion($clone(jsContext, js.Value)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
136310
136380
|
/* } */ case 3:
|
|
136311
|
-
/* */ if ($clone(jsContext, js.Value).IsUndefined()) { $s =
|
|
136312
|
-
/* */ $s =
|
|
136313
|
-
/* if ($clone(jsContext, js.Value).IsUndefined()) { */ case
|
|
136314
|
-
_r$2 = $clone(canvasEl, js.Value).Call("getContext", new sliceType$10([new $String("experimental-webgl")])); /* */ $s =
|
|
136381
|
+
/* */ if ($clone(jsContext, js.Value).IsUndefined() || $clone(jsContext, js.Value).IsNull()) { $s = 6; continue; }
|
|
136382
|
+
/* */ $s = 7; continue;
|
|
136383
|
+
/* if ($clone(jsContext, js.Value).IsUndefined() || $clone(jsContext, js.Value).IsNull()) { */ case 6:
|
|
136384
|
+
_r$2 = $clone(canvasEl, js.Value).Call("getContext", new sliceType$10([new $String("experimental-webgl")])); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
136315
136385
|
js.Value.copy(jsContext, _r$2);
|
|
136316
|
-
|
|
136317
|
-
|
|
136386
|
+
$r = polyfillOldVersion($clone(jsContext, js.Value)); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
136387
|
+
/* } */ case 7:
|
|
136388
|
+
if ($clone(jsContext, js.Value).IsUndefined() || $clone(jsContext, js.Value).IsNull()) {
|
|
136318
136389
|
$s = -1; return [ptrType$10.nil, errors.New("browser might not support webgl")];
|
|
136319
136390
|
}
|
|
136320
136391
|
$s = -1; return [WrapContext($clone(jsContext, js.Value)), $ifaceNil];
|
|
136321
136392
|
/* */ } return; } if ($f === undefined) { $f = { $blk: FromCanvas }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f.canvasEl = canvasEl; $f.jsContext = jsContext; $f.$s = $s; $f.$r = $r; return $f;
|
|
136322
136393
|
};
|
|
136323
136394
|
$pkg.FromCanvas = FromCanvas;
|
|
136395
|
+
polyfillOldVersion = function(jsContext) {
|
|
136396
|
+
var _arg, _arg$1, _arg$2, _arg$3, _r, _r$1, _r$2, _r$3, _r$4, jsContext, vaoExt, x, x$1, x$2, x$3, $s, $r;
|
|
136397
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; jsContext = $f.jsContext; vaoExt = $f.vaoExt; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
136398
|
+
_r = $clone(jsContext, js.Value).Call("getExtension", new sliceType$10([new $String("OES_vertex_array_object")])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
136399
|
+
vaoExt = $clone(_r, js.Value);
|
|
136400
|
+
_r$1 = $clone($clone(vaoExt, js.Value).Get("bindVertexArrayOES"), js.Value).Call("bind", new sliceType$10([new vaoExt.constructor.elem(vaoExt)])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
136401
|
+
_arg = (x = _r$1, new x.constructor.elem(x));
|
|
136402
|
+
$r = $clone(jsContext, js.Value).Set("bindVertexArray", _arg); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
136403
|
+
_r$2 = $clone($clone(vaoExt, js.Value).Get("createVertexArrayOES"), js.Value).Call("bind", new sliceType$10([new vaoExt.constructor.elem(vaoExt)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
136404
|
+
_arg$1 = (x$1 = _r$2, new x$1.constructor.elem(x$1));
|
|
136405
|
+
$r = $clone(jsContext, js.Value).Set("createVertexArray", _arg$1); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
136406
|
+
_r$3 = $clone($clone(vaoExt, js.Value).Get("deleteVertexArrayOES"), js.Value).Call("bind", new sliceType$10([new vaoExt.constructor.elem(vaoExt)])); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
136407
|
+
_arg$2 = (x$2 = _r$3, new x$2.constructor.elem(x$2));
|
|
136408
|
+
$r = $clone(jsContext, js.Value).Set("deleteVertexArray", _arg$2); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
136409
|
+
_r$4 = $clone($clone(vaoExt, js.Value).Get("isVertexArrayOES"), js.Value).Call("bind", new sliceType$10([new vaoExt.constructor.elem(vaoExt)])); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
136410
|
+
_arg$3 = (x$3 = _r$4, new x$3.constructor.elem(x$3));
|
|
136411
|
+
$r = $clone(jsContext, js.Value).Set("isVertexArray", _arg$3); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
136412
|
+
$s = -1; return;
|
|
136413
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: polyfillOldVersion }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f.jsContext = jsContext; $f.vaoExt = vaoExt; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.$s = $s; $f.$r = $r; return $f;
|
|
136414
|
+
};
|
|
136324
136415
|
RenderingContext.ptr.prototype.GetJs = function() {
|
|
136325
136416
|
var c;
|
|
136326
136417
|
c = this;
|
|
@@ -139935,6 +140026,398 @@ $packages["github.com/nuberu/webgl"] = (function() {
|
|
|
139935
140026
|
$pkg.$init = $init;
|
|
139936
140027
|
return $pkg;
|
|
139937
140028
|
})();
|
|
140029
|
+
$packages["golang.org/x/exp/shiny/driver/internal/dom"] = (function() {
|
|
140030
|
+
var $pkg = {}, $init, focus, key, mouse, size, geom, strings, js, DomEvents, funcType, sliceType, sliceType$1, sliceType$2, chanType, ptrType, keyCodesMap, keyCodesByKeyMap, NewDomEvents, getMouseDirection, getWheelButton, getMouseButton, getEventModifiers, isFocusIn, getKeyRune, getKeyDirection, getKeyCode, GetDocWidth, GetDocHeight, GetOrientation;
|
|
140031
|
+
focus = $packages["golang.org/x/mobile/event/focus"];
|
|
140032
|
+
key = $packages["golang.org/x/mobile/event/key"];
|
|
140033
|
+
mouse = $packages["golang.org/x/mobile/event/mouse"];
|
|
140034
|
+
size = $packages["golang.org/x/mobile/event/size"];
|
|
140035
|
+
geom = $packages["golang.org/x/mobile/geom"];
|
|
140036
|
+
strings = $packages["strings"];
|
|
140037
|
+
js = $packages["syscall/js"];
|
|
140038
|
+
DomEvents = $pkg.DomEvents = $newType(0, $kindStruct, "dom.DomEvents", true, "golang.org/x/exp/shiny/driver/internal/dom", true, function(eventChan_, releases_) {
|
|
140039
|
+
this.$val = this;
|
|
140040
|
+
if (arguments.length === 0) {
|
|
140041
|
+
this.eventChan = $chanNil;
|
|
140042
|
+
this.releases = sliceType.nil;
|
|
140043
|
+
return;
|
|
140044
|
+
}
|
|
140045
|
+
this.eventChan = eventChan_;
|
|
140046
|
+
this.releases = releases_;
|
|
140047
|
+
});
|
|
140048
|
+
funcType = $funcType([], [], false);
|
|
140049
|
+
sliceType = $sliceType(funcType);
|
|
140050
|
+
sliceType$1 = $sliceType($emptyInterface);
|
|
140051
|
+
sliceType$2 = $sliceType($Int32);
|
|
140052
|
+
chanType = $chanType($emptyInterface, false, false);
|
|
140053
|
+
ptrType = $ptrType(DomEvents);
|
|
140054
|
+
NewDomEvents = function() {
|
|
140055
|
+
return new DomEvents.ptr(new $Chan($emptyInterface, 0), $makeSlice(sliceType, 0));
|
|
140056
|
+
};
|
|
140057
|
+
$pkg.NewDomEvents = NewDomEvents;
|
|
140058
|
+
DomEvents.ptr.prototype.GetEventChan = function() {
|
|
140059
|
+
var d;
|
|
140060
|
+
d = this;
|
|
140061
|
+
return d.eventChan;
|
|
140062
|
+
};
|
|
140063
|
+
DomEvents.prototype.GetEventChan = function() { return this.$val.GetEventChan(); };
|
|
140064
|
+
DomEvents.ptr.prototype.Release = function() {
|
|
140065
|
+
var _i, _ref, d, release, $s, $r;
|
|
140066
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _ref = $f._ref; d = $f.d; release = $f.release; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
140067
|
+
d = this;
|
|
140068
|
+
_ref = d.releases;
|
|
140069
|
+
_i = 0;
|
|
140070
|
+
/* while (true) { */ case 1:
|
|
140071
|
+
/* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; }
|
|
140072
|
+
release = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
|
|
140073
|
+
$r = release(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140074
|
+
_i++;
|
|
140075
|
+
/* } */ $s = 1; continue; case 2:
|
|
140076
|
+
$s = -1; return;
|
|
140077
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: DomEvents.ptr.prototype.Release }; } $f._i = _i; $f._ref = _ref; $f.d = d; $f.release = release; $f.$s = $s; $f.$r = $r; return $f;
|
|
140078
|
+
};
|
|
140079
|
+
DomEvents.prototype.Release = function() { return this.$val.Release(); };
|
|
140080
|
+
DomEvents.ptr.prototype.BindEvents = function() {
|
|
140081
|
+
var d, $s, $r;
|
|
140082
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; d = $f.d; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
140083
|
+
d = this;
|
|
140084
|
+
$r = d.bindSizeEvents(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140085
|
+
$go($methodVal(d, "emitSizeEvent"), []);
|
|
140086
|
+
$r = d.bindMouseEvents(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140087
|
+
$r = d.bindKeyEvents(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140088
|
+
$r = d.bindFocusEvents(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140089
|
+
$s = -1; return;
|
|
140090
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: DomEvents.ptr.prototype.BindEvents }; } $f.d = d; $f.$s = $s; $f.$r = $r; return $f;
|
|
140091
|
+
};
|
|
140092
|
+
DomEvents.prototype.BindEvents = function() { return this.$val.BindEvents(); };
|
|
140093
|
+
DomEvents.ptr.prototype.bindSizeEvents = function() {
|
|
140094
|
+
var _r, d, onResize, $s, $r;
|
|
140095
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; d = $f.d; onResize = $f.onResize; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
140096
|
+
d = [d];
|
|
140097
|
+
onResize = [onResize];
|
|
140098
|
+
d[0] = this;
|
|
140099
|
+
onResize[0] = $clone(js.FuncOf((function(d, onResize) { return function $b(this$1, args) {
|
|
140100
|
+
var args, this$1, $s, $r;
|
|
140101
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; args = $f.args; this$1 = $f.this$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
140102
|
+
$r = d[0].emitSizeEvent(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140103
|
+
$s = -1; return $ifaceNil;
|
|
140104
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.args = args; $f.this$1 = this$1; $f.$s = $s; $f.$r = $r; return $f;
|
|
140105
|
+
}; })(d, onResize)), js.Func);
|
|
140106
|
+
_r = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$1([new $String("resize"), new onResize[0].constructor.elem(onResize[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
140107
|
+
_r;
|
|
140108
|
+
d[0].releases = $append(d[0].releases, (function(d, onResize) { return function $b() {
|
|
140109
|
+
var _r$1, $s, $r;
|
|
140110
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
140111
|
+
_r$1 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$1([new $String("resize"), new onResize[0].constructor.elem(onResize[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
140112
|
+
_r$1;
|
|
140113
|
+
$clone(onResize[0], js.Func).Release();
|
|
140114
|
+
$s = -1; return;
|
|
140115
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$1 = _r$1; $f.$s = $s; $f.$r = $r; return $f;
|
|
140116
|
+
}; })(d, onResize));
|
|
140117
|
+
$s = -1; return;
|
|
140118
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: DomEvents.ptr.prototype.bindSizeEvents }; } $f._r = _r; $f.d = d; $f.onResize = onResize; $f.$s = $s; $f.$r = $r; return $f;
|
|
140119
|
+
};
|
|
140120
|
+
DomEvents.prototype.bindSizeEvents = function() { return this.$val.bindSizeEvents(); };
|
|
140121
|
+
DomEvents.ptr.prototype.emitSizeEvent = function() {
|
|
140122
|
+
var _q, _q$1, d, height, orientation, pixelsPerPt, width, x, $s, $r;
|
|
140123
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _q$1 = $f._q$1; d = $f.d; height = $f.height; orientation = $f.orientation; pixelsPerPt = $f.pixelsPerPt; width = $f.width; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
140124
|
+
d = this;
|
|
140125
|
+
orientation = GetOrientation();
|
|
140126
|
+
pixelsPerPt = 1;
|
|
140127
|
+
width = GetDocWidth();
|
|
140128
|
+
height = GetDocHeight();
|
|
140129
|
+
$r = $send(d.eventChan, (x = new size.Event.ptr(width, height, ((_q = width / ((pixelsPerPt >> 0)), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))), ((_q$1 = height / ((pixelsPerPt >> 0)), (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))), pixelsPerPt, orientation), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140130
|
+
$s = -1; return;
|
|
140131
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: DomEvents.ptr.prototype.emitSizeEvent }; } $f._q = _q; $f._q$1 = _q$1; $f.d = d; $f.height = height; $f.orientation = orientation; $f.pixelsPerPt = pixelsPerPt; $f.width = width; $f.x = x; $f.$s = $s; $f.$r = $r; return $f;
|
|
140132
|
+
};
|
|
140133
|
+
DomEvents.prototype.emitSizeEvent = function() { return this.$val.emitSizeEvent(); };
|
|
140134
|
+
DomEvents.ptr.prototype.bindMouseEvents = function() {
|
|
140135
|
+
var _r, _r$1, _r$2, _r$3, d, onClick, onMove, onWheel, $s, $r;
|
|
140136
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; d = $f.d; onClick = $f.onClick; onMove = $f.onMove; onWheel = $f.onWheel; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
140137
|
+
d = [d];
|
|
140138
|
+
onClick = [onClick];
|
|
140139
|
+
onMove = [onMove];
|
|
140140
|
+
onWheel = [onWheel];
|
|
140141
|
+
d[0] = this;
|
|
140142
|
+
onMove[0] = $clone(js.FuncOf((function(d, onClick, onMove, onWheel) { return function $b(this$1, args) {
|
|
140143
|
+
var _r, args, this$1, x, $s, $r;
|
|
140144
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; args = $f.args; this$1 = $f.this$1; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
140145
|
+
_r = $clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Call("preventDefault", new sliceType$1([])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
140146
|
+
_r;
|
|
140147
|
+
$r = $send(d[0].eventChan, (x = new mouse.Event.ptr(($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetX"), js.Value).Float())), ($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetY"), js.Value).Float())), 0, getEventModifiers($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), 0), new x.constructor.elem(x))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140148
|
+
$s = -1; return $ifaceNil;
|
|
140149
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r = _r; $f.args = args; $f.this$1 = this$1; $f.x = x; $f.$s = $s; $f.$r = $r; return $f;
|
|
140150
|
+
}; })(d, onClick, onMove, onWheel)), js.Func);
|
|
140151
|
+
_r = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$1([new $String("mousemove"), new onMove[0].constructor.elem(onMove[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
140152
|
+
_r;
|
|
140153
|
+
onClick[0] = $clone(js.FuncOf((function(d, onClick, onMove, onWheel) { return function $b(this$1, args) {
|
|
140154
|
+
var _r$1, args, this$1, x, $s, $r;
|
|
140155
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; args = $f.args; this$1 = $f.this$1; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
140156
|
+
_r$1 = $clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Call("preventDefault", new sliceType$1([])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
140157
|
+
_r$1;
|
|
140158
|
+
$r = $send(d[0].eventChan, (x = new mouse.Event.ptr(($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetX"), js.Value).Float())), ($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetY"), js.Value).Float())), getMouseButton($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getEventModifiers($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getMouseDirection($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value))), new x.constructor.elem(x))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140159
|
+
$s = -1; return $ifaceNil;
|
|
140160
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$1 = _r$1; $f.args = args; $f.this$1 = this$1; $f.x = x; $f.$s = $s; $f.$r = $r; return $f;
|
|
140161
|
+
}; })(d, onClick, onMove, onWheel)), js.Func);
|
|
140162
|
+
_r$1 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$1([new $String("mousedown"), new onClick[0].constructor.elem(onClick[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
140163
|
+
_r$1;
|
|
140164
|
+
_r$2 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$1([new $String("mouseup"), new onClick[0].constructor.elem(onClick[0])])); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
140165
|
+
_r$2;
|
|
140166
|
+
onWheel[0] = $clone(js.FuncOf((function(d, onClick, onMove, onWheel) { return function $b(this$1, args) {
|
|
140167
|
+
var args, this$1, x, $s, $r;
|
|
140168
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; args = $f.args; this$1 = $f.this$1; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
140169
|
+
$r = $send(d[0].eventChan, (x = new mouse.Event.ptr(($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetX"), js.Value).Float())), ($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetY"), js.Value).Float())), getWheelButton($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getEventModifiers($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), 3), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140170
|
+
$s = -1; return $ifaceNil;
|
|
140171
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.args = args; $f.this$1 = this$1; $f.x = x; $f.$s = $s; $f.$r = $r; return $f;
|
|
140172
|
+
}; })(d, onClick, onMove, onWheel)), js.Func);
|
|
140173
|
+
_r$3 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$1([new $String("wheel"), new onWheel[0].constructor.elem(onWheel[0])])); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
140174
|
+
_r$3;
|
|
140175
|
+
d[0].releases = $append(d[0].releases, (function(d, onClick, onMove, onWheel) { return function $b() {
|
|
140176
|
+
var _r$4, _r$5, _r$6, _r$7, $s, $r;
|
|
140177
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
140178
|
+
_r$4 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$1([new $String("mousemove"), new onMove[0].constructor.elem(onMove[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
140179
|
+
_r$4;
|
|
140180
|
+
_r$5 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$1([new $String("mousedown"), new onClick[0].constructor.elem(onClick[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
|
|
140181
|
+
_r$5;
|
|
140182
|
+
_r$6 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$1([new $String("mouseup"), new onClick[0].constructor.elem(onClick[0])])); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
|
|
140183
|
+
_r$6;
|
|
140184
|
+
_r$7 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$1([new $String("wheel"), new onWheel[0].constructor.elem(onWheel[0])])); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
|
|
140185
|
+
_r$7;
|
|
140186
|
+
$clone(onMove[0], js.Func).Release();
|
|
140187
|
+
$clone(onClick[0], js.Func).Release();
|
|
140188
|
+
$clone(onWheel[0], js.Func).Release();
|
|
140189
|
+
$s = -1; return;
|
|
140190
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f.$s = $s; $f.$r = $r; return $f;
|
|
140191
|
+
}; })(d, onClick, onMove, onWheel));
|
|
140192
|
+
$s = -1; return;
|
|
140193
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: DomEvents.ptr.prototype.bindMouseEvents }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.d = d; $f.onClick = onClick; $f.onMove = onMove; $f.onWheel = onWheel; $f.$s = $s; $f.$r = $r; return $f;
|
|
140194
|
+
};
|
|
140195
|
+
DomEvents.prototype.bindMouseEvents = function() { return this.$val.bindMouseEvents(); };
|
|
140196
|
+
getMouseDirection = function(ev) {
|
|
140197
|
+
var dir, ev;
|
|
140198
|
+
dir = 0;
|
|
140199
|
+
dir = 0;
|
|
140200
|
+
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "mousedown") {
|
|
140201
|
+
dir = 1;
|
|
140202
|
+
}
|
|
140203
|
+
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "mouseup") {
|
|
140204
|
+
dir = 2;
|
|
140205
|
+
}
|
|
140206
|
+
return dir;
|
|
140207
|
+
};
|
|
140208
|
+
getWheelButton = function(ev) {
|
|
140209
|
+
var deltaX, deltaY, ev;
|
|
140210
|
+
deltaY = $clone($clone(ev, js.Value).Get("deltaY"), js.Value).Int();
|
|
140211
|
+
deltaX = $clone($clone(ev, js.Value).Get("deltaX"), js.Value).Int();
|
|
140212
|
+
if (deltaY > 0) {
|
|
140213
|
+
return -2;
|
|
140214
|
+
}
|
|
140215
|
+
if (deltaY < 0) {
|
|
140216
|
+
return -1;
|
|
140217
|
+
}
|
|
140218
|
+
if (deltaX > 0) {
|
|
140219
|
+
return -4;
|
|
140220
|
+
}
|
|
140221
|
+
if (deltaX < 0) {
|
|
140222
|
+
return -3;
|
|
140223
|
+
}
|
|
140224
|
+
return 0;
|
|
140225
|
+
};
|
|
140226
|
+
getMouseButton = function(ev) {
|
|
140227
|
+
var _1, ev;
|
|
140228
|
+
_1 = $clone($clone(ev, js.Value).Get("button"), js.Value).Int();
|
|
140229
|
+
if (_1 === (0)) {
|
|
140230
|
+
return 1;
|
|
140231
|
+
} else if (_1 === (1)) {
|
|
140232
|
+
return 2;
|
|
140233
|
+
} else if (_1 === (2)) {
|
|
140234
|
+
return 3;
|
|
140235
|
+
} else if (_1 === (3)) {
|
|
140236
|
+
return 8;
|
|
140237
|
+
} else if (_1 === (4)) {
|
|
140238
|
+
return 9;
|
|
140239
|
+
} else {
|
|
140240
|
+
return 0;
|
|
140241
|
+
}
|
|
140242
|
+
};
|
|
140243
|
+
getEventModifiers = function(ev) {
|
|
140244
|
+
var ev, mod;
|
|
140245
|
+
mod = 0;
|
|
140246
|
+
if ($clone($clone(ev, js.Value).Get("altKey"), js.Value).Bool()) {
|
|
140247
|
+
mod = (mod | (4)) >>> 0;
|
|
140248
|
+
}
|
|
140249
|
+
if ($clone($clone(ev, js.Value).Get("ctrlKey"), js.Value).Bool()) {
|
|
140250
|
+
mod = (mod | (2)) >>> 0;
|
|
140251
|
+
}
|
|
140252
|
+
if ($clone($clone(ev, js.Value).Get("shiftKey"), js.Value).Bool()) {
|
|
140253
|
+
mod = (mod | (1)) >>> 0;
|
|
140254
|
+
}
|
|
140255
|
+
if ($clone($clone(ev, js.Value).Get("metaKey"), js.Value).Bool()) {
|
|
140256
|
+
mod = (mod | (8)) >>> 0;
|
|
140257
|
+
}
|
|
140258
|
+
return mod;
|
|
140259
|
+
};
|
|
140260
|
+
DomEvents.ptr.prototype.bindFocusEvents = function() {
|
|
140261
|
+
var _r, _r$1, d, onFocus, $s, $r;
|
|
140262
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; d = $f.d; onFocus = $f.onFocus; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
140263
|
+
d = [d];
|
|
140264
|
+
onFocus = [onFocus];
|
|
140265
|
+
d[0] = this;
|
|
140266
|
+
onFocus[0] = $clone(js.FuncOf((function(d, onFocus) { return function $b(this$1, args) {
|
|
140267
|
+
var args, this$1, x, $s, $r;
|
|
140268
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; args = $f.args; this$1 = $f.this$1; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
140269
|
+
$r = $send(d[0].eventChan, (x = new focus.Event.ptr(isFocusIn($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value))), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140270
|
+
$s = -1; return $ifaceNil;
|
|
140271
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.args = args; $f.this$1 = this$1; $f.x = x; $f.$s = $s; $f.$r = $r; return $f;
|
|
140272
|
+
}; })(d, onFocus)), js.Func);
|
|
140273
|
+
_r = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$1([new $String("focus"), new onFocus[0].constructor.elem(onFocus[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
140274
|
+
_r;
|
|
140275
|
+
_r$1 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$1([new $String("blur"), new onFocus[0].constructor.elem(onFocus[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
140276
|
+
_r$1;
|
|
140277
|
+
d[0].releases = $append(d[0].releases, (function(d, onFocus) { return function $b() {
|
|
140278
|
+
var _r$2, _r$3, $s, $r;
|
|
140279
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; _r$3 = $f._r$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
140280
|
+
_r$2 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$1([new $String("focus"), new onFocus[0].constructor.elem(onFocus[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
140281
|
+
_r$2;
|
|
140282
|
+
_r$3 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$1([new $String("blur"), new onFocus[0].constructor.elem(onFocus[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
140283
|
+
_r$3;
|
|
140284
|
+
$clone(onFocus[0], js.Func).Release();
|
|
140285
|
+
$s = -1; return;
|
|
140286
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$2 = _r$2; $f._r$3 = _r$3; $f.$s = $s; $f.$r = $r; return $f;
|
|
140287
|
+
}; })(d, onFocus));
|
|
140288
|
+
$s = -1; return;
|
|
140289
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: DomEvents.ptr.prototype.bindFocusEvents }; } $f._r = _r; $f._r$1 = _r$1; $f.d = d; $f.onFocus = onFocus; $f.$s = $s; $f.$r = $r; return $f;
|
|
140290
|
+
};
|
|
140291
|
+
DomEvents.prototype.bindFocusEvents = function() { return this.$val.bindFocusEvents(); };
|
|
140292
|
+
isFocusIn = function(ev) {
|
|
140293
|
+
var ev;
|
|
140294
|
+
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "focus") {
|
|
140295
|
+
return true;
|
|
140296
|
+
}
|
|
140297
|
+
return false;
|
|
140298
|
+
};
|
|
140299
|
+
DomEvents.ptr.prototype.bindKeyEvents = function() {
|
|
140300
|
+
var _r, _r$1, d, onKey, $s, $r;
|
|
140301
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; d = $f.d; onKey = $f.onKey; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
140302
|
+
d = [d];
|
|
140303
|
+
onKey = [onKey];
|
|
140304
|
+
d[0] = this;
|
|
140305
|
+
onKey[0] = $clone(js.FuncOf((function(d, onKey) { return function $b(this$1, args) {
|
|
140306
|
+
var _r, args, this$1, x, $s, $r;
|
|
140307
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; args = $f.args; this$1 = $f.this$1; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
140308
|
+
_r = $clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Call("preventDefault", new sliceType$1([])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
140309
|
+
_r;
|
|
140310
|
+
$r = $send(d[0].eventChan, (x = new key.Event.ptr(getKeyRune($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getKeyCode($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getEventModifiers($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getKeyDirection($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value))), new x.constructor.elem(x))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140311
|
+
$s = -1; return $ifaceNil;
|
|
140312
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r = _r; $f.args = args; $f.this$1 = this$1; $f.x = x; $f.$s = $s; $f.$r = $r; return $f;
|
|
140313
|
+
}; })(d, onKey)), js.Func);
|
|
140314
|
+
_r = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$1([new $String("keydown"), new onKey[0].constructor.elem(onKey[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
140315
|
+
_r;
|
|
140316
|
+
_r$1 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$1([new $String("keyup"), new onKey[0].constructor.elem(onKey[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
140317
|
+
_r$1;
|
|
140318
|
+
d[0].releases = $append(d[0].releases, (function(d, onKey) { return function $b() {
|
|
140319
|
+
var _r$2, _r$3, $s, $r;
|
|
140320
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; _r$3 = $f._r$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
140321
|
+
_r$2 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$1([new $String("keydown"), new onKey[0].constructor.elem(onKey[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
140322
|
+
_r$2;
|
|
140323
|
+
_r$3 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$1([new $String("keyup"), new onKey[0].constructor.elem(onKey[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
140324
|
+
_r$3;
|
|
140325
|
+
$clone(onKey[0], js.Func).Release();
|
|
140326
|
+
$s = -1; return;
|
|
140327
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$2 = _r$2; $f._r$3 = _r$3; $f.$s = $s; $f.$r = $r; return $f;
|
|
140328
|
+
}; })(d, onKey));
|
|
140329
|
+
$s = -1; return;
|
|
140330
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: DomEvents.ptr.prototype.bindKeyEvents }; } $f._r = _r; $f._r$1 = _r$1; $f.d = d; $f.onKey = onKey; $f.$s = $s; $f.$r = $r; return $f;
|
|
140331
|
+
};
|
|
140332
|
+
DomEvents.prototype.bindKeyEvents = function() { return this.$val.bindKeyEvents(); };
|
|
140333
|
+
getKeyRune = function(ev) {
|
|
140334
|
+
var ev, key$1;
|
|
140335
|
+
key$1 = (new sliceType$2($stringToRunes($clone($clone(ev, js.Value).Get("key"), js.Value).String())));
|
|
140336
|
+
if (key$1.$length === 1) {
|
|
140337
|
+
return (0 >= key$1.$length ? ($throwRuntimeError("index out of range"), undefined) : key$1.$array[key$1.$offset + 0]);
|
|
140338
|
+
}
|
|
140339
|
+
return -1;
|
|
140340
|
+
};
|
|
140341
|
+
getKeyDirection = function(ev) {
|
|
140342
|
+
var dir, ev;
|
|
140343
|
+
dir = 0;
|
|
140344
|
+
dir = 0;
|
|
140345
|
+
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "keydown") {
|
|
140346
|
+
dir = 1;
|
|
140347
|
+
}
|
|
140348
|
+
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "keyup") {
|
|
140349
|
+
dir = 2;
|
|
140350
|
+
}
|
|
140351
|
+
return dir;
|
|
140352
|
+
};
|
|
140353
|
+
getKeyCode = function(ev) {
|
|
140354
|
+
var _entry, _entry$1, _tuple, _tuple$1, code, code$1, domCode, domKey, ev, exists, exists$1;
|
|
140355
|
+
domCode = $clone($clone(ev, js.Value).Get("code"), js.Value).String();
|
|
140356
|
+
_tuple = (_entry = keyCodesMap[$String.keyFor(domCode)], _entry !== undefined ? [_entry.v, true] : [0, false]);
|
|
140357
|
+
code = _tuple[0];
|
|
140358
|
+
exists = _tuple[1];
|
|
140359
|
+
if (exists) {
|
|
140360
|
+
return code;
|
|
140361
|
+
}
|
|
140362
|
+
domKey = $clone($clone(ev, js.Value).Get("key"), js.Value).String();
|
|
140363
|
+
_tuple$1 = (_entry$1 = keyCodesByKeyMap[$String.keyFor(domKey)], _entry$1 !== undefined ? [_entry$1.v, true] : [0, false]);
|
|
140364
|
+
code$1 = _tuple$1[0];
|
|
140365
|
+
exists$1 = _tuple$1[1];
|
|
140366
|
+
if (exists$1) {
|
|
140367
|
+
return code$1;
|
|
140368
|
+
}
|
|
140369
|
+
return 0;
|
|
140370
|
+
};
|
|
140371
|
+
GetDocWidth = function() {
|
|
140372
|
+
return $clone($clone(js.Global(), js.Value).Get("innerWidth"), js.Value).Int();
|
|
140373
|
+
};
|
|
140374
|
+
$pkg.GetDocWidth = GetDocWidth;
|
|
140375
|
+
GetDocHeight = function() {
|
|
140376
|
+
return $clone($clone(js.Global(), js.Value).Get("innerHeight"), js.Value).Int();
|
|
140377
|
+
};
|
|
140378
|
+
$pkg.GetDocHeight = GetDocHeight;
|
|
140379
|
+
GetOrientation = function() {
|
|
140380
|
+
var orientation, orientationType, $deferred;
|
|
140381
|
+
/* */ var $err = null; try { $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred);
|
|
140382
|
+
orientation = 0;
|
|
140383
|
+
$deferred.push([(function() {
|
|
140384
|
+
if (!($interfaceIsEqual($recover(), $ifaceNil))) {
|
|
140385
|
+
orientation = 0;
|
|
140386
|
+
}
|
|
140387
|
+
}), []]);
|
|
140388
|
+
orientationType = $clone($clone($clone($clone(js.Global(), js.Value).Get("screen"), js.Value).Get("orientation"), js.Value).Get("type"), js.Value).String();
|
|
140389
|
+
if (strings.HasPrefix(orientationType, "landscape")) {
|
|
140390
|
+
orientation = 2;
|
|
140391
|
+
return orientation;
|
|
140392
|
+
}
|
|
140393
|
+
if (strings.HasPrefix(orientationType, "portrait")) {
|
|
140394
|
+
orientation = 2;
|
|
140395
|
+
return orientation;
|
|
140396
|
+
}
|
|
140397
|
+
orientation = 0;
|
|
140398
|
+
return orientation;
|
|
140399
|
+
/* */ } catch(err) { $err = err; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return orientation; } }
|
|
140400
|
+
};
|
|
140401
|
+
$pkg.GetOrientation = GetOrientation;
|
|
140402
|
+
ptrType.methods = [{prop: "GetEventChan", name: "GetEventChan", pkg: "", typ: $funcType([], [chanType], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}, {prop: "BindEvents", name: "BindEvents", pkg: "", typ: $funcType([], [], false)}, {prop: "bindSizeEvents", name: "bindSizeEvents", pkg: "golang.org/x/exp/shiny/driver/internal/dom", typ: $funcType([], [], false)}, {prop: "emitSizeEvent", name: "emitSizeEvent", pkg: "golang.org/x/exp/shiny/driver/internal/dom", typ: $funcType([], [], false)}, {prop: "bindMouseEvents", name: "bindMouseEvents", pkg: "golang.org/x/exp/shiny/driver/internal/dom", typ: $funcType([], [], false)}, {prop: "bindFocusEvents", name: "bindFocusEvents", pkg: "golang.org/x/exp/shiny/driver/internal/dom", typ: $funcType([], [], false)}, {prop: "bindKeyEvents", name: "bindKeyEvents", pkg: "golang.org/x/exp/shiny/driver/internal/dom", typ: $funcType([], [], false)}];
|
|
140403
|
+
DomEvents.init("golang.org/x/exp/shiny/driver/internal/dom", [{prop: "eventChan", name: "eventChan", embedded: false, exported: false, typ: chanType, tag: ""}, {prop: "releases", name: "releases", embedded: false, exported: false, typ: sliceType, tag: ""}]);
|
|
140404
|
+
$init = function() {
|
|
140405
|
+
$pkg.$init = function() {};
|
|
140406
|
+
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
140407
|
+
$r = focus.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140408
|
+
$r = key.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140409
|
+
$r = mouse.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140410
|
+
$r = size.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140411
|
+
$r = geom.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140412
|
+
$r = strings.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140413
|
+
$r = js.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
140414
|
+
keyCodesMap = $makeMap($String.keyFor, [{ k: "KeyA", v: 4 }, { k: "KeyB", v: 5 }, { k: "KeyC", v: 6 }, { k: "KeyD", v: 7 }, { k: "KeyE", v: 8 }, { k: "KeyF", v: 9 }, { k: "KeyG", v: 10 }, { k: "KeyH", v: 11 }, { k: "KeyI", v: 12 }, { k: "KeyJ", v: 13 }, { k: "KeyK", v: 14 }, { k: "KeyL", v: 15 }, { k: "KeyM", v: 16 }, { k: "KeyN", v: 17 }, { k: "KeyO", v: 18 }, { k: "KeyP", v: 19 }, { k: "KeyQ", v: 20 }, { k: "KeyR", v: 21 }, { k: "KeyS", v: 22 }, { k: "KeyT", v: 23 }, { k: "KeyU", v: 24 }, { k: "KeyV", v: 25 }, { k: "KeyW", v: 26 }, { k: "KeyX", v: 27 }, { k: "KeyY", v: 28 }, { k: "KeyZ", v: 29 }, { k: "Digit1", v: 30 }, { k: "Digit2", v: 31 }, { k: "Digit3", v: 32 }, { k: "Digit4", v: 33 }, { k: "Digit5", v: 34 }, { k: "Digit6", v: 35 }, { k: "Digit7", v: 36 }, { k: "Digit8", v: 37 }, { k: "Digit9", v: 38 }, { k: "Digit0", v: 39 }, { k: "Enter", v: 40 }, { k: "Escape", v: 41 }, { k: "Backspace", v: 42 }, { k: "Tab", v: 43 }, { k: "Space", v: 44 }, { k: "Minus", v: 45 }, { k: "Equal", v: 46 }, { k: "BracketLeft", v: 47 }, { k: "BracketRight", v: 48 }, { k: "Backslash", v: 49 }, { k: "Semicolon", v: 51 }, { k: "Quote", v: 52 }, { k: "Backquote", v: 53 }, { k: "Comma", v: 54 }, { k: "Period", v: 55 }, { k: "Slash", v: 56 }, { k: "CapsLock", v: 57 }, { k: "F1", v: 58 }, { k: "F2", v: 59 }, { k: "F3", v: 60 }, { k: "F4", v: 61 }, { k: "F5", v: 62 }, { k: "F6", v: 63 }, { k: "F7", v: 64 }, { k: "F8", v: 65 }, { k: "F9", v: 66 }, { k: "F10", v: 67 }, { k: "F11", v: 68 }, { k: "F12", v: 69 }, { k: "Pause", v: 72 }, { k: "Insert", v: 73 }, { k: "Home", v: 74 }, { k: "PageUp", v: 75 }, { k: "Delete", v: 76 }, { k: "End", v: 77 }, { k: "PageDown", v: 78 }, { k: "ArrowRight", v: 79 }, { k: "ArrowLeft", v: 80 }, { k: "ArrowDown", v: 81 }, { k: "ArrowUp", v: 82 }, { k: "NumLock", v: 83 }, { k: "NumpadDivide", v: 84 }, { k: "NumpadMultiply", v: 85 }, { k: "NumpadSubtract", v: 86 }, { k: "NumpadAdd", v: 87 }, { k: "NumpadEnter", v: 88 }, { k: "Numpad1", v: 89 }, { k: "Numpad2", v: 90 }, { k: "Numpad3", v: 91 }, { k: "Numpad4", v: 92 }, { k: "Numpad5", v: 93 }, { k: "Numpad6", v: 94 }, { k: "Numpad7", v: 95 }, { k: "Numpad8", v: 96 }, { k: "Numpad9", v: 97 }, { k: "Numpad0", v: 98 }, { k: "NumpadDecimal", v: 99 }, { k: "NumpadEqual", v: 103 }, { k: "F13", v: 104 }, { k: "F14", v: 105 }, { k: "F15", v: 106 }, { k: "F16", v: 107 }, { k: "F17", v: 108 }, { k: "F18", v: 109 }, { k: "F19", v: 110 }, { k: "F20", v: 111 }, { k: "F21", v: 112 }, { k: "F22", v: 113 }, { k: "F23", v: 114 }, { k: "F24", v: 115 }, { k: "Help", v: 117 }, { k: "ContextMenu", v: 118 }, { k: "VolumeMute", v: 127 }, { k: "VolumeUp", v: 128 }, { k: "VolumeDown", v: 129 }, { k: "ControlLeft", v: 224 }, { k: "ShiftLeft", v: 225 }, { k: "AltLeft", v: 226 }, { k: "MetaLeft", v: 227 }, { k: "ControlRight", v: 228 }, { k: "ShiftRight", v: 229 }, { k: "AltRight", v: 230 }, { k: "MetaRight", v: 231 }, { k: "PrintScreen", v: 0 }]);
|
|
140415
|
+
keyCodesByKeyMap = $makeMap($String.keyFor, [{ k: "AudioVolumeMute", v: 127 }, { k: "AudioVolumeUp", v: 128 }, { k: "AudioVolumeDown", v: 129 }]);
|
|
140416
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
140417
|
+
};
|
|
140418
|
+
$pkg.$init = $init;
|
|
140419
|
+
return $pkg;
|
|
140420
|
+
})();
|
|
139938
140421
|
$packages["golang.org/x/image/math/f64"] = (function() {
|
|
139939
140422
|
var $pkg = {}, $init, Aff3;
|
|
139940
140423
|
Aff3 = $pkg.Aff3 = $newType(48, $kindArray, "f64.Aff3", true, "golang.org/x/image/math/f64", true, null);
|
|
@@ -141096,14 +141579,14 @@ $packages["image/draw"] = (function() {
|
|
|
141096
141579
|
/* */ if ($assertType(_ref$1, ptrType$5, true)[1]) { $s = 8; continue; }
|
|
141097
141580
|
/* */ $s = 9; continue;
|
|
141098
141581
|
/* if ($assertType(_ref$1, ptrType$1, true)[1]) { */ case 6:
|
|
141099
|
-
src0
|
|
141582
|
+
src0[0] = _ref$1.$val;
|
|
141100
141583
|
pxRGBA = (function(out, src, src0, src0$1, src0$2) { return function(x$1, y) {
|
|
141101
141584
|
var _tuple$2, a$1, b$1, g$1, r$2, x$1, y;
|
|
141102
141585
|
r$2 = 0;
|
|
141103
141586
|
g$1 = 0;
|
|
141104
141587
|
b$1 = 0;
|
|
141105
141588
|
a$1 = 0;
|
|
141106
|
-
_tuple$2 = $clone(src0
|
|
141589
|
+
_tuple$2 = $clone(src0[0].RGBAAt(x$1, y), color.RGBA).RGBA();
|
|
141107
141590
|
r$2 = _tuple$2[0];
|
|
141108
141591
|
g$1 = _tuple$2[1];
|
|
141109
141592
|
b$1 = _tuple$2[2];
|
|
@@ -141112,14 +141595,14 @@ $packages["image/draw"] = (function() {
|
|
|
141112
141595
|
}; })(out, src, src0, src0$1, src0$2);
|
|
141113
141596
|
$s = 9; continue;
|
|
141114
141597
|
/* } else if ($assertType(_ref$1, ptrType$4, true)[1]) { */ case 7:
|
|
141115
|
-
src0[0] = _ref$1.$val;
|
|
141598
|
+
src0$1[0] = _ref$1.$val;
|
|
141116
141599
|
pxRGBA = (function(out, src, src0, src0$1, src0$2) { return function(x$1, y) {
|
|
141117
141600
|
var _tuple$2, a$1, b$1, g$1, r$2, x$1, y;
|
|
141118
141601
|
r$2 = 0;
|
|
141119
141602
|
g$1 = 0;
|
|
141120
141603
|
b$1 = 0;
|
|
141121
141604
|
a$1 = 0;
|
|
141122
|
-
_tuple$2 = $clone(src0[0].NRGBAAt(x$1, y), color.NRGBA).RGBA();
|
|
141605
|
+
_tuple$2 = $clone(src0$1[0].NRGBAAt(x$1, y), color.NRGBA).RGBA();
|
|
141123
141606
|
r$2 = _tuple$2[0];
|
|
141124
141607
|
g$1 = _tuple$2[1];
|
|
141125
141608
|
b$1 = _tuple$2[2];
|
|
@@ -141128,14 +141611,14 @@ $packages["image/draw"] = (function() {
|
|
|
141128
141611
|
}; })(out, src, src0, src0$1, src0$2);
|
|
141129
141612
|
$s = 9; continue;
|
|
141130
141613
|
/* } else if ($assertType(_ref$1, ptrType$5, true)[1]) { */ case 8:
|
|
141131
|
-
src0$
|
|
141614
|
+
src0$2[0] = _ref$1.$val;
|
|
141132
141615
|
pxRGBA = (function(out, src, src0, src0$1, src0$2) { return function(x$1, y) {
|
|
141133
141616
|
var _tuple$2, a$1, b$1, g$1, r$2, x$1, y;
|
|
141134
141617
|
r$2 = 0;
|
|
141135
141618
|
g$1 = 0;
|
|
141136
141619
|
b$1 = 0;
|
|
141137
141620
|
a$1 = 0;
|
|
141138
|
-
_tuple$2 = $clone(src0$
|
|
141621
|
+
_tuple$2 = $clone(src0$2[0].YCbCrAt(x$1, y), color.YCbCr).RGBA();
|
|
141139
141622
|
r$2 = _tuple$2[0];
|
|
141140
141623
|
g$1 = _tuple$2[1];
|
|
141141
141624
|
b$1 = _tuple$2[2];
|
|
@@ -141466,23 +141949,18 @@ $packages["golang.org/x/exp/shiny/imageutil"] = (function() {
|
|
|
141466
141949
|
return $pkg;
|
|
141467
141950
|
})();
|
|
141468
141951
|
$packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
141469
|
-
var $pkg = {}, $init, fmt, webgl, types, errscreen, imageutil, screen, f64,
|
|
141952
|
+
var $pkg = {}, $init, fmt, webgl, types, dom, errscreen, imageutil, screen, f64, image, color, draw, sync, js, ArrayBufferSlice, YCbCrJS, BufferImpl, screenImpl, windowImpl, sliceType, sliceType$1, sliceType$2, ptrType, ptrType$1, sliceType$3, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, ptrType$11, ptrType$12, ptrType$13, ptrType$14, elementsIndices, texCoordsVertices, newBuffer, newScreenImpl, Main, main, newWindow;
|
|
141470
141953
|
fmt = $packages["fmt"];
|
|
141471
141954
|
webgl = $packages["github.com/nuberu/webgl"];
|
|
141472
141955
|
types = $packages["github.com/nuberu/webgl/types"];
|
|
141956
|
+
dom = $packages["golang.org/x/exp/shiny/driver/internal/dom"];
|
|
141473
141957
|
errscreen = $packages["golang.org/x/exp/shiny/driver/internal/errscreen"];
|
|
141474
141958
|
imageutil = $packages["golang.org/x/exp/shiny/imageutil"];
|
|
141475
141959
|
screen = $packages["golang.org/x/exp/shiny/screen"];
|
|
141476
141960
|
f64 = $packages["golang.org/x/image/math/f64"];
|
|
141477
|
-
focus = $packages["golang.org/x/mobile/event/focus"];
|
|
141478
|
-
key = $packages["golang.org/x/mobile/event/key"];
|
|
141479
|
-
mouse = $packages["golang.org/x/mobile/event/mouse"];
|
|
141480
|
-
size = $packages["golang.org/x/mobile/event/size"];
|
|
141481
|
-
geom = $packages["golang.org/x/mobile/geom"];
|
|
141482
141961
|
image = $packages["image"];
|
|
141483
141962
|
color = $packages["image/color"];
|
|
141484
141963
|
draw = $packages["image/draw"];
|
|
141485
|
-
strings = $packages["strings"];
|
|
141486
141964
|
sync = $packages["sync"];
|
|
141487
141965
|
js = $packages["syscall/js"];
|
|
141488
141966
|
ArrayBufferSlice = $pkg.ArrayBufferSlice = $newType(0, $kindStruct, "webgldriver.ArrayBufferSlice", true, "golang.org/x/exp/shiny/driver/webgldriver", true, function(ArrayBuffer_, Offset_, Length_) {
|
|
@@ -141547,7 +142025,7 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
141547
142025
|
}
|
|
141548
142026
|
this.doc = doc_;
|
|
141549
142027
|
});
|
|
141550
|
-
windowImpl = $pkg.windowImpl = $newType(0, $kindStruct, "webgldriver.windowImpl", true, "golang.org/x/exp/shiny/driver/webgldriver", false, function(screen_, width_, height_, mutex_, canvasEl_, gl_, programRGBA_, imageTexRGBA_, programYUV420_, imageTexY_, imageTexU_, imageTexV_, vertexArray_, released_,
|
|
142028
|
+
windowImpl = $pkg.windowImpl = $newType(0, $kindStruct, "webgldriver.windowImpl", true, "golang.org/x/exp/shiny/driver/webgldriver", false, function(screen_, width_, height_, mutex_, canvasEl_, gl_, programRGBA_, imageTexRGBA_, programYUV420_, imageTexY_, imageTexU_, imageTexV_, vertexArray_, released_, domEvents_) {
|
|
141551
142029
|
this.$val = this;
|
|
141552
142030
|
if (arguments.length === 0) {
|
|
141553
142031
|
this.screen = ptrType.nil;
|
|
@@ -141564,8 +142042,7 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
141564
142042
|
this.imageTexV = ptrType$5.nil;
|
|
141565
142043
|
this.vertexArray = ptrType$6.nil;
|
|
141566
142044
|
this.released = false;
|
|
141567
|
-
this.
|
|
141568
|
-
this.eventChan = $chanNil;
|
|
142045
|
+
this.domEvents = ptrType$7.nil;
|
|
141569
142046
|
return;
|
|
141570
142047
|
}
|
|
141571
142048
|
this.screen = screen_;
|
|
@@ -141582,8 +142059,7 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
141582
142059
|
this.imageTexV = imageTexV_;
|
|
141583
142060
|
this.vertexArray = vertexArray_;
|
|
141584
142061
|
this.released = released_;
|
|
141585
|
-
this.
|
|
141586
|
-
this.eventChan = eventChan_;
|
|
142062
|
+
this.domEvents = domEvents_;
|
|
141587
142063
|
});
|
|
141588
142064
|
sliceType = $sliceType($Uint16);
|
|
141589
142065
|
sliceType$1 = $sliceType($Float32);
|
|
@@ -141592,21 +142068,18 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
141592
142068
|
ptrType$1 = $ptrType(sync.Mutex);
|
|
141593
142069
|
sliceType$3 = $sliceType($Uint8);
|
|
141594
142070
|
ptrType$2 = $ptrType(YCbCrJS);
|
|
141595
|
-
sliceType$4 = $sliceType($Int32);
|
|
141596
142071
|
ptrType$3 = $ptrType(types.Program);
|
|
141597
142072
|
ptrType$4 = $ptrType(webgl.RenderingContext);
|
|
141598
142073
|
ptrType$5 = $ptrType(types.Texture);
|
|
141599
142074
|
ptrType$6 = $ptrType(types.VertexArray);
|
|
141600
|
-
|
|
141601
|
-
|
|
141602
|
-
ptrType$
|
|
141603
|
-
ptrType$
|
|
141604
|
-
ptrType$
|
|
141605
|
-
ptrType$
|
|
141606
|
-
ptrType$
|
|
141607
|
-
ptrType$
|
|
141608
|
-
ptrType$13 = $ptrType(windowImpl);
|
|
141609
|
-
chanType = $chanType($emptyInterface, false, false);
|
|
142075
|
+
ptrType$7 = $ptrType(dom.DomEvents);
|
|
142076
|
+
ptrType$8 = $ptrType(BufferImpl);
|
|
142077
|
+
ptrType$9 = $ptrType(ArrayBufferSlice);
|
|
142078
|
+
ptrType$10 = $ptrType(image.RGBA);
|
|
142079
|
+
ptrType$11 = $ptrType(image.YCbCr);
|
|
142080
|
+
ptrType$12 = $ptrType(screen.NewWindowOptions);
|
|
142081
|
+
ptrType$13 = $ptrType(screen.DrawOptions);
|
|
142082
|
+
ptrType$14 = $ptrType(windowImpl);
|
|
141610
142083
|
ArrayBufferSlice.ptr.prototype.slice = function() {
|
|
141611
142084
|
var _r, a, $s, $r;
|
|
141612
142085
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; a = $f.a; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
@@ -141616,10 +142089,10 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
141616
142089
|
/* */ } return; } if ($f === undefined) { $f = { $blk: ArrayBufferSlice.ptr.prototype.slice }; } $f._r = _r; $f.a = a; $f.$s = $s; $f.$r = $r; return $f;
|
|
141617
142090
|
};
|
|
141618
142091
|
ArrayBufferSlice.prototype.slice = function() { return this.$val.slice(); };
|
|
141619
|
-
newBuffer = function(screen$1, size
|
|
141620
|
-
var _q, _q$1, _q$2, b, rect, screen$1, size
|
|
141621
|
-
rect = new image.Rectangle.ptr(new image.Point.ptr(0, 0), $clone(size
|
|
141622
|
-
b = new BufferImpl.ptr(screen$1, $clone(size
|
|
142092
|
+
newBuffer = function(screen$1, size) {
|
|
142093
|
+
var _q, _q$1, _q$2, b, rect, screen$1, size;
|
|
142094
|
+
rect = new image.Rectangle.ptr(new image.Point.ptr(0, 0), $clone(size, image.Point));
|
|
142095
|
+
b = new BufferImpl.ptr(screen$1, $clone(size, image.Point), new sync.Mutex.ptr(0, 0), false, new image.RGBA.ptr($makeSlice(sliceType$3, ($imul(($imul(4, size.X)), size.Y))), $imul(4, size.X), $clone(rect, image.Rectangle)), new image.YCbCr.ptr($makeSlice(sliceType$3, ($imul(size.X, size.Y))), $makeSlice(sliceType$3, (_q$1 = ($imul(size.X, size.Y)) / 4, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))), $makeSlice(sliceType$3, (_q$2 = ($imul(size.X, size.Y)) / 4, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"))), size.X, (_q = size.X / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), 2, $clone(rect, image.Rectangle)), ptrType$2.nil);
|
|
141623
142096
|
return b;
|
|
141624
142097
|
};
|
|
141625
142098
|
BufferImpl.ptr.prototype.Size = function() {
|
|
@@ -141675,312 +142148,6 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
141675
142148
|
/* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: BufferImpl.ptr.prototype.Release }; } $f.b = b; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } }
|
|
141676
142149
|
};
|
|
141677
142150
|
BufferImpl.prototype.Release = function() { return this.$val.Release(); };
|
|
141678
|
-
getDocWidth = function() {
|
|
141679
|
-
return $clone($clone(js.Global(), js.Value).Get("innerWidth"), js.Value).Int();
|
|
141680
|
-
};
|
|
141681
|
-
getDocHeight = function() {
|
|
141682
|
-
return $clone($clone(js.Global(), js.Value).Get("innerHeight"), js.Value).Int();
|
|
141683
|
-
};
|
|
141684
|
-
getOrientation = function() {
|
|
141685
|
-
var orientation, orientationType, $deferred;
|
|
141686
|
-
/* */ var $err = null; try { $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred);
|
|
141687
|
-
orientation = 0;
|
|
141688
|
-
$deferred.push([(function() {
|
|
141689
|
-
if (!($interfaceIsEqual($recover(), $ifaceNil))) {
|
|
141690
|
-
orientation = 0;
|
|
141691
|
-
}
|
|
141692
|
-
}), []]);
|
|
141693
|
-
orientationType = $clone($clone($clone($clone(js.Global(), js.Value).Get("screen"), js.Value).Get("orientation"), js.Value).Get("type"), js.Value).String();
|
|
141694
|
-
if (strings.HasPrefix(orientationType, "landscape")) {
|
|
141695
|
-
orientation = 2;
|
|
141696
|
-
return orientation;
|
|
141697
|
-
}
|
|
141698
|
-
if (strings.HasPrefix(orientationType, "portrait")) {
|
|
141699
|
-
orientation = 2;
|
|
141700
|
-
return orientation;
|
|
141701
|
-
}
|
|
141702
|
-
orientation = 0;
|
|
141703
|
-
return orientation;
|
|
141704
|
-
/* */ } catch(err) { $err = err; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return orientation; } }
|
|
141705
|
-
};
|
|
141706
|
-
windowImpl.ptr.prototype.bindSizeEvents = function() {
|
|
141707
|
-
var _r, onResize, w, $s, $r;
|
|
141708
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; onResize = $f.onResize; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
141709
|
-
onResize = [onResize];
|
|
141710
|
-
w = [w];
|
|
141711
|
-
w[0] = this;
|
|
141712
|
-
onResize[0] = $clone(js.FuncOf((function(onResize, w) { return function $b(this$1, args) {
|
|
141713
|
-
var args, this$1, $s, $r;
|
|
141714
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; args = $f.args; this$1 = $f.this$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
141715
|
-
$r = w[0].emitSizeEvent(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
141716
|
-
$s = -1; return $ifaceNil;
|
|
141717
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.args = args; $f.this$1 = this$1; $f.$s = $s; $f.$r = $r; return $f;
|
|
141718
|
-
}; })(onResize, w)), js.Func);
|
|
141719
|
-
_r = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$2([new $String("resize"), new onResize[0].constructor.elem(onResize[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
141720
|
-
_r;
|
|
141721
|
-
w[0].releases = $append(w[0].releases, (function(onResize, w) { return function $b() {
|
|
141722
|
-
var _r$1, $s, $r;
|
|
141723
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
141724
|
-
_r$1 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$2([new $String("resize"), new onResize[0].constructor.elem(onResize[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
141725
|
-
_r$1;
|
|
141726
|
-
$clone(onResize[0], js.Func).Release();
|
|
141727
|
-
$s = -1; return;
|
|
141728
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$1 = _r$1; $f.$s = $s; $f.$r = $r; return $f;
|
|
141729
|
-
}; })(onResize, w));
|
|
141730
|
-
$s = -1; return;
|
|
141731
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.bindSizeEvents }; } $f._r = _r; $f.onResize = onResize; $f.w = w; $f.$s = $s; $f.$r = $r; return $f;
|
|
141732
|
-
};
|
|
141733
|
-
windowImpl.prototype.bindSizeEvents = function() { return this.$val.bindSizeEvents(); };
|
|
141734
|
-
windowImpl.ptr.prototype.emitSizeEvent = function() {
|
|
141735
|
-
var _q, _q$1, height, orientation, pixelsPerPt, w, width, x, $s, $r;
|
|
141736
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _q$1 = $f._q$1; height = $f.height; orientation = $f.orientation; pixelsPerPt = $f.pixelsPerPt; w = $f.w; width = $f.width; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
141737
|
-
w = this;
|
|
141738
|
-
orientation = getOrientation();
|
|
141739
|
-
pixelsPerPt = 1;
|
|
141740
|
-
width = getDocWidth();
|
|
141741
|
-
height = getDocHeight();
|
|
141742
|
-
$r = $send(w.eventChan, (x = new size.Event.ptr(width, height, ((_q = width / ((pixelsPerPt >> 0)), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))), ((_q$1 = height / ((pixelsPerPt >> 0)), (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))), pixelsPerPt, orientation), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
141743
|
-
$s = -1; return;
|
|
141744
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.emitSizeEvent }; } $f._q = _q; $f._q$1 = _q$1; $f.height = height; $f.orientation = orientation; $f.pixelsPerPt = pixelsPerPt; $f.w = w; $f.width = width; $f.x = x; $f.$s = $s; $f.$r = $r; return $f;
|
|
141745
|
-
};
|
|
141746
|
-
windowImpl.prototype.emitSizeEvent = function() { return this.$val.emitSizeEvent(); };
|
|
141747
|
-
windowImpl.ptr.prototype.bindMouseEvents = function() {
|
|
141748
|
-
var _r, _r$1, _r$2, _r$3, onClick, onMove, onWheel, w, $s, $r;
|
|
141749
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; onClick = $f.onClick; onMove = $f.onMove; onWheel = $f.onWheel; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
141750
|
-
onClick = [onClick];
|
|
141751
|
-
onMove = [onMove];
|
|
141752
|
-
onWheel = [onWheel];
|
|
141753
|
-
w = [w];
|
|
141754
|
-
w[0] = this;
|
|
141755
|
-
onMove[0] = $clone(js.FuncOf((function(onClick, onMove, onWheel, w) { return function $b(this$1, args) {
|
|
141756
|
-
var _r, args, this$1, x, $s, $r;
|
|
141757
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; args = $f.args; this$1 = $f.this$1; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
141758
|
-
_r = $clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Call("preventDefault", new sliceType$2([])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
141759
|
-
_r;
|
|
141760
|
-
$r = $send(w[0].eventChan, (x = new mouse.Event.ptr(($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetX"), js.Value).Float())), ($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetY"), js.Value).Float())), 0, getEventModifiers($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), 0), new x.constructor.elem(x))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
141761
|
-
$s = -1; return $ifaceNil;
|
|
141762
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r = _r; $f.args = args; $f.this$1 = this$1; $f.x = x; $f.$s = $s; $f.$r = $r; return $f;
|
|
141763
|
-
}; })(onClick, onMove, onWheel, w)), js.Func);
|
|
141764
|
-
_r = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$2([new $String("mousemove"), new onMove[0].constructor.elem(onMove[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
141765
|
-
_r;
|
|
141766
|
-
onClick[0] = $clone(js.FuncOf((function(onClick, onMove, onWheel, w) { return function $b(this$1, args) {
|
|
141767
|
-
var _r$1, args, this$1, x, $s, $r;
|
|
141768
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; args = $f.args; this$1 = $f.this$1; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
141769
|
-
_r$1 = $clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Call("preventDefault", new sliceType$2([])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
141770
|
-
_r$1;
|
|
141771
|
-
$r = $send(w[0].eventChan, (x = new mouse.Event.ptr(($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetX"), js.Value).Float())), ($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetY"), js.Value).Float())), getMouseButton($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getEventModifiers($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getMouseDirection($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value))), new x.constructor.elem(x))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
141772
|
-
$s = -1; return $ifaceNil;
|
|
141773
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$1 = _r$1; $f.args = args; $f.this$1 = this$1; $f.x = x; $f.$s = $s; $f.$r = $r; return $f;
|
|
141774
|
-
}; })(onClick, onMove, onWheel, w)), js.Func);
|
|
141775
|
-
_r$1 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$2([new $String("mousedown"), new onClick[0].constructor.elem(onClick[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
141776
|
-
_r$1;
|
|
141777
|
-
_r$2 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$2([new $String("mouseup"), new onClick[0].constructor.elem(onClick[0])])); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
141778
|
-
_r$2;
|
|
141779
|
-
onWheel[0] = $clone(js.FuncOf((function(onClick, onMove, onWheel, w) { return function $b(this$1, args) {
|
|
141780
|
-
var args, this$1, x, $s, $r;
|
|
141781
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; args = $f.args; this$1 = $f.this$1; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
141782
|
-
$r = $send(w[0].eventChan, (x = new mouse.Event.ptr(($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetX"), js.Value).Float())), ($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetY"), js.Value).Float())), getWheelButton($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getEventModifiers($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), 3), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
141783
|
-
$s = -1; return $ifaceNil;
|
|
141784
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.args = args; $f.this$1 = this$1; $f.x = x; $f.$s = $s; $f.$r = $r; return $f;
|
|
141785
|
-
}; })(onClick, onMove, onWheel, w)), js.Func);
|
|
141786
|
-
_r$3 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$2([new $String("wheel"), new onWheel[0].constructor.elem(onWheel[0])])); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
141787
|
-
_r$3;
|
|
141788
|
-
w[0].releases = $append(w[0].releases, (function(onClick, onMove, onWheel, w) { return function $b() {
|
|
141789
|
-
var _r$4, _r$5, _r$6, _r$7, $s, $r;
|
|
141790
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
141791
|
-
_r$4 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$2([new $String("mousemove"), new onMove[0].constructor.elem(onMove[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
141792
|
-
_r$4;
|
|
141793
|
-
_r$5 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$2([new $String("mousedown"), new onClick[0].constructor.elem(onClick[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
|
|
141794
|
-
_r$5;
|
|
141795
|
-
_r$6 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$2([new $String("mouseup"), new onClick[0].constructor.elem(onClick[0])])); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
|
|
141796
|
-
_r$6;
|
|
141797
|
-
_r$7 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$2([new $String("wheel"), new onWheel[0].constructor.elem(onWheel[0])])); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
|
|
141798
|
-
_r$7;
|
|
141799
|
-
$clone(onMove[0], js.Func).Release();
|
|
141800
|
-
$clone(onClick[0], js.Func).Release();
|
|
141801
|
-
$clone(onWheel[0], js.Func).Release();
|
|
141802
|
-
$s = -1; return;
|
|
141803
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f.$s = $s; $f.$r = $r; return $f;
|
|
141804
|
-
}; })(onClick, onMove, onWheel, w));
|
|
141805
|
-
$s = -1; return;
|
|
141806
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.bindMouseEvents }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.onClick = onClick; $f.onMove = onMove; $f.onWheel = onWheel; $f.w = w; $f.$s = $s; $f.$r = $r; return $f;
|
|
141807
|
-
};
|
|
141808
|
-
windowImpl.prototype.bindMouseEvents = function() { return this.$val.bindMouseEvents(); };
|
|
141809
|
-
getMouseDirection = function(ev) {
|
|
141810
|
-
var dir, ev;
|
|
141811
|
-
dir = 0;
|
|
141812
|
-
dir = 0;
|
|
141813
|
-
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "mousedown") {
|
|
141814
|
-
dir = 1;
|
|
141815
|
-
}
|
|
141816
|
-
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "mouseup") {
|
|
141817
|
-
dir = 2;
|
|
141818
|
-
}
|
|
141819
|
-
return dir;
|
|
141820
|
-
};
|
|
141821
|
-
getWheelButton = function(ev) {
|
|
141822
|
-
var deltaX, deltaY, ev;
|
|
141823
|
-
deltaY = $clone($clone(ev, js.Value).Get("deltaY"), js.Value).Int();
|
|
141824
|
-
deltaX = $clone($clone(ev, js.Value).Get("deltaX"), js.Value).Int();
|
|
141825
|
-
if (deltaY > 0) {
|
|
141826
|
-
return -2;
|
|
141827
|
-
}
|
|
141828
|
-
if (deltaY < 0) {
|
|
141829
|
-
return -1;
|
|
141830
|
-
}
|
|
141831
|
-
if (deltaX > 0) {
|
|
141832
|
-
return -4;
|
|
141833
|
-
}
|
|
141834
|
-
if (deltaX < 0) {
|
|
141835
|
-
return -3;
|
|
141836
|
-
}
|
|
141837
|
-
return 0;
|
|
141838
|
-
};
|
|
141839
|
-
getMouseButton = function(ev) {
|
|
141840
|
-
var _1, ev;
|
|
141841
|
-
_1 = $clone($clone(ev, js.Value).Get("button"), js.Value).Int();
|
|
141842
|
-
if (_1 === (0)) {
|
|
141843
|
-
return 1;
|
|
141844
|
-
} else if (_1 === (1)) {
|
|
141845
|
-
return 2;
|
|
141846
|
-
} else if (_1 === (2)) {
|
|
141847
|
-
return 3;
|
|
141848
|
-
} else if (_1 === (3)) {
|
|
141849
|
-
return 8;
|
|
141850
|
-
} else if (_1 === (4)) {
|
|
141851
|
-
return 9;
|
|
141852
|
-
} else {
|
|
141853
|
-
return 0;
|
|
141854
|
-
}
|
|
141855
|
-
};
|
|
141856
|
-
getEventModifiers = function(ev) {
|
|
141857
|
-
var ev, mod;
|
|
141858
|
-
mod = 0;
|
|
141859
|
-
if ($clone($clone(ev, js.Value).Get("altKey"), js.Value).Bool()) {
|
|
141860
|
-
mod = (mod | (4)) >>> 0;
|
|
141861
|
-
}
|
|
141862
|
-
if ($clone($clone(ev, js.Value).Get("ctrlKey"), js.Value).Bool()) {
|
|
141863
|
-
mod = (mod | (2)) >>> 0;
|
|
141864
|
-
}
|
|
141865
|
-
if ($clone($clone(ev, js.Value).Get("shiftKey"), js.Value).Bool()) {
|
|
141866
|
-
mod = (mod | (1)) >>> 0;
|
|
141867
|
-
}
|
|
141868
|
-
if ($clone($clone(ev, js.Value).Get("metaKey"), js.Value).Bool()) {
|
|
141869
|
-
mod = (mod | (8)) >>> 0;
|
|
141870
|
-
}
|
|
141871
|
-
return mod;
|
|
141872
|
-
};
|
|
141873
|
-
windowImpl.ptr.prototype.bindFocusEvents = function() {
|
|
141874
|
-
var _r, _r$1, onFocus, w, $s, $r;
|
|
141875
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; onFocus = $f.onFocus; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
141876
|
-
onFocus = [onFocus];
|
|
141877
|
-
w = [w];
|
|
141878
|
-
w[0] = this;
|
|
141879
|
-
onFocus[0] = $clone(js.FuncOf((function(onFocus, w) { return function $b(this$1, args) {
|
|
141880
|
-
var args, this$1, x, $s, $r;
|
|
141881
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; args = $f.args; this$1 = $f.this$1; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
141882
|
-
$r = $send(w[0].eventChan, (x = new focus.Event.ptr(isFocusIn($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value))), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
141883
|
-
$s = -1; return $ifaceNil;
|
|
141884
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.args = args; $f.this$1 = this$1; $f.x = x; $f.$s = $s; $f.$r = $r; return $f;
|
|
141885
|
-
}; })(onFocus, w)), js.Func);
|
|
141886
|
-
_r = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$2([new $String("focus"), new onFocus[0].constructor.elem(onFocus[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
141887
|
-
_r;
|
|
141888
|
-
_r$1 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$2([new $String("blur"), new onFocus[0].constructor.elem(onFocus[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
141889
|
-
_r$1;
|
|
141890
|
-
w[0].releases = $append(w[0].releases, (function(onFocus, w) { return function $b() {
|
|
141891
|
-
var _r$2, _r$3, $s, $r;
|
|
141892
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; _r$3 = $f._r$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
141893
|
-
_r$2 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$2([new $String("focus"), new onFocus[0].constructor.elem(onFocus[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
141894
|
-
_r$2;
|
|
141895
|
-
_r$3 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$2([new $String("blur"), new onFocus[0].constructor.elem(onFocus[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
141896
|
-
_r$3;
|
|
141897
|
-
$clone(onFocus[0], js.Func).Release();
|
|
141898
|
-
$s = -1; return;
|
|
141899
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$2 = _r$2; $f._r$3 = _r$3; $f.$s = $s; $f.$r = $r; return $f;
|
|
141900
|
-
}; })(onFocus, w));
|
|
141901
|
-
$s = -1; return;
|
|
141902
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.bindFocusEvents }; } $f._r = _r; $f._r$1 = _r$1; $f.onFocus = onFocus; $f.w = w; $f.$s = $s; $f.$r = $r; return $f;
|
|
141903
|
-
};
|
|
141904
|
-
windowImpl.prototype.bindFocusEvents = function() { return this.$val.bindFocusEvents(); };
|
|
141905
|
-
isFocusIn = function(ev) {
|
|
141906
|
-
var ev;
|
|
141907
|
-
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "focus") {
|
|
141908
|
-
return true;
|
|
141909
|
-
}
|
|
141910
|
-
return false;
|
|
141911
|
-
};
|
|
141912
|
-
windowImpl.ptr.prototype.bindKeyEvents = function() {
|
|
141913
|
-
var _r, _r$1, onKey, w, $s, $r;
|
|
141914
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; onKey = $f.onKey; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
141915
|
-
onKey = [onKey];
|
|
141916
|
-
w = [w];
|
|
141917
|
-
w[0] = this;
|
|
141918
|
-
onKey[0] = $clone(js.FuncOf((function(onKey, w) { return function $b(this$1, args) {
|
|
141919
|
-
var _r, args, this$1, x, $s, $r;
|
|
141920
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; args = $f.args; this$1 = $f.this$1; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
141921
|
-
_r = $clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Call("preventDefault", new sliceType$2([])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
141922
|
-
_r;
|
|
141923
|
-
$r = $send(w[0].eventChan, (x = new key.Event.ptr(getKeyRune($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getKeyCode($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getEventModifiers($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getKeyDirection($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value))), new x.constructor.elem(x))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
141924
|
-
$s = -1; return $ifaceNil;
|
|
141925
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r = _r; $f.args = args; $f.this$1 = this$1; $f.x = x; $f.$s = $s; $f.$r = $r; return $f;
|
|
141926
|
-
}; })(onKey, w)), js.Func);
|
|
141927
|
-
_r = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$2([new $String("keydown"), new onKey[0].constructor.elem(onKey[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
141928
|
-
_r;
|
|
141929
|
-
_r$1 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$2([new $String("keyup"), new onKey[0].constructor.elem(onKey[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
141930
|
-
_r$1;
|
|
141931
|
-
w[0].releases = $append(w[0].releases, (function(onKey, w) { return function $b() {
|
|
141932
|
-
var _r$2, _r$3, $s, $r;
|
|
141933
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; _r$3 = $f._r$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
141934
|
-
_r$2 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$2([new $String("keydown"), new onKey[0].constructor.elem(onKey[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
141935
|
-
_r$2;
|
|
141936
|
-
_r$3 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$2([new $String("keyup"), new onKey[0].constructor.elem(onKey[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
141937
|
-
_r$3;
|
|
141938
|
-
$clone(onKey[0], js.Func).Release();
|
|
141939
|
-
$s = -1; return;
|
|
141940
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$2 = _r$2; $f._r$3 = _r$3; $f.$s = $s; $f.$r = $r; return $f;
|
|
141941
|
-
}; })(onKey, w));
|
|
141942
|
-
$s = -1; return;
|
|
141943
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.bindKeyEvents }; } $f._r = _r; $f._r$1 = _r$1; $f.onKey = onKey; $f.w = w; $f.$s = $s; $f.$r = $r; return $f;
|
|
141944
|
-
};
|
|
141945
|
-
windowImpl.prototype.bindKeyEvents = function() { return this.$val.bindKeyEvents(); };
|
|
141946
|
-
getKeyRune = function(ev) {
|
|
141947
|
-
var ev, key$1;
|
|
141948
|
-
key$1 = (new sliceType$4($stringToRunes($clone($clone(ev, js.Value).Get("key"), js.Value).String())));
|
|
141949
|
-
if (key$1.$length === 1) {
|
|
141950
|
-
return (0 >= key$1.$length ? ($throwRuntimeError("index out of range"), undefined) : key$1.$array[key$1.$offset + 0]);
|
|
141951
|
-
}
|
|
141952
|
-
return -1;
|
|
141953
|
-
};
|
|
141954
|
-
getKeyDirection = function(ev) {
|
|
141955
|
-
var dir, ev;
|
|
141956
|
-
dir = 0;
|
|
141957
|
-
dir = 0;
|
|
141958
|
-
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "keydown") {
|
|
141959
|
-
dir = 1;
|
|
141960
|
-
}
|
|
141961
|
-
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "keyup") {
|
|
141962
|
-
dir = 2;
|
|
141963
|
-
}
|
|
141964
|
-
return dir;
|
|
141965
|
-
};
|
|
141966
|
-
getKeyCode = function(ev) {
|
|
141967
|
-
var _entry, _entry$1, _tuple, _tuple$1, code, code$1, domCode, domKey, ev, exists, exists$1;
|
|
141968
|
-
domCode = $clone($clone(ev, js.Value).Get("code"), js.Value).String();
|
|
141969
|
-
_tuple = (_entry = keyCodesMap[$String.keyFor(domCode)], _entry !== undefined ? [_entry.v, true] : [0, false]);
|
|
141970
|
-
code = _tuple[0];
|
|
141971
|
-
exists = _tuple[1];
|
|
141972
|
-
if (exists) {
|
|
141973
|
-
return code;
|
|
141974
|
-
}
|
|
141975
|
-
domKey = $clone($clone(ev, js.Value).Get("key"), js.Value).String();
|
|
141976
|
-
_tuple$1 = (_entry$1 = keyCodesByKeyMap[$String.keyFor(domKey)], _entry$1 !== undefined ? [_entry$1.v, true] : [0, false]);
|
|
141977
|
-
code$1 = _tuple$1[0];
|
|
141978
|
-
exists$1 = _tuple$1[1];
|
|
141979
|
-
if (exists$1) {
|
|
141980
|
-
return code$1;
|
|
141981
|
-
}
|
|
141982
|
-
return 0;
|
|
141983
|
-
};
|
|
141984
142151
|
windowImpl.ptr.prototype.createBuffers = function() {
|
|
141985
142152
|
var _r, _r$1, _r$2, elementBuffer, emptyFloat, floatLen, vertexArray, vertexBuffer, w, $s, $r;
|
|
141986
142153
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; elementBuffer = $f.elementBuffer; emptyFloat = $f.emptyFloat; floatLen = $f.floatLen; vertexArray = $f.vertexArray; vertexBuffer = $f.vertexBuffer; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
@@ -142207,22 +142374,22 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
142207
142374
|
s = new screenImpl.ptr($clone($clone(js.Global(), js.Value).Get("document"), js.Value));
|
|
142208
142375
|
return [s, $ifaceNil];
|
|
142209
142376
|
};
|
|
142210
|
-
screenImpl.ptr.prototype.NewBuffer = function(size
|
|
142211
|
-
var buffer, s, size
|
|
142377
|
+
screenImpl.ptr.prototype.NewBuffer = function(size) {
|
|
142378
|
+
var buffer, s, size;
|
|
142212
142379
|
s = this;
|
|
142213
|
-
buffer = newBuffer(s, $clone(size
|
|
142380
|
+
buffer = newBuffer(s, $clone(size, image.Point));
|
|
142214
142381
|
return [buffer, $ifaceNil];
|
|
142215
142382
|
};
|
|
142216
|
-
screenImpl.prototype.NewBuffer = function(size
|
|
142217
|
-
screenImpl.ptr.prototype.NewTexture = function(size
|
|
142218
|
-
var _r, s, size
|
|
142219
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; s = $f.s; size
|
|
142383
|
+
screenImpl.prototype.NewBuffer = function(size) { return this.$val.NewBuffer(size); };
|
|
142384
|
+
screenImpl.ptr.prototype.NewTexture = function(size) {
|
|
142385
|
+
var _r, s, size, $s, $r;
|
|
142386
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; s = $f.s; size = $f.size; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142220
142387
|
s = this;
|
|
142221
142388
|
_r = fmt.Errorf("Texture not implemented", new sliceType$2([])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
142222
142389
|
$s = -1; return [$ifaceNil, _r];
|
|
142223
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: screenImpl.ptr.prototype.NewTexture }; } $f._r = _r; $f.s = s; $f.size
|
|
142390
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: screenImpl.ptr.prototype.NewTexture }; } $f._r = _r; $f.s = s; $f.size = size; $f.$s = $s; $f.$r = $r; return $f;
|
|
142224
142391
|
};
|
|
142225
|
-
screenImpl.prototype.NewTexture = function(size
|
|
142392
|
+
screenImpl.prototype.NewTexture = function(size) { return this.$val.NewTexture(size); };
|
|
142226
142393
|
screenImpl.ptr.prototype.NewWindow = function(opts) {
|
|
142227
142394
|
var _r, opts, s, window, $s, $r;
|
|
142228
142395
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; opts = $f.opts; s = $f.s; window = $f.window; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
@@ -142264,20 +142431,20 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
142264
142431
|
/* */ } return; } if ($f === undefined) { $f = { $blk: main }; } $f._tuple = _tuple; $f.err = err; $f.f = f; $f.retErr = retErr; $f.s = s; $f.$s = $s; $f.$r = $r; return $f;
|
|
142265
142432
|
};
|
|
142266
142433
|
newWindow = function(screen$1, opts) {
|
|
142267
|
-
var _q, _q$1, _q$2, _q$3, _r, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, canvasEl, err, gl, height, opts, screen$1, w, width, $s, $r;
|
|
142268
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _q$1 = $f._q$1; _q$2 = $f._q$2; _q$3 = $f._q$3; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; canvasEl = $f.canvasEl; err = $f.err; gl = $f.gl; height = $f.height; opts = $f.opts; screen$1 = $f.screen$1; w = $f.w; width = $f.width; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142434
|
+
var _q, _q$1, _q$2, _q$3, _r, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, canvasEl, domEvents, err, gl, height, opts, screen$1, w, width, $s, $r;
|
|
142435
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _q$1 = $f._q$1; _q$2 = $f._q$2; _q$3 = $f._q$3; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; canvasEl = $f.canvasEl; domEvents = $f.domEvents; err = $f.err; gl = $f.gl; height = $f.height; opts = $f.opts; screen$1 = $f.screen$1; w = $f.w; width = $f.width; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142269
142436
|
_r = $clone(screen$1.doc, js.Value).Call("createElement", new sliceType$2([new $String("canvas")])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
142270
142437
|
canvasEl = $clone(_r, js.Value);
|
|
142271
142438
|
_r$1 = $clone($clone(screen$1.doc, js.Value).Get("body"), js.Value).Call("appendChild", new sliceType$2([new canvasEl.constructor.elem(canvasEl)])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
142272
142439
|
_r$1;
|
|
142273
142440
|
width = opts.Width;
|
|
142274
142441
|
if (opts.Width === 0) {
|
|
142275
|
-
width =
|
|
142442
|
+
width = dom.GetDocWidth();
|
|
142276
142443
|
}
|
|
142277
142444
|
$r = $clone(canvasEl, js.Value).Set("width", new $Int(width)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142278
142445
|
height = opts.Height;
|
|
142279
142446
|
if (opts.Height === 0) {
|
|
142280
|
-
height =
|
|
142447
|
+
height = dom.GetDocHeight();
|
|
142281
142448
|
}
|
|
142282
142449
|
$r = $clone(canvasEl, js.Value).Set("height", new $Int(height)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142283
142450
|
/* */ if (!(opts.Title === "")) { $s = 5; continue; }
|
|
@@ -142294,7 +142461,8 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
142294
142461
|
if (!($interfaceIsEqual(err, $ifaceNil))) {
|
|
142295
142462
|
$panic(err);
|
|
142296
142463
|
}
|
|
142297
|
-
|
|
142464
|
+
domEvents = dom.NewDomEvents();
|
|
142465
|
+
w = new windowImpl.ptr(screen$1, width, height, ptrType$1.nil, $clone(canvasEl, js.Value), gl, ptrType$3.nil, ptrType$5.nil, ptrType$3.nil, ptrType$5.nil, ptrType$5.nil, ptrType$5.nil, ptrType$6.nil, false, domEvents);
|
|
142298
142466
|
_r$5 = w.createAndLinkProgramRGBA(); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
|
|
142299
142467
|
_tuple$1 = _r$5;
|
|
142300
142468
|
w.programRGBA = _tuple$1[0];
|
|
@@ -142322,13 +142490,9 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
142322
142490
|
$r = w.gl.Enable(2929); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142323
142491
|
$r = w.gl.Viewport(0, 0, w.width, w.height); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142324
142492
|
$r = w.clear(); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142325
|
-
$r =
|
|
142326
|
-
$go($methodVal(w, "emitSizeEvent"), []);
|
|
142327
|
-
$r = w.bindMouseEvents(); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142328
|
-
$r = w.bindKeyEvents(); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142329
|
-
$r = w.bindFocusEvents(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142493
|
+
$r = domEvents.BindEvents(); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142330
142494
|
$s = -1; return w;
|
|
142331
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: newWindow }; } $f._q = _q; $f._q$1 = _q$1; $f._q$2 = _q$2; $f._q$3 = _q$3; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.canvasEl = canvasEl; $f.err = err; $f.gl = gl; $f.height = height; $f.opts = opts; $f.screen$1 = screen$1; $f.w = w; $f.width = width; $f.$s = $s; $f.$r = $r; return $f;
|
|
142495
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: newWindow }; } $f._q = _q; $f._q$1 = _q$1; $f._q$2 = _q$2; $f._q$3 = _q$3; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.canvasEl = canvasEl; $f.domEvents = domEvents; $f.err = err; $f.gl = gl; $f.height = height; $f.opts = opts; $f.screen$1 = screen$1; $f.w = w; $f.width = width; $f.$s = $s; $f.$r = $r; return $f;
|
|
142332
142496
|
};
|
|
142333
142497
|
windowImpl.ptr.prototype.clear = function() {
|
|
142334
142498
|
var w, $s, $r;
|
|
@@ -142341,8 +142505,8 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
142341
142505
|
};
|
|
142342
142506
|
windowImpl.prototype.clear = function() { return this.$val.clear(); };
|
|
142343
142507
|
windowImpl.ptr.prototype.Release = function() {
|
|
142344
|
-
var
|
|
142345
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true;
|
|
142508
|
+
var _r, w, $s, $deferred, $r;
|
|
142509
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; w = $f.w; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred);
|
|
142346
142510
|
w = this;
|
|
142347
142511
|
$r = w.mutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142348
142512
|
$deferred.push([$methodVal(w.mutex, "Unlock"), []]);
|
|
@@ -142351,17 +142515,594 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
142351
142515
|
}
|
|
142352
142516
|
_r = $clone(w.canvasEl, js.Value).Call("remove", new sliceType$2([])); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
142353
142517
|
_r;
|
|
142354
|
-
|
|
142355
|
-
|
|
142356
|
-
|
|
142357
|
-
|
|
142358
|
-
|
|
142359
|
-
|
|
142360
|
-
|
|
142361
|
-
|
|
142518
|
+
$r = w.domEvents.Release(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142519
|
+
w.released = true;
|
|
142520
|
+
$s = -1; return;
|
|
142521
|
+
/* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.Release }; } $f._r = _r; $f.w = w; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } }
|
|
142522
|
+
};
|
|
142523
|
+
windowImpl.prototype.Release = function() { return this.$val.Release(); };
|
|
142524
|
+
windowImpl.ptr.prototype.Publish = function() {
|
|
142525
|
+
var w;
|
|
142526
|
+
w = this;
|
|
142527
|
+
if (w.released) {
|
|
142528
|
+
return new screen.PublishResult.ptr(false);
|
|
142529
|
+
}
|
|
142530
|
+
return new screen.PublishResult.ptr(false);
|
|
142531
|
+
};
|
|
142532
|
+
windowImpl.prototype.Publish = function() { return this.$val.Publish(); };
|
|
142533
|
+
windowImpl.ptr.prototype.Send = function(event) {
|
|
142534
|
+
var event, w;
|
|
142535
|
+
w = this;
|
|
142536
|
+
if (w.released) {
|
|
142537
|
+
return;
|
|
142538
|
+
}
|
|
142539
|
+
$panic(new $String("Not implemented"));
|
|
142540
|
+
};
|
|
142541
|
+
windowImpl.prototype.Send = function(event) { return this.$val.Send(event); };
|
|
142542
|
+
windowImpl.ptr.prototype.SendFirst = function(event) {
|
|
142543
|
+
var event, w;
|
|
142544
|
+
w = this;
|
|
142545
|
+
if (w.released) {
|
|
142546
|
+
return;
|
|
142547
|
+
}
|
|
142548
|
+
$panic(new $String("Not implemented"));
|
|
142549
|
+
};
|
|
142550
|
+
windowImpl.prototype.SendFirst = function(event) { return this.$val.SendFirst(event); };
|
|
142551
|
+
windowImpl.ptr.prototype.NextEvent = function() {
|
|
142552
|
+
var _r, ev, w, $s, $r;
|
|
142553
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; ev = $f.ev; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142554
|
+
w = this;
|
|
142555
|
+
_r = $recv(w.domEvents.GetEventChan()); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
142556
|
+
ev = _r[0];
|
|
142557
|
+
$s = -1; return ev;
|
|
142558
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.NextEvent }; } $f._r = _r; $f.ev = ev; $f.w = w; $f.$s = $s; $f.$r = $r; return $f;
|
|
142559
|
+
};
|
|
142560
|
+
windowImpl.prototype.NextEvent = function() { return this.$val.NextEvent(); };
|
|
142561
|
+
windowImpl.ptr.prototype.Upload = function(dp, src, sr) {
|
|
142562
|
+
var dp, sr, src, w, $s, $r;
|
|
142563
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; dp = $f.dp; sr = $f.sr; src = $f.src; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142564
|
+
w = this;
|
|
142565
|
+
if (w.released) {
|
|
142566
|
+
$s = -1; return;
|
|
142567
|
+
}
|
|
142568
|
+
$r = w.drawBufferRGBA($clone(dp, image.Point), src, $clone(sr, image.Rectangle)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142569
|
+
$s = -1; return;
|
|
142570
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.Upload }; } $f.dp = dp; $f.sr = sr; $f.src = src; $f.w = w; $f.$s = $s; $f.$r = $r; return $f;
|
|
142571
|
+
};
|
|
142572
|
+
windowImpl.prototype.Upload = function(dp, src, sr) { return this.$val.Upload(dp, src, sr); };
|
|
142573
|
+
windowImpl.ptr.prototype.UploadYCbCr = function(dp, src, sr) {
|
|
142574
|
+
var _arg, _arg$1, _arg$2, _arg$3, _arg$4, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, dp, jsSrc, sr, src, w, $s, $r;
|
|
142575
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _arg$4 = $f._arg$4; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; dp = $f.dp; jsSrc = $f.jsSrc; sr = $f.sr; src = $f.src; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142576
|
+
w = this;
|
|
142577
|
+
if (w.released) {
|
|
142578
|
+
$s = -1; return;
|
|
142579
|
+
}
|
|
142580
|
+
_ref = src;
|
|
142581
|
+
/* */ if ($assertType(_ref, ptrType$8, true)[1]) { $s = 1; continue; }
|
|
142582
|
+
/* */ $s = 2; continue;
|
|
142583
|
+
/* if ($assertType(_ref, ptrType$8, true)[1]) { */ case 1:
|
|
142584
|
+
jsSrc = _ref.$val;
|
|
142585
|
+
_r = jsSrc.YCbCrJS(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
142586
|
+
/* */ if (_r.Use) { $s = 3; continue; }
|
|
142587
|
+
/* */ $s = 4; continue;
|
|
142588
|
+
/* if (_r.Use) { */ case 3:
|
|
142589
|
+
_r$1 = jsSrc.YCbCrJS(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
142590
|
+
/* */ if (!((_r$1.SubsampleRatio === 2))) { $s = 6; continue; }
|
|
142591
|
+
/* */ $s = 7; continue;
|
|
142592
|
+
/* if (!((_r$1.SubsampleRatio === 2))) { */ case 6:
|
|
142593
|
+
$panic(new $String("Only image.YCbCrSubsampleRatio420 SubsampleRatio is currently supported"));
|
|
142594
|
+
/* } */ case 7:
|
|
142595
|
+
_arg = $clone(dp, image.Point);
|
|
142596
|
+
_r$2 = jsSrc.YCbCrJS(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
142597
|
+
_r$3 = _r$2.Y.slice(); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
142598
|
+
_arg$1 = $clone(_r$3, js.Value);
|
|
142599
|
+
_r$4 = jsSrc.YCbCrJS(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
142600
|
+
_r$5 = _r$4.Cb.slice(); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
|
|
142601
|
+
_arg$2 = $clone(_r$5, js.Value);
|
|
142602
|
+
_r$6 = jsSrc.YCbCrJS(); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
|
|
142603
|
+
_r$7 = _r$6.Cr.slice(); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
|
|
142604
|
+
_arg$3 = $clone(_r$7, js.Value);
|
|
142605
|
+
_arg$4 = $clone(sr, image.Rectangle);
|
|
142606
|
+
$r = w.drawBufferYUV420JSArrayBuffers(_arg, _arg$1, _arg$2, _arg$3, _arg$4); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142607
|
+
$s = -1; return;
|
|
142608
|
+
/* } */ case 4:
|
|
142609
|
+
/* } */ case 2:
|
|
142610
|
+
_r$8 = src.YCbCr(); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; }
|
|
142611
|
+
/* */ if (_r$8.SubsampleRatio === 2) { $s = 16; continue; }
|
|
142612
|
+
/* */ $s = 17; continue;
|
|
142613
|
+
/* if (_r$8.SubsampleRatio === 2) { */ case 16:
|
|
142614
|
+
$r = w.drawBufferYUV420($clone(dp, image.Point), src, $clone(sr, image.Rectangle)); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142615
|
+
$s = 18; continue;
|
|
142616
|
+
/* } else { */ case 17:
|
|
142617
|
+
_r$9 = src.RGBA(); /* */ $s = 23; case 23: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; }
|
|
142618
|
+
/* */ if (_r$9.Pix.$length === 0) { $s = 21; continue; }
|
|
142619
|
+
/* */ $s = 22; continue;
|
|
142620
|
+
/* if (_r$9.Pix.$length === 0) { */ case 21:
|
|
142621
|
+
$r = imageutil.ConvertYCbCrToRGBA(src); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142622
|
+
/* } */ case 22:
|
|
142623
|
+
$r = w.drawBufferRGBA($clone(dp, image.Point), src, $clone(sr, image.Rectangle)); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142624
|
+
/* } */ case 18:
|
|
142625
|
+
$s = -1; return;
|
|
142626
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.UploadYCbCr }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._arg$4 = _arg$4; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f.dp = dp; $f.jsSrc = jsSrc; $f.sr = sr; $f.src = src; $f.w = w; $f.$s = $s; $f.$r = $r; return $f;
|
|
142627
|
+
};
|
|
142628
|
+
windowImpl.prototype.UploadYCbCr = function(dp, src, sr) { return this.$val.UploadYCbCr(dp, src, sr); };
|
|
142629
|
+
windowImpl.ptr.prototype.Fill = function(dr, src, op) {
|
|
142630
|
+
var dr, op, src, w;
|
|
142631
|
+
w = this;
|
|
142632
|
+
if (w.released) {
|
|
142633
|
+
return;
|
|
142634
|
+
}
|
|
142635
|
+
$panic(new $String("Not implemented"));
|
|
142636
|
+
};
|
|
142637
|
+
windowImpl.prototype.Fill = function(dr, src, op) { return this.$val.Fill(dr, src, op); };
|
|
142638
|
+
windowImpl.ptr.prototype.Draw = function(src2dst, src, sr, op, opts) {
|
|
142639
|
+
var op, opts, sr, src, src2dst, w;
|
|
142640
|
+
w = this;
|
|
142641
|
+
if (w.released) {
|
|
142642
|
+
return;
|
|
142643
|
+
}
|
|
142644
|
+
$panic(new $String("Not implemented"));
|
|
142645
|
+
};
|
|
142646
|
+
windowImpl.prototype.Draw = function(src2dst, src, sr, op, opts) { return this.$val.Draw(src2dst, src, sr, op, opts); };
|
|
142647
|
+
windowImpl.ptr.prototype.DrawUniform = function(src2dst, src, sr, op, opts) {
|
|
142648
|
+
var op, opts, sr, src, src2dst, w;
|
|
142649
|
+
w = this;
|
|
142650
|
+
if (w.released) {
|
|
142651
|
+
return;
|
|
142652
|
+
}
|
|
142653
|
+
$panic(new $String("Not implemented"));
|
|
142654
|
+
};
|
|
142655
|
+
windowImpl.prototype.DrawUniform = function(src2dst, src, sr, op, opts) { return this.$val.DrawUniform(src2dst, src, sr, op, opts); };
|
|
142656
|
+
windowImpl.ptr.prototype.Copy = function(dp, src, sr, op, opts) {
|
|
142657
|
+
var dp, op, opts, sr, src, w;
|
|
142658
|
+
w = this;
|
|
142659
|
+
if (w.released) {
|
|
142660
|
+
return;
|
|
142661
|
+
}
|
|
142662
|
+
$panic(new $String("Not implemented"));
|
|
142663
|
+
};
|
|
142664
|
+
windowImpl.prototype.Copy = function(dp, src, sr, op, opts) { return this.$val.Copy(dp, src, sr, op, opts); };
|
|
142665
|
+
windowImpl.ptr.prototype.Scale = function(dr, src, sr, op, opts) {
|
|
142666
|
+
var dr, op, opts, sr, src, w;
|
|
142667
|
+
w = this;
|
|
142668
|
+
if (w.released) {
|
|
142669
|
+
return;
|
|
142670
|
+
}
|
|
142671
|
+
$panic(new $String("Not implemented"));
|
|
142672
|
+
};
|
|
142673
|
+
windowImpl.prototype.Scale = function(dr, src, sr, op, opts) { return this.$val.Scale(dr, src, sr, op, opts); };
|
|
142674
|
+
ptrType$9.methods = [{prop: "slice", name: "slice", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [js.Value], false)}];
|
|
142675
|
+
ptrType$8.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [image.Point], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [image.Rectangle], false)}, {prop: "RGBA", name: "RGBA", pkg: "", typ: $funcType([], [ptrType$10], false)}, {prop: "YCbCr", name: "YCbCr", pkg: "", typ: $funcType([], [ptrType$11], false)}, {prop: "YCbCrJS", name: "YCbCrJS", pkg: "", typ: $funcType([], [ptrType$2], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}];
|
|
142676
|
+
ptrType.methods = [{prop: "NewBuffer", name: "NewBuffer", pkg: "", typ: $funcType([image.Point], [screen.Buffer, $error], false)}, {prop: "NewTexture", name: "NewTexture", pkg: "", typ: $funcType([image.Point], [screen.Texture, $error], false)}, {prop: "NewWindow", name: "NewWindow", pkg: "", typ: $funcType([ptrType$12], [screen.Window, $error], false)}];
|
|
142677
|
+
ptrType$14.methods = [{prop: "createBuffers", name: "createBuffers", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [ptrType$6], false)}, {prop: "createAndAttachFragmentShader", name: "createAndAttachFragmentShader", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([ptrType$3, $String], [$error], false)}, {prop: "createTexture", name: "createTexture", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([types.GLEnum, types.GLEnum, $Int, $Int], [ptrType$5], false)}, {prop: "createAndLinkProgramRGBA", name: "createAndLinkProgramRGBA", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [ptrType$3, $error], false)}, {prop: "drawBufferRGBA", name: "drawBufferRGBA", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "createAndLinkProgramYUV420", name: "createAndLinkProgramYUV420", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [ptrType$3, $error], false)}, {prop: "drawBufferYUV420", name: "drawBufferYUV420", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "drawBufferYUV420JSArrayBuffers", name: "drawBufferYUV420JSArrayBuffers", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([image.Point, js.Value, js.Value, js.Value, image.Rectangle], [], false)}, {prop: "createAndAttachVertexShader", name: "createAndAttachVertexShader", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([ptrType$3], [$error], false)}, {prop: "clear", name: "clear", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}, {prop: "Publish", name: "Publish", pkg: "", typ: $funcType([], [screen.PublishResult], false)}, {prop: "Send", name: "Send", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "SendFirst", name: "SendFirst", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "NextEvent", name: "NextEvent", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Upload", name: "Upload", pkg: "", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "UploadYCbCr", name: "UploadYCbCr", pkg: "", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "Fill", name: "Fill", pkg: "", typ: $funcType([image.Rectangle, color.Color, draw.Op], [], false)}, {prop: "Draw", name: "Draw", pkg: "", typ: $funcType([f64.Aff3, screen.Texture, image.Rectangle, draw.Op, ptrType$13], [], false)}, {prop: "DrawUniform", name: "DrawUniform", pkg: "", typ: $funcType([f64.Aff3, color.Color, image.Rectangle, draw.Op, ptrType$13], [], false)}, {prop: "Copy", name: "Copy", pkg: "", typ: $funcType([image.Point, screen.Texture, image.Rectangle, draw.Op, ptrType$13], [], false)}, {prop: "Scale", name: "Scale", pkg: "", typ: $funcType([image.Rectangle, screen.Texture, image.Rectangle, draw.Op, ptrType$13], [], false)}];
|
|
142678
|
+
ArrayBufferSlice.init("", [{prop: "ArrayBuffer", name: "ArrayBuffer", embedded: false, exported: true, typ: js.Value, tag: ""}, {prop: "Offset", name: "Offset", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Length", name: "Length", embedded: false, exported: true, typ: $Int, tag: ""}]);
|
|
142679
|
+
YCbCrJS.init("", [{prop: "Y", name: "Y", embedded: false, exported: true, typ: ArrayBufferSlice, tag: ""}, {prop: "Cb", name: "Cb", embedded: false, exported: true, typ: ArrayBufferSlice, tag: ""}, {prop: "Cr", name: "Cr", embedded: false, exported: true, typ: ArrayBufferSlice, tag: ""}, {prop: "YStride", name: "YStride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "CStride", name: "CStride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "SubsampleRatio", name: "SubsampleRatio", embedded: false, exported: true, typ: image.YCbCrSubsampleRatio, tag: ""}, {prop: "Rect", name: "Rect", embedded: false, exported: true, typ: image.Rectangle, tag: ""}, {prop: "Use", name: "Use", embedded: false, exported: true, typ: $Bool, tag: ""}]);
|
|
142680
|
+
BufferImpl.init("golang.org/x/exp/shiny/driver/webgldriver", [{prop: "screen", name: "screen", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: image.Point, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "released", name: "released", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "rgba", name: "rgba", embedded: false, exported: false, typ: image.RGBA, tag: ""}, {prop: "ycbcr", name: "ycbcr", embedded: false, exported: false, typ: image.YCbCr, tag: ""}, {prop: "ycbcrJS", name: "ycbcrJS", embedded: false, exported: false, typ: ptrType$2, tag: ""}]);
|
|
142681
|
+
screenImpl.init("golang.org/x/exp/shiny/driver/webgldriver", [{prop: "doc", name: "doc", embedded: false, exported: false, typ: js.Value, tag: ""}]);
|
|
142682
|
+
windowImpl.init("golang.org/x/exp/shiny/driver/webgldriver", [{prop: "screen", name: "screen", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "width", name: "width", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "height", name: "height", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "canvasEl", name: "canvasEl", embedded: false, exported: false, typ: js.Value, tag: ""}, {prop: "gl", name: "gl", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "programRGBA", name: "programRGBA", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "imageTexRGBA", name: "imageTexRGBA", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "programYUV420", name: "programYUV420", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "imageTexY", name: "imageTexY", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "imageTexU", name: "imageTexU", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "imageTexV", name: "imageTexV", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "vertexArray", name: "vertexArray", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "released", name: "released", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "domEvents", name: "domEvents", embedded: false, exported: false, typ: ptrType$7, tag: ""}]);
|
|
142683
|
+
$init = function() {
|
|
142684
|
+
$pkg.$init = function() {};
|
|
142685
|
+
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142686
|
+
$r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142687
|
+
$r = webgl.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142688
|
+
$r = types.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142689
|
+
$r = dom.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142690
|
+
$r = errscreen.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142691
|
+
$r = imageutil.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142692
|
+
$r = screen.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142693
|
+
$r = f64.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142694
|
+
$r = image.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142695
|
+
$r = color.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142696
|
+
$r = draw.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142697
|
+
$r = sync.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142698
|
+
$r = js.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142699
|
+
elementsIndices = new sliceType([0, 1, 3, 1, 2, 3]);
|
|
142700
|
+
texCoordsVertices = new sliceType$1([1, 1, 1, 0, 1, -1, 1, 1, -1, -1, 0, 1, -1, 1, 0, 0]);
|
|
142701
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
142702
|
+
};
|
|
142703
|
+
$pkg.$init = $init;
|
|
142704
|
+
return $pkg;
|
|
142705
|
+
})();
|
|
142706
|
+
$packages["github.com/supraio/client-daemon/pkg/x264/h264decoder"] = (function() {
|
|
142707
|
+
var $pkg = {}, $init, errs, general, webgldriver, image, js, H264Decoder, sliceType, ptrType, sliceType$1, ptrType$1, NewDecoder;
|
|
142708
|
+
errs = $packages["github.com/supraio/client-daemon/pkg/errs"];
|
|
142709
|
+
general = $packages["github.com/supraio/client-daemon/pkg/x264/general"];
|
|
142710
|
+
webgldriver = $packages["golang.org/x/exp/shiny/driver/webgldriver"];
|
|
142711
|
+
image = $packages["image"];
|
|
142712
|
+
js = $packages["syscall/js"];
|
|
142713
|
+
H264Decoder = $pkg.H264Decoder = $newType(0, $kindStruct, "h264_decoder.H264Decoder", true, "github.com/supraio/client-daemon/pkg/x264/h264decoder", true, function(decoder_, nalBuffer_) {
|
|
142714
|
+
this.$val = this;
|
|
142715
|
+
if (arguments.length === 0) {
|
|
142716
|
+
this.decoder = new js.Value.ptr(null, false);
|
|
142717
|
+
this.nalBuffer = new js.Value.ptr(null, false);
|
|
142718
|
+
return;
|
|
142719
|
+
}
|
|
142720
|
+
this.decoder = decoder_;
|
|
142721
|
+
this.nalBuffer = nalBuffer_;
|
|
142722
|
+
});
|
|
142723
|
+
sliceType = $sliceType($emptyInterface);
|
|
142724
|
+
ptrType = $ptrType(webgldriver.BufferImpl);
|
|
142725
|
+
sliceType$1 = $sliceType($Uint8);
|
|
142726
|
+
ptrType$1 = $ptrType(H264Decoder);
|
|
142727
|
+
NewDecoder = function(header) {
|
|
142728
|
+
var _r, decoder, header, nalBuffer, nalBufferOffset, $s, $r;
|
|
142729
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; decoder = $f.decoder; header = $f.header; nalBuffer = $f.nalBuffer; nalBufferOffset = $f.nalBufferOffset; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142730
|
+
decoder = $clone($clone(js.Global(), js.Value).Get("h264Decoder"), js.Value);
|
|
142731
|
+
nalBufferOffset = $clone($clone(decoder, js.Value).Get("decBuffer"), js.Value);
|
|
142732
|
+
_r = $clone($clone($clone(decoder, js.Value).Get("memory"), js.Value).Get("HEAPU8"), js.Value).Call("subarray", new sliceType([new nalBufferOffset.constructor.elem(nalBufferOffset)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
142733
|
+
nalBuffer = $clone(_r, js.Value);
|
|
142734
|
+
$s = -1; return new H264Decoder.ptr($clone(decoder, js.Value), $clone(nalBuffer, js.Value));
|
|
142735
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: NewDecoder }; } $f._r = _r; $f.decoder = decoder; $f.header = header; $f.nalBuffer = nalBuffer; $f.nalBufferOffset = nalBufferOffset; $f.$s = $s; $f.$r = $r; return $f;
|
|
142736
|
+
};
|
|
142737
|
+
$pkg.NewDecoder = NewDecoder;
|
|
142738
|
+
H264Decoder.ptr.prototype.Decode = function(nal, outputBuffer) {
|
|
142739
|
+
var _q, _q$1, _q$2, _r, _r$1, _r$2, _r$3, cSize, cStride, height, heightIndex, m, nal, outputBuffer, pHeight, pPicture, pWidth, pictureBuffer, pictureBufferOffset, pictureIndex, pictureLen, status, width, widthIndex, x, x$1, ySize, yStride, ycbcrJSImg, $s, $r;
|
|
142740
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _q$1 = $f._q$1; _q$2 = $f._q$2; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; cSize = $f.cSize; cStride = $f.cStride; height = $f.height; heightIndex = $f.heightIndex; m = $f.m; nal = $f.nal; outputBuffer = $f.outputBuffer; pHeight = $f.pHeight; pPicture = $f.pPicture; pWidth = $f.pWidth; pictureBuffer = $f.pictureBuffer; pictureBufferOffset = $f.pictureBufferOffset; pictureIndex = $f.pictureIndex; pictureLen = $f.pictureLen; status = $f.status; width = $f.width; widthIndex = $f.widthIndex; x = $f.x; x$1 = $f.x$1; ySize = $f.ySize; yStride = $f.yStride; ycbcrJSImg = $f.ycbcrJSImg; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142741
|
+
m = this;
|
|
142742
|
+
js.CopyBytesToJS($clone(m.nalBuffer, js.Value), nal);
|
|
142743
|
+
pPicture = $clone($clone(m.decoder, js.Value).Get("pPicture"), js.Value);
|
|
142744
|
+
pWidth = $clone($clone(m.decoder, js.Value).Get("pWidth"), js.Value);
|
|
142745
|
+
pHeight = $clone($clone(m.decoder, js.Value).Get("pHeight"), js.Value);
|
|
142746
|
+
_r = $clone($clone(m.decoder, js.Value).Get("asm"), js.Value).Call("decode", new sliceType([(x = $clone(m.decoder, js.Value).Get("pStorage"), new x.constructor.elem(x)), (x$1 = $clone(m.decoder, js.Value).Get("decBuffer"), new x$1.constructor.elem(x$1)), new $Int(nal.$length), new pPicture.constructor.elem(pPicture), new pWidth.constructor.elem(pWidth), new pHeight.constructor.elem(pHeight)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
142747
|
+
status = $clone(_r, js.Value);
|
|
142748
|
+
/* */ if (!(($clone(status, js.Value).Int() === 1))) { $s = 2; continue; }
|
|
142749
|
+
/* */ $s = 3; continue;
|
|
142750
|
+
/* if (!(($clone(status, js.Value).Int() === 1))) { */ case 2:
|
|
142751
|
+
_r$1 = errs.Errorf("Decoding failed with status code %d", new sliceType([new $Int($clone(status, js.Value).Int())])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
142752
|
+
$s = -1; return _r$1;
|
|
142753
|
+
/* } */ case 3:
|
|
142754
|
+
widthIndex = $clone(pWidth, js.Value).Int() >> 2 >> 0;
|
|
142755
|
+
heightIndex = $clone(pHeight, js.Value).Int() >> 2 >> 0;
|
|
142756
|
+
width = $clone($clone($clone($clone(m.decoder, js.Value).Get("memory"), js.Value).Get("HEAP32"), js.Value).Index(widthIndex), js.Value).Int();
|
|
142757
|
+
height = $clone($clone($clone($clone(m.decoder, js.Value).Get("memory"), js.Value).Get("HEAP32"), js.Value).Index(heightIndex), js.Value).Int();
|
|
142758
|
+
pictureIndex = $clone(pPicture, js.Value).Int() >> 2 >> 0;
|
|
142759
|
+
pictureBufferOffset = $clone($clone($clone($clone(m.decoder, js.Value).Get("memory"), js.Value).Get("HEAP32"), js.Value).Index(pictureIndex), js.Value).Int();
|
|
142760
|
+
pictureLen = (_q = ($imul(($imul(width, height)), 3)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"));
|
|
142761
|
+
_r$2 = $clone($clone($clone(m.decoder, js.Value).Get("memory"), js.Value).Get("HEAPU8"), js.Value).Call("subarray", new sliceType([new $Int(pictureBufferOffset), new $Int((pictureBufferOffset + pictureLen >> 0))])); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
142762
|
+
pictureBuffer = $clone(_r$2, js.Value);
|
|
142763
|
+
yStride = width;
|
|
142764
|
+
cStride = (_q$1 = yStride / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"));
|
|
142765
|
+
ySize = $imul(yStride, height);
|
|
142766
|
+
cSize = (_q$2 = ($imul(cStride, height)) / 2, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"));
|
|
142767
|
+
_r$3 = $assertType(outputBuffer, ptrType).YCbCrJS(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
142768
|
+
ycbcrJSImg = _r$3;
|
|
142769
|
+
webgldriver.ArrayBufferSlice.copy(ycbcrJSImg.Y, new webgldriver.ArrayBufferSlice.ptr($clone(pictureBuffer, js.Value), 0, ySize));
|
|
142770
|
+
webgldriver.ArrayBufferSlice.copy(ycbcrJSImg.Cb, new webgldriver.ArrayBufferSlice.ptr($clone(pictureBuffer, js.Value), ySize, ySize + cSize >> 0));
|
|
142771
|
+
webgldriver.ArrayBufferSlice.copy(ycbcrJSImg.Cr, new webgldriver.ArrayBufferSlice.ptr($clone(pictureBuffer, js.Value), ySize + cSize >> 0, ySize + ($imul(cSize, 2)) >> 0));
|
|
142772
|
+
ycbcrJSImg.YStride = yStride;
|
|
142773
|
+
ycbcrJSImg.CStride = cStride;
|
|
142774
|
+
ycbcrJSImg.SubsampleRatio = 2;
|
|
142775
|
+
image.Rectangle.copy(ycbcrJSImg.Rect, image.Rect(0, 0, width, height));
|
|
142776
|
+
ycbcrJSImg.Use = true;
|
|
142777
|
+
$s = -1; return $ifaceNil;
|
|
142778
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: H264Decoder.ptr.prototype.Decode }; } $f._q = _q; $f._q$1 = _q$1; $f._q$2 = _q$2; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.cSize = cSize; $f.cStride = cStride; $f.height = height; $f.heightIndex = heightIndex; $f.m = m; $f.nal = nal; $f.outputBuffer = outputBuffer; $f.pHeight = pHeight; $f.pPicture = pPicture; $f.pWidth = pWidth; $f.pictureBuffer = pictureBuffer; $f.pictureBufferOffset = pictureBufferOffset; $f.pictureIndex = pictureIndex; $f.pictureLen = pictureLen; $f.status = status; $f.width = width; $f.widthIndex = widthIndex; $f.x = x; $f.x$1 = x$1; $f.ySize = ySize; $f.yStride = yStride; $f.ycbcrJSImg = ycbcrJSImg; $f.$s = $s; $f.$r = $r; return $f;
|
|
142779
|
+
};
|
|
142780
|
+
H264Decoder.prototype.Decode = function(nal, outputBuffer) { return this.$val.Decode(nal, outputBuffer); };
|
|
142781
|
+
H264Decoder.ptr.prototype.Release = function(outputBuffer) {
|
|
142782
|
+
var m, outputBuffer;
|
|
142783
|
+
m = this;
|
|
142784
|
+
};
|
|
142785
|
+
H264Decoder.prototype.Release = function(outputBuffer) { return this.$val.Release(outputBuffer); };
|
|
142786
|
+
ptrType$1.methods = [{prop: "Decode", name: "Decode", pkg: "", typ: $funcType([sliceType$1, general.OutputBuffer], [$error], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([general.OutputBuffer], [], false)}];
|
|
142787
|
+
H264Decoder.init("github.com/supraio/client-daemon/pkg/x264/h264decoder", [{prop: "decoder", name: "decoder", embedded: false, exported: false, typ: js.Value, tag: ""}, {prop: "nalBuffer", name: "nalBuffer", embedded: false, exported: false, typ: js.Value, tag: ""}]);
|
|
142788
|
+
$init = function() {
|
|
142789
|
+
$pkg.$init = function() {};
|
|
142790
|
+
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142791
|
+
$r = errs.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142792
|
+
$r = general.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142793
|
+
$r = webgldriver.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142794
|
+
$r = image.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142795
|
+
$r = js.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142796
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
142797
|
+
};
|
|
142798
|
+
$pkg.$init = $init;
|
|
142799
|
+
return $pkg;
|
|
142800
|
+
})();
|
|
142801
|
+
$packages["github.com/supraio/client-daemon/pkg/jshelper"] = (function() {
|
|
142802
|
+
var $pkg = {}, $init, js, ptrType, sliceType, Await;
|
|
142803
|
+
js = $packages["syscall/js"];
|
|
142804
|
+
ptrType = $ptrType(js.Value);
|
|
142805
|
+
sliceType = $sliceType($emptyInterface);
|
|
142806
|
+
Await = function(awaitable) {
|
|
142807
|
+
var _arg, _arg$1, _r, _r$1, _r$2, _selection, awaitable, catch$1, catchFunc, err, result, then, thenFunc, $s, $deferred, $r;
|
|
142808
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _selection = $f._selection; awaitable = $f.awaitable; catch$1 = $f.catch$1; catchFunc = $f.catchFunc; err = $f.err; result = $f.result; then = $f.then; thenFunc = $f.thenFunc; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred);
|
|
142809
|
+
catch$1 = [catch$1];
|
|
142810
|
+
then = [then];
|
|
142811
|
+
then[0] = new $Chan(ptrType, 0);
|
|
142812
|
+
$deferred.push([function(_arg) { $close(_arg); }, [then[0]]]);
|
|
142813
|
+
thenFunc = $clone(js.FuncOf((function(catch$1, then) { return function $b(this$1, args) {
|
|
142814
|
+
var args, this$1, $s, $r;
|
|
142815
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; args = $f.args; this$1 = $f.this$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142816
|
+
$r = $send(then[0], (0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142817
|
+
$s = -1; return $ifaceNil;
|
|
142818
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.args = args; $f.this$1 = this$1; $f.$s = $s; $f.$r = $r; return $f;
|
|
142819
|
+
}; })(catch$1, then)), js.Func);
|
|
142820
|
+
$deferred.push([$methodVal($clone(thenFunc, js.Func), "Release"), []]);
|
|
142821
|
+
catch$1[0] = new $Chan(ptrType, 0);
|
|
142822
|
+
$deferred.push([function(_arg$1) { $close(_arg$1); }, [catch$1[0]]]);
|
|
142823
|
+
catchFunc = $clone(js.FuncOf((function(catch$1, then) { return function $b(this$1, args) {
|
|
142824
|
+
var args, this$1, $s, $r;
|
|
142825
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; args = $f.args; this$1 = $f.this$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142826
|
+
$r = $send(catch$1[0], (0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142827
|
+
$s = -1; return $ifaceNil;
|
|
142828
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.args = args; $f.this$1 = this$1; $f.$s = $s; $f.$r = $r; return $f;
|
|
142829
|
+
}; })(catch$1, then)), js.Func);
|
|
142830
|
+
$deferred.push([$methodVal($clone(catchFunc, js.Func), "Release"), []]);
|
|
142831
|
+
_r = $clone(awaitable, js.Value).Call("then", new sliceType([new thenFunc.constructor.elem(thenFunc)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
142832
|
+
_r$1 = $clone(_r, js.Value).Call("catch", new sliceType([new catchFunc.constructor.elem(catchFunc)])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
142833
|
+
_r$1;
|
|
142834
|
+
_r$2 = $select([[then[0]], [catch$1[0]]]); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
142835
|
+
_selection = _r$2;
|
|
142836
|
+
if (_selection[0] === 0) {
|
|
142837
|
+
result = _selection[1][0];
|
|
142838
|
+
$s = -1; return [result, ptrType.nil];
|
|
142839
|
+
} else if (_selection[0] === 1) {
|
|
142840
|
+
err = _selection[1][0];
|
|
142841
|
+
$s = -1; return [ptrType.nil, err];
|
|
142842
|
+
}
|
|
142843
|
+
$s = -1; return [ptrType.nil, ptrType.nil];
|
|
142844
|
+
/* */ } return; } } catch(err) { $err = err; $s = -1; return [ptrType.nil, ptrType.nil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Await }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._selection = _selection; $f.awaitable = awaitable; $f.catch$1 = catch$1; $f.catchFunc = catchFunc; $f.err = err; $f.result = result; $f.then = then; $f.thenFunc = thenFunc; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } }
|
|
142845
|
+
};
|
|
142846
|
+
$pkg.Await = Await;
|
|
142847
|
+
$init = function() {
|
|
142848
|
+
$pkg.$init = function() {};
|
|
142849
|
+
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142850
|
+
$r = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142851
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
142852
|
+
};
|
|
142853
|
+
$pkg.$init = $init;
|
|
142854
|
+
return $pkg;
|
|
142855
|
+
})();
|
|
142856
|
+
$packages["golang.org/x/exp/shiny/driver/canvasdriver"] = (function() {
|
|
142857
|
+
var $pkg = {}, $init, fmt, dom, errscreen, screen, f64, image, color, draw, sync, js, YCbCrJS, BufferImpl, screenImpl, windowImpl, ptrType, ptrType$1, sliceType, ptrType$2, ptrType$3, sliceType$1, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, newBuffer, newScreenImpl, Main, main, newWindow;
|
|
142858
|
+
fmt = $packages["fmt"];
|
|
142859
|
+
dom = $packages["golang.org/x/exp/shiny/driver/internal/dom"];
|
|
142860
|
+
errscreen = $packages["golang.org/x/exp/shiny/driver/internal/errscreen"];
|
|
142861
|
+
screen = $packages["golang.org/x/exp/shiny/screen"];
|
|
142862
|
+
f64 = $packages["golang.org/x/image/math/f64"];
|
|
142863
|
+
image = $packages["image"];
|
|
142864
|
+
color = $packages["image/color"];
|
|
142865
|
+
draw = $packages["image/draw"];
|
|
142866
|
+
sync = $packages["sync"];
|
|
142867
|
+
js = $packages["syscall/js"];
|
|
142868
|
+
YCbCrJS = $pkg.YCbCrJS = $newType(0, $kindStruct, "canvasdriver.YCbCrJS", true, "golang.org/x/exp/shiny/driver/canvasdriver", true, function(CanvasImageSource_) {
|
|
142869
|
+
this.$val = this;
|
|
142870
|
+
if (arguments.length === 0) {
|
|
142871
|
+
this.CanvasImageSource = ptrType$3.nil;
|
|
142872
|
+
return;
|
|
142873
|
+
}
|
|
142874
|
+
this.CanvasImageSource = CanvasImageSource_;
|
|
142875
|
+
});
|
|
142876
|
+
BufferImpl = $pkg.BufferImpl = $newType(0, $kindStruct, "canvasdriver.BufferImpl", true, "golang.org/x/exp/shiny/driver/canvasdriver", true, function(screen_, size_, mutex_, released_, rgba_, ycbcr_, ycbcrJS_) {
|
|
142877
|
+
this.$val = this;
|
|
142878
|
+
if (arguments.length === 0) {
|
|
142879
|
+
this.screen = ptrType.nil;
|
|
142880
|
+
this.size = new image.Point.ptr(0, 0);
|
|
142881
|
+
this.mutex = ptrType$1.nil;
|
|
142882
|
+
this.released = false;
|
|
142883
|
+
this.rgba = new image.RGBA.ptr(sliceType.nil, 0, new image.Rectangle.ptr(new image.Point.ptr(0, 0), new image.Point.ptr(0, 0)));
|
|
142884
|
+
this.ycbcr = new image.YCbCr.ptr(sliceType.nil, sliceType.nil, sliceType.nil, 0, 0, 0, new image.Rectangle.ptr(new image.Point.ptr(0, 0), new image.Point.ptr(0, 0)));
|
|
142885
|
+
this.ycbcrJS = ptrType$2.nil;
|
|
142886
|
+
return;
|
|
142887
|
+
}
|
|
142888
|
+
this.screen = screen_;
|
|
142889
|
+
this.size = size_;
|
|
142890
|
+
this.mutex = mutex_;
|
|
142891
|
+
this.released = released_;
|
|
142892
|
+
this.rgba = rgba_;
|
|
142893
|
+
this.ycbcr = ycbcr_;
|
|
142894
|
+
this.ycbcrJS = ycbcrJS_;
|
|
142895
|
+
});
|
|
142896
|
+
screenImpl = $pkg.screenImpl = $newType(0, $kindStruct, "canvasdriver.screenImpl", true, "golang.org/x/exp/shiny/driver/canvasdriver", false, function(doc_) {
|
|
142897
|
+
this.$val = this;
|
|
142898
|
+
if (arguments.length === 0) {
|
|
142899
|
+
this.doc = new js.Value.ptr(null, false);
|
|
142900
|
+
return;
|
|
142901
|
+
}
|
|
142902
|
+
this.doc = doc_;
|
|
142903
|
+
});
|
|
142904
|
+
windowImpl = $pkg.windowImpl = $newType(0, $kindStruct, "canvasdriver.windowImpl", true, "golang.org/x/exp/shiny/driver/canvasdriver", false, function(screen_, width_, height_, mutex_, canvasEl_, ctx2d_, released_, domEvents_) {
|
|
142905
|
+
this.$val = this;
|
|
142906
|
+
if (arguments.length === 0) {
|
|
142907
|
+
this.screen = ptrType.nil;
|
|
142908
|
+
this.width = 0;
|
|
142909
|
+
this.height = 0;
|
|
142910
|
+
this.mutex = ptrType$1.nil;
|
|
142911
|
+
this.canvasEl = new js.Value.ptr(null, false);
|
|
142912
|
+
this.ctx2d = new js.Value.ptr(null, false);
|
|
142913
|
+
this.released = false;
|
|
142914
|
+
this.domEvents = ptrType$4.nil;
|
|
142915
|
+
return;
|
|
142916
|
+
}
|
|
142917
|
+
this.screen = screen_;
|
|
142918
|
+
this.width = width_;
|
|
142919
|
+
this.height = height_;
|
|
142920
|
+
this.mutex = mutex_;
|
|
142921
|
+
this.canvasEl = canvasEl_;
|
|
142922
|
+
this.ctx2d = ctx2d_;
|
|
142923
|
+
this.released = released_;
|
|
142924
|
+
this.domEvents = domEvents_;
|
|
142925
|
+
});
|
|
142926
|
+
ptrType = $ptrType(screenImpl);
|
|
142927
|
+
ptrType$1 = $ptrType(sync.Mutex);
|
|
142928
|
+
sliceType = $sliceType($Uint8);
|
|
142929
|
+
ptrType$2 = $ptrType(YCbCrJS);
|
|
142930
|
+
ptrType$3 = $ptrType(js.Value);
|
|
142931
|
+
sliceType$1 = $sliceType($emptyInterface);
|
|
142932
|
+
ptrType$4 = $ptrType(dom.DomEvents);
|
|
142933
|
+
ptrType$5 = $ptrType(BufferImpl);
|
|
142934
|
+
ptrType$6 = $ptrType(image.RGBA);
|
|
142935
|
+
ptrType$7 = $ptrType(image.YCbCr);
|
|
142936
|
+
ptrType$8 = $ptrType(screen.NewWindowOptions);
|
|
142937
|
+
ptrType$9 = $ptrType(screen.DrawOptions);
|
|
142938
|
+
ptrType$10 = $ptrType(windowImpl);
|
|
142939
|
+
newBuffer = function(screen$1, size) {
|
|
142940
|
+
var _q, _q$1, _q$2, b, rect, screen$1, size;
|
|
142941
|
+
rect = new image.Rectangle.ptr(new image.Point.ptr(0, 0), $clone(size, image.Point));
|
|
142942
|
+
b = new BufferImpl.ptr(screen$1, $clone(size, image.Point), new sync.Mutex.ptr(0, 0), false, new image.RGBA.ptr($makeSlice(sliceType, ($imul(($imul(4, size.X)), size.Y))), $imul(4, size.X), $clone(rect, image.Rectangle)), new image.YCbCr.ptr($makeSlice(sliceType, ($imul(size.X, size.Y))), $makeSlice(sliceType, (_q$1 = ($imul(size.X, size.Y)) / 4, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))), $makeSlice(sliceType, (_q$2 = ($imul(size.X, size.Y)) / 4, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"))), size.X, (_q = size.X / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), 2, $clone(rect, image.Rectangle)), ptrType$2.nil);
|
|
142943
|
+
return b;
|
|
142944
|
+
};
|
|
142945
|
+
BufferImpl.ptr.prototype.Size = function() {
|
|
142946
|
+
var b;
|
|
142947
|
+
b = this;
|
|
142948
|
+
return b.size;
|
|
142949
|
+
};
|
|
142950
|
+
BufferImpl.prototype.Size = function() { return this.$val.Size(); };
|
|
142951
|
+
BufferImpl.ptr.prototype.Bounds = function() {
|
|
142952
|
+
var b;
|
|
142953
|
+
b = this;
|
|
142954
|
+
return new image.Rectangle.ptr(new image.Point.ptr(0, 0), $clone(b.size, image.Point));
|
|
142955
|
+
};
|
|
142956
|
+
BufferImpl.prototype.Bounds = function() { return this.$val.Bounds(); };
|
|
142957
|
+
BufferImpl.ptr.prototype.RGBA = function() {
|
|
142958
|
+
var b;
|
|
142959
|
+
b = this;
|
|
142960
|
+
return b.rgba;
|
|
142961
|
+
};
|
|
142962
|
+
BufferImpl.prototype.RGBA = function() { return this.$val.RGBA(); };
|
|
142963
|
+
BufferImpl.ptr.prototype.YCbCr = function() {
|
|
142964
|
+
var b;
|
|
142965
|
+
b = this;
|
|
142966
|
+
return b.ycbcr;
|
|
142967
|
+
};
|
|
142968
|
+
BufferImpl.prototype.YCbCr = function() { return this.$val.YCbCr(); };
|
|
142969
|
+
BufferImpl.ptr.prototype.YCbCrJS = function() {
|
|
142970
|
+
var b;
|
|
142971
|
+
b = this;
|
|
142972
|
+
if (b.ycbcrJS === ptrType$2.nil) {
|
|
142973
|
+
b.ycbcrJS = new YCbCrJS.ptr(ptrType$3.nil);
|
|
142974
|
+
}
|
|
142975
|
+
return b.ycbcrJS;
|
|
142976
|
+
};
|
|
142977
|
+
BufferImpl.prototype.YCbCrJS = function() { return this.$val.YCbCrJS(); };
|
|
142978
|
+
BufferImpl.ptr.prototype.Release = function() {
|
|
142979
|
+
var b, $s, $deferred, $r;
|
|
142980
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; b = $f.b; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred);
|
|
142981
|
+
b = this;
|
|
142982
|
+
$r = b.mutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142983
|
+
$deferred.push([$methodVal(b.mutex, "Unlock"), []]);
|
|
142984
|
+
if (b.released) {
|
|
142985
|
+
$s = -1; return;
|
|
142986
|
+
}
|
|
142987
|
+
b.released = true;
|
|
142988
|
+
$s = -1; return;
|
|
142989
|
+
/* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: BufferImpl.ptr.prototype.Release }; } $f.b = b; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } }
|
|
142990
|
+
};
|
|
142991
|
+
BufferImpl.prototype.Release = function() { return this.$val.Release(); };
|
|
142992
|
+
newScreenImpl = function() {
|
|
142993
|
+
var s;
|
|
142994
|
+
s = new screenImpl.ptr($clone($clone(js.Global(), js.Value).Get("document"), js.Value));
|
|
142995
|
+
return [s, $ifaceNil];
|
|
142996
|
+
};
|
|
142997
|
+
screenImpl.ptr.prototype.NewBuffer = function(size) {
|
|
142998
|
+
var buffer, s, size;
|
|
142999
|
+
s = this;
|
|
143000
|
+
buffer = newBuffer(s, $clone(size, image.Point));
|
|
143001
|
+
return [buffer, $ifaceNil];
|
|
143002
|
+
};
|
|
143003
|
+
screenImpl.prototype.NewBuffer = function(size) { return this.$val.NewBuffer(size); };
|
|
143004
|
+
screenImpl.ptr.prototype.NewTexture = function(size) {
|
|
143005
|
+
var _r, s, size, $s, $r;
|
|
143006
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; s = $f.s; size = $f.size; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
143007
|
+
s = this;
|
|
143008
|
+
_r = fmt.Errorf("Texture not implemented", new sliceType$1([])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
143009
|
+
$s = -1; return [$ifaceNil, _r];
|
|
143010
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: screenImpl.ptr.prototype.NewTexture }; } $f._r = _r; $f.s = s; $f.size = size; $f.$s = $s; $f.$r = $r; return $f;
|
|
143011
|
+
};
|
|
143012
|
+
screenImpl.prototype.NewTexture = function(size) { return this.$val.NewTexture(size); };
|
|
143013
|
+
screenImpl.ptr.prototype.NewWindow = function(opts) {
|
|
143014
|
+
var _r, opts, s, window, $s, $r;
|
|
143015
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; opts = $f.opts; s = $f.s; window = $f.window; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
143016
|
+
s = this;
|
|
143017
|
+
_r = newWindow(s, opts); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
143018
|
+
window = _r;
|
|
143019
|
+
$s = -1; return [window, $ifaceNil];
|
|
143020
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: screenImpl.ptr.prototype.NewWindow }; } $f._r = _r; $f.opts = opts; $f.s = s; $f.window = window; $f.$s = $s; $f.$r = $r; return $f;
|
|
143021
|
+
};
|
|
143022
|
+
screenImpl.prototype.NewWindow = function(opts) { return this.$val.NewWindow(opts); };
|
|
143023
|
+
Main = function(f) {
|
|
143024
|
+
var _r, err, f, $s, $r;
|
|
143025
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; err = $f.err; f = $f.f; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
143026
|
+
_r = main(f); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
143027
|
+
err = _r;
|
|
143028
|
+
/* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; }
|
|
143029
|
+
/* */ $s = 3; continue;
|
|
143030
|
+
/* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2:
|
|
143031
|
+
$r = f(errscreen.Stub(err)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143032
|
+
/* } */ case 3:
|
|
143033
|
+
$s = -1; return;
|
|
143034
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: Main }; } $f._r = _r; $f.err = err; $f.f = f; $f.$s = $s; $f.$r = $r; return $f;
|
|
143035
|
+
};
|
|
143036
|
+
$pkg.Main = Main;
|
|
143037
|
+
main = function(f) {
|
|
143038
|
+
var _tuple, err, f, retErr, s, $s, $r;
|
|
143039
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _tuple = $f._tuple; err = $f.err; f = $f.f; retErr = $f.retErr; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
143040
|
+
retErr = $ifaceNil;
|
|
143041
|
+
_tuple = newScreenImpl();
|
|
143042
|
+
s = _tuple[0];
|
|
143043
|
+
err = _tuple[1];
|
|
143044
|
+
if (!($interfaceIsEqual(err, $ifaceNil))) {
|
|
143045
|
+
retErr = err;
|
|
143046
|
+
$s = -1; return retErr;
|
|
143047
|
+
}
|
|
143048
|
+
$r = f(s); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143049
|
+
retErr = $ifaceNil;
|
|
143050
|
+
$s = -1; return retErr;
|
|
143051
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: main }; } $f._tuple = _tuple; $f.err = err; $f.f = f; $f.retErr = retErr; $f.s = s; $f.$s = $s; $f.$r = $r; return $f;
|
|
143052
|
+
};
|
|
143053
|
+
newWindow = function(screen$1, opts) {
|
|
143054
|
+
var _r, _r$1, _r$2, _r$3, _r$4, _r$5, canvasEl, ctx2d, domEvents, height, opts, screen$1, w, width, $s, $r;
|
|
143055
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; canvasEl = $f.canvasEl; ctx2d = $f.ctx2d; domEvents = $f.domEvents; height = $f.height; opts = $f.opts; screen$1 = $f.screen$1; w = $f.w; width = $f.width; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
143056
|
+
_r = $clone(screen$1.doc, js.Value).Call("createElement", new sliceType$1([new $String("canvas")])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
143057
|
+
canvasEl = $clone(_r, js.Value);
|
|
143058
|
+
_r$1 = $clone($clone(screen$1.doc, js.Value).Get("body"), js.Value).Call("appendChild", new sliceType$1([new canvasEl.constructor.elem(canvasEl)])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
143059
|
+
_r$1;
|
|
143060
|
+
width = opts.Width;
|
|
143061
|
+
if (opts.Width === 0) {
|
|
143062
|
+
width = dom.GetDocWidth();
|
|
143063
|
+
}
|
|
143064
|
+
$r = $clone(canvasEl, js.Value).Set("width", new $Int(width)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143065
|
+
height = opts.Height;
|
|
143066
|
+
if (opts.Height === 0) {
|
|
143067
|
+
height = dom.GetDocHeight();
|
|
143068
|
+
}
|
|
143069
|
+
$r = $clone(canvasEl, js.Value).Set("height", new $Int(height)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143070
|
+
/* */ if (!(opts.Title === "")) { $s = 5; continue; }
|
|
143071
|
+
/* */ $s = 6; continue;
|
|
143072
|
+
/* if (!(opts.Title === "")) { */ case 5:
|
|
143073
|
+
_r$2 = $clone($clone(screen$1.doc, js.Value).Get("head"), js.Value).Call("getElementsByTagName", new sliceType$1([new $String("title")])); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
143074
|
+
_r$3 = $clone(_r$2, js.Value).Call("item", new sliceType$1([new $Int(0)])); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
143075
|
+
$r = $clone(_r$3, js.Value).Set("innerHTML", new $String(opts.Title)); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143076
|
+
/* } */ case 6:
|
|
143077
|
+
_r$4 = $clone(canvasEl, js.Value).Call("getContext", new sliceType$1([new $String("2d")])); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
143078
|
+
ctx2d = $clone(_r$4, js.Value);
|
|
143079
|
+
/* */ if ($clone(ctx2d, js.Value).IsUndefined() || $clone(ctx2d, js.Value).IsNull()) { $s = 11; continue; }
|
|
143080
|
+
/* */ $s = 12; continue;
|
|
143081
|
+
/* if ($clone(ctx2d, js.Value).IsUndefined() || $clone(ctx2d, js.Value).IsNull()) { */ case 11:
|
|
143082
|
+
_r$5 = fmt.Errorf("Cannot get 2d context of canvas", new sliceType$1([])); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
|
|
143083
|
+
$panic(_r$5);
|
|
143084
|
+
/* } */ case 12:
|
|
143085
|
+
domEvents = dom.NewDomEvents();
|
|
143086
|
+
w = new windowImpl.ptr(screen$1, width, height, ptrType$1.nil, $clone(canvasEl, js.Value), $clone(ctx2d, js.Value), false, domEvents);
|
|
143087
|
+
$r = domEvents.BindEvents(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143088
|
+
$s = -1; return w;
|
|
143089
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: newWindow }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f.canvasEl = canvasEl; $f.ctx2d = ctx2d; $f.domEvents = domEvents; $f.height = height; $f.opts = opts; $f.screen$1 = screen$1; $f.w = w; $f.width = width; $f.$s = $s; $f.$r = $r; return $f;
|
|
143090
|
+
};
|
|
143091
|
+
windowImpl.ptr.prototype.Release = function() {
|
|
143092
|
+
var _r, w, $s, $deferred, $r;
|
|
143093
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; w = $f.w; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred);
|
|
143094
|
+
w = this;
|
|
143095
|
+
$r = w.mutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143096
|
+
$deferred.push([$methodVal(w.mutex, "Unlock"), []]);
|
|
143097
|
+
if (w.released) {
|
|
143098
|
+
$s = -1; return;
|
|
143099
|
+
}
|
|
143100
|
+
_r = $clone(w.canvasEl, js.Value).Call("remove", new sliceType$1([])); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
143101
|
+
_r;
|
|
143102
|
+
$r = w.domEvents.Release(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142362
143103
|
w.released = true;
|
|
142363
143104
|
$s = -1; return;
|
|
142364
|
-
/* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.Release }; } $f.
|
|
143105
|
+
/* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.Release }; } $f._r = _r; $f.w = w; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } }
|
|
142365
143106
|
};
|
|
142366
143107
|
windowImpl.prototype.Release = function() { return this.$val.Release(); };
|
|
142367
143108
|
windowImpl.ptr.prototype.Publish = function() {
|
|
@@ -142395,78 +143136,45 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
142395
143136
|
var _r, ev, w, $s, $r;
|
|
142396
143137
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; ev = $f.ev; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142397
143138
|
w = this;
|
|
142398
|
-
_r = $recv(w.
|
|
143139
|
+
_r = $recv(w.domEvents.GetEventChan()); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
142399
143140
|
ev = _r[0];
|
|
142400
143141
|
$s = -1; return ev;
|
|
142401
143142
|
/* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.NextEvent }; } $f._r = _r; $f.ev = ev; $f.w = w; $f.$s = $s; $f.$r = $r; return $f;
|
|
142402
143143
|
};
|
|
142403
143144
|
windowImpl.prototype.NextEvent = function() { return this.$val.NextEvent(); };
|
|
142404
143145
|
windowImpl.ptr.prototype.Upload = function(dp, src, sr) {
|
|
142405
|
-
var dp, sr, src, w, $s, $r;
|
|
142406
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; dp = $f.dp; sr = $f.sr; src = $f.src; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
143146
|
+
var _r, dp, sr, src, w, $s, $r;
|
|
143147
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; dp = $f.dp; sr = $f.sr; src = $f.src; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142407
143148
|
w = this;
|
|
142408
143149
|
if (w.released) {
|
|
142409
143150
|
$s = -1; return;
|
|
142410
143151
|
}
|
|
142411
|
-
|
|
143152
|
+
_r = fmt.Errorf("Not implemented, use UploadYCbCr instead", new sliceType$1([])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
143153
|
+
$panic(_r);
|
|
142412
143154
|
$s = -1; return;
|
|
142413
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.Upload }; } $f.dp = dp; $f.sr = sr; $f.src = src; $f.w = w; $f.$s = $s; $f.$r = $r; return $f;
|
|
143155
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.Upload }; } $f._r = _r; $f.dp = dp; $f.sr = sr; $f.src = src; $f.w = w; $f.$s = $s; $f.$r = $r; return $f;
|
|
142414
143156
|
};
|
|
142415
143157
|
windowImpl.prototype.Upload = function(dp, src, sr) { return this.$val.Upload(dp, src, sr); };
|
|
142416
143158
|
windowImpl.ptr.prototype.UploadYCbCr = function(dp, src, sr) {
|
|
142417
|
-
var
|
|
142418
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true;
|
|
143159
|
+
var _r, _r$1, _ref, dp, jsSrc, sr, src, w, x, $s, $r;
|
|
143160
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _ref = $f._ref; dp = $f.dp; jsSrc = $f.jsSrc; sr = $f.sr; src = $f.src; w = $f.w; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142419
143161
|
w = this;
|
|
142420
143162
|
if (w.released) {
|
|
142421
143163
|
$s = -1; return;
|
|
142422
143164
|
}
|
|
142423
143165
|
_ref = src;
|
|
142424
|
-
/* */ if ($assertType(_ref, ptrType$
|
|
143166
|
+
/* */ if ($assertType(_ref, ptrType$5, true)[1]) { $s = 1; continue; }
|
|
142425
143167
|
/* */ $s = 2; continue;
|
|
142426
|
-
/* if ($assertType(_ref, ptrType$
|
|
143168
|
+
/* if ($assertType(_ref, ptrType$5, true)[1]) { */ case 1:
|
|
142427
143169
|
jsSrc = _ref.$val;
|
|
142428
|
-
_r = jsSrc.YCbCrJS(); /* */ $s =
|
|
142429
|
-
|
|
142430
|
-
|
|
142431
|
-
/* if (_r.Use) { */ case 3:
|
|
142432
|
-
_r$1 = jsSrc.YCbCrJS(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
142433
|
-
/* */ if (!((_r$1.SubsampleRatio === 2))) { $s = 6; continue; }
|
|
142434
|
-
/* */ $s = 7; continue;
|
|
142435
|
-
/* if (!((_r$1.SubsampleRatio === 2))) { */ case 6:
|
|
142436
|
-
$panic(new $String("Only image.YCbCrSubsampleRatio420 SubsampleRatio is currently supported"));
|
|
142437
|
-
/* } */ case 7:
|
|
142438
|
-
_arg = $clone(dp, image.Point);
|
|
142439
|
-
_r$2 = jsSrc.YCbCrJS(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
142440
|
-
_r$3 = _r$2.Y.slice(); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
142441
|
-
_arg$1 = $clone(_r$3, js.Value);
|
|
142442
|
-
_r$4 = jsSrc.YCbCrJS(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
142443
|
-
_r$5 = _r$4.Cb.slice(); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
|
|
142444
|
-
_arg$2 = $clone(_r$5, js.Value);
|
|
142445
|
-
_r$6 = jsSrc.YCbCrJS(); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
|
|
142446
|
-
_r$7 = _r$6.Cr.slice(); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
|
|
142447
|
-
_arg$3 = $clone(_r$7, js.Value);
|
|
142448
|
-
_arg$4 = $clone(sr, image.Rectangle);
|
|
142449
|
-
$r = w.drawBufferYUV420JSArrayBuffers(_arg, _arg$1, _arg$2, _arg$3, _arg$4); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142450
|
-
$s = -1; return;
|
|
142451
|
-
/* } */ case 4:
|
|
143170
|
+
_r = $clone(w.ctx2d, js.Value).Call("drawImage", new sliceType$1([(x = jsSrc.YCbCrJS().CanvasImageSource, new x.constructor.elem(x)), new $Int(0), new $Int(0)])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
143171
|
+
_r;
|
|
143172
|
+
$s = -1; return;
|
|
142452
143173
|
/* } */ case 2:
|
|
142453
|
-
_r$
|
|
142454
|
-
|
|
142455
|
-
/* */ $s = 17; continue;
|
|
142456
|
-
/* if (_r$8.SubsampleRatio === 2) { */ case 16:
|
|
142457
|
-
$r = w.drawBufferYUV420($clone(dp, image.Point), src, $clone(sr, image.Rectangle)); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142458
|
-
$s = 18; continue;
|
|
142459
|
-
/* } else { */ case 17:
|
|
142460
|
-
_r$9 = src.RGBA(); /* */ $s = 23; case 23: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; }
|
|
142461
|
-
/* */ if (_r$9.Pix.$length === 0) { $s = 21; continue; }
|
|
142462
|
-
/* */ $s = 22; continue;
|
|
142463
|
-
/* if (_r$9.Pix.$length === 0) { */ case 21:
|
|
142464
|
-
$r = imageutil.ConvertYCbCrToRGBA(src); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142465
|
-
/* } */ case 22:
|
|
142466
|
-
$r = w.drawBufferRGBA($clone(dp, image.Point), src, $clone(sr, image.Rectangle)); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142467
|
-
/* } */ case 18:
|
|
143174
|
+
_r$1 = fmt.Errorf("Not implemented, use canvasdriver.BufferImpl instead", new sliceType$1([])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
143175
|
+
$panic(_r$1);
|
|
142468
143176
|
$s = -1; return;
|
|
142469
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.UploadYCbCr }; } $f.
|
|
143177
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.UploadYCbCr }; } $f._r = _r; $f._r$1 = _r$1; $f._ref = _ref; $f.dp = dp; $f.jsSrc = jsSrc; $f.sr = sr; $f.src = src; $f.w = w; $f.x = x; $f.$s = $s; $f.$r = $r; return $f;
|
|
142470
143178
|
};
|
|
142471
143179
|
windowImpl.prototype.UploadYCbCr = function(dp, src, sr) { return this.$val.UploadYCbCr(dp, src, sr); };
|
|
142472
143180
|
windowImpl.ptr.prototype.Fill = function(dr, src, op) {
|
|
@@ -142514,160 +143222,360 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
142514
143222
|
$panic(new $String("Not implemented"));
|
|
142515
143223
|
};
|
|
142516
143224
|
windowImpl.prototype.Scale = function(dr, src, sr, op, opts) { return this.$val.Scale(dr, src, sr, op, opts); };
|
|
142517
|
-
ptrType$
|
|
142518
|
-
ptrType
|
|
142519
|
-
ptrType.methods = [{prop: "
|
|
142520
|
-
|
|
142521
|
-
|
|
142522
|
-
|
|
142523
|
-
|
|
142524
|
-
screenImpl.init("golang.org/x/exp/shiny/driver/webgldriver", [{prop: "doc", name: "doc", embedded: false, exported: false, typ: js.Value, tag: ""}]);
|
|
142525
|
-
windowImpl.init("golang.org/x/exp/shiny/driver/webgldriver", [{prop: "screen", name: "screen", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "width", name: "width", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "height", name: "height", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "canvasEl", name: "canvasEl", embedded: false, exported: false, typ: js.Value, tag: ""}, {prop: "gl", name: "gl", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "programRGBA", name: "programRGBA", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "imageTexRGBA", name: "imageTexRGBA", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "programYUV420", name: "programYUV420", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "imageTexY", name: "imageTexY", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "imageTexU", name: "imageTexU", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "imageTexV", name: "imageTexV", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "vertexArray", name: "vertexArray", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "released", name: "released", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "releases", name: "releases", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "eventChan", name: "eventChan", embedded: false, exported: false, typ: chanType, tag: ""}]);
|
|
143225
|
+
ptrType$5.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [image.Point], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [image.Rectangle], false)}, {prop: "RGBA", name: "RGBA", pkg: "", typ: $funcType([], [ptrType$6], false)}, {prop: "YCbCr", name: "YCbCr", pkg: "", typ: $funcType([], [ptrType$7], false)}, {prop: "YCbCrJS", name: "YCbCrJS", pkg: "", typ: $funcType([], [ptrType$2], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}];
|
|
143226
|
+
ptrType.methods = [{prop: "NewBuffer", name: "NewBuffer", pkg: "", typ: $funcType([image.Point], [screen.Buffer, $error], false)}, {prop: "NewTexture", name: "NewTexture", pkg: "", typ: $funcType([image.Point], [screen.Texture, $error], false)}, {prop: "NewWindow", name: "NewWindow", pkg: "", typ: $funcType([ptrType$8], [screen.Window, $error], false)}];
|
|
143227
|
+
ptrType$10.methods = [{prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}, {prop: "Publish", name: "Publish", pkg: "", typ: $funcType([], [screen.PublishResult], false)}, {prop: "Send", name: "Send", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "SendFirst", name: "SendFirst", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "NextEvent", name: "NextEvent", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Upload", name: "Upload", pkg: "", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "UploadYCbCr", name: "UploadYCbCr", pkg: "", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "Fill", name: "Fill", pkg: "", typ: $funcType([image.Rectangle, color.Color, draw.Op], [], false)}, {prop: "Draw", name: "Draw", pkg: "", typ: $funcType([f64.Aff3, screen.Texture, image.Rectangle, draw.Op, ptrType$9], [], false)}, {prop: "DrawUniform", name: "DrawUniform", pkg: "", typ: $funcType([f64.Aff3, color.Color, image.Rectangle, draw.Op, ptrType$9], [], false)}, {prop: "Copy", name: "Copy", pkg: "", typ: $funcType([image.Point, screen.Texture, image.Rectangle, draw.Op, ptrType$9], [], false)}, {prop: "Scale", name: "Scale", pkg: "", typ: $funcType([image.Rectangle, screen.Texture, image.Rectangle, draw.Op, ptrType$9], [], false)}];
|
|
143228
|
+
YCbCrJS.init("", [{prop: "CanvasImageSource", name: "CanvasImageSource", embedded: false, exported: true, typ: ptrType$3, tag: ""}]);
|
|
143229
|
+
BufferImpl.init("golang.org/x/exp/shiny/driver/canvasdriver", [{prop: "screen", name: "screen", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: image.Point, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "released", name: "released", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "rgba", name: "rgba", embedded: false, exported: false, typ: image.RGBA, tag: ""}, {prop: "ycbcr", name: "ycbcr", embedded: false, exported: false, typ: image.YCbCr, tag: ""}, {prop: "ycbcrJS", name: "ycbcrJS", embedded: false, exported: false, typ: ptrType$2, tag: ""}]);
|
|
143230
|
+
screenImpl.init("golang.org/x/exp/shiny/driver/canvasdriver", [{prop: "doc", name: "doc", embedded: false, exported: false, typ: js.Value, tag: ""}]);
|
|
143231
|
+
windowImpl.init("golang.org/x/exp/shiny/driver/canvasdriver", [{prop: "screen", name: "screen", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "width", name: "width", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "height", name: "height", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "canvasEl", name: "canvasEl", embedded: false, exported: false, typ: js.Value, tag: ""}, {prop: "ctx2d", name: "ctx2d", embedded: false, exported: false, typ: js.Value, tag: ""}, {prop: "released", name: "released", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "domEvents", name: "domEvents", embedded: false, exported: false, typ: ptrType$4, tag: ""}]);
|
|
142526
143232
|
$init = function() {
|
|
142527
143233
|
$pkg.$init = function() {};
|
|
142528
143234
|
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142529
143235
|
$r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142530
|
-
$r =
|
|
142531
|
-
$r =
|
|
142532
|
-
$r =
|
|
142533
|
-
$r =
|
|
142534
|
-
$r =
|
|
142535
|
-
$r =
|
|
142536
|
-
$r =
|
|
142537
|
-
$r =
|
|
142538
|
-
$r =
|
|
142539
|
-
$r = size.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142540
|
-
$r = geom.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142541
|
-
$r = image.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142542
|
-
$r = color.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142543
|
-
$r = draw.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142544
|
-
$r = strings.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142545
|
-
$r = sync.$init(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142546
|
-
$r = js.$init(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142547
|
-
keyCodesMap = $makeMap($String.keyFor, [{ k: "KeyA", v: 4 }, { k: "KeyB", v: 5 }, { k: "KeyC", v: 6 }, { k: "KeyD", v: 7 }, { k: "KeyE", v: 8 }, { k: "KeyF", v: 9 }, { k: "KeyG", v: 10 }, { k: "KeyH", v: 11 }, { k: "KeyI", v: 12 }, { k: "KeyJ", v: 13 }, { k: "KeyK", v: 14 }, { k: "KeyL", v: 15 }, { k: "KeyM", v: 16 }, { k: "KeyN", v: 17 }, { k: "KeyO", v: 18 }, { k: "KeyP", v: 19 }, { k: "KeyQ", v: 20 }, { k: "KeyR", v: 21 }, { k: "KeyS", v: 22 }, { k: "KeyT", v: 23 }, { k: "KeyU", v: 24 }, { k: "KeyV", v: 25 }, { k: "KeyW", v: 26 }, { k: "KeyX", v: 27 }, { k: "KeyY", v: 28 }, { k: "KeyZ", v: 29 }, { k: "Digit1", v: 30 }, { k: "Digit2", v: 31 }, { k: "Digit3", v: 32 }, { k: "Digit4", v: 33 }, { k: "Digit5", v: 34 }, { k: "Digit6", v: 35 }, { k: "Digit7", v: 36 }, { k: "Digit8", v: 37 }, { k: "Digit9", v: 38 }, { k: "Digit0", v: 39 }, { k: "Enter", v: 40 }, { k: "Escape", v: 41 }, { k: "Backspace", v: 42 }, { k: "Tab", v: 43 }, { k: "Space", v: 44 }, { k: "Minus", v: 45 }, { k: "Equal", v: 46 }, { k: "BracketLeft", v: 47 }, { k: "BracketRight", v: 48 }, { k: "Backslash", v: 49 }, { k: "Semicolon", v: 51 }, { k: "Quote", v: 52 }, { k: "Backquote", v: 53 }, { k: "Comma", v: 54 }, { k: "Period", v: 55 }, { k: "Slash", v: 56 }, { k: "CapsLock", v: 57 }, { k: "F1", v: 58 }, { k: "F2", v: 59 }, { k: "F3", v: 60 }, { k: "F4", v: 61 }, { k: "F5", v: 62 }, { k: "F6", v: 63 }, { k: "F7", v: 64 }, { k: "F8", v: 65 }, { k: "F9", v: 66 }, { k: "F10", v: 67 }, { k: "F11", v: 68 }, { k: "F12", v: 69 }, { k: "Pause", v: 72 }, { k: "Insert", v: 73 }, { k: "Home", v: 74 }, { k: "PageUp", v: 75 }, { k: "Delete", v: 76 }, { k: "End", v: 77 }, { k: "PageDown", v: 78 }, { k: "ArrowRight", v: 79 }, { k: "ArrowLeft", v: 80 }, { k: "ArrowDown", v: 81 }, { k: "ArrowUp", v: 82 }, { k: "NumLock", v: 83 }, { k: "NumpadDivide", v: 84 }, { k: "NumpadMultiply", v: 85 }, { k: "NumpadSubtract", v: 86 }, { k: "NumpadAdd", v: 87 }, { k: "NumpadEnter", v: 88 }, { k: "Numpad1", v: 89 }, { k: "Numpad2", v: 90 }, { k: "Numpad3", v: 91 }, { k: "Numpad4", v: 92 }, { k: "Numpad5", v: 93 }, { k: "Numpad6", v: 94 }, { k: "Numpad7", v: 95 }, { k: "Numpad8", v: 96 }, { k: "Numpad9", v: 97 }, { k: "Numpad0", v: 98 }, { k: "NumpadDecimal", v: 99 }, { k: "NumpadEqual", v: 103 }, { k: "F13", v: 104 }, { k: "F14", v: 105 }, { k: "F15", v: 106 }, { k: "F16", v: 107 }, { k: "F17", v: 108 }, { k: "F18", v: 109 }, { k: "F19", v: 110 }, { k: "F20", v: 111 }, { k: "F21", v: 112 }, { k: "F22", v: 113 }, { k: "F23", v: 114 }, { k: "F24", v: 115 }, { k: "Help", v: 117 }, { k: "ContextMenu", v: 118 }, { k: "VolumeMute", v: 127 }, { k: "VolumeUp", v: 128 }, { k: "VolumeDown", v: 129 }, { k: "ControlLeft", v: 224 }, { k: "ShiftLeft", v: 225 }, { k: "AltLeft", v: 226 }, { k: "MetaLeft", v: 227 }, { k: "ControlRight", v: 228 }, { k: "ShiftRight", v: 229 }, { k: "AltRight", v: 230 }, { k: "MetaRight", v: 231 }, { k: "PrintScreen", v: 0 }]);
|
|
142548
|
-
keyCodesByKeyMap = $makeMap($String.keyFor, [{ k: "AudioVolumeMute", v: 127 }, { k: "AudioVolumeUp", v: 128 }, { k: "AudioVolumeDown", v: 129 }]);
|
|
142549
|
-
elementsIndices = new sliceType([0, 1, 3, 1, 2, 3]);
|
|
142550
|
-
texCoordsVertices = new sliceType$1([1, 1, 1, 0, 1, -1, 1, 1, -1, -1, 0, 1, -1, 1, 0, 0]);
|
|
143236
|
+
$r = dom.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143237
|
+
$r = errscreen.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143238
|
+
$r = screen.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143239
|
+
$r = f64.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143240
|
+
$r = image.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143241
|
+
$r = color.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143242
|
+
$r = draw.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143243
|
+
$r = sync.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143244
|
+
$r = js.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142551
143245
|
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
142552
143246
|
};
|
|
142553
143247
|
$pkg.$init = $init;
|
|
142554
143248
|
return $pkg;
|
|
142555
143249
|
})();
|
|
142556
|
-
$packages["github.com/supraio/client-daemon/pkg/x264"] = (function() {
|
|
142557
|
-
var $pkg = {}, $init, errs,
|
|
143250
|
+
$packages["github.com/supraio/client-daemon/pkg/x264/webcodecs"] = (function() {
|
|
143251
|
+
var $pkg = {}, $init, hex, webgl, errs, jshelper, general, canvasdriver, js, Decoder, sliceType, ptrType, sliceType$1, ptrType$1, sliceType$2, ptrType$2, funcType, NewDecoder;
|
|
143252
|
+
hex = $packages["encoding/hex"];
|
|
143253
|
+
webgl = $packages["github.com/nuberu/webgl"];
|
|
142558
143254
|
errs = $packages["github.com/supraio/client-daemon/pkg/errs"];
|
|
142559
|
-
|
|
142560
|
-
|
|
143255
|
+
jshelper = $packages["github.com/supraio/client-daemon/pkg/jshelper"];
|
|
143256
|
+
general = $packages["github.com/supraio/client-daemon/pkg/x264/general"];
|
|
143257
|
+
canvasdriver = $packages["golang.org/x/exp/shiny/driver/canvasdriver"];
|
|
142561
143258
|
js = $packages["syscall/js"];
|
|
142562
|
-
|
|
143259
|
+
Decoder = $pkg.Decoder = $newType(0, $kindStruct, "webcodecs.Decoder", true, "github.com/supraio/client-daemon/pkg/x264/webcodecs", true, function(jsVideoDecoder_, resolves_, rejects_, releaseVideoDecoder_) {
|
|
142563
143260
|
this.$val = this;
|
|
142564
143261
|
if (arguments.length === 0) {
|
|
142565
|
-
this.
|
|
142566
|
-
this.
|
|
143262
|
+
this.jsVideoDecoder = ptrType.nil;
|
|
143263
|
+
this.resolves = sliceType.nil;
|
|
143264
|
+
this.rejects = sliceType.nil;
|
|
143265
|
+
this.releaseVideoDecoder = $throwNilPointerError;
|
|
142567
143266
|
return;
|
|
142568
143267
|
}
|
|
142569
|
-
this.
|
|
142570
|
-
this.
|
|
143268
|
+
this.jsVideoDecoder = jsVideoDecoder_;
|
|
143269
|
+
this.resolves = resolves_;
|
|
143270
|
+
this.rejects = rejects_;
|
|
143271
|
+
this.releaseVideoDecoder = releaseVideoDecoder_;
|
|
142571
143272
|
});
|
|
142572
|
-
|
|
142573
|
-
|
|
142574
|
-
|
|
142575
|
-
|
|
142576
|
-
|
|
142577
|
-
ptrType$2 = $ptrType(
|
|
142578
|
-
|
|
142579
|
-
|
|
142580
|
-
|
|
142581
|
-
|
|
142582
|
-
|
|
142583
|
-
|
|
142584
|
-
nalBuffer = $clone(_r, js.Value);
|
|
142585
|
-
$s = -1; return [new H264Decoder.ptr($clone(decoder, js.Value), $clone(nalBuffer, js.Value)), $ifaceNil];
|
|
142586
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: NewH264Decoder }; } $f._r = _r; $f.decoder = decoder; $f.header = header; $f.nalBuffer = nalBuffer; $f.nalBufferOffset = nalBufferOffset; $f.$s = $s; $f.$r = $r; return $f;
|
|
143273
|
+
sliceType = $sliceType(js.Value);
|
|
143274
|
+
ptrType = $ptrType(js.Value);
|
|
143275
|
+
sliceType$1 = $sliceType($emptyInterface);
|
|
143276
|
+
ptrType$1 = $ptrType(canvasdriver.BufferImpl);
|
|
143277
|
+
sliceType$2 = $sliceType($Uint8);
|
|
143278
|
+
ptrType$2 = $ptrType(Decoder);
|
|
143279
|
+
funcType = $funcType([], [], false);
|
|
143280
|
+
NewDecoder = function(header) {
|
|
143281
|
+
var header, rejects, resolves;
|
|
143282
|
+
resolves = new sliceType([]);
|
|
143283
|
+
rejects = new sliceType([]);
|
|
143284
|
+
return new Decoder.ptr(ptrType.nil, resolves, rejects, $throwNilPointerError);
|
|
142587
143285
|
};
|
|
142588
|
-
$pkg.
|
|
142589
|
-
|
|
142590
|
-
var
|
|
142591
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true;
|
|
142592
|
-
|
|
142593
|
-
|
|
142594
|
-
|
|
142595
|
-
|
|
142596
|
-
|
|
142597
|
-
_r = $clone($clone(
|
|
142598
|
-
|
|
142599
|
-
|
|
142600
|
-
|
|
142601
|
-
|
|
142602
|
-
|
|
142603
|
-
|
|
142604
|
-
|
|
142605
|
-
|
|
142606
|
-
|
|
142607
|
-
|
|
142608
|
-
|
|
142609
|
-
|
|
142610
|
-
|
|
142611
|
-
|
|
142612
|
-
|
|
142613
|
-
|
|
142614
|
-
|
|
142615
|
-
|
|
142616
|
-
|
|
142617
|
-
|
|
142618
|
-
|
|
142619
|
-
|
|
142620
|
-
|
|
142621
|
-
|
|
142622
|
-
|
|
142623
|
-
|
|
142624
|
-
|
|
142625
|
-
|
|
142626
|
-
|
|
142627
|
-
|
|
143286
|
+
$pkg.NewDecoder = NewDecoder;
|
|
143287
|
+
Decoder.ptr.prototype.configure = function(nal) {
|
|
143288
|
+
var _r, _r$1, _r$2, _r$3, config, d, errorCallback, h264CodecName, init, jsVideoDecoder, nal, outputCallback, $s, $r;
|
|
143289
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; config = $f.config; d = $f.d; errorCallback = $f.errorCallback; h264CodecName = $f.h264CodecName; init = $f.init; jsVideoDecoder = $f.jsVideoDecoder; nal = $f.nal; outputCallback = $f.outputCallback; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
143290
|
+
d = [d];
|
|
143291
|
+
errorCallback = [errorCallback];
|
|
143292
|
+
jsVideoDecoder = [jsVideoDecoder];
|
|
143293
|
+
outputCallback = [outputCallback];
|
|
143294
|
+
d[0] = this;
|
|
143295
|
+
_r = $clone($clone(js.Global(), js.Value).Get("Object"), js.Value).New(new sliceType$1([])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
143296
|
+
init = $clone(_r, js.Value);
|
|
143297
|
+
outputCallback[0] = $clone(js.FuncOf((function(d, errorCallback, jsVideoDecoder, outputCallback) { return function $b(this$1, args) {
|
|
143298
|
+
var _i, _r$1, _ref, args, resolve, this$1, x, $s, $r;
|
|
143299
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$1 = $f._r$1; _ref = $f._ref; args = $f.args; resolve = $f.resolve; this$1 = $f.this$1; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
143300
|
+
_ref = d[0].resolves;
|
|
143301
|
+
_i = 0;
|
|
143302
|
+
/* while (true) { */ case 1:
|
|
143303
|
+
/* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; }
|
|
143304
|
+
resolve = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), js.Value);
|
|
143305
|
+
_r$1 = $clone(resolve, js.Value).Call("call", new sliceType$1([$ifaceNil, (x = (0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), new x.constructor.elem(x))])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
143306
|
+
_r$1;
|
|
143307
|
+
_i++;
|
|
143308
|
+
/* } */ $s = 1; continue; case 2:
|
|
143309
|
+
d[0].resolves = new sliceType([]);
|
|
143310
|
+
d[0].rejects = new sliceType([]);
|
|
143311
|
+
$s = -1; return $ifaceNil;
|
|
143312
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._i = _i; $f._r$1 = _r$1; $f._ref = _ref; $f.args = args; $f.resolve = resolve; $f.this$1 = this$1; $f.x = x; $f.$s = $s; $f.$r = $r; return $f;
|
|
143313
|
+
}; })(d, errorCallback, jsVideoDecoder, outputCallback)), js.Func);
|
|
143314
|
+
errorCallback[0] = $clone(js.FuncOf((function(d, errorCallback, jsVideoDecoder, outputCallback) { return function $b(this$1, args) {
|
|
143315
|
+
var _i, _r$1, _ref, args, reject, this$1, x, $s, $r;
|
|
143316
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$1 = $f._r$1; _ref = $f._ref; args = $f.args; reject = $f.reject; this$1 = $f.this$1; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
143317
|
+
_ref = d[0].rejects;
|
|
143318
|
+
_i = 0;
|
|
143319
|
+
/* while (true) { */ case 1:
|
|
143320
|
+
/* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; }
|
|
143321
|
+
reject = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), js.Value);
|
|
143322
|
+
_r$1 = $clone(reject, js.Value).Call("call", new sliceType$1([$ifaceNil, (x = (0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), new x.constructor.elem(x))])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
143323
|
+
_r$1;
|
|
143324
|
+
_i++;
|
|
143325
|
+
/* } */ $s = 1; continue; case 2:
|
|
143326
|
+
d[0].resolves = new sliceType([]);
|
|
143327
|
+
d[0].rejects = new sliceType([]);
|
|
143328
|
+
$s = -1; return $ifaceNil;
|
|
143329
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._i = _i; $f._r$1 = _r$1; $f._ref = _ref; $f.args = args; $f.reject = reject; $f.this$1 = this$1; $f.x = x; $f.$s = $s; $f.$r = $r; return $f;
|
|
143330
|
+
}; })(d, errorCallback, jsVideoDecoder, outputCallback)), js.Func);
|
|
143331
|
+
$r = $clone(init, js.Value).Set("output", new outputCallback[0].constructor.elem(outputCallback[0])); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143332
|
+
$r = $clone(init, js.Value).Set("error", new errorCallback[0].constructor.elem(errorCallback[0])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143333
|
+
_r$1 = $clone($clone(js.Global(), js.Value).Get("VideoDecoder"), js.Value).New(new sliceType$1([new init.constructor.elem(init)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
143334
|
+
jsVideoDecoder[0] = $clone(_r$1, js.Value);
|
|
143335
|
+
h264CodecName = d[0].detectCodecName(nal);
|
|
143336
|
+
_r$2 = $clone($clone(js.Global(), js.Value).Get("Object"), js.Value).New(new sliceType$1([])); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
143337
|
+
config = $clone(_r$2, js.Value);
|
|
143338
|
+
$r = $clone(config, js.Value).Set("codec", new $String(h264CodecName)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143339
|
+
$r = $clone(config, js.Value).Set("optimizeForLatency", new $Bool(true)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143340
|
+
_r$3 = $clone(jsVideoDecoder[0], js.Value).Call("configure", new sliceType$1([new config.constructor.elem(config)])); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
143341
|
+
_r$3;
|
|
143342
|
+
d[0].jsVideoDecoder = jsVideoDecoder[0];
|
|
143343
|
+
d[0].releaseVideoDecoder = (function(d, errorCallback, jsVideoDecoder, outputCallback) { return function() {
|
|
143344
|
+
d[0].jsVideoDecoder = ptrType.nil;
|
|
143345
|
+
d[0].releaseVideoDecoder = $throwNilPointerError;
|
|
143346
|
+
$clone(outputCallback[0], js.Func).Release();
|
|
143347
|
+
$clone(errorCallback[0], js.Func).Release();
|
|
143348
|
+
}; })(d, errorCallback, jsVideoDecoder, outputCallback);
|
|
143349
|
+
$s = -1; return;
|
|
143350
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: Decoder.ptr.prototype.configure }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.config = config; $f.d = d; $f.errorCallback = errorCallback; $f.h264CodecName = h264CodecName; $f.init = init; $f.jsVideoDecoder = jsVideoDecoder; $f.nal = nal; $f.outputCallback = outputCallback; $f.$s = $s; $f.$r = $r; return $f;
|
|
143351
|
+
};
|
|
143352
|
+
Decoder.prototype.configure = function(nal) { return this.$val.configure(nal); };
|
|
143353
|
+
Decoder.ptr.prototype.detectCodecName = function(nal) {
|
|
143354
|
+
var codecName, d, nal;
|
|
143355
|
+
d = this;
|
|
143356
|
+
codecName = "avc1." + hex.EncodeToString($subslice(nal, 5, 8));
|
|
143357
|
+
return codecName;
|
|
143358
|
+
};
|
|
143359
|
+
Decoder.prototype.detectCodecName = function(nal) { return this.$val.detectCodecName(nal); };
|
|
143360
|
+
Decoder.ptr.prototype.Decode = function(nal, outputBuffer) {
|
|
143361
|
+
var _arg, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, chunk, chunkOpts, d, err, errDec, errMessage, frame, frameData, framePromise, framePromiseCb, frameType, nal, outputBuffer, racePromise, timeoutPromise, timeoutPromiseCb, x, ycbcrJSImg, $s, $r;
|
|
143362
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; chunk = $f.chunk; chunkOpts = $f.chunkOpts; d = $f.d; err = $f.err; errDec = $f.errDec; errMessage = $f.errMessage; frame = $f.frame; frameData = $f.frameData; framePromise = $f.framePromise; framePromiseCb = $f.framePromiseCb; frameType = $f.frameType; nal = $f.nal; outputBuffer = $f.outputBuffer; racePromise = $f.racePromise; timeoutPromise = $f.timeoutPromise; timeoutPromiseCb = $f.timeoutPromiseCb; x = $f.x; ycbcrJSImg = $f.ycbcrJSImg; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
143363
|
+
d = [d];
|
|
143364
|
+
d[0] = this;
|
|
143365
|
+
frameType = "delta";
|
|
143366
|
+
/* */ if ((((4 >= nal.$length ? ($throwRuntimeError("index out of range"), undefined) : nal.$array[nal.$offset + 4]) >> 0)) === 103) { $s = 1; continue; }
|
|
143367
|
+
/* */ $s = 2; continue;
|
|
143368
|
+
/* if ((((4 >= nal.$length ? ($throwRuntimeError("index out of range"), undefined) : nal.$array[nal.$offset + 4]) >> 0)) === 103) { */ case 1:
|
|
143369
|
+
frameType = "key";
|
|
143370
|
+
/* */ if (d[0].jsVideoDecoder === ptrType.nil) { $s = 3; continue; }
|
|
143371
|
+
/* */ $s = 4; continue;
|
|
143372
|
+
/* if (d[0].jsVideoDecoder === ptrType.nil) { */ case 3:
|
|
143373
|
+
$r = d[0].configure(nal); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143374
|
+
/* } */ case 4:
|
|
143375
|
+
/* } */ case 2:
|
|
143376
|
+
/* */ if (d[0].jsVideoDecoder === ptrType.nil) { $s = 6; continue; }
|
|
143377
|
+
/* */ $s = 7; continue;
|
|
143378
|
+
/* if (d[0].jsVideoDecoder === ptrType.nil) { */ case 6:
|
|
143379
|
+
_r = errs.Errorf("Key frame with SPS & IDR is required at the beginning", new sliceType$1([])); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
143380
|
+
$s = -1; return _r;
|
|
143381
|
+
/* } */ case 7:
|
|
143382
|
+
_r$1 = $clone($clone(js.Global(), js.Value).Get("Object"), js.Value).New(new sliceType$1([])); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
143383
|
+
chunkOpts = $clone(_r$1, js.Value);
|
|
143384
|
+
_r$2 = webgl.TypedArrayOf(nal); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
143385
|
+
frameData = $clone(_r$2, js.Value);
|
|
143386
|
+
$r = $clone(chunkOpts, js.Value).Set("type", new $String(frameType)); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143387
|
+
$r = $clone(chunkOpts, js.Value).Set("data", new frameData.constructor.elem(frameData)); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143388
|
+
$r = $clone(chunkOpts, js.Value).Set("timestamp", new $Int(0)); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143389
|
+
_r$3 = $clone($clone(js.Global(), js.Value).Get("EncodedVideoChunk"), js.Value).New(new sliceType$1([new chunkOpts.constructor.elem(chunkOpts)])); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
143390
|
+
chunk = $clone(_r$3, js.Value);
|
|
143391
|
+
_r$4 = d[0].jsSafeDecode($clone(chunk, js.Value)); /* */ $s = 15; case 15: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
143392
|
+
errDec = _r$4;
|
|
143393
|
+
/* */ if (!($interfaceIsEqual(errDec, $ifaceNil))) { $s = 16; continue; }
|
|
143394
|
+
/* */ $s = 17; continue;
|
|
143395
|
+
/* if (!($interfaceIsEqual(errDec, $ifaceNil))) { */ case 16:
|
|
143396
|
+
/* */ if ($clone($clone(d[0].jsVideoDecoder, js.Value).Get("state"), js.Value).String() === "closed") { $s = 18; continue; }
|
|
143397
|
+
/* */ $s = 19; continue;
|
|
143398
|
+
/* if ($clone($clone(d[0].jsVideoDecoder, js.Value).Get("state"), js.Value).String() === "closed") { */ case 18:
|
|
143399
|
+
$r = d[0].releaseVideoDecoder(); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143400
|
+
/* } */ case 19:
|
|
143401
|
+
$s = -1; return errDec;
|
|
143402
|
+
/* } */ case 17:
|
|
143403
|
+
framePromiseCb = $clone(js.FuncOf((function(d) { return function(this$1, args) {
|
|
143404
|
+
var args, this$1;
|
|
143405
|
+
d[0].resolves = $append(d[0].resolves, (0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]));
|
|
143406
|
+
d[0].rejects = $append(d[0].rejects, (1 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 1]));
|
|
143407
|
+
return $ifaceNil;
|
|
143408
|
+
}; })(d)), js.Func);
|
|
143409
|
+
_r$5 = $clone($clone(js.Global(), js.Value).Get("Promise"), js.Value).New(new sliceType$1([new framePromiseCb.constructor.elem(framePromiseCb)])); /* */ $s = 21; case 21: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
|
|
143410
|
+
framePromise = $clone(_r$5, js.Value);
|
|
143411
|
+
timeoutPromiseCb = $clone(js.FuncOf((function(d) { return function $b(this$1, args) {
|
|
143412
|
+
var _arg, _r$6, _r$7, args, this$1, x, $s, $r;
|
|
143413
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _r$6 = $f._r$6; _r$7 = $f._r$7; args = $f.args; this$1 = $f.this$1; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
143414
|
+
_r$6 = $clone((1 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 1]), js.Value).Call("bind", new sliceType$1([$ifaceNil, new $String("Timeout")])); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
|
|
143415
|
+
_arg = (x = _r$6, new x.constructor.elem(x));
|
|
143416
|
+
_r$7 = $clone(js.Global(), js.Value).Call("setTimeout", new sliceType$1([_arg, new $Int(500)])); /* */ $s = 2; case 2: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
|
|
143417
|
+
_r$7;
|
|
143418
|
+
$s = -1; return $ifaceNil;
|
|
143419
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._arg = _arg; $f._r$6 = _r$6; $f._r$7 = _r$7; $f.args = args; $f.this$1 = this$1; $f.x = x; $f.$s = $s; $f.$r = $r; return $f;
|
|
143420
|
+
}; })(d)), js.Func);
|
|
143421
|
+
_r$6 = $clone($clone(js.Global(), js.Value).Get("Promise"), js.Value).New(new sliceType$1([new timeoutPromiseCb.constructor.elem(timeoutPromiseCb)])); /* */ $s = 22; case 22: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
|
|
143422
|
+
timeoutPromise = $clone(_r$6, js.Value);
|
|
143423
|
+
_r$7 = $clone($clone(js.Global(), js.Value).Get("Array"), js.Value).New(new sliceType$1([new framePromise.constructor.elem(framePromise), new timeoutPromise.constructor.elem(timeoutPromise)])); /* */ $s = 23; case 23: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
|
|
143424
|
+
_arg = (x = _r$7, new x.constructor.elem(x));
|
|
143425
|
+
_r$8 = $clone($clone(js.Global(), js.Value).Get("Promise"), js.Value).Call("race", new sliceType$1([_arg])); /* */ $s = 24; case 24: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; }
|
|
143426
|
+
racePromise = $clone(_r$8, js.Value);
|
|
143427
|
+
_r$9 = jshelper.Await($clone(racePromise, js.Value)); /* */ $s = 25; case 25: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; }
|
|
143428
|
+
_tuple = _r$9;
|
|
143429
|
+
frame = _tuple[0];
|
|
143430
|
+
err = _tuple[1];
|
|
143431
|
+
$clone(framePromiseCb, js.Func).Release();
|
|
143432
|
+
$clone(timeoutPromiseCb, js.Func).Release();
|
|
143433
|
+
/* */ if (!(err === ptrType.nil)) { $s = 26; continue; }
|
|
143434
|
+
/* */ $s = 27; continue;
|
|
143435
|
+
/* if (!(err === ptrType.nil)) { */ case 26:
|
|
143436
|
+
errMessage = "";
|
|
143437
|
+
if ($clone(err, js.Value).Type() === 4) {
|
|
143438
|
+
errMessage = $clone(err, js.Value).String();
|
|
143439
|
+
} else {
|
|
143440
|
+
errMessage = $clone($clone(err, js.Value).Get("message"), js.Value).String();
|
|
143441
|
+
}
|
|
143442
|
+
_r$10 = errs.Errorf(errMessage, new sliceType$1([])); /* */ $s = 28; case 28: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; }
|
|
143443
|
+
$s = -1; return _r$10;
|
|
143444
|
+
/* } */ case 27:
|
|
143445
|
+
ycbcrJSImg = $assertType(outputBuffer, ptrType$1).YCbCrJS();
|
|
143446
|
+
ycbcrJSImg.CanvasImageSource = frame;
|
|
142628
143447
|
$s = -1; return $ifaceNil;
|
|
142629
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk:
|
|
143448
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: Decoder.ptr.prototype.Decode }; } $f._arg = _arg; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f.chunk = chunk; $f.chunkOpts = chunkOpts; $f.d = d; $f.err = err; $f.errDec = errDec; $f.errMessage = errMessage; $f.frame = frame; $f.frameData = frameData; $f.framePromise = framePromise; $f.framePromiseCb = framePromiseCb; $f.frameType = frameType; $f.nal = nal; $f.outputBuffer = outputBuffer; $f.racePromise = racePromise; $f.timeoutPromise = timeoutPromise; $f.timeoutPromiseCb = timeoutPromiseCb; $f.x = x; $f.ycbcrJSImg = ycbcrJSImg; $f.$s = $s; $f.$r = $r; return $f;
|
|
142630
143449
|
};
|
|
142631
|
-
|
|
142632
|
-
|
|
142633
|
-
|
|
142634
|
-
|
|
143450
|
+
Decoder.prototype.Decode = function(nal, outputBuffer) { return this.$val.Decode(nal, outputBuffer); };
|
|
143451
|
+
Decoder.ptr.prototype.Release = function(outputBuffer) {
|
|
143452
|
+
var _r, m, outputBuffer, ycbcrJSImg, $s, $r;
|
|
143453
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; m = $f.m; outputBuffer = $f.outputBuffer; ycbcrJSImg = $f.ycbcrJSImg; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
143454
|
+
m = this;
|
|
143455
|
+
ycbcrJSImg = $assertType(outputBuffer, ptrType$1).YCbCrJS();
|
|
143456
|
+
/* */ if (!(ycbcrJSImg.CanvasImageSource === ptrType.nil)) { $s = 1; continue; }
|
|
143457
|
+
/* */ $s = 2; continue;
|
|
143458
|
+
/* if (!(ycbcrJSImg.CanvasImageSource === ptrType.nil)) { */ case 1:
|
|
143459
|
+
_r = $clone(ycbcrJSImg.CanvasImageSource, js.Value).Call("close", new sliceType$1([])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
143460
|
+
_r;
|
|
143461
|
+
/* } */ case 2:
|
|
143462
|
+
$s = -1; return;
|
|
143463
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: Decoder.ptr.prototype.Release }; } $f._r = _r; $f.m = m; $f.outputBuffer = outputBuffer; $f.ycbcrJSImg = ycbcrJSImg; $f.$s = $s; $f.$r = $r; return $f;
|
|
143464
|
+
};
|
|
143465
|
+
Decoder.prototype.Release = function(outputBuffer) { return this.$val.Release(outputBuffer); };
|
|
143466
|
+
Decoder.ptr.prototype.jsSafeDecode = function(chunk) {
|
|
143467
|
+
var _r, chunk, d, err, $s, $deferred, $r;
|
|
143468
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; chunk = $f.chunk; d = $f.d; err = $f.err; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred);
|
|
143469
|
+
err = [err];
|
|
143470
|
+
err[0] = $ifaceNil;
|
|
143471
|
+
d = this;
|
|
143472
|
+
$deferred.push([(function(err) { return function $b() {
|
|
143473
|
+
var _r, recoverErr, $s, $r;
|
|
143474
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; recoverErr = $f.recoverErr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
143475
|
+
recoverErr = $recover();
|
|
143476
|
+
/* */ if (!($interfaceIsEqual(recoverErr, $ifaceNil))) { $s = 1; continue; }
|
|
143477
|
+
/* */ $s = 2; continue;
|
|
143478
|
+
/* if (!($interfaceIsEqual(recoverErr, $ifaceNil))) { */ case 1:
|
|
143479
|
+
_r = errs.Errorf("Cannot decode %s", new sliceType$1([recoverErr])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
143480
|
+
err[0] = _r;
|
|
143481
|
+
/* } */ case 2:
|
|
143482
|
+
$s = -1; return;
|
|
143483
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r = _r; $f.recoverErr = recoverErr; $f.$s = $s; $f.$r = $r; return $f;
|
|
143484
|
+
}; })(err), []]);
|
|
143485
|
+
_r = $clone(d.jsVideoDecoder, js.Value).Call("decode", new sliceType$1([new chunk.constructor.elem(chunk)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
143486
|
+
_r;
|
|
143487
|
+
err[0] = err[0];
|
|
143488
|
+
$s = -1; return err[0];
|
|
143489
|
+
/* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return err[0]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Decoder.ptr.prototype.jsSafeDecode }; } $f._r = _r; $f.chunk = chunk; $f.d = d; $f.err = err; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } }
|
|
143490
|
+
};
|
|
143491
|
+
Decoder.prototype.jsSafeDecode = function(chunk) { return this.$val.jsSafeDecode(chunk); };
|
|
143492
|
+
ptrType$2.methods = [{prop: "configure", name: "configure", pkg: "github.com/supraio/client-daemon/pkg/x264/webcodecs", typ: $funcType([sliceType$2], [], false)}, {prop: "detectCodecName", name: "detectCodecName", pkg: "github.com/supraio/client-daemon/pkg/x264/webcodecs", typ: $funcType([sliceType$2], [$String], false)}, {prop: "Decode", name: "Decode", pkg: "", typ: $funcType([sliceType$2, general.OutputBuffer], [$error], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([general.OutputBuffer], [], false)}, {prop: "jsSafeDecode", name: "jsSafeDecode", pkg: "github.com/supraio/client-daemon/pkg/x264/webcodecs", typ: $funcType([js.Value], [$error], false)}];
|
|
143493
|
+
Decoder.init("github.com/supraio/client-daemon/pkg/x264/webcodecs", [{prop: "jsVideoDecoder", name: "jsVideoDecoder", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "resolves", name: "resolves", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "rejects", name: "rejects", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "releaseVideoDecoder", name: "releaseVideoDecoder", embedded: false, exported: false, typ: funcType, tag: ""}]);
|
|
142635
143494
|
$init = function() {
|
|
142636
143495
|
$pkg.$init = function() {};
|
|
142637
143496
|
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142638
|
-
$r =
|
|
142639
|
-
$r =
|
|
142640
|
-
$r =
|
|
142641
|
-
$r =
|
|
143497
|
+
$r = hex.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143498
|
+
$r = webgl.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143499
|
+
$r = errs.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143500
|
+
$r = jshelper.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143501
|
+
$r = general.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143502
|
+
$r = canvasdriver.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143503
|
+
$r = js.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142642
143504
|
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
142643
143505
|
};
|
|
142644
143506
|
$pkg.$init = $init;
|
|
142645
143507
|
return $pkg;
|
|
142646
143508
|
})();
|
|
142647
|
-
$packages["
|
|
142648
|
-
var $pkg = {}, $init,
|
|
142649
|
-
|
|
142650
|
-
|
|
142651
|
-
|
|
142652
|
-
|
|
142653
|
-
|
|
142654
|
-
|
|
142655
|
-
|
|
142656
|
-
|
|
143509
|
+
$packages["github.com/supraio/client-daemon/pkg/x264"] = (function() {
|
|
143510
|
+
var $pkg = {}, $init, errs, general, h264_decoder, webcodecs, js, H264Decoder, Decoder, ptrType, sliceType, sliceType$1, NewH264Decoder;
|
|
143511
|
+
errs = $packages["github.com/supraio/client-daemon/pkg/errs"];
|
|
143512
|
+
general = $packages["github.com/supraio/client-daemon/pkg/x264/general"];
|
|
143513
|
+
h264_decoder = $packages["github.com/supraio/client-daemon/pkg/x264/h264decoder"];
|
|
143514
|
+
webcodecs = $packages["github.com/supraio/client-daemon/pkg/x264/webcodecs"];
|
|
143515
|
+
js = $packages["syscall/js"];
|
|
143516
|
+
H264Decoder = $pkg.H264Decoder = $newType(0, $kindStruct, "x264.H264Decoder", true, "github.com/supraio/client-daemon/pkg/x264", true, function(decoder_) {
|
|
143517
|
+
this.$val = this;
|
|
143518
|
+
if (arguments.length === 0) {
|
|
143519
|
+
this.decoder = $ifaceNil;
|
|
143520
|
+
return;
|
|
143521
|
+
}
|
|
143522
|
+
this.decoder = decoder_;
|
|
143523
|
+
});
|
|
143524
|
+
Decoder = $pkg.Decoder = $newType(8, $kindInterface, "x264.Decoder", true, "github.com/supraio/client-daemon/pkg/x264", true, null);
|
|
143525
|
+
ptrType = $ptrType(H264Decoder);
|
|
143526
|
+
sliceType = $sliceType($emptyInterface);
|
|
143527
|
+
sliceType$1 = $sliceType($Uint8);
|
|
143528
|
+
NewH264Decoder = function(header) {
|
|
143529
|
+
var _r, _r$1, decoder, header, $s, $r;
|
|
143530
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; decoder = $f.decoder; header = $f.header; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
143531
|
+
decoder = $ifaceNil;
|
|
143532
|
+
/* */ if (!$clone($clone(js.Global(), js.Value).Get("VideoDecoder"), js.Value).IsUndefined()) { $s = 1; continue; }
|
|
143533
|
+
/* */ if (!$clone($clone(js.Global(), js.Value).Get("h264Decoder"), js.Value).IsUndefined()) { $s = 2; continue; }
|
|
143534
|
+
/* */ $s = 3; continue;
|
|
143535
|
+
/* if (!$clone($clone(js.Global(), js.Value).Get("VideoDecoder"), js.Value).IsUndefined()) { */ case 1:
|
|
143536
|
+
decoder = webcodecs.NewDecoder(header);
|
|
143537
|
+
$s = 4; continue;
|
|
143538
|
+
/* } else if (!$clone($clone(js.Global(), js.Value).Get("h264Decoder"), js.Value).IsUndefined()) { */ case 2:
|
|
143539
|
+
_r = h264_decoder.NewDecoder(header); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
143540
|
+
decoder = _r;
|
|
143541
|
+
$s = 4; continue;
|
|
143542
|
+
/* } else { */ case 3:
|
|
143543
|
+
_r$1 = errs.Errorf("Not available any h264 docoder adapeter in JS", new sliceType([])); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
143544
|
+
$s = -1; return [ptrType.nil, _r$1];
|
|
143545
|
+
/* } */ case 4:
|
|
143546
|
+
$s = -1; return [new H264Decoder.ptr(decoder), $ifaceNil];
|
|
143547
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: NewH264Decoder }; } $f._r = _r; $f._r$1 = _r$1; $f.decoder = decoder; $f.header = header; $f.$s = $s; $f.$r = $r; return $f;
|
|
142657
143548
|
};
|
|
142658
|
-
$pkg.
|
|
142659
|
-
|
|
142660
|
-
var
|
|
142661
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; f = $f.f; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142662
|
-
|
|
143549
|
+
$pkg.NewH264Decoder = NewH264Decoder;
|
|
143550
|
+
H264Decoder.ptr.prototype.Decode = function(nal, outputBuffer) {
|
|
143551
|
+
var _r, m, nal, outputBuffer, $s, $r;
|
|
143552
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; m = $f.m; nal = $f.nal; outputBuffer = $f.outputBuffer; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
143553
|
+
m = this;
|
|
143554
|
+
_r = m.decoder.Decode(nal, outputBuffer); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
143555
|
+
$s = -1; return _r;
|
|
143556
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: H264Decoder.ptr.prototype.Decode }; } $f._r = _r; $f.m = m; $f.nal = nal; $f.outputBuffer = outputBuffer; $f.$s = $s; $f.$r = $r; return $f;
|
|
143557
|
+
};
|
|
143558
|
+
H264Decoder.prototype.Decode = function(nal, outputBuffer) { return this.$val.Decode(nal, outputBuffer); };
|
|
143559
|
+
H264Decoder.ptr.prototype.Release = function(outputBuffer) {
|
|
143560
|
+
var m, outputBuffer, $s, $r;
|
|
143561
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; m = $f.m; outputBuffer = $f.outputBuffer; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
143562
|
+
m = this;
|
|
143563
|
+
$r = m.decoder.Release(outputBuffer); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142663
143564
|
$s = -1; return;
|
|
142664
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk:
|
|
143565
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: H264Decoder.ptr.prototype.Release }; } $f.m = m; $f.outputBuffer = outputBuffer; $f.$s = $s; $f.$r = $r; return $f;
|
|
142665
143566
|
};
|
|
143567
|
+
H264Decoder.prototype.Release = function(outputBuffer) { return this.$val.Release(outputBuffer); };
|
|
143568
|
+
ptrType.methods = [{prop: "Decode", name: "Decode", pkg: "", typ: $funcType([sliceType$1, general.OutputBuffer], [$error], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([general.OutputBuffer], [], false)}];
|
|
143569
|
+
H264Decoder.init("github.com/supraio/client-daemon/pkg/x264", [{prop: "decoder", name: "decoder", embedded: false, exported: false, typ: Decoder, tag: ""}]);
|
|
143570
|
+
Decoder.init([{prop: "Decode", name: "Decode", pkg: "", typ: $funcType([sliceType$1, general.OutputBuffer], [$error], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([general.OutputBuffer], [], false)}]);
|
|
142666
143571
|
$init = function() {
|
|
142667
143572
|
$pkg.$init = function() {};
|
|
142668
143573
|
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
142669
|
-
$r =
|
|
142670
|
-
$r =
|
|
143574
|
+
$r = errs.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143575
|
+
$r = general.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143576
|
+
$r = h264_decoder.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143577
|
+
$r = webcodecs.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143578
|
+
$r = js.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
142671
143579
|
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
142672
143580
|
};
|
|
142673
143581
|
$pkg.$init = $init;
|
|
@@ -142764,7 +143672,7 @@ $packages["golang.org/x/mobile/event/lifecycle"] = (function() {
|
|
|
142764
143672
|
return $pkg;
|
|
142765
143673
|
})();
|
|
142766
143674
|
$packages["github.com/supraio/client-daemon/pkg/render"] = (function() {
|
|
142767
|
-
var $pkg = {}, $init, binary, json, query, clipboard, errs, input, message, netclient, netpacket, netstream, stats, window, x264,
|
|
143675
|
+
var $pkg = {}, $init, binary, json, query, clipboard, errs, input, message, netclient, netpacket, netstream, stats, window, x264, canvasdriver, webgldriver, screen, focus, key, lifecycle, mouse, size, image, io, ioutil, log, os, path, strings, sync, js, time, Frame, FrameType, FrameCollector, FrameMapItem, ProcessInfo, ProcessInfoManager, ScreenWindow, X264FrameRenderer, ptrType, sliceType, ptrType$1, ptrType$2, sliceType$1, sliceType$2, ptrType$3, funcType, sliceType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, ptrType$11, structType, ptrType$12, mapType, funcType$1, ptrType$14, chanType, chanType$1, chanType$2, chanType$3, chanType$4, NewFrameCollector, NewProcessInfoManager, MainDriver, NewScreenWindow, NewX264FrameRenderer;
|
|
142768
143676
|
binary = $packages["encoding/binary"];
|
|
142769
143677
|
json = $packages["encoding/json"];
|
|
142770
143678
|
query = $packages["github.com/google/go-querystring/query"];
|
|
@@ -142778,7 +143686,8 @@ $packages["github.com/supraio/client-daemon/pkg/render"] = (function() {
|
|
|
142778
143686
|
stats = $packages["github.com/supraio/client-daemon/pkg/stats"];
|
|
142779
143687
|
window = $packages["github.com/supraio/client-daemon/pkg/window"];
|
|
142780
143688
|
x264 = $packages["github.com/supraio/client-daemon/pkg/x264"];
|
|
142781
|
-
|
|
143689
|
+
canvasdriver = $packages["golang.org/x/exp/shiny/driver/canvasdriver"];
|
|
143690
|
+
webgldriver = $packages["golang.org/x/exp/shiny/driver/webgldriver"];
|
|
142782
143691
|
screen = $packages["golang.org/x/exp/shiny/screen"];
|
|
142783
143692
|
focus = $packages["golang.org/x/mobile/event/focus"];
|
|
142784
143693
|
key = $packages["golang.org/x/mobile/event/key"];
|
|
@@ -143206,6 +144115,21 @@ $packages["github.com/supraio/client-daemon/pkg/render"] = (function() {
|
|
|
143206
144115
|
return path.Join(new sliceType$2([m.processDir, "S-" + m.username]));
|
|
143207
144116
|
};
|
|
143208
144117
|
ProcessInfoManager.prototype.getUserProcessDirPath = function() { return this.$val.getUserProcessDirPath(); };
|
|
144118
|
+
MainDriver = function(f) {
|
|
144119
|
+
var f, $s, $r;
|
|
144120
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; f = $f.f; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
144121
|
+
/* */ if ($clone($clone(js.Global(), js.Value).Get("VideoDecoder"), js.Value).IsUndefined()) { $s = 1; continue; }
|
|
144122
|
+
/* */ $s = 2; continue;
|
|
144123
|
+
/* if ($clone($clone(js.Global(), js.Value).Get("VideoDecoder"), js.Value).IsUndefined()) { */ case 1:
|
|
144124
|
+
$r = webgldriver.Main(f); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144125
|
+
$s = 3; continue;
|
|
144126
|
+
/* } else { */ case 2:
|
|
144127
|
+
$r = canvasdriver.Main(f); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144128
|
+
/* } */ case 3:
|
|
144129
|
+
$s = -1; return;
|
|
144130
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: MainDriver }; } $f.f = f; $f.$s = $s; $f.$r = $r; return $f;
|
|
144131
|
+
};
|
|
144132
|
+
$pkg.MainDriver = MainDriver;
|
|
143209
144133
|
NewScreenWindow = function(processInfoManager, screenDriver, screenHost, metadataDriver, metadataHost, clientID, clientSecret, screenID, secure, screenSize, timeoutDuration) {
|
|
143210
144134
|
var clientID, clientSecret, metadataDriver, metadataHost, processInfoManager, screenDriver, screenHost, screenID, screenSize, secure, timeoutDuration;
|
|
143211
144135
|
return new ScreenWindow.ptr(processInfoManager, screenDriver, screenHost, metadataDriver, metadataHost, "", clientID, clientSecret, screenID, secure, $clone(screenSize, image.Point), new sync.Mutex.ptr(0, 0), timeoutDuration, true, stats.NewStats(), sliceType$3.nil, $ifaceNil, $ifaceNil, $ifaceNil, false, ptrType$4.nil, ptrType$5.nil, ptrType$6.nil, $ifaceNil, $ifaceNil, ptrType$7.nil, ptrType$8.nil, ptrType$9.nil, ptrType$10.nil, ptrType$11.nil, new $Chan(key.Event, 0), new $Chan(mouse.Event, 0), new $Chan(size.Event, 0), new $Chan(focus.Event, 0), new $Chan($emptyInterface, 0));
|
|
@@ -143337,7 +144261,7 @@ $packages["github.com/supraio/client-daemon/pkg/render"] = (function() {
|
|
|
143337
144261
|
$go((function(w, windowChannel) { return function $b() {
|
|
143338
144262
|
var $s, $r;
|
|
143339
144263
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
143340
|
-
$r =
|
|
144264
|
+
$r = MainDriver((function(w, windowChannel) { return function $b(s) {
|
|
143341
144265
|
var _r, _r$1, _tuple, err, s, window$1, $s, $r;
|
|
143342
144266
|
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; err = $f.err; s = $f.s; window$1 = $f.window$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
143343
144267
|
_r = s.NewWindow(new screen.NewWindowOptions.ptr(w[0].screenSize.X, w[0].screenSize.Y, "")); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
@@ -143732,43 +144656,42 @@ $packages["github.com/supraio/client-daemon/pkg/render"] = (function() {
|
|
|
143732
144656
|
};
|
|
143733
144657
|
$pkg.NewX264FrameRenderer = NewX264FrameRenderer;
|
|
143734
144658
|
X264FrameRenderer.ptr.prototype.Render = function(frame) {
|
|
143735
|
-
var _arg, _arg$1, _arg$2, _r, _r$1, _r$2, _r$3, _tuple, err,
|
|
143736
|
-
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; err = $f.err;
|
|
144659
|
+
var _arg, _arg$1, _arg$2, _r, _r$1, _r$2, _r$3, _tuple, err, frame, r, $s, $deferred, $r;
|
|
144660
|
+
/* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; err = $f.err; frame = $f.frame; r = $f.r; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred);
|
|
143737
144661
|
r = this;
|
|
143738
144662
|
err = $ifaceNil;
|
|
143739
144663
|
/* */ if (r.dec === ptrType$12.nil) { $s = 1; continue; }
|
|
143740
144664
|
/* */ $s = 2; continue;
|
|
143741
144665
|
/* if (r.dec === ptrType$12.nil) { */ case 1:
|
|
143742
|
-
_r = x264.NewH264Decoder(frame.buffer); /* */ $s =
|
|
144666
|
+
_r = x264.NewH264Decoder(frame.buffer); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
143743
144667
|
_tuple = _r;
|
|
143744
144668
|
r.dec = _tuple[0];
|
|
143745
144669
|
err = _tuple[1];
|
|
143746
|
-
/* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s =
|
|
143747
|
-
/* */ $s =
|
|
143748
|
-
/* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case
|
|
143749
|
-
$r = errs.Print("Decoder cannot be created", err); /* */ $s =
|
|
143750
|
-
$s = -1; return;
|
|
143751
|
-
/* } */ case 6:
|
|
143752
|
-
$s = 3; continue;
|
|
143753
|
-
/* } else { */ case 2:
|
|
143754
|
-
_r$1 = r.dec.Decode(frame.buffer, r.screenBuffer); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
143755
|
-
err$1 = _r$1;
|
|
143756
|
-
/* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 9; continue; }
|
|
143757
|
-
/* */ $s = 10; continue;
|
|
143758
|
-
/* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 9:
|
|
143759
|
-
$r = errs.Print("Frame cannot be decoded", err$1); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144670
|
+
/* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 4; continue; }
|
|
144671
|
+
/* */ $s = 5; continue;
|
|
144672
|
+
/* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 4:
|
|
144673
|
+
$r = errs.Print("Decoder cannot be created", err); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143760
144674
|
$s = -1; return;
|
|
143761
|
-
/* } */ case
|
|
143762
|
-
|
|
143763
|
-
|
|
143764
|
-
|
|
143765
|
-
|
|
143766
|
-
|
|
143767
|
-
|
|
143768
|
-
|
|
143769
|
-
|
|
144675
|
+
/* } */ case 5:
|
|
144676
|
+
/* } */ case 2:
|
|
144677
|
+
_r$1 = r.dec.Decode(frame.buffer, r.screenBuffer); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
144678
|
+
err = _r$1;
|
|
144679
|
+
$deferred.push([$methodVal(r.dec, "Release"), [r.screenBuffer]]);
|
|
144680
|
+
/* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 8; continue; }
|
|
144681
|
+
/* */ $s = 9; continue;
|
|
144682
|
+
/* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 8:
|
|
144683
|
+
$r = errs.Print("Frame cannot be decoded", err); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144684
|
+
$s = -1; return;
|
|
144685
|
+
/* } */ case 9:
|
|
144686
|
+
_arg = new image.Point.ptr(0, 0);
|
|
144687
|
+
_arg$1 = r.screenBuffer;
|
|
144688
|
+
_r$2 = r.screenBuffer.Bounds(); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
144689
|
+
_arg$2 = $clone(_r$2, image.Rectangle);
|
|
144690
|
+
$r = r.window.UploadYCbCr(_arg, _arg$1, _arg$2); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144691
|
+
_r$3 = r.window.Publish(); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
144692
|
+
_r$3;
|
|
143770
144693
|
$s = -1; return;
|
|
143771
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: X264FrameRenderer.ptr.prototype.Render }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f.err = err; $f.
|
|
144694
|
+
/* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: X264FrameRenderer.ptr.prototype.Render }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f.err = err; $f.frame = frame; $f.r = r; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } }
|
|
143772
144695
|
};
|
|
143773
144696
|
X264FrameRenderer.prototype.Render = function(frame) { return this.$val.Render(frame); };
|
|
143774
144697
|
ptrType$1.methods = [{prop: "GetTimestmap", name: "GetTimestmap", pkg: "", typ: $funcType([], [$Uint64], false)}];
|
|
@@ -143799,23 +144722,24 @@ $packages["github.com/supraio/client-daemon/pkg/render"] = (function() {
|
|
|
143799
144722
|
$r = stats.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143800
144723
|
$r = window.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143801
144724
|
$r = x264.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143802
|
-
$r =
|
|
143803
|
-
$r =
|
|
143804
|
-
$r =
|
|
143805
|
-
$r =
|
|
143806
|
-
$r =
|
|
143807
|
-
$r =
|
|
143808
|
-
$r =
|
|
143809
|
-
$r =
|
|
143810
|
-
$r =
|
|
143811
|
-
$r =
|
|
143812
|
-
$r =
|
|
143813
|
-
$r =
|
|
143814
|
-
$r =
|
|
143815
|
-
$r =
|
|
143816
|
-
$r =
|
|
143817
|
-
$r =
|
|
143818
|
-
$r =
|
|
144725
|
+
$r = canvasdriver.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144726
|
+
$r = webgldriver.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144727
|
+
$r = screen.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144728
|
+
$r = focus.$init(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144729
|
+
$r = key.$init(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144730
|
+
$r = lifecycle.$init(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144731
|
+
$r = mouse.$init(); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144732
|
+
$r = size.$init(); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144733
|
+
$r = image.$init(); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144734
|
+
$r = io.$init(); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144735
|
+
$r = ioutil.$init(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144736
|
+
$r = log.$init(); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144737
|
+
$r = os.$init(); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144738
|
+
$r = path.$init(); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144739
|
+
$r = strings.$init(); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144740
|
+
$r = sync.$init(); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144741
|
+
$r = js.$init(); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
144742
|
+
$r = time.$init(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
143819
144743
|
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
143820
144744
|
};
|
|
143821
144745
|
$pkg.$init = $init;
|