@sassoftware/restaf 4.5.6 → 4.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/restaf.js +19 -19
- package/dist/restaf.min.js +1 -1
- package/lib/restaf.js +4 -4
- package/package.json +1 -1
package/dist/restaf.js
CHANGED
|
@@ -1175,7 +1175,7 @@ eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission
|
|
|
1175
1175
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1176
1176
|
|
|
1177
1177
|
"use strict";
|
|
1178
|
-
eval("/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\n/*<replacement>*/\n\nvar pna = __webpack_require__(/*! process-nextick-args */ \"../../../node_modules/process-nextick-args/index.js\");\n/*</replacement>*/\n\nmodule.exports = Readable;\n\n/*<replacement>*/\nvar isArray = __webpack_require__(/*! isarray */ \"../../../node_modules/isarray/index.js\");\n/*</replacement>*/\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nReadable.ReadableState = ReadableState;\n\n/*<replacement>*/\nvar EE = __webpack_require__(/*! events */ \"../../../node_modules/events/events.js\").EventEmitter;\n\nvar EElistenerCount = function (emitter, type) {\n return emitter.listeners(type).length;\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = __webpack_require__(/*! ./internal/streams/stream */ \"../../../node_modules/readable-stream/lib/internal/streams/stream-browser.js\");\n/*</replacement>*/\n\n/*<replacement>*/\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"../../../node_modules/safe-buffer/index.js\").Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*</replacement>*/\n\n/*<replacement>*/\nvar util = Object.create(__webpack_require__(/*! core-util-is */ \"../../../node_modules/core-util-is/lib/util.js\"));\nutil.inherits = __webpack_require__(/*! inherits */ \"../../../node_modules/inherits/inherits_browser.js\");\n/*</replacement>*/\n\n/*<replacement>*/\nvar debugUtil = __webpack_require__(/*! util */ 2);\nvar debug = void 0;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function () {};\n}\n/*</replacement>*/\n\nvar BufferList = __webpack_require__(/*! ./internal/streams/BufferList */ \"../../../node_modules/readable-stream/lib/internal/streams/BufferList.js\");\nvar destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ \"../../../node_modules/readable-stream/lib/internal/streams/destroy.js\");\nvar StringDecoder;\n\nutil.inherits(Readable, Stream);\n\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"../../../node_modules/readable-stream/lib/_stream_duplex.js\");\n\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n var hwm = options.highWaterMark;\n var readableHwm = options.readableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ \"../../../node_modules/string_decoder/lib/string_decoder.js\").StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\n\nfunction Readable(options) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"../../../node_modules/readable-stream/lib/_stream_duplex.js\");\n\n if (!(this instanceof Readable)) return new Readable(options);\n\n this._readableState = new ReadableState(options, this);\n\n // legacy\n this.readable = true;\n\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n\n Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n get: function () {\n if (this._readableState === undefined) {\n return false;\n }\n return this._readableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n }\n});\n\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n this.push(null);\n cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n var state = stream._readableState;\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n if (er) {\n stream.emit('error', er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (addToFront) {\n if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n stream.emit('error', new Error('stream.push() after EOF'));\n } else {\n state.reading = false;\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n }\n }\n\n return needMoreData(state);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n stream.emit('data', chunk);\n stream.read(0);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n if (state.needReadable) emitReadable(stream);\n }\n maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n var er;\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n return er;\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes. This is to work around cases where hwm=0,\n// such as the repl. Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ \"../../../node_modules/string_decoder/lib/string_decoder.js\").StringDecoder;\n this._readableState.decoder = new StringDecoder(enc);\n this._readableState.encoding = enc;\n return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = true;\n n = 0;\n } else {\n state.length -= n;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n\n return ret;\n};\n\nfunction onEofChunk(stream, state) {\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n\n // emit 'readable' now to make sure it gets picked up.\n emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}\n\nfunction emitReadable_(stream) {\n debug('emit readable');\n stream.emit('readable');\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n pna.nextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n var len = state.length;\n while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;else len = state.length;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n this.emit('error', new Error('_read() is not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);\n\n dest.on('unpipe', onunpipe);\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n // If the user pushes more data while we're writing to dest then we'll end up\n // in ondata again. However, we only want to increase awaitDrain once because\n // dest will only emit one 'drain' event for the multiple writes.\n // => Introduce a guard on increasing awaitDrain.\n var increasedAwaitDrain = false;\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n increasedAwaitDrain = false;\n var ret = dest.write(chunk);\n if (false === ret && !increasedAwaitDrain) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', src._readableState.awaitDrain);\n src._readableState.awaitDrain++;\n increasedAwaitDrain = true;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = { hasUnpiped: false };\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var i = 0; i < len; i++) {\n dests[i].emit('unpipe', this, unpipeInfo);\n }return this;\n }\n\n // try to find the right one.\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n dest.emit('unpipe', this, unpipeInfo);\n\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n\n if (ev === 'data') {\n // Start flowing on next tick if stream isn't explicitly paused\n if (this._readableState.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n var state = this._readableState;\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.emittedReadable = false;\n if (!state.reading) {\n pna.nextTick(nReadingNextTick, this);\n } else if (state.length) {\n emitReadable(this);\n }\n }\n }\n\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n state.flowing = true;\n resume(this, state);\n }\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n pna.nextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n if (!state.reading) {\n debug('resume read 0');\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n state.awaitDrain = 0;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (false !== this._readableState.flowing) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n\n var state = this._readableState;\n var paused = false;\n\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n\n _this.push(null);\n });\n\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = _this.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function (method) {\n return function () {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n }\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n this._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return this;\n};\n\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._readableState.highWaterMark;\n }\n});\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = fromListPartial(n, state.buffer, state.decoder);\n }\n\n return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n var ret;\n if (n < list.head.data.length) {\n // slice is the same for buffers and strings\n ret = list.head.data.slice(0, n);\n list.head.data = list.head.data.slice(n);\n } else if (n === list.head.data.length) {\n // first chunk is a perfect match\n ret = list.shift();\n } else {\n // result spans more than one buffer\n ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n }\n return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n var p = list.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n\n // If we get here before consuming all the bytes, then that is a\n // bug in node. Should never happen.\n if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n if (!state.endEmitted) {\n state.ended = true;\n pna.nextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n }\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"../../../node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../../process/browser.js */ \"../../../node_modules/process/browser.js\")))\n\n//# sourceURL=webpack://restaf/C:/restaf/main/node_modules/readable-stream/lib/_stream_readable.js?");
|
|
1178
|
+
eval("/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\n/*<replacement>*/\n\nvar pna = __webpack_require__(/*! process-nextick-args */ \"../../../node_modules/process-nextick-args/index.js\");\n/*</replacement>*/\n\nmodule.exports = Readable;\n\n/*<replacement>*/\nvar isArray = __webpack_require__(/*! isarray */ \"../../../node_modules/isarray/index.js\");\n/*</replacement>*/\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nReadable.ReadableState = ReadableState;\n\n/*<replacement>*/\nvar EE = __webpack_require__(/*! events */ \"../../../node_modules/events/events.js\").EventEmitter;\n\nvar EElistenerCount = function (emitter, type) {\n return emitter.listeners(type).length;\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = __webpack_require__(/*! ./internal/streams/stream */ \"../../../node_modules/readable-stream/lib/internal/streams/stream-browser.js\");\n/*</replacement>*/\n\n/*<replacement>*/\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"../../../node_modules/readable-stream/node_modules/safe-buffer/index.js\").Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*</replacement>*/\n\n/*<replacement>*/\nvar util = Object.create(__webpack_require__(/*! core-util-is */ \"../../../node_modules/core-util-is/lib/util.js\"));\nutil.inherits = __webpack_require__(/*! inherits */ \"../../../node_modules/inherits/inherits_browser.js\");\n/*</replacement>*/\n\n/*<replacement>*/\nvar debugUtil = __webpack_require__(/*! util */ 2);\nvar debug = void 0;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function () {};\n}\n/*</replacement>*/\n\nvar BufferList = __webpack_require__(/*! ./internal/streams/BufferList */ \"../../../node_modules/readable-stream/lib/internal/streams/BufferList.js\");\nvar destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ \"../../../node_modules/readable-stream/lib/internal/streams/destroy.js\");\nvar StringDecoder;\n\nutil.inherits(Readable, Stream);\n\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"../../../node_modules/readable-stream/lib/_stream_duplex.js\");\n\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n var hwm = options.highWaterMark;\n var readableHwm = options.readableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ \"../../../node_modules/string_decoder/lib/string_decoder.js\").StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\n\nfunction Readable(options) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"../../../node_modules/readable-stream/lib/_stream_duplex.js\");\n\n if (!(this instanceof Readable)) return new Readable(options);\n\n this._readableState = new ReadableState(options, this);\n\n // legacy\n this.readable = true;\n\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n\n Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n get: function () {\n if (this._readableState === undefined) {\n return false;\n }\n return this._readableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n }\n});\n\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n this.push(null);\n cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n var state = stream._readableState;\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n if (er) {\n stream.emit('error', er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (addToFront) {\n if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n stream.emit('error', new Error('stream.push() after EOF'));\n } else {\n state.reading = false;\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n }\n }\n\n return needMoreData(state);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n stream.emit('data', chunk);\n stream.read(0);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n if (state.needReadable) emitReadable(stream);\n }\n maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n var er;\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n return er;\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes. This is to work around cases where hwm=0,\n// such as the repl. Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ \"../../../node_modules/string_decoder/lib/string_decoder.js\").StringDecoder;\n this._readableState.decoder = new StringDecoder(enc);\n this._readableState.encoding = enc;\n return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = true;\n n = 0;\n } else {\n state.length -= n;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n\n return ret;\n};\n\nfunction onEofChunk(stream, state) {\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n\n // emit 'readable' now to make sure it gets picked up.\n emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}\n\nfunction emitReadable_(stream) {\n debug('emit readable');\n stream.emit('readable');\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n pna.nextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n var len = state.length;\n while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;else len = state.length;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n this.emit('error', new Error('_read() is not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);\n\n dest.on('unpipe', onunpipe);\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n // If the user pushes more data while we're writing to dest then we'll end up\n // in ondata again. However, we only want to increase awaitDrain once because\n // dest will only emit one 'drain' event for the multiple writes.\n // => Introduce a guard on increasing awaitDrain.\n var increasedAwaitDrain = false;\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n increasedAwaitDrain = false;\n var ret = dest.write(chunk);\n if (false === ret && !increasedAwaitDrain) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', src._readableState.awaitDrain);\n src._readableState.awaitDrain++;\n increasedAwaitDrain = true;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = { hasUnpiped: false };\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var i = 0; i < len; i++) {\n dests[i].emit('unpipe', this, unpipeInfo);\n }return this;\n }\n\n // try to find the right one.\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n dest.emit('unpipe', this, unpipeInfo);\n\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n\n if (ev === 'data') {\n // Start flowing on next tick if stream isn't explicitly paused\n if (this._readableState.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n var state = this._readableState;\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.emittedReadable = false;\n if (!state.reading) {\n pna.nextTick(nReadingNextTick, this);\n } else if (state.length) {\n emitReadable(this);\n }\n }\n }\n\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n state.flowing = true;\n resume(this, state);\n }\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n pna.nextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n if (!state.reading) {\n debug('resume read 0');\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n state.awaitDrain = 0;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (false !== this._readableState.flowing) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n\n var state = this._readableState;\n var paused = false;\n\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n\n _this.push(null);\n });\n\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = _this.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function (method) {\n return function () {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n }\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n this._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return this;\n};\n\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._readableState.highWaterMark;\n }\n});\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = fromListPartial(n, state.buffer, state.decoder);\n }\n\n return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n var ret;\n if (n < list.head.data.length) {\n // slice is the same for buffers and strings\n ret = list.head.data.slice(0, n);\n list.head.data = list.head.data.slice(n);\n } else if (n === list.head.data.length) {\n // first chunk is a perfect match\n ret = list.shift();\n } else {\n // result spans more than one buffer\n ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n }\n return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n var p = list.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n\n // If we get here before consuming all the bytes, then that is a\n // bug in node. Should never happen.\n if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n if (!state.endEmitted) {\n state.ended = true;\n pna.nextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n }\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"../../../node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../../process/browser.js */ \"../../../node_modules/process/browser.js\")))\n\n//# sourceURL=webpack://restaf/C:/restaf/main/node_modules/readable-stream/lib/_stream_readable.js?");
|
|
1179
1179
|
|
|
1180
1180
|
/***/ }),
|
|
1181
1181
|
|
|
@@ -1201,7 +1201,7 @@ eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission
|
|
|
1201
1201
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1202
1202
|
|
|
1203
1203
|
"use strict";
|
|
1204
|
-
eval("/* WEBPACK VAR INJECTION */(function(process, setImmediate, global) {// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n\n\n/*<replacement>*/\n\nvar pna = __webpack_require__(/*! process-nextick-args */ \"../../../node_modules/process-nextick-args/index.js\");\n/*</replacement>*/\n\nmodule.exports = Writable;\n\n/* <replacement> */\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* </replacement> */\n\n/*<replacement>*/\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;\n/*</replacement>*/\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nWritable.WritableState = WritableState;\n\n/*<replacement>*/\nvar util = Object.create(__webpack_require__(/*! core-util-is */ \"../../../node_modules/core-util-is/lib/util.js\"));\nutil.inherits = __webpack_require__(/*! inherits */ \"../../../node_modules/inherits/inherits_browser.js\");\n/*</replacement>*/\n\n/*<replacement>*/\nvar internalUtil = {\n deprecate: __webpack_require__(/*! util-deprecate */ \"../../../node_modules/util-deprecate/browser.js\")\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = __webpack_require__(/*! ./internal/streams/stream */ \"../../../node_modules/readable-stream/lib/internal/streams/stream-browser.js\");\n/*</replacement>*/\n\n/*<replacement>*/\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"../../../node_modules/safe-buffer/index.js\").Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*</replacement>*/\n\nvar destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ \"../../../node_modules/readable-stream/lib/internal/streams/destroy.js\");\n\nutil.inherits(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"../../../node_modules/readable-stream/lib/_stream_duplex.js\");\n\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n var hwm = options.highWaterMark;\n var writableHwm = options.writableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // if _final has been called\n this.finalCalled = false;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function () {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function (object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function (object) {\n return object instanceof this;\n };\n}\n\nfunction Writable(options) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"../../../node_modules/readable-stream/lib/_stream_duplex.js\");\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {\n return new Writable(options);\n }\n\n this._writableState = new WritableState(options, this);\n\n // legacy.\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n\n if (typeof options.writev === 'function') this._writev = options.writev;\n\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n\n if (typeof options.final === 'function') this._final = options.final;\n }\n\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new Error('write after end');\n // TODO: defer error events consistently everywhere, not just the cb\n stream.emit('error', er);\n pna.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n pna.nextTick(cb, er);\n valid = false;\n }\n return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n if (typeof cb !== 'function') cb = nop;\n\n if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n\n return ret;\n};\n\nWritable.prototype.cork = function () {\n var state = this._writableState;\n\n state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n\n if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\n\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._writableState.highWaterMark;\n }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n var len = state.objectMode ? 1 : chunk.length;\n\n state.length += len;\n\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n pna.nextTick(cb, er);\n // this can emit finish, and it will always happen\n // after error\n pna.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n // this can emit finish, but finish must\n // always follow error\n finishMaybe(stream, state);\n }\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n\n onwriteStateUpdate(state);\n\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state);\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n /*<replacement>*/\n asyncWrite(afterWrite, stream, state, finished, cb);\n /*</replacement>*/\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new Error('_write() is not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n if (err) {\n stream.emit('error', err);\n }\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function') {\n state.pendingcb++;\n state.finalCalled = true;\n pna.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n prefinish(stream, state);\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n }\n }\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n if (state.corkedRequestsFree) {\n state.corkedRequestsFree.next = corkReq;\n } else {\n state.corkedRequestsFree = corkReq;\n }\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n get: function () {\n if (this._writableState === undefined) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._writableState.destroyed = value;\n }\n});\n\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n this.end();\n cb(err);\n};\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"../../../node_modules/process/browser.js\"), __webpack_require__(/*! ./../../timers-browserify/main.js */ \"../../../node_modules/timers-browserify/main.js\").setImmediate, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"../../../node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://restaf/C:/restaf/main/node_modules/readable-stream/lib/_stream_writable.js?");
|
|
1204
|
+
eval("/* WEBPACK VAR INJECTION */(function(process, setImmediate, global) {// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n\n\n/*<replacement>*/\n\nvar pna = __webpack_require__(/*! process-nextick-args */ \"../../../node_modules/process-nextick-args/index.js\");\n/*</replacement>*/\n\nmodule.exports = Writable;\n\n/* <replacement> */\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* </replacement> */\n\n/*<replacement>*/\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;\n/*</replacement>*/\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nWritable.WritableState = WritableState;\n\n/*<replacement>*/\nvar util = Object.create(__webpack_require__(/*! core-util-is */ \"../../../node_modules/core-util-is/lib/util.js\"));\nutil.inherits = __webpack_require__(/*! inherits */ \"../../../node_modules/inherits/inherits_browser.js\");\n/*</replacement>*/\n\n/*<replacement>*/\nvar internalUtil = {\n deprecate: __webpack_require__(/*! util-deprecate */ \"../../../node_modules/util-deprecate/browser.js\")\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = __webpack_require__(/*! ./internal/streams/stream */ \"../../../node_modules/readable-stream/lib/internal/streams/stream-browser.js\");\n/*</replacement>*/\n\n/*<replacement>*/\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"../../../node_modules/readable-stream/node_modules/safe-buffer/index.js\").Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*</replacement>*/\n\nvar destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ \"../../../node_modules/readable-stream/lib/internal/streams/destroy.js\");\n\nutil.inherits(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"../../../node_modules/readable-stream/lib/_stream_duplex.js\");\n\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n var hwm = options.highWaterMark;\n var writableHwm = options.writableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // if _final has been called\n this.finalCalled = false;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function () {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function (object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function (object) {\n return object instanceof this;\n };\n}\n\nfunction Writable(options) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"../../../node_modules/readable-stream/lib/_stream_duplex.js\");\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {\n return new Writable(options);\n }\n\n this._writableState = new WritableState(options, this);\n\n // legacy.\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n\n if (typeof options.writev === 'function') this._writev = options.writev;\n\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n\n if (typeof options.final === 'function') this._final = options.final;\n }\n\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new Error('write after end');\n // TODO: defer error events consistently everywhere, not just the cb\n stream.emit('error', er);\n pna.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n pna.nextTick(cb, er);\n valid = false;\n }\n return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n if (typeof cb !== 'function') cb = nop;\n\n if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n\n return ret;\n};\n\nWritable.prototype.cork = function () {\n var state = this._writableState;\n\n state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n\n if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\n\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._writableState.highWaterMark;\n }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n var len = state.objectMode ? 1 : chunk.length;\n\n state.length += len;\n\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n pna.nextTick(cb, er);\n // this can emit finish, and it will always happen\n // after error\n pna.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n // this can emit finish, but finish must\n // always follow error\n finishMaybe(stream, state);\n }\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n\n onwriteStateUpdate(state);\n\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state);\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n /*<replacement>*/\n asyncWrite(afterWrite, stream, state, finished, cb);\n /*</replacement>*/\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new Error('_write() is not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n if (err) {\n stream.emit('error', err);\n }\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function') {\n state.pendingcb++;\n state.finalCalled = true;\n pna.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n prefinish(stream, state);\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n }\n }\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n if (state.corkedRequestsFree) {\n state.corkedRequestsFree.next = corkReq;\n } else {\n state.corkedRequestsFree = corkReq;\n }\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n get: function () {\n if (this._writableState === undefined) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._writableState.destroyed = value;\n }\n});\n\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n this.end();\n cb(err);\n};\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"../../../node_modules/process/browser.js\"), __webpack_require__(/*! ./../../timers-browserify/main.js */ \"../../../node_modules/timers-browserify/main.js\").setImmediate, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"../../../node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://restaf/C:/restaf/main/node_modules/readable-stream/lib/_stream_writable.js?");
|
|
1205
1205
|
|
|
1206
1206
|
/***/ }),
|
|
1207
1207
|
|
|
@@ -1214,7 +1214,7 @@ eval("/* WEBPACK VAR INJECTION */(function(process, setImmediate, global) {// Co
|
|
|
1214
1214
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1215
1215
|
|
|
1216
1216
|
"use strict";
|
|
1217
|
-
eval("\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"../../../node_modules/safe-buffer/index.js\").Buffer;\nvar util = __webpack_require__(/*! util */ 3);\n\nfunction copyBuffer(src, target, offset) {\n src.copy(target, offset);\n}\n\nmodule.exports = function () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n\n BufferList.prototype.push = function push(v) {\n var entry = { data: v, next: null };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n };\n\n BufferList.prototype.unshift = function unshift(v) {\n var entry = { data: v, next: this.head };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n };\n\n BufferList.prototype.shift = function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n };\n\n BufferList.prototype.clear = function clear() {\n this.head = this.tail = null;\n this.length = 0;\n };\n\n BufferList.prototype.join = function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) {\n ret += s + p.data;\n }return ret;\n };\n\n BufferList.prototype.concat = function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n if (this.length === 1) return this.head.data;\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n };\n\n return BufferList;\n}();\n\nif (util && util.inspect && util.inspect.custom) {\n module.exports.prototype[util.inspect.custom] = function () {\n var obj = util.inspect({ length: this.length });\n return this.constructor.name + ' ' + obj;\n };\n}\n\n//# sourceURL=webpack://restaf/C:/restaf/main/node_modules/readable-stream/lib/internal/streams/BufferList.js?");
|
|
1217
|
+
eval("\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"../../../node_modules/readable-stream/node_modules/safe-buffer/index.js\").Buffer;\nvar util = __webpack_require__(/*! util */ 3);\n\nfunction copyBuffer(src, target, offset) {\n src.copy(target, offset);\n}\n\nmodule.exports = function () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n\n BufferList.prototype.push = function push(v) {\n var entry = { data: v, next: null };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n };\n\n BufferList.prototype.unshift = function unshift(v) {\n var entry = { data: v, next: this.head };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n };\n\n BufferList.prototype.shift = function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n };\n\n BufferList.prototype.clear = function clear() {\n this.head = this.tail = null;\n this.length = 0;\n };\n\n BufferList.prototype.join = function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) {\n ret += s + p.data;\n }return ret;\n };\n\n BufferList.prototype.concat = function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n if (this.length === 1) return this.head.data;\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n };\n\n return BufferList;\n}();\n\nif (util && util.inspect && util.inspect.custom) {\n module.exports.prototype[util.inspect.custom] = function () {\n var obj = util.inspect({ length: this.length });\n return this.constructor.name + ' ' + obj;\n };\n}\n\n//# sourceURL=webpack://restaf/C:/restaf/main/node_modules/readable-stream/lib/internal/streams/BufferList.js?");
|
|
1218
1218
|
|
|
1219
1219
|
/***/ }),
|
|
1220
1220
|
|
|
@@ -1243,6 +1243,18 @@ eval("module.exports = __webpack_require__(/*! events */ \"../../../node_modules
|
|
|
1243
1243
|
|
|
1244
1244
|
/***/ }),
|
|
1245
1245
|
|
|
1246
|
+
/***/ "../../../node_modules/readable-stream/node_modules/safe-buffer/index.js":
|
|
1247
|
+
/*!*************************************************************************************!*\
|
|
1248
|
+
!*** C:/restaf/main/node_modules/readable-stream/node_modules/safe-buffer/index.js ***!
|
|
1249
|
+
\*************************************************************************************/
|
|
1250
|
+
/*! no static exports found */
|
|
1251
|
+
/*! all exports used */
|
|
1252
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1253
|
+
|
|
1254
|
+
eval("/* eslint-disable node/no-deprecated-api */\nvar buffer = __webpack_require__(/*! buffer */ \"../../../node_modules/buffer/index.js\")\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n\n\n//# sourceURL=webpack://restaf/C:/restaf/main/node_modules/readable-stream/node_modules/safe-buffer/index.js?");
|
|
1255
|
+
|
|
1256
|
+
/***/ }),
|
|
1257
|
+
|
|
1246
1258
|
/***/ "../../../node_modules/readable-stream/readable-browser.js":
|
|
1247
1259
|
/*!***********************************************************************!*\
|
|
1248
1260
|
!*** C:/restaf/main/node_modules/readable-stream/readable-browser.js ***!
|
|
@@ -1315,7 +1327,7 @@ eval("\n\n/**\n * Check if we're required to add a port number.\n *\n * @see htt
|
|
|
1315
1327
|
/*! all exports used */
|
|
1316
1328
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1317
1329
|
|
|
1318
|
-
eval("/* eslint-disable node/no-deprecated-api */\nvar buffer = __webpack_require__(/*! buffer */ \"../../../node_modules/buffer/index.js\")\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n\n\n//# sourceURL=webpack://restaf/C:/restaf/main/node_modules/safe-buffer/index.js?");
|
|
1330
|
+
eval("/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = __webpack_require__(/*! buffer */ \"../../../node_modules/buffer/index.js\")\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n\n\n//# sourceURL=webpack://restaf/C:/restaf/main/node_modules/safe-buffer/index.js?");
|
|
1319
1331
|
|
|
1320
1332
|
/***/ }),
|
|
1321
1333
|
|
|
@@ -1401,19 +1413,7 @@ eval("/* WEBPACK VAR INJECTION */(function(process, Buffer, global) {var capabil
|
|
|
1401
1413
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1402
1414
|
|
|
1403
1415
|
"use strict";
|
|
1404
|
-
eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\n/*<replacement>*/\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"../../../node_modules/
|
|
1405
|
-
|
|
1406
|
-
/***/ }),
|
|
1407
|
-
|
|
1408
|
-
/***/ "../../../node_modules/string_decoder/node_modules/safe-buffer/index.js":
|
|
1409
|
-
/*!************************************************************************************!*\
|
|
1410
|
-
!*** C:/restaf/main/node_modules/string_decoder/node_modules/safe-buffer/index.js ***!
|
|
1411
|
-
\************************************************************************************/
|
|
1412
|
-
/*! no static exports found */
|
|
1413
|
-
/*! all exports used */
|
|
1414
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1415
|
-
|
|
1416
|
-
eval("/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = __webpack_require__(/*! buffer */ \"../../../node_modules/buffer/index.js\")\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n\n\n//# sourceURL=webpack://restaf/C:/restaf/main/node_modules/string_decoder/node_modules/safe-buffer/index.js?");
|
|
1416
|
+
eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\n/*<replacement>*/\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"../../../node_modules/safe-buffer/index.js\").Buffer;\n/*</replacement>*/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n encoding = '' + encoding;\n switch (encoding && encoding.toLowerCase()) {\n case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n return true;\n default:\n return false;\n }\n};\n\nfunction _normalizeEncoding(enc) {\n if (!enc) return 'utf8';\n var retried;\n while (true) {\n switch (enc) {\n case 'utf8':\n case 'utf-8':\n return 'utf8';\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 'utf16le';\n case 'latin1':\n case 'binary':\n return 'latin1';\n case 'base64':\n case 'ascii':\n case 'hex':\n return enc;\n default:\n if (retried) return; // undefined\n enc = ('' + enc).toLowerCase();\n retried = true;\n }\n }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n switch (this.encoding) {\n case 'utf16le':\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n case 'utf8':\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n case 'base64':\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n if (buf.length === 0) return '';\n var r;\n var i;\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === undefined) return '';\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n var j = buf.length - 1;\n if (j < i) return 0;\n var nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 1;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 2;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n }\n return nb;\n }\n return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n if ((buf[0] & 0xC0) !== 0x80) {\n self.lastNeed = 0;\n return '\\ufffd';\n }\n if (self.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 0xC0) !== 0x80) {\n self.lastNeed = 1;\n return '\\ufffd';\n }\n if (self.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 0xC0) !== 0x80) {\n self.lastNeed = 2;\n return '\\ufffd';\n }\n }\n }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed) return buf.toString('utf8', i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + '\\ufffd';\n return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString('utf16le', 0, end);\n }\n return r;\n}\n\nfunction base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0) return buf.toString('base64', i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : '';\n}\n\n//# sourceURL=webpack://restaf/C:/restaf/main/node_modules/string_decoder/lib/string_decoder.js?");
|
|
1417
1417
|
|
|
1418
1418
|
/***/ }),
|
|
1419
1419
|
|
|
@@ -2187,7 +2187,7 @@ eval("/* harmony import */ var _actionTypes__WEBPACK_IMPORTED_MODULE_0__ = __web
|
|
|
2187
2187
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2188
2188
|
|
|
2189
2189
|
"use strict";
|
|
2190
|
-
eval("/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"../../../node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _actionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../actionTypes */ \"./actionTypes/index.js\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! qs */ \"../../../node_modules/qs/lib/index.js\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var url_parse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! url-parse */ \"../../../node_modules/url-parse/index.js\");\n/* harmony import */ var url_parse__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(url_parse__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _keepViyaAlive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./keepViyaAlive */ \"./store/keepViyaAlive.js\");\n/* eslint-disable no-prototype-builtins */\n\n/*\r\n * ------------------------------------------------------------------------------------\r\n * Copyright (c) SAS Institute Inc.\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ---------------------------------------------------------------------------------------\r\n *\r\n */\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\n\n\n\n\n/**\r\n * @description logon or connect to Viya\r\n * @module logon\r\n * @category restaf/core\r\n * @param {rafLogonPayload} See type definition for details\r\n * @returns {promise} returns a text 'done' if successful\r\n * @example\r\nlet restaf = require(\"@sassoftware/restaf\");\r\n\r\nlet logonPayload = {\r\n authType: 'password',\r\n host: process.env.VIYA_SERVER,\r\n clientID: 'sas.ec',\r\n clientSecret: '',\r\n user: 'sastest1',\r\n password: 'Go4thsas'\r\n};\r\n\r\nlet store = restaf.initStore();\r\n\r\nstore.logon(logonPayload)\r\n .then ( r => console.log(r))\r\n .catch( err => console.log(err));\r\n\r\n */\n\nvar logon = function logon(store, ipayload) {\n return new Promise(function (resolve, reject) {\n var unSubscribe;\n var action;\n var implicitLogon = false;\n var urlInfo = null;\n var payload = ipayload == null ? null : _objectSpread({}, ipayload);\n\n if (store.getState().connections.get('currentConnection') >= 0) {\n resolve('ready');\n } else {\n var logonExit = function logonExit() {\n var newState = store.getState().connections;\n var runStatus = newState.get('runStatus');\n\n if (runStatus === 'ready') {\n unSubscribe();\n\n if (ipayload != null && ipayload.keepAlive != null) {\n var interval = 300;\n var timeout = 14400;\n\n if (ipayload.timers != null) {\n var timers = ipayload.timers;\n\n if (typeof timers === 'string') {\n var opts = timers.split(',');\n interval = parseInt(opts[0]);\n timeout = parseInt(opts[1]);\n } else {\n interval = timers[0];\n timeout = timers[1];\n }\n }\n\n Object(_keepViyaAlive__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(store, ipayload.keepAlive, interval, timeout, ipayload.onTimeout);\n }\n\n resolve(runStatus);\n } else if (runStatus === 'error') {\n unSubscribe();\n reject(newState.get('statusInfo').toJS());\n }\n }; //\n // check url if not password (no window) or when payload is null\n // this allows users of restaf-server|viya-appserverjs to LOGONPAYLOAD unconditionally to logon\n //\n\n\n if (payload === null || payload.authType === _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGON_IMPLICIT */ \"v\"]) {\n urlInfo = parseUrlNext();\n\n if (payload !== null && urlInfo !== null) {\n payload = _objectSpread(_objectSpread({}, payload), urlInfo);\n }\n }\n\n if (payload == null) {\n if (urlInfo !== null) {\n payload = urlInfo;\n } else {\n payload = {\n host: \"\".concat(window.location.protocol, \"//\").concat(window.location.host),\n authType: _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGON_SERVER */ \"x\"]\n };\n }\n } // persist options in payload - currently used for pup support\n\n\n store.config.options = {};\n\n if (payload.options != null) {\n store.config.options = _objectSpread({}, payload.options);\n } // now make the final decision\n\n\n
|
|
2190
|
+
eval("/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"../../../node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _actionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../actionTypes */ \"./actionTypes/index.js\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! qs */ \"../../../node_modules/qs/lib/index.js\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var url_parse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! url-parse */ \"../../../node_modules/url-parse/index.js\");\n/* harmony import */ var url_parse__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(url_parse__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _keepViyaAlive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./keepViyaAlive */ \"./store/keepViyaAlive.js\");\n/* eslint-disable no-prototype-builtins */\n\n/*\r\n * ------------------------------------------------------------------------------------\r\n * Copyright (c) SAS Institute Inc.\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ---------------------------------------------------------------------------------------\r\n *\r\n */\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\n\n\n\n\n/**\r\n * @description logon or connect to Viya\r\n * @module logon\r\n * @category restaf/core\r\n * @param {rafLogonPayload} See type definition for details\r\n * @returns {promise} returns a text 'done' if successful\r\n * @example\r\nlet restaf = require(\"@sassoftware/restaf\");\r\n\r\nlet logonPayload = {\r\n authType: 'password',\r\n host: process.env.VIYA_SERVER,\r\n clientID: 'sas.ec',\r\n clientSecret: '',\r\n user: 'sastest1',\r\n password: 'Go4thsas'\r\n};\r\n\r\nlet store = restaf.initStore();\r\n\r\nstore.logon(logonPayload)\r\n .then ( r => console.log(r))\r\n .catch( err => console.log(err));\r\n\r\n */\n\nvar logon = function logon(store, ipayload) {\n return new Promise(function (resolve, reject) {\n var unSubscribe;\n var action;\n var implicitLogon = false;\n var urlInfo = null;\n var payload = ipayload == null ? null : _objectSpread({}, ipayload);\n\n if (store.getState().connections.get('currentConnection') >= 0) {\n resolve('ready');\n } else {\n var logonExit = function logonExit() {\n var newState = store.getState().connections;\n var runStatus = newState.get('runStatus');\n\n if (runStatus === 'ready') {\n unSubscribe();\n\n if (ipayload != null && ipayload.keepAlive != null) {\n var interval = 300;\n var timeout = 14400;\n\n if (ipayload.timers != null) {\n var timers = ipayload.timers;\n\n if (typeof timers === 'string') {\n var opts = timers.split(',');\n interval = parseInt(opts[0]);\n timeout = parseInt(opts[1]);\n } else {\n interval = timers[0];\n timeout = timers[1];\n }\n }\n\n Object(_keepViyaAlive__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(store, ipayload.keepAlive, interval, timeout, ipayload.onTimeout);\n }\n\n resolve(runStatus);\n } else if (runStatus === 'error') {\n unSubscribe();\n reject(newState.get('statusInfo').toJS());\n }\n }; //\n // check url if not password (no window) or when payload is null\n // this allows users of restaf-server|viya-appserverjs to LOGONPAYLOAD unconditionally to logon\n //\n\n\n if (payload === null || payload.authType === _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGON_IMPLICIT */ \"v\"]) {\n urlInfo = parseUrlNext();\n\n if (payload !== null && urlInfo !== null) {\n payload = _objectSpread(_objectSpread({}, payload), urlInfo);\n }\n }\n\n if (payload == null) {\n if (urlInfo !== null) {\n payload = urlInfo;\n } else {\n payload = {\n host: \"\".concat(window.location.protocol, \"//\").concat(window.location.host),\n authType: _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGON_SERVER */ \"x\"]\n };\n }\n } // persist options in payload - currently used for pup support\n\n\n store.config.options = {};\n\n if (payload.options != null) {\n store.config.options = _objectSpread({}, payload.options);\n } // now make the final decision\n\n\n if (payload.authType === 'code') {\n payload.authType = 'server';\n }\n\n switch (payload.authType) {\n case _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGON_TOKEN */ \"y\"]:\n case _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGON_SERVER */ \"x\"]:\n if (payload.host == null) {\n payload.host = \"\".concat(window.location.protocol, \"//\").concat(window.location.host);\n }\n\n break;\n\n case _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGON_IMPLICIT */ \"v\"]:\n if (payload.hasOwnProperty('token') === false) {\n implicitLogon = true;\n getToken(payload);\n resolve('Implicit Call');\n }\n\n break;\n\n case \"LOGOFF\":\n break;\n\n default:\n break;\n }\n\n if (!implicitLogon) {\n action = {\n type: payload.authType === 'LOGOFF' ? _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGOFF */ \"r\"] : _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGON */ \"t\"],\n payload: _objectSpread({}, payload)\n };\n action.payload.sslOptions = store.config.hasOwnProperty('sslOptions') ? store.config.sslOptions : null;\n unSubscribe = store.subscribe(logonExit);\n action.storeConfig = store.config; // action.type = VIYA_LOGON;\n\n store.dispatch(action);\n }\n }\n });\n};\n\nfunction getToken(payload) {\n var x = \"\".concat(payload.host, \"/SASLogon/oauth/authorize?response_type=token&client_id=\").concat(payload.clientID); //noinspection JSUnresolvedVariable\n\n if (payload.redirect != null) {\n //noinspection JSUnresolvedVariable\n var redirectUri = \"\".concat(window.location.protocol, \"//\").concat(window.location.host, \"/\").concat(payload.redirect, \"?host=\").concat(payload.host);\n x = \"\".concat(x, \"&redirect_uri=\").concat(redirectUri);\n }\n\n window.location.replace(x);\n}\n\nfunction parseUrlNext() {\n if (window == null) {\n return null;\n }\n\n var url = url_parse__WEBPACK_IMPORTED_MODULE_3___default()(window.location, true);\n var loc = qs__WEBPACK_IMPORTED_MODULE_2___default.a.parse(url.hash);\n var q = url.query;\n\n if (q.host == null || loc.access_token == null) {\n return null;\n }\n\n var tokenType = 'bearer';\n\n if (loc['#token_type'] != null) {\n tokenType = loc['#token_type'];\n } else if (loc['token_type'] != null) {\n tokenType = loc['token_type'];\n }\n\n var payload = {\n host: q.host,\n authType: _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGON_IMPLICIT */ \"v\"],\n tokenType: tokenType,\n token: loc.access_token\n };\n return payload;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (logon);\n\n//# sourceURL=webpack://restaf/./store/logon.js?");
|
|
2191
2191
|
|
|
2192
2192
|
/***/ }),
|
|
2193
2193
|
|
|
@@ -2252,7 +2252,7 @@ eval("/* harmony import */ var _extendFolder__WEBPACK_IMPORTED_MODULE_0__ = __we
|
|
|
2252
2252
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2253
2253
|
|
|
2254
2254
|
"use strict";
|
|
2255
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _apiCall__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./apiCall */ \"./store/apiCall.js\");\n/* harmony import */ var _jobState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./jobState */ \"./store/jobState.js\");\n/*\r\n * ------------------------------------------------------------------------------------\r\n * * Copyright (c) SAS Institute Inc.\r\n * * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * * you may not use this file except in compliance with the License.\r\n * * You may obtain a copy of the License at\r\n * *\r\n * * http://www.apache.org/licenses/LICENSE-2.0\r\n * *\r\n * * Unless required by applicable law or agreed to in writing, software\r\n * * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ----------------------------------------------------------------------------------------\r\n *\r\n */\n\n\n\n\n\n\n/**\r\n * @Description Run a given action\r\n * @async\r\n * @module runAction\r\n * @category restaf/core\r\n * @param {rafObject} session - cas session\r\n * @param {casPayload} payload - payload for cas actions\r\n * @returns {promise} returns rafObject\r\n * @example\r\n * \r\nlet restaf = require(\"@sassoftware/restaf\");\r\nlet payload = require('./config')();\r\nlet {casSetup} = require(\"@sassoftware/restaflib\");\r\n\r\nlet prtUtil = require(\"./prtUtil\");\r\n\r\nlet store = restaf.initStore({casProxy: true});\r\nasync function example () {\r\n console.log(payload);\r\n let { session } = await casSetup(store, payload, \"cas\");\r\n\r\n let p = {\r\n action: \"echo\",\r\n data : { code: \"data casuser.data1; x=1;put x= ; run; \" }\r\n };\r\n \r\n let r = await store.runAction(session, p);\r\n console.log(JSON.stringify(r.items(), null, 4));\r\n return \"done\";\r\n}\r\n\r\nexample()\r\n .then(r => console.log(r))\r\n .catch(err => console.log(err));\r\n \r\n */\n\nfunction runAction(_x, _x2, _x3, _x4, _x5, _x6, _x7, _x8) {\n return _runAction.apply(this, arguments);\n}\n\nfunction _runAction() {\n _runAction = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, payload, context, onCompletion, maxTries, delay, progress) {\n var actionResult;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n actionResult = null;\n\n if (!(maxTries != null)) {\n _context.next = 7;\n break;\n }\n\n _context.next = 4;\n return submitAction(store, session, payload, context, maxTries, delay, progress);\n\n case 4:\n actionResult = _context.sent;\n _context.next = 10;\n break;\n\n case 7:\n _context.next = 9;\n return Object(_apiCall__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session.links('execute'), payload, 0);\n\n case 9:\n actionResult = _context.sent;\n\n case 10:\n if (!(casError(actionResult) === true)) {\n _context.next = 12;\n break;\n }\n\n throw JSON.stringify(actionResult.items());\n\n case 12:\n if (onCompletion != null) {\n onCompletion(context, actionResult);\n }\n\n return _context.abrupt(\"return\", actionResult);\n\n case 14:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _runAction.apply(this, arguments);\n}\n\nfunction casError(actionResult) {\n var statusCode = actionResult.items('disposition', 'statusCode');\n var severity = actionResult.items('disposition', 'severity').toLowerCase();\n return statusCode !== 0 || severity === 'error' ? true : false;\n}\n\nfunction submitAction(_x9, _x10, _x11, _x12, _x13, _x14, _x15) {\n return _submitAction.apply(this, arguments);\n}\n\nfunction _submitAction() {\n _submitAction = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee2(store, session, payload, context, maxTries, delay, progress) {\n var actionPromise, r, result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n actionPromise = Object(_apiCall__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session.links('execute'), payload, 0);\n _context2.next = 3;\n return Object(_jobState__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, session, null, maxTries, delay, progress, context, true);\n\n case 3:\n r = _context2.sent;\n result = actionPromise.then(function (result) {\n return result;\n }, function (err) {\n return err;\n });\n return _context2.abrupt(\"return\", result);\n\n case 6:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n return _submitAction.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (runAction);\n\n//# sourceURL=webpack://restaf/./store/runAction.js?");
|
|
2255
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _apiCall__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./apiCall */ \"./store/apiCall.js\");\n/* harmony import */ var _jobState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./jobState */ \"./store/jobState.js\");\n/*\r\n * ------------------------------------------------------------------------------------\r\n * * Copyright (c) SAS Institute Inc.\r\n * * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * * you may not use this file except in compliance with the License.\r\n * * You may obtain a copy of the License at\r\n * *\r\n * * http://www.apache.org/licenses/LICENSE-2.0\r\n * *\r\n * * Unless required by applicable law or agreed to in writing, software\r\n * * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ----------------------------------------------------------------------------------------\r\n *\r\n */\n\n\n\n\n\n\n/**\r\n * @Description Run a given action\r\n * @async\r\n * @module runAction\r\n * @category restaf/core\r\n * @param {rafObject} session - cas session\r\n * @param {casPayload} payload - payload for cas actions\r\n * @returns {promise} returns rafObject\r\n * @example\r\n * \r\nlet restaf = require(\"@sassoftware/restaf\");\r\nlet payload = require('./config')();\r\nlet {casSetup} = require(\"@sassoftware/restaflib\");\r\n\r\nlet prtUtil = require(\"./prtUtil\");\r\n\r\nlet store = restaf.initStore({casProxy: true});\r\nasync function example () {\r\n console.log(payload);\r\n let { session } = await casSetup(store, payload, \"cas\");\r\n\r\n let p = {\r\n action: \"echo\",\r\n data : { code: \"data casuser.data1; x=1;put x= ; run; \" }\r\n };\r\n \r\n let r = await store.runAction(session, p);\r\n console.log(JSON.stringify(r.items(), null, 4));\r\n return \"done\";\r\n}\r\n\r\nexample()\r\n .then(r => console.log(r))\r\n .catch(err => console.log(err));\r\n \r\n */\n\nfunction runAction(_x, _x2, _x3, _x4, _x5, _x6, _x7, _x8) {\n return _runAction.apply(this, arguments);\n}\n\nfunction _runAction() {\n _runAction = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, payload, context, onCompletion, maxTries, delay, progress) {\n var actionResult;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n actionResult = null;\n\n if (!(maxTries != null)) {\n _context.next = 7;\n break;\n }\n\n _context.next = 4;\n return submitAction(store, session, payload, context, maxTries, delay, progress);\n\n case 4:\n actionResult = _context.sent;\n _context.next = 10;\n break;\n\n case 7:\n _context.next = 9;\n return Object(_apiCall__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session.links('execute'), payload, 0);\n\n case 9:\n actionResult = _context.sent;\n\n case 10:\n if (!(casError(actionResult) === true)) {\n _context.next = 12;\n break;\n }\n\n throw JSON.stringify(actionResult.items('disposition').toJS());\n\n case 12:\n if (onCompletion != null) {\n onCompletion(context, actionResult);\n }\n\n return _context.abrupt(\"return\", actionResult);\n\n case 14:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _runAction.apply(this, arguments);\n}\n\nfunction casError(actionResult) {\n var statusCode = actionResult.items('disposition', 'statusCode');\n var severity = actionResult.items('disposition', 'severity').toLowerCase();\n return statusCode !== 0 || severity === 'error' ? true : false;\n}\n\nfunction submitAction(_x9, _x10, _x11, _x12, _x13, _x14, _x15) {\n return _submitAction.apply(this, arguments);\n}\n\nfunction _submitAction() {\n _submitAction = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee2(store, session, payload, context, maxTries, delay, progress) {\n var actionPromise, r, result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n actionPromise = Object(_apiCall__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session.links('execute'), payload, 0);\n _context2.next = 3;\n return Object(_jobState__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, session, null, maxTries, delay, progress, context, true);\n\n case 3:\n r = _context2.sent;\n result = actionPromise.then(function (result) {\n return result;\n }, function (err) {\n return err;\n });\n return _context2.abrupt(\"return\", result);\n\n case 6:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n return _submitAction.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (runAction);\n\n//# sourceURL=webpack://restaf/./store/runAction.js?");
|
|
2256
2256
|
|
|
2257
2257
|
/***/ }),
|
|
2258
2258
|
|
package/dist/restaf.min.js
CHANGED
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
10
10
|
e.read=function(t,e,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,f=-7,l=r?o-1:0,p=r?-1:1,h=t[e+l];for(l+=p,i=h&(1<<-f)-1,h>>=-f,f+=s;f>0;i=256*i+t[e+l],l+=p,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=n;f>0;a=256*a+t[e+l],l+=p,f-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),i-=c}return(h?-1:1)*a*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var a,s,u,c=8*i-o-1,f=(1<<c)-1,l=f>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?p/u:p*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(e*u-1)*Math.pow(2,o),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;t[r+h]=255&s,h+=d,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;t[r+h]=255&a,h+=d,a/=256,c-=8);t[r+h-d]|=128*y}},function(t,e,r){"use strict";var n=r(3),o=r(26),i=r(53),a=r(32);var s=function t(e){var r=new i(e),s=o(i.prototype.request,r);return n.extend(s,i.prototype,r),n.extend(s,r),s.create=function(r){return t(a(e,r))},s}(r(14));s.Axios=i,s.Cancel=r(15),s.CancelToken=r(66),s.isCancel=r(31),s.VERSION=r(33).version,s.all=function(t){return Promise.all(t)},s.spread=r(67),s.isAxiosError=r(68),t.exports=s,t.exports.default=s},function(t,e,r){"use strict";var n=r(3),o=r(27),i=r(54),a=r(55),s=r(32),u=r(65),c=u.validators;function f(t){this.defaults=t,this.interceptors={request:new i,response:new i}}f.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&u.assertOptions(e,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var r=[],n=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(n=n&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(t){i.push(t.fulfilled,t.rejected)})),!n){var f=[a,void 0];for(Array.prototype.unshift.apply(f,r),f=f.concat(i),o=Promise.resolve(t);f.length;)o=o.then(f.shift(),f.shift());return o}for(var l=t;r.length;){var p=r.shift(),h=r.shift();try{l=p(l)}catch(t){h(t);break}}try{o=a(l)}catch(t){return Promise.reject(t)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},f.prototype.getUri=function(t){return t=s(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(t){f.prototype[t]=function(e,r){return this.request(s(r||{},{method:t,url:e,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(t){f.prototype[t]=function(e,r,n){return this.request(s(n||{},{method:t,url:e,data:r}))}})),t.exports=f},function(t,e,r){"use strict";var n=r(3);function o(){this.handlers=[]}o.prototype.use=function(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){n.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=o},function(t,e,r){"use strict";var n=r(3),o=r(56),i=r(31),a=r(14),s=r(15);function u(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new s("canceled")}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=o.call(t,t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return u(t),e.data=o.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return i(e)||(u(t),e&&e.response&&(e.response.data=o.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,r){"use strict";var n=r(3),o=r(14);t.exports=function(t,e,r){var i=this||o;return n.forEach(r,(function(r){t=r.call(i,t,e)})),t}},function(t,e,r){"use strict";var n=r(3);t.exports=function(t,e){n.forEach(t,(function(r,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[n])}))}},function(t,e,r){"use strict";var n=r(30);t.exports=function(t,e,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?e(n("Request failed with status code "+r.status,r.config,null,r.request,r)):t(r)}},function(t,e,r){"use strict";var n=r(3);t.exports=n.isStandardBrowserEnv()?{write:function(t,e,r,o,i,a){var s=[];s.push(t+"="+encodeURIComponent(e)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,r){"use strict";var n=r(61),o=r(62);t.exports=function(t,e){return t&&!n(e)?o(t,e):e}},function(t,e,r){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,r){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,r){"use strict";var n=r(3),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,r,i,a={};return t?(n.forEach(t.split("\n"),(function(t){if(i=t.indexOf(":"),e=n.trim(t.substr(0,i)).toLowerCase(),r=n.trim(t.substr(i+1)),e){if(a[e]&&o.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([r]):a[e]?a[e]+", "+r:r}})),a):a}},function(t,e,r){"use strict";var n=r(3);t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(t){var n=t;return e&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=o(window.location.href),function(e){var r=n.isString(e)?o(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},function(t,e,r){"use strict";var n=r(33).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){o[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));var i={};o.transitional=function(t,e,r){function o(t,e){return"[Axios v"+n+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return function(r,n,a){if(!1===t)throw new Error(o(n," has been removed"+(e?" in "+e:"")));return e&&!i[n]&&(i[n]=!0,console.warn(o(n," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,n,a)}},t.exports={assertOptions:function(t,e,r){if("object"!=typeof t)throw new TypeError("options must be an object");for(var n=Object.keys(t),o=n.length;o-- >0;){var i=n[o],a=e[i];if(a){var s=t[i],u=void 0===s||a(s,i,t);if(!0!==u)throw new TypeError("option "+i+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:o}},function(t,e,r){"use strict";var n=r(15);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var r=this;this.promise.then((function(t){if(r._listeners){var e,n=r._listeners.length;for(e=0;e<n;e++)r._listeners[e](t);r._listeners=null}})),this.promise.then=function(t){var e,n=new Promise((function(t){r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t){r.reason||(r.reason=new n(t),e(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},o.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},o.source=function(){var t;return{token:new o((function(e){t=e})),cancel:t}},t.exports=o},function(t,e,r){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,r){"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},function(t,e,r){"use strict";var n=r(70),o=r(34),i=r(22),a=Object.prototype.hasOwnProperty,s={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},u=Array.isArray,c=String.prototype.split,f=Array.prototype.push,l=function(t,e){f.apply(t,u(e)?e:[e])},p=Date.prototype.toISOString,h=i.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:h,formatter:i.formatters[h],indices:!1,serializeDate:function(t){return p.call(t)},skipNulls:!1,strictNullHandling:!1},y={},v=function t(e,r,i,a,s,f,p,h,v,g,m,b,_,w,O,S){for(var j,E=e,x=S,A=0,P=!1;void 0!==(x=x.get(y))&&!P;){var k=x.get(e);if(A+=1,void 0!==k){if(k===A)throw new RangeError("Cyclic object value");P=!0}void 0===x.get(y)&&(A=0)}if("function"==typeof h?E=h(r,E):E instanceof Date?E=m(E):"comma"===i&&u(E)&&(E=o.maybeMap(E,(function(t){return t instanceof Date?m(t):t}))),null===E){if(s)return p&&!w?p(r,d.encoder,O,"key",b):r;E=""}if("string"==typeof(j=E)||"number"==typeof j||"boolean"==typeof j||"symbol"==typeof j||"bigint"==typeof j||o.isBuffer(E)){if(p){var T=w?r:p(r,d.encoder,O,"key",b);if("comma"===i&&w){for(var I=c.call(String(E),","),R="",C=0;C<I.length;++C)R+=(0===C?"":",")+_(p(I[C],d.encoder,O,"value",b));return[_(T)+(a&&u(E)&&1===I.length?"[]":"")+"="+R]}return[_(T)+"="+_(p(E,d.encoder,O,"value",b))]}return[_(r)+"="+_(String(E))]}var L,M=[];if(void 0===E)return M;if("comma"===i&&u(E))L=[{value:E.length>0?E.join(",")||null:void 0}];else if(u(h))L=h;else{var D=Object.keys(E);L=v?D.sort(v):D}for(var N=a&&u(E)&&1===E.length?r+"[]":r,U=0;U<L.length;++U){var B=L[U],q="object"==typeof B&&void 0!==B.value?B.value:E[B];if(!f||null!==q){var z=u(E)?"function"==typeof i?i(N,B):N:N+(g?"."+B:"["+B+"]");S.set(e,A);var F=n();F.set(y,S),l(M,t(q,z,i,a,s,f,p,h,v,g,m,b,_,w,O,F))}}return M};t.exports=function(t,e){var r,o=t,c=function(t){if(!t)return d;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||d.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==t.format){if(!a.call(i.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var n=i.formatters[r],o=d.filter;return("function"==typeof t.filter||u(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:d.addQueryPrefix,allowDots:void 0===t.allowDots?d.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:d.charsetSentinel,delimiter:void 0===t.delimiter?d.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:d.encode,encoder:"function"==typeof t.encoder?t.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:d.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:d.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:d.strictNullHandling}}(e);"function"==typeof c.filter?o=(0,c.filter)("",o):u(c.filter)&&(r=c.filter);var f,p=[];if("object"!=typeof o||null===o)return"";f=e&&e.arrayFormat in s?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var h=s[f];if(e&&"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var y="comma"===h&&e&&e.commaRoundTrip;r||(r=Object.keys(o)),c.sort&&r.sort(c.sort);for(var g=n(),m=0;m<r.length;++m){var b=r[m];c.skipNulls&&null===o[b]||l(p,v(o[b],b,h,y,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,g))}var _=p.join(c.delimiter),w=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),_.length>0?w+_:""}},function(t,e,r){"use strict";var n=r(20),o=r(75),i=r(77),a=n("%TypeError%"),s=n("%WeakMap%",!0),u=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),f=o("WeakMap.prototype.set",!0),l=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),h=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),y=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return c(t,n)}else if(u){if(e)return p(e,n)}else if(r)return function(t,e){var r=y(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return l(t,n)}else if(u){if(e)return d(e,n)}else if(r)return function(t,e){return!!y(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),f(t,n,o)):u?(e||(e=new u),h(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=y(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(72);t.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},function(t,e,r){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},function(t,e,r){"use strict";var n="Function.prototype.bind called on incompatible ",o=Array.prototype.slice,i=Object.prototype.toString;t.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==i.call(e))throw new TypeError(n+e);for(var r,a=o.call(arguments,1),s=function(){if(this instanceof r){var n=e.apply(this,a.concat(o.call(arguments)));return Object(n)===n?n:this}return e.apply(t,a.concat(o.call(arguments)))},u=Math.max(0,e.length-a.length),c=[],f=0;f<u;f++)c.push("$"+f);if(r=Function("binder","return function ("+c.join(",")+"){ return binder.apply(this,arguments); }")(s),e.prototype){var l=function(){};l.prototype=e.prototype,r.prototype=new l,l.prototype=null}return r}},function(t,e,r){"use strict";var n=r(21);t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},function(t,e,r){"use strict";var n=r(20),o=r(76),i=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o(r):r}},function(t,e,r){"use strict";var n=r(21),o=r(20),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),f=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(n,a,arguments);if(u&&c){var r=u(e,"length");r.configurable&&c(e,"length",{value:1+f(0,t.length-(arguments.length-1))})}return e};var l=function(){return s(n,i,arguments)};c?c(t.exports,"apply",{value:l}):t.exports.apply=l},function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,f=s&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,y=Object.prototype.toString,v=Function.prototype.toString,g=String.prototype.match,m=String.prototype.slice,b=String.prototype.replace,_=String.prototype.toUpperCase,w=String.prototype.toLowerCase,O=RegExp.prototype.test,S=Array.prototype.concat,j=Array.prototype.join,E=Array.prototype.slice,x=Math.floor,A="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T||"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,C=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function L(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||O.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-x(-t):x(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return b.call(o,r,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(e,r,"$&_")}var M=r(78),D=M.custom,N=F(D)?D:null;function U(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function B(t){return b.call(String(t),/"/g,""")}function q(t){return!("[object Array]"!==G(t)||I&&"object"==typeof t&&I in t)}function z(t){return!("[object RegExp]"!==G(t)||I&&"object"==typeof t&&I in t)}function F(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!k)return!1;try{return k.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(W(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(W(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!W(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(W(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return function t(e,r){if(e.length>r.maxStringLength){var n=e.length-r.maxStringLength,o="... "+n+" more character"+(n>1?"s":"");return t(m.call(e,0,r.maxStringLength),r)+o}return U(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",r)}(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var _=String(e);return y?L(e,_):_}if("bigint"==typeof e){var O=String(e)+"n";return y?L(e,O):O}var x=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=x&&x>0&&"object"==typeof e)return q(e)?"[Array]":"[Object]";var P=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=j.call(Array(t.indent+1)," ")}return{base:r,prev:j.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(Y(o,e)>=0)return"[Circular]";function D(e,r,i){if(r&&(o=E.call(o)).push(r),i){var a={depth:s.depth};return W(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!z(e)){var H=function(t){if(t.name)return t.name;var e=g.call(v.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(e),Z=Q(e,D);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(Z.length>0?" { "+j.call(Z,", ")+" }":"")}if(F(e)){var tt=T?b.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):k.call(e);return"object"!=typeof e||T?tt:V(tt)}if(function(t){if(!t||"object"!=typeof t)return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(e)){for(var et="<"+w.call(String(e.nodeName)),rt=e.attributes||[],nt=0;nt<rt.length;nt++)et+=" "+rt[nt].name+"="+U(B(rt[nt].value),"double",s);return et+=">",e.childNodes&&e.childNodes.length&&(et+="..."),et+="</"+w.call(String(e.nodeName))+">"}if(q(e)){if(0===e.length)return"[]";var ot=Q(e,D);return P&&!function(t){for(var e=0;e<t.length;e++)if(Y(t[e],"\n")>=0)return!1;return!0}(ot)?"["+X(ot,P)+"]":"[ "+j.call(ot,", ")+" ]"}if(function(t){return!("[object Error]"!==G(t)||I&&"object"==typeof t&&I in t)}(e)){var it=Q(e,D);return"cause"in Error.prototype||!("cause"in e)||R.call(e,"cause")?0===it.length?"["+String(e)+"]":"{ ["+String(e)+"] "+j.call(it,", ")+" }":"{ ["+String(e)+"] "+j.call(S.call("[cause]: "+D(e.cause),it),", ")+" }"}if("object"==typeof e&&u){if(N&&"function"==typeof e[N]&&M)return M(e,{depth:x-n});if("symbol"!==u&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var at=[];return a.call(e,(function(t,r){at.push(D(r,e,!0)+" => "+D(t,e))})),$("Map",i.call(e),at,P)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var st=[];return f.call(e,(function(t){st.push(D(t,e))})),$("Set",c.call(e),st,P)}if(function(t){if(!l||!t||"object"!=typeof t)return!1;try{l.call(t,l);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return J("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{l.call(t,l)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return J("WeakSet");if(function(t){if(!h||!t||"object"!=typeof t)return!1;try{return h.call(t),!0}catch(t){}return!1}(e))return J("WeakRef");if(function(t){return!("[object Number]"!==G(t)||I&&"object"==typeof t&&I in t)}(e))return V(D(Number(e)));if(function(t){if(!t||"object"!=typeof t||!A)return!1;try{return A.call(t),!0}catch(t){}return!1}(e))return V(D(A.call(e)));if(function(t){return!("[object Boolean]"!==G(t)||I&&"object"==typeof t&&I in t)}(e))return V(d.call(e));if(function(t){return!("[object String]"!==G(t)||I&&"object"==typeof t&&I in t)}(e))return V(D(String(e)));if(!function(t){return!("[object Date]"!==G(t)||I&&"object"==typeof t&&I in t)}(e)&&!z(e)){var ut=Q(e,D),ct=C?C(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",lt=!ct&&I&&Object(e)===e&&I in e?m.call(G(e),8,-1):ft?"Object":"",pt=(ct||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(lt||ft?"["+j.call(S.call([],lt||[],ft||[]),": ")+"] ":"");return 0===ut.length?pt+"{}":P?pt+"{"+X(ut,P)+"}":pt+"{ "+j.call(ut,", ")+" }"}return String(e)};var H=Object.prototype.hasOwnProperty||function(t){return t in this};function W(t,e){return H.call(t,e)}function G(t){return y.call(t)}function Y(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function K(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+_.call(e.toString(16))}function V(t){return"Object("+t+")"}function J(t){return t+" { ? }"}function $(t,e,r,n){return t+" ("+e+") {"+(n?X(r,n):j.call(r,", "))+"}"}function X(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+j.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=q(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=W(t,o)?e(t[o],t):""}var i,a="function"==typeof P?P(t):[];if(T){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var u in t)W(t,u)&&(r&&String(Number(u))===u&&u<t.length||T&&i["$"+u]instanceof Symbol||(O.call(/[^\w$]/,u)?n.push(e(u,t)+": "+e(t[u],t)):n.push(u+": "+e(t[u],t))));if("function"==typeof P)for(var c=0;c<a.length;c++)R.call(t,a[c])&&n.push("["+e(a[c])+"]: "+e(t[a[c]],t));return n}},function(t,e){},function(t,e,r){"use strict";var n=r(34),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},u=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},c=function(t,e,r,n){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(i),c=s?i.slice(0,s.index):i,f=[];if(c){if(!r.plainObjects&&o.call(Object.prototype,c)&&!r.allowPrototypes)return;f.push(c)}for(var l=0;r.depth>0&&null!==(s=a.exec(i))&&l<r.depth;){if(l+=1,!r.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;f.push(s[1])}return s&&f.push("["+i.slice(s.index)+"]"),function(t,e,r,n){for(var o=n?e:u(e,r),i=t.length-1;i>=0;--i){var a,s=t[i];if("[]"===s&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,f=parseInt(c,10);r.parseArrays||""!==c?!isNaN(f)&&s!==c&&String(f)===c&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(a=[])[f]=o:"__proto__"!==c&&(a[c]=o):a={0:o}}o=a}return o}(f,e,r,n)}};t.exports=function(t,e){var r=function(t){if(!t)return a;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?a.charset:t.charset;return{allowDots:void 0===t.allowDots?a.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:a.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:a.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:a.comma,decoder:"function"==typeof t.decoder?t.decoder:a.decoder,delimiter:"string"==typeof t.delimiter||n.isRegExp(t.delimiter)?t.delimiter:a.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:a.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:a.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling}}(e);if(""===t||null==t)return r.plainObjects?Object.create(null):{};for(var f="string"==typeof t?function(t,e){var r,c={},f=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,l=e.parameterLimit===1/0?void 0:e.parameterLimit,p=f.split(e.delimiter,l),h=-1,d=e.charset;if(e.charsetSentinel)for(r=0;r<p.length;++r)0===p[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[r]?d="utf-8":"utf8=%26%2310003%3B"===p[r]&&(d="iso-8859-1"),h=r,r=p.length);for(r=0;r<p.length;++r)if(r!==h){var y,v,g=p[r],m=g.indexOf("]="),b=-1===m?g.indexOf("="):m+1;-1===b?(y=e.decoder(g,a.decoder,d,"key"),v=e.strictNullHandling?null:""):(y=e.decoder(g.slice(0,b),a.decoder,d,"key"),v=n.maybeMap(u(g.slice(b+1),e),(function(t){return e.decoder(t,a.decoder,d,"value")}))),v&&e.interpretNumericEntities&&"iso-8859-1"===d&&(v=s(v)),g.indexOf("[]=")>-1&&(v=i(v)?[v]:v),o.call(c,y)?c[y]=n.combine(c[y],v):c[y]=v}return c}(t,r):t,l=r.plainObjects?Object.create(null):{},p=Object.keys(f),h=0;h<p.length;++h){var d=p[h],y=c(d,f[d],r,"string"==typeof t);l=n.merge(l,y,r)}return!0===r.allowSparse?l:n.compact(l)}},function(t,e,r){"use strict";t.exports=function(t){if(!0===t.data.results.hasOwnProperty("images")){var e=t.data.results.images,r=!0===Array.isArray(e)?[].concat(e):Object.assign({},e);r[0].id="image",t.data.results.items=r,delete t.data.results.images}}},function(t,e,r){"use strict";t.exports=function(t){for(var e=t.data.results.items,r=0;r<e.length;r++){var n="/SASReportViewer/?reportUri=/reports/reports/".concat(e[r].id),o={method:"GET",href:n,rel:"viewer",uri:n,type:"text/html",itemType:"text/html",title:"Report Viewer",extended:!0};e[r].links.push(o)}}},function(t,e,r){"use strict";t.exports=function(t,e,r,n,o){var i="".concat(!0===o?t:e,"/actions"),a="".concat(!0===o?t:e,"/isIdle");return[{method:"POST",href:i,rel:"execute",uri:i,responseType:"application/json",type:"application/json",itemType:"application/json",title:"Run CAS Action",customHandling:"casExecute",casHttp:r,server:n,extended:!0},{method:"GET",href:a,rel:"state",uri:a,responseType:"application/json",type:"application/json",itemType:"application/json",title:"state",customHandling:"casState",casHttp:r,server:n,extended:!0}]}},function(t,e,r){"use strict";t.exports=function(t){var e={},r={};if(!1===t.hasOwnProperty("results"))return t;for(var n in t.results){var o=t.results[n];!0===o.hasOwnProperty("_ctb")&&!0===o._ctb&&(e[n]=o,r[o.name]=o)}return t.tables=e,t.tablesByName=r,t}},function(t,e,r){"use strict";function n(t){for(var e=[],r=0;r<t.length;r++){var n=Object.assign({},t[r]);e.push(n)}return e}t.exports=function(t){try{for(var e=n(t.data.results.items),r=0;r<e.length;r++){var o=n(e[r].links);if(-1===o.findIndex((function(t){return"championModel"===t.rel}))){var i=e[r].championModel;if(null!=i&&null!=i.links&&i.links.length>0){for(var a=n(i.links),s=0;s<a.length;s++){var u=Object.assign({},a[s]),c=u.href.split("?")[0];u.uri=c,u.href=c,u.type="application/json","championModel"===u.rel&&"GET"===u.method.toUpperCase()?u.type="application/vnd.sas.analytics.ml.pipeline.automation.project.champion.model":"championModel"===u.rel&&"PUT"===u.method.toUpperCase()?u.responseType="*/*":"scoreData"===u.rel&&(u.responseType="application/json",u.type="application/vnd.sas.analytics.ml.pipeline.automation.score.data.input+json",u.responseType="application/vnd.sas.analytics.ml.pipeline.automation.score.data.output+json"),u.extended=!0,o.push(u)}e[r].links=o}}}t.data.results.items=e}catch(t){console.log(t)}}},function(t,e,r){var n=r(86),o=r(36),i=r(96),a=r(97),s=r(45),u=e;u.request=function(t,e){t="string"==typeof t?s.parse(t):i(t);var r=-1===Object({}).location.protocol.search(/^https?:$/)?"http:":"",o=t.protocol||r,a=t.hostname||t.host,u=t.port,c=t.path||"/";a&&-1!==a.indexOf(":")&&(a="["+a+"]"),t.url=(a?o+"//"+a:"")+(u?":"+u:"")+c,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var f=new n(t);return e&&f.on("response",e),f},u.get=function(t,e){var r=u.request(t,e);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=o.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},function(t,e,r){(function(e,n){var o=r(35),i=r(9),a=r(36),s=r(37),u=r(95),c=a.IncomingMessage,f=a.readyStates;var l=t.exports=function(t){var r,n=this;s.Writable.call(n),n._opts=t,n._body=[],n._headers={},t.auth&&n.setHeader("Authorization","Basic "+new e(t.auth).toString("base64")),Object.keys(t.headers).forEach((function(e){n.setHeader(e,t.headers[e])}));var i=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!o.abortController)i=!1,r=!0;else if("prefer-streaming"===t.mode)r=!1;else if("allow-wrong-content-type"===t.mode)r=!o.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");r=!0}n._mode=function(t,e){return o.fetch&&e?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&t?"arraybuffer":o.vbArray&&t?"text:vbarray":"text"}(r,i),n._fetchTimer=null,n.on("finish",(function(){n._onFinish()}))};i(l,s.Writable),l.prototype.setHeader=function(t,e){var r=t.toLowerCase();-1===p.indexOf(r)&&(this._headers[r]={name:t,value:e})},l.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null},l.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},l.prototype._onFinish=function(){var t=this;if(!t._destroyed){var r=t._opts,i=t._headers,a=null;"GET"!==r.method&&"HEAD"!==r.method&&(a=o.arraybuffer?u(e.concat(t._body)):o.blobConstructor?new Object({}).Blob(t._body.map((function(t){return u(t)})),{type:(i["content-type"]||{}).value||""}):e.concat(t._body).toString());var s=[];if(Object.keys(i).forEach((function(t){var e=i[t].name,r=i[t].value;Array.isArray(r)?r.forEach((function(t){s.push([e,t])})):s.push([e,r])})),"fetch"===t._mode){var c=null;if(o.abortController){var l=new AbortController;c=l.signal,t._fetchAbortController=l,"requestTimeout"in r&&0!==r.requestTimeout&&(t._fetchTimer=Object({}).setTimeout((function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()}),r.requestTimeout))}Object({}).fetch(t._opts.url,{method:t._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:r.withCredentials?"include":"same-origin",signal:c}).then((function(e){t._fetchResponse=e,t._connect()}),(function(e){Object({}).clearTimeout(t._fetchTimer),t._destroyed||t.emit("error",e)}))}else{var p=t._xhr=new Object({}).XMLHttpRequest();try{p.open(t._opts.method,t._opts.url,!0)}catch(e){return void n.nextTick((function(){t.emit("error",e)}))}"responseType"in p&&(p.responseType=t._mode.split(":")[0]),"withCredentials"in p&&(p.withCredentials=!!r.withCredentials),"text"===t._mode&&"overrideMimeType"in p&&p.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in r&&(p.timeout=r.requestTimeout,p.ontimeout=function(){t.emit("requestTimeout")}),s.forEach((function(t){p.setRequestHeader(t[0],t[1])})),t._response=null,p.onreadystatechange=function(){switch(p.readyState){case f.LOADING:case f.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(p.onprogress=function(){t._onXHRProgress()}),p.onerror=function(){t._destroyed||t.emit("error",new Error("XHR error"))};try{p.send(a)}catch(e){return void n.nextTick((function(){t.emit("error",e)}))}}}},l.prototype._onXHRProgress=function(){(function(t){try{var e=t.status;return null!==e&&0!==e}catch(t){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},l.prototype._connect=function(){var t=this;t._destroyed||(t._response=new c(t._xhr,t._fetchResponse,t._mode,t._fetchTimer),t._response.on("error",(function(e){t.emit("error",e)})),t.emit("response",t._response))},l.prototype._write=function(t,e,r){this._body.push(t),r()},l.prototype.abort=l.prototype.destroy=function(){this._destroyed=!0,Object({}).clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},l.prototype.end=function(t,e,r){"function"==typeof t&&(r=t,t=void 0),s.Writable.prototype.end.call(this,t,e,r)},l.prototype.flushHeaders=function(){},l.prototype.setTimeout=function(){},l.prototype.setNoDelay=function(){},l.prototype.setSocketKeepAlive=function(){};var p=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,r(7).Buffer,r(8))},function(t,e){},function(t,e,r){"use strict";var n=r(23).Buffer,o=r(89);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e,r,o,i=n.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=i,o=s,e.copy(r,o),s+=a.data.length,a=a.next;return i},t}(),o&&o.inspect&&o.inspect.custom&&(t.exports.prototype[o.inspect.custom]=function(){var t=o.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){var n=Object({})||!1,o=Function.prototype.apply;function i(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new i(o.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new i(o.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(91),e.setImmediate="undefined"!=typeof self&&self.setImmediate||Object({}).setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||Object({}).clearImmediate||this&&this.clearImmediate},function(t,e,r){(function(t){!function(e,r){"use strict";if(!e.setImmediate){var n,o,i,a,s,u=1,c={},f=!1,l=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){d(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(t){d(t.data)},n=function(t){i.port2.postMessage(t)}):l&&"onreadystatechange"in l.createElement("script")?(o=l.documentElement,n=function(t){var e=l.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,o.removeChild(e),e=null},o.appendChild(e)}):n=function(t){setTimeout(d,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&d(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),n=function(t){e.postMessage(a+t,"*")}),p.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var o={callback:t,args:e};return c[u]=o,n(u),u++},p.clearImmediate=h}function h(t){delete c[t]}function d(t){if(f)setTimeout(d,0,t);else{var e=c[t];if(e){f=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(void 0,r)}}(e)}finally{h(t),f=!1}}}}}("undefined"==typeof self?Object({}):self)}).call(this,r(8))},function(t,e){function r(t){try{if(!Object({}).localStorage)return!1}catch(t){return!1}var e=Object({}).localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}},function(t,e,r){
|
|
11
11
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
12
|
-
var n=r(7),o=n.Buffer;function i(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return o(t,e,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=n:(i(n,e),e.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return o(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=o(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return o(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";t.exports=i;var n=r(44),o=Object.create(r(13));function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}o.inherits=r(9),o.inherits(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){var n=r(7).Buffer;t.exports=function(t){if(t instanceof Uint8Array){if(0===t.byteOffset&&t.byteLength===t.buffer.byteLength)return t.buffer;if("function"==typeof t.buffer.slice)return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}if(n.isBuffer(t)){for(var e=new Uint8Array(t.length),r=t.length,o=0;o<r;o++)e[o]=t[o];return e.buffer}throw new Error("Argument must be a Buffer")}},function(t,e){t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var o in n)r.call(n,o)&&(t[o]=n[o])}return t};var r=Object.prototype.hasOwnProperty},function(t,e){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(t,e,r){(function(t){var n;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){e&&e.nodeType,t&&t.nodeType;var i=Object({});i.global!==i&&i.window!==i&&i.self;var a,s=2147483647,u=/^xn--/,c=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,h=String.fromCharCode;function d(t){throw new RangeError(l[t])}function y(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function v(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+y((t=t.replace(f,".")).split("."),e).join(".")}function g(t){for(var e,r,n=[],o=0,i=t.length;o<i;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<i?56320==(64512&(r=t.charCodeAt(o++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),o--):n.push(e);return n}function m(t){return y(t,(function(t){var e="";return t>65535&&(e+=h((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=h(t)})).join("")}function b(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function _(t,e,r){var n=0;for(t=r?p(t/700):t>>1,t+=p(t/e);t>455;n+=36)t=p(t/35);return p(n+36*t/(t+38))}function w(t){var e,r,n,o,i,a,u,c,f,l,h,y=[],v=t.length,g=0,b=128,w=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&d("not-basic"),y.push(t.charCodeAt(n));for(o=r>0?r+1:0;o<v;){for(i=g,a=1,u=36;o>=v&&d("invalid-input"),((c=(h=t.charCodeAt(o++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36)>=36||c>p((s-g)/a))&&d("overflow"),g+=c*a,!(c<(f=u<=w?1:u>=w+26?26:u-w));u+=36)a>p(s/(l=36-f))&&d("overflow"),a*=l;w=_(g-i,e=y.length+1,0==i),p(g/e)>s-b&&d("overflow"),b+=p(g/e),g%=e,y.splice(g++,0,b)}return m(y)}function O(t){var e,r,n,o,i,a,u,c,f,l,y,v,m,w,O,S=[];for(v=(t=g(t)).length,e=128,r=0,i=72,a=0;a<v;++a)(y=t[a])<128&&S.push(h(y));for(n=o=S.length,o&&S.push("-");n<v;){for(u=s,a=0;a<v;++a)(y=t[a])>=e&&y<u&&(u=y);for(u-e>p((s-r)/(m=n+1))&&d("overflow"),r+=(u-e)*m,e=u,a=0;a<v;++a)if((y=t[a])<e&&++r>s&&d("overflow"),y==e){for(c=r,f=36;!(c<(l=f<=i?1:f>=i+26?26:f-i));f+=36)O=c-l,w=36-l,S.push(h(b(l+O%w,0))),c=p(O/w);S.push(h(b(c,0))),i=_(r,m,n==o),r=0,++n}++r,++e}return S.join("")}a={version:"1.4.1",ucs2:{decode:g,encode:m},decode:w,encode:O,toASCII:function(t){return v(t,(function(t){return c.test(t)?"xn--"+O(t):t}))},toUnicode:function(t){return v(t,(function(t){return u.test(t)?w(t.slice(4).toLowerCase()):t}))}},void 0===(n=function(){return a}.call(e,r,e,t))||(t.exports=n)}()}).call(this,r(99)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,r){"use strict";e.decode=e.parse=r(102),e.encode=e.stringify=r(103)},function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,i){e=e||"&",r=r||"=";var a={};if("string"!=typeof t||0===t.length)return a;var s=/\+/g;t=t.split(e);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var f=0;f<c;++f){var l,p,h,d,y=t[f].replace(s,"%20"),v=y.indexOf(r);v>=0?(l=y.substr(0,v),p=y.substr(v+1)):(l=y,p=""),h=decodeURIComponent(l),d=decodeURIComponent(p),n(a,h)?o(a[h])?a[h].push(d):a[h]=[a[h],d]:a[h]=d}return a};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,r){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,r,s){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?i(a(t),(function(a){var s=encodeURIComponent(n(a))+r;return o(t[a])?i(t[a],(function(t){return s+encodeURIComponent(n(t))})).join(e):s+encodeURIComponent(n(t[a]))})).join(e):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(t)):""};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var a=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},function(t,e,r){var n=r(46);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(46);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty;function o(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function i(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var r,o,a=[];for(o in"string"!=typeof e&&(e="?"),t)if(n.call(t,o)){if((r=t[o])||null!=r&&!isNaN(r)||(r=""),o=i(o),r=i(r),null===o||null===r)continue;a.push(o+"="+r)}return a.length?e+a.join("&"):""},e.parse=function(t){for(var e,r=/([^=?#&]+)=?([^&]*)/g,n={};e=r.exec(t);){var i=o(e[1]),a=o(e[2]);null===i||null===a||i in n||(n[i]=a)}return n}},function(t,e,r){"use strict";r.r(e),r.d(e,"initStore",(function(){return Zn})),r.d(e,"endStore",(function(){return Wn})),r.d(e,"restoreStore",(function(){return oo}));var n=r(1),o=r.n(n);function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function u(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var c="function"==typeof Symbol&&Symbol.observable||"@@observable",f=function(){return Math.random().toString(36).substring(7).split("").join(".")},l={INIT:"@@redux/INIT"+f(),REPLACE:"@@redux/REPLACE"+f(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+f()}};function p(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function h(t,e,r){var n;if("function"==typeof e&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(u(0));if("function"==typeof e&&void 0===r&&(r=e,e=void 0),void 0!==r){if("function"!=typeof r)throw new Error(u(1));return r(h)(t,e)}if("function"!=typeof t)throw new Error(u(2));var o=t,i=e,a=[],s=a,f=!1;function d(){s===a&&(s=a.slice())}function y(){if(f)throw new Error(u(3));return i}function v(t){if("function"!=typeof t)throw new Error(u(4));if(f)throw new Error(u(5));var e=!0;return d(),s.push(t),function(){if(e){if(f)throw new Error(u(6));e=!1,d();var r=s.indexOf(t);s.splice(r,1),a=null}}}function g(t){if(!p(t))throw new Error(u(7));if(void 0===t.type)throw new Error(u(8));if(f)throw new Error(u(9));try{f=!0,i=o(i,t)}finally{f=!1}for(var e=a=s,r=0;r<e.length;r++){(0,e[r])()}return t}function m(t){if("function"!=typeof t)throw new Error(u(10));o=t,g({type:l.REPLACE})}function b(){var t,e=v;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(u(11));function r(){t.next&&t.next(y())}return r(),{unsubscribe:e(r)}}})[c]=function(){return this},t}return g({type:l.INIT}),(n={dispatch:g,subscribe:v,getState:y,replaceReducer:m})[c]=b,n}function d(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var o=e[n];0,"function"==typeof t[o]&&(r[o]=t[o])}var i,a=Object.keys(r);try{!function(t){Object.keys(t).forEach((function(e){var r=t[e];if(void 0===r(void 0,{type:l.INIT}))throw new Error(u(12));if(void 0===r(void 0,{type:l.PROBE_UNKNOWN_ACTION()}))throw new Error(u(13))}))}(r)}catch(t){i=t}return function(t,e){if(void 0===t&&(t={}),i)throw i;for(var n=!1,o={},s=0;s<a.length;s++){var c=a[s],f=r[c],l=t[c],p=f(l,e);if(void 0===p){e&&e.type;throw new Error(u(14))}o[c]=p,n=n||p!==l}return(n=n||a.length!==Object.keys(t).length)?o:t}}function y(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}var v=function(t){return"@@redux-saga/"+t},g=v("CANCEL_PROMISE"),m=v("CHANNEL_END"),b=v("IO"),_=v("MATCH"),w=v("MULTICAST"),O=v("SAGA_ACTION"),S=v("SELF_CANCELLATION"),j=v("TASK"),E=v("TASK_CANCEL"),x=v("TERMINATE"),A=v("LOCATION");function P(){return(P=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}var k=function(t){return null==t},T=function(t){return null!=t},I=function(t){return"function"==typeof t},R=function(t){return"string"==typeof t},C=Array.isArray,L=function(t){return t&&I(t.then)},M=function(t){return t&&I(t.next)&&I(t.throw)},D=function t(e){return e&&(R(e)||B(e)||I(e)||C(e)&&e.every(t))},N=function(t){return t&&I(t.take)&&I(t.close)},U=function(t){return I(t)&&t.hasOwnProperty("toString")},B=function(t){return Boolean(t)&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype};var q=function(t,e){var r;void 0===e&&(e=!0);var n=new Promise((function(n){r=setTimeout(n,Math.min(2147483647,t),e)}));return n[g]=function(){clearTimeout(r)},n},z=function(t){return function(){return t}}(!0),F=function(){};var H=function(t){return t};"function"==typeof Symbol&&Symbol.asyncIterator&&Symbol.asyncIterator;var W=function(t,e){P(t,e),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach((function(r){t[r]=e[r]}))};function G(t,e){var r=t.indexOf(e);r>=0&&t.splice(r,1)}function Y(t){var e=!1;return function(){e||(e=!0,t())}}var K=function(t){throw t},V=function(t){return{value:t,done:!0}};function J(t,e,r){void 0===e&&(e=K),void 0===r&&(r="iterator");var n={meta:{name:r},next:t,throw:e,return:V,isSagaIterator:!0};return"undefined"!=typeof Symbol&&(n[Symbol.iterator]=function(){return n}),n}function $(t,e){var r=e.sagaStack;console.error(t),console.error(r)}var X=function(t){return Array.apply(null,new Array(t))},Q=function(t){return function(e){return t(Object.defineProperty(e,O,{value:!0}))}},Z=function(t){return t===x},tt=function(t){return t===E},et=function(t){return Z(t)||tt(t)};function rt(t,e){var r=Object.keys(t),n=r.length;var o,i=0,a=C(t)?X(n):{},s={};return r.forEach((function(t){var r=function(r,s){o||(s||et(r)?(e.cancel(),e(r,s)):(a[t]=r,++i===n&&(o=!0,e(a))))};r.cancel=F,s[t]=r})),e.cancel=function(){o||(o=!0,r.forEach((function(t){return s[t].cancel()})))},s}function nt(t){return{name:t.name||"anonymous",location:ot(t)}}function ot(t){return t[A]}function it(t,e){void 0===t&&(t=10);var r=new Array(t),n=0,o=0,i=0,a=function(e){r[o]=e,o=(o+1)%t,n++},s=function(){if(0!=n){var e=r[i];return r[i]=null,n--,i=(i+1)%t,e}},u=function(){for(var t=[];n;)t.push(s());return t};return{isEmpty:function(){return 0==n},put:function(s){var c;if(n<t)a(s);else switch(e){case 1:throw new Error("Channel's Buffer overflow!");case 3:r[o]=s,i=o=(o+1)%t;break;case 4:c=2*t,r=u(),n=r.length,o=r.length,i=0,r.length=c,t=c,a(s)}},take:s,flush:u}}var at=function(t){return it(t,4)},st=function(t,e){var r;return(r={})[b]=!0,r.combinator=!1,r.type=t,r.payload=e,r},ut=function(t){return st("FORK",P({},t.payload,{detached:!0}))};function ct(t,e){return void 0===t&&(t="*"),D(t)?(T(e)&&console.warn("take(pattern) takes one argument but two were provided. Consider passing an array for listening to several action types"),st("TAKE",{pattern:t})):N(r=t)&&r[w]&&T(e)&&D(e)?st("TAKE",{channel:t,pattern:e}):N(t)?(T(e)&&console.warn("take(channel) takes one argument but two were provided. Second argument is ignored."),st("TAKE",{channel:t})):void 0;var r}function ft(t,e){return k(e)&&(e=t,t=void 0),st("PUT",{channel:t,action:e})}function lt(t){var e=st("ALL",t);return e.combinator=!0,e}function pt(t,e){var r,n=null;return I(t)?r=t:(C(t)?(n=t[0],r=t[1]):(n=t.context,r=t.fn),n&&R(r)&&I(n[r])&&(r=n[r])),{context:n,fn:r,args:e}}function ht(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return st("CALL",pt(t,r))}function dt(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return st("FORK",pt(t,r))}function yt(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return ut(dt.apply(void 0,[t].concat(r)))}function vt(t){return void 0===t&&(t=S),st("CANCEL",t)}function gt(t){void 0===t&&(t=H);for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return st("SELECT",{selector:t,args:r})}var mt=ht.bind(null,q);function bt(){var t={};return t.promise=new Promise((function(e,r){t.resolve=e,t.reject=r})),t}var _t=bt,wt=[],Ot=0;function St(t){try{xt(),t()}finally{At()}}function jt(t){wt.push(t),Ot||(xt(),Pt())}function Et(t){try{return xt(),t()}finally{Pt()}}function xt(){Ot++}function At(){Ot--}function Pt(){var t;for(At();!Ot&&void 0!==(t=wt.shift());)St(t)}var kt=function(t){return function(e){return t.some((function(t){return Lt(t)(e)}))}},Tt=function(t){return function(e){return t(e)}},It=function(t){return function(e){return e.type===String(t)}},Rt=function(t){return function(e){return e.type===t}},Ct=function(){return z};function Lt(t){var e="*"===t?Ct:R(t)?It:C(t)?kt:U(t)?It:I(t)?Tt:B(t)?Rt:null;if(null===e)throw new Error("invalid pattern: "+t);return e(t)}var Mt={type:m},Dt=function(t){return t&&t.type===m};function Nt(t){void 0===t&&(t=at());var e=!1,r=[];return{take:function(n){e&&t.isEmpty()?n(Mt):t.isEmpty()?(r.push(n),n.cancel=function(){G(r,n)}):n(t.take())},put:function(n){if(!e){if(0===r.length)return t.put(n);r.shift()(n)}},flush:function(r){e&&t.isEmpty()?r(Mt):r(t.flush())},close:function(){if(!e){e=!0;var t=r;r=[];for(var n=0,o=t.length;n<o;n++){(0,t[n])(Mt)}}}}}function Ut(){var t,e,r,n,o,i,a=(e=!1,n=r=[],o=function(){n===r&&(n=r.slice())},i=function(){e=!0;var t=r=n;n=[],t.forEach((function(t){t(Mt)}))},(t={})[w]=!0,t.put=function(t){if(!e)if(Dt(t))i();else for(var o=r=n,a=0,s=o.length;a<s;a++){var u=o[a];u[_](t)&&(u.cancel(),u(t))}},t.take=function(t,r){void 0===r&&(r=Ct),e?t(Mt):(t[_]=r,o(),n.push(t),t.cancel=Y((function(){o(),G(n,t)})))},t.close=i,t),s=a.put;return a.put=function(t){t[O]?s(t):jt((function(){s(t)}))},a}function Bt(t,e){var r=t[g];I(r)&&(e.cancel=r),t.then(e,(function(t){e(t,!0)}))}var qt,zt=0,Ft=function(){return++zt};function Ht(t){t.isRunning()&&t.cancel()}var Wt=((qt={}).TAKE=function(t,e,r){var n=e.channel,o=void 0===n?t.channel:n,i=e.pattern,a=e.maybe,s=function(t){t instanceof Error?r(t,!0):!Dt(t)||a?r(t):r(x)};try{o.take(s,T(i)?Lt(i):null)}catch(t){return void r(t,!0)}r.cancel=s.cancel},qt.PUT=function(t,e,r){var n=e.channel,o=e.action,i=e.resolve;jt((function(){var e;try{e=(n?n.put:t.dispatch)(o)}catch(t){return void r(t,!0)}i&&L(e)?Bt(e,r):r(e)}))},qt.ALL=function(t,e,r,n){var o=n.digestEffect,i=zt,a=Object.keys(e);if(0!==a.length){var s=rt(e,r);a.forEach((function(t){o(e[t],i,s[t],t)}))}else r(C(e)?[]:{})},qt.RACE=function(t,e,r,n){var o=n.digestEffect,i=zt,a=Object.keys(e),s=C(e)?X(a.length):{},u={},c=!1;a.forEach((function(t){var e=function(e,n){c||(n||et(e)?(r.cancel(),r(e,n)):(r.cancel(),c=!0,s[t]=e,r(s)))};e.cancel=F,u[t]=e})),r.cancel=function(){c||(c=!0,a.forEach((function(t){return u[t].cancel()})))},a.forEach((function(t){c||o(e[t],i,u[t],t)}))},qt.CALL=function(t,e,r,n){var o=e.context,i=e.fn,a=e.args,s=n.task;try{var u=i.apply(o,a);if(L(u))return void Bt(u,r);if(M(u))return void Qt(t,u,s.context,zt,nt(i),!1,r);r(u)}catch(t){r(t,!0)}},qt.CPS=function(t,e,r){var n=e.context,o=e.fn,i=e.args;try{var a=function(t,e){k(t)?r(e):r(t,!0)};o.apply(n,i.concat(a)),a.cancel&&(r.cancel=a.cancel)}catch(t){r(t,!0)}},qt.FORK=function(t,e,r,n){var o=e.context,i=e.fn,a=e.args,s=e.detached,u=n.task,c=function(t){var e=t.context,r=t.fn,n=t.args;try{var o=r.apply(e,n);if(M(o))return o;var i=!1;return J((function(t){return i?{value:t,done:!0}:(i=!0,{value:o,done:!L(o)})}))}catch(t){return J((function(){throw t}))}}({context:o,fn:i,args:a}),f=function(t,e){return t.isSagaIterator?{name:t.meta.name}:nt(e)}(c,i);Et((function(){var e=Qt(t,c,u.context,zt,f,s,void 0);s?r(e):e.isRunning()?(u.queue.addTask(e),r(e)):e.isAborted()?u.queue.abort(e.error()):r(e)}))},qt.JOIN=function(t,e,r,n){var o=n.task,i=function(t,e){if(t.isRunning()){var r={task:o,cb:e};e.cancel=function(){t.isRunning()&&G(t.joiners,r)},t.joiners.push(r)}else t.isAborted()?e(t.error(),!0):e(t.result())};if(C(e)){if(0===e.length)return void r([]);var a=rt(e,r);e.forEach((function(t,e){i(t,a[e])}))}else i(e,r)},qt.CANCEL=function(t,e,r,n){var o=n.task;e===S?Ht(o):C(e)?e.forEach(Ht):Ht(e),r()},qt.SELECT=function(t,e,r){var n=e.selector,o=e.args;try{r(n.apply(void 0,[t.getState()].concat(o)))}catch(t){r(t,!0)}},qt.ACTION_CHANNEL=function(t,e,r){var n=e.pattern,o=Nt(e.buffer),i=Lt(n),a=function e(r){Dt(r)||t.channel.take(e,i),o.put(r)},s=o.close;o.close=function(){a.cancel(),s()},t.channel.take(a,i),r(o)},qt.CANCELLED=function(t,e,r,n){r(n.task.isCancelled())},qt.FLUSH=function(t,e,r){e.flush(r)},qt.GET_CONTEXT=function(t,e,r,n){r(n.task.context[e])},qt.SET_CONTEXT=function(t,e,r,n){var o=n.task;W(o.context,e),r()},qt);function Gt(t,e){return t+"?"+e}function Yt(t){var e=t.name,r=t.location;return r?e+" "+Gt(r.fileName,r.lineNumber):e}var Kt=null,Vt=[],Jt=function(){Kt=null,Vt.length=0},$t=function(){var t,e,r,n,o,i,a,s=Vt[0],u=Vt.slice(1),c=s.crashedEffect?(t=s.crashedEffect,(e=ot(t))?e.code+" "+Gt(e.fileName,e.lineNumber):""):null;return["The above error occurred in task "+Yt(s.meta)+(c?" \n when executing effect "+c:"")].concat(u.map((function(t){return" created by "+Yt(t.meta)})),[(r=Vt,n=function(t){return t.cancelledTasks},o=r,a=(i=[]).concat.apply(i,o.map(n)),a.length?["Tasks cancelled due to error:"].concat(a).join("\n"):"")]).join("\n")};function Xt(t,e,r,n,o,i,a){var s;void 0===a&&(a=F);var u,c,f=0,l=null,p=[],h=Object.create(r),d=function(t,e,r){var n,o=[],i=!1;function a(t){e(),u(),r(t,!0)}function s(e){o.push(e),e.cont=function(s,u){i||(G(o,e),e.cont=F,u?a(s):(e===t&&(n=s),o.length||(i=!0,r(n))))}}function u(){i||(i=!0,o.forEach((function(t){t.cont=F,t.cancel()})),o=[])}return s(t),{addTask:s,cancelAll:u,abort:a,getTasks:function(){return o}}}(e,(function(){p.push.apply(p,d.getTasks().map((function(t){return t.meta.name})))}),y);function y(e,r){if(r){if(f=2,(i={meta:o,cancelledTasks:p}).crashedEffect=Kt,Vt.push(i),v.isRoot){var n=$t();Jt(),t.onError(e,{sagaStack:n})}c=e,l&&l.reject(e)}else e===E?f=1:1!==f&&(f=3),u=e,l&&l.resolve(e);var i;v.cont(e,r),v.joiners.forEach((function(t){t.cb(e,r)})),v.joiners=null}var v=((s={})[j]=!0,s.id=n,s.meta=o,s.isRoot=i,s.context=h,s.joiners=[],s.queue=d,s.cancel=function(){0===f&&(f=1,d.cancelAll(),y(E,!1))},s.cont=a,s.end=y,s.setContext=function(t){W(h,t)},s.toPromise=function(){return l||(l=_t(),2===f?l.reject(c):0!==f&&l.resolve(u)),l.promise},s.isRunning=function(){return 0===f},s.isCancelled=function(){return 1===f||0===f&&1===e.status},s.isAborted=function(){return 2===f},s.result=function(){return u},s.error=function(){return c},s);return v}function Qt(t,e,r,n,o,i,a){var s=t.finalizeRunEffect((function(e,r,n){if(L(e))Bt(e,n);else if(M(e))Qt(t,e,c.context,r,o,!1,n);else if(e&&e[b]){(0,Wt[e.type])(t,e.payload,n,f)}else n(e)}));l.cancel=F;var u={meta:o,cancel:function(){0===u.status&&(u.status=1,l(E))},status:0},c=Xt(t,u,r,n,o,i,a),f={task:c,digestEffect:p};return a&&(a.cancel=c.cancel),l(),c;function l(t,r){try{var o;r?(o=e.throw(t),Jt()):tt(t)?(u.status=1,l.cancel(),o=I(e.return)?e.return(E):{done:!0,value:E}):o=Z(t)?I(e.return)?e.return():{done:!0}:e.next(t),o.done?(1!==u.status&&(u.status=3),u.cont(o.value)):p(o.value,n,l)}catch(t){if(1===u.status)throw t;u.status=2,u.cont(t,!0)}}function p(e,r,n,o){void 0===o&&(o="");var i,a=Ft();function u(r,o){i||(i=!0,n.cancel=F,t.sagaMonitor&&(o?t.sagaMonitor.effectRejected(a,r):t.sagaMonitor.effectResolved(a,r)),o&&function(t){Kt=t}(e),n(r,o))}t.sagaMonitor&&t.sagaMonitor.effectTriggered({effectId:a,parentEffectId:r,label:o,effect:e}),u.cancel=F,n.cancel=function(){i||(i=!0,u.cancel(),u.cancel=F,t.sagaMonitor&&t.sagaMonitor.effectCancelled(a))},s(e,a,u)}}function Zt(t,e){var r=t.channel,n=void 0===r?Ut():r,o=t.dispatch,i=t.getState,a=t.context,s=void 0===a?{}:a,u=t.sagaMonitor,c=t.effectMiddlewares,f=t.onError,l=void 0===f?$:f;for(var p=arguments.length,h=new Array(p>2?p-2:0),d=2;d<p;d++)h[d-2]=arguments[d];var v=e.apply(void 0,h);var g,m=Ft();if(u&&(u.rootSagaStarted=u.rootSagaStarted||F,u.effectTriggered=u.effectTriggered||F,u.effectResolved=u.effectResolved||F,u.effectRejected=u.effectRejected||F,u.effectCancelled=u.effectCancelled||F,u.actionDispatched=u.actionDispatched||F,u.rootSagaStarted({effectId:m,saga:e,args:h})),c){var b=y.apply(void 0,c);g=function(t){return function(e,r,n){return b((function(e){return t(e,r,n)}))(e)}}}else g=H;var _={channel:n,dispatch:Q(o),getState:i,sagaMonitor:u,onError:l,finalizeRunEffect:g};return Et((function(){var t=Qt(_,v,s,m,nt(e),!0,void 0);return u&&u.effectResolved(m,t),t}))}var te=function(t){var e,r=void 0===t?{}:t,n=r.context,o=void 0===n?{}:n,i=r.channel,a=void 0===i?Ut():i,s=r.sagaMonitor,u=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(r,["context","channel","sagaMonitor"]);function c(t){var r=t.getState,n=t.dispatch;return e=Zt.bind(null,P({},u,{context:o,channel:a,dispatch:n,getState:r,sagaMonitor:s})),function(t){return function(e){s&&s.actionDispatched&&s.actionDispatched(e);var r=t(e);return a.put(e),r}}}return c.run=function(){return e.apply(void 0,arguments)},c.setContext=function(t){W(o,t)},c},ee=r(0),re=r.n(ee),ne=function(t){return{done:!0,value:t}},oe={};function ie(t){return N(t)?"channel":U(t)?String(t):I(t)?t.name:String(t)}function ae(t,e,r){var n,o,i,a=e;function s(e,r){if(a===oe)return ne(e);if(r&&!o)throw a=oe,r;n&&n(e);var s=r?t[o](r):t[a]();return a=s.nextState,i=s.effect,n=s.stateUpdater,o=s.errorState,a===oe?ne(e):i}return J(s,(function(t){return s(null,t)}),r)}function se(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];var i,a={done:!1,value:ct(t)},s=function(t){return{done:!1,value:dt.apply(void 0,[e].concat(n,[t]))}},u=function(t){return i=t};return ae({q1:function(){return{nextState:"q2",effect:a,stateUpdater:u}},q2:function(){return{nextState:"q1",effect:s(i)}}},"q1","takeEvery("+ie(t)+", "+e.name+")")}function ue(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];var i,a,s={done:!1,value:ct(t)},u=function(t){return{done:!1,value:dt.apply(void 0,[e].concat(n,[t]))}},c=function(t){return{done:!1,value:vt(t)}},f=function(t){return i=t},l=function(t){return a=t};return ae({q1:function(){return{nextState:"q2",effect:s,stateUpdater:l}},q2:function(){return i?{nextState:"q3",effect:c(i)}:{nextState:"q1",effect:u(a),stateUpdater:f}},q3:function(){return{nextState:"q1",effect:u(a),stateUpdater:f}}},"q1","takeLatest("+ie(t)+", "+e.name+")")}function ce(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return dt.apply(void 0,[se,t,e].concat(n))}function fe(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return dt.apply(void 0,[ue,t,e].concat(n))}function le(t){var e=t.connections,r=e.get("currentConnection");return-1===r?null:e.get("connections").get(r).toJS().logonInfo}var pe=r(19),he=r(6),de="API_CALL",ye=function(t){return"password"===t||null==t?{logon:he.c,link:{href:"/SASLogon/oauth/token",method:"POST",rel:"logon",responseType:"application/json",type:"application/x-www-form-urlencoded",uri:"/SASLogon/oauth/token"}}:{keepAlive:he.a}},ve=function(){return{logoff:he.b,link:{href:"/SASLogon/logout",method:"GET",rel:"logoff",responseType:"application/json",uri:"/SASLogon/logout"}}};r(10);function ge(t,e,r){if("_appdata"===r||"_apistatus"===r||"_xsrf"===r)return{structType:r,type:r,route:r,routeList:[],userData:{}};var n={structType:e,type:e,title:t,method:"GET",iconfig:{},payload:{},statusInfo:{status:0,statusText:" ",error:!1,details:" "},runStatus:"idle",parentRoute:"",route:"",resultType:"",links:{},scrollCmds:{},paginator:!1,itemsList:[],items:[],details:{},stateEvent:null,responseHeaders:{},link:null,raw:{}};return 3===arguments.length&&(n.link={method:"GET",title:r,href:"/"+r+"/",rel:"root",type:"application/vnd.sas.api",uri:"/"+r+"/"},n.route="".concat(r,":/").concat(r),n.parentRoute=r),n}var me=re.a.mark(we);function be(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _e(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?be(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function we(){var t,e,r,n,o;return re.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:t=!0;case 1:if(!t){i.next=30;break}return i.next=4,ct("VIYA_LOGON");case 4:return e=i.sent,i.next=7,ft({type:"BEGIN_LOGON"});case 7:return i.next=9,ht(Oe,e);case 9:return(r=i.sent).keepAlive=null==e.payload.keepAlive?null:e.payload.keepAlive,i.next=13,ft(r);case 13:if(!1!==r.error){i.next=28;break}return i.next=16,ct("VIYA_LOGOFF");case 16:return e=i.sent,i.next=19,ft({type:"BEGIN_LOGOFF"});case 19:return n=_e({},e),i.next=22,gt(le);case 22:return n.logonInfo=i.sent,i.next=25,ht(Se,n);case 25:return o=i.sent,i.next=28,ft(o);case 28:i.next=1;break;case 30:case"end":return i.stop()}}),me)}function Oe(t){var e=_e({},t.payload);if("server"===e.authType||"implicit"===e.authType)return{type:e.authType,error:!1,payload:{iconfig:e}};var r=ye(e.authType);return e.link=r.link,r.logon(e).then((function(t){return{type:"VIYA_LOGON_COMPLETE",error:!1,payload:t}})).catch((function(t){return{type:"VIYA_LOGON_COMPLETE",error:!0,payload:t}}))}function Se(t){var e=ve();return t.link=e.link,e.logoff(t).then((function(t){return{type:"VIYA_LOGOFF_COMPLETE",error:!1,payload:t}})).catch((function(t){return{type:"VIYA_LOGOFF_COMPLETE",error:!0,payload:t}}))}var je=we;function Ee(t,e,r){return{error:r,type:e.serviceName+"_"+e.type+"_COMPLETE",config:e,payload:t}}var xe=function(t){return null===t.logonInfo?Ee({error:"Please logon"},t,!0):Object(he.b)(t).then((function(e){return Ee(e,t,!1)})).catch((function(e){return Ee(e,t,!0)}))},Ae=re.a.mark(Te);function Pe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ke(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pe(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pe(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Te(t){var e,r;return re.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=ke({},t),n.next=3,gt(le);case 3:return e.logonInfo=n.sent,n.next=6,ft({type:e.serviceName+"_"+t.type+"_BEGIN",config:e});case 6:if(!(t.delay>0)){n.next=9;break}return n.next=9,mt(1e3*t.delay);case 9:return n.next=11,ht(xe,e);case 11:return r=n.sent,n.next=14,ft(r);case 14:case"end":return n.stop()}}),Ae)}var Ie=Te,Re=re.a.mark(Ce);function Ce(){return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ce(["ADD_SERVICE",de],Ie);case 2:case"end":return t.stop()}}),Re)}var Le=Ce;function Me(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function De(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Me(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Me(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Ne=re.a.mark(qe),Ue=re.a.mark(ze),Be=re.a.mark(Fe);function qe(){return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ce("API_PARALLEL",ze);case 2:case"end":return t.stop()}}),Ne)}function ze(t){var e,r,n,o,i,a;return re.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:for(e={},r=t.actionArray,n=0;n<r.length;n++)o="l".concat(n),e[o]=ht(Fe,r[n]);return s.next=5,lt(e);case 5:i=s.sent,s.t0=re.a.keys(i);case 7:if((s.t1=s.t0()).done){s.next=13;break}return a=s.t1.value,s.next=11,ft(i[a]);case 11:s.next=7;break;case 13:case"end":return s.stop()}}),Ue)}function Fe(t){var e;return re.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e=De({},t),r.next=3,gt(le);case 3:return e.logonInfo=r.sent,r.next=6,ft({type:e.serviceName+"_"+e.type+"_BEGIN",config:e});case 6:return r.abrupt("return",e);case 7:case"end":return r.stop()}}),Be)}var He=qe,We=r(5),Ge=r.n(We);function Ye(t,e,r){return{error:r,type:e.serviceName+"_"+e.type+"_COMPLETE",config:e,payload:t}}var Ke=function(t){var e,r=["running","pending"];return Object(he.b)(t).then((function(n){var o=n.data.results;return"object"===Ge()(o)&&(o=!0===n.data.results.items.isIdle?"completed":"running",n.data.results.items=o),function(){if(e=!1,t.eventHandler){var r=304===n.status?"running":o,i=t.eventHandler(r,t.jobContext);"boolean"==typeof i?e=i:i!==r&&(n.data.results=i,e=!0)}}(),304===n.status&&!1===e?null:-1===r.indexOf(o)||!0===e?Ye(n,t,!1):(null!=t.payload.headers&&null!=t.payload.headers["If-None-Match"]&&null!=n.headers.etag&&(t.payload.headers["If-None-Match"]=n.headers.etag),null)})).catch((function(r){return t.eventHandler&&(e=t.eventHandler("*SystemError",t.jobContext)),Ye(r,t,!0)}))},Ve=re.a.mark(Xe);function Je(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function $e(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Je(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Je(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Xe(t){var e,r;return re.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=$e({},t),r=null,n.next=4,gt(le);case 4:return e.logonInfo=n.sent,n.next=7,ft({type:e.serviceName+"_"+t.type+"_BEGIN",config:e});case 7:return n.next=9,ht(Ke,e);case 9:if(r=n.sent,!e.delay){n.next=13;break}return n.next=13,mt(1e3*e.delay);case 13:if(null===r){n.next=7;break}case 14:return n.next=16,ft(r);case 16:case"end":return n.stop()}}),Ve)}var Qe=Xe,Ze=re.a.mark(tr);function tr(){return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ce(["API_POLL"],Qe);case 2:case"end":return t.stop()}}),Ze)}var er=tr,rr=re.a.mark(or),nr=re.a.mark(ir);function or(){return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ce(["APP_DATA","API_STATUS","API_XSRF"],ir);case 2:case"end":return t.stop()}}),rr)}function ir(t){var e,r;return re.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:n.t0=t.type,n.next="APP_DATA"===n.t0?3:"API_STATUS"===n.t0?5:7;break;case 3:return e="_appdata_APP_DATA_SETSTATE",n.abrupt("break",9);case 5:return e="_apistatus_API_STATUS_SETSTATE",n.abrupt("break",9);case 7:return e="_xsrf_API_XSRF_SETSTATE",n.abrupt("break",9);case 9:return r={type:e,payload:t},n.next=12,ft(r);case 12:case"end":return n.stop()}}),nr)}var ar=or,sr=re.a.mark(cr),ur=re.a.mark(fr);function cr(){return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fe("KEEP_ALIVE",fr);case 2:t.sent;case 3:case"end":return t.stop()}}),sr)}function fr(t){var e;return re.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,yt(lr,t);case 2:return e=r.sent,r.abrupt("return",e);case 4:case"end":return r.stop()}}),ur)}function lr(t){return ye("keepAlive").keepAlive(t)}var pr=cr,hr=re.a.mark(dr);function dr(){return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,lt([je(),Le(),He(),er(),ar(),pr()]);case 2:case"end":return t.stop()}}),hr)}var yr=dr,vr=r(4),gr=r.n(vr);function mr(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return br(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return br(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function br(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function _r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function wr(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_r(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_r(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Or(t,e,r){var n,o=["next","prev","first","last"];n="links"===r?t:"cmds"===r||"lcmds"===r?t.filter((function(t){return!o.includes(t.rel)})):"scrollCmds"===r?t.filter((function(t){return o.includes(t.rel)})):t,"lcmds"===r&&(r="links");var i=[].concat(gr()(e),[r]),a={};return n.map((function(t){var n=[].concat(gr()(i),[t.rel]);!1===t.hasOwnProperty("title")&&(t.title=t.rel);var s={link:wr({},t),method:t.method,route:n.join(":/"),parentRoute:gr()(e).join(":/"),paginator:o.includes(t.rel)};a[t.rel]=wr(wr({},ge(t.title,r)),s)})),a}var Sr=function(t,e){var r=null;if(!0===t.error)return(r=ge("error","error")).link=t.config.href,r.runStatus="error",r.statusInfo=Object(pe.setBadStatus)(t.payload),r;var n=t.payload.data.results,o="";if(!0===n.hasOwnProperty("accept")?o=n.accept:!0===t.payload.headers.hasOwnProperty("content-type")?o=t.payload.headers["content-type"].split(";")[0].split("+json")[0]:204===t.payload.status&&(o="No Content"),n.hasOwnProperty("items"))(r=function(t,e){var r=[],n={},o=ge(e[e.length-1],"links"),i={name:"",type:"",resultType:"",cmds:null,data:null};o.resultType=t.accept,o.details=function(t){var e=wr({},t);e.hasOwnProperty("links")&&delete e.links;e.hasOwnProperty("items")&&delete e.items;return e}(t),t.hasOwnProperty("name")&&(i.name=t.name);t.hasOwnProperty("links")&&(o.links=Or(t.links,e,"lcmds"),o.scrollCmds=Or(t.links,e,"scrollCmds"));if(!1===Array.isArray(t.items))return i.data=t.items,i.resultType=t.accept,t.items.hasOwnProperty("customHandling")?(i.type=t.items.customHandling,o.type=t.items.customHandling):(i.type="items",o.type="items"),o.items=i,o;if(0===t.items.length)return i.resultType=t.accept,i.data=[],i.type="itemsList",o.type="itemsList",o.items=i,o.itemsList=[],o;if(t.items[0].hasOwnProperty("links")){var a,s=-1,u="",c=mr(t.items);try{for(c.s();!(a=c.n()).done;){var f=a.value;s++;var l=void 0;if(l=f.hasOwnProperty("name2")?f.name2:f.hasOwnProperty("name")?f.name:f.hasOwnProperty("id")?f.id:"".concat(s),u===l){var p=!0===f.hasOwnProperty("id")?f.id:s;l="".concat(l,"_").concat(p)}else u=l;r.push(l);var h=[].concat(gr()(e),["items","data",l]),d=Or(f.links,h,"cmds"),y=wr({},f);delete y.links;var v={name:"",type:"",resultType:"",cmds:null,data:null};v.type="itemRow",v.name=l,v.resultType=!0===y.hasOwnProperty("contentType")?y.contentType:"unknown",v.cmds=d,v.data=y,n[l]=v}}catch(t){c.e(t)}finally{c.f()}i.data=n,i.resultType=t.accept,i.type="itemsList",o.itemsList=[].concat(r),o.type="itemsList"}else i.data=gr()(t.items),i.resultType=t.accept,i.type="itemsArray",o.type="itemsArray";return o.items=i,o}(n,e)).resultType=null==n.accept?o:n.accept;else if(n.hasOwnProperty("links")){r=function(t,e){var r=ge(e[e.length-1],"links");if(null===t||0===t.length)return r;return r.links=Or(t,e,"lcmds"),r.type="links",r.scrollCmds=Or(t,e,"scrollCmds"),r}(n.links,e);var i=wr({},n);for(var a in delete i.links,i)if("version"!==a){r.type="data";break}r.items={resultType:"data",data:i,cmds:null},r.resultType=o}else(r=ge("data","data")).type="data",r.resultType=o,r.items={resultType:o,data:"object"===Ge()(n)?Object.assign({},n):n,cmds:null};r.link=t.config.link.href,r.runStatus="ready",r.statusInfo=Object(pe.setGoodStatus)(t.payload);var s=t.config,u=t.payload.config,c=u.url.split("/");return r.host="".concat(c[0],"//").concat(c[2]),r.iconfig={input:{link:wr({},s.link),payload:s.hasOwnProperty("payload")?Object.assign({},s.payload):{}},http:{url:u.url,payload:{headers:[].concat(u.headers),data:null==u.data?{}:"object"===Ge()(u.data)?Object.assign({},u.data):u.data,qs:null==u.params?{}:"object"===Ge()(u.params)?Object.assign({},u.params):u.params}}},r};function jr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Er(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jr(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jr(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var xr=r(10).fromJS,Ar=function(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xr(ge(t,"links",t)),r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"DELETE_RAF_OBJECT":var n=r.route.split(":/"),o=n.slice(1),i=(e.getIn(o),e.deleteIn(o));return i;case t+"_ADD_SERVICE_BEGIN":return e.set("runStatus","busy").set("route",t);case t+"_ADD_SERVICE_COMPLETE":var a=Sr(r,[t]);return a.resultType="application/vnd.sas.api",a.raw=Er({},r.payload),a.responseHeaders=Er({},a.raw.headers),a.route=t,xr(a);case t+"_"+de+"_BEGIN":case t+"_API_POLL_BEGIN":var s=r.config,u=s.paginator,c=s.route.split(":/"),f=c.slice(!0===u?1:2),l=e.getIn(f);return l=l.set("runStatus","busy"),f=c.slice(1),e.setIn(f,l);case t+"_"+de+"_COMPLETE":case t+"_API_POLL_COMPLETE":var p=r.config,h=p.route.split(":/"),d=h.slice(1),y=Object.assign({},r.payload),v=Sr(r,h);v.raw=y,"links"===v.type&&null==v.resultType&&(v.resultType="application/vnd.sas.api");r.config.link.method;v.title=r.config.link.href,v.responseHeaders=Er({},y.headers),v.route=h.join(":/");var g=xr(v),m=e.setIn(d,g);return m;case t+"_APP_DATA_SETSTATE":var b=r.payload,_=b.route,w=b.payload,O=e.get("userData");return O=Array.isArray(_)?O.setIn(_,xr(w)):O.set(_,xr(w)),e.set("userData",O);case t+"_API_XSRF_SETSTATE":var S=r.payload,j=S.route,E=S.payload,x=e.get("userData");return x=Array.isArray(j)?x.setIn(j,xr(E)):x.set(j,xr(E)),e.set("userData",x);case t+"_API_STATUS_SETSTATE":var A=r.payload.payload,P=A.jobContext,k=e.get("userData"),T=e.get("routeList").push(P);return k=k.set(P,xr(A)),e.set("userData",k).set("routeList",T);default:return e}}};function Pr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function kr(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pr(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pr(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Tr=r(10),Ir=Tr.Map,Rr=Tr.fromJS,Cr=Rr({connections:[],user:"none",type:"server",currentConnection:-1,statusInfo:{status:0,statusText:" ",error:!1,details:" "},runStatus:"idle"});function Lr(t){var e=t.data,r=e.results,n=e.iconfig;return{type:"connection",id:1,user:n.user,desc:n.desc,logonInfo:{type:"trusted",host:n.host,tokenType:r.token_type,token:r.access_token,sslOptions:n.sslOptions,keepAlive:null==n.keepAlive?null:n.keepAlive},statusInfo:Object(pe.setGoodStatus)(t)}}var Mr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Cr,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"BEGIN_LOGON":return t.set("runStatus","busy");case"server":var r=e.payload.iconfig,n={type:"server",id:1,user:"You",desc:"Server",logonInfo:{type:"server",host:r.host,protocol:-1!==r.host.indexOf("https")?"https://":"http://",ns:r.ns,tokenType:!0===r.hasOwnProperty("tokenType")?r.tokenType:null,token:!0===r.hasOwnProperty("token")?r.token:null,sslOptions:!0===r.hasOwnProperty("sslOptions")?r.sslOptions:null,pem:r.hasOwnProperty("pem")?r.pem:null,rejectUnauthorized:r.hasOwnProperty("rejectUnauthorized")?r.rejectUnauthorized:null,withCredentials:!r.hasOwnProperty("withCredentials")||r.withCredentials,keepAlive:r.hasOwnProperty("keepAlive")?r.keepAlive:null}},o={currentConnection:t.get("currentConnection")+1,runStatus:"ready",statusInfo:{},user:"You of course!",connections:[n]};return Rr(o);case"implicit":var i=e.payload.iconfig;if(!0===e.error)return t.withMutations((function(t){t.set("runStatus","error").set("statusInfo",Rr(Object(pe.setBadStatus)(e.payload)))}));var a={type:"implicit",id:1,user:"You",desc:"implicit",logonInfo:kr({},i)},s={currentConnection:t.get("currentConnection")+1,runStatus:"ready",statusInfo:{},user:"You of course!",connections:[a]};return Rr(s);case"VIYA_LOGON_COMPLETE":if(!0===e.error)return t.withMutations((function(t){t.set("runStatus","error").set("statusInfo",Rr(Object(pe.setBadStatus)(e.payload)))}));var u={currentConnection:t.get("currentConnection")+1,runStatus:"ready",statusInfo:Object(pe.setGoodStatus)(e.payload),user:e.payload.data.iconfig.user};return t.withMutations((function(t){t.set("connections",t.get("connections").push(Ir(Lr(e.payload)))).merge(Rr(u))}));case"VIYA_LOGOFF":return t;case"BEGIN_LOGOFF":return t.set("runStatus","busy");case"VIYA_LOGOFF_COMPLETE":return!0===e.error?t.withMutations((function(t){t.set("runStatus","error").set("statusInfo",Rr(Object(pe.setBadStatus)(e.payload)))})):Cr;case"KEEP_ALIVE":default:return t}};function Dr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Nr(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Dr(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dr(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Ur=function(t){var e={};return e.connections=Mr,e._apistatus=Ar("_apistatus"),e._appdata=Ar("_appdata"),e._xsrf=Ar("_xsrf"),d(e=Nr(Nr({},e),t))},Br=function(t,e,r){t.asyncReducers.hasOwnProperty(e)&&delete t.asyncReducers[e],t.asyncReducers[e]=r,t.replaceReducer(Ur(t.asyncReducers))};function qr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}var zr=function(t){var e=te(),r=h(Ur(),function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return function(){var r=t.apply(void 0,arguments),n=function(){throw new Error(u(15))},o={getState:r.getState,dispatch:function(){return n.apply(void 0,arguments)}},i=e.map((function(t){return t(o)}));return n=y.apply(void 0,i)(r.dispatch),s(s({},r),{},{dispatch:n})}}}(e));return r.asyncReducers={},r.injectAsyncReducers=Br,r.apiCallNo=0,r.config=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?qr(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qr(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t),e.run(yr),r},Fr=r(10);var Hr=function(t,e,r){for(var n,o,i,a,s=[],u=[],c=arguments.length,f=new Array(c>3?c-3:0),l=3;l<c;l++)f[l-3]=arguments[l];if(null!=f&&(s=!0===Array.isArray(f[0])?f[0]:f),"string"==typeof e)i=(o=e.split(":/")).shift(),a=t.getState()[i],u=[].concat(gr()(o),gr()(s));else{if(u=s,!Fr.Iterable.isIterable(e))return null;a=e}return null==a?null:(null!==(n=u.length>0?a.getIn(u,null):a)&&!0===r&&!0===Fr.Iterable.isIterable(n)&&(n=n.keySeq()),n)};var Wr=function(t,e,r){return null!=r?Hr(t,e,!1,r):Hr(t,e)};var Gr=function(t,e,r){for(var n=null,o=arguments.length,i=new Array(o>3?o-3:0),a=3;a<o;a++)i[a-3]=arguments[a];return null!=i&&i.length>0?(n=!0===Array.isArray(i[0])?i[0]:i,null!==r&&(n=r.concat(n))):n=r,Hr(t,e,!1,n)};var Yr=function(t,e){var r,n=function(r){return function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Gr(t,e,r,o)}};return{results:n(),items:n(["items","data"]),itemsCmd:(r=["items","data"],function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.splice(1,0,"cmds"),Gr(t,e,r,o)}),itemsList:n(["itemsList"]),links:n(["links"]),details:n(["details"]),scrollCmds:n(["scrollCmds"]),raw:n(["raw"]),headers:n(["responseHeaders"]),config:n(["iconfig"]),host:e.get("host"),resultType:e.get("resultType"),status:e.get("statusInfo").get("status"),statusInfo:e.get("statusInfo").toJS(),type:e.get("type"),route:e.get("route")}};var Kr=function(t){var e=t.getState();e=e._xsrf;for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var i=n.length>0?["userData"].concat(n):["userData"],a=e.getIn(i,null);return null!==a?a.toJS():null},Vr=r(10),Jr=function(t,e,r,n,o,i,a,s){var u,c,f,l,p;if("string"==typeof e?(p=Wr(t,e),c=e):c=(p=e).get("route"),null===p||!1===Vr.Iterable.isIterable(p))return null;if(u=p.get("paginator"),f=p.get("link").toJS(),u)l=(c=p.get("parentRoute")).split(":/")[0];else{var h=c.split(":/");l=h[0],h.splice(1,0,t.apiCallNo),c=h.join(":/"),t.apiCallNo++}var d={type:r,delay:null==o?0:o,paginator:u,serviceName:l,route:c,eventHandler:i,parentRoute:a,jobContext:s,storeConfig:t.config,link:f};f.href.indexOf("casProxy")>=0&&(l="casProxy");var y=Kr(t,l);return null!=n&&(d.payload=n),null!==y&&(null!=n?d.payload.xsrf=y:d.payload={xsrf:y}),d},$r=function(t,e,r,n,o,i,a,s){return new Promise((function(u,c){var f,l,p=!0,h=Jr(t,e,r,n,o,i,a,s);null===h&&c({error:"Bad route and/or rafLink",args:e}),f=h.route;l=t.subscribe((function(){if(p)p=!1;else{var e=Wr(t,f);if(e){var r=e.get("runStatus");if("error"===r)l(),c(e.get("statusInfo"));else if("ready"===r){l();var n=Yr(t,e);u(n)}}else l(),c({error:"Hmmm! Failed to resolve route in apiCall callback - should never happen. Call Programmer",route:f})}})),t.dispatch(h)}))},Xr=function(t,e,r){for(var n=arguments.length,o=new Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];return $r.apply(void 0,[t,e,de,r].concat(o))},Qr=function(t,e,r){return new Promise((function(n,o){var i=e.map((function(e){var n=e.rafLink,i=!0===e.hasOwnProperty("payload")?e.payload:null,a=Jr(t,n,de,i,r,null,null,null);return null===a&&o({err:"Invalid route and/or rafLink",args:JSON.stringify(e,null,4)}),a})),a=!0,s=t.subscribe((function(){if(a)a=!1;else{for(var e=[],r=0;r<i.length;r++){var u=Wr(t,i[r].route);if(null!==u){var c=u.get("runStatus");if("error"===c){s();var f={jobNo:r,detail:u.get("statusInfo")};o(f)}else"ready"===c&&e.push(Yr(t,u))}}e.length===i.length&&n(e)}}));t.dispatch({type:"API_PARALLEL",actionArray:i})}))},Zr=r(2),tn=r.n(Zr);var en=function(t,e,r,n,o,i,a){return new Promise((function(s,u){var c=e.links("state");null===c?s({completed:1,running:0,jobState:{job:e,data:"completed",statusCode:200}}):$r(t,c,!0===o?"API_POLL":de,r,n,i,e.route,a).then((function(t){var r={},n=0,o=t.items();!1===r.hasOwnProperty(o)&&(r[o]=0),r[o]=r[o]+1;var i=t.status;"running"!==o&&"pending"!==o||(n=1),s({running:n,detail:r,jobState:{job:e,data:o,statusCode:i}})})).catch((function(t){u(t)}))}))};function rn(){return(rn=tn()(re.a.mark((function t(e,r,n,o,i,a,s,u){var c,f,l,p;return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c=!1,f=1,"wait"===o||"longpoll"===o?(f=1,c=!0):f=o||1;case 3:return t.next=5,en(e,r,n,i,c,a,s);case 5:if(l=t.sent,p=l.detail.hasOwnProperty("failed"),0!==l.running){t.next=16;break}if(f=0,!1!==p||1==u){t.next=15;break}return t.next=12,Xr(e,r.links("self"));case 12:l.jobState.job=t.sent,t.next=16;break;case 15:l.jobState.job=r;case 16:if(--f>0){t.next=3;break}case 17:return t.abrupt("return",l.jobState);case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var nn=function(t,e,r,n,o,i,a,s){return rn.apply(this,arguments)};function on(){return(on=tn()(re.a.mark((function t(e,r,n,o,i,a,s,u){var c;return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c=null,null==a){t.next=7;break}return t.next=4,sn(e,r,n,o,a,s,u);case 4:c=t.sent,t.next=10;break;case 7:return t.next=9,Xr(e,r.links("execute"),n,0);case 9:c=t.sent;case 10:if(!0!==an(c)){t.next=12;break}throw JSON.stringify(c.items());case 12:return null!=i&&i(o,c),t.abrupt("return",c);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function an(t){var e=t.items("disposition","statusCode"),r=t.items("disposition","severity").toLowerCase();return 0!==e||"error"===r}function sn(t,e,r,n,o,i,a){return un.apply(this,arguments)}function un(){return(un=tn()(re.a.mark((function t(e,r,n,o,i,a,s){var u,c;return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=Xr(e,r.links("execute"),n,0),t.next=3,nn(e,r,null,i,a,s,o,!0);case 3:return t.sent,c=u.then((function(t){return t}),(function(t){return t})),t.abrupt("return",c);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var cn=function(t,e,r,n,o,i,a,s){return on.apply(this,arguments)};function fn(){return(fn=tn()(re.a.mark((function t(e,r,n,o,i,a,s){var u,c;return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s&&s("pending",i),t.next=3,$r(e,r,de,n,0,null,null,i);case 3:if(!(u=t.sent).links("state")){t.next=12;break}return t.next=7,nn(e,u,null,"wait",o,s,i);case 7:return c=t.sent,ln(e,a,c.data,c.job,i),t.abrupt("return",c.job);case 12:return ln(e,a,"unknown",u,i),t.abrupt("return",u);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ln(t,e,r,n,o){var i={data:r,job:n,httpCode:n.status};!function(t,e,r){var n={route:e.job.route,data:e.data,jobContext:r},o={type:"API_STATUS",route:r,payload:n};t.dispatch(o)}(t,i,o),e&&e(null,i,o)}var pn=function(t,e,r,n,o,i,a){return fn.apply(this,arguments)};function hn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function dn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?hn(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var yn=function(t,e,r){return new Promise((function(n,o){var i=[];if(null!==r)if(!1===Array.isArray(r))for(var a=0;a<e.length;a++)i.push(r);else i=gr()(r);else for(var s=0;s<e.length;s++)i.push(null);var u=e.map((function(t,e){var r=t.links("state");return null===r&&o(" job ".concat(e," does not support state checking ")),{rafLink:r,payload:dn({},i[e])}}));Qr(t,u).then((function(t){var r={},o=0,i=t.map((function(t,n){var i=t.items(),a=t.status;return!1===r.hasOwnProperty(i)&&(r[i]=0),r[i]=r[i]+1,"running"!==i&&"pending"!==i||o++,{job:e[n],data:i,statusCode:a}}));n({running:o,detail:r,jobState:i})})).catch((function(t){o(t)}))}))};var vn=function(t,e,r,n){return new Promise((function(o,i){!function t(e,r,n,o,i){yn(e,r,n).then((function(a){a.running>0?--o<=0?i(null,a):t(e,r,n,o,i):i(null,a)})).catch((function(t){i(t)}))}(t,e,r,null!=n?n:1,(function(e,r){if(e)i(e);else if(0===r.running){var n=r.jobState.map((function(t){return{rafLink:t.job.links("self"),payload:null}}));Qr(t,n,null).then((function(t){t.forEach((function(t,e){r.jobState[e].job=t})),o(r)})).catch((function(t){i(t)}))}else o(r)}))}))},gn=r(12),mn=r.n(gn),bn=r(18),_n=r.n(bn);function wn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function On(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?wn(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Sn(){return(Sn=tn()(re.a.mark((function t(e,r,n){var o,i,a,s,u;return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=On({},r),-1!==r.url.indexOf("https")&&(i=e.config,a={},null!=i.sslOptions&&(a=i.sslOptions),s=new _n.a.Agent(a),o.httpsAgent=s),t.next=4,mn()(o);case 4:return u=t.sent,t.abrupt("return",null==n?u:n(u));case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var jn=function(t,e,r){return Sn.apply(this,arguments)};var En=function(t){var e=t.getState(),r=[];for(var n in e)"connections"!==n&&r.push(n);return r},xn=function(t,e){return new Promise((function(r,n){e.forEach((function(e){Br(t,e,Ar(e))}));var o=e.map((function(e){var r={type:"ADD_SERVICE",link:{method:"GET",href:"/"+e+"/",rel:"root",type:"application/vnd.sas.api+json",responseType:"application/json, application/vnd.sas.api+json",uri:"/"+e+"/"},logonInfo:null,tLink:null,serviceName:e,route:e,storeConfig:t.config};return"compute"==e&&null!=t.config.options.computeServerId&&(r.link.href="/compute/servers/"+t.config.options.computeServerId+"/",r.link.url=r.link.href),r})),i=!0,a=t.subscribe((function(){if(i)i=!1;else{for(var s={},u={},c=0,f=0;f<o.length;f++){var l=Wr(t,o[f].route);if(null!==l){var p=l.get("runStatus");if("error"===p){a();var h={service:e[f],detail:l.get("statusInfo")};n(h)}else if("ready"===p){c++;var d=Yr(t,l);s[e[f]]=d;var y=d.headers("x-csrf-header");if(null!==y){var v={"x-csrf-header":y,"x-csrf-token":d.headers("x-csrf-token")};u[e[f]]=v}else u[e[f]]=null}}}c===o.length&&(a(),r({folders:s,xsrfTokens:u}))}}));t.dispatch({type:"API_PARALLEL",interval:-1,actionArray:o})}))};var An=function(t,e,r,n){var o={type:e,route:r,payload:n};t.dispatch(o)};var Pn=function(t,e){var r=t.getState();for(var n in r)if(n===e)return Yr(t,r[n]);return null};function kn(){return(kn=tn()(re.a.mark((function t(e){var r,n,o,i,a,s,u,c,f,l,p=arguments;return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(r=p.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=p[o];if(n.includes("casManagement")&&n.push("casProxy"),i=[],a={},n.map((function(t){a[t]=Pn(e,t),null===a[t]&&i.push(t)})),!(i.length>0)){t.next=13;break}return t.next=8,xn(e,i);case 8:for(f in s=t.sent,u=s.folders,c=s.xsrfTokens)An(e,"API_XSRF",f,c[f]);for(l in u)a[l]=u[l];case 13:return t.abrupt("return",a);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Tn=function(t){return kn.apply(this,arguments)},In=r(17),Rn=r.n(In),Cn=r(47),Ln=r.n(Cn);function Mn(){return(Mn=tn()(re.a.mark((function t(e,r,n,o,i){var a;return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=setInterval((function(){Dn(e,r)}),1e3*n),setTimeout((function(){if(console.log("Note: Stopping keepViyaAlive"),clearInterval(a),null!=i)i();else{var t=le(e.getState()).host;console.log("timeout"),window.open("".concat(t,"/SASLogon/timedout"),"Timed Out","scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=0,height=0,left=-1000,top=-1000")}}),1e3*o),t.abrupt("return",!0);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Dn(t,e){return Nn.apply(this,arguments)}function Nn(){return(Nn=tn()(re.a.mark((function t(e,r){var n,o,i,a,s,u,c,f,l;return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:null!==r&&(n={type:"KEEP_ALIVE",route:"keepAlive",payload:{url:r,method:"GET",headers:{Accept:"*/*"}}},e.dispatch(n)),o=En(e),i=le(e.getState()).host,a=0;case 4:if(!(a<o.length)){t.next=20;break}if(-1!==(s=o[a]).indexOf("_")){t.next=17;break}if(-1!==s.indexOf("cas-http")){t.next=17;break}if(null===(u=Kr(e,s))){t.next=17;break}return c=u["x-csrf-header"],(f={url:"".concat(i,"/").concat(s,"/"),Accept:"application/json, application/vnd.sas.api+json",withCredentials:!0,method:"GET",xsrfHeaderName:c,headers:{}}).headers[c]=u["x-csrf-token"],t.next=15,jn(e,f);case 15:l={type:"KEEP_ALIVE",route:"keepAlive",payload:f},e.dispatch(l);case 17:a++,t.next=4;break;case 20:return t.abrupt("return",!0);case 21:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Un=function(t,e,r,n,o){return Mn.apply(this,arguments)};function Bn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function qn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Bn(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var zn,Fn=function(t,e){return new Promise((function(r,n){var o,i,a=!1,s=null,u=null==e?null:qn({},e);if(t.getState().connections.get("currentConnection")>=0)r("ready");else{switch(null!==u&&"implicit"!==u.authType||(s=function(){if(null==window)return null;var t=Ln()(window.location,!0),e=Rn.a.parse(t.hash),r=t.query;if(null==r.host||null==e.access_token)return null;var n="bearer";null!=e["#token_type"]?n=e["#token_type"]:null!=e.token_type&&(n=e.token_type);return{host:r.host,authType:"implicit",tokenType:n,token:e.access_token}}(),null!==u&&null!==s&&(u=qn(qn({},u),s))),null==u&&(u=null!==s?s:{host:"".concat(window.location.protocol,"//").concat(window.location.host),authType:"server"}),t.config.options={},null!=u.options&&(t.config.options=qn({},u.options)),u.authType){case"code":case"token":case"server":null==u.host&&(u.host="".concat(window.location.protocol,"//").concat(window.location.host));break;case"implicit":!1===u.hasOwnProperty("token")&&(a=!0,function(t){var e="".concat(t.host,"/SASLogon/oauth/authorize?response_type=token&client_id=").concat(t.clientID);if(null!=t.redirect){var r="".concat(window.location.protocol,"//").concat(window.location.host,"/").concat(t.redirect,"?host=").concat(t.host);e="".concat(e,"&redirect_uri=").concat(r)}window.location.replace(e)}(u),r("Implicit Call"))}a||((i={type:"LOGOFF"===u.authType?"VIYA_LOGOFF":"VIYA_LOGON",payload:qn({},u)}).payload.sslOptions=t.config.hasOwnProperty("sslOptions")?t.config.sslOptions:null,o=t.subscribe((function(){var i=t.getState().connections,a=i.get("runStatus");if("ready"===a){if(o(),null!=e&&null!=e.keepAlive){var s=300,u=14400;if(null!=e.timers){var c=e.timers;if("string"==typeof c){var f=c.split(",");s=parseInt(f[0]),u=parseInt(f[1])}else s=c[0],u=c[1]}Un(t,e.keepAlive,s,u,e.onTimeout)}r(a)}else"error"===a&&(o(),n(i.get("statusInfo").toJS()))})),i.storeConfig=t.config,u.authType,i.storeConfig=t.config,t.dispatch(i))}}))};var Hn=function(t){return new Promise((function(e,r){var n={type:"VIYA_LOGOFF",storeConfig:t.config,payload:{}};zn=t.subscribe((function(){var n=t.getState().connections,o=n.get("runStatus");"idle"===o?(zn(),e(o)):"error"===o&&(zn(),r(n.get("statusInfo").toJS()))})),t.dispatch(n)}))},Wn=function(t){t.dispatch(Mt)};var Gn=function(t,e){var r=e.split(":/"),n=r.shift(),o=t.getState()[n];return o=r.length>0?o.getIn(r):o,Yr(t,o)},Yn=r(10);var Kn=function(t,e){var r=null;if("string"==typeof e?r=e:!0===Yn.default.Iterable.isIterable(e)&&(r=e.get("route")),null!==e){var n={type:"DELETE_RAF_OBJECT",route:r};t.dispatch(n)}};function Vn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Jn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Vn(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function $n(t){return le(t.getState())}function Xn(t){for(var e=t.getState()._appdata,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var i=n.length>0?["userData"].concat(n):["userData"];return e.getIn(i,null)}function Qn(t,e){var r=t.getState()._apistatus,n=null;if(e){var o=r.getIn(["userData",e],null);null!==o&&((n=o.toJS()).job=Gn(t,n.route))}else n=r.get("routeList");return n}var Zn=function(t){var e={casProxy:!1};null!=t&&(e=Jn(Jn({},e),t));var r=zr(e);return{logon:Fn.bind(null,r),connect:Fn.bind(null,r),logoff:Hn.bind(null,r),disconnect:Hn.bind(null,r),connection:$n.bind(null,r),addServices:Tn.bind(null,r),getServices:En.bind(null,r),apiCall:Xr.bind(null,r),runAction:cn.bind(null,r),apiCallAll:Qr.bind(null,r),rafObject:Gn.bind(null,r),getService:Gn.bind(null,r),deleteRafObject:Kn.bind(null,r),jobState:nn.bind(null,r),jobStateAll:vn.bind(null,r),submit:pn.bind(null,r),submitStatus:Qn.bind(null,r),setAppData:An.bind(null,r,"APP_DATA"),getAppData:Xn.bind(null,r),setXsrfData:An.bind(null,r,"API_XSRF"),getXsrfData:Kr.bind(null,r),getState:r.getState,endStore:Wn.bind(null,r),store:r,config:Jn({},e),getServiceRoot:Pn.bind(null,r),request:jn.bind(null,r),keepViyaAlive:Un.bind(null,r)}};function to(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function eo(t){return le(t.getState())}function ro(t){for(var e=t.getState()._appdata,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var i=n.length>0?["userData"].concat(n):["userData"];return e.getIn(i,null)}function no(t,e){var r=t.getState()._apistatus,n=null;if(e){var o=r.getIn(["userData",e],null);null!==o&&((n=o.toJS()).job=Gn(t,n.route))}else n=r.get("routeList");return n}var oo=function(t){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?to(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):to(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({store:t},{logon:Fn.bind(null,t),logoff:Hn.bind(null,t),connection:eo.bind(null,t),addServices:Tn.bind(null,t),getServices:En.bind(null,t),apiCall:Xr.bind(null,t),runAction:cn.bind(null,t),apiCallAll:Qr.bind(null,t),rafObject:Gn.bind(null,t),deleteRafObject:Kn.bind(null,t),jobState:nn.bind(null,t),jobStateAll:vn.bind(null,t),submit:pn.bind(null,t),submitStatus:no.bind(null,t),setAppData:An.bind(null,t,"APP_DATA"),getAppData:ro.bind(null,t),setXsrfData:An.bind(null,t,"API_XSRF"),getXsrfData:Kr.bind(null,t),getState:t.getState,endStore:Wn.bind(null,t),store:t,getServiceRoot:Pn.bind(null,t),request:jn})}}])}));
|
|
12
|
+
var n=r(7),o=n.Buffer;function i(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return o(t,e,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=n:(i(n,e),e.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return o(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=o(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return o(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";t.exports=i;var n=r(44),o=Object.create(r(13));function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}o.inherits=r(9),o.inherits(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){var n=r(7).Buffer;t.exports=function(t){if(t instanceof Uint8Array){if(0===t.byteOffset&&t.byteLength===t.buffer.byteLength)return t.buffer;if("function"==typeof t.buffer.slice)return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}if(n.isBuffer(t)){for(var e=new Uint8Array(t.length),r=t.length,o=0;o<r;o++)e[o]=t[o];return e.buffer}throw new Error("Argument must be a Buffer")}},function(t,e){t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var o in n)r.call(n,o)&&(t[o]=n[o])}return t};var r=Object.prototype.hasOwnProperty},function(t,e){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(t,e,r){(function(t){var n;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){e&&e.nodeType,t&&t.nodeType;var i=Object({});i.global!==i&&i.window!==i&&i.self;var a,s=2147483647,u=/^xn--/,c=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,h=String.fromCharCode;function d(t){throw new RangeError(l[t])}function y(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function v(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+y((t=t.replace(f,".")).split("."),e).join(".")}function g(t){for(var e,r,n=[],o=0,i=t.length;o<i;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<i?56320==(64512&(r=t.charCodeAt(o++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),o--):n.push(e);return n}function m(t){return y(t,(function(t){var e="";return t>65535&&(e+=h((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=h(t)})).join("")}function b(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function _(t,e,r){var n=0;for(t=r?p(t/700):t>>1,t+=p(t/e);t>455;n+=36)t=p(t/35);return p(n+36*t/(t+38))}function w(t){var e,r,n,o,i,a,u,c,f,l,h,y=[],v=t.length,g=0,b=128,w=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&d("not-basic"),y.push(t.charCodeAt(n));for(o=r>0?r+1:0;o<v;){for(i=g,a=1,u=36;o>=v&&d("invalid-input"),((c=(h=t.charCodeAt(o++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36)>=36||c>p((s-g)/a))&&d("overflow"),g+=c*a,!(c<(f=u<=w?1:u>=w+26?26:u-w));u+=36)a>p(s/(l=36-f))&&d("overflow"),a*=l;w=_(g-i,e=y.length+1,0==i),p(g/e)>s-b&&d("overflow"),b+=p(g/e),g%=e,y.splice(g++,0,b)}return m(y)}function O(t){var e,r,n,o,i,a,u,c,f,l,y,v,m,w,O,S=[];for(v=(t=g(t)).length,e=128,r=0,i=72,a=0;a<v;++a)(y=t[a])<128&&S.push(h(y));for(n=o=S.length,o&&S.push("-");n<v;){for(u=s,a=0;a<v;++a)(y=t[a])>=e&&y<u&&(u=y);for(u-e>p((s-r)/(m=n+1))&&d("overflow"),r+=(u-e)*m,e=u,a=0;a<v;++a)if((y=t[a])<e&&++r>s&&d("overflow"),y==e){for(c=r,f=36;!(c<(l=f<=i?1:f>=i+26?26:f-i));f+=36)O=c-l,w=36-l,S.push(h(b(l+O%w,0))),c=p(O/w);S.push(h(b(c,0))),i=_(r,m,n==o),r=0,++n}++r,++e}return S.join("")}a={version:"1.4.1",ucs2:{decode:g,encode:m},decode:w,encode:O,toASCII:function(t){return v(t,(function(t){return c.test(t)?"xn--"+O(t):t}))},toUnicode:function(t){return v(t,(function(t){return u.test(t)?w(t.slice(4).toLowerCase()):t}))}},void 0===(n=function(){return a}.call(e,r,e,t))||(t.exports=n)}()}).call(this,r(99)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,r){"use strict";e.decode=e.parse=r(102),e.encode=e.stringify=r(103)},function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,i){e=e||"&",r=r||"=";var a={};if("string"!=typeof t||0===t.length)return a;var s=/\+/g;t=t.split(e);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var f=0;f<c;++f){var l,p,h,d,y=t[f].replace(s,"%20"),v=y.indexOf(r);v>=0?(l=y.substr(0,v),p=y.substr(v+1)):(l=y,p=""),h=decodeURIComponent(l),d=decodeURIComponent(p),n(a,h)?o(a[h])?a[h].push(d):a[h]=[a[h],d]:a[h]=d}return a};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,r){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,r,s){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?i(a(t),(function(a){var s=encodeURIComponent(n(a))+r;return o(t[a])?i(t[a],(function(t){return s+encodeURIComponent(n(t))})).join(e):s+encodeURIComponent(n(t[a]))})).join(e):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(t)):""};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var a=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},function(t,e,r){var n=r(46);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(46);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty;function o(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function i(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var r,o,a=[];for(o in"string"!=typeof e&&(e="?"),t)if(n.call(t,o)){if((r=t[o])||null!=r&&!isNaN(r)||(r=""),o=i(o),r=i(r),null===o||null===r)continue;a.push(o+"="+r)}return a.length?e+a.join("&"):""},e.parse=function(t){for(var e,r=/([^=?#&]+)=?([^&]*)/g,n={};e=r.exec(t);){var i=o(e[1]),a=o(e[2]);null===i||null===a||i in n||(n[i]=a)}return n}},function(t,e,r){"use strict";r.r(e),r.d(e,"initStore",(function(){return Zn})),r.d(e,"endStore",(function(){return Wn})),r.d(e,"restoreStore",(function(){return oo}));var n=r(1),o=r.n(n);function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function u(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var c="function"==typeof Symbol&&Symbol.observable||"@@observable",f=function(){return Math.random().toString(36).substring(7).split("").join(".")},l={INIT:"@@redux/INIT"+f(),REPLACE:"@@redux/REPLACE"+f(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+f()}};function p(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function h(t,e,r){var n;if("function"==typeof e&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(u(0));if("function"==typeof e&&void 0===r&&(r=e,e=void 0),void 0!==r){if("function"!=typeof r)throw new Error(u(1));return r(h)(t,e)}if("function"!=typeof t)throw new Error(u(2));var o=t,i=e,a=[],s=a,f=!1;function d(){s===a&&(s=a.slice())}function y(){if(f)throw new Error(u(3));return i}function v(t){if("function"!=typeof t)throw new Error(u(4));if(f)throw new Error(u(5));var e=!0;return d(),s.push(t),function(){if(e){if(f)throw new Error(u(6));e=!1,d();var r=s.indexOf(t);s.splice(r,1),a=null}}}function g(t){if(!p(t))throw new Error(u(7));if(void 0===t.type)throw new Error(u(8));if(f)throw new Error(u(9));try{f=!0,i=o(i,t)}finally{f=!1}for(var e=a=s,r=0;r<e.length;r++){(0,e[r])()}return t}function m(t){if("function"!=typeof t)throw new Error(u(10));o=t,g({type:l.REPLACE})}function b(){var t,e=v;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(u(11));function r(){t.next&&t.next(y())}return r(),{unsubscribe:e(r)}}})[c]=function(){return this},t}return g({type:l.INIT}),(n={dispatch:g,subscribe:v,getState:y,replaceReducer:m})[c]=b,n}function d(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var o=e[n];0,"function"==typeof t[o]&&(r[o]=t[o])}var i,a=Object.keys(r);try{!function(t){Object.keys(t).forEach((function(e){var r=t[e];if(void 0===r(void 0,{type:l.INIT}))throw new Error(u(12));if(void 0===r(void 0,{type:l.PROBE_UNKNOWN_ACTION()}))throw new Error(u(13))}))}(r)}catch(t){i=t}return function(t,e){if(void 0===t&&(t={}),i)throw i;for(var n=!1,o={},s=0;s<a.length;s++){var c=a[s],f=r[c],l=t[c],p=f(l,e);if(void 0===p){e&&e.type;throw new Error(u(14))}o[c]=p,n=n||p!==l}return(n=n||a.length!==Object.keys(t).length)?o:t}}function y(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}var v=function(t){return"@@redux-saga/"+t},g=v("CANCEL_PROMISE"),m=v("CHANNEL_END"),b=v("IO"),_=v("MATCH"),w=v("MULTICAST"),O=v("SAGA_ACTION"),S=v("SELF_CANCELLATION"),j=v("TASK"),E=v("TASK_CANCEL"),x=v("TERMINATE"),A=v("LOCATION");function P(){return(P=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}var k=function(t){return null==t},T=function(t){return null!=t},I=function(t){return"function"==typeof t},R=function(t){return"string"==typeof t},C=Array.isArray,L=function(t){return t&&I(t.then)},M=function(t){return t&&I(t.next)&&I(t.throw)},D=function t(e){return e&&(R(e)||B(e)||I(e)||C(e)&&e.every(t))},N=function(t){return t&&I(t.take)&&I(t.close)},U=function(t){return I(t)&&t.hasOwnProperty("toString")},B=function(t){return Boolean(t)&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype};var q=function(t,e){var r;void 0===e&&(e=!0);var n=new Promise((function(n){r=setTimeout(n,Math.min(2147483647,t),e)}));return n[g]=function(){clearTimeout(r)},n},z=function(t){return function(){return t}}(!0),F=function(){};var H=function(t){return t};"function"==typeof Symbol&&Symbol.asyncIterator&&Symbol.asyncIterator;var W=function(t,e){P(t,e),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach((function(r){t[r]=e[r]}))};function G(t,e){var r=t.indexOf(e);r>=0&&t.splice(r,1)}function Y(t){var e=!1;return function(){e||(e=!0,t())}}var K=function(t){throw t},V=function(t){return{value:t,done:!0}};function J(t,e,r){void 0===e&&(e=K),void 0===r&&(r="iterator");var n={meta:{name:r},next:t,throw:e,return:V,isSagaIterator:!0};return"undefined"!=typeof Symbol&&(n[Symbol.iterator]=function(){return n}),n}function $(t,e){var r=e.sagaStack;console.error(t),console.error(r)}var X=function(t){return Array.apply(null,new Array(t))},Q=function(t){return function(e){return t(Object.defineProperty(e,O,{value:!0}))}},Z=function(t){return t===x},tt=function(t){return t===E},et=function(t){return Z(t)||tt(t)};function rt(t,e){var r=Object.keys(t),n=r.length;var o,i=0,a=C(t)?X(n):{},s={};return r.forEach((function(t){var r=function(r,s){o||(s||et(r)?(e.cancel(),e(r,s)):(a[t]=r,++i===n&&(o=!0,e(a))))};r.cancel=F,s[t]=r})),e.cancel=function(){o||(o=!0,r.forEach((function(t){return s[t].cancel()})))},s}function nt(t){return{name:t.name||"anonymous",location:ot(t)}}function ot(t){return t[A]}function it(t,e){void 0===t&&(t=10);var r=new Array(t),n=0,o=0,i=0,a=function(e){r[o]=e,o=(o+1)%t,n++},s=function(){if(0!=n){var e=r[i];return r[i]=null,n--,i=(i+1)%t,e}},u=function(){for(var t=[];n;)t.push(s());return t};return{isEmpty:function(){return 0==n},put:function(s){var c;if(n<t)a(s);else switch(e){case 1:throw new Error("Channel's Buffer overflow!");case 3:r[o]=s,i=o=(o+1)%t;break;case 4:c=2*t,r=u(),n=r.length,o=r.length,i=0,r.length=c,t=c,a(s)}},take:s,flush:u}}var at=function(t){return it(t,4)},st=function(t,e){var r;return(r={})[b]=!0,r.combinator=!1,r.type=t,r.payload=e,r},ut=function(t){return st("FORK",P({},t.payload,{detached:!0}))};function ct(t,e){return void 0===t&&(t="*"),D(t)?(T(e)&&console.warn("take(pattern) takes one argument but two were provided. Consider passing an array for listening to several action types"),st("TAKE",{pattern:t})):N(r=t)&&r[w]&&T(e)&&D(e)?st("TAKE",{channel:t,pattern:e}):N(t)?(T(e)&&console.warn("take(channel) takes one argument but two were provided. Second argument is ignored."),st("TAKE",{channel:t})):void 0;var r}function ft(t,e){return k(e)&&(e=t,t=void 0),st("PUT",{channel:t,action:e})}function lt(t){var e=st("ALL",t);return e.combinator=!0,e}function pt(t,e){var r,n=null;return I(t)?r=t:(C(t)?(n=t[0],r=t[1]):(n=t.context,r=t.fn),n&&R(r)&&I(n[r])&&(r=n[r])),{context:n,fn:r,args:e}}function ht(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return st("CALL",pt(t,r))}function dt(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return st("FORK",pt(t,r))}function yt(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return ut(dt.apply(void 0,[t].concat(r)))}function vt(t){return void 0===t&&(t=S),st("CANCEL",t)}function gt(t){void 0===t&&(t=H);for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return st("SELECT",{selector:t,args:r})}var mt=ht.bind(null,q);function bt(){var t={};return t.promise=new Promise((function(e,r){t.resolve=e,t.reject=r})),t}var _t=bt,wt=[],Ot=0;function St(t){try{xt(),t()}finally{At()}}function jt(t){wt.push(t),Ot||(xt(),Pt())}function Et(t){try{return xt(),t()}finally{Pt()}}function xt(){Ot++}function At(){Ot--}function Pt(){var t;for(At();!Ot&&void 0!==(t=wt.shift());)St(t)}var kt=function(t){return function(e){return t.some((function(t){return Lt(t)(e)}))}},Tt=function(t){return function(e){return t(e)}},It=function(t){return function(e){return e.type===String(t)}},Rt=function(t){return function(e){return e.type===t}},Ct=function(){return z};function Lt(t){var e="*"===t?Ct:R(t)?It:C(t)?kt:U(t)?It:I(t)?Tt:B(t)?Rt:null;if(null===e)throw new Error("invalid pattern: "+t);return e(t)}var Mt={type:m},Dt=function(t){return t&&t.type===m};function Nt(t){void 0===t&&(t=at());var e=!1,r=[];return{take:function(n){e&&t.isEmpty()?n(Mt):t.isEmpty()?(r.push(n),n.cancel=function(){G(r,n)}):n(t.take())},put:function(n){if(!e){if(0===r.length)return t.put(n);r.shift()(n)}},flush:function(r){e&&t.isEmpty()?r(Mt):r(t.flush())},close:function(){if(!e){e=!0;var t=r;r=[];for(var n=0,o=t.length;n<o;n++){(0,t[n])(Mt)}}}}}function Ut(){var t,e,r,n,o,i,a=(e=!1,n=r=[],o=function(){n===r&&(n=r.slice())},i=function(){e=!0;var t=r=n;n=[],t.forEach((function(t){t(Mt)}))},(t={})[w]=!0,t.put=function(t){if(!e)if(Dt(t))i();else for(var o=r=n,a=0,s=o.length;a<s;a++){var u=o[a];u[_](t)&&(u.cancel(),u(t))}},t.take=function(t,r){void 0===r&&(r=Ct),e?t(Mt):(t[_]=r,o(),n.push(t),t.cancel=Y((function(){o(),G(n,t)})))},t.close=i,t),s=a.put;return a.put=function(t){t[O]?s(t):jt((function(){s(t)}))},a}function Bt(t,e){var r=t[g];I(r)&&(e.cancel=r),t.then(e,(function(t){e(t,!0)}))}var qt,zt=0,Ft=function(){return++zt};function Ht(t){t.isRunning()&&t.cancel()}var Wt=((qt={}).TAKE=function(t,e,r){var n=e.channel,o=void 0===n?t.channel:n,i=e.pattern,a=e.maybe,s=function(t){t instanceof Error?r(t,!0):!Dt(t)||a?r(t):r(x)};try{o.take(s,T(i)?Lt(i):null)}catch(t){return void r(t,!0)}r.cancel=s.cancel},qt.PUT=function(t,e,r){var n=e.channel,o=e.action,i=e.resolve;jt((function(){var e;try{e=(n?n.put:t.dispatch)(o)}catch(t){return void r(t,!0)}i&&L(e)?Bt(e,r):r(e)}))},qt.ALL=function(t,e,r,n){var o=n.digestEffect,i=zt,a=Object.keys(e);if(0!==a.length){var s=rt(e,r);a.forEach((function(t){o(e[t],i,s[t],t)}))}else r(C(e)?[]:{})},qt.RACE=function(t,e,r,n){var o=n.digestEffect,i=zt,a=Object.keys(e),s=C(e)?X(a.length):{},u={},c=!1;a.forEach((function(t){var e=function(e,n){c||(n||et(e)?(r.cancel(),r(e,n)):(r.cancel(),c=!0,s[t]=e,r(s)))};e.cancel=F,u[t]=e})),r.cancel=function(){c||(c=!0,a.forEach((function(t){return u[t].cancel()})))},a.forEach((function(t){c||o(e[t],i,u[t],t)}))},qt.CALL=function(t,e,r,n){var o=e.context,i=e.fn,a=e.args,s=n.task;try{var u=i.apply(o,a);if(L(u))return void Bt(u,r);if(M(u))return void Qt(t,u,s.context,zt,nt(i),!1,r);r(u)}catch(t){r(t,!0)}},qt.CPS=function(t,e,r){var n=e.context,o=e.fn,i=e.args;try{var a=function(t,e){k(t)?r(e):r(t,!0)};o.apply(n,i.concat(a)),a.cancel&&(r.cancel=a.cancel)}catch(t){r(t,!0)}},qt.FORK=function(t,e,r,n){var o=e.context,i=e.fn,a=e.args,s=e.detached,u=n.task,c=function(t){var e=t.context,r=t.fn,n=t.args;try{var o=r.apply(e,n);if(M(o))return o;var i=!1;return J((function(t){return i?{value:t,done:!0}:(i=!0,{value:o,done:!L(o)})}))}catch(t){return J((function(){throw t}))}}({context:o,fn:i,args:a}),f=function(t,e){return t.isSagaIterator?{name:t.meta.name}:nt(e)}(c,i);Et((function(){var e=Qt(t,c,u.context,zt,f,s,void 0);s?r(e):e.isRunning()?(u.queue.addTask(e),r(e)):e.isAborted()?u.queue.abort(e.error()):r(e)}))},qt.JOIN=function(t,e,r,n){var o=n.task,i=function(t,e){if(t.isRunning()){var r={task:o,cb:e};e.cancel=function(){t.isRunning()&&G(t.joiners,r)},t.joiners.push(r)}else t.isAborted()?e(t.error(),!0):e(t.result())};if(C(e)){if(0===e.length)return void r([]);var a=rt(e,r);e.forEach((function(t,e){i(t,a[e])}))}else i(e,r)},qt.CANCEL=function(t,e,r,n){var o=n.task;e===S?Ht(o):C(e)?e.forEach(Ht):Ht(e),r()},qt.SELECT=function(t,e,r){var n=e.selector,o=e.args;try{r(n.apply(void 0,[t.getState()].concat(o)))}catch(t){r(t,!0)}},qt.ACTION_CHANNEL=function(t,e,r){var n=e.pattern,o=Nt(e.buffer),i=Lt(n),a=function e(r){Dt(r)||t.channel.take(e,i),o.put(r)},s=o.close;o.close=function(){a.cancel(),s()},t.channel.take(a,i),r(o)},qt.CANCELLED=function(t,e,r,n){r(n.task.isCancelled())},qt.FLUSH=function(t,e,r){e.flush(r)},qt.GET_CONTEXT=function(t,e,r,n){r(n.task.context[e])},qt.SET_CONTEXT=function(t,e,r,n){var o=n.task;W(o.context,e),r()},qt);function Gt(t,e){return t+"?"+e}function Yt(t){var e=t.name,r=t.location;return r?e+" "+Gt(r.fileName,r.lineNumber):e}var Kt=null,Vt=[],Jt=function(){Kt=null,Vt.length=0},$t=function(){var t,e,r,n,o,i,a,s=Vt[0],u=Vt.slice(1),c=s.crashedEffect?(t=s.crashedEffect,(e=ot(t))?e.code+" "+Gt(e.fileName,e.lineNumber):""):null;return["The above error occurred in task "+Yt(s.meta)+(c?" \n when executing effect "+c:"")].concat(u.map((function(t){return" created by "+Yt(t.meta)})),[(r=Vt,n=function(t){return t.cancelledTasks},o=r,a=(i=[]).concat.apply(i,o.map(n)),a.length?["Tasks cancelled due to error:"].concat(a).join("\n"):"")]).join("\n")};function Xt(t,e,r,n,o,i,a){var s;void 0===a&&(a=F);var u,c,f=0,l=null,p=[],h=Object.create(r),d=function(t,e,r){var n,o=[],i=!1;function a(t){e(),u(),r(t,!0)}function s(e){o.push(e),e.cont=function(s,u){i||(G(o,e),e.cont=F,u?a(s):(e===t&&(n=s),o.length||(i=!0,r(n))))}}function u(){i||(i=!0,o.forEach((function(t){t.cont=F,t.cancel()})),o=[])}return s(t),{addTask:s,cancelAll:u,abort:a,getTasks:function(){return o}}}(e,(function(){p.push.apply(p,d.getTasks().map((function(t){return t.meta.name})))}),y);function y(e,r){if(r){if(f=2,(i={meta:o,cancelledTasks:p}).crashedEffect=Kt,Vt.push(i),v.isRoot){var n=$t();Jt(),t.onError(e,{sagaStack:n})}c=e,l&&l.reject(e)}else e===E?f=1:1!==f&&(f=3),u=e,l&&l.resolve(e);var i;v.cont(e,r),v.joiners.forEach((function(t){t.cb(e,r)})),v.joiners=null}var v=((s={})[j]=!0,s.id=n,s.meta=o,s.isRoot=i,s.context=h,s.joiners=[],s.queue=d,s.cancel=function(){0===f&&(f=1,d.cancelAll(),y(E,!1))},s.cont=a,s.end=y,s.setContext=function(t){W(h,t)},s.toPromise=function(){return l||(l=_t(),2===f?l.reject(c):0!==f&&l.resolve(u)),l.promise},s.isRunning=function(){return 0===f},s.isCancelled=function(){return 1===f||0===f&&1===e.status},s.isAborted=function(){return 2===f},s.result=function(){return u},s.error=function(){return c},s);return v}function Qt(t,e,r,n,o,i,a){var s=t.finalizeRunEffect((function(e,r,n){if(L(e))Bt(e,n);else if(M(e))Qt(t,e,c.context,r,o,!1,n);else if(e&&e[b]){(0,Wt[e.type])(t,e.payload,n,f)}else n(e)}));l.cancel=F;var u={meta:o,cancel:function(){0===u.status&&(u.status=1,l(E))},status:0},c=Xt(t,u,r,n,o,i,a),f={task:c,digestEffect:p};return a&&(a.cancel=c.cancel),l(),c;function l(t,r){try{var o;r?(o=e.throw(t),Jt()):tt(t)?(u.status=1,l.cancel(),o=I(e.return)?e.return(E):{done:!0,value:E}):o=Z(t)?I(e.return)?e.return():{done:!0}:e.next(t),o.done?(1!==u.status&&(u.status=3),u.cont(o.value)):p(o.value,n,l)}catch(t){if(1===u.status)throw t;u.status=2,u.cont(t,!0)}}function p(e,r,n,o){void 0===o&&(o="");var i,a=Ft();function u(r,o){i||(i=!0,n.cancel=F,t.sagaMonitor&&(o?t.sagaMonitor.effectRejected(a,r):t.sagaMonitor.effectResolved(a,r)),o&&function(t){Kt=t}(e),n(r,o))}t.sagaMonitor&&t.sagaMonitor.effectTriggered({effectId:a,parentEffectId:r,label:o,effect:e}),u.cancel=F,n.cancel=function(){i||(i=!0,u.cancel(),u.cancel=F,t.sagaMonitor&&t.sagaMonitor.effectCancelled(a))},s(e,a,u)}}function Zt(t,e){var r=t.channel,n=void 0===r?Ut():r,o=t.dispatch,i=t.getState,a=t.context,s=void 0===a?{}:a,u=t.sagaMonitor,c=t.effectMiddlewares,f=t.onError,l=void 0===f?$:f;for(var p=arguments.length,h=new Array(p>2?p-2:0),d=2;d<p;d++)h[d-2]=arguments[d];var v=e.apply(void 0,h);var g,m=Ft();if(u&&(u.rootSagaStarted=u.rootSagaStarted||F,u.effectTriggered=u.effectTriggered||F,u.effectResolved=u.effectResolved||F,u.effectRejected=u.effectRejected||F,u.effectCancelled=u.effectCancelled||F,u.actionDispatched=u.actionDispatched||F,u.rootSagaStarted({effectId:m,saga:e,args:h})),c){var b=y.apply(void 0,c);g=function(t){return function(e,r,n){return b((function(e){return t(e,r,n)}))(e)}}}else g=H;var _={channel:n,dispatch:Q(o),getState:i,sagaMonitor:u,onError:l,finalizeRunEffect:g};return Et((function(){var t=Qt(_,v,s,m,nt(e),!0,void 0);return u&&u.effectResolved(m,t),t}))}var te=function(t){var e,r=void 0===t?{}:t,n=r.context,o=void 0===n?{}:n,i=r.channel,a=void 0===i?Ut():i,s=r.sagaMonitor,u=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(r,["context","channel","sagaMonitor"]);function c(t){var r=t.getState,n=t.dispatch;return e=Zt.bind(null,P({},u,{context:o,channel:a,dispatch:n,getState:r,sagaMonitor:s})),function(t){return function(e){s&&s.actionDispatched&&s.actionDispatched(e);var r=t(e);return a.put(e),r}}}return c.run=function(){return e.apply(void 0,arguments)},c.setContext=function(t){W(o,t)},c},ee=r(0),re=r.n(ee),ne=function(t){return{done:!0,value:t}},oe={};function ie(t){return N(t)?"channel":U(t)?String(t):I(t)?t.name:String(t)}function ae(t,e,r){var n,o,i,a=e;function s(e,r){if(a===oe)return ne(e);if(r&&!o)throw a=oe,r;n&&n(e);var s=r?t[o](r):t[a]();return a=s.nextState,i=s.effect,n=s.stateUpdater,o=s.errorState,a===oe?ne(e):i}return J(s,(function(t){return s(null,t)}),r)}function se(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];var i,a={done:!1,value:ct(t)},s=function(t){return{done:!1,value:dt.apply(void 0,[e].concat(n,[t]))}},u=function(t){return i=t};return ae({q1:function(){return{nextState:"q2",effect:a,stateUpdater:u}},q2:function(){return{nextState:"q1",effect:s(i)}}},"q1","takeEvery("+ie(t)+", "+e.name+")")}function ue(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];var i,a,s={done:!1,value:ct(t)},u=function(t){return{done:!1,value:dt.apply(void 0,[e].concat(n,[t]))}},c=function(t){return{done:!1,value:vt(t)}},f=function(t){return i=t},l=function(t){return a=t};return ae({q1:function(){return{nextState:"q2",effect:s,stateUpdater:l}},q2:function(){return i?{nextState:"q3",effect:c(i)}:{nextState:"q1",effect:u(a),stateUpdater:f}},q3:function(){return{nextState:"q1",effect:u(a),stateUpdater:f}}},"q1","takeLatest("+ie(t)+", "+e.name+")")}function ce(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return dt.apply(void 0,[se,t,e].concat(n))}function fe(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return dt.apply(void 0,[ue,t,e].concat(n))}function le(t){var e=t.connections,r=e.get("currentConnection");return-1===r?null:e.get("connections").get(r).toJS().logonInfo}var pe=r(19),he=r(6),de="API_CALL",ye=function(t){return"password"===t||null==t?{logon:he.c,link:{href:"/SASLogon/oauth/token",method:"POST",rel:"logon",responseType:"application/json",type:"application/x-www-form-urlencoded",uri:"/SASLogon/oauth/token"}}:{keepAlive:he.a}},ve=function(){return{logoff:he.b,link:{href:"/SASLogon/logout",method:"GET",rel:"logoff",responseType:"application/json",uri:"/SASLogon/logout"}}};r(10);function ge(t,e,r){if("_appdata"===r||"_apistatus"===r||"_xsrf"===r)return{structType:r,type:r,route:r,routeList:[],userData:{}};var n={structType:e,type:e,title:t,method:"GET",iconfig:{},payload:{},statusInfo:{status:0,statusText:" ",error:!1,details:" "},runStatus:"idle",parentRoute:"",route:"",resultType:"",links:{},scrollCmds:{},paginator:!1,itemsList:[],items:[],details:{},stateEvent:null,responseHeaders:{},link:null,raw:{}};return 3===arguments.length&&(n.link={method:"GET",title:r,href:"/"+r+"/",rel:"root",type:"application/vnd.sas.api",uri:"/"+r+"/"},n.route="".concat(r,":/").concat(r),n.parentRoute=r),n}var me=re.a.mark(we);function be(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _e(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?be(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function we(){var t,e,r,n,o;return re.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:t=!0;case 1:if(!t){i.next=30;break}return i.next=4,ct("VIYA_LOGON");case 4:return e=i.sent,i.next=7,ft({type:"BEGIN_LOGON"});case 7:return i.next=9,ht(Oe,e);case 9:return(r=i.sent).keepAlive=null==e.payload.keepAlive?null:e.payload.keepAlive,i.next=13,ft(r);case 13:if(!1!==r.error){i.next=28;break}return i.next=16,ct("VIYA_LOGOFF");case 16:return e=i.sent,i.next=19,ft({type:"BEGIN_LOGOFF"});case 19:return n=_e({},e),i.next=22,gt(le);case 22:return n.logonInfo=i.sent,i.next=25,ht(Se,n);case 25:return o=i.sent,i.next=28,ft(o);case 28:i.next=1;break;case 30:case"end":return i.stop()}}),me)}function Oe(t){var e=_e({},t.payload);if("server"===e.authType||"implicit"===e.authType)return{type:e.authType,error:!1,payload:{iconfig:e}};var r=ye(e.authType);return e.link=r.link,r.logon(e).then((function(t){return{type:"VIYA_LOGON_COMPLETE",error:!1,payload:t}})).catch((function(t){return{type:"VIYA_LOGON_COMPLETE",error:!0,payload:t}}))}function Se(t){var e=ve();return t.link=e.link,e.logoff(t).then((function(t){return{type:"VIYA_LOGOFF_COMPLETE",error:!1,payload:t}})).catch((function(t){return{type:"VIYA_LOGOFF_COMPLETE",error:!0,payload:t}}))}var je=we;function Ee(t,e,r){return{error:r,type:e.serviceName+"_"+e.type+"_COMPLETE",config:e,payload:t}}var xe=function(t){return null===t.logonInfo?Ee({error:"Please logon"},t,!0):Object(he.b)(t).then((function(e){return Ee(e,t,!1)})).catch((function(e){return Ee(e,t,!0)}))},Ae=re.a.mark(Te);function Pe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ke(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pe(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pe(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Te(t){var e,r;return re.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=ke({},t),n.next=3,gt(le);case 3:return e.logonInfo=n.sent,n.next=6,ft({type:e.serviceName+"_"+t.type+"_BEGIN",config:e});case 6:if(!(t.delay>0)){n.next=9;break}return n.next=9,mt(1e3*t.delay);case 9:return n.next=11,ht(xe,e);case 11:return r=n.sent,n.next=14,ft(r);case 14:case"end":return n.stop()}}),Ae)}var Ie=Te,Re=re.a.mark(Ce);function Ce(){return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ce(["ADD_SERVICE",de],Ie);case 2:case"end":return t.stop()}}),Re)}var Le=Ce;function Me(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function De(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Me(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Me(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Ne=re.a.mark(qe),Ue=re.a.mark(ze),Be=re.a.mark(Fe);function qe(){return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ce("API_PARALLEL",ze);case 2:case"end":return t.stop()}}),Ne)}function ze(t){var e,r,n,o,i,a;return re.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:for(e={},r=t.actionArray,n=0;n<r.length;n++)o="l".concat(n),e[o]=ht(Fe,r[n]);return s.next=5,lt(e);case 5:i=s.sent,s.t0=re.a.keys(i);case 7:if((s.t1=s.t0()).done){s.next=13;break}return a=s.t1.value,s.next=11,ft(i[a]);case 11:s.next=7;break;case 13:case"end":return s.stop()}}),Ue)}function Fe(t){var e;return re.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e=De({},t),r.next=3,gt(le);case 3:return e.logonInfo=r.sent,r.next=6,ft({type:e.serviceName+"_"+e.type+"_BEGIN",config:e});case 6:return r.abrupt("return",e);case 7:case"end":return r.stop()}}),Be)}var He=qe,We=r(5),Ge=r.n(We);function Ye(t,e,r){return{error:r,type:e.serviceName+"_"+e.type+"_COMPLETE",config:e,payload:t}}var Ke=function(t){var e,r=["running","pending"];return Object(he.b)(t).then((function(n){var o=n.data.results;return"object"===Ge()(o)&&(o=!0===n.data.results.items.isIdle?"completed":"running",n.data.results.items=o),function(){if(e=!1,t.eventHandler){var r=304===n.status?"running":o,i=t.eventHandler(r,t.jobContext);"boolean"==typeof i?e=i:i!==r&&(n.data.results=i,e=!0)}}(),304===n.status&&!1===e?null:-1===r.indexOf(o)||!0===e?Ye(n,t,!1):(null!=t.payload.headers&&null!=t.payload.headers["If-None-Match"]&&null!=n.headers.etag&&(t.payload.headers["If-None-Match"]=n.headers.etag),null)})).catch((function(r){return t.eventHandler&&(e=t.eventHandler("*SystemError",t.jobContext)),Ye(r,t,!0)}))},Ve=re.a.mark(Xe);function Je(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function $e(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Je(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Je(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Xe(t){var e,r;return re.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=$e({},t),r=null,n.next=4,gt(le);case 4:return e.logonInfo=n.sent,n.next=7,ft({type:e.serviceName+"_"+t.type+"_BEGIN",config:e});case 7:return n.next=9,ht(Ke,e);case 9:if(r=n.sent,!e.delay){n.next=13;break}return n.next=13,mt(1e3*e.delay);case 13:if(null===r){n.next=7;break}case 14:return n.next=16,ft(r);case 16:case"end":return n.stop()}}),Ve)}var Qe=Xe,Ze=re.a.mark(tr);function tr(){return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ce(["API_POLL"],Qe);case 2:case"end":return t.stop()}}),Ze)}var er=tr,rr=re.a.mark(or),nr=re.a.mark(ir);function or(){return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ce(["APP_DATA","API_STATUS","API_XSRF"],ir);case 2:case"end":return t.stop()}}),rr)}function ir(t){var e,r;return re.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:n.t0=t.type,n.next="APP_DATA"===n.t0?3:"API_STATUS"===n.t0?5:7;break;case 3:return e="_appdata_APP_DATA_SETSTATE",n.abrupt("break",9);case 5:return e="_apistatus_API_STATUS_SETSTATE",n.abrupt("break",9);case 7:return e="_xsrf_API_XSRF_SETSTATE",n.abrupt("break",9);case 9:return r={type:e,payload:t},n.next=12,ft(r);case 12:case"end":return n.stop()}}),nr)}var ar=or,sr=re.a.mark(cr),ur=re.a.mark(fr);function cr(){return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fe("KEEP_ALIVE",fr);case 2:t.sent;case 3:case"end":return t.stop()}}),sr)}function fr(t){var e;return re.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,yt(lr,t);case 2:return e=r.sent,r.abrupt("return",e);case 4:case"end":return r.stop()}}),ur)}function lr(t){return ye("keepAlive").keepAlive(t)}var pr=cr,hr=re.a.mark(dr);function dr(){return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,lt([je(),Le(),He(),er(),ar(),pr()]);case 2:case"end":return t.stop()}}),hr)}var yr=dr,vr=r(4),gr=r.n(vr);function mr(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return br(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return br(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function br(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function _r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function wr(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_r(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_r(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Or(t,e,r){var n,o=["next","prev","first","last"];n="links"===r?t:"cmds"===r||"lcmds"===r?t.filter((function(t){return!o.includes(t.rel)})):"scrollCmds"===r?t.filter((function(t){return o.includes(t.rel)})):t,"lcmds"===r&&(r="links");var i=[].concat(gr()(e),[r]),a={};return n.map((function(t){var n=[].concat(gr()(i),[t.rel]);!1===t.hasOwnProperty("title")&&(t.title=t.rel);var s={link:wr({},t),method:t.method,route:n.join(":/"),parentRoute:gr()(e).join(":/"),paginator:o.includes(t.rel)};a[t.rel]=wr(wr({},ge(t.title,r)),s)})),a}var Sr=function(t,e){var r=null;if(!0===t.error)return(r=ge("error","error")).link=t.config.href,r.runStatus="error",r.statusInfo=Object(pe.setBadStatus)(t.payload),r;var n=t.payload.data.results,o="";if(!0===n.hasOwnProperty("accept")?o=n.accept:!0===t.payload.headers.hasOwnProperty("content-type")?o=t.payload.headers["content-type"].split(";")[0].split("+json")[0]:204===t.payload.status&&(o="No Content"),n.hasOwnProperty("items"))(r=function(t,e){var r=[],n={},o=ge(e[e.length-1],"links"),i={name:"",type:"",resultType:"",cmds:null,data:null};o.resultType=t.accept,o.details=function(t){var e=wr({},t);e.hasOwnProperty("links")&&delete e.links;e.hasOwnProperty("items")&&delete e.items;return e}(t),t.hasOwnProperty("name")&&(i.name=t.name);t.hasOwnProperty("links")&&(o.links=Or(t.links,e,"lcmds"),o.scrollCmds=Or(t.links,e,"scrollCmds"));if(!1===Array.isArray(t.items))return i.data=t.items,i.resultType=t.accept,t.items.hasOwnProperty("customHandling")?(i.type=t.items.customHandling,o.type=t.items.customHandling):(i.type="items",o.type="items"),o.items=i,o;if(0===t.items.length)return i.resultType=t.accept,i.data=[],i.type="itemsList",o.type="itemsList",o.items=i,o.itemsList=[],o;if(t.items[0].hasOwnProperty("links")){var a,s=-1,u="",c=mr(t.items);try{for(c.s();!(a=c.n()).done;){var f=a.value;s++;var l=void 0;if(l=f.hasOwnProperty("name2")?f.name2:f.hasOwnProperty("name")?f.name:f.hasOwnProperty("id")?f.id:"".concat(s),u===l){var p=!0===f.hasOwnProperty("id")?f.id:s;l="".concat(l,"_").concat(p)}else u=l;r.push(l);var h=[].concat(gr()(e),["items","data",l]),d=Or(f.links,h,"cmds"),y=wr({},f);delete y.links;var v={name:"",type:"",resultType:"",cmds:null,data:null};v.type="itemRow",v.name=l,v.resultType=!0===y.hasOwnProperty("contentType")?y.contentType:"unknown",v.cmds=d,v.data=y,n[l]=v}}catch(t){c.e(t)}finally{c.f()}i.data=n,i.resultType=t.accept,i.type="itemsList",o.itemsList=[].concat(r),o.type="itemsList"}else i.data=gr()(t.items),i.resultType=t.accept,i.type="itemsArray",o.type="itemsArray";return o.items=i,o}(n,e)).resultType=null==n.accept?o:n.accept;else if(n.hasOwnProperty("links")){r=function(t,e){var r=ge(e[e.length-1],"links");if(null===t||0===t.length)return r;return r.links=Or(t,e,"lcmds"),r.type="links",r.scrollCmds=Or(t,e,"scrollCmds"),r}(n.links,e);var i=wr({},n);for(var a in delete i.links,i)if("version"!==a){r.type="data";break}r.items={resultType:"data",data:i,cmds:null},r.resultType=o}else(r=ge("data","data")).type="data",r.resultType=o,r.items={resultType:o,data:"object"===Ge()(n)?Object.assign({},n):n,cmds:null};r.link=t.config.link.href,r.runStatus="ready",r.statusInfo=Object(pe.setGoodStatus)(t.payload);var s=t.config,u=t.payload.config,c=u.url.split("/");return r.host="".concat(c[0],"//").concat(c[2]),r.iconfig={input:{link:wr({},s.link),payload:s.hasOwnProperty("payload")?Object.assign({},s.payload):{}},http:{url:u.url,payload:{headers:[].concat(u.headers),data:null==u.data?{}:"object"===Ge()(u.data)?Object.assign({},u.data):u.data,qs:null==u.params?{}:"object"===Ge()(u.params)?Object.assign({},u.params):u.params}}},r};function jr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Er(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jr(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jr(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var xr=r(10).fromJS,Ar=function(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xr(ge(t,"links",t)),r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"DELETE_RAF_OBJECT":var n=r.route.split(":/"),o=n.slice(1),i=(e.getIn(o),e.deleteIn(o));return i;case t+"_ADD_SERVICE_BEGIN":return e.set("runStatus","busy").set("route",t);case t+"_ADD_SERVICE_COMPLETE":var a=Sr(r,[t]);return a.resultType="application/vnd.sas.api",a.raw=Er({},r.payload),a.responseHeaders=Er({},a.raw.headers),a.route=t,xr(a);case t+"_"+de+"_BEGIN":case t+"_API_POLL_BEGIN":var s=r.config,u=s.paginator,c=s.route.split(":/"),f=c.slice(!0===u?1:2),l=e.getIn(f);return l=l.set("runStatus","busy"),f=c.slice(1),e.setIn(f,l);case t+"_"+de+"_COMPLETE":case t+"_API_POLL_COMPLETE":var p=r.config,h=p.route.split(":/"),d=h.slice(1),y=Object.assign({},r.payload),v=Sr(r,h);v.raw=y,"links"===v.type&&null==v.resultType&&(v.resultType="application/vnd.sas.api");r.config.link.method;v.title=r.config.link.href,v.responseHeaders=Er({},y.headers),v.route=h.join(":/");var g=xr(v),m=e.setIn(d,g);return m;case t+"_APP_DATA_SETSTATE":var b=r.payload,_=b.route,w=b.payload,O=e.get("userData");return O=Array.isArray(_)?O.setIn(_,xr(w)):O.set(_,xr(w)),e.set("userData",O);case t+"_API_XSRF_SETSTATE":var S=r.payload,j=S.route,E=S.payload,x=e.get("userData");return x=Array.isArray(j)?x.setIn(j,xr(E)):x.set(j,xr(E)),e.set("userData",x);case t+"_API_STATUS_SETSTATE":var A=r.payload.payload,P=A.jobContext,k=e.get("userData"),T=e.get("routeList").push(P);return k=k.set(P,xr(A)),e.set("userData",k).set("routeList",T);default:return e}}};function Pr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function kr(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pr(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pr(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Tr=r(10),Ir=Tr.Map,Rr=Tr.fromJS,Cr=Rr({connections:[],user:"none",type:"server",currentConnection:-1,statusInfo:{status:0,statusText:" ",error:!1,details:" "},runStatus:"idle"});function Lr(t){var e=t.data,r=e.results,n=e.iconfig;return{type:"connection",id:1,user:n.user,desc:n.desc,logonInfo:{type:"trusted",host:n.host,tokenType:r.token_type,token:r.access_token,sslOptions:n.sslOptions,keepAlive:null==n.keepAlive?null:n.keepAlive},statusInfo:Object(pe.setGoodStatus)(t)}}var Mr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Cr,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"BEGIN_LOGON":return t.set("runStatus","busy");case"server":var r=e.payload.iconfig,n={type:"server",id:1,user:"You",desc:"Server",logonInfo:{type:"server",host:r.host,protocol:-1!==r.host.indexOf("https")?"https://":"http://",ns:r.ns,tokenType:!0===r.hasOwnProperty("tokenType")?r.tokenType:null,token:!0===r.hasOwnProperty("token")?r.token:null,sslOptions:!0===r.hasOwnProperty("sslOptions")?r.sslOptions:null,pem:r.hasOwnProperty("pem")?r.pem:null,rejectUnauthorized:r.hasOwnProperty("rejectUnauthorized")?r.rejectUnauthorized:null,withCredentials:!r.hasOwnProperty("withCredentials")||r.withCredentials,keepAlive:r.hasOwnProperty("keepAlive")?r.keepAlive:null}},o={currentConnection:t.get("currentConnection")+1,runStatus:"ready",statusInfo:{},user:"You of course!",connections:[n]};return Rr(o);case"implicit":var i=e.payload.iconfig;if(!0===e.error)return t.withMutations((function(t){t.set("runStatus","error").set("statusInfo",Rr(Object(pe.setBadStatus)(e.payload)))}));var a={type:"implicit",id:1,user:"You",desc:"implicit",logonInfo:kr({},i)},s={currentConnection:t.get("currentConnection")+1,runStatus:"ready",statusInfo:{},user:"You of course!",connections:[a]};return Rr(s);case"VIYA_LOGON_COMPLETE":if(!0===e.error)return t.withMutations((function(t){t.set("runStatus","error").set("statusInfo",Rr(Object(pe.setBadStatus)(e.payload)))}));var u={currentConnection:t.get("currentConnection")+1,runStatus:"ready",statusInfo:Object(pe.setGoodStatus)(e.payload),user:e.payload.data.iconfig.user};return t.withMutations((function(t){t.set("connections",t.get("connections").push(Ir(Lr(e.payload)))).merge(Rr(u))}));case"VIYA_LOGOFF":return t;case"BEGIN_LOGOFF":return t.set("runStatus","busy");case"VIYA_LOGOFF_COMPLETE":return!0===e.error?t.withMutations((function(t){t.set("runStatus","error").set("statusInfo",Rr(Object(pe.setBadStatus)(e.payload)))})):Cr;case"KEEP_ALIVE":default:return t}};function Dr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Nr(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Dr(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dr(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Ur=function(t){var e={};return e.connections=Mr,e._apistatus=Ar("_apistatus"),e._appdata=Ar("_appdata"),e._xsrf=Ar("_xsrf"),d(e=Nr(Nr({},e),t))},Br=function(t,e,r){t.asyncReducers.hasOwnProperty(e)&&delete t.asyncReducers[e],t.asyncReducers[e]=r,t.replaceReducer(Ur(t.asyncReducers))};function qr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}var zr=function(t){var e=te(),r=h(Ur(),function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return function(){var r=t.apply(void 0,arguments),n=function(){throw new Error(u(15))},o={getState:r.getState,dispatch:function(){return n.apply(void 0,arguments)}},i=e.map((function(t){return t(o)}));return n=y.apply(void 0,i)(r.dispatch),s(s({},r),{},{dispatch:n})}}}(e));return r.asyncReducers={},r.injectAsyncReducers=Br,r.apiCallNo=0,r.config=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?qr(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qr(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t),e.run(yr),r},Fr=r(10);var Hr=function(t,e,r){for(var n,o,i,a,s=[],u=[],c=arguments.length,f=new Array(c>3?c-3:0),l=3;l<c;l++)f[l-3]=arguments[l];if(null!=f&&(s=!0===Array.isArray(f[0])?f[0]:f),"string"==typeof e)i=(o=e.split(":/")).shift(),a=t.getState()[i],u=[].concat(gr()(o),gr()(s));else{if(u=s,!Fr.Iterable.isIterable(e))return null;a=e}return null==a?null:(null!==(n=u.length>0?a.getIn(u,null):a)&&!0===r&&!0===Fr.Iterable.isIterable(n)&&(n=n.keySeq()),n)};var Wr=function(t,e,r){return null!=r?Hr(t,e,!1,r):Hr(t,e)};var Gr=function(t,e,r){for(var n=null,o=arguments.length,i=new Array(o>3?o-3:0),a=3;a<o;a++)i[a-3]=arguments[a];return null!=i&&i.length>0?(n=!0===Array.isArray(i[0])?i[0]:i,null!==r&&(n=r.concat(n))):n=r,Hr(t,e,!1,n)};var Yr=function(t,e){var r,n=function(r){return function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Gr(t,e,r,o)}};return{results:n(),items:n(["items","data"]),itemsCmd:(r=["items","data"],function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.splice(1,0,"cmds"),Gr(t,e,r,o)}),itemsList:n(["itemsList"]),links:n(["links"]),details:n(["details"]),scrollCmds:n(["scrollCmds"]),raw:n(["raw"]),headers:n(["responseHeaders"]),config:n(["iconfig"]),host:e.get("host"),resultType:e.get("resultType"),status:e.get("statusInfo").get("status"),statusInfo:e.get("statusInfo").toJS(),type:e.get("type"),route:e.get("route")}};var Kr=function(t){var e=t.getState();e=e._xsrf;for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var i=n.length>0?["userData"].concat(n):["userData"],a=e.getIn(i,null);return null!==a?a.toJS():null},Vr=r(10),Jr=function(t,e,r,n,o,i,a,s){var u,c,f,l,p;if("string"==typeof e?(p=Wr(t,e),c=e):c=(p=e).get("route"),null===p||!1===Vr.Iterable.isIterable(p))return null;if(u=p.get("paginator"),f=p.get("link").toJS(),u)l=(c=p.get("parentRoute")).split(":/")[0];else{var h=c.split(":/");l=h[0],h.splice(1,0,t.apiCallNo),c=h.join(":/"),t.apiCallNo++}var d={type:r,delay:null==o?0:o,paginator:u,serviceName:l,route:c,eventHandler:i,parentRoute:a,jobContext:s,storeConfig:t.config,link:f};f.href.indexOf("casProxy")>=0&&(l="casProxy");var y=Kr(t,l);return null!=n&&(d.payload=n),null!==y&&(null!=n?d.payload.xsrf=y:d.payload={xsrf:y}),d},$r=function(t,e,r,n,o,i,a,s){return new Promise((function(u,c){var f,l,p=!0,h=Jr(t,e,r,n,o,i,a,s);null===h&&c({error:"Bad route and/or rafLink",args:e}),f=h.route;l=t.subscribe((function(){if(p)p=!1;else{var e=Wr(t,f);if(e){var r=e.get("runStatus");if("error"===r)l(),c(e.get("statusInfo"));else if("ready"===r){l();var n=Yr(t,e);u(n)}}else l(),c({error:"Hmmm! Failed to resolve route in apiCall callback - should never happen. Call Programmer",route:f})}})),t.dispatch(h)}))},Xr=function(t,e,r){for(var n=arguments.length,o=new Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];return $r.apply(void 0,[t,e,de,r].concat(o))},Qr=function(t,e,r){return new Promise((function(n,o){var i=e.map((function(e){var n=e.rafLink,i=!0===e.hasOwnProperty("payload")?e.payload:null,a=Jr(t,n,de,i,r,null,null,null);return null===a&&o({err:"Invalid route and/or rafLink",args:JSON.stringify(e,null,4)}),a})),a=!0,s=t.subscribe((function(){if(a)a=!1;else{for(var e=[],r=0;r<i.length;r++){var u=Wr(t,i[r].route);if(null!==u){var c=u.get("runStatus");if("error"===c){s();var f={jobNo:r,detail:u.get("statusInfo")};o(f)}else"ready"===c&&e.push(Yr(t,u))}}e.length===i.length&&n(e)}}));t.dispatch({type:"API_PARALLEL",actionArray:i})}))},Zr=r(2),tn=r.n(Zr);var en=function(t,e,r,n,o,i,a){return new Promise((function(s,u){var c=e.links("state");null===c?s({completed:1,running:0,jobState:{job:e,data:"completed",statusCode:200}}):$r(t,c,!0===o?"API_POLL":de,r,n,i,e.route,a).then((function(t){var r={},n=0,o=t.items();!1===r.hasOwnProperty(o)&&(r[o]=0),r[o]=r[o]+1;var i=t.status;"running"!==o&&"pending"!==o||(n=1),s({running:n,detail:r,jobState:{job:e,data:o,statusCode:i}})})).catch((function(t){u(t)}))}))};function rn(){return(rn=tn()(re.a.mark((function t(e,r,n,o,i,a,s,u){var c,f,l,p;return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c=!1,f=1,"wait"===o||"longpoll"===o?(f=1,c=!0):f=o||1;case 3:return t.next=5,en(e,r,n,i,c,a,s);case 5:if(l=t.sent,p=l.detail.hasOwnProperty("failed"),0!==l.running){t.next=16;break}if(f=0,!1!==p||1==u){t.next=15;break}return t.next=12,Xr(e,r.links("self"));case 12:l.jobState.job=t.sent,t.next=16;break;case 15:l.jobState.job=r;case 16:if(--f>0){t.next=3;break}case 17:return t.abrupt("return",l.jobState);case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var nn=function(t,e,r,n,o,i,a,s){return rn.apply(this,arguments)};function on(){return(on=tn()(re.a.mark((function t(e,r,n,o,i,a,s,u){var c;return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c=null,null==a){t.next=7;break}return t.next=4,sn(e,r,n,o,a,s,u);case 4:c=t.sent,t.next=10;break;case 7:return t.next=9,Xr(e,r.links("execute"),n,0);case 9:c=t.sent;case 10:if(!0!==an(c)){t.next=12;break}throw JSON.stringify(c.items("disposition").toJS());case 12:return null!=i&&i(o,c),t.abrupt("return",c);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function an(t){var e=t.items("disposition","statusCode"),r=t.items("disposition","severity").toLowerCase();return 0!==e||"error"===r}function sn(t,e,r,n,o,i,a){return un.apply(this,arguments)}function un(){return(un=tn()(re.a.mark((function t(e,r,n,o,i,a,s){var u,c;return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=Xr(e,r.links("execute"),n,0),t.next=3,nn(e,r,null,i,a,s,o,!0);case 3:return t.sent,c=u.then((function(t){return t}),(function(t){return t})),t.abrupt("return",c);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var cn=function(t,e,r,n,o,i,a,s){return on.apply(this,arguments)};function fn(){return(fn=tn()(re.a.mark((function t(e,r,n,o,i,a,s){var u,c;return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s&&s("pending",i),t.next=3,$r(e,r,de,n,0,null,null,i);case 3:if(!(u=t.sent).links("state")){t.next=12;break}return t.next=7,nn(e,u,null,"wait",o,s,i);case 7:return c=t.sent,ln(e,a,c.data,c.job,i),t.abrupt("return",c.job);case 12:return ln(e,a,"unknown",u,i),t.abrupt("return",u);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ln(t,e,r,n,o){var i={data:r,job:n,httpCode:n.status};!function(t,e,r){var n={route:e.job.route,data:e.data,jobContext:r},o={type:"API_STATUS",route:r,payload:n};t.dispatch(o)}(t,i,o),e&&e(null,i,o)}var pn=function(t,e,r,n,o,i,a){return fn.apply(this,arguments)};function hn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function dn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?hn(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var yn=function(t,e,r){return new Promise((function(n,o){var i=[];if(null!==r)if(!1===Array.isArray(r))for(var a=0;a<e.length;a++)i.push(r);else i=gr()(r);else for(var s=0;s<e.length;s++)i.push(null);var u=e.map((function(t,e){var r=t.links("state");return null===r&&o(" job ".concat(e," does not support state checking ")),{rafLink:r,payload:dn({},i[e])}}));Qr(t,u).then((function(t){var r={},o=0,i=t.map((function(t,n){var i=t.items(),a=t.status;return!1===r.hasOwnProperty(i)&&(r[i]=0),r[i]=r[i]+1,"running"!==i&&"pending"!==i||o++,{job:e[n],data:i,statusCode:a}}));n({running:o,detail:r,jobState:i})})).catch((function(t){o(t)}))}))};var vn=function(t,e,r,n){return new Promise((function(o,i){!function t(e,r,n,o,i){yn(e,r,n).then((function(a){a.running>0?--o<=0?i(null,a):t(e,r,n,o,i):i(null,a)})).catch((function(t){i(t)}))}(t,e,r,null!=n?n:1,(function(e,r){if(e)i(e);else if(0===r.running){var n=r.jobState.map((function(t){return{rafLink:t.job.links("self"),payload:null}}));Qr(t,n,null).then((function(t){t.forEach((function(t,e){r.jobState[e].job=t})),o(r)})).catch((function(t){i(t)}))}else o(r)}))}))},gn=r(12),mn=r.n(gn),bn=r(18),_n=r.n(bn);function wn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function On(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?wn(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Sn(){return(Sn=tn()(re.a.mark((function t(e,r,n){var o,i,a,s,u;return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=On({},r),-1!==r.url.indexOf("https")&&(i=e.config,a={},null!=i.sslOptions&&(a=i.sslOptions),s=new _n.a.Agent(a),o.httpsAgent=s),t.next=4,mn()(o);case 4:return u=t.sent,t.abrupt("return",null==n?u:n(u));case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var jn=function(t,e,r){return Sn.apply(this,arguments)};var En=function(t){var e=t.getState(),r=[];for(var n in e)"connections"!==n&&r.push(n);return r},xn=function(t,e){return new Promise((function(r,n){e.forEach((function(e){Br(t,e,Ar(e))}));var o=e.map((function(e){var r={type:"ADD_SERVICE",link:{method:"GET",href:"/"+e+"/",rel:"root",type:"application/vnd.sas.api+json",responseType:"application/json, application/vnd.sas.api+json",uri:"/"+e+"/"},logonInfo:null,tLink:null,serviceName:e,route:e,storeConfig:t.config};return"compute"==e&&null!=t.config.options.computeServerId&&(r.link.href="/compute/servers/"+t.config.options.computeServerId+"/",r.link.url=r.link.href),r})),i=!0,a=t.subscribe((function(){if(i)i=!1;else{for(var s={},u={},c=0,f=0;f<o.length;f++){var l=Wr(t,o[f].route);if(null!==l){var p=l.get("runStatus");if("error"===p){a();var h={service:e[f],detail:l.get("statusInfo")};n(h)}else if("ready"===p){c++;var d=Yr(t,l);s[e[f]]=d;var y=d.headers("x-csrf-header");if(null!==y){var v={"x-csrf-header":y,"x-csrf-token":d.headers("x-csrf-token")};u[e[f]]=v}else u[e[f]]=null}}}c===o.length&&(a(),r({folders:s,xsrfTokens:u}))}}));t.dispatch({type:"API_PARALLEL",interval:-1,actionArray:o})}))};var An=function(t,e,r,n){var o={type:e,route:r,payload:n};t.dispatch(o)};var Pn=function(t,e){var r=t.getState();for(var n in r)if(n===e)return Yr(t,r[n]);return null};function kn(){return(kn=tn()(re.a.mark((function t(e){var r,n,o,i,a,s,u,c,f,l,p=arguments;return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(r=p.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=p[o];if(n.includes("casManagement")&&n.push("casProxy"),i=[],a={},n.map((function(t){a[t]=Pn(e,t),null===a[t]&&i.push(t)})),!(i.length>0)){t.next=13;break}return t.next=8,xn(e,i);case 8:for(f in s=t.sent,u=s.folders,c=s.xsrfTokens)An(e,"API_XSRF",f,c[f]);for(l in u)a[l]=u[l];case 13:return t.abrupt("return",a);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Tn=function(t){return kn.apply(this,arguments)},In=r(17),Rn=r.n(In),Cn=r(47),Ln=r.n(Cn);function Mn(){return(Mn=tn()(re.a.mark((function t(e,r,n,o,i){var a;return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=setInterval((function(){Dn(e,r)}),1e3*n),setTimeout((function(){if(console.log("Note: Stopping keepViyaAlive"),clearInterval(a),null!=i)i();else{var t=le(e.getState()).host;console.log("timeout"),window.open("".concat(t,"/SASLogon/timedout"),"Timed Out","scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=0,height=0,left=-1000,top=-1000")}}),1e3*o),t.abrupt("return",!0);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Dn(t,e){return Nn.apply(this,arguments)}function Nn(){return(Nn=tn()(re.a.mark((function t(e,r){var n,o,i,a,s,u,c,f,l;return re.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:null!==r&&(n={type:"KEEP_ALIVE",route:"keepAlive",payload:{url:r,method:"GET",headers:{Accept:"*/*"}}},e.dispatch(n)),o=En(e),i=le(e.getState()).host,a=0;case 4:if(!(a<o.length)){t.next=20;break}if(-1!==(s=o[a]).indexOf("_")){t.next=17;break}if(-1!==s.indexOf("cas-http")){t.next=17;break}if(null===(u=Kr(e,s))){t.next=17;break}return c=u["x-csrf-header"],(f={url:"".concat(i,"/").concat(s,"/"),Accept:"application/json, application/vnd.sas.api+json",withCredentials:!0,method:"GET",xsrfHeaderName:c,headers:{}}).headers[c]=u["x-csrf-token"],t.next=15,jn(e,f);case 15:l={type:"KEEP_ALIVE",route:"keepAlive",payload:f},e.dispatch(l);case 17:a++,t.next=4;break;case 20:return t.abrupt("return",!0);case 21:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Un=function(t,e,r,n,o){return Mn.apply(this,arguments)};function Bn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function qn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Bn(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var zn,Fn=function(t,e){return new Promise((function(r,n){var o,i,a=!1,s=null,u=null==e?null:qn({},e);if(t.getState().connections.get("currentConnection")>=0)r("ready");else{switch(null!==u&&"implicit"!==u.authType||(s=function(){if(null==window)return null;var t=Ln()(window.location,!0),e=Rn.a.parse(t.hash),r=t.query;if(null==r.host||null==e.access_token)return null;var n="bearer";null!=e["#token_type"]?n=e["#token_type"]:null!=e.token_type&&(n=e.token_type);return{host:r.host,authType:"implicit",tokenType:n,token:e.access_token}}(),null!==u&&null!==s&&(u=qn(qn({},u),s))),null==u&&(u=null!==s?s:{host:"".concat(window.location.protocol,"//").concat(window.location.host),authType:"server"}),t.config.options={},null!=u.options&&(t.config.options=qn({},u.options)),"code"===u.authType&&(u.authType="server"),u.authType){case"token":case"server":null==u.host&&(u.host="".concat(window.location.protocol,"//").concat(window.location.host));break;case"implicit":!1===u.hasOwnProperty("token")&&(a=!0,function(t){var e="".concat(t.host,"/SASLogon/oauth/authorize?response_type=token&client_id=").concat(t.clientID);if(null!=t.redirect){var r="".concat(window.location.protocol,"//").concat(window.location.host,"/").concat(t.redirect,"?host=").concat(t.host);e="".concat(e,"&redirect_uri=").concat(r)}window.location.replace(e)}(u),r("Implicit Call"))}a||((i={type:"LOGOFF"===u.authType?"VIYA_LOGOFF":"VIYA_LOGON",payload:qn({},u)}).payload.sslOptions=t.config.hasOwnProperty("sslOptions")?t.config.sslOptions:null,o=t.subscribe((function(){var i=t.getState().connections,a=i.get("runStatus");if("ready"===a){if(o(),null!=e&&null!=e.keepAlive){var s=300,u=14400;if(null!=e.timers){var c=e.timers;if("string"==typeof c){var f=c.split(",");s=parseInt(f[0]),u=parseInt(f[1])}else s=c[0],u=c[1]}Un(t,e.keepAlive,s,u,e.onTimeout)}r(a)}else"error"===a&&(o(),n(i.get("statusInfo").toJS()))})),i.storeConfig=t.config,t.dispatch(i))}}))};var Hn=function(t){return new Promise((function(e,r){var n={type:"VIYA_LOGOFF",storeConfig:t.config,payload:{}};zn=t.subscribe((function(){var n=t.getState().connections,o=n.get("runStatus");"idle"===o?(zn(),e(o)):"error"===o&&(zn(),r(n.get("statusInfo").toJS()))})),t.dispatch(n)}))},Wn=function(t){t.dispatch(Mt)};var Gn=function(t,e){var r=e.split(":/"),n=r.shift(),o=t.getState()[n];return o=r.length>0?o.getIn(r):o,Yr(t,o)},Yn=r(10);var Kn=function(t,e){var r=null;if("string"==typeof e?r=e:!0===Yn.default.Iterable.isIterable(e)&&(r=e.get("route")),null!==e){var n={type:"DELETE_RAF_OBJECT",route:r};t.dispatch(n)}};function Vn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Jn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Vn(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function $n(t){return le(t.getState())}function Xn(t){for(var e=t.getState()._appdata,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var i=n.length>0?["userData"].concat(n):["userData"];return e.getIn(i,null)}function Qn(t,e){var r=t.getState()._apistatus,n=null;if(e){var o=r.getIn(["userData",e],null);null!==o&&((n=o.toJS()).job=Gn(t,n.route))}else n=r.get("routeList");return n}var Zn=function(t){var e={casProxy:!1};null!=t&&(e=Jn(Jn({},e),t));var r=zr(e);return{logon:Fn.bind(null,r),connect:Fn.bind(null,r),logoff:Hn.bind(null,r),disconnect:Hn.bind(null,r),connection:$n.bind(null,r),addServices:Tn.bind(null,r),getServices:En.bind(null,r),apiCall:Xr.bind(null,r),runAction:cn.bind(null,r),apiCallAll:Qr.bind(null,r),rafObject:Gn.bind(null,r),getService:Gn.bind(null,r),deleteRafObject:Kn.bind(null,r),jobState:nn.bind(null,r),jobStateAll:vn.bind(null,r),submit:pn.bind(null,r),submitStatus:Qn.bind(null,r),setAppData:An.bind(null,r,"APP_DATA"),getAppData:Xn.bind(null,r),setXsrfData:An.bind(null,r,"API_XSRF"),getXsrfData:Kr.bind(null,r),getState:r.getState,endStore:Wn.bind(null,r),store:r,config:Jn({},e),getServiceRoot:Pn.bind(null,r),request:jn.bind(null,r),keepViyaAlive:Un.bind(null,r)}};function to(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function eo(t){return le(t.getState())}function ro(t){for(var e=t.getState()._appdata,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var i=n.length>0?["userData"].concat(n):["userData"];return e.getIn(i,null)}function no(t,e){var r=t.getState()._apistatus,n=null;if(e){var o=r.getIn(["userData",e],null);null!==o&&((n=o.toJS()).job=Gn(t,n.route))}else n=r.get("routeList");return n}var oo=function(t){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?to(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):to(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({store:t},{logon:Fn.bind(null,t),logoff:Hn.bind(null,t),connection:eo.bind(null,t),addServices:Tn.bind(null,t),getServices:En.bind(null,t),apiCall:Xr.bind(null,t),runAction:cn.bind(null,t),apiCallAll:Qr.bind(null,t),rafObject:Gn.bind(null,t),deleteRafObject:Kn.bind(null,t),jobState:nn.bind(null,t),jobStateAll:vn.bind(null,t),submit:pn.bind(null,t),submitStatus:no.bind(null,t),setAppData:An.bind(null,t,"APP_DATA"),getAppData:ro.bind(null,t),setXsrfData:An.bind(null,t,"API_XSRF"),getXsrfData:Kr.bind(null,t),getState:t.getState,endStore:Wn.bind(null,t),store:t,getServiceRoot:Pn.bind(null,t),request:jn})}}])}));
|
package/lib/restaf.js
CHANGED
|
@@ -905,7 +905,7 @@ eval("\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Fun
|
|
|
905
905
|
/***/ (function(module, exports, __webpack_require__) {
|
|
906
906
|
|
|
907
907
|
"use strict";
|
|
908
|
-
eval("\nmodule.exports = (flag, argv) => {\n\
|
|
908
|
+
eval("\n\nmodule.exports = (flag, argv = process.argv) => {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n};\n\n\n//# sourceURL=webpack://restaf/C:/restaf/main/node_modules/has-flag/index.js?");
|
|
909
909
|
|
|
910
910
|
/***/ }),
|
|
911
911
|
|
|
@@ -1149,7 +1149,7 @@ eval("\n\nvar GetIntrinsic = __webpack_require__(/*! get-intrinsic */ \"../../..
|
|
|
1149
1149
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1150
1150
|
|
|
1151
1151
|
"use strict";
|
|
1152
|
-
eval("\nconst os = __webpack_require__(/*! os */ \"os\");\nconst hasFlag = __webpack_require__(/*! has-flag */ \"../../../node_modules/has-flag/index.js\");\n\nconst env = process
|
|
1152
|
+
eval("\nconst os = __webpack_require__(/*! os */ \"os\");\nconst tty = __webpack_require__(/*! tty */ \"tty\");\nconst hasFlag = __webpack_require__(/*! has-flag */ \"../../../node_modules/has-flag/index.js\");\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\n\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(haveStream, streamIsTTY) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream, stream && stream.isTTY);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: translateLevel(supportsColor(true, tty.isatty(1))),\n\tstderr: translateLevel(supportsColor(true, tty.isatty(2)))\n};\n\n\n//# sourceURL=webpack://restaf/C:/restaf/main/node_modules/supports-color/index.js?");
|
|
1153
1153
|
|
|
1154
1154
|
/***/ }),
|
|
1155
1155
|
|
|
@@ -1825,7 +1825,7 @@ eval("/* harmony import */ var _actionTypes__WEBPACK_IMPORTED_MODULE_0__ = __web
|
|
|
1825
1825
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1826
1826
|
|
|
1827
1827
|
"use strict";
|
|
1828
|
-
eval("/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"../../../node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _actionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../actionTypes */ \"./actionTypes/index.js\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! qs */ \"../../../node_modules/qs/lib/index.js\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var url_parse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! url-parse */ \"../../../node_modules/url-parse/index.js\");\n/* harmony import */ var url_parse__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(url_parse__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _keepViyaAlive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./keepViyaAlive */ \"./store/keepViyaAlive.js\");\n/* eslint-disable no-prototype-builtins */\n\n/*\r\n * ------------------------------------------------------------------------------------\r\n * Copyright (c) SAS Institute Inc.\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ---------------------------------------------------------------------------------------\r\n *\r\n */\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\n\n\n\n\n/**\r\n * @description logon or connect to Viya\r\n * @module logon\r\n * @category restaf/core\r\n * @param {rafLogonPayload} See type definition for details\r\n * @returns {promise} returns a text 'done' if successful\r\n * @example\r\nlet restaf = require(\"@sassoftware/restaf\");\r\n\r\nlet logonPayload = {\r\n authType: 'password',\r\n host: process.env.VIYA_SERVER,\r\n clientID: 'sas.ec',\r\n clientSecret: '',\r\n user: 'sastest1',\r\n password: 'Go4thsas'\r\n};\r\n\r\nlet store = restaf.initStore();\r\n\r\nstore.logon(logonPayload)\r\n .then ( r => console.log(r))\r\n .catch( err => console.log(err));\r\n\r\n */\n\nvar logon = function logon(store, ipayload) {\n return new Promise(function (resolve, reject) {\n var unSubscribe;\n var action;\n var implicitLogon = false;\n var urlInfo = null;\n var payload = ipayload == null ? null : _objectSpread({}, ipayload);\n\n if (store.getState().connections.get('currentConnection') >= 0) {\n resolve('ready');\n } else {\n var logonExit = function logonExit() {\n var newState = store.getState().connections;\n var runStatus = newState.get('runStatus');\n\n if (runStatus === 'ready') {\n unSubscribe();\n\n if (ipayload != null && ipayload.keepAlive != null) {\n var interval = 300;\n var timeout = 14400;\n\n if (ipayload.timers != null) {\n var timers = ipayload.timers;\n\n if (typeof timers === 'string') {\n var opts = timers.split(',');\n interval = parseInt(opts[0]);\n timeout = parseInt(opts[1]);\n } else {\n interval = timers[0];\n timeout = timers[1];\n }\n }\n\n Object(_keepViyaAlive__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(store, ipayload.keepAlive, interval, timeout, ipayload.onTimeout);\n }\n\n resolve(runStatus);\n } else if (runStatus === 'error') {\n unSubscribe();\n reject(newState.get('statusInfo').toJS());\n }\n }; //\n // check url if not password (no window) or when payload is null\n // this allows users of restaf-server|viya-appserverjs to LOGONPAYLOAD unconditionally to logon\n //\n\n\n if (payload === null || payload.authType === _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGON_IMPLICIT */ \"v\"]) {\n urlInfo = parseUrlNext();\n\n if (payload !== null && urlInfo !== null) {\n payload = _objectSpread(_objectSpread({}, payload), urlInfo);\n }\n }\n\n if (payload == null) {\n if (urlInfo !== null) {\n payload = urlInfo;\n } else {\n payload = {\n host: \"\".concat(window.location.protocol, \"//\").concat(window.location.host),\n authType: _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGON_SERVER */ \"x\"]\n };\n }\n } // persist options in payload - currently used for pup support\n\n\n store.config.options = {};\n\n if (payload.options != null) {\n store.config.options = _objectSpread({}, payload.options);\n } // now make the final decision\n\n\n
|
|
1828
|
+
eval("/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"../../../node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _actionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../actionTypes */ \"./actionTypes/index.js\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! qs */ \"../../../node_modules/qs/lib/index.js\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var url_parse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! url-parse */ \"../../../node_modules/url-parse/index.js\");\n/* harmony import */ var url_parse__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(url_parse__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _keepViyaAlive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./keepViyaAlive */ \"./store/keepViyaAlive.js\");\n/* eslint-disable no-prototype-builtins */\n\n/*\r\n * ------------------------------------------------------------------------------------\r\n * Copyright (c) SAS Institute Inc.\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ---------------------------------------------------------------------------------------\r\n *\r\n */\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\n\n\n\n\n/**\r\n * @description logon or connect to Viya\r\n * @module logon\r\n * @category restaf/core\r\n * @param {rafLogonPayload} See type definition for details\r\n * @returns {promise} returns a text 'done' if successful\r\n * @example\r\nlet restaf = require(\"@sassoftware/restaf\");\r\n\r\nlet logonPayload = {\r\n authType: 'password',\r\n host: process.env.VIYA_SERVER,\r\n clientID: 'sas.ec',\r\n clientSecret: '',\r\n user: 'sastest1',\r\n password: 'Go4thsas'\r\n};\r\n\r\nlet store = restaf.initStore();\r\n\r\nstore.logon(logonPayload)\r\n .then ( r => console.log(r))\r\n .catch( err => console.log(err));\r\n\r\n */\n\nvar logon = function logon(store, ipayload) {\n return new Promise(function (resolve, reject) {\n var unSubscribe;\n var action;\n var implicitLogon = false;\n var urlInfo = null;\n var payload = ipayload == null ? null : _objectSpread({}, ipayload);\n\n if (store.getState().connections.get('currentConnection') >= 0) {\n resolve('ready');\n } else {\n var logonExit = function logonExit() {\n var newState = store.getState().connections;\n var runStatus = newState.get('runStatus');\n\n if (runStatus === 'ready') {\n unSubscribe();\n\n if (ipayload != null && ipayload.keepAlive != null) {\n var interval = 300;\n var timeout = 14400;\n\n if (ipayload.timers != null) {\n var timers = ipayload.timers;\n\n if (typeof timers === 'string') {\n var opts = timers.split(',');\n interval = parseInt(opts[0]);\n timeout = parseInt(opts[1]);\n } else {\n interval = timers[0];\n timeout = timers[1];\n }\n }\n\n Object(_keepViyaAlive__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(store, ipayload.keepAlive, interval, timeout, ipayload.onTimeout);\n }\n\n resolve(runStatus);\n } else if (runStatus === 'error') {\n unSubscribe();\n reject(newState.get('statusInfo').toJS());\n }\n }; //\n // check url if not password (no window) or when payload is null\n // this allows users of restaf-server|viya-appserverjs to LOGONPAYLOAD unconditionally to logon\n //\n\n\n if (payload === null || payload.authType === _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGON_IMPLICIT */ \"v\"]) {\n urlInfo = parseUrlNext();\n\n if (payload !== null && urlInfo !== null) {\n payload = _objectSpread(_objectSpread({}, payload), urlInfo);\n }\n }\n\n if (payload == null) {\n if (urlInfo !== null) {\n payload = urlInfo;\n } else {\n payload = {\n host: \"\".concat(window.location.protocol, \"//\").concat(window.location.host),\n authType: _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGON_SERVER */ \"x\"]\n };\n }\n } // persist options in payload - currently used for pup support\n\n\n store.config.options = {};\n\n if (payload.options != null) {\n store.config.options = _objectSpread({}, payload.options);\n } // now make the final decision\n\n\n if (payload.authType === 'code') {\n payload.authType = 'server';\n }\n\n switch (payload.authType) {\n case _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGON_TOKEN */ \"y\"]:\n case _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGON_SERVER */ \"x\"]:\n if (payload.host == null) {\n payload.host = \"\".concat(window.location.protocol, \"//\").concat(window.location.host);\n }\n\n break;\n\n case _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGON_IMPLICIT */ \"v\"]:\n if (payload.hasOwnProperty('token') === false) {\n implicitLogon = true;\n getToken(payload);\n resolve('Implicit Call');\n }\n\n break;\n\n case \"LOGOFF\":\n break;\n\n default:\n break;\n }\n\n if (!implicitLogon) {\n action = {\n type: payload.authType === 'LOGOFF' ? _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGOFF */ \"r\"] : _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGON */ \"t\"],\n payload: _objectSpread({}, payload)\n };\n action.payload.sslOptions = store.config.hasOwnProperty('sslOptions') ? store.config.sslOptions : null;\n unSubscribe = store.subscribe(logonExit);\n action.storeConfig = store.config; // action.type = VIYA_LOGON;\n\n store.dispatch(action);\n }\n }\n });\n};\n\nfunction getToken(payload) {\n var x = \"\".concat(payload.host, \"/SASLogon/oauth/authorize?response_type=token&client_id=\").concat(payload.clientID); //noinspection JSUnresolvedVariable\n\n if (payload.redirect != null) {\n //noinspection JSUnresolvedVariable\n var redirectUri = \"\".concat(window.location.protocol, \"//\").concat(window.location.host, \"/\").concat(payload.redirect, \"?host=\").concat(payload.host);\n x = \"\".concat(x, \"&redirect_uri=\").concat(redirectUri);\n }\n\n window.location.replace(x);\n}\n\nfunction parseUrlNext() {\n if (window == null) {\n return null;\n }\n\n var url = url_parse__WEBPACK_IMPORTED_MODULE_3___default()(window.location, true);\n var loc = qs__WEBPACK_IMPORTED_MODULE_2___default.a.parse(url.hash);\n var q = url.query;\n\n if (q.host == null || loc.access_token == null) {\n return null;\n }\n\n var tokenType = 'bearer';\n\n if (loc['#token_type'] != null) {\n tokenType = loc['#token_type'];\n } else if (loc['token_type'] != null) {\n tokenType = loc['token_type'];\n }\n\n var payload = {\n host: q.host,\n authType: _actionTypes__WEBPACK_IMPORTED_MODULE_1__[/* VIYA_LOGON_IMPLICIT */ \"v\"],\n tokenType: tokenType,\n token: loc.access_token\n };\n return payload;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (logon);\n\n//# sourceURL=webpack://restaf/./store/logon.js?");
|
|
1829
1829
|
|
|
1830
1830
|
/***/ }),
|
|
1831
1831
|
|
|
@@ -1890,7 +1890,7 @@ eval("/* harmony import */ var _extendFolder__WEBPACK_IMPORTED_MODULE_0__ = __we
|
|
|
1890
1890
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1891
1891
|
|
|
1892
1892
|
"use strict";
|
|
1893
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _apiCall__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./apiCall */ \"./store/apiCall.js\");\n/* harmony import */ var _jobState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./jobState */ \"./store/jobState.js\");\n/*\r\n * ------------------------------------------------------------------------------------\r\n * * Copyright (c) SAS Institute Inc.\r\n * * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * * you may not use this file except in compliance with the License.\r\n * * You may obtain a copy of the License at\r\n * *\r\n * * http://www.apache.org/licenses/LICENSE-2.0\r\n * *\r\n * * Unless required by applicable law or agreed to in writing, software\r\n * * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ----------------------------------------------------------------------------------------\r\n *\r\n */\n\n\n\n\n\n\n/**\r\n * @Description Run a given action\r\n * @async\r\n * @module runAction\r\n * @category restaf/core\r\n * @param {rafObject} session - cas session\r\n * @param {casPayload} payload - payload for cas actions\r\n * @returns {promise} returns rafObject\r\n * @example\r\n * \r\nlet restaf = require(\"@sassoftware/restaf\");\r\nlet payload = require('./config')();\r\nlet {casSetup} = require(\"@sassoftware/restaflib\");\r\n\r\nlet prtUtil = require(\"./prtUtil\");\r\n\r\nlet store = restaf.initStore({casProxy: true});\r\nasync function example () {\r\n console.log(payload);\r\n let { session } = await casSetup(store, payload, \"cas\");\r\n\r\n let p = {\r\n action: \"echo\",\r\n data : { code: \"data casuser.data1; x=1;put x= ; run; \" }\r\n };\r\n \r\n let r = await store.runAction(session, p);\r\n console.log(JSON.stringify(r.items(), null, 4));\r\n return \"done\";\r\n}\r\n\r\nexample()\r\n .then(r => console.log(r))\r\n .catch(err => console.log(err));\r\n \r\n */\n\nfunction runAction(_x, _x2, _x3, _x4, _x5, _x6, _x7, _x8) {\n return _runAction.apply(this, arguments);\n}\n\nfunction _runAction() {\n _runAction = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, payload, context, onCompletion, maxTries, delay, progress) {\n var actionResult;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n actionResult = null;\n\n if (!(maxTries != null)) {\n _context.next = 7;\n break;\n }\n\n _context.next = 4;\n return submitAction(store, session, payload, context, maxTries, delay, progress);\n\n case 4:\n actionResult = _context.sent;\n _context.next = 10;\n break;\n\n case 7:\n _context.next = 9;\n return Object(_apiCall__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session.links('execute'), payload, 0);\n\n case 9:\n actionResult = _context.sent;\n\n case 10:\n if (!(casError(actionResult) === true)) {\n _context.next = 12;\n break;\n }\n\n throw JSON.stringify(actionResult.items());\n\n case 12:\n if (onCompletion != null) {\n onCompletion(context, actionResult);\n }\n\n return _context.abrupt(\"return\", actionResult);\n\n case 14:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _runAction.apply(this, arguments);\n}\n\nfunction casError(actionResult) {\n var statusCode = actionResult.items('disposition', 'statusCode');\n var severity = actionResult.items('disposition', 'severity').toLowerCase();\n return statusCode !== 0 || severity === 'error' ? true : false;\n}\n\nfunction submitAction(_x9, _x10, _x11, _x12, _x13, _x14, _x15) {\n return _submitAction.apply(this, arguments);\n}\n\nfunction _submitAction() {\n _submitAction = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee2(store, session, payload, context, maxTries, delay, progress) {\n var actionPromise, r, result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n actionPromise = Object(_apiCall__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session.links('execute'), payload, 0);\n _context2.next = 3;\n return Object(_jobState__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, session, null, maxTries, delay, progress, context, true);\n\n case 3:\n r = _context2.sent;\n result = actionPromise.then(function (result) {\n return result;\n }, function (err) {\n return err;\n });\n return _context2.abrupt(\"return\", result);\n\n case 6:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n return _submitAction.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (runAction);\n\n//# sourceURL=webpack://restaf/./store/runAction.js?");
|
|
1893
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _apiCall__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./apiCall */ \"./store/apiCall.js\");\n/* harmony import */ var _jobState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./jobState */ \"./store/jobState.js\");\n/*\r\n * ------------------------------------------------------------------------------------\r\n * * Copyright (c) SAS Institute Inc.\r\n * * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * * you may not use this file except in compliance with the License.\r\n * * You may obtain a copy of the License at\r\n * *\r\n * * http://www.apache.org/licenses/LICENSE-2.0\r\n * *\r\n * * Unless required by applicable law or agreed to in writing, software\r\n * * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ----------------------------------------------------------------------------------------\r\n *\r\n */\n\n\n\n\n\n\n/**\r\n * @Description Run a given action\r\n * @async\r\n * @module runAction\r\n * @category restaf/core\r\n * @param {rafObject} session - cas session\r\n * @param {casPayload} payload - payload for cas actions\r\n * @returns {promise} returns rafObject\r\n * @example\r\n * \r\nlet restaf = require(\"@sassoftware/restaf\");\r\nlet payload = require('./config')();\r\nlet {casSetup} = require(\"@sassoftware/restaflib\");\r\n\r\nlet prtUtil = require(\"./prtUtil\");\r\n\r\nlet store = restaf.initStore({casProxy: true});\r\nasync function example () {\r\n console.log(payload);\r\n let { session } = await casSetup(store, payload, \"cas\");\r\n\r\n let p = {\r\n action: \"echo\",\r\n data : { code: \"data casuser.data1; x=1;put x= ; run; \" }\r\n };\r\n \r\n let r = await store.runAction(session, p);\r\n console.log(JSON.stringify(r.items(), null, 4));\r\n return \"done\";\r\n}\r\n\r\nexample()\r\n .then(r => console.log(r))\r\n .catch(err => console.log(err));\r\n \r\n */\n\nfunction runAction(_x, _x2, _x3, _x4, _x5, _x6, _x7, _x8) {\n return _runAction.apply(this, arguments);\n}\n\nfunction _runAction() {\n _runAction = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, payload, context, onCompletion, maxTries, delay, progress) {\n var actionResult;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n actionResult = null;\n\n if (!(maxTries != null)) {\n _context.next = 7;\n break;\n }\n\n _context.next = 4;\n return submitAction(store, session, payload, context, maxTries, delay, progress);\n\n case 4:\n actionResult = _context.sent;\n _context.next = 10;\n break;\n\n case 7:\n _context.next = 9;\n return Object(_apiCall__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session.links('execute'), payload, 0);\n\n case 9:\n actionResult = _context.sent;\n\n case 10:\n if (!(casError(actionResult) === true)) {\n _context.next = 12;\n break;\n }\n\n throw JSON.stringify(actionResult.items('disposition').toJS());\n\n case 12:\n if (onCompletion != null) {\n onCompletion(context, actionResult);\n }\n\n return _context.abrupt(\"return\", actionResult);\n\n case 14:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _runAction.apply(this, arguments);\n}\n\nfunction casError(actionResult) {\n var statusCode = actionResult.items('disposition', 'statusCode');\n var severity = actionResult.items('disposition', 'severity').toLowerCase();\n return statusCode !== 0 || severity === 'error' ? true : false;\n}\n\nfunction submitAction(_x9, _x10, _x11, _x12, _x13, _x14, _x15) {\n return _submitAction.apply(this, arguments);\n}\n\nfunction _submitAction() {\n _submitAction = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee2(store, session, payload, context, maxTries, delay, progress) {\n var actionPromise, r, result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n actionPromise = Object(_apiCall__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session.links('execute'), payload, 0);\n _context2.next = 3;\n return Object(_jobState__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, session, null, maxTries, delay, progress, context, true);\n\n case 3:\n r = _context2.sent;\n result = actionPromise.then(function (result) {\n return result;\n }, function (err) {\n return err;\n });\n return _context2.abrupt(\"return\", result);\n\n case 6:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n return _submitAction.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (runAction);\n\n//# sourceURL=webpack://restaf/./store/runAction.js?");
|
|
1894
1894
|
|
|
1895
1895
|
/***/ }),
|
|
1896
1896
|
|