{"version":3,"sources":["jsdelivr-header.js","/npm/stanza@12.20.0/helpers/StreamManagement.js","/npm/stanza@12.20.0/lib/stringprep/Tables.js","/npm/stanza@12.20.0/lib/stringprep/index.js","/npm/stanza@12.20.0/JID.js","/npm/stanza@12.20.0/jxt/Error.js","/npm/stanza@12.20.0/jxt/Definitions.js","/npm/stanza@12.20.0/jxt/Element.js","/npm/stanza@12.20.0/jxt/sanitizers/XHTMLIM.js","/npm/stanza@12.20.0/platform/browser/buffer/base64-js/index.js","/npm/stanza@12.20.0/platform/browser/buffer/ieee754/index.js","/npm/stanza@12.20.0/platform/browser/buffer/index.js","/npm/stanza@12.20.0/platform/browser/process.js","/npm/stanza@12.20.0/platform/browser/stream/util.js","/npm/stanza@12.20.0/platform/browser/stream/lib/internal/streams/BufferList.js","/npm/stanza@12.20.0/platform/browser/stream/lib/internal/streams/destroy.js","/npm/stanza@12.20.0/platform/browser/stream/lib/_stream_writable.js","/npm/stanza@12.20.0/platform/browser/stream/lib/_stream_duplex.js","/npm/stanza@12.20.0/platform/browser/stream/string_decoder.js","/npm/stanza@12.20.0/platform/browser/stream/lib/_stream_readable.js","/npm/stanza@12.20.0/platform/browser/stream/lib/_stream_transform.js","/npm/stanza@12.20.0/platform/browser/stream/lib/_stream_passthrough.js","/npm/stanza@12.20.0/platform/browser/stream/index.js","/npm/stanza@12.20.0/platform/browser/crypto/Hash.js","/npm/stanza@12.20.0/platform/browser/crypto/MD5.js","/npm/stanza@12.20.0/platform/browser/crypto/SHA-1.js","/npm/stanza@12.20.0/platform/browser/crypto/SHA-256.js","/npm/stanza@12.20.0/platform/browser/crypto/SHA-512.js","/npm/stanza@12.20.0/platform/browser/crypto/createHash.js","/npm/stanza@12.20.0/platform/browser/crypto/Hmac.js","/npm/stanza@12.20.0/platform/browser/index.js","/npm/stanza@12.20.0/jxt/Parser.js","/npm/stanza@12.20.0/jxt/Types.js","/npm/stanza@12.20.0/jxt/Translator.js","/npm/stanza@12.20.0/jxt/Registry.js","/npm/stanza@12.20.0/Namespaces.js","/npm/stanza@12.20.0/jxt/Helpers.js","/npm/stanza@12.20.0/jxt/StreamParser.js","/npm/stanza@12.20.0/jxt/index.js","/npm/stanza@12.20.0/lib/sasl/index.js","/npm/stanza@12.20.0/plugins/account.js","/npm/stanza@12.20.0/plugins/avatar.js","/npm/stanza@12.20.0/plugins/bind.js","/npm/stanza@12.20.0/plugins/command.js","/npm/stanza@12.20.0/Utils.js","/npm/stanza@12.20.0/plugins/connection.js","/npm/stanza@12.20.0/helpers/LegacyEntityCapabilities.js","/npm/stanza@12.20.0/helpers/DiscoManager.js","/npm/stanza@12.20.0/plugins/disco.js","/npm/stanza@12.20.0/Constants.js","/npm/stanza@12.20.0/plugins/entity.js","/npm/stanza@12.20.0/plugins/features.js","/npm/stanza@12.20.0/plugins/hostmeta.js","/npm/stanza@12.20.0/jingle/sdp/Intermediate.js","/npm/stanza@12.20.0/jingle/sdp/Protocol.js","/npm/stanza@12.20.0/jingle/Session.js","/npm/stanza@12.20.0/jingle/ICESession.js","/npm/stanza@12.20.0/jingle/FileTransferSession.js","/npm/stanza@12.20.0/jingle/MediaSession.js","/npm/stanza@12.20.0/jingle/SessionManager.js","/npm/stanza@12.20.0/jingle/index.js","/npm/stanza@12.20.0/plugins/jingle.js","/npm/stanza@12.20.0/helpers/DataForms.js","/npm/stanza@12.20.0/plugins/mam.js","/npm/stanza@12.20.0/plugins/messaging.js","/npm/stanza@12.20.0/plugins/muc.js","/npm/stanza@12.20.0/plugins/pep.js","/npm/stanza@12.20.0/plugins/pubsub.js","/npm/stanza@12.20.0/plugins/roster.js","/npm/stanza@12.20.0/plugins/sasl.js","/npm/stanza@12.20.0/plugins/sharing.js","/npm/stanza@12.20.0/plugins/index.js","/npm/stanza@12.20.0/protocol/rfc3921.js","/npm/stanza@12.20.0/protocol/rfc4287.js","/npm/stanza@12.20.0/protocol/rfc6120.js","/npm/stanza@12.20.0/protocol/rfc6121.js","/npm/stanza@12.20.0/protocol/rfc7395.js","/npm/stanza@12.20.0/protocol/xep0004.js","/npm/stanza@12.20.0/protocol/xep0012.js","/npm/stanza@12.20.0/protocol/xep0016.js","/npm/stanza@12.20.0/protocol/xep0030.js","/npm/stanza@12.20.0/protocol/xep0033.js","/npm/stanza@12.20.0/protocol/xep0045.js","/npm/stanza@12.20.0/protocol/xep0047.js","/npm/stanza@12.20.0/protocol/xep0048.js","/npm/stanza@12.20.0/protocol/xep0049.js","/npm/stanza@12.20.0/protocol/xep0050.js","/npm/stanza@12.20.0/protocol/xep0054.js","/npm/stanza@12.20.0/protocol/xep0055.js","/npm/stanza@12.20.0/protocol/xep0059.js","/npm/stanza@12.20.0/protocol/xep0060.js","/npm/stanza@12.20.0/protocol/xep0065.js","/npm/stanza@12.20.0/protocol/xep0066.js","/npm/stanza@12.20.0/protocol/xep0071.js","/npm/stanza@12.20.0/protocol/xep0077.js","/npm/stanza@12.20.0/protocol/xep0080.js","/npm/stanza@12.20.0/protocol/xep0084.js","/npm/stanza@12.20.0/protocol/xep0085.js","/npm/stanza@12.20.0/protocol/xep0092.js","/npm/stanza@12.20.0/protocol/xep0107.js","/npm/stanza@12.20.0/protocol/xep0108.js","/npm/stanza@12.20.0/protocol/xep0114.js","/npm/stanza@12.20.0/protocol/xep0115.js","/npm/stanza@12.20.0/protocol/xep0118.js","/npm/stanza@12.20.0/protocol/xep0141.js","/npm/stanza@12.20.0/protocol/xep0124.js","/npm/stanza@12.20.0/protocol/xep0131.js","/npm/stanza@12.20.0/protocol/xep0138.js","/npm/stanza@12.20.0/protocol/xep0144.js","/npm/stanza@12.20.0/protocol/xep0153.js","/npm/stanza@12.20.0/protocol/xep0158.js","/npm/stanza@12.20.0/protocol/xep0166.js","/npm/stanza@12.20.0/protocol/xep0167.js","/npm/stanza@12.20.0/protocol/xep0172.js","/npm/stanza@12.20.0/protocol/xep0176.js","/npm/stanza@12.20.0/protocol/xep0177.js","/npm/stanza@12.20.0/protocol/xep0184.js","/npm/stanza@12.20.0/protocol/xep0186.js","/npm/stanza@12.20.0/protocol/xep0191.js","/npm/stanza@12.20.0/protocol/xep0198.js","/npm/stanza@12.20.0/protocol/xep0199.js","/npm/stanza@12.20.0/protocol/xep0202.js","/npm/stanza@12.20.0/protocol/xep0203.js","/npm/stanza@12.20.0/protocol/xep0215.js","/npm/stanza@12.20.0/protocol/xep0221.js","/npm/stanza@12.20.0/protocol/xep0224.js","/npm/stanza@12.20.0/protocol/xep0231.js","/npm/stanza@12.20.0/protocol/xep0234.js","/npm/stanza@12.20.0/protocol/xep0247.js","/npm/stanza@12.20.0/protocol/xep0260.js","/npm/stanza@12.20.0/protocol/xep0261.js","/npm/stanza@12.20.0/protocol/xep0264.js","/npm/stanza@12.20.0/protocol/xep0280.js","/npm/stanza@12.20.0/protocol/xep0297.js","/npm/stanza@12.20.0/protocol/xep0300.js","/npm/stanza@12.20.0/protocol/xep0301.js","/npm/stanza@12.20.0/protocol/xep0308.js","/npm/stanza@12.20.0/protocol/xep0313.js","/npm/stanza@12.20.0/protocol/xep0317.js","/npm/stanza@12.20.0/protocol/xep0319.js","/npm/stanza@12.20.0/protocol/xep0320.js","/npm/stanza@12.20.0/protocol/xep0333.js","/npm/stanza@12.20.0/protocol/xep0334.js","/npm/stanza@12.20.0/protocol/xep0335.js","/npm/stanza@12.20.0/protocol/xep0338.js","/npm/stanza@12.20.0/protocol/xep0343.js","/npm/stanza@12.20.0/protocol/xep0352.js","/npm/stanza@12.20.0/protocol/xep0357.js","/npm/stanza@12.20.0/protocol/xep0359.js","/npm/stanza@12.20.0/protocol/xep0363.js","/npm/stanza@12.20.0/protocol/xep0380.js","/npm/stanza@12.20.0/protocol/xep0384.js","/npm/stanza@12.20.0/protocol/xrd.js","/npm/stanza@12.20.0/protocol/index.js","/npm/stanza@12.20.0/transports/bosh.js","/npm/stanza@12.20.0/transports/websocket.js","/npm/stanza@12.20.0/helpers/NetworkDiscovery.js","/npm/stanza@12.20.0/Client.js","/npm/stanza@12.20.0/helpers/RTT.js","/npm/stanza@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K,GAAM,CAClC,CACI,KAAA,GACI,MAAM,EAAI,GAAS,OAAO,YAAY,IAStC,OARA,EAAE,aAAa,KAAK,GAAI,GACxB,EAAE,aAAa,KAAK,GAAI,GACxB,EAAE,aAAa,KAAK,GAAI,GACxB,EAAE,aAAa,KAAK,GAAI,IACxB,EAAE,aAAa,KAAK,GAAI,IACxB,EAAE,aAAa,KAAK,GAAI,IACxB,EAAE,aAAa,KAAK,GAAI,IACxB,EAAE,aAAa,KAAK,GAAI,IACjB,CACf,EAEA,GAAA,QAAkB,G,UCjKlB,OAAO,eAAe,GAAS,aAAc,CAAE,OAAO,IACtD,MAGM,GAAW,GACX,IAAS,EAJC,EAIW,iBAAiB,IACtC,GAAI,CACN,WACA,WACA,WACA,UACA,WACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,UACA,WACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,UACA,WACA,UACA,WACA,WACA,WACA,WACA,WACA,UACA,UACA,WACA,UACA,WACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,UACA,WACA,UACA,UACA,UACA,WACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,UACA,UACA,UACA,WACA,UACA,WACA,UACA,WACA,UACA,WACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,UACA,WACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,WACA,UACA,WACA,UACA,WACA,UACA,WACA,UACA,UACA,UACA,UACA,UACA,WACA,WACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,UACA,WACA,YAEJ,SAAS,GAAG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QACA,OACA,WACA,OACA,YACA,WACA,gBACA,YACA,SACA,QACA,WACA,UACA,WACA,YACA,eACA,YACA,WACA,aACA,cACA,UACA,UACA,cACA,aACA,WACA,WACA,SACA,SACA,QACA,UACA,MACA,UACA,aACA,SACA,OACA,YACA,SACA,UACA,YACA,aACA,cACA,aACA,UACA,SACA,OACA,QACA,OACA,QACA,UACA,UACA,WACA,WACA,UACA,QACA,UACA,WACA,aACA,WACA,MACA,YACA,YACA,UACA,UACA,MACA,OACA,SACA,cACA,WACA,SACA,YACA,WACA,UACA,QACA,YACA,OACA,WAEJ,EAAgC,sBAAA,CAC5B,eACA,WACA,SACA,aACA,WACA,qBACA,WACA,WACA,UACA,YACA,YACA,WAEJ,EAAiC,uBAAA,CAC7B,aACA,iBACA,mBACA,WACA,SACA,YACA,UACA,UACA,UACA,UACA,UACA,oBACA,mBACA,oBACA,UACA,UACA,SACA,YACA,oBACA,YACA,cACA,gBACA,iBACA,mBACA,gBACA,gBACA,eACA,aACA,SACA,SACA,WACA,eACA,eACA,UACA,WACA,aACA,aACA,YACA,eACA,cACA,iBACA,QACA,WACA,iBACA,UACA,UACA,aACA,UACA,oBACA,oBACA,UACA,WACA,SACA,WACA,UACA,cACA,WACA,aACA,WACA,gBACA,kBACA,WACA,UACA,kBACA,mBACA,cACA,cACA,WAGJ,EAAA,YADoB,CAAC,EAAW,IAAS,IAAI,KAAa,IAE1D,EAAA,kBAA2B,EAAI,EAAQ,aAAa,EAAa,qBAAsB,QACvF,EAAA,oBAA6B,EAAI,EAAQ,aAAa,EAAa,qBAAsB,UACzF,EAAA,kBAA2B,EAAI,EAAQ,aAAa,EAAa,qBAAsB,QACvF,EAAA,oBAA6B,EAAI,EAAQ,aAAa,EAAa,qBAAsB,UACzF,EAAA,oBAA6B,EAAI,EAAQ,aAAa,EAAa,qBAAsB,UACzF,EAAA,qBAA8B,EAAI,EAAQ,aAAa,EAAa,qBAAsB,WAC1F,EAAA,wBAAiC,EAAI,EAAQ,aAAa,E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,cAAc,EAAuC,GACjE,MAAM,GAAM,EAAI,EAAQ,cAAc,IACtC,EAAA,IAAc,EACd,MAAM,GAAY,EAAI,EAAQ,cAAc,IAC5C,EAAA,UAAoB,EACpB,EAAkB,QAAA,EAAU,QAC5B,MAAM,GAAY,EAAI,EAAQ,iBAAiB,KAC/C,EAAI,EAAQ,cAAc,GAAsB,GAMhD,EAAA,aALA,SAAsB,GAClB,MAAM,EAAS,IAAI,EAAS,QAAQ,GAEpC,OADA,EAAO,IAAI,EAAU,SACd,CACX,C","file":"/npm/stanza@12.20.0/index.js/+esm","sourceRoot":"","sourcesContent":["/**\n * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0.\n * Original file: /npm/stanza@12.20.0/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst events_1 = require(\"events\");\nconst MAX_SEQ = Math.pow(2, 32);\nconst mod = (v, n) => ((v % n) + n) % n;\nclass StreamManagement extends events_1.EventEmitter {\n    constructor() {\n        super();\n        this.allowResume = true;\n        this.lastAck = 0;\n        this.handled = 0;\n        this.unacked = [];\n        this.inboundStarted = false;\n        this.outboundStarted = false;\n        this.id = undefined;\n        this.jid = undefined;\n        this.allowResume = true;\n        this.started = false;\n        this.cacheHandler = () => undefined;\n        this._reset();\n    }\n    get started() {\n        return this.outboundStarted && this.inboundStarted;\n    }\n    set started(value) {\n        if (!value) {\n            this.outboundStarted = false;\n            this.inboundStarted = false;\n        }\n    }\n    get resumable() {\n        return this.started && this.allowResume;\n    }\n    load(opts) {\n        var _a;\n        this.id = opts.id;\n        this.allowResume = (_a = opts.allowResume) !== null && _a !== void 0 ? _a : true;\n        this.handled = opts.handled;\n        this.lastAck = opts.lastAck;\n        this.unacked = opts.unacked;\n        this.emit('prebound', opts.jid);\n    }\n    cache(handler) {\n        this.cacheHandler = handler;\n    }\n    async bind(jid) {\n        this.jid = jid;\n        await this._cache();\n    }\n    async enable() {\n        this.emit('send', {\n            allowResumption: this.allowResume,\n            type: 'enable'\n        });\n    }\n    async resume() {\n        this.emit('send', {\n            handled: this.handled,\n            previousSession: this.id,\n            type: 'resume'\n        });\n    }\n    async enabled(resp) {\n        this.id = resp.id;\n        this.allowResume = resp.resume || false;\n        this.handled = 0;\n        this.inboundStarted = true;\n        await this._cache();\n    }\n    async resumed(resp) {\n        this.id = resp.previousSession;\n        this.inboundStarted = true;\n        await this.process(resp, true);\n        await this._cache();\n    }\n    async failed(resp) {\n        // Resumption might fail, but the server can still tell us how far\n        // the old session progressed.\n        await this.process(resp);\n        // We alert that any remaining unacked stanzas failed to send. It has\n        // been too long for auto-retrying these to be the right thing to do.\n        for (const [kind, stanza] of this.unacked) {\n            this.emit('failed', { kind, stanza });\n        }\n        this._reset();\n        await this._cache();\n    }\n    ack() {\n        this.emit('send', {\n            handled: this.handled,\n            type: 'ack'\n        });\n    }\n    request() {\n        this.emit('send', {\n            type: 'request'\n        });\n    }\n    async process(ack, resend = false) {\n        if (ack.handled === undefined) {\n            return;\n        }\n        const numAcked = mod(ack.handled - this.lastAck, MAX_SEQ);\n        for (let i = 0; i < numAcked && this.unacked.length > 0; i++) {\n            const [kind, stanza] = this.unacked.shift();\n            this.emit('acked', { kind, stanza });\n        }\n        this.lastAck = ack.handled;\n        if (resend) {\n            const resendUnacked = this.unacked;\n            this.unacked = [];\n            if (resendUnacked.length) {\n                this.emit('begin-resend');\n                for (const [kind, stanza] of resendUnacked) {\n                    this.emit('resend', { kind, stanza });\n                }\n                this.emit('end-resend');\n            }\n        }\n        await this._cache();\n    }\n    async track(kind, stanza) {\n        const isStanzaEnable = stanza.type === 'enable';\n        if (kind === 'sm' && (isStanzaEnable || stanza.type === 'resume')) {\n            if (isStanzaEnable) {\n                this.handled = 0;\n            }\n            this.outboundStarted = true;\n            await this._cache();\n            return false;\n        }\n        if (!this.outboundStarted) {\n            return false;\n        }\n        if (kind !== 'message' && kind !== 'presence' && kind !== 'iq') {\n            return false;\n        }\n        this.unacked.push([kind, stanza]);\n        await this._cache();\n        return true;\n    }\n    async handle() {\n        if (this.inboundStarted) {\n            this.handled = mod(this.handled + 1, MAX_SEQ);\n            await this._cache();\n        }\n    }\n    async hibernate() {\n        if (!this.resumable) {\n            return this.shutdown();\n        }\n        for (const [kind, stanza] of this.unacked) {\n            this.emit('hibernated', { kind, stanza });\n        }\n    }\n    async shutdown() {\n        return this.failed({ type: 'failed' });\n    }\n    async _cache() {\n        try {\n            await this.cacheHandler({\n                allowResume: this.allowResume,\n                handled: this.handled,\n                id: this.id,\n                jid: this.jid,\n                lastAck: this.lastAck,\n                unacked: this.unacked\n            });\n        }\n        catch (err) {\n            // TODO: Is there a good way to handle this?\n            // istanbul ignore next\n            console.error('Failed to cache stream state', err);\n        }\n    }\n    _reset() {\n        this.id = '';\n        this.inboundStarted = false;\n        this.outboundStarted = false;\n        this.lastAck = 0;\n        this.handled = 0;\n        this.unacked = [];\n    }\n}\nexports.default = StreamManagement;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TABLE_DATA = void 0;\nexports.TABLE_DATA = {\n    'A.1': {\n        r: 'hk:if|le:lf|nf:nv|qg:qv|rg:rj|rm:rp|rr:rt|rv:s3|vn:vv|17m:17n|17q:17v|18g:19g|1an:1ao|1cb:1cg|1e5:1ef|1fb:1ff|1fl:1gb|1gd:1gq|1gs:1gu|1hr:1hv|1im:1iv|1ne:1nf|1pd:1pf|1qb:1rv|1ti:280|29q:29r|2ae:2af|2al:2an|2bh:2c0|2cd:2ce|2ch:2ci|2dj:2dl|2dq:2dr|2e5:2e6|2e9:2ea|2ee:2em|2eo:2er|2f4:2f5|2fr:2g1|2g3:2g4|2gb:2ge|2gh:2gi|2hq:2hr|2i3:2i6|2i9:2ia|2ie:2io|2iv:2j5|2jl:2k0|2lq:2lr|2me:2mf|2mh:2mv|2n1:2n5|2ng:2o0|2od:2oe|2oh:2oi|2pk:2pl|2pq:2pr|2q4:2q6|2q9:2qa|2qe:2ql|2qo:2qr|2r2:2r5|2rh:2s1|2sb:2sd|2sm:2so|2t0:2t2|2t5:2t7|2tb:2td|2tq:2tt|2u3:2u5|2ue:2um|2uo:2v6|2vj:300|31q:31t|32e:32k|32n:32v|332:335|33g:341|35q:35t|36e:36k|36n:36t|372:375|37g:381|39q:39t|3a4:3a5|3ae:3am|3ao:3av|3b2:3b5|3bg:3c1|3cn:3cp|3du:3dv|3e7:3e9|3eb:3ee|3f0:3fh|3fl:3g0|3hr:3hu|3is:3k0|3k5:3k6|3kb:3kc|3ke:3kj|3l8:3l9|3lu:3lv|3me:3mf|3mq:3mr|3mu:3nv|3rb:3rg|3sc:3sf|3ud:3ue|3ug:3vv|41j:41l|41q:41v|42q:44v|466:46f|47p:47q|47s:47v|4aq:4au|4d3:4d7|4fq:4fv|4ie:4if|4iu:4iv|4ke:4kf|4lm:4ln|4m6:4m7|4om:4on|4qr:4r0|4rt:4sv|4vl:500|5jn:5jv|5kt:5kv|5nh:5nv|5ol:5ov|5pn:5pv|5qk:5qv|5rk:5rv|5ut:5uv|5va:5vv|60q:60v|63o:63v|65a:7fv|7ks:7kv|7nq:7nv|7om:7on|7ou:7ov|7q6:7q7|7qe:7qf|7ru:7rv|7uk:7ul|7vg:7vh|82j:82m|82o:82u|834:839|83i:83j|84f:84v|85i:86f|87b:87v|89r:89s|8ac:8ai|8c4:8cf|8uf:8vv|917:91v|92b:92v|9gk:9gl|9ju:9jv|9ka:9o0|9oa:9ob|9qj:9ql|9qv:9r0|9sl:9sn|9tv:9uf|9vc:9vf|ao0:bjv|bnk:bnv|bum:bvf|bvs:bvv|c4n:c4o|c80:c84|c9d:c9g|cdo:cff|cgt:cgv|ci4:cig|cjs:cju|cmc:cmf|crn:crq|cuu:cuv|jdm:jfv|17t6:17vv|194d:194f|1967:1avv|1lt4:1lvv|1uhe:1uhf|1ujb:1unv|1uo7:1uoi|1uoo:1uos|1uti:1uui|1va0:1vaf|1vcg:1vch|1ve8:1vef|1vft:1vfv|1vgg:1vgv|1vh4:1vhf|1vi7:1vi8|1vjc:1vjf|1vnt:1vnu|1vtv:1vu1|1vu8:1vu9|1vug:1vuh|1vuo:1vup|1vut:1vuv|1vvf:1vvo|2000:20nv|20p4:20pf|20qb:20vv|2116:2117|212e:3jvv|3k7m:3k7v|3k97:3k99|3keu:3kvv|3l50:3l51|3l53:3l54|3l57:3l58|3l8b:3l8c|3la7:3la9|3ll4:3ll7|3lua:3lud|3m00:3vvt|59mn:5tvv|5ugu:5vvt|6000:7vvt|8000:9vvt|a000:bvvt|c000:dvvt|e000:fvvt|g000:hvvt|i000:jvvt|k000:lvvt|m000:nvvt|o000:pvvt|q000:rvvt|s002:s00v|s040:tvvt',\n        s: '9p8|9qc|9qe|9qn|9tg|147|bkq|3l2l|3l4t|3l5d|3l5q|3l5s|3l61|3l64|3l86|3l8l|3l8t|3l9q|3l9v|3la5|3lah|16f|c20|ccf|cnv|cvv|1b0|1c8|1d2|1dq|1h0|1nv|1oe|284|2c4|2d9|2dh|2dt|2eu|2h9|2hh|2hk|2hn|2ht|2it|2k4|2kc|2ke|2ki|2l9|2lh|2lk|2m6|2ma|2o4|2p9|2ph|2qu|2s4|2sh|2sr|2st|2tm|2u9|304|30d|30h|319|31k|325|329|344|34d|34h|359|35k|365|369|36v|384|38d|38h|399|3a9|3c4|3di|3ds|3el|3en|3k3|3k9|3ko|3l0|3l4|3l6|3lc|3lq|3m5|3m7|3q8|3so|3tt|412|418|41b|4g7|4i7|4i9|4in|4ip|4k7|4k9|4lf|4lh|4lv|4m1|4mf|4mn|4nf|4of|4oh|4ov|4q7|h1|5od|5rd|5rh|60f|1upn|1upt|1upv|1uq2|1uq5|1vij|1vj7|1vjl|1vo0|1vv7|20ov|7qo|7qq|7qs|7qu|7tl|7u5|7us|7vl|7vv|sb|sd|s000|t2|97v|uf|9go|9o5'\n    },\n    'B.1': {\n        r: '60b:60d|80b:80d|1vg0:1vgf',\n        s: '5d|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1|7v4:u1;oj|7v6:u5;q2|7v7:u5;o8;q2|7vi:7rs;tp|7vj:u9;tp|7vk:ue;tp|7vm:u9;q2|7vn:u9;q2;tp|7vs:u9;tp|858:3i;3j|882:33|883:5g;33|887:ir|889:5g;36|88b:38|88c:38|88d:38|88g:39|88h:39|88i:3c|88l:3e|88m:3e;3f|88p:3g|88q:3h|88r:3i|88s:3i|88t:3i|890:3j;3d|891:3k;35;3c|892:3k;3d|894:3q|898:3q|89c:32|89d:33|89g:35|89h:36|89j:3d|89u:tj|89v:u0|8a5:34|crh:38;3g;31|crj:31;3l|crl:3f;3m|cs0:3g;31|cs1:3e;31|cs2:ts;31|cs3:3d;31|cs4:3b;31|cs5:3b;32|cs6:3d;32|cs7:37;32|csa:3g;36|csb:3e;36|csc:ts;36|csg:38;3q|csh:3b;38;3q|csi:3d;38;3q|csj:37;38;3q|csk:3k;38;3q|ct9:3g;31|cta:3b;3g;31|ctb:3d;3g;31|ctc:37;3g;31|ctk:3g;3m|ctl:3e;3m|ctm:ts;3m|ctn:3d;3m|cto:3b;3m|ctp:3d;3m|ctq:3g;3n|ctr:3e;3n|cts:ts;3n|ctt:3d;3n|ctu:3b;3n|ctv:3d;3n|cu0:3b;u9|cu1:3d;u9|cu3:32;3h|cu6:33;8gl;3b;37|cu7:33;3f;1e|cu8:34;32|cu9:37;3p|cub:38;3g|cud:3b;3b|cue:3b;3d|cun:3g;38|cup:3g;3g;3d|cuq:3g;3i|cus:3j;3m|cut:3n;32|1uo0:36;36|1uo1:36;39|1uo2:36;3c|1uo3:36;36;39|1uo4:36;36;3c|1uo5:3j;3k|1uo6:3j;3k|1uoj:1bk;1bm|1uok:1bk;1b5|1uol:1bk;1bb|1uom:1bu;1bm|1uon:1bk;1bd|3l00:31|3l01:32|3l02:33|3l03:34|3l04:35|3l05:36|3l06:37|3l07:38|3l08:39|3l09:3a|3l0a:3b|3l0b:3c|3l0c:3d|3l0d:3e|3l0e:3f|3l0f:3g|3l0g:3h|3l0h:3i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q|3lsq:tr|3lsr:ts|3lss:tt|3lst:tu|3lsu:tv|3lsv:u0|3lt0:u1|3lt1:to|3lt2:u3|3lt3:u4|3lt4:u5|3lt5:u6|3lt6:u7|3lt7:u8|3lt8:u9|3ltr:u3',\n        r: '23:2c|2i:2k|2m:2q|60:6m|6o:6u|bo:bp|c1:c2|c6:c7|c9:cb|ce:ch|cj:ck|cm:co|cs:ct|cv:d0|d6:d7|de:df|dh:dj|dn:do|e4:e5|e7:e8|ea:eb|fh:fi|fm:fo|s8:sa|se:sf|sh:t1|t3:tb|100:11f|19h:1am|7o8:7of|7oo:7ot|7p8:7pf|7po:7pv|7q8:7qd|7r8:7rf|7to:7tr|7u8:7ub|7uo:7ur|7v8:7vc|7vo:7vr|89a:89b|8b0:8bf|95m:96f|1vp1:1vpq|2100:2115',\n        s: 'v8|va|vc|ve|vk|130|132|134|136|138|13a|13c|13e|13g|13i|13k|13m|13o|13q|13s|13u|140|14a|14c|14e|14g|14i|14k|14m|14o|14q|14s|14u|150|152|154|156|158|15a|15c|15e|15g|15i|15k|15m|15o|15q|15s|15u|161|163|165|167|169|16b|16d|16g|16i|16k|16m|16o|16q|16s|16u|170|172|174|176|178|17a|17c|17e|17g|17i|17k|17o|180|182|184|186|188|18a|18c|18e|80|82|84|86|88|8a|8c|8e|8g|8i|8k|8m|8o|8q|8s|8u|90|92|94|96|98|9a|9c|9e|9i|9k|9m|9p|9r|9t|9v|a1|a3|a5|a7|aa|ac|ae|ag|ai|ak|am|ao|aq|as|au|b0|b2|b4|b6|b8|ba|bc|be|bg|bi|bk|bm|br|bt|c4|d2|d4|d9|dc|dl|ds|ed|ef|eh|ej|el|en|ep|er|eu|f0|f2|f4|f6|f8|fa|fc|fe|fk|fq|fs|fu|g0|g2|g4|g6|g8|ga|gc|ge|gg|gi|gk|gm|go|gq|gs|gu|h0|h2|h4|h6|h8|ha|hc|he|hg|hi|21|22|7g0|7g2|7g4|7g6|7g8|7ga|7gc|7ge|7gg|7gi|2d|7gk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m|13o|13q|13s|13u|140|14a|14c|14e|14g|14i|14k|14m|14o|14q|14s|14u|150|152|154|156|158|15a|15c|15e|15g|15i|15k|15m|15o|15q|15s|15u|161|163|165|167|169|16b|16d|16g|16i|16k|16m|16o|16q|16s|16u|170|172|174|176|178|17a|17c|17e|17g|17i|17k|17o|180|182|184|186|188|18a|18c|18e|80|82|84|86|88|8a|8c|8e|8g|8i|8k|8m|8o|8q|8s|8u|90|92|94|96|98|9a|9c|9e|9i|9k|9m|9p|9r|9t|9v|a1|a3|a5|a7|aa|ac|ae|ag|ai|ak|am|ao|aq|as|au|b0|b2|b4|b6|b8|ba|bc|be|bg|bi|bk|bm|br|bt|c4|d2|d4|d9|dc|dl|ds|ed|ef|eh|ej|el|en|ep|er|eu|f0|f2|f4|f6|f8|fa|fc|fe|fk|fq|fs|fu|g0|g2|g4|g6|g8|ga|gc|ge|gg|gi|gk|gm|go|gq|gs|gu|h0|h2|h4|h6|h8|ha|hc|he|hg|hi|21|22|7g0|7g2|7g4|7g6|7g8|7ga|7gc|7ge|7gg|7gi|2d|7gk|7gm|7go|7gq|7gs|7gu|7h0|7h2|7h4|7h6|7h8|7ha|7hc|7he|7hg|7hi|7hk|7hm|7ho|7hq|7hs|7hu|7i0|7i2|7i4|7i6|7i8|7ia|7ic|7ie|7ig|7ii|7ik|7im|7io|7iq|7is|7iu|7j0|7j2|7j4|7j6|7j8|7ja|7jc|7je|7jg|7ji|7jk|7jm|2e|7jo|7jq|7js|7ju|7k0|7k2|7k4|7k6|7k8|7ka|7kc|7ke|7kg|7ki|7kk|7l0|7l2|7l4|7l6|7l8|7la|7lc|7le|7lg|7li|7lk|7lm|7lo|7lq|7ls|7lu|7m0|7m2|7m4|7m6|7m8|7ma|7mc|7me|7mg|7mi|7mk|7mm|7mo|7mq|2f|7ms|7mu|7n0|7n2|7n4|7n6|7n8|7na|7nc|7ne|7ng|7ni|7nk|7nm|7no|2g|7qp|7qr|7qt|7qv|2h|896|2l|s6|sc|uo|uq|us|uu|v0|v2|v4|v6'\n    },\n    'C.1.1': {\n        s: '10'\n    },\n    'C.1.2': {\n        r: '800:80b',\n        s: 'c00|50|5k0|81f|82v'\n    },\n    'C.2.1': {\n        r: '0:v',\n        s: '3v'\n    },\n    'C.2.2': {\n        r: '40:4v|80c:80d|818:819|830:833|83a:83f|1vvp:1vvs|3kbj:3kbq',\n        s: '1mt|1of|60e|1vnv'\n    },\n    'C.3': {\n        r: '1o00:1u7v|u000:vvvt|10000:11vvt'\n    },\n    'C.4': {\n        r: '1veg:1vff|1vvu:1vvv|3vvu:3vvv|5vvu:5vvv|7vvu:7vvv|9vvu:9vvv|bvvu:bvvv|dvvu:dvvv|fvvu:fvvv|hvvu:hvvv|jvvu:jvvv|lvvu:lvvv|nvvu:nvvv|pvvu:pvvv|rvvu:rvvv|tvvu:tvvv|vvvu:vvvv|11vvu:11vvv'\n    },\n    'C.5': {\n        r: '1m00:1nvv'\n    },\n    'C.6': {\n        r: '1vvp:1vvt'\n    },\n    'C.7': {\n        r: 'bvg:bvr'\n    },\n    'C.8': {\n        r: 'q0:q1|80e:80f|81a:81e|83a:83f'\n    },\n    'C.9': {\n        r: 's010:s03v',\n        s: 's001'\n    },\n    'D.1': {\n        r: '1eg:1fa|1fg:1fk|1h1:1hq|1i0:1ia|1jd:1jf|1jh:1ml|1n5:1n6|1nq:1nu|1o0:1od|1oi:1pc|1s0:1t5|1uov:1up8|1upa:1upm|1upo:1ups|1uq0:1uq1|1uq3:1uq4|1uq6:1uth|1uuj:1v9t|1vag:1vcf|1vci:1ve7|1vfg:1vfs|1vjg:1vjk|1vjm:1vns',\n        s: '1du|1e0|1e3|1gr|1gv|1mt|1og|1th|1uot|1upu|80f'\n    },\n    'D.2': {\n        r: '21:2q|31:3q|60:6m|6o:7m|7o:h0|h2:hj|ig:ld|lg:lo|lr:m1|mg:mh|n0:n4|s8:sa|se:t1|t3:ue|ug:vl|100:142|14a:16e|16g:17l|17o:17p|180:18f|19h:1am|1ap:1av|1b1:1c7|285:29p|29t:2a0|2a9:2ac|2ao:2b1|2b4:2bg|2c2:2c3|2c5:2cc|2cf:2cg|2cj:2d8|2da:2dg|2dm:2dp|2du:2e0|2e7:2e8|2eb:2ec|2es:2et|2ev:2f1|2f6:2fh|2fk:2fq|2g5:2ga|2gf:2gg|2gj:2h8|2ha:2hg|2hi:2hj|2hl:2hm|2ho:2hp|2hu:2i0|2ip:2is|2j6:2jf|2ji:2jk|2k5:2kb|2kf:2kh|2kj:2l8|2la:2lg|2li:2lj|2ll:2lp|2lt:2m0|2mb:2mc|2n6:2nf|2o2:2o3|2o5:2oc|2of:2og|2oj:2p8|2pa:2pg|2pi:2pj|2pm:2pp|2pt:2pu|2q7:2q8|2qb:2qc|2qs:2qt|2qv:2r1|2r6:2rg|2s5:2sa|2se:2sg|2si:2sl|2sp:2sq|2su:2sv|2t3:2t4|2t8:2ta|2te:2tl|2tn:2tp|2tu:2tv|2u1:2u2|2u6:2u8|2ua:2uc|2v7:2vi|301:303|305:30c|30e:30g|30i:318|31a:31j|31l:31p|321:324|330:331|336:33f|342:343|345:34c|34e:34g|34i:358|35a:35j|35l:35p|360:364|367:368|36a:36b|36l:36m|370:371|376:37f|382:383|385:38c|38e:38g|38i:398|39a:39p|39u:3a0|3a6:3a8|3aa:3ac|3b0:3b1|3b6:3bf|3c2:3c3|3c5:3cm|3cq:3dh|3dj:3dr|3e0:3e6|3ef:3eh|3eo:3ev|3fi:3fk|3g1:3hg|3hi:3hj|3i0:3i6|3if:3ir|3k1:3k2|3k7:3k8|3kk:3kn|3kp:3kv|3l1:3l3|3la:3lb|3ld:3lg|3li:3lj|3m0:3m4|3mg:3mp|3ms:3mt|3o0:3on|3oq:3pk|3pu:3q7|3q9:3ra|3s8:3sb|3tu:3u5|3u7:3uc|400:411|413:417|419:41a|420:42n|450:465|46g:47o|480:4ap|4av:4d2|4d8:4fp|4g0:4g6|4g8:4i6|4ia:4id|4ig:4im|4iq:4it|4j0:4k6|4ka:4kd|4kg:4le|4li:4ll|4lo:4lu|4m2:4m5|4m8:4me|4mg:4mm|4mo:4ne|4ng:4oe|4oi:4ol|4oo:4ou|4p0:4q6|4q8:4qq|4r1:4rs|4t0:4vk|501:5jm|5k1:5kq|5l0:5ng|5o0:5oc|5oe:5oh|5p0:5ph|5pl:5pm|5q0:5qh|5r0:5rc|5re:5rg|5s0:5tm|5tu:5u5|5u7:5u8|5uk:5uq|5v0:5v9|60g:60p|610:63n|640:658|7g0:7kr|7l0:7np|7o0:7ol|7oo:7ot|7p0:7q5|7q8:7qd|7qg:7qn|7qv:7rt|7s0:7tk|7tm:7ts|7u2:7u4|7u6:7uc|7ug:7uj|7um:7ur|7v0:7vc|7vi:7vk|7vm:7vs|88a:88j|88p:88t|89a:89d|89f:89h|89j:89p|89t:89v|8a5:8a9|8b0:8c3|8pm:8rq|94s:979|c05:c07|c11:c19|c1h:c1l|c1o:c1s|c21:c4m|c4t:c4v|c51:c7q|c7s:c7v|c85:c9c|c9h:cce|ccg:cdn|cfg:cgs|ch0:ci3|cj0:cjr|cjv:clg|cm0:cmb|cmg:cnu|co0:crm|crr:cut|cv0:cvu|d00:jdl|jg0:17t5|1800:194c|1b00:1lt3|1m00:1uhd|1uhg:1uja|1uo0:1uo6|1uoj:1uon|1vp1:1vpq|1vq1:1vqq|1vr6:1vtu|1vu2:1vu7|1vua:1vuf|1vui:1vun|1vuq:1vus|20o0:20ou|20p0:20p3|20pg:20qa|2100:2115|2118:212d|3k00:3k7l|3k80:3k96|3k9a:3kb6|3kba:3kbi|3kc3:3kc4|3kcc:3kd9|3kde:3ket|3l00:3l2k|3l2m:3l4s|3l4u:3l4v|3l55:3l56|3l59:3l5c|3l5e:3l5p|3l5t:3l60|3l62:3l63|3l65:3l85|3l87:3l8a|3l8d:3l8k|3l8m:3l8s|3l8u:3l9p|3l9r:3l9u|3la0:3la4|3laa:3lag|3lai:3ll3|3ll8:3lu9|4000:59mm|5u00:5ugt|u000:vvvt|10000:11vvt',\n        s: '3l52|3l5r|3la6|1c9|5a|5l|5q|283|2ag|2di|2en|2iu|2k3|2kd|2m9|2mg|2n0|2q0|2qn|2s3|2ss|2un|35u|36u|3an|3dt|3k4|3ka|3kd|3l5|3l7|3lt|3m6|3pm|3po|3rv|3s5|3uf|41c|41h|41o|47r|4i8|4io|4k8|4lg|4m0|4og|5us|ne|7qp|7qr|7qt|7tu|80e|83h|83v|882|887|88l|894|896|898|rq|s6|sc|8sl'\n    }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.saslprep = exports.resourceprep = exports.nodeprep = exports.NodePrepProhibited = exports.nameprep = exports.prepare = exports.D2 = exports.D1 = exports.C9 = exports.C8 = exports.C7 = exports.C6 = exports.C5 = exports.C4 = exports.C3 = exports.C22 = exports.C21 = exports.C12 = exports.C11 = exports.B3 = exports.B2 = exports.B1 = exports.A1 = exports.Table = void 0;\nconst tslib_1 = require(\"tslib\");\nconst punycode_1 = (0, tslib_1.__importDefault)(require(\"punycode\"));\nconst Tables_1 = require(\"./Tables\");\nclass Table {\n    constructor(name, points) {\n        this.singles = new Set();\n        this.ranges = [];\n        this.mappings = new Map();\n        const data = Tables_1.TABLE_DATA[name];\n        this.name = name;\n        if (data) {\n            if (data.s) {\n                this.singles = new Set(data.s.split('|').map(s => parseInt(s, 32)));\n            }\n            if (data.r) {\n                this.ranges = data.r.split('|').map(r => {\n                    const [start, end] = r.split(':');\n                    return [parseInt(start, 32), parseInt(end, 32)];\n                });\n            }\n            if (data.m) {\n                this.mappings = new Map(data.m.split('|').map(m => {\n                    const [point, mapping] = m.split(':');\n                    const mappedPoints = mapping.split(';').map(p => parseInt(p, 32));\n                    return [parseInt(point, 32), mappedPoints];\n                }));\n            }\n        }\n        else if (points) {\n            this.singles = new Set(points);\n        }\n    }\n    contains(codePoint) {\n        if (this.singles.has(codePoint)) {\n            return true;\n        }\n        let left = 0;\n        let right = this.ranges.length - 1;\n        while (left <= right) {\n            const pivot = Math.floor((left + right) / 2);\n            const range = this.ranges[pivot];\n            if (codePoint < range[0]) {\n                right = pivot - 1;\n                continue;\n            }\n            if (codePoint > range[1]) {\n                left = pivot + 1;\n                continue;\n            }\n            return true;\n        }\n        return false;\n    }\n    hasMapping(codePoint) {\n        return this.mappings.has(codePoint) || this.contains(codePoint);\n    }\n    map(codePoint) {\n        if (this.contains(codePoint) && !this.mappings.has(codePoint)) {\n            return String.fromCodePoint(codePoint).toLowerCase().codePointAt(0);\n        }\n        return this.mappings.get(codePoint) || null;\n    }\n}\nexports.Table = Table;\nexports.A1 = new Table('A.1');\nexports.B1 = new Table('B.1');\nexports.B2 = new Table('B.2');\nexports.B3 = new Table('B.3');\nexports.C11 = new Table('C.1.1');\nexports.C12 = new Table('C.1.2');\nexports.C21 = new Table('C.2.1');\nexports.C22 = new Table('C.2.2');\nexports.C3 = new Table('C.3');\nexports.C4 = new Table('C.4');\nexports.C5 = new Table('C.5');\nexports.C6 = new Table('C.6');\nexports.C7 = new Table('C.7');\nexports.C8 = new Table('C.8');\nexports.C9 = new Table('C.9');\nexports.D1 = new Table('D.1');\nexports.D2 = new Table('D.2');\n// Shortcut some of the simpler table operations\nexports.B1.map = () => {\n    return null;\n};\nexports.C11.contains = (codePoint) => codePoint === 32;\nexports.C12.map = (codePoint) => {\n    return exports.C12.contains(codePoint) ? 32 : null;\n};\nfunction prepare(profile, allowUnassigned, input = '') {\n    const inputCodePoints = punycode_1.default.ucs2.decode(input);\n    let mappedCodePoints = [];\n    for (const codePoint of inputCodePoints) {\n        if (!allowUnassigned && profile.unassigned.contains(codePoint)) {\n            throw new Error('Unassigned code point: x' + codePoint.toString(16));\n        }\n        let hasMapping = false;\n        for (const mappingTable of profile.mappings) {\n            if (!mappingTable.hasMapping(codePoint)) {\n                continue;\n            }\n            hasMapping = true;\n            const mappedPoint = mappingTable.map(codePoint);\n            if (!mappedPoint) {\n                continue;\n            }\n            if (Array.isArray(mappedPoint)) {\n                mappedCodePoints = mappedCodePoints.concat(mappedPoint);\n            }\n            else {\n                mappedCodePoints.push(mappedPoint);\n            }\n        }\n        if (!hasMapping) {\n            mappedCodePoints.push(codePoint);\n        }\n    }\n    let normalizedCodePoints = mappedCodePoints;\n    if (profile.normalize) {\n        const mappedString = punycode_1.default.ucs2.encode(mappedCodePoints);\n        const normalizedString = mappedString.normalize('NFKC');\n        normalizedCodePoints = punycode_1.default.ucs2.decode(normalizedString);\n    }\n    let hasRandALCat = false;\n    let hasLCat = false;\n    for (const codePoint of normalizedCodePoints) {\n        for (const prohibited of profile.prohibited) {\n            if (prohibited.contains(codePoint)) {\n                throw new Error('Prohibited code point: x' + codePoint.toString(16));\n            }\n        }\n        if (!allowUnassigned && profile.unassigned.contains(codePoint)) {\n            // istanbul ignore next\n            throw new Error('Prohibited code point: x' + codePoint.toString(16));\n        }\n        if (profile.bidirectional) {\n            hasRandALCat = hasRandALCat || exports.D1.contains(codePoint);\n            hasLCat = hasLCat || exports.D2.contains(codePoint);\n        }\n    }\n    if (profile.bidirectional) {\n        if (hasRandALCat && hasLCat) {\n            throw new Error('String contained both LCat and RandALCat code points');\n        }\n        if (hasRandALCat &&\n            (!exports.D1.contains(normalizedCodePoints[0]) ||\n                !exports.D1.contains(normalizedCodePoints[normalizedCodePoints.length - 1]))) {\n            throw new Error('String containing RandALCat code points must start and end with RandALCat code points');\n        }\n    }\n    return punycode_1.default.ucs2.encode(normalizedCodePoints);\n}\nexports.prepare = prepare;\nconst NamePrepProfile = {\n    bidirectional: true,\n    mappings: [exports.B1, exports.B2],\n    normalize: true,\n    prohibited: [exports.C12, exports.C22, exports.C3, exports.C4, exports.C5, exports.C6, exports.C7, exports.C8, exports.C9],\n    unassigned: exports.A1\n};\nfunction nameprep(str, allowUnassigned = true) {\n    return prepare(NamePrepProfile, allowUnassigned, str);\n}\nexports.nameprep = nameprep;\nexports.NodePrepProhibited = new Table('NodePrepProhibited', [\n    0x22,\n    0x26,\n    0x27,\n    0x2f,\n    0x3a,\n    0x3c,\n    0x3e,\n    0x40\n]);\nconst NodePrepProfile = {\n    bidirectional: true,\n    mappings: [exports.B1, exports.B2],\n    normalize: true,\n    prohibited: [exports.C11, exports.C12, exports.C21, exports.C22, exports.C3, exports.C4, exports.C5, exports.C6, exports.C7, exports.C8, exports.C9, exports.NodePrepProhibited],\n    unassigned: exports.A1\n};\nfunction nodeprep(str, allowUnassigned = true) {\n    return prepare(NodePrepProfile, allowUnassigned, str);\n}\nexports.nodeprep = nodeprep;\nconst ResourcePrepProfile = {\n    bidirectional: true,\n    mappings: [exports.B1],\n    normalize: true,\n    prohibited: [exports.C12, exports.C21, exports.C22, exports.C3, exports.C4, exports.C5, exports.C6, exports.C7, exports.C8, exports.C9],\n    unassigned: exports.A1\n};\nfunction resourceprep(str, allowUnassigned = true) {\n    return prepare(ResourcePrepProfile, allowUnassigned, str);\n}\nexports.resourceprep = resourceprep;\nconst SASLPrepProfile = {\n    bidirectional: true,\n    mappings: [exports.C12, exports.B1],\n    normalize: true,\n    prohibited: [exports.C12, exports.C21, exports.C22, exports.C3, exports.C4, exports.C5, exports.C6, exports.C7, exports.C8, exports.C9],\n    unassigned: exports.A1\n};\nfunction saslprep(str, allowUnassigned = false) {\n    return prepare(SASLPrepProfile, allowUnassigned, str);\n}\nexports.saslprep = saslprep;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toURI = exports.parseURI = exports.toBare = exports.getResource = exports.getDomain = exports.getLocal = exports.isBare = exports.isFull = exports.equalBare = exports.equal = exports.allowedResponders = exports.parse = exports.createFull = exports.create = exports.prepare = exports.unescapeLocal = exports.escapeLocal = void 0;\nconst tslib_1 = require(\"tslib\");\nconst punycode_1 = (0, tslib_1.__importDefault)(require(\"punycode\"));\nconst stringprep_1 = require(\"./lib/stringprep\");\nfunction escapeLocal(val = '') {\n    return val\n        .replace(/^\\s+|\\s+$/g, '')\n        .replace(/\\\\5c/g, '\\\\5c5c')\n        .replace(/\\\\20/g, '\\\\5c20')\n        .replace(/\\\\22/g, '\\\\5c22')\n        .replace(/\\\\26/g, '\\\\5c26')\n        .replace(/\\\\27/g, '\\\\5c27')\n        .replace(/\\\\2f/g, '\\\\5c2f')\n        .replace(/\\\\3a/g, '\\\\5c3a')\n        .replace(/\\\\3c/g, '\\\\5c3c')\n        .replace(/\\\\3e/g, '\\\\5c3e')\n        .replace(/\\\\40/g, '\\\\5c40')\n        .replace(/ /g, '\\\\20')\n        .replace(/\"/g, '\\\\22')\n        .replace(/&/g, '\\\\26')\n        .replace(/'/g, '\\\\27')\n        .replace(/\\//g, '\\\\2f')\n        .replace(/:/g, '\\\\3a')\n        .replace(/</g, '\\\\3c')\n        .replace(/>/g, '\\\\3e')\n        .replace(/@/g, '\\\\40');\n}\nexports.escapeLocal = escapeLocal;\nfunction unescapeLocal(val) {\n    return val\n        .replace(/\\\\20/g, ' ')\n        .replace(/\\\\22/g, '\"')\n        .replace(/\\\\26/g, '&')\n        .replace(/\\\\27/g, `'`)\n        .replace(/\\\\2f/g, '/')\n        .replace(/\\\\3a/g, ':')\n        .replace(/\\\\3c/g, '<')\n        .replace(/\\\\3e/g, '>')\n        .replace(/\\\\40/g, '@')\n        .replace(/\\\\5c/g, '\\\\');\n}\nexports.unescapeLocal = unescapeLocal;\nfunction prepare(data) {\n    let local = data.local || '';\n    let domain = data.domain;\n    let resource = data.resource || '';\n    if (local) {\n        local = (0, stringprep_1.nodeprep)(local);\n    }\n    if (resource) {\n        resource = (0, stringprep_1.resourceprep)(resource);\n    }\n    if (domain[domain.length - 1] === '.') {\n        domain = domain.slice(0, domain.length - 1);\n    }\n    domain = (0, stringprep_1.nameprep)(domain.split('.').map(punycode_1.default.toUnicode).join('.'));\n    return {\n        domain,\n        local,\n        resource\n    };\n}\nexports.prepare = prepare;\nfunction create(data, opts = {}) {\n    let localPart = data.local;\n    if (!opts.escaped) {\n        localPart = escapeLocal(data.local);\n    }\n    const prep = !opts.prepared\n        ? prepare({ local: localPart, domain: data.domain, resource: data.resource })\n        : data;\n    const bareJID = localPart ? `${localPart}@${prep.domain}` : prep.domain;\n    if (prep.resource) {\n        return `${bareJID}/${prep.resource}`;\n    }\n    return bareJID;\n}\nexports.create = create;\nfunction createFull(bare, resource) {\n    if (resource) {\n        return `${toBare(bare)}/${resource}`;\n    }\n    else {\n        return toBare(bare);\n    }\n}\nexports.createFull = createFull;\nfunction parse(jid = '') {\n    let local = '';\n    let domain = '';\n    let resource = '';\n    const resourceStart = jid.indexOf('/');\n    if (resourceStart > 0) {\n        resource = jid.slice(resourceStart + 1);\n        jid = jid.slice(0, resourceStart);\n    }\n    const localEnd = jid.indexOf('@');\n    if (localEnd > 0) {\n        local = jid.slice(0, localEnd);\n        jid = jid.slice(localEnd + 1);\n    }\n    domain = jid;\n    const prepped = prepare({\n        domain,\n        local,\n        resource\n    });\n    return {\n        bare: create({ local: prepped.local, domain: prepped.domain }, {\n            escaped: true,\n            prepared: true\n        }),\n        domain: prepped.domain,\n        full: create(prepped, {\n            escaped: true,\n            prepared: true\n        }),\n        local: unescapeLocal(prepped.local),\n        resource: prepped.resource\n    };\n}\nexports.parse = parse;\nfunction allowedResponders(jid1, jid2) {\n    const allowed = new Set();\n    allowed.add(undefined);\n    allowed.add('');\n    if (jid1) {\n        const split1 = parse(jid1);\n        allowed.add(split1.full);\n        allowed.add(split1.bare);\n        allowed.add(split1.domain);\n    }\n    if (jid2) {\n        const split2 = parse(jid2);\n        allowed.add(split2.domain);\n        allowed.add(split2.bare);\n        allowed.add(split2.full);\n    }\n    return allowed;\n}\nexports.allowedResponders = allowedResponders;\nfunction equal(jid1, jid2) {\n    if (!jid1 || !jid2) {\n        return false;\n    }\n    const parsed1 = parse(jid1);\n    const parsed2 = parse(jid2);\n    return (parsed1.local === parsed2.local &&\n        parsed1.domain === parsed2.domain &&\n        parsed1.resource === parsed2.resource);\n}\nexports.equal = equal;\nfunction equalBare(jid1, jid2) {\n    if (!jid1 || !jid2) {\n        return false;\n    }\n    const parsed1 = parse(jid1);\n    const parsed2 = parse(jid2);\n    return parsed1.local === parsed2.local && parsed1.domain === parsed2.domain;\n}\nexports.equalBare = equalBare;\nfunction isFull(jid) {\n    const parsed = parse(jid);\n    return !!parsed.resource;\n}\nexports.isFull = isFull;\nfunction isBare(jid) {\n    return !isFull(jid);\n}\nexports.isBare = isBare;\nfunction getLocal(jid = '') {\n    return parse(jid).local;\n}\nexports.getLocal = getLocal;\nfunction getDomain(jid = '') {\n    return parse(jid).domain;\n}\nexports.getDomain = getDomain;\nfunction getResource(jid = '') {\n    return parse(jid).resource;\n}\nexports.getResource = getResource;\nfunction toBare(jid = '') {\n    return parse(jid).bare;\n}\nexports.toBare = toBare;\nfunction parseURI(val) {\n    const parsed = new URL(val);\n    if (parsed.protocol !== 'xmpp:') {\n        throw new Error('Invalid XMPP URI, wrong protocol: ' + parsed.protocol);\n    }\n    const identity = parsed.hostname\n        ? parsed.username\n            ? create({\n                domain: decodeURIComponent(parsed.hostname),\n                local: decodeURIComponent(parsed.username)\n            }, {\n                escaped: true\n            })\n            : decodeURIComponent(parsed.hostname)\n        : undefined;\n    const jid = parse(decodeURIComponent(identity ? parsed.pathname.substr(1) : parsed.pathname))\n        .full;\n    const hasParameters = parsed.search && parsed.search.indexOf(';') >= 1;\n    const parameterString = hasParameters\n        ? parsed.search.substr(parsed.search.indexOf(';') + 1)\n        : '';\n    const action = parsed.search\n        ? decodeURIComponent(parsed.search.substr(1, hasParameters ? parsed.search.indexOf(';') - 1 : undefined))\n        : undefined;\n    const params = {};\n    for (const token of parameterString.split(';')) {\n        const [name, value] = token.split('=').map(decodeURIComponent);\n        if (!params[name]) {\n            params[name] = value;\n        }\n        else {\n            const existing = params[name];\n            if (Array.isArray(existing)) {\n                existing.push(value);\n            }\n            else {\n                params[name] = [existing, value];\n            }\n        }\n    }\n    return {\n        action,\n        identity,\n        jid,\n        parameters: params\n    };\n}\nexports.parseURI = parseURI;\nfunction toURI(data) {\n    const parts = ['xmpp:'];\n    const pushJID = (jid, allowResource) => {\n        const res = parse(jid);\n        if (res.local) {\n            parts.push(encodeURIComponent(escapeLocal(res.local)));\n            parts.push('@');\n        }\n        parts.push(encodeURIComponent(res.domain));\n        if (allowResource && res.resource) {\n            parts.push('/');\n            parts.push(encodeURIComponent(res.resource));\n        }\n    };\n    if (data.identity) {\n        parts.push('//');\n        pushJID(data.identity, false);\n        if (data.jid) {\n            parts.push('/');\n        }\n    }\n    if (data.jid) {\n        pushJID(data.jid, true);\n    }\n    if (data.action) {\n        parts.push('?');\n        parts.push(encodeURIComponent(data.action));\n    }\n    for (const [name, values] of Object.entries(data.parameters || {})) {\n        for (const val of Array.isArray(values) ? values : [values]) {\n            parts.push(';');\n            parts.push(encodeURIComponent(name));\n            if (val !== undefined) {\n                parts.push('=');\n                parts.push(encodeURIComponent(val));\n            }\n        }\n    }\n    return parts.join('');\n}\nexports.toURI = toURI;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JXTErrorCondition = void 0;\nvar JXTErrorCondition;\n(function (JXTErrorCondition) {\n    JXTErrorCondition[\"NotWellFormed\"] = \"not-well-formed\";\n    JXTErrorCondition[\"RestrictedXML\"] = \"restricted-xml\";\n    JXTErrorCondition[\"AlreadyClosed\"] = \"already-closed\";\n    JXTErrorCondition[\"UnknownRoot\"] = \"unknown-stream-root\";\n})(JXTErrorCondition = exports.JXTErrorCondition || (exports.JXTErrorCondition = {}));\nclass JXTError extends Error {\n    constructor(opts) {\n        super(opts.text);\n        this.isJXTError = true;\n        this.condition = opts.condition;\n        this.text = opts.text;\n    }\n    static notWellFormed(text) {\n        return new JXTError({\n            condition: JXTErrorCondition.NotWellFormed,\n            text\n        });\n    }\n    static restrictedXML(text) {\n        return new JXTError({\n            condition: JXTErrorCondition.RestrictedXML,\n            text\n        });\n    }\n    static alreadyClosed(text) {\n        return new JXTError({\n            condition: JXTErrorCondition.AlreadyClosed,\n            text\n        });\n    }\n    static unknownRoot(text) {\n        return new JXTError({\n            condition: JXTErrorCondition.UnknownRoot,\n            text\n        });\n    }\n}\nexports.default = JXTError;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.basicLanguageResolver = exports.escapeXMLText = exports.unescapeXML = exports.escapeXML = void 0;\nconst tslib_1 = require(\"tslib\");\nconst Error_1 = (0, tslib_1.__importDefault)(require(\"./Error\"));\nconst ESCAPE_XML_CHAR = {\n    '\"': '&quot;',\n    '&': '&amp;',\n    \"'\": '&apos;',\n    '<': '&lt;',\n    '>': '&gt;'\n};\nconst UNESCAPE_XML_CHAR = {\n    '&amp;': '&',\n    '&apos;': \"'\",\n    '&gt;': '>',\n    '&lt;': '<',\n    '&quot;': '\"'\n};\nconst ESCAPE_SEQUENCE = /&([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);/g;\nconst NEED_ESCAPING = /&|<|>|\"|'/g;\nconst NEED_ESCAPING_TEXT = /&|<|>/g;\nfunction escapeXMLReplaceChar(match) {\n    return ESCAPE_XML_CHAR[match];\n}\nfunction unescapeXMLReplaceChar(match) {\n    if (UNESCAPE_XML_CHAR[match]) {\n        return UNESCAPE_XML_CHAR[match];\n    }\n    const hex = match.startsWith('&#x');\n    const code = parseInt(match.substring(hex ? 3 : 2, match.length - 1), hex ? 16 : 10);\n    if (code === 0x9 ||\n        code === 0xa ||\n        code === 0xd ||\n        (0x20 <= code && code <= 0xd7ff) ||\n        (0xe000 <= code && code <= 0xfffd) ||\n        (0x10000 <= code && code <= 0x10ffff)) {\n        return String.fromCodePoint(code);\n    }\n    throw Error_1.default.restrictedXML('Prohibited entity: ' + match);\n}\nfunction escapeXML(text) {\n    return text.replace(NEED_ESCAPING, escapeXMLReplaceChar);\n}\nexports.escapeXML = escapeXML;\nfunction unescapeXML(text) {\n    return text.replace(ESCAPE_SEQUENCE, match => {\n        return unescapeXMLReplaceChar(match);\n    });\n}\nexports.unescapeXML = unescapeXML;\nfunction escapeXMLText(text) {\n    return text.replace(NEED_ESCAPING_TEXT, escapeXMLReplaceChar);\n}\nexports.escapeXMLText = escapeXMLText;\nfunction basicLanguageResolver(available, accept = [], current = '') {\n    const avail = new Set(available.map(a => a.toLowerCase()));\n    for (let acceptLang of accept.map(a => a.toLowerCase())) {\n        if (acceptLang === '*') {\n            continue;\n        }\n        while (acceptLang.length > 0) {\n            if (avail.has(acceptLang)) {\n                return acceptLang;\n            }\n            // Remove ending tag\n            acceptLang = acceptLang.substring(0, acceptLang.lastIndexOf('-')).toLowerCase();\n            // Remove leftover single character tag\n            if (acceptLang.lastIndexOf('-') === acceptLang.length - 2) {\n                acceptLang = acceptLang.substring(0, acceptLang.lastIndexOf('-'));\n            }\n        }\n    }\n    return current;\n}\nexports.basicLanguageResolver = basicLanguageResolver;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Definitions_1 = require(\"./Definitions\");\nclass XMLElement {\n    constructor(name, attrs = {}, children = []) {\n        this.name = name;\n        this.attributes = attrs;\n        this.children = [];\n        this.optionalNamespaces = {};\n        for (const child of children) {\n            if (typeof child !== 'string') {\n                const xmlChild = new XMLElement(child.name, child.attributes, child.children);\n                xmlChild.parent = this;\n                this.children.push(xmlChild);\n            }\n            else {\n                this.children.push(child);\n            }\n        }\n    }\n    getName() {\n        if (this.name.indexOf(':') >= 0) {\n            return this.name.substr(this.name.indexOf(':') + 1);\n        }\n        else {\n            return this.name;\n        }\n    }\n    getNamespace() {\n        if (this.name.indexOf(':') >= 0) {\n            const prefix = this.name.substr(0, this.name.indexOf(':'));\n            return this.findNamespaceForPrefix(prefix);\n        }\n        return this.findNamespaceForPrefix();\n    }\n    getNamespaceContext() {\n        let namespaces = {};\n        if (this.parent) {\n            namespaces = this.parent.getNamespaceContext();\n        }\n        for (const [attr, value] of Object.entries(this.attributes)) {\n            if (attr.startsWith('xmlns:')) {\n                const prefix = attr.substr(6);\n                namespaces[value] = prefix;\n            }\n        }\n        return namespaces;\n    }\n    getDefaultNamespace() {\n        if (this.attributes.xmlns) {\n            return this.attributes.xmlns;\n        }\n        if (this.parent) {\n            return this.parent.getDefaultNamespace();\n        }\n        return '';\n    }\n    getNamespaceRoot(namespace) {\n        if (this.parent) {\n            const parentRoot = this.parent.getNamespaceRoot(namespace);\n            if (parentRoot) {\n                return parentRoot;\n            }\n        }\n        for (const [attr, value] of Object.entries(this.attributes)) {\n            if (attr.startsWith('xmlns:') && value === namespace) {\n                return this;\n            }\n        }\n        if (this.optionalNamespaces[namespace]) {\n            return this;\n        }\n        return undefined;\n    }\n    getAttribute(name, xmlns) {\n        if (!xmlns) {\n            return this.attributes[name];\n        }\n        const namespaces = this.getNamespaceContext();\n        if (!namespaces[xmlns]) {\n            return undefined;\n        }\n        return this.attributes[[namespaces[xmlns], name].join(':')];\n    }\n    getChild(name, xmlns) {\n        return this.getChildren(name, xmlns)[0];\n    }\n    getChildren(name, xmlns) {\n        const result = [];\n        for (const child of this.children) {\n            if (typeof child !== 'string' &&\n                child.getName() === name &&\n                (!xmlns || child.getNamespace() === xmlns)) {\n                result.push(child);\n            }\n        }\n        return result;\n    }\n    getText() {\n        let text = '';\n        for (const child of this.children) {\n            if (typeof child === 'string') {\n                text += child;\n            }\n        }\n        return text;\n    }\n    appendChild(child) {\n        this.children.push(child);\n        if (typeof child !== 'string') {\n            child.parent = this;\n        }\n        return child;\n    }\n    setAttribute(attr, val, force = false) {\n        this.attributes[attr] = val || undefined;\n        if (val === '' && force) {\n            this.attributes[attr] = val;\n        }\n    }\n    addOptionalNamespace(prefix, namespace) {\n        this.optionalNamespaces[namespace] = prefix;\n    }\n    useNamespace(prefix, namespace) {\n        if (this.optionalNamespaces[namespace]) {\n            prefix = this.optionalNamespaces[namespace];\n        }\n        this.setAttribute(`xmlns:${prefix}`, namespace);\n        return prefix;\n    }\n    toJSON() {\n        const children = this.children\n            .map(child => {\n            if (typeof child === 'string') {\n                return child;\n            }\n            if (child) {\n                return child.toJSON();\n            }\n        })\n            .filter(child => !!child);\n        // Strip any undefined/null attributes\n        const attrs = {};\n        for (const [key, val] of Object.entries(this.attributes)) {\n            if (val !== undefined && val !== null) {\n                attrs[key] = val;\n            }\n        }\n        return {\n            attributes: attrs,\n            children,\n            name: this.name\n        };\n    }\n    toString() {\n        let output = this.openTag(true);\n        if (this.children.length) {\n            for (const child of this.children) {\n                if (typeof child === 'string') {\n                    output += (0, Definitions_1.escapeXMLText)(child);\n                }\n                else if (child) {\n                    output += child.toString();\n                }\n            }\n            output += this.closeTag();\n        }\n        return output;\n    }\n    openTag(allowSelfClose = false) {\n        let output = '';\n        output += `<${this.name}`;\n        for (const [key, value] of Object.entries(this.attributes)) {\n            if (value !== undefined) {\n                output += ` ${key}=\"${(0, Definitions_1.escapeXML)(value.toString())}\"`;\n            }\n        }\n        if (allowSelfClose && this.children.length === 0) {\n            output += '/>';\n        }\n        else {\n            output += '>';\n        }\n        return output;\n    }\n    closeTag() {\n        return `</${this.name}>`;\n    }\n    findNamespaceForPrefix(prefix) {\n        if (!prefix) {\n            if (this.attributes.xmlns) {\n                return this.attributes.xmlns;\n            }\n            else if (this.parent) {\n                return this.parent.findNamespaceForPrefix();\n            }\n        }\n        else {\n            const attr = 'xmlns:' + prefix;\n            if (this.attributes[attr]) {\n                return this.attributes[attr];\n            }\n            else if (this.parent) {\n                return this.parent.findNamespaceForPrefix(prefix);\n            }\n        }\n        return '';\n    }\n}\nexports.default = XMLElement;\n","\"use strict\";\n/**\n * This file is derived from prior work.\n *\n * See NOTICE.md for full license text.\n *\n * Derived from: xhtml-im.js, Copyright © 2013 Waqas Hussain\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst ALLOWED_ELEMENTS = new Set([\n    'a',\n    'blockquote',\n    'br',\n    'cite',\n    'em',\n    'img',\n    'li',\n    'ol',\n    'p',\n    'span',\n    'strong',\n    'ul'\n]);\nconst style = new Set(['style']);\nconst ALLOWED_ATTRIBUTES = new Map([\n    ['a', new Set(['href', 'style'])],\n    ['body', new Set(['style', 'xml:lang'])],\n    ['blockquote', style],\n    ['br', style],\n    ['cite', style],\n    ['em', style],\n    ['img', new Set(['alt', 'height', 'src', 'style', 'width'])],\n    ['li', style],\n    ['ol', style],\n    ['p', style],\n    ['span', style],\n    ['strong', style],\n    ['ul', style]\n]);\nconst CSS_RULES = new Map([\n    ['font-style', /normal|italic|oblique|inherit/i],\n    ['font-weight', /normal|bold|bolder|lighter|inherit|\\d\\d\\d/i],\n    ['text-decoration', /none|underline|overline|line-through|blink|inherit/i]\n    // These properties are allowed by XHTML-IM, but really only cause UX issues:\n    //  background-color\n    //  color\n    //  font-family\n    //  font-size\n    //  margin-left\n    //  margin-right\n    //  text-align\n]);\nconst sanitizeCSS = (css) => {\n    const declarations = `;${css}` // Declarations are ; delimited, not terminated\n        .replace(/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g, '') // Strip comments\n        .replace(/\\/\\*.*/, '') // Strip unclosed comments\n        .replace(/\\\\([a-fA-F0-9]{1,6})\\s?/, (_, x) => String.fromCharCode(parseInt(x, 16))) // Decode escape sequences\n        .match(/;\\s*([a-z-]+)\\s*:\\s*([^;]*[^\\s;])\\s*/g); // Split into declarations\n    const rules = [];\n    if (!declarations) {\n        return false;\n    }\n    for (const declaration of declarations) {\n        const parts = declaration.match(/^;\\s*([a-z-]+)\\s*:\\s*([^;]*[^\\s])\\s*$/);\n        if (!parts) {\n            continue;\n        }\n        const sanitizer = CSS_RULES.get(parts[1]);\n        if (sanitizer) {\n            const value = parts[2].match(sanitizer);\n            if (value) {\n                rules.push(`${parts[1]}:${value[0]}`);\n            }\n        }\n    }\n    if (rules.length) {\n        return rules.join('');\n    }\n    return false;\n};\nconst sanitizeURL = (url) => {\n    return (!!url.match(/^(https?|xmpp|cid|mailto|ftps?|im|ircs?|sips?|tel|geo|bitcoin|magnet):/i) &&\n        url);\n};\nconst sanitizeNumber = (num) => {\n    return !!num.match(/^[0-9]*$/) && num;\n};\nconst ATTRIBUTE_SANITIZERS = {\n    alt: text => text,\n    height: sanitizeNumber,\n    href: sanitizeURL,\n    src: sanitizeURL,\n    style: sanitizeCSS,\n    width: sanitizeNumber\n};\nfunction stripElement(input) {\n    let results = [];\n    for (const child of input.children) {\n        if (typeof child === 'string') {\n            results.push(child);\n        }\n        else {\n            const sanitized = sanitizeInterior(child);\n            if (sanitized) {\n                if (Array.isArray(sanitized)) {\n                    results = results.concat(sanitized);\n                }\n                else {\n                    results.push(sanitized);\n                }\n            }\n        }\n    }\n    return results;\n}\nfunction sanitizeInterior(input) {\n    if (typeof input === 'string') {\n        return input;\n    }\n    if (!ALLOWED_ELEMENTS.has(input.name)) {\n        if (input.name === 'script') {\n            return;\n        }\n        return stripElement(input);\n    }\n    const children = input.children\n        .map(sanitizeInterior)\n        .filter(child => child !== undefined);\n    const attributes = {};\n    for (const [key, value] of Object.entries(input.attributes)) {\n        const allowed = ALLOWED_ATTRIBUTES.get(input.name);\n        if (!allowed || !allowed.has(key)) {\n            continue;\n        }\n        if (!value) {\n            continue;\n        }\n        const sanitized = ATTRIBUTE_SANITIZERS[key](value);\n        if (!sanitized) {\n            continue;\n        }\n        attributes[key] = sanitized;\n    }\n    return {\n        attributes,\n        children,\n        name: input.name\n    };\n}\nfunction sanitizeRoot(input) {\n    if (typeof input === 'string') {\n        return;\n    }\n    let children = [];\n    for (const child of input.children) {\n        if (!child) {\n            continue;\n        }\n        if (typeof child === 'string') {\n            children.push(child);\n            continue;\n        }\n        const sanitized = sanitizeInterior(child);\n        if (Array.isArray(sanitized)) {\n            children = children.concat(sanitized);\n        }\n        else if (sanitized) {\n            children.push(sanitized);\n        }\n    }\n    const attributes = {};\n    if (input.name !== 'body') {\n        return;\n    }\n    if (input.attributes.xmlns !== undefined) {\n        attributes.xmlns = input.attributes.xmlns;\n    }\n    if (input.attributes.style) {\n        attributes.style = input.attributes.style;\n    }\n    if (input.attributes['xml:lang'] !== undefined) {\n        attributes['xml:lang'] = input.attributes['xml:lang'];\n    }\n    return {\n        attributes,\n        children,\n        name: 'body'\n    };\n}\nexports.default = sanitizeRoot;\n","'use strict';\nexports.byteLength = byteLength;\nexports.toByteArray = toByteArray;\nexports.fromByteArray = fromByteArray;\nvar lookup = [];\nvar revLookup = [];\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nfor (var i = 0, len = code.length; i < len; ++i) {\n    lookup[i] = code[i];\n    revLookup[code.charCodeAt(i)] = i;\n}\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62;\nrevLookup['_'.charCodeAt(0)] = 63;\nfunction getLens(b64) {\n    var len = b64.length;\n    if (len % 4 > 0) {\n        throw new Error('Invalid string. Length must be a multiple of 4');\n    }\n    // Trim off extra bytes after placeholder bytes are found\n    // See: https://github.com/beatgammit/base64-js/issues/42\n    var validLen = b64.indexOf('=');\n    if (validLen === -1)\n        validLen = len;\n    var placeHoldersLen = validLen === len ? 0 : 4 - (validLen % 4);\n    return [validLen, placeHoldersLen];\n}\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength(b64) {\n    var lens = getLens(b64);\n    var validLen = lens[0];\n    var placeHoldersLen = lens[1];\n    return ((validLen + placeHoldersLen) * 3) / 4 - placeHoldersLen;\n}\nfunction _byteLength(b64, validLen, placeHoldersLen) {\n    return ((validLen + placeHoldersLen) * 3) / 4 - placeHoldersLen;\n}\nfunction toByteArray(b64) {\n    var tmp;\n    var lens = getLens(b64);\n    var validLen = lens[0];\n    var placeHoldersLen = lens[1];\n    var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n    var curByte = 0;\n    // if there are placeholders, only get up to the last complete 4 chars\n    var len = placeHoldersLen > 0 ? validLen - 4 : validLen;\n    var i;\n    for (i = 0; i < len; i += 4) {\n        tmp =\n            (revLookup[b64.charCodeAt(i)] << 18) |\n                (revLookup[b64.charCodeAt(i + 1)] << 12) |\n                (revLookup[b64.charCodeAt(i + 2)] << 6) |\n                revLookup[b64.charCodeAt(i + 3)];\n        arr[curByte++] = (tmp >> 16) & 0xff;\n        arr[curByte++] = (tmp >> 8) & 0xff;\n        arr[curByte++] = tmp & 0xff;\n    }\n    if (placeHoldersLen === 2) {\n        tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4);\n        arr[curByte++] = tmp & 0xff;\n    }\n    if (placeHoldersLen === 1) {\n        tmp =\n            (revLookup[b64.charCodeAt(i)] << 10) |\n                (revLookup[b64.charCodeAt(i + 1)] << 4) |\n                (revLookup[b64.charCodeAt(i + 2)] >> 2);\n        arr[curByte++] = (tmp >> 8) & 0xff;\n        arr[curByte++] = tmp & 0xff;\n    }\n    return arr;\n}\nfunction tripletToBase64(num) {\n    return (lookup[(num >> 18) & 0x3f] +\n        lookup[(num >> 12) & 0x3f] +\n        lookup[(num >> 6) & 0x3f] +\n        lookup[num & 0x3f]);\n}\nfunction encodeChunk(uint8, start, end) {\n    var tmp;\n    var output = [];\n    for (var i = start; i < end; i += 3) {\n        tmp =\n            ((uint8[i] << 16) & 0xff0000) + ((uint8[i + 1] << 8) & 0xff00) + (uint8[i + 2] & 0xff);\n        output.push(tripletToBase64(tmp));\n    }\n    return output.join('');\n}\nfunction fromByteArray(uint8) {\n    var tmp;\n    var len = uint8.length;\n    var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes\n    var parts = [];\n    var maxChunkLength = 16383; // must be multiple of 3\n    // go through the array every three bytes, we'll deal with trailing stuff later\n    for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n        parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));\n    }\n    // pad the end with zeros, but make sure to not forget the extra bytes\n    if (extraBytes === 1) {\n        tmp = uint8[len - 1];\n        parts.push(lookup[tmp >> 2] + lookup[(tmp << 4) & 0x3f] + '==');\n    }\n    else if (extraBytes === 2) {\n        tmp = (uint8[len - 2] << 8) + uint8[len - 1];\n        parts.push(lookup[tmp >> 10] + lookup[(tmp >> 4) & 0x3f] + lookup[(tmp << 2) & 0x3f] + '=');\n    }\n    return parts.join('');\n}\n","\"use strict\";\n/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n    var e, m;\n    var eLen = nBytes * 8 - mLen - 1;\n    var eMax = (1 << eLen) - 1;\n    var eBias = eMax >> 1;\n    var nBits = -7;\n    var i = isLE ? nBytes - 1 : 0;\n    var d = isLE ? -1 : 1;\n    var s = buffer[offset + i];\n    i += d;\n    e = s & ((1 << -nBits) - 1);\n    s >>= -nBits;\n    nBits += eLen;\n    for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) { }\n    m = e & ((1 << -nBits) - 1);\n    e >>= -nBits;\n    nBits += mLen;\n    for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) { }\n    if (e === 0) {\n        e = 1 - eBias;\n    }\n    else if (e === eMax) {\n        return m ? NaN : (s ? -1 : 1) * Infinity;\n    }\n    else {\n        m = m + Math.pow(2, mLen);\n        e = e - eBias;\n    }\n    return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\n};\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n    var e, m, c;\n    var eLen = nBytes * 8 - mLen - 1;\n    var eMax = (1 << eLen) - 1;\n    var eBias = eMax >> 1;\n    var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;\n    var i = isLE ? 0 : nBytes - 1;\n    var d = isLE ? 1 : -1;\n    var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\n    value = Math.abs(value);\n    if (isNaN(value) || value === Infinity) {\n        m = isNaN(value) ? 1 : 0;\n        e = eMax;\n    }\n    else {\n        e = Math.floor(Math.log(value) / Math.LN2);\n        if (value * (c = Math.pow(2, -e)) < 1) {\n            e--;\n            c *= 2;\n        }\n        if (e + eBias >= 1) {\n            value += rt / c;\n        }\n        else {\n            value += rt * Math.pow(2, 1 - eBias);\n        }\n        if (value * c >= 2) {\n            e++;\n            c /= 2;\n        }\n        if (e + eBias >= eMax) {\n            m = 0;\n            e = eMax;\n        }\n        else if (e + eBias >= 1) {\n            m = (value * c - 1) * Math.pow(2, mLen);\n            e = e + eBias;\n        }\n        else {\n            m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n            e = 0;\n        }\n    }\n    for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) { }\n    e = (e << mLen) | m;\n    eLen += mLen;\n    for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) { }\n    buffer[offset + i - d] |= s * 128;\n};\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <https://feross.org>\n * @license  MIT\n */\n/* eslint-disable no-proto */\n'use strict';\nconst base64 = require('./base64-js');\nconst ieee754 = require('./ieee754');\nconst customInspectSymbol = typeof Symbol === 'function' && typeof Symbol['for'] === 'function' // eslint-disable-line dot-notation\n    ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n    : null;\nexports.Buffer = Buffer;\nexports.SlowBuffer = SlowBuffer;\nexports.INSPECT_MAX_BYTES = 50;\nconst K_MAX_LENGTH = 0x7fffffff;\nexports.kMaxLength = K_MAX_LENGTH;\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Print warning and recommend using `buffer` v4.x which has an Object\n *               implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport();\nif (!Buffer.TYPED_ARRAY_SUPPORT &&\n    typeof console !== 'undefined' &&\n    typeof console.error === 'function') {\n    console.error('This browser lacks typed array (Uint8Array) support which is required by ' +\n        '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.');\n}\nfunction typedArraySupport() {\n    // Can typed array instances can be augmented?\n    try {\n        const arr = new Uint8Array(1);\n        const proto = {\n            foo: function () {\n                return 42;\n            }\n        };\n        Object.setPrototypeOf(proto, Uint8Array.prototype);\n        Object.setPrototypeOf(arr, proto);\n        return arr.foo() === 42;\n    }\n    catch (e) {\n        return false;\n    }\n}\nObject.defineProperty(Buffer.prototype, 'parent', {\n    enumerable: true,\n    get: function () {\n        if (!Buffer.isBuffer(this))\n            return undefined;\n        return this.buffer;\n    }\n});\nObject.defineProperty(Buffer.prototype, 'offset', {\n    enumerable: true,\n    get: function () {\n        if (!Buffer.isBuffer(this))\n            return undefined;\n        return this.byteOffset;\n    }\n});\nfunction createBuffer(length) {\n    if (length > K_MAX_LENGTH) {\n        throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"');\n    }\n    // Return an augmented `Uint8Array` instance\n    const buf = new Uint8Array(length);\n    Object.setPrototypeOf(buf, Buffer.prototype);\n    return buf;\n}\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\nfunction Buffer(arg, encodingOrOffset, length) {\n    // Common case.\n    if (typeof arg === 'number') {\n        if (typeof encodingOrOffset === 'string') {\n            throw new TypeError('The \"string\" argument must be of type string. Received type number');\n        }\n        return allocUnsafe(arg);\n    }\n    return from(arg, encodingOrOffset, length);\n}\nBuffer.poolSize = 8192; // not used by this implementation\nfunction from(value, encodingOrOffset, length) {\n    if (typeof value === 'string') {\n        return fromString(value, encodingOrOffset);\n    }\n    if (ArrayBuffer.isView(value)) {\n        return fromArrayView(value);\n    }\n    if (value == null) {\n        throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n            'or Array-like Object. Received type ' +\n            typeof value);\n    }\n    if (isInstance(value, ArrayBuffer) || (value && isInstance(value.buffer, ArrayBuffer))) {\n        return fromArrayBuffer(value, encodingOrOffset, length);\n    }\n    if (typeof SharedArrayBuffer !== 'undefined' &&\n        (isInstance(value, SharedArrayBuffer) ||\n            (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n        return fromArrayBuffer(value, encodingOrOffset, length);\n    }\n    if (typeof value === 'number') {\n        throw new TypeError('The \"value\" argument must not be of type number. Received type number');\n    }\n    const valueOf = value.valueOf && value.valueOf();\n    if (valueOf != null && valueOf !== value) {\n        return Buffer.from(valueOf, encodingOrOffset, length);\n    }\n    const b = fromObject(value);\n    if (b)\n        return b;\n    if (typeof Symbol !== 'undefined' &&\n        Symbol.toPrimitive != null &&\n        typeof value[Symbol.toPrimitive] === 'function') {\n        return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length);\n    }\n    throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n        'or Array-like Object. Received type ' +\n        typeof value);\n}\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n    return from(value, encodingOrOffset, length);\n};\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype);\nObject.setPrototypeOf(Buffer, Uint8Array);\nfunction assertSize(size) {\n    if (typeof size !== 'number') {\n        throw new TypeError('\"size\" argument must be of type number');\n    }\n    else if (size < 0) {\n        throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"');\n    }\n}\nfunction alloc(size, fill, encoding) {\n    assertSize(size);\n    if (size <= 0) {\n        return createBuffer(size);\n    }\n    if (fill !== undefined) {\n        // Only pay attention to encoding if it's a string. This\n        // prevents accidentally sending in a number that would\n        // be interpreted as a start offset.\n        return typeof encoding === 'string'\n            ? createBuffer(size).fill(fill, encoding)\n            : createBuffer(size).fill(fill);\n    }\n    return createBuffer(size);\n}\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n    return alloc(size, fill, encoding);\n};\nfunction allocUnsafe(size) {\n    assertSize(size);\n    return createBuffer(size < 0 ? 0 : checked(size) | 0);\n}\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n    return allocUnsafe(size);\n};\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n    return allocUnsafe(size);\n};\nfunction fromString(string, encoding) {\n    if (typeof encoding !== 'string' || encoding === '') {\n        encoding = 'utf8';\n    }\n    if (!Buffer.isEncoding(encoding)) {\n        throw new TypeError('Unknown encoding: ' + encoding);\n    }\n    const length = byteLength(string, encoding) | 0;\n    let buf = createBuffer(length);\n    const actual = buf.write(string, encoding);\n    if (actual !== length) {\n        // Writing a hex string, for example, that contains invalid characters will\n        // cause everything after the first invalid character to be ignored. (e.g.\n        // 'abxxcd' will be treated as 'ab')\n        buf = buf.slice(0, actual);\n    }\n    return buf;\n}\nfunction fromArrayLike(array) {\n    const length = array.length < 0 ? 0 : checked(array.length) | 0;\n    const buf = createBuffer(length);\n    for (let i = 0; i < length; i += 1) {\n        buf[i] = array[i] & 255;\n    }\n    return buf;\n}\nfunction fromArrayView(arrayView) {\n    if (isInstance(arrayView, Uint8Array)) {\n        const copy = new Uint8Array(arrayView);\n        return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);\n    }\n    return fromArrayLike(arrayView);\n}\nfunction fromArrayBuffer(array, byteOffset, length) {\n    if (byteOffset < 0 || array.byteLength < byteOffset) {\n        throw new RangeError('\"offset\" is outside of buffer bounds');\n    }\n    if (array.byteLength < byteOffset + (length || 0)) {\n        throw new RangeError('\"length\" is outside of buffer bounds');\n    }\n    let buf;\n    if (byteOffset === undefined && length === undefined) {\n        buf = new Uint8Array(array);\n    }\n    else if (length === undefined) {\n        buf = new Uint8Array(array, byteOffset);\n    }\n    else {\n        buf = new Uint8Array(array, byteOffset, length);\n    }\n    // Return an augmented `Uint8Array` instance\n    Object.setPrototypeOf(buf, Buffer.prototype);\n    return buf;\n}\nfunction fromObject(obj) {\n    if (Buffer.isBuffer(obj)) {\n        const len = checked(obj.length) | 0;\n        const buf = createBuffer(len);\n        if (buf.length === 0) {\n            return buf;\n        }\n        obj.copy(buf, 0, 0, len);\n        return buf;\n    }\n    if (obj.length !== undefined) {\n        if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n            return createBuffer(0);\n        }\n        return fromArrayLike(obj);\n    }\n    if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n        return fromArrayLike(obj.data);\n    }\n}\nfunction checked(length) {\n    // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n    // length is NaN (which is otherwise coerced to zero.)\n    if (length >= K_MAX_LENGTH) {\n        throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n            'size: 0x' +\n            K_MAX_LENGTH.toString(16) +\n            ' bytes');\n    }\n    return length | 0;\n}\nfunction SlowBuffer(length) {\n    if (+length != length) {\n        // eslint-disable-line eqeqeq\n        length = 0;\n    }\n    return Buffer.alloc(+length);\n}\nBuffer.isBuffer = function isBuffer(b) {\n    return b != null && b._isBuffer === true && b !== Buffer.prototype; // so Buffer.isBuffer(Buffer.prototype) will be false\n};\nBuffer.compare = function compare(a, b) {\n    if (isInstance(a, Uint8Array))\n        a = Buffer.from(a, a.offset, a.byteLength);\n    if (isInstance(b, Uint8Array))\n        b = Buffer.from(b, b.offset, b.byteLength);\n    if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n        throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');\n    }\n    if (a === b)\n        return 0;\n    let x = a.length;\n    let y = b.length;\n    for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n        if (a[i] !== b[i]) {\n            x = a[i];\n            y = b[i];\n            break;\n        }\n    }\n    if (x < y)\n        return -1;\n    if (y < x)\n        return 1;\n    return 0;\n};\nBuffer.isEncoding = function isEncoding(encoding) {\n    switch (String(encoding).toLowerCase()) {\n        case 'hex':\n        case 'utf8':\n        case 'utf-8':\n        case 'ascii':\n        case 'latin1':\n        case 'binary':\n        case 'base64':\n        case 'ucs2':\n        case 'ucs-2':\n        case 'utf16le':\n        case 'utf-16le':\n            return true;\n        default:\n            return false;\n    }\n};\nBuffer.concat = function concat(list, length) {\n    if (!Array.isArray(list)) {\n        throw new TypeError('\"list\" argument must be an Array of Buffers');\n    }\n    if (list.length === 0) {\n        return Buffer.alloc(0);\n    }\n    let i;\n    if (length === undefined) {\n        length = 0;\n        for (i = 0; i < list.length; ++i) {\n            length += list[i].length;\n        }\n    }\n    const buffer = Buffer.allocUnsafe(length);\n    let pos = 0;\n    for (i = 0; i < list.length; ++i) {\n        let buf = list[i];\n        if (isInstance(buf, Uint8Array)) {\n            if (pos + buf.length > buffer.length) {\n                if (!Buffer.isBuffer(buf))\n                    buf = Buffer.from(buf);\n                buf.copy(buffer, pos);\n            }\n            else {\n                Uint8Array.prototype.set.call(buffer, buf, pos);\n            }\n        }\n        else if (!Buffer.isBuffer(buf)) {\n            throw new TypeError('\"list\" argument must be an Array of Buffers');\n        }\n        else {\n            buf.copy(buffer, pos);\n        }\n        pos += buf.length;\n    }\n    return buffer;\n};\nfunction byteLength(string, encoding) {\n    if (Buffer.isBuffer(string)) {\n        return string.length;\n    }\n    if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n        return string.byteLength;\n    }\n    if (typeof string !== 'string') {\n        throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n            'Received type ' +\n            typeof string);\n    }\n    const len = string.length;\n    const mustMatch = arguments.length > 2 && arguments[2] === true;\n    if (!mustMatch && len === 0)\n        return 0;\n    // Use a for loop to avoid recursion\n    let loweredCase = false;\n    for (;;) {\n        switch (encoding) {\n            case 'ascii':\n            case 'latin1':\n            case 'binary':\n                return len;\n            case 'utf8':\n            case 'utf-8':\n                return utf8ToBytes(string).length;\n            case 'ucs2':\n            case 'ucs-2':\n            case 'utf16le':\n            case 'utf-16le':\n                return len * 2;\n            case 'hex':\n                return len >>> 1;\n            case 'base64':\n                return base64ToBytes(string).length;\n            default:\n                if (loweredCase) {\n                    return mustMatch ? -1 : utf8ToBytes(string).length; // assume utf8\n                }\n                encoding = ('' + encoding).toLowerCase();\n                loweredCase = true;\n        }\n    }\n}\nBuffer.byteLength = byteLength;\nfunction slowToString(encoding, start, end) {\n    let loweredCase = false;\n    // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n    // property of a typed array.\n    // This behaves neither like String nor Uint8Array in that we set start/end\n    // to their upper/lower bounds if the value passed is out of range.\n    // undefined is handled specially as per ECMA-262 6th Edition,\n    // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n    if (start === undefined || start < 0) {\n        start = 0;\n    }\n    // Return early if start > this.length. Done here to prevent potential uint32\n    // coercion fail below.\n    if (start > this.length) {\n        return '';\n    }\n    if (end === undefined || end > this.length) {\n        end = this.length;\n    }\n    if (end <= 0) {\n        return '';\n    }\n    // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n    end >>>= 0;\n    start >>>= 0;\n    if (end <= start) {\n        return '';\n    }\n    if (!encoding)\n        encoding = 'utf8';\n    while (true) {\n        switch (encoding) {\n            case 'hex':\n                return hexSlice(this, start, end);\n            case 'utf8':\n            case 'utf-8':\n                return utf8Slice(this, start, end);\n            case 'ascii':\n                return asciiSlice(this, start, end);\n            case 'latin1':\n            case 'binary':\n                return latin1Slice(this, start, end);\n            case 'base64':\n                return base64Slice(this, start, end);\n            case 'ucs2':\n            case 'ucs-2':\n            case 'utf16le':\n            case 'utf-16le':\n                return utf16leSlice(this, start, end);\n            default:\n                if (loweredCase)\n                    throw new TypeError('Unknown encoding: ' + encoding);\n                encoding = (encoding + '').toLowerCase();\n                loweredCase = true;\n        }\n    }\n}\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true;\nfunction swap(b, n, m) {\n    const i = b[n];\n    b[n] = b[m];\n    b[m] = i;\n}\nBuffer.prototype.swap16 = function swap16() {\n    const len = this.length;\n    if (len % 2 !== 0) {\n        throw new RangeError('Buffer size must be a multiple of 16-bits');\n    }\n    for (let i = 0; i < len; i += 2) {\n        swap(this, i, i + 1);\n    }\n    return this;\n};\nBuffer.prototype.swap32 = function swap32() {\n    const len = this.length;\n    if (len % 4 !== 0) {\n        throw new RangeError('Buffer size must be a multiple of 32-bits');\n    }\n    for (let i = 0; i < len; i += 4) {\n        swap(this, i, i + 3);\n        swap(this, i + 1, i + 2);\n    }\n    return this;\n};\nBuffer.prototype.swap64 = function swap64() {\n    const len = this.length;\n    if (len % 8 !== 0) {\n        throw new RangeError('Buffer size must be a multiple of 64-bits');\n    }\n    for (let i = 0; i < len; i += 8) {\n        swap(this, i, i + 7);\n        swap(this, i + 1, i + 6);\n        swap(this, i + 2, i + 5);\n        swap(this, i + 3, i + 4);\n    }\n    return this;\n};\nBuffer.prototype.toString = function toString() {\n    const length = this.length;\n    if (length === 0)\n        return '';\n    if (arguments.length === 0)\n        return utf8Slice(this, 0, length);\n    return slowToString.apply(this, arguments);\n};\nBuffer.prototype.toLocaleString = Buffer.prototype.toString;\nBuffer.prototype.equals = function equals(b) {\n    if (!Buffer.isBuffer(b))\n        throw new TypeError('Argument must be a Buffer');\n    if (this === b)\n        return true;\n    return Buffer.compare(this, b) === 0;\n};\nBuffer.prototype.inspect = function inspect() {\n    let str = '';\n    const max = exports.INSPECT_MAX_BYTES;\n    str = this.toString('hex', 0, max)\n        .replace(/(.{2})/g, '$1 ')\n        .trim();\n    if (this.length > max)\n        str += ' ... ';\n    return '<Buffer ' + str + '>';\n};\nif (customInspectSymbol) {\n    Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect;\n}\nBuffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n    if (isInstance(target, Uint8Array)) {\n        target = Buffer.from(target, target.offset, target.byteLength);\n    }\n    if (!Buffer.isBuffer(target)) {\n        throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n            'Received type ' +\n            typeof target);\n    }\n    if (start === undefined) {\n        start = 0;\n    }\n    if (end === undefined) {\n        end = target ? target.length : 0;\n    }\n    if (thisStart === undefined) {\n        thisStart = 0;\n    }\n    if (thisEnd === undefined) {\n        thisEnd = this.length;\n    }\n    if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n        throw new RangeError('out of range index');\n    }\n    if (thisStart >= thisEnd && start >= end) {\n        return 0;\n    }\n    if (thisStart >= thisEnd) {\n        return -1;\n    }\n    if (start >= end) {\n        return 1;\n    }\n    start >>>= 0;\n    end >>>= 0;\n    thisStart >>>= 0;\n    thisEnd >>>= 0;\n    if (this === target)\n        return 0;\n    let x = thisEnd - thisStart;\n    let y = end - start;\n    const len = Math.min(x, y);\n    const thisCopy = this.slice(thisStart, thisEnd);\n    const targetCopy = target.slice(start, end);\n    for (let i = 0; i < len; ++i) {\n        if (thisCopy[i] !== targetCopy[i]) {\n            x = thisCopy[i];\n            y = targetCopy[i];\n            break;\n        }\n    }\n    if (x < y)\n        return -1;\n    if (y < x)\n        return 1;\n    return 0;\n};\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n    // Empty buffer means no match\n    if (buffer.length === 0)\n        return -1;\n    // Normalize byteOffset\n    if (typeof byteOffset === 'string') {\n        encoding = byteOffset;\n        byteOffset = 0;\n    }\n    else if (byteOffset > 0x7fffffff) {\n        byteOffset = 0x7fffffff;\n    }\n    else if (byteOffset < -0x80000000) {\n        byteOffset = -0x80000000;\n    }\n    byteOffset = +byteOffset; // Coerce to Number.\n    if (numberIsNaN(byteOffset)) {\n        // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n        byteOffset = dir ? 0 : buffer.length - 1;\n    }\n    // Normalize byteOffset: negative offsets start from the end of the buffer\n    if (byteOffset < 0)\n        byteOffset = buffer.length + byteOffset;\n    if (byteOffset >= buffer.length) {\n        if (dir)\n            return -1;\n        else\n            byteOffset = buffer.length - 1;\n    }\n    else if (byteOffset < 0) {\n        if (dir)\n            byteOffset = 0;\n        else\n            return -1;\n    }\n    // Normalize val\n    if (typeof val === 'string') {\n        val = Buffer.from(val, encoding);\n    }\n    // Finally, search either indexOf (if dir is true) or lastIndexOf\n    if (Buffer.isBuffer(val)) {\n        // Special case: looking for empty string/buffer always fails\n        if (val.length === 0) {\n            return -1;\n        }\n        return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n    }\n    else if (typeof val === 'number') {\n        val = val & 0xff; // Search for a byte value [0-255]\n        if (typeof Uint8Array.prototype.indexOf === 'function') {\n            if (dir) {\n                return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n            }\n            else {\n                return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n            }\n        }\n        return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n    }\n    throw new TypeError('val must be string, number or Buffer');\n}\nfunction arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n    let indexSize = 1;\n    let arrLength = arr.length;\n    let valLength = val.length;\n    if (encoding !== undefined) {\n        encoding = String(encoding).toLowerCase();\n        if (encoding === 'ucs2' ||\n            encoding === 'ucs-2' ||\n            encoding === 'utf16le' ||\n            encoding === 'utf-16le') {\n            if (arr.length < 2 || val.length < 2) {\n                return -1;\n            }\n            indexSize = 2;\n            arrLength /= 2;\n            valLength /= 2;\n            byteOffset /= 2;\n        }\n    }\n    function read(buf, i) {\n        if (indexSize === 1) {\n            return buf[i];\n        }\n        else {\n            return buf.readUInt16BE(i * indexSize);\n        }\n    }\n    let i;\n    if (dir) {\n        let foundIndex = -1;\n        for (i = byteOffset; i < arrLength; i++) {\n            if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n                if (foundIndex === -1)\n                    foundIndex = i;\n                if (i - foundIndex + 1 === valLength)\n                    return foundIndex * indexSize;\n            }\n            else {\n                if (foundIndex !== -1)\n                    i -= i - foundIndex;\n                foundIndex = -1;\n            }\n        }\n    }\n    else {\n        if (byteOffset + valLength > arrLength)\n            byteOffset = arrLength - valLength;\n        for (i = byteOffset; i >= 0; i--) {\n            let found = true;\n            for (let j = 0; j < valLength; j++) {\n                if (read(arr, i + j) !== read(val, j)) {\n                    found = false;\n                    break;\n                }\n            }\n            if (found)\n                return i;\n        }\n    }\n    return -1;\n}\nBuffer.prototype.includes = function includes(val, byteOffset, encoding) {\n    return this.indexOf(val, byteOffset, encoding) !== -1;\n};\nBuffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n    return bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n};\nBuffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n    return bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n};\nfunction hexWrite(buf, string, offset, length) {\n    offset = Number(offset) || 0;\n    const remaining = buf.length - offset;\n    if (!length) {\n        length = remaining;\n    }\n    else {\n        length = Number(length);\n        if (length > remaining) {\n            length = remaining;\n        }\n    }\n    const strLen = string.length;\n    if (length > strLen / 2) {\n        length = strLen / 2;\n    }\n    let i;\n    for (i = 0; i < length; ++i) {\n        const parsed = parseInt(string.substr(i * 2, 2), 16);\n        if (numberIsNaN(parsed))\n            return i;\n        buf[offset + i] = parsed;\n    }\n    return i;\n}\nfunction utf8Write(buf, string, offset, length) {\n    return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);\n}\nfunction asciiWrite(buf, string, offset, length) {\n    return blitBuffer(asciiToBytes(string), buf, offset, length);\n}\nfunction base64Write(buf, string, offset, length) {\n    return blitBuffer(base64ToBytes(string), buf, offset, length);\n}\nfunction ucs2Write(buf, string, offset, length) {\n    return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);\n}\nBuffer.prototype.write = function write(string, offset, length, encoding) {\n    // Buffer#write(string)\n    if (offset === undefined) {\n        encoding = 'utf8';\n        length = this.length;\n        offset = 0;\n        // Buffer#write(string, encoding)\n    }\n    else if (length === undefined && typeof offset === 'string') {\n        encoding = offset;\n        length = this.length;\n        offset = 0;\n        // Buffer#write(string, offset[, length][, encoding])\n    }\n    else if (isFinite(offset)) {\n        offset = offset >>> 0;\n        if (isFinite(length)) {\n            length = length >>> 0;\n            if (encoding === undefined)\n                encoding = 'utf8';\n        }\n        else {\n            encoding = length;\n            length = undefined;\n        }\n    }\n    else {\n        throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');\n    }\n    const remaining = this.length - offset;\n    if (length === undefined || length > remaining)\n        length = remaining;\n    if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n        throw new RangeError('Attempt to write outside buffer bounds');\n    }\n    if (!encoding)\n        encoding = 'utf8';\n    let loweredCase = false;\n    for (;;) {\n        switch (encoding) {\n            case 'hex':\n                return hexWrite(this, string, offset, length);\n            case 'utf8':\n            case 'utf-8':\n                return utf8Write(this, string, offset, length);\n            case 'ascii':\n            case 'latin1':\n            case 'binary':\n                return asciiWrite(this, string, offset, length);\n            case 'base64':\n                // Warning: maxLength not taken into account in base64Write\n                return base64Write(this, string, offset, length);\n            case 'ucs2':\n            case 'ucs-2':\n            case 'utf16le':\n            case 'utf-16le':\n                return ucs2Write(this, string, offset, length);\n            default:\n                if (loweredCase)\n                    throw new TypeError('Unknown encoding: ' + encoding);\n                encoding = ('' + encoding).toLowerCase();\n                loweredCase = true;\n        }\n    }\n};\nBuffer.prototype.toJSON = function toJSON() {\n    return {\n        type: 'Buffer',\n        data: Array.prototype.slice.call(this._arr || this, 0)\n    };\n};\nfunction base64Slice(buf, start, end) {\n    if (start === 0 && end === buf.length) {\n        return base64.fromByteArray(buf);\n    }\n    else {\n        return base64.fromByteArray(buf.slice(start, end));\n    }\n}\nfunction utf8Slice(buf, start, end) {\n    end = Math.min(buf.length, end);\n    const res = [];\n    let i = start;\n    while (i < end) {\n        const firstByte = buf[i];\n        let codePoint = null;\n        let bytesPerSequence = firstByte > 0xef ? 4 : firstByte > 0xdf ? 3 : firstByte > 0xbf ? 2 : 1;\n        if (i + bytesPerSequence <= end) {\n            let secondByte, thirdByte, fourthByte, tempCodePoint;\n            switch (bytesPerSequence) {\n                case 1:\n                    if (firstByte < 0x80) {\n                        codePoint = firstByte;\n                    }\n                    break;\n                case 2:\n                    secondByte = buf[i + 1];\n                    if ((secondByte & 0xc0) === 0x80) {\n                        tempCodePoint = ((firstByte & 0x1f) << 0x6) | (secondByte & 0x3f);\n                        if (tempCodePoint > 0x7f) {\n                            codePoint = tempCodePoint;\n                        }\n                    }\n                    break;\n                case 3:\n                    secondByte = buf[i + 1];\n                    thirdByte = buf[i + 2];\n                    if ((secondByte & 0xc0) === 0x80 && (thirdByte & 0xc0) === 0x80) {\n                        tempCodePoint =\n                            ((firstByte & 0xf) << 0xc) |\n                                ((secondByte & 0x3f) << 0x6) |\n                                (thirdByte & 0x3f);\n                        if (tempCodePoint > 0x7ff &&\n                            (tempCodePoint < 0xd800 || tempCodePoint > 0xdfff)) {\n                            codePoint = tempCodePoint;\n                        }\n                    }\n                    break;\n                case 4:\n                    secondByte = buf[i + 1];\n                    thirdByte = buf[i + 2];\n                    fourthByte = buf[i + 3];\n                    if ((secondByte & 0xc0) === 0x80 &&\n                        (thirdByte & 0xc0) === 0x80 &&\n                        (fourthByte & 0xc0) === 0x80) {\n                        tempCodePoint =\n                            ((firstByte & 0xf) << 0x12) |\n                                ((secondByte & 0x3f) << 0xc) |\n                                ((thirdByte & 0x3f) << 0x6) |\n                                (fourthByte & 0x3f);\n                        if (tempCodePoint > 0xffff && tempCodePoint < 0x110000) {\n                            codePoint = tempCodePoint;\n                        }\n                    }\n            }\n        }\n        if (codePoint === null) {\n            // we did not generate a valid codePoint so insert a\n            // replacement char (U+FFFD) and advance only 1 byte\n            codePoint = 0xfffd;\n            bytesPerSequence = 1;\n        }\n        else if (codePoint > 0xffff) {\n            // encode to utf16 (surrogate pair dance)\n            codePoint -= 0x10000;\n            res.push(((codePoint >>> 10) & 0x3ff) | 0xd800);\n            codePoint = 0xdc00 | (codePoint & 0x3ff);\n        }\n        res.push(codePoint);\n        i += bytesPerSequence;\n    }\n    return decodeCodePointsArray(res);\n}\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000;\nfunction decodeCodePointsArray(codePoints) {\n    const len = codePoints.length;\n    if (len <= MAX_ARGUMENTS_LENGTH) {\n        return String.fromCharCode.apply(String, codePoints); // avoid extra slice()\n    }\n    // Decode in chunks to avoid \"call stack size exceeded\".\n    let res = '';\n    let i = 0;\n    while (i < len) {\n        res += String.fromCharCode.apply(String, codePoints.slice(i, (i += MAX_ARGUMENTS_LENGTH)));\n    }\n    return res;\n}\nfunction asciiSlice(buf, start, end) {\n    let ret = '';\n    end = Math.min(buf.length, end);\n    for (let i = start; i < end; ++i) {\n        ret += String.fromCharCode(buf[i] & 0x7f);\n    }\n    return ret;\n}\nfunction latin1Slice(buf, start, end) {\n    let ret = '';\n    end = Math.min(buf.length, end);\n    for (let i = start; i < end; ++i) {\n        ret += String.fromCharCode(buf[i]);\n    }\n    return ret;\n}\nfunction hexSlice(buf, start, end) {\n    const len = buf.length;\n    if (!start || start < 0)\n        start = 0;\n    if (!end || end < 0 || end > len)\n        end = len;\n    let out = '';\n    for (let i = start; i < end; ++i) {\n        out += hexSliceLookupTable[buf[i]];\n    }\n    return out;\n}\nfunction utf16leSlice(buf, start, end) {\n    const bytes = buf.slice(start, end);\n    let res = '';\n    // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n    for (let i = 0; i < bytes.length - 1; i += 2) {\n        res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n    }\n    return res;\n}\nBuffer.prototype.slice = function slice(start, end) {\n    const len = this.length;\n    start = ~~start;\n    end = end === undefined ? len : ~~end;\n    if (start < 0) {\n        start += len;\n        if (start < 0)\n            start = 0;\n    }\n    else if (start > len) {\n        start = len;\n    }\n    if (end < 0) {\n        end += len;\n        if (end < 0)\n            end = 0;\n    }\n    else if (end > len) {\n        end = len;\n    }\n    if (end < start)\n        end = start;\n    const newBuf = this.subarray(start, end);\n    // Return an augmented `Uint8Array` instance\n    Object.setPrototypeOf(newBuf, Buffer.prototype);\n    return newBuf;\n};\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset(offset, ext, length) {\n    if (offset % 1 !== 0 || offset < 0)\n        throw new RangeError('offset is not uint');\n    if (offset + ext > length)\n        throw new RangeError('Trying to access beyond buffer length');\n}\nBuffer.prototype.readUintLE = Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {\n    offset = offset >>> 0;\n    byteLength = byteLength >>> 0;\n    if (!noAssert)\n        checkOffset(offset, byteLength, this.length);\n    let val = this[offset];\n    let mul = 1;\n    let i = 0;\n    while (++i < byteLength && (mul *= 0x100)) {\n        val += this[offset + i] * mul;\n    }\n    return val;\n};\nBuffer.prototype.readUintBE = Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {\n    offset = offset >>> 0;\n    byteLength = byteLength >>> 0;\n    if (!noAssert) {\n        checkOffset(offset, byteLength, this.length);\n    }\n    let val = this[offset + --byteLength];\n    let mul = 1;\n    while (byteLength > 0 && (mul *= 0x100)) {\n        val += this[offset + --byteLength] * mul;\n    }\n    return val;\n};\nBuffer.prototype.readUint8 = Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkOffset(offset, 1, this.length);\n    return this[offset];\n};\nBuffer.prototype.readUint16LE = Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkOffset(offset, 2, this.length);\n    return this[offset] | (this[offset + 1] << 8);\n};\nBuffer.prototype.readUint16BE = Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkOffset(offset, 2, this.length);\n    return (this[offset] << 8) | this[offset + 1];\n};\nBuffer.prototype.readUint32LE = Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkOffset(offset, 4, this.length);\n    return ((this[offset] | (this[offset + 1] << 8) | (this[offset + 2] << 16)) +\n        this[offset + 3] * 0x1000000);\n};\nBuffer.prototype.readUint32BE = Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkOffset(offset, 4, this.length);\n    return (this[offset] * 0x1000000 +\n        ((this[offset + 1] << 16) | (this[offset + 2] << 8) | this[offset + 3]));\n};\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) {\n    offset = offset >>> 0;\n    validateNumber(offset, 'offset');\n    const first = this[offset];\n    const last = this[offset + 7];\n    if (first === undefined || last === undefined) {\n        boundsError(offset, this.length - 8);\n    }\n    const lo = first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24;\n    const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24;\n    return BigInt(lo) + (BigInt(hi) << BigInt(32));\n});\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) {\n    offset = offset >>> 0;\n    validateNumber(offset, 'offset');\n    const first = this[offset];\n    const last = this[offset + 7];\n    if (first === undefined || last === undefined) {\n        boundsError(offset, this.length - 8);\n    }\n    const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];\n    const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last;\n    return (BigInt(hi) << BigInt(32)) + BigInt(lo);\n});\nBuffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {\n    offset = offset >>> 0;\n    byteLength = byteLength >>> 0;\n    if (!noAssert)\n        checkOffset(offset, byteLength, this.length);\n    let val = this[offset];\n    let mul = 1;\n    let i = 0;\n    while (++i < byteLength && (mul *= 0x100)) {\n        val += this[offset + i] * mul;\n    }\n    mul *= 0x80;\n    if (val >= mul)\n        val -= Math.pow(2, 8 * byteLength);\n    return val;\n};\nBuffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {\n    offset = offset >>> 0;\n    byteLength = byteLength >>> 0;\n    if (!noAssert)\n        checkOffset(offset, byteLength, this.length);\n    let i = byteLength;\n    let mul = 1;\n    let val = this[offset + --i];\n    while (i > 0 && (mul *= 0x100)) {\n        val += this[offset + --i] * mul;\n    }\n    mul *= 0x80;\n    if (val >= mul)\n        val -= Math.pow(2, 8 * byteLength);\n    return val;\n};\nBuffer.prototype.readInt8 = function readInt8(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkOffset(offset, 1, this.length);\n    if (!(this[offset] & 0x80))\n        return this[offset];\n    return (0xff - this[offset] + 1) * -1;\n};\nBuffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkOffset(offset, 2, this.length);\n    const val = this[offset] | (this[offset + 1] << 8);\n    return val & 0x8000 ? val | 0xffff0000 : val;\n};\nBuffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkOffset(offset, 2, this.length);\n    const val = this[offset + 1] | (this[offset] << 8);\n    return val & 0x8000 ? val | 0xffff0000 : val;\n};\nBuffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkOffset(offset, 4, this.length);\n    return (this[offset] | (this[offset + 1] << 8) | (this[offset + 2] << 16) | (this[offset + 3] << 24));\n};\nBuffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkOffset(offset, 4, this.length);\n    return ((this[offset] << 24) | (this[offset + 1] << 16) | (this[offset + 2] << 8) | this[offset + 3]);\n};\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) {\n    offset = offset >>> 0;\n    validateNumber(offset, 'offset');\n    const first = this[offset];\n    const last = this[offset + 7];\n    if (first === undefined || last === undefined) {\n        boundsError(offset, this.length - 8);\n    }\n    const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24); // Overflow\n    return ((BigInt(val) << BigInt(32)) +\n        BigInt(first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24));\n});\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) {\n    offset = offset >>> 0;\n    validateNumber(offset, 'offset');\n    const first = this[offset];\n    const last = this[offset + 7];\n    if (first === undefined || last === undefined) {\n        boundsError(offset, this.length - 8);\n    }\n    const val = (first << 24) + // Overflow\n        this[++offset] * 2 ** 16 +\n        this[++offset] * 2 ** 8 +\n        this[++offset];\n    return ((BigInt(val) << BigInt(32)) +\n        BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last));\n});\nBuffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkOffset(offset, 4, this.length);\n    return ieee754.read(this, offset, true, 23, 4);\n};\nBuffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkOffset(offset, 4, this.length);\n    return ieee754.read(this, offset, false, 23, 4);\n};\nBuffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkOffset(offset, 8, this.length);\n    return ieee754.read(this, offset, true, 52, 8);\n};\nBuffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkOffset(offset, 8, this.length);\n    return ieee754.read(this, offset, false, 52, 8);\n};\nfunction checkInt(buf, value, offset, ext, max, min) {\n    if (!Buffer.isBuffer(buf))\n        throw new TypeError('\"buffer\" argument must be a Buffer instance');\n    if (value > max || value < min)\n        throw new RangeError('\"value\" argument is out of bounds');\n    if (offset + ext > buf.length)\n        throw new RangeError('Index out of range');\n}\nBuffer.prototype.writeUintLE = Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    byteLength = byteLength >>> 0;\n    if (!noAssert) {\n        const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n        checkInt(this, value, offset, byteLength, maxBytes, 0);\n    }\n    let mul = 1;\n    let i = 0;\n    this[offset] = value & 0xff;\n    while (++i < byteLength && (mul *= 0x100)) {\n        this[offset + i] = (value / mul) & 0xff;\n    }\n    return offset + byteLength;\n};\nBuffer.prototype.writeUintBE = Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    byteLength = byteLength >>> 0;\n    if (!noAssert) {\n        const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n        checkInt(this, value, offset, byteLength, maxBytes, 0);\n    }\n    let i = byteLength - 1;\n    let mul = 1;\n    this[offset + i] = value & 0xff;\n    while (--i >= 0 && (mul *= 0x100)) {\n        this[offset + i] = (value / mul) & 0xff;\n    }\n    return offset + byteLength;\n};\nBuffer.prototype.writeUint8 = Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkInt(this, value, offset, 1, 0xff, 0);\n    this[offset] = value & 0xff;\n    return offset + 1;\n};\nBuffer.prototype.writeUint16LE = Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkInt(this, value, offset, 2, 0xffff, 0);\n    this[offset] = value & 0xff;\n    this[offset + 1] = value >>> 8;\n    return offset + 2;\n};\nBuffer.prototype.writeUint16BE = Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkInt(this, value, offset, 2, 0xffff, 0);\n    this[offset] = value >>> 8;\n    this[offset + 1] = value & 0xff;\n    return offset + 2;\n};\nBuffer.prototype.writeUint32LE = Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkInt(this, value, offset, 4, 0xffffffff, 0);\n    this[offset + 3] = value >>> 24;\n    this[offset + 2] = value >>> 16;\n    this[offset + 1] = value >>> 8;\n    this[offset] = value & 0xff;\n    return offset + 4;\n};\nBuffer.prototype.writeUint32BE = Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkInt(this, value, offset, 4, 0xffffffff, 0);\n    this[offset] = value >>> 24;\n    this[offset + 1] = value >>> 16;\n    this[offset + 2] = value >>> 8;\n    this[offset + 3] = value & 0xff;\n    return offset + 4;\n};\nfunction wrtBigUInt64LE(buf, value, offset, min, max) {\n    checkIntBI(value, min, max, buf, offset, 7);\n    let lo = Number(value & BigInt(0xffffffff));\n    buf[offset++] = lo;\n    lo = lo >> 8;\n    buf[offset++] = lo;\n    lo = lo >> 8;\n    buf[offset++] = lo;\n    lo = lo >> 8;\n    buf[offset++] = lo;\n    let hi = Number((value >> BigInt(32)) & BigInt(0xffffffff));\n    buf[offset++] = hi;\n    hi = hi >> 8;\n    buf[offset++] = hi;\n    hi = hi >> 8;\n    buf[offset++] = hi;\n    hi = hi >> 8;\n    buf[offset++] = hi;\n    return offset;\n}\nfunction wrtBigUInt64BE(buf, value, offset, min, max) {\n    checkIntBI(value, min, max, buf, offset, 7);\n    let lo = Number(value & BigInt(0xffffffff));\n    buf[offset + 7] = lo;\n    lo = lo >> 8;\n    buf[offset + 6] = lo;\n    lo = lo >> 8;\n    buf[offset + 5] = lo;\n    lo = lo >> 8;\n    buf[offset + 4] = lo;\n    let hi = Number((value >> BigInt(32)) & BigInt(0xffffffff));\n    buf[offset + 3] = hi;\n    hi = hi >> 8;\n    buf[offset + 2] = hi;\n    hi = hi >> 8;\n    buf[offset + 1] = hi;\n    hi = hi >> 8;\n    buf[offset] = hi;\n    return offset + 8;\n}\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) {\n    return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'));\n});\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) {\n    return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'));\n});\nBuffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) {\n        const limit = Math.pow(2, 8 * byteLength - 1);\n        checkInt(this, value, offset, byteLength, limit - 1, -limit);\n    }\n    let i = 0;\n    let mul = 1;\n    let sub = 0;\n    this[offset] = value & 0xff;\n    while (++i < byteLength && (mul *= 0x100)) {\n        if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n            sub = 1;\n        }\n        this[offset + i] = (((value / mul) >> 0) - sub) & 0xff;\n    }\n    return offset + byteLength;\n};\nBuffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) {\n        const limit = Math.pow(2, 8 * byteLength - 1);\n        checkInt(this, value, offset, byteLength, limit - 1, -limit);\n    }\n    let i = byteLength - 1;\n    let mul = 1;\n    let sub = 0;\n    this[offset + i] = value & 0xff;\n    while (--i >= 0 && (mul *= 0x100)) {\n        if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n            sub = 1;\n        }\n        this[offset + i] = (((value / mul) >> 0) - sub) & 0xff;\n    }\n    return offset + byteLength;\n};\nBuffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkInt(this, value, offset, 1, 0x7f, -0x80);\n    if (value < 0)\n        value = 0xff + value + 1;\n    this[offset] = value & 0xff;\n    return offset + 1;\n};\nBuffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n    this[offset] = value & 0xff;\n    this[offset + 1] = value >>> 8;\n    return offset + 2;\n};\nBuffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n    this[offset] = value >>> 8;\n    this[offset + 1] = value & 0xff;\n    return offset + 2;\n};\nBuffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n    this[offset] = value & 0xff;\n    this[offset + 1] = value >>> 8;\n    this[offset + 2] = value >>> 16;\n    this[offset + 3] = value >>> 24;\n    return offset + 4;\n};\nBuffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert)\n        checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n    if (value < 0)\n        value = 0xffffffff + value + 1;\n    this[offset] = value >>> 24;\n    this[offset + 1] = value >>> 16;\n    this[offset + 2] = value >>> 8;\n    this[offset + 3] = value & 0xff;\n    return offset + 4;\n};\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset = 0) {\n    return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'));\n});\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset = 0) {\n    return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'));\n});\nfunction checkIEEE754(buf, value, offset, ext, max, min) {\n    if (offset + ext > buf.length)\n        throw new RangeError('Index out of range');\n    if (offset < 0)\n        throw new RangeError('Index out of range');\n}\nfunction writeFloat(buf, value, offset, littleEndian, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) {\n        checkIEEE754(buf, value, offset, 4, 3.4028234663852886e38, -3.4028234663852886e38);\n    }\n    ieee754.write(buf, value, offset, littleEndian, 23, 4);\n    return offset + 4;\n}\nBuffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {\n    return writeFloat(this, value, offset, true, noAssert);\n};\nBuffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {\n    return writeFloat(this, value, offset, false, noAssert);\n};\nfunction writeDouble(buf, value, offset, littleEndian, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) {\n        checkIEEE754(buf, value, offset, 8, 1.7976931348623157e308, -1.7976931348623157e308);\n    }\n    ieee754.write(buf, value, offset, littleEndian, 52, 8);\n    return offset + 8;\n}\nBuffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {\n    return writeDouble(this, value, offset, true, noAssert);\n};\nBuffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {\n    return writeDouble(this, value, offset, false, noAssert);\n};\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy(target, targetStart, start, end) {\n    if (!Buffer.isBuffer(target))\n        throw new TypeError('argument should be a Buffer');\n    if (!start)\n        start = 0;\n    if (!end && end !== 0)\n        end = this.length;\n    if (targetStart >= target.length)\n        targetStart = target.length;\n    if (!targetStart)\n        targetStart = 0;\n    if (end > 0 && end < start)\n        end = start;\n    // Copy 0 bytes; we're done\n    if (end === start)\n        return 0;\n    if (target.length === 0 || this.length === 0)\n        return 0;\n    // Fatal error conditions\n    if (targetStart < 0) {\n        throw new RangeError('targetStart out of bounds');\n    }\n    if (start < 0 || start >= this.length)\n        throw new RangeError('Index out of range');\n    if (end < 0)\n        throw new RangeError('sourceEnd out of bounds');\n    // Are we oob?\n    if (end > this.length)\n        end = this.length;\n    if (target.length - targetStart < end - start) {\n        end = target.length - targetStart + start;\n    }\n    const len = end - start;\n    if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n        // Use built-in when available, missing from IE11\n        this.copyWithin(targetStart, start, end);\n    }\n    else {\n        Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);\n    }\n    return len;\n};\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill(val, start, end, encoding) {\n    // Handle string cases:\n    if (typeof val === 'string') {\n        if (typeof start === 'string') {\n            encoding = start;\n            start = 0;\n            end = this.length;\n        }\n        else if (typeof end === 'string') {\n            encoding = end;\n            end = this.length;\n        }\n        if (encoding !== undefined && typeof encoding !== 'string') {\n            throw new TypeError('encoding must be a string');\n        }\n        if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n            throw new TypeError('Unknown encoding: ' + encoding);\n        }\n        if (val.length === 1) {\n            const code = val.charCodeAt(0);\n            if ((encoding === 'utf8' && code < 128) || encoding === 'latin1') {\n                // Fast path: If `val` fits into a single byte, use that numeric value.\n                val = code;\n            }\n        }\n    }\n    else if (typeof val === 'number') {\n        val = val & 255;\n    }\n    else if (typeof val === 'boolean') {\n        val = Number(val);\n    }\n    // Invalid ranges are not set to a default, so can range check early.\n    if (start < 0 || this.length < start || this.length < end) {\n        throw new RangeError('Out of range index');\n    }\n    if (end <= start) {\n        return this;\n    }\n    start = start >>> 0;\n    end = end === undefined ? this.length : end >>> 0;\n    if (!val)\n        val = 0;\n    let i;\n    if (typeof val === 'number') {\n        for (i = start; i < end; ++i) {\n            this[i] = val;\n        }\n    }\n    else {\n        const bytes = Buffer.isBuffer(val) ? val : Buffer.from(val, encoding);\n        const len = bytes.length;\n        if (len === 0) {\n            throw new TypeError('The value \"' + val + '\" is invalid for argument \"value\"');\n        }\n        for (i = 0; i < end - start; ++i) {\n            this[i + start] = bytes[i % len];\n        }\n    }\n    return this;\n};\n// CUSTOM ERRORS\n// =============\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {};\nfunction E(sym, getMessage, Base) {\n    errors[sym] = class NodeError extends Base {\n        constructor() {\n            super();\n            Object.defineProperty(this, 'message', {\n                value: getMessage.apply(this, arguments),\n                writable: true,\n                configurable: true\n            });\n            // Add the error code to the name to include it in the stack trace.\n            this.name = `${this.name} [${sym}]`;\n            // Access the stack to generate the error message including the error code\n            // from the name.\n            this.stack; // eslint-disable-line no-unused-expressions\n            // Reset the name to the actual name.\n            delete this.name;\n        }\n        get code() {\n            return sym;\n        }\n        set code(value) {\n            Object.defineProperty(this, 'code', {\n                configurable: true,\n                enumerable: true,\n                value,\n                writable: true\n            });\n        }\n        toString() {\n            return `${this.name} [${sym}]: ${this.message}`;\n        }\n    };\n}\nE('ERR_BUFFER_OUT_OF_BOUNDS', function (name) {\n    if (name) {\n        return `${name} is outside of buffer bounds`;\n    }\n    return 'Attempt to access memory outside buffer bounds';\n}, RangeError);\nE('ERR_INVALID_ARG_TYPE', function (name, actual) {\n    return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`;\n}, TypeError);\nE('ERR_OUT_OF_RANGE', function (str, range, input) {\n    let msg = `The value of \"${str}\" is out of range.`;\n    let received = input;\n    if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n        received = addNumericalSeparator(String(input));\n    }\n    else if (typeof input === 'bigint') {\n        received = String(input);\n        if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n            received = addNumericalSeparator(received);\n        }\n        received += 'n';\n    }\n    msg += ` It must be ${range}. Received ${received}`;\n    return msg;\n}, RangeError);\nfunction addNumericalSeparator(val) {\n    let res = '';\n    let i = val.length;\n    const start = val[0] === '-' ? 1 : 0;\n    for (; i >= start + 4; i -= 3) {\n        res = `_${val.slice(i - 3, i)}${res}`;\n    }\n    return `${val.slice(0, i)}${res}`;\n}\n// CHECK FUNCTIONS\n// ===============\nfunction checkBounds(buf, offset, byteLength) {\n    validateNumber(offset, 'offset');\n    if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n        boundsError(offset, buf.length - (byteLength + 1));\n    }\n}\nfunction checkIntBI(value, min, max, buf, offset, byteLength) {\n    if (value > max || value < min) {\n        const n = typeof min === 'bigint' ? 'n' : '';\n        let range;\n        if (byteLength > 3) {\n            if (min === 0 || min === BigInt(0)) {\n                range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`;\n            }\n            else {\n                range =\n                    `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n                        `${(byteLength + 1) * 8 - 1}${n}`;\n            }\n        }\n        else {\n            range = `>= ${min}${n} and <= ${max}${n}`;\n        }\n        throw new errors.ERR_OUT_OF_RANGE('value', range, value);\n    }\n    checkBounds(buf, offset, byteLength);\n}\nfunction validateNumber(value, name) {\n    if (typeof value !== 'number') {\n        throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value);\n    }\n}\nfunction boundsError(value, length, type) {\n    if (Math.floor(value) !== value) {\n        validateNumber(value, type);\n        throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value);\n    }\n    if (length < 0) {\n        throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();\n    }\n    throw new errors.ERR_OUT_OF_RANGE(type || 'offset', `>= ${type ? 1 : 0} and <= ${length}`, value);\n}\n// HELPER FUNCTIONS\n// ================\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\nfunction base64clean(str) {\n    // Node takes equal signs as end of the Base64 encoding\n    str = str.split('=')[0];\n    // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n    str = str.trim().replace(INVALID_BASE64_RE, '');\n    // Node converts strings with length < 2 to ''\n    if (str.length < 2)\n        return '';\n    // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n    while (str.length % 4 !== 0) {\n        str = str + '=';\n    }\n    return str;\n}\nfunction utf8ToBytes(string, units) {\n    units = units || Infinity;\n    let codePoint;\n    const length = string.length;\n    let leadSurrogate = null;\n    const bytes = [];\n    for (let i = 0; i < length; ++i) {\n        codePoint = string.charCodeAt(i);\n        // is surrogate component\n        if (codePoint > 0xd7ff && codePoint < 0xe000) {\n            // last char was a lead\n            if (!leadSurrogate) {\n                // no lead yet\n                if (codePoint > 0xdbff) {\n                    // unexpected trail\n                    if ((units -= 3) > -1)\n                        bytes.push(0xef, 0xbf, 0xbd);\n                    continue;\n                }\n                else if (i + 1 === length) {\n                    // unpaired lead\n                    if ((units -= 3) > -1)\n                        bytes.push(0xef, 0xbf, 0xbd);\n                    continue;\n                }\n                // valid lead\n                leadSurrogate = codePoint;\n                continue;\n            }\n            // 2 leads in a row\n            if (codePoint < 0xdc00) {\n                if ((units -= 3) > -1)\n                    bytes.push(0xef, 0xbf, 0xbd);\n                leadSurrogate = codePoint;\n                continue;\n            }\n            // valid surrogate pair\n            codePoint = (((leadSurrogate - 0xd800) << 10) | (codePoint - 0xdc00)) + 0x10000;\n        }\n        else if (leadSurrogate) {\n            // valid bmp char, but last char was a lead\n            if ((units -= 3) > -1)\n                bytes.push(0xef, 0xbf, 0xbd);\n        }\n        leadSurrogate = null;\n        // encode utf8\n        if (codePoint < 0x80) {\n            if ((units -= 1) < 0)\n                break;\n            bytes.push(codePoint);\n        }\n        else if (codePoint < 0x800) {\n            if ((units -= 2) < 0)\n                break;\n            bytes.push((codePoint >> 0x6) | 0xc0, (codePoint & 0x3f) | 0x80);\n        }\n        else if (codePoint < 0x10000) {\n            if ((units -= 3) < 0)\n                break;\n            bytes.push((codePoint >> 0xc) | 0xe0, ((codePoint >> 0x6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);\n        }\n        else if (codePoint < 0x110000) {\n            if ((units -= 4) < 0)\n                break;\n            bytes.push((codePoint >> 0x12) | 0xf0, ((codePoint >> 0xc) & 0x3f) | 0x80, ((codePoint >> 0x6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);\n        }\n        else {\n            throw new Error('Invalid code point');\n        }\n    }\n    return bytes;\n}\nfunction asciiToBytes(str) {\n    const byteArray = [];\n    for (let i = 0; i < str.length; ++i) {\n        // Node's code seems to be doing this and not & 0x7F..\n        byteArray.push(str.charCodeAt(i) & 0xff);\n    }\n    return byteArray;\n}\nfunction utf16leToBytes(str, units) {\n    let c, hi, lo;\n    const byteArray = [];\n    for (let i = 0; i < str.length; ++i) {\n        if ((units -= 2) < 0)\n            break;\n        c = str.charCodeAt(i);\n        hi = c >> 8;\n        lo = c % 256;\n        byteArray.push(lo);\n        byteArray.push(hi);\n    }\n    return byteArray;\n}\nfunction base64ToBytes(str) {\n    return base64.toByteArray(base64clean(str));\n}\nfunction blitBuffer(src, dst, offset, length) {\n    let i;\n    for (i = 0; i < length; ++i) {\n        if (i + offset >= dst.length || i >= src.length)\n            break;\n        dst[i + offset] = src[i];\n    }\n    return i;\n}\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance(obj, type) {\n    return (obj instanceof type ||\n        (obj != null &&\n            obj.constructor != null &&\n            obj.constructor.name != null &&\n            obj.constructor.name === type.name));\n}\nfunction numberIsNaN(obj) {\n    // For IE11 support\n    return obj !== obj; // eslint-disable-line no-self-compare\n}\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n    const alphabet = '0123456789abcdef';\n    const table = new Array(256);\n    for (let i = 0; i < 16; ++i) {\n        const i16 = i * 16;\n        for (let j = 0; j < 16; ++j) {\n            table[i16 + j] = alphabet[i] + alphabet[j];\n        }\n    }\n    return table;\n})();\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod(fn) {\n    return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn;\n}\nfunction BufferBigIntNotDefined() {\n    throw new Error('BigInt not supported');\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.nextTick = void 0;\n/* eslint-disable @typescript-eslint/ban-types */\nfunction nextTick(callback, ...args) {\n    queueMicrotask(() => callback(...args));\n}\nexports.nextTick = nextTick;\n","\"use strict\";\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\nexports.inherits = function inherits(ctor, superCtor) {\n    if (superCtor) {\n        ctor.super_ = superCtor;\n        ctor.prototype = Object.create(superCtor.prototype, {\n            constructor: {\n                value: ctor,\n                enumerable: false,\n                writable: true,\n                configurable: true\n            }\n        });\n    }\n};\n","'use strict';\nvar Buffer = require('../../../../buffer').Buffer;\nfunction copyBuffer(src, target, offset) {\n    src.copy(target, offset);\n}\nexports.BufferList = class BufferList {\n    constructor() {\n        this.head = null;\n        this.tail = null;\n        this.length = 0;\n    }\n    push(v) {\n        var entry = { data: v, next: null };\n        if (this.length > 0)\n            this.tail.next = entry;\n        else\n            this.head = entry;\n        this.tail = entry;\n        ++this.length;\n    }\n    unshift(v) {\n        var entry = { data: v, next: this.head };\n        if (this.length === 0)\n            this.tail = entry;\n        this.head = entry;\n        ++this.length;\n    }\n    shift() {\n        if (this.length === 0)\n            return;\n        var ret = this.head.data;\n        if (this.length === 1)\n            this.head = this.tail = null;\n        else\n            this.head = this.head.next;\n        --this.length;\n        return ret;\n    }\n    clear() {\n        this.head = this.tail = null;\n        this.length = 0;\n    }\n    join(s) {\n        if (this.length === 0)\n            return '';\n        var p = this.head;\n        var ret = '' + p.data;\n        while ((p = p.next)) {\n            ret += s + p.data;\n        }\n        return ret;\n    }\n    concat(n) {\n        if (this.length === 0)\n            return Buffer.alloc(0);\n        if (this.length === 1)\n            return this.head.data;\n        var ret = Buffer.allocUnsafe(n >>> 0);\n        var p = this.head;\n        var i = 0;\n        while (p) {\n            copyBuffer(p.data, ret, i);\n            i += p.data.length;\n            p = p.next;\n        }\n        return ret;\n    }\n};\n","'use strict';\n/*<replacement>*/\nvar pna = require('../../../../process');\n/*</replacement>*/\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n    var _this = this;\n    var readableDestroyed = this._readableState && this._readableState.destroyed;\n    var writableDestroyed = this._writableState && this._writableState.destroyed;\n    if (readableDestroyed || writableDestroyed) {\n        if (cb) {\n            cb(err);\n        }\n        else if (err && (!this._writableState || !this._writableState.errorEmitted)) {\n            pna.nextTick(emitErrorNT, this, err);\n        }\n        return this;\n    }\n    // we set destroyed to true before firing error callbacks in order\n    // to make it re-entrance safe in case destroy() is called within callbacks\n    if (this._readableState) {\n        this._readableState.destroyed = true;\n    }\n    // if this is a duplex stream mark the writable part as destroyed as well\n    if (this._writableState) {\n        this._writableState.destroyed = true;\n    }\n    this._destroy(err || null, function (err) {\n        if (!cb && err) {\n            pna.nextTick(emitErrorNT, _this, err);\n            if (_this._writableState) {\n                _this._writableState.errorEmitted = true;\n            }\n        }\n        else if (cb) {\n            cb(err);\n        }\n    });\n    return this;\n}\nfunction undestroy() {\n    if (this._readableState) {\n        this._readableState.destroyed = false;\n        this._readableState.reading = false;\n        this._readableState.ended = false;\n        this._readableState.endEmitted = false;\n    }\n    if (this._writableState) {\n        this._writableState.destroyed = false;\n        this._writableState.ended = false;\n        this._writableState.ending = false;\n        this._writableState.finished = false;\n        this._writableState.errorEmitted = false;\n    }\n}\nfunction emitErrorNT(self, err) {\n    self.emit('error', err);\n}\nmodule.exports = {\n    destroy: destroy,\n    undestroy: undestroy\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n'use strict';\n/*<replacement>*/\nvar pna = require('../../process');\n/*</replacement>*/\nmodule.exports = Writable;\n/* <replacement> */\nfunction WriteReq(chunk, encoding, cb) {\n    this.chunk = chunk;\n    this.encoding = encoding;\n    this.callback = cb;\n    this.next = null;\n}\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n    var _this = this;\n    this.next = null;\n    this.entry = null;\n    this.finish = function () {\n        onCorkedFinish(_this, state);\n    };\n}\n/* </replacement> */\n/*<replacement>*/\nvar asyncWrite = pna.nextTick;\n/*</replacement>*/\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\nWritable.WritableState = WritableState;\n/*<replacement>*/\nvar util = Object.create(require('../util'));\n/*</replacement>*/\n/*<replacement>*/\nvar Stream = require('events').EventEmitter;\n/*</replacement>*/\n/*<replacement>*/\nvar Buffer = require('../../buffer').Buffer;\nvar OurUint8Array = global.Uint8Array || function () { };\nfunction _uint8ArrayToBuffer(chunk) {\n    return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n    return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n/*</replacement>*/\nvar destroyImpl = require('./internal/streams/destroy');\nutil.inherits(Writable, Stream);\nfunction nop() { }\nfunction WritableState(options, stream) {\n    Duplex = Duplex || require('./_stream_duplex');\n    options = options || {};\n    // Duplex streams are both readable and writable, but share\n    // the same options object.\n    // However, some cases require setting options to different\n    // values for the readable and the writable sides of the duplex stream.\n    // These options can be provided separately as readableXXX and writableXXX.\n    var isDuplex = stream instanceof Duplex;\n    // object stream flag to indicate whether or not this stream\n    // contains buffers or objects.\n    this.objectMode = !!options.objectMode;\n    if (isDuplex)\n        this.objectMode = this.objectMode || !!options.writableObjectMode;\n    // the point at which write() starts returning false\n    // Note: 0 is a valid value, means that we always return false if\n    // the entire buffer is not flushed immediately on write()\n    var hwm = options.highWaterMark;\n    var writableHwm = options.writableHighWaterMark;\n    var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n    if (hwm || hwm === 0)\n        this.highWaterMark = hwm;\n    else if (isDuplex && (writableHwm || writableHwm === 0))\n        this.highWaterMark = writableHwm;\n    else\n        this.highWaterMark = defaultHwm;\n    // cast to ints.\n    this.highWaterMark = Math.floor(this.highWaterMark);\n    // if _final has been called\n    this.finalCalled = false;\n    // drain event flag.\n    this.needDrain = false;\n    // at the start of calling end()\n    this.ending = false;\n    // when end() has been called, and returned\n    this.ended = false;\n    // when 'finish' is emitted\n    this.finished = false;\n    // has it been destroyed\n    this.destroyed = false;\n    // should we decode strings into buffers before passing to _write?\n    // this is here so that some node-core streams can optimize string\n    // handling at a lower level.\n    var noDecode = options.decodeStrings === false;\n    this.decodeStrings = !noDecode;\n    // Crypto is kind of old and crusty.  Historically, its default string\n    // encoding is 'binary' so we have to make this configurable.\n    // Everything else in the universe uses 'utf8', though.\n    this.defaultEncoding = options.defaultEncoding || 'utf8';\n    // not an actual buffer we keep track of, but a measurement\n    // of how much we're waiting to get pushed to some underlying\n    // socket or file.\n    this.length = 0;\n    // a flag to see when we're in the middle of a write.\n    this.writing = false;\n    // when true all writes will be buffered until .uncork() call\n    this.corked = 0;\n    // a flag to be able to tell if the onwrite cb is called immediately,\n    // or on a later tick.  We set this to true at first, because any\n    // actions that shouldn't happen until \"later\" should generally also\n    // not happen before the first write call.\n    this.sync = true;\n    // a flag to know if we're processing previously buffered items, which\n    // may call the _write() callback in the same tick, so that we don't\n    // end up in an overlapped onwrite situation.\n    this.bufferProcessing = false;\n    // the callback that's passed to _write(chunk,cb)\n    this.onwrite = function (er) {\n        onwrite(stream, er);\n    };\n    // the callback that the user supplies to write(chunk,encoding,cb)\n    this.writecb = null;\n    // the amount that is being written when _write is called.\n    this.writelen = 0;\n    this.bufferedRequest = null;\n    this.lastBufferedRequest = null;\n    // number of pending user-supplied write callbacks\n    // this must be 0 before 'finish' can be emitted\n    this.pendingcb = 0;\n    // emit prefinish if the only thing we're waiting for is _write cbs\n    // This is relevant for synchronous Transform streams\n    this.prefinished = false;\n    // True if the error was already emitted and should not be thrown again\n    this.errorEmitted = false;\n    // count buffered requests\n    this.bufferedRequestCount = 0;\n    // allocate the first CorkedRequest, there is always\n    // one allocated and free to use, and we maintain at most two\n    this.corkedRequestsFree = new CorkedRequest(this);\n}\nWritableState.prototype.getBuffer = function getBuffer() {\n    var current = this.bufferedRequest;\n    var out = [];\n    while (current) {\n        out.push(current);\n        current = current.next;\n    }\n    return out;\n};\n(function () {\n    try {\n        Object.defineProperty(WritableState.prototype, 'buffer', {\n            get: function () {\n                return this.getBuffer();\n            }\n        });\n    }\n    catch (_) { }\n})();\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' &&\n    Symbol.hasInstance &&\n    typeof Function.prototype[Symbol.hasInstance] === 'function') {\n    realHasInstance = Function.prototype[Symbol.hasInstance];\n    Object.defineProperty(Writable, Symbol.hasInstance, {\n        value: function (object) {\n            if (realHasInstance.call(this, object))\n                return true;\n            if (this !== Writable)\n                return false;\n            return object && object._writableState instanceof WritableState;\n        }\n    });\n}\nelse {\n    realHasInstance = function (object) {\n        return object instanceof this;\n    };\n}\nfunction Writable(options) {\n    Duplex = Duplex || require('./_stream_duplex');\n    // Writable ctor is applied to Duplexes, too.\n    // `realHasInstance` is necessary because using plain `instanceof`\n    // would return false, as no `_writableState` property is attached.\n    // Trying to use the custom `instanceof` for Writable here will also break the\n    // Node.js LazyTransform implementation, which has a non-trivial getter for\n    // `_writableState` that would lead to infinite recursion.\n    if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {\n        return new Writable(options);\n    }\n    this._writableState = new WritableState(options, this);\n    // legacy.\n    this.writable = true;\n    if (options) {\n        if (typeof options.write === 'function')\n            this._write = options.write;\n        if (typeof options.writev === 'function')\n            this._writev = options.writev;\n        if (typeof options.destroy === 'function')\n            this._destroy = options.destroy;\n        if (typeof options.final === 'function')\n            this._final = options.final;\n    }\n    Stream.call(this);\n}\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n    this.emit('error', new Error('Cannot pipe, not readable'));\n};\nfunction writeAfterEnd(stream, cb) {\n    var er = new Error('write after end');\n    // TODO: defer error events consistently everywhere, not just the cb\n    stream.emit('error', er);\n    pna.nextTick(cb, er);\n}\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n    var valid = true;\n    var er = false;\n    if (chunk === null) {\n        er = new TypeError('May not write null values to stream');\n    }\n    else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n        er = new TypeError('Invalid non-string/buffer chunk');\n    }\n    if (er) {\n        stream.emit('error', er);\n        pna.nextTick(cb, er);\n        valid = false;\n    }\n    return valid;\n}\nWritable.prototype.write = function (chunk, encoding, cb) {\n    var state = this._writableState;\n    var ret = false;\n    var isBuf = !state.objectMode && _isUint8Array(chunk);\n    if (isBuf && !Buffer.isBuffer(chunk)) {\n        chunk = _uint8ArrayToBuffer(chunk);\n    }\n    if (typeof encoding === 'function') {\n        cb = encoding;\n        encoding = null;\n    }\n    if (isBuf)\n        encoding = 'buffer';\n    else if (!encoding)\n        encoding = state.defaultEncoding;\n    if (typeof cb !== 'function')\n        cb = nop;\n    if (state.ended)\n        writeAfterEnd(this, cb);\n    else if (isBuf || validChunk(this, state, chunk, cb)) {\n        state.pendingcb++;\n        ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n    }\n    return ret;\n};\nWritable.prototype.cork = function () {\n    var state = this._writableState;\n    state.corked++;\n};\nWritable.prototype.uncork = function () {\n    var state = this._writableState;\n    if (state.corked) {\n        state.corked--;\n        if (!state.writing &&\n            !state.corked &&\n            !state.finished &&\n            !state.bufferProcessing &&\n            state.bufferedRequest)\n            clearBuffer(this, state);\n    }\n};\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n    // node::ParseEncoding() requires lower case.\n    if (typeof encoding === 'string')\n        encoding = encoding.toLowerCase();\n    if (!([\n        'hex',\n        'utf8',\n        'utf-8',\n        'ascii',\n        'binary',\n        'base64',\n        'ucs2',\n        'ucs-2',\n        'utf16le',\n        'utf-16le',\n        'raw'\n    ].indexOf((encoding + '').toLowerCase()) > -1))\n        throw new TypeError('Unknown encoding: ' + encoding);\n    this._writableState.defaultEncoding = encoding;\n    return this;\n};\nfunction decodeChunk(state, chunk, encoding) {\n    if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n        chunk = Buffer.from(chunk, encoding);\n    }\n    return chunk;\n}\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n    // making it explicit this property is not enumerable\n    // because otherwise some prototype manipulation in\n    // userland will fail\n    enumerable: false,\n    get: function () {\n        return this._writableState.highWaterMark;\n    }\n});\n// if we're already writing something, then just put this\n// in the queue, and wait our turn.  Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n    if (!isBuf) {\n        var newChunk = decodeChunk(state, chunk, encoding);\n        if (chunk !== newChunk) {\n            isBuf = true;\n            encoding = 'buffer';\n            chunk = newChunk;\n        }\n    }\n    var len = state.objectMode ? 1 : chunk.length;\n    state.length += len;\n    var ret = state.length < state.highWaterMark;\n    // we must ensure that previous needDrain will not be reset to false.\n    if (!ret)\n        state.needDrain = true;\n    if (state.writing || state.corked) {\n        var last = state.lastBufferedRequest;\n        state.lastBufferedRequest = {\n            chunk: chunk,\n            encoding: encoding,\n            isBuf: isBuf,\n            callback: cb,\n            next: null\n        };\n        if (last) {\n            last.next = state.lastBufferedRequest;\n        }\n        else {\n            state.bufferedRequest = state.lastBufferedRequest;\n        }\n        state.bufferedRequestCount += 1;\n    }\n    else {\n        doWrite(stream, state, false, len, chunk, encoding, cb);\n    }\n    return ret;\n}\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n    state.writelen = len;\n    state.writecb = cb;\n    state.writing = true;\n    state.sync = true;\n    if (writev)\n        stream._writev(chunk, state.onwrite);\n    else\n        stream._write(chunk, encoding, state.onwrite);\n    state.sync = false;\n}\nfunction onwriteError(stream, state, sync, er, cb) {\n    --state.pendingcb;\n    if (sync) {\n        // defer the callback if we are being called synchronously\n        // to avoid piling up things on the stack\n        pna.nextTick(cb, er);\n        // this can emit finish, and it will always happen\n        // after error\n        pna.nextTick(finishMaybe, stream, state);\n        stream._writableState.errorEmitted = true;\n        stream.emit('error', er);\n    }\n    else {\n        // the caller expect this to happen before if\n        // it is async\n        cb(er);\n        stream._writableState.errorEmitted = true;\n        stream.emit('error', er);\n        // this can emit finish, but finish must\n        // always follow error\n        finishMaybe(stream, state);\n    }\n}\nfunction onwriteStateUpdate(state) {\n    state.writing = false;\n    state.writecb = null;\n    state.length -= state.writelen;\n    state.writelen = 0;\n}\nfunction onwrite(stream, er) {\n    var state = stream._writableState;\n    var sync = state.sync;\n    var cb = state.writecb;\n    onwriteStateUpdate(state);\n    if (er)\n        onwriteError(stream, state, sync, er, cb);\n    else {\n        // Check if we're actually ready to finish, but don't emit yet\n        var finished = needFinish(state);\n        if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n            clearBuffer(stream, state);\n        }\n        if (sync) {\n            /*<replacement>*/\n            asyncWrite(afterWrite, stream, state, finished, cb);\n            /*</replacement>*/\n        }\n        else {\n            afterWrite(stream, state, finished, cb);\n        }\n    }\n}\nfunction afterWrite(stream, state, finished, cb) {\n    if (!finished)\n        onwriteDrain(stream, state);\n    state.pendingcb--;\n    cb();\n    finishMaybe(stream, state);\n}\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n    if (state.length === 0 && state.needDrain) {\n        state.needDrain = false;\n        stream.emit('drain');\n    }\n}\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n    state.bufferProcessing = true;\n    var entry = state.bufferedRequest;\n    if (stream._writev && entry && entry.next) {\n        // Fast case, write everything using _writev()\n        var l = state.bufferedRequestCount;\n        var buffer = new Array(l);\n        var holder = state.corkedRequestsFree;\n        holder.entry = entry;\n        var count = 0;\n        var allBuffers = true;\n        while (entry) {\n            buffer[count] = entry;\n            if (!entry.isBuf)\n                allBuffers = false;\n            entry = entry.next;\n            count += 1;\n        }\n        buffer.allBuffers = allBuffers;\n        doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n        // doWrite is almost always async, defer these to save a bit of time\n        // as the hot path ends with doWrite\n        state.pendingcb++;\n        state.lastBufferedRequest = null;\n        if (holder.next) {\n            state.corkedRequestsFree = holder.next;\n            holder.next = null;\n        }\n        else {\n            state.corkedRequestsFree = new CorkedRequest(state);\n        }\n        state.bufferedRequestCount = 0;\n    }\n    else {\n        // Slow case, write chunks one-by-one\n        while (entry) {\n            var chunk = entry.chunk;\n            var encoding = entry.encoding;\n            var cb = entry.callback;\n            var len = state.objectMode ? 1 : chunk.length;\n            doWrite(stream, state, false, len, chunk, encoding, cb);\n            entry = entry.next;\n            state.bufferedRequestCount--;\n            // if we didn't call the onwrite immediately, then\n            // it means that we need to wait until it does.\n            // also, that means that the chunk and cb are currently\n            // being processed, so move the buffer counter past them.\n            if (state.writing) {\n                break;\n            }\n        }\n        if (entry === null)\n            state.lastBufferedRequest = null;\n    }\n    state.bufferedRequest = entry;\n    state.bufferProcessing = false;\n}\nWritable.prototype._write = function (chunk, encoding, cb) {\n    cb(new Error('_write() is not implemented'));\n};\nWritable.prototype._writev = null;\nWritable.prototype.end = function (chunk, encoding, cb) {\n    var state = this._writableState;\n    if (typeof chunk === 'function') {\n        cb = chunk;\n        chunk = null;\n        encoding = null;\n    }\n    else if (typeof encoding === 'function') {\n        cb = encoding;\n        encoding = null;\n    }\n    if (chunk !== null && chunk !== undefined)\n        this.write(chunk, encoding);\n    // .end() fully uncorks\n    if (state.corked) {\n        state.corked = 1;\n        this.uncork();\n    }\n    // ignore unnecessary end() calls.\n    if (!state.ending && !state.finished)\n        endWritable(this, state, cb);\n};\nfunction needFinish(state) {\n    return (state.ending &&\n        state.length === 0 &&\n        state.bufferedRequest === null &&\n        !state.finished &&\n        !state.writing);\n}\nfunction callFinal(stream, state) {\n    stream._final(function (err) {\n        state.pendingcb--;\n        if (err) {\n            stream.emit('error', err);\n        }\n        state.prefinished = true;\n        stream.emit('prefinish');\n        finishMaybe(stream, state);\n    });\n}\nfunction prefinish(stream, state) {\n    if (!state.prefinished && !state.finalCalled) {\n        if (typeof stream._final === 'function') {\n            state.pendingcb++;\n            state.finalCalled = true;\n            pna.nextTick(callFinal, stream, state);\n        }\n        else {\n            state.prefinished = true;\n            stream.emit('prefinish');\n        }\n    }\n}\nfunction finishMaybe(stream, state) {\n    var need = needFinish(state);\n    if (need) {\n        prefinish(stream, state);\n        if (state.pendingcb === 0) {\n            state.finished = true;\n            stream.emit('finish');\n        }\n    }\n    return need;\n}\nfunction endWritable(stream, state, cb) {\n    state.ending = true;\n    finishMaybe(stream, state);\n    if (cb) {\n        if (state.finished)\n            pna.nextTick(cb);\n        else\n            stream.once('finish', cb);\n    }\n    state.ended = true;\n    stream.writable = false;\n}\nfunction onCorkedFinish(corkReq, state, err) {\n    var entry = corkReq.entry;\n    corkReq.entry = null;\n    while (entry) {\n        var cb = entry.callback;\n        state.pendingcb--;\n        cb(err);\n        entry = entry.next;\n    }\n    if (state.corkedRequestsFree) {\n        state.corkedRequestsFree.next = corkReq;\n    }\n    else {\n        state.corkedRequestsFree = corkReq;\n    }\n}\nObject.defineProperty(Writable.prototype, 'destroyed', {\n    get: function () {\n        if (this._writableState === undefined) {\n            return false;\n        }\n        return this._writableState.destroyed;\n    },\n    set: function (value) {\n        // we ignore the value if the stream\n        // has not been initialized yet\n        if (!this._writableState) {\n            return;\n        }\n        // backward compatibility, the user is explicitly\n        // managing destroyed\n        this._writableState.destroyed = value;\n    }\n});\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n    this.end();\n    cb(err);\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n'use strict';\n/*<replacement>*/\nvar pna = require('../../process');\n/*</replacement>*/\n/*<replacement>*/\nvar objectKeys = Object.keys ||\n    function (obj) {\n        var keys = [];\n        for (var key in obj) {\n            keys.push(key);\n        }\n        return keys;\n    };\n/*</replacement>*/\nmodule.exports = Duplex;\n/*<replacement>*/\nvar util = Object.create(require('../util'));\n/*</replacement>*/\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\nutil.inherits(Duplex, Readable);\n{\n    // avoid scope creep, the keys array can then be collected\n    var keys = objectKeys(Writable.prototype);\n    for (var v = 0; v < keys.length; v++) {\n        var method = keys[v];\n        if (!Duplex.prototype[method])\n            Duplex.prototype[method] = Writable.prototype[method];\n    }\n}\nfunction Duplex(options) {\n    if (!(this instanceof Duplex))\n        return new Duplex(options);\n    Readable.call(this, options);\n    Writable.call(this, options);\n    if (options && options.readable === false)\n        this.readable = false;\n    if (options && options.writable === false)\n        this.writable = false;\n    this.allowHalfOpen = true;\n    if (options && options.allowHalfOpen === false)\n        this.allowHalfOpen = false;\n    this.once('end', onend);\n}\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n    // making it explicit this property is not enumerable\n    // because otherwise some prototype manipulation in\n    // userland will fail\n    enumerable: false,\n    get: function () {\n        return this._writableState.highWaterMark;\n    }\n});\n// the no-half-open enforcer\nfunction onend() {\n    // if we allow half-open state, or if the writable side ended,\n    // then we're ok.\n    if (this.allowHalfOpen || this._writableState.ended)\n        return;\n    // no more data can be written.\n    // But allow more writes to happen in this tick.\n    pna.nextTick(onEndNT, this);\n}\nfunction onEndNT(self) {\n    self.end();\n}\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n    get: function () {\n        if (this._readableState === undefined || this._writableState === undefined) {\n            return false;\n        }\n        return this._readableState.destroyed && this._writableState.destroyed;\n    },\n    set: function (value) {\n        // we ignore the value if the stream\n        // has not been initialized yet\n        if (this._readableState === undefined || this._writableState === undefined) {\n            return;\n        }\n        // backward compatibility, the user is explicitly\n        // managing destroyed\n        this._readableState.destroyed = value;\n        this._writableState.destroyed = value;\n    }\n});\nDuplex.prototype._destroy = function (err, cb) {\n    this.push(null);\n    this.end();\n    pna.nextTick(cb, err);\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n'use strict';\n/*<replacement>*/\nvar Buffer = require('../buffer').Buffer;\n/*</replacement>*/\nvar isEncoding = Buffer.isEncoding ||\n    function (encoding) {\n        encoding = '' + encoding;\n        switch (encoding && encoding.toLowerCase()) {\n            case 'hex':\n            case 'utf8':\n            case 'utf-8':\n            case 'ascii':\n            case 'binary':\n            case 'base64':\n            case 'ucs2':\n            case 'ucs-2':\n            case 'utf16le':\n            case 'utf-16le':\n            case 'raw':\n                return true;\n            default:\n                return false;\n        }\n    };\nfunction _normalizeEncoding(enc) {\n    if (!enc)\n        return 'utf8';\n    var retried;\n    while (true) {\n        switch (enc) {\n            case 'utf8':\n            case 'utf-8':\n                return 'utf8';\n            case 'ucs2':\n            case 'ucs-2':\n            case 'utf16le':\n            case 'utf-16le':\n                return 'utf16le';\n            case 'latin1':\n            case 'binary':\n                return 'latin1';\n            case 'base64':\n            case 'ascii':\n            case 'hex':\n                return enc;\n            default:\n                if (retried)\n                    return; // undefined\n                enc = ('' + enc).toLowerCase();\n                retried = true;\n        }\n    }\n}\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n    var nenc = _normalizeEncoding(enc);\n    if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc)))\n        throw new Error('Unknown encoding: ' + enc);\n    return nenc || enc;\n}\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n    this.encoding = normalizeEncoding(encoding);\n    var nb;\n    switch (this.encoding) {\n        case 'utf16le':\n            this.text = utf16Text;\n            this.end = utf16End;\n            nb = 4;\n            break;\n        case 'utf8':\n            this.fillLast = utf8FillLast;\n            nb = 4;\n            break;\n        case 'base64':\n            this.text = base64Text;\n            this.end = base64End;\n            nb = 3;\n            break;\n        default:\n            this.write = simpleWrite;\n            this.end = simpleEnd;\n            return;\n    }\n    this.lastNeed = 0;\n    this.lastTotal = 0;\n    this.lastChar = Buffer.allocUnsafe(nb);\n}\nStringDecoder.prototype.write = function (buf) {\n    if (buf.length === 0)\n        return '';\n    var r;\n    var i;\n    if (this.lastNeed) {\n        r = this.fillLast(buf);\n        if (r === undefined)\n            return '';\n        i = this.lastNeed;\n        this.lastNeed = 0;\n    }\n    else {\n        i = 0;\n    }\n    if (i < buf.length)\n        return r ? r + this.text(buf, i) : this.text(buf, i);\n    return r || '';\n};\nStringDecoder.prototype.end = utf8End;\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n    if (this.lastNeed <= buf.length) {\n        buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n        return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n    }\n    buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n    this.lastNeed -= buf.length;\n};\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n    if (byte <= 0x7f)\n        return 0;\n    else if (byte >> 5 === 0x06)\n        return 2;\n    else if (byte >> 4 === 0x0e)\n        return 3;\n    else if (byte >> 3 === 0x1e)\n        return 4;\n    return byte >> 6 === 0x02 ? -1 : -2;\n}\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n    var j = buf.length - 1;\n    if (j < i)\n        return 0;\n    var nb = utf8CheckByte(buf[j]);\n    if (nb >= 0) {\n        if (nb > 0)\n            self.lastNeed = nb - 1;\n        return nb;\n    }\n    if (--j < i || nb === -2)\n        return 0;\n    nb = utf8CheckByte(buf[j]);\n    if (nb >= 0) {\n        if (nb > 0)\n            self.lastNeed = nb - 2;\n        return nb;\n    }\n    if (--j < i || nb === -2)\n        return 0;\n    nb = utf8CheckByte(buf[j]);\n    if (nb >= 0) {\n        if (nb > 0) {\n            if (nb === 2)\n                nb = 0;\n            else\n                self.lastNeed = nb - 3;\n        }\n        return nb;\n    }\n    return 0;\n}\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n    if ((buf[0] & 0xc0) !== 0x80) {\n        self.lastNeed = 0;\n        return '\\ufffd';\n    }\n    if (self.lastNeed > 1 && buf.length > 1) {\n        if ((buf[1] & 0xc0) !== 0x80) {\n            self.lastNeed = 1;\n            return '\\ufffd';\n        }\n        if (self.lastNeed > 2 && buf.length > 2) {\n            if ((buf[2] & 0xc0) !== 0x80) {\n                self.lastNeed = 2;\n                return '\\ufffd';\n            }\n        }\n    }\n}\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n    var p = this.lastTotal - this.lastNeed;\n    var r = utf8CheckExtraBytes(this, buf, p);\n    if (r !== undefined)\n        return r;\n    if (this.lastNeed <= buf.length) {\n        buf.copy(this.lastChar, p, 0, this.lastNeed);\n        return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n    }\n    buf.copy(this.lastChar, p, 0, buf.length);\n    this.lastNeed -= buf.length;\n}\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n    var total = utf8CheckIncomplete(this, buf, i);\n    if (!this.lastNeed)\n        return buf.toString('utf8', i);\n    this.lastTotal = total;\n    var end = buf.length - (total - this.lastNeed);\n    buf.copy(this.lastChar, 0, end);\n    return buf.toString('utf8', i, end);\n}\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n    var r = buf && buf.length ? this.write(buf) : '';\n    if (this.lastNeed)\n        return r + '\\ufffd';\n    return r;\n}\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n    if ((buf.length - i) % 2 === 0) {\n        var r = buf.toString('utf16le', i);\n        if (r) {\n            var c = r.charCodeAt(r.length - 1);\n            if (c >= 0xd800 && c <= 0xdbff) {\n                this.lastNeed = 2;\n                this.lastTotal = 4;\n                this.lastChar[0] = buf[buf.length - 2];\n                this.lastChar[1] = buf[buf.length - 1];\n                return r.slice(0, -1);\n            }\n        }\n        return r;\n    }\n    this.lastNeed = 1;\n    this.lastTotal = 2;\n    this.lastChar[0] = buf[buf.length - 1];\n    return buf.toString('utf16le', i, buf.length - 1);\n}\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n    var r = buf && buf.length ? this.write(buf) : '';\n    if (this.lastNeed) {\n        var end = this.lastTotal - this.lastNeed;\n        return r + this.lastChar.toString('utf16le', 0, end);\n    }\n    return r;\n}\nfunction base64Text(buf, i) {\n    var n = (buf.length - i) % 3;\n    if (n === 0)\n        return buf.toString('base64', i);\n    this.lastNeed = 3 - n;\n    this.lastTotal = 3;\n    if (n === 1) {\n        this.lastChar[0] = buf[buf.length - 1];\n    }\n    else {\n        this.lastChar[0] = buf[buf.length - 2];\n        this.lastChar[1] = buf[buf.length - 1];\n    }\n    return buf.toString('base64', i, buf.length - n);\n}\nfunction base64End(buf) {\n    var r = buf && buf.length ? this.write(buf) : '';\n    if (this.lastNeed)\n        return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n    return r;\n}\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n    return buf.toString(this.encoding);\n}\nfunction simpleEnd(buf) {\n    return buf && buf.length ? this.write(buf) : '';\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n'use strict';\n/*<replacement>*/\nvar pna = require('../../process');\n/*</replacement>*/\nmodule.exports = Readable;\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\nReadable.ReadableState = ReadableState;\n/*<replacement>*/\nvar EE = require('events').EventEmitter;\nvar EElistenerCount = function (emitter, type) {\n    return emitter.listeners(type).length;\n};\n/*</replacement>*/\n/*<replacement>*/\nvar Stream = require('events').EventEmitter;\n/*</replacement>*/\n/*<replacement>*/\nvar Buffer = require('../../buffer').Buffer;\nvar OurUint8Array = global.Uint8Array || function () { };\nfunction _uint8ArrayToBuffer(chunk) {\n    return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n    return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n/*</replacement>*/\n/*<replacement>*/\nvar util = Object.create(require('../util'));\n/*</replacement>*/\n/*<replacement>*/\nvar debug = function () { };\n/*</replacement>*/\nvar BufferList = require('./internal/streams/BufferList').BufferList;\nvar destroyImpl = require('./internal/streams/destroy');\nvar StringDecoder;\nutil.inherits(Readable, Stream);\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\nfunction prependListener(emitter, event, fn) {\n    // Sadly this is not cacheable as some libraries bundle their own\n    // event emitter implementation with them.\n    if (typeof emitter.prependListener === 'function')\n        return emitter.prependListener(event, fn);\n    // This is a hack to make sure that our error handler is attached before any\n    // userland ones.  NEVER DO THIS. This is here only because this code needs\n    // to continue to work with older versions of Node.js that do not include\n    // the prependListener() method. The goal is to eventually remove this hack.\n    if (!emitter._events || !emitter._events[event])\n        emitter.on(event, fn);\n    else if (Array.isArray(emitter._events[event]))\n        emitter._events[event].unshift(fn);\n    else\n        emitter._events[event] = [fn, emitter._events[event]];\n}\nfunction ReadableState(options, stream) {\n    Duplex = Duplex || require('./_stream_duplex');\n    options = options || {};\n    // Duplex streams are both readable and writable, but share\n    // the same options object.\n    // However, some cases require setting options to different\n    // values for the readable and the writable sides of the duplex stream.\n    // These options can be provided separately as readableXXX and writableXXX.\n    var isDuplex = stream instanceof Duplex;\n    // object stream flag. Used to make read(n) ignore n and to\n    // make all the buffer merging and length checks go away\n    this.objectMode = !!options.objectMode;\n    if (isDuplex)\n        this.objectMode = this.objectMode || !!options.readableObjectMode;\n    // the point at which it stops calling _read() to fill the buffer\n    // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n    var hwm = options.highWaterMark;\n    var readableHwm = options.readableHighWaterMark;\n    var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n    if (hwm || hwm === 0)\n        this.highWaterMark = hwm;\n    else if (isDuplex && (readableHwm || readableHwm === 0))\n        this.highWaterMark = readableHwm;\n    else\n        this.highWaterMark = defaultHwm;\n    // cast to ints.\n    this.highWaterMark = Math.floor(this.highWaterMark);\n    // A linked list is used to store data chunks instead of an array because the\n    // linked list can remove elements from the beginning faster than\n    // array.shift()\n    this.buffer = new BufferList();\n    this.length = 0;\n    this.pipes = null;\n    this.pipesCount = 0;\n    this.flowing = null;\n    this.ended = false;\n    this.endEmitted = false;\n    this.reading = false;\n    // a flag to be able to tell if the event 'readable'/'data' is emitted\n    // immediately, or on a later tick.  We set this to true at first, because\n    // any actions that shouldn't happen until \"later\" should generally also\n    // not happen before the first read call.\n    this.sync = true;\n    // whenever we return null, then we set a flag to say\n    // that we're awaiting a 'readable' event emission.\n    this.needReadable = false;\n    this.emittedReadable = false;\n    this.readableListening = false;\n    this.resumeScheduled = false;\n    // has it been destroyed\n    this.destroyed = false;\n    // Crypto is kind of old and crusty.  Historically, its default string\n    // encoding is 'binary' so we have to make this configurable.\n    // Everything else in the universe uses 'utf8', though.\n    this.defaultEncoding = options.defaultEncoding || 'utf8';\n    // the number of writers that are awaiting a drain event in .pipe()s\n    this.awaitDrain = 0;\n    // if true, a maybeReadMore has been scheduled\n    this.readingMore = false;\n    this.decoder = null;\n    this.encoding = null;\n    if (options.encoding) {\n        if (!StringDecoder)\n            StringDecoder = require('../string_decoder').StringDecoder;\n        this.decoder = new StringDecoder(options.encoding);\n        this.encoding = options.encoding;\n    }\n}\nfunction Readable(options) {\n    Duplex = Duplex || require('./_stream_duplex');\n    if (!(this instanceof Readable))\n        return new Readable(options);\n    this._readableState = new ReadableState(options, this);\n    // legacy\n    this.readable = true;\n    if (options) {\n        if (typeof options.read === 'function')\n            this._read = options.read;\n        if (typeof options.destroy === 'function')\n            this._destroy = options.destroy;\n    }\n    Stream.call(this);\n}\nObject.defineProperty(Readable.prototype, 'destroyed', {\n    get: function () {\n        if (this._readableState === undefined) {\n            return false;\n        }\n        return this._readableState.destroyed;\n    },\n    set: function (value) {\n        // we ignore the value if the stream\n        // has not been initialized yet\n        if (!this._readableState) {\n            return;\n        }\n        // backward compatibility, the user is explicitly\n        // managing destroyed\n        this._readableState.destroyed = value;\n    }\n});\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n    this.push(null);\n    cb(err);\n};\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n    var state = this._readableState;\n    var skipChunkCheck;\n    if (!state.objectMode) {\n        if (typeof chunk === 'string') {\n            encoding = encoding || state.defaultEncoding;\n            if (encoding !== state.encoding) {\n                chunk = Buffer.from(chunk, encoding);\n                encoding = '';\n            }\n            skipChunkCheck = true;\n        }\n    }\n    else {\n        skipChunkCheck = true;\n    }\n    return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n    return readableAddChunk(this, chunk, null, true, false);\n};\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n    var state = stream._readableState;\n    if (chunk === null) {\n        state.reading = false;\n        onEofChunk(stream, state);\n    }\n    else {\n        var er;\n        if (!skipChunkCheck)\n            er = chunkInvalid(state, chunk);\n        if (er) {\n            stream.emit('error', er);\n        }\n        else if (state.objectMode || (chunk && chunk.length > 0)) {\n            if (typeof chunk !== 'string' &&\n                !state.objectMode &&\n                Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n                chunk = _uint8ArrayToBuffer(chunk);\n            }\n            if (addToFront) {\n                if (state.endEmitted)\n                    stream.emit('error', new Error('stream.unshift() after end event'));\n                else\n                    addChunk(stream, state, chunk, true);\n            }\n            else if (state.ended) {\n                stream.emit('error', new Error('stream.push() after EOF'));\n            }\n            else {\n                state.reading = false;\n                if (state.decoder && !encoding) {\n                    chunk = state.decoder.write(chunk);\n                    if (state.objectMode || chunk.length !== 0)\n                        addChunk(stream, state, chunk, false);\n                    else\n                        maybeReadMore(stream, state);\n                }\n                else {\n                    addChunk(stream, state, chunk, false);\n                }\n            }\n        }\n        else if (!addToFront) {\n            state.reading = false;\n        }\n    }\n    return needMoreData(state);\n}\nfunction addChunk(stream, state, chunk, addToFront) {\n    if (state.flowing && state.length === 0 && !state.sync) {\n        stream.emit('data', chunk);\n        stream.read(0);\n    }\n    else {\n        // update the buffer info.\n        state.length += state.objectMode ? 1 : chunk.length;\n        if (addToFront)\n            state.buffer.unshift(chunk);\n        else\n            state.buffer.push(chunk);\n        if (state.needReadable)\n            emitReadable(stream);\n    }\n    maybeReadMore(stream, state);\n}\nfunction chunkInvalid(state, chunk) {\n    var er;\n    if (!_isUint8Array(chunk) &&\n        typeof chunk !== 'string' &&\n        chunk !== undefined &&\n        !state.objectMode) {\n        er = new TypeError('Invalid non-string/buffer chunk');\n    }\n    return er;\n}\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes.  This is to work around cases where hwm=0,\n// such as the repl.  Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n    return (!state.ended &&\n        (state.needReadable || state.length < state.highWaterMark || state.length === 0));\n}\nReadable.prototype.isPaused = function () {\n    return this._readableState.flowing === false;\n};\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n    if (!StringDecoder)\n        StringDecoder = require('../string_decoder').StringDecoder;\n    this._readableState.decoder = new StringDecoder(enc);\n    this._readableState.encoding = enc;\n    return this;\n};\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n    if (n >= MAX_HWM) {\n        n = MAX_HWM;\n    }\n    else {\n        // Get the next highest power of 2 to prevent increasing hwm excessively in\n        // tiny amounts\n        n--;\n        n |= n >>> 1;\n        n |= n >>> 2;\n        n |= n >>> 4;\n        n |= n >>> 8;\n        n |= n >>> 16;\n        n++;\n    }\n    return n;\n}\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n    if (n <= 0 || (state.length === 0 && state.ended))\n        return 0;\n    if (state.objectMode)\n        return 1;\n    if (n !== n) {\n        // Only flow one buffer at a time\n        if (state.flowing && state.length)\n            return state.buffer.head.data.length;\n        else\n            return state.length;\n    }\n    // If we're asking for more than the current hwm, then raise the hwm.\n    if (n > state.highWaterMark)\n        state.highWaterMark = computeNewHighWaterMark(n);\n    if (n <= state.length)\n        return n;\n    // Don't have enough\n    if (!state.ended) {\n        state.needReadable = true;\n        return 0;\n    }\n    return state.length;\n}\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n    debug('read', n);\n    n = parseInt(n, 10);\n    var state = this._readableState;\n    var nOrig = n;\n    if (n !== 0)\n        state.emittedReadable = false;\n    // if we're doing read(0) to trigger a readable event, but we\n    // already have a bunch of data in the buffer, then just trigger\n    // the 'readable' event and move on.\n    if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n        debug('read: emitReadable', state.length, state.ended);\n        if (state.length === 0 && state.ended)\n            endReadable(this);\n        else\n            emitReadable(this);\n        return null;\n    }\n    n = howMuchToRead(n, state);\n    // if we've ended, and we're now clear, then finish it up.\n    if (n === 0 && state.ended) {\n        if (state.length === 0)\n            endReadable(this);\n        return null;\n    }\n    // All the actual chunk generation logic needs to be\n    // *below* the call to _read.  The reason is that in certain\n    // synthetic stream cases, such as passthrough streams, _read\n    // may be a completely synchronous operation which may change\n    // the state of the read buffer, providing enough data when\n    // before there was *not* enough.\n    //\n    // So, the steps are:\n    // 1. Figure out what the state of things will be after we do\n    // a read from the buffer.\n    //\n    // 2. If that resulting state will trigger a _read, then call _read.\n    // Note that this may be asynchronous, or synchronous.  Yes, it is\n    // deeply ugly to write APIs this way, but that still doesn't mean\n    // that the Readable class should behave improperly, as streams are\n    // designed to be sync/async agnostic.\n    // Take note if the _read call is sync or async (ie, if the read call\n    // has returned yet), so that we know whether or not it's safe to emit\n    // 'readable' etc.\n    //\n    // 3. Actually pull the requested chunks out of the buffer and return.\n    // if we need a readable event, then we need to do some reading.\n    var doRead = state.needReadable;\n    debug('need readable', doRead);\n    // if we currently have less than the highWaterMark, then also read some\n    if (state.length === 0 || state.length - n < state.highWaterMark) {\n        doRead = true;\n        debug('length less than watermark', doRead);\n    }\n    // however, if we've ended, then there's no point, and if we're already\n    // reading, then it's unnecessary.\n    if (state.ended || state.reading) {\n        doRead = false;\n        debug('reading or ended', doRead);\n    }\n    else if (doRead) {\n        debug('do read');\n        state.reading = true;\n        state.sync = true;\n        // if the length is currently zero, then we *need* a readable event.\n        if (state.length === 0)\n            state.needReadable = true;\n        // call internal read method\n        this._read(state.highWaterMark);\n        state.sync = false;\n        // If _read pushed data synchronously, then `reading` will be false,\n        // and we need to re-evaluate how much data we can return to the user.\n        if (!state.reading)\n            n = howMuchToRead(nOrig, state);\n    }\n    var ret;\n    if (n > 0)\n        ret = fromList(n, state);\n    else\n        ret = null;\n    if (ret === null) {\n        state.needReadable = true;\n        n = 0;\n    }\n    else {\n        state.length -= n;\n    }\n    if (state.length === 0) {\n        // If we have nothing in the buffer, then we want to know\n        // as soon as we *do* get something into the buffer.\n        if (!state.ended)\n            state.needReadable = true;\n        // If we tried to read() past the EOF, then emit end on the next tick.\n        if (nOrig !== n && state.ended)\n            endReadable(this);\n    }\n    if (ret !== null)\n        this.emit('data', ret);\n    return ret;\n};\nfunction onEofChunk(stream, state) {\n    if (state.ended)\n        return;\n    if (state.decoder) {\n        var chunk = state.decoder.end();\n        if (chunk && chunk.length) {\n            state.buffer.push(chunk);\n            state.length += state.objectMode ? 1 : chunk.length;\n        }\n    }\n    state.ended = true;\n    // emit 'readable' now to make sure it gets picked up.\n    emitReadable(stream);\n}\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow.  This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n    var state = stream._readableState;\n    state.needReadable = false;\n    if (!state.emittedReadable) {\n        debug('emitReadable', state.flowing);\n        state.emittedReadable = true;\n        if (state.sync)\n            pna.nextTick(emitReadable_, stream);\n        else\n            emitReadable_(stream);\n    }\n}\nfunction emitReadable_(stream) {\n    debug('emit readable');\n    stream.emit('readable');\n    flow(stream);\n}\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data.  that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n    if (!state.readingMore) {\n        state.readingMore = true;\n        pna.nextTick(maybeReadMore_, stream, state);\n    }\n}\nfunction maybeReadMore_(stream, state) {\n    var len = state.length;\n    while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n        debug('maybeReadMore read 0');\n        stream.read(0);\n        if (len === state.length)\n            // didn't get any data, stop spinning.\n            break;\n        else\n            len = state.length;\n    }\n    state.readingMore = false;\n}\n// abstract method.  to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n    this.emit('error', new Error('_read() is not implemented'));\n};\nReadable.prototype.pipe = function (dest, pipeOpts) {\n    var src = this;\n    var state = this._readableState;\n    switch (state.pipesCount) {\n        case 0:\n            state.pipes = dest;\n            break;\n        case 1:\n            state.pipes = [state.pipes, dest];\n            break;\n        default:\n            state.pipes.push(dest);\n            break;\n    }\n    state.pipesCount += 1;\n    debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n    var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n    var endFn = doEnd ? onend : unpipe;\n    if (state.endEmitted)\n        pna.nextTick(endFn);\n    else\n        src.once('end', endFn);\n    dest.on('unpipe', onunpipe);\n    function onunpipe(readable, unpipeInfo) {\n        debug('onunpipe');\n        if (readable === src) {\n            if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n                unpipeInfo.hasUnpiped = true;\n                cleanup();\n            }\n        }\n    }\n    function onend() {\n        debug('onend');\n        dest.end();\n    }\n    // when the dest drains, it reduces the awaitDrain counter\n    // on the source.  This would be more elegant with a .once()\n    // handler in flow(), but adding and removing repeatedly is\n    // too slow.\n    var ondrain = pipeOnDrain(src);\n    dest.on('drain', ondrain);\n    var cleanedUp = false;\n    function cleanup() {\n        debug('cleanup');\n        // cleanup event handlers once the pipe is broken\n        dest.removeListener('close', onclose);\n        dest.removeListener('finish', onfinish);\n        dest.removeListener('drain', ondrain);\n        dest.removeListener('error', onerror);\n        dest.removeListener('unpipe', onunpipe);\n        src.removeListener('end', onend);\n        src.removeListener('end', unpipe);\n        src.removeListener('data', ondata);\n        cleanedUp = true;\n        // if the reader is waiting for a drain event from this\n        // specific writer, then it would cause it to never start\n        // flowing again.\n        // So, if this is awaiting a drain, then we just call it now.\n        // If we don't know, then assume that we are waiting for one.\n        if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain))\n            ondrain();\n    }\n    // If the user pushes more data while we're writing to dest then we'll end up\n    // in ondata again. However, we only want to increase awaitDrain once because\n    // dest will only emit one 'drain' event for the multiple writes.\n    // => Introduce a guard on increasing awaitDrain.\n    var increasedAwaitDrain = false;\n    src.on('data', ondata);\n    function ondata(chunk) {\n        debug('ondata');\n        increasedAwaitDrain = false;\n        var ret = dest.write(chunk);\n        if (false === ret && !increasedAwaitDrain) {\n            // If the user unpiped during `dest.write()`, it is possible\n            // to get stuck in a permanently paused state if that write\n            // also returned false.\n            // => Check whether `dest` is still a piping destination.\n            if (((state.pipesCount === 1 && state.pipes === dest) ||\n                (state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1)) &&\n                !cleanedUp) {\n                debug('false write response, pause', src._readableState.awaitDrain);\n                src._readableState.awaitDrain++;\n                increasedAwaitDrain = true;\n            }\n            src.pause();\n        }\n    }\n    // if the dest has an error, then stop piping into it.\n    // however, don't suppress the throwing behavior for this.\n    function onerror(er) {\n        debug('onerror', er);\n        unpipe();\n        dest.removeListener('error', onerror);\n        if (EElistenerCount(dest, 'error') === 0)\n            dest.emit('error', er);\n    }\n    // Make sure our error handler is attached before userland ones.\n    prependListener(dest, 'error', onerror);\n    // Both close and finish should trigger unpipe, but only once.\n    function onclose() {\n        dest.removeListener('finish', onfinish);\n        unpipe();\n    }\n    dest.once('close', onclose);\n    function onfinish() {\n        debug('onfinish');\n        dest.removeListener('close', onclose);\n        unpipe();\n    }\n    dest.once('finish', onfinish);\n    function unpipe() {\n        debug('unpipe');\n        src.unpipe(dest);\n    }\n    // tell the dest that it's being piped to\n    dest.emit('pipe', src);\n    // start the flow if it hasn't been started already.\n    if (!state.flowing) {\n        debug('pipe resume');\n        src.resume();\n    }\n    return dest;\n};\nfunction pipeOnDrain(src) {\n    return function () {\n        var state = src._readableState;\n        debug('pipeOnDrain', state.awaitDrain);\n        if (state.awaitDrain)\n            state.awaitDrain--;\n        if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n            state.flowing = true;\n            flow(src);\n        }\n    };\n}\nReadable.prototype.unpipe = function (dest) {\n    var state = this._readableState;\n    var unpipeInfo = { hasUnpiped: false };\n    // if we're not piping anywhere, then do nothing.\n    if (state.pipesCount === 0)\n        return this;\n    // just one destination.  most common case.\n    if (state.pipesCount === 1) {\n        // passed in one, but it's not the right one.\n        if (dest && dest !== state.pipes)\n            return this;\n        if (!dest)\n            dest = state.pipes;\n        // got a match.\n        state.pipes = null;\n        state.pipesCount = 0;\n        state.flowing = false;\n        if (dest)\n            dest.emit('unpipe', this, unpipeInfo);\n        return this;\n    }\n    // slow case. multiple pipe destinations.\n    if (!dest) {\n        // remove all.\n        var dests = state.pipes;\n        var len = state.pipesCount;\n        state.pipes = null;\n        state.pipesCount = 0;\n        state.flowing = false;\n        for (var i = 0; i < len; i++) {\n            dests[i].emit('unpipe', this, unpipeInfo);\n        }\n        return this;\n    }\n    // try to find the right one.\n    var index = indexOf(state.pipes, dest);\n    if (index === -1)\n        return this;\n    state.pipes.splice(index, 1);\n    state.pipesCount -= 1;\n    if (state.pipesCount === 1)\n        state.pipes = state.pipes[0];\n    dest.emit('unpipe', this, unpipeInfo);\n    return this;\n};\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n    var res = Stream.prototype.on.call(this, ev, fn);\n    if (ev === 'data') {\n        // Start flowing on next tick if stream isn't explicitly paused\n        if (this._readableState.flowing !== false)\n            this.resume();\n    }\n    else if (ev === 'readable') {\n        var state = this._readableState;\n        if (!state.endEmitted && !state.readableListening) {\n            state.readableListening = state.needReadable = true;\n            state.emittedReadable = false;\n            if (!state.reading) {\n                pna.nextTick(nReadingNextTick, this);\n            }\n            else if (state.length) {\n                emitReadable(this);\n            }\n        }\n    }\n    return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\nfunction nReadingNextTick(self) {\n    debug('readable nexttick read 0');\n    self.read(0);\n}\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n    var state = this._readableState;\n    if (!state.flowing) {\n        debug('resume');\n        state.flowing = true;\n        resume(this, state);\n    }\n    return this;\n};\nfunction resume(stream, state) {\n    if (!state.resumeScheduled) {\n        state.resumeScheduled = true;\n        pna.nextTick(resume_, stream, state);\n    }\n}\nfunction resume_(stream, state) {\n    if (!state.reading) {\n        debug('resume read 0');\n        stream.read(0);\n    }\n    state.resumeScheduled = false;\n    state.awaitDrain = 0;\n    stream.emit('resume');\n    flow(stream);\n    if (state.flowing && !state.reading)\n        stream.read(0);\n}\nReadable.prototype.pause = function () {\n    debug('call pause flowing=%j', this._readableState.flowing);\n    if (false !== this._readableState.flowing) {\n        debug('pause');\n        this._readableState.flowing = false;\n        this.emit('pause');\n    }\n    return this;\n};\nfunction flow(stream) {\n    var state = stream._readableState;\n    debug('flow', state.flowing);\n    while (state.flowing && stream.read() !== null) { }\n}\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n    var _this = this;\n    var state = this._readableState;\n    var paused = false;\n    stream.on('end', function () {\n        debug('wrapped end');\n        if (state.decoder && !state.ended) {\n            var chunk = state.decoder.end();\n            if (chunk && chunk.length)\n                _this.push(chunk);\n        }\n        _this.push(null);\n    });\n    stream.on('data', function (chunk) {\n        debug('wrapped data');\n        if (state.decoder)\n            chunk = state.decoder.write(chunk);\n        // don't skip over falsy values in objectMode\n        if (state.objectMode && (chunk === null || chunk === undefined))\n            return;\n        else if (!state.objectMode && (!chunk || !chunk.length))\n            return;\n        var ret = _this.push(chunk);\n        if (!ret) {\n            paused = true;\n            stream.pause();\n        }\n    });\n    // proxy all the other methods.\n    // important when wrapping filters and duplexes.\n    for (var i in stream) {\n        if (this[i] === undefined && typeof stream[i] === 'function') {\n            this[i] = (function (method) {\n                return function () {\n                    return stream[method].apply(stream, arguments);\n                };\n            })(i);\n        }\n    }\n    // proxy certain important events.\n    for (var n = 0; n < kProxyEvents.length; n++) {\n        stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n    }\n    // when we try to consume some more bytes, simply unpause the\n    // underlying stream.\n    this._read = function (n) {\n        debug('wrapped _read', n);\n        if (paused) {\n            paused = false;\n            stream.resume();\n        }\n    };\n    return this;\n};\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n    // making it explicit this property is not enumerable\n    // because otherwise some prototype manipulation in\n    // userland will fail\n    enumerable: false,\n    get: function () {\n        return this._readableState.highWaterMark;\n    }\n});\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n    // nothing buffered\n    if (state.length === 0)\n        return null;\n    var ret;\n    if (state.objectMode)\n        ret = state.buffer.shift();\n    else if (!n || n >= state.length) {\n        // read it all, truncate the list\n        if (state.decoder)\n            ret = state.buffer.join('');\n        else if (state.buffer.length === 1)\n            ret = state.buffer.head.data;\n        else\n            ret = state.buffer.concat(state.length);\n        state.buffer.clear();\n    }\n    else {\n        // read part of list\n        ret = fromListPartial(n, state.buffer, state.decoder);\n    }\n    return ret;\n}\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n    var ret;\n    if (n < list.head.data.length) {\n        // slice is the same for buffers and strings\n        ret = list.head.data.slice(0, n);\n        list.head.data = list.head.data.slice(n);\n    }\n    else if (n === list.head.data.length) {\n        // first chunk is a perfect match\n        ret = list.shift();\n    }\n    else {\n        // result spans more than one buffer\n        ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n    }\n    return ret;\n}\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n    var p = list.head;\n    var c = 1;\n    var ret = p.data;\n    n -= ret.length;\n    while ((p = p.next)) {\n        var str = p.data;\n        var nb = n > str.length ? str.length : n;\n        if (nb === str.length)\n            ret += str;\n        else\n            ret += str.slice(0, n);\n        n -= nb;\n        if (n === 0) {\n            if (nb === str.length) {\n                ++c;\n                if (p.next)\n                    list.head = p.next;\n                else\n                    list.head = list.tail = null;\n            }\n            else {\n                list.head = p;\n                p.data = str.slice(nb);\n            }\n            break;\n        }\n        ++c;\n    }\n    list.length -= c;\n    return ret;\n}\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n    var ret = Buffer.allocUnsafe(n);\n    var p = list.head;\n    var c = 1;\n    p.data.copy(ret);\n    n -= p.data.length;\n    while ((p = p.next)) {\n        var buf = p.data;\n        var nb = n > buf.length ? buf.length : n;\n        buf.copy(ret, ret.length - n, 0, nb);\n        n -= nb;\n        if (n === 0) {\n            if (nb === buf.length) {\n                ++c;\n                if (p.next)\n                    list.head = p.next;\n                else\n                    list.head = list.tail = null;\n            }\n            else {\n                list.head = p;\n                p.data = buf.slice(nb);\n            }\n            break;\n        }\n        ++c;\n    }\n    list.length -= c;\n    return ret;\n}\nfunction endReadable(stream) {\n    var state = stream._readableState;\n    // If we get here before consuming all the bytes, then that is a\n    // bug in node.  Should never happen.\n    if (state.length > 0)\n        throw new Error('\"endReadable()\" called on non-empty stream');\n    if (!state.endEmitted) {\n        state.ended = true;\n        pna.nextTick(endReadableNT, state, stream);\n    }\n}\nfunction endReadableNT(state, stream) {\n    // Check that we didn't get one last unshift.\n    if (!state.endEmitted && state.length === 0) {\n        state.endEmitted = true;\n        stream.readable = false;\n        stream.emit('end');\n    }\n}\nfunction indexOf(xs, x) {\n    for (var i = 0, l = xs.length; i < l; i++) {\n        if (xs[i] === x)\n            return i;\n    }\n    return -1;\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// a transform stream is a readable/writable stream where you do\n// something with the data.  Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored.  (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation.  For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes.  When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up.  When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer.  When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks.  If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk.  However,\n// a pathological inflate type of transform can cause excessive buffering\n// here.  For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output.  In this case, you could write a very small\n// amount of input, and end up with a very large amount of output.  In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform.  A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n'use strict';\nmodule.exports = Transform;\nvar Duplex = require('./_stream_duplex');\n/*<replacement>*/\nvar util = Object.create(require('../util'));\n/*</replacement>*/\nutil.inherits(Transform, Duplex);\nfunction afterTransform(er, data) {\n    var ts = this._transformState;\n    ts.transforming = false;\n    var cb = ts.writecb;\n    if (!cb) {\n        return this.emit('error', new Error('write callback called multiple times'));\n    }\n    ts.writechunk = null;\n    ts.writecb = null;\n    if (data != null)\n        // single equals check for both `null` and `undefined`\n        this.push(data);\n    cb(er);\n    var rs = this._readableState;\n    rs.reading = false;\n    if (rs.needReadable || rs.length < rs.highWaterMark) {\n        this._read(rs.highWaterMark);\n    }\n}\nfunction Transform(options) {\n    if (!(this instanceof Transform))\n        return new Transform(options);\n    Duplex.call(this, options);\n    this._transformState = {\n        afterTransform: afterTransform.bind(this),\n        needTransform: false,\n        transforming: false,\n        writecb: null,\n        writechunk: null,\n        writeencoding: null\n    };\n    // start out asking for a readable event once data is transformed.\n    this._readableState.needReadable = true;\n    // we have implemented the _read method, and done the other things\n    // that Readable wants before the first _read call, so unset the\n    // sync guard flag.\n    this._readableState.sync = false;\n    if (options) {\n        if (typeof options.transform === 'function')\n            this._transform = options.transform;\n        if (typeof options.flush === 'function')\n            this._flush = options.flush;\n    }\n    // When the writable side finishes, then flush out anything remaining.\n    this.on('prefinish', prefinish);\n}\nfunction prefinish() {\n    var _this = this;\n    if (typeof this._flush === 'function') {\n        this._flush(function (er, data) {\n            done(_this, er, data);\n        });\n    }\n    else {\n        done(this, null, null);\n    }\n}\nTransform.prototype.push = function (chunk, encoding) {\n    this._transformState.needTransform = false;\n    return Duplex.prototype.push.call(this, chunk, encoding);\n};\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side.  You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk.  If you pass\n// an error, then that'll put the hurt on the whole operation.  If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n    throw new Error('_transform() is not implemented');\n};\nTransform.prototype._write = function (chunk, encoding, cb) {\n    var ts = this._transformState;\n    ts.writecb = cb;\n    ts.writechunk = chunk;\n    ts.writeencoding = encoding;\n    if (!ts.transforming) {\n        var rs = this._readableState;\n        if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark)\n            this._read(rs.highWaterMark);\n    }\n};\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n    var ts = this._transformState;\n    if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n        ts.transforming = true;\n        this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n    }\n    else {\n        // mark that we need a transform, so that any data that comes in\n        // will get processed, now that we've asked for it.\n        ts.needTransform = true;\n    }\n};\nTransform.prototype._destroy = function (err, cb) {\n    var _this2 = this;\n    Duplex.prototype._destroy.call(this, err, function (err2) {\n        cb(err2);\n        _this2.emit('close');\n    });\n};\nfunction done(stream, er, data) {\n    if (er)\n        return stream.emit('error', er);\n    if (data != null)\n        // single equals check for both `null` and `undefined`\n        stream.push(data);\n    // if there's nothing in the write buffer, then that means\n    // that nothing more will ever be provided\n    if (stream._writableState.length)\n        throw new Error('Calling transform done when ws.length != 0');\n    if (stream._transformState.transforming)\n        throw new Error('Calling transform done when still transforming');\n    return stream.push(null);\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n'use strict';\nmodule.exports = PassThrough;\nvar Transform = require('./_stream_transform');\n/*<replacement>*/\nvar util = Object.create(require('../util'));\n/*</replacement>*/\nutil.inherits(PassThrough, Transform);\nfunction PassThrough(options) {\n    if (!(this instanceof PassThrough))\n        return new PassThrough(options);\n    Transform.call(this, options);\n}\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n    cb(null, chunk);\n};\n","\"use strict\";\nexports.Readable = require('./lib/_stream_readable.js');\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\n","\"use strict\";\n/**\n * This file is derived from prior work.\n *\n * See NOTICE.md for full license text.\n *\n * Derived from:\n * - hash-base, Copyright (c) 2016 Kirill Fomichev\n * - cipher-base, Copyright (c) 2017 crypto-browserify contributors\n * - create-hash, Copyright (c) 2017 crypto-browserify contributors\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// tslint:disable no-bitwise\n/* istanbul ignore file */\nconst buffer_1 = require(\"../buffer\");\nconst stream_1 = require(\"../stream\");\nclass Hash extends stream_1.Transform {\n    constructor(blockSize, finalSize, endian = 'be') {\n        super();\n        this._block = buffer_1.Buffer.alloc(blockSize);\n        this._finalSize = finalSize;\n        this._blockSize = blockSize;\n        this._bigEndian = endian === 'be';\n        this._len = 0;\n    }\n    _transform(chunk, encoding, callback) {\n        let error = null;\n        try {\n            this.update(chunk, encoding);\n        }\n        catch (err) {\n            error = err;\n        }\n        callback(error);\n    }\n    _flush(callback) {\n        let error = null;\n        try {\n            this.push(this.digest());\n        }\n        catch (err) {\n            error = err;\n        }\n        callback(error);\n    }\n    update(data, enc) {\n        if (typeof data === 'string') {\n            enc = enc || 'utf8';\n            data = buffer_1.Buffer.from(data, enc);\n        }\n        const block = this._block;\n        const blockSize = this._blockSize;\n        const length = data.length;\n        let accum = this._len;\n        for (let offset = 0; offset < length;) {\n            const assigned = accum % blockSize;\n            const remainder = Math.min(length - offset, blockSize - assigned);\n            for (let i = 0; i < remainder; i++) {\n                block[assigned + i] = data[offset + i];\n            }\n            accum += remainder;\n            offset += remainder;\n            if (accum % blockSize === 0) {\n                this._update(block);\n            }\n        }\n        this._len += length;\n        return this;\n    }\n    digest(enc) {\n        const rem = this._len % this._blockSize;\n        this._block[rem] = 0x80;\n        // zero (rem + 1) trailing bits, where (rem + 1) is the smallest\n        // non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize\n        this._block.fill(0, rem + 1);\n        if (rem >= this._finalSize) {\n            this._update(this._block);\n            this._block.fill(0);\n        }\n        const bits = this._len * 8;\n        if (bits <= 0xffffffff) {\n            if (this._bigEndian) {\n                this._block.writeUInt32BE(0, this._blockSize - 8);\n                this._block.writeUInt32BE(bits, this._blockSize - 4);\n            }\n            else {\n                this._block.writeUInt32LE(bits, this._blockSize - 8);\n                this._block.writeUInt32LE(0, this._blockSize - 4);\n            }\n        }\n        else {\n            const lowBits = (bits & 0xffffffff) >>> 0;\n            const highBits = (bits - lowBits) / 0x100000000;\n            if (this._bigEndian) {\n                this._block.writeUInt32BE(highBits, this._blockSize - 8);\n                this._block.writeUInt32BE(lowBits, this._blockSize - 4);\n            }\n            else {\n                this._block.writeUInt32LE(lowBits, this._blockSize - 8);\n                this._block.writeUInt32LE(highBits, this._blockSize - 4);\n            }\n        }\n        this._update(this._block);\n        const hash = this._hash();\n        return enc ? hash.toString(enc) : hash;\n    }\n    _update(_block) {\n        throw new Error('_update must be implemented by subclass');\n    }\n    _hash() {\n        throw new Error('_update must be implemented by subclass');\n    }\n}\nexports.default = Hash;\n","\"use strict\";\n/**\n * This file is derived from prior work.\n *\n * See NOTICE.md for full license text.\n *\n * Derived from:\n * - hash-base, Copyright (c) 2016 Kirill Fomichev\n * - cipher-base, Copyright (c) 2017 crypto-browserify contributors\n * - md5.js, Copyright (c) 2016 Kirill Fomichev\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\n// tslint:disable no-bitwise arguments-order\n/* istanbul ignore file */\nconst buffer_1 = require(\"../buffer\");\nconst Hash_1 = (0, tslib_1.__importDefault)(require(\"./Hash\"));\nfunction rotl(x, n) {\n    return (x << n) | (x >>> (32 - n));\n}\nfunction fnF(a, b, c, d, m, k, s) {\n    return (rotl((a + ((b & c) | (~b & d)) + m + k) | 0, s) + b) | 0;\n}\nfunction fnG(a, b, c, d, m, k, s) {\n    return (rotl((a + ((b & d) | (c & ~d)) + m + k) | 0, s) + b) | 0;\n}\nfunction fnH(a, b, c, d, m, k, s) {\n    return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + b) | 0;\n}\nfunction fnI(a, b, c, d, m, k, s) {\n    return (rotl((a + (c ^ (b | ~d)) + m + k) | 0, s) + b) | 0;\n}\nclass MD5 extends Hash_1.default {\n    constructor() {\n        super(64, 56, 'le');\n        this._a = 0x67452301;\n        this._b = 0xefcdab89;\n        this._c = 0x98badcfe;\n        this._d = 0x10325476;\n        this._m = new Array(16);\n    }\n    _update(B) {\n        const M = this._m;\n        for (let i = 0; i < 16; ++i) {\n            M[i] = B.readInt32LE(i * 4);\n        }\n        let a = this._a;\n        let b = this._b;\n        let c = this._c;\n        let d = this._d;\n        a = fnF(a, b, c, d, M[0], 0xd76aa478, 7);\n        d = fnF(d, a, b, c, M[1], 0xe8c7b756, 12);\n        c = fnF(c, d, a, b, M[2], 0x242070db, 17);\n        b = fnF(b, c, d, a, M[3], 0xc1bdceee, 22);\n        a = fnF(a, b, c, d, M[4], 0xf57c0faf, 7);\n        d = fnF(d, a, b, c, M[5], 0x4787c62a, 12);\n        c = fnF(c, d, a, b, M[6], 0xa8304613, 17);\n        b = fnF(b, c, d, a, M[7], 0xfd469501, 22);\n        a = fnF(a, b, c, d, M[8], 0x698098d8, 7);\n        d = fnF(d, a, b, c, M[9], 0x8b44f7af, 12);\n        c = fnF(c, d, a, b, M[10], 0xffff5bb1, 17);\n        b = fnF(b, c, d, a, M[11], 0x895cd7be, 22);\n        a = fnF(a, b, c, d, M[12], 0x6b901122, 7);\n        d = fnF(d, a, b, c, M[13], 0xfd987193, 12);\n        c = fnF(c, d, a, b, M[14], 0xa679438e, 17);\n        b = fnF(b, c, d, a, M[15], 0x49b40821, 22);\n        a = fnG(a, b, c, d, M[1], 0xf61e2562, 5);\n        d = fnG(d, a, b, c, M[6], 0xc040b340, 9);\n        c = fnG(c, d, a, b, M[11], 0x265e5a51, 14);\n        b = fnG(b, c, d, a, M[0], 0xe9b6c7aa, 20);\n        a = fnG(a, b, c, d, M[5], 0xd62f105d, 5);\n        d = fnG(d, a, b, c, M[10], 0x02441453, 9);\n        c = fnG(c, d, a, b, M[15], 0xd8a1e681, 14);\n        b = fnG(b, c, d, a, M[4], 0xe7d3fbc8, 20);\n        a = fnG(a, b, c, d, M[9], 0x21e1cde6, 5);\n        d = fnG(d, a, b, c, M[14], 0xc33707d6, 9);\n        c = fnG(c, d, a, b, M[3], 0xf4d50d87, 14);\n        b = fnG(b, c, d, a, M[8], 0x455a14ed, 20);\n        a = fnG(a, b, c, d, M[13], 0xa9e3e905, 5);\n        d = fnG(d, a, b, c, M[2], 0xfcefa3f8, 9);\n        c = fnG(c, d, a, b, M[7], 0x676f02d9, 14);\n        b = fnG(b, c, d, a, M[12], 0x8d2a4c8a, 20);\n        a = fnH(a, b, c, d, M[5], 0xfffa3942, 4);\n        d = fnH(d, a, b, c, M[8], 0x8771f681, 11);\n        c = fnH(c, d, a, b, M[11], 0x6d9d6122, 16);\n        b = fnH(b, c, d, a, M[14], 0xfde5380c, 23);\n        a = fnH(a, b, c, d, M[1], 0xa4beea44, 4);\n        d = fnH(d, a, b, c, M[4], 0x4bdecfa9, 11);\n        c = fnH(c, d, a, b, M[7], 0xf6bb4b60, 16);\n        b = fnH(b, c, d, a, M[10], 0xbebfbc70, 23);\n        a = fnH(a, b, c, d, M[13], 0x289b7ec6, 4);\n        d = fnH(d, a, b, c, M[0], 0xeaa127fa, 11);\n        c = fnH(c, d, a, b, M[3], 0xd4ef3085, 16);\n        b = fnH(b, c, d, a, M[6], 0x04881d05, 23);\n        a = fnH(a, b, c, d, M[9], 0xd9d4d039, 4);\n        d = fnH(d, a, b, c, M[12], 0xe6db99e5, 11);\n        c = fnH(c, d, a, b, M[15], 0x1fa27cf8, 16);\n        b = fnH(b, c, d, a, M[2], 0xc4ac5665, 23);\n        a = fnI(a, b, c, d, M[0], 0xf4292244, 6);\n        d = fnI(d, a, b, c, M[7], 0x432aff97, 10);\n        c = fnI(c, d, a, b, M[14], 0xab9423a7, 15);\n        b = fnI(b, c, d, a, M[5], 0xfc93a039, 21);\n        a = fnI(a, b, c, d, M[12], 0x655b59c3, 6);\n        d = fnI(d, a, b, c, M[3], 0x8f0ccc92, 10);\n        c = fnI(c, d, a, b, M[10], 0xffeff47d, 15);\n        b = fnI(b, c, d, a, M[1], 0x85845dd1, 21);\n        a = fnI(a, b, c, d, M[8], 0x6fa87e4f, 6);\n        d = fnI(d, a, b, c, M[15], 0xfe2ce6e0, 10);\n        c = fnI(c, d, a, b, M[6], 0xa3014314, 15);\n        b = fnI(b, c, d, a, M[13], 0x4e0811a1, 21);\n        a = fnI(a, b, c, d, M[4], 0xf7537e82, 6);\n        d = fnI(d, a, b, c, M[11], 0xbd3af235, 10);\n        c = fnI(c, d, a, b, M[2], 0x2ad7d2bb, 15);\n        b = fnI(b, c, d, a, M[9], 0xeb86d391, 21);\n        this._a = (this._a + a) | 0;\n        this._b = (this._b + b) | 0;\n        this._c = (this._c + c) | 0;\n        this._d = (this._d + d) | 0;\n    }\n    _hash() {\n        const H = buffer_1.Buffer.allocUnsafe(16);\n        H.writeInt32LE(this._a, 0);\n        H.writeInt32LE(this._b, 4);\n        H.writeInt32LE(this._c, 8);\n        H.writeInt32LE(this._d, 12);\n        return H;\n    }\n}\nexports.default = MD5;\n","\"use strict\";\n/**\n * This file is derived from prior work.\n *\n * See NOTICE.md for full license text.\n *\n * Derived from:\n * - hash-base, Copyright (c) 2016 Kirill Fomichev\n * - cipher-base, Copyright (c) 2017 crypto-browserify contributors\n * - sha.js, Copyright (c) 2013-2018 sha.js contributors\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\n/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined\n * in FIPS PUB 180-1\n * Version 2.1a Copyright Paul Johnston 2000 - 2002.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for details.\n */\n// tslint:disable no-bitwise\n/* istanbul ignore file */\nconst buffer_1 = require(\"../buffer\");\nconst Hash_1 = (0, tslib_1.__importDefault)(require(\"./Hash\"));\nconst K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0];\nfunction rotl1(num) {\n    return (num << 1) | (num >>> 31);\n}\nfunction rotl5(num) {\n    return (num << 5) | (num >>> 27);\n}\nfunction rotl30(num) {\n    return (num << 30) | (num >>> 2);\n}\nfunction ft(s, b, c, d) {\n    if (s === 0) {\n        return (b & c) | (~b & d);\n    }\n    if (s === 2) {\n        return (b & c) | (b & d) | (c & d);\n    }\n    return b ^ c ^ d;\n}\nclass Sha1 extends Hash_1.default {\n    constructor() {\n        super(64, 56);\n        this._a = 0x67452301;\n        this._b = 0xefcdab89;\n        this._c = 0x98badcfe;\n        this._d = 0x10325476;\n        this._e = 0xc3d2e1f0;\n        this._w = new Array(80);\n    }\n    _update(M) {\n        const W = this._w;\n        let a = this._a | 0;\n        let b = this._b | 0;\n        let c = this._c | 0;\n        let d = this._d | 0;\n        let e = this._e | 0;\n        let i;\n        for (i = 0; i < 16; ++i) {\n            W[i] = M.readInt32BE(i * 4);\n        }\n        for (; i < 80; ++i) {\n            W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]);\n        }\n        for (let j = 0; j < 80; ++j) {\n            const s = ~~(j / 20);\n            const t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0;\n            e = d;\n            d = c;\n            c = rotl30(b);\n            b = a;\n            a = t;\n        }\n        this._a = (a + this._a) | 0;\n        this._b = (b + this._b) | 0;\n        this._c = (c + this._c) | 0;\n        this._d = (d + this._d) | 0;\n        this._e = (e + this._e) | 0;\n    }\n    _hash() {\n        const H = buffer_1.Buffer.allocUnsafe(20);\n        H.writeInt32BE(this._a | 0, 0);\n        H.writeInt32BE(this._b | 0, 4);\n        H.writeInt32BE(this._c | 0, 8);\n        H.writeInt32BE(this._d | 0, 12);\n        H.writeInt32BE(this._e | 0, 16);\n        return H;\n    }\n}\nexports.default = Sha1;\n","\"use strict\";\n/**\n * This file is derived from prior work.\n *\n * See NOTICE.md for full license text.\n *\n * Derived from:\n * - hash-base, Copyright (c) 2016 Kirill Fomichev\n * - cipher-base, Copyright (c) 2017 crypto-browserify contributors\n * - sha.js, Copyright (c) 2013-2018 sha.js contributors\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\n/**\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n * in FIPS 180-2\n * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n *\n */\n// tslint:disable no-bitwise\n/* istanbul ignore file */\nconst buffer_1 = require(\"../buffer\");\nconst Hash_1 = (0, tslib_1.__importDefault)(require(\"./Hash\"));\nconst K = [\n    0x428a2f98,\n    0x71374491,\n    0xb5c0fbcf,\n    0xe9b5dba5,\n    0x3956c25b,\n    0x59f111f1,\n    0x923f82a4,\n    0xab1c5ed5,\n    0xd807aa98,\n    0x12835b01,\n    0x243185be,\n    0x550c7dc3,\n    0x72be5d74,\n    0x80deb1fe,\n    0x9bdc06a7,\n    0xc19bf174,\n    0xe49b69c1,\n    0xefbe4786,\n    0x0fc19dc6,\n    0x240ca1cc,\n    0x2de92c6f,\n    0x4a7484aa,\n    0x5cb0a9dc,\n    0x76f988da,\n    0x983e5152,\n    0xa831c66d,\n    0xb00327c8,\n    0xbf597fc7,\n    0xc6e00bf3,\n    0xd5a79147,\n    0x06ca6351,\n    0x14292967,\n    0x27b70a85,\n    0x2e1b2138,\n    0x4d2c6dfc,\n    0x53380d13,\n    0x650a7354,\n    0x766a0abb,\n    0x81c2c92e,\n    0x92722c85,\n    0xa2bfe8a1,\n    0xa81a664b,\n    0xc24b8b70,\n    0xc76c51a3,\n    0xd192e819,\n    0xd6990624,\n    0xf40e3585,\n    0x106aa070,\n    0x19a4c116,\n    0x1e376c08,\n    0x2748774c,\n    0x34b0bcb5,\n    0x391c0cb3,\n    0x4ed8aa4a,\n    0x5b9cca4f,\n    0x682e6ff3,\n    0x748f82ee,\n    0x78a5636f,\n    0x84c87814,\n    0x8cc70208,\n    0x90befffa,\n    0xa4506ceb,\n    0xbef9a3f7,\n    0xc67178f2\n];\nfunction ch(x, y, z) {\n    return z ^ (x & (y ^ z));\n}\nfunction maj(x, y, z) {\n    return (x & y) | (z & (x | y));\n}\nfunction sigma0(x) {\n    return ((x >>> 2) | (x << 30)) ^ ((x >>> 13) | (x << 19)) ^ ((x >>> 22) | (x << 10));\n}\nfunction sigma1(x) {\n    return ((x >>> 6) | (x << 26)) ^ ((x >>> 11) | (x << 21)) ^ ((x >>> 25) | (x << 7));\n}\nfunction gamma0(x) {\n    return ((x >>> 7) | (x << 25)) ^ ((x >>> 18) | (x << 14)) ^ (x >>> 3);\n}\nfunction gamma1(x) {\n    return ((x >>> 17) | (x << 15)) ^ ((x >>> 19) | (x << 13)) ^ (x >>> 10);\n}\nclass Sha256 extends Hash_1.default {\n    constructor() {\n        super(64, 56);\n        this._a = 0x6a09e667;\n        this._b = 0xbb67ae85;\n        this._c = 0x3c6ef372;\n        this._d = 0xa54ff53a;\n        this._e = 0x510e527f;\n        this._f = 0x9b05688c;\n        this._g = 0x1f83d9ab;\n        this._h = 0x5be0cd19;\n        this._w = new Array(64);\n    }\n    _update(M) {\n        const W = this._w;\n        let a = this._a | 0;\n        let b = this._b | 0;\n        let c = this._c | 0;\n        let d = this._d | 0;\n        let e = this._e | 0;\n        let f = this._f | 0;\n        let g = this._g | 0;\n        let h = this._h | 0;\n        let i;\n        for (i = 0; i < 16; ++i) {\n            W[i] = M.readInt32BE(i * 4);\n        }\n        for (; i < 64; ++i) {\n            W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0;\n        }\n        for (let j = 0; j < 64; ++j) {\n            const T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0;\n            const T2 = (sigma0(a) + maj(a, b, c)) | 0;\n            h = g;\n            g = f;\n            f = e;\n            e = (d + T1) | 0;\n            d = c;\n            c = b;\n            b = a;\n            a = (T1 + T2) | 0;\n        }\n        this._a = (a + this._a) | 0;\n        this._b = (b + this._b) | 0;\n        this._c = (c + this._c) | 0;\n        this._d = (d + this._d) | 0;\n        this._e = (e + this._e) | 0;\n        this._f = (f + this._f) | 0;\n        this._g = (g + this._g) | 0;\n        this._h = (h + this._h) | 0;\n    }\n    _hash() {\n        const H = buffer_1.Buffer.allocUnsafe(32);\n        H.writeInt32BE(this._a, 0);\n        H.writeInt32BE(this._b, 4);\n        H.writeInt32BE(this._c, 8);\n        H.writeInt32BE(this._d, 12);\n        H.writeInt32BE(this._e, 16);\n        H.writeInt32BE(this._f, 20);\n        H.writeInt32BE(this._g, 24);\n        H.writeInt32BE(this._h, 28);\n        return H;\n    }\n}\nexports.default = Sha256;\n","\"use strict\";\n/**\n * This file is derived from prior work.\n *\n * See NOTICE.md for full license text.\n *\n * Derived from:\n * - hash-base, Copyright (c) 2016 Kirill Fomichev\n * - cipher-base, Copyright (c) 2017 crypto-browserify contributors\n * - sha.js, Copyright (c) 2013-2018 sha.js contributors\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\n// tslint:disable no-bitwise\n/* istanbul ignore file */\nconst buffer_1 = require(\"../buffer\");\nconst Hash_1 = (0, tslib_1.__importDefault)(require(\"./Hash\"));\nconst K = [\n    0x428a2f98,\n    0xd728ae22,\n    0x71374491,\n    0x23ef65cd,\n    0xb5c0fbcf,\n    0xec4d3b2f,\n    0xe9b5dba5,\n    0x8189dbbc,\n    0x3956c25b,\n    0xf348b538,\n    0x59f111f1,\n    0xb605d019,\n    0x923f82a4,\n    0xaf194f9b,\n    0xab1c5ed5,\n    0xda6d8118,\n    0xd807aa98,\n    0xa3030242,\n    0x12835b01,\n    0x45706fbe,\n    0x243185be,\n    0x4ee4b28c,\n    0x550c7dc3,\n    0xd5ffb4e2,\n    0x72be5d74,\n    0xf27b896f,\n    0x80deb1fe,\n    0x3b1696b1,\n    0x9bdc06a7,\n    0x25c71235,\n    0xc19bf174,\n    0xcf692694,\n    0xe49b69c1,\n    0x9ef14ad2,\n    0xefbe4786,\n    0x384f25e3,\n    0x0fc19dc6,\n    0x8b8cd5b5,\n    0x240ca1cc,\n    0x77ac9c65,\n    0x2de92c6f,\n    0x592b0275,\n    0x4a7484aa,\n    0x6ea6e483,\n    0x5cb0a9dc,\n    0xbd41fbd4,\n    0x76f988da,\n    0x831153b5,\n    0x983e5152,\n    0xee66dfab,\n    0xa831c66d,\n    0x2db43210,\n    0xb00327c8,\n    0x98fb213f,\n    0xbf597fc7,\n    0xbeef0ee4,\n    0xc6e00bf3,\n    0x3da88fc2,\n    0xd5a79147,\n    0x930aa725,\n    0x06ca6351,\n    0xe003826f,\n    0x14292967,\n    0x0a0e6e70,\n    0x27b70a85,\n    0x46d22ffc,\n    0x2e1b2138,\n    0x5c26c926,\n    0x4d2c6dfc,\n    0x5ac42aed,\n    0x53380d13,\n    0x9d95b3df,\n    0x650a7354,\n    0x8baf63de,\n    0x766a0abb,\n    0x3c77b2a8,\n    0x81c2c92e,\n    0x47edaee6,\n    0x92722c85,\n    0x1482353b,\n    0xa2bfe8a1,\n    0x4cf10364,\n    0xa81a664b,\n    0xbc423001,\n    0xc24b8b70,\n    0xd0f89791,\n    0xc76c51a3,\n    0x0654be30,\n    0xd192e819,\n    0xd6ef5218,\n    0xd6990624,\n    0x5565a910,\n    0xf40e3585,\n    0x5771202a,\n    0x106aa070,\n    0x32bbd1b8,\n    0x19a4c116,\n    0xb8d2d0c8,\n    0x1e376c08,\n    0x5141ab53,\n    0x2748774c,\n    0xdf8eeb99,\n    0x34b0bcb5,\n    0xe19b48a8,\n    0x391c0cb3,\n    0xc5c95a63,\n    0x4ed8aa4a,\n    0xe3418acb,\n    0x5b9cca4f,\n    0x7763e373,\n    0x682e6ff3,\n    0xd6b2b8a3,\n    0x748f82ee,\n    0x5defb2fc,\n    0x78a5636f,\n    0x43172f60,\n    0x84c87814,\n    0xa1f0ab72,\n    0x8cc70208,\n    0x1a6439ec,\n    0x90befffa,\n    0x23631e28,\n    0xa4506ceb,\n    0xde82bde9,\n    0xbef9a3f7,\n    0xb2c67915,\n    0xc67178f2,\n    0xe372532b,\n    0xca273ece,\n    0xea26619c,\n    0xd186b8c7,\n    0x21c0c207,\n    0xeada7dd6,\n    0xcde0eb1e,\n    0xf57d4f7f,\n    0xee6ed178,\n    0x06f067aa,\n    0x72176fba,\n    0x0a637dc5,\n    0xa2c898a6,\n    0x113f9804,\n    0xbef90dae,\n    0x1b710b35,\n    0x131c471b,\n    0x28db77f5,\n    0x23047d84,\n    0x32caab7b,\n    0x40c72493,\n    0x3c9ebe0a,\n    0x15c9bebc,\n    0x431d67c4,\n    0x9c100d4c,\n    0x4cc5d4be,\n    0xcb3e42b6,\n    0x597f299c,\n    0xfc657e2a,\n    0x5fcb6fab,\n    0x3ad6faec,\n    0x6c44198c,\n    0x4a475817\n];\nfunction Ch(x, y, z) {\n    return z ^ (x & (y ^ z));\n}\nfunction maj(x, y, z) {\n    return (x & y) | (z & (x | y));\n}\nfunction sigma0(x, xl) {\n    return ((x >>> 28) | (xl << 4)) ^ ((xl >>> 2) | (x << 30)) ^ ((xl >>> 7) | (x << 25));\n}\nfunction sigma1(x, xl) {\n    return ((x >>> 14) | (xl << 18)) ^ ((x >>> 18) | (xl << 14)) ^ ((xl >>> 9) | (x << 23));\n}\nfunction Gamma0(x, xl) {\n    return ((x >>> 1) | (xl << 31)) ^ ((x >>> 8) | (xl << 24)) ^ (x >>> 7);\n}\nfunction Gamma0l(x, xl) {\n    return ((x >>> 1) | (xl << 31)) ^ ((x >>> 8) | (xl << 24)) ^ ((x >>> 7) | (xl << 25));\n}\nfunction Gamma1(x, xl) {\n    return ((x >>> 19) | (xl << 13)) ^ ((xl >>> 29) | (x << 3)) ^ (x >>> 6);\n}\nfunction Gamma1l(x, xl) {\n    return ((x >>> 19) | (xl << 13)) ^ ((xl >>> 29) | (x << 3)) ^ ((x >>> 6) | (xl << 26));\n}\nfunction getCarry(a, b) {\n    return a >>> 0 < b >>> 0 ? 1 : 0;\n}\nclass Sha512 extends Hash_1.default {\n    constructor() {\n        super(128, 112);\n        this._ah = 0x6a09e667;\n        this._bh = 0xbb67ae85;\n        this._ch = 0x3c6ef372;\n        this._dh = 0xa54ff53a;\n        this._eh = 0x510e527f;\n        this._fh = 0x9b05688c;\n        this._gh = 0x1f83d9ab;\n        this._hh = 0x5be0cd19;\n        this._al = 0xf3bcc908;\n        this._bl = 0x84caa73b;\n        this._cl = 0xfe94f82b;\n        this._dl = 0x5f1d36f1;\n        this._el = 0xade682d1;\n        this._fl = 0x2b3e6c1f;\n        this._gl = 0xfb41bd6b;\n        this._hl = 0x137e2179;\n        this._w = new Array(160);\n    }\n    _update(M) {\n        const W = this._w;\n        let ah = this._ah | 0;\n        let bh = this._bh | 0;\n        let ch = this._ch | 0;\n        let dh = this._dh | 0;\n        let eh = this._eh | 0;\n        let fh = this._fh | 0;\n        let gh = this._gh | 0;\n        let hh = this._hh | 0;\n        let al = this._al | 0;\n        let bl = this._bl | 0;\n        let cl = this._cl | 0;\n        let dl = this._dl | 0;\n        let el = this._el | 0;\n        let fl = this._fl | 0;\n        let gl = this._gl | 0;\n        let hl = this._hl | 0;\n        let Wih;\n        let Wil;\n        let i = 0;\n        for (i = 0; i < 32; i += 2) {\n            W[i] = M.readInt32BE(i * 4);\n            W[i + 1] = M.readInt32BE(i * 4 + 4);\n        }\n        for (; i < 160; i += 2) {\n            let xh = W[i - 15 * 2];\n            let xl = W[i - 15 * 2 + 1];\n            const gamma0 = Gamma0(xh, xl);\n            const gamma0l = Gamma0l(xl, xh);\n            xh = W[i - 2 * 2];\n            xl = W[i - 2 * 2 + 1];\n            const gamma1 = Gamma1(xh, xl);\n            const gamma1l = Gamma1l(xl, xh);\n            // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]\n            const Wi7h = W[i - 7 * 2];\n            const Wi7l = W[i - 7 * 2 + 1];\n            const Wi16h = W[i - 16 * 2];\n            const Wi16l = W[i - 16 * 2 + 1];\n            Wil = (gamma0l + Wi7l) | 0;\n            Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0;\n            Wil = (Wil + gamma1l) | 0;\n            Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0;\n            Wil = (Wil + Wi16l) | 0;\n            Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0;\n            W[i] = Wih;\n            W[i + 1] = Wil;\n        }\n        for (let j = 0; j < 160; j += 2) {\n            Wih = W[j];\n            Wil = W[j + 1];\n            const majh = maj(ah, bh, ch);\n            const majl = maj(al, bl, cl);\n            const sigma0h = sigma0(ah, al);\n            const sigma0l = sigma0(al, ah);\n            const sigma1h = sigma1(eh, el);\n            const sigma1l = sigma1(el, eh);\n            // t1 = h + sigma1 + ch + K[j] + W[j]\n            const Kih = K[j];\n            const Kil = K[j + 1];\n            const chh = Ch(eh, fh, gh);\n            const chl = Ch(el, fl, gl);\n            let t1l = (hl + sigma1l) | 0;\n            let t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0;\n            t1l = (t1l + chl) | 0;\n            t1h = (t1h + chh + getCarry(t1l, chl)) | 0;\n            t1l = (t1l + Kil) | 0;\n            t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0;\n            t1l = (t1l + Wil) | 0;\n            t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0;\n            // t2 = sigma0 + maj\n            const t2l = (sigma0l + majl) | 0;\n            const t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0;\n            hh = gh;\n            hl = gl;\n            gh = fh;\n            gl = fl;\n            fh = eh;\n            fl = el;\n            el = (dl + t1l) | 0;\n            eh = (dh + t1h + getCarry(el, dl)) | 0;\n            dh = ch;\n            dl = cl;\n            ch = bh;\n            cl = bl;\n            bh = ah;\n            bl = al;\n            al = (t1l + t2l) | 0;\n            ah = (t1h + t2h + getCarry(al, t1l)) | 0;\n        }\n        this._al = (this._al + al) | 0;\n        this._bl = (this._bl + bl) | 0;\n        this._cl = (this._cl + cl) | 0;\n        this._dl = (this._dl + dl) | 0;\n        this._el = (this._el + el) | 0;\n        this._fl = (this._fl + fl) | 0;\n        this._gl = (this._gl + gl) | 0;\n        this._hl = (this._hl + hl) | 0;\n        this._ah = (this._ah + ah + getCarry(this._al, al)) | 0;\n        this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0;\n        this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0;\n        this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0;\n        this._eh = (this._eh + eh + getCarry(this._el, el)) | 0;\n        this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0;\n        this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0;\n        this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0;\n    }\n    _hash() {\n        const H = buffer_1.Buffer.allocUnsafe(64);\n        function writeInt64BE(h, l, offset) {\n            H.writeInt32BE(h, offset);\n            H.writeInt32BE(l, offset + 4);\n        }\n        writeInt64BE(this._ah, this._al, 0);\n        writeInt64BE(this._bh, this._bl, 8);\n        writeInt64BE(this._ch, this._cl, 16);\n        writeInt64BE(this._dh, this._dl, 24);\n        writeInt64BE(this._eh, this._el, 32);\n        writeInt64BE(this._fh, this._fl, 40);\n        writeInt64BE(this._gh, this._gl, 48);\n        writeInt64BE(this._hh, this._hl, 56);\n        return H;\n    }\n}\nexports.default = Sha512;\n","\"use strict\";\n/* istanbul ignore file */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Hash = void 0;\nconst tslib_1 = require(\"tslib\");\nconst Hash_1 = (0, tslib_1.__importDefault)(require(\"./Hash\"));\nexports.Hash = Hash_1.default;\nconst MD5_1 = (0, tslib_1.__importDefault)(require(\"./MD5\"));\nconst SHA_1_1 = (0, tslib_1.__importDefault)(require(\"./SHA-1\"));\nconst SHA_256_1 = (0, tslib_1.__importDefault)(require(\"./SHA-256\"));\nconst SHA_512_1 = (0, tslib_1.__importDefault)(require(\"./SHA-512\"));\nconst HASH_IMPLEMENTATIONS = new Map([\n    ['md5', MD5_1.default],\n    ['sha-1', SHA_1_1.default],\n    ['sha-256', SHA_256_1.default],\n    ['sha-512', SHA_512_1.default],\n    ['sha1', SHA_1_1.default],\n    ['sha256', SHA_256_1.default],\n    ['sha512', SHA_512_1.default]\n]);\nfunction createHash(alg) {\n    alg = alg.toLowerCase();\n    const HashImp = HASH_IMPLEMENTATIONS.get(alg);\n    if (HashImp) {\n        return new HashImp();\n    }\n    else {\n        throw new Error('Unsupported hash algorithm: ' + alg);\n    }\n}\nexports.default = createHash;\n","\"use strict\";\n/**\n * This file is derived from prior work.\n *\n * See NOTICE.md for full license text.\n *\n * Derived from:\n * - hash-base, Copyright (c) 2016 Kirill Fomichev\n * - cipher-base, Copyright (c) 2017 crypto-browserify contributors\n * - create-hash, Copyright (c) 2017 crypto-browserify contributors\n * - create-hmac, Copyright (c) 2017 crypto-browserify contributors\n * - randombytes, Copyright (c) 2017 crypto-browserify\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\n// tslint:disable no-bitwise\n/* istanbul ignore file */\nconst buffer_1 = require(\"../buffer\");\nconst stream_1 = require(\"../stream\");\nconst createHash_1 = (0, tslib_1.__importDefault)(require(\"./createHash\"));\nconst ZEROS = buffer_1.Buffer.alloc(128);\nclass Hmac extends stream_1.Transform {\n    constructor(alg, key) {\n        super();\n        if (typeof key === 'string') {\n            key = buffer_1.Buffer.from(key);\n        }\n        const blocksize = alg === 'sha512' ? 128 : 64;\n        this._alg = alg;\n        if (key.length > blocksize) {\n            key = (0, createHash_1.default)(alg).update(key).digest();\n        }\n        else if (key.length < blocksize) {\n            key = buffer_1.Buffer.concat([key, ZEROS], blocksize);\n        }\n        this._ipad = buffer_1.Buffer.alloc(blocksize);\n        this._opad = buffer_1.Buffer.alloc(blocksize);\n        for (let i = 0; i < blocksize; i++) {\n            this._ipad[i] = key[i] ^ 0x36;\n            this._opad[i] = key[i] ^ 0x5c;\n        }\n        this._hash = (0, createHash_1.default)(alg).update(this._ipad);\n    }\n    _transform(data, enc, next) {\n        let err;\n        try {\n            this.update(data, enc);\n        }\n        catch (e) {\n            err = e;\n        }\n        finally {\n            next(err);\n        }\n    }\n    _flush(done) {\n        let err;\n        try {\n            this.push(this._final());\n        }\n        catch (e) {\n            err = e;\n        }\n        done(err);\n    }\n    _final() {\n        const h = this._hash.digest();\n        return (0, createHash_1.default)(this._alg).update(this._opad).update(h).digest();\n    }\n    update(data, inputEnc) {\n        this._hash.update(data, inputEnc);\n        return this;\n    }\n    digest(outputEnc) {\n        const outData = this._final() || buffer_1.Buffer.alloc(0);\n        if (outputEnc) {\n            return outData.toString(outputEnc);\n        }\n        return outData;\n    }\n}\nexports.default = Hmac;\n","\"use strict\";\n/* istanbul ignore file */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PassThrough = exports.Duplex = exports.Transform = exports.Writable = exports.Readable = exports.WebSocket = exports.RTCPeerConnection = exports.fetch = exports.Hmac = exports.Hash = exports.createHash = exports.Buffer = exports.name = exports.createResolver = exports.createHmac = exports.getHashes = exports.randomBytes = void 0;\nconst tslib_1 = require(\"tslib\");\nconst buffer_1 = require(\"./buffer\");\nObject.defineProperty(exports, \"Buffer\", { enumerable: true, get: function () { return buffer_1.Buffer; } });\nconst createHash_1 = (0, tslib_1.__importStar)(require(\"./crypto/createHash\"));\nexports.createHash = createHash_1.default;\nObject.defineProperty(exports, \"Hash\", { enumerable: true, get: function () { return createHash_1.Hash; } });\nconst Hmac_1 = (0, tslib_1.__importDefault)(require(\"./crypto/Hmac\"));\nexports.Hmac = Hmac_1.default;\nconst stream_1 = require(\"./stream\");\nObject.defineProperty(exports, \"Readable\", { enumerable: true, get: function () { return stream_1.Readable; } });\nObject.defineProperty(exports, \"Writable\", { enumerable: true, get: function () { return stream_1.Writable; } });\nObject.defineProperty(exports, \"Transform\", { enumerable: true, get: function () { return stream_1.Transform; } });\nObject.defineProperty(exports, \"PassThrough\", { enumerable: true, get: function () { return stream_1.PassThrough; } });\nObject.defineProperty(exports, \"Duplex\", { enumerable: true, get: function () { return stream_1.Duplex; } });\nfunction randomBytes(size) {\n    const rawBytes = new Uint8Array(size);\n    if (size > 0) {\n        (globalThis.crypto || globalThis.msCrypto).getRandomValues(rawBytes);\n    }\n    return buffer_1.Buffer.from(rawBytes.buffer);\n}\nexports.randomBytes = randomBytes;\nfunction getHashes() {\n    return ['sha-1', 'sha-256', 'sha-512', 'md5'];\n}\nexports.getHashes = getHashes;\nfunction createHmac(alg, key) {\n    return new Hmac_1.default(alg.toLowerCase(), key);\n}\nexports.createHmac = createHmac;\nfunction createResolver() {\n    return undefined;\n}\nexports.createResolver = createResolver;\nconst nativeFetch = globalThis.fetch.bind(globalThis);\nexports.fetch = nativeFetch;\nconst nativeWS = globalThis.WebSocket;\nexports.WebSocket = nativeWS;\nconst nativeRTCPeerConnection = globalThis\n    .RTCPeerConnection;\nexports.RTCPeerConnection = nativeRTCPeerConnection;\nexports.name = 'browser';\n","\"use strict\";\n/**\n * This file is derived from prior work.\n *\n * See NOTICE.md for full license text.\n *\n * Derived from: ltx, Copyright © 2010 Stephan Maka\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parse = void 0;\nconst tslib_1 = require(\"tslib\");\n// tslint:disable cognitive-complexity max-switch-cases\nconst events_1 = require(\"events\");\nconst Definitions_1 = require(\"./Definitions\");\nconst Element_1 = (0, tslib_1.__importDefault)(require(\"./Element\"));\nconst Error_1 = (0, tslib_1.__importDefault)(require(\"./Error\"));\nfunction isBasicNameStart(c) {\n    return ((97 /* a */ <= c && c <= 122 /* z */) ||\n        (65 /* A */ <= c && c <= 90 /* Z */) ||\n        c === 58 /* Colon */ ||\n        c === 95 /* Underscore */);\n}\nfunction isExtendedNameStart(c) {\n    return ((0xc0 <= c && c <= 0xd6) ||\n        (0xd8 <= c && c <= 0xf6) ||\n        (0xf8 <= c && c <= 0x2ff) ||\n        (0x370 <= c && c <= 0x37d) ||\n        (0x37f <= c && c <= 0x1fff) ||\n        (0x200c <= c && c <= 0x200d) ||\n        (0x2070 <= c && c <= 0x218f) ||\n        (0x2c00 <= c && c <= 0x2fef) ||\n        (0x3001 <= c && c <= 0xd7ff) ||\n        (0xfdf0 <= c && c <= 0xfffd) ||\n        (0x10000 <= c && c <= 0xeffff));\n}\nfunction isNameStart(c) {\n    return isBasicNameStart(c) || isExtendedNameStart(c);\n}\nfunction isName(c) {\n    return (isBasicNameStart(c) ||\n        c === 45 /* Dash */ ||\n        c === 46 /* Period */ ||\n        (48 /* Zero */ <= c && c <= 57 /* Nine */) ||\n        c === 0xb7 ||\n        (0x0300 <= c && c <= 0x036f) ||\n        (0x203f <= c && c <= 0x2040) ||\n        isExtendedNameStart(c));\n}\nfunction isWhitespace(c) {\n    return (c === 32 /* Space */ ||\n        c === 10 /* NewLine */ ||\n        c === 13 /* CarriageReturn */ ||\n        c === 9 /* Tab */);\n}\nclass Parser extends events_1.EventEmitter {\n    constructor(opts = {}) {\n        super();\n        this.allowComments = true;\n        this.attributes = {};\n        this.state = 34 /* TEXT */;\n        this.tagName = '';\n        this.haveDeclaration = false;\n        this.recordBuffer = [];\n        if (opts.allowComments !== undefined) {\n            this.allowComments = opts.allowComments;\n        }\n    }\n    write(data) {\n        for (const char of data) {\n            const c = char.codePointAt(0);\n            switch (this.state) {\n                case 34 /* TEXT */: {\n                    if (c === 60 /* LessThan */) {\n                        let text;\n                        try {\n                            text = (0, Definitions_1.unescapeXML)(this.endRecord());\n                        }\n                        catch (err) {\n                            this.emit('error', err);\n                            return;\n                        }\n                        if (text) {\n                            this.emit('text', text);\n                        }\n                        this.transition(31 /* TAG_START */);\n                        continue;\n                    }\n                    else {\n                        this.record(char);\n                        continue;\n                    }\n                }\n                case 31 /* TAG_START */: {\n                    if (c === 47 /* Slash */) {\n                        this.transition(7 /* CLOSING_TAG_START */);\n                        continue;\n                    }\n                    if (c === 33 /* Exclamation */) {\n                        this.transition(24 /* START_INSTRUCTION */);\n                        continue;\n                    }\n                    if (c === 63 /* Question */) {\n                        if (this.haveDeclaration) {\n                            return this.restrictedXML();\n                        }\n                        this.transition(25 /* START_PROCESSING_INSTRUCTION */);\n                        continue;\n                    }\n                    if (isNameStart(c)) {\n                        this.transition(30 /* TAG_NAME */);\n                        this.startRecord(char);\n                        continue;\n                    }\n                    return this.notWellFormed();\n                }\n                case 30 /* TAG_NAME */: {\n                    if (isName(c)) {\n                        this.record(char);\n                        continue;\n                    }\n                    if (isWhitespace(c)) {\n                        this.startTag();\n                        this.transition(32 /* TAG_WAIT_NAME */);\n                        continue;\n                    }\n                    if (c === 47 /* Slash */) {\n                        this.startTag();\n                        this.transition(29 /* TAG_END_SLASH */);\n                        continue;\n                    }\n                    if (c === 62 /* GreaterThan */) {\n                        this.startTag();\n                        this.transition(34 /* TEXT */);\n                        this.emit('startElement', this.tagName, this.attributes);\n                        continue;\n                    }\n                    return this.notWellFormed();\n                }\n                case 29 /* TAG_END_SLASH */: {\n                    if (c === 62 /* GreaterThan */) {\n                        this.emit('startElement', this.tagName, this.attributes);\n                        this.emit('endElement', this.tagName);\n                        this.transition(34 /* TEXT */);\n                        continue;\n                    }\n                    return this.notWellFormed();\n                }\n                case 33 /* TAG */: {\n                    if (isWhitespace(c)) {\n                        this.transition(32 /* TAG_WAIT_NAME */);\n                        continue;\n                    }\n                    if (c === 47 /* Slash */) {\n                        this.transition(29 /* TAG_END_SLASH */);\n                        continue;\n                    }\n                    if (c === 62 /* GreaterThan */) {\n                        this.emit('startElement', this.tagName, this.attributes);\n                        this.transition(34 /* TEXT */);\n                        continue;\n                    }\n                    return this.notWellFormed();\n                }\n                case 32 /* TAG_WAIT_NAME */: {\n                    if (isWhitespace(c)) {\n                        continue;\n                    }\n                    if (isNameStart(c)) {\n                        this.startRecord(char);\n                        this.transition(0 /* ATTR_NAME */);\n                        continue;\n                    }\n                    if (c === 47 /* Slash */) {\n                        this.transition(29 /* TAG_END_SLASH */);\n                        continue;\n                    }\n                    if (c === 62 /* GreaterThan */) {\n                        this.emit('startElement', this.tagName, this.attributes);\n                        this.transition(34 /* TEXT */);\n                        continue;\n                    }\n                    return this.notWellFormed();\n                }\n                case 7 /* CLOSING_TAG_START */: {\n                    if (isNameStart(c)) {\n                        this.startRecord(char);\n                        this.transition(6 /* CLOSING_TAG_NAME */);\n                        continue;\n                    }\n                    return this.notWellFormed();\n                }\n                case 6 /* CLOSING_TAG_NAME */: {\n                    if (isName(c)) {\n                        this.record(char);\n                        continue;\n                    }\n                    if (isWhitespace(c)) {\n                        this.transition(8 /* CLOSING_TAG */);\n                        continue;\n                    }\n                    if (c === 62 /* GreaterThan */) {\n                        const tag = this.endRecord();\n                        this.emit('endElement', tag, this.attributes);\n                        this.transition(34 /* TEXT */);\n                        continue;\n                    }\n                    return this.notWellFormed();\n                }\n                case 8 /* CLOSING_TAG */: {\n                    if (isWhitespace(c)) {\n                        continue;\n                    }\n                    if (c === 62 /* GreaterThan */) {\n                        const tag = this.endRecord();\n                        this.emit('endElement', tag, this.attributes);\n                        this.transition(34 /* TEXT */);\n                        continue;\n                    }\n                    return this.notWellFormed();\n                }\n                case 0 /* ATTR_NAME */: {\n                    if (isName(c)) {\n                        this.record(char);\n                        continue;\n                    }\n                    if (c === 61 /* Equal */) {\n                        this.addAttribute();\n                        this.transition(4 /* ATTR_WAIT_QUOTE */);\n                        continue;\n                    }\n                    if (isWhitespace(c)) {\n                        this.addAttribute();\n                        this.transition(3 /* ATTR_WAIT_EQ */);\n                        continue;\n                    }\n                    return this.notWellFormed();\n                }\n                case 3 /* ATTR_WAIT_EQ */: {\n                    if (c === 61 /* Equal */) {\n                        this.transition(4 /* ATTR_WAIT_QUOTE */);\n                        continue;\n                    }\n                    if (isWhitespace(c)) {\n                        continue;\n                    }\n                    return this.notWellFormed();\n                }\n                case 4 /* ATTR_WAIT_QUOTE */: {\n                    if (c === 34 /* DoubleQuote */) {\n                        this.startRecord();\n                        this.transition(1 /* ATTR_QUOTE_DOUBLE */);\n                        continue;\n                    }\n                    if (c === 39 /* SingleQuote */) {\n                        this.startRecord();\n                        this.transition(2 /* ATTR_QUOTE_SINGLE */);\n                        continue;\n                    }\n                    if (isWhitespace(c)) {\n                        continue;\n                    }\n                    return this.notWellFormed();\n                }\n                case 1 /* ATTR_QUOTE_DOUBLE */:\n                case 2 /* ATTR_QUOTE_SINGLE */: {\n                    if ((c === 34 /* DoubleQuote */ && this.state === 1 /* ATTR_QUOTE_DOUBLE */) ||\n                        (c === 39 /* SingleQuote */ && this.state === 2 /* ATTR_QUOTE_SINGLE */)) {\n                        const value = this.endRecord();\n                        this.attributes[this.attributeName] = (0, Definitions_1.unescapeXML)(value);\n                        this.transition(33 /* TAG */);\n                        continue;\n                    }\n                    if (c === 60 /* LessThan */) {\n                        return this.notWellFormed();\n                    }\n                    this.record(char);\n                    continue;\n                }\n                case 24 /* START_INSTRUCTION */: {\n                    if (c === 45 /* Dash */) {\n                        if (!this.allowComments) {\n                            return this.restrictedXML();\n                        }\n                        this.transition(23 /* START_COMMENT_DASH */);\n                        continue;\n                    }\n                    if (c === 91 /* LeftBracket */) {\n                        this.transition(21 /* START_CDATA_LB */);\n                        continue;\n                    }\n                    return this.notWellFormed();\n                }\n                case 23 /* START_COMMENT_DASH */: {\n                    if (c === 45 /* Dash */) {\n                        this.transition(14 /* IGNORE_COMMENT */);\n                        continue;\n                    }\n                    return this.notWellFormed();\n                }\n                case 14 /* IGNORE_COMMENT */: {\n                    if (c === 45 /* Dash */) {\n                        this.transition(12 /* END_COMMENT_DASH */);\n                    }\n                    continue;\n                }\n                case 12 /* END_COMMENT_DASH */: {\n                    if (c === 45 /* Dash */) {\n                        this.transition(11 /* END_COMMENT_DASH_DASH */);\n                    }\n                    else {\n                        this.transition(14 /* IGNORE_COMMENT */);\n                    }\n                    continue;\n                }\n                case 11 /* END_COMMENT_DASH_DASH */: {\n                    if (c === 62 /* GreaterThan */) {\n                        this.transition(34 /* TEXT */);\n                    }\n                    else {\n                        this.transition(14 /* IGNORE_COMMENT */);\n                    }\n                    continue;\n                }\n                case 25 /* START_PROCESSING_INSTRUCTION */: {\n                    if (c === 88 /* X */ || c === 120 /* x */) {\n                        this.transition(28 /* START_XML_DECLARATION_X */);\n                        continue;\n                    }\n                    return this.notWellFormed();\n                }\n                case 28 /* START_XML_DECLARATION_X */: {\n                    if (c === 77 /* M */ || c === 109 /* m */) {\n                        this.transition(27 /* START_XML_DECLARATION_X_M */);\n                        continue;\n                    }\n                    return this.notWellFormed();\n                }\n                case 27 /* START_XML_DECLARATION_X_M */: {\n                    if (c === 76 /* L */ || c === 108 /* l */) {\n                        this.transition(26 /* START_XML_DECLARATION_X_M_L */);\n                        continue;\n                    }\n                    return this.notWellFormed();\n                }\n                case 26 /* START_XML_DECLARATION_X_M_L */: {\n                    if (isWhitespace(c)) {\n                        this.haveDeclaration = true;\n                        this.transition(15 /* IGNORE_INSTRUCTION */);\n                        continue;\n                    }\n                    return this.notWellFormed();\n                }\n                case 13 /* END_XML_DECLARATION_QM */: {\n                    if (c === 62 /* GreaterThan */) {\n                        this.transition(34 /* TEXT */);\n                        continue;\n                    }\n                    return this.notWellFormed();\n                }\n                case 15 /* IGNORE_INSTRUCTION */: {\n                    if (c === 63 /* Question */) {\n                        this.transition(13 /* END_XML_DECLARATION_QM */);\n                    }\n                    continue;\n                }\n                case 21 /* START_CDATA_LB */: {\n                    this.wait(c, 67 /* C */, 20 /* START_CDATA_LB_C */);\n                    continue;\n                }\n                case 20 /* START_CDATA_LB_C */: {\n                    this.wait(c, 68 /* D */, 19 /* START_CDATA_LB_C_D */);\n                    continue;\n                }\n                case 19 /* START_CDATA_LB_C_D */: {\n                    this.wait(c, 65 /* A */, 18 /* START_CDATA_LB_C_D_A */);\n                    continue;\n                }\n                case 18 /* START_CDATA_LB_C_D_A */: {\n                    this.wait(c, 84 /* T */, 17 /* START_CDATA_LB_C_D_A_T */);\n                    continue;\n                }\n                case 17 /* START_CDATA_LB_C_D_A_T */: {\n                    this.wait(c, 65 /* A */, 16 /* START_CDATA_LB_C_D_A_T_A */);\n                    continue;\n                }\n                case 16 /* START_CDATA_LB_C_D_A_T_A */: {\n                    this.wait(c, 91 /* LeftBracket */, 5 /* CDATA */);\n                    continue;\n                }\n                case 5 /* CDATA */: {\n                    if (c === 93 /* RightBracket */) {\n                        this.transition(10 /* END_CDATA_RB */);\n                        continue;\n                    }\n                    this.record(char);\n                    continue;\n                }\n                case 10 /* END_CDATA_RB */: {\n                    if (c === 93 /* RightBracket */) {\n                        this.transition(9 /* END_CDATA_RB_RB */);\n                    }\n                    else {\n                        this.record(String.fromCodePoint(93 /* RightBracket */));\n                        this.record(char);\n                        this.transition(5 /* CDATA */);\n                    }\n                    continue;\n                }\n                case 9 /* END_CDATA_RB_RB */: {\n                    if (c === 62 /* GreaterThan */) {\n                        const text = this.endRecord();\n                        if (text) {\n                            this.emit('text', text);\n                        }\n                        this.transition(34 /* TEXT */);\n                    }\n                    else {\n                        this.record(String.fromCodePoint(93 /* RightBracket */));\n                        this.record(String.fromCodePoint(93 /* RightBracket */));\n                        this.record(char);\n                        this.transition(5 /* CDATA */);\n                    }\n                    continue;\n                }\n            }\n        }\n    }\n    end(data) {\n        if (data) {\n            this.write(data);\n        }\n        this.write = () => undefined;\n    }\n    record(char) {\n        this.recordBuffer.push(char);\n    }\n    startRecord(char) {\n        this.recordBuffer = [];\n        if (char) {\n            this.recordBuffer.push(char);\n        }\n    }\n    endRecord() {\n        const data = this.recordBuffer;\n        this.recordBuffer = [];\n        return data.join('');\n    }\n    startTag() {\n        this.tagName = this.endRecord();\n        this.attributes = {};\n    }\n    addAttribute() {\n        const name = this.endRecord();\n        if (this.attributes[name] !== undefined) {\n            return this.notWellFormed();\n        }\n        this.attributeName = name;\n        this.attributes[name] = '';\n    }\n    wait(c, nextChar, newState) {\n        if (c === nextChar) {\n            this.transition(newState);\n            return;\n        }\n        return this.notWellFormed();\n    }\n    transition(state) {\n        this.state = state;\n        if (state === 34 /* TEXT */) {\n            this.startRecord();\n        }\n    }\n    notWellFormed(msg) {\n        this.emit('error', Error_1.default.notWellFormed(msg));\n    }\n    restrictedXML(msg) {\n        this.emit('error', Error_1.default.restrictedXML(msg));\n    }\n}\nfunction parse(data, opts = {}) {\n    const p = new Parser(opts);\n    let result;\n    let element;\n    let error = null;\n    p.on('text', (text) => {\n        if (element) {\n            element.children.push(text);\n        }\n    });\n    p.on('startElement', (name, attrs) => {\n        const child = new Element_1.default(name, attrs);\n        if (!result) {\n            result = child;\n        }\n        if (!element) {\n            element = child;\n        }\n        else {\n            element = element.appendChild(child);\n        }\n    });\n    p.on('endElement', (name) => {\n        if (!element) {\n            p.emit('error', Error_1.default.notWellFormed('a'));\n        }\n        else if (name === element.name) {\n            if (element.parent) {\n                element = element.parent;\n            }\n        }\n        else {\n            p.emit('error', Error_1.default.notWellFormed('b'));\n        }\n    });\n    p.on('error', (e) => {\n        error = e;\n    });\n    p.write(data);\n    p.end();\n    if (error) {\n        throw error;\n    }\n    else {\n        return result;\n    }\n}\nexports.parse = parse;\nexports.default = Parser;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.childAlternateLanguageRawElement = exports.childLanguageRawElement = exports.childRawElement = exports.staticValue = exports.splicePath = exports.multipleChildEnum = exports.multipleChildAlternateLanguageText = exports.childAlternateLanguageText = exports.multipleChildIntegerAttribute = exports.multipleChildAttribute = exports.multipleChildText = exports.childDoubleEnum = exports.childEnum = exports.deepMultipleChildText = exports.deepChildBoolean = exports.deepChildInteger = exports.deepChildText = exports.childBoolean = exports.childTimezoneOffset = exports.childJSON = exports.childFloat = exports.childInteger = exports.childDate = exports.childTextBuffer = exports.childText = exports.childLanguageAttribute = exports.languageAttribute = exports.textBuffer = exports.textJSON = exports.text = exports.childDateAttribute = exports.childFloatAttribute = exports.childIntegerAttribute = exports.childBooleanAttribute = exports.childAttribute = exports.namespacedDateAttribute = exports.namespacedFloatAttribute = exports.namespacedIntegerAttribute = exports.namespacedBooleanAttribute = exports.namespacedAttribute = exports.dateAttribute = exports.floatAttribute = exports.integerAttribute = exports.booleanAttribute = exports.attribute = exports.findOrCreate = exports.findAll = exports.getTargetLang = exports.getLang = exports.createElement = void 0;\nexports.parameterMap = void 0;\nconst tslib_1 = require(\"tslib\");\nconst platform_1 = require(\"../platform\");\nconst Element_1 = (0, tslib_1.__importDefault)(require(\"./Element\"));\nconst Parser_1 = require(\"./Parser\");\nfunction createElement(namespace, name, parentNamespace, parent) {\n    if (parent) {\n        namespace = namespace || parent.getNamespace();\n        const root = parent.getNamespaceRoot(namespace);\n        if (root) {\n            const prefix = root.useNamespace('', namespace);\n            name = `${prefix}:${name}`;\n        }\n    }\n    const el = new Element_1.default(name);\n    if (name.indexOf(':') < 0 && (!parentNamespace || namespace !== parentNamespace)) {\n        el.setAttribute('xmlns', namespace);\n    }\n    return el;\n}\nexports.createElement = createElement;\nfunction getLang(xml, lang) {\n    return (xml.getAttribute('xml:lang') || lang || '').toLowerCase();\n}\nexports.getLang = getLang;\nfunction getTargetLang(children, context) {\n    const availableLanguages = [];\n    for (const child of children) {\n        availableLanguages.push(getLang(child, context.lang));\n    }\n    let targetLanguage;\n    if (!context.resolveLanguage) {\n        targetLanguage = context.lang;\n    }\n    else {\n        targetLanguage = context.resolveLanguage(availableLanguages, context.acceptLanguages || [], context.lang);\n    }\n    return targetLanguage || '';\n}\nexports.getTargetLang = getTargetLang;\nfunction findAll(xml, namespace, element, lang) {\n    const existing = xml.getChildren(element, namespace);\n    const parentLang = getLang(xml);\n    if (existing.length) {\n        if (lang) {\n            return existing.filter(child => {\n                const childLang = getLang(child, parentLang);\n                if (childLang === lang) {\n                    return true;\n                }\n            });\n        }\n        else {\n            return existing;\n        }\n    }\n    return [];\n}\nexports.findAll = findAll;\nfunction findOrCreate(xml, namespace, element, lang) {\n    namespace = namespace || xml.getNamespace();\n    const existing = findAll(xml, namespace, element, lang);\n    if (existing.length) {\n        return existing[0];\n    }\n    const created = createElement(namespace, element, xml.getDefaultNamespace(), xml);\n    const parentLang = getLang(xml, lang);\n    if (lang && parentLang !== lang) {\n        created.setAttribute('xml:lang', lang);\n    }\n    xml.appendChild(created);\n    return created;\n}\nexports.findOrCreate = findOrCreate;\nfunction createAttributeField(opts) {\n    return {\n        importer(xml) {\n            const rawValue = xml.getAttribute(opts.name, opts.namespace);\n            if (!rawValue) {\n                return opts.dynamicDefault ? opts.dynamicDefault(rawValue) : opts.staticDefault;\n            }\n            return opts.parseValue(rawValue);\n        },\n        exporter(xml, value) {\n            if (value === undefined || value === opts.staticDefault) {\n                return;\n            }\n            const output = opts.writeValue(value);\n            if (!output && !opts.emitEmpty) {\n                return;\n            }\n            if (!opts.namespace || !opts.prefix) {\n                xml.setAttribute(opts.name, output, opts.emitEmpty);\n            }\n            else {\n                let prefix;\n                const root = xml.getNamespaceRoot(opts.namespace);\n                if (root) {\n                    prefix = root.useNamespace(opts.prefix, opts.namespace);\n                }\n                else {\n                    const namespaces = xml.getNamespaceContext();\n                    if (!namespaces[opts.namespace]) {\n                        prefix = xml.useNamespace(opts.prefix, opts.namespace);\n                        namespaces[opts.namespace] = prefix;\n                    }\n                }\n                xml.setAttribute(`${prefix}:${opts.name}`, output, opts.emitEmpty);\n            }\n        }\n    };\n}\nfunction createAttributeType(parser, createOpts) {\n    return (name, defaultValue = undefined, opts = {}) => {\n        opts = { staticDefault: defaultValue, ...opts };\n        return createAttributeField({\n            name,\n            ...parser,\n            ...(createOpts ? createOpts(opts) : opts)\n        });\n    };\n}\nfunction createNamespacedAttributeType(parser, createOpts) {\n    return (prefix, namespace, name, defaultValue = undefined, opts = {}) => {\n        opts = { staticDefault: defaultValue, ...opts };\n        return createAttributeField({\n            name,\n            namespace,\n            prefix,\n            ...parser,\n            ...(createOpts ? createOpts(opts) : opts)\n        });\n    };\n}\nfunction createChildAttributeField(opts) {\n    const converter = opts.converter ||\n        createAttributeField({\n            ...opts,\n            namespace: opts.attributeNamespace\n        });\n    return {\n        importer(xml, context) {\n            const child = xml.getChild(opts.element, opts.namespace || xml.getNamespace());\n            if (!child) {\n                return opts.dynamicDefault ? opts.dynamicDefault() : opts.staticDefault;\n            }\n            return converter.importer(child, context);\n        },\n        exporter(xml, value, context) {\n            if (value !== undefined && value !== opts.staticDefault) {\n                const child = findOrCreate(xml, opts.namespace || xml.getNamespace(), opts.element);\n                converter.exporter(child, value, context);\n            }\n        }\n    };\n}\nfunction createChildAttributeType(parser, createOpts) {\n    return (namespace, element, name, defaultValue = undefined, opts = {}) => {\n        opts = { staticDefault: defaultValue, ...opts };\n        return createChildAttributeField({\n            element,\n            name,\n            namespace,\n            ...parser,\n            ...(createOpts ? createOpts(opts) : opts)\n        });\n    };\n}\nfunction createTextField(opts) {\n    return {\n        importer(xml) {\n            const rawValue = xml.getText();\n            if (!rawValue) {\n                return opts.dynamicDefault ? opts.dynamicDefault(rawValue) : opts.staticDefault;\n            }\n            return opts.parseValue(rawValue);\n        },\n        exporter(xml, value) {\n            if (!value && opts.emitEmpty) {\n                xml.children.push('');\n                return;\n            }\n            if (value === undefined || value === opts.staticDefault) {\n                return;\n            }\n            const output = opts.writeValue(value);\n            if (output) {\n                xml.children.push(output);\n            }\n        }\n    };\n}\nfunction createChildTextField(opts) {\n    const converter = createTextField(opts);\n    return {\n        importer(xml, context) {\n            const children = findAll(xml, opts.namespace || xml.getNamespace(), opts.element);\n            const targetLanguage = getTargetLang(children, context);\n            if (!children.length) {\n                return opts.dynamicDefault ? opts.dynamicDefault() : opts.staticDefault;\n            }\n            if (opts.matchLanguage) {\n                for (const child of children) {\n                    if (getLang(child, context.lang) === targetLanguage) {\n                        return converter.importer(child, context);\n                    }\n                }\n            }\n            return converter.importer(children[0], context);\n        },\n        exporter(xml, value, context) {\n            if (!value && opts.emitEmpty) {\n                findOrCreate(xml, opts.namespace || xml.getNamespace(), opts.element, opts.matchLanguage ? context.lang : undefined);\n                return;\n            }\n            if (value !== undefined && value !== opts.staticDefault) {\n                const child = findOrCreate(xml, opts.namespace || xml.getNamespace(), opts.element, opts.matchLanguage ? context.lang : undefined);\n                converter.exporter(child, value, context);\n            }\n        }\n    };\n}\nconst stringParser = {\n    parseValue: v => v,\n    writeValue: v => v\n};\nconst integerParser = {\n    parseValue: v => parseInt(v, 10),\n    writeValue: v => v.toString()\n};\nconst floatParser = {\n    parseValue: v => parseFloat(v),\n    writeValue: v => v.toString()\n};\nconst boolParser = {\n    parseValue: v => {\n        if (v === 'true' || v === '1') {\n            return true;\n        }\n        if (v === 'false' || v === '0') {\n            return false;\n        }\n        return;\n    },\n    writeValue: v => (v ? '1' : '0')\n};\nconst dateParser = {\n    parseValue: v => new Date(v),\n    writeValue: v => (typeof v === 'string' ? v : v.toISOString())\n};\nconst jsonParser = {\n    parseValue: v => JSON.parse(v),\n    writeValue: v => JSON.stringify(v)\n};\nconst bufferParser = (encoding = 'utf8') => ({\n    parseValue: v => {\n        if (encoding === 'base64' && v === '=') {\n            v = '';\n        }\n        return platform_1.Buffer.from(v.trim(), encoding);\n    },\n    writeValue: v => {\n        let data;\n        if (typeof v === 'string') {\n            data = platform_1.Buffer.from(v).toString(encoding);\n        }\n        else if (v) {\n            data = v.toString(encoding);\n        }\n        else {\n            data = '';\n        }\n        if (encoding === 'base64') {\n            data = data || '=';\n        }\n        return data;\n    }\n});\nconst tzOffsetParser = {\n    parseValue: v => {\n        let sign = -1;\n        if (v.charAt(0) === '-') {\n            sign = 1;\n            v = v.slice(1);\n        }\n        const split = v.split(':');\n        const hours = parseInt(split[0], 10);\n        const minutes = parseInt(split[1], 10);\n        return (hours * 60 + minutes) * sign;\n    },\n    writeValue: v => {\n        if (typeof v === 'string') {\n            return v;\n        }\n        else {\n            let formatted = '-';\n            if (v < 0) {\n                v = -v;\n                formatted = '+';\n            }\n            const hours = v / 60;\n            const minutes = v % 60;\n            formatted +=\n                (hours < 10 ? '0' : '') + hours + ':' + (minutes < 10 ? '0' : '') + minutes;\n            return formatted;\n        }\n    }\n};\n// ====================================================================\n// Field Types\n// ====================================================================\nexports.attribute = createAttributeType(stringParser, opts => ({\n    dynamicDefault: opts.emitEmpty ? v => (v === '' ? '' : opts.staticDefault) : undefined,\n    ...opts\n}));\nexports.booleanAttribute = createAttributeType(boolParser);\nexports.integerAttribute = createAttributeType(integerParser);\nexports.floatAttribute = createAttributeType(floatParser);\nexports.dateAttribute = createAttributeType(dateParser);\nexports.namespacedAttribute = createNamespacedAttributeType(stringParser);\nexports.namespacedBooleanAttribute = createNamespacedAttributeType(boolParser);\nexports.namespacedIntegerAttribute = createNamespacedAttributeType(integerParser);\nexports.namespacedFloatAttribute = createNamespacedAttributeType(floatParser);\nexports.namespacedDateAttribute = createNamespacedAttributeType(dateParser);\nexports.childAttribute = createChildAttributeType(stringParser);\nexports.childBooleanAttribute = createChildAttributeType(boolParser);\nexports.childIntegerAttribute = createChildAttributeType(integerParser);\nexports.childFloatAttribute = createChildAttributeType(floatParser);\nexports.childDateAttribute = createChildAttributeType(dateParser);\nconst text = (defaultValue) => createTextField({\n    staticDefault: defaultValue,\n    ...stringParser\n});\nexports.text = text;\nconst textJSON = () => createTextField({ ...jsonParser });\nexports.textJSON = textJSON;\nconst textBuffer = (encoding = 'utf8') => createTextField({\n    ...bufferParser(encoding)\n});\nexports.textBuffer = textBuffer;\nfunction languageAttribute() {\n    return {\n        importer(xml, context) {\n            return getLang(xml, context.lang);\n        },\n        exporter(xml, value, context) {\n            if (value && value.toLowerCase() !== context.lang) {\n                xml.setAttribute('xml:lang', value);\n            }\n            else {\n                xml.setAttribute('xml:lang', undefined);\n            }\n        }\n    };\n}\nexports.languageAttribute = languageAttribute;\nconst childLanguageAttribute = (namespace, element) => createChildAttributeField({\n    converter: languageAttribute(),\n    element,\n    name: 'xml:lang',\n    namespace,\n    ...stringParser\n});\nexports.childLanguageAttribute = childLanguageAttribute;\nconst childText = (namespace, element, defaultValue, emitEmpty = false) => createChildTextField({\n    element,\n    emitEmpty,\n    matchLanguage: true,\n    namespace,\n    staticDefault: defaultValue,\n    ...stringParser\n});\nexports.childText = childText;\nconst childTextBuffer = (namespace, element, encoding = 'utf8') => createChildTextField({\n    element,\n    matchLanguage: true,\n    namespace,\n    ...bufferParser(encoding)\n});\nexports.childTextBuffer = childTextBuffer;\nconst childDate = (namespace, element) => createChildTextField({\n    element,\n    namespace,\n    ...dateParser\n});\nexports.childDate = childDate;\nconst childInteger = (namespace, element, defaultValue) => createChildTextField({\n    element,\n    namespace,\n    staticDefault: defaultValue,\n    ...integerParser\n});\nexports.childInteger = childInteger;\nconst childFloat = (namespace, element, defaultValue) => createChildTextField({\n    element,\n    namespace,\n    staticDefault: defaultValue,\n    ...floatParser\n});\nexports.childFloat = childFloat;\nconst childJSON = (namespace, element) => createChildTextField({\n    element,\n    namespace,\n    ...jsonParser\n});\nexports.childJSON = childJSON;\nfunction childTimezoneOffset(namespace, element) {\n    return createChildTextField({\n        element,\n        namespace,\n        staticDefault: 0,\n        ...tzOffsetParser\n    });\n}\nexports.childTimezoneOffset = childTimezoneOffset;\nfunction childBoolean(namespace, element) {\n    return {\n        importer(xml) {\n            const child = xml.getChild(element, namespace || xml.getNamespace());\n            if (child) {\n                return true;\n            }\n        },\n        exporter(xml, value) {\n            if (value) {\n                findOrCreate(xml, namespace || xml.getNamespace(), element);\n            }\n        }\n    };\n}\nexports.childBoolean = childBoolean;\nconst deepChildExporter = (path, xml, value) => {\n    if (!value) {\n        return;\n    }\n    let current = xml;\n    for (const node of path) {\n        current = findOrCreate(current, node.namespace || current.getNamespace(), node.element);\n    }\n    current.children.push(value.toString());\n};\nfunction deepChildText(path, defaultValue) {\n    return {\n        importer(xml) {\n            let current = xml;\n            for (const node of path) {\n                current = current.getChild(node.element, node.namespace || current.getNamespace());\n                if (!current) {\n                    return defaultValue;\n                }\n            }\n            return current.getText() || defaultValue;\n        },\n        exporter(xml, value) {\n            deepChildExporter(path, xml, value);\n        }\n    };\n}\nexports.deepChildText = deepChildText;\nfunction deepChildInteger(path, defaultValue) {\n    return {\n        importer(xml) {\n            let current = xml;\n            for (const node of path) {\n                current = current.getChild(node.element, node.namespace || current.getNamespace());\n                if (!current) {\n                    return;\n                }\n            }\n            const data = current.getText();\n            if (data) {\n                return parseInt(data, 10);\n            }\n            else if (defaultValue) {\n                return defaultValue;\n            }\n        },\n        exporter(xml, value) {\n            deepChildExporter(path, xml, value);\n        }\n    };\n}\nexports.deepChildInteger = deepChildInteger;\nfunction deepChildBoolean(path) {\n    return {\n        importer(xml) {\n            let current = xml;\n            for (const node of path) {\n                current = current.getChild(node.element, node.namespace || current.getNamespace());\n                if (!current) {\n                    return false;\n                }\n            }\n            return true;\n        },\n        exporter(xml, value) {\n            if (!value) {\n                return;\n            }\n            let current = xml;\n            for (const node of path) {\n                current = findOrCreate(current, node.namespace || current.getNamespace(), node.element);\n            }\n        }\n    };\n}\nexports.deepChildBoolean = deepChildBoolean;\nfunction deepMultipleChildText(path) {\n    const finalChild = path.pop();\n    return {\n        importer(xml, context) {\n            let current = xml;\n            for (const node of path) {\n                current = current.getChild(node.element, node.namespace || current.getNamespace());\n                if (!current) {\n                    return [];\n                }\n            }\n            const result = [];\n            const children = findAll(current, finalChild.namespace || current.getNamespace(), finalChild.element);\n            const targetLanguage = getTargetLang(children, context);\n            for (const child of children) {\n                if (getLang(child, context.lang) === targetLanguage) {\n                    result.push(child.getText());\n                }\n            }\n            return result;\n        },\n        exporter(xml, values, context) {\n            if (!values.length) {\n                return;\n            }\n            let current = xml;\n            for (const node of path) {\n                current = findOrCreate(current, node.namespace || current.getNamespace(), node.element);\n            }\n            const { namespace, element } = finalChild;\n            for (const value of values) {\n                const child = createElement(namespace || current.getNamespace(), element, context.namespace, current);\n                child.children.push(value);\n                current.appendChild(child);\n            }\n        }\n    };\n}\nexports.deepMultipleChildText = deepMultipleChildText;\nfunction childEnum(namespace, elements, defaultValue) {\n    const elementNames = new Map();\n    const valueNames = new Map();\n    for (const el of elements) {\n        if (typeof el === 'string') {\n            elementNames.set(el, el);\n            valueNames.set(el, el);\n        }\n        else {\n            elementNames.set(el[1], el[0]);\n            valueNames.set(el[0], el[1]);\n        }\n    }\n    return {\n        importer(xml) {\n            for (const child of xml.children) {\n                if (typeof child === 'string') {\n                    continue;\n                }\n                else if (child.getNamespace() === (namespace || xml.getNamespace()) &&\n                    elementNames.has(child.getName())) {\n                    return elementNames.get(child.getName());\n                }\n            }\n            return defaultValue;\n        },\n        exporter(xml, value) {\n            if (valueNames.has(value)) {\n                findOrCreate(xml, namespace, valueNames.get(value));\n            }\n        }\n    };\n}\nexports.childEnum = childEnum;\nfunction childDoubleEnum(namespace, parentElements, childElements, defaultValue) {\n    const parentNames = new Set(parentElements);\n    const childNames = new Set(childElements);\n    return {\n        importer(xml) {\n            for (const parent of xml.children) {\n                if (typeof parent === 'string') {\n                    continue;\n                }\n                else if (parent.getNamespace() === (namespace || xml.getNamespace()) &&\n                    parentNames.has(parent.getName())) {\n                    for (const child of parent.children) {\n                        if (typeof child === 'string') {\n                            continue;\n                        }\n                        else if (child.getNamespace() === (namespace || xml.getNamespace()) &&\n                            childNames.has(child.getName())) {\n                            return [parent.getName(), child.getName()];\n                        }\n                    }\n                    return [parent.getName()];\n                }\n            }\n            return defaultValue;\n        },\n        exporter(xml, value) {\n            const parent = findOrCreate(xml, namespace, value[0]);\n            if (value[1]) {\n                findOrCreate(parent, namespace, value[1]);\n            }\n        }\n    };\n}\nexports.childDoubleEnum = childDoubleEnum;\nfunction multipleChildText(namespace, element) {\n    return {\n        importer(xml, context) {\n            const result = [];\n            const children = findAll(xml, namespace || xml.getNamespace(), element);\n            const targetLanguage = getTargetLang(children, context);\n            for (const child of children) {\n                if (getLang(child, context.lang) === targetLanguage) {\n                    result.push(child.getText());\n                }\n            }\n            return result;\n        },\n        exporter(xml, values, context) {\n            for (const value of values) {\n                const child = createElement(namespace || xml.getNamespace(), element, context.namespace, xml);\n                child.children.push(value);\n                xml.appendChild(child);\n            }\n        }\n    };\n}\nexports.multipleChildText = multipleChildText;\nfunction multipleChildAttribute(namespace, element, name) {\n    return {\n        importer(xml) {\n            const result = [];\n            const children = xml.getChildren(element, namespace || xml.getNamespace());\n            for (const child of children) {\n                const childAttr = child.getAttribute(name);\n                if (childAttr !== undefined) {\n                    result.push(childAttr);\n                }\n            }\n            return result;\n        },\n        exporter(xml, values, context) {\n            for (const value of values) {\n                const child = createElement(namespace || xml.getNamespace(), element, context.namespace, xml);\n                child.setAttribute(name, value);\n                xml.appendChild(child);\n            }\n        }\n    };\n}\nexports.multipleChildAttribute = multipleChildAttribute;\nfunction multipleChildIntegerAttribute(namespace, element, name) {\n    return {\n        importer(xml) {\n            const result = [];\n            const children = xml.getChildren(element, namespace || xml.getNamespace());\n            for (const child of children) {\n                const childAttr = child.getAttribute(name);\n                if (childAttr !== undefined) {\n                    result.push(parseInt(childAttr, 10));\n                }\n            }\n            return result;\n        },\n        exporter(xml, values, context) {\n            for (const value of values) {\n                const child = createElement(namespace || xml.getNamespace(), element, context.namespace, xml);\n                child.setAttribute(name, value.toString());\n                xml.appendChild(child);\n            }\n        }\n    };\n}\nexports.multipleChildIntegerAttribute = multipleChildIntegerAttribute;\nfunction childAlternateLanguageText(namespace, element) {\n    return {\n        importer(xml, context) {\n            const results = [];\n            const children = findAll(xml, namespace || xml.getNamespace(), element);\n            const seenLanuages = new Set();\n            for (const child of children) {\n                const langText = child.getText();\n                if (langText) {\n                    const lang = getLang(child, context.lang);\n                    if (seenLanuages.has(lang)) {\n                        continue;\n                    }\n                    results.push({ lang, value: langText });\n                    seenLanuages.add(lang);\n                }\n            }\n            return seenLanuages.size > 0 ? results : undefined;\n        },\n        exporter(xml, values, context) {\n            for (const entry of values) {\n                const val = entry.value;\n                if (val) {\n                    const child = createElement(namespace || xml.getNamespace(), element, context.namespace, xml);\n                    if (entry.lang !== context.lang) {\n                        child.setAttribute('xml:lang', entry.lang);\n                    }\n                    child.children.push(val);\n                    xml.appendChild(child);\n                }\n            }\n        }\n    };\n}\nexports.childAlternateLanguageText = childAlternateLanguageText;\nfunction multipleChildAlternateLanguageText(namespace, element) {\n    return {\n        importer(xml, context) {\n            const results = [];\n            const langIndex = new Map();\n            let hasResults = false;\n            const children = findAll(xml, namespace || xml.getNamespace(), element);\n            for (const child of children) {\n                const langText = child.getText();\n                if (langText) {\n                    const lang = getLang(child, context.lang);\n                    let langResults = langIndex.get(lang);\n                    if (!langResults) {\n                        langResults = [];\n                        langIndex.set(lang, langResults);\n                        results.push({ lang, value: langResults });\n                    }\n                    langResults.push(langText);\n                    hasResults = true;\n                }\n            }\n            return hasResults ? results : undefined;\n        },\n        exporter(xml, values, context) {\n            for (const entry of values) {\n                for (const val of entry.value) {\n                    const child = createElement(namespace || xml.getNamespace(), element, context.namespace, xml);\n                    if (entry.lang !== context.lang) {\n                        child.setAttribute('xml:lang', entry.lang);\n                    }\n                    child.children.push(val);\n                    xml.appendChild(child);\n                }\n            }\n        }\n    };\n}\nexports.multipleChildAlternateLanguageText = multipleChildAlternateLanguageText;\nfunction multipleChildEnum(namespace, elements) {\n    const elementNames = new Map();\n    const valueNames = new Map();\n    for (const el of elements) {\n        if (typeof el === 'string') {\n            elementNames.set(el, el);\n            valueNames.set(el, el);\n        }\n        else {\n            elementNames.set(el[1], el[0]);\n            valueNames.set(el[0], el[1]);\n        }\n    }\n    return {\n        importer(xml) {\n            const results = [];\n            for (const child of xml.children) {\n                if (typeof child === 'string') {\n                    continue;\n                }\n                else if (child.getNamespace() === (namespace || xml.getNamespace()) &&\n                    elementNames.has(child.getName())) {\n                    results.push(elementNames.get(child.getName()));\n                }\n            }\n            return results;\n        },\n        exporter(xml, values) {\n            for (const value of values) {\n                findOrCreate(xml, namespace, valueNames.get(value));\n            }\n        }\n    };\n}\nexports.multipleChildEnum = multipleChildEnum;\nfunction splicePath(namespace, element, path, multiple = false) {\n    return {\n        importer(xml, context) {\n            const child = xml.getChild(element, namespace || xml.getNamespace());\n            if (!child) {\n                return;\n            }\n            const results = [];\n            for (const grandChild of child.children) {\n                if (typeof grandChild === 'string') {\n                    continue;\n                }\n                if (context.registry.getImportKey(grandChild) === path) {\n                    const imported = context.registry.import(grandChild);\n                    if (imported) {\n                        results.push(imported);\n                    }\n                }\n            }\n            return multiple ? results : results[0];\n        },\n        exporter(xml, data, context) {\n            let values = [];\n            if (!Array.isArray(data)) {\n                values = [data];\n            }\n            else {\n                values = data;\n            }\n            const children = [];\n            for (const value of values) {\n                const child = context.registry.export(path, value, {\n                    ...context,\n                    namespace: namespace || xml.getNamespace() || undefined\n                });\n                if (child) {\n                    children.push(child);\n                }\n            }\n            if (children.length) {\n                const skipChild = findOrCreate(xml, namespace || xml.getNamespace(), element);\n                for (const child of children) {\n                    skipChild.appendChild(child);\n                }\n            }\n        }\n    };\n}\nexports.splicePath = splicePath;\nfunction staticValue(value) {\n    return {\n        exporter: () => undefined,\n        importer: () => value\n    };\n}\nexports.staticValue = staticValue;\nfunction childRawElement(namespace, element, sanitizer) {\n    return {\n        importer(xml, context) {\n            if (sanitizer && (!context.sanitizers || !context.sanitizers[sanitizer])) {\n                return;\n            }\n            const child = xml.getChild(element, namespace || xml.getNamespace());\n            if (child) {\n                if (sanitizer) {\n                    return context.sanitizers[sanitizer](child.toJSON());\n                }\n                else {\n                    return child.toJSON();\n                }\n            }\n        },\n        exporter(xml, value, context) {\n            if (typeof value === 'string') {\n                const wrapped = (0, Parser_1.parse)(`<${element} xmlns=\"${namespace || xml.getNamespace()}\">${value}</${element}>`);\n                value = wrapped.toJSON();\n            }\n            if (sanitizer) {\n                if (!context.sanitizers || !context.sanitizers[sanitizer]) {\n                    return;\n                }\n                value = context.sanitizers[sanitizer](value);\n            }\n            if (value) {\n                xml.appendChild(new Element_1.default(value.name, value.attributes, value.children));\n            }\n        }\n    };\n}\nexports.childRawElement = childRawElement;\nfunction childLanguageRawElement(namespace, element, sanitizer) {\n    return {\n        importer(xml, context) {\n            if (sanitizer && (!context.sanitizers || !context.sanitizers[sanitizer])) {\n                return;\n            }\n            const children = findAll(xml, namespace || xml.getNamespace(), element);\n            const targetLanguage = getTargetLang(children, context);\n            for (const child of children) {\n                if (getLang(child, context.lang) === targetLanguage) {\n                    if (sanitizer) {\n                        return context.sanitizers[sanitizer](child.toJSON());\n                    }\n                    else {\n                        return child.toJSON();\n                    }\n                }\n            }\n            if (children[0]) {\n                if (sanitizer) {\n                    return context.sanitizers[sanitizer](children[0].toJSON());\n                }\n                else {\n                    return children[0].toJSON();\n                }\n            }\n        },\n        exporter(xml, value, context) {\n            if (typeof value === 'string') {\n                const wrapped = (0, Parser_1.parse)(`<${element} xmlns=\"${namespace || xml.getNamespace()}\">${value}</${element}>`);\n                value = wrapped.toJSON();\n            }\n            if (value && sanitizer) {\n                if (!context.sanitizers || !context.sanitizers[sanitizer]) {\n                    return;\n                }\n                value = context.sanitizers[sanitizer](value);\n            }\n            if (!value) {\n                return;\n            }\n            const rawElement = findOrCreate(xml, namespace || xml.getNamespace(), element, context.lang);\n            for (const child of value.children) {\n                if (typeof child === 'string') {\n                    rawElement.appendChild(child);\n                }\n                else if (child) {\n                    rawElement.appendChild(new Element_1.default(child.name, child.attributes, child.children));\n                }\n            }\n        }\n    };\n}\nexports.childLanguageRawElement = childLanguageRawElement;\nfunction childAlternateLanguageRawElement(namespace, element, sanitizer) {\n    return {\n        importer(xml, context) {\n            if (sanitizer && (!context.sanitizers || !context.sanitizers[sanitizer])) {\n                return;\n            }\n            const results = [];\n            const seenLanuages = new Set();\n            const children = findAll(xml, namespace || xml.getNamespace(), element);\n            for (const child of children) {\n                let result = child.toJSON();\n                if (sanitizer) {\n                    result = context.sanitizers[sanitizer](result);\n                }\n                if (result) {\n                    const lang = getLang(child, context.lang);\n                    if (seenLanuages.has(lang)) {\n                        continue;\n                    }\n                    results.push({ lang, value: result });\n                    seenLanuages.add(lang);\n                }\n            }\n            return seenLanuages.size > 0 ? results : undefined;\n        },\n        exporter(xml, values, context) {\n            for (const entry of values) {\n                let value = entry.value;\n                if (typeof value === 'string') {\n                    const wrapped = (0, Parser_1.parse)(`<${element} xmlns=\"${namespace || xml.getNamespace()}\">${value}</${element}>`);\n                    value = wrapped.toJSON();\n                }\n                if (value && sanitizer) {\n                    if (!context.sanitizers || !context.sanitizers[sanitizer]) {\n                        continue;\n                    }\n                    value = context.sanitizers[sanitizer](value);\n                }\n                if (value) {\n                    const rawElement = createElement(namespace || xml.getNamespace(), element, context.namespace, xml);\n                    xml.appendChild(rawElement);\n                    if (entry.lang !== context.lang) {\n                        rawElement.setAttribute('xml:lang', entry.lang);\n                    }\n                    for (const child of value.children) {\n                        if (typeof child === 'string') {\n                            rawElement.appendChild(child);\n                        }\n                        else {\n                            rawElement.appendChild(new Element_1.default(child.name, child.attributes, child.children));\n                        }\n                    }\n                }\n            }\n        }\n    };\n}\nexports.childAlternateLanguageRawElement = childAlternateLanguageRawElement;\nfunction parameterMap(namespace, element, keyName, valueName) {\n    return {\n        importer(xml, context) {\n            const result = {};\n            const params = findAll(xml, namespace, element);\n            const keyImporter = (0, exports.attribute)(keyName).importer;\n            const valueImporter = (0, exports.attribute)(valueName).importer;\n            for (const param of params) {\n                result[keyImporter(param, context)] = valueImporter(param, context);\n            }\n            return result;\n        },\n        exporter(xml, values, context) {\n            const keyExporter = (0, exports.attribute)(keyName).exporter;\n            const valueExporter = (0, exports.attribute)(valueName).exporter;\n            const ns = namespace || xml.getNamespace();\n            for (const [param, value] of Object.entries(values)) {\n                const paramEl = createElement(ns, element, context.namespace, xml);\n                keyExporter(paramEl, param, context);\n                if (values[param]) {\n                    valueExporter(paramEl, value, context);\n                }\n                xml.appendChild(paramEl);\n            }\n        }\n    };\n}\nexports.parameterMap = parameterMap;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Types_1 = require(\"./Types\");\nclass Translator {\n    constructor() {\n        this.parents = new Set();\n        this.placeholder = false;\n        this.typeField = '';\n        this.versionField = '';\n        this.defaultType = '';\n        this.defaultVersion = '';\n        this.languageField = 'lang';\n        this.typeValues = new Map();\n        this.typeOrders = new Map();\n        this.importers = new Map();\n        this.exporters = new Map();\n        this.children = new Map();\n        this.childrenIndex = new Map();\n        this.implicitChildren = new Set();\n        this.contexts = new Map();\n    }\n    addChild(name, translator, multiple = false, selector, implicit) {\n        const child = {\n            multiple: multiple || false,\n            name,\n            selector,\n            translator\n        };\n        const existingChild = this.children.get(name);\n        if (!existingChild) {\n            child.translator.parents.add(this);\n            this.children.set(name, child);\n            for (const [xid] of translator.importers) {\n                if (!this.implicitChildren.has(xid)) {\n                    this.childrenIndex.set(xid, name);\n                }\n            }\n            if (implicit) {\n                this.implicitChildren.add(implicit);\n            }\n            return;\n        }\n        const existing = existingChild.translator;\n        existingChild.multiple = multiple;\n        if (selector && existingChild.selector && selector !== existingChild.selector) {\n            existingChild.selector = undefined;\n        }\n        for (const [xid, importer] of translator.importers) {\n            const [type, version] = (existing.typeValues.get(xid) || '').split('__v__');\n            existing.updateDefinition({\n                contexts: translator.contexts,\n                element: importer.element,\n                exporterOrdering: new Map(),\n                exporters: new Map(),\n                importerOrdering: importer.fieldOrders,\n                importers: importer.fields,\n                namespace: importer.namespace,\n                optionalNamespaces: new Map(),\n                type,\n                version\n            });\n            if (!this.implicitChildren.has(xid)) {\n                this.childrenIndex.set(xid, name);\n            }\n        }\n        for (const [exportType, exporter] of translator.exporters) {\n            const [type, version] = exportType.split('__v__');\n            existing.updateDefinition({\n                contexts: translator.contexts,\n                element: exporter.element,\n                exporterOrdering: exporter.fieldOrders,\n                exporters: exporter.fields,\n                importerOrdering: new Map(),\n                importers: new Map(),\n                namespace: exporter.namespace,\n                optionalNamespaces: exporter.optionalNamespaces,\n                type,\n                version\n            });\n        }\n    }\n    addContext(path, selector, field, xid, value, implied) {\n        if (selector) {\n            path = `${path}[${selector}]`;\n        }\n        let context = this.contexts.get(path);\n        if (!context) {\n            context = {\n                typeField: '',\n                versionField: '',\n                typeValues: new Map()\n            };\n        }\n        if (implied) {\n            context.impliedType = value;\n        }\n        context.typeField = field || '';\n        context.typeValues.set(xid, value);\n        this.contexts.set(path, context);\n    }\n    getChild(name) {\n        const child = this.children.get(name);\n        if (!child) {\n            return;\n        }\n        return child.translator;\n    }\n    getImportKey(xml) {\n        return this.childrenIndex.get(`{${xml.getNamespace()}}${xml.getName()}`);\n    }\n    updateDefinition(opts) {\n        const xid = `{${opts.namespace}}${opts.element}`;\n        const type = opts.type || this.defaultType;\n        const version = opts.version || this.defaultVersion;\n        const versionType = version ? `${type}__v__${version}` : type;\n        const importer = this.importers.get(xid) ||\n            {\n                element: opts.element,\n                fieldOrders: new Map(),\n                fields: new Map(),\n                namespace: opts.namespace\n            };\n        for (const [fieldName, fieldImporter] of opts.importers) {\n            importer.fields.set(fieldName, fieldImporter);\n        }\n        for (const [fieldName, order] of opts.importerOrdering) {\n            importer.fieldOrders.set(fieldName, order);\n        }\n        this.importers.set(xid, importer);\n        const exporter = this.exporters.get(versionType) ||\n            {\n                element: opts.element,\n                fieldOrders: new Map(),\n                fields: new Map(),\n                namespace: opts.namespace,\n                optionalNamespaces: opts.optionalNamespaces\n            };\n        for (const [fieldName, fieldExporter] of opts.exporters) {\n            exporter.fields.set(fieldName, fieldExporter);\n        }\n        for (const [name, order] of opts.exporterOrdering) {\n            exporter.fieldOrders.set(name, order);\n        }\n        for (const [prefix, namespace] of opts.optionalNamespaces) {\n            exporter.optionalNamespaces.set(prefix, namespace);\n        }\n        this.exporters.set(versionType, exporter);\n        for (const [path, newContext] of opts.contexts) {\n            const context = this.contexts.get(path) || {\n                impliedType: undefined,\n                typeField: newContext.typeField,\n                versionField: newContext.versionField,\n                typeValues: new Map()\n            };\n            if (!context.typeField) {\n                context.typeField = newContext.typeField;\n            }\n            if (!context.versionField) {\n                context.versionField = newContext.versionField;\n            }\n            if (!context.impliedType) {\n                context.impliedType = newContext.impliedType;\n            }\n            for (const [xid2, type] of newContext.typeValues) {\n                context.typeValues.set(xid2, type);\n            }\n            this.contexts.set(path, context);\n        }\n        if (opts.type) {\n            this.typeValues.set(xid, versionType);\n            if (opts.typeOrder && opts.type) {\n                this.typeOrders.set(opts.type, opts.typeOrder);\n            }\n        }\n        else if (this.typeField && !opts.type) {\n            for (const [, imp] of this.importers) {\n                for (const [fieldName, fieldImporter] of opts.importers) {\n                    imp.fields.set(fieldName, fieldImporter);\n                }\n                for (const [fieldName, order] of opts.importerOrdering) {\n                    imp.fieldOrders.set(fieldName, order);\n                }\n            }\n            for (const [, exp] of this.exporters) {\n                for (const [fieldName, fieldExporter] of opts.exporters) {\n                    exp.fields.set(fieldName, fieldExporter);\n                }\n                for (const [fieldName, order] of opts.exporterOrdering) {\n                    exp.fieldOrders.set(fieldName, order);\n                }\n            }\n        }\n    }\n    replaceWith(replacement) {\n        for (const [a, b] of this.children) {\n            replacement.children.set(a, b);\n        }\n        for (const [a, b] of this.childrenIndex) {\n            replacement.childrenIndex.set(a, b);\n        }\n        for (const [a, b] of this.contexts) {\n            replacement.contexts.set(a, b);\n        }\n        for (const a of this.implicitChildren) {\n            replacement.implicitChildren.add(a);\n        }\n        for (const parent of this.parents) {\n            for (const child of parent.children.values()) {\n                if (child.translator === this) {\n                    child.translator = replacement;\n                }\n            }\n        }\n        this.parents = new Set();\n    }\n    import(xml, parentContext) {\n        const xid = `{${xml.getNamespace()}}${xml.getName()}`;\n        const output = {};\n        const importer = this.importers.get(xid);\n        if (!importer) {\n            return;\n        }\n        const versionTypeValue = this.typeValues.get(xid) || '';\n        const [typeValue, versionValue] = versionTypeValue.split('__v__');\n        const path = parentContext.path || '';\n        let implied;\n        if (parentContext.pathSelector) {\n            implied = this.contexts.get(`${path}[${parentContext.pathSelector}]`);\n        }\n        if (!implied) {\n            implied = this.contexts.get(path);\n        }\n        if (implied) {\n            if (!implied.impliedType) {\n                const impliedTypeValue = implied.typeValues.get(xid) || '';\n                if (impliedTypeValue) {\n                    output[implied.typeField] = impliedTypeValue;\n                }\n            }\n        }\n        else if (this.typeField && typeValue && typeValue !== this.defaultType) {\n            output[this.typeField] = typeValue;\n        }\n        if (this.versionField && versionValue && versionValue !== this.defaultVersion) {\n            output[this.versionField] = versionValue;\n        }\n        const context = {\n            ...parentContext,\n            data: output,\n            importer,\n            lang: (xml.getAttribute('xml:lang') || parentContext.lang || '').toLowerCase(),\n            pathSelector: typeValue,\n            translator: this\n        };\n        const importFields = [...importer.fieldOrders.entries()].sort((a, b) => a[1] > b[1] ? -1 : a[1] < b[1] ? 1 : 0);\n        const preChildren = importFields.filter(field => field[1] >= 0);\n        const postChildren = importFields.filter(field => field[1] < 0);\n        for (const [fieldName] of preChildren) {\n            const importField = importer.fields.get(fieldName);\n            context.path = `${parentContext.path}.${fieldName}`;\n            const value = importField(xml, context);\n            if (value !== null && value !== undefined) {\n                output[fieldName] = value;\n            }\n        }\n        for (const child of xml.children) {\n            if (typeof child === 'string') {\n                continue;\n            }\n            const childName = `{${child.getNamespace()}}${child.getName()}`;\n            const fieldName = this.childrenIndex.get(childName);\n            if (!fieldName) {\n                continue;\n            }\n            context.path = `${parentContext.path}.${fieldName}`;\n            const { translator, multiple, selector } = this.children.get(fieldName);\n            if (!selector || selector === typeValue) {\n                const childOutput = translator.import(child, context);\n                if (childOutput !== undefined) {\n                    if (multiple) {\n                        if (!output[fieldName]) {\n                            output[fieldName] = [];\n                        }\n                        output[fieldName].push(childOutput);\n                    }\n                    else if (!output[fieldName]) {\n                        output[fieldName] = childOutput;\n                    }\n                    else {\n                        output[fieldName] = translator.resolveCollision(output[fieldName], childOutput);\n                    }\n                }\n            }\n        }\n        for (const [fieldName] of postChildren) {\n            const importField = importer.fields.get(fieldName);\n            context.path = `${parentContext.path}.${fieldName}`;\n            const value = importField(xml, context);\n            if (value !== null && value !== undefined) {\n                output[fieldName] = value;\n            }\n        }\n        return output;\n    }\n    export(data, parentContext) {\n        if (!data) {\n            return;\n        }\n        let exportType = this.defaultType;\n        let exportVersion = this.defaultVersion;\n        const path = parentContext.path || '';\n        let implied;\n        if (parentContext.pathSelector) {\n            implied = this.contexts.get(`${path}[${parentContext.pathSelector}]`);\n        }\n        if (!implied) {\n            implied = this.contexts.get(path);\n        }\n        if (implied) {\n            exportType = implied.impliedType || data[implied.typeField] || this.defaultType;\n        }\n        else if (this.typeField) {\n            exportType = data[this.typeField] || this.defaultType;\n        }\n        if (this.versionField) {\n            exportVersion = data[this.versionField] || this.defaultVersion;\n        }\n        const exportVersionType = exportVersion ? `${exportType}__v__${exportVersion}` : exportType;\n        const exporter = this.exporters.get(exportVersionType);\n        if (!exporter) {\n            return;\n        }\n        const output = (0, Types_1.createElement)(exporter.namespace, exporter.element, parentContext.namespace, parentContext.element);\n        if (parentContext.element) {\n            output.parent = parentContext.element;\n        }\n        for (const [prefix, namespace] of exporter.optionalNamespaces) {\n            output.addOptionalNamespace(prefix, namespace);\n        }\n        const context = {\n            ...parentContext,\n            data,\n            element: output,\n            exporter,\n            lang: (data[this.languageField] || parentContext.lang || '').toLowerCase(),\n            namespace: output.getDefaultNamespace(),\n            pathSelector: exportType,\n            translator: this\n        };\n        const langExporter = exporter.fields.get(this.languageField);\n        if (langExporter) {\n            langExporter(output, data[this.languageField], parentContext);\n        }\n        const keys = Object.keys(data);\n        keys.sort((key1, key2) => {\n            const a = exporter.fieldOrders.get(key1) || 100000;\n            const b = exporter.fieldOrders.get(key2) || 100000;\n            return a - b;\n        });\n        for (const key of keys) {\n            if (key === this.languageField) {\n                // We've already processed this field\n                continue;\n            }\n            const value = data[key];\n            const fieldExporter = exporter.fields.get(key);\n            if (fieldExporter) {\n                fieldExporter(output, value, context);\n                continue;\n            }\n            const childTranslator = this.children.get(key);\n            if (!childTranslator) {\n                continue;\n            }\n            context.path = `${parentContext.path ? parentContext.path + '.' : ''}${key}`;\n            const { translator, multiple, selector } = childTranslator;\n            if (!selector || selector === exportType) {\n                let items;\n                if (multiple) {\n                    items = value !== null && value !== void 0 ? value : [];\n                }\n                else {\n                    items = [value];\n                }\n                for (const item of items) {\n                    const childOutput = translator.export(item, context);\n                    if (childOutput) {\n                        output.appendChild(childOutput);\n                    }\n                }\n            }\n        }\n        return output;\n    }\n    resolveCollision(existingData, newData) {\n        const existingOrder = this.typeOrders.get(existingData[this.typeField] || this.defaultType) || 0;\n        const newOrder = this.typeOrders.get(newData[this.typeField] || this.defaultType) || 0;\n        return existingOrder <= newOrder ? existingData : newData;\n    }\n}\nexports.default = Translator;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst Definitions_1 = require(\"./Definitions\");\nconst XHTMLIM_1 = (0, tslib_1.__importDefault)(require(\"./sanitizers/XHTMLIM\"));\nconst Translator_1 = (0, tslib_1.__importDefault)(require(\"./Translator\"));\nclass Registry {\n    constructor() {\n        this.translators = new Map();\n        this.root = new Translator_1.default();\n        this.setLanguageResolver(Definitions_1.basicLanguageResolver);\n    }\n    setLanguageResolver(resolver) {\n        this.languageResolver = resolver;\n    }\n    import(xml, context = { registry: this }) {\n        if (!this.hasTranslator(xml.getNamespace(), xml.getName())) {\n            return;\n        }\n        if (!context.acceptLanguages) {\n            context.acceptLanguages = [];\n        }\n        context.acceptLanguages = context.acceptLanguages.map(lang => lang.toLowerCase());\n        if (context.lang) {\n            context.lang = context.lang.toLowerCase();\n        }\n        if (!context.resolveLanguage) {\n            context.resolveLanguage = this.languageResolver;\n        }\n        context.path = this.getImportKey(xml);\n        if (!context.sanitizers) {\n            context.sanitizers = {\n                xhtmlim: XHTMLIM_1.default\n            };\n        }\n        const translator = this.getOrCreateTranslator(xml.getNamespace(), xml.getName());\n        return translator.import(xml, {\n            ...context,\n            registry: this\n        });\n    }\n    export(path, data, context = { registry: this }) {\n        if (!context.acceptLanguages) {\n            context.acceptLanguages = [];\n        }\n        context.acceptLanguages = context.acceptLanguages.map(lang => lang.toLowerCase());\n        if (context.lang) {\n            context.lang = context.lang.toLowerCase();\n        }\n        if (!context.sanitizers) {\n            context.sanitizers = {\n                xhtmlim: XHTMLIM_1.default\n            };\n        }\n        context.path = path;\n        const fields = path.split('.').filter(item => {\n            return item !== '';\n        });\n        let translator = this.root;\n        for (const field of fields) {\n            const nextTranslator = translator.getChild(field);\n            if (!nextTranslator) {\n                return;\n            }\n            translator = nextTranslator;\n        }\n        return translator.export(data, {\n            ...context,\n            registry: this\n        });\n    }\n    getImportKey(xml, path = '') {\n        const root = !path ? this.root : this.walkToTranslator(path.split('.'));\n        if (!root) {\n            return undefined;\n        }\n        return root.getImportKey(xml);\n    }\n    define(defs) {\n        if (Array.isArray(defs)) {\n            for (const def of defs) {\n                if (typeof def === 'object') {\n                    this.define(def);\n                }\n                else {\n                    def(this);\n                }\n            }\n            return;\n        }\n        else if (typeof defs !== 'object') {\n            defs(this);\n            return;\n        }\n        const definition = defs;\n        definition.aliases = definition.aliases || [];\n        if (definition.path && !definition.aliases.includes(definition.path)) {\n            definition.aliases.push(definition.path);\n        }\n        const aliases = definition.aliases\n            .map(alias => (typeof alias === 'string' ? { path: alias } : alias))\n            .sort((a, b) => {\n            const aLen = a.path.split('.').length;\n            const bLen = b.path.split('.').length;\n            return bLen - aLen;\n        });\n        let translator;\n        if (this.hasTranslator(definition.namespace, definition.element)) {\n            // Get existing translator\n            translator = this.getOrCreateTranslator(definition.namespace, definition.element);\n        }\n        if (!translator) {\n            let placeholder;\n            for (const alias of aliases) {\n                const t = this.walkToTranslator(alias.path.split('.'));\n                if (t && !t.placeholder) {\n                    translator = t;\n                    break;\n                }\n                else if (t) {\n                    placeholder = t;\n                }\n            }\n            if (placeholder && !translator) {\n                translator = placeholder;\n                translator.placeholder = false;\n            }\n        }\n        if (!translator) {\n            // Create a new translator\n            translator = this.getOrCreateTranslator(definition.namespace, definition.element);\n        }\n        this.indexTranslator(definition.namespace, definition.element, translator);\n        const fields = definition.fields || {};\n        const importers = new Map();\n        const exporters = new Map();\n        const importerOrdering = new Map();\n        const exporterOrdering = new Map();\n        if (definition.typeField) {\n            translator.typeField = definition.typeField;\n        }\n        if (definition.defaultType) {\n            translator.defaultType = definition.defaultType;\n        }\n        if (definition.versionField) {\n            translator.versionField = definition.versionField;\n        }\n        if (definition.defaultVersion) {\n            translator.defaultVersion = definition.defaultVersion;\n        }\n        if (definition.languageField) {\n            translator.languageField = definition.languageField;\n        }\n        for (const [key, field] of Object.entries(fields)) {\n            importers.set(key, field.importer);\n            importerOrdering.set(key, field.importOrder || field.order || 0);\n            exporters.set(key, field.exporter);\n            exporterOrdering.set(key, field.exportOrder || field.order || 0);\n        }\n        if (definition.childrenExportOrder) {\n            for (const [key, order] of Object.entries(definition.childrenExportOrder)) {\n                exporterOrdering.set(key, order || 0);\n            }\n        }\n        const optionalNamespaces = new Map();\n        for (const [prefix, namespace] of Object.entries(definition.optionalNamespaces || {})) {\n            optionalNamespaces.set(prefix, namespace);\n        }\n        translator.updateDefinition({\n            contexts: new Map(),\n            element: definition.element,\n            exporterOrdering,\n            exporters,\n            importerOrdering,\n            importers,\n            namespace: definition.namespace,\n            optionalNamespaces,\n            type: definition.type,\n            version: definition.version,\n            typeOrder: definition.typeOrder\n        });\n        for (const link of aliases) {\n            this.alias(definition.namespace, definition.element, link.path, link.multiple, link.selector, link.contextField, definition.type, link.impliedType);\n        }\n        for (const alias of aliases) {\n            const existing = this.walkToTranslator(alias.path.split('.'));\n            if (existing && existing !== translator) {\n                existing.replaceWith(translator);\n            }\n        }\n    }\n    alias(namespace, element, path, multiple = false, selector, contextField, contextType, contextImpliedType = false) {\n        const linkedTranslator = this.getOrCreateTranslator(namespace, element);\n        linkedTranslator.placeholder = false;\n        const keys = path.split('.').filter(key => {\n            return key !== '';\n        });\n        const finalKey = keys.pop();\n        const translator = this.walkToTranslator(keys, true);\n        const xid = `{${namespace}}${element}`;\n        if (contextType && (contextField || contextImpliedType)) {\n            linkedTranslator.addContext(path, selector, contextField, xid, contextType, contextImpliedType);\n        }\n        translator.addChild(finalKey, linkedTranslator, multiple, selector, xid);\n    }\n    walkToTranslator(path, vivify = false) {\n        let translator = this.root;\n        for (const key of path) {\n            let next = translator.getChild(key);\n            if (!next) {\n                if (vivify) {\n                    next = new Translator_1.default();\n                    next.placeholder = true;\n                    translator.addChild(key, next);\n                }\n                else {\n                    return;\n                }\n            }\n            translator = next;\n        }\n        return translator;\n    }\n    hasTranslator(namespace, element) {\n        return this.translators.has(`{${namespace}}${element}`);\n    }\n    getOrCreateTranslator(namespace, element) {\n        let translator = this.translators.get(`{${namespace}}${element}`);\n        if (!translator) {\n            translator = new Translator_1.default();\n            this.indexTranslator(namespace, element, translator);\n        }\n        return translator;\n    }\n    indexTranslator(namespace, element, translator) {\n        this.translators.set(`{${namespace}}${element}`, translator);\n    }\n}\nexports.default = Registry;\n","\"use strict\";\n// ================================================================\n// RFCS\n// ================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NS_AVATAR_METADATA = exports.NS_AVATAR_DATA = exports.NS_ROSTER_DELIMITER = exports.NS_GEOLOC = exports.NS_AMP = exports.NS_INBAND_REGISTRATION = exports.NS_REGISTER = exports.NS_XHTML_IM = exports.NS_XHTML = exports.NS_HTTP_AUTH = exports.NS_OOB_TRANSFER = exports.NS_OOB = exports.NS_SOCKS5 = exports.NS_PUBSUB_OWNER = exports.NS_PUBSUB_EVENT = exports.NS_PUBSUB_ERRORS = exports.NS_PUBSUB = exports.NS_RSM = exports.NS_SEARCH = exports.NS_VCARD_TEMP = exports.NS_ADHOC_COMMANDS = exports.NS_PRIVATE = exports.NS_BOOKMARKS = exports.NS_IBB = exports.NS_MUC_USER = exports.NS_MUC_OWNER = exports.NS_MUC_ADMIN = exports.NS_MUC = exports.NS_ADDRESS = exports.NS_DISCO_ITEMS = exports.NS_DISCO_INFO = exports.NS_LEGACY_CHAT_EVENTS = exports.NS_PRIVACY = exports.NS_LAST_ACTIVITY = exports.NS_RPC = exports.NS_DATAFORM = exports.NS_FRAMING = exports.NS_SUBSCRIPTION_PREAPPROVAL = exports.NS_ROSTER_VERSIONING = exports.NS_ROSTER = exports.NS_STARTTLS = exports.NS_STREAMS = exports.NS_STREAM = exports.NS_STANZAS = exports.NS_SESSION = exports.NS_SERVER = exports.NS_SASL = exports.NS_CLIENT = exports.NS_BIND = exports.NS_ATOM = void 0;\nexports.NS_JINGLE_FILE_TRANSFER_4 = exports.NS_JINGLE_FILE_TRANSFER_3 = exports.NS_SOFTWARE_INFO = exports.NS_BOB = exports.NS_ATTENTION_0 = exports.NS_DATAFORM_MEDIA = exports.NS_DISCO_EXTERNAL_2 = exports.NS_DISCO_EXTERNAL_1 = exports.NS_BOSH_XMPP = exports.NS_DELAY = exports.NS_TIME = exports.NS_PING = exports.NS_SMACKS_3 = exports.NS_BLOCKING_ERRORS = exports.NS_BLOCKING = exports.NS_INVISIBLE_0 = exports.NS_RECEIPTS = exports.NS_JINGLE_RAW_UDP_1 = exports.NS_JINGLE_ICE_UDP_1 = exports.NS_NICK = exports.NS_LANG_TRANS_ITEMS = exports.NS_LANG_TRANS = exports.NS_JINGLE_RTP_VIDEO = exports.NS_JINGLE_RTP_AUDIO = exports.NS_JINGLE_RTP_INFO_1 = exports.NS_JINGLE_RTP_ERRORS_1 = exports.NS_JINGLE_RTP_1 = exports.NS_JINGLE_ERRORS_1 = exports.NS_JINGLE_1 = exports.NS_PEP_NOTIFY = exports.NS_CAPTCHA = exports.NS_ALT_CONNECTIONS_XBOSH = exports.NS_ALT_CONNECTIONS_WEBSOCKET = exports.NS_VCARD_TEMP_UPDATE = exports.NS_REACH_0 = exports.NS_ROSTER_NOTES = exports.NS_ROSTER_EXCHANGE = exports.NS_DATAFORM_LAYOUT = exports.NS_COMPRESSION = exports.NS_COMPRESSION_FEATURE = exports.NS_SHIM = exports.NS_BOSH = exports.NS_DATAFORM_VALIDATION = exports.NS_TUNE = exports.NS_DISCO_LEGACY_CAPS = exports.NS_COMPONENT = exports.NS_ACTIVITY = exports.NS_MOOD = exports.NS_VERSION = exports.NS_CHAT_STATES = void 0;\nexports.NS_OMEMO_AXOLOTL = exports.NS_SPOILER_0 = exports.NS_EME_0 = exports.NS_REFERENCE_0 = exports.NS_JINGLE_ICE_0 = exports.NS_JINGLE_HTTP_UPLOAD_0 = exports.NS_JINGLE_HTTP_0 = exports.NS_HTTP_UPLOAD_0 = exports.NS_SID_0 = exports.NS_JINGLE_PUB_1 = exports.NS_PUSH_0 = exports.NS_DELEGATION_1 = exports.NS_JINGLE_MSG_INITIATE_0 = exports.NS_CSI_0 = exports.NS_JINGLE_DTLS_SCTP_1 = exports.NS_JINGLE_RTP_SSMA_0 = exports.NS_JINGLE_GROUPING_0 = exports.NS_JSON_0 = exports.NS_HINTS = exports.NS_CHAT_MARKERS_0 = exports.NS_JINGLE_DTLS_0 = exports.NS_IDLE_1 = exports.NS_HATS_0 = exports.NS_MAM_2 = exports.NS_MAM_1 = exports.NS_MAM_0 = exports.NS_MAM_TMP = exports.NS_PSA = exports.NS_CORRECTION_0 = exports.NS_MUC_UNIQUE = exports.NS_RTT_0 = exports.NS_HASH_NAME = exports.NS_HASHES_2 = exports.NS_HASHES_1 = exports.NS_FORWARD_0 = exports.NS_JINGLE_RTP_HDREXT_0 = exports.NS_JINGLE_RTP_RTCP_FB_0 = exports.NS_CARBONS_2 = exports.NS_DECLOAKING_0 = exports.NS_THUMBS_1 = exports.NS_THUMBS_0 = exports.NS_JINGLE_RTP_ZRTP_1 = exports.NS_JINGLE_IBB_1 = exports.NS_JINGLE_SOCKS5_1 = exports.NS_SEC_LABEL_ESS_0 = exports.NS_SEC_LABEL_CATALOG_2 = exports.NS_SEC_LABEL_0 = exports.NS_MUC_DIRECT_INVITE = exports.NS_JINGLE_XML_0 = exports.NS_JINGLE_FILE_TRANSFER_5 = void 0;\nexports.NS_JINGLE_RTP_MSID_0 = exports.NS_XRD = exports.NS_JSON_MESSAGE_0 = exports.NS_OMEMO_AXOLOTL_BUNDLE = exports.NS_OMEMO_AXOLOTL_BUNDLES = exports.NS_OMEMO_AXOLOTL_DEVICELIST = void 0;\n// RFC 4287\nexports.NS_ATOM = 'http://www.w3.org/2005/Atom';\n// RFC 6120\nexports.NS_BIND = 'urn:ietf:params:xml:ns:xmpp-bind';\nexports.NS_CLIENT = 'jabber:client';\nexports.NS_SASL = 'urn:ietf:params:xml:ns:xmpp-sasl';\nexports.NS_SERVER = 'jabber:server';\nexports.NS_SESSION = 'urn:ietf:params:xml:ns:xmpp-session';\nexports.NS_STANZAS = 'urn:ietf:params:xml:ns:xmpp-stanzas';\nexports.NS_STREAM = 'http://etherx.jabber.org/streams';\nexports.NS_STREAMS = 'urn:ietf:params:xml:ns:xmpp-streams';\nexports.NS_STARTTLS = 'urn:ietf:params:xml:ns:xmpp-tls';\n// RFC 6121\nexports.NS_ROSTER = 'jabber:iq:roster';\nexports.NS_ROSTER_VERSIONING = 'urn:xmpp:features:rosterver';\nexports.NS_SUBSCRIPTION_PREAPPROVAL = 'urn:xmpp:features:pre-approval';\n// RFC 7395\nexports.NS_FRAMING = 'urn:ietf:params:xml:ns:xmpp-framing';\n// ================================================================\n// XEPS\n// ================================================================\n// XEP-0004\nexports.NS_DATAFORM = 'jabber:x:data';\n// XEP-0009\nexports.NS_RPC = 'jabber:iq:rpc';\n// XEP-0012\nexports.NS_LAST_ACTIVITY = 'jabber:iq:last';\n// XEP-0016\nexports.NS_PRIVACY = 'jabber:iq:privacy';\n// XEP-0022\nexports.NS_LEGACY_CHAT_EVENTS = 'jabber:x:event';\n// XEP-0030\nexports.NS_DISCO_INFO = 'http://jabber.org/protocol/disco#info';\nexports.NS_DISCO_ITEMS = 'http://jabber.org/protocol/disco#items';\n// XEP-0033\nexports.NS_ADDRESS = 'http://jabber.org/protocol/address';\n// XEP-0045\nexports.NS_MUC = 'http://jabber.org/protocol/muc';\nexports.NS_MUC_ADMIN = 'http://jabber.org/protocol/muc#admin';\nexports.NS_MUC_OWNER = 'http://jabber.org/protocol/muc#owner';\nexports.NS_MUC_USER = 'http://jabber.org/protocol/muc#user';\n// XEP-0047\nexports.NS_IBB = 'http://jabber.org/protocol/ibb';\n// XEP-0048\nexports.NS_BOOKMARKS = 'storage:bookmarks';\n// XEP-0049\nexports.NS_PRIVATE = 'jabber:iq:private';\n// XEP-0050\nexports.NS_ADHOC_COMMANDS = 'http://jabber.org/protocol/commands';\n// XEP-0054\nexports.NS_VCARD_TEMP = 'vcard-temp';\n// XEP-0055\nexports.NS_SEARCH = 'jabber:iq:search';\n// XEP-0059\nexports.NS_RSM = 'http://jabber.org/protocol/rsm';\n// XEP-0060\nexports.NS_PUBSUB = 'http://jabber.org/protocol/pubsub';\nexports.NS_PUBSUB_ERRORS = 'http://jabber.org/protocol/pubsub#errors';\nexports.NS_PUBSUB_EVENT = 'http://jabber.org/protocol/pubsub#event';\nexports.NS_PUBSUB_OWNER = 'http://jabber.org/protocol/pubsub#owner';\n// XEP-0065\nexports.NS_SOCKS5 = 'http://jabber.org/protocol/bytestreams';\n// XEP-0066\nexports.NS_OOB = 'jabber:x:oob';\nexports.NS_OOB_TRANSFER = 'jabber:iq:oob';\n// XEP-0070\nexports.NS_HTTP_AUTH = 'http://jabber.org/protocol/http-auth';\n// XEP-0071\nexports.NS_XHTML = 'http://www.w3.org/1999/xhtml';\nexports.NS_XHTML_IM = 'http://jabber.org/protocol/xhtml-im';\n// XEP-0077\nexports.NS_REGISTER = 'jabber:iq:register';\nexports.NS_INBAND_REGISTRATION = 'http://jabber.org/features/iq-register';\n// XEP-0079\nexports.NS_AMP = 'http://jabber.org/protocol/amp';\n// XEP-0080\nexports.NS_GEOLOC = 'http://jabber.org/protocol/geoloc';\n// XEP-0083\nexports.NS_ROSTER_DELIMITER = 'roster:delimiter';\n// XEP-0084\nexports.NS_AVATAR_DATA = 'urn:xmpp:avatar:data';\nexports.NS_AVATAR_METADATA = 'urn:xmpp:avatar:metadata';\n// XEP-0085\nexports.NS_CHAT_STATES = 'http://jabber.org/protocol/chatstates';\n// XEP-0092\nexports.NS_VERSION = 'jabber:iq:version';\n// XEP-0107\nexports.NS_MOOD = 'http://jabber.org/protocol/mood';\n// XEP-0108\nexports.NS_ACTIVITY = 'http://jabber.org/protocol/activity';\n// XEP-0114\nexports.NS_COMPONENT = 'jabber:component:accept';\n// XEP-0115\nexports.NS_DISCO_LEGACY_CAPS = 'http://jabber.org/protocol/caps';\n// XEP-0118\nexports.NS_TUNE = 'http://jabber.org/protocol/tune';\n// XEP-0122\nexports.NS_DATAFORM_VALIDATION = 'http://jabber.org/protocol/xdata-validate';\n// XEP-0124\nexports.NS_BOSH = 'http://jabber.org/protocol/httpbind';\n// XEP-0131\nexports.NS_SHIM = 'http://jabber.org/protocol/shim';\n// XEP-0138\nexports.NS_COMPRESSION_FEATURE = 'http://jabber.org/features/compress';\nexports.NS_COMPRESSION = 'http://jabber.org/protocol/compress';\n// XEP-0141\nexports.NS_DATAFORM_LAYOUT = 'http://jabber.org/protocol/xdata-layout';\n// XEP-0144\nexports.NS_ROSTER_EXCHANGE = 'http://jabber.org/protocol/rosterx';\n// XEP-0145\nexports.NS_ROSTER_NOTES = 'storage:rosternotes';\n// XEP-0152\nexports.NS_REACH_0 = 'urn:xmpp:reach:0';\n// XEP-0153\nexports.NS_VCARD_TEMP_UPDATE = 'vcard-temp:x:update';\n// XEP-0156\nexports.NS_ALT_CONNECTIONS_WEBSOCKET = 'urn:xmpp:alt-connections:websocket';\nexports.NS_ALT_CONNECTIONS_XBOSH = 'urn:xmpp:alt-connections:xbosh';\n// XEP-0158\nexports.NS_CAPTCHA = 'urn:xmpp:captcha';\n// XEP-0163\nconst NS_PEP_NOTIFY = (ns) => `${ns}+notify`;\nexports.NS_PEP_NOTIFY = NS_PEP_NOTIFY;\n// XEP-0166\nexports.NS_JINGLE_1 = 'urn:xmpp:jingle:1';\nexports.NS_JINGLE_ERRORS_1 = 'urn:xmpp:jingle:errors:1';\n// XEP-0167\nexports.NS_JINGLE_RTP_1 = 'urn:xmpp:jingle:apps:rtp:1';\nexports.NS_JINGLE_RTP_ERRORS_1 = 'urn:xmpp:jingle:apps:rtp:errors:1';\nexports.NS_JINGLE_RTP_INFO_1 = 'urn:xmpp:jingle:apps:rtp:info:1';\nexports.NS_JINGLE_RTP_AUDIO = 'urn:xmpp:jingle:apps:rtp:audio';\nexports.NS_JINGLE_RTP_VIDEO = 'urn:xmpp:jingle:apps:rtp:video';\n// XEP-0171\nexports.NS_LANG_TRANS = 'urn:xmpp:langtrans';\nexports.NS_LANG_TRANS_ITEMS = 'urn:xmpp:langtrans:items';\n// XEP-0172\nexports.NS_NICK = 'http://jabber.org/protocol/nick';\n// XEP-0176\nexports.NS_JINGLE_ICE_UDP_1 = 'urn:xmpp:jingle:transports:ice-udp:1';\n// XEP-0177\nexports.NS_JINGLE_RAW_UDP_1 = 'urn:xmpp:jingle:transports:raw-udp:1';\n// XEP-0184\nexports.NS_RECEIPTS = 'urn:xmpp:receipts';\n// XEP-0186\nexports.NS_INVISIBLE_0 = 'urn:xmpp:invisible:0';\n// XEP-0191\nexports.NS_BLOCKING = 'urn:xmpp:blocking';\nexports.NS_BLOCKING_ERRORS = 'urn:xmpp:blocking:errors';\n// XEP-0198\nexports.NS_SMACKS_3 = 'urn:xmpp:sm:3';\n// XEP-0199\nexports.NS_PING = 'urn:xmpp:ping';\n// XEP-0202\nexports.NS_TIME = 'urn:xmpp:time';\n// XEP-0203\nexports.NS_DELAY = 'urn:xmpp:delay';\n// XEP-0206\nexports.NS_BOSH_XMPP = 'urn:xmpp:xbosh';\n// XEP-0215\nexports.NS_DISCO_EXTERNAL_1 = 'urn:xmpp:extdisco:1';\nexports.NS_DISCO_EXTERNAL_2 = 'urn:xmpp:extdisco:2';\n// XEP-0221\nexports.NS_DATAFORM_MEDIA = 'urn:xmpp:media-element';\n// XEP-0224\nexports.NS_ATTENTION_0 = 'urn:xmpp:attention:0';\n// XEP-0231\nexports.NS_BOB = 'urn:xmpp:bob';\n// XEP-0232\nexports.NS_SOFTWARE_INFO = 'urn:xmpp:dataforms:softwareinfo';\n// XEP-0234\nexports.NS_JINGLE_FILE_TRANSFER_3 = 'urn:xmpp:jingle:apps:file-transfer:3';\nexports.NS_JINGLE_FILE_TRANSFER_4 = 'urn:xmpp:jingle:apps:file-transfer:4';\nexports.NS_JINGLE_FILE_TRANSFER_5 = 'urn:xmpp:jingle:apps:file-transfer:5';\n// XEP-0247\nexports.NS_JINGLE_XML_0 = 'urn:xmpp:jingle:apps:xmlstream:0';\n// XEP-0249\nexports.NS_MUC_DIRECT_INVITE = 'jabber:x:conference';\n// XEP-0258\nexports.NS_SEC_LABEL_0 = 'urn:xmpp:sec-label:0';\nexports.NS_SEC_LABEL_CATALOG_2 = 'urn:xmpp:sec-label:catalog:2';\nexports.NS_SEC_LABEL_ESS_0 = 'urn:xmpp:sec-label:ess:0';\n// XEP-0260\nexports.NS_JINGLE_SOCKS5_1 = 'urn:xmpp:jingle:transports:s5b:1';\n// XEP-0261\nexports.NS_JINGLE_IBB_1 = 'urn:xmpp:jingle:transports:ibb:1';\n// XEP-0262\nexports.NS_JINGLE_RTP_ZRTP_1 = 'urn:xmpp:jingle:apps:rtp:zrtp:1';\n// XEP-0264\nexports.NS_THUMBS_0 = 'urn:xmpp:thumbs:0';\nexports.NS_THUMBS_1 = 'urn:xmpp:thumbs:1';\n// XEP-0276\nexports.NS_DECLOAKING_0 = 'urn:xmpp:decloaking:0';\n// XEP-0280\nexports.NS_CARBONS_2 = 'urn:xmpp:carbons:2';\n// XEP-0293\nexports.NS_JINGLE_RTP_RTCP_FB_0 = 'urn:xmpp:jingle:apps:rtp:rtcp-fb:0';\n// XEP-0294\nexports.NS_JINGLE_RTP_HDREXT_0 = 'urn:xmpp:jingle:apps:rtp:rtp-hdrext:0';\n// XEP-0297\nexports.NS_FORWARD_0 = 'urn:xmpp:forward:0';\n// XEP-0300\nexports.NS_HASHES_1 = 'urn:xmpp:hashes:1';\nexports.NS_HASHES_2 = 'urn:xmpp:hashes:2';\nconst NS_HASH_NAME = (name) => `urn:xmpp:hash-function-text-names:${name}`;\nexports.NS_HASH_NAME = NS_HASH_NAME;\n// XEP-0301\nexports.NS_RTT_0 = 'urn:xmpp:rtt:0';\n// XEP-0307\nexports.NS_MUC_UNIQUE = 'http://jabber.org/protocol/muc#unique';\n// XEP-308\nexports.NS_CORRECTION_0 = 'urn:xmpp:message-correct:0';\n// XEP-0310\nexports.NS_PSA = 'urn:xmpp:psa';\n// XEP-0313\nexports.NS_MAM_TMP = 'urn:xmpp:mam:tmp';\nexports.NS_MAM_0 = 'urn:xmpp:mam:0';\nexports.NS_MAM_1 = 'urn:xmpp:mam:1';\nexports.NS_MAM_2 = 'urn:xmpp:mam:2';\n// XEP-0317\nexports.NS_HATS_0 = 'urn:xmpp:hats:0';\n// XEP-0319\nexports.NS_IDLE_1 = 'urn:xmpp:idle:1';\n// XEP-0320\nexports.NS_JINGLE_DTLS_0 = 'urn:xmpp:jingle:apps:dtls:0';\n// XEP-0333\nexports.NS_CHAT_MARKERS_0 = 'urn:xmpp:chat-markers:0';\n// XEP-0334\nexports.NS_HINTS = 'urn:xmpp:hints';\n// XEP-0335\nexports.NS_JSON_0 = 'urn:xmpp:json:0';\n// XEP-0338\nexports.NS_JINGLE_GROUPING_0 = 'urn:xmpp:jingle:apps:grouping:0';\n// XEP-0339\nexports.NS_JINGLE_RTP_SSMA_0 = 'urn:xmpp:jingle:apps:rtp:ssma:0';\n// XEP-0343\nexports.NS_JINGLE_DTLS_SCTP_1 = 'urn:xmpp:jingle:transports:dtls-sctp:1';\n// XEP-0352\nexports.NS_CSI_0 = 'urn:xmpp:csi:0';\n// XEP-0353\nexports.NS_JINGLE_MSG_INITIATE_0 = 'urn:xmpp:jingle:jingle-message:0';\n// XEP-0355\nexports.NS_DELEGATION_1 = 'urn:xmpp:delegation:1';\n// XEP-0357\nexports.NS_PUSH_0 = 'urn:xmpp:push:0';\n// XEP-0358\nexports.NS_JINGLE_PUB_1 = 'urn:xmpp:jinglepub:1';\n// XEP-0359\nexports.NS_SID_0 = 'urn:xmpp:sid:0';\n// XEP-0363\nexports.NS_HTTP_UPLOAD_0 = 'urn:xmpp:http:upload:0';\n// XEP-0370\nexports.NS_JINGLE_HTTP_0 = 'urn:xmpp:jingle:transports:http:0';\nexports.NS_JINGLE_HTTP_UPLOAD_0 = 'urn:xmpp:jingle:transports:http:upload:0';\n// XEP-0371\nexports.NS_JINGLE_ICE_0 = 'urn:xmpp:jingle:transports:ice:0';\n// XEP-0372\nexports.NS_REFERENCE_0 = 'urn:xmpp:reference:0';\n// XEP-0380\nexports.NS_EME_0 = 'urn:xmpp:eme:0';\n// XEP-0382\nexports.NS_SPOILER_0 = 'urn:xmpp:spoiler:0';\n// XEP-0384\nexports.NS_OMEMO_AXOLOTL = 'eu.siacs.conversations.axolotl';\nexports.NS_OMEMO_AXOLOTL_DEVICELIST = 'eu.siacs.conversations.axolotl.devicelist';\nexports.NS_OMEMO_AXOLOTL_BUNDLES = 'eu.siacs.conversations.axolotl.bundles';\n// istanbul ignore next\nconst NS_OMEMO_AXOLOTL_BUNDLE = (deviceId) => `${exports.NS_OMEMO_AXOLOTL_BUNDLES}:${deviceId}`;\nexports.NS_OMEMO_AXOLOTL_BUNDLE = NS_OMEMO_AXOLOTL_BUNDLE;\n// XEP-0432\nexports.NS_JSON_MESSAGE_0 = 'urn:xmpp:json-msg:0';\n// ================================================================\n// Other Standards\n// ================================================================\n// Extensible Resource Descriptor (XRD) Version 1.0\n// http://docs.oasis-open.org/xri/xrd/v1.0/xrd-1.0.html\nexports.NS_XRD = 'http://docs.oasis-open.org/ns/xri/xrd-1.0';\n// ====================================================================\n// Not yet standardized\n// ====================================================================\nexports.NS_JINGLE_RTP_MSID_0 = 'urn:xmpp:jingle:apps:rtp:msid:0';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.pubsubItemContentAliases = exports.extendStanzaError = exports.extendStreamFeatures = exports.extendIQ = exports.extendPresence = exports.extendMessage = exports.addAlias = exports.childJID = exports.childJIDAttribute = exports.JIDAttribute = void 0;\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Types_1 = require(\"./Types\");\n// ====================================================================\n// Useful XMPP Aliases\n// ====================================================================\nexports.JIDAttribute = Types_1.attribute;\nexports.childJIDAttribute = Types_1.childAttribute;\nexports.childJID = Types_1.childText;\n// ====================================================================\n// XMPP Definition Shortcuts\n// ====================================================================\nfunction addAlias(namespace, element, aliases) {\n    return {\n        aliases: Array.isArray(aliases) ? aliases : [aliases],\n        element,\n        fields: {},\n        namespace\n    };\n}\nexports.addAlias = addAlias;\nfunction extendMessage(fields) {\n    return { element: 'message', fields, namespace: Namespaces_1.NS_CLIENT };\n}\nexports.extendMessage = extendMessage;\nfunction extendPresence(fields) {\n    return { element: 'presence', fields, namespace: Namespaces_1.NS_CLIENT };\n}\nexports.extendPresence = extendPresence;\nfunction extendIQ(fields) {\n    return { element: 'iq', fields, namespace: Namespaces_1.NS_CLIENT };\n}\nexports.extendIQ = extendIQ;\nfunction extendStreamFeatures(fields) {\n    return {\n        element: 'features',\n        fields,\n        namespace: Namespaces_1.NS_STREAM\n    };\n}\nexports.extendStreamFeatures = extendStreamFeatures;\nfunction extendStanzaError(fields) {\n    return {\n        element: 'error',\n        fields,\n        namespace: Namespaces_1.NS_STANZAS,\n        path: 'stanzaError'\n    };\n}\nexports.extendStanzaError = extendStanzaError;\nfunction pubsubItemContentAliases() {\n    return [\n        { path: 'pubsubcontent', contextField: 'itemType' },\n        { path: 'pubsubitem.content', contextField: 'itemType' },\n        { path: 'pubsubeventitem.content', contextField: 'itemType' },\n        { path: 'iq.pubsub.publish.items', contextField: 'itemType' }\n    ];\n}\nexports.pubsubItemContentAliases = pubsubItemContentAliases;\n","\"use strict\";\n/**\n * This file is derived from prior work.\n *\n * See NOTICE.md for full license text.\n *\n * Derived from: ltx, Copyright © 2010 Stephan Maka\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst platform_1 = require(\"../platform\");\nconst Element_1 = (0, tslib_1.__importDefault)(require(\"./Element\"));\nconst Error_1 = (0, tslib_1.__importDefault)(require(\"./Error\"));\nconst Parser_1 = (0, tslib_1.__importDefault)(require(\"./Parser\"));\nclass StreamParser extends platform_1.Transform {\n    constructor(opts) {\n        super({ objectMode: true });\n        this.closedStream = false;\n        this.wrappedStream = false;\n        this.registry = opts.registry;\n        this.acceptLanguages = opts.acceptLanguages || [];\n        if (opts.wrappedStream) {\n            this.wrappedStream = true;\n            this.rootImportKey = opts.rootKey;\n        }\n        this.parser = new Parser_1.default({\n            allowComments: opts.allowComments\n        });\n        this.parser.on('error', err => {\n            this.destroy(err);\n        });\n        this.parser.on('startElement', (name, attributes) => {\n            if (this.destroyed) {\n                return;\n            }\n            if (this.closedStream) {\n                return this.destroy(Error_1.default.alreadyClosed());\n            }\n            const el = new Element_1.default(name, attributes);\n            const key = this.registry.getImportKey(el);\n            if (this.wrappedStream && !this.rootElement) {\n                if (this.rootImportKey && key !== this.rootImportKey) {\n                    return this.destroy(Error_1.default.unknownRoot());\n                }\n                const root = this.registry.import(el, {\n                    acceptLanguages: this.acceptLanguages,\n                    lang: this.lang\n                });\n                if (root) {\n                    this.rootElement = el;\n                    this.push({\n                        event: 'stream-start',\n                        kind: key,\n                        stanza: root,\n                        xml: el\n                    });\n                    return;\n                }\n                else {\n                    return this.destroy(Error_1.default.notWellFormed());\n                }\n            }\n            if (!this.currentElement) {\n                this.currentElement = el;\n            }\n            else {\n                this.currentElement = this.currentElement.appendChild(el);\n            }\n        });\n        this.parser.on('endElement', (name) => {\n            if (this.destroyed) {\n                return;\n            }\n            if (this.wrappedStream && !this.currentElement) {\n                if (!this.rootElement || name !== this.rootElement.name) {\n                    this.closedStream = true;\n                    return this.destroy(Error_1.default.notWellFormed());\n                }\n                this.closedStream = true;\n                this.push({\n                    event: 'stream-end',\n                    kind: this.rootImportKey,\n                    stanza: {},\n                    xml: this.rootElement\n                });\n                return this.end();\n            }\n            if (!this.currentElement || name !== this.currentElement.name) {\n                this.closedStream = true;\n                return this.destroy(Error_1.default.notWellFormed());\n            }\n            if (this.currentElement.parent) {\n                this.currentElement = this.currentElement.parent;\n            }\n            else {\n                if (this.wrappedStream) {\n                    this.currentElement.parent = this.rootElement;\n                }\n                const key = this.registry.getImportKey(this.currentElement);\n                const stanza = this.registry.import(this.currentElement, {\n                    acceptLanguages: this.acceptLanguages,\n                    lang: this.lang\n                });\n                if (stanza) {\n                    this.push({\n                        kind: key,\n                        stanza,\n                        xml: this.currentElement\n                    });\n                }\n                this.currentElement = undefined;\n            }\n        });\n        this.parser.on('text', (text) => {\n            if (this.currentElement) {\n                this.currentElement.children.push(text);\n            }\n        });\n    }\n    _transform(chunk, encoding, done) {\n        this.parser.write(chunk.toString());\n        done();\n    }\n}\nexports.default = StreamParser;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.define = exports.XMLElement = exports.Translator = exports.Registry = exports.StreamParser = exports.parse = exports.Parser = void 0;\nconst tslib_1 = require(\"tslib\");\nconst Element_1 = (0, tslib_1.__importDefault)(require(\"./Element\"));\nexports.XMLElement = Element_1.default;\nconst Registry_1 = (0, tslib_1.__importDefault)(require(\"./Registry\"));\nexports.Registry = Registry_1.default;\nconst Translator_1 = (0, tslib_1.__importDefault)(require(\"./Translator\"));\nexports.Translator = Translator_1.default;\n(0, tslib_1.__exportStar)(require(\"./Definitions\"), exports);\n(0, tslib_1.__exportStar)(require(\"./Types\"), exports);\n(0, tslib_1.__exportStar)(require(\"./Helpers\"), exports);\nvar Parser_1 = require(\"./Parser\");\nObject.defineProperty(exports, \"Parser\", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Parser_1).default; } });\nObject.defineProperty(exports, \"parse\", { enumerable: true, get: function () { return Parser_1.parse; } });\nvar StreamParser_1 = require(\"./StreamParser\");\nObject.defineProperty(exports, \"StreamParser\", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(StreamParser_1).default; } });\nfunction define(definitions) {\n    return (registry) => {\n        registry.define(definitions);\n    };\n}\nexports.define = define;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SCRAM = exports.DIGEST = exports.OAUTH = exports.PLAIN = exports.EXTERNAL = exports.ANONYMOUS = exports.Hi = exports.HMAC = exports.H = exports.XOR = exports.createClientNonce = exports.Factory = exports.SimpleMech = void 0;\nconst platform_1 = require(\"../../platform\");\nconst stringprep_1 = require(\"../stringprep\");\nclass SimpleMech {\n    constructor(name) {\n        this.authenticated = false;\n        this.mutuallyAuthenticated = false;\n        this.name = name;\n    }\n    getCacheableCredentials() {\n        return null;\n    }\n    // istanbul ignore next\n    processChallenge(_challenge) {\n        return;\n    }\n    processSuccess(_success) {\n        this.authenticated = true;\n    }\n    finalize() {\n        const result = {\n            authenticated: this.authenticated,\n            mutuallyAuthenticated: this.mutuallyAuthenticated\n        };\n        if (this.errorData) {\n            result.errorData = this.errorData;\n        }\n        return result;\n    }\n}\nexports.SimpleMech = SimpleMech;\nclass Factory {\n    constructor() {\n        this.mechanisms = [];\n    }\n    register(name, constructor, priority) {\n        this.mechanisms.push({\n            constructor,\n            name: name.toUpperCase(),\n            priority: priority\n        });\n        // We want mechanisms with highest priority at the start of the list\n        this.mechanisms.sort((a, b) => b.priority - a.priority);\n    }\n    disable(name) {\n        const mechName = name.toUpperCase();\n        this.mechanisms = this.mechanisms.filter(mech => mech.name !== mechName);\n    }\n    createMechanism(names) {\n        const availableNames = names.map(name => name.toUpperCase());\n        for (const knownMech of this.mechanisms) {\n            for (const availableMechName of availableNames) {\n                if (availableMechName === knownMech.name) {\n                    return new knownMech.constructor(knownMech.name);\n                }\n            }\n        }\n        return null;\n    }\n}\nexports.Factory = Factory;\n// ====================================================================\n// Utility helpers\n// ====================================================================\n// istanbul ignore next\nfunction createClientNonce(length = 32) {\n    return (0, platform_1.randomBytes)(length).toString('hex');\n}\nexports.createClientNonce = createClientNonce;\n// tslint:disable no-bitwise\nfunction XOR(a, b) {\n    const res = [];\n    for (let i = 0; i < a.length; i++) {\n        res.push(a[i] ^ b[i]);\n    }\n    return platform_1.Buffer.from(res);\n}\nexports.XOR = XOR;\n// tslint:enable no-bitwise\nfunction H(text, alg) {\n    return (0, platform_1.createHash)(alg).update(text).digest();\n}\nexports.H = H;\nfunction HMAC(key, msg, alg) {\n    return (0, platform_1.createHmac)(alg, key).update(msg).digest();\n}\nexports.HMAC = HMAC;\nfunction Hi(text, salt, iterations, alg) {\n    let ui1 = HMAC(text, platform_1.Buffer.concat([salt, platform_1.Buffer.from('00000001', 'hex')]), alg);\n    let ui = ui1;\n    for (let i = 0; i < iterations - 1; i++) {\n        ui1 = HMAC(text, ui1, alg);\n        ui = XOR(ui, ui1);\n    }\n    return ui;\n}\nexports.Hi = Hi;\nfunction parse(challenge) {\n    const directives = {};\n    const tokens = challenge.toString().split(/,(?=(?:[^\"]|\"[^\"]*\")*$)/);\n    for (let i = 0, len = tokens.length; i < len; i++) {\n        const directive = /(\\w+)=[\"]?([^\"]+)[\"]?$/.exec(tokens[i]);\n        if (directive) {\n            directives[directive[1]] = directive[2];\n        }\n    }\n    return directives;\n}\nfunction escapeUsername(name) {\n    const escaped = [];\n    for (const curr of name) {\n        if (curr === ',') {\n            escaped.push('=2C');\n        }\n        else if (curr === '=') {\n            escaped.push('=3D');\n        }\n        else {\n            escaped.push(curr);\n        }\n    }\n    return escaped.join('');\n}\n// ====================================================================\n// ANONYMOUS\n// ====================================================================\nclass ANONYMOUS extends SimpleMech {\n    getExpectedCredentials() {\n        return { optional: ['trace'], required: [] };\n    }\n    createResponse(credentials) {\n        return platform_1.Buffer.from(credentials.trace || '');\n    }\n}\nexports.ANONYMOUS = ANONYMOUS;\n// ====================================================================\n// EXTERNAL\n// ====================================================================\nclass EXTERNAL extends SimpleMech {\n    getExpectedCredentials() {\n        return { optional: ['authzid'], required: [] };\n    }\n    createResponse(credentials) {\n        return platform_1.Buffer.from(credentials.authzid || '');\n    }\n}\nexports.EXTERNAL = EXTERNAL;\n// ====================================================================\n// PLAIN\n// ====================================================================\nclass PLAIN extends SimpleMech {\n    getExpectedCredentials() {\n        return {\n            optional: ['authzid'],\n            required: ['username', 'password']\n        };\n    }\n    createResponse(credentials) {\n        return platform_1.Buffer.from((credentials.authzid || '') +\n            '\\x00' +\n            credentials.username +\n            '\\x00' +\n            (credentials.password || credentials.token));\n    }\n}\nexports.PLAIN = PLAIN;\n// ====================================================================\n// OAUTHBEARER\n// ====================================================================\nclass OAUTH extends SimpleMech {\n    constructor(name) {\n        super(name);\n        this.failed = false;\n        this.name = name;\n    }\n    getExpectedCredentials() {\n        return {\n            optional: ['authzid'],\n            required: ['token']\n        };\n    }\n    createResponse(credentials) {\n        if (this.failed) {\n            return platform_1.Buffer.from('\\u0001');\n        }\n        const gs2header = `n,${escapeUsername((0, stringprep_1.saslprep)(credentials.authzid))},`;\n        const auth = `auth=Bearer ${credentials.token}\\u0001`;\n        return platform_1.Buffer.from(gs2header + '\\u0001' + auth + '\\u0001', 'utf8');\n    }\n    processChallenge(challenge) {\n        this.failed = true;\n        this.errorData = JSON.parse(challenge.toString('utf8'));\n    }\n}\nexports.OAUTH = OAUTH;\n// ====================================================================\n// DIGEST-MD5\n// ====================================================================\nclass DIGEST extends SimpleMech {\n    constructor(name) {\n        super(name);\n        this.providesMutualAuthentication = false;\n        this.state = 'INITIAL';\n        this.name = name;\n    }\n    processChallenge(challenge) {\n        this.state = 'CHALLENGE';\n        const values = parse(challenge);\n        this.authenticated = !!values.rspauth;\n        this.realm = values.realm;\n        this.nonce = values.nonce;\n        this.charset = values.charset;\n    }\n    getExpectedCredentials() {\n        return {\n            optional: ['authzid', 'clientNonce', 'realm'],\n            required: ['host', 'password', 'serviceName', 'serviceType', 'username']\n        };\n    }\n    createResponse(credentials) {\n        if (this.state === 'INITIAL' || this.authenticated) {\n            return null;\n        }\n        let uri = credentials.serviceType + '/' + credentials.host;\n        if (credentials.serviceName && credentials.host !== credentials.serviceName) {\n            uri += '/' + credentials.serviceName;\n        }\n        const realm = credentials.realm || this.realm || '';\n        const cnonce = credentials.clientNonce || createClientNonce(16);\n        const nc = '00000001';\n        const qop = 'auth';\n        let str = '';\n        str += 'username=\"' + credentials.username + '\"';\n        if (realm) {\n            str += ',realm=\"' + realm + '\"';\n        }\n        str += ',nonce=\"' + this.nonce + '\"';\n        str += ',cnonce=\"' + cnonce + '\"';\n        str += ',nc=' + nc;\n        str += ',qop=' + qop;\n        str += ',digest-uri=\"' + uri + '\"';\n        const base = (0, platform_1.createHash)('md5')\n            .update(credentials.username)\n            .update(':')\n            .update(realm)\n            .update(':')\n            .update(credentials.password)\n            .digest();\n        const ha1 = (0, platform_1.createHash)('md5')\n            .update(base)\n            .update(':')\n            .update(this.nonce)\n            .update(':')\n            .update(cnonce);\n        if (credentials.authzid) {\n            ha1.update(':').update(credentials.authzid);\n        }\n        const dha1 = ha1.digest('hex');\n        const ha2 = (0, platform_1.createHash)('md5').update('AUTHENTICATE:').update(uri);\n        const dha2 = ha2.digest('hex');\n        const digest = (0, platform_1.createHash)('md5')\n            .update(dha1)\n            .update(':')\n            .update(this.nonce)\n            .update(':')\n            .update(nc)\n            .update(':')\n            .update(cnonce)\n            .update(':')\n            .update(qop)\n            .update(':')\n            .update(dha2)\n            .digest('hex');\n        str += ',response=' + digest;\n        if (this.charset === 'utf-8') {\n            str += ',charset=utf-8';\n        }\n        if (credentials.authzid) {\n            str += ',authzid=\"' + credentials.authzid + '\"';\n        }\n        return platform_1.Buffer.from(str);\n    }\n}\nexports.DIGEST = DIGEST;\n// ====================================================================\n// SCRAM-SHA-1(-PLUS)\n// ====================================================================\nclass SCRAM {\n    constructor(name) {\n        this.providesMutualAuthentication = true;\n        this.name = name;\n        this.state = 'INITIAL';\n        this.useChannelBinding = this.name.toLowerCase().endsWith('-plus');\n        this.algorithm = this.name.toLowerCase().split('scram-')[1].split('-plus')[0];\n    }\n    getExpectedCredentials() {\n        const optional = ['authzid', 'clientNonce'];\n        const required = ['username', 'password'];\n        if (this.useChannelBinding) {\n            required.push('tlsUnique');\n        }\n        return {\n            optional,\n            required\n        };\n    }\n    getCacheableCredentials() {\n        return this.cache;\n    }\n    createResponse(credentials) {\n        if (this.state === 'INITIAL') {\n            return this.initialResponse(credentials);\n        }\n        return this.challengeResponse(credentials);\n    }\n    processChallenge(challenge) {\n        const values = parse(challenge);\n        this.salt = platform_1.Buffer.from(values.s || '', 'base64');\n        this.iterationCount = parseInt(values.i, 10);\n        this.nonce = values.r;\n        this.verifier = values.v;\n        this.error = values.e;\n        this.challenge = challenge;\n    }\n    processSuccess(success) {\n        this.processChallenge(success);\n    }\n    finalize() {\n        if (!this.verifier) {\n            return {\n                authenticated: false,\n                error: this.error,\n                mutuallyAuthenticated: false\n            };\n        }\n        if (this.serverSignature.toString('base64') !== this.verifier) {\n            return {\n                authenticated: false,\n                error: 'Mutual authentication failed',\n                mutuallyAuthenticated: false\n            };\n        }\n        return {\n            authenticated: true,\n            mutuallyAuthenticated: true\n        };\n    }\n    initialResponse(credentials) {\n        const authzid = escapeUsername((0, stringprep_1.saslprep)(credentials.authzid));\n        const username = escapeUsername((0, stringprep_1.saslprep)(credentials.username));\n        this.clientNonce = credentials.clientNonce || createClientNonce();\n        let cbindHeader = 'n';\n        if (credentials.tlsUnique) {\n            if (!this.useChannelBinding) {\n                cbindHeader = 'y';\n            }\n            else {\n                cbindHeader = 'p=tls-unique';\n            }\n        }\n        this.gs2Header = platform_1.Buffer.from(authzid ? `${cbindHeader},a=${authzid},` : `${cbindHeader},,`);\n        this.clientFirstMessageBare = platform_1.Buffer.from(`n=${username},r=${this.clientNonce}`);\n        const result = platform_1.Buffer.concat([this.gs2Header, this.clientFirstMessageBare]);\n        this.state = 'CHALLENGE';\n        return result;\n    }\n    challengeResponse(credentials) {\n        const CLIENT_KEY = platform_1.Buffer.from('Client Key');\n        const SERVER_KEY = platform_1.Buffer.from('Server Key');\n        const cbindData = platform_1.Buffer.concat([\n            this.gs2Header,\n            credentials.tlsUnique || platform_1.Buffer.from('')\n        ]).toString('base64');\n        const clientFinalMessageWithoutProof = platform_1.Buffer.from(`c=${cbindData},r=${this.nonce}`);\n        let saltedPassword;\n        let clientKey;\n        let serverKey;\n        // If our cached salt is the same, we can reuse cached credentials to speed\n        // up the hashing process.\n        const cached = credentials.salt && platform_1.Buffer.compare(credentials.salt, this.salt) === 0;\n        if (cached && credentials.clientKey && credentials.serverKey) {\n            clientKey = platform_1.Buffer.from(credentials.clientKey);\n            serverKey = platform_1.Buffer.from(credentials.serverKey);\n        }\n        else if (cached && credentials.saltedPassword) {\n            saltedPassword = platform_1.Buffer.from(credentials.saltedPassword);\n            clientKey = HMAC(saltedPassword, CLIENT_KEY, this.algorithm);\n            serverKey = HMAC(saltedPassword, SERVER_KEY, this.algorithm);\n        }\n        else {\n            saltedPassword = Hi(platform_1.Buffer.from((0, stringprep_1.saslprep)(credentials.password)), this.salt, this.iterationCount, this.algorithm);\n            clientKey = HMAC(saltedPassword, CLIENT_KEY, this.algorithm);\n            serverKey = HMAC(saltedPassword, SERVER_KEY, this.algorithm);\n        }\n        const storedKey = H(clientKey, this.algorithm);\n        const separator = platform_1.Buffer.from(',');\n        const authMessage = platform_1.Buffer.concat([\n            this.clientFirstMessageBare,\n            separator,\n            this.challenge,\n            separator,\n            clientFinalMessageWithoutProof\n        ]);\n        const clientSignature = HMAC(storedKey, authMessage, this.algorithm);\n        const clientProof = XOR(clientKey, clientSignature).toString('base64');\n        this.serverSignature = HMAC(serverKey, authMessage, this.algorithm);\n        const result = platform_1.Buffer.concat([\n            clientFinalMessageWithoutProof,\n            platform_1.Buffer.from(`,p=${clientProof}`)\n        ]);\n        this.state = 'FINAL';\n        this.cache = {\n            clientKey,\n            salt: this.salt,\n            saltedPassword,\n            serverKey\n        };\n        return result;\n    }\n}\nexports.SCRAM = SCRAM;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Namespaces_1 = require(\"../Namespaces\");\nfunction default_1(client) {\n    client.getAccountInfo = async (jid) => {\n        const resp = await client.sendIQ({\n            account: {},\n            to: jid,\n            type: 'get'\n        });\n        return resp.account;\n    };\n    client.updateAccount = (jid, data) => {\n        return client.sendIQ({\n            account: data,\n            to: jid,\n            type: 'set'\n        });\n    };\n    client.deleteAccount = (jid) => {\n        return client.sendIQ({\n            account: {\n                remove: true\n            },\n            to: jid,\n            type: 'set'\n        });\n    };\n    client.getPrivateData = async (key) => {\n        const res = await client.sendIQ({\n            privateStorage: {\n                [key]: {}\n            },\n            type: 'get'\n        });\n        return res.privateStorage[key];\n    };\n    client.setPrivateData = async (key, value) => {\n        return client.sendIQ({\n            privateStorage: {\n                [key]: value\n            },\n            type: 'set'\n        });\n    };\n    client.getVCard = async (jid) => {\n        const resp = await client.sendIQ({\n            to: jid,\n            type: 'get',\n            vcard: {\n                format: Namespaces_1.NS_VCARD_TEMP\n            }\n        });\n        return resp.vcard;\n    };\n    client.publishVCard = async (vcard) => {\n        await client.sendIQ({\n            type: 'set',\n            vcard\n        });\n    };\n    client.enableNotifications = (jid, node, fieldList = []) => {\n        return client.sendIQ({\n            push: {\n                action: 'enable',\n                form: {\n                    fields: [\n                        {\n                            name: 'FORM_TYPE',\n                            type: 'hidden',\n                            value: 'http://jabber.org/protocol/pubsub#publish-options'\n                        },\n                        ...fieldList\n                    ],\n                    type: 'submit'\n                },\n                jid,\n                node\n            },\n            type: 'set'\n        });\n    };\n    client.disableNotifications = (jid, node) => {\n        return client.sendIQ({\n            push: {\n                action: 'disable',\n                jid,\n                node\n            },\n            type: 'set'\n        });\n    };\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Namespaces_1 = require(\"../Namespaces\");\nfunction default_1(client) {\n    client.disco.addFeature((0, Namespaces_1.NS_PEP_NOTIFY)(Namespaces_1.NS_AVATAR_METADATA));\n    client.on('pubsub:published', msg => {\n        if (msg.pubsub.items.node !== Namespaces_1.NS_AVATAR_METADATA) {\n            return;\n        }\n        const info = msg.pubsub.items.published[0].content;\n        client.emit('avatar', {\n            avatars: info.versions || [],\n            jid: msg.from,\n            source: 'pubsub'\n        });\n    });\n    client.on('presence', pres => {\n        if (pres.vcardAvatar && typeof pres.vcardAvatar === 'string') {\n            client.emit('avatar', {\n                avatars: [\n                    {\n                        id: pres.vcardAvatar\n                    }\n                ],\n                jid: pres.from,\n                source: 'vcard'\n            });\n        }\n    });\n    client.publishAvatar = (id, data) => {\n        return client.publish('', Namespaces_1.NS_AVATAR_DATA, {\n            data,\n            itemType: Namespaces_1.NS_AVATAR_DATA\n        }, id);\n    };\n    client.useAvatars = (versions, pointers = []) => {\n        return client.publish('', Namespaces_1.NS_AVATAR_METADATA, {\n            itemType: Namespaces_1.NS_AVATAR_METADATA,\n            pointers,\n            versions\n        }, 'current');\n    };\n    client.getAvatar = (jid, id) => {\n        return client.getItem(jid, Namespaces_1.NS_AVATAR_DATA, id);\n    };\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction default_1(client) {\n    client.registerFeature('bind', 300, async (features, cb) => {\n        try {\n            const resp = await client.sendIQ({\n                bind: {\n                    resource: client.config.resource\n                },\n                type: 'set'\n            });\n            client.features.negotiated.bind = true;\n            client.emit('session:prebind', resp.bind.jid);\n            const canStartSession = !features.legacySession ||\n                (features.legacySession && features.legacySession.optional);\n            if (!client.sessionStarted && canStartSession) {\n                client.emit('session:started', client.jid);\n            }\n            return cb();\n        }\n        catch (err) {\n            console.error(err);\n            return cb('disconnect', 'JID binding failed');\n        }\n    });\n    client.registerFeature('legacySession', 1000, async (features, cb) => {\n        if (client.sessionStarted || (features.legacySession && features.legacySession.optional)) {\n            client.features.negotiated.session = true;\n            return cb();\n        }\n        try {\n            await client.sendIQ({\n                legacySession: true,\n                type: 'set'\n            });\n            client.features.negotiated.session = true;\n            if (!client.sessionStarted) {\n                client.sessionStarted = true;\n                client.emit('session:started', client.jid);\n            }\n            return cb();\n        }\n        catch (err) {\n            return cb('disconnect', 'Session requeset failed');\n        }\n    });\n    client.on('session:started', () => {\n        client.sessionStarted = true;\n    });\n    client.on('session:prebind', boundJID => {\n        client.jid = boundJID;\n        client.emit('session:bound', client.jid);\n    });\n    client.on('--reset-stream-features', () => {\n        client.sessionStarted = false;\n        client.features.negotiated.bind = false;\n        client.features.negotiated.session = false;\n    });\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Namespaces_1 = require(\"../Namespaces\");\nfunction default_1(client) {\n    client.disco.addFeature(Namespaces_1.NS_ADHOC_COMMANDS);\n    client.disco.addItem({\n        name: 'Ad-Hoc Commands',\n        node: Namespaces_1.NS_ADHOC_COMMANDS\n    });\n    client.getCommands = (jid) => {\n        return client.getDiscoItems(jid, Namespaces_1.NS_ADHOC_COMMANDS);\n    };\n}\nexports.default = default_1;\n","\"use strict\";\n/**\n * Portions of this file are derived from prior work.\n *\n * See NOTICE.md for full license text.\n *\n * Derived from:\n * - uuid, Copyright (c) 2010-2016 Robert Kieffer and other contributors\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reviveData = exports.uuid = exports.octetCompare = exports.sleep = exports.shuffle = exports.promiseAny = exports.timeoutPromise = void 0;\n// tslint:disable no-bitwise\nconst platform_1 = require(\"./platform\");\nconst bth = [];\nfor (let i = 0; i < 256; ++i) {\n    bth[i] = (i + 0x100).toString(16).substr(1);\n}\nasync function timeoutPromise(target, delay, rejectValue = () => undefined) {\n    let timeoutRef;\n    const result = await Promise.race([\n        target,\n        new Promise((resolve, reject) => {\n            timeoutRef = setTimeout(() => reject(rejectValue()), delay);\n        })\n    ]);\n    clearTimeout(timeoutRef);\n    return result;\n}\nexports.timeoutPromise = timeoutPromise;\nasync function promiseAny(promises) {\n    try {\n        const errors = await Promise.all(promises.map(p => {\n            return p.then(val => Promise.reject(val), err => Promise.resolve(err));\n        }));\n        return Promise.reject(errors);\n    }\n    catch (val) {\n        return Promise.resolve(val);\n    }\n}\nexports.promiseAny = promiseAny;\nfunction shuffle(array) {\n    let end = array.length;\n    while (end > 0) {\n        const selected = Math.floor(Math.random() * end);\n        end -= 1;\n        const tmp = array[end];\n        array[end] = array[selected];\n        array[selected] = tmp;\n    }\n    return array;\n}\nexports.shuffle = shuffle;\nasync function sleep(time) {\n    return new Promise(resolve => {\n        setTimeout(() => resolve(), time);\n    });\n}\nexports.sleep = sleep;\nfunction octetCompare(str1, str2) {\n    const b1 = typeof str1 === 'string' ? platform_1.Buffer.from(str1, 'utf8') : str1;\n    const b2 = typeof str2 === 'string' ? platform_1.Buffer.from(str2, 'utf8') : str2;\n    return b1.compare(b2);\n}\nexports.octetCompare = octetCompare;\nfunction uuid() {\n    const buf = (0, platform_1.randomBytes)(16);\n    // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n    buf[6] = (buf[6] & 0x0f) | 0x40;\n    buf[8] = (buf[8] & 0x3f) | 0x80;\n    let i = 0;\n    return [\n        bth[buf[i++]],\n        bth[buf[i++]],\n        bth[buf[i++]],\n        bth[buf[i++]],\n        '-',\n        bth[buf[i++]],\n        bth[buf[i++]],\n        '-',\n        bth[buf[i++]],\n        bth[buf[i++]],\n        '-',\n        bth[buf[i++]],\n        bth[buf[i++]],\n        '-',\n        bth[buf[i++]],\n        bth[buf[i++]],\n        bth[buf[i++]],\n        bth[buf[i++]],\n        bth[buf[i++]],\n        bth[buf[i]]\n    ].join('');\n}\nexports.uuid = uuid;\nconst DATE_FIELDS = new Set([\n    'date',\n    'expires',\n    'httpUploadRetry',\n    'idleSince',\n    'published',\n    'since',\n    'stamp',\n    'timestamp',\n    'updated',\n    'utc'\n]);\nconst ISO_DT = /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)(?:Z|((\\+|-)([\\d|:]*)))?$/;\nfunction reviveData(key, value) {\n    if (DATE_FIELDS.has(key) && value && typeof value === 'string' && ISO_DT.test(value)) {\n        return new Date(value);\n    }\n    if (value &&\n        typeof value === 'object' &&\n        value.type === 'Buffer' &&\n        Array.isArray(value.data)) {\n        return platform_1.Buffer.from(value);\n    }\n    return value;\n}\nexports.reviveData = reviveData;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Utils_1 = require(\"../Utils\");\nasync function checkConnection(client) {\n    if (client.sm.started) {\n        return new Promise(resolve => {\n            client.once('stream:management:ack', () => resolve());\n            client.sm.request();\n        });\n    }\n    try {\n        await client.ping();\n    }\n    catch (err) {\n        if (err.error && err.error.condition !== 'timeout') {\n            return;\n        }\n        else {\n            throw err;\n        }\n    }\n}\nfunction sendCSI(client, type) {\n    if (client.features.negotiated.clientStateIndication) {\n        client.send('csi', {\n            type\n        });\n    }\n}\nfunction default_1(client) {\n    client.disco.addFeature(Namespaces_1.NS_PING);\n    client.on('iq:get:ping', iq => {\n        client.sendIQResult(iq);\n    });\n    client.on('--reset-stream-features', () => {\n        client._stopKeepAliveInterval();\n        client.features.negotiated.streamManagement = false;\n        client.features.negotiated.clientStateIndication = false;\n    });\n    client.markActive = () => sendCSI(client, 'active');\n    client.markInactive = () => sendCSI(client, 'inactive');\n    client.ping = async (jid) => {\n        await client.sendIQ({\n            ping: true,\n            to: jid,\n            type: 'get'\n        });\n    };\n    client.enableKeepAlive = (opts = {}) => {\n        client._keepAliveOptions = opts;\n        // Ping every 5 minutes\n        const interval = opts.interval || 300;\n        // Disconnect if no response in 15 seconds\n        const timeout = opts.timeout || client.config.timeout || 15;\n        async function keepalive() {\n            if (client.sessionStarted) {\n                try {\n                    await (0, Utils_1.timeoutPromise)(checkConnection(client), timeout * 1000);\n                }\n                catch (err) {\n                    // Kill the apparently dead connection without closing\n                    // the stream itself so we can reconnect and potentially\n                    // resume the session.\n                    client.emit('stream:error', {\n                        condition: 'connection-timeout',\n                        text: 'Server did not respond in ' + timeout + ' seconds'\n                    });\n                    if (client.transport) {\n                        client.transport.hasStream = false;\n                        client.transport.disconnect(false);\n                    }\n                }\n            }\n        }\n        clearInterval(client._keepAliveInterval);\n        client._keepAliveInterval = setInterval(keepalive, interval * 1000);\n    };\n    client._stopKeepAliveInterval = () => {\n        if (client._keepAliveInterval) {\n            clearInterval(client._keepAliveInterval);\n            delete client._keepAliveInterval;\n        }\n    };\n    client.disableKeepAlive = () => {\n        delete client._keepAliveOptions;\n        client._stopKeepAliveInterval();\n    };\n    client.on('stream:management:resumed', () => {\n        client._keepAliveOptions && client.enableKeepAlive(client._keepAliveOptions);\n    });\n    client.on('stream:start', () => {\n        client._keepAliveOptions && client.enableKeepAlive(client._keepAliveOptions);\n    });\n    const smacks = async (features, done) => {\n        if (!client.config.useStreamManagement) {\n            return done();\n        }\n        const smHandler = async (sm) => {\n            switch (sm.type) {\n                case 'enabled':\n                    await client.sm.enabled(sm);\n                    client.features.negotiated.streamManagement = true;\n                    client.off('sm', smHandler);\n                    return done();\n                case 'resumed':\n                    await client.sm.resumed(sm);\n                    client.features.negotiated.streamManagement = true;\n                    client.features.negotiated.bind = true;\n                    client.sessionStarted = true;\n                    client.sessionStarting = false;\n                    client.off('sm', smHandler);\n                    client.emit('stream:management:resumed', sm);\n                    return done('break'); // Halt further processing of stream features\n                case 'failed':\n                    await client.sm.failed(sm);\n                    client.off('sm', smHandler);\n                    client.emit('session:end');\n                    done();\n            }\n        };\n        client.on('sm', smHandler);\n        if (!client.sm.id) {\n            if (client.features.negotiated.bind) {\n                await client.sm.enable();\n            }\n            else {\n                client.off('sm', smHandler);\n                done();\n            }\n        }\n        else if (client.sm.id && client.sm.allowResume) {\n            await client.sm.resume();\n        }\n        else {\n            client.off('sm', smHandler);\n            done();\n        }\n    };\n    client.registerFeature('streamManagement', 200, smacks);\n    client.registerFeature('streamManagement', 500, smacks);\n    client.registerFeature('clientStateIndication', 400, (features, cb) => {\n        client.features.negotiated.clientStateIndication = true;\n        cb();\n    });\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.verify = exports.generate = void 0;\nconst platform_1 = require(\"../platform\");\nconst Utils_1 = require(\"../Utils\");\nfunction escape(value) {\n    return platform_1.Buffer.from(value.replace(/</g, '&lt;'), 'utf-8');\n}\nfunction encodeIdentities(identities = []) {\n    const result = [];\n    const existing = new Set();\n    for (const { category, type, lang, name } of identities) {\n        const encoded = `${category}/${type}/${lang || ''}/${name || ''}`;\n        if (existing.has(encoded)) {\n            return null;\n        }\n        existing.add(encoded);\n        result.push(escape(encoded));\n    }\n    result.sort(Utils_1.octetCompare);\n    return result;\n}\nfunction encodeFeatures(features = []) {\n    const result = [];\n    const existing = new Set();\n    for (const feature of features) {\n        if (existing.has(feature)) {\n            return null;\n        }\n        existing.add(feature);\n        result.push(escape(feature));\n    }\n    result.sort(Utils_1.octetCompare);\n    return result;\n}\nfunction encodeFields(fields = []) {\n    const sortedFields = [];\n    for (const field of fields) {\n        if (field.name === 'FORM_TYPE') {\n            continue;\n        }\n        if (field.rawValues) {\n            sortedFields.push({\n                name: escape(field.name),\n                values: field.rawValues.map(val => escape(val)).sort(Utils_1.octetCompare)\n            });\n        }\n        else if (Array.isArray(field.value)) {\n            sortedFields.push({\n                name: escape(field.name),\n                values: field.value.map(val => escape(val)).sort(Utils_1.octetCompare)\n            });\n        }\n        else if (field.value === true || field.value === false) {\n            sortedFields.push({\n                name: escape(field.name),\n                values: [escape(field.value ? '1' : '0')]\n            });\n        }\n        else {\n            sortedFields.push({\n                name: escape(field.name),\n                values: [escape(field.value || '')]\n            });\n        }\n    }\n    sortedFields.sort((a, b) => (0, Utils_1.octetCompare)(a.name, b.name));\n    const result = [];\n    for (const field of sortedFields) {\n        result.push(field.name);\n        for (const value of field.values) {\n            result.push(value);\n        }\n    }\n    return result;\n}\nfunction encodeForms(extensions = []) {\n    const forms = [];\n    const types = new Set();\n    for (const form of extensions) {\n        let type;\n        for (const field of form.fields || []) {\n            if (!(field.name === 'FORM_TYPE' && field.type === 'hidden')) {\n                continue;\n            }\n            if (field.rawValues && field.rawValues.length === 1) {\n                type = escape(field.rawValues[0]);\n                break;\n            }\n            if (field.value && typeof field.value === 'string') {\n                type = escape(field.value);\n                break;\n            }\n        }\n        if (!type) {\n            continue;\n        }\n        if (types.has(type.toString())) {\n            return null;\n        }\n        types.add(type.toString());\n        forms.push({ type, form });\n    }\n    forms.sort((a, b) => (0, Utils_1.octetCompare)(a.type, b.type));\n    const results = [];\n    for (const form of forms) {\n        results.push(form.type);\n        const fields = encodeFields(form.form.fields);\n        for (const field of fields) {\n            results.push(field);\n        }\n    }\n    return results;\n}\nfunction generate(info, hashName) {\n    const S = [];\n    const separator = platform_1.Buffer.from('<', 'utf8');\n    const append = (b1) => {\n        S.push(b1);\n        S.push(separator);\n    };\n    const identities = encodeIdentities(info.identities);\n    const features = encodeFeatures(info.features);\n    const extensions = encodeForms(info.extensions);\n    if (!identities || !features || !extensions) {\n        return null;\n    }\n    for (const id of identities) {\n        append(id);\n    }\n    for (const feature of features) {\n        append(feature);\n    }\n    for (const form of extensions) {\n        append(form);\n    }\n    return (0, platform_1.createHash)(hashName).update(platform_1.Buffer.concat(S)).digest('base64');\n}\nexports.generate = generate;\nfunction verify(info, hashName, check) {\n    const computed = generate(info, hashName);\n    return !!computed && computed === check;\n}\nexports.verify = verify;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst EntityCaps = (0, tslib_1.__importStar)(require(\"./LegacyEntityCapabilities\"));\nclass Disco {\n    constructor() {\n        this.capsAlgorithms = ['sha-1'];\n        this.features = new Map();\n        this.identities = new Map();\n        this.extensions = new Map();\n        this.items = new Map();\n        this.caps = new Map();\n        this.features.set('', new Set());\n        this.identities.set('', []);\n        this.extensions.set('', []);\n    }\n    getNodeInfo(node) {\n        return {\n            extensions: [...(this.extensions.get(node) || [])],\n            features: [...(this.features.get(node) || [])],\n            identities: [...(this.identities.get(node) || [])]\n        };\n    }\n    addFeature(feature, node = '') {\n        if (!this.features.has(node)) {\n            this.features.set(node, new Set());\n        }\n        this.features.get(node).add(feature);\n    }\n    addIdentity(identity, node = '') {\n        if (!this.identities.has(node)) {\n            this.identities.set(node, []);\n        }\n        this.identities.get(node).push(identity);\n    }\n    addItem(item, node = '') {\n        if (!this.items.has(node)) {\n            this.items.set(node, []);\n        }\n        this.items.get(node).push(item);\n    }\n    addExtension(form, node = '') {\n        if (!this.extensions.has(node)) {\n            this.extensions.set(node, []);\n        }\n        this.extensions.get(node).push(form);\n    }\n    updateCaps(node, algorithms = this.capsAlgorithms) {\n        const info = {\n            extensions: [...this.extensions.get('')],\n            features: [...this.features.get('')],\n            identities: [...this.identities.get('')],\n            type: 'info'\n        };\n        for (const algorithm of algorithms) {\n            const version = EntityCaps.generate(info, algorithm);\n            if (!version) {\n                this.caps.delete(algorithm);\n                continue;\n            }\n            this.caps.set(algorithm, {\n                algorithm,\n                node,\n                value: version\n            });\n            const hashedNode = `${node}#${version}`;\n            for (const feature of info.features) {\n                this.addFeature(feature, hashedNode);\n            }\n            for (const identity of info.identities) {\n                this.addIdentity(identity, hashedNode);\n            }\n            for (const form of info.extensions) {\n                this.addExtension(form, hashedNode);\n            }\n            this.identities.set(hashedNode, info.identities);\n            this.features.set(hashedNode, new Set(info.features));\n            this.extensions.set(hashedNode, info.extensions);\n        }\n        return [...this.caps.values()];\n    }\n    getCaps() {\n        return [...this.caps.values()];\n    }\n}\nexports.default = Disco;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst DiscoManager_1 = (0, tslib_1.__importDefault)(require(\"../helpers/DiscoManager\"));\nconst JID = (0, tslib_1.__importStar)(require(\"../JID\"));\nconst Namespaces_1 = require(\"../Namespaces\");\nfunction default_1(client) {\n    client.disco = new DiscoManager_1.default();\n    client.disco.addFeature(Namespaces_1.NS_DISCO_INFO);\n    client.disco.addFeature(Namespaces_1.NS_DISCO_ITEMS);\n    client.disco.addIdentity({\n        category: 'client',\n        type: 'web'\n    });\n    client.registerFeature('caps', 100, (features, done) => {\n        const domain = JID.getDomain(client.jid) || client.config.server;\n        client.emit('disco:caps', {\n            caps: features.legacyCapabilities || [],\n            jid: domain\n        });\n        client.features.negotiated.caps = true;\n        done();\n    });\n    client.getDiscoInfo = async (jid, node) => {\n        const resp = await client.sendIQ({\n            disco: {\n                node,\n                type: 'info'\n            },\n            to: jid,\n            type: 'get'\n        });\n        return {\n            extensions: [],\n            features: [],\n            identities: [],\n            ...resp.disco\n        };\n    };\n    client.getDiscoItems = async (jid, node) => {\n        const resp = await client.sendIQ({\n            disco: {\n                node,\n                type: 'items'\n            },\n            to: jid,\n            type: 'get'\n        });\n        return {\n            items: [],\n            ...resp.disco\n        };\n    };\n    client.updateCaps = () => {\n        const node = client.config.capsNode || 'https://stanzajs.org';\n        return client.disco.updateCaps(node);\n    };\n    client.getCurrentCaps = () => {\n        const caps = client.disco.getCaps();\n        if (!caps) {\n            return;\n        }\n        const node = `${caps[0].node}#${caps[0].value}`;\n        return {\n            info: client.disco.getNodeInfo(node),\n            legacyCapabilities: caps\n        };\n    };\n    client.on('presence', pres => {\n        if (pres.legacyCapabilities) {\n            client.emit('disco:caps', {\n                caps: pres.legacyCapabilities,\n                jid: pres.from\n            });\n        }\n    });\n    client.on('iq:get:disco', iq => {\n        const { type, node } = iq.disco;\n        if (type === 'info') {\n            client.sendIQResult(iq, {\n                disco: {\n                    ...client.disco.getNodeInfo(node || ''),\n                    node,\n                    type: 'info'\n                }\n            });\n        }\n        if (type === 'items') {\n            client.sendIQResult(iq, {\n                disco: {\n                    items: client.disco.items.get(node || '') || [],\n                    type: 'items'\n                }\n            });\n        }\n    });\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.directionToSenders = exports.sendersToDirection = exports.JINGLE_INFO_RECEIVED_5 = exports.JINGLE_INFO_CHECKSUM_5 = exports.JINGLE_INFO_RINGING = exports.JINGLE_INFO_ACTIVE = exports.JINGLE_INFO_UNHOLD = exports.JINGLE_INFO_HOLD = exports.JINGLE_INFO_UNMUTE = exports.JINGLE_INFO_MUTE = exports.JINGLE_INFO = exports.USER_ACTIVITY_SPECIFIC = exports.USER_ACTIVITY_GENERAL = exports.USER_MOODS = exports.JingleReasonCondition = exports.JingleErrorCondition = exports.JingleAction = exports.JingleContentSenders = exports.JingleApplicationDirection = exports.JingleSessionRole = exports.ChatState = exports.PubsubErrorCondition = exports.MUCStatusCode = exports.MUCRole = exports.MUCAffiliation = exports.DataFormFieldType = exports.DataFormType = exports.RosterSubscription = exports.PresenceShow = exports.IQType = exports.PresenceType = exports.MessageType = exports.StanzaErrorCondition = exports.StreamErrorCondition = exports.SASLFailureCondition = exports.StreamType = exports.VERSION = void 0;\nconst Namespaces_1 = require(\"./Namespaces\");\nexports.VERSION = '12.20.0';\n// ====================================================================\n// Frequently Used Values\n// ====================================================================\nconst NotAuthorized = 'not-authorized';\n// ====================================================================\n// Named Enum Constants\n// ====================================================================\nexports.StreamType = {\n    Bosh: Namespaces_1.NS_BOSH,\n    Client: Namespaces_1.NS_CLIENT,\n    Component: Namespaces_1.NS_COMPONENT,\n    Server: Namespaces_1.NS_SERVER\n};\nexports.SASLFailureCondition = {\n    AccountDisabled: 'account-disabled',\n    CredentialsExpired: 'credentials-expired',\n    EncryptionRequired: 'encryption-required',\n    IncorrectEncoding: 'incorrect-encoding',\n    InvalidAuthzid: 'invalid-authzid',\n    InvalidMechanism: 'invalid-mechanism',\n    MalformedRequest: 'malformed-request',\n    MechanismTooWeak: 'mechanism-too-weak',\n    NotAuthorized,\n    TemporaryAuthFailure: 'temporary-auth-failure'\n};\nexports.StreamErrorCondition = {\n    BadFormat: 'bad-format',\n    BadNamespacePrefix: 'bad-namespace-prefix',\n    Conflict: 'conflict',\n    ConnectionTimeout: 'connection-timeout',\n    HostGone: 'host-gone',\n    HostUnknown: 'host-unknown',\n    ImproperAddressing: 'improper-addressing',\n    InternalServerError: 'internal-server-error',\n    InvalidFrom: 'invalid-from',\n    InvalidId: 'invalid-id',\n    InvalidNamespace: 'invalid-namespace',\n    InvalidXML: 'invalid-xml',\n    NotAuthorized,\n    NotWellFormed: 'not-well-formed',\n    PolicyViolation: 'policy-violation',\n    RemoteConnectionFailed: 'remote-connection-failed',\n    Reset: 'reset',\n    ResourceConstraint: 'resource-constraint',\n    RestrictedXML: 'restricted-xml',\n    SeeOtherHost: 'see-other-host',\n    SystemShutdown: 'system-shutdown',\n    UndefinedCondition: 'undefined-condition',\n    UnsupportedEncoding: 'unsupported-encoding',\n    UnsupportedStanzaType: 'unsupported-stanza-type',\n    UnsupportedVersion: 'unsupported-version'\n};\nexports.StanzaErrorCondition = {\n    BadRequest: 'bad-request',\n    Conflict: 'conflict',\n    FeatureNotImplemented: 'feature-not-implemented',\n    Forbidden: 'forbidden',\n    Gone: 'gone',\n    InternalServerError: 'internal-server-error',\n    ItemNotFound: 'item-not-found',\n    JIDMalformed: 'jid-malformed',\n    NotAcceptable: 'not-acceptable',\n    NotAllowed: 'not-allowed',\n    NotAuthorized,\n    PolicyViolation: 'policy-violation',\n    RecipientUnavailable: 'recipient-unavailable',\n    Redirect: 'redirect',\n    RegistrationRequired: 'registration-required',\n    RemoteServerNotFound: 'remote-server-not-found',\n    RemoteServerTimeout: 'remote-server-timeout',\n    ResourceConstraint: 'resource-constraint',\n    ServiceUnavailable: 'service-unavailable',\n    SubscriptionRequired: 'subscription-required',\n    UndefinedCondition: 'undefined-condition',\n    UnexpectedRequest: 'unexpected-request'\n};\nexports.MessageType = {\n    Chat: 'chat',\n    Error: 'error',\n    GroupChat: 'groupchat',\n    Headline: 'headline',\n    Normal: 'normal'\n};\nexports.PresenceType = {\n    Available: undefined,\n    Error: 'error',\n    Probe: 'probe',\n    Subscribe: 'subscribe',\n    Subscribed: 'subscribed',\n    Unavailable: 'unavailable',\n    Unsubscribe: 'unsubscribe',\n    Unsubscribed: 'unsubscribed'\n};\nexports.IQType = {\n    Error: 'error',\n    Get: 'get',\n    Result: 'result',\n    Set: 'set'\n};\nexports.PresenceShow = {\n    Away: 'away',\n    Chat: 'chat',\n    DoNotDisturb: 'dnd',\n    ExtendedAway: 'xa'\n};\nexports.RosterSubscription = {\n    Both: 'both',\n    From: 'from',\n    None: 'none',\n    ReceivePresenceOnly: 'to',\n    Remove: 'remove',\n    SendAndReceivePresence: 'both',\n    SendPresenceOnly: 'from',\n    To: 'to'\n};\nexports.DataFormType = {\n    Cancel: 'cancel',\n    Form: 'form',\n    Result: 'result',\n    Submit: 'submit'\n};\nexports.DataFormFieldType = {\n    Boolean: 'boolean',\n    Fixed: 'fixed',\n    Hidden: 'hidden',\n    JID: 'jid-single',\n    JIDMultiple: 'jid-multi',\n    List: 'list-single',\n    ListMultiple: 'list-multi',\n    Password: 'text-private',\n    Text: 'text-single',\n    TextMultiple: 'text-multi',\n    TextPrivate: 'text-private'\n};\nexports.MUCAffiliation = {\n    Admin: 'admin',\n    Banned: 'outcast',\n    Member: 'member',\n    None: 'none',\n    Outcast: 'outcast',\n    Owner: 'owner'\n};\nexports.MUCRole = {\n    Moderator: 'moderator',\n    None: 'none',\n    Participant: 'participant',\n    Visitor: 'visitor'\n};\nexports.MUCStatusCode = {\n    AffiliationChanged: '101',\n    AffiliationLost: '321',\n    Banned: '301',\n    Error: '333',\n    Kicked: '307',\n    LoggingDisabled: '171',\n    LoggingEnabled: '170',\n    MembershipLost: '322',\n    NickChanged: '303',\n    NickChangedByService: '210',\n    NonAnonymous: '172',\n    NonAnonymousRoom: '100',\n    NonPrivacyConfigurationChange: '104',\n    RoomCreated: '201',\n    SelfPresence: '110',\n    SemiAnonymous: '173',\n    Shutdown: '332',\n    UnavailableMembersListed: '102',\n    UnavailableMembersNotListed: '103'\n};\nexports.PubsubErrorCondition = {\n    ClosedNode: 'closed-node',\n    ConfigurationRequired: 'configuration-required',\n    InvalidJID: 'invalid-jid',\n    InvalidOptions: 'invalid-options',\n    InvalidPayload: 'invalid-payload',\n    InvalidSubscriptionId: 'invalid-subid',\n    ItemForbidden: 'item-forbidden',\n    ItemRequired: 'item-required',\n    JIDRequired: 'jid-required',\n    MaxItemsExceeded: 'max-items-exceeded',\n    MaxNodesExceeded: 'max-nodes-exceeded',\n    NodeIdRequired: 'nodeid-required',\n    NotInRosterGroup: 'not-in-roster-group',\n    NotSubscribed: 'not-subscribed',\n    PayloadRequired: 'payload-required',\n    PayloadTooBig: 'payload-too-big',\n    PendingSubscription: 'pending-subscription',\n    PresenceSubscriptionRequired: 'presence-subscription-required',\n    SubscriptionIdRequired: 'subid-required',\n    TooManySubscriptions: 'too-many-subscriptions',\n    Unsupported: 'unsupported',\n    UnsupportedAccessModel: 'unsupported-access-model'\n};\nexports.ChatState = {\n    Active: 'active',\n    Composing: 'composing',\n    Gone: 'gone',\n    Inactive: 'inactive',\n    Paused: 'paused'\n};\nexports.JingleSessionRole = {\n    Initiator: 'initiator',\n    Responder: 'responder'\n};\nexports.JingleApplicationDirection = {\n    Inactive: 'inactive',\n    Receive: 'recvonly',\n    Send: 'sendonly',\n    SendReceive: 'sendrecv'\n};\nexports.JingleContentSenders = {\n    Both: 'both',\n    Initiator: 'initiator',\n    None: 'none',\n    Responder: 'responder'\n};\nexports.JingleAction = {\n    ContentAccept: 'content-accept',\n    ContentAdd: 'content-add',\n    ContentModify: 'content-modify',\n    ContentReject: 'content-reject',\n    ContentRemove: 'content-remove',\n    DescriptionInfo: 'description-info',\n    SecurityInfo: 'security-info',\n    SessionAccept: 'session-accept',\n    SessionInfo: 'session-info',\n    SessionInitiate: 'session-initiate',\n    SessionTerminate: 'session-terminate',\n    TransportAccept: 'transport-accept',\n    TransportInfo: 'transport-info',\n    TransportReject: 'transport-reject',\n    TransportReplace: 'transport-replace'\n};\nexports.JingleErrorCondition = {\n    OutOfOrder: 'out-of-order',\n    TieBreak: 'tie-break',\n    UnknownContent: 'unknown-content',\n    UnknownSession: 'unknown-session',\n    UnsupportedInfo: 'unsupported-info'\n};\nexports.JingleReasonCondition = {\n    AlternativeSession: 'alternative-session',\n    Busy: 'busy',\n    Cancel: 'cancel',\n    ConnectivityError: 'connectivity-error',\n    Decline: 'decline',\n    Expired: 'expired',\n    FailedApplication: 'failed-application',\n    FailedTransport: 'failed-transport',\n    GeneralError: 'general-error',\n    Gone: 'gone',\n    IncompatibleParameters: 'incompatible-parameters',\n    MediaError: 'media-error',\n    SecurityError: 'security-error',\n    Success: 'success',\n    Timeout: 'timeout',\n    UnsupportedApplications: 'unsupported-applications',\n    UnsupportedTransports: 'unsupported-transports'\n};\n// ====================================================================\n// Standalone Constants\n// ====================================================================\nexports.USER_MOODS = [\n    'afraid',\n    'amazed',\n    'amorous',\n    'angry',\n    'annoyed',\n    'anxious',\n    'aroused',\n    'ashamed',\n    'bored',\n    'brave',\n    'calm',\n    'cautious',\n    'cold',\n    'confident',\n    'confused',\n    'contemplative',\n    'contented',\n    'cranky',\n    'crazy',\n    'creative',\n    'curious',\n    'dejected',\n    'depressed',\n    'disappointed',\n    'disgusted',\n    'dismayed',\n    'distracted',\n    'embarrassed',\n    'envious',\n    'excited',\n    'flirtatious',\n    'frustrated',\n    'grateful',\n    'grieving',\n    'grumpy',\n    'guilty',\n    'happy',\n    'hopeful',\n    'hot',\n    'humbled',\n    'humiliated',\n    'hungry',\n    'hurt',\n    'impressed',\n    'in_awe',\n    'in_love',\n    'indignant',\n    'interested',\n    'intoxicated',\n    'invincible',\n    'jealous',\n    'lonely',\n    'lost',\n    'lucky',\n    'mean',\n    'moody',\n    'nervous',\n    'neutral',\n    'offended',\n    'outraged',\n    'playful',\n    'proud',\n    'relaxed',\n    'relieved',\n    'remorseful',\n    'restless',\n    'sad',\n    'sarcastic',\n    'satisfied',\n    'serious',\n    'shocked',\n    'shy',\n    'sick',\n    'sleepy',\n    'spontaneous',\n    'stressed',\n    'strong',\n    'surprised',\n    'thankful',\n    'thirsty',\n    'tired',\n    'undefined',\n    'weak',\n    'worried'\n];\nexports.USER_ACTIVITY_GENERAL = [\n    'doing_chores',\n    'drinking',\n    'eating',\n    'exercising',\n    'grooming',\n    'having_appointment',\n    'inactive',\n    'relaxing',\n    'talking',\n    'traveling',\n    'undefined',\n    'working'\n];\nexports.USER_ACTIVITY_SPECIFIC = [\n    'at_the_spa',\n    'brushing_teeth',\n    'buying_groceries',\n    'cleaning',\n    'coding',\n    'commuting',\n    'cooking',\n    'cycling',\n    'cycling',\n    'dancing',\n    'day_off',\n    'doing_maintenance',\n    'doing_the_dishes',\n    'doing_the_laundry',\n    'driving',\n    'fishing',\n    'gaming',\n    'gardening',\n    'getting_a_haircut',\n    'going_out',\n    'hanging_out',\n    'having_a_beer',\n    'having_a_snack',\n    'having_breakfast',\n    'having_coffee',\n    'having_dinner',\n    'having_lunch',\n    'having_tea',\n    'hiding',\n    'hiking',\n    'in_a_car',\n    'in_a_meeting',\n    'in_real_life',\n    'jogging',\n    'on_a_bus',\n    'on_a_plane',\n    'on_a_train',\n    'on_a_trip',\n    'on_the_phone',\n    'on_vacation',\n    'on_video_phone',\n    'other',\n    'partying',\n    'playing_sports',\n    'praying',\n    'reading',\n    'rehearsing',\n    'running',\n    'running_an_errand',\n    'scheduled_holiday',\n    'shaving',\n    'shopping',\n    'skiing',\n    'sleeping',\n    'smoking',\n    'socializing',\n    'studying',\n    'sunbathing',\n    'swimming',\n    'taking_a_bath',\n    'taking_a_shower',\n    'thinking',\n    'walking',\n    'walking_the_dog',\n    'watching_a_movie',\n    'watching_tv',\n    'working_out',\n    'writing'\n];\nconst JINGLE_INFO = (namespace, name) => `{${namespace}}${name}`;\nexports.JINGLE_INFO = JINGLE_INFO;\nexports.JINGLE_INFO_MUTE = (0, exports.JINGLE_INFO)(Namespaces_1.NS_JINGLE_RTP_INFO_1, 'mute');\nexports.JINGLE_INFO_UNMUTE = (0, exports.JINGLE_INFO)(Namespaces_1.NS_JINGLE_RTP_INFO_1, 'unmute');\nexports.JINGLE_INFO_HOLD = (0, exports.JINGLE_INFO)(Namespaces_1.NS_JINGLE_RTP_INFO_1, 'hold');\nexports.JINGLE_INFO_UNHOLD = (0, exports.JINGLE_INFO)(Namespaces_1.NS_JINGLE_RTP_INFO_1, 'unhold');\nexports.JINGLE_INFO_ACTIVE = (0, exports.JINGLE_INFO)(Namespaces_1.NS_JINGLE_RTP_INFO_1, 'active');\nexports.JINGLE_INFO_RINGING = (0, exports.JINGLE_INFO)(Namespaces_1.NS_JINGLE_RTP_INFO_1, 'ringing');\nexports.JINGLE_INFO_CHECKSUM_5 = (0, exports.JINGLE_INFO)(Namespaces_1.NS_JINGLE_FILE_TRANSFER_5, 'checksum');\nexports.JINGLE_INFO_RECEIVED_5 = (0, exports.JINGLE_INFO)(Namespaces_1.NS_JINGLE_FILE_TRANSFER_5, 'received');\n// ====================================================================\n// Helper Functions\n// ====================================================================\nfunction sendersToDirection(role, senders = exports.JingleContentSenders.Both) {\n    const isInitiator = role === exports.JingleSessionRole.Initiator;\n    switch (senders) {\n        case exports.JingleContentSenders.Initiator:\n            return isInitiator\n                ? exports.JingleApplicationDirection.Send\n                : exports.JingleApplicationDirection.Receive;\n        case exports.JingleContentSenders.Responder:\n            return isInitiator\n                ? exports.JingleApplicationDirection.Receive\n                : exports.JingleApplicationDirection.Send;\n        case exports.JingleContentSenders.Both:\n            return exports.JingleApplicationDirection.SendReceive;\n    }\n    return exports.JingleApplicationDirection.Inactive;\n}\nexports.sendersToDirection = sendersToDirection;\nfunction directionToSenders(role, direction = exports.JingleApplicationDirection.SendReceive) {\n    const isInitiator = role === exports.JingleSessionRole.Initiator;\n    switch (direction) {\n        case exports.JingleApplicationDirection.Send:\n            return isInitiator ? exports.JingleContentSenders.Initiator : exports.JingleContentSenders.Responder;\n        case exports.JingleApplicationDirection.Receive:\n            return isInitiator ? exports.JingleContentSenders.Responder : exports.JingleContentSenders.Initiator;\n        case exports.JingleApplicationDirection.SendReceive:\n            return exports.JingleContentSenders.Both;\n    }\n    return exports.JingleContentSenders.None;\n}\nexports.directionToSenders = directionToSenders;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst Constants_1 = require(\"../Constants\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst hashes = (0, tslib_1.__importStar)(require(\"../platform\"));\nfunction default_1(client) {\n    client.disco.addFeature('jid\\\\20escaping');\n    client.disco.addFeature(Namespaces_1.NS_DELAY);\n    client.disco.addFeature(Namespaces_1.NS_EME_0);\n    client.disco.addFeature(Namespaces_1.NS_FORWARD_0);\n    client.disco.addFeature(Namespaces_1.NS_HASHES_2);\n    client.disco.addFeature(Namespaces_1.NS_HASHES_1);\n    client.disco.addFeature(Namespaces_1.NS_IDLE_1);\n    client.disco.addFeature(Namespaces_1.NS_JSON_0);\n    client.disco.addFeature(Namespaces_1.NS_OOB);\n    client.disco.addFeature(Namespaces_1.NS_PSA);\n    client.disco.addFeature(Namespaces_1.NS_REFERENCE_0);\n    client.disco.addFeature(Namespaces_1.NS_SHIM);\n    client.disco.addFeature(Namespaces_1.NS_DATAFORM);\n    client.disco.addFeature(Namespaces_1.NS_DATAFORM_MEDIA);\n    client.disco.addFeature(Namespaces_1.NS_DATAFORM_VALIDATION);\n    client.disco.addFeature(Namespaces_1.NS_DATAFORM_LAYOUT);\n    const names = hashes.getHashes();\n    for (const name of names) {\n        client.disco.addFeature((0, Namespaces_1.NS_HASH_NAME)(name));\n    }\n    client.disco.addFeature(Namespaces_1.NS_TIME);\n    client.disco.addFeature(Namespaces_1.NS_VERSION);\n    client.on('iq:get:softwareVersion', iq => {\n        return client.sendIQResult(iq, {\n            softwareVersion: client.config.softwareVersion || {\n                name: 'stanzajs.org',\n                version: Constants_1.VERSION\n            }\n        });\n    });\n    client.on('iq:get:time', (iq) => {\n        const time = new Date();\n        client.sendIQResult(iq, {\n            time: {\n                tzo: time.getTimezoneOffset(),\n                utc: time\n            }\n        });\n    });\n    client.getSoftwareVersion = async (jid) => {\n        const resp = await client.sendIQ({\n            softwareVersion: {},\n            to: jid,\n            type: 'get'\n        });\n        return resp.softwareVersion;\n    };\n    client.getTime = async (jid) => {\n        const resp = await client.sendIQ({\n            time: {},\n            to: jid,\n            type: 'get'\n        });\n        return resp.time;\n    };\n    client.getLastActivity = async (jid) => {\n        const resp = await client.sendIQ({\n            lastActivity: {},\n            to: jid,\n            type: 'get'\n        });\n        return resp.lastActivity;\n    };\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction default_1(client) {\n    client.features = {\n        handlers: Object.create(null),\n        negotiated: Object.create(null),\n        order: []\n    };\n    client.registerFeature = function (name, priority, handler) {\n        this.features.order.push({\n            name,\n            priority\n        });\n        // We want the features with smallest priority values at the start of the list\n        this.features.order.sort((a, b) => a.priority - b.priority);\n        this.features.handlers[name] = handler.bind(client);\n    };\n    client.on('features', async (features) => {\n        const negotiated = client.features.negotiated;\n        const handlers = client.features.handlers;\n        const processingOrder = [];\n        for (const { name } of client.features.order) {\n            if (features[name] && handlers[name] && !negotiated[name]) {\n                processingOrder.push(name);\n            }\n        }\n        function processFeature(featureName) {\n            return new Promise(resolve => {\n                handlers[featureName](features, (command, message) => {\n                    if (command) {\n                        resolve({ command, message });\n                    }\n                    else {\n                        resolve(null);\n                    }\n                });\n            });\n        }\n        for (const item of processingOrder) {\n            if (negotiated[item]) {\n                continue;\n            }\n            let cmd = '';\n            let msg = '';\n            try {\n                const res = await processFeature(item);\n                if (res) {\n                    cmd = res.command;\n                    msg = res.message || '';\n                }\n            }\n            catch (err) {\n                cmd = 'disconnect';\n                msg = err.message;\n                console.error(err);\n            }\n            if (!cmd) {\n                continue;\n            }\n            if (cmd === 'restart' && client.transport) {\n                client.transport.restart();\n            }\n            if (cmd === 'disconnect') {\n                client.emit('stream:error', {\n                    condition: 'policy-violation',\n                    text: 'Failed to negotiate stream features: ' + msg\n                });\n                client.disconnect();\n            }\n            return;\n        }\n    });\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Namespaces_1 = require(\"../Namespaces\");\nfunction default_1(client) {\n    client.discoverBindings = async (server) => {\n        const bosh = new Set();\n        const websocket = new Set();\n        const discoverHostMeta = client.resolver\n            .getHostMeta(server)\n            .then(xrd => {\n            var _a;\n            for (const link of (_a = xrd.links) !== null && _a !== void 0 ? _a : []) {\n                if (link.href && link.rel === Namespaces_1.NS_ALT_CONNECTIONS_WEBSOCKET) {\n                    websocket.add(link.href);\n                }\n                if (link.href && link.rel === Namespaces_1.NS_ALT_CONNECTIONS_XBOSH) {\n                    bosh.add(link.href);\n                }\n            }\n        })\n            .catch(err => console.error(err));\n        const discoverDNS = !client.config.allowAlternateDNSDiscovery\n            ? Promise.resolve()\n            : client.resolver\n                .resolveTXT(`_xmppconnect.${server}`)\n                .then(txtRecords => {\n                for (const group of txtRecords) {\n                    for (const value of group) {\n                        if (value.startsWith('_xmpp-client-websocket=')) {\n                            const url = value.substring(value.indexOf('=') + 1);\n                            if (url) {\n                                websocket.add(url);\n                            }\n                        }\n                        if (value.startsWith('_xmpp-client-xbosh=')) {\n                            const url = value.substring(value.indexOf('=') + 1);\n                            if (url) {\n                                bosh.add(url);\n                            }\n                        }\n                    }\n                }\n            })\n                .catch(err => console.error(err));\n        await Promise.all([discoverHostMeta, discoverDNS]).catch(err => console.error(err));\n        return {\n            bosh: [...bosh].filter(url => url.startsWith('https://')),\n            websocket: [...websocket].filter(url => url.startsWith('wss://'))\n        };\n    };\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.exportToSDP = exports.importFromSDP = void 0;\nconst tslib_1 = require(\"tslib\");\nconst SDP = (0, tslib_1.__importStar)(require(\"sdp\"));\n// ====================================================================\n// Import SDP to Intermediary\n// ====================================================================\nfunction importFromSDP(sdp) {\n    const mediaSections = SDP.getMediaSections(sdp);\n    const sessionPart = SDP.getDescription(sdp);\n    const session = {\n        groups: [],\n        media: []\n    };\n    if (SDP.matchPrefix(sessionPart, 'a=ice-lite').length > 0) {\n        session.iceLite = true;\n    }\n    for (const groupLine of SDP.matchPrefix(sessionPart, 'a=group:')) {\n        const parts = groupLine.split(' ');\n        const semantics = parts.shift().substr(8);\n        session.groups.push({\n            mids: parts,\n            semantics\n        });\n    }\n    for (const mediaSection of mediaSections) {\n        const kind = SDP.getKind(mediaSection);\n        const isRejected = SDP.isRejected(mediaSection);\n        const mLine = SDP.parseMLine(mediaSection);\n        const media = {\n            direction: SDP.getDirection(mediaSection, sessionPart),\n            kind,\n            mid: SDP.getMid(mediaSection),\n            protocol: mLine.protocol\n            // TODO: what about end-of-candidates?\n        };\n        if (!isRejected) {\n            media.iceParameters = SDP.getIceParameters(mediaSection, sessionPart);\n            media.dtlsParameters = SDP.getDtlsParameters(mediaSection, sessionPart);\n            media.setup = SDP.matchPrefix(mediaSection, 'a=setup:')[0].substr(8);\n            if (session.iceLite) {\n                media.iceParameters.iceLite = true;\n            }\n        }\n        if (kind === 'audio' || kind === 'video') {\n            media.rtpParameters = SDP.parseRtpParameters(mediaSection);\n            media.rtpEncodingParameters = SDP.parseRtpEncodingParameters(mediaSection);\n            media.rtcpParameters = SDP.parseRtcpParameters(mediaSection);\n            const msid = SDP.parseMsid(mediaSection);\n            media.streams = msid ? [msid] : [];\n        }\n        else if (kind === 'application') {\n            media.sctp = SDP.parseSctpDescription(mediaSection);\n        }\n        media.candidates = SDP.matchPrefix(mediaSection, 'a=candidate:').map(SDP.parseCandidate);\n        session.media.push(media);\n    }\n    return session;\n}\nexports.importFromSDP = importFromSDP;\n// ====================================================================\n// Export Intermediary to SDP\n// ====================================================================\nfunction exportToSDP(session) {\n    const output = [];\n    output.push(SDP.writeSessionBoilerplate(session.sessionId, session.sessionVersion), 'a=msid-semantic:WMS *\\r\\n');\n    if (session.iceLite ||\n        session.media.filter(m => m.iceParameters && m.iceParameters.iceLite).length > 0) {\n        output.push('a=ice-lite\\r\\n');\n    }\n    for (const group of session.groups || []) {\n        output.push(`a=group:${group.semantics} ${group.mids.join(' ')}\\r\\n`);\n    }\n    for (const media of session.media || []) {\n        const isRejected = !(media.iceParameters && media.dtlsParameters);\n        if (media.kind === 'application' && media.sctp) {\n            output.push(SDP.writeSctpDescription(media, media.sctp));\n        }\n        else if (media.rtpParameters) {\n            let mline = SDP.writeRtpDescription(media.kind, media.rtpParameters);\n            if (isRejected) {\n                mline = mline.replace(`m=${media.kind} 9 `, `m=${media.kind} 0 `);\n            }\n            output.push(mline);\n            output.push(`a=${media.direction || 'sendrecv'}\\r\\n`);\n            for (const stream of media.streams || []) {\n                output.push(`a=msid:${stream.stream} ${stream.track}\\r\\n`);\n            }\n            if (media.rtcpParameters) {\n                output.push(SDP.writeRtcpParameters(media.rtcpParameters));\n                if (media.rtcpParameters.cname) {\n                    if (media.rtpEncodingParameters && media.rtpEncodingParameters[0].rtx) {\n                        const params = media.rtpEncodingParameters[0];\n                        output.push(`a=ssrc-group:FID ${params.ssrc} ${params.rtx.ssrc}\\r\\n`);\n                        output.push(`a=ssrc:${params.rtx.ssrc} cname:${media.rtcpParameters.cname}\\r\\n`);\n                    }\n                }\n            }\n        }\n        if (media.mid !== undefined) {\n            output.push(`a=mid:${media.mid}\\r\\n`);\n        }\n        if (media.iceParameters) {\n            output.push(SDP.writeIceParameters({\n                // Ignoring iceLite, since we already output ice-lite at session level\n                usernameFragment: media.iceParameters.usernameFragment,\n                password: media.iceParameters.password\n            }));\n        }\n        if (media.dtlsParameters && media.setup) {\n            output.push(SDP.writeDtlsParameters(media.dtlsParameters, media.setup));\n        }\n        if (media.candidates && media.candidates.length) {\n            for (const candidate of media.candidates) {\n                output.push(`a=${SDP.writeCandidate(candidate)}\\r\\n`);\n            }\n        }\n    }\n    return output.join('');\n}\nexports.exportToSDP = exportToSDP;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertRequestToIntermediate = exports.convertContentToIntermediate = exports.convertIntermediateToRequest = exports.convertIntermediateToTransport = exports.convertCandidateToIntermediate = exports.convertIntermediateToCandidate = exports.convertIntermediateToApplication = void 0;\nconst Constants_1 = require(\"../../Constants\");\nconst Namespaces_1 = require(\"../../Namespaces\");\nfunction convertIntermediateToApplication(media, role) {\n    const rtp = media.rtpParameters;\n    const rtcp = media.rtcpParameters || {};\n    const encodingParameters = media.rtpEncodingParameters || [];\n    let hasSSRC = false;\n    if (encodingParameters && encodingParameters.length) {\n        hasSSRC = !!encodingParameters[0].ssrc; // !== false ???\n    }\n    const application = {\n        applicationType: Namespaces_1.NS_JINGLE_RTP_1,\n        codecs: [],\n        headerExtensions: [],\n        media: media.kind,\n        rtcpMux: rtcp.mux,\n        rtcpReducedSize: rtcp.reducedSize,\n        sourceGroups: [],\n        sources: [],\n        ssrc: hasSSRC ? encodingParameters[0].ssrc.toString() : undefined,\n        streams: []\n    };\n    for (const ext of rtp.headerExtensions || []) {\n        const header = {\n            id: ext.id,\n            uri: ext.uri\n        };\n        if (ext.direction && ext.direction !== 'sendrecv') {\n            header.senders = (0, Constants_1.directionToSenders)(role, ext.direction);\n        }\n        application.headerExtensions.push(header);\n    }\n    if (rtcp.ssrc && rtcp.cname) {\n        application.sources = [\n            {\n                parameters: {\n                    cname: rtcp.cname\n                },\n                ssrc: rtcp.ssrc.toString()\n            }\n        ];\n    }\n    if (hasSSRC && encodingParameters[0] && encodingParameters[0].rtx) {\n        application.sourceGroups = [\n            {\n                semantics: 'FID',\n                sources: [\n                    encodingParameters[0].ssrc.toString(),\n                    encodingParameters[0].rtx.ssrc.toString()\n                ]\n            }\n        ];\n    }\n    for (const stream of media.streams || []) {\n        application.streams.push({\n            id: stream.stream,\n            track: stream.track\n        });\n    }\n    for (const codec of rtp.codecs || []) {\n        const payload = {\n            channels: codec.channels,\n            clockRate: codec.clockRate,\n            id: codec.payloadType.toString(),\n            name: codec.name,\n            parameters: codec.parameters,\n            rtcpFeedback: codec.rtcpFeedback\n        };\n        if (codec.maxptime) {\n            payload.maxptime = codec.maxptime;\n        }\n        if (codec.parameters && codec.parameters.ptime) {\n            payload.ptime = parseInt(codec.parameters.ptime, 10);\n        }\n        application.codecs.push(payload);\n    }\n    return application;\n}\nexports.convertIntermediateToApplication = convertIntermediateToApplication;\nfunction convertIntermediateToCandidate(candidate) {\n    let component;\n    if (candidate.component === 'rtp') {\n        component = 1;\n    }\n    else if (candidate.component === 'rtcp') {\n        component = 2;\n    }\n    else {\n        component = candidate.component;\n    }\n    return {\n        component,\n        foundation: candidate.foundation,\n        generation: undefined,\n        id: undefined,\n        ip: candidate.ip,\n        network: undefined,\n        port: candidate.port,\n        priority: candidate.priority,\n        protocol: candidate.protocol,\n        relatedAddress: candidate.relatedAddress,\n        relatedPort: candidate.relatedPort,\n        tcpType: candidate.tcpType,\n        type: candidate.type\n    };\n}\nexports.convertIntermediateToCandidate = convertIntermediateToCandidate;\nfunction convertCandidateToIntermediate(candidate) {\n    return {\n        address: candidate.ip,\n        component: candidate.component === 1\n            ? 'rtp'\n            : candidate.component === 2\n                ? 'rtcp'\n                : candidate.component,\n        foundation: candidate.foundation,\n        ip: candidate.ip,\n        port: candidate.port,\n        priority: candidate.priority,\n        protocol: candidate.protocol,\n        relatedAddress: candidate.relatedAddress,\n        relatedPort: candidate.relatedPort,\n        tcpType: candidate.tcpType,\n        type: candidate.type\n    };\n}\nexports.convertCandidateToIntermediate = convertCandidateToIntermediate;\nfunction convertIntermediateToTransport(media, transportType) {\n    const ice = media.iceParameters;\n    const dtls = media.dtlsParameters;\n    const transport = {\n        candidates: [],\n        transportType\n    };\n    if (ice) {\n        transport.usernameFragment = ice.usernameFragment;\n        transport.password = ice.password;\n        if (ice.iceLite) {\n            transport.iceLite = true;\n        }\n    }\n    if (dtls) {\n        transport.fingerprints = dtls.fingerprints.map(fingerprint => ({\n            algorithm: fingerprint.algorithm,\n            setup: media.setup,\n            value: fingerprint.value\n        }));\n    }\n    if (media.sctp) {\n        transport.sctp = media.sctp;\n    }\n    for (const candidate of media.candidates || []) {\n        transport.candidates.push(convertIntermediateToCandidate(candidate));\n    }\n    return transport;\n}\nexports.convertIntermediateToTransport = convertIntermediateToTransport;\nfunction convertIntermediateToRequest(session, role, transportType) {\n    return {\n        contents: session.media.map(media => {\n            const isRTP = media.kind === 'audio' || media.kind === 'video';\n            return {\n                application: isRTP\n                    ? convertIntermediateToApplication(media, role)\n                    : {\n                        applicationType: 'datachannel',\n                        protocol: media.protocol\n                    },\n                creator: Constants_1.JingleSessionRole.Initiator,\n                name: media.mid,\n                senders: (0, Constants_1.directionToSenders)(role, media.direction),\n                transport: convertIntermediateToTransport(media, transportType)\n            };\n        }),\n        groups: session.groups\n            ? session.groups.map(group => ({\n                contents: group.mids,\n                semantics: group.semantics\n            }))\n            : []\n    };\n}\nexports.convertIntermediateToRequest = convertIntermediateToRequest;\nfunction convertContentToIntermediate(content, role) {\n    const application = content.application || {};\n    const transport = content.transport;\n    const isRTP = application && application.applicationType === Namespaces_1.NS_JINGLE_RTP_1;\n    const media = {\n        direction: (0, Constants_1.sendersToDirection)(role, content.senders),\n        kind: application.media || 'application',\n        mid: content.name,\n        protocol: isRTP ? 'UDP/TLS/RTP/SAVPF' : 'UDP/DTLS/SCTP'\n    };\n    if (isRTP) {\n        media.rtcpParameters = {\n            compound: !application.rtcpReducedSize,\n            mux: application.rtcpMux,\n            reducedSize: application.rtcpReducedSize\n        };\n        if (application.sources && application.sources.length) {\n            const source = application.sources[0];\n            media.rtcpParameters.ssrc = parseInt(source.ssrc, 10);\n            if (source.parameters) {\n                media.rtcpParameters.cname = source.parameters.cname;\n            }\n        }\n        media.rtpParameters = {\n            codecs: [],\n            fecMechanisms: [],\n            headerExtensions: [],\n            rtcp: []\n        };\n        if (application.streams) {\n            media.streams = [];\n            for (const stream of application.streams) {\n                media.streams.push({\n                    stream: stream.id,\n                    track: stream.track\n                });\n            }\n        }\n        if (application.ssrc) {\n            media.rtpEncodingParameters = [\n                {\n                    ssrc: parseInt(application.ssrc, 10)\n                }\n            ];\n            if (application.sourceGroups && application.sourceGroups.length) {\n                const group = application.sourceGroups[0];\n                media.rtpEncodingParameters[0].rtx = {\n                    // TODO: actually look for a FID one with matching ssrc\n                    ssrc: parseInt(group.sources[1], 10)\n                };\n            }\n        }\n        let hasRED = false;\n        let hasULPFEC = false;\n        for (const payload of application.codecs || []) {\n            const parameters = payload.parameters || {};\n            const rtcpFeedback = [];\n            for (const fb of payload.rtcpFeedback || []) {\n                rtcpFeedback.push({\n                    parameter: fb.parameter,\n                    type: fb.type\n                });\n            }\n            if (payload.name === 'red' || payload.name === 'ulpfec') {\n                hasRED = hasRED || payload.name === 'red';\n                hasULPFEC = hasULPFEC || payload.name === 'ulpfec';\n                const fec = payload.name.toUpperCase();\n                if (!media.rtpParameters.fecMechanisms.includes(fec)) {\n                    media.rtpParameters.fecMechanisms.push(fec);\n                }\n            }\n            media.rtpParameters.codecs.push({\n                channels: payload.channels,\n                clockRate: payload.clockRate,\n                name: payload.name,\n                numChannels: payload.channels,\n                parameters,\n                payloadType: parseInt(payload.id, 10),\n                rtcpFeedback\n            });\n        }\n        for (const ext of application.headerExtensions || []) {\n            media.rtpParameters.headerExtensions.push({\n                direction: (0, Constants_1.sendersToDirection)(role, ext.senders || 'both'),\n                id: ext.id,\n                uri: ext.uri,\n                attributes: undefined\n                // FIXME: Waiting for typings fix in sdp module\n            });\n        }\n    }\n    if (transport) {\n        if (transport.usernameFragment && transport.password) {\n            media.iceParameters = {\n                password: transport.password,\n                usernameFragment: transport.usernameFragment\n            };\n            if (transport.iceLite) {\n                media.iceParameters.iceLite = true;\n            }\n        }\n        if (transport.fingerprints && transport.fingerprints.length) {\n            media.dtlsParameters = {\n                fingerprints: [],\n                role: 'auto'\n            };\n            for (const fingerprint of transport.fingerprints) {\n                media.dtlsParameters.fingerprints.push({\n                    algorithm: fingerprint.algorithm,\n                    value: fingerprint.value\n                });\n            }\n            if (transport.sctp) {\n                media.sctp = transport.sctp;\n            }\n            media.setup = transport.fingerprints[0].setup;\n        }\n        media.candidates = (transport.candidates || []).map(convertCandidateToIntermediate);\n    }\n    return media;\n}\nexports.convertContentToIntermediate = convertContentToIntermediate;\nfunction convertRequestToIntermediate(jingle, role) {\n    const session = {\n        groups: [],\n        media: []\n    };\n    for (const group of jingle.groups || []) {\n        session.groups.push({\n            mids: group.contents,\n            semantics: group.semantics\n        });\n    }\n    for (const content of jingle.contents || []) {\n        session.media.push(convertContentToIntermediate(content, role));\n    }\n    return session;\n}\nexports.convertRequestToIntermediate = convertRequestToIntermediate;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst async_1 = require(\"async\");\nconst Constants_1 = require(\"../Constants\");\nconst Utils_1 = require(\"../Utils\");\nconst badRequest = { condition: Constants_1.StanzaErrorCondition.BadRequest };\nconst unsupportedInfo = {\n    condition: Constants_1.StanzaErrorCondition.FeatureNotImplemented,\n    jingleError: Constants_1.JingleErrorCondition.UnsupportedInfo,\n    type: 'modify'\n};\nclass JingleSession {\n    constructor(opts) {\n        this.parent = opts.parent;\n        this.sid = opts.sid || (0, Utils_1.uuid)();\n        this.peerID = opts.peerID;\n        this.role = opts.initiator ? Constants_1.JingleSessionRole.Initiator : Constants_1.JingleSessionRole.Responder;\n        this._sessionState = 'starting';\n        this._connectionState = 'starting';\n        // We track the intial pending description types in case\n        // of the need for a tie-breaker.\n        this.pendingApplicationTypes = opts.applicationTypes || [];\n        this.pendingAction = undefined;\n        // Here is where we'll ensure that all actions are processed\n        // in order, even if a particular action requires async handling.\n        this.processingQueue = (0, async_1.priorityQueue)(async (task, next) => {\n            if (this.state === 'ended') {\n                // Don't process anything once the session has been ended\n                if (task.type === 'local' && task.reject) {\n                    task.reject(new Error('Session ended'));\n                }\n                if (next) {\n                    next();\n                }\n                return;\n            }\n            if (task.type === 'local') {\n                this._log('debug', 'Processing local action:', task.name);\n                try {\n                    const res = await task.handler();\n                    task.resolve(res);\n                }\n                catch (err) {\n                    task.reject(err);\n                }\n                if (next) {\n                    next();\n                }\n                return;\n            }\n            const { action, changes, cb } = task;\n            this._log('debug', 'Processing remote action:', action);\n            return new Promise(resolve => {\n                const done = (err, result) => {\n                    cb(err, result);\n                    if (next) {\n                        next();\n                    }\n                    resolve();\n                };\n                switch (action) {\n                    case Constants_1.JingleAction.ContentAccept:\n                        return this.onContentAccept(changes, done);\n                    case Constants_1.JingleAction.ContentAdd:\n                        return this.onContentAdd(changes, done);\n                    case Constants_1.JingleAction.ContentModify:\n                        return this.onContentModify(changes, done);\n                    case Constants_1.JingleAction.ContentReject:\n                        return this.onContentReject(changes, done);\n                    case Constants_1.JingleAction.ContentRemove:\n                        return this.onContentRemove(changes, done);\n                    case Constants_1.JingleAction.DescriptionInfo:\n                        return this.onDescriptionInfo(changes, done);\n                    case Constants_1.JingleAction.SecurityInfo:\n                        return this.onSecurityInfo(changes, done);\n                    case Constants_1.JingleAction.SessionAccept:\n                        return this.onSessionAccept(changes, done);\n                    case Constants_1.JingleAction.SessionInfo:\n                        return this.onSessionInfo(changes, done);\n                    case Constants_1.JingleAction.SessionInitiate:\n                        return this.onSessionInitiate(changes, done);\n                    case Constants_1.JingleAction.SessionTerminate:\n                        return this.onSessionTerminate(changes, done);\n                    case Constants_1.JingleAction.TransportAccept:\n                        return this.onTransportAccept(changes, done);\n                    case Constants_1.JingleAction.TransportInfo:\n                        return this.onTransportInfo(changes, done);\n                    case Constants_1.JingleAction.TransportReject:\n                        return this.onTransportReject(changes, done);\n                    case Constants_1.JingleAction.TransportReplace:\n                        return this.onTransportReplace(changes, done);\n                    default:\n                        this._log('error', 'Invalid or unsupported action: ' + action);\n                        done({ condition: Constants_1.StanzaErrorCondition.BadRequest });\n                }\n            });\n        }, 1);\n    }\n    get isInitiator() {\n        return this.role === Constants_1.JingleSessionRole.Initiator;\n    }\n    get peerRole() {\n        return this.isInitiator ? Constants_1.JingleSessionRole.Responder : Constants_1.JingleSessionRole.Initiator;\n    }\n    get state() {\n        return this._sessionState;\n    }\n    set state(value) {\n        if (value !== this._sessionState) {\n            this._log('info', 'Changing session state to: ' + value);\n            this._sessionState = value;\n            if (this.parent) {\n                this.parent.emit('sessionState', this, value);\n            }\n        }\n    }\n    get connectionState() {\n        return this._connectionState;\n    }\n    set connectionState(value) {\n        if (value !== this._connectionState) {\n            this._log('info', 'Changing connection state to: ' + value);\n            this._connectionState = value;\n            if (this.parent) {\n                this.parent.emit('connectionState', this, value);\n            }\n        }\n    }\n    send(action, data) {\n        data = data || {};\n        data.sid = this.sid;\n        data.action = action;\n        const requirePending = new Set([\n            Constants_1.JingleAction.ContentAccept,\n            Constants_1.JingleAction.ContentAdd,\n            Constants_1.JingleAction.ContentModify,\n            Constants_1.JingleAction.ContentReject,\n            Constants_1.JingleAction.ContentRemove,\n            Constants_1.JingleAction.SessionAccept,\n            Constants_1.JingleAction.SessionInitiate,\n            Constants_1.JingleAction.TransportAccept,\n            Constants_1.JingleAction.TransportReject,\n            Constants_1.JingleAction.TransportReplace\n        ]);\n        if (requirePending.has(action)) {\n            this.pendingAction = action;\n        }\n        else {\n            this.pendingAction = undefined;\n        }\n        this.parent.signal(this, {\n            id: (0, Utils_1.uuid)(),\n            jingle: data,\n            to: this.peerID,\n            type: 'set'\n        });\n    }\n    processLocal(name, handler) {\n        return new Promise((resolve, reject) => {\n            this.processingQueue.push({\n                handler,\n                name,\n                reject,\n                resolve,\n                type: 'local'\n            }, 1 // Process local requests first\n            );\n        });\n    }\n    process(action, changes, cb) {\n        this.processingQueue.push({\n            action,\n            cb,\n            changes,\n            type: 'remote'\n        }, 2 // Process remote requests second\n        );\n    }\n    start(_opts, _next) {\n        this._log('error', 'Can not start base sessions');\n        this.end('unsupported-applications', true);\n    }\n    accept(_opts, _next) {\n        this._log('error', 'Can not accept base sessions');\n        this.end('unsupported-applications');\n    }\n    cancel() {\n        this.end('cancel');\n    }\n    decline() {\n        this.end('decline');\n    }\n    end(reason = 'success', silent = false) {\n        this.state = 'ended';\n        this.processingQueue.kill();\n        if (typeof reason === 'string') {\n            reason = {\n                condition: reason\n            };\n        }\n        if (!silent) {\n            this.send('session-terminate', {\n                reason\n            });\n        }\n        this.parent.emit('terminated', this, reason);\n        this.parent.forgetSession(this);\n    }\n    _log(level, message, ...data) {\n        if (this.parent) {\n            message = this.sid + ': ' + message;\n            this.parent.emit('log', level, message, ...data);\n            this.parent.emit('log:' + level, message, ...data);\n        }\n    }\n    onSessionInitiate(changes, cb) {\n        cb();\n    }\n    onSessionAccept(changes, cb) {\n        cb();\n    }\n    onSessionTerminate(changes, cb) {\n        this.end(changes.reason, true);\n        cb();\n    }\n    // It is mandatory to reply to a session-info action with\n    // an unsupported-info error if the info isn't recognized.\n    //\n    // However, a session-info action with no associated payload\n    // is acceptable (works like a ping).\n    onSessionInfo(changes, cb) {\n        if (!changes.info) {\n            cb();\n        }\n        else {\n            cb(unsupportedInfo);\n        }\n    }\n    // It is mandatory to reply to a security-info action with\n    // an unsupported-info error if the info isn't recognized.\n    onSecurityInfo(changes, cb) {\n        cb(unsupportedInfo);\n    }\n    // It is mandatory to reply to a description-info action with\n    // an unsupported-info error if the info isn't recognized.\n    onDescriptionInfo(changes, cb) {\n        cb(unsupportedInfo);\n    }\n    // It is mandatory to reply to a transport-info action with\n    // an unsupported-info error if the info isn't recognized.\n    onTransportInfo(changes, cb) {\n        cb(unsupportedInfo);\n    }\n    // It is mandatory to reply to a content-add action with either\n    // a content-accept or content-reject.\n    onContentAdd(changes, cb) {\n        // Allow ack for the content-add to be sent.\n        cb();\n        this.send(Constants_1.JingleAction.ContentReject, {\n            reason: {\n                condition: Constants_1.JingleReasonCondition.FailedApplication,\n                text: 'content-add is not supported'\n            }\n        });\n    }\n    onContentAccept(changes, cb) {\n        cb(badRequest);\n    }\n    onContentReject(changes, cb) {\n        cb(badRequest);\n    }\n    onContentModify(changes, cb) {\n        cb(badRequest);\n    }\n    onContentRemove(changes, cb) {\n        cb(badRequest);\n    }\n    // It is mandatory to reply to a transport-add action with either\n    // a transport-accept or transport-reject.\n    onTransportReplace(changes, cb) {\n        // Allow ack for the transport-replace be sent.\n        cb();\n        this.send(Constants_1.JingleAction.TransportReject, {\n            reason: {\n                condition: Constants_1.JingleReasonCondition.FailedTransport,\n                text: 'transport-replace is not supported'\n            }\n        });\n    }\n    onTransportAccept(changes, cb) {\n        cb(badRequest);\n    }\n    onTransportReject(changes, cb) {\n        cb(badRequest);\n    }\n}\nexports.default = JingleSession;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst SDPUtils = (0, tslib_1.__importStar)(require(\"sdp\"));\nconst Constants_1 = require(\"../Constants\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Intermediate_1 = require(\"./sdp/Intermediate\");\nconst Protocol_1 = require(\"./sdp/Protocol\");\nconst Session_1 = (0, tslib_1.__importDefault)(require(\"./Session\"));\nclass ICESession extends Session_1.default {\n    constructor(opts) {\n        super(opts);\n        this.bitrateLimit = 0;\n        this.candidateBuffer = [];\n        this.transportType = Namespaces_1.NS_JINGLE_ICE_UDP_1;\n        this.restartingIce = false;\n        this.usingRelay = false;\n        this.maxRelayBandwidth = opts.maxRelayBandwidth;\n        this.pc = this.parent.createPeerConnection(this, {\n            ...opts.config,\n            iceServers: opts.iceServers\n        });\n        this.pc.oniceconnectionstatechange = () => {\n            this.onIceStateChange();\n        };\n        this.pc.onicecandidate = e => {\n            if (e.candidate) {\n                this.onIceCandidate(e);\n            }\n            else {\n                this.onIceEndOfCandidates();\n            }\n        };\n        this.restrictRelayBandwidth();\n    }\n    end(reason = 'success', silent = false) {\n        this.pc.close();\n        super.end(reason, silent);\n    }\n    /* actually do an ice restart */\n    async restartIce() {\n        // only initiators do an ice-restart to avoid conflicts.\n        if (!this.isInitiator) {\n            return;\n        }\n        if (this._maybeRestartingIce !== undefined) {\n            clearTimeout(this._maybeRestartingIce);\n        }\n        this.restartingIce = true;\n        try {\n            await this.processLocal('restart-ice', async () => {\n                const offer = await this.pc.createOffer({ iceRestart: true });\n                // extract new ufrag / pwd, send transport-info with just that.\n                const json = (0, Intermediate_1.importFromSDP)(offer.sdp);\n                this.send(Constants_1.JingleAction.TransportInfo, {\n                    contents: json.media.map(media => ({\n                        creator: Constants_1.JingleSessionRole.Initiator,\n                        name: media.mid,\n                        transport: (0, Protocol_1.convertIntermediateToTransport)(media, this.transportType)\n                    })),\n                    sid: this.sid\n                });\n                await this.pc.setLocalDescription(offer);\n            });\n        }\n        catch (err) {\n            this._log('error', 'Could not create WebRTC offer', err);\n            this.end(Constants_1.JingleReasonCondition.FailedTransport, true);\n        }\n    }\n    // set the maximum bitrate. Only supported in Chrome and Firefox right now.\n    async setMaximumBitrate(maximumBitrate) {\n        if (this.maximumBitrate) {\n            // potentially take into account bandwidth restrictions due to using TURN.\n            maximumBitrate = Math.min(maximumBitrate, this.maximumBitrate);\n        }\n        this.currentBitrate = maximumBitrate;\n        // changes the maximum bandwidth using RTCRtpSender.setParameters.\n        const sender = this.pc.getSenders().find(s => !!s.track && s.track.kind === 'video');\n        if (!sender || !sender.getParameters) {\n            return;\n        }\n        try {\n            await this.processLocal('set-bitrate', async () => {\n                const parameters = sender.getParameters();\n                if (!parameters.encodings || !parameters.encodings.length) {\n                    parameters.encodings = [{}];\n                }\n                if (maximumBitrate === 0) {\n                    delete parameters.encodings[0].maxBitrate;\n                }\n                else {\n                    parameters.encodings[0].maxBitrate = maximumBitrate;\n                }\n                await sender.setParameters(parameters);\n            });\n        }\n        catch (err) {\n            this._log('error', 'Set maximumBitrate failed', err);\n        }\n    }\n    // ----------------------------------------------------------------\n    // Jingle action handers\n    // ----------------------------------------------------------------\n    async onTransportInfo(changes, cb) {\n        if (changes.contents &&\n            changes.contents[0] &&\n            changes.contents[0].transport.gatheringComplete) {\n            const candidate = { sdpMid: changes.contents[0].name, candidate: '' };\n            try {\n                if (this.pc.signalingState === 'stable') {\n                    await this.pc.addIceCandidate(candidate);\n                }\n                else {\n                    this.candidateBuffer.push(candidate);\n                }\n            }\n            catch (err) {\n                this._log('debug', 'Could not add null end-of-candidate');\n            }\n            finally {\n                cb();\n            }\n            return;\n        }\n        // detect an ice restart.\n        if (this.pc.remoteDescription) {\n            const remoteDescription = this.pc.remoteDescription;\n            const remoteJSON = (0, Intermediate_1.importFromSDP)(remoteDescription.sdp);\n            const remoteMedia = remoteJSON.media.find(m => m.mid === changes.contents[0].name);\n            const currentUsernameFragment = remoteMedia.iceParameters.usernameFragment;\n            const remoteUsernameFragment = changes.contents[0].transport\n                .usernameFragment;\n            if (remoteUsernameFragment && currentUsernameFragment !== remoteUsernameFragment) {\n                for (const [idx, content] of changes.contents.entries()) {\n                    const transport = content.transport;\n                    remoteJSON.media[idx].iceParameters = {\n                        password: transport.password,\n                        usernameFragment: transport.usernameFragment\n                    };\n                    remoteJSON.media[idx].candidates = [];\n                }\n                try {\n                    await this.pc.setRemoteDescription({\n                        type: remoteDescription.type,\n                        sdp: (0, Intermediate_1.exportToSDP)(remoteJSON)\n                    });\n                    await this.processBufferedCandidates();\n                    if (remoteDescription.type === 'offer') {\n                        const answer = await this.pc.createAnswer();\n                        await this.pc.setLocalDescription(answer);\n                        const json = (0, Intermediate_1.importFromSDP)(answer.sdp);\n                        this.send(Constants_1.JingleAction.TransportInfo, {\n                            contents: json.media.map(media => ({\n                                creator: Constants_1.JingleSessionRole.Initiator,\n                                name: media.mid,\n                                transport: (0, Protocol_1.convertIntermediateToTransport)(media, this.transportType)\n                            })),\n                            sid: this.sid\n                        });\n                    }\n                    else {\n                        this.restartingIce = false;\n                    }\n                }\n                catch (err) {\n                    this._log('error', 'Could not do remote ICE restart', err);\n                    cb(err);\n                    this.end(Constants_1.JingleReasonCondition.FailedTransport);\n                    return;\n                }\n            }\n        }\n        const all = (changes.contents || []).map(content => {\n            const sdpMid = content.name;\n            const results = (content.transport.candidates || []).map(async (json) => {\n                const candidate = SDPUtils.writeCandidate((0, Protocol_1.convertCandidateToIntermediate)(json));\n                if (this.pc.remoteDescription && this.pc.signalingState === 'stable') {\n                    try {\n                        await this.pc.addIceCandidate({ sdpMid, candidate });\n                    }\n                    catch (err) {\n                        this._log('error', 'Could not add ICE candidate', err);\n                    }\n                }\n                else {\n                    this.candidateBuffer.push({ sdpMid, candidate });\n                }\n            });\n            return Promise.all(results);\n        });\n        try {\n            await Promise.all(all);\n            cb();\n        }\n        catch (err) {\n            this._log('error', `Could not process transport-info: ${err}`);\n            cb(err);\n        }\n    }\n    async onSessionAccept(changes, cb) {\n        this.state = 'active';\n        const json = (0, Protocol_1.convertRequestToIntermediate)(changes, this.peerRole);\n        const sdp = (0, Intermediate_1.exportToSDP)(json);\n        try {\n            await this.pc.setRemoteDescription({ type: 'answer', sdp });\n            await this.processBufferedCandidates();\n            this.parent.emit('accepted', this, undefined);\n            cb();\n        }\n        catch (err) {\n            this._log('error', `Could not process WebRTC answer: ${err}`);\n            cb({ condition: 'general-error' });\n        }\n    }\n    onSessionTerminate(changes, cb) {\n        this._log('info', 'Terminating session');\n        this.pc.close();\n        super.end(changes.reason, true);\n        cb();\n    }\n    // ----------------------------------------------------------------\n    // ICE action handers\n    // ----------------------------------------------------------------\n    onIceCandidate(e) {\n        if (!e.candidate || !e.candidate.candidate) {\n            return;\n        }\n        const candidate = SDPUtils.parseCandidate(e.candidate.candidate);\n        const jingle = {\n            contents: [\n                {\n                    creator: Constants_1.JingleSessionRole.Initiator,\n                    name: e.candidate.sdpMid,\n                    transport: {\n                        candidates: [(0, Protocol_1.convertIntermediateToCandidate)(candidate)],\n                        transportType: this.transportType,\n                        usernameFragment: candidate.usernameFragment\n                    }\n                }\n            ]\n        };\n        this._log('info', 'Discovered new ICE candidate', jingle);\n        this.send(Constants_1.JingleAction.TransportInfo, jingle);\n    }\n    onIceEndOfCandidates() {\n        this._log('info', 'ICE end of candidates');\n        const json = (0, Intermediate_1.importFromSDP)(this.pc.localDescription.sdp);\n        const firstMedia = json.media[0];\n        // signal end-of-candidates with our first media mid/ufrag\n        this.send(Constants_1.JingleAction.TransportInfo, {\n            contents: [\n                {\n                    creator: Constants_1.JingleSessionRole.Initiator,\n                    name: firstMedia.mid,\n                    transport: {\n                        gatheringComplete: true,\n                        transportType: this.transportType,\n                        usernameFragment: firstMedia.iceParameters.usernameFragment\n                    }\n                }\n            ]\n        });\n    }\n    onIceStateChange() {\n        switch (this.pc.iceConnectionState) {\n            case 'checking':\n                this.connectionState = 'connecting';\n                break;\n            case 'completed':\n            case 'connected':\n                this.connectionState = 'connected';\n                break;\n            case 'disconnected':\n                if (this.pc.signalingState === 'stable') {\n                    this.connectionState = 'interrupted';\n                }\n                else {\n                    this.connectionState = 'disconnected';\n                }\n                if (this.restartingIce) {\n                    this.end(Constants_1.JingleReasonCondition.FailedTransport);\n                    return;\n                }\n                this.maybeRestartIce();\n                break;\n            case 'failed':\n                if (this.connectionState === 'failed' || this.restartingIce) {\n                    this.end(Constants_1.JingleReasonCondition.FailedTransport);\n                    return;\n                }\n                this.connectionState = 'failed';\n                this.restartIce();\n                break;\n            case 'closed':\n                this.connectionState = 'disconnected';\n                if (this.restartingIce) {\n                    this.end(Constants_1.JingleReasonCondition.FailedTransport);\n                }\n                else {\n                    this.end();\n                }\n                break;\n        }\n    }\n    async processBufferedCandidates() {\n        for (const candidate of this.candidateBuffer) {\n            try {\n                await this.pc.addIceCandidate(candidate);\n            }\n            catch (err) {\n                this._log('error', 'Could not add ICE candidate', err);\n            }\n        }\n        this.candidateBuffer = [];\n    }\n    /* when using TURN, we might want to restrict the bandwidth\n     * to the value specified by MAX_RELAY_BANDWIDTH\n     * in order to prevent sending excessive traffic through\n     * the TURN server.\n     */\n    restrictRelayBandwidth() {\n        this.pc.addEventListener('iceconnectionstatechange', async () => {\n            if (this.pc.iceConnectionState !== 'completed' &&\n                this.pc.iceConnectionState !== 'connected') {\n                return;\n            }\n            const stats = await this.pc.getStats();\n            let activeCandidatePair;\n            stats.forEach(report => {\n                if (report.type === 'transport') {\n                    activeCandidatePair = stats.get(report.selectedCandidatePairId);\n                }\n            });\n            // Fallback for Firefox.\n            if (!activeCandidatePair) {\n                stats.forEach(report => {\n                    if (report.type === 'candidate-pair' && report.selected) {\n                        activeCandidatePair = report;\n                    }\n                });\n            }\n            if (!activeCandidatePair) {\n                return;\n            }\n            let isRelay = false;\n            let localCandidateType = '';\n            let remoteCandidateType = '';\n            if (activeCandidatePair.remoteCandidateId) {\n                const remoteCandidate = stats.get(activeCandidatePair.remoteCandidateId);\n                if (remoteCandidate) {\n                    remoteCandidateType = remoteCandidate.candidateType;\n                }\n            }\n            if (activeCandidatePair.localCandidateId) {\n                const localCandidate = stats.get(activeCandidatePair.localCandidateId);\n                if (localCandidate) {\n                    localCandidateType = localCandidate.candidateType;\n                }\n            }\n            if (localCandidateType === 'relay' || remoteCandidateType === 'relay') {\n                isRelay = true;\n            }\n            this.usingRelay = isRelay;\n            this.parent.emit('iceConnectionType', this, {\n                localCandidateType,\n                relayed: isRelay,\n                remoteCandidateType\n            });\n            if (isRelay && this.maxRelayBandwidth !== undefined) {\n                this.maximumBitrate = this.maxRelayBandwidth;\n                if (this.currentBitrate) {\n                    this.setMaximumBitrate(Math.min(this.currentBitrate, this.maximumBitrate));\n                }\n                else {\n                    this.setMaximumBitrate(this.maximumBitrate);\n                }\n            }\n        });\n    }\n    /* determine whether an ICE restart is in order\n     * when transitioning to disconnected. Strategy is\n     * 'wait 2 seconds for things to repair themselves'\n     * 'maybe check if bytes are sent/received' by comparing\n     *   getStats measurements\n     */\n    maybeRestartIce() {\n        // only initiators do an ice-restart to avoid conflicts.\n        if (!this.isInitiator) {\n            return;\n        }\n        if (this._maybeRestartingIce !== undefined) {\n            clearTimeout(this._maybeRestartingIce);\n        }\n        this._maybeRestartingIce = setTimeout(() => {\n            this._maybeRestartingIce = undefined;\n            if (this.pc.iceConnectionState === 'disconnected') {\n                this.restartIce();\n            }\n        }, 2000);\n    }\n}\nexports.default = ICESession;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Receiver = exports.Sender = void 0;\nconst tslib_1 = require(\"tslib\");\nconst events_1 = require(\"events\");\nconst Hashes = (0, tslib_1.__importStar)(require(\"../platform\"));\nconst Constants_1 = require(\"../Constants\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst ICESession_1 = (0, tslib_1.__importDefault)(require(\"./ICESession\"));\nconst Intermediate_1 = require(\"./sdp/Intermediate\");\nconst Protocol_1 = require(\"./sdp/Protocol\");\nclass Sender extends events_1.EventEmitter {\n    constructor(opts = {}) {\n        super();\n        this.config = {\n            chunkSize: 16384,\n            hash: 'sha-1',\n            ...opts\n        };\n        this.file = undefined;\n        this.channel = undefined;\n        this.hash = Hashes.createHash(this.config.hash);\n    }\n    send(file, channel) {\n        if (this.file && this.channel) {\n            return;\n        }\n        this.file = file;\n        this.channel = channel;\n        this.channel.binaryType = 'arraybuffer';\n        const fileReader = new FileReader();\n        let offset = 0;\n        let pendingRead = false;\n        const sliceFile = () => {\n            if (pendingRead || offset >= file.size) {\n                return;\n            }\n            pendingRead = true;\n            const slice = file.slice(offset, offset + this.config.chunkSize);\n            fileReader.readAsArrayBuffer(slice);\n        };\n        channel.bufferedAmountLowThreshold = 8 * this.config.chunkSize;\n        channel.onbufferedamountlow = () => {\n            sliceFile();\n        };\n        fileReader.addEventListener('load', (event) => {\n            const data = event.target.result;\n            pendingRead = false;\n            offset += data.byteLength;\n            this.channel.send(data);\n            this.hash.update(new Uint8Array(data));\n            this.emit('progress', offset, file.size, data);\n            if (offset < file.size) {\n                if (this.channel.bufferedAmount <= this.channel.bufferedAmountLowThreshold) {\n                    sliceFile();\n                }\n                // Otherwise wait for bufferedamountlow event to trigger reading more data\n            }\n            else {\n                this.emit('progress', file.size, file.size, null);\n                this.emit('sentFile', {\n                    algorithm: this.config.hash,\n                    name: file.name,\n                    size: file.size,\n                    value: this.hash.digest()\n                });\n            }\n        });\n        sliceFile();\n    }\n}\nexports.Sender = Sender;\nclass Receiver extends events_1.EventEmitter {\n    constructor(opts = {}) {\n        super();\n        this.config = {\n            hash: 'sha-1',\n            ...opts\n        };\n        this.receiveBuffer = [];\n        this.received = 0;\n        this.channel = undefined;\n        this.hash = Hashes.createHash(this.config.hash);\n    }\n    receive(metadata, channel) {\n        this.metadata = metadata;\n        this.channel = channel;\n        this.channel.binaryType = 'arraybuffer';\n        this.channel.onmessage = e => {\n            const len = e.data.byteLength;\n            this.received += len;\n            this.receiveBuffer.push(e.data);\n            if (e.data) {\n                this.hash.update(new Uint8Array(e.data));\n            }\n            this.emit('progress', this.received, this.metadata.size, e.data);\n            if (this.received === this.metadata.size) {\n                this.metadata.actualhash = this.hash.digest('hex');\n                this.emit('receivedFile', new Blob(this.receiveBuffer), this.metadata);\n                this.receiveBuffer = [];\n            }\n            else if (this.received > this.metadata.size) {\n                // FIXME\n                console.error('received more than expected, discarding...');\n                this.receiveBuffer = []; // just discard...\n            }\n        };\n    }\n}\nexports.Receiver = Receiver;\nclass FileTransferSession extends ICESession_1.default {\n    constructor(opts) {\n        super(opts);\n        this.sender = undefined;\n        this.receiver = undefined;\n        this.file = undefined;\n    }\n    async start(file, next) {\n        next = next || (() => undefined);\n        if (!file || typeof file === 'function') {\n            throw new Error('File object required');\n        }\n        this.state = 'pending';\n        this.role = 'initiator';\n        this.file = file;\n        this.sender = new Sender();\n        this.sender.on('progress', (sent, size) => {\n            this._log('info', 'Send progress ' + sent + '/' + size);\n        });\n        this.sender.on('sentFile', meta => {\n            this._log('info', 'Sent file', meta.name);\n            this.send(Constants_1.JingleAction.SessionInfo, {\n                info: {\n                    creator: Constants_1.JingleSessionRole.Initiator,\n                    file: {\n                        hashes: [\n                            {\n                                algorithm: meta.algorithm,\n                                value: meta.value\n                            }\n                        ]\n                    },\n                    infoType: Constants_1.JINGLE_INFO_CHECKSUM_5,\n                    name: this.contentName\n                }\n            });\n            this.parent.emit('sentFile', this, meta);\n        });\n        this.channel = this.pc.createDataChannel('filetransfer', {\n            ordered: true\n        });\n        this.channel.onopen = () => {\n            this.sender.send(this.file, this.channel);\n        };\n        try {\n            await this.processLocal(Constants_1.JingleAction.SessionInitiate, async () => {\n                const offer = await this.pc.createOffer({\n                    offerToReceiveAudio: false,\n                    offerToReceiveVideo: false\n                });\n                const json = (0, Intermediate_1.importFromSDP)(offer.sdp);\n                const jingle = (0, Protocol_1.convertIntermediateToRequest)(json, this.role, this.transportType);\n                this.contentName = jingle.contents[0].name;\n                jingle.sid = this.sid;\n                jingle.action = Constants_1.JingleAction.SessionInitiate;\n                jingle.contents[0].application = {\n                    applicationType: Namespaces_1.NS_JINGLE_FILE_TRANSFER_5,\n                    file: {\n                        date: file.lastModified ? new Date(file.lastModified) : undefined,\n                        hashesUsed: [\n                            {\n                                algorithm: 'sha-1'\n                            }\n                        ],\n                        name: file.name,\n                        size: file.size\n                    }\n                };\n                this.send('session-initiate', jingle);\n                await this.pc.setLocalDescription(offer);\n            });\n            next();\n        }\n        catch (err) {\n            this._log('error', 'Could not create WebRTC offer', err);\n            return this.end('failed-application', true);\n        }\n    }\n    async accept(next) {\n        this._log('info', 'Accepted incoming session');\n        this.role = 'responder';\n        this.state = 'active';\n        next = next || (() => undefined);\n        try {\n            await this.processLocal(Constants_1.JingleAction.SessionAccept, async () => {\n                const answer = await this.pc.createAnswer();\n                const json = (0, Intermediate_1.importFromSDP)(answer.sdp);\n                const jingle = (0, Protocol_1.convertIntermediateToRequest)(json, this.role, this.transportType);\n                jingle.sid = this.sid;\n                jingle.action = 'session-accept';\n                for (const content of jingle.contents) {\n                    content.creator = 'initiator';\n                }\n                this.contentName = jingle.contents[0].name;\n                this.send('session-accept', jingle);\n                await this.pc.setLocalDescription(answer);\n                await this.processBufferedCandidates();\n            });\n            next();\n        }\n        catch (err) {\n            this._log('error', 'Could not create WebRTC answer', err);\n            this.end('failed-application');\n        }\n    }\n    async onSessionInitiate(changes, cb) {\n        this._log('info', 'Initiating incoming session');\n        this.role = 'responder';\n        this.state = 'pending';\n        this.transportType = changes.contents[0].transport.transportType;\n        const json = (0, Protocol_1.convertRequestToIntermediate)(changes, this.peerRole);\n        const sdp = (0, Intermediate_1.exportToSDP)(json);\n        const desc = changes.contents[0].application;\n        const hashes = desc.file.hashesUsed ? desc.file.hashesUsed : desc.file.hashes || [];\n        this.receiver = new Receiver({ hash: hashes[0] && hashes[0].algorithm });\n        this.receiver.on('progress', (received, size) => {\n            this._log('info', 'Receive progress ' + received + '/' + size);\n        });\n        this.receiver.on('receivedFile', file => {\n            this.receivedFile = file;\n            this._maybeReceivedFile();\n        });\n        this.receiver.metadata = desc.file;\n        this.pc.addEventListener('datachannel', e => {\n            this.channel = e.channel;\n            this.receiver.receive(this.receiver.metadata, e.channel);\n        });\n        try {\n            await this.pc.setRemoteDescription({ type: 'offer', sdp });\n            await this.processBufferedCandidates();\n            cb();\n        }\n        catch (err) {\n            this._log('error', 'Could not create WebRTC answer', err);\n            cb({ condition: 'general-error' });\n        }\n    }\n    onSessionInfo(changes, cb) {\n        const info = changes.info;\n        if (!info || !info.file || !info.file.hashes) {\n            return;\n        }\n        this.receiver.metadata.hashes = info.file.hashes;\n        if (this.receiver.metadata.actualhash) {\n            this._maybeReceivedFile();\n        }\n        cb();\n    }\n    _maybeReceivedFile() {\n        if (!this.receiver.metadata.hashes || !this.receiver.metadata.hashes.length) {\n            // unknown hash, file transfer not completed\n            return;\n        }\n        for (const hash of this.receiver.metadata.hashes || []) {\n            if (hash.value && hash.value.toString('hex') === this.receiver.metadata.actualhash) {\n                this._log('info', 'File hash matches');\n                this.parent.emit('receivedFile', this, this.receivedFile, this.receiver.metadata);\n                this.end('success');\n                return;\n            }\n        }\n        this._log('error', 'File hash does not match');\n        this.end('media-error');\n    }\n}\nexports.default = FileTransferSession;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst Constants_1 = require(\"../Constants\");\nconst ICESession_1 = (0, tslib_1.__importDefault)(require(\"./ICESession\"));\nconst Intermediate_1 = require(\"./sdp/Intermediate\");\nconst Protocol_1 = require(\"./sdp/Protocol\");\nfunction applyStreamsCompatibility(content) {\n    const application = content.application;\n    /* signal .streams as a=ssrc: msid */\n    if (application.streams &&\n        application.streams.length &&\n        application.sources &&\n        application.sources.length) {\n        const msid = application.streams[0];\n        application.sources[0].parameters.msid = `${msid.id} ${msid.track}`;\n        if (application.sourceGroups && application.sourceGroups.length > 0) {\n            application.sources.push({\n                parameters: {\n                    cname: application.sources[0].parameters.cname,\n                    msid: `${msid.id} ${msid.track}`\n                },\n                ssrc: application.sourceGroups[0].sources[1]\n            });\n        }\n    }\n}\nclass MediaSession extends ICESession_1.default {\n    constructor(opts) {\n        super(opts);\n        this.includesAudio = false;\n        this.includesVideo = false;\n        this._ringing = false;\n        this.pc.addEventListener('track', (e) => {\n            this.onAddTrack(e.track, e.streams[0]);\n        });\n        if (opts.stream) {\n            for (const track of opts.stream.getTracks()) {\n                this.addTrack(track, opts.stream);\n            }\n        }\n    }\n    get ringing() {\n        return this._ringing;\n    }\n    set ringing(value) {\n        if (value !== this._ringing) {\n            this._ringing = value;\n        }\n    }\n    get streams() {\n        if (this.pc.signalingState !== 'closed') {\n            return this.pc.getRemoteStreams();\n        }\n        return [];\n    }\n    // ----------------------------------------------------------------\n    // Session control methods\n    // ----------------------------------------------------------------\n    async start(opts, next) {\n        this.state = 'pending';\n        if (arguments.length === 1 && typeof opts === 'function') {\n            next = opts;\n            opts = {};\n        }\n        next = next || (() => undefined);\n        opts = opts || {};\n        this.role = 'initiator';\n        this.offerOptions = opts;\n        try {\n            await this.processLocal(Constants_1.JingleAction.SessionInitiate, async () => {\n                const offer = await this.pc.createOffer(opts);\n                const json = (0, Intermediate_1.importFromSDP)(offer.sdp);\n                const jingle = (0, Protocol_1.convertIntermediateToRequest)(json, this.role, this.transportType);\n                jingle.sid = this.sid;\n                jingle.action = Constants_1.JingleAction.SessionInitiate;\n                for (const content of jingle.contents || []) {\n                    content.creator = 'initiator';\n                    applyStreamsCompatibility(content);\n                }\n                await this.pc.setLocalDescription(offer);\n                this.send('session-initiate', jingle);\n            });\n            next();\n        }\n        catch (err) {\n            this._log('error', 'Could not create WebRTC offer', err);\n            this.end('failed-application', true);\n        }\n    }\n    async accept(opts, next) {\n        // support calling with accept(next) or accept(opts, next)\n        if (arguments.length === 1 && typeof opts === 'function') {\n            next = opts;\n            opts = {};\n        }\n        next = next || (() => undefined);\n        opts = opts || {};\n        this._log('info', 'Accepted incoming session');\n        this.state = 'active';\n        this.role = 'responder';\n        try {\n            await this.processLocal(Constants_1.JingleAction.SessionAccept, async () => {\n                const answer = await this.pc.createAnswer(opts);\n                const json = (0, Intermediate_1.importFromSDP)(answer.sdp);\n                const jingle = (0, Protocol_1.convertIntermediateToRequest)(json, this.role, this.transportType);\n                jingle.sid = this.sid;\n                jingle.action = Constants_1.JingleAction.SessionAccept;\n                for (const content of jingle.contents || []) {\n                    content.creator = 'initiator';\n                }\n                await this.pc.setLocalDescription(answer);\n                await this.processBufferedCandidates();\n                this.send('session-accept', jingle);\n            });\n            next();\n        }\n        catch (err) {\n            this._log('error', 'Could not create WebRTC answer', err);\n            this.end('failed-application');\n        }\n    }\n    end(reason = 'success', silent = false) {\n        for (const receiver of this.pc.getReceivers()) {\n            this.onRemoveTrack(receiver.track);\n        }\n        super.end(reason, silent);\n    }\n    ring() {\n        return this.processLocal('ring', async () => {\n            this._log('info', 'Ringing on incoming session');\n            this.ringing = true;\n            this.send(Constants_1.JingleAction.SessionInfo, {\n                info: {\n                    infoType: Constants_1.JINGLE_INFO_RINGING\n                }\n            });\n        });\n    }\n    mute(creator, name) {\n        return this.processLocal('mute', async () => {\n            this._log('info', 'Muting', name);\n            this.send(Constants_1.JingleAction.SessionInfo, {\n                info: {\n                    creator,\n                    infoType: Constants_1.JINGLE_INFO_MUTE,\n                    name\n                }\n            });\n        });\n    }\n    unmute(creator, name) {\n        return this.processLocal('unmute', async () => {\n            this._log('info', 'Unmuting', name);\n            this.send(Constants_1.JingleAction.SessionInfo, {\n                info: {\n                    creator,\n                    infoType: Constants_1.JINGLE_INFO_UNMUTE,\n                    name\n                }\n            });\n        });\n    }\n    hold() {\n        return this.processLocal('hold', async () => {\n            this._log('info', 'Placing on hold');\n            this.send('session-info', {\n                info: {\n                    infoType: Constants_1.JINGLE_INFO_HOLD\n                }\n            });\n        });\n    }\n    resume() {\n        return this.processLocal('resume', async () => {\n            this._log('info', 'Resuming from hold');\n            this.send('session-info', {\n                info: {\n                    infoType: Constants_1.JINGLE_INFO_ACTIVE\n                }\n            });\n        });\n    }\n    // ----------------------------------------------------------------\n    // Track control methods\n    // ----------------------------------------------------------------\n    addTrack(track, stream, cb) {\n        if (track.kind === 'audio') {\n            this.includesAudio = true;\n        }\n        if (track.kind === 'video') {\n            this.includesVideo = true;\n        }\n        return this.processLocal('addtrack', async () => {\n            if (this.pc.addTrack) {\n                this.pc.addTrack(track, stream);\n            }\n            else {\n                this.pc.addStream(stream);\n            }\n            if (cb) {\n                cb();\n            }\n        });\n    }\n    async removeTrack(sender, cb) {\n        return this.processLocal('removetrack', async () => {\n            this.pc.removeTrack(sender);\n            if (cb) {\n                return cb();\n            }\n        });\n    }\n    // ----------------------------------------------------------------\n    // Track event handlers\n    // ----------------------------------------------------------------\n    onAddTrack(track, stream) {\n        this._log('info', 'Track added');\n        this.parent.emit('peerTrackAdded', this, track, stream);\n    }\n    onRemoveTrack(track) {\n        this._log('info', 'Track removed');\n        this.parent.emit('peerTrackRemoved', this, track);\n    }\n    // ----------------------------------------------------------------\n    // Jingle action handers\n    // ----------------------------------------------------------------\n    async onSessionInitiate(changes, cb) {\n        this._log('info', 'Initiating incoming session');\n        this.state = 'pending';\n        this.role = 'responder';\n        this.transportType = changes.contents[0].transport.transportType;\n        const json = (0, Protocol_1.convertRequestToIntermediate)(changes, this.peerRole);\n        for (const media of json.media) {\n            if (media.kind === 'audio') {\n                this.includesAudio = true;\n            }\n            if (media.kind === 'video') {\n                this.includesVideo = true;\n            }\n            if (!media.streams) {\n                media.streams = [{ stream: 'legacy', track: media.kind }];\n            }\n        }\n        const sdp = (0, Intermediate_1.exportToSDP)(json);\n        try {\n            await this.pc.setRemoteDescription({ type: 'offer', sdp });\n            await this.processBufferedCandidates();\n            return cb();\n        }\n        catch (err) {\n            this._log('error', 'Could not create WebRTC answer', err);\n            return cb({ condition: 'general-error' });\n        }\n    }\n    onSessionTerminate(changes, cb) {\n        for (const receiver of this.pc.getReceivers()) {\n            this.onRemoveTrack(receiver.track);\n        }\n        super.onSessionTerminate(changes, cb);\n    }\n    onSessionInfo(changes, cb) {\n        const info = changes.info || { infoType: '' };\n        switch (info.infoType) {\n            case Constants_1.JINGLE_INFO_RINGING:\n                this._log('info', 'Outgoing session is ringing');\n                this.ringing = true;\n                this.parent.emit('ringing', this);\n                return cb();\n            case Constants_1.JINGLE_INFO_HOLD:\n                this._log('info', 'On hold');\n                this.parent.emit('hold', this);\n                return cb();\n            case Constants_1.JINGLE_INFO_UNHOLD:\n            case Constants_1.JINGLE_INFO_ACTIVE:\n                this._log('info', 'Resuming from hold');\n                this.parent.emit('resumed', this);\n                return cb();\n            case Constants_1.JINGLE_INFO_MUTE:\n                this._log('info', 'Muting', info);\n                this.parent.emit('mute', this, info);\n                return cb();\n            case Constants_1.JINGLE_INFO_UNMUTE:\n                this._log('info', 'Unmuting', info);\n                this.parent.emit('unmute', this, info);\n                return cb();\n            default:\n        }\n        return cb();\n    }\n}\nexports.default = MediaSession;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst events_1 = require(\"events\");\nconst Constants_1 = require(\"../Constants\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst platform_1 = require(\"../platform\");\nconst Utils_1 = require(\"../Utils\");\nconst FileTransferSession_1 = (0, tslib_1.__importDefault)(require(\"./FileTransferSession\"));\nconst MediaSession_1 = (0, tslib_1.__importDefault)(require(\"./MediaSession\"));\nconst Session_1 = (0, tslib_1.__importDefault)(require(\"./Session\"));\nconst MAX_RELAY_BANDWIDTH = 768 * 1024; // maximum bandwidth used via TURN.\nfunction isICEServer(val) {\n    return !val.type && (val.urls || val.url);\n}\nclass SessionManager extends events_1.EventEmitter {\n    constructor(conf = {}) {\n        super();\n        conf = conf || {};\n        this.selfID = conf.selfID;\n        this.sessions = {};\n        this.peers = {};\n        this.iceServers = conf.iceServers || [];\n        this.prepareSession =\n            conf.prepareSession ||\n                (opts => {\n                    if (!this.config.hasRTCPeerConnection) {\n                        return;\n                    }\n                    if (opts.applicationTypes.indexOf(Namespaces_1.NS_JINGLE_RTP_1) >= 0) {\n                        return new MediaSession_1.default(opts);\n                    }\n                    if (opts.applicationTypes.indexOf(Namespaces_1.NS_JINGLE_FILE_TRANSFER_5) >= 0) {\n                        return new FileTransferSession_1.default(opts);\n                    }\n                });\n        this.performTieBreak =\n            conf.performTieBreak ||\n                ((sess, req) => {\n                    const applicationTypes = (req.jingle.contents || []).map(content => {\n                        if (content.application) {\n                            return content.application.applicationType;\n                        }\n                    });\n                    const intersection = (sess.pendingApplicationTypes || []).filter(appType => applicationTypes.includes(appType));\n                    return intersection.length > 0;\n                });\n        this.createPeerConnection =\n            conf.createPeerConnection ||\n                ((session, opts) => {\n                    if (platform_1.RTCPeerConnection) {\n                        return new platform_1.RTCPeerConnection(opts);\n                    }\n                });\n        this.config = {\n            debug: false,\n            hasRTCPeerConnection: !!platform_1.RTCPeerConnection,\n            peerConnectionConfig: {\n                bundlePolicy: conf.bundlePolicy || 'balanced',\n                iceTransportPolicy: conf.iceTransportPolicy || 'all',\n                rtcpMuxPolicy: conf.rtcpMuxPolicy || 'require',\n                sdpSemantics: conf.sdpSemantics\n            },\n            peerConnectionConstraints: {\n                optional: [{ DtlsSrtpKeyAgreement: true }, { RtpDataChannels: false }]\n            },\n            ...conf\n        };\n    }\n    addICEServer(server) {\n        if (typeof server === 'string') {\n            this.iceServers.push({ urls: server });\n            return;\n        }\n        if (isICEServer(server)) {\n            this.iceServers.push(server);\n            return;\n        }\n        let host = server.host || '';\n        if (host.indexOf(':') >= 0) {\n            host = `[${host}]`;\n        }\n        let uri = `${server.type}:${host}`;\n        if (server.port) {\n            uri += `:${server.port}`;\n        }\n        if (server.transport) {\n            uri += `?transport=${server.transport}`;\n        }\n        if (server.type === 'turn' || server.type === 'turns') {\n            this.iceServers.push({\n                credential: server.password,\n                urls: [uri],\n                username: server.username\n            });\n        }\n        else if (server.type === 'stun' || server.type === 'stuns') {\n            this.iceServers.push({ urls: [uri] });\n        }\n    }\n    resetICEServers() {\n        this.iceServers = [];\n    }\n    addSession(session) {\n        session.parent = this;\n        const sid = session.sid;\n        const peer = session.peerID;\n        this.sessions[sid] = session;\n        if (!this.peers[peer]) {\n            this.peers[peer] = [];\n        }\n        this.peers[peer].push(session);\n        this.emit('createdSession', session);\n        return session;\n    }\n    forgetSession(session) {\n        const peers = this.peers[session.peerID] || [];\n        if (peers.length) {\n            peers.splice(peers.indexOf(session), 1);\n        }\n        delete this.sessions[session.sid];\n    }\n    createMediaSession(peer, sid, stream) {\n        const session = new MediaSession_1.default({\n            config: this.config.peerConnectionConfig,\n            constraints: this.config.peerConnectionConstraints,\n            iceServers: this.iceServers,\n            initiator: true,\n            maxRelayBandwidth: MAX_RELAY_BANDWIDTH,\n            parent: this,\n            peerID: peer,\n            sid,\n            stream\n        });\n        this.addSession(session);\n        return session;\n    }\n    createFileTransferSession(peer, sid) {\n        const session = new FileTransferSession_1.default({\n            config: this.config.peerConnectionConfig,\n            constraints: this.config.peerConnectionConstraints,\n            iceServers: this.iceServers,\n            initiator: true,\n            maxRelayBandwidth: MAX_RELAY_BANDWIDTH,\n            parent: this,\n            peerID: peer,\n            sid\n        });\n        this.addSession(session);\n        return session;\n    }\n    endPeerSessions(peer, reason, silent = false) {\n        const sessions = this.peers[peer] || [];\n        delete this.peers[peer];\n        for (const session of sessions) {\n            session.end(reason || 'gone', silent);\n        }\n    }\n    endAllSessions(reason, silent = false) {\n        for (const peer of Object.keys(this.peers)) {\n            this.endPeerSessions(peer, reason, silent);\n        }\n    }\n    process(req) {\n        // Extract the request metadata that we need to verify\n        const sid = req.jingle ? req.jingle.sid : undefined;\n        let session = sid ? this.sessions[sid] : undefined;\n        const rid = req.id;\n        const sender = req.from;\n        if (!sender) {\n            return;\n        }\n        if (req.type === 'error') {\n            this._log('error', 'Received error response', req);\n            if (session && req.error && req.error.jingleError === 'unknown-session') {\n                return session.end('gone', true);\n            }\n            const isTieBreak = req.error && req.error.jingleError === 'tie-break';\n            if (session && session.state === 'pending' && isTieBreak) {\n                return session.end('alternative-session', true);\n            }\n            else {\n                if (session) {\n                    session.pendingAction = undefined;\n                }\n                return;\n            }\n        }\n        if (req.type === 'result') {\n            if (session) {\n                session.pendingAction = undefined;\n            }\n            return;\n        }\n        const action = req.jingle.action;\n        const contents = req.jingle.contents || [];\n        const applicationTypes = contents.map(content => {\n            return content.application ? content.application.applicationType : undefined;\n        });\n        const transportTypes = contents.map(content => {\n            return content.transport ? content.transport.transportType : undefined;\n        });\n        // Now verify that we are allowed to actually process the\n        // requested action\n        if (action !== Constants_1.JingleAction.SessionInitiate) {\n            // Can't modify a session that we don't have.\n            if (!session) {\n                if (action === 'session-terminate') {\n                    this.emit('send', {\n                        id: rid,\n                        to: sender,\n                        type: 'result'\n                    });\n                    return;\n                }\n                this._log('error', 'Unknown session', sid);\n                return this._sendError(sender, rid, {\n                    condition: 'item-not-found',\n                    jingleError: 'unknown-session'\n                });\n            }\n            // Check if someone is trying to hijack a session.\n            if (session.peerID !== sender || session.state === 'ended') {\n                this._log('error', 'Session has ended, or action has wrong sender');\n                return this._sendError(sender, rid, {\n                    condition: 'item-not-found',\n                    jingleError: 'unknown-session'\n                });\n            }\n            // Can't accept a session twice\n            if (action === 'session-accept' && session.state !== 'pending') {\n                this._log('error', 'Tried to accept session twice', sid);\n                return this._sendError(sender, rid, {\n                    condition: 'unexpected-request',\n                    jingleError: 'out-of-order'\n                });\n            }\n            // Can't process two requests at once, need to tie break\n            if (action !== 'session-terminate' && action === session.pendingAction) {\n                this._log('error', 'Tie break during pending request');\n                if (session.isInitiator) {\n                    return this._sendError(sender, rid, {\n                        condition: 'conflict',\n                        jingleError: 'tie-break'\n                    });\n                }\n            }\n        }\n        else if (session) {\n            // Don't accept a new session if we already have one.\n            if (session.peerID !== sender) {\n                this._log('error', 'Duplicate sid from new sender');\n                return this._sendError(sender, rid, {\n                    condition: 'service-unavailable'\n                });\n            }\n            // Check if we need to have a tie breaker because both parties\n            // happened to pick the same random sid.\n            if (session.state === 'pending') {\n                if (this.selfID &&\n                    this.selfID > session.peerID &&\n                    this.performTieBreak(session, req)) {\n                    this._log('error', 'Tie break new session because of duplicate sids');\n                    return this._sendError(sender, rid, {\n                        condition: 'conflict',\n                        jingleError: 'tie-break'\n                    });\n                }\n            }\n            else {\n                // The other side is just doing it wrong.\n                this._log('error', 'Someone is doing this wrong');\n                return this._sendError(sender, rid, {\n                    condition: 'unexpected-request',\n                    jingleError: 'out-of-order'\n                });\n            }\n        }\n        else if (this.peers[sender] && this.peers[sender].length) {\n            // Check if we need to have a tie breaker because we already have\n            // a different session with this peer that is using the requested\n            // content application types.\n            for (let i = 0, len = this.peers[sender].length; i < len; i++) {\n                const sess = this.peers[sender][i];\n                if (sess &&\n                    sess.state === 'pending' &&\n                    sid &&\n                    (0, Utils_1.octetCompare)(sess.sid, sid) > 0 &&\n                    this.performTieBreak(sess, req)) {\n                    this._log('info', 'Tie break session-initiate');\n                    return this._sendError(sender, rid, {\n                        condition: 'conflict',\n                        jingleError: 'tie-break'\n                    });\n                }\n            }\n        }\n        // We've now weeded out invalid requests, so we can process the action now.\n        if (action === 'session-initiate') {\n            if (!contents.length) {\n                return this._sendError(sender, rid, {\n                    condition: 'bad-request'\n                });\n            }\n            session = this._createIncomingSession({\n                applicationTypes,\n                config: this.config.peerConnectionConfig,\n                constraints: this.config.peerConnectionConstraints,\n                iceServers: this.iceServers,\n                initiator: false,\n                parent: this,\n                peerID: sender,\n                sid,\n                transportTypes\n            }, req);\n        }\n        session.process(action, req.jingle, (err) => {\n            if (err) {\n                this._log('error', 'Could not process request', req, err);\n                this._sendError(sender, rid, err);\n            }\n            else {\n                this.emit('send', {\n                    id: rid,\n                    to: sender,\n                    type: 'result'\n                });\n                // Wait for the initial action to be processed before emitting\n                // the session for the user to accept/reject.\n                if (action === 'session-initiate') {\n                    this.emit('incoming', session);\n                }\n            }\n        });\n    }\n    signal(session, data) {\n        const action = data.jingle && data.jingle.action;\n        if (session.isInitiator && action === Constants_1.JingleAction.SessionInitiate) {\n            this.emit('outgoing', session);\n        }\n        this.emit('send', data);\n    }\n    _createIncomingSession(meta, req) {\n        let session;\n        if (this.prepareSession) {\n            session = this.prepareSession(meta, req);\n        }\n        // Fallback to a generic session type, which can\n        // only be used to end the session.\n        if (!session) {\n            session = new Session_1.default(meta);\n        }\n        this.addSession(session);\n        return session;\n    }\n    _sendError(to, id, data) {\n        if (!data.type) {\n            data.type = 'cancel';\n        }\n        this.emit('send', {\n            error: data,\n            id,\n            to,\n            type: 'error'\n        });\n    }\n    _log(level, message, ...args) {\n        this.emit('log', level, message, ...args);\n        this.emit('log:' + level, message, ...args);\n    }\n}\nexports.default = SessionManager;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SessionManager = exports.FileSession = exports.MediaSession = exports.ICESession = exports.Session = exports.exportToSDP = exports.importFromSDP = void 0;\nconst tslib_1 = require(\"tslib\");\nconst FileTransferSession_1 = (0, tslib_1.__importDefault)(require(\"./FileTransferSession\"));\nexports.FileSession = FileTransferSession_1.default;\nconst ICESession_1 = (0, tslib_1.__importDefault)(require(\"./ICESession\"));\nexports.ICESession = ICESession_1.default;\nconst MediaSession_1 = (0, tslib_1.__importDefault)(require(\"./MediaSession\"));\nexports.MediaSession = MediaSession_1.default;\nconst Session_1 = (0, tslib_1.__importDefault)(require(\"./Session\"));\nexports.Session = Session_1.default;\nconst SessionManager_1 = (0, tslib_1.__importDefault)(require(\"./SessionManager\"));\nexports.SessionManager = SessionManager_1.default;\nvar Intermediate_1 = require(\"./sdp/Intermediate\");\nObject.defineProperty(exports, \"importFromSDP\", { enumerable: true, get: function () { return Intermediate_1.importFromSDP; } });\nObject.defineProperty(exports, \"exportToSDP\", { enumerable: true, get: function () { return Intermediate_1.exportToSDP; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst platform_1 = require(\"../platform\");\nconst Jingle = (0, tslib_1.__importStar)(require(\"../jingle\"));\nconst Namespaces_1 = require(\"../Namespaces\");\nfunction default_1(client) {\n    const hasNativePeerConnection = !!platform_1.RTCPeerConnection;\n    const defaultConfig = {\n        advertiseAudio: hasNativePeerConnection,\n        advertiseFileTransfer: hasNativePeerConnection,\n        advertiseVideo: hasNativePeerConnection,\n        bundlePolicy: 'balanced',\n        hasRTCPeerConnection: hasNativePeerConnection,\n        iceServers: [{ urls: 'stun:stun.l.google.com:19302' }],\n        iceTransportPolicy: 'all',\n        rtcpMuxPolicy: 'require',\n        trickleIce: true\n    };\n    const providedConfig = client.config.jingle;\n    const config = {\n        ...defaultConfig,\n        ...providedConfig\n    };\n    const jingle = (client.jingle = new Jingle.SessionManager(config));\n    const caps = [Namespaces_1.NS_JINGLE_1];\n    if (config.hasRTCPeerConnection) {\n        caps.push(Namespaces_1.NS_JINGLE_ICE_0, Namespaces_1.NS_JINGLE_ICE_UDP_1, Namespaces_1.NS_JINGLE_DTLS_SCTP_1, Namespaces_1.NS_JINGLE_DTLS_0, 'urn:ietf:rfc:5888' // Jingle Grouping Framework\n        );\n        if (config.trickleIce === false) {\n            caps.push('urn:ietf:rfc:3264'); // ICE prefer batched candidates\n        }\n        if (config.advertiseAudio || config.advertiseVideo) {\n            caps.push(Namespaces_1.NS_JINGLE_RTP_1, Namespaces_1.NS_JINGLE_RTP_RTCP_FB_0, Namespaces_1.NS_JINGLE_RTP_HDREXT_0, 'urn:ietf:rfc:5576' // Jingle Source Specific Media Attributes\n            );\n        }\n        if (config.advertiseAudio) {\n            caps.push(Namespaces_1.NS_JINGLE_RTP_AUDIO);\n        }\n        if (config.advertiseVideo) {\n            caps.push(Namespaces_1.NS_JINGLE_RTP_VIDEO);\n        }\n        if (config.advertiseFileTransfer) {\n            caps.push(Namespaces_1.NS_JINGLE_FILE_TRANSFER_4, Namespaces_1.NS_JINGLE_FILE_TRANSFER_5);\n        }\n    }\n    for (const cap of caps) {\n        client.disco.addFeature(cap);\n    }\n    const mappedEvents = [\n        'outgoing',\n        'incoming',\n        'accepted',\n        'terminated',\n        'ringing',\n        'mute',\n        'unmute',\n        'hold',\n        'resumed'\n    ];\n    for (const event of mappedEvents) {\n        jingle.on(event, (session, data) => {\n            client.emit(('jingle:' + event), session, data);\n        });\n    }\n    jingle.on('createdSession', data => {\n        client.emit('jingle:created', data);\n    });\n    jingle.on('send', async (data) => {\n        try {\n            if (data.type === 'set') {\n                const resp = await client.sendIQ(data);\n                if (!resp.jingle) {\n                    resp.jingle = {};\n                }\n                resp.jingle.sid = data.jingle.sid;\n                jingle.process(resp);\n            }\n            if (data.type === 'result') {\n                client.sendIQResult({ type: 'set', id: data.id, from: data.to }, data);\n            }\n            if (data.type === 'error') {\n                client.sendIQError({ type: 'set', id: data.id, from: data.to }, data);\n            }\n        }\n        catch (err) {\n            if (!err.jingle) {\n                err.jingle = data.jingle;\n            }\n            err.jingle.sid = data.jingle.sid;\n            jingle.process(err);\n        }\n    });\n    client.on('session:bound', (jid) => {\n        jingle.selfID = jid;\n    });\n    client.on('iq:set:jingle', (data) => {\n        jingle.process(data);\n    });\n    client.on('unavailable', (pres) => {\n        jingle.endPeerSessions(pres.from, undefined, true);\n    });\n    client.getServices = async (jid, type, version) => {\n        const resp = await client.sendIQ({\n            externalServices: {\n                type,\n                version\n            },\n            to: jid,\n            type: 'get'\n        });\n        const services = resp.externalServices;\n        services.services = services.services || [];\n        return services;\n    };\n    client.getServiceCredentials = async (jid, host, type, port, version) => {\n        const resp = await client.sendIQ({\n            externalServiceCredentials: {\n                host,\n                port,\n                type,\n                version\n            },\n            to: jid,\n            type: 'get'\n        });\n        return resp.externalServiceCredentials;\n    };\n    client.discoverICEServers = async (opts = {}) => {\n        try {\n            const resp = await client.getServices(client.config.server, undefined, opts.version);\n            const services = resp.services || [];\n            const discovered = [];\n            for (const service of services) {\n                client.jingle.addICEServer(service);\n            }\n            return discovered;\n        }\n        catch (err) {\n            return [];\n        }\n    };\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mergeFields = void 0;\nfunction mergeFields(original, updated) {\n    const merged = [];\n    const mappedUpdates = new Map();\n    for (const field of updated) {\n        if (field.name) {\n            mappedUpdates.set(field.name, field);\n        }\n    }\n    const usedUpdates = new Set();\n    // Update any existing fields with new values.\n    for (const field of original) {\n        if (field.name && mappedUpdates.has(field.name)) {\n            merged.push({\n                ...field,\n                ...mappedUpdates.get(field.name)\n            });\n            usedUpdates.add(field.name);\n        }\n        else {\n            merged.push({ ...field });\n        }\n    }\n    // Append any brand new fields to the list\n    for (const field of updated) {\n        if (!field.name || (field.name && !usedUpdates.has(field.name))) {\n            merged.push({ ...field });\n        }\n    }\n    return merged;\n}\nexports.mergeFields = mergeFields;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst DataForms_1 = require(\"../helpers/DataForms\");\nconst JID = (0, tslib_1.__importStar)(require(\"../JID\"));\nconst Namespaces_1 = require(\"../Namespaces\");\nfunction default_1(client) {\n    client.getHistorySearchForm = async (jid, opts = {}) => {\n        const res = await client.sendIQ({\n            archive: {\n                type: 'query',\n                version: opts.version\n            },\n            to: jid,\n            type: 'get'\n        });\n        return res.archive.form;\n    };\n    client.searchHistory = async (jidOrOpts, opts = {}) => {\n        const queryid = client.nextId();\n        let jid = '';\n        if (typeof jidOrOpts === 'string') {\n            jid = jidOrOpts;\n        }\n        else {\n            jid = jidOrOpts.to || '';\n            opts = jidOrOpts;\n        }\n        opts.queryId = queryid;\n        const form = opts.form || {};\n        form.type = 'submit';\n        const fields = form.fields || [];\n        const defaultFields = [\n            {\n                name: 'FORM_TYPE',\n                type: 'hidden',\n                value: Namespaces_1.NS_MAM_2\n            }\n        ];\n        if (opts.with) {\n            defaultFields.push({\n                name: 'with',\n                type: 'text-single',\n                value: opts.with\n            });\n        }\n        if (opts.start) {\n            defaultFields.push({\n                name: 'start',\n                type: 'text-single',\n                value: opts.start.toISOString()\n            });\n        }\n        if (opts.end) {\n            defaultFields.push({\n                name: 'end',\n                type: 'text-single',\n                value: opts.end.toISOString()\n            });\n        }\n        form.fields = (0, DataForms_1.mergeFields)(defaultFields, fields);\n        opts.form = form;\n        const allowed = JID.allowedResponders(client.jid, jid);\n        const results = [];\n        const collector = (msg) => {\n            if (allowed.has(msg.from) && msg.archive && msg.archive.queryId === queryid) {\n                results.push(msg.archive);\n            }\n        };\n        client.on('mam:item', collector);\n        try {\n            const resp = await client.sendIQ({\n                archive: opts,\n                id: queryid,\n                to: jid,\n                type: 'set'\n            });\n            return {\n                ...resp.archive,\n                results\n            };\n        }\n        finally {\n            client.off('mam:item', collector);\n        }\n    };\n    client.getHistoryPreferences = async () => {\n        const resp = await client.sendIQ({\n            archive: {\n                type: 'preferences'\n            },\n            type: 'get'\n        });\n        return resp.archive;\n    };\n    client.setHistoryPreferences = (opts) => {\n        return client.sendIQ({\n            archive: {\n                type: 'preferences',\n                ...opts\n            },\n            type: 'set'\n        });\n    };\n    client.on('message', msg => {\n        if (msg.archive) {\n            client.emit('mam:item', msg);\n        }\n    });\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst JID = (0, tslib_1.__importStar)(require(\"../JID\"));\nconst Namespaces_1 = require(\"../Namespaces\");\nconst ACK_TYPES = new Set(['chat', 'groupchat', 'headline', 'normal']);\nconst ALLOWED_CHAT_STATE_TYPES = new Set(['chat', 'groupchat', 'normal']);\nconst MARKER_RANK = new Map([\n    ['markable', 0],\n    ['received', 1],\n    ['displayed', 2],\n    ['acknowledged', 3]\n]);\nconst isReceivedCarbon = (msg) => !!msg.carbon && msg.carbon.type === 'received';\nconst isSentCarbon = (msg) => !!msg.carbon && msg.carbon.type === 'sent';\nconst isChatState = (msg) => !!msg.chatState;\nconst isReceiptRequest = (msg) => { var _a; return !!msg.receipt && msg.receipt.type === 'request' && ACK_TYPES.has((_a = msg.type) !== null && _a !== void 0 ? _a : 'normal'); };\nconst hasRTT = (msg) => !!msg.rtt;\nconst isCorrection = (msg) => !!msg.replace;\nconst isMarkable = (msg, marker) => {\n    var _a;\n    return msg.marker &&\n        (MARKER_RANK.get(msg.marker.type) < MARKER_RANK.get(marker) ||\n            ((_a = msg.marker) === null || _a === void 0 ? void 0 : _a.type) === 'markable');\n};\nconst isFormsMessage = (msg) => !!msg.forms && msg.forms.length > 0;\nasync function toggleCarbons(client, action) {\n    await client.sendIQ({\n        carbons: {\n            action\n        },\n        type: 'set'\n    });\n}\nfunction default_1(client) {\n    client.disco.addFeature(Namespaces_1.NS_ATTENTION_0);\n    client.disco.addFeature(Namespaces_1.NS_CHAT_MARKERS_0);\n    client.disco.addFeature(Namespaces_1.NS_CHAT_STATES);\n    client.disco.addFeature(Namespaces_1.NS_CORRECTION_0);\n    client.disco.addFeature(Namespaces_1.NS_RECEIPTS);\n    client.disco.addFeature(Namespaces_1.NS_RTT_0);\n    client.enableCarbons = () => toggleCarbons(client, 'enable');\n    client.disableCarbons = () => toggleCarbons(client, 'disable');\n    client.markReceived = (msg) => client.sendMarker(msg, 'received');\n    client.markDisplayed = (msg) => client.sendMarker(msg, 'displayed');\n    client.markAcknowledged = (msg) => client.sendMarker(msg, 'acknowledged');\n    client.getAttention = (jid, opts = {}) => {\n        return client.sendMessage({\n            ...opts,\n            requestingAttention: true,\n            to: jid,\n            type: 'headline'\n        });\n    };\n    client.sendMarker = (msg, marker, force) => {\n        if (!isMarkable(msg, marker) && !force) {\n            return;\n        }\n        const useStanzaID = client.config.groupchatMarkersUseStanzaID !== false;\n        let id = msg.id;\n        if (msg.type === 'groupchat' && msg.stanzaIds && useStanzaID) {\n            const mucStanzaId = msg.stanzaIds.find(s => JID.equalBare(s.by, msg.from));\n            if (mucStanzaId) {\n                id = mucStanzaId.id;\n            }\n        }\n        client.sendMessage({\n            marker: {\n                id,\n                type: marker\n            },\n            to: msg.type === 'groupchat' ? JID.toBare(msg.from) : msg.from,\n            type: msg.type\n        });\n    };\n    client.on('message', msg => {\n        if (msg.carbon && JID.equalBare(msg.from, client.jid)) {\n            const forwardedMessage = msg.carbon.forward.message;\n            if (!forwardedMessage.delay) {\n                forwardedMessage.delay = msg.carbon.forward.delay || {\n                    timestamp: new Date(Date.now())\n                };\n            }\n            if (isReceivedCarbon(msg)) {\n                client.emit('carbon:received', msg);\n                client.emit('message', forwardedMessage);\n            }\n            if (isSentCarbon(msg)) {\n                client.emit('carbon:sent', msg);\n                client.emit('message:sent', forwardedMessage, true);\n            }\n        }\n        if (isFormsMessage(msg)) {\n            client.emit('dataform', msg);\n        }\n        if (msg.requestingAttention) {\n            client.emit('attention', msg);\n        }\n        if (hasRTT(msg)) {\n            client.emit('rtt', msg);\n        }\n        if (isCorrection(msg)) {\n            client.emit('replace', msg);\n        }\n        if (isChatState(msg) && ALLOWED_CHAT_STATE_TYPES.has(msg.type || 'normal')) {\n            client.emit('chat:state', msg);\n        }\n        const sendReceipts = client.config.sendReceipts !== false;\n        const sendMUCReceipts = client.config.sendMUCReceipts !== false;\n        const sendMarkers = client.config.chatMarkers !== false;\n        const useStanzaID = client.config.groupchatMarkersUseStanzaID !== false;\n        const isReceipt = isReceiptRequest(msg);\n        const isReceivedMarkable = isMarkable(msg, 'received');\n        const canSendReceipt = isReceipt && sendReceipts && (msg.type === 'groupchat' ? sendMUCReceipts : true);\n        if (canSendReceipt || (sendMarkers && isReceivedMarkable)) {\n            const to = msg.type === 'groupchat' ? JID.toBare(msg.from) : msg.from;\n            let markerId = msg.id;\n            if (msg.type === 'groupchat' && msg.stanzaIds && useStanzaID) {\n                const mucStanzaId = msg.stanzaIds.find(s => JID.equalBare(s.by, msg.from));\n                if (mucStanzaId) {\n                    markerId = mucStanzaId.id;\n                }\n            }\n            client.sendMessage({\n                receipt: canSendReceipt\n                    ? {\n                        id: msg.id,\n                        type: 'received'\n                    }\n                    : undefined,\n                marker: sendMarkers && isReceivedMarkable\n                    ? {\n                        id: markerId,\n                        type: 'received'\n                    }\n                    : undefined,\n                to,\n                type: msg.type\n            });\n        }\n        if (msg.receipt && msg.receipt.type === 'received') {\n            client.emit('receipt', msg);\n        }\n        if (msg.marker && msg.marker.type !== 'markable') {\n            client.emit(`marker:${msg.marker.type}`, msg);\n        }\n    });\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst Constants_1 = require(\"../Constants\");\nconst JID = (0, tslib_1.__importStar)(require(\"../JID\"));\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Utils_1 = require(\"../Utils\");\nfunction isMUCPresence(pres) {\n    return !!pres.muc;\n}\nfunction default_1(client) {\n    client.disco.addFeature(Namespaces_1.NS_MUC);\n    client.disco.addFeature(Namespaces_1.NS_MUC_DIRECT_INVITE);\n    client.disco.addFeature(Namespaces_1.NS_HATS_0);\n    client.joinedRooms = new Map();\n    client.joiningRooms = new Map();\n    client.leavingRooms = new Map();\n    function rejoinRooms() {\n        const oldJoiningRooms = client.joiningRooms;\n        client.joiningRooms = new Map();\n        for (const [room, nick] of oldJoiningRooms) {\n            client.joinRoom(room, nick);\n        }\n        const oldJoinedRooms = client.joinedRooms;\n        client.joinedRooms = new Map();\n        for (const [room, nick] of oldJoinedRooms) {\n            client.joinRoom(room, nick);\n        }\n    }\n    client.on('session:started', rejoinRooms);\n    client.on('message', msg => {\n        if (msg.type === 'groupchat' && msg.hasSubject && !msg.body) {\n            client.emit('muc:topic', {\n                from: msg.from,\n                room: JID.toBare(msg.from),\n                topic: msg.subject || ''\n            });\n            return;\n        }\n        if (!msg.muc) {\n            return;\n        }\n        if (msg.muc.type === 'direct-invite' || (!msg.muc.invite && msg.legacyMUC)) {\n            const invite = msg.muc.type === 'direct-invite' ? msg.muc : msg.legacyMUC;\n            client.emit('muc:invite', {\n                from: msg.from,\n                password: invite.password,\n                reason: invite.reason,\n                room: invite.jid,\n                thread: invite.thread,\n                type: 'direct'\n            });\n            return;\n        }\n        if (msg.muc.invite) {\n            client.emit('muc:invite', {\n                from: msg.muc.invite[0].from,\n                password: msg.muc.password,\n                reason: msg.muc.invite[0].reason,\n                room: msg.from,\n                thread: msg.muc.invite[0].thread,\n                type: 'mediated'\n            });\n            return;\n        }\n        if (msg.muc.decline) {\n            client.emit('muc:declined', {\n                from: msg.muc.decline.from,\n                reason: msg.muc.decline.reason,\n                room: msg.from\n            });\n            return;\n        }\n        client.emit('muc:other', msg);\n    });\n    client.on('presence', pres => {\n        const room = JID.toBare(pres.from);\n        if (client.joiningRooms.has(room) && pres.type === 'error') {\n            client.joiningRooms.delete(room);\n            client.emit('muc:failed', pres);\n            client.emit('muc:error', pres);\n            return;\n        }\n        if (!isMUCPresence(pres)) {\n            return;\n        }\n        const isSelf = pres.muc.statusCodes && pres.muc.statusCodes.indexOf(Constants_1.MUCStatusCode.SelfPresence) >= 0;\n        const isNickChange = pres.muc.statusCodes && pres.muc.statusCodes.indexOf(Constants_1.MUCStatusCode.NickChanged) >= 0;\n        if (pres.type === 'error') {\n            client.emit('muc:error', pres);\n            return;\n        }\n        if (pres.type === 'unavailable') {\n            client.emit('muc:unavailable', pres);\n            if (isSelf) {\n                if (isNickChange) {\n                    client.joinedRooms.set(room, pres.muc.nick);\n                }\n                else {\n                    client.emit('muc:leave', pres);\n                    client.joinedRooms.delete(room);\n                    client.leavingRooms.delete(room);\n                }\n            }\n            if (pres.muc.destroy) {\n                client.emit('muc:destroyed', {\n                    newRoom: pres.muc.destroy.jid,\n                    password: pres.muc.destroy.password,\n                    reason: pres.muc.destroy.reason,\n                    room\n                });\n            }\n            return;\n        }\n        client.emit('muc:available', pres);\n        const isJoin = client.joiningRooms.has(room) || !client.joinedRooms.has(room);\n        if (isSelf) {\n            client.joinedRooms.set(room, JID.getResource(pres.from));\n            if (isJoin) {\n                client.joiningRooms.delete(room);\n                client.emit('muc:join', pres);\n            }\n        }\n    });\n    client.joinRoom = async (room, nick, opts = {}) => {\n        room = JID.toBare(room);\n        client.joiningRooms.set(room, nick || '');\n        if (!nick) {\n            try {\n                nick = await client.getReservedNick(room);\n                client.joiningRooms.set(room, nick);\n            }\n            catch (err) {\n                throw new Error('Room nick required');\n            }\n        }\n        return new Promise((resolve, reject) => {\n            function joined(pres) {\n                if (JID.equalBare(pres.from, room)) {\n                    client.off('muc:join', joined);\n                    client.off('muc:failed', failed);\n                    resolve(pres);\n                }\n            }\n            function failed(pres) {\n                if (JID.equalBare(pres.from, room)) {\n                    client.off('muc:join', joined);\n                    client.off('muc:failed', failed);\n                    reject(pres);\n                }\n            }\n            client.on('muc:join', joined);\n            client.on('muc:failed', failed);\n            client.sendPresence({\n                ...opts,\n                muc: {\n                    ...opts.muc,\n                    type: 'join'\n                },\n                to: JID.createFull(room, nick)\n            });\n        });\n    };\n    client.leaveRoom = (room, nick, opts = {}) => {\n        room = JID.toBare(room);\n        nick = nick || client.joinedRooms.get(room);\n        client.leavingRooms.set(room, nick);\n        return new Promise((resolve, reject) => {\n            const id = opts.id || (0, Utils_1.uuid)();\n            const allowed = JID.allowedResponders(room);\n            function leave(pres) {\n                if (JID.equalBare(pres.from, room)) {\n                    client.off('muc:leave', leave);\n                    client.off('presence:error', leaveError);\n                    resolve(pres);\n                }\n            }\n            function leaveError(pres) {\n                if (pres.id === id && allowed.has(pres.from)) {\n                    if (!client.joinedRooms.has(room)) {\n                        client.leavingRooms.delete(room);\n                    }\n                    client.off('muc:leave', leave);\n                    client.off('presence:error', leaveError);\n                    reject(pres);\n                }\n            }\n            client.on('muc:leave', leave);\n            client.on('presence:error', leaveError);\n            client.sendPresence({\n                ...opts,\n                id,\n                to: JID.createFull(room, nick),\n                type: 'unavailable'\n            });\n        });\n    };\n    client.ban = (room, occupantRealJID, reason) => {\n        return client.setRoomAffiliation(room, occupantRealJID, 'outcast', reason);\n    };\n    client.kick = (room, nick, reason) => {\n        return client.setRoomRole(room, nick, 'none', reason);\n    };\n    client.invite = (room, opts = []) => {\n        if (!Array.isArray(opts)) {\n            opts = [opts];\n        }\n        client.sendMessage({\n            muc: {\n                invite: opts,\n                type: 'info'\n            },\n            to: room\n        });\n    };\n    client.directInvite = (room, to, opts = {}) => {\n        client.sendMessage({\n            muc: {\n                ...opts,\n                jid: room,\n                type: 'direct-invite'\n            },\n            to\n        });\n    };\n    client.declineInvite = (room, sender, reason) => {\n        client.sendMessage({\n            muc: {\n                decline: {\n                    reason,\n                    to: sender\n                },\n                type: 'info'\n            },\n            to: room\n        });\n    };\n    client.changeNick = (room, nick) => {\n        const id = (0, Utils_1.uuid)();\n        const newJID = JID.createFull(room, nick);\n        const allowed = JID.allowedResponders(room);\n        return new Promise((resolve, reject) => {\n            function success(pres) {\n                if (!allowed.has(JID.toBare(pres.from))) {\n                    return;\n                }\n                if (!pres.muc.statusCodes ||\n                    !pres.muc.statusCodes.includes(Constants_1.MUCStatusCode.SelfPresence)) {\n                    return;\n                }\n                client.off('muc:available', success);\n                client.off(`presence:id:${id}`, errorOrNoChange);\n                resolve(pres);\n            }\n            function errorOrNoChange(pres) {\n                if (!allowed.has(JID.toBare(pres.from)) || pres.id !== id) {\n                    return;\n                }\n                client.off('muc:available', success);\n                client.off(`presence:id:${id}`, errorOrNoChange);\n                if (pres.type === 'error') {\n                    reject(pres);\n                }\n                else {\n                    resolve(pres);\n                }\n            }\n            client.on('muc:available', success);\n            client.on(`presence:id:${id}`, errorOrNoChange);\n            client.sendPresence({\n                id,\n                to: newJID\n            });\n        });\n    };\n    client.setSubject = (room, subject) => {\n        client.sendMessage({\n            subject,\n            to: room,\n            type: 'groupchat'\n        });\n    };\n    client.getReservedNick = async (room) => {\n        try {\n            const info = await client.getDiscoInfo(room, 'x-roomuser-item');\n            const identity = info.identities[0];\n            if (identity.name) {\n                return identity.name;\n            }\n            else {\n                throw new Error('No nickname reserved');\n            }\n        }\n        catch (err) {\n            throw new Error('No nickname reserved');\n        }\n    };\n    client.requestRoomVoice = (room) => {\n        client.sendMessage({\n            forms: [\n                {\n                    fields: [\n                        {\n                            name: 'FORM_TYPE',\n                            type: 'hidden',\n                            value: 'http://jabber.org/protocol/muc#request'\n                        },\n                        {\n                            name: 'muc#role',\n                            type: 'text-single',\n                            value: 'participant'\n                        }\n                    ],\n                    type: 'submit'\n                }\n            ],\n            to: room\n        });\n    };\n    client.setRoomAffiliation = (room, occupantRealJID, affiliation, reason) => {\n        return client.sendIQ({\n            muc: {\n                type: 'user-list',\n                users: [\n                    {\n                        affiliation,\n                        jid: occupantRealJID,\n                        reason\n                    }\n                ]\n            },\n            to: room,\n            type: 'set'\n        });\n    };\n    client.setRoomRole = (room, nick, role, reason) => {\n        return client.sendIQ({\n            muc: {\n                type: 'user-list',\n                users: [\n                    {\n                        nick,\n                        reason,\n                        role\n                    }\n                ]\n            },\n            to: room,\n            type: 'set'\n        });\n    };\n    client.getRoomMembers = (room, opts = { affiliation: 'member' }) => {\n        return client.sendIQ({\n            muc: {\n                type: 'user-list',\n                users: [opts]\n            },\n            to: room,\n            type: 'get'\n        });\n    };\n    client.getRoomConfig = async (room) => {\n        const result = await client.sendIQ({\n            muc: {\n                type: 'configure'\n            },\n            to: room,\n            type: 'get'\n        });\n        if (!result.muc.form) {\n            throw new Error('No configuration form returned');\n        }\n        return result.muc.form;\n    };\n    client.configureRoom = (room, form = {}) => {\n        return client.sendIQ({\n            muc: {\n                form: {\n                    ...form,\n                    type: 'submit'\n                },\n                type: 'configure'\n            },\n            to: room,\n            type: 'set'\n        });\n    };\n    client.destroyRoom = (room, opts = {}) => {\n        return client.sendIQ({\n            muc: {\n                destroy: opts,\n                type: 'configure'\n            },\n            to: room,\n            type: 'set'\n        });\n    };\n    client.getUniqueRoomName = async function (mucHost) {\n        const result = await this.sendIQ({\n            muc: {\n                type: 'unique'\n            },\n            to: mucHost,\n            type: 'get'\n        });\n        if (!result.muc.name) {\n            throw new Error('No unique name returned');\n        }\n        return result.muc.name;\n    };\n    client.getBookmarks = async () => {\n        const res = await client.getPrivateData('bookmarks');\n        if (!res || !res.rooms) {\n            return [];\n        }\n        return res.rooms;\n    };\n    client.setBookmarks = (bookmarks) => {\n        return client.setPrivateData('bookmarks', {\n            rooms: bookmarks\n        });\n    };\n    client.addBookmark = async (bookmark) => {\n        const mucs = await client.getBookmarks();\n        const updated = [];\n        let updatedExisting = false;\n        for (const muc of mucs) {\n            if (JID.equalBare(muc.jid, bookmark.jid)) {\n                updated.push({\n                    ...muc,\n                    ...bookmark\n                });\n                updatedExisting = true;\n            }\n            else {\n                updated.push(muc);\n            }\n        }\n        if (!updatedExisting) {\n            updated.push(bookmark);\n        }\n        return client.setBookmarks(updated);\n    };\n    client.removeBookmark = async (jid) => {\n        const existingMucs = await client.getBookmarks();\n        const updated = existingMucs.filter(muc => {\n            return !JID.equalBare(muc.jid, jid);\n        });\n        return client.setBookmarks(updated);\n    };\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Namespaces_1 = require(\"../Namespaces\");\nfunction default_1(client) {\n    client.disco.addFeature(Namespaces_1.NS_ACTIVITY);\n    client.disco.addFeature(Namespaces_1.NS_GEOLOC);\n    client.disco.addFeature(Namespaces_1.NS_MOOD);\n    client.disco.addFeature(Namespaces_1.NS_NICK);\n    client.disco.addFeature(Namespaces_1.NS_TUNE);\n    client.disco.addFeature((0, Namespaces_1.NS_PEP_NOTIFY)(Namespaces_1.NS_ACTIVITY));\n    client.disco.addFeature((0, Namespaces_1.NS_PEP_NOTIFY)(Namespaces_1.NS_GEOLOC));\n    client.disco.addFeature((0, Namespaces_1.NS_PEP_NOTIFY)(Namespaces_1.NS_MOOD));\n    client.disco.addFeature((0, Namespaces_1.NS_PEP_NOTIFY)(Namespaces_1.NS_NICK));\n    client.disco.addFeature((0, Namespaces_1.NS_PEP_NOTIFY)(Namespaces_1.NS_TUNE));\n    client.publishActivity = (data) => {\n        return client.publish('', Namespaces_1.NS_ACTIVITY, {\n            itemType: Namespaces_1.NS_ACTIVITY,\n            ...data\n        });\n    };\n    client.publishGeoLoc = (data) => {\n        return client.publish('', Namespaces_1.NS_GEOLOC, {\n            itemType: Namespaces_1.NS_GEOLOC,\n            ...data\n        });\n    };\n    client.publishMood = (mood) => {\n        return client.publish('', Namespaces_1.NS_MOOD, {\n            itemType: Namespaces_1.NS_MOOD,\n            ...mood\n        });\n    };\n    client.publishNick = (nick) => {\n        return client.publish('', Namespaces_1.NS_NICK, {\n            itemType: Namespaces_1.NS_NICK,\n            nick\n        });\n    };\n    client.publishTune = (tune) => {\n        return client.publish('', Namespaces_1.NS_TUNE, {\n            itemType: Namespaces_1.NS_TUNE,\n            ...tune\n        });\n    };\n    client.on('pubsub:published', msg => {\n        const content = msg.pubsub.items.published[0].content;\n        switch (msg.pubsub.items.node) {\n            case Namespaces_1.NS_ACTIVITY:\n                return client.emit('activity', {\n                    activity: content,\n                    jid: msg.from\n                });\n            case Namespaces_1.NS_GEOLOC:\n                return client.emit('geoloc', {\n                    geoloc: content,\n                    jid: msg.from\n                });\n            case Namespaces_1.NS_MOOD:\n                return client.emit('mood', {\n                    jid: msg.from,\n                    mood: content\n                });\n            case Namespaces_1.NS_NICK:\n                return client.emit('nick', {\n                    jid: msg.from,\n                    nick: content.nick\n                });\n            case Namespaces_1.NS_TUNE:\n                return client.emit('tune', {\n                    jid: msg.from,\n                    tune: msg.pubsub.items.published[0].content\n                });\n        }\n    });\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst JID = (0, tslib_1.__importStar)(require(\"../JID\"));\nconst Namespaces_1 = require(\"../Namespaces\");\nfunction isPubsubMessage(msg) {\n    return !!msg.pubsub;\n}\nfunction isPubsubPublish(msg) {\n    return !!msg.pubsub.items && !!msg.pubsub.items.published;\n}\nfunction isPubsubRetract(msg) {\n    return !!msg.pubsub.items && !!msg.pubsub.items.retracted;\n}\nfunction isPubsubPurge(msg) {\n    return msg.pubsub.eventType === 'purge';\n}\nfunction isPubsubDelete(msg) {\n    return msg.pubsub.eventType === 'delete';\n}\nfunction isPubsubSubscription(msg) {\n    return msg.pubsub.eventType === 'subscription';\n}\nfunction isPubsubConfiguration(msg) {\n    return msg.pubsub.eventType === 'configuration';\n}\nfunction isPubsubAffiliation(msg) {\n    if (!msg.pubsub) {\n        return false;\n    }\n    return (!msg.pubsub.context || msg.pubsub.context === 'user') && !!msg.pubsub.affiliations;\n}\nfunction default_1(client) {\n    client.disco.addFeature(`${Namespaces_1.NS_SHIM}#SubID`, Namespaces_1.NS_SHIM);\n    client.on('message', msg => {\n        if (isPubsubAffiliation(msg)) {\n            client.emit('pubsub:affiliations', msg);\n            return;\n        }\n        if (!isPubsubMessage(msg)) {\n            return;\n        }\n        client.emit('pubsub:event', msg);\n        if (isPubsubPublish(msg)) {\n            client.emit('pubsub:published', msg);\n            return;\n        }\n        if (isPubsubRetract(msg)) {\n            client.emit('pubsub:retracted', msg);\n            return;\n        }\n        if (isPubsubPurge(msg)) {\n            client.emit('pubsub:purged', msg);\n            return;\n        }\n        if (isPubsubDelete(msg)) {\n            client.emit('pubsub:deleted', msg);\n            return;\n        }\n        if (isPubsubSubscription(msg)) {\n            client.emit('pubsub:subscription', msg);\n            return;\n        }\n        if (isPubsubConfiguration(msg)) {\n            client.emit('pubsub:config', msg);\n            return;\n        }\n    });\n    client.subscribeToNode = async (jid, opts) => {\n        const subscribe = {};\n        let form;\n        if (typeof opts === 'string') {\n            subscribe.node = opts;\n            subscribe.jid = JID.toBare(client.jid);\n        }\n        else {\n            subscribe.node = opts.node;\n            subscribe.jid = opts.jid || (opts.useBareJID ? JID.toBare(client.jid) : client.jid);\n            form = opts.options;\n        }\n        const resp = await client.sendIQ({\n            pubsub: {\n                context: 'user',\n                subscribe,\n                subscriptionOptions: form ? { form } : undefined\n            },\n            to: jid,\n            type: 'set'\n        });\n        const sub = resp.pubsub.subscription || {};\n        if (resp.pubsub.subscriptionOptions) {\n            sub.options = resp.pubsub.subscriptionOptions.form;\n        }\n        return sub;\n    };\n    client.unsubscribeFromNode = async (jid, opts) => {\n        const unsubscribe = {};\n        if (typeof opts === 'string') {\n            unsubscribe.node = opts;\n            unsubscribe.jid = JID.toBare(client.jid);\n        }\n        else {\n            unsubscribe.node = opts.node;\n            unsubscribe.subid = opts.subid;\n            unsubscribe.jid = opts.jid || (opts.useBareJID ? JID.toBare(client.jid) : client.jid);\n        }\n        const resp = await client.sendIQ({\n            pubsub: {\n                context: 'user',\n                unsubscribe\n            },\n            to: jid,\n            type: 'set'\n        });\n        if (!resp.pubsub || !resp.pubsub.subscription) {\n            return {\n                ...unsubscribe,\n                state: 'none'\n            };\n        }\n        return resp.pubsub.subscription;\n    };\n    client.publish = (jid, node, item, id) => {\n        return client.sendIQ({\n            pubsub: {\n                context: 'user',\n                publish: {\n                    item: {\n                        content: item,\n                        id\n                    },\n                    node\n                }\n            },\n            to: jid,\n            type: 'set'\n        });\n    };\n    client.getItem = async (jid, node, id) => {\n        const resp = await client.sendIQ({\n            pubsub: {\n                context: 'user',\n                fetch: {\n                    items: [{ id }],\n                    node\n                }\n            },\n            to: jid,\n            type: 'get'\n        });\n        return resp.pubsub.fetch.items[0];\n    };\n    client.getItems = async (jid, node, opts = {}) => {\n        const resp = await client.sendIQ({\n            pubsub: {\n                context: 'user',\n                fetch: {\n                    max: opts.max,\n                    node\n                },\n                paging: opts\n            },\n            to: jid,\n            type: 'get'\n        });\n        const result = resp.pubsub.fetch;\n        result.paging = resp.pubsub.paging;\n        return result;\n    };\n    client.retract = (jid, node, id, notify) => {\n        return client.sendIQ({\n            pubsub: {\n                context: 'user',\n                retract: {\n                    id,\n                    node,\n                    notify\n                }\n            },\n            to: jid,\n            type: 'set'\n        });\n    };\n    client.purgeNode = (jid, node) => {\n        return client.sendIQ({\n            pubsub: {\n                context: 'owner',\n                purge: node\n            },\n            to: jid,\n            type: 'set'\n        });\n    };\n    client.deleteNode = (jid, node, redirect) => {\n        return client.sendIQ({\n            pubsub: {\n                context: 'owner',\n                destroy: {\n                    node,\n                    redirect\n                }\n            },\n            to: jid,\n            type: 'set'\n        });\n    };\n    client.createNode = async (jid, node, config) => {\n        const resp = await client.sendIQ({\n            pubsub: {\n                configure: config\n                    ? {\n                        form: config\n                    }\n                    : undefined,\n                context: 'user',\n                create: {\n                    node\n                }\n            },\n            to: jid,\n            type: 'set'\n        });\n        if (!resp.pubsub || !resp.pubsub.create) {\n            return {\n                node\n            };\n        }\n        return resp.pubsub.create;\n    };\n    client.getSubscriptions = async (jid, opts = {}) => {\n        const resp = await client.sendIQ({\n            pubsub: {\n                context: 'user',\n                subscriptions: opts\n            },\n            to: jid,\n            type: 'get'\n        });\n        return resp.pubsub.subscriptions;\n    };\n    client.getAffiliations = (jid, node) => {\n        return client.sendIQ({\n            pubsub: {\n                affiliations: {\n                    node\n                }\n            },\n            to: jid,\n            type: 'get'\n        });\n    };\n    client.getNodeSubscribers = (jid, node, opts = {}) => {\n        if (typeof node === 'string') {\n            opts.node = node;\n        }\n        else {\n            opts = {\n                ...opts,\n                ...node\n            };\n        }\n        return client.sendIQ({\n            pubsub: {\n                context: 'owner',\n                subscriptions: opts\n            },\n            to: jid,\n            type: 'get'\n        });\n    };\n    client.updateNodeSubscriptions = (jid, node, delta) => {\n        return client.sendIQ({\n            pubsub: {\n                context: 'owner',\n                subscriptions: {\n                    items: delta,\n                    node\n                }\n            },\n            to: jid,\n            type: 'set'\n        });\n    };\n    client.getNodeAffiliations = async (jid, node) => {\n        const resp = await client.sendIQ({\n            pubsub: {\n                affiliations: {\n                    node\n                },\n                context: 'owner'\n            },\n            to: jid,\n            type: 'get'\n        });\n        return resp.pubsub.affiliations;\n    };\n    client.updateNodeAffiliations = (jid, node, items) => {\n        return client.sendIQ({\n            pubsub: {\n                affiliations: {\n                    items,\n                    node\n                },\n                context: 'owner'\n            },\n            to: jid,\n            type: 'set'\n        });\n    };\n    client.getNodeConfig = async (jid, node) => {\n        const resp = await client.sendIQ({\n            pubsub: {\n                configure: {\n                    node\n                },\n                context: 'owner'\n            },\n            to: jid,\n            type: 'get'\n        });\n        return resp.pubsub.configure.form || {};\n    };\n    client.getDefaultNodeConfig = async (jid) => {\n        const resp = await client.sendIQ({\n            pubsub: {\n                context: 'owner',\n                defaultConfiguration: {}\n            },\n            to: jid,\n            type: 'get'\n        });\n        return resp.pubsub.defaultConfiguration.form || {};\n    };\n    client.configureNode = async (jid, node, config) => {\n        return client.sendIQ({\n            pubsub: {\n                configure: {\n                    form: config,\n                    node\n                },\n                context: 'owner'\n            },\n            to: jid,\n            type: 'set'\n        });\n    };\n    client.getDefaultSubscriptionOptions = async (jid) => {\n        const resp = await client.sendIQ({\n            pubsub: {\n                defaultSubscriptionOptions: {}\n            },\n            to: jid,\n            type: 'get'\n        });\n        return resp.pubsub.defaultSubscriptionOptions.form || {};\n    };\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst JID = (0, tslib_1.__importStar)(require(\"../JID\"));\nfunction default_1(client) {\n    client.on('iq:set:roster', iq => {\n        const allowed = JID.allowedResponders(client.jid);\n        if (!allowed.has(iq.from)) {\n            return client.sendIQError(iq, {\n                error: {\n                    condition: 'service-unavailable',\n                    type: 'cancel'\n                }\n            });\n        }\n        client.emit('roster:update', iq);\n        client.sendIQResult(iq);\n    });\n    client.on('iq:set:blockList', iq => {\n        const allowed = JID.allowedResponders(client.jid);\n        if (!allowed.has(iq.from)) {\n            return client.sendIQError(iq, {\n                error: {\n                    condition: 'service-unavailable',\n                    type: 'cancel'\n                }\n            });\n        }\n        const blockList = iq.blockList;\n        client.emit(blockList.action, {\n            jids: blockList.jids || []\n        });\n        client.sendIQResult(iq);\n    });\n    client.getRoster = async () => {\n        const resp = await client.sendIQ({\n            roster: {\n                version: client.config.rosterVer\n            },\n            type: 'get'\n        });\n        if (resp.roster) {\n            const version = resp.roster.version;\n            if (version) {\n                client.config.rosterVer = version;\n                client.emit('roster:ver', version);\n            }\n            resp.roster.items = resp.roster.items || [];\n            return resp.roster;\n        }\n        else {\n            return { items: [] };\n        }\n    };\n    client.updateRosterItem = async (item) => {\n        await client.sendIQ({\n            roster: {\n                items: [item]\n            },\n            type: 'set'\n        });\n    };\n    client.removeRosterItem = (jid) => {\n        return client.updateRosterItem({ jid, subscription: 'remove' });\n    };\n    client.subscribe = (jid) => {\n        client.sendPresence({ type: 'subscribe', to: jid });\n    };\n    client.unsubscribe = (jid) => {\n        client.sendPresence({ type: 'unsubscribe', to: jid });\n    };\n    client.acceptSubscription = (jid) => {\n        client.sendPresence({ type: 'subscribed', to: jid });\n    };\n    client.denySubscription = (jid) => {\n        client.sendPresence({ type: 'unsubscribed', to: jid });\n    };\n    client.getBlocked = async () => {\n        const result = await client.sendIQ({\n            blockList: {\n                action: 'list'\n            },\n            type: 'get'\n        });\n        return {\n            jids: [],\n            ...result.blockList\n        };\n    };\n    async function toggleBlock(action, jid) {\n        await client.sendIQ({\n            blockList: {\n                action,\n                jids: [jid]\n            },\n            type: 'set'\n        });\n    }\n    client.block = async (jid) => toggleBlock('block', jid);\n    client.unblock = async (jid) => toggleBlock('unblock', jid);\n    client.goInvisible = async (probe = false) => {\n        await client.sendIQ({\n            type: 'set',\n            visiblity: {\n                probe,\n                type: 'invisible'\n            }\n        });\n    };\n    client.goVisible = async () => {\n        await client.sendIQ({\n            type: 'set',\n            visiblity: {\n                type: 'visible'\n            }\n        });\n    };\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction default_1(client) {\n    client.registerFeature('sasl', 100, async (features, done) => {\n        const mech = client.sasl.createMechanism(features.sasl.mechanisms);\n        const saslHandler = async (sasl) => {\n            if (!mech) {\n                return;\n            }\n            switch (sasl.type) {\n                case 'success': {\n                    client.features.negotiated.sasl = true;\n                    client.off('sasl', saslHandler);\n                    client.emit('auth:success', client.config.credentials);\n                    if (client.transport) {\n                        client.transport.authenticated = true;\n                    }\n                    done('restart');\n                    return;\n                }\n                case 'challenge': {\n                    mech.processChallenge(sasl.value);\n                    try {\n                        const credentials = (await client.getCredentials());\n                        const resp = mech.createResponse(credentials);\n                        if (resp || resp === '') {\n                            client.send('sasl', {\n                                type: 'response',\n                                value: resp\n                            });\n                        }\n                        else {\n                            client.send('sasl', {\n                                type: 'response'\n                            });\n                        }\n                        const cacheable = mech.getCacheableCredentials();\n                        if (cacheable) {\n                            if (!client.config.credentials) {\n                                client.config.credentials = {};\n                            }\n                            client.config.credentials = {\n                                ...client.config.credentials,\n                                ...cacheable\n                            };\n                            client.emit('credentials:update', client.config.credentials);\n                        }\n                    }\n                    catch (err) {\n                        console.error(err);\n                        client.send('sasl', {\n                            type: 'abort'\n                        });\n                    }\n                    return;\n                }\n                case 'failure':\n                case 'abort': {\n                    client.off('sasl', saslHandler);\n                    client.emit('auth:failed');\n                    done('disconnect', 'authentication failed');\n                    return;\n                }\n            }\n        };\n        if (!mech) {\n            client.off('sasl', saslHandler);\n            client.emit('auth:failed');\n            return done('disconnect', 'authentication failed');\n        }\n        client.on('sasl', saslHandler);\n        client.once('--reset-stream-features', () => {\n            client.features.negotiated.sasl = false;\n            client.off('sasl', saslHandler);\n        });\n        try {\n            const credentials = (await client.getCredentials());\n            client.send('sasl', {\n                mechanism: mech.name,\n                type: 'auth',\n                value: mech.createResponse(credentials)\n            });\n        }\n        catch (err) {\n            console.error(err);\n            client.send('sasl', {\n                type: 'abort'\n            });\n        }\n    });\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst JID = (0, tslib_1.__importStar)(require(\"../JID\"));\nconst Namespaces_1 = require(\"../Namespaces\");\nfunction default_1(client) {\n    client.disco.addFeature(Namespaces_1.NS_BOB);\n    client.getBits = async (jid, cid) => {\n        const result = await client.sendIQ({\n            bits: {\n                cid\n            },\n            to: jid,\n            type: 'get'\n        });\n        return result.bits;\n    };\n    async function getUploadParameters(jid) {\n        const disco = await client.getDiscoInfo(jid);\n        if (!disco.features || !disco.features.includes(Namespaces_1.NS_HTTP_UPLOAD_0)) {\n            return;\n        }\n        let maxSize;\n        for (const form of disco.extensions || []) {\n            const fields = form.fields || [];\n            if (fields.some(field => field.name === 'FORM_TYPE' && field.value === Namespaces_1.NS_HTTP_UPLOAD_0)) {\n                const sizeField = fields.find(field => field.name === 'max-file-size');\n                if (sizeField) {\n                    maxSize = parseInt(sizeField.value, 10);\n                }\n                return {\n                    jid,\n                    maxSize\n                };\n            }\n        }\n    }\n    client.getUploadService = async (domain = JID.getDomain(client.jid)) => {\n        const domainParameters = await getUploadParameters(domain);\n        if (domainParameters) {\n            return domainParameters;\n        }\n        const disco = await client.getDiscoItems(domain);\n        for (const item of disco.items || []) {\n            if (!item.jid) {\n                continue;\n            }\n            const itemParameters = await getUploadParameters(item.jid);\n            if (itemParameters) {\n                return itemParameters;\n            }\n        }\n        throw new Error('No upload service discovered on: ' + domain);\n    };\n    client.getUploadSlot = async (uploadService, uploadRequest) => {\n        const resp = await client.sendIQ({\n            httpUpload: {\n                type: 'request',\n                ...uploadRequest\n            },\n            to: uploadService,\n            type: 'get'\n        });\n        return resp.httpUpload;\n    };\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.core = void 0;\nconst tslib_1 = require(\"tslib\");\n(0, tslib_1.__exportStar)(require(\"./account\"), exports);\n(0, tslib_1.__exportStar)(require(\"./avatar\"), exports);\n(0, tslib_1.__exportStar)(require(\"./bind\"), exports);\n(0, tslib_1.__exportStar)(require(\"./command\"), exports);\n(0, tslib_1.__exportStar)(require(\"./connection\"), exports);\n(0, tslib_1.__exportStar)(require(\"./disco\"), exports);\n(0, tslib_1.__exportStar)(require(\"./entity\"), exports);\n(0, tslib_1.__exportStar)(require(\"./features\"), exports);\n(0, tslib_1.__exportStar)(require(\"./hostmeta\"), exports);\n(0, tslib_1.__exportStar)(require(\"./jingle\"), exports);\n(0, tslib_1.__exportStar)(require(\"./mam\"), exports);\n(0, tslib_1.__exportStar)(require(\"./messaging\"), exports);\n(0, tslib_1.__exportStar)(require(\"./muc\"), exports);\n(0, tslib_1.__exportStar)(require(\"./pep\"), exports);\n(0, tslib_1.__exportStar)(require(\"./pubsub\"), exports);\n(0, tslib_1.__exportStar)(require(\"./roster\"), exports);\n(0, tslib_1.__exportStar)(require(\"./sasl\"), exports);\n(0, tslib_1.__exportStar)(require(\"./sharing\"), exports);\nconst account_1 = (0, tslib_1.__importDefault)(require(\"./account\"));\nconst avatar_1 = (0, tslib_1.__importDefault)(require(\"./avatar\"));\nconst bind_1 = (0, tslib_1.__importDefault)(require(\"./bind\"));\nconst command_1 = (0, tslib_1.__importDefault)(require(\"./command\"));\nconst connection_1 = (0, tslib_1.__importDefault)(require(\"./connection\"));\nconst disco_1 = (0, tslib_1.__importDefault)(require(\"./disco\"));\nconst entity_1 = (0, tslib_1.__importDefault)(require(\"./entity\"));\nconst features_1 = (0, tslib_1.__importDefault)(require(\"./features\"));\nconst hostmeta_1 = (0, tslib_1.__importDefault)(require(\"./hostmeta\"));\nconst jingle_1 = (0, tslib_1.__importDefault)(require(\"./jingle\"));\nconst mam_1 = (0, tslib_1.__importDefault)(require(\"./mam\"));\nconst messaging_1 = (0, tslib_1.__importDefault)(require(\"./messaging\"));\nconst muc_1 = (0, tslib_1.__importDefault)(require(\"./muc\"));\nconst pep_1 = (0, tslib_1.__importDefault)(require(\"./pep\"));\nconst pubsub_1 = (0, tslib_1.__importDefault)(require(\"./pubsub\"));\nconst roster_1 = (0, tslib_1.__importDefault)(require(\"./roster\"));\nconst sasl_1 = (0, tslib_1.__importDefault)(require(\"./sasl\"));\nconst sharing_1 = (0, tslib_1.__importDefault)(require(\"./sharing\"));\nfunction core(client) {\n    client.use(features_1.default);\n    client.use(disco_1.default);\n    client.use(bind_1.default);\n    client.use(connection_1.default);\n    client.use(hostmeta_1.default);\n    client.use(sasl_1.default);\n}\nexports.core = core;\nfunction default_1(client) {\n    client.use(account_1.default);\n    client.use(messaging_1.default);\n    client.use(avatar_1.default);\n    client.use(command_1.default);\n    client.use(entity_1.default);\n    client.use(jingle_1.default);\n    client.use(mam_1.default);\n    client.use(muc_1.default);\n    client.use(pep_1.default);\n    client.use(pubsub_1.default);\n    client.use(roster_1.default);\n    client.use(sharing_1.default);\n}\nexports.default = default_1;\n","\"use strict\";\n// ====================================================================\n// RFC 3921: Extensible Messaging and Presence Protocol (XMPP): Core\n// --------------------------------------------------------------------\n// Source: https://tools.ietf.org/html/rfc3921\n//\n// Additional:\n// --------------------------------------------------------------------\n// draft-cridland-xmpp-session-01: Here Lies Extensible Messaging and\n//      Presence Protocol (XMPP) Session Establishment\n// -------------------------------------------------------------------\n// Source: https://tools.ietf.org/html/draft-cridland-xmpp-session-01\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    aliases: ['features.legacySession', 'iq.legacySession'],\n    element: 'session',\n    fields: {\n        // draft-cridland-xmpp-session-01\n        //\n        // The <optional /> child is not yet standardized, but is\n        // still widely deployed to reduce client start times.\n        optional: (0, jxt_1.childBoolean)(null, 'optional')\n    },\n    namespace: Namespaces_1.NS_SESSION\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// RFC 4287: The Atom Syndication Format\n// --------------------------------------------------------------------\n// Source: https://tools.ietf.org/html/rfc4287\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        aliases: ['atomentry', ...(0, jxt_1.pubsubItemContentAliases)()],\n        element: 'entry',\n        fields: {\n            id: (0, jxt_1.childText)(null, 'id'),\n            published: (0, jxt_1.childDate)(null, 'published'),\n            updated: (0, jxt_1.childDate)(null, 'updated')\n        },\n        namespace: Namespaces_1.NS_ATOM,\n        type: Namespaces_1.NS_ATOM,\n        typeField: 'itemType'\n    },\n    {\n        element: 'summary',\n        fields: {\n            text: (0, jxt_1.text)(),\n            type: (0, jxt_1.attribute)('type', 'text')\n        },\n        namespace: Namespaces_1.NS_ATOM,\n        path: 'atomentry.summary'\n    },\n    {\n        element: 'title',\n        fields: {\n            text: (0, jxt_1.text)(),\n            type: (0, jxt_1.attribute)('type', 'text')\n        },\n        namespace: Namespaces_1.NS_ATOM,\n        path: 'atomentry.title'\n    },\n    {\n        aliases: [{ path: 'atomentry.links', multiple: true }],\n        element: 'link',\n        fields: {\n            href: (0, jxt_1.attribute)('href'),\n            mediaType: (0, jxt_1.attribute)('type'),\n            rel: (0, jxt_1.attribute)('rel')\n        },\n        namespace: Namespaces_1.NS_ATOM\n    },\n    {\n        aliases: [{ path: 'atomentry.authors', multiple: true }],\n        element: 'author',\n        fields: {\n            name: (0, jxt_1.childText)(null, 'name'),\n            uri: (0, jxt_1.childText)(null, 'uri'),\n            email: (0, jxt_1.childText)(null, 'email')\n        },\n        namespace: Namespaces_1.NS_ATOM\n    },\n    {\n        aliases: [{ path: 'atomentry.contributors', multiple: true }],\n        element: 'contributor',\n        fields: {\n            name: (0, jxt_1.childText)(null, 'name'),\n            uri: (0, jxt_1.childText)(null, 'uri'),\n            email: (0, jxt_1.childText)(null, 'email')\n        },\n        namespace: Namespaces_1.NS_ATOM\n    },\n    {\n        aliases: [{ path: 'atomentry.categories', multiple: true }],\n        element: 'category',\n        fields: {\n            term: (0, jxt_1.attribute)('term'),\n            scheme: (0, jxt_1.attribute)('scheme'),\n            label: (0, jxt_1.attribute)('label')\n        },\n        namespace: Namespaces_1.NS_ATOM\n    },\n    {\n        element: 'content',\n        fields: {\n            text: (0, jxt_1.text)(),\n            type: (0, jxt_1.attribute)('type', 'text')\n        },\n        namespace: Namespaces_1.NS_ATOM,\n        path: 'atomentry.content'\n    },\n    {\n        element: 'rights',\n        fields: {\n            text: (0, jxt_1.text)(),\n            type: (0, jxt_1.attribute)('type', 'text')\n        },\n        namespace: Namespaces_1.NS_ATOM,\n        path: 'atomentry.rights'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core\n// --------------------------------------------------------------------\n// Source: https://tools.ietf.org/html/rfc6120\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Constants_1 = require(\"../Constants\");\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst _Stream = {\n    defaultType: 'stream',\n    element: 'stream',\n    fields: {\n        from: (0, jxt_1.attribute)('from'),\n        id: (0, jxt_1.attribute)('id'),\n        lang: (0, jxt_1.languageAttribute)(),\n        to: (0, jxt_1.attribute)('to'),\n        version: (0, jxt_1.attribute)('version')\n    },\n    namespace: Namespaces_1.NS_STREAM,\n    path: 'stream',\n    type: 'stream',\n    typeField: 'action'\n};\nconst _StreamFeatures = {\n    element: 'features',\n    namespace: Namespaces_1.NS_STREAM,\n    path: 'features'\n};\nconst _StreamError = {\n    element: 'error',\n    fields: {\n        alternateLanguageText: (0, jxt_1.childAlternateLanguageText)(Namespaces_1.NS_STREAMS, 'text'),\n        condition: (0, jxt_1.childEnum)(Namespaces_1.NS_STREAMS, Object.values(Constants_1.StreamErrorCondition), Constants_1.StreamErrorCondition.UndefinedCondition),\n        seeOtherHost: (0, jxt_1.childText)(Namespaces_1.NS_STREAMS, Constants_1.StreamErrorCondition.SeeOtherHost),\n        text: (0, jxt_1.childText)(Namespaces_1.NS_STREAMS, 'text')\n    },\n    namespace: Namespaces_1.NS_STREAM,\n    path: 'streamError'\n};\n// --------------------------------------------------------------------\nconst _StanzaError = Object.values(Constants_1.StreamType).map(streamNS => ({\n    aliases: ['stanzaError', 'message.error', 'presence.error', 'iq.error'],\n    defaultType: Namespaces_1.NS_CLIENT,\n    element: 'error',\n    fields: {\n        alternateLanguageText: (0, jxt_1.childAlternateLanguageText)(Namespaces_1.NS_STANZAS, 'text'),\n        by: (0, jxt_1.JIDAttribute)('by'),\n        condition: (0, jxt_1.childEnum)(Namespaces_1.NS_STANZAS, Object.values(Constants_1.StanzaErrorCondition), Constants_1.StanzaErrorCondition.UndefinedCondition),\n        gone: (0, jxt_1.childText)(Namespaces_1.NS_STANZAS, Constants_1.StanzaErrorCondition.Gone),\n        redirect: (0, jxt_1.childText)(Namespaces_1.NS_STANZAS, Constants_1.StanzaErrorCondition.Redirect),\n        text: (0, jxt_1.childText)(Namespaces_1.NS_STANZAS, 'text'),\n        type: (0, jxt_1.attribute)('type')\n    },\n    namespace: streamNS,\n    type: streamNS,\n    typeField: 'streamType'\n}));\n// --------------------------------------------------------------------\nconst baseIQFields = new Set([\n    'from',\n    'id',\n    'lang',\n    'to',\n    'type',\n    'payloadType',\n    'error',\n    'streamType'\n]);\nconst _IQ = Object.values(Constants_1.StreamType).map((streamNS) => ({\n    childrenExportOrder: {\n        error: 200000\n    },\n    defaultType: Namespaces_1.NS_CLIENT,\n    element: 'iq',\n    fields: {\n        from: (0, jxt_1.JIDAttribute)('from'),\n        id: (0, jxt_1.attribute)('id'),\n        lang: (0, jxt_1.languageAttribute)(),\n        payloadType: {\n            order: -10000,\n            importer(xml, context) {\n                if (context.data.type !== 'get' &&\n                    context.data.type !== 'set') {\n                    return;\n                }\n                const childCount = xml.children.filter(child => typeof child !== 'string')\n                    .length;\n                if (childCount !== 1) {\n                    return 'invalid-payload-count';\n                }\n                const extensions = Object.keys(context.data).filter(key => !baseIQFields.has(key));\n                if (extensions.length !== 1) {\n                    return 'unknown-payload';\n                }\n                return extensions[0];\n            }\n        },\n        to: (0, jxt_1.JIDAttribute)('to'),\n        type: (0, jxt_1.attribute)('type')\n    },\n    namespace: streamNS,\n    path: 'iq',\n    type: streamNS,\n    typeField: 'streamType'\n}));\n// --------------------------------------------------------------------\nconst _Message = Object.values(Constants_1.StreamType).map(streamNS => ({\n    childrenExportOrder: {\n        error: 200000\n    },\n    defaultType: Namespaces_1.NS_CLIENT,\n    element: 'message',\n    fields: {\n        from: (0, jxt_1.JIDAttribute)('from'),\n        id: (0, jxt_1.attribute)('id'),\n        lang: (0, jxt_1.languageAttribute)(),\n        to: (0, jxt_1.JIDAttribute)('to')\n    },\n    namespace: streamNS,\n    path: 'message',\n    type: streamNS,\n    typeField: 'streamType'\n}));\n// --------------------------------------------------------------------\nconst _Presence = Object.values(Constants_1.StreamType).map(streamNS => ({\n    childrenExportOrder: {\n        error: 200000\n    },\n    defaultType: Namespaces_1.NS_CLIENT,\n    element: 'presence',\n    fields: {\n        from: (0, jxt_1.JIDAttribute)('from'),\n        id: (0, jxt_1.attribute)('id'),\n        lang: (0, jxt_1.languageAttribute)(),\n        to: (0, jxt_1.JIDAttribute)('to')\n    },\n    namespace: streamNS,\n    path: 'presence',\n    type: streamNS,\n    typeField: 'streamType'\n}));\n// --------------------------------------------------------------------\nconst _SASL = [\n    {\n        element: 'mechanisms',\n        fields: {\n            mechanisms: (0, jxt_1.multipleChildText)(null, 'mechanism')\n        },\n        namespace: Namespaces_1.NS_SASL,\n        path: 'features.sasl'\n    },\n    {\n        element: 'abort',\n        namespace: Namespaces_1.NS_SASL,\n        path: 'sasl',\n        type: 'abort',\n        typeField: 'type'\n    },\n    {\n        element: 'auth',\n        fields: {\n            mechanism: (0, jxt_1.attribute)('mechanism'),\n            value: (0, jxt_1.textBuffer)('base64')\n        },\n        namespace: Namespaces_1.NS_SASL,\n        path: 'sasl',\n        type: 'auth',\n        typeField: 'type'\n    },\n    {\n        element: 'challenge',\n        fields: {\n            value: (0, jxt_1.textBuffer)('base64')\n        },\n        namespace: Namespaces_1.NS_SASL,\n        path: 'sasl',\n        type: 'challenge',\n        typeField: 'type'\n    },\n    {\n        element: 'response',\n        fields: {\n            value: (0, jxt_1.textBuffer)('base64')\n        },\n        namespace: Namespaces_1.NS_SASL,\n        path: 'sasl',\n        type: 'response',\n        typeField: 'type'\n    },\n    {\n        element: 'success',\n        fields: {\n            value: (0, jxt_1.textBuffer)('base64')\n        },\n        namespace: Namespaces_1.NS_SASL,\n        path: 'sasl',\n        type: 'success',\n        typeField: 'type'\n    },\n    {\n        element: 'failure',\n        fields: {\n            alternateLanguageText: (0, jxt_1.childAlternateLanguageText)(Namespaces_1.NS_SASL, 'text'),\n            condition: (0, jxt_1.childEnum)(Namespaces_1.NS_SASL, Object.values(Constants_1.SASLFailureCondition)),\n            text: (0, jxt_1.childText)(Namespaces_1.NS_SASL, 'text')\n        },\n        namespace: Namespaces_1.NS_SASL,\n        path: 'sasl',\n        type: 'failure',\n        typeField: 'type'\n    }\n];\n// --------------------------------------------------------------------\nconst _STARTTLS = [\n    {\n        aliases: ['features.tls'],\n        defaultType: 'start',\n        element: 'starttls',\n        fields: {\n            required: (0, jxt_1.childBoolean)(null, 'required')\n        },\n        namespace: Namespaces_1.NS_STARTTLS,\n        path: 'tls',\n        type: 'start',\n        typeField: 'type'\n    },\n    {\n        element: 'proceed',\n        namespace: Namespaces_1.NS_STARTTLS,\n        path: 'tls',\n        type: 'proceed',\n        typeField: 'type'\n    },\n    {\n        element: 'failure',\n        namespace: Namespaces_1.NS_STARTTLS,\n        path: 'tls',\n        type: 'failure',\n        typeField: 'type'\n    }\n];\n// --------------------------------------------------------------------\nconst _Bind = {\n    aliases: ['features.bind', 'iq.bind'],\n    element: 'bind',\n    fields: {\n        jid: (0, jxt_1.childText)(null, 'jid'),\n        resource: (0, jxt_1.childText)(null, 'resource')\n    },\n    namespace: Namespaces_1.NS_BIND\n};\n// --------------------------------------------------------------------\nconst Protocol = [\n    _Stream,\n    _StreamFeatures,\n    _StreamError,\n    ..._StanzaError,\n    ..._SASL,\n    ..._STARTTLS,\n    ..._IQ,\n    ..._Message,\n    ..._Presence,\n    _Bind\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// RFC 6121: Extensible Messaging and Presence Protocol (XMPP):\n//      Instant Messaging and Presence\n// --------------------------------------------------------------------\n// Source: https://tools.ietf.org/html/rfc6121\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.extendStreamFeatures)({\n        rosterPreApproval: (0, jxt_1.childBoolean)(Namespaces_1.NS_SUBSCRIPTION_PREAPPROVAL, 'sub'),\n        rosterVersioning: (0, jxt_1.childBoolean)(Namespaces_1.NS_ROSTER_VERSIONING, 'ver')\n    }),\n    (0, jxt_1.extendMessage)({\n        alternateLanguageBodies: (0, jxt_1.childAlternateLanguageText)(null, 'body'),\n        alternateLanguageSubjects: (0, jxt_1.childAlternateLanguageText)(null, 'subject'),\n        body: (0, jxt_1.childText)(null, 'body'),\n        hasSubject: (0, jxt_1.childBoolean)(null, 'subject'),\n        parentThread: (0, jxt_1.childAttribute)(null, 'thread', 'parent'),\n        subject: (0, jxt_1.childText)(null, 'subject'),\n        thread: (0, jxt_1.childText)(null, 'thread'),\n        type: (0, jxt_1.attribute)('type')\n    }),\n    (0, jxt_1.extendPresence)({\n        alternateLanguageStatuses: (0, jxt_1.childAlternateLanguageText)(null, 'status'),\n        priority: (0, jxt_1.childInteger)(null, 'priority', 0),\n        show: (0, jxt_1.childText)(null, 'show'),\n        status: (0, jxt_1.childText)(null, 'status'),\n        type: (0, jxt_1.attribute)('type')\n    }),\n    {\n        element: 'query',\n        fields: {\n            version: (0, jxt_1.attribute)('ver', undefined, { emitEmpty: true })\n        },\n        namespace: Namespaces_1.NS_ROSTER,\n        path: 'iq.roster'\n    },\n    {\n        aliases: [{ path: 'iq.roster.items', multiple: true }],\n        element: 'item',\n        fields: {\n            groups: (0, jxt_1.multipleChildText)(null, 'group'),\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            name: (0, jxt_1.attribute)('name'),\n            pending: (0, jxt_1.attribute)('ask'),\n            preApproved: (0, jxt_1.booleanAttribute)('approved'),\n            subscription: (0, jxt_1.attribute)('subscription')\n        },\n        namespace: Namespaces_1.NS_ROSTER\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// RFC 7395: An Extensible Messaging and Presence Protocol (XMPP)\n//      Subprotocol for WebSocket\n// --------------------------------------------------------------------\n// Source: https://tools.ietf.org/html/rfc7395\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        element: 'open',\n        fields: {\n            from: (0, jxt_1.attribute)('from'),\n            id: (0, jxt_1.attribute)('id'),\n            lang: (0, jxt_1.languageAttribute)(),\n            to: (0, jxt_1.attribute)('to'),\n            version: (0, jxt_1.attribute)('version')\n        },\n        namespace: Namespaces_1.NS_FRAMING,\n        path: 'stream',\n        type: 'open'\n    },\n    {\n        element: 'close',\n        fields: {\n            seeOtherURI: (0, jxt_1.attribute)('see-other-uri')\n        },\n        namespace: Namespaces_1.NS_FRAMING,\n        path: 'stream',\n        type: 'close'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0004: Data Forms\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0004.html\n// Version: 2.9 (2007-08-13)\n//\n// Additional:\n// --------------------------------------------------------------------\n// XEP-0122: Data Forms Validation\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0122.html\n// Version: 1.0.1 (2018-03-05)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Constants_1 = require(\"../Constants\");\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        aliases: [{ path: 'message.forms', multiple: true }],\n        element: 'x',\n        fields: {\n            instructions: {\n                ...(0, jxt_1.multipleChildText)(null, 'instructions'),\n                exportOrder: 2\n            },\n            reported: {\n                ...(0, jxt_1.splicePath)(null, 'reported', 'dataformField', true),\n                exportOrder: 3\n            },\n            title: {\n                ...(0, jxt_1.childText)(null, 'title'),\n                exportOrder: 1\n            },\n            type: (0, jxt_1.attribute)('type')\n        },\n        namespace: Namespaces_1.NS_DATAFORM,\n        optionalNamespaces: {\n            xdv: Namespaces_1.NS_DATAFORM_VALIDATION\n        },\n        path: 'dataform'\n    },\n    {\n        aliases: [\n            { path: 'dataform.fields', multiple: true },\n            { path: 'dataform.items.fields', multiple: true }\n        ],\n        element: 'field',\n        fields: {\n            description: (0, jxt_1.childText)(null, 'desc'),\n            label: (0, jxt_1.attribute)('label'),\n            name: (0, jxt_1.attribute)('var'),\n            rawValues: {\n                ...(0, jxt_1.multipleChildText)(null, 'value'),\n                exporter: () => null\n            },\n            required: (0, jxt_1.childBoolean)(null, 'required'),\n            type: (0, jxt_1.attribute)('type'),\n            value: {\n                importer(xml, context) {\n                    const fieldType = xml.getAttribute('type');\n                    const converter = (0, jxt_1.multipleChildText)(Namespaces_1.NS_DATAFORM, 'value');\n                    const rawValues = converter.importer(xml, context);\n                    const singleValue = rawValues[0];\n                    switch (fieldType) {\n                        case Constants_1.DataFormFieldType.TextMultiple:\n                        case Constants_1.DataFormFieldType.ListMultiple:\n                        case Constants_1.DataFormFieldType.JIDMultiple:\n                            return rawValues;\n                        case Constants_1.DataFormFieldType.Hidden:\n                        case Constants_1.DataFormFieldType.Fixed:\n                            if (rawValues.length === 1) {\n                                return singleValue;\n                            }\n                            return rawValues;\n                        case Constants_1.DataFormFieldType.Boolean:\n                            if (singleValue) {\n                                return singleValue === '1' || singleValue === 'true';\n                            }\n                            break;\n                        default:\n                            return singleValue;\n                    }\n                },\n                exporter(xml, data, context) {\n                    const converter = (0, jxt_1.multipleChildText)(null, 'value');\n                    let outputData = [];\n                    const rawData = context.data && context.data.rawValues\n                        ? context.data.rawValues[0]\n                        : undefined;\n                    if (typeof data === 'boolean') {\n                        if (rawData === 'true' || rawData === 'false') {\n                            outputData = [rawData];\n                        }\n                        else {\n                            outputData = [data ? '1' : '0'];\n                        }\n                    }\n                    else if (!Array.isArray(data)) {\n                        outputData = [data.toString()];\n                    }\n                    else {\n                        for (const value of data) {\n                            outputData.push(value.toString());\n                        }\n                    }\n                    converter.exporter(xml, outputData, Object.assign({}, context, {\n                        namespace: Namespaces_1.NS_DATAFORM\n                    }));\n                }\n            }\n        },\n        namespace: Namespaces_1.NS_DATAFORM,\n        path: 'dataformField'\n    },\n    {\n        aliases: [{ path: 'dataform.fields.options', multiple: true }],\n        element: 'option',\n        fields: {\n            label: (0, jxt_1.attribute)('label'),\n            value: (0, jxt_1.childText)(null, 'value')\n        },\n        namespace: Namespaces_1.NS_DATAFORM\n    },\n    {\n        aliases: [{ path: 'dataform.items', multiple: true }],\n        element: 'item',\n        namespace: Namespaces_1.NS_DATAFORM\n    },\n    // ----------------------------------------------------------------\n    // XEP-0122: Data Forms Validation\n    // ----------------------------------------------------------------\n    {\n        element: 'validate',\n        fields: {\n            listMax: (0, jxt_1.childIntegerAttribute)(null, 'list-range', 'max'),\n            listMin: (0, jxt_1.childIntegerAttribute)(null, 'list-range', 'min'),\n            method: (0, jxt_1.childEnum)(null, ['basic', 'open', 'range', 'regex'], 'basic'),\n            rangeMax: (0, jxt_1.childAttribute)(null, 'range', 'max'),\n            rangeMin: (0, jxt_1.childAttribute)(null, 'range', 'min'),\n            regex: (0, jxt_1.childText)(null, 'regex'),\n            type: (0, jxt_1.attribute)('datatype', 'xs:string')\n        },\n        namespace: Namespaces_1.NS_DATAFORM_VALIDATION,\n        path: 'dataform.fields.validation'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0012: Last Activity\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0012.html\n// Version: 2.0 (2008-11-26)\n//\n// Additional:\n// --------------------------------------------------------------------\n// XEP-0256: Last Activity in Presence\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0256.html\n// Version: 1.1 (2009-09-15)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        aliases: ['presence.legacyLastActivity', 'iq.lastActivity'],\n        element: 'query',\n        fields: {\n            seconds: (0, jxt_1.integerAttribute)('seconds'),\n            status: (0, jxt_1.text)()\n        },\n        namespace: Namespaces_1.NS_LAST_ACTIVITY\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0016: Privacy Lists\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0016.html\n// Version: 1.7 (2007-08-13)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        element: 'query',\n        fields: {\n            activeList: (0, jxt_1.childAttribute)(null, 'active', 'name'),\n            defaultList: (0, jxt_1.childAttribute)(null, 'default', 'name')\n        },\n        namespace: Namespaces_1.NS_PRIVACY,\n        path: 'iq.privacy'\n    },\n    {\n        aliases: [{ path: 'iq.privacy.lists', multiple: true }],\n        element: 'list',\n        fields: {\n            name: (0, jxt_1.attribute)('name')\n        },\n        namespace: Namespaces_1.NS_PRIVACY\n    },\n    {\n        aliases: [{ path: 'iq.privacy.lists.items', multiple: true }],\n        element: 'item',\n        fields: {\n            action: (0, jxt_1.attribute)('action'),\n            incomingPresence: (0, jxt_1.childBoolean)(null, 'presence-in'),\n            iq: (0, jxt_1.childBoolean)(null, 'iq'),\n            messages: (0, jxt_1.childBoolean)(null, 'message'),\n            order: (0, jxt_1.integerAttribute)('order'),\n            outgoingPresence: (0, jxt_1.childBoolean)(null, 'presence-out'),\n            type: (0, jxt_1.attribute)('type'),\n            value: (0, jxt_1.attribute)('value')\n        },\n        namespace: Namespaces_1.NS_PRIVACY\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0030: Service Discovery\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0030.html\n// Version: 2.5rc3 (2017-10-03)\n//\n// Additional:\n// --------------------------------------------------------------------\n// XEP-0128: Service Discovery Extensions\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0128.html\n// Version: 1.0 (2004-10-20)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        aliases: ['iq.disco', 'message.disco', 'features.disco'],\n        childrenExportOrder: {\n            identities: 1,\n            features: 2,\n            extensions: 3\n        },\n        element: 'query',\n        fields: {\n            features: (0, jxt_1.multipleChildAttribute)(null, 'feature', 'var'),\n            node: (0, jxt_1.attribute)('node')\n        },\n        namespace: Namespaces_1.NS_DISCO_INFO,\n        path: 'disco',\n        type: 'info',\n        typeField: 'type'\n    },\n    {\n        aliases: [{ path: 'disco.identities', selector: 'info', multiple: true }],\n        element: 'identity',\n        fields: {\n            category: (0, jxt_1.attribute)('category'),\n            lang: (0, jxt_1.languageAttribute)(),\n            name: (0, jxt_1.attribute)('name'),\n            type: (0, jxt_1.attribute)('type')\n        },\n        namespace: Namespaces_1.NS_DISCO_INFO\n    },\n    {\n        aliases: [{ path: 'disco.items', multiple: true, selector: 'items' }],\n        element: 'item',\n        fields: {\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            name: (0, jxt_1.attribute)('name'),\n            node: (0, jxt_1.attribute)('node')\n        },\n        namespace: Namespaces_1.NS_DISCO_ITEMS\n    },\n    {\n        aliases: [{ path: 'disco.items', multiple: true, selector: 'info' }],\n        element: 'item',\n        fields: {\n            category: (0, jxt_1.JIDAttribute)('category'),\n            lang: (0, jxt_1.languageAttribute)(),\n            name: (0, jxt_1.attribute)('name'),\n            type: (0, jxt_1.attribute)('type')\n        },\n        namespace: Namespaces_1.NS_DISCO_INFO\n    },\n    (0, jxt_1.addAlias)(Namespaces_1.NS_DATAFORM, 'x', [\n        // XEP-0128\n        { path: 'disco.extensions', multiple: true, selector: 'info' }\n    ]),\n    (0, jxt_1.addAlias)(Namespaces_1.NS_RSM, 'set', [{ path: 'disco.paging', selector: 'items' }]),\n    {\n        aliases: ['iq.disco', 'message.disco', 'features.disco'],\n        element: 'query',\n        fields: {\n            node: (0, jxt_1.attribute)('node')\n        },\n        namespace: Namespaces_1.NS_DISCO_ITEMS,\n        path: 'disco',\n        type: 'items',\n        typeField: 'type'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0033: Extended Stanza Addressing\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0033.html\n// Version:\t1.2.1 (2017-01-11)\n// --------------------------------------------------------------------\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.extendMessage)({\n        addresses: (0, jxt_1.splicePath)(Namespaces_1.NS_ADDRESS, 'addresses', 'extendedAddress', true)\n    }),\n    (0, jxt_1.extendPresence)({\n        addresses: (0, jxt_1.splicePath)(Namespaces_1.NS_ADDRESS, 'addresses', 'extendedAddress', true)\n    }),\n    {\n        element: 'address',\n        fields: {\n            alternateLanguageDescriptions: (0, jxt_1.childAlternateLanguageText)(null, 'desc'),\n            delivered: (0, jxt_1.booleanAttribute)('delivered'),\n            description: (0, jxt_1.attribute)('desc'),\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            node: (0, jxt_1.attribute)('node'),\n            type: (0, jxt_1.attribute)('type'),\n            uri: (0, jxt_1.attribute)('uri')\n        },\n        namespace: Namespaces_1.NS_ADDRESS,\n        path: 'extendedAddress'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0045: Multi-User Chat\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0045.html\n// Version: 1.31.1 (2018-03-12)\n//\n// Additional:\n// --------------------------------------------------------------------\n// XEP-0249: Direct MUC Invitations\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0249.html\n// Version: 1.2 (2011-09-22)\n//\n// --------------------------------------------------------------------\n// XEP-0307: Unique Room Names for Multi-User Chat\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0307.html\n// Version: 0.1 (2011-11-10)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.addAlias)(Namespaces_1.NS_DATAFORM, 'x', [{ path: 'iq.muc.form', selector: 'configure' }]),\n    {\n        defaultType: 'info',\n        element: 'x',\n        fields: {\n            password: (0, jxt_1.childText)(null, 'password')\n        },\n        namespace: Namespaces_1.NS_MUC,\n        path: 'presence.muc',\n        type: 'join',\n        typeField: 'type'\n    },\n    {\n        aliases: [{ path: 'presence.muc.history', selector: 'join' }],\n        element: 'history',\n        fields: {\n            maxCharacters: (0, jxt_1.integerAttribute)('maxchars'),\n            maxStanzas: (0, jxt_1.integerAttribute)('maxstanzas'),\n            seconds: (0, jxt_1.integerAttribute)('seconds'),\n            since: (0, jxt_1.dateAttribute)('since')\n        },\n        namespace: Namespaces_1.NS_MUC\n    },\n    {\n        aliases: ['presence.muc', 'message.muc'],\n        defaultType: 'info',\n        element: 'x',\n        fields: {\n            action: (0, jxt_1.childEnum)(null, ['invite', 'decline', 'destroy']),\n            actor: (0, jxt_1.splicePath)(null, 'item', 'mucactor'),\n            affiliation: (0, jxt_1.childAttribute)(null, 'item', 'affiliation'),\n            jid: (0, jxt_1.childJIDAttribute)(null, 'item', 'jid'),\n            nick: (0, jxt_1.childAttribute)(null, 'item', 'nick'),\n            password: (0, jxt_1.childText)(null, 'password'),\n            reason: (0, jxt_1.deepChildText)([\n                { namespace: null, element: 'item' },\n                { namespace: null, element: 'reason' }\n            ]),\n            role: (0, jxt_1.childAttribute)(null, 'item', 'role'),\n            statusCodes: (0, jxt_1.multipleChildAttribute)(null, 'status', 'code')\n        },\n        namespace: Namespaces_1.NS_MUC_USER,\n        type: 'info',\n        typeField: 'type',\n        typeOrder: 1\n    },\n    {\n        element: 'actor',\n        fields: {\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            nick: (0, jxt_1.attribute)('nick')\n        },\n        namespace: Namespaces_1.NS_MUC_USER,\n        path: 'mucactor'\n    },\n    {\n        element: 'destroy',\n        fields: {\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            password: (0, jxt_1.childText)(null, 'password'),\n            reason: (0, jxt_1.childText)(null, 'reason')\n        },\n        namespace: Namespaces_1.NS_MUC_USER,\n        path: 'presence.muc.destroy'\n    },\n    {\n        aliases: [{ path: 'message.muc.invite', multiple: true }],\n        element: 'invite',\n        fields: {\n            continue: (0, jxt_1.childBoolean)(null, 'continue'),\n            from: (0, jxt_1.JIDAttribute)('from'),\n            reason: (0, jxt_1.childText)(null, 'reason'),\n            thread: (0, jxt_1.childAttribute)(null, 'continue', 'thread'),\n            to: (0, jxt_1.JIDAttribute)('to')\n        },\n        namespace: Namespaces_1.NS_MUC_USER\n    },\n    {\n        element: 'decline',\n        fields: {\n            from: (0, jxt_1.JIDAttribute)('from'),\n            reason: (0, jxt_1.childText)(null, 'reason'),\n            to: (0, jxt_1.JIDAttribute)('to')\n        },\n        namespace: Namespaces_1.NS_MUC_USER,\n        path: 'message.muc',\n        type: 'decline'\n    },\n    {\n        element: 'query',\n        namespace: Namespaces_1.NS_MUC_ADMIN,\n        path: 'iq.muc',\n        type: 'user-list',\n        typeField: 'type'\n    },\n    {\n        aliases: [{ path: 'iq.muc.users', multiple: true, selector: 'user-list' }],\n        element: 'item',\n        fields: {\n            affiliation: (0, jxt_1.attribute)('affiliation'),\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            nick: (0, jxt_1.attribute)('nick'),\n            reason: (0, jxt_1.childText)(null, 'reason'),\n            role: (0, jxt_1.attribute)('role')\n        },\n        namespace: Namespaces_1.NS_MUC_ADMIN\n    },\n    {\n        aliases: ['iq.muc.users.actor'],\n        element: 'actor',\n        fields: {\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            nick: (0, jxt_1.attribute)('nick')\n        },\n        namespace: Namespaces_1.NS_MUC_ADMIN\n    },\n    {\n        element: 'query',\n        namespace: Namespaces_1.NS_MUC_OWNER,\n        path: 'iq.muc',\n        type: 'configure',\n        typeField: 'type'\n    },\n    {\n        aliases: [{ path: 'iq.muc.destroy', selector: 'configure' }],\n        element: 'destroy',\n        fields: {\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            password: (0, jxt_1.childText)(null, 'password'),\n            reason: (0, jxt_1.childText)(null, 'reason')\n        },\n        namespace: Namespaces_1.NS_MUC_OWNER\n    },\n    // XEP-0249\n    {\n        element: 'x',\n        fields: {\n            action: (0, jxt_1.staticValue)('invite'),\n            continue: (0, jxt_1.booleanAttribute)('continue'),\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            legacyReason: (0, jxt_1.text)(),\n            password: (0, jxt_1.attribute)('password'),\n            reason: (0, jxt_1.attribute)('reason'),\n            thread: (0, jxt_1.attribute)('thread')\n        },\n        namespace: Namespaces_1.NS_MUC_DIRECT_INVITE,\n        path: 'message.muc',\n        type: 'direct-invite',\n        typeOrder: 2\n    },\n    // XEP-0307\n    {\n        element: 'unique',\n        fields: {\n            name: (0, jxt_1.text)()\n        },\n        namespace: Namespaces_1.NS_MUC_UNIQUE,\n        path: 'iq.muc',\n        type: 'unique'\n    },\n    (0, jxt_1.extendMessage)({\n        legacyMUC: {\n            exporter(xml, value, context) {\n                const out = context.registry\n                    ? context.registry.export('message.muc', { ...value, type: 'direct-invite' })\n                    : undefined;\n                if (out) {\n                    xml.appendChild(out);\n                }\n            },\n            exportOrder: 100001,\n            importer(xml, context) {\n                const mucElement = (0, jxt_1.findAll)(xml, Namespaces_1.NS_MUC_USER, 'x')[0];\n                if (!mucElement) {\n                    return;\n                }\n                const confElement = (0, jxt_1.findAll)(xml, Namespaces_1.NS_MUC_DIRECT_INVITE, 'x')[0];\n                if (!confElement) {\n                    return;\n                }\n                return context.registry\n                    ? context.registry.import(confElement, {\n                        ...context,\n                        path: 'message'\n                    })\n                    : undefined;\n            },\n            importOrder: -1\n        }\n    })\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0047: In-band Bytestreams\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0047.html\n// Version: 2.0 (2012-06-22)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        aliases: ['iq.ibb', 'message.ibb'],\n        element: 'open',\n        fields: {\n            ack: {\n                importer(xml, context) {\n                    const stanza = (0, jxt_1.attribute)('stanza', 'iq').importer(xml, context);\n                    return stanza !== 'message';\n                },\n                exporter(xml, data, context) {\n                    (0, jxt_1.attribute)('stanza').exporter(xml, data ? 'iq' : 'message', context);\n                }\n            },\n            blockSize: (0, jxt_1.integerAttribute)('block-size'),\n            sid: (0, jxt_1.attribute)('sid')\n        },\n        namespace: Namespaces_1.NS_IBB,\n        type: 'open',\n        typeField: 'action'\n    },\n    {\n        aliases: ['iq.ibb', 'message.ibb'],\n        element: 'close',\n        fields: {\n            sid: (0, jxt_1.attribute)('sid')\n        },\n        namespace: Namespaces_1.NS_IBB,\n        type: 'close',\n        typeField: 'action'\n    },\n    {\n        aliases: ['iq.ibb', 'message.ibb'],\n        element: 'data',\n        fields: {\n            data: (0, jxt_1.textBuffer)('base64'),\n            seq: (0, jxt_1.integerAttribute)('seq'),\n            sid: (0, jxt_1.attribute)('sid')\n        },\n        namespace: Namespaces_1.NS_IBB,\n        type: 'data',\n        typeField: 'action'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0048: Bookmarks\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0048.html\n// Version: 1.1 (2007-11-07)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        aliases: [\n            { path: 'bookmarkStorage', impliedType: true },\n            { path: 'iq.privateStorage.bookmarks', impliedType: true },\n            ...(0, jxt_1.pubsubItemContentAliases)()\n        ],\n        element: 'storage',\n        namespace: Namespaces_1.NS_BOOKMARKS,\n        type: Namespaces_1.NS_BOOKMARKS,\n        typeField: 'itemType'\n    },\n    {\n        aliases: [{ path: 'bookmarkStorage.rooms', multiple: true }],\n        element: 'conference',\n        fields: {\n            autoJoin: (0, jxt_1.booleanAttribute)('autojoin'),\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            name: (0, jxt_1.attribute)('name'),\n            nick: (0, jxt_1.childText)(null, 'nick'),\n            password: (0, jxt_1.childText)(null, 'password')\n        },\n        namespace: Namespaces_1.NS_BOOKMARKS\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0049: Private XML Storage\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0049.html\n// Version: 1.2 (2004-03-01)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Namespaces_1 = require(\"../Namespaces\");\n// tslint:enable\nconst Protocol = {\n    element: 'query',\n    namespace: Namespaces_1.NS_PRIVATE,\n    path: 'iq.privateStorage'\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0050: Ad-Hoc Commands\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0050.html\n// Version: 1.2.2 (2016-12-03)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.addAlias)(Namespaces_1.NS_DATAFORM, 'x', ['iq.command.form']),\n    (0, jxt_1.extendStanzaError)({\n        commandError: (0, jxt_1.childEnum)(Namespaces_1.NS_ADHOC_COMMANDS, [\n            'bad-action',\n            'bad-locale',\n            'bad-payload',\n            'bad-sessionid',\n            'malformed-action',\n            'session-expired'\n        ])\n    }),\n    {\n        element: 'command',\n        fields: {\n            action: (0, jxt_1.attribute)('action'),\n            node: (0, jxt_1.attribute)('node'),\n            sid: (0, jxt_1.attribute)('sessionid'),\n            status: (0, jxt_1.attribute)('status')\n        },\n        namespace: Namespaces_1.NS_ADHOC_COMMANDS,\n        path: 'iq.command'\n    },\n    {\n        element: 'actions',\n        fields: {\n            complete: (0, jxt_1.childBoolean)(null, 'complete'),\n            execute: (0, jxt_1.attribute)('execute'),\n            next: (0, jxt_1.childBoolean)(null, 'next'),\n            prev: (0, jxt_1.childBoolean)(null, 'prev')\n        },\n        namespace: Namespaces_1.NS_ADHOC_COMMANDS,\n        path: 'iq.command.availableActions'\n    },\n    {\n        aliases: [{ path: 'iq.command.notes', multiple: true }],\n        element: 'note',\n        fields: {\n            type: (0, jxt_1.attribute)('type'),\n            value: (0, jxt_1.text)()\n        },\n        namespace: Namespaces_1.NS_ADHOC_COMMANDS\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0054: vcard-temp\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0054.html\n// Version: 1.2 (2008-07-16)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst path = 'vcardTemp.records';\nfunction vcardField(element, type) {\n    return {\n        aliases: [{ multiple: true, path }],\n        element,\n        fields: {\n            value: (0, jxt_1.text)()\n        },\n        namespace: Namespaces_1.NS_VCARD_TEMP,\n        type,\n        typeField: 'type'\n    };\n}\nconst Protocol = [\n    {\n        aliases: [{ path: 'iq.vcard' }],\n        defaultType: Namespaces_1.NS_VCARD_TEMP,\n        element: 'vCard',\n        fields: {\n            fullName: (0, jxt_1.childText)(null, 'FN')\n        },\n        namespace: Namespaces_1.NS_VCARD_TEMP,\n        path: 'vcardTemp',\n        type: Namespaces_1.NS_VCARD_TEMP,\n        typeField: 'format'\n    },\n    {\n        element: 'N',\n        fields: {\n            additional: { ...(0, jxt_1.childText)(null, 'MIDDLE'), order: 3 },\n            family: { ...(0, jxt_1.childText)(null, 'FAMILY'), order: 1 },\n            given: { ...(0, jxt_1.childText)(null, 'GIVEN'), order: 2 },\n            prefix: { ...(0, jxt_1.childText)(null, 'PREFIX'), order: 4 },\n            suffix: { ...(0, jxt_1.childText)(null, 'SUFFIX'), order: 5 }\n        },\n        namespace: Namespaces_1.NS_VCARD_TEMP,\n        path: 'vcardTemp.name'\n    },\n    vcardField('NICKNAME', 'nickname'),\n    vcardField('BDAY', 'birthday'),\n    vcardField('JABBERID', 'jid'),\n    vcardField('TZ', 'timezone'),\n    vcardField('TITLE', 'title'),\n    vcardField('ROLE', 'role'),\n    vcardField('URL', 'url'),\n    vcardField('NOTE', 'note'),\n    vcardField('SORT-STRING', 'sort'),\n    vcardField('UID', 'uid'),\n    vcardField('REV', 'revision'),\n    vcardField('PRODID', 'productId'),\n    vcardField('DESC', 'description'),\n    {\n        aliases: [{ multiple: true, path }],\n        element: 'EMAIL',\n        fields: {\n            preferred: (0, jxt_1.childBoolean)(null, 'PREF'),\n            types: (0, jxt_1.multipleChildEnum)(null, [\n                ['home', 'HOME'],\n                ['work', 'WORK'],\n                ['internet', 'INTERNET']\n            ]),\n            value: (0, jxt_1.childText)(null, 'USERID')\n        },\n        namespace: Namespaces_1.NS_VCARD_TEMP,\n        type: 'email'\n    },\n    {\n        aliases: [{ path, multiple: true }],\n        element: 'ORG',\n        fields: {\n            units: { ...(0, jxt_1.multipleChildText)(null, 'ORGUNIT'), order: 2 },\n            value: { ...(0, jxt_1.childText)(null, 'ORGNAME'), order: 1 }\n        },\n        namespace: Namespaces_1.NS_VCARD_TEMP,\n        type: 'organization',\n        typeField: 'type'\n    },\n    {\n        aliases: [{ multiple: true, path }],\n        element: 'ADR',\n        fields: {\n            city: (0, jxt_1.childText)(null, 'LOCALITY'),\n            code: (0, jxt_1.childText)(null, 'PCODE'),\n            country: (0, jxt_1.childText)(null, 'CTRY'),\n            pobox: (0, jxt_1.childText)(null, 'POBOX'),\n            preferred: (0, jxt_1.childBoolean)(null, 'PREF'),\n            region: (0, jxt_1.childText)(null, 'REGION'),\n            street: (0, jxt_1.childText)(null, 'STREET'),\n            street2: (0, jxt_1.childText)(null, 'EXTADD'),\n            types: (0, jxt_1.multipleChildEnum)(null, [\n                ['home', 'HOME'],\n                ['work', 'WORK'],\n                ['domestic', 'DOM'],\n                ['international', 'INTL'],\n                ['postal', 'POSTAL'],\n                ['parcel', 'PARCEL']\n            ])\n        },\n        namespace: Namespaces_1.NS_VCARD_TEMP,\n        type: 'address',\n        typeField: 'type'\n    },\n    {\n        aliases: [{ multiple: true, path }],\n        element: 'LABEL',\n        fields: {\n            lines: (0, jxt_1.multipleChildText)(null, 'LINE'),\n            preferred: (0, jxt_1.childBoolean)(null, 'PREF'),\n            types: (0, jxt_1.multipleChildEnum)(null, [\n                ['home', 'HOME'],\n                ['work', 'WORK']\n            ])\n        },\n        namespace: Namespaces_1.NS_VCARD_TEMP,\n        type: 'addressLabel',\n        typeField: 'type'\n    },\n    {\n        aliases: [{ multiple: true, path }],\n        element: 'TEL',\n        fields: {\n            preferred: (0, jxt_1.childBoolean)(null, 'PREF'),\n            types: (0, jxt_1.multipleChildEnum)(null, [\n                ['home', 'HOME'],\n                ['work', 'WORK'],\n                ['cell', 'CELL'],\n                ['fax', 'FAX'],\n                ['voice', 'VOICE'],\n                ['msg', 'MSG']\n            ]),\n            value: (0, jxt_1.childText)(null, 'NUMBER', '', true)\n        },\n        namespace: Namespaces_1.NS_VCARD_TEMP,\n        type: 'tel',\n        typeField: 'type'\n    },\n    {\n        aliases: [{ multiple: true, path }],\n        element: 'PHOTO',\n        fields: {\n            data: (0, jxt_1.childText)(null, 'BINVAL'),\n            mediaType: (0, jxt_1.childText)(null, 'TYPE'),\n            url: (0, jxt_1.childText)(null, 'EXTVAL')\n        },\n        namespace: Namespaces_1.NS_VCARD_TEMP,\n        type: 'photo',\n        typeField: 'type'\n    },\n    {\n        aliases: [{ multiple: true, path }],\n        element: 'LOGO',\n        fields: {\n            data: (0, jxt_1.childText)(null, 'BINVAL'),\n            mediaType: (0, jxt_1.childText)(null, 'TYPE'),\n            url: (0, jxt_1.childText)(null, 'EXTVAL')\n        },\n        namespace: Namespaces_1.NS_VCARD_TEMP,\n        type: 'logo',\n        typeField: 'type'\n    },\n    {\n        aliases: [{ multiple: true, path }],\n        element: 'CATEGORIES',\n        fields: {\n            value: (0, jxt_1.multipleChildText)(null, 'KEYWORD')\n        },\n        namespace: Namespaces_1.NS_VCARD_TEMP,\n        type: 'categories',\n        typeField: 'type'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0055: Jabber Search\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0055.html\n// Version: 1.3 (2009-09-15)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.addAlias)(Namespaces_1.NS_DATAFORM, 'x', ['iq.search.form']),\n    (0, jxt_1.addAlias)(Namespaces_1.NS_RSM, 'set', ['iq.search.paging']),\n    {\n        element: 'query',\n        fields: {\n            email: (0, jxt_1.childText)(null, 'email'),\n            familyName: (0, jxt_1.childText)(null, 'last'),\n            givenName: (0, jxt_1.childText)(null, 'first'),\n            instructions: (0, jxt_1.childText)(null, 'instructions'),\n            nick: (0, jxt_1.childText)(null, 'nick')\n        },\n        namespace: Namespaces_1.NS_SEARCH,\n        path: 'iq.search'\n    },\n    {\n        aliases: [{ path: 'iq.search.items', multiple: true }],\n        element: 'item',\n        fields: {\n            email: (0, jxt_1.childText)(null, 'email'),\n            familyName: (0, jxt_1.childText)(null, 'last'),\n            givenName: (0, jxt_1.childText)(null, 'first'),\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            nick: (0, jxt_1.childText)(null, 'nick')\n        },\n        namespace: Namespaces_1.NS_SEARCH\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0059: Result Set Management\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0059.html\n// Version: 1.0.0 (2006-09-20)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    aliases: ['iq.pubsub.paging'],\n    element: 'set',\n    fields: {\n        after: (0, jxt_1.childText)(null, 'after'),\n        before: (0, jxt_1.childText)(null, 'before'),\n        count: (0, jxt_1.childInteger)(null, 'count'),\n        first: (0, jxt_1.childText)(null, 'first'),\n        firstIndex: (0, jxt_1.childIntegerAttribute)(null, 'first', 'index'),\n        index: (0, jxt_1.childInteger)(null, 'index'),\n        last: (0, jxt_1.childText)(null, 'last'),\n        max: (0, jxt_1.childInteger)(null, 'max')\n    },\n    namespace: Namespaces_1.NS_RSM,\n    path: 'paging'\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0060: Publish-Subscribe\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0060.html\n// Version: 1.15.1 (2018-02-02)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Constants_1 = require(\"../Constants\");\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst dateOrPresenceAttribute = (name) => ({\n    importer(xml) {\n        const data = xml.getAttribute(name);\n        if (data === 'presence') {\n            return data;\n        }\n        if (data) {\n            return new Date(data);\n        }\n    },\n    exporter(xml, value) {\n        let data;\n        if (typeof value === 'string') {\n            data = value;\n        }\n        else {\n            data = value.toISOString();\n        }\n        xml.setAttribute(name, data);\n    }\n});\nconst SubscriptionFields = {\n    configurable: (0, jxt_1.childBoolean)(null, 'subscribe-options'),\n    configurationRequired: (0, jxt_1.deepChildBoolean)([\n        { namespace: null, element: 'subscribe-options' },\n        { namespace: null, element: 'required' }\n    ]),\n    jid: (0, jxt_1.JIDAttribute)('jid'),\n    node: (0, jxt_1.attribute)('node'),\n    state: (0, jxt_1.attribute)('subscription'),\n    subid: (0, jxt_1.attribute)('subid')\n};\nconst NodeOnlyField = {\n    node: (0, jxt_1.attribute)('node')\n};\nconst Protocol = [\n    {\n        aliases: ['pubsub', 'iq.pubsub', 'message.pubsub'],\n        childrenExportOrder: {\n            configure: 0,\n            create: 100,\n            publish: 100,\n            subscribe: 100,\n            subscriptionOptions: 0\n        },\n        defaultType: 'user',\n        element: 'pubsub',\n        fields: {\n            publishOptions: (0, jxt_1.splicePath)(null, 'publish-options', 'dataform')\n        },\n        namespace: Namespaces_1.NS_PUBSUB,\n        type: 'user',\n        typeField: 'context'\n    },\n    {\n        aliases: ['pubsub', 'iq.pubsub', 'message.pubsub'],\n        defaultType: 'user',\n        element: 'pubsub',\n        fields: {\n            purge: (0, jxt_1.childAttribute)(null, 'purge', 'node')\n        },\n        namespace: Namespaces_1.NS_PUBSUB_OWNER,\n        type: 'owner',\n        typeField: 'context'\n    },\n    (0, jxt_1.addAlias)(Namespaces_1.NS_DATAFORM, 'x', [\n        'iq.pubsub.configure.form',\n        'iq.pubsub.defaultConfiguration.form',\n        'iq.pubsub.defaultSubscriptionOptions.form',\n        'iq.pubsub.subscriptionOptions.form',\n        'message.pubsub.configuration.form'\n    ]),\n    (0, jxt_1.addAlias)(Namespaces_1.NS_RSM, 'set', ['iq.pubsub.fetch.paging']),\n    (0, jxt_1.extendStanzaError)({\n        pubsubError: (0, jxt_1.childEnum)(Namespaces_1.NS_PUBSUB_ERRORS, Object.values(Constants_1.PubsubErrorCondition)),\n        pubsubUnsupportedFeature: (0, jxt_1.childAttribute)(Namespaces_1.NS_PUBSUB_ERRORS, 'unsupported', 'feature')\n    }),\n    {\n        element: 'subscribe',\n        fields: {\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            node: (0, jxt_1.attribute)('node')\n        },\n        namespace: Namespaces_1.NS_PUBSUB,\n        path: 'iq.pubsub.subscribe'\n    },\n    {\n        element: 'unsubscribe',\n        fields: {\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            node: (0, jxt_1.attribute)('node'),\n            subid: (0, jxt_1.attribute)('subid')\n        },\n        namespace: Namespaces_1.NS_PUBSUB,\n        path: 'iq.pubsub.unsubscribe'\n    },\n    {\n        element: 'options',\n        fields: {\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            node: (0, jxt_1.attribute)('node'),\n            subid: (0, jxt_1.attribute)('subid')\n        },\n        namespace: Namespaces_1.NS_PUBSUB,\n        path: 'iq.pubsub.subscriptionOptions'\n    },\n    {\n        aliases: [{ path: 'iq.pubsub.subscriptions', selector: 'user', impliedType: true }],\n        element: 'subscriptions',\n        fields: {\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            node: (0, jxt_1.attribute)('node')\n        },\n        namespace: Namespaces_1.NS_PUBSUB,\n        type: 'user'\n    },\n    {\n        aliases: [{ path: 'iq.pubsub.subscriptions', selector: 'owner', impliedType: true }],\n        element: 'subscriptions',\n        fields: {\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            node: (0, jxt_1.attribute)('node')\n        },\n        namespace: Namespaces_1.NS_PUBSUB_OWNER,\n        type: 'owner'\n    },\n    {\n        aliases: [\n            { path: 'iq.pubsub.subscription', selector: 'owner' },\n            {\n                impliedType: true,\n                multiple: true,\n                path: 'iq.pubsub.subscriptions.items',\n                selector: 'owner'\n            }\n        ],\n        element: 'subscription',\n        fields: SubscriptionFields,\n        namespace: Namespaces_1.NS_PUBSUB\n    },\n    {\n        aliases: [\n            { path: 'iq.pubsub.subscription', selector: 'user' },\n            {\n                impliedType: true,\n                multiple: true,\n                path: 'iq.pubsub.subscriptions.items',\n                selector: 'user'\n            }\n        ],\n        element: 'subscription',\n        fields: SubscriptionFields,\n        namespace: Namespaces_1.NS_PUBSUB,\n        type: 'user'\n    },\n    {\n        aliases: [\n            {\n                impliedType: true,\n                multiple: true,\n                path: 'iq.pubsub.subscriptions.items',\n                selector: 'owner'\n            }\n        ],\n        element: 'subscription',\n        fields: SubscriptionFields,\n        namespace: Namespaces_1.NS_PUBSUB_OWNER,\n        type: 'owner'\n    },\n    {\n        aliases: [\n            { path: 'iq.pubsub.affiliations', selector: 'user', impliedType: true },\n            { path: 'message.pubsub.affiliations', selector: 'user', impliedType: true }\n        ],\n        element: 'affiliations',\n        fields: NodeOnlyField,\n        namespace: Namespaces_1.NS_PUBSUB,\n        type: 'user'\n    },\n    {\n        aliases: [{ path: 'iq.pubsub.affiliations', selector: 'owner', impliedType: true }],\n        element: 'affiliations',\n        fields: NodeOnlyField,\n        namespace: Namespaces_1.NS_PUBSUB_OWNER,\n        type: 'owner'\n    },\n    {\n        aliases: [\n            {\n                impliedType: true,\n                multiple: true,\n                path: 'iq.pubsub.affiliations.items',\n                selector: 'user'\n            },\n            {\n                impliedType: true,\n                multiple: true,\n                path: 'message.pubsub.affiliations.items',\n                selector: 'user'\n            }\n        ],\n        element: 'affiliation',\n        fields: {\n            affiliation: (0, jxt_1.attribute)('affiliation'),\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            node: (0, jxt_1.attribute)('node')\n        },\n        namespace: Namespaces_1.NS_PUBSUB,\n        type: 'user'\n    },\n    {\n        aliases: [\n            {\n                impliedType: true,\n                multiple: true,\n                path: 'iq.pubsub.affiliations.items',\n                selector: 'owner'\n            }\n        ],\n        element: 'affiliation',\n        fields: {\n            affiliation: (0, jxt_1.attribute)('affiliation'),\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            node: (0, jxt_1.attribute)('node')\n        },\n        namespace: Namespaces_1.NS_PUBSUB_OWNER,\n        type: 'owner'\n    },\n    {\n        element: 'create',\n        fields: NodeOnlyField,\n        namespace: Namespaces_1.NS_PUBSUB,\n        path: 'iq.pubsub.create'\n    },\n    {\n        aliases: [{ path: 'iq.pubsub.destroy', selector: 'owner' }],\n        element: 'delete',\n        fields: {\n            node: (0, jxt_1.attribute)('node'),\n            redirect: (0, jxt_1.childAttribute)(null, 'redirect', 'uri')\n        },\n        namespace: Namespaces_1.NS_PUBSUB_OWNER\n    },\n    {\n        aliases: [{ path: 'iq.pubsub.configure', selector: 'owner', impliedType: true }],\n        element: 'configure',\n        fields: NodeOnlyField,\n        namespace: Namespaces_1.NS_PUBSUB_OWNER,\n        type: 'owner'\n    },\n    {\n        aliases: [{ path: 'iq.pubsub.configure', selector: 'user', impliedType: true }],\n        element: 'configure',\n        fields: NodeOnlyField,\n        namespace: Namespaces_1.NS_PUBSUB,\n        type: 'user'\n    },\n    {\n        element: 'default',\n        fields: {\n            node: (0, jxt_1.attribute)('node')\n        },\n        namespace: Namespaces_1.NS_PUBSUB,\n        path: 'iq.pubsub.defaultSubscriptionOptions'\n    },\n    {\n        element: 'default',\n        fields: {},\n        namespace: Namespaces_1.NS_PUBSUB_OWNER,\n        path: 'iq.pubsub.defaultConfiguration'\n    },\n    {\n        element: 'publish',\n        fields: NodeOnlyField,\n        namespace: Namespaces_1.NS_PUBSUB,\n        path: 'iq.pubsub.publish'\n    },\n    {\n        element: 'retract',\n        fields: {\n            id: (0, jxt_1.childAttribute)(null, 'item', 'id'),\n            node: (0, jxt_1.attribute)('node'),\n            notify: (0, jxt_1.booleanAttribute)('notify')\n        },\n        namespace: Namespaces_1.NS_PUBSUB,\n        path: 'iq.pubsub.retract'\n    },\n    {\n        element: 'items',\n        fields: {\n            max: (0, jxt_1.integerAttribute)('max_items'),\n            node: (0, jxt_1.attribute)('node')\n        },\n        namespace: Namespaces_1.NS_PUBSUB,\n        path: 'iq.pubsub.fetch'\n    },\n    {\n        aliases: [\n            'pubsubitem',\n            'iq.pubsub.publish.item',\n            { multiple: true, path: 'iq.pubsub.fetch.items' }\n        ],\n        element: 'item',\n        fields: {\n            id: (0, jxt_1.attribute)('id'),\n            publisher: (0, jxt_1.JIDAttribute)('publisher')\n        },\n        namespace: Namespaces_1.NS_PUBSUB\n    },\n    {\n        element: 'event',\n        fields: {\n            eventType: (0, jxt_1.childEnum)(null, [\n                'purge',\n                'delete',\n                'subscription',\n                'configuration',\n                'items'\n            ])\n        },\n        namespace: Namespaces_1.NS_PUBSUB_EVENT,\n        path: 'message.pubsub',\n        type: 'event',\n        typeField: 'context'\n    },\n    {\n        aliases: [{ path: 'message.pubsub.items.published', multiple: true }],\n        element: 'item',\n        fields: {\n            id: (0, jxt_1.attribute)('id'),\n            publisher: (0, jxt_1.JIDAttribute)('publisher')\n        },\n        namespace: Namespaces_1.NS_PUBSUB_EVENT,\n        path: 'pubsubeventitem'\n    },\n    {\n        element: 'purge',\n        fields: NodeOnlyField,\n        namespace: Namespaces_1.NS_PUBSUB_EVENT,\n        path: 'message.pubsub.purge'\n    },\n    {\n        element: 'delete',\n        fields: {\n            node: (0, jxt_1.attribute)('node'),\n            redirect: (0, jxt_1.childAttribute)(null, 'redirect', 'uri')\n        },\n        namespace: Namespaces_1.NS_PUBSUB_EVENT,\n        path: 'message.pubsub.delete'\n    },\n    {\n        aliases: [{ path: 'message.pubsub.subscription', selector: 'event', impliedType: true }],\n        element: 'subscription',\n        fields: {\n            expires: dateOrPresenceAttribute('expiry'),\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            node: (0, jxt_1.attribute)('node'),\n            subid: (0, jxt_1.attribute)('subid'),\n            type: (0, jxt_1.attribute)('subscription')\n        },\n        namespace: Namespaces_1.NS_PUBSUB_EVENT,\n        type: 'event'\n    },\n    {\n        element: 'configuration',\n        fields: NodeOnlyField,\n        namespace: Namespaces_1.NS_PUBSUB_EVENT,\n        path: 'message.pubsub.configuration'\n    },\n    {\n        element: 'items',\n        fields: {\n            node: (0, jxt_1.attribute)('node'),\n            retracted: (0, jxt_1.multipleChildAttribute)(null, 'retract', 'id')\n        },\n        namespace: Namespaces_1.NS_PUBSUB_EVENT,\n        path: 'message.pubsub.items'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0065: SOCKS5 Bytestreams\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0065.html\n// Version: 1.8.1 (2015-09-17)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        element: 'query',\n        fields: {\n            activate: (0, jxt_1.childText)(null, 'activate'),\n            address: (0, jxt_1.attribute)('dstaddr'),\n            candidateUsed: (0, jxt_1.childJIDAttribute)(null, 'streamhost-used', 'jid'),\n            mode: (0, jxt_1.attribute)('mode', 'tcp'),\n            sid: (0, jxt_1.attribute)('sid'),\n            udpSuccess: (0, jxt_1.childAttribute)(null, 'udpsuccess', 'dstaddr')\n        },\n        namespace: Namespaces_1.NS_SOCKS5,\n        path: 'iq.socks5'\n    },\n    {\n        aliases: [\n            {\n                multiple: true,\n                path: 'iq.socks5.candidates'\n            }\n        ],\n        element: 'streamhost',\n        fields: {\n            host: (0, jxt_1.attribute)('host'),\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            port: (0, jxt_1.integerAttribute)('port'),\n            uri: (0, jxt_1.attribute)('uri')\n        },\n        namespace: Namespaces_1.NS_SOCKS5\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0066: Out of Band Data\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0066.html\n// Version: 1.5 (2006-08-16)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        aliases: [{ multiple: true, path: 'message.links' }],\n        element: 'x',\n        fields: {\n            description: (0, jxt_1.childText)(null, 'desc'),\n            url: (0, jxt_1.childText)(null, 'url')\n        },\n        namespace: Namespaces_1.NS_OOB\n    },\n    {\n        element: 'query',\n        fields: {\n            description: (0, jxt_1.childText)(null, 'desc'),\n            url: (0, jxt_1.childText)(null, 'url')\n        },\n        namespace: Namespaces_1.NS_OOB_TRANSFER,\n        path: 'iq.transferLink'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0071: XHTML-IM\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0071.html\n// Version: 1.5.4 (2018-03-08)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    element: 'html',\n    fields: {\n        alternateLanguageBodies: (0, jxt_1.childAlternateLanguageRawElement)(Namespaces_1.NS_XHTML, 'body', 'xhtmlim'),\n        body: (0, jxt_1.childLanguageRawElement)(Namespaces_1.NS_XHTML, 'body', 'xhtmlim')\n    },\n    namespace: Namespaces_1.NS_XHTML_IM,\n    path: 'message.html'\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0077: In-Band Registration\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0077.html\n// Version: 2.4 (2012-01-253)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.extendStreamFeatures)({\n        inbandRegistration: (0, jxt_1.childBoolean)(Namespaces_1.NS_INBAND_REGISTRATION, 'register')\n    }),\n    (0, jxt_1.addAlias)(Namespaces_1.NS_DATAFORM, 'x', ['iq.account.form']),\n    (0, jxt_1.addAlias)(Namespaces_1.NS_OOB, 'x', ['iq.account.registrationLink']),\n    {\n        element: 'query',\n        fields: {\n            address: (0, jxt_1.childText)(null, 'address'),\n            date: (0, jxt_1.childDate)(null, 'date'),\n            email: (0, jxt_1.childText)(null, 'email'),\n            familyName: (0, jxt_1.childText)(null, 'last'),\n            fullName: (0, jxt_1.childText)(null, 'name'),\n            givenName: (0, jxt_1.childText)(null, 'first'),\n            instructions: (0, jxt_1.childText)(null, 'instructions'),\n            key: (0, jxt_1.childText)(null, 'key'),\n            locality: (0, jxt_1.childText)(null, 'city'),\n            misc: (0, jxt_1.childText)(null, 'misc'),\n            nick: (0, jxt_1.childText)(null, 'nick'),\n            password: (0, jxt_1.childText)(null, 'password'),\n            phone: (0, jxt_1.childText)(null, 'phone'),\n            postalCode: (0, jxt_1.childText)(null, 'zip'),\n            region: (0, jxt_1.childText)(null, 'state'),\n            registered: (0, jxt_1.childBoolean)(null, 'registered'),\n            remove: (0, jxt_1.childBoolean)(null, 'remove'),\n            text: (0, jxt_1.childText)(null, 'text'),\n            uri: (0, jxt_1.childText)(null, 'uri'),\n            username: (0, jxt_1.childText)(null, 'username')\n        },\n        namespace: Namespaces_1.NS_REGISTER,\n        path: 'iq.account'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0080: User Location\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0080.html\n// Version: 1.9 (2015-12-01)\n//\n// Additional:\n// --------------------------------------------------------------------\n// XEP-0350: Data Forms Geolocation Element\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0350.html\n// Version: 0.2 (2017-09-11)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    aliases: [\n        { path: 'message.geoloc', impliedType: true },\n        { path: 'dataform.fields.geoloc', impliedType: true },\n        ...(0, jxt_1.pubsubItemContentAliases)()\n    ],\n    element: 'geoloc',\n    fields: {\n        accuracy: (0, jxt_1.childFloat)(null, 'accuracy'),\n        altitude: (0, jxt_1.childFloat)(null, 'alt'),\n        altitudeAccuracy: (0, jxt_1.childFloat)(null, 'altaccuracy'),\n        area: (0, jxt_1.childText)(null, 'area'),\n        building: (0, jxt_1.childText)(null, 'building'),\n        country: (0, jxt_1.childText)(null, 'country'),\n        countryCode: (0, jxt_1.childText)(null, 'countrycode'),\n        datum: (0, jxt_1.childText)(null, 'datum'),\n        description: (0, jxt_1.childText)(null, 'description'),\n        error: (0, jxt_1.childFloat)(null, 'error'),\n        floor: (0, jxt_1.childText)(null, 'floor'),\n        heading: (0, jxt_1.childFloat)(null, 'bearing'),\n        lang: (0, jxt_1.languageAttribute)(),\n        latitude: (0, jxt_1.childFloat)(null, 'lat'),\n        locality: (0, jxt_1.childText)(null, 'locality'),\n        longitude: (0, jxt_1.childFloat)(null, 'lon'),\n        postalCode: (0, jxt_1.childText)(null, 'postalcode'),\n        region: (0, jxt_1.childText)(null, 'region'),\n        room: (0, jxt_1.childText)(null, 'room'),\n        speed: (0, jxt_1.childFloat)(null, 'speed'),\n        street: (0, jxt_1.childText)(null, 'street'),\n        text: (0, jxt_1.childText)(null, 'text'),\n        timestamp: (0, jxt_1.childDate)(null, 'timestamp'),\n        tzo: (0, jxt_1.childTimezoneOffset)(null, 'tzo'),\n        uri: (0, jxt_1.childText)(null, 'uri')\n    },\n    namespace: Namespaces_1.NS_GEOLOC,\n    type: Namespaces_1.NS_GEOLOC\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0084: User Avatar\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0084.html\n// Version: 1.1.1 (2016-07-09)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        aliases: (0, jxt_1.pubsubItemContentAliases)(),\n        element: 'data',\n        fields: {\n            data: (0, jxt_1.textBuffer)('base64')\n        },\n        namespace: Namespaces_1.NS_AVATAR_DATA,\n        path: 'avatar',\n        type: Namespaces_1.NS_AVATAR_DATA,\n        typeField: 'itemType'\n    },\n    {\n        aliases: [{ path: 'avatar', impliedType: true }, ...(0, jxt_1.pubsubItemContentAliases)()],\n        element: 'metadata',\n        namespace: Namespaces_1.NS_AVATAR_METADATA,\n        type: Namespaces_1.NS_AVATAR_METADATA,\n        typeField: 'itemType',\n        childrenExportOrder: {\n            versions: 1,\n            pointers: 2\n        }\n    },\n    {\n        aliases: [\n            {\n                multiple: true,\n                path: 'avatar.versions',\n                selector: Namespaces_1.NS_AVATAR_METADATA\n            }\n        ],\n        element: 'info',\n        fields: {\n            bytes: (0, jxt_1.integerAttribute)('bytes'),\n            height: (0, jxt_1.integerAttribute)('height'),\n            id: (0, jxt_1.attribute)('id'),\n            mediaType: (0, jxt_1.attribute)('type'),\n            uri: (0, jxt_1.attribute)('url'),\n            width: (0, jxt_1.integerAttribute)('width')\n        },\n        namespace: Namespaces_1.NS_AVATAR_METADATA\n    },\n    {\n        aliases: [\n            {\n                multiple: true,\n                path: 'avatar.pointers',\n                selector: Namespaces_1.NS_AVATAR_METADATA\n            }\n        ],\n        element: 'pointer',\n        fields: {\n            bytes: (0, jxt_1.integerAttribute)('bytes'),\n            height: (0, jxt_1.integerAttribute)('height'),\n            id: (0, jxt_1.attribute)('id'),\n            mediaType: (0, jxt_1.attribute)('type'),\n            width: (0, jxt_1.integerAttribute)('width')\n        },\n        namespace: Namespaces_1.NS_AVATAR_METADATA\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0085: Chat State Notifications\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0085.html\n// Version: 2.1 (2009-09-23)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Constants_1 = require(\"../Constants\");\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nexports.default = (0, jxt_1.extendMessage)({\n    chatState: (0, jxt_1.childEnum)(Namespaces_1.NS_CHAT_STATES, Object.values(Constants_1.ChatState))\n});\n","\"use strict\";\n// ====================================================================\n// XEP-0092: Software Version\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0092.html\n// Version: 1.1 (2007-02-15)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    element: 'query',\n    fields: {\n        name: (0, jxt_1.childText)(null, 'name'),\n        os: (0, jxt_1.childText)(null, 'os'),\n        version: (0, jxt_1.childText)(null, 'version')\n    },\n    namespace: Namespaces_1.NS_VERSION,\n    path: 'iq.softwareVersion'\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0107: User Mood\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0107.html\n// Version: 1.2.1 (2018-03-13)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Constants_1 = require(\"../Constants\");\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    aliases: [{ path: 'message.mood', impliedType: true }, ...(0, jxt_1.pubsubItemContentAliases)()],\n    element: 'mood',\n    fields: {\n        alternateLanguageText: (0, jxt_1.childAlternateLanguageText)(null, 'text'),\n        text: (0, jxt_1.childText)(null, 'text'),\n        value: (0, jxt_1.childEnum)(null, Constants_1.USER_MOODS)\n    },\n    namespace: Namespaces_1.NS_MOOD,\n    type: Namespaces_1.NS_MOOD\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0108: User Activity\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0108.html\n// Version: 1.3 (2008-10-29)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Constants_1 = require(\"../Constants\");\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    aliases: [{ path: 'activity', impliedType: true }, ...(0, jxt_1.pubsubItemContentAliases)()],\n    element: 'activity',\n    fields: {\n        activity: (0, jxt_1.childDoubleEnum)(null, Constants_1.USER_ACTIVITY_GENERAL, Constants_1.USER_ACTIVITY_SPECIFIC),\n        alternateLanguageText: (0, jxt_1.childAlternateLanguageText)(null, 'text'),\n        text: (0, jxt_1.childText)(null, 'text')\n    },\n    namespace: Namespaces_1.NS_ACTIVITY,\n    type: Namespaces_1.NS_ACTIVITY\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0114: Jabber Component Protocol\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0114.html\n// Version: 1.6 (2012-01-25)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    element: 'handshake',\n    fields: {\n        value: (0, jxt_1.textBuffer)('hex')\n    },\n    namespace: Namespaces_1.NS_COMPONENT,\n    path: 'handshake'\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0115: Entity Capabilities\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0115.html\n// Version: 1.5.1 (2016-10-06)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    aliases: [\n        { path: 'presence.legacyCapabilities', multiple: true },\n        { path: 'features.legacyCapabilities', multiple: true }\n    ],\n    element: 'c',\n    fields: {\n        algorithm: (0, jxt_1.attribute)('hash'),\n        legacy: (0, jxt_1.staticValue)(true),\n        node: (0, jxt_1.attribute)('node'),\n        value: (0, jxt_1.attribute)('ver')\n    },\n    namespace: Namespaces_1.NS_DISCO_LEGACY_CAPS\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0108: User Tune\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0118.html\n// Version: 1.2 (2008-01-30)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    aliases: [\n        {\n            impliedType: true,\n            path: 'tune'\n        },\n        ...(0, jxt_1.pubsubItemContentAliases)()\n    ],\n    element: 'tune',\n    fields: {\n        artist: (0, jxt_1.childText)(null, 'artist'),\n        length: (0, jxt_1.childInteger)(null, 'length'),\n        rating: (0, jxt_1.childInteger)(null, 'rating'),\n        source: (0, jxt_1.childText)(null, 'source'),\n        title: (0, jxt_1.childText)(null, 'title'),\n        track: (0, jxt_1.childText)(null, 'track'),\n        uri: (0, jxt_1.childText)(null, 'uri')\n    },\n    namespace: Namespaces_1.NS_TUNE,\n    type: Namespaces_1.NS_TUNE\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0141: Data Forms Layout\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0141.html\n// Version: 1.0 (2005-05-12)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst aliases = [\n    'dataformLayout',\n    {\n        multiple: true,\n        path: 'dataformLayout.contents'\n    },\n    {\n        multiple: true,\n        path: 'dataform.layout.contents'\n    }\n];\nconst Protocol = [\n    {\n        aliases: [\n            {\n                multiple: true,\n                path: 'dataform.layout'\n            }\n        ],\n        element: 'page',\n        fields: {\n            label: (0, jxt_1.attribute)('label')\n        },\n        namespace: Namespaces_1.NS_DATAFORM_LAYOUT\n    },\n    {\n        aliases,\n        element: 'section',\n        fields: {\n            label: (0, jxt_1.attribute)('label')\n        },\n        namespace: Namespaces_1.NS_DATAFORM_LAYOUT,\n        type: 'section',\n        typeField: 'type'\n    },\n    {\n        aliases,\n        element: 'text',\n        fields: {\n            value: (0, jxt_1.text)()\n        },\n        namespace: Namespaces_1.NS_DATAFORM_LAYOUT,\n        type: 'text',\n        typeField: 'type'\n    },\n    {\n        aliases,\n        element: 'fieldref',\n        fields: {\n            field: (0, jxt_1.attribute)('var')\n        },\n        namespace: Namespaces_1.NS_DATAFORM_LAYOUT,\n        type: 'fieldref',\n        typeField: 'type'\n    },\n    {\n        aliases,\n        element: 'reportedref',\n        namespace: Namespaces_1.NS_DATAFORM_LAYOUT,\n        type: 'reportedref',\n        typeField: 'type'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0124: Bidirectional-streams Over Synchronous HTTP (BOSH)\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0124.html\n// Version: 1.11.1 (2016-11-16)\n//\n// Additional:\n// --------------------------------------------------------------------\n// XEP-0206: XMPP over BOSH\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0206.html\n// Version: 1.4 (2014-04-09)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    element: 'body',\n    fields: {\n        acceptMediaTypes: (0, jxt_1.attribute)('accept'),\n        ack: (0, jxt_1.integerAttribute)('ack'),\n        authId: (0, jxt_1.attribute)('authid'),\n        characterSets: (0, jxt_1.attribute)('charsets'),\n        condition: (0, jxt_1.attribute)('condition'),\n        from: (0, jxt_1.JIDAttribute)('from'),\n        key: (0, jxt_1.attribute)('key'),\n        lang: (0, jxt_1.languageAttribute)(),\n        maxClientRequests: (0, jxt_1.integerAttribute)('requests'),\n        maxHoldOpen: (0, jxt_1.integerAttribute)('hold'),\n        maxInactivityTime: (0, jxt_1.integerAttribute)('inactivity'),\n        maxSessionPause: (0, jxt_1.integerAttribute)('maxpause'),\n        maxWaitTime: (0, jxt_1.integerAttribute)('wait'),\n        mediaType: (0, jxt_1.attribute)('content'),\n        minPollingInterval: (0, jxt_1.integerAttribute)('polling'),\n        newKey: (0, jxt_1.attribute)('newkey'),\n        pauseSession: (0, jxt_1.integerAttribute)('pause'),\n        report: (0, jxt_1.integerAttribute)('report'),\n        rid: (0, jxt_1.integerAttribute)('rid'),\n        route: (0, jxt_1.attribute)('string'),\n        seeOtherURI: (0, jxt_1.childText)(null, 'uri'),\n        sid: (0, jxt_1.attribute)('sid'),\n        stream: (0, jxt_1.attribute)('stream'),\n        time: (0, jxt_1.integerAttribute)('time'),\n        to: (0, jxt_1.JIDAttribute)('to'),\n        type: (0, jxt_1.attribute)('type'),\n        version: (0, jxt_1.attribute)('ver'),\n        // XEP-0206\n        xmppRestart: (0, jxt_1.namespacedBooleanAttribute)('xmpp', Namespaces_1.NS_BOSH_XMPP, 'restart', undefined, {\n            writeValue: (value) => {\n                return value ? 'true' : 'false';\n            }\n        }),\n        xmppRestartLogic: (0, jxt_1.namespacedBooleanAttribute)('xmpp', Namespaces_1.NS_BOSH_XMPP, 'restartlogic', undefined, {\n            writeValue: (value) => {\n                return value ? 'true' : 'false';\n            }\n        }),\n        xmppVersion: (0, jxt_1.namespacedAttribute)('xmpp', Namespaces_1.NS_BOSH_XMPP, 'version')\n    },\n    namespace: Namespaces_1.NS_BOSH,\n    path: 'bosh'\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0131: Stanza Headers and Internet Metadata\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0131.html\n// Version: 1.2 (2006-07-12)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.extendMessage)({\n        headers: (0, jxt_1.splicePath)(Namespaces_1.NS_SHIM, 'headers', 'header', true)\n    }),\n    (0, jxt_1.extendPresence)({\n        headers: (0, jxt_1.splicePath)(Namespaces_1.NS_SHIM, 'headers', 'header', true)\n    }),\n    {\n        element: 'header',\n        fields: {\n            name: (0, jxt_1.attribute)('name'),\n            value: (0, jxt_1.text)()\n        },\n        namespace: Namespaces_1.NS_SHIM,\n        path: 'header'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0138: Stream Compression\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0138.html\n// Version: 2.0 (2009-05-27)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        element: 'compression',\n        fields: {\n            methods: (0, jxt_1.multipleChildText)(null, 'method')\n        },\n        namespace: Namespaces_1.NS_COMPRESSION_FEATURE,\n        path: 'features.compression'\n    },\n    {\n        element: 'compress',\n        fields: {\n            method: (0, jxt_1.childText)(null, 'method')\n        },\n        namespace: Namespaces_1.NS_COMPRESSION,\n        path: 'compression',\n        type: 'start',\n        typeField: 'type'\n    },\n    {\n        aliases: ['error.compressionError'],\n        element: 'failure',\n        fields: {\n            condition: (0, jxt_1.childEnum)(null, ['unsupported-method', 'setup-failed', 'processing-failed'])\n        },\n        namespace: Namespaces_1.NS_COMPRESSION,\n        path: 'compression',\n        type: 'failure',\n        typeField: 'type'\n    },\n    {\n        element: 'compressed',\n        namespace: Namespaces_1.NS_COMPRESSION,\n        path: 'compression',\n        type: 'success',\n        typeField: 'type'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0144: Roster Item Exchange\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0144.html\n// Version: 1.1.1 (2017-11-28)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.extendMessage)({\n        rosterExchange: (0, jxt_1.splicePath)(Namespaces_1.NS_ROSTER_EXCHANGE, 'x', 'rosterExchange', true)\n    }),\n    (0, jxt_1.extendIQ)({\n        rosterExchange: (0, jxt_1.splicePath)(Namespaces_1.NS_ROSTER_EXCHANGE, 'x', 'rosterExchange', true)\n    }),\n    {\n        element: 'item',\n        fields: {\n            action: (0, jxt_1.attribute)('action'),\n            groups: (0, jxt_1.multipleChildText)(null, 'group'),\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            name: (0, jxt_1.attribute)('name')\n        },\n        namespace: Namespaces_1.NS_ROSTER_EXCHANGE,\n        path: 'rosterExchange'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0153: vCard-Based Avatars\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0153.html\n// Version: 1.1 (2018-02-26)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nexports.default = (0, jxt_1.extendPresence)({\n    vcardAvatar: {\n        importer(xml) {\n            const update = (0, jxt_1.findAll)(xml, Namespaces_1.NS_VCARD_TEMP_UPDATE, 'x');\n            if (!update.length) {\n                return;\n            }\n            const photo = (0, jxt_1.findAll)(update[0], Namespaces_1.NS_VCARD_TEMP_UPDATE, 'photo');\n            if (photo.length) {\n                return photo[0].getText();\n            }\n            else {\n                return true;\n            }\n        },\n        exporter(xml, value) {\n            const update = (0, jxt_1.findOrCreate)(xml, Namespaces_1.NS_VCARD_TEMP_UPDATE, 'x');\n            if (value === '') {\n                (0, jxt_1.findOrCreate)(update, Namespaces_1.NS_VCARD_TEMP_UPDATE, 'photo');\n            }\n            else if (value === true) {\n                return;\n            }\n            else if (value) {\n                const photo = (0, jxt_1.findOrCreate)(update, Namespaces_1.NS_VCARD_TEMP_UPDATE, 'photo');\n                photo.children.push(value);\n            }\n        }\n    }\n});\n","\"use strict\";\n// ====================================================================\n// XEP-0158: CAPTCHA Forms\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0158.html\n// Version: 1.0 (2008-09-03)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.extendMessage)({\n        captcha: (0, jxt_1.splicePath)(Namespaces_1.NS_CAPTCHA, 'captcha', 'dataform')\n    }),\n    (0, jxt_1.extendIQ)({\n        captcha: (0, jxt_1.splicePath)(Namespaces_1.NS_CAPTCHA, 'captcha', 'dataform')\n    })\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0166: Jingle\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0166.html\n// Version: 1.1.1 (2016-05-17)\n//\n// Additional:\n// - Added unknown-content error\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Constants_1 = require(\"../Constants\");\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.extendStanzaError)({\n        jingleError: (0, jxt_1.childEnum)(Namespaces_1.NS_JINGLE_ERRORS_1, Object.values(Constants_1.JingleErrorCondition))\n    }),\n    {\n        element: 'jingle',\n        fields: {\n            action: (0, jxt_1.attribute)('action'),\n            initiator: (0, jxt_1.JIDAttribute)('initiator'),\n            responder: (0, jxt_1.JIDAttribute)('responder'),\n            sid: (0, jxt_1.attribute)('sid')\n        },\n        namespace: Namespaces_1.NS_JINGLE_1,\n        path: 'iq.jingle'\n    },\n    {\n        aliases: [\n            {\n                multiple: true,\n                path: 'iq.jingle.contents'\n            }\n        ],\n        element: 'content',\n        fields: {\n            creator: (0, jxt_1.attribute)('creator'),\n            disposition: (0, jxt_1.attribute)('disposition', 'session'),\n            name: (0, jxt_1.attribute)('name'),\n            senders: (0, jxt_1.attribute)('senders', 'both')\n        },\n        namespace: Namespaces_1.NS_JINGLE_1\n    },\n    {\n        element: 'reason',\n        fields: {\n            alternativeSession: (0, jxt_1.childText)(null, 'alternative-session'),\n            condition: (0, jxt_1.childEnum)(null, Object.values(Constants_1.JingleReasonCondition)),\n            text: (0, jxt_1.childText)(null, 'text')\n        },\n        namespace: Namespaces_1.NS_JINGLE_1,\n        path: 'iq.jingle.reason'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0167: Jingle RTP Sessions\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0167.html\n// Version: 1.1.1 (2016-07-08)\n//\n// Additional:\n// - rtcpMux flag\n// - rtcpReducedSize flag\n// - media streams list\n//\n// --------------------------------------------------------------------\n// XEP-0262: Use of ZRTP in Jingle RTP Sessions\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0262.html\n// Version: 1.0 (2011-06-15)\n//\n// --------------------------------------------------------------------\n// XEP-0293: Jingle RTP Feedback Negotiation\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0293.html\n// Version: 1.0 (2015-08-11)\n//\n// --------------------------------------------------------------------\n// XEP-0294: Jingle RTP Header Extensions Negotiation\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0294.html\n// Version: 1.0 (2015-08-11)\n//\n// --------------------------------------------------------------------\n// XEP-0339: Source-Specific Media Attributes in Jingle\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0339.html\n// Version: 0.3 (2017-09-11)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Constants_1 = require(\"../Constants\");\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nfunction rtcpFeedback() {\n    return {\n        importer(xml, context) {\n            let existing = (0, jxt_1.findAll)(xml, Namespaces_1.NS_JINGLE_RTP_RTCP_FB_0, 'rtcp-fb');\n            const typeImporter = (0, jxt_1.attribute)('type').importer;\n            const subtypeImporter = (0, jxt_1.attribute)('subtype').importer;\n            const valueImporter = (0, jxt_1.attribute)('value').importer;\n            const result = [];\n            for (const child of existing) {\n                const type = typeImporter(child, context);\n                const parameter = subtypeImporter(child, context);\n                result.push(parameter ? { type, parameter } : { type });\n            }\n            existing = (0, jxt_1.findAll)(xml, Namespaces_1.NS_JINGLE_RTP_RTCP_FB_0, 'rtcp-fb-trr-int');\n            for (const child of existing) {\n                const parameter = valueImporter(child, context);\n                result.push(parameter ? { type: 'trr-int', parameter } : { type: 'trr-int' });\n            }\n            return result;\n        },\n        exporter(xml, values, context) {\n            const typeExporter = (0, jxt_1.attribute)('type').exporter;\n            const subtypeExporter = (0, jxt_1.attribute)('subtype').exporter;\n            const valueExporter = (0, jxt_1.attribute)('value').exporter;\n            for (const fb of values) {\n                let child;\n                if (fb.type === 'trr-int') {\n                    child = (0, jxt_1.createElement)(Namespaces_1.NS_JINGLE_RTP_RTCP_FB_0, 'rtcp-fb-trr-int', context.namespace, xml);\n                    if (fb.parameter) {\n                        valueExporter(child, fb.parameter, context);\n                    }\n                }\n                else {\n                    child = (0, jxt_1.createElement)(Namespaces_1.NS_JINGLE_RTP_RTCP_FB_0, 'rtcp-fb', context.namespace, xml);\n                    typeExporter(child, fb.type, context);\n                    if (fb.parameter) {\n                        subtypeExporter(child, fb.parameter, context);\n                    }\n                }\n                xml.appendChild(child);\n            }\n        }\n    };\n}\nconst info = 'iq.jingle.info';\nconst Protocol = [\n    {\n        aliases: ['iq.jingle.contents.application'],\n        childrenExportOrder: {\n            codecs: 4,\n            encryption: 5,\n            headerExtensions: 6,\n            sourceGroups: 8,\n            sources: 7,\n            streams: 9\n        },\n        element: 'description',\n        fields: {\n            media: (0, jxt_1.attribute)('media'),\n            rtcpFeedback: {\n                ...rtcpFeedback(),\n                exportOrder: 3\n            },\n            rtcpMux: {\n                ...(0, jxt_1.childBoolean)(null, 'rtcp-mux'),\n                exportOrder: 1\n            },\n            rtcpReducedSize: {\n                ...(0, jxt_1.childBoolean)(null, 'rtcp-reduced-size'),\n                exportOrder: 2\n            },\n            ssrc: (0, jxt_1.attribute)('ssrc')\n        },\n        namespace: Namespaces_1.NS_JINGLE_RTP_1,\n        optionalNamespaces: {\n            rtcpf: Namespaces_1.NS_JINGLE_RTP_RTCP_FB_0,\n            rtph: Namespaces_1.NS_JINGLE_RTP_HDREXT_0\n        },\n        type: Namespaces_1.NS_JINGLE_RTP_1\n    },\n    {\n        aliases: [\n            {\n                multiple: true,\n                path: 'iq.jingle.contents.application.headerExtensions',\n                selector: Namespaces_1.NS_JINGLE_RTP_1\n            }\n        ],\n        element: 'rtp-hdrext',\n        fields: {\n            id: (0, jxt_1.integerAttribute)('id'),\n            senders: (0, jxt_1.attribute)('senders'),\n            uri: (0, jxt_1.attribute)('uri')\n        },\n        namespace: Namespaces_1.NS_JINGLE_RTP_HDREXT_0\n    },\n    {\n        aliases: [\n            {\n                multiple: true,\n                path: 'iq.jingle.contents.application.codecs',\n                selector: Namespaces_1.NS_JINGLE_RTP_1\n            },\n            'rtpcodec'\n        ],\n        element: 'payload-type',\n        fields: {\n            channels: (0, jxt_1.integerAttribute)('channels'),\n            clockRate: (0, jxt_1.integerAttribute)('clockrate'),\n            id: (0, jxt_1.attribute)('id'),\n            maxptime: (0, jxt_1.integerAttribute)('maxptime'),\n            name: (0, jxt_1.attribute)('name'),\n            parameters: (0, jxt_1.parameterMap)(Namespaces_1.NS_JINGLE_RTP_1, 'parameter', 'name', 'value'),\n            ptime: (0, jxt_1.integerAttribute)('ptime'),\n            rtcpFeedback: rtcpFeedback()\n        },\n        namespace: Namespaces_1.NS_JINGLE_RTP_1\n    },\n    {\n        aliases: [\n            {\n                multiple: true,\n                path: 'iq.jingle.contents.application.sources',\n                selector: Namespaces_1.NS_JINGLE_RTP_1\n            }\n        ],\n        element: 'source',\n        fields: {\n            parameters: (0, jxt_1.parameterMap)(Namespaces_1.NS_JINGLE_RTP_SSMA_0, 'parameter', 'name', 'value'),\n            ssrc: (0, jxt_1.attribute)('ssrc')\n        },\n        namespace: Namespaces_1.NS_JINGLE_RTP_SSMA_0\n    },\n    {\n        aliases: [\n            {\n                multiple: true,\n                path: 'iq.jingle.contents.application.sourceGroups',\n                selector: Namespaces_1.NS_JINGLE_RTP_1\n            }\n        ],\n        element: 'ssrc-group',\n        fields: {\n            semantics: (0, jxt_1.attribute)('semantics'),\n            sources: (0, jxt_1.multipleChildAttribute)(null, 'source', 'ssrc')\n        },\n        namespace: Namespaces_1.NS_JINGLE_RTP_SSMA_0\n    },\n    {\n        aliases: [\n            {\n                multiple: true,\n                path: 'iq.jingle.contents.application.streams',\n                selector: Namespaces_1.NS_JINGLE_RTP_1\n            }\n        ],\n        element: 'stream',\n        fields: {\n            id: (0, jxt_1.attribute)('id'),\n            track: (0, jxt_1.attribute)('track')\n        },\n        namespace: Namespaces_1.NS_JINGLE_RTP_MSID_0\n    },\n    {\n        aliases: [{ path: 'iq.jingle.contents.application.encryption', selector: Namespaces_1.NS_JINGLE_RTP_1 }],\n        element: 'encryption',\n        fields: {\n            required: (0, jxt_1.booleanAttribute)('required')\n        },\n        namespace: Namespaces_1.NS_JINGLE_RTP_1\n    },\n    {\n        aliases: [\n            {\n                multiple: true,\n                path: 'iq.jingle.contents.application.encryption.sdes',\n                selector: Namespaces_1.NS_JINGLE_RTP_1\n            }\n        ],\n        element: 'crypto',\n        fields: {\n            cryptoSuite: (0, jxt_1.attribute)('crypto-suite'),\n            keyParameters: (0, jxt_1.attribute)('key-params'),\n            sessionParameters: (0, jxt_1.attribute)('session-params'),\n            tag: (0, jxt_1.integerAttribute)('tag')\n        },\n        namespace: Namespaces_1.NS_JINGLE_RTP_1\n    },\n    {\n        aliases: [\n            {\n                path: 'iq.jingle.contents.application.encryption.zrtp',\n                selector: Namespaces_1.NS_JINGLE_RTP_1\n            }\n        ],\n        element: 'zrtp-hash',\n        fields: {\n            value: (0, jxt_1.textBuffer)('hex'),\n            version: (0, jxt_1.attribute)('version')\n        },\n        namespace: Namespaces_1.NS_JINGLE_RTP_1\n    },\n    {\n        element: 'mute',\n        fields: {\n            creator: (0, jxt_1.attribute)('creator'),\n            name: (0, jxt_1.attribute)('name')\n        },\n        namespace: Namespaces_1.NS_JINGLE_RTP_INFO_1,\n        path: info,\n        type: Constants_1.JINGLE_INFO_MUTE\n    },\n    {\n        element: 'unmute',\n        fields: {\n            creator: (0, jxt_1.attribute)('creator'),\n            name: (0, jxt_1.attribute)('name')\n        },\n        namespace: Namespaces_1.NS_JINGLE_RTP_INFO_1,\n        path: info,\n        type: Constants_1.JINGLE_INFO_UNMUTE\n    },\n    {\n        element: 'hold',\n        namespace: Namespaces_1.NS_JINGLE_RTP_INFO_1,\n        path: info,\n        type: Constants_1.JINGLE_INFO_HOLD\n    },\n    {\n        element: 'unhold',\n        namespace: Namespaces_1.NS_JINGLE_RTP_INFO_1,\n        path: info,\n        type: Constants_1.JINGLE_INFO_UNHOLD\n    },\n    {\n        element: 'active',\n        namespace: Namespaces_1.NS_JINGLE_RTP_INFO_1,\n        path: info,\n        type: Constants_1.JINGLE_INFO_ACTIVE\n    },\n    {\n        element: 'ringing',\n        namespace: Namespaces_1.NS_JINGLE_RTP_INFO_1,\n        path: info,\n        type: Constants_1.JINGLE_INFO_RINGING\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0172: User Nickname\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0172.html\n// Version: 1.1 (2012-03-21)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.extendMessage)({\n        nick: (0, jxt_1.childText)(Namespaces_1.NS_NICK, 'nick')\n    }),\n    (0, jxt_1.extendPresence)({\n        nick: (0, jxt_1.childText)(Namespaces_1.NS_NICK, 'nick')\n    }),\n    {\n        aliases: (0, jxt_1.pubsubItemContentAliases)(),\n        element: 'nick',\n        fields: {\n            nick: (0, jxt_1.text)()\n        },\n        namespace: Namespaces_1.NS_NICK,\n        type: Namespaces_1.NS_NICK\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0176: Jingle ICE-UDP Transport Method\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0176.html\n// Version: 1.0 (2009-06-10)\n//\n// Additional:\n// - tcpType candidate attribute (matching XEP-0371)\n// - gatheringComplete flag (matching XEP-0371)\n//\n// --------------------------------------------------------------------\n// XEP-0371: Jingle ICE-UDP Transport Method\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0371.html\n// Version: 0.2 (2017-09-11)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst ice = (transportType) => [\n    {\n        element: 'transport',\n        fields: {\n            gatheringComplete: (0, jxt_1.childBoolean)(null, 'gathering-complete'),\n            password: (0, jxt_1.attribute)('pwd'),\n            usernameFragment: (0, jxt_1.attribute)('ufrag')\n        },\n        namespace: transportType,\n        path: 'iq.jingle.contents.transport',\n        type: transportType,\n        typeField: 'transportType'\n    },\n    {\n        aliases: [\n            {\n                impliedType: true,\n                path: 'iq.jingle.contents.transport.remoteCandidate',\n                selector: transportType\n            }\n        ],\n        element: 'remote-candidate',\n        fields: {\n            component: (0, jxt_1.integerAttribute)('component'),\n            ip: (0, jxt_1.attribute)('ip'),\n            port: (0, jxt_1.integerAttribute)('port')\n        },\n        namespace: transportType,\n        type: transportType,\n        typeField: 'transportType'\n    },\n    {\n        aliases: [\n            {\n                impliedType: true,\n                multiple: true,\n                path: 'iq.jingle.contents.transport.candidates',\n                selector: transportType\n            }\n        ],\n        element: 'candidate',\n        fields: {\n            component: (0, jxt_1.integerAttribute)('component'),\n            foundation: (0, jxt_1.attribute)('foundation'),\n            generation: (0, jxt_1.integerAttribute)('generation'),\n            id: (0, jxt_1.attribute)('id'),\n            ip: (0, jxt_1.attribute)('ip'),\n            network: (0, jxt_1.integerAttribute)('network'),\n            port: (0, jxt_1.integerAttribute)('port'),\n            priority: (0, jxt_1.integerAttribute)('priority'),\n            protocol: (0, jxt_1.attribute)('protocol'),\n            relatedAddress: (0, jxt_1.attribute)('rel-addr'),\n            relatedPort: (0, jxt_1.attribute)('rel-port'),\n            tcpType: (0, jxt_1.attribute)('tcptype'),\n            type: (0, jxt_1.attribute)('type')\n        },\n        namespace: transportType,\n        type: transportType,\n        typeField: 'transportType'\n    }\n];\nconst Protocol = [...ice(Namespaces_1.NS_JINGLE_ICE_0), ...ice(Namespaces_1.NS_JINGLE_ICE_UDP_1)];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0177: Jingle Raw UDP Transport Method\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0177.html\n// Version: 1.1 (2009-12-23)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        element: 'transport',\n        fields: {\n            gatheringComplete: (0, jxt_1.childBoolean)(null, 'gathering-complete'),\n            password: (0, jxt_1.attribute)('pwd'),\n            usernameFragment: (0, jxt_1.attribute)('ufrag')\n        },\n        namespace: Namespaces_1.NS_JINGLE_RAW_UDP_1,\n        path: 'iq.jingle.contents.transport',\n        type: Namespaces_1.NS_JINGLE_RAW_UDP_1,\n        typeField: 'transportType'\n    },\n    {\n        aliases: [\n            {\n                impliedType: true,\n                multiple: true,\n                path: 'iq.jingle.contents.transport.candidates',\n                selector: Namespaces_1.NS_JINGLE_RAW_UDP_1\n            }\n        ],\n        element: 'candidate',\n        fields: {\n            component: (0, jxt_1.integerAttribute)('component'),\n            foundation: (0, jxt_1.attribute)('foundation'),\n            generation: (0, jxt_1.integerAttribute)('generation'),\n            id: (0, jxt_1.attribute)('id'),\n            ip: (0, jxt_1.attribute)('ip'),\n            port: (0, jxt_1.integerAttribute)('port'),\n            type: (0, jxt_1.attribute)('type')\n        },\n        namespace: Namespaces_1.NS_JINGLE_RAW_UDP_1,\n        type: Namespaces_1.NS_JINGLE_RAW_UDP_1,\n        typeField: 'transportType'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0184: Message Delivery Receipts\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0184.html\n// Version: 1.2 (2011-03-01)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        element: 'request',\n        namespace: Namespaces_1.NS_RECEIPTS,\n        path: 'message.receipt',\n        type: 'request',\n        typeField: 'type'\n    },\n    {\n        element: 'received',\n        fields: {\n            id: (0, jxt_1.attribute)('id')\n        },\n        namespace: Namespaces_1.NS_RECEIPTS,\n        path: 'message.receipt',\n        type: 'received',\n        typeField: 'type'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0186: Invisible Command\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0186.html\n// Version: 0.13 (2017-11-29)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        element: 'invisible',\n        fields: {\n            probe: (0, jxt_1.booleanAttribute)('probe')\n        },\n        namespace: Namespaces_1.NS_INVISIBLE_0,\n        path: 'iq.visibility',\n        type: 'invisible',\n        typeField: 'type'\n    },\n    {\n        element: 'visible',\n        namespace: Namespaces_1.NS_INVISIBLE_0,\n        path: 'iq.visibility',\n        type: 'visible'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0191: Blocking Command\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0191.html\n// Version: 1.3 (2015-03-12)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.extendStanzaError)({\n        blocked: (0, jxt_1.childBoolean)(Namespaces_1.NS_BLOCKING_ERRORS, 'blocked')\n    }),\n    {\n        element: 'blocklist',\n        fields: {\n            jids: (0, jxt_1.multipleChildAttribute)(null, 'item', 'jid')\n        },\n        namespace: Namespaces_1.NS_BLOCKING,\n        path: 'iq.blockList',\n        type: 'list',\n        typeField: 'action'\n    },\n    {\n        element: 'block',\n        fields: {\n            jids: (0, jxt_1.multipleChildAttribute)(null, 'item', 'jid')\n        },\n        namespace: Namespaces_1.NS_BLOCKING,\n        path: 'iq.blockList',\n        type: 'block',\n        typeField: 'action'\n    },\n    {\n        element: 'unblock',\n        fields: {\n            jids: (0, jxt_1.multipleChildAttribute)(null, 'item', 'jid')\n        },\n        namespace: Namespaces_1.NS_BLOCKING,\n        path: 'iq.blockList',\n        type: 'unblock',\n        typeField: 'action'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0198: Stream Management\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0198.html\n// Version: 1.5.2 (2016-12-08)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.extendStreamFeatures)({\n        streamManagement: (0, jxt_1.childBoolean)(Namespaces_1.NS_SMACKS_3, 'sm')\n    }),\n    {\n        element: 'a',\n        fields: {\n            handled: (0, jxt_1.integerAttribute)('h')\n        },\n        namespace: Namespaces_1.NS_SMACKS_3,\n        path: 'sm',\n        type: 'ack',\n        typeField: 'type'\n    },\n    {\n        element: 'r',\n        namespace: Namespaces_1.NS_SMACKS_3,\n        path: 'sm',\n        type: 'request',\n        typeField: 'type'\n    },\n    {\n        element: 'enable',\n        fields: {\n            allowResumption: (0, jxt_1.booleanAttribute)('resume')\n        },\n        namespace: Namespaces_1.NS_SMACKS_3,\n        path: 'sm',\n        type: 'enable',\n        typeField: 'type'\n    },\n    {\n        element: 'enabled',\n        fields: {\n            id: (0, jxt_1.attribute)('id'),\n            resume: (0, jxt_1.booleanAttribute)('resume')\n        },\n        namespace: Namespaces_1.NS_SMACKS_3,\n        path: 'sm',\n        type: 'enabled',\n        typeField: 'type'\n    },\n    {\n        element: 'resume',\n        fields: {\n            handled: (0, jxt_1.integerAttribute)('h'),\n            previousSession: (0, jxt_1.attribute)('previd')\n        },\n        namespace: Namespaces_1.NS_SMACKS_3,\n        path: 'sm',\n        type: 'resume',\n        typeField: 'type'\n    },\n    {\n        element: 'resumed',\n        fields: {\n            handled: (0, jxt_1.integerAttribute)('h'),\n            previousSession: (0, jxt_1.attribute)('previd')\n        },\n        namespace: Namespaces_1.NS_SMACKS_3,\n        path: 'sm',\n        type: 'resumed',\n        typeField: 'type'\n    },\n    {\n        element: 'failed',\n        fields: {\n            handled: (0, jxt_1.integerAttribute)('h')\n        },\n        namespace: Namespaces_1.NS_SMACKS_3,\n        path: 'sm',\n        type: 'failed',\n        typeField: 'type'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0199: XMPP Ping\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0199.html\n// Version: 2.0 (2009-06-03)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nexports.default = (0, jxt_1.extendIQ)({\n    ping: (0, jxt_1.childBoolean)(Namespaces_1.NS_PING, 'ping')\n});\n","\"use strict\";\n// ====================================================================\n// XEP-0202: Entity Time\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0202.html\n// Version: 2.0 (2009-09-15)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    element: 'time',\n    fields: {\n        tzo: (0, jxt_1.childTimezoneOffset)(null, 'tzo'),\n        utc: (0, jxt_1.childDate)(null, 'utc')\n    },\n    namespace: Namespaces_1.NS_TIME,\n    path: 'iq.time'\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0203: Delayed Delivery\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0203.html\n// Version: 2.0 (2009-09-15)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    aliases: ['message.delay', 'presence.delay'],\n    element: 'delay',\n    fields: {\n        from: (0, jxt_1.JIDAttribute)('from'),\n        reason: (0, jxt_1.text)(),\n        timestamp: (0, jxt_1.dateAttribute)('stamp')\n    },\n    namespace: Namespaces_1.NS_DELAY\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0215: External Service Discovery\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0215.html\n// Version: 0.6 (2014-02-27)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst versions = {\n    '2': Namespaces_1.NS_DISCO_EXTERNAL_2,\n    '1': Namespaces_1.NS_DISCO_EXTERNAL_1\n};\nconst Protocol = [];\nfor (const [version, namespace] of Object.entries(versions)) {\n    Protocol.push({\n        aliases: ['iq.externalServiceCredentials'],\n        defaultType: '2',\n        element: 'credentials',\n        fields: {\n            expires: (0, jxt_1.childDateAttribute)(null, 'service', 'expires'),\n            host: (0, jxt_1.childAttribute)(null, 'service', 'host'),\n            name: (0, jxt_1.childAttribute)(null, 'service', 'name'),\n            password: (0, jxt_1.childAttribute)(null, 'service', 'password'),\n            port: (0, jxt_1.childIntegerAttribute)(null, 'service', 'port'),\n            restricted: (0, jxt_1.childBooleanAttribute)(null, 'service', 'restricted'),\n            transport: (0, jxt_1.childAttribute)(null, 'service', 'transport'),\n            type: (0, jxt_1.childAttribute)(null, 'service', 'type'),\n            username: (0, jxt_1.childAttribute)(null, 'service', 'username')\n        },\n        namespace,\n        type: version,\n        typeField: 'version'\n    }, {\n        aliases: ['iq.externalServices'],\n        defaultType: '2',\n        element: 'services',\n        fields: {\n            type: (0, jxt_1.attribute)('type')\n        },\n        namespace,\n        type: version,\n        typeField: 'version'\n    }, {\n        aliases: [{ path: 'iq.externalServices.services', multiple: true }],\n        defaultType: '2',\n        element: 'service',\n        fields: {\n            expires: (0, jxt_1.dateAttribute)('expires'),\n            host: (0, jxt_1.attribute)('host'),\n            name: (0, jxt_1.attribute)('name'),\n            password: (0, jxt_1.attribute)('password'),\n            port: (0, jxt_1.integerAttribute)('port'),\n            restricted: (0, jxt_1.booleanAttribute)('restricted'),\n            transport: (0, jxt_1.attribute)('transport'),\n            type: (0, jxt_1.attribute)('type'),\n            username: (0, jxt_1.attribute)('username')\n        },\n        namespace,\n        type: version,\n        typeField: 'version'\n    });\n}\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0221: Data Forms Media Element\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0221.html\n// Version: 1.0 (2008-09-03)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        element: 'media',\n        fields: {\n            height: (0, jxt_1.integerAttribute)('height'),\n            width: (0, jxt_1.integerAttribute)('width')\n        },\n        namespace: Namespaces_1.NS_DATAFORM_MEDIA,\n        path: 'dataform.fields.media'\n    },\n    {\n        aliases: [{ multiple: true, path: 'dataform.fields.media.sources' }],\n        element: 'uri',\n        fields: {\n            mediaType: (0, jxt_1.attribute)('type'),\n            uri: (0, jxt_1.text)()\n        },\n        namespace: Namespaces_1.NS_DATAFORM_MEDIA\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0224: Attention\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0224.html\n// Version: Version 1.0 (2008-11-13)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nexports.default = (0, jxt_1.extendMessage)({\n    requestingAttention: (0, jxt_1.childBoolean)(Namespaces_1.NS_ATTENTION_0, 'attention')\n});\n","\"use strict\";\n// ====================================================================\n// XEP-0231: Bits of Binary\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0231.html\n// Version: Version 1.0 (2008-09-03)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    aliases: [\n        'iq.bits',\n        { path: 'message.bits', multiple: true },\n        { path: 'presence.bits', multiple: true },\n        { path: 'iq.jingle.bits', multiple: true }\n    ],\n    element: 'data',\n    fields: {\n        cid: (0, jxt_1.attribute)('cid'),\n        data: (0, jxt_1.textBuffer)('base64'),\n        maxAge: (0, jxt_1.integerAttribute)('max-age'),\n        mediaType: (0, jxt_1.attribute)('type')\n    },\n    namespace: Namespaces_1.NS_BOB\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0234: Jingle File Transfer\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0234.html\n// Version: Version 0.18.3 (2017-08-24)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nlet Protocol = [\n    (0, jxt_1.addAlias)(Namespaces_1.NS_HASHES_2, 'hash', [\n        { path: 'file.hashes', multiple: true },\n        { path: 'file.range.hashes', multiple: true }\n    ]),\n    (0, jxt_1.addAlias)(Namespaces_1.NS_HASHES_1, 'hash', [\n        { path: 'file.hashes', multiple: true },\n        { path: 'file.range.hashes', multiple: true }\n    ]),\n    (0, jxt_1.addAlias)(Namespaces_1.NS_HASHES_2, 'hash-used', [{ path: 'file.hashesUsed', multiple: true }]),\n    (0, jxt_1.addAlias)(Namespaces_1.NS_THUMBS_1, 'thumbnail', [{ path: 'file.thumbnails', multiple: true }])\n];\nfor (const ftVersion of [Namespaces_1.NS_JINGLE_FILE_TRANSFER_4, Namespaces_1.NS_JINGLE_FILE_TRANSFER_5]) {\n    Protocol = Protocol.concat([\n        {\n            aliases: [\n                'file',\n                {\n                    impliedType: true,\n                    path: 'iq.jingle.contents.application.file',\n                    selector: ftVersion\n                },\n                {\n                    impliedType: true,\n                    path: 'iq.jingle.info.file',\n                    selector: `{${ftVersion}}checksum`\n                }\n            ],\n            defaultType: Namespaces_1.NS_JINGLE_FILE_TRANSFER_5,\n            element: 'file',\n            fields: {\n                date: (0, jxt_1.childDate)(null, 'date'),\n                description: (0, jxt_1.childText)(null, 'desc'),\n                mediaType: (0, jxt_1.childText)(null, 'media-type'),\n                name: (0, jxt_1.childText)(null, 'name'),\n                size: (0, jxt_1.childInteger)(null, 'size')\n            },\n            namespace: ftVersion,\n            type: ftVersion,\n            typeField: 'version'\n        },\n        {\n            aliases: [{ impliedType: true, path: 'file.range', selector: ftVersion }],\n            defaultType: Namespaces_1.NS_JINGLE_FILE_TRANSFER_5,\n            element: 'range',\n            fields: {\n                length: (0, jxt_1.integerAttribute)('length'),\n                offset: (0, jxt_1.integerAttribute)('offset', 0)\n            },\n            namespace: ftVersion,\n            type: ftVersion,\n            typeField: 'version'\n        },\n        {\n            element: 'description',\n            namespace: ftVersion,\n            path: 'iq.jingle.contents.application',\n            type: ftVersion,\n            typeField: 'applicationType'\n        },\n        {\n            element: 'received',\n            fields: {\n                creator: (0, jxt_1.attribute)('creator'),\n                name: (0, jxt_1.attribute)('name')\n            },\n            namespace: ftVersion,\n            path: 'iq.jingle.info',\n            type: `{${ftVersion}}received`,\n            typeField: 'infoType'\n        },\n        {\n            element: 'checksum',\n            fields: {\n                creator: (0, jxt_1.attribute)('creator'),\n                name: (0, jxt_1.attribute)('name')\n            },\n            namespace: ftVersion,\n            path: 'iq.jingle.info',\n            type: `{${ftVersion}}checksum`,\n            typeField: 'infoType'\n        }\n    ]);\n}\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0247: Jingle XML Streams\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0247.html\n// Version: 0.2 (2009-02-20)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    element: 'description',\n    namespace: Namespaces_1.NS_JINGLE_XML_0,\n    path: 'iq.jingle.contents.application',\n    type: Namespaces_1.NS_JINGLE_XML_0,\n    typeField: 'applicationType'\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0260: Jingle SOCKS5 Bytestreams Transport Method\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0260.html\n// Version: 1.0.1 (2016-05-17)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        element: 'transport',\n        fields: {\n            activated: (0, jxt_1.childAttribute)(null, 'activated', 'cid'),\n            address: (0, jxt_1.attribute)('dstaddr'),\n            candidateError: (0, jxt_1.childBoolean)(null, 'candidate-error'),\n            candidateUsed: (0, jxt_1.childAttribute)(null, 'candidate-used', 'cid'),\n            mode: (0, jxt_1.attribute)('mode', 'tcp'),\n            proxyError: (0, jxt_1.childBoolean)(null, 'proxy-error'),\n            sid: (0, jxt_1.attribute)('sid')\n        },\n        namespace: Namespaces_1.NS_JINGLE_SOCKS5_1,\n        path: 'iq.jingle.contents.transport',\n        type: Namespaces_1.NS_JINGLE_SOCKS5_1,\n        typeField: 'transportType'\n    },\n    {\n        aliases: [\n            {\n                multiple: true,\n                path: 'iq.jingle.contents.transport.candidates',\n                selector: Namespaces_1.NS_JINGLE_SOCKS5_1\n            }\n        ],\n        element: 'candidate',\n        fields: {\n            cid: (0, jxt_1.attribute)('cid'),\n            host: (0, jxt_1.attribute)('host'),\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            port: (0, jxt_1.integerAttribute)('port'),\n            priority: (0, jxt_1.integerAttribute)('priority'),\n            type: (0, jxt_1.attribute)('type'),\n            uri: (0, jxt_1.attribute)('uri')\n        },\n        namespace: Namespaces_1.NS_JINGLE_SOCKS5_1\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0261: Jingle In-Band Bytestreams Transport Method\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0047.html\n// Version: 1.0 (2011-09-23)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    element: 'transport',\n    fields: {\n        ack: {\n            importer(xml, context) {\n                const stanza = (0, jxt_1.attribute)('stanza', 'iq').importer(xml, context);\n                return stanza !== 'message';\n            },\n            exporter(xml, data, context) {\n                if (data === false) {\n                    (0, jxt_1.attribute)('stanza').exporter(xml, 'message', context);\n                }\n            }\n        },\n        blockSize: (0, jxt_1.integerAttribute)('block-size'),\n        sid: (0, jxt_1.attribute)('sid')\n    },\n    namespace: Namespaces_1.NS_JINGLE_IBB_1,\n    path: 'iq.jingle.contents.transport',\n    type: Namespaces_1.NS_JINGLE_IBB_1,\n    typeField: 'transportType'\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0224: Attention\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0224.html\n// Version: Version 1.0 (2008-11-13)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.addAlias)(Namespaces_1.NS_BOB, 'data', [{ path: 'iq.jingle.bits', multiple: true }]),\n    {\n        element: 'thumbnail',\n        fields: {\n            height: (0, jxt_1.integerAttribute)('height'),\n            mediaType: (0, jxt_1.attribute)('media-type'),\n            uri: (0, jxt_1.attribute)('uri'),\n            width: (0, jxt_1.integerAttribute)('width')\n        },\n        namespace: Namespaces_1.NS_THUMBS_1,\n        path: 'thumbnail'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0280: Message Carbons\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0280.html\n// Version: 0.12.0 (2017-02-16)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.addAlias)(Namespaces_1.NS_FORWARD_0, 'forwarded', ['message.carbon.forward']),\n    {\n        element: 'enable',\n        namespace: Namespaces_1.NS_CARBONS_2,\n        path: 'iq.carbons',\n        type: 'enable',\n        typeField: 'action'\n    },\n    {\n        element: 'disable',\n        namespace: Namespaces_1.NS_CARBONS_2,\n        path: 'iq.carbons',\n        type: 'disable',\n        typeField: 'action'\n    },\n    {\n        element: 'sent',\n        namespace: Namespaces_1.NS_CARBONS_2,\n        path: 'message.carbon',\n        type: 'sent',\n        typeField: 'type'\n    },\n    {\n        element: 'received',\n        namespace: Namespaces_1.NS_CARBONS_2,\n        path: 'message.carbon',\n        type: 'received',\n        typeField: 'type'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0297: Stanza Forwarding\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0297.html\n// Version: 1.0 (2013-10-02)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Constants_1 = require(\"../Constants\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    ...Object.values(Constants_1.StreamType).map(streamNS => (0, jxt_1.addAlias)(streamNS, 'message', ['forward.message'])),\n    ...Object.values(Constants_1.StreamType).map(streamNS => (0, jxt_1.addAlias)(streamNS, 'presence', ['forward.presence'])),\n    ...Object.values(Constants_1.StreamType).map(streamNS => (0, jxt_1.addAlias)(streamNS, 'iq', ['forward.iq'])),\n    (0, jxt_1.addAlias)(Namespaces_1.NS_DELAY, 'delay', ['forward.delay']),\n    {\n        aliases: ['message.forward'],\n        element: 'forwarded',\n        namespace: Namespaces_1.NS_FORWARD_0,\n        path: 'forward'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0300: Use of Cryptographic Hash Functions in XMPP\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0300.html\n// Version: 0.5.3 (2018-02-14)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        defaultType: '2',\n        element: 'hash',\n        fields: {\n            algorithm: (0, jxt_1.attribute)('algo'),\n            value: (0, jxt_1.textBuffer)('base64'),\n            version: (0, jxt_1.staticValue)('2')\n        },\n        namespace: Namespaces_1.NS_HASHES_2,\n        path: 'hash',\n        type: '2',\n        typeField: 'version'\n    },\n    {\n        element: 'hash-used',\n        fields: {\n            algorithm: (0, jxt_1.attribute)('algo'),\n            version: (0, jxt_1.staticValue)('2')\n        },\n        namespace: Namespaces_1.NS_HASHES_2,\n        path: 'hashUsed'\n    },\n    {\n        element: 'hash',\n        fields: {\n            algorithm: (0, jxt_1.attribute)('algo'),\n            value: (0, jxt_1.textBuffer)('hex'),\n            version: (0, jxt_1.staticValue)('1')\n        },\n        namespace: Namespaces_1.NS_HASHES_1,\n        path: 'hash',\n        type: '1',\n        typeField: 'version'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0301: In-Band Real Time Text\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0301.html\n// Version: 1.0 (2013-10-082)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        element: 'rtt',\n        fields: {\n            event: (0, jxt_1.attribute)('event', 'edit'),\n            id: (0, jxt_1.attribute)('id'),\n            seq: (0, jxt_1.integerAttribute)('seq')\n        },\n        namespace: Namespaces_1.NS_RTT_0,\n        path: 'message.rtt'\n    },\n    {\n        aliases: [{ path: 'message.rtt.actions', multiple: true }],\n        element: 't',\n        fields: {\n            position: (0, jxt_1.integerAttribute)('p'),\n            text: (0, jxt_1.text)()\n        },\n        namespace: Namespaces_1.NS_RTT_0,\n        type: 'insert',\n        typeField: 'type'\n    },\n    {\n        aliases: [{ path: 'message.rtt.actions', multiple: true }],\n        element: 'e',\n        fields: {\n            length: (0, jxt_1.integerAttribute)('n', 1),\n            position: (0, jxt_1.integerAttribute)('p')\n        },\n        namespace: Namespaces_1.NS_RTT_0,\n        type: 'erase',\n        typeField: 'type'\n    },\n    {\n        aliases: [{ multiple: true, path: 'message.rtt.actions' }],\n        element: 'w',\n        fields: {\n            duration: (0, jxt_1.integerAttribute)('n', 0)\n        },\n        namespace: Namespaces_1.NS_RTT_0,\n        type: 'wait',\n        typeField: 'type'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0308: Last Message Correction\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0308.html\n// Version: 1.0 (2013-04-08)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nexports.default = (0, jxt_1.extendMessage)({\n    replace: (0, jxt_1.childAttribute)(Namespaces_1.NS_CORRECTION_0, 'replace', 'id')\n});\n","\"use strict\";\n// ====================================================================\n// XEP-0313: Message Archive Management\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0313.html\n// Version: 0.6.1 (2017-02-22)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst versions = {\n    '2': Namespaces_1.NS_MAM_2,\n    '1': Namespaces_1.NS_MAM_1\n};\nconst Protocol = [\n    (0, jxt_1.addAlias)(Namespaces_1.NS_DATAFORM, 'x', ['iq.archive.form']),\n    (0, jxt_1.addAlias)(Namespaces_1.NS_FORWARD_0, 'forwarded', ['message.archive.item']),\n    (0, jxt_1.addAlias)(Namespaces_1.NS_RSM, 'set', ['iq.archive.paging'])\n];\nfor (const [version, namespace] of Object.entries(versions)) {\n    Protocol.push({\n        defaultType: 'query',\n        defaultVersion: '2',\n        element: 'query',\n        fields: {\n            node: (0, jxt_1.attribute)('node'),\n            queryId: (0, jxt_1.attribute)('queryid')\n        },\n        namespace,\n        path: 'iq.archive',\n        type: 'query',\n        typeField: 'type',\n        version,\n        versionField: 'version'\n    }, {\n        element: 'fin',\n        fields: {\n            complete: (0, jxt_1.booleanAttribute)('complete'),\n            stable: (0, jxt_1.booleanAttribute)('stable')\n        },\n        namespace,\n        path: 'iq.archive',\n        type: 'result',\n        version\n    }, {\n        element: 'prefs',\n        fields: {\n            default: (0, jxt_1.attribute)('default'),\n            always: (0, jxt_1.deepMultipleChildText)([\n                { namespace: null, element: 'always' },\n                { namespace: null, element: 'jid' }\n            ]),\n            never: (0, jxt_1.deepMultipleChildText)([\n                { namespace: null, element: 'never' },\n                { namespace: null, element: 'jid' }\n            ])\n        },\n        namespace,\n        path: 'iq.archive',\n        type: 'preferences',\n        version\n    }, {\n        element: 'result',\n        defaultType: '2',\n        fields: {\n            id: (0, jxt_1.attribute)('id'),\n            queryId: (0, jxt_1.attribute)('queryid')\n        },\n        namespace,\n        path: 'message.archive',\n        type: version,\n        typeField: 'version'\n    });\n}\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0317: Hats\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0317.html\n// Version: 0.1 (2013-01-03)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.extendPresence)({\n        hats: (0, jxt_1.splicePath)(Namespaces_1.NS_HATS_0, 'hats', 'hat', true)\n    }),\n    {\n        element: 'hat',\n        fields: {\n            id: (0, jxt_1.attribute)('name'),\n            name: (0, jxt_1.attribute)('displayName')\n        },\n        namespace: Namespaces_1.NS_HATS_0,\n        path: 'hat'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0319: Last User Interaction in Presence\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0313.html\n// Version: 1.0.2 (2017-07-17)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nexports.default = (0, jxt_1.extendPresence)({\n    idleSince: (0, jxt_1.childDate)(Namespaces_1.NS_IDLE_1, 'since')\n});\n","\"use strict\";\n// ====================================================================\n// XEP-0320: Use of DTLS-SRTP in Jingle Sessions\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0320.html\n// Version: 0.3.1 (2015-10-15)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    aliases: [\n        {\n            multiple: true,\n            path: 'iq.jingle.contents.transport.fingerprints',\n            selector: Namespaces_1.NS_JINGLE_ICE_UDP_1\n        },\n        {\n            multiple: true,\n            path: 'iq.jingle.contents.transport.fingerprints',\n            selector: Namespaces_1.NS_JINGLE_ICE_0\n        },\n        {\n            multiple: true,\n            path: 'iq.jingle.contents.application.encryption.dtls',\n            selector: Namespaces_1.NS_JINGLE_RTP_1\n        }\n    ],\n    element: 'fingerprint',\n    fields: {\n        algorithm: (0, jxt_1.attribute)('hash'),\n        setup: (0, jxt_1.attribute)('setup'),\n        value: (0, jxt_1.text)()\n    },\n    namespace: Namespaces_1.NS_JINGLE_DTLS_0\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0333: Chat Markers\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0333.html\n// Version: 0.3.0 (2017-09-11)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst path = 'message.marker';\nconst Protocol = [\n    {\n        element: 'markable',\n        namespace: Namespaces_1.NS_CHAT_MARKERS_0,\n        path,\n        type: 'markable',\n        typeField: 'type'\n    },\n    {\n        element: 'received',\n        fields: {\n            id: (0, jxt_1.attribute)('id')\n        },\n        namespace: Namespaces_1.NS_CHAT_MARKERS_0,\n        path,\n        type: 'received'\n    },\n    {\n        element: 'displayed',\n        fields: {\n            id: (0, jxt_1.attribute)('id')\n        },\n        namespace: Namespaces_1.NS_CHAT_MARKERS_0,\n        path,\n        type: 'displayed'\n    },\n    {\n        element: 'acknowledged',\n        fields: {\n            id: (0, jxt_1.attribute)('id')\n        },\n        namespace: Namespaces_1.NS_CHAT_MARKERS_0,\n        path,\n        type: 'acknowledged'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0334: Message Processing Hints\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0334.html\n// Version: 0.3.0 (2018-01-25)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nfunction processingHints() {\n    return {\n        importer(xml) {\n            const results = {};\n            let found = false;\n            for (const child of xml.children) {\n                /* istanbul ignore next */\n                if (typeof child === 'string') {\n                    continue;\n                }\n                if (child.getNamespace() !== Namespaces_1.NS_HINTS) {\n                    continue;\n                }\n                switch (child.getName()) {\n                    case 'no-copy':\n                        results.noCopy = true;\n                        found = true;\n                        break;\n                    case 'no-permanent-store':\n                        results.noPermanentStore = true;\n                        found = true;\n                        break;\n                    case 'no-store':\n                        results.noStore = true;\n                        found = true;\n                        break;\n                    case 'store':\n                        results.store = true;\n                        found = true;\n                        break;\n                }\n            }\n            return found ? results : undefined;\n        },\n        exporter(xml, value, context) {\n            if (value.noCopy) {\n                xml.appendChild((0, jxt_1.createElement)(Namespaces_1.NS_HINTS, 'no-copy', context.namespace, xml));\n            }\n            if (value.noPermanentStore) {\n                xml.appendChild((0, jxt_1.createElement)(Namespaces_1.NS_HINTS, 'no-permanent-store', context.namespace, xml));\n            }\n            if (value.noStore) {\n                xml.appendChild((0, jxt_1.createElement)(Namespaces_1.NS_HINTS, 'no-store', context.namespace, xml));\n            }\n            if (value.store) {\n                xml.appendChild((0, jxt_1.createElement)(Namespaces_1.NS_HINTS, 'store', context.namespace, xml));\n            }\n        }\n    };\n}\nexports.default = (0, jxt_1.extendMessage)({\n    processingHints: processingHints()\n});\n","\"use strict\";\n// ====================================================================\n// XEP-0335: JSON Containers\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0335.html\n// Version: 0.1 (2013-10-25)\n//\n// --------------------------------------------------------------------\n// XEP-0432: Simple JSON Messaging\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0432.html\n// Version: 0.1.0 (2020-02-25)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.extendMessage)({\n        json: (0, jxt_1.childJSON)(Namespaces_1.NS_JSON_0, 'json')\n    }),\n    {\n        aliases: (0, jxt_1.pubsubItemContentAliases)(),\n        element: 'json',\n        fields: {\n            json: (0, jxt_1.textJSON)()\n        },\n        namespace: Namespaces_1.NS_JSON_0,\n        type: Namespaces_1.NS_JSON_0\n    },\n    {\n        aliases: [{ path: 'message.jsonPayloads', multiple: true }],\n        element: 'payload',\n        fields: {\n            type: (0, jxt_1.attribute)('datatype'),\n            data: (0, jxt_1.childJSON)(Namespaces_1.NS_JSON_0, 'json')\n        },\n        namespace: Namespaces_1.NS_JSON_MESSAGE_0\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0338: Jingle Grouping Framework\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0338.html\n// Version: 0.2 (2017-09-11)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        aliases: [{ path: 'iq.jingle.groups', multiple: true }],\n        element: 'group',\n        fields: {\n            contents: (0, jxt_1.multipleChildAttribute)(null, 'content', 'name'),\n            semantics: (0, jxt_1.attribute)('semantics')\n        },\n        namespace: Namespaces_1.NS_JINGLE_GROUPING_0\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0343: Signaling WebRTC datachannels in Jingle\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0343.html\n// Version: 0.3 (2017-09-11)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    aliases: [\n        {\n            path: 'iq.jingle.contents.transport.sctp',\n            selector: Namespaces_1.NS_JINGLE_ICE_UDP_1\n        },\n        {\n            path: 'iq.jingle.contents.transport.sctp',\n            selector: Namespaces_1.NS_JINGLE_ICE_0\n        }\n    ],\n    element: 'sctpmap',\n    fields: {\n        port: (0, jxt_1.integerAttribute)('number'),\n        protocol: (0, jxt_1.attribute)('protocol'),\n        streams: (0, jxt_1.attribute)('streams')\n    },\n    namespace: Namespaces_1.NS_JINGLE_DTLS_SCTP_1\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0352: Client State Indication\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0352.html\n// Version: 0.2.1 (2017-02-18)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        element: 'active',\n        namespace: Namespaces_1.NS_CSI_0,\n        path: 'csi',\n        type: 'active',\n        typeField: 'state'\n    },\n    {\n        element: 'inactive',\n        namespace: Namespaces_1.NS_CSI_0,\n        path: 'csi',\n        type: 'inactive',\n        typeField: 'state'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0357: Push Notifications\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0357.html\n// Version: 0.3 (2017-08-24)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.addAlias)(Namespaces_1.NS_DATAFORM, 'x', ['iq.push.form', 'pushNotification.form']),\n    {\n        element: 'enable',\n        fields: {\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            node: (0, jxt_1.attribute)('node')\n        },\n        namespace: Namespaces_1.NS_PUSH_0,\n        path: 'iq.push',\n        type: 'enable',\n        typeField: 'action'\n    },\n    {\n        element: 'disable',\n        fields: {\n            jid: (0, jxt_1.JIDAttribute)('jid'),\n            node: (0, jxt_1.attribute)('node')\n        },\n        namespace: Namespaces_1.NS_PUSH_0,\n        path: 'iq.push',\n        type: 'disable',\n        typeField: 'action'\n    },\n    {\n        aliases: (0, jxt_1.pubsubItemContentAliases)(),\n        element: 'notification',\n        namespace: Namespaces_1.NS_PUSH_0,\n        path: 'pushNotification',\n        type: Namespaces_1.NS_PUSH_0,\n        typeField: 'itemType'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0359: Unique and Stable Stanza IDs\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0359.html\n// Version: 0.5.0 (2017-08-23)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.extendMessage)({\n        originId: (0, jxt_1.childAttribute)(Namespaces_1.NS_SID_0, 'origin-id', 'id')\n    }),\n    {\n        aliases: [{ path: 'message.stanzaIds', multiple: true }],\n        element: 'stanza-id',\n        fields: {\n            by: (0, jxt_1.JIDAttribute)('by'),\n            id: (0, jxt_1.attribute)('id')\n        },\n        namespace: Namespaces_1.NS_SID_0\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0363: HTTP File Upload\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0363.html\n// Version: 0.5.0 (2018-02-15)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    (0, jxt_1.extendStanzaError)({\n        httpUploadError: (0, jxt_1.childEnum)(Namespaces_1.NS_HTTP_UPLOAD_0, ['file-too-large', 'retry']),\n        httpUploadMaxFileSize: (0, jxt_1.deepChildInteger)([\n            { namespace: Namespaces_1.NS_HTTP_UPLOAD_0, element: 'file-too-large' },\n            { namespace: Namespaces_1.NS_HTTP_UPLOAD_0, element: 'max-file-size' }\n        ]),\n        httpUploadRetry: (0, jxt_1.childDateAttribute)(Namespaces_1.NS_HTTP_UPLOAD_0, 'retry', 'stamp')\n    }),\n    {\n        element: 'request',\n        fields: {\n            mediaType: (0, jxt_1.attribute)('content-type'),\n            name: (0, jxt_1.attribute)('filename'),\n            size: (0, jxt_1.integerAttribute)('size')\n        },\n        namespace: Namespaces_1.NS_HTTP_UPLOAD_0,\n        path: 'iq.httpUpload',\n        type: 'request',\n        typeField: 'type'\n    },\n    {\n        element: 'slot',\n        fields: {\n            download: (0, jxt_1.childAttribute)(null, 'get', 'url')\n        },\n        namespace: Namespaces_1.NS_HTTP_UPLOAD_0,\n        path: 'iq.httpUpload',\n        type: 'slot'\n    },\n    {\n        aliases: [{ path: 'iq.httpUpload.upload', selector: 'slot' }],\n        element: 'put',\n        fields: {\n            url: (0, jxt_1.attribute)('url')\n        },\n        namespace: Namespaces_1.NS_HTTP_UPLOAD_0\n    },\n    {\n        aliases: [{ path: 'iq.httpUpload.upload.headers', multiple: true }],\n        element: 'header',\n        fields: {\n            name: (0, jxt_1.attribute)('name'),\n            value: (0, jxt_1.text)()\n        },\n        namespace: Namespaces_1.NS_HTTP_UPLOAD_0\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0380: Explicit Message Encryption\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0380.html\n// Version: 0.2.0 (2018-01-25)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = {\n    element: 'encryption',\n    fields: {\n        id: (0, jxt_1.attribute)('namespace'),\n        name: (0, jxt_1.attribute)('name')\n    },\n    namespace: Namespaces_1.NS_EME_0,\n    path: 'message.encryptionMethod'\n};\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// XEP-0384: OMEMO Encryption\n// --------------------------------------------------------------------\n// Source: https://xmpp.org/extensions/xep-0384.html\n// Version: 0.3.0 (2018-07-31)\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        aliases: ['message.omemo'],\n        element: 'encrypted',\n        fields: {\n            payload: (0, jxt_1.childTextBuffer)(null, 'payload', 'base64')\n        },\n        namespace: Namespaces_1.NS_OMEMO_AXOLOTL,\n        path: 'omemo'\n    },\n    {\n        element: 'header',\n        fields: {\n            iv: (0, jxt_1.childTextBuffer)(null, 'iv', 'base64'),\n            sid: (0, jxt_1.integerAttribute)('sid')\n        },\n        namespace: Namespaces_1.NS_OMEMO_AXOLOTL,\n        path: 'omemo.header'\n    },\n    {\n        aliases: [{ path: 'omemo.header.keys', multiple: true }],\n        element: 'key',\n        fields: {\n            preKey: (0, jxt_1.booleanAttribute)('prekey'),\n            rid: (0, jxt_1.integerAttribute)('rid'),\n            value: (0, jxt_1.textBuffer)('base64')\n        },\n        namespace: Namespaces_1.NS_OMEMO_AXOLOTL\n    },\n    {\n        aliases: (0, jxt_1.pubsubItemContentAliases)(),\n        element: 'list',\n        fields: {\n            devices: (0, jxt_1.multipleChildIntegerAttribute)(null, 'device', 'id')\n        },\n        namespace: Namespaces_1.NS_OMEMO_AXOLOTL,\n        type: Namespaces_1.NS_OMEMO_AXOLOTL_DEVICELIST,\n        typeField: 'itemType'\n    },\n    {\n        element: 'preKeyPublic',\n        fields: {\n            id: (0, jxt_1.integerAttribute)('preKeyId'),\n            value: (0, jxt_1.textBuffer)('base64')\n        },\n        namespace: Namespaces_1.NS_OMEMO_AXOLOTL,\n        path: 'omemoPreKey'\n    },\n    {\n        element: 'signedPreKeyPublic',\n        fields: {\n            id: (0, jxt_1.integerAttribute)('signedPreKeyId'),\n            value: (0, jxt_1.textBuffer)('base64')\n        },\n        namespace: Namespaces_1.NS_OMEMO_AXOLOTL,\n        path: 'omemoDevice.signedPreKeyPublic'\n    },\n    {\n        aliases: (0, jxt_1.pubsubItemContentAliases)(),\n        element: 'bundle',\n        fields: {\n            identityKey: (0, jxt_1.childTextBuffer)(null, 'identityKey', 'base64'),\n            preKeys: (0, jxt_1.splicePath)(null, 'prekeys', 'omemoPreKey', true),\n            signedPreKeySignature: (0, jxt_1.childTextBuffer)(null, 'signedPreKeySignature', 'base64')\n        },\n        namespace: Namespaces_1.NS_OMEMO_AXOLOTL,\n        path: 'omemoDevice',\n        type: Namespaces_1.NS_OMEMO_AXOLOTL_BUNDLES,\n        typeField: 'itemType'\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\n// ====================================================================\n// Extensible Resource Descriptor (XRD)\n// --------------------------------------------------------------------\n// Source: http://docs.oasis-open.org/xri/xrd/v1.0/xrd-1.0.html\n// Version: 1.0\n// ====================================================================\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jxt_1 = require(\"../jxt\");\nconst Namespaces_1 = require(\"../Namespaces\");\nconst Protocol = [\n    {\n        element: 'XRD',\n        fields: {\n            subject: (0, jxt_1.childText)(null, 'Subject')\n        },\n        namespace: Namespaces_1.NS_XRD,\n        path: 'xrd'\n    },\n    {\n        aliases: [{ path: 'xrd.links', multiple: true }],\n        element: 'Link',\n        fields: {\n            href: (0, jxt_1.attribute)('href'),\n            rel: (0, jxt_1.attribute)('rel'),\n            type: (0, jxt_1.attribute)('type')\n        },\n        namespace: Namespaces_1.NS_XRD\n    }\n];\nexports.default = Protocol;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\n// ====================================================================\n(0, tslib_1.__exportStar)(require(\"./rfc3921\"), exports);\n(0, tslib_1.__exportStar)(require(\"./rfc4287\"), exports);\n(0, tslib_1.__exportStar)(require(\"./rfc6120\"), exports);\n(0, tslib_1.__exportStar)(require(\"./rfc6121\"), exports);\n(0, tslib_1.__exportStar)(require(\"./rfc7395\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0004\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0012\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0016\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0030\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0033\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0045\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0047\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0048\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0049\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0050\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0054\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0055\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0059\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0060\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0065\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0066\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0071\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0077\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0080\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0084\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0085\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0092\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0107\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0108\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0114\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0115\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0118\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0141\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0124\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0131\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0138\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0144\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0153\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0158\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0166\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0167\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0172\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0176\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0177\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0184\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0186\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0191\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0198\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0199\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0202\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0203\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0215\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0221\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0224\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0231\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0234\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0247\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0260\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0261\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0264\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0280\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0297\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0300\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0301\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0308\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0313\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0317\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0319\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0320\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0333\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0334\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0335\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0338\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0343\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0352\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0357\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0359\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0363\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0380\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xep0384\"), exports);\n(0, tslib_1.__exportStar)(require(\"./xrd\"), exports);\nconst rfc3921_1 = (0, tslib_1.__importDefault)(require(\"./rfc3921\"));\nconst rfc4287_1 = (0, tslib_1.__importDefault)(require(\"./rfc4287\"));\nconst rfc6120_1 = (0, tslib_1.__importDefault)(require(\"./rfc6120\"));\nconst rfc6121_1 = (0, tslib_1.__importDefault)(require(\"./rfc6121\"));\nconst rfc7395_1 = (0, tslib_1.__importDefault)(require(\"./rfc7395\"));\nconst xep0004_1 = (0, tslib_1.__importDefault)(require(\"./xep0004\"));\nconst xep0012_1 = (0, tslib_1.__importDefault)(require(\"./xep0012\"));\nconst xep0016_1 = (0, tslib_1.__importDefault)(require(\"./xep0016\"));\nconst xep0030_1 = (0, tslib_1.__importDefault)(require(\"./xep0030\"));\nconst xep0033_1 = (0, tslib_1.__importDefault)(require(\"./xep0033\"));\nconst xep0045_1 = (0, tslib_1.__importDefault)(require(\"./xep0045\"));\nconst xep0047_1 = (0, tslib_1.__importDefault)(require(\"./xep0047\"));\nconst xep0048_1 = (0, tslib_1.__importDefault)(require(\"./xep0048\"));\nconst xep0049_1 = (0, tslib_1.__importDefault)(require(\"./xep0049\"));\nconst xep0050_1 = (0, tslib_1.__importDefault)(require(\"./xep0050\"));\nconst xep0054_1 = (0, tslib_1.__importDefault)(require(\"./xep0054\"));\nconst xep0055_1 = (0, tslib_1.__importDefault)(require(\"./xep0055\"));\nconst xep0059_1 = (0, tslib_1.__importDefault)(require(\"./xep0059\"));\nconst xep0060_1 = (0, tslib_1.__importDefault)(require(\"./xep0060\"));\nconst xep0065_1 = (0, tslib_1.__importDefault)(require(\"./xep0065\"));\nconst xep0066_1 = (0, tslib_1.__importDefault)(require(\"./xep0066\"));\nconst xep0071_1 = (0, tslib_1.__importDefault)(require(\"./xep0071\"));\nconst xep0077_1 = (0, tslib_1.__importDefault)(require(\"./xep0077\"));\nconst xep0080_1 = (0, tslib_1.__importDefault)(require(\"./xep0080\"));\nconst xep0084_1 = (0, tslib_1.__importDefault)(require(\"./xep0084\"));\nconst xep0085_1 = (0, tslib_1.__importDefault)(require(\"./xep0085\"));\nconst xep0092_1 = (0, tslib_1.__importDefault)(require(\"./xep0092\"));\nconst xep0107_1 = (0, tslib_1.__importDefault)(require(\"./xep0107\"));\nconst xep0108_1 = (0, tslib_1.__importDefault)(require(\"./xep0108\"));\nconst xep0114_1 = (0, tslib_1.__importDefault)(require(\"./xep0114\"));\nconst xep0115_1 = (0, tslib_1.__importDefault)(require(\"./xep0115\"));\nconst xep0118_1 = (0, tslib_1.__importDefault)(require(\"./xep0118\"));\nconst xep0124_1 = (0, tslib_1.__importDefault)(require(\"./xep0124\"));\nconst xep0131_1 = (0, tslib_1.__importDefault)(require(\"./xep0131\"));\nconst xep0138_1 = (0, tslib_1.__importDefault)(require(\"./xep0138\"));\nconst xep0141_1 = (0, tslib_1.__importDefault)(require(\"./xep0141\"));\nconst xep0144_1 = (0, tslib_1.__importDefault)(require(\"./xep0144\"));\nconst xep0153_1 = (0, tslib_1.__importDefault)(require(\"./xep0153\"));\nconst xep0158_1 = (0, tslib_1.__importDefault)(require(\"./xep0158\"));\nconst xep0166_1 = (0, tslib_1.__importDefault)(require(\"./xep0166\"));\nconst xep0167_1 = (0, tslib_1.__importDefault)(require(\"./xep0167\"));\nconst xep0172_1 = (0, tslib_1.__importDefault)(require(\"./xep0172\"));\nconst xep0176_1 = (0, tslib_1.__importDefault)(require(\"./xep0176\"));\nconst xep0177_1 = (0, tslib_1.__importDefault)(require(\"./xep0177\"));\nconst xep0184_1 = (0, tslib_1.__importDefault)(require(\"./xep0184\"));\nconst xep0186_1 = (0, tslib_1.__importDefault)(require(\"./xep0186\"));\nconst xep0191_1 = (0, tslib_1.__importDefault)(require(\"./xep0191\"));\nconst xep0198_1 = (0, tslib_1.__importDefault)(require(\"./xep0198\"));\nconst xep0199_1 = (0, tslib_1.__importDefault)(require(\"./xep0199\"));\nconst xep0202_1 = (0, tslib_1.__importDefault)(require(\"./xep0202\"));\nconst xep0203_1 = (0, tslib_1.__importDefault)(require(\"./xep0203\"));\nconst xep0215_1 = (0, tslib_1.__importDefault)(require(\"./xep0215\"));\nconst xep0221_1 = (0, tslib_1.__importDefault)(require(\"./xep0221\"));\nconst xep0224_1 = (0, tslib_1.__importDefault)(require(\"./xep0224\"));\nconst xep0231_1 = (0, tslib_1.__importDefault)(require(\"./xep0231\"));\nconst xep0234_1 = (0, tslib_1.__importDefault)(require(\"./xep0234\"));\nconst xep0247_1 = (0, tslib_1.__importDefault)(require(\"./xep0247\"));\nconst xep0260_1 = (0, tslib_1.__importDefault)(require(\"./xep0260\"));\nconst xep0261_1 = (0, tslib_1.__importDefault)(require(\"./xep0261\"));\nconst xep0264_1 = (0, tslib_1.__importDefault)(require(\"./xep0264\"));\nconst xep0280_1 = (0, tslib_1.__importDefault)(require(\"./xep0280\"));\nconst xep0297_1 = (0, tslib_1.__importDefault)(require(\"./xep0297\"));\nconst xep0300_1 = (0, tslib_1.__importDefault)(require(\"./xep0300\"));\nconst xep0301_1 = (0, tslib_1.__importDefault)(require(\"./xep0301\"));\nconst xep0308_1 = (0, tslib_1.__importDefault)(require(\"./xep0308\"));\nconst xep0313_1 = (0, tslib_1.__importDefault)(require(\"./xep0313\"));\nconst xep0317_1 = (0, tslib_1.__importDefault)(require(\"./xep0317\"));\nconst xep0319_1 = (0, tslib_1.__importDefault)(require(\"./xep0319\"));\nconst xep0320_1 = (0, tslib_1.__importDefault)(require(\"./xep0320\"));\nconst xep0333_1 = (0, tslib_1.__importDefault)(require(\"./xep0333\"));\nconst xep0334_1 = (0, tslib_1.__importDefault)(require(\"./xep0334\"));\nconst xep0335_1 = (0, tslib_1.__importDefault)(require(\"./xep0335\"));\nconst xep0338_1 = (0, tslib_1.__importDefault)(require(\"./xep0338\"));\nconst xep0343_1 = (0, tslib_1.__importDefault)(require(\"./xep0343\"));\nconst xep0352_1 = (0, tslib_1.__importDefault)(require(\"./xep0352\"));\nconst xep0357_1 = (0, tslib_1.__importDefault)(require(\"./xep0357\"));\nconst xep0359_1 = (0, tslib_1.__importDefault)(require(\"./xep0359\"));\nconst xep0363_1 = (0, tslib_1.__importDefault)(require(\"./xep0363\"));\nconst xep0380_1 = (0, tslib_1.__importDefault)(require(\"./xep0380\"));\nconst xep0384_1 = (0, tslib_1.__importDefault)(require(\"./xep0384\"));\nconst xrd_1 = (0, tslib_1.__importDefault)(require(\"./xrd\"));\nconst Protocol = [\n    rfc3921_1.default,\n    rfc4287_1.default,\n    rfc6120_1.default,\n    rfc6121_1.default,\n    rfc7395_1.default,\n    xep0004_1.default,\n    xep0012_1.default,\n    xep0016_1.default,\n    xep0030_1.default,\n    xep0033_1.default,\n    xep0045_1.default,\n    xep0047_1.default,\n    xep0048_1.default,\n    xep0049_1.default,\n    xep0050_1.default,\n    xep0054_1.default,\n    xep0055_1.default,\n    xep0059_1.default,\n    xep0060_1.default,\n    xep0065_1.default,\n    xep0066_1.default,\n    xep0071_1.default,\n    xep0077_1.default,\n    xep0080_1.default,\n    xep0084_1.default,\n    xep0085_1.default,\n    xep0092_1.default,\n    xep0107_1.default,\n    xep0108_1.default,\n    xep0114_1.default,\n    xep0115_1.default,\n    xep0118_1.default,\n    xep0124_1.default,\n    xep0131_1.default,\n    xep0138_1.default,\n    xep0141_1.default,\n    xep0144_1.default,\n    xep0153_1.default,\n    xep0158_1.default,\n    xep0166_1.default,\n    xep0167_1.default,\n    xep0172_1.default,\n    xep0176_1.default,\n    xep0177_1.default,\n    xep0184_1.default,\n    xep0186_1.default,\n    xep0191_1.default,\n    xep0198_1.default,\n    xep0199_1.default,\n    xep0202_1.default,\n    xep0203_1.default,\n    xep0215_1.default,\n    xep0221_1.default,\n    xep0224_1.default,\n    xep0231_1.default,\n    xep0234_1.default,\n    xep0247_1.default,\n    xep0260_1.default,\n    xep0261_1.default,\n    xep0264_1.default,\n    xep0280_1.default,\n    xep0297_1.default,\n    xep0300_1.default,\n    xep0301_1.default,\n    xep0308_1.default,\n    xep0313_1.default,\n    xep0317_1.default,\n    xep0319_1.default,\n    xep0320_1.default,\n    xep0333_1.default,\n    xep0334_1.default,\n    xep0335_1.default,\n    xep0338_1.default,\n    xep0343_1.default,\n    xep0352_1.default,\n    xep0357_1.default,\n    xep0359_1.default,\n    xep0363_1.default,\n    xep0380_1.default,\n    xep0384_1.default,\n    xrd_1.default\n];\nexports.default = Protocol;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Constants_1 = require(\"../Constants\");\nconst platform_1 = require(\"../platform\");\nconst jxt_1 = require(\"../jxt\");\nconst Utils_1 = require(\"../Utils\");\nclass RequestChannel {\n    constructor(stream) {\n        this.active = false;\n        this.maxRetries = 5;\n        this.stream = stream;\n        this.maxTimeout = 1000 * 1.1 * this.stream.maxWaitTime;\n    }\n    async send(rid, body) {\n        this.rid = rid;\n        this.active = true;\n        let attempts = 0;\n        while (attempts <= this.maxRetries) {\n            attempts += 1;\n            try {\n                const res = await (0, Utils_1.timeoutPromise)((0, platform_1.fetch)(this.stream.url, {\n                    body,\n                    headers: {\n                        'Content-Type': this.stream.contentType\n                    },\n                    method: 'POST'\n                }), this.maxTimeout, () => new Error('Request timed out'));\n                if (!res.ok) {\n                    throw new Error('HTTP Status Error: ' + res.status);\n                }\n                const result = await res.text();\n                this.active = false;\n                return result;\n            }\n            catch (err) {\n                if (attempts === 1) {\n                    continue;\n                }\n                else if (attempts < this.maxRetries) {\n                    const backoff = Math.min(this.maxTimeout, Math.pow(attempts, 2) * 1000);\n                    await (0, Utils_1.sleep)(backoff + Math.random() * 1000);\n                    continue;\n                }\n                else {\n                    this.active = false;\n                    throw err;\n                }\n            }\n        }\n        throw new Error('Request failed');\n    }\n}\nclass BOSH extends platform_1.Duplex {\n    constructor(client, sm, stanzas) {\n        super({\n            objectMode: true\n        });\n        this.rid = Math.floor(Math.random() * 0xffffffff);\n        this.sid = '';\n        this.maxHoldOpen = 2;\n        this.maxWaitTime = 30;\n        this.contentType = 'text/xml; charset=utf-8';\n        this.channels = [new RequestChannel(this), new RequestChannel(this)];\n        this.activeChannelID = 0;\n        this.queue = [];\n        this.isEnded = false;\n        this.client = client;\n        this.sm = sm;\n        this.stanzas = stanzas;\n        this.on('data', e => {\n            this.client.emit('stream:data', e.stanza, e.kind);\n        });\n        this.on('end', () => {\n            this.isEnded = true;\n            clearTimeout(this.idleTimeout);\n            if (this.client.transport === this) {\n                this.client.emit('--transport-disconnected');\n            }\n        });\n    }\n    _write(chunk, encoding, done) {\n        this.queue.push([chunk, done]);\n        this.scheduleRequests();\n    }\n    _writev(chunks, done) {\n        this.queue.push([chunks.map(c => c.chunk).join(''), done]);\n        this.scheduleRequests();\n    }\n    _read() {\n        return;\n    }\n    process(result) {\n        const parser = new jxt_1.StreamParser({\n            acceptLanguages: this.config.acceptLanguages,\n            allowComments: false,\n            lang: this.config.lang,\n            registry: this.stanzas,\n            rootKey: 'bosh',\n            wrappedStream: true\n        });\n        parser.on('error', (err) => {\n            const streamError = {\n                condition: Constants_1.StreamErrorCondition.InvalidXML\n            };\n            this.client.emit('stream:error', streamError, err);\n            this.send('error', streamError);\n            return this.disconnect();\n        });\n        parser.on('data', (e) => {\n            if (e.event === 'stream-start') {\n                this.stream = e.stanza;\n                if (e.stanza.type === 'terminate') {\n                    this.hasStream = false;\n                    this.rid = undefined;\n                    this.sid = undefined;\n                    if (!this.isEnded) {\n                        this.isEnded = true;\n                        this.client.emit('bosh:terminate', e.stanza);\n                        this.client.emit('stream:end');\n                        this.push(null);\n                    }\n                }\n                else if (!this.hasStream) {\n                    this.hasStream = true;\n                    this.stream = e.stanza;\n                    this.sid = e.stanza.sid || this.sid;\n                    this.maxWaitTime = e.stanza.maxWaitTime || this.maxWaitTime;\n                    this.client.emit('stream:start', e.stanza);\n                }\n                return;\n            }\n            if (!e.event) {\n                this.push({ kind: e.kind, stanza: e.stanza });\n            }\n        });\n        this.client.emit('raw', 'incoming', result);\n        parser.write(result);\n        this.scheduleRequests();\n    }\n    connect(opts) {\n        this.config = opts;\n        this.url = opts.url;\n        if (opts.rid) {\n            this.rid = opts.rid;\n        }\n        if (opts.sid) {\n            this.sid = opts.sid;\n        }\n        if (opts.wait) {\n            this.maxWaitTime = opts.wait;\n        }\n        if (opts.maxHoldOpen) {\n            this.maxHoldOpen = opts.maxHoldOpen;\n        }\n        if (this.sid) {\n            this.hasStream = true;\n            this.stream = {};\n            this.client.emit('connected');\n            this.client.emit('session:prebind', this.config.jid);\n            this.client.emit('session:started');\n            return;\n        }\n        this._send({\n            lang: opts.lang,\n            maxHoldOpen: this.maxHoldOpen,\n            maxWaitTime: this.maxWaitTime,\n            to: opts.server,\n            version: '1.6',\n            xmppVersion: '1.0'\n        });\n    }\n    restart() {\n        this.hasStream = false;\n        this._send({\n            to: this.config.server,\n            xmppRestart: true\n        });\n    }\n    disconnect(clean = true) {\n        if (this.hasStream && clean) {\n            this._send({\n                type: 'terminate'\n            });\n        }\n        else {\n            this.stream = undefined;\n            this.sid = undefined;\n            this.rid = undefined;\n            this.client.emit('--transport-disconnected');\n        }\n    }\n    async send(dataOrName, data) {\n        var _a;\n        let output;\n        if (data) {\n            output = (_a = this.stanzas.export(dataOrName, data)) === null || _a === void 0 ? void 0 : _a.toString();\n        }\n        if (!output) {\n            return;\n        }\n        return new Promise((resolve, reject) => {\n            this.write(output, 'utf8', err => (err ? reject(err) : resolve()));\n        });\n    }\n    get sendingChannel() {\n        return this.channels[this.activeChannelID];\n    }\n    get pollingChannel() {\n        return this.channels[this.activeChannelID === 0 ? 1 : 0];\n    }\n    toggleChannel() {\n        this.activeChannelID = this.activeChannelID === 0 ? 1 : 0;\n    }\n    async _send(boshData, payload = '') {\n        if (this.isEnded) {\n            return;\n        }\n        const rid = this.rid++;\n        const header = this.stanzas.export('bosh', {\n            ...boshData,\n            rid,\n            sid: this.sid\n        });\n        let body;\n        if (payload) {\n            body = [header.openTag(), payload, header.closeTag()].join('');\n        }\n        else {\n            body = header.toString();\n        }\n        this.client.emit('raw', 'outgoing', body);\n        this.sendingChannel\n            .send(rid, body)\n            .then(result => {\n            this.process(result);\n        })\n            .catch(err => {\n            this.end(err);\n        });\n        this.toggleChannel();\n    }\n    async _poll() {\n        if (this.isEnded) {\n            return;\n        }\n        const rid = this.rid++;\n        const body = this.stanzas\n            .export('bosh', {\n            rid,\n            sid: this.sid\n        })\n            .toString();\n        this.client.emit('raw', 'outgoing', body);\n        this.pollingChannel\n            .send(rid, body)\n            .then(result => {\n            this.process(result);\n        })\n            .catch(err => {\n            this.end(err);\n        });\n    }\n    scheduleRequests() {\n        clearTimeout(this.idleTimeout);\n        this.idleTimeout = setTimeout(() => {\n            this.fireRequests();\n        }, 10);\n    }\n    fireRequests() {\n        if (this.isEnded) {\n            return;\n        }\n        if (this.queue.length) {\n            if (!this.sendingChannel.active) {\n                const [data, done] = this.queue.shift();\n                this._send({}, data);\n                done();\n            }\n            else {\n                this.scheduleRequests();\n            }\n            return;\n        }\n        if (this.authenticated && !(this.channels[0].active || this.channels[1].active)) {\n            this._poll();\n        }\n    }\n}\nexports.default = BOSH;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Constants_1 = require(\"../Constants\");\nconst jxt_1 = require(\"../jxt\");\nconst platform_1 = require(\"../platform\");\nconst WS_OPEN = 1;\nclass WSConnection extends platform_1.Duplex {\n    constructor(client, sm, stanzas) {\n        super({ objectMode: true });\n        this.sm = sm;\n        this.stanzas = stanzas;\n        this.closing = false;\n        this.client = client;\n        this.on('data', e => {\n            this.client.emit('stream:data', e.stanza, e.kind);\n        });\n        this.on('error', () => {\n            this.end();\n        });\n        this.on('end', () => {\n            if (this.client.transport === this) {\n                this.client.emit('--transport-disconnected');\n            }\n        });\n    }\n    _read() {\n        return;\n    }\n    _write(chunk, encoding, done) {\n        if (!this.socket || this.socket.readyState !== WS_OPEN) {\n            return done(new Error('Socket closed'));\n        }\n        const data = platform_1.Buffer.from(chunk, 'utf8').toString();\n        this.client.emit('raw', 'outgoing', data);\n        this.socket.send(data);\n        done();\n    }\n    connect(opts) {\n        this.config = opts;\n        this.hasStream = false;\n        this.closing = false;\n        this.parser = new jxt_1.StreamParser({\n            acceptLanguages: this.config.acceptLanguages,\n            allowComments: false,\n            lang: this.config.lang,\n            registry: this.stanzas,\n            wrappedStream: false\n        });\n        this.parser.on('data', (e) => {\n            const name = e.kind;\n            const stanzaObj = e.stanza;\n            if (name === 'stream') {\n                if (stanzaObj.action === 'open') {\n                    this.hasStream = true;\n                    this.stream = stanzaObj;\n                    return this.client.emit('stream:start', stanzaObj);\n                }\n                if (stanzaObj.action === 'close') {\n                    this.client.emit('stream:end');\n                    return this.disconnect();\n                }\n            }\n            this.push({ kind: e.kind, stanza: e.stanza });\n        });\n        this.parser.on('error', (err) => {\n            const streamError = {\n                condition: Constants_1.StreamErrorCondition.InvalidXML\n            };\n            this.client.emit('stream:error', streamError, err);\n            this.write(this.stanzas.export('error', streamError).toString());\n            return this.disconnect();\n        });\n        this.socket = new platform_1.WebSocket(opts.url, 'xmpp');\n        this.socket.onopen = () => {\n            this.emit('connect');\n            this.sm.started = false;\n            this.client.emit('connected');\n            this.write(this.startHeader());\n        };\n        this.socket.onmessage = wsMsg => {\n            const data = platform_1.Buffer.from(wsMsg.data, 'utf8').toString();\n            this.client.emit('raw', 'incoming', data);\n            if (this.parser) {\n                this.parser.write(data);\n            }\n        };\n        this.socket.onclose = () => {\n            this.push(null);\n        };\n        this.socket.onerror = err => {\n            console.error(err);\n            this.push(null);\n        };\n    }\n    disconnect(clean = true) {\n        if (this.socket && !this.closing && this.hasStream && clean) {\n            this.closing = true;\n            this.write(this.closeHeader());\n        }\n        else {\n            this.hasStream = false;\n            this.stream = undefined;\n            if (this.socket) {\n                this.end();\n                this.socket.close();\n                if (this.client.transport === this) {\n                    this.client.emit('--transport-disconnected');\n                }\n            }\n            this.socket = undefined;\n        }\n    }\n    async send(dataOrName, data) {\n        var _a;\n        let output;\n        if (data) {\n            output = (_a = this.stanzas.export(dataOrName, data)) === null || _a === void 0 ? void 0 : _a.toString();\n        }\n        if (!output) {\n            return;\n        }\n        return new Promise((resolve, reject) => {\n            this.write(output, 'utf8', err => (err ? reject(err) : resolve()));\n        });\n    }\n    restart() {\n        this.hasStream = false;\n        this.write(this.startHeader());\n    }\n    startHeader() {\n        const header = this.stanzas.export('stream', {\n            action: 'open',\n            lang: this.config.lang,\n            to: this.config.server,\n            version: '1.0'\n        });\n        return header.toString();\n    }\n    closeHeader() {\n        const header = this.stanzas.export('stream', {\n            action: 'close'\n        });\n        return header.toString();\n    }\n}\nexports.default = WSConnection;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst platform_1 = require(\"../platform\");\nconst Utils_1 = require(\"../Utils\");\nconst jxt_1 = require(\"../jxt\");\nconst xrd_1 = (0, tslib_1.__importDefault)(require(\"../protocol/xrd\"));\nclass NetworkDiscovery {\n    constructor() {\n        this.hostMetaCache = new Map();\n        this.hostMetaTTL = 30000;\n        this.resolver = (0, platform_1.createResolver)();\n        this.registry = new jxt_1.Registry();\n        this.registry.define(xrd_1.default);\n    }\n    async getHostMeta(domain) {\n        const cached = this.hostMetaCache.get(domain);\n        if (cached) {\n            if (cached.created + this.hostMetaTTL < Date.now()) {\n                return cached.hostmeta;\n            }\n            else {\n                this.hostMetaCache.delete(domain);\n            }\n        }\n        const hostmeta = (0, Utils_1.promiseAny)([\n            (0, platform_1.fetch)(`https://${domain}/.well-known/host-meta.json`).then(async (res) => {\n                if (!res.ok) {\n                    throw new Error('could-not-fetch-json');\n                }\n                return res.json();\n            }),\n            (0, platform_1.fetch)(`https://${domain}/.well-known/host-meta`).then(async (res) => {\n                if (!res.ok) {\n                    throw new Error('could-not-fetch-xml');\n                }\n                const data = await res.text();\n                const xml = (0, jxt_1.parse)(data);\n                if (xml) {\n                    return this.registry.import(xml);\n                }\n                else {\n                    throw new Error('could-not-import-xml');\n                }\n            })\n        ]);\n        this.hostMetaCache.set(domain, { created: Date.now(), hostmeta });\n        hostmeta.catch(() => {\n            this.hostMetaCache.delete(domain);\n        });\n        return hostmeta;\n    }\n    async resolveTXT(domain) {\n        var _a, _b;\n        return (_b = (_a = this.resolver) === null || _a === void 0 ? void 0 : _a.resolveTxt(domain)) !== null && _b !== void 0 ? _b : [];\n    }\n    async resolve(domain, defaultPort, opts = {}) {\n        if (!this.resolver) {\n            return [];\n        }\n        let candidates = [];\n        let allowFallback = true;\n        if (opts.srvType) {\n            const srvResults = await this.resolveWeightedSRV(domain, opts.srvType, opts.srvTypeSecure);\n            allowFallback = srvResults.allowFallback;\n            candidates = srvResults.records.map(record => ({\n                host: record.name,\n                port: record.port,\n                secure: record.secure\n            }));\n        }\n        if (allowFallback) {\n            candidates.push({ host: domain, port: defaultPort });\n        }\n        return candidates;\n    }\n    async resolveWeightedSRV(domain, srvType, srvTypeSecure) {\n        const [records, secureRecords] = await Promise.all([\n            this.resolveSRV(domain, srvType),\n            srvTypeSecure\n                ? this.resolveSRV(domain, srvTypeSecure, true)\n                : Promise.resolve({ records: [], allowFallback: false })\n        ]);\n        const allRecords = [...records.records, ...secureRecords.records];\n        const priorities = new Map();\n        let id = 0;\n        for (const record of allRecords) {\n            record.id = id++;\n            record.runningSum = 0;\n            if (!priorities.has(record.priority)) {\n                priorities.set(record.priority, []);\n            }\n            const priorityGroup = priorities.get(record.priority);\n            priorityGroup.push(record);\n        }\n        const weightRecords = (unweightedRecords) => {\n            const sorted = [];\n            while (sorted.length < unweightedRecords.length) {\n                const ordered = (0, Utils_1.shuffle)(unweightedRecords.filter(record => record.weight === 0 && !record.used));\n                const unordered = (0, Utils_1.shuffle)(unweightedRecords.filter(record => {\n                    return record.weight !== 0 && !record.used;\n                }));\n                let weightSum = 0;\n                for (const record of unordered) {\n                    weightSum += record.weight;\n                    record.runningSum = weightSum;\n                    ordered.push(record);\n                }\n                const selector = Math.floor(Math.random() * (weightSum + 1));\n                for (const record of ordered) {\n                    if (record.runningSum >= selector) {\n                        record.used = true;\n                        sorted.push(record);\n                        break;\n                    }\n                }\n            }\n            return sorted;\n        };\n        let sortedRecords = [];\n        for (const priority of Array.from(priorities.keys()).sort((a, b) => a < b ? -1 : a > b ? 1 : 0)) {\n            const priorityGroup = priorities.get(priority);\n            sortedRecords = sortedRecords.concat(weightRecords(priorityGroup));\n        }\n        return {\n            records: sortedRecords,\n            allowFallback: records.allowFallback\n        };\n    }\n    async resolveSRV(domain, srvType, secure) {\n        var _a, _b;\n        try {\n            const records = (_b = (await ((_a = this.resolver) === null || _a === void 0 ? void 0 : _a.resolveSrv(`${srvType}.${domain}`)))) !== null && _b !== void 0 ? _b : [];\n            if (records.length === 1 && (records[0].name === '.' || records[0].name === '')) {\n                return { records: [], allowFallback: false };\n            }\n            return {\n                records: records\n                    .map(record => ({ secure, ...record }))\n                    .filter(record => record.name !== '' && record.name !== '.'),\n                allowFallback: false\n            };\n        }\n        catch (_c) {\n            return {\n                records: [],\n                allowFallback: true\n            };\n        }\n    }\n}\nexports.default = NetworkDiscovery;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst async_1 = require(\"async\");\nconst events_1 = require(\"events\");\nconst StreamManagement_1 = (0, tslib_1.__importDefault)(require(\"./helpers/StreamManagement\"));\nconst JID = (0, tslib_1.__importStar)(require(\"./JID\"));\nconst JXT = (0, tslib_1.__importStar)(require(\"./jxt\"));\nconst SASL = (0, tslib_1.__importStar)(require(\"./lib/sasl\"));\nconst plugins_1 = require(\"./plugins\");\nconst protocol_1 = (0, tslib_1.__importDefault)(require(\"./protocol\"));\nconst bosh_1 = (0, tslib_1.__importDefault)(require(\"./transports/bosh\"));\nconst websocket_1 = (0, tslib_1.__importDefault)(require(\"./transports/websocket\"));\nconst Utils_1 = require(\"./Utils\");\nconst NetworkDiscovery_1 = (0, tslib_1.__importDefault)(require(\"./helpers/NetworkDiscovery\"));\nclass Client extends events_1.EventEmitter {\n    constructor(opts = {}) {\n        super();\n        this.reconnectAttempts = 0;\n        this.setMaxListeners(100);\n        // Some EventEmitter shims don't include off()\n        this.off = this.removeListener;\n        this.updateConfig(opts);\n        this.jid = '';\n        this.sasl = new SASL.Factory();\n        this.sasl.register('EXTERNAL', SASL.EXTERNAL, 1000);\n        this.sasl.register('SCRAM-SHA-256-PLUS', SASL.SCRAM, 350);\n        this.sasl.register('SCRAM-SHA-256', SASL.SCRAM, 300);\n        this.sasl.register('SCRAM-SHA-1-PLUS', SASL.SCRAM, 250);\n        this.sasl.register('SCRAM-SHA-1', SASL.SCRAM, 200);\n        this.sasl.register('DIGEST-MD5', SASL.DIGEST, 100);\n        this.sasl.register('OAUTHBEARER', SASL.OAUTH, 100);\n        this.sasl.register('X-OAUTH2', SASL.PLAIN, 50);\n        this.sasl.register('PLAIN', SASL.PLAIN, 1);\n        this.sasl.register('ANONYMOUS', SASL.ANONYMOUS, 0);\n        this.stanzas = new JXT.Registry();\n        this.stanzas.define(protocol_1.default);\n        this.resolver = new NetworkDiscovery_1.default();\n        this.use(plugins_1.core);\n        this.sm = new StreamManagement_1.default();\n        if (this.config.allowResumption !== undefined) {\n            this.sm.allowResume = this.config.allowResumption;\n        }\n        this.sm.on('prebound', jid => {\n            this.jid = jid;\n            this.emit('session:bound', jid);\n        });\n        this.on('session:bound', jid => this.sm.bind(jid));\n        this.sm.on('send', sm => this.send('sm', sm));\n        this.sm.on('acked', acked => this.emit('stanza:acked', acked));\n        this.sm.on('failed', failed => this.emit('stanza:failed', failed));\n        this.sm.on('hibernated', data => this.emit('stanza:hibernated', data));\n        // We disable outgoing processing while stanza resends are queued up\n        // to prevent any interleaving.\n        this.sm.on('begin-resend', () => this.outgoingDataQueue.pause());\n        this.sm.on('resend', ({ kind, stanza }) => this.send(kind, stanza, true));\n        this.sm.on('end-resend', () => this.outgoingDataQueue.resume());\n        // Create message:* flavors of stanza:* SM events\n        for (const type of ['acked', 'hibernated', 'failed']) {\n            this.on(`stanza:${type}`, (data) => {\n                if (data.kind === 'message') {\n                    this.emit(`message:${type}`, data.stanza);\n                }\n            });\n        }\n        this.transports = {\n            bosh: bosh_1.default,\n            websocket: websocket_1.default\n        };\n        this.incomingDataQueue = (0, async_1.priorityQueue)(async (task, done) => {\n            const { kind, stanza } = task;\n            this.emit(kind, stanza);\n            if (stanza.id) {\n                this.emit((kind + ':id:' + stanza.id), stanza);\n            }\n            if (kind === 'message' || kind === 'presence' || kind === 'iq') {\n                this.emit('stanza', stanza);\n                await this.sm.handle();\n            }\n            else if (kind === 'sm') {\n                if (stanza.type === 'ack') {\n                    await this.sm.process(stanza);\n                    this.emit('stream:management:ack', stanza);\n                }\n                if (stanza.type === 'request') {\n                    this.sm.ack();\n                }\n            }\n            if (done) {\n                done();\n            }\n        }, 1);\n        const handleFailedSend = (kind, stanza) => {\n            if (['message', 'presence', 'iq'].includes(kind)) {\n                if (!this.sm.started || !this.sm.resumable) {\n                    this.emit('stanza:failed', {\n                        kind,\n                        stanza\n                    });\n                }\n                else if (this.sm.resumable && !this.transport) {\n                    this.emit('stanza:hibernated', {\n                        kind,\n                        stanza\n                    });\n                }\n            }\n        };\n        this.outgoingDataQueue = (0, async_1.priorityQueue)(async (task, done) => {\n            var _a;\n            const { kind, stanza, replay } = task;\n            const ackRequest = replay || (await this.sm.track(kind, stanza));\n            if (kind === 'message') {\n                if (replay) {\n                    this.emit('message:retry', stanza);\n                }\n                else {\n                    this.emit('message:sent', stanza, false);\n                }\n            }\n            if (this.transport) {\n                try {\n                    await this.transport.send(kind, stanza);\n                    if (ackRequest) {\n                        (_a = this.transport) === null || _a === void 0 ? void 0 : _a.send('sm', { type: 'request' });\n                    }\n                }\n                catch (err) {\n                    console.error(err);\n                    handleFailedSend(kind, stanza);\n                }\n            }\n            else {\n                handleFailedSend(kind, stanza);\n            }\n            if (done) {\n                done();\n            }\n        }, 1);\n        this.on('stream:data', (json, kind) => {\n            this.incomingDataQueue.push({\n                kind,\n                stanza: json\n            }, 0);\n        });\n        this.on('--transport-disconnected', async () => {\n            const drains = [];\n            if (!this.incomingDataQueue.idle()) {\n                drains.push(this.incomingDataQueue.drain());\n            }\n            if (!this.outgoingDataQueue.idle()) {\n                drains.push(this.outgoingDataQueue.drain());\n            }\n            await Promise.all(drains);\n            await this.sm.hibernate();\n            if (this.transport) {\n                delete this.transport;\n            }\n            this.emit('--reset-stream-features');\n            if (!this.sessionTerminating && this.config.autoReconnect) {\n                this.reconnectAttempts += 1;\n                clearTimeout(this.reconnectTimer);\n                this.reconnectTimer = setTimeout(() => {\n                    this.connect();\n                }, 1000 * Math.min(Math.pow(2, this.reconnectAttempts) + Math.random(), this.config.maxReconnectBackoff || 32));\n            }\n            this.emit('disconnected');\n        });\n        this.on('iq', (iq) => {\n            const iqType = iq.type;\n            const payloadType = iq.payloadType;\n            const iqEvent = 'iq:' + iqType + ':' + payloadType;\n            if (iqType === 'get' || iqType === 'set') {\n                if (payloadType === 'invalid-payload-count') {\n                    return this.sendIQError(iq, {\n                        error: {\n                            condition: 'bad-request',\n                            type: 'modify'\n                        }\n                    });\n                }\n                if (payloadType === 'unknown-payload' || this.listenerCount(iqEvent) === 0) {\n                    return this.sendIQError(iq, {\n                        error: {\n                            condition: 'service-unavailable',\n                            type: 'cancel'\n                        }\n                    });\n                }\n                this.emit(iqEvent, iq);\n            }\n        });\n        this.on('message', msg => {\n            const isChat = (msg.alternateLanguageBodies && msg.alternateLanguageBodies.length) ||\n                (msg.links && msg.links.length);\n            const isMarker = msg.marker && msg.marker.type !== 'markable';\n            if (isChat && !isMarker) {\n                if (msg.type === 'chat' || msg.type === 'normal') {\n                    this.emit('chat', msg);\n                }\n                else if (msg.type === 'groupchat') {\n                    this.emit('groupchat', msg);\n                }\n            }\n            if (msg.type === 'error') {\n                this.emit('message:error', msg);\n            }\n        });\n        this.on('presence', (pres) => {\n            let presType = pres.type || 'available';\n            if (presType === 'error') {\n                presType = 'presence:error';\n            }\n            this.emit(presType, pres);\n        });\n        this.on('session:started', () => {\n            this.sessionStarting = false;\n            this.reconnectAttempts = 0;\n            if (this.reconnectTimer) {\n                clearTimeout(this.reconnectTimer);\n            }\n        });\n    }\n    updateConfig(opts = {}) {\n        var _a;\n        const currConfig = this.config || {};\n        this.config = {\n            allowResumption: true,\n            jid: '',\n            transports: {\n                bosh: true,\n                websocket: true\n            },\n            useStreamManagement: true,\n            transportPreferenceOrder: ['websocket', 'bosh'],\n            ...currConfig,\n            ...opts\n        };\n        if (!this.config.server) {\n            this.config.server = JID.getDomain(this.config.jid);\n        }\n        if (this.config.password) {\n            this.config.credentials = this.config.credentials || {};\n            this.config.credentials.password = this.config.password;\n            delete this.config.password;\n        }\n        if (!this.config.transportPreferenceOrder) {\n            this.config.transportPreferenceOrder = Object.keys((_a = this.config.transports) !== null && _a !== void 0 ? _a : {});\n        }\n    }\n    get stream() {\n        return this.transport ? this.transport.stream : undefined;\n    }\n    emit(name, ...args) {\n        // Continue supporting the most common and useful wildcard events\n        const res = super.emit(name, ...args);\n        if (name === 'raw') {\n            super.emit(`raw:${args[0]}`, args[1]);\n            super.emit('raw:*', `raw:${args[0]}`, args[1]);\n            super.emit('*', `raw:${args[0]}`, args[1]);\n        }\n        else {\n            super.emit('*', name, ...args);\n        }\n        return res;\n    }\n    use(pluginInit) {\n        if (typeof pluginInit !== 'function') {\n            return;\n        }\n        pluginInit(this, this.stanzas, this.config);\n    }\n    nextId() {\n        return (0, Utils_1.uuid)();\n    }\n    async getCredentials() {\n        return this._getConfiguredCredentials();\n    }\n    async connect() {\n        var _a, _b, _c;\n        this.sessionTerminating = false;\n        this.sessionStarting = true;\n        this.emit('--reset-stream-features');\n        if (this.transport) {\n            this.transport.disconnect(false);\n        }\n        const transportPref = (_a = this.config.transportPreferenceOrder) !== null && _a !== void 0 ? _a : [];\n        let endpoints;\n        for (const name of transportPref) {\n            const settings = this.config.transports[name];\n            if (!settings || !this.transports[name]) {\n                continue;\n            }\n            let config = {\n                acceptLanguages: this.config.acceptLanguages || [(_b = this.config.lang) !== null && _b !== void 0 ? _b : 'en'],\n                jid: this.config.jid,\n                lang: (_c = this.config.lang) !== null && _c !== void 0 ? _c : 'en',\n                server: this.config.server\n            };\n            const transport = new this.transports[name](this, this.sm, this.stanzas);\n            if (typeof settings === 'string') {\n                config.url = settings;\n            }\n            else if (settings == true) {\n                if (transport.discoverBindings) {\n                    const discovered = await transport.discoverBindings(this.config.server);\n                    if (!discovered) {\n                        continue;\n                    }\n                    config = {\n                        ...config,\n                        ...discovered\n                    };\n                }\n                else {\n                    if (!endpoints) {\n                        try {\n                            endpoints = await this.discoverBindings(this.config.server);\n                        }\n                        catch (err) {\n                            console.error(err);\n                            continue;\n                        }\n                    }\n                    endpoints[name] = (endpoints[name] || []).filter(url => url.startsWith('wss:') || url.startsWith('https:'));\n                    if (!endpoints[name] || !endpoints[name].length) {\n                        continue;\n                    }\n                    config.url = endpoints[name][0];\n                }\n            }\n            this.transport = transport;\n            this.transport.connect(config);\n            return;\n        }\n        console.error('No endpoints found for the requested transports.');\n        this.emit('--transport-disconnected');\n    }\n    async disconnect() {\n        this.sessionTerminating = true;\n        clearTimeout(this.reconnectTimer);\n        this.outgoingDataQueue.pause();\n        if (this.sessionStarted && !this.sm.started) {\n            // Only emit session:end if we had a session, and we aren't using\n            // stream management to keep the session alive.\n            this.emit('session:end');\n        }\n        this.emit('--reset-stream-features');\n        this.sessionStarted = false;\n        if (this.transport) {\n            this.transport.disconnect();\n        }\n        else {\n            this.emit('--transport-disconnected');\n        }\n        this.outgoingDataQueue.resume();\n        if (!this.outgoingDataQueue.idle()) {\n            await this.outgoingDataQueue.drain();\n        }\n        await this.sm.shutdown();\n    }\n    async send(kind, stanza, replay = false) {\n        return new Promise((resolve, reject) => {\n            this.outgoingDataQueue.push({ kind, stanza, replay }, replay ? 0 : 1, err => err ? reject(err) : resolve());\n        });\n    }\n    sendMessage(data) {\n        const id = data.id || this.nextId();\n        const msg = {\n            id,\n            originId: id,\n            ...data\n        };\n        this.send('message', msg);\n        return msg.id;\n    }\n    sendPresence(data = {}) {\n        const pres = {\n            id: this.nextId(),\n            ...data\n        };\n        this.send('presence', pres);\n        return pres.id;\n    }\n    sendIQ(data) {\n        const iq = {\n            id: this.nextId(),\n            ...data\n        };\n        const allowed = JID.allowedResponders(this.jid, data.to);\n        const respEvent = 'iq:id:' + iq.id;\n        const request = new Promise((resolve, reject) => {\n            const handler = (res) => {\n                // Only process result from the correct responder\n                if (!allowed.has(res.from)) {\n                    return;\n                }\n                // Only process result or error responses, if the responder\n                // happened to send us a request using the same ID value at\n                // the same time.\n                if (res.type !== 'result' && res.type !== 'error') {\n                    return;\n                }\n                this.off(respEvent, handler);\n                if (res.type === 'result') {\n                    resolve(res);\n                }\n                else {\n                    reject(res);\n                }\n            };\n            this.on(respEvent, handler);\n        });\n        this.send('iq', iq);\n        const timeout = this.config.timeout || 15;\n        return (0, Utils_1.timeoutPromise)(request, timeout * 1000, () => ({\n            ...iq,\n            to: undefined,\n            from: undefined,\n            error: {\n                condition: 'timeout',\n                text: `Request timed out after ${timeout} seconds.`\n            },\n            id: iq.id,\n            type: 'error'\n        }));\n    }\n    sendIQResult(original, reply) {\n        this.send('iq', {\n            ...reply,\n            id: original.id,\n            to: original.from,\n            type: 'result'\n        });\n    }\n    sendIQError(original, error) {\n        this.send('iq', {\n            ...error,\n            id: original.id,\n            to: original.from,\n            type: 'error'\n        });\n    }\n    sendStreamError(error) {\n        this.emit('stream:error', error);\n        this.send('error', error);\n        this.disconnect();\n    }\n    _getConfiguredCredentials() {\n        const creds = this.config.credentials || {};\n        const requestedJID = JID.parse(this.config.jid || '');\n        const username = creds.username || requestedJID.local;\n        const server = creds.host || requestedJID.domain;\n        return {\n            host: server,\n            password: this.config.password,\n            realm: server,\n            serviceName: server,\n            serviceType: 'xmpp',\n            username,\n            ...creds\n        };\n    }\n}\nexports.default = Client;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InputBuffer = exports.DisplayBuffer = exports.diff = void 0;\nconst tslib_1 = require(\"tslib\");\nconst async_1 = require(\"async\");\nconst punycode_1 = (0, tslib_1.__importDefault)(require(\"punycode\"));\n/**\n * Calculate the erase and insert actions needed to describe the user's edit operation.\n *\n * Based on the code point buffers before and after the edit, we find the single erase\n * and insert actions needed to describe the full change. We are minimizing the number\n * of deltas, not minimizing the number of affected code points.\n *\n * @param oldText The original buffer of Unicode code points before the user's edit action.\n * @param newText The new buffer of Unicode code points after the user's edit action.\n */\nfunction diff(oldText, newText) {\n    const oldLen = oldText.length;\n    const newLen = newText.length;\n    const searchLen = Math.min(oldLen, newLen);\n    let prefixSize = 0;\n    for (prefixSize = 0; prefixSize < searchLen; prefixSize++) {\n        if (oldText[prefixSize] !== newText[prefixSize]) {\n            break;\n        }\n    }\n    let suffixSize = 0;\n    for (suffixSize = 0; suffixSize < searchLen - prefixSize; suffixSize++) {\n        if (oldText[oldLen - suffixSize - 1] !== newText[newLen - suffixSize - 1]) {\n            break;\n        }\n    }\n    const matchedSize = prefixSize + suffixSize;\n    const events = [];\n    if (matchedSize < oldLen) {\n        events.push({\n            length: oldLen - matchedSize,\n            position: oldLen - suffixSize,\n            type: 'erase'\n        });\n    }\n    if (matchedSize < newLen) {\n        const insertedText = newText.slice(prefixSize, prefixSize + newLen - matchedSize);\n        events.push({\n            position: prefixSize,\n            text: punycode_1.default.ucs2.encode(insertedText),\n            type: 'insert'\n        });\n    }\n    return events;\n}\nexports.diff = diff;\n/**\n * Class for processing RTT events and providing a renderable string of the resulting text.\n */\nclass DisplayBuffer {\n    constructor(onStateChange, ignoreWaits = false) {\n        this.synced = false;\n        this.cursorPosition = 0;\n        this.ignoreWaits = false;\n        this.timeDeficit = 0;\n        this.sequenceNumber = 0;\n        this.onStateChange =\n            onStateChange ||\n                function noop() {\n                    return;\n                };\n        this.ignoreWaits = ignoreWaits;\n        this.buffer = [];\n        this.resetActionQueue();\n    }\n    /**\n     * The encoded Unicode string to display.\n     */\n    get text() {\n        return punycode_1.default.ucs2.encode(this.buffer.slice());\n    }\n    /**\n     * Mark the RTT message as completed and reset state.\n     */\n    commit() {\n        this.resetActionQueue();\n    }\n    /**\n     * Accept an RTT event for processing.\n     *\n     * A single event can contain multiple edit actions, including\n     * wait pauses.\n     *\n     * Events must be processed in order of their `seq` value in order\n     * to stay in sync.\n     *\n     * @param event {RTTEvent} The RTT event to process.\n     */\n    process(event) {\n        if (event.event === 'cancel' || event.event === 'init') {\n            this.resetActionQueue();\n            return;\n        }\n        else if (event.event === 'reset' || event.event === 'new') {\n            this.resetActionQueue();\n            if (event.seq !== undefined) {\n                this.sequenceNumber = event.seq;\n            }\n        }\n        else if (event.seq !== this.sequenceNumber) {\n            this.synced = false;\n        }\n        if (event.actions) {\n            const baseTime = Date.now();\n            let accumulatedWait = 0;\n            for (const action of event.actions) {\n                action.baseTime = baseTime + accumulatedWait;\n                if (action.type === 'wait') {\n                    accumulatedWait += action.duration;\n                }\n                this.actionQueue.push(action, 0);\n            }\n        }\n        this.sequenceNumber = this.sequenceNumber + 1;\n    }\n    /**\n     * Insert text into the Unicode code point buffer\n     *\n     * By default, the insertion position is the end of the buffer.\n     *\n     * @param text The raw text to insert\n     * @param position The position to start the insertion\n     */\n    insert(text = '', position = this.buffer.length) {\n        text = text.normalize('NFC');\n        const insertedText = punycode_1.default.ucs2.decode(text);\n        this.buffer.splice(position, 0, ...insertedText);\n        this.cursorPosition = position + insertedText.length;\n        this.emitState();\n    }\n    /**\n     * Erase text from the Unicode code point buffer\n     *\n     * By default, the erased text length is `1`, and the position is the end of the buffer.\n     *\n     * @param length The number of code points to erase from the buffer, starting at {position} and erasing to the left.\n     * @param position The position to start erasing code points. Erasing continues to the left.\n     */\n    erase(length = 1, position = this.buffer.length) {\n        position = Math.max(Math.min(position, this.buffer.length), 0);\n        length = Math.max(Math.min(length, this.text.length), 0);\n        this.buffer.splice(Math.max(position - length, 0), length);\n        this.cursorPosition = Math.max(position - length, 0);\n        this.emitState();\n    }\n    emitState(additional = {}) {\n        this.onStateChange({\n            cursorPosition: this.cursorPosition,\n            synced: this.synced,\n            text: this.text,\n            ...additional\n        });\n    }\n    /**\n     * Reset the processing state and queue.\n     *\n     * Used when 'init', 'new', 'reset', and 'cancel' RTT events are processed.\n     */\n    resetActionQueue() {\n        if (this.actionQueue) {\n            this.actionQueue.kill();\n        }\n        this.sequenceNumber = 0;\n        this.synced = true;\n        this.buffer = [];\n        this.timeDeficit = 0;\n        this.actionQueue = (0, async_1.priorityQueue)((action, done) => {\n            const currentTime = Date.now();\n            if (action.type === 'insert') {\n                this.insert(action.text, action.position);\n                return done();\n            }\n            else if (action.type === 'erase') {\n                this.erase(action.length, action.position);\n                return done();\n            }\n            else if (action.type === 'wait') {\n                if (this.ignoreWaits) {\n                    return done();\n                }\n                if (action.duration > 700) {\n                    action.duration = 700;\n                }\n                const waitTime = action.duration - (currentTime - action.baseTime) + this.timeDeficit;\n                if (waitTime <= 0) {\n                    this.timeDeficit = waitTime;\n                    return done();\n                }\n                else {\n                    this.timeDeficit = 0;\n                    setTimeout(() => done(), waitTime);\n                }\n            }\n            else {\n                return done();\n            }\n        }, 1);\n        this.emitState();\n    }\n}\nexports.DisplayBuffer = DisplayBuffer;\n/**\n * Class for tracking changes in a source text, and generating RTT events based on those changes.\n */\nclass InputBuffer {\n    constructor(onStateChange, ignoreWaits = false) {\n        this.resetInterval = 10000;\n        this.ignoreWaits = false;\n        this.isStarting = false;\n        this.isReset = false;\n        this.changedBetweenResets = false;\n        this.onStateChange =\n            onStateChange ||\n                function noop() {\n                    return;\n                };\n        this.ignoreWaits = ignoreWaits;\n        this.buffer = [];\n        this.actionQueue = [];\n        this.sequenceNumber = 0;\n    }\n    get text() {\n        return punycode_1.default.ucs2.encode(this.buffer.slice());\n    }\n    /**\n     * Generate action deltas based on the new full state of the source text.\n     *\n     * The text provided here is the _entire_ source text, not a diff.\n     *\n     * @param text The new state of the user's text.\n     */\n    update(text) {\n        let actions = [];\n        if (text !== undefined) {\n            text = text.normalize('NFC');\n            const newBuffer = punycode_1.default.ucs2.decode(text);\n            actions = diff(this.buffer, newBuffer.slice());\n            this.buffer = newBuffer;\n            this.emitState();\n        }\n        const now = Date.now();\n        if (this.changedBetweenResets && now - this.lastResetTime > this.resetInterval) {\n            this.actionQueue = [];\n            this.actionQueue.push({\n                position: 0,\n                text: this.text,\n                type: 'insert'\n            });\n            this.isReset = true;\n            this.lastActionTime = now;\n            this.lastResetTime = now;\n            this.changedBetweenResets = false;\n        }\n        else if (actions.length) {\n            const wait = now - (this.lastActionTime || now);\n            if (wait > 0 && !this.ignoreWaits) {\n                this.actionQueue.push({\n                    duration: wait,\n                    type: 'wait'\n                });\n            }\n            for (const action of actions) {\n                this.actionQueue.push(action);\n            }\n            this.lastActionTime = now;\n            this.changedBetweenResets = true;\n        }\n        else {\n            this.lastActionTime = now;\n        }\n    }\n    /**\n     * Formally start an RTT session.\n     *\n     * Generates a random starting event sequence number.\n     *\n     * @param resetInterval {Milliseconds} Time to wait between using RTT reset events during editing.\n     */\n    start(resetInterval = this.resetInterval) {\n        this.commit();\n        this.isStarting = true;\n        this.resetInterval = resetInterval;\n        this.sequenceNumber = Math.floor(Math.random() * 10000 + 1);\n        return {\n            event: 'init'\n        };\n    }\n    /**\n     * Formally stops the RTT session.\n     */\n    stop() {\n        this.commit();\n        return {\n            event: 'cancel'\n        };\n    }\n    /**\n     * Generate an RTT event based on queued edit actions.\n     *\n     * The edit actions included in the event are all those made since the last\n     * time a diff was requested.\n     */\n    diff() {\n        this.update();\n        if (!this.actionQueue.length) {\n            return null;\n        }\n        const event = {\n            actions: this.actionQueue,\n            seq: this.sequenceNumber++\n        };\n        if (this.isStarting) {\n            event.event = 'new';\n            this.isStarting = false;\n            this.lastResetTime = Date.now();\n        }\n        else if (this.isReset) {\n            event.event = 'reset';\n            this.isReset = false;\n        }\n        this.actionQueue = [];\n        return event;\n    }\n    /**\n     * Reset the RTT session state to prepare for a new message text.\n     */\n    commit() {\n        this.sequenceNumber = 0;\n        this.lastActionTime = 0;\n        this.actionQueue = [];\n        this.buffer = [];\n    }\n    emitState() {\n        this.onStateChange({\n            text: this.text\n        });\n    }\n}\nexports.InputBuffer = InputBuffer;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createPager = exports.ResultSetPager = void 0;\nclass ResultSetPager {\n    constructor(opts) {\n        var _a, _b, _c;\n        this.resultComplete = false;\n        this.fetchedCount = 0;\n        this.yieldedCount = 0;\n        this.cursor = { first: opts.before, last: opts.after };\n        this.query = opts.query;\n        this.direction = (_a = opts.direction) !== null && _a !== void 0 ? _a : 'forward';\n        this.reverse = (_b = opts.reverse) !== null && _b !== void 0 ? _b : this.direction === 'backward';\n        this.pageSize = (_c = opts.pageSize) !== null && _c !== void 0 ? _c : 20;\n    }\n    async *[Symbol.asyncIterator]() {\n        let currentResults = [];\n        do {\n            currentResults = await this.fetchPage();\n            for (const item of currentResults) {\n                this.yieldedCount += 1;\n                yield item;\n            }\n        } while (currentResults.length > 0);\n    }\n    async size() {\n        if (this.resultCount !== undefined) {\n            return this.resultCount;\n        }\n        const { paging } = await this.query({ max: 0 });\n        this.resultCount = paging.count;\n        return paging.count;\n    }\n    queryCompleted() {\n        return this.resultComplete;\n    }\n    finished() {\n        return this.resultComplete && this.yieldedCount === this.fetchedCount;\n    }\n    async fetchPage() {\n        var _a;\n        const { results, paging } = await this.query({\n            before: this.direction === 'backward' ? (_a = this.cursor.first) !== null && _a !== void 0 ? _a : '' : undefined,\n            after: this.direction === 'forward' ? this.cursor.last : undefined,\n            max: this.pageSize\n        });\n        this.cursor = paging;\n        this.resultCount = paging.count;\n        this.fetchedCount += results.length;\n        if ((this.pageSize && results.length < this.pageSize) ||\n            (this.resultCount && this.fetchedCount === this.resultCount)) {\n            this.resultComplete = true;\n        }\n        if (this.reverse) {\n            results.reverse();\n        }\n        return results;\n    }\n}\nexports.ResultSetPager = ResultSetPager;\nfunction createPager(opts) {\n    return new ResultSetPager(opts);\n}\nexports.createPager = createPager;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createClient = exports.VERSION = exports.Platform = exports.SASL = exports.RTT = exports.RSM = exports.Utils = exports.Jingle = exports.Stanzas = exports.Namespaces = exports.JID = exports.JXT = exports.DataForms = exports.Constants = exports.Client = void 0;\nconst tslib_1 = require(\"tslib\");\nconst Client_1 = (0, tslib_1.__importDefault)(require(\"./Client\"));\nexports.Client = Client_1.default;\nconst Constants = (0, tslib_1.__importStar)(require(\"./Constants\"));\nexports.Constants = Constants;\nconst RTT = (0, tslib_1.__importStar)(require(\"./helpers/RTT\"));\nexports.RTT = RTT;\nconst JID = (0, tslib_1.__importStar)(require(\"./JID\"));\nexports.JID = JID;\nconst Jingle = (0, tslib_1.__importStar)(require(\"./jingle\"));\nexports.Jingle = Jingle;\nconst JXT = (0, tslib_1.__importStar)(require(\"./jxt\"));\nexports.JXT = JXT;\nconst LibSASL = (0, tslib_1.__importStar)(require(\"./lib/sasl\"));\nexports.SASL = LibSASL;\nconst Namespaces = (0, tslib_1.__importStar)(require(\"./Namespaces\"));\nexports.Namespaces = Namespaces;\nconst Stanzas = (0, tslib_1.__importStar)(require(\"./protocol\"));\nexports.Stanzas = Stanzas;\nconst Utils = (0, tslib_1.__importStar)(require(\"./Utils\"));\nexports.Utils = Utils;\nconst Platform = (0, tslib_1.__importStar)(require(\"./platform\"));\nexports.Platform = Platform;\n(0, tslib_1.__exportStar)(require(\"./helpers/StreamManagement\"), exports);\nconst RSM = (0, tslib_1.__importStar)(require(\"./helpers/RSM\"));\nexports.RSM = RSM;\nconst DataForms = (0, tslib_1.__importStar)(require(\"./helpers/DataForms\"));\nexports.DataForms = DataForms;\nexports.VERSION = Constants.VERSION;\nconst plugins_1 = (0, tslib_1.__importDefault)(require(\"./plugins\"));\n(0, tslib_1.__exportStar)(require(\"./plugins\"), exports);\nfunction createClient(opts) {\n    const client = new Client_1.default(opts);\n    client.use(plugins_1.default);\n    return client;\n}\nexports.createClient = createClient;\n"]}