-
Notifications
You must be signed in to change notification settings - Fork 599
/
streamedian.min.js.map
1 lines (1 loc) · 582 KB
/
streamedian.min.js.map
1
{"version":3,"file":"streamedian.min.js","sources":["node_modules/bp_logger/logger.js","src/deps/bp_logger.js","src/core/util/url.js","node_modules/bp_event/event.js","src/deps/bp_event.js","src/core/iso-bmff/mp4-generator.js","src/core/presentation/mse.js","src/core/remuxer/base.js","src/core/remuxer/aac.js","src/core/util/exp-golomb.js","src/core/util/binary.js","src/core/elementary/NALU.js","src/core/parsers/h264.js","src/core/remuxer/h264.js","src/core/defs.js","src/core/remuxer/remuxer.js","node_modules/bp_statemachine/statemachine.js","src/deps/bp_statemachine.js","src/core/parsers/sdp.js","src/client/rtsp/stream.js","src/core/util/md5.js","src/client/rtsp/rtp/rtp.js","src/client/rtsp/rtp/factory.js","src/client/rtsp/message.js","src/core/elementary/NALUAsm.js","src/core/elementary/AACFrame.js","src/core/elementary/AACAsm.js","src/client/rtsp/rtp/payload/parser.js","src/core/base_client.js","src/core/parsers/aac.js","src/client/rtsp/client.js","node_modules/jsencrypt/lib/asn1js/asn1.js","node_modules/jsencrypt/lib/jsbn/prng4.js","node_modules/jsencrypt/lib/jsbn/rng.js","node_modules/jsencrypt/lib/jsbn/jsbn.js","node_modules/jsencrypt/lib/jsbn/jsbn2.js","node_modules/jsencrypt/lib/jsbn/rsa.js","node_modules/jsencrypt/lib/jsbn/rsa2.js","node_modules/jsencrypt/lib/asn1js/base64.js","node_modules/jsencrypt/lib/asn1js/hex.js","node_modules/jsencrypt/lib/jsrsasign/asn1-1.0.js","node_modules/jsencrypt/lib/jsbn/base64.js","node_modules/jsencrypt/src/jsencrypt.js","src/deps/jsencrypt.js","src/core/base_transport.js","src/core/util/browser.js","src/transport/websocket.js","src/player.js","player.js"],"sourcesContent":["// ERROR=0, WARN=1, LOG=2, DEBUG=3\nexport const LogLevel = {\n Error: 0,\n Warn: 1,\n Log: 2,\n Debug: 3\n};\n\nlet DEFAULT_LOG_LEVEL = LogLevel.Debug;\n\nexport function setDefaultLogLevel(level) {\n DEFAULT_LOG_LEVEL = level;\n}\nexport class Logger {\n constructor(level = DEFAULT_LOG_LEVEL, tag) {\n this.tag = tag;\n this.setLevel(level);\n }\n \n setLevel(level) {\n this.level = level;\n }\n \n static get level_map() { return {\n [LogLevel.Debug]:'log',\n [LogLevel.Log]:'log',\n [LogLevel.Warn]:'warn',\n [LogLevel.Error]:'error'\n }};\n\n _log(lvl, args) {\n args = Array.prototype.slice.call(args);\n if (this.tag) {\n args.unshift(`[${this.tag}]`);\n }\n if (this.level>=lvl) console[Logger.level_map[lvl]].apply(console, args);\n }\n log(){\n this._log(LogLevel.Log, arguments)\n }\n debug(){\n this._log(LogLevel.Debug, arguments)\n }\n error(){\n this._log(LogLevel.Error, arguments)\n }\n warn(){\n this._log(LogLevel.Warn, arguments)\n }\n}\n\nconst taggedLoggers = new Map();\nexport function getTagged(tag) {\n if (!taggedLoggers.has(tag)) {\n taggedLoggers.set(tag, new Logger(DEFAULT_LOG_LEVEL, tag));\n }\n return taggedLoggers.get(tag);\n}\nexport const Log = new Logger();\n","// export * from 'bp_logger';\nexport * from '../../node_modules/bp_logger/logger.js';","export class Url {\n static parse(url) {\n let ret = {};\n\n let regex = /^([^:]+):\\/\\/([^\\/]+)(.*)$/; //protocol, login, urlpath\n let result = regex.exec(url);\n\n if (!result) {\n throw new Error(\"bad url\");\n }\n\n ret.full = url;\n ret.protocol = result[1];\n ret.urlpath = result[3];\n\n let parts = ret.urlpath.split('/');\n ret.basename = parts.pop().split(/\\?|#/)[0];\n ret.basepath = parts.join('/');\n\n let loginSplit = result[2].split('@');\n let hostport = loginSplit[0].split(':');\n let userpass = [ null, null ];\n if (loginSplit.length === 2) {\n userpass = loginSplit[0].split(':');\n hostport = loginSplit[1].split(':');\n }\n\n ret.user = userpass[0];\n ret.pass = userpass[1];\n ret.host = hostport[0];\n ret.auth = (ret.user && ret.pass) ? `${ret.user}:${ret.pass}` : '';\n\n ret.port = (null == hostport[1]) ? Url.protocolDefaultPort(ret.protocol) : hostport[1];\n ret.portDefined = (null != hostport[1]);\n ret.location = `${ret.host}:${ret.port}`;\n\n if (ret.protocol == 'unix') {\n ret.socket = ret.port;\n ret.port = undefined;\n }\n\n return ret;\n }\n\n static full(parsed) {\n return `${parsed.protocol}://${parsed.auth?parsed.auth+'@':''}${parsed.location}/${parsed.urlpath}`;\n }\n\n static isAbsolute(url) {\n return /^[^:]+:\\/\\//.test(url);\n }\n\n static protocolDefaultPort(protocol) {\n switch (protocol) {\n case 'rtsp': return 554;\n case 'http': return 80;\n case 'https': return 443;\n }\n\n return 0;\n }\n}","const listener = Symbol(\"event_listener\");\nconst listeners = Symbol(\"event_listeners\");\n\nexport class DestructibleEventListener {\n constructor(eventListener) {\n this[listener] = eventListener;\n this[listeners] = new Map();\n }\n\n clear() {\n if (this[listeners]) {\n for (let entry of this[listeners]) {\n for (let fn of entry[1]) {\n this[listener].removeEventListener(entry[0], fn);\n }\n };\n }\n this[listeners].clear();\n }\n\n destroy() {\n this.clear();\n this[listeners] = null;\n }\n\n on(event, selector, fn) {\n if (fn == undefined) {\n fn = selector;\n selector = null;\n }\n if (selector) {\n return this.addEventListener(event, (e) => {\n if (e.target.matches(selector)) {\n fn(e)\n }\n });\n } else {\n return this.addEventListener(event, fn);\n }\n }\n\n addEventListener(event, fn) {\n if (!this[listeners].has(event)) {\n this[listeners].set(event, new Set());\n }\n this[listeners].get(event).add(fn);\n this[listener].addEventListener(event, fn, false);\n return fn;\n }\n\n removeEventListener(event, fn) {\n this[listener].removeEventListener(event, fn, false);\n if (this[listeners].has(event)) {\n //this[listeners].set(event, new Set());\n let ev = this[listeners].get(event);\n ev.delete(fn);\n if (!ev.size) {\n this[listeners].delete(event);\n }\n }\n }\n\n dispatchEvent(event) {\n if (this[listener]) {\n this[listener].dispatchEvent(event);\n }\n }\n}\n\nexport class EventEmitter {\n constructor(element=null) {\n this[listener] = new DestructibleEventListener(element || document.createElement('div'));\n }\n\n clear() {\n if (this[listener]) {\n this[listener].clear();\n }\n }\n\n destroy() {\n if (this[listener]) {\n this[listener].destroy();\n this[listener] = null;\n }\n }\n\n on(event, selector, fn) {\n if (this[listener]) {\n return this[listener].on(event, selector, fn);\n }\n return null;\n }\n\n addEventListener(event, fn) {\n if (this[listener]) {\n return this[listener].addEventListener(event, fn, false);\n }\n return null;\n }\n\n removeEventListener(event, fn) {\n if (this[listener]) {\n this[listener].removeEventListener(event, fn, false);\n }\n }\n\n dispatchEvent(event, data) {\n if (this[listener]) {\n this[listener].dispatchEvent(new CustomEvent(event, {detail: data}));\n }\n }\n}\n\nexport class EventSourceWrapper {\n constructor(eventSource) {\n this.eventSource = eventSource;\n this[listeners] = new Map();\n }\n\n on(event, selector, fn) {\n if (!this[listeners].has(event)) {\n this[listeners].set(event, new Set());\n }\n let listener = this.eventSource.on(event, selector, fn);\n if (listener) {\n this[listeners].get(event).add(listener);\n }\n }\n\n off(event, fn){\n this.eventSource.removeEventListener(event, fn);\n }\n\n clear() {\n this.eventSource.clear();\n this[listeners].clear();\n }\n\n destroy() {\n this.eventSource.clear();\n this[listeners] = null;\n this.eventSource = null;\n }\n}\n","// export * from 'bp_event';\nexport * from '../../node_modules/bp_event/event.js';","/**\n * Generate MP4 Box\n * got from: https://github.com/dailymotion/hls.js\n */\n\nexport class MP4 {\n static init() {\n MP4.types = {\n avc1: [], // codingname\n avcC: [],\n btrt: [],\n dinf: [],\n dref: [],\n esds: [],\n ftyp: [],\n hdlr: [],\n mdat: [],\n mdhd: [],\n mdia: [],\n mfhd: [],\n minf: [],\n moof: [],\n moov: [],\n mp4a: [],\n mvex: [],\n mvhd: [],\n sdtp: [],\n stbl: [],\n stco: [],\n stsc: [],\n stsd: [],\n stsz: [],\n stts: [],\n tfdt: [],\n tfhd: [],\n traf: [],\n trak: [],\n trun: [],\n trex: [],\n tkhd: [],\n vmhd: [],\n smhd: []\n };\n\n var i;\n for (i in MP4.types) {\n if (MP4.types.hasOwnProperty(i)) {\n MP4.types[i] = [\n i.charCodeAt(0),\n i.charCodeAt(1),\n i.charCodeAt(2),\n i.charCodeAt(3)\n ];\n }\n }\n\n var videoHdlr = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0x76, 0x69, 0x64, 0x65, // handler_type: 'vide'\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x56, 0x69, 0x64, 0x65,\n 0x6f, 0x48, 0x61, 0x6e,\n 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'\n ]);\n\n var audioHdlr = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0x73, 0x6f, 0x75, 0x6e, // handler_type: 'soun'\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x53, 0x6f, 0x75, 0x6e,\n 0x64, 0x48, 0x61, 0x6e,\n 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'SoundHandler'\n ]);\n\n MP4.HDLR_TYPES = {\n 'video': videoHdlr,\n 'audio': audioHdlr\n };\n\n var dref = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x01, // entry_count\n 0x00, 0x00, 0x00, 0x0c, // entry_size\n 0x75, 0x72, 0x6c, 0x20, // 'url' type\n 0x00, // version 0\n 0x00, 0x00, 0x01 // entry_flags\n ]);\n\n var stco = new Uint8Array([\n 0x00, // version\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00 // entry_count\n ]);\n\n MP4.STTS = MP4.STSC = MP4.STCO = stco;\n\n MP4.STSZ = new Uint8Array([\n 0x00, // version\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, // sample_size\n 0x00, 0x00, 0x00, 0x00, // sample_count\n ]);\n MP4.VMHD = new Uint8Array([\n 0x00, // version\n 0x00, 0x00, 0x01, // flags\n 0x00, 0x00, // graphicsmode\n 0x00, 0x00,\n 0x00, 0x00,\n 0x00, 0x00 // opcolor\n ]);\n MP4.SMHD = new Uint8Array([\n 0x00, // version\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, // balance\n 0x00, 0x00 // reserved\n ]);\n\n MP4.STSD = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x01]);// entry_count\n\n var majorBrand = new Uint8Array([105,115,111,109]); // isom\n var avc1Brand = new Uint8Array([97,118,99,49]); // avc1\n var minorVersion = new Uint8Array([0, 0, 0, 1]);\n\n MP4.FTYP = MP4.box(MP4.types.ftyp, majorBrand, minorVersion, majorBrand, avc1Brand);\n MP4.DINF = MP4.box(MP4.types.dinf, MP4.box(MP4.types.dref, dref));\n }\n\n static box(type, ...payload) {\n var size = 8,\n i = payload.length,\n len = i,\n result;\n // calculate the total size we need to allocate\n while (i--) {\n size += payload[i].byteLength;\n }\n result = new Uint8Array(size);\n result[0] = (size >> 24) & 0xff;\n result[1] = (size >> 16) & 0xff;\n result[2] = (size >> 8) & 0xff;\n result[3] = size & 0xff;\n result.set(type, 4);\n // copy the payload into the result\n for (i = 0, size = 8; i < len; ++i) {\n // copy payload[i] array @ offset size\n result.set(payload[i], size);\n size += payload[i].byteLength;\n }\n return result;\n }\n\n static hdlr(type) {\n return MP4.box(MP4.types.hdlr, MP4.HDLR_TYPES[type]);\n }\n\n static mdat(data) {\n return MP4.box(MP4.types.mdat, data);\n }\n\n static mdhd(timescale, duration) {\n return MP4.box(MP4.types.mdhd, new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x02, // creation_time\n 0x00, 0x00, 0x00, 0x03, // modification_time\n (timescale >> 24) & 0xFF,\n (timescale >> 16) & 0xFF,\n (timescale >> 8) & 0xFF,\n timescale & 0xFF, // timescale\n (duration >> 24),\n (duration >> 16) & 0xFF,\n (duration >> 8) & 0xFF,\n duration & 0xFF, // duration\n 0x55, 0xc4, // 'und' language (undetermined)\n 0x00, 0x00\n ]));\n }\n\n static mdia(track) {\n return MP4.box(MP4.types.mdia, MP4.mdhd(track.timescale, track.duration), MP4.hdlr(track.type), MP4.minf(track));\n }\n\n static mfhd(sequenceNumber) {\n return MP4.box(MP4.types.mfhd, new Uint8Array([\n 0x00,\n 0x00, 0x00, 0x00, // flags\n (sequenceNumber >> 24),\n (sequenceNumber >> 16) & 0xFF,\n (sequenceNumber >> 8) & 0xFF,\n sequenceNumber & 0xFF, // sequence_number\n ]));\n }\n\n static minf(track) {\n if (track.type === 'audio') {\n return MP4.box(MP4.types.minf, MP4.box(MP4.types.smhd, MP4.SMHD), MP4.DINF, MP4.stbl(track));\n } else {\n return MP4.box(MP4.types.minf, MP4.box(MP4.types.vmhd, MP4.VMHD), MP4.DINF, MP4.stbl(track));\n }\n }\n\n static moof(sn, baseMediaDecodeTime, track) {\n return MP4.box(MP4.types.moof, MP4.mfhd(sn), MP4.traf(track,baseMediaDecodeTime));\n }\n /**\n * @param tracks... (optional) {array} the tracks associated with this movie\n */\n static moov(tracks, duration, timescale) {\n var\n i = tracks.length,\n boxes = [];\n\n while (i--) {\n boxes[i] = MP4.trak(tracks[i]);\n }\n\n return MP4.box.apply(null, [MP4.types.moov, MP4.mvhd(timescale, duration)].concat(boxes).concat(MP4.mvex(tracks)));\n }\n\n static mvex(tracks) {\n var\n i = tracks.length,\n boxes = [];\n\n while (i--) {\n boxes[i] = MP4.trex(tracks[i]);\n }\n return MP4.box.apply(null, [MP4.types.mvex].concat(boxes));\n }\n\n static mvhd(timescale,duration) {\n var\n bytes = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x01, // creation_time\n 0x00, 0x00, 0x00, 0x02, // modification_time\n (timescale >> 24) & 0xFF,\n (timescale >> 16) & 0xFF,\n (timescale >> 8) & 0xFF,\n timescale & 0xFF, // timescale\n (duration >> 24) & 0xFF,\n (duration >> 16) & 0xFF,\n (duration >> 8) & 0xFF,\n duration & 0xFF, // duration\n 0x00, 0x01, 0x00, 0x00, // 1.0 rate\n 0x01, 0x00, // 1.0 volume\n 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x01, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0xff, 0xff, 0xff, 0xff // next_track_ID\n ]);\n return MP4.box(MP4.types.mvhd, bytes);\n }\n\n static sdtp(track) {\n var\n samples = track.samples || [],\n bytes = new Uint8Array(4 + samples.length),\n flags,\n i;\n // leave the full box header (4 bytes) all zero\n // write the sample table\n for (i = 0; i < samples.length; i++) {\n flags = samples[i].flags;\n bytes[i + 4] = (flags.dependsOn << 4) |\n (flags.isDependedOn << 2) |\n (flags.hasRedundancy);\n }\n\n return MP4.box(MP4.types.sdtp, bytes);\n }\n\n static stbl(track) {\n return MP4.box(MP4.types.stbl, MP4.stsd(track), MP4.box(MP4.types.stts, MP4.STTS), MP4.box(MP4.types.stsc, MP4.STSC), MP4.box(MP4.types.stsz, MP4.STSZ), MP4.box(MP4.types.stco, MP4.STCO));\n }\n\n static avc1(track) {\n var sps = [], pps = [], i, data, len;\n // assemble the SPSs\n\n for (i = 0; i < track.sps.length; i++) {\n data = track.sps[i];\n len = data.byteLength;\n sps.push((len >>> 8) & 0xFF);\n sps.push((len & 0xFF));\n sps = sps.concat(Array.prototype.slice.call(data)); // SPS\n }\n\n // assemble the PPSs\n for (i = 0; i < track.pps.length; i++) {\n data = track.pps[i];\n len = data.byteLength;\n pps.push((len >>> 8) & 0xFF);\n pps.push((len & 0xFF));\n pps = pps.concat(Array.prototype.slice.call(data));\n }\n\n var avcc = MP4.box(MP4.types.avcC, new Uint8Array([\n 0x01, // version\n sps[3], // profile\n sps[4], // profile compat\n sps[5], // level\n 0xfc | 3, // lengthSizeMinusOne, hard-coded to 4 bytes\n 0xE0 | track.sps.length // 3bit reserved (111) + numOfSequenceParameterSets\n ].concat(sps).concat([\n track.pps.length // numOfPictureParameterSets\n ]).concat(pps))), // \"PPS\"\n width = track.width,\n height = track.height;\n //console.log('avcc:' + Hex.hexDump(avcc));\n return MP4.box(MP4.types.avc1, new Uint8Array([\n 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // data_reference_index\n 0x00, 0x00, // pre_defined\n 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n (width >> 8) & 0xFF,\n width & 0xff, // width\n (height >> 8) & 0xFF,\n height & 0xff, // height\n 0x00, 0x48, 0x00, 0x00, // horizresolution\n 0x00, 0x48, 0x00, 0x00, // vertresolution\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // frame_count\n 0x12,\n 0x62, 0x69, 0x6E, 0x65, //binelpro.ru\n 0x6C, 0x70, 0x72, 0x6F,\n 0x2E, 0x72, 0x75, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, // compressorname\n 0x00, 0x18, // depth = 24\n 0x11, 0x11]), // pre_defined = -1\n avcc,\n MP4.box(MP4.types.btrt, new Uint8Array([\n 0x00, 0x1c, 0x9c, 0x80, // bufferSizeDB\n 0x00, 0x2d, 0xc6, 0xc0, // maxBitrate\n 0x00, 0x2d, 0xc6, 0xc0])) // avgBitrate\n );\n }\n\n static esds(track) {\n var configlen = track.config.byteLength;\n let data = new Uint8Array(26+configlen+3);\n data.set([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n\n 0x03, // descriptor_type\n 0x17+configlen, // length\n 0x00, 0x01, //es_id\n 0x00, // stream_priority\n\n 0x04, // descriptor_type\n 0x0f+configlen, // length\n 0x40, //codec : mpeg4_audio\n 0x15, // stream_type\n 0x00, 0x00, 0x00, // buffer_size\n 0x00, 0x00, 0x00, 0x00, // maxBitrate\n 0x00, 0x00, 0x00, 0x00, // avgBitrate\n\n 0x05, // descriptor_type\n configlen\n ]);\n data.set(track.config, 26);\n data.set([0x06, 0x01, 0x02], 26+configlen);\n // return new Uint8Array([\n // 0x00, // version 0\n // 0x00, 0x00, 0x00, // flags\n //\n // 0x03, // descriptor_type\n // 0x17+configlen, // length\n // 0x00, 0x01, //es_id\n // 0x00, // stream_priority\n //\n // 0x04, // descriptor_type\n // 0x0f+configlen, // length\n // 0x40, //codec : mpeg4_audio\n // 0x15, // stream_type\n // 0x00, 0x00, 0x00, // buffer_size\n // 0x00, 0x00, 0x00, 0x00, // maxBitrate\n // 0x00, 0x00, 0x00, 0x00, // avgBitrate\n //\n // 0x05 // descriptor_type\n // ].concat([configlen]).concat(track.config).concat([0x06, 0x01, 0x02])); // GASpecificConfig)); // length + audio config descriptor\n return data;\n }\n\n static mp4a(track) {\n var audiosamplerate = track.audiosamplerate;\n return MP4.box(MP4.types.mp4a, new Uint8Array([\n 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // data_reference_index\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, track.channelCount, // channelcount\n 0x00, 0x10, // sampleSize:16bits\n 0x00, 0x00, // pre_defined\n 0x00, 0x00, // reserved2\n (audiosamplerate >> 8) & 0xFF,\n audiosamplerate & 0xff, //\n 0x00, 0x00]),\n MP4.box(MP4.types.esds, MP4.esds(track)));\n }\n\n static stsd(track) {\n if (track.type === 'audio') {\n return MP4.box(MP4.types.stsd, MP4.STSD, MP4.mp4a(track));\n } else {\n return MP4.box(MP4.types.stsd, MP4.STSD, MP4.avc1(track));\n }\n }\n\n static tkhd(track) {\n var id = track.id,\n duration = track.duration,\n width = track.width,\n height = track.height,\n volume = track.volume;\n return MP4.box(MP4.types.tkhd, new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x07, // flags\n 0x00, 0x00, 0x00, 0x00, // creation_time\n 0x00, 0x00, 0x00, 0x00, // modification_time\n (id >> 24) & 0xFF,\n (id >> 16) & 0xFF,\n (id >> 8) & 0xFF,\n id & 0xFF, // track_ID\n 0x00, 0x00, 0x00, 0x00, // reserved\n (duration >> 24),\n (duration >> 16) & 0xFF,\n (duration >> 8) & 0xFF,\n duration & 0xFF, // duration\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, // layer\n 0x00, 0x00, // alternate_group\n (volume>>0)&0xff, (((volume%1)*10)>>0)&0xff, // track volume // FIXME\n 0x00, 0x00, // reserved\n 0x00, 0x01, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x01, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\n (width >> 8) & 0xFF,\n width & 0xFF,\n 0x00, 0x00, // width\n (height >> 8) & 0xFF,\n height & 0xFF,\n 0x00, 0x00 // height\n ]));\n }\n\n static traf(track,baseMediaDecodeTime) {\n var sampleDependencyTable = MP4.sdtp(track),\n id = track.id;\n return MP4.box(MP4.types.traf,\n MP4.box(MP4.types.tfhd, new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n (id >> 24),\n (id >> 16) & 0XFF,\n (id >> 8) & 0XFF,\n (id & 0xFF) // track_ID\n ])),\n MP4.box(MP4.types.tfdt, new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n (baseMediaDecodeTime >>24),\n (baseMediaDecodeTime >> 16) & 0XFF,\n (baseMediaDecodeTime >> 8) & 0XFF,\n (baseMediaDecodeTime & 0xFF) // baseMediaDecodeTime\n ])),\n MP4.trun(track,\n sampleDependencyTable.length +\n 16 + // tfhd\n 16 + // tfdt\n 8 + // traf header\n 16 + // mfhd\n 8 + // moof header\n 8), // mdat header\n sampleDependencyTable);\n }\n\n /**\n * Generate a track box.\n * @param track {object} a track definition\n * @return {Uint8Array} the track box\n */\n static trak(track) {\n track.duration = track.duration || 0xffffffff;\n return MP4.box(MP4.types.trak, MP4.tkhd(track), MP4.mdia(track));\n }\n\n static trex(track) {\n var id = track.id;\n return MP4.box(MP4.types.trex, new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n (id >> 24),\n (id >> 16) & 0XFF,\n (id >> 8) & 0XFF,\n (id & 0xFF), // track_ID\n 0x00, 0x00, 0x00, 0x01, // default_sample_description_index\n 0x00, 0x00, 0x00, 0x00, // default_sample_duration\n 0x00, 0x00, 0x00, 0x00, // default_sample_size\n 0x00, 0x01, 0x00, 0x01 // default_sample_flags\n ]));\n }\n\n static trun(track, offset) {\n var samples= track.samples || [],\n len = samples.length,\n arraylen = 12 + (16 * len),\n array = new Uint8Array(arraylen),\n i,sample,duration,size,flags,cts;\n offset += 8 + arraylen;\n array.set([\n 0x00, // version 0\n 0x00, 0x0f, 0x01, // flags\n (len >>> 24) & 0xFF,\n (len >>> 16) & 0xFF,\n (len >>> 8) & 0xFF,\n len & 0xFF, // sample_count\n (offset >>> 24) & 0xFF,\n (offset >>> 16) & 0xFF,\n (offset >>> 8) & 0xFF,\n offset & 0xFF // data_offset\n ],0);\n for (i = 0; i < len; i++) {\n sample = samples[i];\n duration = sample.duration;\n size = sample.size;\n flags = sample.flags;\n cts = sample.cts;\n array.set([\n (duration >>> 24) & 0xFF,\n (duration >>> 16) & 0xFF,\n (duration >>> 8) & 0xFF,\n duration & 0xFF, // sample_duration\n (size >>> 24) & 0xFF,\n (size >>> 16) & 0xFF,\n (size >>> 8) & 0xFF,\n size & 0xFF, // sample_size\n (flags.isLeading << 2) | flags.dependsOn,\n (flags.isDependedOn << 6) |\n (flags.hasRedundancy << 4) |\n (flags.paddingValue << 1) |\n flags.isNonSync,\n flags.degradPrio & 0xF0 << 8,\n flags.degradPrio & 0x0F, // sample_flags\n (cts >>> 24) & 0xFF,\n (cts >>> 16) & 0xFF,\n (cts >>> 8) & 0xFF,\n cts & 0xFF // sample_composition_time_offset\n ],12+16*i);\n }\n return MP4.box(MP4.types.trun, array);\n }\n\n static initSegment(tracks, duration, timescale) {\n if (!MP4.types) {\n MP4.init();\n }\n var movie = MP4.moov(tracks, duration, timescale), result;\n result = new Uint8Array(MP4.FTYP.byteLength + movie.byteLength);\n result.set(MP4.FTYP);\n result.set(movie, MP4.FTYP.byteLength);\n return result;\n }\n}\n","import {EventEmitter} from '../../deps/bp_event.js';\nimport {getTagged} from '../../deps/bp_logger.js';\n//import {MP4Inspect} from '../iso-bmff/mp4-inspector.js';\n\nconst LOG_TAG = \"mse\";\nconst Log = getTagged(LOG_TAG);\n\nexport class MSEBuffer {\n constructor(parent, codec) {\n this.mediaSource = parent.mediaSource;\n this.players = parent.players;\n this.cleaning = false;\n this.parent = parent;\n this.queue = [];\n this.cleanResolvers = [];\n this.codec = codec;\n this.cleanRanges = [];\n\n Log.debug(`Use codec: ${codec}`);\n\n this.sourceBuffer = this.mediaSource.addSourceBuffer(codec);\n this.eventSource = new EventEmitter(this.sourceBuffer);\n\n this.eventSource.addEventListener('updatestart', (e)=> {\n // this.updating = true;\n // Log.debug('update start');\n if (this.cleaning) {\n Log.debug(`${this.codec} cleaning start`);\n }\n });\n\n this.eventSource.addEventListener('update', (e)=> {\n // this.updating = true;\n if (this.cleaning) {\n Log.debug(`${this.codec} cleaning update`);\n }\n });\n\n this.eventSource.addEventListener('updateend', (e)=> {\n // Log.debug('update end');\n // this.updating = false;\n if (this.cleaning) {\n Log.debug(`${this.codec} cleaning end`);\n\n try {\n if (this.sourceBuffer.buffered.length && this.players[0].currentTime < this.sourceBuffer.buffered.start(0)) {\n this.players[0].currentTime = this.sourceBuffer.buffered.start(0);\n }\n } catch (e) {\n // TODO: do something?\n }\n while (this.cleanResolvers.length) {\n let resolver = this.cleanResolvers.shift();\n resolver();\n }\n this.cleaning = false;\n\n if (this.cleanRanges.length) {\n this.doCleanup();\n return;\n }\n } else {\n // Log.debug(`buffered: ${this.sourceBuffer.buffered.end(0)}, current ${this.players[0].currentTime}`);\n }\n this.feedNext();\n });\n\n this.eventSource.addEventListener('error', (e)=> {\n Log.debug(`Source buffer error: ${this.mediaSource.readyState}`);\n if (this.mediaSource.sourceBuffers.length) {\n this.mediaSource.removeSourceBuffer(this.sourceBuffer);\n }\n this.parent.eventSource.dispatchEvent('error');\n });\n\n this.eventSource.addEventListener('abort', (e)=> {\n Log.debug(`Source buffer aborted: ${this.mediaSource.readyState}`);\n if (this.mediaSource.sourceBuffers.length) {\n this.mediaSource.removeSourceBuffer(this.sourceBuffer);\n }\n this.parent.eventSource.dispatchEvent('error');\n });\n\n if (!this.sourceBuffer.updating) {\n this.feedNext();\n }\n // TODO: cleanup every hour for live streams\n }\n\n destroy() {\n this.eventSource.destroy();\n this.clear();\n this.queue = [];\n this.mediaSource.removeSourceBuffer(this.sourceBuffer);\n }\n\n clear() {\n this.queue = [];\n let promises = [];\n for (let i=0; i< this.sourceBuffer.buffered.length; ++i) {\n // TODO: await remove\n this.cleaning = true;\n promises.push(new Promise((resolve, reject)=>{\n this.cleanResolvers.push(resolve);\n if (!this.sourceBuffer.updating) {\n this.sourceBuffer.remove(this.sourceBuffer.buffered.start(i), this.sourceBuffer.buffered.end(i));\n resolve();\n } else {\n this.sourceBuffer.onupdateend = () => {\n if (this.sourceBuffer) {\n this.sourceBuffer.remove(this.sourceBuffer.buffered.start(i), this.sourceBuffer.buffered.end(i));\n }\n resolve();\n };\n }\n }));\n }\n return Promise.all(promises);\n }\n\n setLive(is_live) {\n this.is_live = is_live;\n }\n\n feedNext() {\n // Log.debug(\"feed next \", this.sourceBuffer.updating);\n if (!this.sourceBuffer.updating && !this.cleaning && this.queue.length) {\n this.doAppend(this.queue.shift());\n // TODO: if is live and current position > 1hr => clean all and restart\n }\n }\n\n doCleanup() {\n if (!this.cleanRanges.length) {\n this.cleaning = false;\n this.feedNext();\n return;\n }\n let range = this.cleanRanges.shift();\n Log.debug(`${this.codec} remove range [${range[0]} - ${range[1]}). \n \\nUpdating: ${this.sourceBuffer.updating}\n `);\n this.cleaning = true;\n this.sourceBuffer.remove(range[0], range[1]);\n }\n\n initCleanup() {\n if (this.sourceBuffer.buffered.length && !this.sourceBuffer.updating && !this.cleaning) {\n Log.debug(`${this.codec} cleanup`);\n let removeBound = this.sourceBuffer.buffered.end(this.sourceBuffer.buffered.length-1) - 2;\n\n for (let i=0; i< this.sourceBuffer.buffered.length; ++i) {\n let removeStart = this.sourceBuffer.buffered.start(i);\n let removeEnd = this.sourceBuffer.buffered.end(i);\n if ((this.players[0].currentTime <= removeStart) || (removeBound <= removeStart)) continue;\n\n if ((removeBound <= removeEnd) && (removeBound >= removeStart)) {\n Log.debug(`Clear [${removeStart}, ${removeBound}), leave [${removeBound}, ${removeEnd}]`);\n removeEnd = removeBound;\n if (removeEnd!=removeStart) {\n this.cleanRanges.push([removeStart, removeEnd]);\n }\n continue; // Do not cleanup buffered range after current position\n }\n this.cleanRanges.push([removeStart, removeEnd]);\n }\n\n this.doCleanup();\n\n // let bufferStart = this.sourceBuffer.buffered.start(0);\n // let removeEnd = this.sourceBuffer.buffered.start(0) + (this.sourceBuffer.buffered.end(0) - this.sourceBuffer.buffered.start(0))/2;\n // if (this.players[0].currentTime < removeEnd) {\n // this.players[0].currentTime = removeEnd;\n // }\n // let removeEnd = Math.max(this.players[0].currentTime - 3, this.sourceBuffer.buffered.end(0) - 3);\n //\n // if (removeEnd < bufferStart) {\n // removeEnd = this.sourceBuffer.buffered.start(0) + (this.sourceBuffer.buffered.end(0) - this.sourceBuffer.buffered.start(0))/2;\n // if (this.players[0].currentTime < removeEnd) {\n // this.players[0].currentTime = removeEnd;\n // }\n // }\n\n // if (removeEnd > bufferStart && (removeEnd - bufferStart > 0.5 )) {\n // // try {\n // Log.debug(`${this.codec} remove range [${bufferStart} - ${removeEnd}).\n // \\nBuffered end: ${this.sourceBuffer.buffered.end(0)}\n // \\nUpdating: ${this.sourceBuffer.updating}\n // `);\n // this.cleaning = true;\n // this.sourceBuffer.remove(bufferStart, removeEnd);\n // // } catch (e) {\n // // // TODO: implement\n // // Log.error(e);\n // // }\n // } else {\n // this.feedNext();\n // }\n } else {\n this.feedNext();\n }\n }\n\n doAppend(data) {\n // console.log(MP4Inspect.mp4toJSON(data));\n let err = this.players[0].error;\n if (err) {\n Log.error(`Error occured: ${MSE.ErrorNotes[err.code]}`);\n try {\n this.players.forEach((video)=>{video.stop();});\n this.mediaSource.endOfStream();\n } catch (e){\n\n }\n this.parent.eventSource.dispatchEvent('error');\n } else {\n try {\n this.sourceBuffer.appendBuffer(data);\n } catch (e) {\n if (e.name === 'QuotaExceededError') {\n Log.debug(`${this.codec} quota fail`);\n this.queue.unshift(data);\n this.initCleanup();\n return;\n }\n\n // reconnect on fail\n Log.error(`Error occured while appending buffer. ${e.name}: ${e.message}`);\n this.parent.eventSource.dispatchEvent('error');\n }\n }\n\n }\n\n feed(data) {\n this.queue = this.queue.concat(data);\n // Log.debug(this.sourceBuffer.updating, this.updating, this.queue.length);\n if (this.sourceBuffer && !this.sourceBuffer.updating && !this.cleaning) {\n // Log.debug('enq feed');\n this.feedNext();\n }\n }\n}\n\nexport class MSE {\n // static CODEC_AVC_BASELINE = \"avc1.42E01E\";\n // static CODEC_AVC_MAIN = \"avc1.4D401E\";\n // static CODEC_AVC_HIGH = \"avc1.64001E\";\n // static CODEC_VP8 = \"vp8\";\n // static CODEC_AAC = \"mp4a.40.2\";\n // static CODEC_VORBIS = \"vorbis\";\n // static CODEC_THEORA = \"theora\";\n\n static get ErrorNotes() {return {\n [MediaError.MEDIA_ERR_ABORTED]: 'fetching process aborted by user',\n [MediaError.MEDIA_ERR_NETWORK]: 'error occurred when downloading',\n [MediaError.MEDIA_ERR_DECODE]: 'error occurred when decoding',\n [MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED]: 'audio/video not supported'\n }};\n\n static isSupported(codecs) {\n return (window.MediaSource && window.MediaSource.isTypeSupported(`video/mp4; codecs=\"${codecs.join(',')}\"`));\n }\n\n constructor (players) {\n this.players = players;\n const playing = this.players.map((video, idx) => {\n video.onplaying = function () {\n playing[idx] = true;\n };\n video.onpause = function () {\n playing[idx] = false;\n };\n return !video.paused;\n });\n this.playing = playing;\n this.mediaSource = new MediaSource();\n this.eventSource = new EventEmitter(this.mediaSource);\n this.reset();\n }\n\n destroy() {\n this.reset();\n this.eventSource.destroy();\n this.mediaSource = null;\n this.eventSource = null;\n }\n\n play() {\n this.players.forEach((video, idx)=>{\n if (video.paused && !this.playing[idx]) {\n Log.debug(`player ${idx}: play`);\n video.play();\n }\n });\n }\n\n setLive(is_live) {\n for (let idx in this.buffers) {\n this.buffers[idx].setLive(is_live);\n }\n this.is_live = is_live;\n }\n\n resetBuffers() {\n this.players.forEach((video, idx)=>{\n if (!video.paused && this.playing[idx]) {\n video.pause();\n video.currentTime = 0;\n }\n });\n\n let promises = [];\n for (let buffer of this.buffers.values()) {\n promises.push(buffer.clear());\n }\n return Promise.all(promises).then(()=>{\n this.mediaSource.endOfStream();\n this.mediaSource.duration = 0;\n this.mediaSource.clearLiveSeekableRange();\n this.play();\n });\n }\n\n clear() {\n this.reset();\n this.players.forEach((video)=>{video.src = URL.createObjectURL(this.mediaSource)});\n\n return this.setupEvents();\n }\n\n setupEvents() {\n this.eventSource.clear();\n this.resolved = false;\n this.mediaReady = new Promise((resolve, reject)=> {\n this._sourceOpen = ()=> {\n Log.debug(`Media source opened: ${this.mediaSource.readyState}`);\n if (!this.resolved) {\n this.resolved = true;\n resolve();\n }\n };\n this._sourceEnded = ()=>{\n Log.debug(`Media source ended: ${this.mediaSource.readyState}`);\n };\n this._sourceClose = ()=>{\n Log.debug(`Media source closed: ${this.mediaSource.readyState}`);\n if (this.resolved) {\n this.eventSource.dispatchEvent('sourceclosed');\n }\n };\n this.eventSource.addEventListener('sourceopen', this._sourceOpen);\n this.eventSource.addEventListener('sourceended', this._sourceEnded);\n this.eventSource.addEventListener('sourceclose', this._sourceClose);\n });\n return this.mediaReady;\n }\n\n reset() {\n this.ready = false;\n for (let track in this.buffers) {\n this.buffers[track].destroy();\n delete this.buffers[track];\n }\n if (this.mediaSource.readyState == 'open') {\n this.mediaSource.duration = 0;\n this.mediaSource.endOfStream();\n }\n this.updating = false;\n this.resolved = false;\n this.buffers = {};\n // this.players.forEach((video)=>{video.src = URL.createObjectURL(this.mediaSource)});\n // TODO: remove event listeners for existing media source\n // this.setupEvents();\n // this.clear();\n }\n\n setCodec(track, mimeCodec) {\n return this.mediaReady.then(()=>{\n this.buffers[track] = new MSEBuffer(this, mimeCodec);\n this.buffers[track].setLive(this.is_live);\n });\n }\n\n feed(track, data) {\n if (this.buffers[track]) {\n this.buffers[track].feed(data);\n }\n }\n}\n","import {getTagged} from '../../deps/bp_logger.js';\n\nconst Log = getTagged('remuxer:base');\nlet track_id = 1;\nexport class BaseRemuxer {\n\n static get MP4_TIMESCALE() { return 90000;}\n\n // TODO: move to ts parser\n // static PTSNormalize(value, reference) {\n //\n // let offset;\n // if (reference === undefined) {\n // return value;\n // }\n // if (reference < value) {\n // // - 2^33\n // offset = -8589934592;\n // } else {\n // // + 2^33\n // offset = 8589934592;\n // }\n // /* PTS is 33bit (from 0 to 2^33 -1)\n // if diff between value and reference is bigger than half of the amplitude (2^32) then it means that\n // PTS looping occured. fill the gap */\n // while (Math.abs(value - reference) > 4294967296) {\n // value += offset;\n // }\n // return value;\n // }\n\n static getTrackID() {\n return track_id++;\n }\n\n constructor(timescale, scaleFactor, params) {\n this.timeOffset = 0;\n this.timescale = timescale;\n this.scaleFactor = scaleFactor;\n this.readyToDecode = false;\n this.samples = [];\n this.seq = 1;\n this.tsAlign = 1;\n }\n\n shifted(timestamp) {\n return timestamp - this.timeOffset;\n }\n\n scaled(timestamp) {\n return timestamp / this.scaleFactor;\n }\n\n unscaled(timestamp) {\n return timestamp * this.scaleFactor;\n }\n\n remux(unit) {\n if (unit && this.timeOffset >= 0) {\n this.samples.push({\n unit: unit,\n pts: this.shifted(unit.pts),\n dts: this.shifted(unit.dts)\n });\n return true;\n }\n return false;\n }\n\n static toMS(timestamp) {\n return timestamp/90;\n }\n \n setConfig(config) {\n \n }\n\n insertDscontinuity() {\n this.samples.push(null);\n }\n\n init(initPTS, initDTS, shouldInitialize=true) {\n this.initPTS = Math.min(initPTS, this.samples[0].dts /*- this.unscaled(this.timeOffset)*/);\n this.initDTS = Math.min(initDTS, this.samples[0].dts /*- this.unscaled(this.timeOffset)*/);\n Log.debug(`Initial pts=${this.initPTS} dts=${this.initDTS} offset=${this.unscaled(this.timeOffset)}`);\n this.initialized = shouldInitialize;\n }\n\n flush() {\n this.seq++;\n this.mp4track.len = 0;\n this.mp4track.samples = [];\n }\n\n static dtsSortFunc(a,b) {\n return (a.dts-b.dts);\n }\n\n getPayloadBase(sampleFunction, setupSample) {\n if (!this.readyToDecode || !this.initialized || !this.samples.length) return null;\n this.samples.sort(BaseRemuxer.dtsSortFunc);\n return true;\n //\n // let payload = new Uint8Array(this.mp4track.len);\n // let offset = 0;\n // let samples=this.mp4track.samples;\n // let mp4Sample, lastDTS, pts, dts;\n //\n // while (this.samples.length) {\n // let sample = this.samples.shift();\n // if (sample === null) {\n // // discontinuity\n // this.nextDts = undefined;\n // break;\n // }\n //\n // let unit = sample.unit;\n //\n // pts = Math.round((sample.pts - this.initDTS)/this.tsAlign)*this.tsAlign;\n // dts = Math.round((sample.dts - this.initDTS)/this.tsAlign)*this.tsAlign;\n // // ensure DTS is not bigger than PTS\n // dts = Math.min(pts, dts);\n //\n // // sampleFunction(pts, dts); // TODO:\n //\n // // mp4Sample = setupSample(unit, pts, dts); // TODO:\n //\n // payload.set(unit.getData(), offset);\n // offset += unit.getSize();\n //\n // samples.push(mp4Sample);\n // lastDTS = dts;\n // }\n // if (!samples.length) return null;\n //\n // // samplesPostFunction(samples); // TODO:\n //\n // return new Uint8Array(payload.buffer, 0, this.mp4track.len);\n }\n}","import {getTagged} from '../../deps/bp_logger.js';\nimport {MSE} from '../presentation/mse.js';\nimport {BaseRemuxer} from './base.js';\n\nconst Log = getTagged(\"remuxer:aac\");\n// TODO: asm.js\nexport class AACRemuxer extends BaseRemuxer {\n\n constructor(timescale, scaleFactor = 1, params={}) {\n super(timescale, scaleFactor);\n\n this.codecstring=MSE.CODEC_AAC;\n this.units = [];\n this.initDTS = undefined;\n this.nextAacPts = undefined;\n this.lastPts = 0;\n this.firstDTS = 0;\n this.firstPTS = 0;\n this.duration = params.duration || 1;\n this.initialized = false;\n\n this.mp4track={\n id:BaseRemuxer.getTrackID(),\n type: 'audio',\n fragmented:true,\n channelCount:0,\n audiosamplerate: this.timescale,\n duration: 0,\n timescale: this.timescale,\n volume: 1,\n samples: [],\n config: '',\n len: 0\n };\n if (params.config) {\n this.setConfig(params.config);\n }\n }\n\n setConfig(config) {\n this.mp4track.channelCount = config.channels;\n this.mp4track.audiosamplerate = config.samplerate;\n if (!this.mp4track.duration) {\n this.mp4track.duration = (this.duration?this.duration:1)*config.samplerate;\n }\n this.mp4track.timescale = config.samplerate;\n this.mp4track.config = config.config;\n this.mp4track.codec = config.codec;\n this.timescale = config.samplerate;\n this.scaleFactor = BaseRemuxer.MP4_TIMESCALE / config.samplerate;\n this.expectedSampleDuration = 1024 * this.scaleFactor;\n this.readyToDecode = true;\n }\n\n remux(aac) {\n if (super.remux.call(this, aac)) {\n this.mp4track.len += aac.getSize();\n }\n }\n \n getPayload() {\n if (!this.readyToDecode || !this.samples.length) return null;\n this.samples.sort(function(a, b) {\n return (a.dts-b.dts);\n });\n\n let payload = new Uint8Array(this.mp4track.len);\n let offset = 0;\n let samples=this.mp4track.samples;\n let mp4Sample, lastDTS, pts, dts;\n\n while (this.samples.length) {\n let sample = this.samples.shift();\n if (sample === null) {\n // discontinuity\n this.nextDts = undefined;\n break;\n }\n let unit = sample.unit;\n pts = sample.pts - this.initDTS;\n dts = sample.dts - this.initDTS;\n\n if (lastDTS === undefined) {\n if (this.nextDts) {\n let delta = Math.round(this.scaled(pts - this.nextAacPts));\n // if fragment are contiguous, or delta less than 600ms, ensure there is no overlap/hole between fragments\n if (/*contiguous || */Math.abs(delta) < 600) {\n // log delta\n if (delta) {\n if (delta > 0) {\n Log.log(`${delta} ms hole between AAC samples detected,filling it`);\n // if we have frame overlap, overlapping for more than half a frame duraion\n } else if (delta < -12) {\n // drop overlapping audio frames... browser will deal with it\n Log.log(`${(-delta)} ms overlapping between AAC samples detected, drop frame`);\n this.mp4track.len -= unit.getSize();\n continue;\n }\n // set DTS to next DTS\n pts = dts = this.nextAacPts;\n }\n }\n }\n // remember first PTS of our aacSamples, ensure value is positive\n this.firstDTS = Math.max(0, dts);\n }\n\n mp4Sample = {\n size: unit.getSize(),\n cts: 0,\n duration:1024,\n flags: {\n isLeading: 0,\n isDependedOn: 0,\n hasRedundancy: 0,\n degradPrio: 0,\n dependsOn: 1\n }\n };\n\n payload.set(unit.getData(), offset);\n offset += unit.getSize();\n samples.push(mp4Sample);\n lastDTS = dts;\n }\n if (!samples.length) return null;\n this.nextDts =pts+this.expectedSampleDuration;\n return new Uint8Array(payload.buffer, 0, this.mp4track.len);\n }\n}\n//test.bundle.js:42 [remuxer:h264] skip frame from the past at DTS=18397972271140676 with expected DTS=18397998040950484","/**\n * Parser for exponential Golomb codes, a variable-bitwidth number encoding scheme used by h264.\n*/\n// TODO: asm.js\nimport {Log as logger} from '../../deps/bp_logger.js';\n\nexport class ExpGolomb {\n\n constructor(data) {\n this.data = data;\n // the number of bytes left to examine in this.data\n this.bytesAvailable = this.data.byteLength;\n // the current word being examined\n this.word = 0; // :uint\n // the number of bits left to examine in the current word\n this.bitsAvailable = 0; // :uint\n }\n\n // ():void\n loadWord() {\n var\n position = this.data.byteLength - this.bytesAvailable,\n workingBytes = new Uint8Array(4),\n availableBytes = Math.min(4, this.bytesAvailable);\n if (availableBytes === 0) {\n throw new Error('no bytes available');\n }\n workingBytes.set(this.data.subarray(position, position + availableBytes));\n this.word = new DataView(workingBytes.buffer, workingBytes.byteOffset, workingBytes.byteLength).getUint32(0);\n // track the amount of this.data that has been processed\n this.bitsAvailable = availableBytes * 8;\n this.bytesAvailable -= availableBytes;\n }\n\n // (count:int):void\n skipBits(count) {\n var skipBytes; // :int\n if (this.bitsAvailable > count) {\n this.word <<= count;\n this.bitsAvailable -= count;\n } else {\n count -= this.bitsAvailable;\n skipBytes = count >> 3;\n count -= (skipBytes << 3);\n this.bytesAvailable -= skipBytes;\n this.loadWord();\n this.word <<= count;\n this.bitsAvailable -= count;\n }\n }\n\n // (size:int):uint\n readBits(size) {\n var\n bits = Math.min(this.bitsAvailable, size), // :uint\n valu = this.word >>> (32 - bits); // :uint\n if (size > 32) {\n logger.error('Cannot read more than 32 bits at a time');\n }\n this.bitsAvailable -= bits;\n if (this.bitsAvailable > 0) {\n this.word <<= bits;\n } else if (this.bytesAvailable > 0) {\n this.loadWord();\n }\n bits = size - bits;\n if (bits > 0) {\n return valu << bits | this.readBits(bits);\n } else {\n return valu;\n }\n }\n\n // ():uint\n skipLZ() {\n var leadingZeroCount; // :uint\n for (leadingZeroCount = 0; leadingZeroCount < this.bitsAvailable; ++leadingZeroCount) {\n if (0 !== (this.word & (0x80000000 >>> leadingZeroCount))) {\n // the first bit of working word is 1\n this.word <<= leadingZeroCount;\n this.bitsAvailable -= leadingZeroCount;\n return leadingZeroCount;\n }\n }\n // we exhausted word and still have not found a 1\n this.loadWord();\n return leadingZeroCount + this.skipLZ();\n }\n\n // ():void\n skipUEG() {\n this.skipBits(1 + this.skipLZ());\n }\n\n // ():void\n skipEG() {\n this.skipBits(1 + this.skipLZ());\n }\n\n // ():uint\n readUEG() {\n var clz = this.skipLZ(); // :uint\n return this.readBits(clz + 1) - 1;\n }\n\n // ():int\n readEG() {\n var valu = this.readUEG(); // :int\n if (0x01 & valu) {\n // the number is odd if the low order bit is set\n return (1 + valu) >>> 1; // add 1 to make it even, and divide by 2\n } else {\n return -1 * (valu >>> 1); // divide by two then make it negative\n }\n }\n\n // Some convenience functions\n // :Boolean\n readBoolean() {\n return 1 === this.readBits(1);\n }\n\n // ():int\n readUByte() {\n return this.readBits(8);\n }\n\n // ():int\n readUShort() {\n return this.readBits(16);\n }\n // ():int\n readUInt() {\n return this.readBits(32);\n } \n}\n","// TODO: asm.js\n\nexport function appendByteArray(buffer1, buffer2) {\n let tmp = new Uint8Array((buffer1.byteLength|0) + (buffer2.byteLength|0));\n tmp.set(buffer1, 0);\n tmp.set(buffer2, buffer1.byteLength|0);\n return tmp;\n}\n\nexport function appendByteArrayAsync(buffer1, buffer2) {\n return new Promise((resolve, reject)=>{\n let blob = new Blob([buffer1, buffer2]);\n let reader = new FileReader();\n reader.addEventListener(\"loadend\", function() {\n resolve();\n });\n reader.readAsArrayBuffer(blob);\n });\n}\nexport function base64ToArrayBuffer(base64) {\n var binary_string = window.atob(base64);\n var len = binary_string.length;\n var bytes = new Uint8Array( len );\n for (var i = 0; i < len; i++) {\n bytes[i] = binary_string.charCodeAt(i);\n }\n return bytes.buffer;\n}\n\nexport function hexToByteArray(hex) {\n let len = hex.length >> 1;\n var bufView = new Uint8Array(len);\n for (var i = 0; i < len; i++) {\n bufView[i] = parseInt(hex.substr(i<<1,2),16);\n }\n return bufView;\n}\n\nexport function concatenate(resultConstructor, ...arrays) {\n let totalLength = 0;\n for (let arr of arrays) {\n totalLength += arr.length;\n }\n let result = new resultConstructor(totalLength);\n let offset = 0;\n for (let arr of arrays) {\n result.set(arr, offset);\n offset += arr.length;\n }\n return result;\n}\n\nexport function bitSlice(bytearray, start=0, end=bytearray.byteLength*8) {\n let byteLen = Math.ceil((end-start)/8);\n let res = new Uint8Array(byteLen);\n let startByte = start >>> 3; // /8\n let endByte = (end>>>3) - 1; // /8\n let bitOffset = start & 0x7; // %8\n let nBitOffset = 8 - bitOffset;\n let endOffset = 8 - end & 0x7; // %8\n for (let i=0; i<byteLen; ++i) {\n let tail = 0;\n if (i<endByte) {\n tail = bytearray[startByte+i+1] >> nBitOffset;\n if (i == endByte-1 && endOffset < 8) {\n tail >>= endOffset;\n tail <<= endOffset;\n }\n }\n res[i]=(bytearray[startByte+i]<<bitOffset) | tail;\n }\n return res;\n}\n\nexport class BitArray {\n\n constructor(src) {\n this.src = new DataView(src.buffer, src.byteOffset, src.byteLength);\n this.bitpos = 0;\n this.byte = this.src.getUint8(0); /* This should really be undefined, uint wont allow it though */\n this.bytepos = 0;\n }\n\n readBits(length) {\n if (32 < (length|0) || 0 === (length|0)) {\n /* To big for an uint */\n throw new Error(\"too big\");\n }\n\n let result = 0;\n for (let i = length; i > 0; --i) {\n\n /* Shift result one left to make room for another bit,\n then add the next bit on the stream. */\n result = ((result|0) << 1) | (((this.byte|0) >> (8 - (++this.bitpos))) & 0x01);\n if ((this.bitpos|0)>=8) {\n this.byte = this.src.getUint8(++this.bytepos);\n this.bitpos &= 0x7;\n }\n }\n\n return result;\n }\n skipBits(length) {\n this.bitpos += (length|0) & 0x7; // %8\n this.bytepos += (length|0) >>> 3; // *8\n if (this.bitpos > 7) {\n this.bitpos &= 0x7;\n ++this.bytepos;\n }\n\n if (!this.finished()) {\n this.byte = this.src.getUint8(this.bytepos);\n return 0;\n } else {\n return this.bytepos-this.src.byteLength-this.src.bitpos;\n }\n }\n \n finished() {\n return this.bytepos >= this.src.byteLength;\n }\n}","import {appendByteArray} from '../util/binary.js';\n\nexport class NALU {\n\n static get NDR() {return 1;}\n static get IDR() {return 5;}\n static get SEI() {return 6;}\n static get SPS() {return 7;}\n static get PPS() {return 8;}\n static get STAP_A() {return 24;}\n static get STAP_B() {return 25;}\n static get FU_A() {return 28;}\n static get FU_B() {return 29;}\n\n static get TYPES() {return {\n [NALU.IDR]: 'IDR',\n [NALU.SEI]: 'SEI',\n [NALU.SPS]: 'SPS',\n [NALU.PPS]: 'PPS',\n [NALU.NDR]: 'NDR'\n }};\n\n static type(nalu) {\n if (nalu.ntype in NALU.TYPES) {\n return NALU.TYPES[nalu.ntype];\n } else {\n return 'UNKNOWN';\n }\n }\n\n constructor(ntype, nri, data, dts, pts) {\n\n this.data = data;\n this.ntype = ntype;\n this.nri = nri;\n this.dts = dts;\n this.pts = pts ? pts : this.dts;\n\n }\n\n appendData(idata) {\n this.data = appendByteArray(this.data, idata);\n }\n\n toString() {\n return `${NALU.type(this)}(${this.data.byteLength}): NRI: ${this.getNri()}, PTS: ${this.pts}, DTS: ${this.dts}`;\n }\n\n getNri() {\n return this.nri >> 5;\n }\n\n type() {\n return this.ntype;\n }\n\n isKeyframe() {\n return this.ntype == NALU.IDR;\n }\n\n getSize() {\n return 4 + 1 + this.data.byteLength;\n }\n\n getData() {\n let header = new Uint8Array(5 + this.data.byteLength);\n let view = new DataView(header.buffer);\n view.setUint32(0, this.data.byteLength + 1);\n view.setUint8(4, (0x0 & 0x80) | (this.nri & 0x60) | (this.ntype & 0x1F));\n header.set(this.data, 5);\n return header;\n }\n}\n","import {ExpGolomb} from '../util/exp-golomb.js';\nimport {NALU} from '../elementary/NALU.js';\n\nexport class H264Parser {\n\n constructor(remuxer) {\n this.remuxer = remuxer;\n this.track = remuxer.mp4track;\n }\n\n msToScaled(timestamp) {\n return (timestamp - this.remuxer.timeOffset) * this.remuxer.scaleFactor;\n }\n\n parseSPS(sps) {\n var config = H264Parser.readSPS(new Uint8Array(sps));\n\n this.track.width = config.width;\n this.track.height = config.height;\n this.track.sps = [new Uint8Array(sps)];\n // this.track.timescale = this.remuxer.timescale;\n // this.track.duration = this.remuxer.timescale; // TODO: extract duration for non-live client\n this.track.codec = 'avc1.';\n\n let codecarray = new DataView(sps.buffer, sps.byteOffset+1, 4);\n for (let i = 0; i < 3; ++i) {\n var h = codecarray.getUint8(i).toString(16);\n if (h.length < 2) {\n h = '0' + h;\n }\n this.track.codec += h;\n }\n }\n\n parsePPS(pps) {\n this.track.pps = [new Uint8Array(pps)];\n }\n\n parseNAL(unit) {\n if (!unit) return false;\n \n let push = false;\n // console.log(unit.toString());\n switch (unit.type()) {\n case NALU.NDR:\n push = true;\n break;\n case NALU.IDR:\n push = true;\n break;\n case NALU.PPS:\n if (!this.track.pps) {\n this.parsePPS(unit.getData().subarray(4));\n if (!this.remuxer.readyToDecode && this.track.pps && this.track.sps) {\n this.remuxer.readyToDecode = true;\n }\n }\n break;\n case NALU.SPS:\n if(!this.track.sps) {\n this.parseSPS(unit.getData().subarray(4));\n if (!this.remuxer.readyToDecode && this.track.pps && this.track.sps) {\n this.remuxer.readyToDecode = true;\n }\n }\n break;\n case NALU.SEI:\n let data = new DataView(unit.data.buffer, unit.data.byteOffset, unit.data.byteLength);\n let byte_idx = 0;\n let pay_type = data.getUint8(byte_idx);\n ++byte_idx;\n let pay_size = 0;\n let sz = data.getUint8(byte_idx);\n ++byte_idx;\n while (sz === 255) {\n pay_size+=sz;\n sz = data.getUint8(byte_idx);\n ++byte_idx;\n }\n pay_size+=sz;\n\n let uuid = unit.data.subarray(byte_idx, byte_idx+16);\n byte_idx+=16;\n console.log(`PT: ${pay_type}, PS: ${pay_size}, UUID: ${Array.from(uuid).map(function(i) {\n return ('0' + i.toString(16)).slice(-2);\n }).join('')}`);\n // debugger;\n break;\n default:\n }\n if (unit.getNri() > 0 ) {\n push=true;\n }\n return push;\n }\n\n /**\n * Advance the ExpGolomb decoder past a scaling list. The scaling\n * list is optionally transmitted as part of a sequence parameter\n * set and is not relevant to transmuxing.\n * @param decoder {ExpGolomb} exp golomb decoder\n * @param count {number} the number of entries in this scaling list\n * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1\n */\n static skipScalingList(decoder, count) {\n let lastScale = 8,\n nextScale = 8,\n deltaScale;\n for (let j = 0; j < count; j++) {\n if (nextScale !== 0) {\n deltaScale = decoder.readEG();\n nextScale = (lastScale + deltaScale + 256) % 256;\n }\n lastScale = (nextScale === 0) ? lastScale : nextScale;\n }\n }\n\n /**\n * Read a sequence parameter set and return some interesting video\n * properties. A sequence parameter set is the H264 metadata that\n * describes the properties of upcoming video frames.\n * @param data {Uint8Array} the bytes of a sequence parameter set\n * @return {object} an object with configuration parsed from the\n * sequence parameter set, including the dimensions of the\n * associated video frames.\n */\n static readSPS(data) {\n let decoder = new ExpGolomb(data);\n let frameCropLeftOffset = 0,\n frameCropRightOffset = 0,\n frameCropTopOffset = 0,\n frameCropBottomOffset = 0,\n sarScale = 1,\n profileIdc,profileCompat,levelIdc,\n numRefFramesInPicOrderCntCycle, picWidthInMbsMinus1,\n picHeightInMapUnitsMinus1,\n frameMbsOnlyFlag,\n scalingListCount;\n decoder.readUByte();\n profileIdc = decoder.readUByte(); // profile_idc\n profileCompat = decoder.readBits(5); // constraint_set[0-4]_flag, u(5)\n decoder.skipBits(3); // reserved_zero_3bits u(3),\n levelIdc = decoder.readUByte(); //level_idc u(8)\n decoder.skipUEG(); // seq_parameter_set_id\n // some profiles have more optional data we don't need\n if (profileIdc === 100 ||\n profileIdc === 110 ||\n profileIdc === 122 ||\n profileIdc === 244 ||\n profileIdc === 44 ||\n profileIdc === 83 ||\n profileIdc === 86 ||\n profileIdc === 118 ||\n profileIdc === 128) {\n var chromaFormatIdc = decoder.readUEG();\n if (chromaFormatIdc === 3) {\n decoder.skipBits(1); // separate_colour_plane_flag\n }\n decoder.skipUEG(); // bit_depth_luma_minus8\n decoder.skipUEG(); // bit_depth_chroma_minus8\n decoder.skipBits(1); // qpprime_y_zero_transform_bypass_flag\n if (decoder.readBoolean()) { // seq_scaling_matrix_present_flag\n scalingListCount = (chromaFormatIdc !== 3) ? 8 : 12;\n for (let i = 0; i < scalingListCount; ++i) {\n if (decoder.readBoolean()) { // seq_scaling_list_present_flag[ i ]\n if (i < 6) {\n H264Parser.skipScalingList(decoder, 16);\n } else {\n H264Parser.skipScalingList(decoder, 64);\n }\n }\n }\n }\n }\n decoder.skipUEG(); // log2_max_frame_num_minus4\n var picOrderCntType = decoder.readUEG();\n if (picOrderCntType === 0) {\n decoder.readUEG(); //log2_max_pic_order_cnt_lsb_minus4\n } else if (picOrderCntType === 1) {\n decoder.skipBits(1); // delta_pic_order_always_zero_flag\n decoder.skipEG(); // offset_for_non_ref_pic\n decoder.skipEG(); // offset_for_top_to_bottom_field\n numRefFramesInPicOrderCntCycle = decoder.readUEG();\n for(let i = 0; i < numRefFramesInPicOrderCntCycle; ++i) {\n decoder.skipEG(); // offset_for_ref_frame[ i ]\n }\n }\n decoder.skipUEG(); // max_num_ref_frames\n decoder.skipBits(1); // gaps_in_frame_num_value_allowed_flag\n picWidthInMbsMinus1 = decoder.readUEG();\n picHeightInMapUnitsMinus1 = decoder.readUEG();\n frameMbsOnlyFlag = decoder.readBits(1);\n if (frameMbsOnlyFlag === 0) {\n decoder.skipBits(1); // mb_adaptive_frame_field_flag\n }\n decoder.skipBits(1); // direct_8x8_inference_flag\n if (decoder.readBoolean()) { // frame_cropping_flag\n frameCropLeftOffset = decoder.readUEG();\n frameCropRightOffset = decoder.readUEG();\n frameCropTopOffset = decoder.readUEG();\n frameCropBottomOffset = decoder.readUEG();\n }\n if (decoder.readBoolean()) {\n // vui_parameters_present_flag\n if (decoder.readBoolean()) {\n // aspect_ratio_info_present_flag\n let sarRatio;\n const aspectRatioIdc = decoder.readUByte();\n switch (aspectRatioIdc) {\n case 1: sarRatio = [1,1]; break;\n case 2: sarRatio = [12,11]; break;\n case 3: sarRatio = [10,11]; break;\n case 4: sarRatio = [16,11]; break;\n case 5: sarRatio = [40,33]; break;\n case 6: sarRatio = [24,11]; break;\n case 7: sarRatio = [20,11]; break;\n case 8: sarRatio = [32,11]; break;\n case 9: sarRatio = [80,33]; break;\n case 10: sarRatio = [18,11]; break;\n case 11: sarRatio = [15,11]; break;\n case 12: sarRatio = [64,33]; break;\n case 13: sarRatio = [160,99]; break;\n case 14: sarRatio = [4,3]; break;\n case 15: sarRatio = [3,2]; break;\n case 16: sarRatio = [2,1]; break;\n case 255: {\n sarRatio = [decoder.readUByte() << 8 | decoder.readUByte(), decoder.readUByte() << 8 | decoder.readUByte()];\n break;\n }\n }\n if (sarRatio) {\n sarScale = sarRatio[0] / sarRatio[1];\n }\n }\n if (decoder.readBoolean()) {decoder.skipBits(1);}\n\n if (decoder.readBoolean()) {\n decoder.skipBits(4);\n if (decoder.readBoolean()) {\n decoder.skipBits(24);\n }\n }\n if (decoder.readBoolean()) {\n decoder.skipUEG();\n decoder.skipUEG();\n }\n if (decoder.readBoolean()) {\n let unitsInTick = decoder.readUInt();\n let timeScale = decoder.readUInt();\n let fixedFrameRate = decoder.readBoolean();\n let frameDuration = timeScale/(2*unitsInTick);\n console.log(`timescale: ${timeScale}; unitsInTick: ${unitsInTick}; fixedFramerate: ${fixedFrameRate}; avgFrameDuration: ${frameDuration}`);\n }\n }\n return {\n width: Math.ceil((((picWidthInMbsMinus1 + 1) * 16) - frameCropLeftOffset * 2 - frameCropRightOffset * 2) * sarScale),\n height: ((2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16) - ((frameMbsOnlyFlag? 2 : 4) * (frameCropTopOffset + frameCropBottomOffset))\n };\n }\n\n static readSliceType(decoder) {\n // skip NALu type\n decoder.readUByte();\n // discard first_mb_in_slice\n decoder.readUEG();\n // return slice_type\n return decoder.readUEG();\n }\n}","import {getTagged} from '../../deps/bp_logger.js';\nimport {H264Parser} from '../parsers/h264.js';\nimport {BaseRemuxer} from './base.js';\n\nconst Log = getTagged(\"remuxer:h264\"); \n// TODO: asm.js\nexport class H264Remuxer extends BaseRemuxer {\n\n constructor(timescale, scaleFactor=1, params={}) {\n super(timescale, scaleFactor);\n\n this.nextDts = undefined;\n this.readyToDecode = false;\n this.initialized = false;\n\n this.firstDTS=0;\n this.firstPTS=0;\n this.lastDTS=undefined;\n this.lastSampleDuration = 0;\n this.lastDurations = [];\n // this.timescale = 90000;\n this.tsAlign = Math.round(this.timescale/60);\n\n this.mp4track={\n id:BaseRemuxer.getTrackID(),\n type: 'video',\n len:0,\n fragmented:true,\n sps:'',\n pps:'',\n width:0,\n height:0,\n timescale: timescale,\n duration: timescale,\n samples: []\n };\n this.samples = [];\n this.lastGopDTS = -99999999999999;\n this.gop=[];\n this.firstUnit = true;\n\n this.h264 = new H264Parser(this);\n\n if (params.sps) {\n this.setSPS(new Uint8Array(params.sps));\n }\n if (params.pps) {\n this.setPPS(new Uint8Array(params.pps));\n }\n\n if (this.mp4track.pps && this.mp4track.sps) {\n this.readyToDecode = true;\n }\n }\n\n _scaled(timestamp) {\n return timestamp >>> this.scaleFactor;\n }\n\n _unscaled(timestamp) {\n return timestamp << this.scaleFactor;\n }\n\n setSPS(sps) {\n this.h264.parseSPS(sps);\n }\n\n setPPS(pps) {\n this.h264.parsePPS(pps);\n }\n\n remux(nalu) {\n if (this.lastGopDTS < nalu.dts) {\n this.gop.sort(BaseRemuxer.dtsSortFunc);\n for (let unit of this.gop) {\n // if (this.firstUnit) {\n // unit.ntype = 5;//NALU.IDR;\n // this.firstUnit = false;\n // }\n if (super.remux.call(this, unit)) {\n this.mp4track.len += unit.getSize();\n }\n }\n this.gop = [];\n this.lastGopDTS = nalu.dts\n }\n if (this.h264.parseNAL(nalu)) {\n this.gop.push(nalu);\n }\n }\n\n getPayload() {\n if (!this.getPayloadBase()) {\n return null;\n }\n\n let payload = new Uint8Array(this.mp4track.len);\n let offset = 0;\n let samples=this.mp4track.samples;\n let mp4Sample, lastDTS, pts, dts;\n\n\n // Log.debug(this.samples.map((e)=>{\n // return Math.round((e.dts - this.initDTS));\n // }));\n\n // let minDuration = Number.MAX_SAFE_INTEGER;\n while (this.samples.length) {\n let sample = this.samples.shift();\n if (sample === null) {\n // discontinuity\n this.nextDts = undefined;\n break;\n }\n\n let unit = sample.unit;\n \n pts = sample.pts; // /*Math.round(*/(sample.pts - this.initDTS)/*/this.tsAlign)*this.tsAlign*/;\n dts = sample.dts; ///*Math.round(*/(sample.dts - this.initDTS)/*/this.tsAlign)*this.tsAlign*/;\n // ensure DTS is not bigger than PTS\n dts = Math.min(pts,dts);\n // if not first AVC sample of video track, normalize PTS/DTS with previous sample value\n // and ensure that sample duration is positive\n if (lastDTS !== undefined) {\n let sampleDuration = this.scaled(dts - lastDTS);\n // Log.debug(`Sample duration: ${sampleDuration}`);\n if (sampleDuration < 0) {\n Log.log(`invalid AVC sample duration at PTS/DTS: ${pts}/${dts}|lastDTS: ${lastDTS}:${sampleDuration}`);\n this.mp4track.len -= unit.getSize();\n continue;\n }\n // minDuration = Math.min(sampleDuration, minDuration);\n this.lastDurations.push(sampleDuration);\n if (this.lastDurations.length > 100) {\n this.lastDurations.shift();\n }\n mp4Sample.duration = sampleDuration;\n } else {\n if (this.nextDts) {\n let delta = dts - this.nextDts;\n // if fragment are contiguous, or delta less than 600ms, ensure there is no overlap/hole between fragments\n if (/*contiguous ||*/ Math.abs(Math.round(BaseRemuxer.toMS(delta))) < 600) {\n\n if (delta) {\n // set DTS to next DTS\n // Log.debug(`Video/PTS/DTS adjusted: ${pts}->${Math.max(pts - delta, this.nextDts)}/${dts}->${this.nextDts},delta:${delta}`);\n dts = this.nextDts;\n // offset PTS as well, ensure that PTS is smaller or equal than new DTS\n pts = Math.max(pts - delta, dts);\n }\n } else {\n if (delta < 0) {\n Log.log(`skip frame from the past at DTS=${dts} with expected DTS=${this.nextDts}`);\n this.mp4track.len -= unit.getSize();\n continue;\n }\n }\n }\n // remember first DTS of our avcSamples, ensure value is positive\n this.firstDTS = Math.max(0, dts);\n }\n\n mp4Sample = {\n size: unit.getSize(),\n duration: 0,\n cts: this.scaled(pts - dts),\n flags: {\n isLeading: 0,\n isDependedOn: 0,\n hasRedundancy: 0,\n degradPrio: 0\n }\n };\n let flags = mp4Sample.flags;\n if (sample.unit.isKeyframe() === true) {\n // the current sample is a key frame\n flags.dependsOn = 2;\n flags.isNonSync = 0;\n } else {\n flags.dependsOn = 1;\n flags.isNonSync = 1;\n }\n\n payload.set(unit.getData(), offset);\n offset += unit.getSize();\n\n samples.push(mp4Sample);\n lastDTS = dts;\n }\n\n if (!samples.length) return null;\n\n let avgDuration = this.lastDurations.reduce(function(a, b) { return (a|0) + (b|0); }, 0) / (this.lastDurations.length||1)|0;\n if (samples.length >= 2) {\n this.lastSampleDuration = avgDuration;\n mp4Sample.duration = avgDuration;\n } else {\n mp4Sample.duration = this.lastSampleDuration;\n }\n\n if(samples.length && (!this.nextDts || navigator.userAgent.toLowerCase().indexOf('chrome') > -1)) {\n let flags = samples[0].flags;\n // chrome workaround, mark first sample as being a Random Access Point to avoid sourcebuffer append issue\n // https://code.google.com/p/chromium/issues/detail?id=229412\n flags.dependsOn = 2;\n flags.isNonSync = 0;\n }\n\n // next AVC sample DTS should be equal to last sample DTS + last sample duration\n this.nextDts = dts + this.unscaled(this.lastSampleDuration);\n // Log.debug(`next dts: ${this.nextDts}, last duration: ${this.lastSampleDuration}, last dts: ${dts}`);\n\n return new Uint8Array(payload.buffer, 0, this.mp4track.len);\n }\n}\n","export class StreamType {\n static get VIDEO() {return 1;}\n static get AUDIO() {return 2;}\n\n static get map() {return {\n [StreamType.VIDEO]: 'video',\n [StreamType.AUDIO]: 'audio'\n }};\n}\n\nexport class PayloadType {\n static get H264() {return 1;}\n static get AAC() {return 2;}\n\n static get map() {return {\n [PayloadType.H264]: 'video',\n [PayloadType.AAC]: 'audio'\n }};\n\n static get string_map() {return {\n H264: PayloadType.H264,\n AAC: PayloadType.AAC,\n 'MP4A-LATM': PayloadType.AAC,\n 'MPEG4-GENERIC': PayloadType.AAC\n }}\n}","import {EventEmitter, EventSourceWrapper} from '../../deps/bp_event.js';\nimport {getTagged} from \"../../deps/bp_logger.js\";\nimport {MP4} from '../iso-bmff/mp4-generator.js';\nimport {AACRemuxer} from './aac.js';\nimport {H264Remuxer} from './h264.js';\nimport {MSE} from '../presentation/mse.js';\nimport {PayloadType} from \"../defs.js\";\n\nconst LOG_TAG = \"remuxer\";\nconst Log = getTagged(LOG_TAG);\n\nexport class Remuxer {\n static get TrackConverters() {return {\n [PayloadType.H264]: H264Remuxer,\n [PayloadType.AAC]: AACRemuxer\n }};\n\n static get TrackScaleFactor() {return {\n [PayloadType.H264]: 1,//4,\n [PayloadType.AAC]: 0\n }};\n\n static get TrackTimescale() {return {\n [PayloadType.H264]: 90000,//22500,\n [PayloadType.AAC]: 0\n }};\n\n constructor(mediaElement) {\n this.mse = new MSE([mediaElement]);\n this.eventSource = new EventEmitter();\n this.mseEventSource = new EventSourceWrapper(this.mse.eventSource);\n this.mse_ready = true;\n\n this.reset();\n\n this.errorListener = this.mseClose.bind(this);\n this.closeListener = this.mseClose.bind(this);\n\n this.eventSource.addEventListener('ready', this.init.bind(this));\n }\n\n initMSEHandlers() {\n this.mseEventSource.on('error', this.errorListener);\n this.mseEventSource.on('sourceclosed', this.closeListener);\n }\n\n async reset() {\n this.tracks = {};\n this.initialized = false;\n this.initSegments = {};\n this.codecs = [];\n this.streams = {};\n this.enabled = false;\n await this.mse.clear();\n this.initMSEHandlers();\n }\n\n destroy() {\n this.mseEventSource.destroy();\n this.mse.destroy();\n this.mse = null;\n\n this.detachClient();\n\n this.eventSource.destroy();\n }\n\n onTracks(tracks) {\n Log.debug(`ontracks: `, tracks.detail);\n // store available track types\n for (let track of tracks.detail) {\n this.tracks[track.type] = new Remuxer.TrackConverters[track.type](Remuxer.TrackTimescale[track.type], Remuxer.TrackScaleFactor[track.type], track.params);\n if (track.offset) {\n this.tracks[track.type].timeOffset = track.offset;\n }\n if (track.duration) {\n this.tracks[track.type].mp4track.duration = track.duration*(this.tracks[track.type].timescale || Remuxer.TrackTimescale[track.type]);\n this.tracks[track.type].duration = track.duration;\n } else {\n this.tracks[track.type].duration = 1;\n }\n\n // this.tracks[track.type].duration\n }\n this.mse.setLive(!this.client.seekable);\n }\n\n setTimeOffset(timeOffset, track) {\n if (this.tracks[track.type]) {\n this.tracks[track.type].timeOffset = timeOffset;///this.tracks[track.type].scaleFactor;\n }\n }\n\n init() {\n let tracks = [];\n this.codecs = [];\n let initmse = [];\n let initPts = Infinity;\n let initDts = Infinity;\n for (let track_type in this.tracks) {\n let track = this.tracks[track_type];\n if (!MSE.isSupported([track.mp4track.codec])) {\n throw new Error(`${track.mp4track.type} codec ${track.mp4track.codec} is not supported`);\n }\n tracks.push(track.mp4track);\n this.codecs.push(track.mp4track.codec);\n track.init(initPts, initDts/*, false*/);\n // initPts = Math.min(track.initPTS, initPts);\n // initDts = Math.min(track.initDTS, initDts);\n }\n\n for (let track_type in this.tracks) {\n let track = this.tracks[track_type];\n //track.init(initPts, initDts);\n this.initSegments[track_type] = MP4.initSegment([track.mp4track], track.duration*track.timescale, track.timescale);\n initmse.push(this.initMSE(track_type, track.mp4track.codec));\n }\n this.initialized = true;\n return Promise.all(initmse).then(()=>{\n //this.mse.play();\n this.enabled = true;\n });\n \n }\n\n initMSE(track_type, codec) {\n if (MSE.isSupported(this.codecs)) {\n return this.mse.setCodec(track_type, `${PayloadType.map[track_type]}/mp4; codecs=\"${codec}\"`).then(()=>{\n this.mse.feed(track_type, this.initSegments[track_type]);\n // this.mse.play();\n // this.enabled = true;\n });\n } else {\n throw new Error('Codecs are not supported');\n }\n }\n\n mseClose() {\n // this.mse.clear();\n this.client.stop();\n this.eventSource.dispatchEvent('stopped');\n }\n\n flush() {\n this.onSamples();\n\n if (!this.initialized) {\n Log.debug(`Initialize...`);\n if (Object.keys(this.tracks).length) {\n for (let track_type in this.tracks) {\n if (!this.tracks[track_type].readyToDecode || !this.tracks[track_type].samples.length) return;\n Log.debug(`Init MSE for track ${this.tracks[track_type].mp4track.type}`);\n }\n this.eventSource.dispatchEvent('ready');\n }\n } else {\n\n for (let track_type in this.tracks) {\n let track = this.tracks[track_type];\n let pay = track.getPayload();\n if (pay && pay.byteLength) {\n this.mse.feed(track_type, [MP4.moof(track.seq, track.scaled(track.firstDTS), track.mp4track), MP4.mdat(pay)]);\n track.flush();\n }\n }\n }\n }\n\n onSamples(ev) {\n // TODO: check format\n // let data = ev.detail;\n // if (this.tracks[data.pay] && this.client.sampleQueues[data.pay].length) {\n // console.log(`video ${data.units[0].dts}`);\n for (let qidx in this.client.sampleQueues) {\n let queue = this.client.sampleQueues[qidx];\n while (queue.length) {\n let units = queue.shift();\n for (let chunk of units) {\n this.tracks[qidx].remux(chunk);\n }\n }\n }\n // }\n }\n\n onAudioConfig(ev) {\n if (this.tracks[ev.detail.pay]) {\n this.tracks[ev.detail.pay].setConfig(ev.detail.config);\n }\n }\n\n attachClient(client) {\n this.detachClient();\n this.client = client;\n this.clientEventSource = new EventSourceWrapper(this.client.eventSource);\n this.clientEventSource.on('samples', this.samplesListener);\n this.clientEventSource.on('audio_config', this.audioConfigListener);\n this.clientEventSource.on('tracks', this.onTracks.bind(this));\n this.clientEventSource.on('flush', this.flush.bind(this));\n this.clientEventSource.on('clear', ()=>{\n this.reset();\n this.mse.clear().then(()=>{\n //this.mse.play();\n this.initMSEHandlers();\n });\n });\n }\n\n detachClient() {\n if (this.client) {\n this.clientEventSource.destroy();\n // this.client.eventSource.removeEventListener('samples', this.onSamples.bind(this));\n // this.client.eventSource.removeEventListener('audio_config', this.onAudioConfig.bind(this));\n // // TODO: clear other listeners\n // this.client.eventSource.removeEventListener('clear', this._clearListener);\n // this.client.eventSource.removeEventListener('tracks', this._tracksListener);\n // this.client.eventSource.removeEventListener('flush', this._flushListener);\n this.client = null;\n }\n }\n}","class State {\n constructor(name, stateMachine) {\n this.stateMachine = stateMachine;\n this.transitions = new Set();\n this.name = name;\n }\n\n\n activate() {\n return Promise.resolve(null);\n }\n\n finishTransition() {}\n\n failHandler() {}\n\n deactivate() {\n return Promise.resolve(null);\n }\n}\n\nexport class StateMachine {\n constructor() {\n this.storage = {};\n this.currentState = null;\n this.states = new Map();\n }\n\n addState(name, {activate, finishTransition, deactivate}) {\n let state = new State(name, this);\n if (activate) state.activate = activate;\n if (finishTransition) state.finishTransition = finishTransition;\n if (deactivate) state.deactivate = deactivate;\n this.states.set(name, state);\n return this;\n }\n\n addTransition(fromName, toName){\n if (!this.states.has(fromName)) {\n throw ReferenceError(`No such state: ${fromName} while connecting to ${toName}`);\n }\n if (!this.states.has(toName)) {\n throw ReferenceError(`No such state: ${toName} while connecting from ${fromName}`);\n }\n this.states.get(fromName).transitions.add(toName);\n return this;\n }\n\n _promisify(res) {\n let promise;\n try {\n promise = res;\n if (!promise.then) {\n promise = Promise.resolve(promise);\n }\n } catch (e) {\n promise = Promise.reject(e);\n }\n return promise;\n }\n\n transitionTo(stateName) {\n if (this.currentState == null) {\n let state = this.states.get(stateName);\n return this._promisify(state.activate.call(this))\n .then((data)=> {\n this.currentState = state;\n return data;\n }).then(state.finishTransition.bind(this)).catch((e)=>{\n state.failHandler();\n throw e;\n });\n }\n if (this.currentState.name == stateName) return Promise.resolve();\n if (this.currentState.transitions.has(stateName)) {\n let state = this.states.get(stateName);\n return this._promisify(state.deactivate.call(this))\n .then(state.activate.bind(this)).then((data)=> {\n this.currentState = state;\n return data;\n }).then(state.finishTransition.bind(this)).catch((e)=>{\n state.failHandler();\n throw e;\n });\n } else {\n return Promise.reject(`No such transition: ${this.currentState.name} to ${stateName}`);\n }\n }\n\n}\n","// export * from 'bp_statemachine';\nexport * from '../../node_modules/bp_statemachine/statemachine.js';","import {getTagged} from '../../deps/bp_logger';\nimport {PayloadType} from '../defs.js';\n\nconst Log = getTagged(\"parser:sdp\");\n\nexport class SDPParser {\n constructor() {\n this.version = -1;\n this.origin = null;\n this.sessionName = null;\n this.timing = null;\n this.sessionBlock = {};\n this.media = {};\n this.tracks = {};\n this.mediaMap = {};\n }\n\n parse(content) {\n Log.debug(content);\n return new Promise((resolve, reject) => {\n var dataString = content;\n var success = true;\n var currentMediaBlock = this.sessionBlock;\n\n // TODO: multiple audio/video tracks\n\n for (let line of dataString.split(\"\\n\")) {\n line = line.replace(/\\r/, '');\n if (0 === line.length) {\n /* Empty row (last row perhaps?), skip to next */\n continue;\n }\n\n switch (line.charAt(0)) {\n case 'v':\n if (-1 !== this.version) {\n Log.log('Version present multiple times in SDP');\n reject();\n return false;\n }\n success = success && this._parseVersion(line);\n break;\n\n case 'o':\n if (null !== this.origin) {\n Log.log('Origin present multiple times in SDP');\n reject();\n return false;\n }\n success = success && this._parseOrigin(line);\n break;\n\n case 's':\n if (null !== this.sessionName) {\n Log.log('Session Name present multiple times in SDP');\n reject();\n return false;\n }\n success = success && this._parseSessionName(line);\n break;\n\n case 't':\n if (null !== this.timing) {\n Log.log('Timing present multiple times in SDP');\n reject();\n return false;\n }\n success = success && this._parseTiming(line);\n break;\n\n case 'm':\n if (null !== currentMediaBlock && this.sessionBlock !== currentMediaBlock) {\n /* Complete previous block and store it */\n this.media[currentMediaBlock.type] = currentMediaBlock;\n }\n\n /* A wild media block appears */\n currentMediaBlock = {};\n currentMediaBlock.rtpmap = {};\n this._parseMediaDescription(line, currentMediaBlock);\n break;\n\n case 'a':\n SDPParser._parseAttribute(line, currentMediaBlock);\n break;\n\n default:\n Log.log('Ignored unknown SDP directive: ' + line);\n break;\n }\n\n if (!success) {\n reject();\n return;\n }\n }\n\n this.media[currentMediaBlock.type] = currentMediaBlock;\n\n success ? resolve() : reject();\n });\n }\n\n _parseVersion(line) {\n let matches = line.match(/^v=([0-9]+)$/);\n if (!matches || !matches.length) {\n Log.log('\\'v=\\' (Version) formatted incorrectly: ' + line);\n return false;\n }\n\n this.version = matches[1];\n if (0 != this.version) {\n Log.log('Unsupported SDP version:' + this.version);\n return false;\n }\n\n return true;\n }\n\n _parseOrigin(line) {\n let matches = line.match(/^o=([^ ]+) (-?[0-9]+) (-?[0-9]+) (IN) (IP4|IP6) ([^ ]+)$/);\n if (!matches || !matches.length) {\n Log.log('\\'o=\\' (Origin) formatted incorrectly: ' + line);\n return false;\n }\n\n this.origin = {};\n this.origin.username = matches[1];\n this.origin.sessionid = matches[2];\n this.origin.sessionversion = matches[3];\n this.origin.nettype = matches[4];\n this.origin.addresstype = matches[5];\n this.origin.unicastaddress = matches[6];\n\n return true;\n }\n\n _parseSessionName(line) {\n let matches = line.match(/^s=([^\\r\\n]+)$/);\n if (!matches || !matches.length) {\n Log.log('\\'s=\\' (Session Name) formatted incorrectly: ' + line);\n return false;\n }\n\n this.sessionName = matches[1];\n\n return true;\n }\n\n _parseTiming(line) {\n let matches = line.match(/^t=([0-9]+) ([0-9]+)$/);\n if (!matches || !matches.length) {\n Log.log('\\'t=\\' (Timing) formatted incorrectly: ' + line);\n return false;\n }\n\n this.timing = {};\n this.timing.start = matches[1];\n this.timing.stop = matches[2];\n\n return true;\n }\n\n _parseMediaDescription(line, media) {\n let matches = line.match(/^m=([^ ]+) ([^ ]+) ([^ ]+)[ ]/);\n if (!matches || !matches.length) {\n Log.log('\\'m=\\' (Media) formatted incorrectly: ' + line);\n return false;\n }\n\n media.type = matches[1];\n media.port = matches[2];\n media.proto = matches[3];\n media.fmt = line.substr(matches[0].length).split(' ').map(function (fmt, index, array) {\n return parseInt(fmt);\n });\n\n for (let fmt of media.fmt) {\n this.mediaMap[fmt] = media;\n }\n\n return true;\n }\n\n static _parseAttribute(line, media) {\n if (null === media) {\n /* Not in a media block, can't be bothered parsing attributes for session */\n return true;\n }\n\n var matches;\n /* Used for some cases of below switch-case */\n var separator = line.indexOf(':');\n var attribute = line.substr(0, (-1 === separator) ? 0x7FFFFFFF : separator);\n /* 0x7FF.. is default */\n\n switch (attribute) {\n case 'a=recvonly':\n case 'a=sendrecv':\n case 'a=sendonly':\n case 'a=inactive':\n media.mode = line.substr('a='.length);\n break;\n case 'a=range':\n matches = line.match(/^a=range:\\s*([a-zA-Z-]+)=([0-9.]+|now)\\s*-\\s*([0-9.]*)$/);\n media.range = [Number(matches[2] == \"now\" ? -1 : matches[2]), Number(matches[3]), matches[1]];\n break;\n case 'a=control':\n media.control = line.substr('a=control:'.length);\n break;\n\n case 'a=rtpmap':\n matches = line.match(/^a=rtpmap:(\\d+) (.*)$/);\n if (null === matches) {\n Log.log('Could not parse \\'rtpmap\\' of \\'a=\\'');\n return false;\n }\n\n var payload = parseInt(matches[1]);\n media.rtpmap[payload] = {};\n\n var attrs = matches[2].split('/');\n media.rtpmap[payload].name = attrs[0].toUpperCase();\n media.rtpmap[payload].clock = attrs[1];\n if (undefined !== attrs[2]) {\n media.rtpmap[payload].encparams = attrs[2];\n }\n media.ptype = PayloadType.string_map[attrs[0].toUpperCase()];\n\n break;\n\n case 'a=fmtp':\n matches = line.match(/^a=fmtp:(\\d+) (.*)$/);\n if (0 === matches.length) {\n Log.log('Could not parse \\'fmtp\\' of \\'a=\\'');\n return false;\n }\n\n media.fmtp = {};\n for (var param of matches[2].split(';')) {\n var idx = param.indexOf('=');\n media.fmtp[param.substr(0, idx).toLowerCase().trim()] = param.substr(idx + 1).trim();\n }\n break;\n }\n\n return true;\n }\n\n getSessionBlock() {\n return this.sessionBlock;\n }\n\n hasMedia(mediaType) {\n return this.media[mediaType] != undefined;\n }\n\n getMediaBlock(mediaType) {\n return this.media[mediaType];\n }\n\n getMediaBlockByPayloadType(pt) {\n // for (var m in this.media) {\n // if (-1 !== this.media[m].fmt.indexOf(pt)) {\n // return this.media[m];\n // }\n // }\n return this.mediaMap[pt] || null;\n\n //ErrorManager.dispatchError(826, [pt], true);\n // Log.error(`failed to find media with payload type ${pt}`);\n //\n // return null;\n }\n\n getMediaBlockList() {\n var res = [];\n for (var m in this.media) {\n res.push(m);\n }\n\n return res;\n }\n}","import {getTagged} from '../../deps/bp_logger.js';\n\nimport {RTSPClientSM as RTSPClient} from './client.js';\nimport {Url} from '../../core/util/url.js';\nimport {RTSPError} from \"./client\";\n\nconst LOG_TAG = \"rtsp:stream\";\nconst Log = getTagged(LOG_TAG);\n\nexport class RTSPStream {\n\n constructor(client, track) {\n this.state = null;\n this.client = client;\n this.track = track;\n this.rtpChannel = 1;\n\n this.stopKeepAlive();\n this.keepaliveInterval = null;\n }\n\n reset() {\n this.stopKeepAlive();\n this.client.forgetRTPChannel(this.rtpChannel);\n this.client = null;\n this.track = null;\n }\n\n start() {\n return this.sendSetup().then(this.sendPlay.bind(this));\n }\n\n stop() {\n return this.sendTeardown();\n }\n\n getSetupURL(track) {\n let sessionBlock = this.client.sdp.getSessionBlock();\n if (Url.isAbsolute(track.control)) {\n return track.control;\n } else if (Url.isAbsolute(`${sessionBlock.control}${track.control}`)) {\n return `${sessionBlock.control}${track.control}`;\n } else if (Url.isAbsolute(`${this.client.contentBase}${track.control}`)) {\n /* Should probably check session level control before this */\n return `${this.client.contentBase}${track.control}`;\n }\n else {//need return default\n return track.control;\n }\n Log.error('Can\\'t determine track URL from ' +\n 'block.control:' + track.control + ', ' +\n 'session.control:' + sessionBlock.control + ', and ' +\n 'content-base:' + this.client.contentBase);\n }\n\n getControlURL() {\n let ctrl = this.client.sdp.getSessionBlock().control;\n if (Url.isAbsolute(ctrl)) {\n return ctrl;\n } else if (!ctrl || '*' === ctrl) {\n return this.client.contentBase;\n } else {\n return `${this.client.contentBase}${ctrl}`;\n }\n }\n\n sendKeepalive() {\n if (this.client.methods.includes('GET_PARAMETER')) {\n return this.client.sendRequest('GET_PARAMETER', this.getSetupURL(this.track), {\n 'Session': this.session\n });\n } else {\n return this.client.sendRequest('OPTIONS', '*');\n }\n }\n\n stopKeepAlive() {\n clearInterval(this.keepaliveInterval);\n }\n\n startKeepAlive() {\n this.keepaliveInterval = setInterval(() => {\n this.sendKeepalive().catch((e) => {\n Log.error(e);\n if (e instanceof RTSPError) {\n if (Number(e.data.parsed.code) == 501) {\n return;\n }\n }\n this.client.reconnect();\n });\n }, 30000);\n }\n\n sendRequest(_cmd, _params = {}) {\n let params = {};\n if (this.session) {\n params['Session'] = this.session;\n }\n Object.assign(params, _params);\n return this.client.sendRequest(_cmd, this.getControlURL(), params);\n }\n\n sendSetup() {\n this.state = RTSPClient.STATE_SETUP;\n this.rtpChannel = this.client.interleaveChannelIndex;\n let interleavedChannels = this.client.interleaveChannelIndex++ + \"-\" + this.client.interleaveChannelIndex++;\n return this.client.sendRequest('SETUP', this.getSetupURL(this.track), {\n 'Transport': `RTP/AVP/TCP;unicast;interleaved=${interleavedChannels}`,\n 'Date': new Date().toUTCString()\n }).then((_data) => {\n this.session = _data.headers['session'];\n let transport = _data.headers['transport'];\n if (transport) {\n let interleaved = transport.match(/interleaved=([0-9]+)-([0-9]+)/)[1];\n if (interleaved) {\n this.rtpChannel = Number(interleaved);\n }\n }\n /*if (!/RTP\\/AVP\\/TCP;unicast;interleaved=/.test(_data.headers[\"transport\"])) {\n // TODO: disconnect stream and notify client\n throw new Error(\"Connection broken\");\n }*/\n this.startKeepAlive();\n });\n }\n\n async sendPlay(pos = 0) {\n this.state = RTSPStream.STATE_PLAY;\n let params = {};\n let range = this.client.sdp.sessionBlock.range;\n if (range) {\n // TODO: seekable\n if (range[0] == -1) {\n range[0] = 0;// Do not handle now at the moment\n }\n // params['Range'] = `${range[2]}=${range[0]}-`;\n }\n this.client.useRTPChannel(this.rtpChannel);\n let data = await this.sendRequest('PLAY', params);\n this.state = RTSPClient.STATE_PLAYING;\n return {track: this.track, data: data};\n }\n\n async sendPause() {\n if (!this.client.supports(\"PAUSE\")) {\n return;\n }\n this.state = RTSPClient.STATE_PAUSE;\n await this.sendRequest(\"PAUSE\");\n this.state = RTSPClient.STATE_PAUSED;\n }\n\n async sendTeardown() {\n if (this.state != RTSPClient.STATE_TEARDOWN) {\n this.client.forgetRTPChannel(this.rtpChannel);\n this.state = RTSPClient.STATE_TEARDOWN;\n this.stopKeepAlive();\n await this.sendRequest(\"TEARDOWN\");\n Log.log('RTSPClient: STATE_TEARDOWN');\n ///this.client.connection.disconnect();\n // TODO: Notify client\n }\n }\n}\n","/*\n * JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\n\n\n/*\n* Add integers, wrapping at 2^32. This uses 16-bit operations internally\n* to work around bugs in some JS interpreters.\n*/\nfunction safeAdd(x, y) {\n var lsw = (x & 0xFFFF) + (y & 0xFFFF)\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16)\n return (msw << 16) | (lsw & 0xFFFF)\n}\n\n/*\n* Bitwise rotate a 32-bit number to the left.\n*/\nfunction bitRotateLeft(num, cnt) {\n return (num << cnt) | (num >>> (32 - cnt))\n}\n\n/*\n* These functions implement the four basic operations the algorithm uses.\n*/\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b)\n}\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn((b & c) | ((~b) & d), a, b, x, s, t)\n}\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn((b & d) | (c & (~d)), a, b, x, s, t)\n}\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t)\n}\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | (~d)), a, b, x, s, t)\n}\n\n/*\n* Calculate the MD5 of an array of little-endian words, and a bit length.\n*/\nfunction binlMD5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << (len % 32)\n x[(((len + 64) >>> 9) << 4) + 14] = len\n\n var i\n var olda\n var oldb\n var oldc\n var oldd\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (i = 0; i < x.length; i += 16) {\n olda = a\n oldb = b\n oldc = c\n oldd = d\n\n a = md5ff(a, b, c, d, x[i], 7, -680876936)\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5gg(b, c, d, a, x[i], 20, -373897302)\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5hh(d, a, b, c, x[i], 11, -358537222)\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5ii(a, b, c, d, x[i], 6, -198630844)\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safeAdd(a, olda)\n b = safeAdd(b, oldb)\n c = safeAdd(c, oldc)\n d = safeAdd(d, oldd)\n }\n return [a, b, c, d]\n}\n\n/*\n* Convert an array of little-endian words to a string\n*/\nfunction binl2rstr(input) {\n var i\n var output = ''\n var length32 = input.length * 32\n for (i = 0; i < length32; i += 8) {\n output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xFF)\n }\n return output\n}\n\n/*\n* Convert a raw string to an array of little-endian words\n* Characters >255 have their high-byte silently ignored.\n*/\nfunction rstr2binl(input) {\n var i\n var output = []\n output[(input.length >> 2) - 1] = undefined\n for (i = 0; i < output.length; i += 1) {\n output[i] = 0\n }\n var length8 = input.length * 8\n for (i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input.charCodeAt(i / 8) & 0xFF) << (i % 32)\n }\n return output\n}\n\n/*\n* Calculate the MD5 of a raw string\n*/\nfunction rstrMD5(s) {\n return binl2rstr(binlMD5(rstr2binl(s), s.length * 8))\n}\n\n/*\n* Calculate the HMAC-MD5, of a key and some data (raw strings)\n*/\nfunction rstrHMACMD5(key, data) {\n var i\n var bkey = rstr2binl(key)\n var ipad = []\n var opad = []\n var hash\n ipad[15] = opad[15] = undefined\n if (bkey.length > 16) {\n bkey = binlMD5(bkey, key.length * 8)\n }\n for (i = 0; i < 16; i += 1) {\n ipad[i] = bkey[i] ^ 0x36363636\n opad[i] = bkey[i] ^ 0x5C5C5C5C\n }\n hash = binlMD5(ipad.concat(rstr2binl(data)), 512 + data.length * 8)\n return binl2rstr(binlMD5(opad.concat(hash), 512 + 128))\n}\n\n/*\n* Convert a raw string to a hex string\n*/\nfunction rstr2hex(input) {\n var hexTab = '0123456789abcdef'\n var output = ''\n var x\n var i\n for (i = 0; i < input.length; i += 1) {\n x = input.charCodeAt(i)\n output += hexTab.charAt((x >>> 4) & 0x0F) +\n hexTab.charAt(x & 0x0F)\n }\n return output\n}\n\n/*\n* Encode a string as utf-8\n*/\nfunction str2rstrUTF8(input) {\n return unescape(encodeURIComponent(input))\n}\n\n/*\n* Take string arguments and return either raw or hex encoded strings\n*/\nfunction rawMD5(s) {\n return rstrMD5(str2rstrUTF8(s))\n}\nfunction hexMD5(s) {\n return rstr2hex(rawMD5(s))\n}\nfunction rawHMACMD5(k, d) {\n return rstrHMACMD5(str2rstrUTF8(k), str2rstrUTF8(d))\n}\nfunction hexHMACMD5(k, d) {\n return rstr2hex(rawHMACMD5(k, d))\n}\n\nexport default function md5(string, key, raw) {\n if (!key) {\n if (!raw) {\n return hexMD5(string)\n }\n return rawMD5(string)\n }\n if (!raw) {\n return hexHMACMD5(key, string)\n }\n return rawHMACMD5(key, string)\n}\n","// TODO: asm.js\nimport {Log} from '../../../deps/bp_logger.js';\nexport default class RTP {\n constructor(pkt/*uint8array*/, sdp) {\n let bytes = new DataView(pkt.buffer, pkt.byteOffset, pkt.byteLength);\n\n this.version = bytes.getUint8(0) >>> 6;\n this.padding = bytes.getUint8(0) & 0x20 >>> 5;\n this.has_extension = bytes.getUint8(0) & 0x10 >>> 4;\n this.csrc = bytes.getUint8(0) & 0x0F;\n this.marker = bytes.getUint8(1) >>> 7;\n this.pt = bytes.getUint8(1) & 0x7F;\n this.sequence = bytes.getUint16(2) ;\n this.timestamp = bytes.getUint32(4);\n this.ssrc = bytes.getUint32(8);\n this.csrcs = [];\n\n let pktIndex=12;\n if (this.csrc>0) {\n this.csrcs.push(bytes.getUint32(pktIndex));\n pktIndex+=4;\n }\n if (this.has_extension==1) {\n this.extension = bytes.getUint16(pktIndex);\n this.ehl = bytes.getUint16(pktIndex+2);\n pktIndex+=4;\n this.header_data = pkt.slice(pktIndex, this.ehl);\n pktIndex += this.ehl;\n }\n\n this.headerLength = pktIndex;\n let padLength = 0;\n if (this.padding) {\n padLength = bytes.getUint8(pkt.byteLength-1);\n }\n\n // this.bodyLength = pkt.byteLength-this.headerLength-padLength;\n\n this.media = sdp.getMediaBlockByPayloadType(this.pt);\n if (null === this.media) {\n Log.log(`Media description for payload type: ${this.pt} not provided.`);\n } else {\n this.type = this.media.ptype;//PayloadType.string_map[this.media.rtpmap[this.media.fmt[0]].name];\n }\n\n this.data = pkt.subarray(pktIndex);\n // this.timestamp = 1000 * (this.timestamp / this.media.rtpmap[this.pt].clock);\n // console.log(this);\n }\n getPayload() {\n return this.data;\n }\n\n getTimestampMS() {\n return this.timestamp; //1000 * (this.timestamp / this.media.rtpmap[this.pt].clock);\n }\n\n toString() {\n return \"RTP(\" +\n \"version:\" + this.version + \", \" +\n \"padding:\" + this.padding + \", \" +\n \"has_extension:\" + this.has_extension + \", \" +\n \"csrc:\" + this.csrc + \", \" +\n \"marker:\" + this.marker + \", \" +\n \"pt:\" + this.pt + \", \" +\n \"sequence:\" + this.sequence + \", \" +\n \"timestamp:\" + this.timestamp + \", \" +\n \"ssrc:\" + this.ssrc + \")\";\n }\n\n isVideo(){return this.media.type == 'video';}\n isAudio(){return this.media.type == 'audio';}\n\n \n}","import RTP from './rtp.js';\n\nexport default class RTPFactory {\n constructor(sdp) {\n this.tsOffsets={};\n for (let pay in sdp.media) {\n for (let pt of sdp.media[pay].fmt) {\n this.tsOffsets[pt] = {last: 0, overflow: 0};\n }\n }\n }\n\n build(pkt/*uint8array*/, sdp) {\n let rtp = new RTP(pkt, sdp);\n\n let tsOffset = this.tsOffsets[rtp.pt];\n if (tsOffset) {\n rtp.timestamp += tsOffset.overflow;\n if (tsOffset.last && Math.abs(rtp.timestamp - tsOffset.last) > 0x7fffffff) {\n console.log(`\\nlast ts: ${tsOffset.last}\\n\n new ts: ${rtp.timestamp}\\n\n new ts adjusted: ${rtp.timestamp+0xffffffff}\\n\n last overflow: ${tsOffset.overflow}\\n\n new overflow: ${tsOffset.overflow+0xffffffff}\\n\n `);\n tsOffset.overflow += 0xffffffff;\n rtp.timestamp += 0xffffffff;\n }\n /*if (rtp.timestamp>0xffffffff) {\n console.log(`ts: ${rtp.timestamp}, seq: ${rtp.sequence}`);\n }*/\n tsOffset.last = rtp.timestamp;\n }\n\n return rtp;\n }\n}","export class RTSPMessage {\n static get RTSP_1_0() {return \"RTSP/1.0\";}\n\n constructor(_rtsp_version) {\n this.version = _rtsp_version;\n }\n\n build(_cmd, _host, _params={}, _payload=null) {\n let requestString = `${_cmd} ${_host} ${this.version}\\r\\n`;\n for (let param in _params) {\n requestString+=`${param}: ${_params[param]}\\r\\n`\n }\n // TODO: binary payload\n if (_payload) {\n requestString+=`Content-Length: ${_payload.length}\\r\\n`\n }\n requestString+='\\r\\n';\n if (_payload) {\n requestString+=_payload;\n }\n return requestString;\n }\n\n parse(_data) {\n let lines = _data.split('\\r\\n');\n let parsed = {\n headers:{},\n body:null,\n code: 0,\n statusLine: ''\n };\n\n let match;\n [match, parsed.code, parsed.statusLine] = lines[0].match(new RegExp(`${this.version}[ ]+([0-9]{3})[ ]+(.*)`));\n parsed.code = Number(parsed.code);\n let lineIdx = 1;\n\n while (lines[lineIdx]) {\n let [k,v] = lines[lineIdx].split(/:(.+)/);\n parsed.headers[k.toLowerCase()] = v.trim();\n lineIdx++;\n }\n\n parsed.body = lines.slice(lineIdx).join('\\n\\r');\n\n return parsed;\n }\n\n}\n\nexport const MessageBuilder = new RTSPMessage(RTSPMessage.RTSP_1_0);","import {Log} from '../../deps/bp_logger.js';\nimport {NALU} from './NALU.js';\n\n// TODO: asm.js\nexport class NALUAsm {\n\n constructor() {\n this.fragmented_nalu = null;\n }\n\n\n static parseNALHeader(hdr) {\n return {\n nri: hdr & 0x60,\n type: hdr & 0x1F\n }\n }\n\n parseSingleNALUPacket(rawData, header, dts, pts) {\n return new NALU(header.type, header.nri, rawData.subarray(0), dts, pts);\n }\n\n parseAggregationPacket(rawData, header, dts, pts) {\n let data = new DataView(rawData.buffer, rawData.byteOffset, rawData.byteLength);\n let nal_start_idx = 0;\n let don = null;\n if (NALU.STAP_B === header.type) {\n don = data.getUint16(nal_start_idx);\n nal_start_idx += 2;\n }\n let ret = [];\n while (nal_start_idx < data.byteLength) {\n let size = data.getUint16(nal_start_idx);\n nal_start_idx += 2;\n let header = NALUAsm.parseNALHeader(data.getInt8(nal_start_idx));\n nal_start_idx++;\n let nalu = this.parseSingleNALUPacket(rawData.subarray(nal_start_idx, nal_start_idx+size), header, dts, pts);\n if (nalu !== null) {\n ret.push(nalu);\n }\n nal_start_idx+=size;\n }\n return ret;\n }\n\n parseFragmentationUnit(rawData, header, dts, pts) {\n let data = new DataView(rawData.buffer, rawData.byteOffset, rawData.byteLength);\n let nal_start_idx = 0;\n let fu_header = data.getUint8(nal_start_idx);\n let is_start = (fu_header & 0x80) >>> 7;\n let is_end = (fu_header & 0x40) >>> 6;\n let payload_type = fu_header & 0x1F;\n let ret = null;\n\n nal_start_idx++;\n let don = 0;\n if (NALU.FU_B === header.type) {\n don = data.getUint16(nal_start_idx);\n nal_start_idx += 2;\n }\n\n if (is_start) {\n this.fragmented_nalu = new NALU(payload_type, header.nri, rawData.subarray(nal_start_idx), dts, pts);\n } else {\n if (this.fragmented_nalu && this.fragmented_nalu.ntype === payload_type) {\n this.fragmented_nalu.appendData(rawData.subarray(nal_start_idx));\n\n if (is_end) {\n ret = this.fragmented_nalu;\n this.fragmented_nalu = null;\n return ret;\n }\n }\n }\n return null;\n }\n\n onNALUFragment(rawData, dts, pts) {\n\n let data = new DataView(rawData.buffer, rawData.byteOffset, rawData.byteLength);\n\n let header = NALUAsm.parseNALHeader(data.getUint8(0));\n\n let nal_start_idx = 1;\n\n let unit = null;\n if (header.type > 0 && header.type < 24) {\n unit = this.parseSingleNALUPacket(rawData.subarray(nal_start_idx), header, dts, pts);\n } else if (NALU.FU_A === header.type || NALU.FU_B === header.type) {\n unit = this.parseFragmentationUnit(rawData.subarray(nal_start_idx), header, dts, pts);\n } else if (NALU.STAP_A === header.type || NALU.STAP_B === header.type) {\n return this.parseAggregationPacket(rawData.subarray(nal_start_idx), header, dts, pts);\n } else {\n /* 30 - 31 is undefined, ignore those (RFC3984). */\n Log.log('Undefined NAL unit, type: ' + header.type);\n return null;\n }\n if (unit) {\n return [unit];\n }\n return null;\n }\n}\n","export class AACFrame {\n\n constructor(data, dts, pts) {\n this.dts = dts;\n this.pts = pts ? pts : this.dts;\n\n this.data=data;//.subarray(offset);\n }\n\n getData() {\n return this.data;\n }\n\n getSize() {\n return this.data.byteLength;\n }\n}","import {AACFrame} from './AACFrame.js';\nimport {BitArray} from '../util/binary';\n// import {AACParser} from \"../parsers/aac.js\";\n// TODO: asm.js\nexport class AACAsm {\n constructor() {\n this.config = null;\n }\n\n onAACFragment(pkt) {\n let rawData = pkt.getPayload();\n if (!pkt.media) {\n return null;\n }\n let data = new DataView(rawData.buffer, rawData.byteOffset, rawData.byteLength);\n\n let sizeLength = Number(pkt.media.fmtp['sizelength'] || 0);\n let indexLength = Number(pkt.media.fmtp['indexlength'] || 0);\n let indexDeltaLength = Number(pkt.media.fmtp['indexdeltalength'] || 0);\n let CTSDeltaLength = Number(pkt.media.fmtp['ctsdeltalength'] || 0);\n let DTSDeltaLength = Number(pkt.media.fmtp['dtsdeltalength'] || 0);\n let RandomAccessIndication = Number(pkt.media.fmtp['randomaccessindication'] || 0);\n let StreamStateIndication = Number(pkt.media.fmtp['streamstateindication'] || 0);\n let AuxiliaryDataSizeLength = Number(pkt.media.fmtp['auxiliarydatasizelength'] || 0);\n\n let configHeaderLength =\n sizeLength + Math.max(indexLength, indexDeltaLength) + CTSDeltaLength + DTSDeltaLength +\n RandomAccessIndication + StreamStateIndication + AuxiliaryDataSizeLength;\n\n\n let auHeadersLengthPadded = 0;\n let offset = 0;\n let ts = (Math.round(pkt.getTimestampMS()/1024) << 10) * 90000 / this.config.samplerate;\n if (0 !== configHeaderLength) {\n /* The AU header section is not empty, read it from payload */\n let auHeadersLengthInBits = data.getUint16(0); // Always 2 octets, without padding\n auHeadersLengthPadded = 2 + (auHeadersLengthInBits>>>3) + ((auHeadersLengthInBits & 0x7)?1:0); // Add padding\n\n //this.config = AACParser.parseAudioSpecificConfig(new Uint8Array(rawData, 0 , auHeadersLengthPadded));\n // TODO: parse config\n let frames = [];\n let frameOffset=0;\n let bits = new BitArray(rawData.subarray(2 + offset));\n let cts = 0;\n let dts = 0;\n for (let offset=0; offset<auHeadersLengthInBits;) {\n let size = bits.readBits(sizeLength);\n let idx = bits.readBits(offset?indexDeltaLength:indexLength);\n offset+=sizeLength+(offset?indexDeltaLength:indexLength)/*+2*/;\n if (/*ctsPresent &&*/ CTSDeltaLength) {\n let ctsPresent = bits.readBits(1);\n cts = bits.readBits(CTSDeltaLength);\n offset+=CTSDeltaLength;\n }\n if (/*dtsPresent && */DTSDeltaLength) {\n let dtsPresent = bits.readBits(1);\n dts = bits.readBits(DTSDeltaLength);\n offset+=CTSDeltaLength;\n }\n if (RandomAccessIndication) {\n bits.skipBits(1);\n offset+=1;\n }\n if (StreamStateIndication) {\n bits.skipBits(StreamStateIndication);\n offset+=StreamStateIndication;\n }\n frames.push(new AACFrame(rawData.subarray(auHeadersLengthPadded + frameOffset, auHeadersLengthPadded + frameOffset + size), ts+dts, ts+cts));\n frameOffset+=size;\n }\n return frames;\n } else {\n let aacData = rawData.subarray(auHeadersLengthPadded);\n while (true) {\n if (aacData[offset] !=255) break;\n ++offset;\n }\n ++offset;\n return [new AACFrame(rawData.subarray(auHeadersLengthPadded+offset), ts)];\n }\n }\n}","import {NALUAsm} from \"../../../../core/elementary/NALUAsm.js\";\nimport {AACAsm} from \"../../../../core/elementary/AACAsm.js\";\n\nexport class RTPPayloadParser {\n\n constructor() {\n this.h264parser = new RTPH264Parser();\n this.aacparser = new RTPAACParser();\n }\n\n parse(rtp) {\n if (rtp.media.type=='video') {\n return this.h264parser.parse(rtp);\n } else if (rtp.media.type == 'audio') {\n return this.aacparser.parse(rtp);\n }\n return null;\n }\n}\n\nclass RTPH264Parser {\n constructor() {\n this.naluasm = new NALUAsm();\n }\n\n parse(rtp) {\n return this.naluasm.onNALUFragment(rtp.getPayload(), rtp.getTimestampMS());\n }\n}\n\nclass RTPAACParser {\n\n constructor() {\n this.scale = 1;\n this.asm = new AACAsm();\n }\n\n setConfig(conf) {\n this.asm.config = conf;\n }\n\n parse(rtp) {\n return this.asm.onAACFragment(rtp);\n }\n}","import {Log} from '../deps/bp_logger.js';\nimport {EventEmitter} from '../deps/bp_event.js';\n\nexport class BaseClient {\n constructor(options={flush: 100}) {\n this.options = options;\n this.eventSource = new EventEmitter();\n\n Object.defineProperties(this, {\n sourceUrl: {value: null, writable: true}, // TODO: getter with validator\n paused: {value: true, writable: true},\n seekable: {value: false, writable: true},\n connected: {value: false, writable: true}\n });\n\n this._onData = ()=>{\n if (this.connected) {\n while (this.transport.dataQueue.length) {\n this.onData(this.transport.dataQueue.pop());\n }\n }\n };\n this._onConnect = this.onConnected.bind(this);\n this._onDisconnect = this.onDisconnected.bind(this);\n }\n\n static streamType() {\n return null; \n }\n \n destroy() {\n this.detachTransport();\n }\n\n attachTransport(transport) {\n if (this.transport) {\n this.detachTransport();\n }\n this.transport = transport;\n this.transport.eventSource.addEventListener('data', this._onData);\n this.transport.eventSource.addEventListener('connected', this._onConnect);\n this.transport.eventSource.addEventListener('disconnected', this._onDisconnect);\n }\n\n detachTransport() {\n if (this.transport) {\n this.transport.eventSource.removeEventListener('data', this._onData);\n this.transport.eventSource.removeEventListener('connected', this._onConnect);\n this.transport.eventSource.removeEventListener('disconnected', this._onDisconnect);\n this.transport = null;\n }\n }\n reset() {\n\n }\n\n start() {\n Log.log('Client started');\n this.paused = false;\n // this.startStreamFlush();\n }\n\n stop() {\n Log.log('Client paused');\n this.paused = true;\n // this.stopStreamFlush();\n }\n\n seek(timeOffset) {\n\n }\n\n setSource(source) {\n this.stop();\n this.endpoint = source;\n this.sourceUrl = source.urlpath;\n }\n\n startStreamFlush() {\n this.flushInterval = setInterval(()=>{\n if (!this.paused) {\n this.eventSource.dispatchEvent('flush');\n }\n }, this.options.flush);\n }\n\n stopStreamFlush() {\n clearInterval(this.flushInterval);\n }\n\n onData(data) {\n\n }\n\n onConnected() {\n if (!this.seekable) {\n this.transport.dataQueue = [];\n this.eventSource.dispatchEvent('clear');\n }\n this.connected = true;\n }\n\n onDisconnected() {\n this.connected = false;\n }\n\n queryCredentials() {\n return Promise.resolve();\n }\n\n setCredentials(user, password) {\n this.endpoint.user = user;\n this.endpoint.pass = password;\n this.endpoint.auth = `${user}:${password}`;\n }\n}","import {BitArray, bitSlice} from '../util/binary.js';\n\nexport class AACParser {\n static get SampleRates() {return [\n 96000, 88200,\n 64000, 48000,\n 44100, 32000,\n 24000, 22050,\n 16000, 12000,\n 11025, 8000,\n 7350];}\n\n // static Profile = [\n // 0: Null\n // 1: AAC Main\n // 2: AAC LC (Low Complexity)\n // 3: AAC SSR (Scalable Sample Rate)\n // 4: AAC LTP (Long Term Prediction)\n // 5: SBR (Spectral Band Replication)\n // 6: AAC Scalable\n // ]\n\n static parseAudioSpecificConfig(bytesOrBits) {\n let config;\n if (bytesOrBits.byteLength) { // is byteArray\n config = new BitArray(bytesOrBits);\n } else {\n config = bytesOrBits;\n }\n\n let bitpos = config.bitpos+(config.src.byteOffset+config.bytepos)*8;\n let prof = config.readBits(5);\n this.codec = `mp4a.40.${prof}`;\n let sfi = config.readBits(4);\n if (sfi == 0xf) config.skipBits(24);\n let channels = config.readBits(4);\n\n return {\n config: bitSlice(new Uint8Array(config.src.buffer), bitpos, bitpos+16),\n codec: `mp4a.40.${prof}`,\n samplerate: AACParser.SampleRates[sfi],\n channels: channels\n }\n }\n\n static parseStreamMuxConfig(bytes) {\n // ISO_IEC_14496-3 Part 3 Audio. StreamMuxConfig\n let config = new BitArray(bytes);\n\n if (!config.readBits(1)) {\n config.skipBits(14);\n return AACParser.parseAudioSpecificConfig(config);\n }\n }\n}\n","import {getTagged} from '../../deps/bp_logger.js';\nimport {StateMachine} from '../../deps/bp_statemachine.js';\nimport {SDPParser} from '../../core/parsers/sdp.js';\nimport {RTSPStream} from './stream.js';\nimport md5 from '../../core/util/md5';\n// import {RTP} from './rtp/rtp';\nimport RTPFactory from './rtp/factory.js';\nimport {MessageBuilder} from './message.js';\nimport {RTPPayloadParser} from './rtp/payload/parser.js';\nimport {BaseClient} from '../../core/base_client.js';\nimport {PayloadType} from '../../core/defs.js';\nimport {base64ToArrayBuffer, hexToByteArray} from '../../core/util/binary.js';\nimport {AACParser} from '../../core/parsers/aac.js';\n\nconst LOG_TAG = \"client:rtsp\";\nconst Log = getTagged(LOG_TAG);\n\nexport class RTPError {\n constructor(message, file, line) {\n //super(message, file, line);\n }\n}\n\nexport default class RTSPClient extends BaseClient {\n constructor(options={flush: 200}) {\n super(options);\n this.clientSM = new RTSPClientSM(this);\n this.clientSM.ontracks = (tracks) => {\n this.eventSource.dispatchEvent('tracks', tracks);\n this.startStreamFlush();\n };\n this.sampleQueues={};\n }\n \n static streamType() {\n return 'rtsp';\n }\n\n setSource(url) {\n super.setSource(url);\n this.clientSM.setSource(url);\n }\n attachTransport(transport) {\n super.attachTransport(transport);\n this.clientSM.transport = transport;\n }\n\n detachTransport() {\n super.detachTransport();\n this.clientSM.transport = null;\n }\n\n reset() {\n super.reset();\n this.sampleQueues={};\n }\n\n destroy() {\n this.clientSM.destroy();\n return super.destroy();\n }\n\n start() {\n super.start();\n if (this.transport) {\n return this.transport.ready.then(() => {\n return this.clientSM.start();\n });\n } else {\n return Promise.reject(\"no transport attached\");\n }\n }\n\n onData(data) {\n this.clientSM.onData(data);\n }\n\n onConnected() {\n this.clientSM.onConnected();\n super.onConnected();\n }\n\n onDisconnected() {\n super.onDisconnected();\n this.clientSM.onDisconnected();\n }\n}\n\nclass AuthError extends Error {\n constructor(msg) {\n super(msg);\n }\n}\n\nexport class RTSPError extends Error {\n constructor(data) {\n super(data.msg);\n this.data = data;\n }\n}\n\nexport class RTSPClientSM extends StateMachine {\n static get USER_AGENT() {return 'SFRtsp 0.3';}\n static get STATE_INITIAL() {return 1 << 0;}\n static get STATE_OPTIONS() {return 1 << 1;}\n static get STATE_DESCRIBE () {return 1 << 2;}\n static get STATE_SETUP() {return 1 << 3;}\n static get STATE_STREAMS() {return 1 << 4;}\n static get STATE_TEARDOWN() {return 1 << 5;}\n // static STATE_PAUSED = 1 << 6;\n\n constructor(parent) {\n super();\n\n this.parent = parent;\n this.transport = null;\n this.payParser = new RTPPayloadParser();\n this.rtp_channels = new Set();\n this.ontracks = null;\n\n this.addState(RTSPClientSM.STATE_INITIAL,{\n }).addState(RTSPClientSM.STATE_OPTIONS, {\n activate: this.sendOptions,\n finishTransition: this.onOptions\n }).addState(RTSPClientSM.STATE_DESCRIBE, {\n activate: this.sendDescribe,\n finishTransition: this.onDescribe\n }).addState(RTSPClientSM.STATE_SETUP, {\n activate: this.sendSetup,\n finishTransition: this.onSetup\n }).addState(RTSPClientSM.STATE_STREAMS, {\n\n }).addState(RTSPClientSM.STATE_TEARDOWN, {\n activate: ()=>{\n this.started = false;\n },\n finishTransition: ()=>{\n return this.transitionTo(RTSPClientSM.STATE_INITIAL)\n }\n }).addTransition(RTSPClientSM.STATE_INITIAL, RTSPClientSM.STATE_OPTIONS)\n .addTransition(RTSPClientSM.STATE_INITIAL, RTSPClientSM.STATE_TEARDOWN)\n .addTransition(RTSPClientSM.STATE_OPTIONS, RTSPClientSM.STATE_DESCRIBE)\n .addTransition(RTSPClientSM.STATE_DESCRIBE, RTSPClientSM.STATE_SETUP)\n .addTransition(RTSPClientSM.STATE_SETUP, RTSPClientSM.STATE_STREAMS)\n .addTransition(RTSPClientSM.STATE_TEARDOWN, RTSPClientSM.STATE_INITIAL)\n // .addTransition(RTSPClientSM.STATE_STREAMS, RTSPClientSM.STATE_PAUSED)\n // .addTransition(RTSPClientSM.STATE_PAUSED, RTSPClientSM.STATE_STREAMS)\n .addTransition(RTSPClientSM.STATE_STREAMS, RTSPClientSM.STATE_TEARDOWN)\n // .addTransition(RTSPClientSM.STATE_PAUSED, RTSPClientSM.STATE_TEARDOWN)\n .addTransition(RTSPClientSM.STATE_SETUP, RTSPClientSM.STATE_TEARDOWN)\n .addTransition(RTSPClientSM.STATE_DESCRIBE, RTSPClientSM.STATE_TEARDOWN)\n .addTransition(RTSPClientSM.STATE_OPTIONS, RTSPClientSM.STATE_TEARDOWN);\n\n this.reset();\n\n this.shouldReconnect = false;\n\n // TODO: remove listeners\n // this.connection.eventSource.addEventListener('connected', ()=>{\n // if (this.shouldReconnect) {\n // this.reconnect();\n // }\n // });\n // this.connection.eventSource.addEventListener('disconnected', ()=>{\n // if (this.started) {\n // this.shouldReconnect = true;\n // }\n // });\n // this.connection.eventSource.addEventListener('data', (data)=>{\n // let channel = new DataView(data).getUint8(1);\n // if (this.rtp_channels.has(channel)) {\n // this.onRTP({packet: new Uint8Array(data, 4), type: channel});\n // }\n //\n // });\n }\n\n destroy() {\n this.parent = null;\n }\n\n setSource(url) {\n this.reset();\n this.endpoint = url;\n this.url = url.full;\n }\n\n onConnected() {\n if (this.rtpFactory) {\n this.rtpFactory = null;\n }\n if (this.shouldReconnect) {\n this.start();\n }\n }\n\n async onDisconnected() {\n this.reset();\n this.shouldReconnect = true;\n await this.transitionTo(RTSPClientSM.STATE_TEARDOWN);\n await this.transitionTo(RTSPClientSM.STATE_INITIAL);\n }\n\n start() {\n if (this.currentState.name !== RTSPClientSM.STATE_STREAMS) {\n return this.transitionTo(RTSPClientSM.STATE_OPTIONS);\n } else {\n // TODO: seekable\n return Promise.resolve();\n }\n }\n\n onData(data) {\n let channel = data[1];\n if (this.rtp_channels.has(channel)) {\n this.onRTP({packet: data.subarray(4), type: channel});\n }\n }\n\n useRTPChannel(channel) {\n this.rtp_channels.add(channel);\n }\n\n forgetRTPChannel(channel) {\n this.rtp_channels.delete(channel);\n }\n\n stop() {\n this.shouldReconnect = false;\n // this.mse = null;\n }\n\n async reset() {\n this.authenticator = '';\n this.methods = [];\n this.tracks = [];\n this.rtpBuffer={};\n for (let stream in this.streams) {\n this.streams[stream].reset();\n }\n this.streams={};\n this.contentBase = \"\";\n if (this.currentState) {\n if (this.currentState.name != RTSPClientSM.STATE_INITIAL) {\n await this.transitionTo(RTSPClientSM.STATE_TEARDOWN);\n await this.transitionTo(RTSPClientSM.STATE_INITIAL);\n }\n } else {\n await this.transitionTo(RTSPClientSM.STATE_INITIAL);\n }\n this.sdp = null;\n this.interleaveChannelIndex = 0;\n this.session = null;\n this.timeOffset = {};\n this.lastTimestamp = {};\n }\n\n async reconnect() {\n //this.parent.eventSource.dispatchEvent('clear');\n await this.reset();\n if (this.currentState.name != RTSPClientSM.STATE_INITIAL) {\n await this.transitionTo(RTSPClientSM.STATE_TEARDOWN);\n return this.transitionTo(RTSPClientSM.STATE_OPTIONS);\n } else {\n return this.transitionTo(RTSPClientSM.STATE_OPTIONS);\n }\n }\n\n supports(method) {\n return this.methods.includes(method)\n }\n\n parse(_data) {\n Log.debug(_data.payload);\n let d=_data.payload.split('\\r\\n\\r\\n');\n let parsed = MessageBuilder.parse(d[0]);\n let len = Number(parsed.headers['content-length']);\n if (len) {\n let d=_data.payload.split('\\r\\n\\r\\n');\n parsed.body = d[1];\n } else {\n parsed.body=\"\";\n }\n return parsed\n }\n\n sendRequest(_cmd, _host, _params={}, _payload=null) {\n this.cSeq++;\n Object.assign(_params, {\n CSeq: this.cSeq,\n 'User-Agent': RTSPClientSM.USER_AGENT\n });\n if (this.authenticator) {\n _params['Authorization'] = this.authenticator(_cmd);\n }\n return this.send(MessageBuilder.build(_cmd, _host, _params, _payload), _cmd).catch((e)=>{\n if (e instanceof AuthError) {\n return this.sendRequest(_cmd, _host, _params, _payload);\n } else {\n throw e;\n }\n });\n }\n\n async send(_data, _method) {\n if (this.transport) {\n try {\n await this.transport.ready;\n } catch(e) {\n this.onDisconnected();\n throw e;\n }\n Log.debug(_data);\n let response = await this.transport.send(_data);\n let parsed = this.parse(response);\n // TODO: parse status codes\n if (parsed.code == 401 /*&& !this.authenticator */) {\n Log.debug(parsed.headers['www-authenticate']);\n let auth = parsed.headers['www-authenticate'];\n let method = auth.substring(0, auth.indexOf(' '));\n auth = auth.substr(method.length+1);\n let chunks = auth.split(',');\n\n let ep = this.parent.endpoint;\n if (!ep.user || !ep.pass) {\n try {\n await this.parent.queryCredentials.call(this.parent);\n } catch (e) {\n throw new AuthError();\n }\n }\n\n if (method.toLowerCase() == 'digest') {\n let parsedChunks = {};\n for (let chunk of chunks) {\n let c = chunk.trim();\n let [k,v] = c.split('=');\n parsedChunks[k] = v.substr(1, v.length-2);\n }\n this.authenticator = (_method)=>{\n let ep = this.parent.endpoint;\n let ha1 = md5(`${ep.user}:${parsedChunks.realm}:${ep.pass}`);\n let ha2 = md5(`${_method}:${ep.urlpath}`);\n let response = md5(`${ha1}:${parsedChunks.nonce}:${ha2}`);\n let tail=''; // TODO: handle other params\n return `Digest username=\"${ep.user}\", nonce=\"${parsedChunks.nonce}\", uri=\"${ep.urlpath}\", response=\"${response}\"${tail}`;\n }\n } else {\n this.authenticator = ()=>{return `Basic ${btoa(this.parent.endpoint.auth)}`;};\n }\n\n throw new AuthError(parsed);\n }\n if (parsed.code >= 300) {\n Log.error(parsed.statusLine);\n throw new RTSPError({msg: `RTSP error: ${parsed.code} ${parsed.statusLine}`, parsed: parsed});\n }\n return parsed;\n } else {\n return Promise.reject(\"No transport attached\");\n }\n }\n\n sendOptions() {\n this.reset();\n this.started = true;\n this.cSeq = 0;\n return this.sendRequest('OPTIONS', '*', {});\n }\n\n onOptions(data) {\n this.methods = data.headers['public'].split(',').map((e)=>e.trim());\n this.transitionTo(RTSPClientSM.STATE_DESCRIBE);\n }\n\n sendDescribe() {\n return this.sendRequest('DESCRIBE', this.url, {\n 'Accept': 'application/sdp'\n }).then((data)=>{\n this.sdp = new SDPParser();\n return this.sdp.parse(data.body).catch(()=>{\n throw new Error(\"Failed to parse SDP\");\n }).then(()=>{return data;});\n });\n }\n\n onDescribe(data) {\n this.contentBase = data.headers['content-base'] || this.url;// `${this.endpoint.protocol}://${this.endpoint.location}${this.endpoint.urlpath}/`;\n this.tracks = this.sdp.getMediaBlockList();\n this.rtpFactory = new RTPFactory(this.sdp);\n\n Log.log('SDP contained ' + this.tracks.length + ' track(s). Calling SETUP for each.');\n\n if (data.headers['session']) {\n this.session = data.headers['session'];\n }\n\n if (!this.tracks.length) {\n throw new Error(\"No tracks in SDP\");\n }\n\n this.transitionTo(RTSPClientSM.STATE_SETUP);\n }\n\n sendSetup() {\n let streams=[];\n\n // TODO: select first video and first audio tracks\n for (let track_type of this.tracks) {\n Log.log(\"setup track: \"+track_type);\n // if (track_type=='audio') continue;\n // if (track_type=='video') continue;\n let track = this.sdp.getMediaBlock(track_type);\n if (!PayloadType.string_map[track.rtpmap[track.fmt[0]].name]) continue;\n\n this.streams[track_type] = new RTSPStream(this, track);\n let playPromise = this.streams[track_type].start();\n this.parent.sampleQueues[PayloadType.string_map[track.rtpmap[track.fmt[0]].name]]=[];\n this.rtpBuffer[track.fmt[0]]=[];\n streams.push(playPromise.then(({track, data})=>{\n let timeOffset = 0;\n this.timeOffset[track.fmt[0]] = 0;\n try {\n let rtp_info = data.headers[\"rtp-info\"].split(';');\n for (let chunk of rtp_info) {\n let [key, val] = chunk.split(\"=\");\n if (key === \"rtptime\") {\n this.timeOffset[track.fmt[0]] = Number(val);\n }\n }\n } catch (e) {\n // new Date().getTime();\n }\n let params = {\n timescale: 0,\n scaleFactor: 0\n };\n if (track.fmtp['sprop-parameter-sets']) {\n let sps_pps = track.fmtp['sprop-parameter-sets'].split(',');\n params = {\n sps:base64ToArrayBuffer(sps_pps[0]),\n pps:base64ToArrayBuffer(sps_pps[1])\n };\n } else if (track.fmtp['config']) {\n let config = track.fmtp['config'];\n this.has_config = track.fmtp['cpresent']!='0';\n let generic = track.rtpmap[track.fmt[0]].name == 'MPEG4-GENERIC';\n if (generic) {\n params={config:\n AACParser.parseAudioSpecificConfig(hexToByteArray(config))\n };\n this.payParser.aacparser.setConfig(params.config);\n } else if (config) {\n // todo: parse audio specific config for mpeg4-generic\n params={config:\n AACParser.parseStreamMuxConfig(hexToByteArray(config))\n };\n this.payParser.aacparser.setConfig(params.config);\n }\n }\n params.duration = this.sdp.sessionBlock.range?this.sdp.sessionBlock.range[1]-this.sdp.sessionBlock.range[0]:1;\n this.parent.seekable = (params.duration > 1);\n let res = {\n track: track,\n offset: this.timeOffset[track.fmt[0]],\n type: PayloadType.string_map[track.rtpmap[track.fmt[0]].name],\n params: params,\n duration: params.duration\n };\n console.log(res, this.timeOffset);\n return res;\n }));\n }\n return Promise.all(streams).then((tracks)=>{\n if (this.ontracks) {\n this.ontracks(tracks);\n }\n }).catch(()=>{\n this.stop();\n this.reset();\n });\n }\n\n onSetup() {\n this.transitionTo(RTSPClientSM.STATE_STREAMS);\n }\n\n onRTP(_data) {\n if (!this.rtpFactory) return;\n\n let rtp = this.rtpFactory.build(_data.packet, this.sdp);\n\n if (!rtp.type) {\n return;\n }\n\n if (this.timeOffset[rtp.pt] === undefined) {\n console.log(rtp.pt, this.timeOffset[rtp.pt]);\n this.rtpBuffer[rtp.pt].push(rtp);\n return;\n }\n\n if (this.lastTimestamp[rtp.pt] === undefined) {\n this.lastTimestamp[rtp.pt] = rtp.timestamp-this.timeOffset[rtp.pt];\n }\n\n let queue = this.rtpBuffer[rtp.pt];\n queue.push(rtp);\n\n while (queue.length) {\n let rtp = queue.shift();\n\n rtp.timestamp = rtp.timestamp-this.timeOffset[rtp.pt]-this.lastTimestamp[rtp.pt];\n // TODO: overflow\n // if (rtp.timestamp < 0) {\n // rtp.timestamp = (rtp.timestamp + Number.MAX_SAFE_INTEGER) % 0x7fffffff;\n // }\n if (rtp.media) {\n let pay = this.payParser.parse(rtp);\n if (pay) {\n // if (typeof pay == typeof []) {\n this.parent.sampleQueues[rtp.type].push(pay);\n // } else {\n // this.parent.sampleQueues[rtp.type].push([pay]);\n // }\n }\n }\n }\n // this.remuxer.feedRTP();\n }\n}","// ASN.1 JavaScript decoder\n// Copyright (c) 2008-2013 Lapo Luchini <lapo@lapo.it>\n\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\n/*global oids */\n\nvar hardLimit = 100,\n ellipsis = \"\\u2026\",\n DOM = {\n tag: function (tagName, className) {\n var t = document.createElement(tagName);\n t.className = className;\n return t;\n },\n text: function (str) {\n return document.createTextNode(str);\n }\n };\n\nclass Stream {\n static get hexDigits() {\n return \"0123456789ABCDEF\";\n };\n\n static get reTime() {\n return /^((?:1[89]|2\\d)?\\d\\d)(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])([01]\\d|2[0-3])(?:([0-5]\\d)(?:([0-5]\\d)(?:[.,](\\d{1,3}))?)?)?(Z|[-+](?:[0]\\d|1[0-2])([0-5]\\d)?)?$/;\n }\n\n\n constructor(enc, pos) {\n if (enc instanceof Stream) {\n this.enc = enc.enc;\n this.pos = enc.pos;\n } else {\n this.enc = enc;\n this.pos = pos;\n }\n }\n\n get(pos) {\n if (pos === undefined)\n pos = this.pos++;\n if (pos >= this.enc.length)\n throw 'Requesting byte offset ' + pos + ' on a stream of length ' + this.enc.length;\n return this.enc[pos];\n };\n\n hexByte(b) {\n return Stream.hexDigits.charAt((b >> 4) & 0xF) + Stream.hexDigits.charAt(b & 0xF);\n };\n\n hexDump(start, end, raw) {\n var s = \"\";\n for (var i = start; i < end; ++i) {\n s += this.hexByte(this.get(i));\n if (raw !== true)\n switch (i & 0xF) {\n case 0x7:\n s += \" \";\n break;\n case 0xF:\n s += \"\\n\";\n break;\n default:\n s += \" \";\n }\n }\n return s;\n };\n\n parseStringISO(start, end) {\n var s = \"\";\n for (var i = start; i < end; ++i)\n s += String.fromCharCode(this.get(i));\n return s;\n };\n\n parseStringUTF(start, end) {\n var s = \"\";\n for (var i = start; i < end;) {\n var c = this.get(i++);\n if (c < 128)\n s += String.fromCharCode(c);\n else if ((c > 191) && (c < 224))\n s += String.fromCharCode(((c & 0x1F) << 6) | (this.get(i++) & 0x3F));\n else\n s += String.fromCharCode(((c & 0x0F) << 12) | ((this.get(i++) & 0x3F) << 6) | (this.get(i++) & 0x3F));\n }\n return s;\n };\n\n parseStringBMP(start, end) {\n var str = \"\"\n for (var i = start; i < end; i += 2) {\n var high_byte = this.get(i);\n var low_byte = this.get(i + 1);\n str += String.fromCharCode((high_byte << 8) + low_byte);\n }\n\n return str;\n };\n\n parseTime(start, end) {\n var s = this.parseStringISO(start, end),\n m = Stream.reTime.exec(s);\n if (!m)\n return \"Unrecognized time: \" + s;\n s = m[1] + \"-\" + m[2] + \"-\" + m[3] + \" \" + m[4];\n if (m[5]) {\n s += \":\" + m[5];\n if (m[6]) {\n s += \":\" + m[6];\n if (m[7])\n s += \".\" + m[7];\n }\n }\n if (m[8]) {\n s += \" UTC\";\n if (m[8] != 'Z') {\n s += m[8];\n if (m[9])\n s += \":\" + m[9];\n }\n }\n return s;\n };\n\n parseInteger(start, end) {\n //TODO support negative numbers\n var len = end - start;\n if (len > 4) {\n len <<= 3;\n var s = this.get(start);\n if (s === 0)\n len -= 8;\n else\n while (s < 128) {\n s <<= 1;\n --len;\n }\n return \"(\" + len + \" bit)\";\n }\n var n = 0;\n for (var i = start; i < end; ++i)\n n = (n << 8) | this.get(i);\n return n;\n };\n\n parseBitString(start, end) {\n var unusedBit = this.get(start),\n lenBit = ((end - start - 1) << 3) - unusedBit,\n s = \"(\" + lenBit + \" bit)\";\n if (lenBit <= 20) {\n var skip = unusedBit;\n s += \" \";\n for (var i = end - 1; i > start; --i) {\n var b = this.get(i);\n for (var j = skip; j < 8; ++j)\n s += (b >> j) & 1 ? \"1\" : \"0\";\n skip = 0;\n }\n }\n return s;\n };\n\n parseOctetString(start, end) {\n var len = end - start,\n s = \"(\" + len + \" byte) \";\n if (len > hardLimit)\n end = start + hardLimit;\n for (var i = start; i < end; ++i)\n s += this.hexByte(this.get(i)); //TODO: also try Latin1?\n if (len > hardLimit)\n s += ellipsis;\n return s;\n };\n\n parseOID(start, end) {\n var s = '',\n n = 0,\n bits = 0;\n for (var i = start; i < end; ++i) {\n var v = this.get(i);\n n = (n << 7) | (v & 0x7F);\n bits += 7;\n if (!(v & 0x80)) { // finished\n if (s === '') {\n var m = n < 80 ? n < 40 ? 0 : 1 : 2;\n s = m + \".\" + (n - m * 40);\n } else\n s += \".\" + ((bits >= 31) ? \"bigint\" : n);\n n = bits = 0;\n }\n }\n return s;\n };\n}\n\nexport class ASN1 {\n static get reSeemsASCII() {\n return /^[ -~]+$/;\n }\n\n constructor(stream, header, length, tag, sub) {\n this.stream = stream;\n this.header = header;\n this.length = length;\n this.tag = tag;\n this.sub = sub;\n }\n\n typeName() {\n if (this.tag === undefined)\n return \"unknown\";\n var tagClass = this.tag >> 6,\n tagConstructed = (this.tag >> 5) & 1,\n tagNumber = this.tag & 0x1F;\n switch (tagClass) {\n case 0: // universal\n switch (tagNumber) {\n case 0x00:\n return \"EOC\";\n case 0x01:\n return \"BOOLEAN\";\n case 0x02:\n return \"INTEGER\";\n case 0x03:\n return \"BIT_STRING\";\n case 0x04:\n return \"OCTET_STRING\";\n case 0x05:\n return \"NULL\";\n case 0x06:\n return \"OBJECT_IDENTIFIER\";\n case 0x07:\n return \"ObjectDescriptor\";\n case 0x08:\n return \"EXTERNAL\";\n case 0x09:\n return \"REAL\";\n case 0x0A:\n return \"ENUMERATED\";\n case 0x0B:\n return \"EMBEDDED_PDV\";\n case 0x0C:\n return \"UTF8String\";\n case 0x10:\n return \"SEQUENCE\";\n case 0x11:\n return \"SET\";\n case 0x12:\n return \"NumericString\";\n case 0x13:\n return \"PrintableString\"; // ASCII subset\n case 0x14:\n return \"TeletexString\"; // aka T61String\n case 0x15:\n return \"VideotexString\";\n case 0x16:\n return \"IA5String\"; // ASCII\n case 0x17:\n return \"UTCTime\";\n case 0x18:\n return \"GeneralizedTime\";\n case 0x19:\n return \"GraphicString\";\n case 0x1A:\n return \"VisibleString\"; // ASCII subset\n case 0x1B:\n return \"GeneralString\";\n case 0x1C:\n return \"UniversalString\";\n case 0x1E:\n return \"BMPString\";\n default:\n return \"Universal_\" + tagNumber.toString(16);\n }\n case 1:\n return \"Application_\" + tagNumber.toString(16);\n case 2:\n return \"[\" + tagNumber + \"]\"; // Context\n case 3:\n return \"Private_\" + tagNumber.toString(16);\n }\n }\n\n content() {\n if (this.tag === undefined)\n return null;\n var tagClass = this.tag >> 6,\n tagNumber = this.tag & 0x1F,\n content = this.posContent(),\n len = Math.abs(this.length);\n if (tagClass !== 0) { // universal\n if (this.sub !== null)\n return \"(\" + this.sub.length + \" elem)\";\n //TODO: TRY TO PARSE ASCII STRING\n var s = this.stream.parseStringISO(content, content + Math.min(len, hardLimit));\n if (ASN1.reSeemsASCII.test(s))\n return s.substring(0, 2 * hardLimit) + ((s.length > 2 * hardLimit) ? ellipsis : \"\");\n else\n return this.stream.parseOctetString(content, content + len);\n }\n switch (tagNumber) {\n case 0x01: // BOOLEAN\n return (this.stream.get(content) === 0) ? \"false\" : \"true\";\n case 0x02: // INTEGER\n return this.stream.parseInteger(content, content + len);\n case 0x03: // BIT_STRING\n return this.sub ? \"(\" + this.sub.length + \" elem)\" :\n this.stream.parseBitString(content, content + len);\n case 0x04: // OCTET_STRING\n return this.sub ? \"(\" + this.sub.length + \" elem)\" :\n this.stream.parseOctetString(content, content + len);\n //case 0x05: // NULL\n case 0x06: // OBJECT_IDENTIFIER\n return this.stream.parseOID(content, content + len);\n //case 0x07: // ObjectDescriptor\n //case 0x08: // EXTERNAL\n //case 0x09: // REAL\n //case 0x0A: // ENUMERATED\n //case 0x0B: // EMBEDDED_PDV\n case 0x10: // SEQUENCE\n case 0x11: // SET\n return \"(\" + this.sub.length + \" elem)\";\n case 0x0C: // UTF8String\n return this.stream.parseStringUTF(content, content + len);\n case 0x12: // NumericString\n case 0x13: // PrintableString\n case 0x14: // TeletexString\n case 0x15: // VideotexString\n case 0x16: // IA5String\n //case 0x19: // GraphicString\n case 0x1A: // VisibleString\n //case 0x1B: // GeneralString\n //case 0x1C: // UniversalString\n return this.stream.parseStringISO(content, content + len);\n case 0x1E: // BMPString\n return this.stream.parseStringBMP(content, content + len);\n case 0x17: // UTCTime\n case 0x18: // GeneralizedTime\n return this.stream.parseTime(content, content + len);\n }\n return null;\n };\n\n toString() {\n return this.typeName() + \"@\" + this.stream.pos + \"[header:\" + this.header + \",length:\" + this.length + \",sub:\" + ((this.sub === null) ? 'null' : this.sub.length) + \"]\";\n };\n\n print(indent) {\n if (indent === undefined) indent = '';\n document.writeln(indent + this);\n if (this.sub !== null) {\n indent += ' ';\n for (var i = 0, max = this.sub.length; i < max; ++i)\n this.sub[i].print(indent);\n }\n };\n\n toPrettyString(indent) {\n if (indent === undefined) indent = '';\n var s = indent + this.typeName() + \" @\" + this.stream.pos;\n if (this.length >= 0)\n s += \"+\";\n s += this.length;\n if (this.tag & 0x20)\n s += \" (constructed)\";\n else if (((this.tag == 0x03) || (this.tag == 0x04)) && (this.sub !== null))\n s += \" (encapsulates)\";\n s += \"\\n\";\n if (this.sub !== null) {\n indent += ' ';\n for (var i = 0, max = this.sub.length; i < max; ++i)\n s += this.sub[i].toPrettyString(indent);\n }\n return s;\n };\n\n toDOM() {\n var node = DOM.tag(\"div\", \"node\");\n node.asn1 = this;\n var head = DOM.tag(\"div\", \"head\");\n var s = this.typeName().replace(/_/g, \" \");\n head.innerHTML = s;\n var content = this.content();\n if (content !== null) {\n content = String(content).replace(/</g, \"<\");\n var preview = DOM.tag(\"span\", \"preview\");\n preview.appendChild(DOM.text(content));\n head.appendChild(preview);\n }\n node.appendChild(head);\n this.node = node;\n this.head = head;\n var value = DOM.tag(\"div\", \"value\");\n s = \"Offset: \" + this.stream.pos + \"<br/>\";\n s += \"Length: \" + this.header + \"+\";\n if (this.length >= 0)\n s += this.length;\n else\n s += (-this.length) + \" (undefined)\";\n if (this.tag & 0x20)\n s += \"<br/>(constructed)\";\n else if (((this.tag == 0x03) || (this.tag == 0x04)) && (this.sub !== null))\n s += \"<br/>(encapsulates)\";\n //TODO if (this.tag == 0x03) s += \"Unused bits: \"\n if (content !== null) {\n s += \"<br/>Value:<br/><b>\" + content + \"</b>\";\n if ((typeof oids === 'object') && (this.tag == 0x06)) {\n var oid = oids[content];\n if (oid) {\n if (oid.d) s += \"<br/>\" + oid.d;\n if (oid.c) s += \"<br/>\" + oid.c;\n if (oid.w) s += \"<br/>(warning!)\";\n }\n }\n }\n value.innerHTML = s;\n node.appendChild(value);\n var sub = DOM.tag(\"div\", \"sub\");\n if (this.sub !== null) {\n for (var i = 0, max = this.sub.length; i < max; ++i)\n sub.appendChild(this.sub[i].toDOM());\n }\n node.appendChild(sub);\n head.onclick = function () {\n node.className = (node.className == \"node collapsed\") ? \"node\" : \"node collapsed\";\n };\n return node;\n };\n\n posStart() {\n return this.stream.pos;\n };\n\n posContent() {\n return this.stream.pos + this.header;\n };\n\n posEnd() {\n return this.stream.pos + this.header + Math.abs(this.length);\n };\n\n fakeHover(current) {\n this.node.className += \" hover\";\n if (current)\n this.head.className += \" hover\";\n };\n\n fakeOut(current) {\n var re = / ?hover/;\n this.node.className = this.node.className.replace(re, \"\");\n if (current)\n this.head.className = this.head.className.replace(re, \"\");\n };\n\n toHexDOM_sub(node, className, stream, start, end) {\n if (start >= end)\n return;\n var sub = DOM.tag(\"span\", className);\n sub.appendChild(DOM.text(\n stream.hexDump(start, end)));\n node.appendChild(sub);\n };\n\n toHexDOM(root) {\n var node = DOM.tag(\"span\", \"hex\");\n if (root === undefined) root = node;\n this.head.hexNode = node;\n this.head.onmouseover = function () {\n this.hexNode.className = \"hexCurrent\";\n };\n this.head.onmouseout = function () {\n this.hexNode.className = \"hex\";\n };\n node.asn1 = this;\n node.onmouseover = function () {\n var current = !root.selected;\n if (current) {\n root.selected = this.asn1;\n this.className = \"hexCurrent\";\n }\n this.asn1.fakeHover(current);\n };\n node.onmouseout = function () {\n var current = (root.selected == this.asn1);\n this.asn1.fakeOut(current);\n if (current) {\n root.selected = null;\n this.className = \"hex\";\n }\n };\n this.toHexDOM_sub(node, \"tag\", this.stream, this.posStart(), this.posStart() + 1);\n this.toHexDOM_sub(node, (this.length >= 0) ? \"dlen\" : \"ulen\", this.stream, this.posStart() + 1, this.posContent());\n if (this.sub === null)\n node.appendChild(DOM.text(\n this.stream.hexDump(this.posContent(), this.posEnd())));\n else if (this.sub.length > 0) {\n var first = this.sub[0];\n var last = this.sub[this.sub.length - 1];\n this.toHexDOM_sub(node, \"intro\", this.stream, this.posContent(), first.posStart());\n for (var i = 0, max = this.sub.length; i < max; ++i)\n node.appendChild(this.sub[i].toHexDOM(root));\n this.toHexDOM_sub(node, \"outro\", this.stream, last.posEnd(), this.posEnd());\n }\n return node;\n };\n\n toHexString(root) {\n return this.stream.hexDump(this.posStart(), this.posEnd(), true);\n };\n\n}\n\nASN1.decodeLength = function (stream) {\n var buf = stream.get(),\n len = buf & 0x7F;\n if (len == buf)\n return len;\n if (len > 3)\n throw \"Length over 24 bits not supported at position \" + (stream.pos - 1);\n if (len === 0)\n return -1; // undefined\n buf = 0;\n for (var i = 0; i < len; ++i)\n buf = (buf << 8) | stream.get();\n return buf;\n};\nASN1.hasContent = function (tag, len, stream) {\n if (tag & 0x20) // constructed\n return true;\n if ((tag < 0x03) || (tag > 0x04))\n return false;\n var p = new Stream(stream);\n if (tag == 0x03) p.get(); // BitString unused bits, must be in [0, 7]\n var subTag = p.get();\n if ((subTag >> 6) & 0x01) // not (universal or context)\n return false;\n try {\n var subLength = ASN1.decodeLength(p);\n return ((p.pos - stream.pos) + subLength == len);\n } catch (exception) {\n return false;\n }\n};\nASN1.decode = function (stream) {\n if (!(stream instanceof Stream))\n stream = new Stream(stream, 0);\n var streamStart = new Stream(stream),\n tag = stream.get(),\n len = ASN1.decodeLength(stream),\n header = stream.pos - streamStart.pos,\n sub = null;\n if (ASN1.hasContent(tag, len, stream)) {\n // it has content, so we decode it\n var start = stream.pos;\n if (tag == 0x03) stream.get(); // skip BitString unused bits, must be in [0, 7]\n sub = [];\n if (len >= 0) {\n // definite length\n var end = start + len;\n while (stream.pos < end)\n sub[sub.length] = ASN1.decode(stream);\n if (stream.pos != end)\n throw \"Content size is not correct for container starting at offset \" + start;\n } else {\n // undefined length\n try {\n for (; ;) {\n var s = ASN1.decode(stream);\n if (s.tag === 0)\n break;\n sub[sub.length] = s;\n }\n len = start - stream.pos;\n } catch (e) {\n throw \"Exception while decoding undefined length content: \" + e;\n }\n }\n } else\n stream.pos += len; // skip content\n return new ASN1(streamStart, header, len, tag, sub);\n};\nASN1.test = function () {\n var test = [\n {value: [0x27], expected: 0x27},\n {value: [0x81, 0xC9], expected: 0xC9},\n {value: [0x83, 0xFE, 0xDC, 0xBA], expected: 0xFEDCBA}\n ];\n for (var i = 0, max = test.length; i < max; ++i) {\n var pos = 0,\n stream = new Stream(test[i].value, 0),\n res = ASN1.decodeLength(stream);\n if (res != test[i].expected)\n document.write(\"In test[\" + i + \"] expected \" + test[i].expected + \" got \" + res + \"\\n\");\n }\n};","// prng4.js - uses Arcfour as a PRNG\n\nexport class Arcfour {\n constructor() {\n this.i = 0;\n this.j = 0;\n this.S = [];\n }\n}\n\n// Initialize arcfour context from key, an array of ints, each from [0..255]\nfunction ARC4init(key) {\n var i, j, t;\n for(i = 0; i < 256; ++i)\n this.S[i] = i;\n j = 0;\n for(i = 0; i < 256; ++i) {\n j = (j + this.S[i] + key[i % key.length]) & 255;\n t = this.S[i];\n this.S[i] = this.S[j];\n this.S[j] = t;\n }\n this.i = 0;\n this.j = 0;\n}\n\nfunction ARC4next() {\n var t;\n this.i = (this.i + 1) & 255;\n this.j = (this.j + this.S[this.i]) & 255;\n t = this.S[this.i];\n this.S[this.i] = this.S[this.j];\n this.S[this.j] = t;\n return this.S[(t + this.S[this.i]) & 255];\n}\n\nArcfour.prototype.init = ARC4init;\nArcfour.prototype.next = ARC4next;\n\n// Plug in your RNG constructor here\nexport function prng_newstate() {\n return new Arcfour();\n}\n\n// Pool size must be a multiple of 4 and greater than 32.\n// An array of bytes the size of the pool will be passed to init()\nexport var rng_psize = 256;\n","import {rng_psize} from \"./prng4\";\nimport {prng_newstate} from \"./prng4\";\n// Random number generator - requires a PRNG backend, e.g. prng4.js\nvar rng_state;\nvar rng_pool;\nvar rng_pptr;\n\n// Initialize the pool with junk if needed.\nif(rng_pool == null) {\n rng_pool = new Array();\n rng_pptr = 0;\n var t;\n if(window.crypto && window.crypto.getRandomValues) {\n // Extract entropy (2048 bits) from RNG if available\n var z = new Uint32Array(256);\n window.crypto.getRandomValues(z);\n for (t = 0; t < z.length; ++t)\n rng_pool[rng_pptr++] = z[t] & 255;\n }\n\n // Use mouse events for entropy, if we do not have enough entropy by the time\n // we need it, entropy will be generated by Math.random.\n var onMouseMoveListener = function(ev) {\n this.count = this.count || 0;\n if (this.count >= 256 || rng_pptr >= rng_psize) {\n if (window.removeEventListener)\n window.removeEventListener(\"mousemove\", onMouseMoveListener, false);\n else if (window.detachEvent)\n window.detachEvent(\"onmousemove\", onMouseMoveListener);\n return;\n }\n try {\n var mouseCoordinates = ev.x + ev.y;\n rng_pool[rng_pptr++] = mouseCoordinates & 255;\n this.count += 1;\n } catch (e) {\n // Sometimes Firefox will deny permission to access event properties for some reason. Ignore.\n }\n };\n if (window.addEventListener)\n window.addEventListener(\"mousemove\", onMouseMoveListener, false);\n else if (window.attachEvent)\n window.attachEvent(\"onmousemove\", onMouseMoveListener);\n\n}\n\nfunction rng_get_byte() {\n if(rng_state == null) {\n rng_state = prng_newstate();\n // At this point, we may not have collected enough entropy. If not, fall back to Math.random\n while (rng_pptr < rng_psize) {\n var random = Math.floor(65536 * Math.random());\n rng_pool[rng_pptr++] = random & 255;\n }\n rng_state.init(rng_pool);\n for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr)\n rng_pool[rng_pptr] = 0;\n rng_pptr = 0;\n }\n // TODO: allow reseeding after first request\n return rng_state.next();\n}\n\nfunction rng_get_bytes(ba) {\n var i;\n for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte();\n}\n\nexport class SecureRandom {\n constructor(){}\n}\n\nSecureRandom.prototype.nextBytes = rng_get_bytes;\n","// Copyright (c) 2005 Tom Wu\n// All Rights Reserved.\n// See \"LICENSE\" for details.\n\n// Basic JavaScript BN library - subset useful for RSA encryption.\n\n// Bits per digit\nvar dbits;\n\n// JavaScript engine analysis\nvar canary = 0xdeadbeefcafe;\nvar j_lm = ((canary&0xffffff)==0xefcafe);\n\n// (public) Constructor\nexport class BigInteger {\n constructor(a,b,c) {\n if (a != null)\n if (\"number\" == typeof a) this.fromNumber(a, b, c);\n else if (b == null && \"string\" != typeof a) this.fromString(a, 256);\n else this.fromString(a, b);\n }\n}\n\n// return new, unset BigInteger\nexport function nbi() { return new BigInteger(null); }\n\n// am: Compute w_j += (x*this_i), propagate carries,\n// c is initial carry, returns final carry.\n// c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n// We need to select the fastest one that works in this environment.\n\n// am1: use a single mult and divide to get the high bits,\n// max digit bits should be 26 because\n// max internal value = 2*dvalue^2-2*dvalue (< 2^53)\nfunction am1(i,x,w,j,c,n) {\n while(--n >= 0) {\n var v = x*this[i++]+w[j]+c;\n c = Math.floor(v/0x4000000);\n w[j++] = v&0x3ffffff;\n }\n return c;\n}\n// am2 avoids a big mult-and-extract completely.\n// Max digit bits should be <= 30 because we do bitwise ops\n// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\nfunction am2(i,x,w,j,c,n) {\n var xl = x&0x7fff, xh = x>>15;\n while(--n >= 0) {\n var l = this[i]&0x7fff;\n var h = this[i++]>>15;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff);\n c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);\n w[j++] = l&0x3fffffff;\n }\n return c;\n}\n// Alternately, set max digit bits to 28 since some\n// browsers slow down when dealing with 32-bit numbers.\nfunction am3(i,x,w,j,c,n) {\n var xl = x&0x3fff, xh = x>>14;\n while(--n >= 0) {\n var l = this[i]&0x3fff;\n var h = this[i++]>>14;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x3fff)<<14)+w[j]+c;\n c = (l>>28)+(m>>14)+xh*h;\n w[j++] = l&0xfffffff;\n }\n return c;\n}\nif(j_lm && (navigator.appName == \"Microsoft Internet Explorer\")) {\n BigInteger.prototype.am = am2;\n dbits = 30;\n}\nelse if(j_lm && (navigator.appName != \"Netscape\")) {\n BigInteger.prototype.am = am1;\n dbits = 26;\n}\nelse { // Mozilla/Netscape seems to prefer am3\n BigInteger.prototype.am = am3;\n dbits = 28;\n}\n\nBigInteger.prototype.DB = dbits;\nBigInteger.prototype.DM = ((1<<dbits)-1);\nBigInteger.prototype.DV = (1<<dbits);\n\nvar BI_FP = 52;\nBigInteger.prototype.FV = Math.pow(2,BI_FP);\nBigInteger.prototype.F1 = BI_FP-dbits;\nBigInteger.prototype.F2 = 2*dbits-BI_FP;\n\n// Digit conversions\nvar BI_RM = \"0123456789abcdefghijklmnopqrstuvwxyz\";\nvar BI_RC = [];\nvar rr,vv;\nrr = \"0\".charCodeAt(0);\nfor(vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv;\nrr = \"a\".charCodeAt(0);\nfor(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;\nrr = \"A\".charCodeAt(0);\nfor(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;\n\nexport function int2char(n) { return BI_RM.charAt(n); }\nexport function intAt(s,i) {\n var c = BI_RC[s.charCodeAt(i)];\n return (c==null)?-1:c;\n}\n\n// (protected) copy this to r\nfunction bnpCopyTo(r) {\n for(var i = this.t-1; i >= 0; --i) r[i] = this[i];\n r.t = this.t;\n r.s = this.s;\n}\n\n// (protected) set from integer value x, -DV <= x < DV\nfunction bnpFromInt(x) {\n this.t = 1;\n this.s = (x<0)?-1:0;\n if(x > 0) this[0] = x;\n else if(x < -1) this[0] = x+this.DV;\n else this.t = 0;\n}\n\n// return bigint initialized to value\nexport function nbv(i) { var r = nbi(); r.fromInt(i); return r; }\n\n// (protected) set from string and radix\nfunction bnpFromString(s,b) {\n var k;\n if(b == 16) k = 4;\n else if(b == 8) k = 3;\n else if(b == 256) k = 8; // byte array\n else if(b == 2) k = 1;\n else if(b == 32) k = 5;\n else if(b == 4) k = 2;\n else { this.fromRadix(s,b); return; }\n this.t = 0;\n this.s = 0;\n var i = s.length, mi = false, sh = 0;\n while(--i >= 0) {\n var x = (k==8)?s[i]&0xff:intAt(s,i);\n if(x < 0) {\n if(s.charAt(i) == \"-\") mi = true;\n continue;\n }\n mi = false;\n if(sh == 0)\n this[this.t++] = x;\n else if(sh+k > this.DB) {\n this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<<sh;\n this[this.t++] = (x>>(this.DB-sh));\n }\n else\n this[this.t-1] |= x<<sh;\n sh += k;\n if(sh >= this.DB) sh -= this.DB;\n }\n if(k == 8 && (s[0]&0x80) != 0) {\n this.s = -1;\n if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)<<sh;\n }\n this.clamp();\n if(mi) BigInteger.ZERO.subTo(this,this);\n}\n\n// (protected) clamp off excess high words\nfunction bnpClamp() {\n var c = this.s&this.DM;\n while(this.t > 0 && this[this.t-1] == c) --this.t;\n}\n\n// (public) return string representation in given radix\nfunction bnToString(b) {\n if(this.s < 0) return \"-\"+this.negate().toString(b);\n var k;\n if(b == 16) k = 4;\n else if(b == 8) k = 3;\n else if(b == 2) k = 1;\n else if(b == 32) k = 5;\n else if(b == 4) k = 2;\n else return this.toRadix(b);\n var km = (1<<k)-1, d, m = false, r = \"\", i = this.t;\n var p = this.DB-(i*this.DB)%k;\n if(i-- > 0) {\n if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); }\n while(i >= 0) {\n if(p < k) {\n d = (this[i]&((1<<p)-1))<<(k-p);\n d |= this[--i]>>(p+=this.DB-k);\n }\n else {\n d = (this[i]>>(p-=k))&km;\n if(p <= 0) { p += this.DB; --i; }\n }\n if(d > 0) m = true;\n if(m) r += int2char(d);\n }\n }\n return m?r:\"0\";\n}\n\n// (public) -this\nfunction bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; }\n\n// (public) |this|\nfunction bnAbs() { return (this.s<0)?this.negate():this; }\n\n// (public) return + if this > a, - if this < a, 0 if equal\nfunction bnCompareTo(a) {\n var r = this.s-a.s;\n if(r != 0) return r;\n var i = this.t;\n r = i-a.t;\n if(r != 0) return (this.s<0)?-r:r;\n while(--i >= 0) if((r=this[i]-a[i]) != 0) return r;\n return 0;\n}\n\n// returns bit length of the integer x\nexport function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}\n\n// (public) return the number of bits in \"this\"\nfunction bnBitLength() {\n if(this.t <= 0) return 0;\n return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM));\n}\n\n// (protected) r = this << n*DB\nfunction bnpDLShiftTo(n,r) {\n var i;\n for(i = this.t-1; i >= 0; --i) r[i+n] = this[i];\n for(i = n-1; i >= 0; --i) r[i] = 0;\n r.t = this.t+n;\n r.s = this.s;\n}\n\n// (protected) r = this >> n*DB\nfunction bnpDRShiftTo(n,r) {\n for(var i = n; i < this.t; ++i) r[i-n] = this[i];\n r.t = Math.max(this.t-n,0);\n r.s = this.s;\n}\n\n// (protected) r = this << n\nfunction bnpLShiftTo(n,r) {\n var bs = n%this.DB;\n var cbs = this.DB-bs;\n var bm = (1<<cbs)-1;\n var ds = Math.floor(n/this.DB), c = (this.s<<bs)&this.DM, i;\n for(i = this.t-1; i >= 0; --i) {\n r[i+ds+1] = (this[i]>>cbs)|c;\n c = (this[i]&bm)<<bs;\n }\n for(i = ds-1; i >= 0; --i) r[i] = 0;\n r[ds] = c;\n r.t = this.t+ds+1;\n r.s = this.s;\n r.clamp();\n}\n\n// (protected) r = this >> n\nfunction bnpRShiftTo(n,r) {\n r.s = this.s;\n var ds = Math.floor(n/this.DB);\n if(ds >= this.t) { r.t = 0; return; }\n var bs = n%this.DB;\n var cbs = this.DB-bs;\n var bm = (1<<bs)-1;\n r[0] = this[ds]>>bs;\n for(var i = ds+1; i < this.t; ++i) {\n r[i-ds-1] |= (this[i]&bm)<<cbs;\n r[i-ds] = this[i]>>bs;\n }\n if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<<cbs;\n r.t = this.t-ds;\n r.clamp();\n}\n\n// (protected) r = this - a\nfunction bnpSubTo(a,r) {\n var i = 0, c = 0, m = Math.min(a.t,this.t);\n while(i < m) {\n c += this[i]-a[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n if(a.t < this.t) {\n c -= a.s;\n while(i < this.t) {\n c += this[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while(i < a.t) {\n c -= a[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c -= a.s;\n }\n r.s = (c<0)?-1:0;\n if(c < -1) r[i++] = this.DV+c;\n else if(c > 0) r[i++] = c;\n r.t = i;\n r.clamp();\n}\n\n// (protected) r = this * a, r != this,a (HAC 14.12)\n// \"this\" should be the larger one if appropriate.\nfunction bnpMultiplyTo(a,r) {\n var x = this.abs(), y = a.abs();\n var i = x.t;\n r.t = i+y.t;\n while(--i >= 0) r[i] = 0;\n for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t);\n r.s = 0;\n r.clamp();\n if(this.s != a.s) BigInteger.ZERO.subTo(r,r);\n}\n\n// (protected) r = this^2, r != this (HAC 14.16)\nfunction bnpSquareTo(r) {\n var x = this.abs();\n var i = r.t = 2*x.t;\n while(--i >= 0) r[i] = 0;\n for(i = 0; i < x.t-1; ++i) {\n var c = x.am(i,x[i],r,2*i,0,1);\n if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) {\n r[i+x.t] -= x.DV;\n r[i+x.t+1] = 1;\n }\n }\n if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1);\n r.s = 0;\n r.clamp();\n}\n\n// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n// r != q, this != m. q or r may be null.\nfunction bnpDivRemTo(m,q,r) {\n var pm = m.abs();\n if(pm.t <= 0) return;\n var pt = this.abs();\n if(pt.t < pm.t) {\n if(q != null) q.fromInt(0);\n if(r != null) this.copyTo(r);\n return;\n }\n if(r == null) r = nbi();\n var y = nbi(), ts = this.s, ms = m.s;\n var nsh = this.DB-nbits(pm[pm.t-1]);\t// normalize modulus\n if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); }\n else { pm.copyTo(y); pt.copyTo(r); }\n var ys = y.t;\n var y0 = y[ys-1];\n if(y0 == 0) return;\n var yt = y0*(1<<this.F1)+((ys>1)?y[ys-2]>>this.F2:0);\n var d1 = this.FV/yt, d2 = (1<<this.F1)/yt, e = 1<<this.F2;\n var i = r.t, j = i-ys, t = (q==null)?nbi():q;\n y.dlShiftTo(j,t);\n if(r.compareTo(t) >= 0) {\n r[r.t++] = 1;\n r.subTo(t,r);\n }\n BigInteger.ONE.dlShiftTo(ys,t);\n t.subTo(y,y);\t// \"negative\" y so we can replace sub with am later\n while(y.t < ys) y[y.t++] = 0;\n while(--j >= 0) {\n // Estimate quotient digit\n var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);\n if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) {\t// Try it out\n y.dlShiftTo(j,t);\n r.subTo(t,r);\n while(r[i] < --qd) r.subTo(t,r);\n }\n }\n if(q != null) {\n r.drShiftTo(ys,q);\n if(ts != ms) BigInteger.ZERO.subTo(q,q);\n }\n r.t = ys;\n r.clamp();\n if(nsh > 0) r.rShiftTo(nsh,r);\t// Denormalize remainder\n if(ts < 0) BigInteger.ZERO.subTo(r,r);\n}\n\n// (public) this mod a\nfunction bnMod(a) {\n var r = nbi();\n this.abs().divRemTo(a,null,r);\n if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r);\n return r;\n}\n\n// Modular reduction using \"classic\" algorithm\nexport class Classic{\n constructor(m){\n this.m = m;\n }\n}\nfunction cConvert(x) {\n if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);\n else return x;\n}\nfunction cRevert(x) { return x; }\nfunction cReduce(x) { x.divRemTo(this.m,null,x); }\nfunction cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\nfunction cSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\nClassic.prototype.convert = cConvert;\nClassic.prototype.revert = cRevert;\nClassic.prototype.reduce = cReduce;\nClassic.prototype.mulTo = cMulTo;\nClassic.prototype.sqrTo = cSqrTo;\n\n// (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n// justification:\n// xy == 1 (mod m)\n// xy = 1+km\n// xy(2-xy) = (1+km)(1-km)\n// x[y(2-xy)] = 1-k^2m^2\n// x[y(2-xy)] == 1 (mod m^2)\n// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n// should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n// JS multiply \"overflows\" differently from C/C++, so care is needed here.\nfunction bnpInvDigit() {\n if(this.t < 1) return 0;\n var x = this[0];\n if((x&1) == 0) return 0;\n var y = x&3;\t\t// y == 1/x mod 2^2\n y = (y*(2-(x&0xf)*y))&0xf;\t// y == 1/x mod 2^4\n y = (y*(2-(x&0xff)*y))&0xff;\t// y == 1/x mod 2^8\n y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff;\t// y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n y = (y*(2-x*y%this.DV))%this.DV;\t\t// y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n return (y>0)?this.DV-y:-y;\n}\n\n// Montgomery reduction\nexport class Montgomery {\n constructor(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp & 0x7fff;\n this.mph = this.mp >> 15;\n this.um = (1 << (m.DB - 15)) - 1;\n this.mt2 = 2 * m.t;\n }\n}\n\n// xR mod m\nfunction montConvert(x) {\n var r = nbi();\n x.abs().dlShiftTo(this.m.t,r);\n r.divRemTo(this.m,null,r);\n if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r);\n return r;\n}\n\n// x/R mod m\nfunction montRevert(x) {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n}\n\n// x = x/R mod m (HAC 14.32)\nfunction montReduce(x) {\n while(x.t <= this.mt2)\t// pad x so am has enough room later\n x[x.t++] = 0;\n for(var i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n var j = x[i]&0x7fff;\n var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM;\n // use am to combine the multiply-shift-add into one call\n j = i+this.m.t;\n x[j] += this.m.am(0,u0,x,i,0,this.m.t);\n // propagate carry\n while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; }\n }\n x.clamp();\n x.drShiftTo(this.m.t,x);\n if(x.compareTo(this.m) >= 0) x.subTo(this.m,x);\n}\n\n// r = \"x^2/R mod m\"; x != r\nfunction montSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n// r = \"xy/R mod m\"; x,y != r\nfunction montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n\nMontgomery.prototype.convert = montConvert;\nMontgomery.prototype.revert = montRevert;\nMontgomery.prototype.reduce = montReduce;\nMontgomery.prototype.mulTo = montMulTo;\nMontgomery.prototype.sqrTo = montSqrTo;\n\n// (protected) true iff this is even\nfunction bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; }\n\n// (protected) this^e, e < 2^32, doing sqr and mul with \"r\" (HAC 14.79)\nfunction bnpExp(e,z) {\n if(e > 0xffffffff || e < 1) return BigInteger.ONE;\n var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1;\n g.copyTo(r);\n while(--i >= 0) {\n z.sqrTo(r,r2);\n if((e&(1<<i)) > 0) z.mulTo(r2,g,r);\n else { var t = r; r = r2; r2 = t; }\n }\n return z.revert(r);\n}\n\n// (public) this^e % m, 0 <= e < 2^32\nfunction bnModPowInt(e,m) {\n var z;\n if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m);\n return this.exp(e,z);\n}\n\n// protected\nBigInteger.prototype.copyTo = bnpCopyTo;\nBigInteger.prototype.fromInt = bnpFromInt;\nBigInteger.prototype.fromString = bnpFromString;\nBigInteger.prototype.clamp = bnpClamp;\nBigInteger.prototype.dlShiftTo = bnpDLShiftTo;\nBigInteger.prototype.drShiftTo = bnpDRShiftTo;\nBigInteger.prototype.lShiftTo = bnpLShiftTo;\nBigInteger.prototype.rShiftTo = bnpRShiftTo;\nBigInteger.prototype.subTo = bnpSubTo;\nBigInteger.prototype.multiplyTo = bnpMultiplyTo;\nBigInteger.prototype.squareTo = bnpSquareTo;\nBigInteger.prototype.divRemTo = bnpDivRemTo;\nBigInteger.prototype.invDigit = bnpInvDigit;\nBigInteger.prototype.isEven = bnpIsEven;\nBigInteger.prototype.exp = bnpExp;\n\n// public\nBigInteger.prototype.toString = bnToString;\nBigInteger.prototype.negate = bnNegate;\nBigInteger.prototype.abs = bnAbs;\nBigInteger.prototype.compareTo = bnCompareTo;\nBigInteger.prototype.bitLength = bnBitLength;\nBigInteger.prototype.mod = bnMod;\nBigInteger.prototype.modPowInt = bnModPowInt;\n\n// \"constants\"\nBigInteger.ZERO = nbv(0);\nBigInteger.ONE = nbv(1);\n","// Copyright (c) 2005-2009 Tom Wu\n// All Rights Reserved.\n// See \"LICENSE\" for details.\n\n// Extended JavaScript BN functions, required for RSA private ops.\n\n// Version 1.1: new BigInteger(\"0\", 10) returns \"proper\" zero\n// Version 1.2: square() API, isProbablePrime fix\n\nimport {BigInteger, nbi, nbv, nbits, intAt, Classic, Montgomery} from \"./jsbn\";\nexport {BigInteger} from \"./jsbn\";\n// (public)\nfunction bnClone() { var r = nbi(); this.copyTo(r); return r; }\n\n// (public) return value as integer\nfunction bnIntValue() {\n if(this.s < 0) {\n if(this.t == 1) return this[0]-this.DV;\n else if(this.t == 0) return -1;\n }\n else if(this.t == 1) return this[0];\n else if(this.t == 0) return 0;\n // assumes 16 < DB < 32\n return ((this[1]&((1<<(32-this.DB))-1))<<this.DB)|this[0];\n}\n\n// (public) return value as byte\nfunction bnByteValue() { return (this.t==0)?this.s:(this[0]<<24)>>24; }\n\n// (public) return value as short (assumes DB>=16)\nfunction bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; }\n\n// (protected) return x s.t. r^x < DV\nfunction bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); }\n\n// (public) 0 if this == 0, 1 if this > 0\nfunction bnSigNum() {\n if(this.s < 0) return -1;\n else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0;\n else return 1;\n}\n\n// (protected) convert to radix string\nfunction bnpToRadix(b) {\n if(b == null) b = 10;\n if(this.signum() == 0 || b < 2 || b > 36) return \"0\";\n var cs = this.chunkSize(b);\n var a = Math.pow(b,cs);\n var d = nbv(a), y = nbi(), z = nbi(), r = \"\";\n this.divRemTo(d,y,z);\n while(y.signum() > 0) {\n r = (a+z.intValue()).toString(b).substr(1) + r;\n y.divRemTo(d,y,z);\n }\n return z.intValue().toString(b) + r;\n}\n\n// (protected) convert from radix string\nfunction bnpFromRadix(s,b) {\n this.fromInt(0);\n if(b == null) b = 10;\n var cs = this.chunkSize(b);\n var d = Math.pow(b,cs), mi = false, j = 0, w = 0;\n for(var i = 0; i < s.length; ++i) {\n var x = intAt(s,i);\n if(x < 0) {\n if(s.charAt(i) == \"-\" && this.signum() == 0) mi = true;\n continue;\n }\n w = b*w+x;\n if(++j >= cs) {\n this.dMultiply(d);\n this.dAddOffset(w,0);\n j = 0;\n w = 0;\n }\n }\n if(j > 0) {\n this.dMultiply(Math.pow(b,j));\n this.dAddOffset(w,0);\n }\n if(mi) BigInteger.ZERO.subTo(this,this);\n}\n\n// (protected) alternate constructor\nfunction bnpFromNumber(a,b,c) {\n if(\"number\" == typeof b) {\n // new BigInteger(int,int,RNG)\n if(a < 2) this.fromInt(1);\n else {\n this.fromNumber(a,c);\n if(!this.testBit(a-1))\t// force MSB set\n this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);\n if(this.isEven()) this.dAddOffset(1,0); // force odd\n while(!this.isProbablePrime(b)) {\n this.dAddOffset(2,0);\n if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this);\n }\n }\n }\n else {\n // new BigInteger(int,RNG)\n var x = [], t = a&7;\n x.length = (a>>3)+1;\n b.nextBytes(x);\n if(t > 0) x[0] &= ((1<<t)-1); else x[0] = 0;\n this.fromString(x,256);\n }\n}\n\n// (public) convert to bigendian byte array\nfunction bnToByteArray() {\n var i = this.t, r = [];\n r[0] = this.s;\n var p = this.DB-(i*this.DB)%8, d, k = 0;\n if(i-- > 0) {\n if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p)\n r[k++] = d|(this.s<<(this.DB-p));\n while(i >= 0) {\n if(p < 8) {\n d = (this[i]&((1<<p)-1))<<(8-p);\n d |= this[--i]>>(p+=this.DB-8);\n }\n else {\n d = (this[i]>>(p-=8))&0xff;\n if(p <= 0) { p += this.DB; --i; }\n }\n if((d&0x80) != 0) d |= -256;\n if(k == 0 && (this.s&0x80) != (d&0x80)) ++k;\n if(k > 0 || d != this.s) r[k++] = d;\n }\n }\n return r;\n}\n\nfunction bnEquals(a) { return(this.compareTo(a)==0); }\nfunction bnMin(a) { return(this.compareTo(a)<0)?this:a; }\nfunction bnMax(a) { return(this.compareTo(a)>0)?this:a; }\n\n// (protected) r = this op a (bitwise)\nfunction bnpBitwiseTo(a,op,r) {\n var i, f, m = Math.min(a.t,this.t);\n for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]);\n if(a.t < this.t) {\n f = a.s&this.DM;\n for(i = m; i < this.t; ++i) r[i] = op(this[i],f);\n r.t = this.t;\n }\n else {\n f = this.s&this.DM;\n for(i = m; i < a.t; ++i) r[i] = op(f,a[i]);\n r.t = a.t;\n }\n r.s = op(this.s,a.s);\n r.clamp();\n}\n\n// (public) this & a\nfunction op_and(x,y) { return x&y; }\nfunction bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; }\n\n// (public) this | a\nfunction op_or(x,y) { return x|y; }\nfunction bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; }\n\n// (public) this ^ a\nfunction op_xor(x,y) { return x^y; }\nfunction bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; }\n\n// (public) this & ~a\nfunction op_andnot(x,y) { return x&~y; }\nfunction bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; }\n\n// (public) ~this\nfunction bnNot() {\n var r = nbi();\n for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i];\n r.t = this.t;\n r.s = ~this.s;\n return r;\n}\n\n// (public) this << n\nfunction bnShiftLeft(n) {\n var r = nbi();\n if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r);\n return r;\n}\n\n// (public) this >> n\nfunction bnShiftRight(n) {\n var r = nbi();\n if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r);\n return r;\n}\n\n// return index of lowest 1-bit in x, x < 2^31\nfunction lbit(x) {\n if(x == 0) return -1;\n var r = 0;\n if((x&0xffff) == 0) { x >>= 16; r += 16; }\n if((x&0xff) == 0) { x >>= 8; r += 8; }\n if((x&0xf) == 0) { x >>= 4; r += 4; }\n if((x&3) == 0) { x >>= 2; r += 2; }\n if((x&1) == 0) ++r;\n return r;\n}\n\n// (public) returns index of lowest 1-bit (or -1 if none)\nfunction bnGetLowestSetBit() {\n for(var i = 0; i < this.t; ++i)\n if(this[i] != 0) return i*this.DB+lbit(this[i]);\n if(this.s < 0) return this.t*this.DB;\n return -1;\n}\n\n// return number of 1 bits in x\nfunction cbit(x) {\n var r = 0;\n while(x != 0) { x &= x-1; ++r; }\n return r;\n}\n\n// (public) return number of set bits\nfunction bnBitCount() {\n var r = 0, x = this.s&this.DM;\n for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x);\n return r;\n}\n\n// (public) true iff nth bit is set\nfunction bnTestBit(n) {\n var j = Math.floor(n/this.DB);\n if(j >= this.t) return(this.s!=0);\n return((this[j]&(1<<(n%this.DB)))!=0);\n}\n\n// (protected) this op (1<<n)\nfunction bnpChangeBit(n,op) {\n var r = BigInteger.ONE.shiftLeft(n);\n this.bitwiseTo(r,op,r);\n return r;\n}\n\n// (public) this | (1<<n)\nfunction bnSetBit(n) { return this.changeBit(n,op_or); }\n\n// (public) this & ~(1<<n)\nfunction bnClearBit(n) { return this.changeBit(n,op_andnot); }\n\n// (public) this ^ (1<<n)\nfunction bnFlipBit(n) { return this.changeBit(n,op_xor); }\n\n// (protected) r = this + a\nfunction bnpAddTo(a,r) {\n var i = 0, c = 0, m = Math.min(a.t,this.t);\n while(i < m) {\n c += this[i]+a[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n if(a.t < this.t) {\n c += a.s;\n while(i < this.t) {\n c += this[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while(i < a.t) {\n c += a[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += a.s;\n }\n r.s = (c<0)?-1:0;\n if(c > 0) r[i++] = c;\n else if(c < -1) r[i++] = this.DV+c;\n r.t = i;\n r.clamp();\n}\n\n// (public) this + a\nfunction bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; }\n\n// (public) this - a\nfunction bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; }\n\n// (public) this * a\nfunction bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; }\n\n// (public) this^2\nfunction bnSquare() { var r = nbi(); this.squareTo(r); return r; }\n\n// (public) this / a\nfunction bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }\n\n// (public) this % a\nfunction bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; }\n\n// (public) [this/a,this%a]\nfunction bnDivideAndRemainder(a) {\n var q = nbi(), r = nbi();\n this.divRemTo(a,q,r);\n return new Array(q,r);\n}\n\n// (protected) this *= n, this >= 0, 1 < n < DV\nfunction bnpDMultiply(n) {\n this[this.t] = this.am(0,n-1,this,0,0,this.t);\n ++this.t;\n this.clamp();\n}\n\n// (protected) this += n << w words, this >= 0\nfunction bnpDAddOffset(n,w) {\n if(n == 0) return;\n while(this.t <= w) this[this.t++] = 0;\n this[w] += n;\n while(this[w] >= this.DV) {\n this[w] -= this.DV;\n if(++w >= this.t) this[this.t++] = 0;\n ++this[w];\n }\n}\n\n// A \"null\" reducer\nfunction NullExp() {}\nfunction nNop(x) { return x; }\nfunction nMulTo(x,y,r) { x.multiplyTo(y,r); }\nfunction nSqrTo(x,r) { x.squareTo(r); }\n\nNullExp.prototype.convert = nNop;\nNullExp.prototype.revert = nNop;\nNullExp.prototype.mulTo = nMulTo;\nNullExp.prototype.sqrTo = nSqrTo;\n\n// (public) this^e\nfunction bnPow(e) { return this.exp(e,new NullExp()); }\n\n// (protected) r = lower n words of \"this * a\", a.t <= n\n// \"this\" should be the larger one if appropriate.\nfunction bnpMultiplyLowerTo(a,n,r) {\n var i = Math.min(this.t+a.t,n);\n r.s = 0; // assumes a,this >= 0\n r.t = i;\n while(i > 0) r[--i] = 0;\n var j;\n for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t);\n for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i);\n r.clamp();\n}\n\n// (protected) r = \"this * a\" without lower n words, n > 0\n// \"this\" should be the larger one if appropriate.\nfunction bnpMultiplyUpperTo(a,n,r) {\n --n;\n var i = r.t = this.t+a.t-n;\n r.s = 0; // assumes a,this >= 0\n while(--i >= 0) r[i] = 0;\n for(i = Math.max(n-this.t,0); i < a.t; ++i)\n r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n);\n r.clamp();\n r.drShiftTo(1,r);\n}\n\n// Barrett modular reduction\nfunction Barrett(m) {\n // setup Barrett\n this.r2 = nbi();\n this.q3 = nbi();\n BigInteger.ONE.dlShiftTo(2*m.t,this.r2);\n this.mu = this.r2.divide(m);\n this.m = m;\n}\n\nfunction barrettConvert(x) {\n if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m);\n else if(x.compareTo(this.m) < 0) return x;\n else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; }\n}\n\nfunction barrettRevert(x) { return x; }\n\n// x = x mod m (HAC 14.42)\nfunction barrettReduce(x) {\n x.drShiftTo(this.m.t-1,this.r2);\n if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); }\n this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);\n this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);\n while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1);\n x.subTo(this.r2,x);\n while(x.compareTo(this.m) >= 0) x.subTo(this.m,x);\n}\n\n// r = x^2 mod m; x != r\nfunction barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n// r = x*y mod m; x,y != r\nfunction barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n\nBarrett.prototype.convert = barrettConvert;\nBarrett.prototype.revert = barrettRevert;\nBarrett.prototype.reduce = barrettReduce;\nBarrett.prototype.mulTo = barrettMulTo;\nBarrett.prototype.sqrTo = barrettSqrTo;\n\n// (public) this^e % m (HAC 14.85)\nfunction bnModPow(e,m) {\n var i = e.bitLength(), k, r = nbv(1), z;\n if(i <= 0) return r;\n else if(i < 18) k = 1;\n else if(i < 48) k = 3;\n else if(i < 144) k = 4;\n else if(i < 768) k = 5;\n else k = 6;\n if(i < 8)\n z = new Classic(m);\n else if(m.isEven())\n z = new Barrett(m);\n else\n z = new Montgomery(m);\n\n // precomputation\n var g = [], n = 3, k1 = k-1, km = (1<<k)-1;\n g[1] = z.convert(this);\n if(k > 1) {\n var g2 = nbi();\n z.sqrTo(g[1],g2);\n while(n <= km) {\n g[n] = nbi();\n z.mulTo(g2,g[n-2],g[n]);\n n += 2;\n }\n }\n\n var j = e.t-1, w, is1 = true, r2 = nbi(), t;\n i = nbits(e[j])-1;\n while(j >= 0) {\n if(i >= k1) w = (e[j]>>(i-k1))&km;\n else {\n w = (e[j]&((1<<(i+1))-1))<<(k1-i);\n if(j > 0) w |= e[j-1]>>(this.DB+i-k1);\n }\n\n n = k;\n while((w&1) == 0) { w >>= 1; --n; }\n if((i -= n) < 0) { i += this.DB; --j; }\n if(is1) {\t// ret == 1, don't bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n }\n else {\n while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; }\n if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; }\n z.mulTo(r2,g[w],r);\n }\n\n while(j >= 0 && (e[j]&(1<<i)) == 0) {\n z.sqrTo(r,r2); t = r; r = r2; r2 = t;\n if(--i < 0) { i = this.DB-1; --j; }\n }\n }\n return z.revert(r);\n}\n\n// (public) gcd(this,a) (HAC 14.54)\nfunction bnGCD(a) {\n var x = (this.s<0)?this.negate():this.clone();\n var y = (a.s<0)?a.negate():a.clone();\n if(x.compareTo(y) < 0) { var t = x; x = y; y = t; }\n var i = x.getLowestSetBit(), g = y.getLowestSetBit();\n if(g < 0) return x;\n if(i < g) g = i;\n if(g > 0) {\n x.rShiftTo(g,x);\n y.rShiftTo(g,y);\n }\n while(x.signum() > 0) {\n if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x);\n if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y);\n if(x.compareTo(y) >= 0) {\n x.subTo(y,x);\n x.rShiftTo(1,x);\n }\n else {\n y.subTo(x,y);\n y.rShiftTo(1,y);\n }\n }\n if(g > 0) y.lShiftTo(g,y);\n return y;\n}\n\n// (protected) this % n, n < 2^26\nfunction bnpModInt(n) {\n if(n <= 0) return 0;\n var d = this.DV%n, r = (this.s<0)?n-1:0;\n if(this.t > 0)\n if(d == 0) r = this[0]%n;\n else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n;\n return r;\n}\n\n// (public) 1/this % m (HAC 14.61)\nfunction bnModInverse(m) {\n var ac = m.isEven();\n if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;\n var u = m.clone(), v = this.clone();\n var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1);\n while(u.signum() != 0) {\n while(u.isEven()) {\n u.rShiftTo(1,u);\n if(ac) {\n if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); }\n a.rShiftTo(1,a);\n }\n else if(!b.isEven()) b.subTo(m,b);\n b.rShiftTo(1,b);\n }\n while(v.isEven()) {\n v.rShiftTo(1,v);\n if(ac) {\n if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); }\n c.rShiftTo(1,c);\n }\n else if(!d.isEven()) d.subTo(m,d);\n d.rShiftTo(1,d);\n }\n if(u.compareTo(v) >= 0) {\n u.subTo(v,u);\n if(ac) a.subTo(c,a);\n b.subTo(d,b);\n }\n else {\n v.subTo(u,v);\n if(ac) c.subTo(a,c);\n d.subTo(b,d);\n }\n }\n if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;\n if(d.compareTo(m) >= 0) return d.subtract(m);\n if(d.signum() < 0) d.addTo(m,d); else return d;\n if(d.signum() < 0) return d.add(m); else return d;\n}\n\nvar lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];\nvar lplim = (1<<26)/lowprimes[lowprimes.length-1];\n\n// (public) test primality with certainty >= 1-.5^t\nfunction bnIsProbablePrime(t) {\n var i, x = this.abs();\n if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) {\n for(i = 0; i < lowprimes.length; ++i)\n if(x[0] == lowprimes[i]) return true;\n return false;\n }\n if(x.isEven()) return false;\n i = 1;\n while(i < lowprimes.length) {\n var m = lowprimes[i], j = i+1;\n while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];\n m = x.modInt(m);\n while(i < j) if(m%lowprimes[i++] == 0) return false;\n }\n return x.millerRabin(t);\n}\n\n// (protected) true if probably prime (HAC 4.24, Miller-Rabin)\nfunction bnpMillerRabin(t) {\n var n1 = this.subtract(BigInteger.ONE);\n var k = n1.getLowestSetBit();\n if(k <= 0) return false;\n var r = n1.shiftRight(k);\n t = (t+1)>>1;\n if(t > lowprimes.length) t = lowprimes.length;\n var a = nbi();\n for(var i = 0; i < t; ++i) {\n //Pick bases at random, instead of starting at 2\n a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);\n var y = a.modPow(r,this);\n if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {\n var j = 1;\n while(j++ < k && y.compareTo(n1) != 0) {\n y = y.modPowInt(2,this);\n if(y.compareTo(BigInteger.ONE) == 0) return false;\n }\n if(y.compareTo(n1) != 0) return false;\n }\n }\n return true;\n}\n\n// protected\nBigInteger.prototype.chunkSize = bnpChunkSize;\nBigInteger.prototype.toRadix = bnpToRadix;\nBigInteger.prototype.fromRadix = bnpFromRadix;\nBigInteger.prototype.fromNumber = bnpFromNumber;\nBigInteger.prototype.bitwiseTo = bnpBitwiseTo;\nBigInteger.prototype.changeBit = bnpChangeBit;\nBigInteger.prototype.addTo = bnpAddTo;\nBigInteger.prototype.dMultiply = bnpDMultiply;\nBigInteger.prototype.dAddOffset = bnpDAddOffset;\nBigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;\nBigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;\nBigInteger.prototype.modInt = bnpModInt;\nBigInteger.prototype.millerRabin = bnpMillerRabin;\n\n// public\nBigInteger.prototype.clone = bnClone;\nBigInteger.prototype.intValue = bnIntValue;\nBigInteger.prototype.byteValue = bnByteValue;\nBigInteger.prototype.shortValue = bnShortValue;\nBigInteger.prototype.signum = bnSigNum;\nBigInteger.prototype.toByteArray = bnToByteArray;\nBigInteger.prototype.equals = bnEquals;\nBigInteger.prototype.min = bnMin;\nBigInteger.prototype.max = bnMax;\nBigInteger.prototype.and = bnAnd;\nBigInteger.prototype.or = bnOr;\nBigInteger.prototype.xor = bnXor;\nBigInteger.prototype.andNot = bnAndNot;\nBigInteger.prototype.not = bnNot;\nBigInteger.prototype.shiftLeft = bnShiftLeft;\nBigInteger.prototype.shiftRight = bnShiftRight;\nBigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;\nBigInteger.prototype.bitCount = bnBitCount;\nBigInteger.prototype.testBit = bnTestBit;\nBigInteger.prototype.setBit = bnSetBit;\nBigInteger.prototype.clearBit = bnClearBit;\nBigInteger.prototype.flipBit = bnFlipBit;\nBigInteger.prototype.add = bnAdd;\nBigInteger.prototype.subtract = bnSubtract;\nBigInteger.prototype.multiply = bnMultiply;\nBigInteger.prototype.divide = bnDivide;\nBigInteger.prototype.remainder = bnRemainder;\nBigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;\nBigInteger.prototype.modPow = bnModPow;\nBigInteger.prototype.modInverse = bnModInverse;\nBigInteger.prototype.pow = bnPow;\nBigInteger.prototype.gcd = bnGCD;\nBigInteger.prototype.isProbablePrime = bnIsProbablePrime;\n\n// JSBN-specific extension\nBigInteger.prototype.square = bnSquare;\n\n// BigInteger interfaces not implemented in jsbn:\n\n// BigInteger(int signum, byte[] magnitude)\n// double doubleValue()\n// float floatValue()\n// int hashCode()\n// long longValue()\n// static BigInteger valueOf(long val)\n","// Version 1.1: support utf-8 encoding in pkcs1pad2\n\n// convert a (hex) string to a bignum object\n\nimport {BigInteger} from \"./jsbn2\";\nimport {SecureRandom} from \"./rng\";\n\nexport function parseBigInt(str,r) {\n return new BigInteger(str,r);\n}\n\nfunction linebrk(s,n) {\n var ret = \"\";\n var i = 0;\n while(i + n < s.length) {\n ret += s.substring(i,i+n) + \"\\n\";\n i += n;\n }\n return ret + s.substring(i,s.length);\n}\n\nfunction byte2Hex(b) {\n if(b < 0x10)\n return \"0\" + b.toString(16);\n else\n return b.toString(16);\n}\n\n// PKCS#1 (type 2, random) pad input string s to n bytes, and return a bigint\nfunction pkcs1pad2(s,n) {\n if(n < s.length + 11) { // TODO: fix for utf-8\n console.error(\"Message too long for RSA\");\n return null;\n }\n var ba = [];\n var i = s.length - 1;\n while(i >= 0 && n > 0) {\n var c = s.charCodeAt(i--);\n if(c < 128) { // encode using utf-8\n ba[--n] = c;\n }\n else if((c > 127) && (c < 2048)) {\n ba[--n] = (c & 63) | 128;\n ba[--n] = (c >> 6) | 192;\n }\n else {\n ba[--n] = (c & 63) | 128;\n ba[--n] = ((c >> 6) & 63) | 128;\n ba[--n] = (c >> 12) | 224;\n }\n }\n ba[--n] = 0;\n var rng = new SecureRandom();\n var x = [];\n while(n > 2) { // random non-zero pad\n x[0] = 0;\n while(x[0] == 0) rng.nextBytes(x);\n ba[--n] = x[0];\n }\n ba[--n] = 2;\n ba[--n] = 0;\n return new BigInteger(ba);\n}\n\n// \"empty\" RSA key constructor\nexport class RSAKey {\n constructor() {\n this.n = null;\n this.e = 0;\n this.d = null;\n this.p = null;\n this.q = null;\n this.dmp1 = null;\n this.dmq1 = null;\n this.coeff = null;\n }\n}\n\n// Set the public key fields N and e from hex strings\nfunction RSASetPublic(N,E) {\n if(N != null && E != null && N.length > 0 && E.length > 0) {\n this.n = parseBigInt(N,16);\n this.e = parseInt(E,16);\n }\n else\n console.error(\"Invalid RSA public key\");\n}\n\n// Perform raw public operation on \"x\": return x^e (mod n)\nfunction RSADoPublic(x) {\n return x.modPowInt(this.e, this.n);\n}\n\n// Return the PKCS#1 RSA encryption of \"text\" as an even-length hex string\nfunction RSAEncrypt(text) {\n var m = pkcs1pad2(text,(this.n.bitLength()+7)>>3);\n if(m == null) return null;\n var c = this.doPublic(m);\n if(c == null) return null;\n var h = c.toString(16);\n if((h.length & 1) == 0) return h; else return \"0\" + h;\n}\n\n// Return the PKCS#1 RSA encryption of \"text\" as a Base64-encoded string\n//function RSAEncryptB64(text) {\n// var h = this.encrypt(text);\n// if(h) return hex2b64(h); else return null;\n//}\n\n// protected\nRSAKey.prototype.doPublic = RSADoPublic;\n\n// public\nRSAKey.prototype.setPublic = RSASetPublic;\nRSAKey.prototype.encrypt = RSAEncrypt;\n//RSAKey.prototype.encrypt_b64 = RSAEncryptB64;\n","// Version 1.1: support utf-8 decoding in pkcs1unpad2\n\n// Undo PKCS#1 (type 2, random) padding and, if valid, return the plaintext\n\nimport {SecureRandom} from \"./rng\";\nimport {BigInteger} from \"./jsbn\";\nimport {parseBigInt} from \"./rsa\";\nimport {RSAKey} from \"./rsa\";\nexport {RSAKey} from \"./rsa\";\n\nfunction pkcs1unpad2(d,n) {\n var b = d.toByteArray();\n var i = 0;\n while(i < b.length && b[i] == 0) ++i;\n if(b.length-i != n-1 || b[i] != 2)\n return null;\n ++i;\n while(b[i] != 0)\n if(++i >= b.length) return null;\n var ret = \"\";\n while(++i < b.length) {\n var c = b[i] & 255;\n if(c < 128) { // utf-8 decode\n ret += String.fromCharCode(c);\n }\n else if((c > 191) && (c < 224)) {\n ret += String.fromCharCode(((c & 31) << 6) | (b[i+1] & 63));\n ++i;\n }\n else {\n ret += String.fromCharCode(((c & 15) << 12) | ((b[i+1] & 63) << 6) | (b[i+2] & 63));\n i += 2;\n }\n }\n return ret;\n}\n\n// Set the private key fields N, e, and d from hex strings\nfunction RSASetPrivate(N,E,D) {\n if(N != null && E != null && N.length > 0 && E.length > 0) {\n this.n = parseBigInt(N,16);\n this.e = parseInt(E,16);\n this.d = parseBigInt(D,16);\n }\n else\n console.error(\"Invalid RSA private key\");\n}\n\n// Set the private key fields N, e, d and CRT params from hex strings\nfunction RSASetPrivateEx(N,E,D,P,Q,DP,DQ,C) {\n if(N != null && E != null && N.length > 0 && E.length > 0) {\n this.n = parseBigInt(N,16);\n this.e = parseInt(E,16);\n this.d = parseBigInt(D,16);\n this.p = parseBigInt(P,16);\n this.q = parseBigInt(Q,16);\n this.dmp1 = parseBigInt(DP,16);\n this.dmq1 = parseBigInt(DQ,16);\n this.coeff = parseBigInt(C,16);\n }\n else\n console.error(\"Invalid RSA private key\");\n}\n\n// Generate a new random private key B bits long, using public expt E\nfunction RSAGenerate(B,E) {\n var rng = new SecureRandom();\n var qs = B>>1;\n this.e = parseInt(E,16);\n var ee = new BigInteger(E,16);\n for(;;) {\n for(;;) {\n this.p = new BigInteger(B-qs,1,rng);\n if(this.p.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.p.isProbablePrime(10)) break;\n }\n for(;;) {\n this.q = new BigInteger(qs,1,rng);\n if(this.q.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.q.isProbablePrime(10)) break;\n }\n if(this.p.compareTo(this.q) <= 0) {\n var t = this.p;\n this.p = this.q;\n this.q = t;\n }\n var p1 = this.p.subtract(BigInteger.ONE);\n var q1 = this.q.subtract(BigInteger.ONE);\n var phi = p1.multiply(q1);\n if(phi.gcd(ee).compareTo(BigInteger.ONE) == 0) {\n this.n = this.p.multiply(this.q);\n this.d = ee.modInverse(phi);\n this.dmp1 = this.d.mod(p1);\n this.dmq1 = this.d.mod(q1);\n this.coeff = this.q.modInverse(this.p);\n break;\n }\n }\n}\n\n// Perform raw private operation on \"x\": return x^d (mod n)\nfunction RSADoPrivate(x) {\n if(this.p == null || this.q == null)\n return x.modPow(this.d, this.n);\n\n // TODO: re-calculate any missing CRT params\n var xp = x.mod(this.p).modPow(this.dmp1, this.p);\n var xq = x.mod(this.q).modPow(this.dmq1, this.q);\n\n while(xp.compareTo(xq) < 0)\n xp = xp.add(this.p);\n return xp.subtract(xq).multiply(this.coeff).mod(this.p).multiply(this.q).add(xq);\n}\n\n// Return the PKCS#1 RSA decryption of \"ctext\".\n// \"ctext\" is an even-length hex string and the output is a plain string.\nfunction RSADecrypt(ctext) {\n var c = parseBigInt(ctext, 16);\n var m = this.doPrivate(c);\n if(m == null) return null;\n return pkcs1unpad2(m, (this.n.bitLength()+7)>>3);\n}\n\n// Return the PKCS#1 RSA decryption of \"ctext\".\n// \"ctext\" is a Base64-encoded string and the output is a plain string.\n//function RSAB64Decrypt(ctext) {\n// var h = b64tohex(ctext);\n// if(h) return this.decrypt(h); else return null;\n//}\n\n// protected\nRSAKey.prototype.doPrivate = RSADoPrivate;\n\n// public\nRSAKey.prototype.setPrivate = RSASetPrivate;\nRSAKey.prototype.setPrivateEx = RSASetPrivateEx;\nRSAKey.prototype.generate = RSAGenerate;\nRSAKey.prototype.decrypt = RSADecrypt;\n//RSAKey.prototype.b64_decrypt = RSAB64Decrypt;","// Base64 JavaScript decoder\n// Copyright (c) 2008-2013 Lapo Luchini <lapo@lapo.it>\n\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\n\nexport const Base64 = {};\nlet decoder;\n\nBase64.decode = function (a) {\n var i;\n if (decoder === undefined) {\n var b64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",\n ignore = \"= \\f\\n\\r\\t\\u00A0\\u2028\\u2029\";\n decoder = [];\n for (i = 0; i < 64; ++i)\n decoder[b64.charAt(i)] = i;\n for (i = 0; i < ignore.length; ++i)\n decoder[ignore.charAt(i)] = -1;\n }\n var out = [];\n var bits = 0, char_count = 0;\n for (i = 0; i < a.length; ++i) {\n var c = a.charAt(i);\n if (c == '=')\n break;\n c = decoder[c];\n if (c == -1)\n continue;\n if (c === undefined)\n throw 'Illegal character at offset ' + i;\n bits |= c;\n if (++char_count >= 4) {\n out[out.length] = (bits >> 16);\n out[out.length] = (bits >> 8) & 0xFF;\n out[out.length] = bits & 0xFF;\n bits = 0;\n char_count = 0;\n } else {\n bits <<= 6;\n }\n }\n switch (char_count) {\n case 1:\n throw \"Base64 encoding incomplete: at least 2 bits missing\";\n case 2:\n out[out.length] = (bits >> 10);\n break;\n case 3:\n out[out.length] = (bits >> 16);\n out[out.length] = (bits >> 8) & 0xFF;\n break;\n }\n return out;\n};\n\nBase64.re = /-----BEGIN [^-]+-----([A-Za-z0-9+\\/=\\s]+)-----END [^-]+-----|begin-base64[^\\n]+\\n([A-Za-z0-9+\\/=\\s]+)====/;\nBase64.unarmor = function (a) {\n var m = Base64.re.exec(a);\n if (m) {\n if (m[1])\n a = m[1];\n else if (m[2])\n a = m[2];\n else\n throw \"RegExp out of sync\";\n }\n return Base64.decode(a);\n};\n","// Hex JavaScript decoder\n// Copyright (c) 2008-2013 Lapo Luchini <lapo@lapo.it>\n\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\nexport const Hex = {};\nlet decoder;\n\nHex.decode = function(a) {\n var i;\n if (decoder === undefined) {\n var hex = \"0123456789ABCDEF\",\n ignore = \" \\f\\n\\r\\t\\u00A0\\u2028\\u2029\";\n decoder = [];\n for (i = 0; i < 16; ++i)\n decoder[hex.charAt(i)] = i;\n hex = hex.toLowerCase();\n for (i = 10; i < 16; ++i)\n decoder[hex.charAt(i)] = i;\n for (i = 0; i < ignore.length; ++i)\n decoder[ignore.charAt(i)] = -1;\n }\n var out = [],\n bits = 0,\n char_count = 0;\n for (i = 0; i < a.length; ++i) {\n var c = a.charAt(i);\n if (c == '=')\n break;\n c = decoder[c];\n if (c == -1)\n continue;\n if (c === undefined)\n throw 'Illegal character at offset ' + i;\n bits |= c;\n if (++char_count >= 2) {\n out[out.length] = bits;\n bits = 0;\n char_count = 0;\n } else {\n bits <<= 4;\n }\n }\n if (char_count)\n throw \"Hex encoding incomplete: 4 bits missing\";\n return out;\n};","import {BigInteger} from \"../jsbn/jsbn2\";\n/*! asn1-1.0.2.js (c) 2013 Kenji Urushima | kjur.github.com/jsrsasign/license\n */\n\nexport const JSX = /*window.JSX || */{};\nJSX.env = JSX.env || {};\n\nvar L = JSX, OP = Object.prototype, FUNCTION_TOSTRING = '[object Function]',ADD = [\"toString\", \"valueOf\"];\n\nJSX.env.parseUA = function(agent) {\n\n var numberify = function(s) {\n var c = 0;\n return parseFloat(s.replace(/\\./g, function() {\n return (c++ == 1) ? '' : '.';\n }));\n },\n\n nav = navigator,\n o = {\n ie: 0,\n opera: 0,\n gecko: 0,\n webkit: 0,\n chrome: 0,\n mobile: null,\n air: 0,\n ipad: 0,\n iphone: 0,\n ipod: 0,\n ios: null,\n android: 0,\n webos: 0,\n caja: nav && nav.cajaVersion,\n secure: false,\n os: null\n\n },\n\n ua = agent || (navigator && navigator.userAgent),\n loc = window && window.location,\n href = loc && loc.href,\n m;\n\n o.secure = href && (href.toLowerCase().indexOf(\"https\") === 0);\n\n if (ua) {\n\n if ((/windows|win32/i).test(ua)) {\n o.os = 'windows';\n } else if ((/macintosh/i).test(ua)) {\n o.os = 'macintosh';\n } else if ((/rhino/i).test(ua)) {\n o.os = 'rhino';\n }\n if ((/KHTML/).test(ua)) {\n o.webkit = 1;\n }\n m = ua.match(/AppleWebKit\\/([^\\s]*)/);\n if (m && m[1]) {\n o.webkit = numberify(m[1]);\n if (/ Mobile\\//.test(ua)) {\n o.mobile = 'Apple'; // iPhone or iPod Touch\n m = ua.match(/OS ([^\\s]*)/);\n if (m && m[1]) {\n m = numberify(m[1].replace('_', '.'));\n }\n o.ios = m;\n o.ipad = o.ipod = o.iphone = 0;\n m = ua.match(/iPad|iPod|iPhone/);\n if (m && m[0]) {\n o[m[0].toLowerCase()] = o.ios;\n }\n } else {\n m = ua.match(/NokiaN[^\\/]*|Android \\d\\.\\d|webOS\\/\\d\\.\\d/);\n if (m) {\n o.mobile = m[0];\n }\n if (/webOS/.test(ua)) {\n o.mobile = 'WebOS';\n m = ua.match(/webOS\\/([^\\s]*);/);\n if (m && m[1]) {\n o.webos = numberify(m[1]);\n }\n }\n if (/ Android/.test(ua)) {\n o.mobile = 'Android';\n m = ua.match(/Android ([^\\s]*);/);\n if (m && m[1]) {\n o.android = numberify(m[1]);\n }\n }\n }\n m = ua.match(/Chrome\\/([^\\s]*)/);\n if (m && m[1]) {\n o.chrome = numberify(m[1]); // Chrome\n } else {\n m = ua.match(/AdobeAIR\\/([^\\s]*)/);\n if (m) {\n o.air = m[0]; // Adobe AIR 1.0 or better\n }\n }\n }\n if (!o.webkit) {\n m = ua.match(/Opera[\\s\\/]([^\\s]*)/);\n if (m && m[1]) {\n o.opera = numberify(m[1]);\n m = ua.match(/Version\\/([^\\s]*)/);\n if (m && m[1]) {\n o.opera = numberify(m[1]); // opera 10+\n }\n m = ua.match(/Opera Mini[^;]*/);\n if (m) {\n o.mobile = m[0]; // ex: Opera Mini/2.0.4509/1316\n }\n } else { // not opera or webkit\n m = ua.match(/MSIE\\s([^;]*)/);\n if (m && m[1]) {\n o.ie = numberify(m[1]);\n } else { // not opera, webkit, or ie\n m = ua.match(/Gecko\\/([^\\s]*)/);\n if (m) {\n o.gecko = 1; // Gecko detected, look for revision\n m = ua.match(/rv:([^\\s\\)]*)/);\n if (m && m[1]) {\n o.gecko = numberify(m[1]);\n }\n }\n }\n }\n }\n }\n return o;\n};\n\nJSX.env.ua = JSX.env.parseUA();\n\nJSX.isFunction = function(o) {\n return (typeof o === 'function') || OP.toString.apply(o) === FUNCTION_TOSTRING;\n};\n\nJSX._IEEnumFix = (JSX.env.ua.ie) ? function(r, s) {\n var i, fname, f;\n for (i=0;i<ADD.length;i=i+1) {\n\n fname = ADD[i];\n f = s[fname];\n\n if (L.isFunction(f) && f!=OP[fname]) {\n r[fname]=f;\n }\n }\n} : function(){};\n\nJSX.extend = function(subc, superc, overrides) {\n if (!superc||!subc) {\n throw new Error(\"extend failed, please check that \" +\n \"all dependencies are included.\");\n }\n var F = function() {}, i;\n F.prototype=superc.prototype;\n subc.prototype=new F();\n subc.prototype.constructor=subc;\n subc.superclass=superc.prototype;\n if (superc.prototype.constructor == OP.constructor) {\n superc.prototype.constructor=superc;\n }\n\n if (overrides) {\n for (i in overrides) {\n if (L.hasOwnProperty(overrides, i)) {\n subc.prototype[i]=overrides[i];\n }\n }\n\n L._IEEnumFix(subc.prototype, overrides);\n }\n};\n\n/*\n * asn1.js - ASN.1 DER encoder classes\n *\n * Copyright (c) 2013 Kenji Urushima (kenji.urushima@gmail.com)\n *\n * This software is licensed under the terms of the MIT License.\n * http://kjur.github.com/jsrsasign/license\n *\n * The above copyright and license notice shall be \n * included in all copies or substantial portions of the Software.\n */\n\n/**\n * @fileOverview\n * @name asn1-1.0.js\n * @author Kenji Urushima kenji.urushima@gmail.com\n * @version 1.0.2 (2013-May-30)\n * @since 2.1\n * @license <a href=\"http://kjur.github.io/jsrsasign/license/\">MIT License</a>\n */\n\n/** \n * kjur's class library name space\n * <p>\n * This name space provides following name spaces:\n * <ul>\n * <li>{@link KJUR.asn1} - ASN.1 primitive hexadecimal encoder</li>\n * <li>{@link KJUR.asn1.x509} - ASN.1 structure for X.509 certificate and CRL</li>\n * <li>{@link KJUR.crypto} - Java Cryptographic Extension(JCE) style MessageDigest/Signature \n * class and utilities</li>\n * </ul>\n * </p> \n * NOTE: Please ignore method summary and document of this namespace. This caused by a bug of jsdoc2.\n * @name KJUR\n * @namespace kjur's class library name space\n */\n// if (typeof KJUR == \"undefined\" || !KJUR)\nexport const KJUR = {};\n\n/**\n * kjur's ASN.1 class library name space\n * <p>\n * This is ITU-T X.690 ASN.1 DER encoder class library and\n * class structure and methods is very similar to \n * org.bouncycastle.asn1 package of \n * well known BouncyCaslte Cryptography Library.\n *\n * <h4>PROVIDING ASN.1 PRIMITIVES</h4>\n * Here are ASN.1 DER primitive classes.\n * <ul>\n * <li>{@link KJUR.asn1.DERBoolean}</li>\n * <li>{@link KJUR.asn1.DERInteger}</li>\n * <li>{@link KJUR.asn1.DERBitString}</li>\n * <li>{@link KJUR.asn1.DEROctetString}</li>\n * <li>{@link KJUR.asn1.DERNull}</li>\n * <li>{@link KJUR.asn1.DERObjectIdentifier}</li>\n * <li>{@link KJUR.asn1.DERUTF8String}</li>\n * <li>{@link KJUR.asn1.DERNumericString}</li>\n * <li>{@link KJUR.asn1.DERPrintableString}</li>\n * <li>{@link KJUR.asn1.DERTeletexString}</li>\n * <li>{@link KJUR.asn1.DERIA5String}</li>\n * <li>{@link KJUR.asn1.DERUTCTime}</li>\n * <li>{@link KJUR.asn1.DERGeneralizedTime}</li>\n * <li>{@link KJUR.asn1.DERSequence}</li>\n * <li>{@link KJUR.asn1.DERSet}</li>\n * </ul>\n *\n * <h4>OTHER ASN.1 CLASSES</h4>\n * <ul>\n * <li>{@link KJUR.asn1.ASN1Object}</li>\n * <li>{@link KJUR.asn1.DERAbstractString}</li>\n * <li>{@link KJUR.asn1.DERAbstractTime}</li>\n * <li>{@link KJUR.asn1.DERAbstractStructured}</li>\n * <li>{@link KJUR.asn1.DERTaggedObject}</li>\n * </ul>\n * </p>\n * NOTE: Please ignore method summary and document of this namespace. This caused by a bug of jsdoc2.\n * @name KJUR.asn1\n * @namespace\n */\nif (typeof KJUR.asn1 == \"undefined\" || !KJUR.asn1) KJUR.asn1 = {};\n\n/**\n * ASN1 utilities class\n * @name KJUR.asn1.ASN1Util\n * @classs ASN1 utilities class\n * @since asn1 1.0.2\n */\nKJUR.asn1.ASN1Util = new function() {\n this.integerToByteHex = function(i) {\n\tvar h = i.toString(16);\n\tif ((h.length % 2) == 1) h = '0' + h;\n\treturn h;\n };\n this.bigIntToMinTwosComplementsHex = function(bigIntegerValue) {\n\tvar h = bigIntegerValue.toString(16);\n\tif (h.substr(0, 1) != '-') {\n\t if (h.length % 2 == 1) {\n\t\th = '0' + h;\n\t } else {\n\t\tif (! h.match(/^[0-7]/)) {\n\t\t h = '00' + h;\n\t\t}\n\t }\n\t} else {\n\t var hPos = h.substr(1);\n\t var xorLen = hPos.length;\n\t if (xorLen % 2 == 1) {\n\t\txorLen += 1;\n\t } else {\n\t\tif (! h.match(/^[0-7]/)) {\n\t\t xorLen += 2;\n\t\t}\n\t }\n\t var hMask = '';\n\t for (var i = 0; i < xorLen; i++) {\n\t\thMask += 'f';\n\t }\n\t var biMask = new BigInteger(hMask, 16);\n\t var biNeg = biMask.xor(bigIntegerValue).add(BigInteger.ONE);\n\t h = biNeg.toString(16).replace(/^-/, '');\n\t}\n\treturn h;\n };\n /**\n * get PEM string from hexadecimal data and header string\n * @name getPEMStringFromHex\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {String} dataHex hexadecimal string of PEM body\n * @param {String} pemHeader PEM header string (ex. 'RSA PRIVATE KEY')\n * @return {String} PEM formatted string of input data\n * @description\n * @example\n * var pem = KJUR.asn1.ASN1Util.getPEMStringFromHex('616161', 'RSA PRIVATE KEY');\n * // value of pem will be:\n * -----BEGIN PRIVATE KEY-----\n * YWFh\n * -----END PRIVATE KEY-----\n */\n this.getPEMStringFromHex = function(dataHex, pemHeader) {\n\tvar dataWA = CryptoJS.enc.Hex.parse(dataHex);\n\tvar dataB64 = CryptoJS.enc.Base64.stringify(dataWA);\n\tvar pemBody = dataB64.replace(/(.{64})/g, \"$1\\r\\n\");\n pemBody = pemBody.replace(/\\r\\n$/, '');\n\treturn \"-----BEGIN \" + pemHeader + \"-----\\r\\n\" + \n pemBody + \n \"\\r\\n-----END \" + pemHeader + \"-----\\r\\n\";\n };\n};\n\n// ********************************************************************\n// Abstract ASN.1 Classes\n// ********************************************************************\n\n// ********************************************************************\n\n/**\n * base class for ASN.1 DER encoder object\n * @name KJUR.asn1.ASN1Object\n * @class base class for ASN.1 DER encoder object\n * @property {Boolean} isModified flag whether internal data was changed\n * @property {String} hTLV hexadecimal string of ASN.1 TLV\n * @property {String} hT hexadecimal string of ASN.1 TLV tag(T)\n * @property {String} hL hexadecimal string of ASN.1 TLV length(L)\n * @property {String} hV hexadecimal string of ASN.1 TLV value(V)\n * @description\n */\nKJUR.asn1.ASN1Object = function() {\n var isModified = true;\n var hTLV = null;\n var hT = '00'\n var hL = '00';\n var hV = '';\n\n /**\n * get hexadecimal ASN.1 TLV length(L) bytes from TLV value(V)\n * @name getLengthHexFromValue\n * @memberOf KJUR.asn1.ASN1Object\n * @function\n * @return {String} hexadecimal string of ASN.1 TLV length(L)\n */\n this.getLengthHexFromValue = function() {\n\tif (typeof this.hV == \"undefined\" || this.hV == null) {\n\t throw \"this.hV is null or undefined.\";\n\t}\n\tif (this.hV.length % 2 == 1) {\n\t throw \"value hex must be even length: n=\" + hV.length + \",v=\" + this.hV;\n\t}\n\tvar n = this.hV.length / 2;\n\tvar hN = n.toString(16);\n\tif (hN.length % 2 == 1) {\n\t hN = \"0\" + hN;\n\t}\n\tif (n < 128) {\n\t return hN;\n\t} else {\n\t var hNlen = hN.length / 2;\n\t if (hNlen > 15) {\n\t\tthrow \"ASN.1 length too long to represent by 8x: n = \" + n.toString(16);\n\t }\n\t var head = 128 + hNlen;\n\t return head.toString(16) + hN;\n\t}\n };\n\n /**\n * get hexadecimal string of ASN.1 TLV bytes\n * @name getEncodedHex\n * @memberOf KJUR.asn1.ASN1Object\n * @function\n * @return {String} hexadecimal string of ASN.1 TLV\n */\n this.getEncodedHex = function() {\n\tif (this.hTLV == null || this.isModified) {\n\t this.hV = this.getFreshValueHex();\n\t this.hL = this.getLengthHexFromValue();\n\t this.hTLV = this.hT + this.hL + this.hV;\n\t this.isModified = false;\n\t //console.error(\"first time: \" + this.hTLV);\n\t}\n\treturn this.hTLV;\n };\n\n /**\n * get hexadecimal string of ASN.1 TLV value(V) bytes\n * @name getValueHex\n * @memberOf KJUR.asn1.ASN1Object\n * @function\n * @return {String} hexadecimal string of ASN.1 TLV value(V) bytes\n */\n this.getValueHex = function() {\n\tthis.getEncodedHex();\n\treturn this.hV;\n }\n\n this.getFreshValueHex = function() {\n\treturn '';\n };\n};\n\n// == BEGIN DERAbstractString ================================================\n/**\n * base class for ASN.1 DER string classes\n * @name KJUR.asn1.DERAbstractString\n * @class base class for ASN.1 DER string classes\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @property {String} s internal string of value\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>str - specify initial ASN.1 value(V) by a string</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERAbstractString = function(params) {\n KJUR.asn1.DERAbstractString.superclass.constructor.call(this);\n var s = null;\n var hV = null;\n\n /**\n * get string value of this string object\n * @name getString\n * @memberOf KJUR.asn1.DERAbstractString\n * @function\n * @return {String} string value of this string object\n */\n this.getString = function() {\n\treturn this.s;\n };\n\n /**\n * set value by a string\n * @name setString\n * @memberOf KJUR.asn1.DERAbstractString\n * @function\n * @param {String} newS value by a string to set\n */\n this.setString = function(newS) {\n\tthis.hTLV = null;\n\tthis.isModified = true;\n\tthis.s = newS;\n\tthis.hV = stohex(this.s);\n };\n\n /**\n * set value by a hexadecimal string\n * @name setStringHex\n * @memberOf KJUR.asn1.DERAbstractString\n * @function\n * @param {String} newHexString value by a hexadecimal string to set\n */\n this.setStringHex = function(newHexString) {\n\tthis.hTLV = null;\n\tthis.isModified = true;\n\tthis.s = null;\n\tthis.hV = newHexString;\n };\n\n this.getFreshValueHex = function() {\n\treturn this.hV;\n };\n\n if (typeof params != \"undefined\") {\n\tif (typeof params['str'] != \"undefined\") {\n\t this.setString(params['str']);\n\t} else if (typeof params['hex'] != \"undefined\") {\n\t this.setStringHex(params['hex']);\n\t}\n }\n};\nJSX.extend(KJUR.asn1.DERAbstractString, KJUR.asn1.ASN1Object);\n// == END DERAbstractString ================================================\n\n// == BEGIN DERAbstractTime ==================================================\n/**\n * base class for ASN.1 DER Generalized/UTCTime class\n * @name KJUR.asn1.DERAbstractTime\n * @class base class for ASN.1 DER Generalized/UTCTime class\n * @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERAbstractTime = function(params) {\n KJUR.asn1.DERAbstractTime.superclass.constructor.call(this);\n var s = null;\n var date = null;\n\n // --- PRIVATE METHODS --------------------\n this.localDateToUTC = function(d) {\n\tutc = d.getTime() + (d.getTimezoneOffset() * 60000);\n\tvar utcDate = new Date(utc);\n\treturn utcDate;\n };\n\n this.formatDate = function(dateObject, type) {\n\tvar pad = this.zeroPadding;\n\tvar d = this.localDateToUTC(dateObject);\n\tvar year = String(d.getFullYear());\n\tif (type == 'utc') year = year.substr(2, 2);\n\tvar month = pad(String(d.getMonth() + 1), 2);\n\tvar day = pad(String(d.getDate()), 2);\n\tvar hour = pad(String(d.getHours()), 2);\n\tvar min = pad(String(d.getMinutes()), 2);\n\tvar sec = pad(String(d.getSeconds()), 2);\n\treturn year + month + day + hour + min + sec + 'Z';\n };\n\n this.zeroPadding = function(s, len) {\n\tif (s.length >= len) return s;\n\treturn new Array(len - s.length + 1).join('0') + s;\n };\n\n // --- PUBLIC METHODS --------------------\n /**\n * get string value of this string object\n * @name getString\n * @memberOf KJUR.asn1.DERAbstractTime\n * @function\n * @return {String} string value of this time object\n */\n this.getString = function() {\n\treturn this.s;\n };\n\n /**\n * set value by a string\n * @name setString\n * @memberOf KJUR.asn1.DERAbstractTime\n * @function\n * @param {String} newS value by a string to set such like \"130430235959Z\"\n */\n this.setString = function(newS) {\n\tthis.hTLV = null;\n\tthis.isModified = true;\n\tthis.s = newS;\n\tthis.hV = stohex(this.s);\n };\n\n /**\n * set value by a Date object\n * @name setByDateValue\n * @memberOf KJUR.asn1.DERAbstractTime\n * @function\n * @param {Integer} year year of date (ex. 2013)\n * @param {Integer} month month of date between 1 and 12 (ex. 12)\n * @param {Integer} day day of month\n * @param {Integer} hour hours of date\n * @param {Integer} min minutes of date\n * @param {Integer} sec seconds of date\n */\n this.setByDateValue = function(year, month, day, hour, min, sec) {\n\tvar dateObject = new Date(Date.UTC(year, month - 1, day, hour, min, sec, 0));\n\tthis.setByDate(dateObject);\n };\n\n this.getFreshValueHex = function() {\n\treturn this.hV;\n };\n};\nJSX.extend(KJUR.asn1.DERAbstractTime, KJUR.asn1.ASN1Object);\n// == END DERAbstractTime ==================================================\n\n// == BEGIN DERAbstractStructured ============================================\n/**\n * base class for ASN.1 DER structured class\n * @name KJUR.asn1.DERAbstractStructured\n * @class base class for ASN.1 DER structured class\n * @property {Array} asn1Array internal array of ASN1Object\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERAbstractStructured = function(params) {\n KJUR.asn1.DERAbstractString.superclass.constructor.call(this);\n var asn1Array = null;\n\n /**\n * set value by array of ASN1Object\n * @name setByASN1ObjectArray\n * @memberOf KJUR.asn1.DERAbstractStructured\n * @function\n * @param {array} asn1ObjectArray array of ASN1Object to set\n */\n this.setByASN1ObjectArray = function(asn1ObjectArray) {\n\tthis.hTLV = null;\n\tthis.isModified = true;\n\tthis.asn1Array = asn1ObjectArray;\n };\n\n /**\n * append an ASN1Object to internal array\n * @name appendASN1Object\n * @memberOf KJUR.asn1.DERAbstractStructured\n * @function\n * @param {ASN1Object} asn1Object to add\n */\n this.appendASN1Object = function(asn1Object) {\n\tthis.hTLV = null;\n\tthis.isModified = true;\n\tthis.asn1Array.push(asn1Object);\n };\n\n this.asn1Array = new Array();\n if (typeof params != \"undefined\") {\n\tif (typeof params['array'] != \"undefined\") {\n\t this.asn1Array = params['array'];\n\t}\n }\n};\nJSX.extend(KJUR.asn1.DERAbstractStructured, KJUR.asn1.ASN1Object);\n\n\n// ********************************************************************\n// ASN.1 Object Classes\n// ********************************************************************\n\n// ********************************************************************\n/**\n * class for ASN.1 DER Boolean\n * @name KJUR.asn1.DERBoolean\n * @class class for ASN.1 DER Boolean\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERBoolean = function() {\n KJUR.asn1.DERBoolean.superclass.constructor.call(this);\n this.hT = \"01\";\n this.hTLV = \"0101ff\";\n};\nJSX.extend(KJUR.asn1.DERBoolean, KJUR.asn1.ASN1Object);\n\n// ********************************************************************\n/**\n * class for ASN.1 DER Integer\n * @name KJUR.asn1.DERInteger\n * @class class for ASN.1 DER Integer\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>int - specify initial ASN.1 value(V) by integer value</li>\n * <li>bigint - specify initial ASN.1 value(V) by BigInteger object</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERInteger = function(params) {\n KJUR.asn1.DERInteger.superclass.constructor.call(this);\n this.hT = \"02\";\n\n /**\n * set value by Tom Wu's BigInteger object\n * @name setByBigInteger\n * @memberOf KJUR.asn1.DERInteger\n * @function\n * @param {BigInteger} bigIntegerValue to set\n */\n this.setByBigInteger = function(bigIntegerValue) {\n\tthis.hTLV = null;\n\tthis.isModified = true;\n\tthis.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(bigIntegerValue);\n };\n\n /**\n * set value by integer value\n * @name setByInteger\n * @memberOf KJUR.asn1.DERInteger\n * @function\n * @param {Integer} integer value to set\n */\n this.setByInteger = function(intValue) {\n\tvar bi = new BigInteger(String(intValue), 10);\n\tthis.setByBigInteger(bi);\n };\n\n /**\n * set value by integer value\n * @name setValueHex\n * @memberOf KJUR.asn1.DERInteger\n * @function\n * @param {String} hexadecimal string of integer value\n * @description\n * <br/>\n * NOTE: Value shall be represented by minimum octet length of\n * two's complement representation.\n */\n this.setValueHex = function(newHexString) {\n\tthis.hV = newHexString;\n };\n\n this.getFreshValueHex = function() {\n\treturn this.hV;\n };\n\n if (typeof params != \"undefined\") {\n\tif (typeof params['bigint'] != \"undefined\") {\n\t this.setByBigInteger(params['bigint']);\n\t} else if (typeof params['int'] != \"undefined\") {\n\t this.setByInteger(params['int']);\n\t} else if (typeof params['hex'] != \"undefined\") {\n\t this.setValueHex(params['hex']);\n\t}\n }\n};\nJSX.extend(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object);\n\n// ********************************************************************\n/**\n * class for ASN.1 DER encoded BitString primitive\n * @name KJUR.asn1.DERBitString\n * @class class for ASN.1 DER encoded BitString primitive\n * @extends KJUR.asn1.ASN1Object\n * @description \n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>bin - specify binary string (ex. '10111')</li>\n * <li>array - specify array of boolean (ex. [true,false,true,true])</li>\n * <li>hex - specify hexadecimal string of ASN.1 value(V) including unused bits</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERBitString = function(params) {\n KJUR.asn1.DERBitString.superclass.constructor.call(this);\n this.hT = \"03\";\n\n /**\n * set ASN.1 value(V) by a hexadecimal string including unused bits\n * @name setHexValueIncludingUnusedBits\n * @memberOf KJUR.asn1.DERBitString\n * @function\n * @param {String} newHexStringIncludingUnusedBits\n */\n this.setHexValueIncludingUnusedBits = function(newHexStringIncludingUnusedBits) {\n\tthis.hTLV = null;\n\tthis.isModified = true;\n\tthis.hV = newHexStringIncludingUnusedBits;\n };\n\n /**\n * set ASN.1 value(V) by unused bit and hexadecimal string of value\n * @name setUnusedBitsAndHexValue\n * @memberOf KJUR.asn1.DERBitString\n * @function\n * @param {Integer} unusedBits\n * @param {String} hValue\n */\n this.setUnusedBitsAndHexValue = function(unusedBits, hValue) {\n\tif (unusedBits < 0 || 7 < unusedBits) {\n\t throw \"unused bits shall be from 0 to 7: u = \" + unusedBits;\n\t}\n\tvar hUnusedBits = \"0\" + unusedBits;\n\tthis.hTLV = null;\n\tthis.isModified = true;\n\tthis.hV = hUnusedBits + hValue;\n };\n\n /**\n * set ASN.1 DER BitString by binary string\n * @name setByBinaryString\n * @memberOf KJUR.asn1.DERBitString\n * @function\n * @param {String} binaryString binary value string (i.e. '10111')\n * @description\n * Its unused bits will be calculated automatically by length of \n * 'binaryValue'. <br/>\n * NOTE: Trailing zeros '0' will be ignored.\n */\n this.setByBinaryString = function(binaryString) {\n\tbinaryString = binaryString.replace(/0+$/, '');\n\tvar unusedBits = 8 - binaryString.length % 8;\n\tif (unusedBits == 8) unusedBits = 0;\n\tfor (var i = 0; i <= unusedBits; i++) {\n\t binaryString += '0';\n\t}\n\tvar h = '';\n\tfor (var i = 0; i < binaryString.length - 1; i += 8) {\n\t var b = binaryString.substr(i, 8);\n\t var x = parseInt(b, 2).toString(16);\n\t if (x.length == 1) x = '0' + x;\n\t h += x; \n\t}\n\tthis.hTLV = null;\n\tthis.isModified = true;\n\tthis.hV = '0' + unusedBits + h;\n };\n\n /**\n * set ASN.1 TLV value(V) by an array of boolean\n * @name setByBooleanArray\n * @memberOf KJUR.asn1.DERBitString\n * @function\n * @param {array} booleanArray array of boolean (ex. [true, false, true])\n * @description\n * NOTE: Trailing falses will be ignored.\n */\n this.setByBooleanArray = function(booleanArray) {\n\tvar s = '';\n\tfor (var i = 0; i < booleanArray.length; i++) {\n\t if (booleanArray[i] == true) {\n\t\ts += '1';\n\t } else {\n\t\ts += '0';\n\t }\n\t}\n\tthis.setByBinaryString(s);\n };\n\n /**\n * generate an array of false with specified length\n * @name newFalseArray\n * @memberOf KJUR.asn1.DERBitString\n * @function\n * @param {Integer} nLength length of array to generate\n * @return {array} array of boolean faluse\n * @description\n * This static method may be useful to initialize boolean array.\n */\n this.newFalseArray = function(nLength) {\n\tvar a = new Array(nLength);\n\tfor (var i = 0; i < nLength; i++) {\n\t a[i] = false;\n\t}\n\treturn a;\n };\n\n this.getFreshValueHex = function() {\n\treturn this.hV;\n };\n\n if (typeof params != \"undefined\") {\n\tif (typeof params['hex'] != \"undefined\") {\n\t this.setHexValueIncludingUnusedBits(params['hex']);\n\t} else if (typeof params['bin'] != \"undefined\") {\n\t this.setByBinaryString(params['bin']);\n\t} else if (typeof params['array'] != \"undefined\") {\n\t this.setByBooleanArray(params['array']);\n\t}\n }\n};\nJSX.extend(KJUR.asn1.DERBitString, KJUR.asn1.ASN1Object);\n\n// ********************************************************************\n/**\n * class for ASN.1 DER OctetString\n * @name KJUR.asn1.DEROctetString\n * @class class for ASN.1 DER OctetString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DEROctetString = function(params) {\n KJUR.asn1.DEROctetString.superclass.constructor.call(this, params);\n this.hT = \"04\";\n};\nJSX.extend(KJUR.asn1.DEROctetString, KJUR.asn1.DERAbstractString);\n\n// ********************************************************************\n/**\n * class for ASN.1 DER Null\n * @name KJUR.asn1.DERNull\n * @class class for ASN.1 DER Null\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERNull = function() {\n KJUR.asn1.DERNull.superclass.constructor.call(this);\n this.hT = \"05\";\n this.hTLV = \"0500\";\n};\nJSX.extend(KJUR.asn1.DERNull, KJUR.asn1.ASN1Object);\n\n// ********************************************************************\n/**\n * class for ASN.1 DER ObjectIdentifier\n * @name KJUR.asn1.DERObjectIdentifier\n * @class class for ASN.1 DER ObjectIdentifier\n * @param {Array} params associative array of parameters (ex. {'oid': '2.5.4.5'})\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>oid - specify initial ASN.1 value(V) by a oid string (ex. 2.5.4.13)</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERObjectIdentifier = function(params) {\n var itox = function(i) {\n\tvar h = i.toString(16);\n\tif (h.length == 1) h = '0' + h;\n\treturn h;\n };\n var roidtox = function(roid) {\n\tvar h = '';\n\tvar bi = new BigInteger(roid, 10);\n\tvar b = bi.toString(2);\n\tvar padLen = 7 - b.length % 7;\n\tif (padLen == 7) padLen = 0;\n\tvar bPad = '';\n\tfor (var i = 0; i < padLen; i++) bPad += '0';\n\tb = bPad + b;\n\tfor (var i = 0; i < b.length - 1; i += 7) {\n\t var b8 = b.substr(i, 7);\n\t if (i != b.length - 7) b8 = '1' + b8;\n\t h += itox(parseInt(b8, 2));\n\t}\n\treturn h;\n }\n\n KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this);\n this.hT = \"06\";\n\n /**\n * set value by a hexadecimal string\n * @name setValueHex\n * @memberOf KJUR.asn1.DERObjectIdentifier\n * @function\n * @param {String} newHexString hexadecimal value of OID bytes\n */\n this.setValueHex = function(newHexString) {\n\tthis.hTLV = null;\n\tthis.isModified = true;\n\tthis.s = null;\n\tthis.hV = newHexString;\n };\n\n /**\n * set value by a OID string\n * @name setValueOidString\n * @memberOf KJUR.asn1.DERObjectIdentifier\n * @function\n * @param {String} oidString OID string (ex. 2.5.4.13)\n */\n this.setValueOidString = function(oidString) {\n\tif (! oidString.match(/^[0-9.]+$/)) {\n\t throw \"malformed oid string: \" + oidString;\n\t}\n\tvar h = '';\n\tvar a = oidString.split('.');\n\tvar i0 = parseInt(a[0]) * 40 + parseInt(a[1]);\n\th += itox(i0);\n\ta.splice(0, 2);\n\tfor (var i = 0; i < a.length; i++) {\n\t h += roidtox(a[i]);\n\t}\n\tthis.hTLV = null;\n\tthis.isModified = true;\n\tthis.s = null;\n\tthis.hV = h;\n };\n\n /**\n * set value by a OID name\n * @name setValueName\n * @memberOf KJUR.asn1.DERObjectIdentifier\n * @function\n * @param {String} oidName OID name (ex. 'serverAuth')\n * @since 1.0.1\n * @description\n * OID name shall be defined in 'KJUR.asn1.x509.OID.name2oidList'.\n * Otherwise raise error.\n */\n this.setValueName = function(oidName) {\n\tif (typeof KJUR.asn1.x509.OID.name2oidList[oidName] != \"undefined\") {\n\t var oid = KJUR.asn1.x509.OID.name2oidList[oidName];\n\t this.setValueOidString(oid);\n\t} else {\n\t throw \"DERObjectIdentifier oidName undefined: \" + oidName;\n\t}\n };\n\n this.getFreshValueHex = function() {\n\treturn this.hV;\n };\n\n if (typeof params != \"undefined\") {\n\tif (typeof params['oid'] != \"undefined\") {\n\t this.setValueOidString(params['oid']);\n\t} else if (typeof params['hex'] != \"undefined\") {\n\t this.setValueHex(params['hex']);\n\t} else if (typeof params['name'] != \"undefined\") {\n\t this.setValueName(params['name']);\n\t}\n }\n};\nJSX.extend(KJUR.asn1.DERObjectIdentifier, KJUR.asn1.ASN1Object);\n\n// ********************************************************************\n/**\n * class for ASN.1 DER UTF8String\n * @name KJUR.asn1.DERUTF8String\n * @class class for ASN.1 DER UTF8String\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERUTF8String = function(params) {\n KJUR.asn1.DERUTF8String.superclass.constructor.call(this, params);\n this.hT = \"0c\";\n};\nJSX.extend(KJUR.asn1.DERUTF8String, KJUR.asn1.DERAbstractString);\n\n// ********************************************************************\n/**\n * class for ASN.1 DER NumericString\n * @name KJUR.asn1.DERNumericString\n * @class class for ASN.1 DER NumericString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERNumericString = function(params) {\n KJUR.asn1.DERNumericString.superclass.constructor.call(this, params);\n this.hT = \"12\";\n};\nJSX.extend(KJUR.asn1.DERNumericString, KJUR.asn1.DERAbstractString);\n\n// ********************************************************************\n/**\n * class for ASN.1 DER PrintableString\n * @name KJUR.asn1.DERPrintableString\n * @class class for ASN.1 DER PrintableString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERPrintableString = function(params) {\n KJUR.asn1.DERPrintableString.superclass.constructor.call(this, params);\n this.hT = \"13\";\n};\nJSX.extend(KJUR.asn1.DERPrintableString, KJUR.asn1.DERAbstractString);\n\n// ********************************************************************\n/**\n * class for ASN.1 DER TeletexString\n * @name KJUR.asn1.DERTeletexString\n * @class class for ASN.1 DER TeletexString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERTeletexString = function(params) {\n KJUR.asn1.DERTeletexString.superclass.constructor.call(this, params);\n this.hT = \"14\";\n};\nJSX.extend(KJUR.asn1.DERTeletexString, KJUR.asn1.DERAbstractString);\n\n// ********************************************************************\n/**\n * class for ASN.1 DER IA5String\n * @name KJUR.asn1.DERIA5String\n * @class class for ASN.1 DER IA5String\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERIA5String = function(params) {\n KJUR.asn1.DERIA5String.superclass.constructor.call(this, params);\n this.hT = \"16\";\n};\nJSX.extend(KJUR.asn1.DERIA5String, KJUR.asn1.DERAbstractString);\n\n// ********************************************************************\n/**\n * class for ASN.1 DER UTCTime\n * @name KJUR.asn1.DERUTCTime\n * @class class for ASN.1 DER UTCTime\n * @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})\n * @extends KJUR.asn1.DERAbstractTime\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>str - specify initial ASN.1 value(V) by a string (ex.'130430235959Z')</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * <li>date - specify Date object.</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n * <h4>EXAMPLES</h4>\n * @example\n * var d1 = new KJUR.asn1.DERUTCTime();\n * d1.setString('130430125959Z');\n *\n * var d2 = new KJUR.asn1.DERUTCTime({'str': '130430125959Z'});\n *\n * var d3 = new KJUR.asn1.DERUTCTime({'date': new Date(Date.UTC(2015, 0, 31, 0, 0, 0, 0))});\n */\nKJUR.asn1.DERUTCTime = function(params) {\n KJUR.asn1.DERUTCTime.superclass.constructor.call(this, params);\n this.hT = \"17\";\n\n /**\n * set value by a Date object\n * @name setByDate\n * @memberOf KJUR.asn1.DERUTCTime\n * @function\n * @param {Date} dateObject Date object to set ASN.1 value(V)\n */\n this.setByDate = function(dateObject) {\n\tthis.hTLV = null;\n\tthis.isModified = true;\n\tthis.date = dateObject;\n\tthis.s = this.formatDate(this.date, 'utc');\n\tthis.hV = stohex(this.s);\n };\n\n if (typeof params != \"undefined\") {\n\tif (typeof params['str'] != \"undefined\") {\n\t this.setString(params['str']);\n\t} else if (typeof params['hex'] != \"undefined\") {\n\t this.setStringHex(params['hex']);\n\t} else if (typeof params['date'] != \"undefined\") {\n\t this.setByDate(params['date']);\n\t}\n }\n};\nJSX.extend(KJUR.asn1.DERUTCTime, KJUR.asn1.DERAbstractTime);\n\n// ********************************************************************\n/**\n * class for ASN.1 DER GeneralizedTime\n * @name KJUR.asn1.DERGeneralizedTime\n * @class class for ASN.1 DER GeneralizedTime\n * @param {Array} params associative array of parameters (ex. {'str': '20130430235959Z'})\n * @extends KJUR.asn1.DERAbstractTime\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>str - specify initial ASN.1 value(V) by a string (ex.'20130430235959Z')</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * <li>date - specify Date object.</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERGeneralizedTime = function(params) {\n KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this, params);\n this.hT = \"18\";\n\n /**\n * set value by a Date object\n * @name setByDate\n * @memberOf KJUR.asn1.DERGeneralizedTime\n * @function\n * @param {Date} dateObject Date object to set ASN.1 value(V)\n * @example\n * When you specify UTC time, use 'Date.UTC' method like this:<br/>\n * var o = new DERUTCTime();\n * var date = new Date(Date.UTC(2015, 0, 31, 23, 59, 59, 0)); #2015JAN31 23:59:59\n * o.setByDate(date);\n */\n this.setByDate = function(dateObject) {\n\tthis.hTLV = null;\n\tthis.isModified = true;\n\tthis.date = dateObject;\n\tthis.s = this.formatDate(this.date, 'gen');\n\tthis.hV = stohex(this.s);\n };\n\n if (typeof params != \"undefined\") {\n\tif (typeof params['str'] != \"undefined\") {\n\t this.setString(params['str']);\n\t} else if (typeof params['hex'] != \"undefined\") {\n\t this.setStringHex(params['hex']);\n\t} else if (typeof params['date'] != \"undefined\") {\n\t this.setByDate(params['date']);\n\t}\n }\n};\nJSX.extend(KJUR.asn1.DERGeneralizedTime, KJUR.asn1.DERAbstractTime);\n\n// ********************************************************************\n/**\n * class for ASN.1 DER Sequence\n * @name KJUR.asn1.DERSequence\n * @class class for ASN.1 DER Sequence\n * @extends KJUR.asn1.DERAbstractStructured\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>array - specify array of ASN1Object to set elements of content</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERSequence = function(params) {\n KJUR.asn1.DERSequence.superclass.constructor.call(this, params);\n this.hT = \"30\";\n this.getFreshValueHex = function() {\n\tvar h = '';\n\tfor (var i = 0; i < this.asn1Array.length; i++) {\n\t var asn1Obj = this.asn1Array[i];\n\t h += asn1Obj.getEncodedHex();\n\t}\n\tthis.hV = h;\n\treturn this.hV;\n };\n};\nJSX.extend(KJUR.asn1.DERSequence, KJUR.asn1.DERAbstractStructured);\n\n// ********************************************************************\n/**\n * class for ASN.1 DER Set\n * @name KJUR.asn1.DERSet\n * @class class for ASN.1 DER Set\n * @extends KJUR.asn1.DERAbstractStructured\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>array - specify array of ASN1Object to set elements of content</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERSet = function(params) {\n KJUR.asn1.DERSet.superclass.constructor.call(this, params);\n this.hT = \"31\";\n this.getFreshValueHex = function() {\n\tvar a = new Array();\n\tfor (var i = 0; i < this.asn1Array.length; i++) {\n\t var asn1Obj = this.asn1Array[i];\n\t a.push(asn1Obj.getEncodedHex());\n\t}\n\ta.sort();\n\tthis.hV = a.join('');\n\treturn this.hV;\n };\n};\nJSX.extend(KJUR.asn1.DERSet, KJUR.asn1.DERAbstractStructured);\n\n// ********************************************************************\n/**\n * class for ASN.1 DER TaggedObject\n * @name KJUR.asn1.DERTaggedObject\n * @class class for ASN.1 DER TaggedObject\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * Parameter 'tagNoNex' is ASN.1 tag(T) value for this object.\n * For example, if you find '[1]' tag in a ASN.1 dump, \n * 'tagNoHex' will be 'a1'.\n * <br/>\n * As for optional argument 'params' for constructor, you can specify *ANY* of\n * following properties:\n * <ul>\n * <li>explicit - specify true if this is explicit tag otherwise false \n * (default is 'true').</li>\n * <li>tag - specify tag (default is 'a0' which means [0])</li>\n * <li>obj - specify ASN1Object which is tagged</li>\n * </ul>\n * @example\n * d1 = new KJUR.asn1.DERUTF8String({'str':'a'});\n * d2 = new KJUR.asn1.DERTaggedObject({'obj': d1});\n * hex = d2.getEncodedHex();\n */\nKJUR.asn1.DERTaggedObject = function(params) {\n KJUR.asn1.DERTaggedObject.superclass.constructor.call(this);\n this.hT = \"a0\";\n this.hV = '';\n this.isExplicit = true;\n this.asn1Object = null;\n\n /**\n * set value by an ASN1Object\n * @name setString\n * @memberOf KJUR.asn1.DERTaggedObject\n * @function\n * @param {Boolean} isExplicitFlag flag for explicit/implicit tag\n * @param {Integer} tagNoHex hexadecimal string of ASN.1 tag\n * @param {ASN1Object} asn1Object ASN.1 to encapsulate\n */\n this.setASN1Object = function(isExplicitFlag, tagNoHex, asn1Object) {\n\tthis.hT = tagNoHex;\n\tthis.isExplicit = isExplicitFlag;\n\tthis.asn1Object = asn1Object;\n\tif (this.isExplicit) {\n\t this.hV = this.asn1Object.getEncodedHex();\n\t this.hTLV = null;\n\t this.isModified = true;\n\t} else {\n\t this.hV = null;\n\t this.hTLV = asn1Object.getEncodedHex();\n\t this.hTLV = this.hTLV.replace(/^../, tagNoHex);\n\t this.isModified = false;\n\t}\n };\n\n this.getFreshValueHex = function() {\n\treturn this.hV;\n };\n\n if (typeof params != \"undefined\") {\n\tif (typeof params['tag'] != \"undefined\") {\n\t this.hT = params['tag'];\n\t}\n\tif (typeof params['explicit'] != \"undefined\") {\n\t this.isExplicit = params['explicit'];\n\t}\n\tif (typeof params['obj'] != \"undefined\") {\n\t this.asn1Object = params['obj'];\n\t this.setASN1Object(this.isExplicit, this.hT, this.asn1Object);\n\t}\n }\n};\nJSX.extend(KJUR.asn1.DERTaggedObject, KJUR.asn1.ASN1Object);","import {int2char} from \"./jsbn\";\n\nvar b64map=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar b64pad=\"=\";\n\nexport function hex2b64(h) {\n var i;\n var c;\n var ret = \"\";\n for(i = 0; i+3 <= h.length; i+=3) {\n c = parseInt(h.substring(i,i+3),16);\n ret += b64map.charAt(c >> 6) + b64map.charAt(c & 63);\n }\n if(i+1 == h.length) {\n c = parseInt(h.substring(i,i+1),16);\n ret += b64map.charAt(c << 2);\n }\n else if(i+2 == h.length) {\n c = parseInt(h.substring(i,i+2),16);\n ret += b64map.charAt(c >> 2) + b64map.charAt((c & 3) << 4);\n }\n while((ret.length & 3) > 0) ret += b64pad;\n return ret;\n}\n\n// convert a base64 string to hex\nexport function b64tohex(s) {\n var ret = \"\";\n var i;\n var k = 0; // b64 state, 0-3\n var slop;\n for(i = 0; i < s.length; ++i) {\n if(s.charAt(i) == b64pad) break;\n let v = b64map.indexOf(s.charAt(i));\n if(v < 0) continue;\n if(k == 0) {\n ret += int2char(v >> 2);\n slop = v & 3;\n k = 1;\n }\n else if(k == 1) {\n ret += int2char((slop << 2) | (v >> 4));\n slop = v & 0xf;\n k = 2;\n }\n else if(k == 2) {\n ret += int2char(slop);\n ret += int2char(v >> 2);\n slop = v & 3;\n k = 3;\n }\n else {\n ret += int2char((slop << 2) | (v >> 4));\n ret += int2char(v & 0xf);\n k = 0;\n }\n }\n if(k == 1)\n ret += int2char(slop << 2);\n return ret;\n}\n\n// convert a base64 string to a byte/number array\nexport function b64toBA(s) {\n //piggyback on b64tohex for now, optimize later\n var h = b64tohex(s);\n var i;\n var a = [];\n for(i = 0; 2*i < h.length; ++i) {\n a[i] = parseInt(h.substring(2*i,2*i+2),16);\n }\n return a;\n}\n","import {ASN1} from \"../lib/asn1js/asn1\";\nimport {RSAKey} from \"../lib/jsbn/rsa2\";\nimport {Base64} from \"../lib/asn1js/base64\";\nimport {Hex} from \"../lib/asn1js/hex\";\nimport {parseBigInt} from \"../lib/jsbn/rsa\";\nimport {KJUR} from \"../lib/jsrsasign/asn1-1.0\";\nimport {hex2b64} from \"../lib/jsbn/base64\";\nimport {b64tohex} from \"../lib/jsbn/base64\";\n/**\n * Retrieve the hexadecimal value (as a string) of the current ASN.1 element\n * @returns {string}\n * @public\n */\nASN1.prototype.getHexStringValue = function () {\n var hexString = this.toHexString();\n var offset = this.header * 2;\n var length = this.length * 2;\n return hexString.substr(offset, length);\n};\n\n/**\n * Method to parse a pem encoded string containing both a public or private key.\n * The method will translate the pem encoded string in a der encoded string and\n * will parse private key and public key parameters. This method accepts public key\n * in the rsaencryption pkcs #1 format (oid: 1.2.840.113549.1.1.1).\n *\n * @todo Check how many rsa formats use the same format of pkcs #1.\n *\n * The format is defined as:\n * PublicKeyInfo ::= SEQUENCE {\n * algorithm AlgorithmIdentifier,\n * PublicKey BIT STRING\n * }\n * Where AlgorithmIdentifier is:\n * AlgorithmIdentifier ::= SEQUENCE {\n * algorithm OBJECT IDENTIFIER, the OID of the enc algorithm\n * parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)\n * }\n * and PublicKey is a SEQUENCE encapsulated in a BIT STRING\n * RSAPublicKey ::= SEQUENCE {\n * modulus INTEGER, -- n\n * publicExponent INTEGER -- e\n * }\n * it's possible to examine the structure of the keys obtained from openssl using\n * an asn.1 dumper as the one used here to parse the components: http://lapo.it/asn1js/\n * @argument {string} pem the pem encoded string, can include the BEGIN/END header/footer\n * @private\n */\nRSAKey.prototype.parseKey = function (pem) {\n try {\n var modulus = 0;\n var public_exponent = 0;\n var reHex = /^\\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\\s*)+$/;\n var der = reHex.test(pem) ? Hex.decode(pem) : Base64.unarmor(pem);\n var asn1 = ASN1.decode(der);\n\n //Fixes a bug with OpenSSL 1.0+ private keys\n if(asn1.sub.length === 3){\n asn1 = asn1.sub[2].sub[0];\n }\n if (asn1.sub.length === 9) {\n\n // Parse the private key.\n modulus = asn1.sub[1].getHexStringValue(); //bigint\n this.n = parseBigInt(modulus, 16);\n\n public_exponent = asn1.sub[2].getHexStringValue(); //int\n this.e = parseInt(public_exponent, 16);\n\n var private_exponent = asn1.sub[3].getHexStringValue(); //bigint\n this.d = parseBigInt(private_exponent, 16);\n\n var prime1 = asn1.sub[4].getHexStringValue(); //bigint\n this.p = parseBigInt(prime1, 16);\n\n var prime2 = asn1.sub[5].getHexStringValue(); //bigint\n this.q = parseBigInt(prime2, 16);\n\n var exponent1 = asn1.sub[6].getHexStringValue(); //bigint\n this.dmp1 = parseBigInt(exponent1, 16);\n\n var exponent2 = asn1.sub[7].getHexStringValue(); //bigint\n this.dmq1 = parseBigInt(exponent2, 16);\n\n var coefficient = asn1.sub[8].getHexStringValue(); //bigint\n this.coeff = parseBigInt(coefficient, 16);\n\n }\n else if (asn1.sub.length === 2) {\n\n // Parse the public key.\n var bit_string = asn1.sub[1];\n var sequence = bit_string.sub[0];\n\n modulus = sequence.sub[0].getHexStringValue();\n this.n = parseBigInt(modulus, 16);\n public_exponent = sequence.sub[1].getHexStringValue();\n this.e = parseInt(public_exponent, 16);\n\n }\n else {\n return false;\n }\n return true;\n }\n catch (ex) {\n return false;\n }\n};\n\n/**\n * Translate rsa parameters in a hex encoded string representing the rsa key.\n *\n * The translation follow the ASN.1 notation :\n * RSAPrivateKey ::= SEQUENCE {\n * version Version,\n * modulus INTEGER, -- n\n * publicExponent INTEGER, -- e\n * privateExponent INTEGER, -- d\n * prime1 INTEGER, -- p\n * prime2 INTEGER, -- q\n * exponent1 INTEGER, -- d mod (p1)\n * exponent2 INTEGER, -- d mod (q-1)\n * coefficient INTEGER, -- (inverse of q) mod p\n * }\n * @returns {string} DER Encoded String representing the rsa private key\n * @private\n */\nRSAKey.prototype.getPrivateBaseKey = function () {\n var options = {\n 'array': [\n new KJUR.asn1.DERInteger({'int': 0}),\n new KJUR.asn1.DERInteger({'bigint': this.n}),\n new KJUR.asn1.DERInteger({'int': this.e}),\n new KJUR.asn1.DERInteger({'bigint': this.d}),\n new KJUR.asn1.DERInteger({'bigint': this.p}),\n new KJUR.asn1.DERInteger({'bigint': this.q}),\n new KJUR.asn1.DERInteger({'bigint': this.dmp1}),\n new KJUR.asn1.DERInteger({'bigint': this.dmq1}),\n new KJUR.asn1.DERInteger({'bigint': this.coeff})\n ]\n };\n var seq = new KJUR.asn1.DERSequence(options);\n return seq.getEncodedHex();\n};\n\n/**\n * base64 (pem) encoded version of the DER encoded representation\n * @returns {string} pem encoded representation without header and footer\n * @public\n */\nRSAKey.prototype.getPrivateBaseKeyB64 = function () {\n return hex2b64(this.getPrivateBaseKey());\n};\n\n/**\n * Translate rsa parameters in a hex encoded string representing the rsa public key.\n * The representation follow the ASN.1 notation :\n * PublicKeyInfo ::= SEQUENCE {\n * algorithm AlgorithmIdentifier,\n * PublicKey BIT STRING\n * }\n * Where AlgorithmIdentifier is:\n * AlgorithmIdentifier ::= SEQUENCE {\n * algorithm OBJECT IDENTIFIER, the OID of the enc algorithm\n * parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)\n * }\n * and PublicKey is a SEQUENCE encapsulated in a BIT STRING\n * RSAPublicKey ::= SEQUENCE {\n * modulus INTEGER, -- n\n * publicExponent INTEGER -- e\n * }\n * @returns {string} DER Encoded String representing the rsa public key\n * @private\n */\nRSAKey.prototype.getPublicBaseKey = function () {\n var options = {\n 'array': [\n new KJUR.asn1.DERObjectIdentifier({'oid': '1.2.840.113549.1.1.1'}), //RSA Encryption pkcs #1 oid\n new KJUR.asn1.DERNull()\n ]\n };\n var first_sequence = new KJUR.asn1.DERSequence(options);\n\n options = {\n 'array': [\n new KJUR.asn1.DERInteger({'bigint': this.n}),\n new KJUR.asn1.DERInteger({'int': this.e})\n ]\n };\n var second_sequence = new KJUR.asn1.DERSequence(options);\n\n options = {\n 'hex': '00' + second_sequence.getEncodedHex()\n };\n var bit_string = new KJUR.asn1.DERBitString(options);\n\n options = {\n 'array': [\n first_sequence,\n bit_string\n ]\n };\n var seq = new KJUR.asn1.DERSequence(options);\n return seq.getEncodedHex();\n};\n\n/**\n * base64 (pem) encoded version of the DER encoded representation\n * @returns {string} pem encoded representation without header and footer\n * @public\n */\nRSAKey.prototype.getPublicBaseKeyB64 = function () {\n return hex2b64(this.getPublicBaseKey());\n};\n\n/**\n * wrap the string in block of width chars. The default value for rsa keys is 64\n * characters.\n * @param {string} str the pem encoded string without header and footer\n * @param {Number} [width=64] - the length the string has to be wrapped at\n * @returns {string}\n * @private\n */\nRSAKey.prototype.wordwrap = function (str, width) {\n width = width || 64;\n if (!str) {\n return str;\n }\n var regex = '(.{1,' + width + '})( +|$\\n?)|(.{1,' + width + '})';\n return str.match(RegExp(regex, 'g')).join('\\n');\n};\n\n/**\n * Retrieve the pem encoded private key\n * @returns {string} the pem encoded private key with header/footer\n * @public\n */\nRSAKey.prototype.getPrivateKey = function () {\n var key = \"-----BEGIN RSA PRIVATE KEY-----\\n\";\n key += this.wordwrap(this.getPrivateBaseKeyB64()) + \"\\n\";\n key += \"-----END RSA PRIVATE KEY-----\";\n return key;\n};\n\n/**\n * Retrieve the pem encoded public key\n * @returns {string} the pem encoded public key with header/footer\n * @public\n */\nRSAKey.prototype.getPublicKey = function () {\n var key = \"-----BEGIN PUBLIC KEY-----\\n\";\n key += this.wordwrap(this.getPublicBaseKeyB64()) + \"\\n\";\n key += \"-----END PUBLIC KEY-----\";\n return key;\n};\n\n/**\n * Check if the object contains the necessary parameters to populate the rsa modulus\n * and public exponent parameters.\n * @param {Object} [obj={}] - An object that may contain the two public key\n * parameters\n * @returns {boolean} true if the object contains both the modulus and the public exponent\n * properties (n and e)\n * @todo check for types of n and e. N should be a parseable bigInt object, E should\n * be a parseable integer number\n * @private\n */\nRSAKey.prototype.hasPublicKeyProperty = function (obj) {\n obj = obj || {};\n return (\n obj.hasOwnProperty('n') &&\n obj.hasOwnProperty('e')\n );\n};\n\n/**\n * Check if the object contains ALL the parameters of an RSA key.\n * @param {Object} [obj={}] - An object that may contain nine rsa key\n * parameters\n * @returns {boolean} true if the object contains all the parameters needed\n * @todo check for types of the parameters all the parameters but the public exponent\n * should be parseable bigint objects, the public exponent should be a parseable integer number\n * @private\n */\nRSAKey.prototype.hasPrivateKeyProperty = function (obj) {\n obj = obj || {};\n return (\n obj.hasOwnProperty('n') &&\n obj.hasOwnProperty('e') &&\n obj.hasOwnProperty('d') &&\n obj.hasOwnProperty('p') &&\n obj.hasOwnProperty('q') &&\n obj.hasOwnProperty('dmp1') &&\n obj.hasOwnProperty('dmq1') &&\n obj.hasOwnProperty('coeff')\n );\n};\n\n/**\n * Parse the properties of obj in the current rsa object. Obj should AT LEAST\n * include the modulus and public exponent (n, e) parameters.\n * @param {Object} obj - the object containing rsa parameters\n * @private\n */\nRSAKey.prototype.parsePropertiesFrom = function (obj) {\n this.n = obj.n;\n this.e = obj.e;\n\n if (obj.hasOwnProperty('d')) {\n this.d = obj.d;\n this.p = obj.p;\n this.q = obj.q;\n this.dmp1 = obj.dmp1;\n this.dmq1 = obj.dmq1;\n this.coeff = obj.coeff;\n }\n};\n\n/**\n * Create a new JSEncryptRSAKey that extends Tom Wu's RSA key object.\n * This object is just a decorator for parsing the key parameter\n * @param {string|Object} key - The key in string format, or an object containing\n * the parameters needed to build a RSAKey object.\n * @constructor\n */\nclass JSEncryptRSAKey extends RSAKey {\n constructor(key) {\n // Call the super constructor.\n super();\n // If a key key was provided.\n if (key) {\n // If this is a string...\n if (typeof key === 'string') {\n this.parseKey(key);\n }\n else if (\n this.hasPrivateKeyProperty(key) ||\n this.hasPublicKeyProperty(key)\n ) {\n // Set the values for the key.\n this.parsePropertiesFrom(key);\n }\n }\n }\n}\n\n/**\n *\n * @param {Object} [options = {}] - An object to customize JSEncrypt behaviour\n * possible parameters are:\n * - default_key_size {number} default: 1024 the key size in bit\n * - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent\n * - log {boolean} default: false whether log warn/error or not\n * @constructor\n */\nexport class JSEncrypt{\n constructor (options) {\n options = options || {};\n this.default_key_size = parseInt(options.default_key_size) || 1024;\n this.default_public_exponent = options.default_public_exponent || '010001'; //65537 default openssl public exponent for rsa key type\n this.log = options.log || false;\n // The private and public key.\n this.key = null;\n }\n}\n\n/**\n * Method to set the rsa key parameter (one method is enough to set both the public\n * and the private key, since the private key contains the public key paramenters)\n * Log a warning if logs are enabled\n * @param {Object|string} key the pem encoded string or an object (with or without header/footer)\n * @public\n */\nJSEncrypt.prototype.setKey = function (key) {\n if (this.log && this.key) {\n console.warn('A key was already set, overriding existing.');\n }\n this.key = new JSEncryptRSAKey(key);\n};\n\n/**\n * Proxy method for setKey, for api compatibility\n * @see setKey\n * @public\n */\nJSEncrypt.prototype.setPrivateKey = function (privkey) {\n // Create the key.\n this.setKey(privkey);\n};\n\n/**\n * Proxy method for setKey, for api compatibility\n * @see setKey\n * @public\n */\nJSEncrypt.prototype.setPublicKey = function (pubkey) {\n // Sets the public key.\n this.setKey(pubkey);\n};\n\n/**\n * Proxy method for RSAKey object's decrypt, decrypt the string using the private\n * components of the rsa key object. Note that if the object was not set will be created\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\n * @param {string} string base64 encoded crypted string to decrypt\n * @return {string} the decrypted string\n * @public\n */\nJSEncrypt.prototype.decrypt = function (string) {\n // Return the decrypted string.\n try {\n return this.getKey().decrypt(b64tohex(string));\n }\n catch (ex) {\n return false;\n }\n};\n\n/**\n * Proxy method for RSAKey object's encrypt, encrypt the string using the public\n * components of the rsa key object. Note that if the object was not set will be created\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\n * @param {string} string the string to encrypt\n * @return {string} the encrypted string encoded in base64\n * @public\n */\nJSEncrypt.prototype.encrypt = function (string) {\n // Return the encrypted string.\n try {\n return hex2b64(this.getKey().encrypt(string));\n }\n catch (ex) {\n return false;\n }\n};\n\n/**\n * Getter for the current JSEncryptRSAKey object. If it doesn't exists a new object\n * will be created and returned\n * @param {callback} [cb] the callback to be called if we want the key to be generated\n * in an async fashion\n * @returns {JSEncryptRSAKey} the JSEncryptRSAKey object\n * @public\n */\nJSEncrypt.prototype.getKey = function (cb) {\n // Only create new if it does not exist.\n if (!this.key) {\n // Get a new private key.\n this.key = new JSEncryptRSAKey();\n if (cb && {}.toString.call(cb) === '[object Function]') {\n this.key.generateAsync(this.default_key_size, this.default_public_exponent, cb);\n return;\n }\n // Generate the key.\n this.key.generate(this.default_key_size, this.default_public_exponent);\n }\n return this.key;\n};\n\n/**\n * Returns the pem encoded representation of the private key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the private key WITH header and footer\n * @public\n */\nJSEncrypt.prototype.getPrivateKey = function () {\n // Return the private representation of this key.\n return this.getKey().getPrivateKey();\n};\n\n/**\n * Returns the pem encoded representation of the private key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the private key WITHOUT header and footer\n * @public\n */\nJSEncrypt.prototype.getPrivateKeyB64 = function () {\n // Return the private representation of this key.\n return this.getKey().getPrivateBaseKeyB64();\n};\n\n\n/**\n * Returns the pem encoded representation of the public key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the public key WITH header and footer\n * @public\n */\nJSEncrypt.prototype.getPublicKey = function () {\n // Return the private representation of this key.\n return this.getKey().getPublicKey();\n};\n\n/**\n * Returns the pem encoded representation of the public key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the public key WITHOUT header and footer\n * @public\n */\nJSEncrypt.prototype.getPublicKeyB64 = function () {\n // Return the private representation of this key.\n return this.getKey().getPublicBaseKeyB64();\n};\n\n","// export * from 'jsencrypt';\nexport * from '../../node_modules/jsencrypt/src/jsencrypt.js';","import {EventEmitter} from \"../deps/bp_event.js\";\n\nexport class BaseRequest {\n constructor(data) {\n this.data = data;\n this.before = (data)=>{return Promise.resolve(data)};\n }\n\n send() {\n return this.before(this.data);\n }\n\n before(fn) {\n return Promise.resolve\n }\n}\n\nexport class BaseTransport {\n constructor(endpoint, stream_type, config={}) {\n this.stream_type = stream_type;\n this.endpoint = endpoint;\n this.eventSource = new EventEmitter();\n this.dataQueue = [];\n }\n\n static canTransfer(stream_type) {\n return BaseTransport.streamTypes().includes(stream_type);\n }\n \n static streamTypes() {\n return [];\n }\n\n destroy() {\n this.eventSource.destroy();\n }\n\n connect() {\n // TO be impemented\n }\n\n disconnect() {\n // TO be impemented\n }\n\n reconnect() {\n return this.disconnect().then(()=>{\n return this.connect();\n });\n }\n\n setEndpoint(endpoint) {\n this.endpoint = endpoint;\n return this.reconnect();\n }\n\n send(data) {\n // TO be impemented\n // return this.prepare(data).send();\n }\n\n prepare(data) {\n // TO be impemented\n // return new Request(data);\n }\n\n // onData(type, data) {\n // this.eventSource.dispatchEvent(type, data);\n // }\n}","export const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n\nexport const CPU_CORES = 1;//navigator.hardwareConcurrency || 3;","import {getTagged} from '../deps/bp_logger.js';\nimport {JSEncrypt} from '../deps/jsencrypt.js';\nimport {BaseTransport} from \"../core/base_transport.js\";\nimport {CPU_CORES} from \"../core/util/browser.js\";\n\nconst LOG_TAG = \"transport:ws\";\nconst Log = getTagged(LOG_TAG);\nconst WORKER_COUNT = CPU_CORES;\n\nexport default class WebsocketTransport extends BaseTransport {\n constructor(endpoint, stream_type, options={\n socket:`${location.protocol.replace('http', 'ws')}//${location.host}/ws/`,\n workers: 1\n }) {\n super(endpoint, stream_type);\n this.proxies = [];\n this.currentProxy = 0;\n this.workers = 1;\n this.socket_url = options.socket;\n this.ready = this.connect();\n }\n\n destroy() {\n return this.disconnect().then(()=>{\n return super.destroy();\n });\n\n }\n\n static canTransfer(stream_type) {\n return WebsocketTransport.streamTypes().includes(stream_type);\n }\n\n static streamTypes() {\n return ['hls', 'rtsp'];\n }\n\n connect() {\n return this.disconnect().then(()=>{\n let promises = [];\n // TODO: get mirror list\n for (let i=0; i<this.workers; ++i) {\n let proxy = new WebSocketProxy(this.socket_url, this.endpoint, this.stream_type);\n\n proxy.set_disconnect_handler((e)=> {\n this.eventSource.dispatchEvent('disconnected', {code: e.code, reason: e.reason});\n // TODO: only reconnect on demand\n if ([1000, 1006, 1013, 1011].includes(e.code)) {\n setTimeout(()=> {\n if (this.ready && this.ready.reject) {\n this.ready.reject();\n }\n this.ready = this.connect();\n }, 3000);\n }\n });\n\n proxy.set_data_handler((data)=> {\n this.dataQueue.push(new Uint8Array(data));\n this.eventSource.dispatchEvent('data');\n });\n\n promises.push(proxy.connect().then(()=> {\n this.eventSource.dispatchEvent('connected');\n }).catch((e)=> {\n this.eventSource.dispatchEvent('error');\n throw new Error(e);\n }));\n this.proxies.push(proxy);\n }\n return Promise.all(promises);\n });\n }\n\n disconnect() {\n let promises = [];\n for (let i=0; i<this.proxies.length; ++i) {\n promises.push(this.proxies[i].close());\n }\n this.proxies= [];\n if (this.proxies.length) {\n return Promise.all(promises);\n } else {\n return Promise.resolve();\n }\n }\n\n socket() {\n return this.proxies[(this.currentProxy++)%this.proxies.length];\n }\n\n send(_data, fn) {\n let res = this.socket().send(_data);\n if (fn) {\n fn(res.seq);\n }\n return res.promise;\n }\n}\n\nclass WSPProtocol {\n static get PROTO() {return 'WSP';}\n\n static get V1_1() {return '1.1';}\n\n static get CMD_INIT() {return 'INIT';}\n static get CMD_JOIN() {return 'JOIN';}\n static get CMD_WRAP() {return 'WRAP';}\n\n\n constructor(ver){\n this.ver = ver;\n }\n\n build(cmd, data, payload=''){\n let data_str='';\n if (!data.seq) {\n data.seq = ++WSPProtocol.seq;\n }\n for (let k in data) {\n data_str += `${k}: ${data[k]}\\r\\n`;\n }\n return `${WSPProtocol.PROTO}/${this.ver} ${cmd}\\r\\n${data_str}\\r\\n${payload}`;\n }\n\n static parse(data) {\n let payIdx = data.indexOf('\\r\\n\\r\\n');\n let lines = data.substr(0, payIdx).split('\\r\\n');\n let hdr = lines.shift().match(new RegExp(`${WSPProtocol.PROTO}/${WSPProtocol.V1_1}\\\\s+(\\\\d+)\\\\s+(.+)`));\n if (hdr) {\n let res = {\n code: Number(hdr[1]),\n msg: hdr[2],\n data: {},\n payload: ''\n };\n while (lines.length) {\n let line = lines.shift();\n if (line) {\n let [k,v] = line.split(':');\n res.data[k.trim()] = v.trim();\n } else {\n break;\n }\n }\n res.payload = data.substr(payIdx+4);\n return res;\n }\n return null;\n }\n}\nWSPProtocol.seq = 0;\n\nclass WebSocketProxy {\n static get CHN_CONTROL() {return 'control';}\n static get CHN_DATA() {return 'data';}\n\n constructor(wsurl, endpoint, stream_type) {\n this.url = wsurl;\n this.stream_type = stream_type;\n this.endpoint = endpoint;\n this.data_handler = ()=>{};\n this.disconnect_handler = ()=>{};\n this.builder = new WSPProtocol(WSPProtocol.V1_1);\n this.awaitingPromises = {};\n this.seq = 0;\n this.encryptor = new JSEncrypt();\n }\n\n set_data_handler(handler) {\n this.data_handler = handler;\n }\n\n set_disconnect_handler(handler) {\n this.disconnect_handler = handler;\n }\n\n close() {\n Log.log('closing connection');\n return new Promise((resolve)=>{\n this.ctrlChannel.onclose = ()=>{\n if (this.dataChannel) {\n this.dataChannel.onclose = ()=>{\n Log.log('closed');\n resolve();\n };\n this.dataChannel.close();\n } else {\n Log.log('closed');\n resolve();\n }\n };\n this.ctrlChannel.close();\n });\n }\n\n onDisconnect(){\n this.ctrlChannel.onclose=null;\n this.ctrlChannel.close();\n if (this.dataChannel) {\n this.dataChannel.onclose = null;\n this.dataChannel.close();\n }\n this.disconnect_handler(this);\n }\n\n initDataChannel(channel_id) {\n return new Promise((resolve, reject)=>{\n this.dataChannel = new WebSocket(this.url, WebSocketProxy.CHN_DATA);\n this.dataChannel.binaryType = 'arraybuffer';\n this.dataChannel.onopen = ()=>{\n let msg = this.builder.build(WSPProtocol.CMD_JOIN, {\n channel: channel_id\n });\n Log.debug(msg);\n this.dataChannel.send(msg);\n };\n this.dataChannel.onmessage = (ev)=>{\n Log.debug(`[data]\\r\\n${ev.data}`);\n let res = WSPProtocol.parse(ev.data);\n if (!res) {\n return reject();\n }\n\n this.dataChannel.onmessage=(e)=>{\n Log.debug('got data');\n if (this.data_handler) {\n this.data_handler(e.data);\n }\n };\n resolve();\n };\n this.dataChannel.onerror = (e)=>{\n Log.error(`[data] ${e.type}`);\n this.dataChannel.close();\n };\n this.dataChannel.onclose = (e)=>{\n Log.error(`[data] ${e.type}. code: ${e.code}, reason: ${e.reason || 'unknown reason'}`);\n this.onDisconnect(e);\n };\n });\n }\n\n connect() {\n this.encryptionKey = null;\n return new Promise((resolve, reject)=>{\n this.ctrlChannel = new WebSocket(this.url, WebSocketProxy.CHN_CONTROL);\n\n this.connected = false;\n\n this.ctrlChannel.onopen = ()=>{\n let headers = {\n proto: this.stream_type\n };\n if (this.endpoint.socket) {\n headers.socket = this.endpoint.socket;\n } else {\n Object.assign(headers, {\n host: this.endpoint.host,\n port: this.endpoint.port\n })\n }\n let msg = this.builder.build(WSPProtocol.CMD_INIT, headers);\n Log.debug(msg);\n this.ctrlChannel.send(msg);\n };\n\n this.ctrlChannel.onmessage = (ev)=>{\n Log.debug(`[ctrl]\\r\\n${ev.data}`);\n\n let res = WSPProtocol.parse(ev.data);\n if (!res) {\n return reject();\n }\n\n if (res.code >= 300) {\n Log.error(`[ctrl]\\r\\n${res.code}: ${res.msg}`);\n return reject();\n }\n this.ctrlChannel.onmessage = (e)=> {\n let res = WSPProtocol.parse(e.data);\n Log.debug(`[ctrl]\\r\\n${e.data}`);\n if (res.data.seq in this.awaitingPromises) {\n if (res.code < 300) {\n this.awaitingPromises[res.data.seq].resolve(res);\n } else {\n this.awaitingPromises[res.data.seq].reject(res);\n }\n delete this.awaitingPromises[res.data.seq];\n }\n };\n this.encryptionKey = res.data.pubkey || null;\n if (this.encryptionKey) {\n this.encryptor.setPublicKey(this.encryptionKey);\n // TODO: check errors\n }\n this.initDataChannel(res.data.channel).then(resolve).catch(reject);\n };\n\n this.ctrlChannel.onerror = (e)=>{\n Log.error(`[ctrl] ${e.type}`);\n this.ctrlChannel.close();\n };\n this.ctrlChannel.onclose = (e)=>{\n Log.error(`[ctrl] ${e.type}. code: ${e.code} ${e.reason || 'unknown reason'}`);\n this.onDisconnect(e);\n };\n });\n }\n\n encrypt(msg) {\n if (this.encryptionKey) {\n let crypted = this.encryptor.encrypt(msg);\n if (crypted === false) {\n throw new Error(\"Encryption failed. Stopping\")\n }\n return crypted;\n }\n return msg;\n }\n\n send(payload) {\n if (this.ctrlChannel.readyState != WebSocket.OPEN) {\n this.close();\n // .then(this.connect.bind(this));\n // return;\n throw new Error('disconnected');\n }\n // Log.debug(payload);\n let data = {\n contentLength: payload.length,\n seq: ++WSPProtocol.seq\n };\n return {\n seq:data.seq,\n promise: new Promise((resolve, reject)=>{\n this.awaitingPromises[data.seq] = {resolve, reject};\n let msg = this.builder.build(WSPProtocol.CMD_WRAP, data, payload);\n Log.debug(msg);\n this.ctrlChannel.send(this.encrypt(msg));\n })};\n }\n}","import {getTagged} from './deps/bp_logger.js';\nimport {Url} from './core/util/url.js';\nimport {Remuxer} from './core/remuxer/remuxer.js';\nimport DEFAULT_CLIENT from './client/rtsp/client.js';\nimport DEFAULT_TRANSPORT from './transport/websocket.js';\n\nconst Log = getTagged('wsp');\n\nexport class StreamType {\n static get HLS() {return 'hls';}\n static get RTSP() {return 'rtsp';}\n\n static isSupported(type) {\n return [StreamType.HLS, StreamType.RTSP].includes(type);\n }\n\n static fromUrl(url) {\n let parsed;\n try {\n parsed = Url.parse(url);\n } catch (e) {\n return null;\n }\n switch (parsed.protocol) {\n case 'rtsp':\n return StreamType.RTSP;\n case 'http':\n case 'https':\n if (url.indexOf('.m3u8')>=0) {\n return StreamType.HLS;\n } else {\n return null;\n }\n default:\n return null;\n }\n }\n\n static fromMime(mime) {\n switch (mime) {\n case 'application/x-rtsp':\n return StreamType.RTSP;\n case 'application/vnd.apple.mpegurl':\n case 'application/x-mpegurl':\n return StreamType.HLS;\n default:\n return null;\n }\n }\n}\n\nexport class WSPlayer {\n\n constructor(node, opts) {\n if (typeof node == typeof '') {\n this.player = document.getElementById(node);\n } else {\n this.player = node;\n }\n\n let modules = opts.modules || {\n client: DEFAULT_CLIENT,\n transport: {\n constructor: DEFAULT_TRANSPORT\n }\n };\n this.errorHandler = opts.errorHandler || null;\n this.queryCredentials = opts.queryCredentials || null;\n\n this.modules = {};\n for (let module of modules) {\n let transport = module.transport || DEFAULT_TRANSPORT;\n let client = module.client || DEFAULT_CLIENT;\n if (transport.constructor.canTransfer(client.streamType())) {\n this.modules[client.streamType()] = {\n client: client,\n transport: transport\n }\n } else {\n Log.warn(`Client stream type ${client.streamType()} is incompatible with transport types [${transport.streamTypes().join(', ')}]. Skip`)\n }\n }\n \n this.type = StreamType.RTSP;\n this.url = null;\n if (opts.url && opts.type) {\n this.url = opts.url;\n this.type = opts.type;\n } else {\n if (!this._checkSource(this.player)) {\n for (let i=0; i<this.player.children.length; ++i) {\n if (this._checkSource(this.player.children[i])) {\n break;\n }\n }\n }\n // if (!this.url) {\n // throw new Error('No playable endpoint found');\n // }\n }\n\n if (this.url) {\n this.setSource(this.url, this.type);\n }\n\n this.player.addEventListener('play', ()=>{\n if (!this.isPlaying()) {\n this.client.start();\n }\n }, false);\n\n this.player.addEventListener('pause', ()=>{\n this.client.stop();\n }, false);\n }\n\n // TODO: check native support\n\n isPlaying() {\n return !(this.player.paused || this.client.paused);\n }\n\n static canPlayWithModules(mimeType, modules) {\n\n let filteredModules = {};\n for (let module of modules) {\n let transport = module.transport || DEFAULT_TRANSPORT;\n let client = module.client || DEFAULT_CLIENT;\n if (transport.canTransfer(client.streamType())) {\n filteredModules[client.streamType()] = true;\n }\n }\n\n for (let type in filteredModules) {\n if (type == StreamType.fromMime(mimeType)) {\n return true;\n }\n }\n return false;\n }\n\n /// TODO: deprecate it?\n static canPlay(resource) {\n return StreamType.fromMime(resource.type) || StreamType.fromUrl(resource.src);\n }\n\n canPlayUrl(src) {\n let type = StreamType.fromUrl(src);\n return (type in this.modules);\n }\n\n _checkSource(src) {\n if (!src.dataset['ignore'] && src.src && !this.player.canPlayType(src.type) && (StreamType.fromMime(src.type) || StreamType.fromUrl(src.src))) {\n this.url = src.src;\n this.type = src.type ? StreamType.fromMime(src.type) : StreamType.fromUrl(src.src);\n return true;\n }\n return false;\n }\n\n async setSource(url, type) {\n if (this.transport) {\n if (this.client) {\n await this.client.detachTransport();\n }\n await this.transport.destroy();\n }\n try {\n this.endpoint = Url.parse(url);\n } catch (e) {\n return;\n }\n this.url = url;\n let transport = this.modules[type].transport;\n this.transport = new transport.constructor(this.endpoint, this.type, transport.options);\n\n\n let lastType = this.type;\n this.type = (StreamType.isSupported(type)?type:false) || StreamType.fromMime(type);\n if (!this.type) {\n throw new Error(\"Bad stream type\");\n }\n\n if (lastType!=this.type || !this.client) {\n if (this.client) {\n await this.client.destroy();\n }\n let client = this.modules[type].client;\n this.client = new client();\n } else {\n this.client.reset();\n }\n\n if (this.queryCredentials) {\n this.client.queryCredentials = this.queryCredentials;\n }\n if (this.remuxer) {\n this.remuxer.destroy();\n this.remuxer = null;\n }\n this.remuxer = new Remuxer(this.player);\n this.remuxer.attachClient(this.client);\n\n this.client.attachTransport(this.transport);\n this.client.setSource(this.endpoint);\n\n if (this.player.autoplay) {\n this.start();\n }\n }\n\n start() {\n if (this.client) {\n this.client.start().catch((e)=>{\n if (this.errorHandler) {\n this.errorHandler(e);\n }\n });\n }\n }\n\n stop() {\n if (this.client) {\n this.client.stop();\n }\n }\n\n async destroy() {\n if (this.transport) {\n if (this.client) {\n await this.client.detachTransport();\n }\n await this.transport.destroy();\n }\n if (this.client) {\n await this.client.destroy();\n }\n if (this.remuxer) {\n this.remuxer.destroy();\n this.remuxer = null;\n }\n }\n\n}\n","import {LogLevel, getTagged, setDefaultLogLevel} from 'bp_logger';\nimport * as streamedian from 'streamedian/player.js';\nimport WebsocketTransport from 'streamedian/transport/websocket.js';\nimport RTSPClient from 'streamedian/client/rtsp/client.js';\nimport {isSafari} from \"streamedian/core/util/browser.js\";\n\n\nsetDefaultLogLevel(LogLevel.Error);\n\n\nwindow.Streamedian = {\n logger(tag) {\n return getTagged(tag)\n },\n player(node, opts) {\n if (!opts.socket) {\n throw new Error(\"socket parameter is not set\");\n }\n let _options = {\n modules: [\n {\n client: RTSPClient,\n transport: {\n constructor: WebsocketTransport,\n options: {\n socket: opts.socket\n }\n }\n }\n ],\n errorHandler(e) {\n alert(`Failed to start player: ${e.message}`);\n },\n queryCredentials(client) {\n return new Promise((resolve, reject) => {\n let c = prompt('input credentials in format user:password');\n if (c) {\n client.setCredentials.apply(client, c.split(':'));\n resolve();\n } else {\n reject();\n }\n });\n }\n };\n return new streamedian.WSPlayer(node, _options);\n }\n};"],"names":["LOG_TAG","Log","logger","RTSPClient","decoder","DEFAULT_CLIENT","DEFAULT_TRANSPORT","streamedian.WSPlayer"],"mappings":";;;AAAA;AACA,AAAO,MAAM,QAAQ,GAAG;IACpB,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,GAAG,EAAE,CAAC;IACN,KAAK,EAAE,CAAC;CACX,CAAC;;AAEF,IAAI,iBAAiB,GAAG,QAAQ,CAAC,KAAK,CAAC;;AAEvC,AAAO,SAAS,kBAAkB,CAAC,KAAK,EAAE;IACtC,iBAAiB,GAAG,KAAK,CAAC;CAC7B;AACD,AAAO,MAAM,MAAM,CAAC;IAChB,WAAW,CAAC,KAAK,GAAG,iBAAiB,EAAE,GAAG,EAAE;QACxC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;KACxB;;IAED,QAAQ,CAAC,KAAK,EAAE;QACZ,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;KACtB;;IAED,WAAW,SAAS,GAAG,EAAE,OAAO;QAC5B,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK;QACtB,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK;QACpB,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM;QACtB,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO;KAC3B,CAAC;;IAEF,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE;QACZ,IA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