META-INF.resources.js.kurento-client.min.js Maven / Gradle / Ivy
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o=0)return"newref:"+t;o.push(n)}return n}function r(e,t){return e?n(e):(i.forEach(a,t),void n(null,t))}if(w.length)return transactionOperation.call(w,"transaction",e,n);n=n||noop;var i=e.operations,o=[];i.forEach(function(e){var n=e.params;switch(e.method){case"create":var r=n.constructorParams;for(var i in r)r[i]=t(e,r[i]);break;default:n.object=t(e,n.object);var a=n.operationParams;for(var i in a)a[i]=t(e,a[i])}}),Promise.all(o).then(function(){i.forEach(serializeOperation),c("transaction",e,r)},n)}function f(e,n){if(w.length)return transactionOperation.call(w,"transaction",e,n);var t=e.operations;async.each(t,function(e){switch(e.method){case"create":u(void 0,e.params,e.callback);break;case"transaction":f(e.params.operations,e.callback);break;default:l(void 0,e.method,e.params,e.callback)}},n)}function m(e,n){var t=O[n];return t?t:(e.emit("_id",null,n),O[n]=e,e.once("release",function(){delete O[n]}),e)}function p(e,n){function t(t,r){if(t)return n(t);var i=C.createInmediate(r);return n(null,m(i,e))}if(void 0==e)return n(new TypeError("'id' can't be null or undefined"));var r=O[e];if(r)return n(null,r);var i={object:e};c("describe",i,t)}function v(t){t=(t||noop).bind(this);var r=!1,i=reconnect({failAfter:E},function(e){r&&(e.writable=!1),P.transport=e}).connect(e);Object.defineProperty(this,"_re",{get:function(){return i}}),this.close=function(){r=!0,g.then(i.disconnect.bind(i))},i.on("fail",this.emit.bind(this,"disconnect")),this.then=function(e,n){var t=new Promise(function(t,r){function a(){i.removeListener("fail",o);var a;if(e)try{a=e.call(h,h)}catch(s){return n||console.trace("Uncaugh exception",s),r(s)}t(a)}function o(){i.removeListener("connection",a);var e=new Error("Connection error");if(n)try{e=n.call(h,e)}catch(t){return r(t)}else console.trace("Uncaugh exception",e);r(e)}i.connected?a():i.reconnect?(i.once("connection",a),i.once("fail",o)):o()});return disguise(t,this)},this["catch"]=this.then.bind(this,null);var a=this;n.strict&&(a=this.getServerManager().then(function(e){return e.getInfo()}).then(function(e){var n=e.modules.map(function(e){return e.name}),t=KurentoClient.register.modules.filter(function(e){return n.indexOf(e)<0}),r=t.length;if(r){if(1===r)var i="Module '"+t[0]+"' is not installed in the Kurento Media Server";else var i="Modules '"+t.slice(0,-1).join("', '")+"' and '"+t[r-1]+"' are not installed in the Kurento Media Server";var a=new SyntaxError(i);return a.modules=t,Promise.reject(a)}return Promise.resolve(h)})),promiseCallback(a,t)}if(!(this instanceof KurentoClient))return new KurentoClient(e,n,t);var h=this;EventEmitter.call(this);var b=Promise.resolve(),g=Promise.resolve();n instanceof Function&&(t=n,n=void 0),n=n||{};var E=n.failAfter;void 0==E&&(E=5),void 0===n.enableTransactions&&(n.enableTransactions=!0),void 0===n.strict&&(n.strict=!0),n.request_timeout=n.request_timeout||BASE_TIMEOUT,n.response_timeout=n.response_timeout||BASE_TIMEOUT,n.duplicates_timeout=n.duplicates_timeout||BASE_TIMEOUT;var O={};if("string"==typeof e){var T=n.access_token;void 0!=T&&(e=url.parse(e,!0),e.query.access_token=T,e=url.format(e),delete n.access_token)}var P=new RpcBuilder(JsonRPC,n,function(e){return e instanceof RpcBuilder.RpcNotification?void 0!=e.duplicated?console.warning("Unexpected request:",e):r(e):void console.error("Invalid request instance",e)}),_=n.enableTransactions?d:f,w=new TransactionsManager(this,function(e,n){var t={object:h,operations:e};_(t,n)});this.beginTransaction=w.beginTransaction.bind(w),this.endTransaction=w.endTransaction.bind(w),this.transaction=w.transaction.bind(w),Object.defineProperty(this,"sessionId",{configurable:!0}),this.on("disconnect",function(){Object.defineProperty(this,"sessionId",{configurable:!1,get:function(){throw new SyntaxError("Client has been disconnected")}});for(var e in O)O[e].emit("release")});var k=[];this.getMediaobjectById=function(e,n){return disguise(createPromise(e,p,n),this)};var C=new MediaObjectCreator(this,u,l,_,this.getMediaobjectById.bind(this),n.strict);Object.defineProperty(this,"_resetCache",{value:function(){O={}}}),this.create=C.create.bind(C),v.call(h,t)}var EventEmitter=require("events").EventEmitter,url=require("url"),Promise=require("es6-promise").Promise,async=require("async"),extend=require("extend"),inherits=require("inherits"),reconnect=require("reconnect-ws"),checkType=require("checktype"),RpcBuilder=require("kurento-jsonrpc"),JsonRPC=RpcBuilder.packers.JsonRPC,promiseCallback=require("promisecallback"),disguise=require("./disguise"),createPromise=require("./createPromise"),MediaObjectCreator=require("./MediaObjectCreator"),TransactionsManager=require("./TransactionsManager"),TransactionNotCommitedException=TransactionsManager.TransactionNotCommitedException,transactionOperation=TransactionsManager.transactionOperation,MediaObject=require("kurento-client-core").abstracts.MediaObject;const MEDIA_OBJECT_TYPE_NOT_FOUND=40100,MEDIA_OBJECT_NOT_FOUND=40101,MEDIA_OBJECT_METHOD_NOT_FOUND=40105,BASE_TIMEOUT=2e4;inherits(KurentoClient,EventEmitter),KurentoClient.prototype.connect=function(e,n){if(e instanceof Array||(e=Array.prototype.slice.call(arguments,0),n="function"==typeof e[e.length-1]?e.pop():void 0),n=(n||noop).bind(this),e.length<2)throw new SyntaxError("Need at least two media elements to connect");return e[0].connect(e.slice(1),n)},KurentoClient.prototype.getServerManager=function(e){return this.getMediaobjectById("manager_ServerManager",e)};var singletons={};KurentoClient.getSingleton=function(e,n,t){var r=singletons[e];return r||(n instanceof Function&&(t=n,n=void 0),r=KurentoClient(e,n,function(n,r){return n?t(n):(singletons[e]=r,void r.on("disconnect",function(){delete singletons[e]}))})),disguise(promiseCallback(r,t),r)},module.exports=KurentoClient;
},{"./MediaObjectCreator":2,"./TransactionsManager":3,"./createPromise":5,"./disguise":6,"async":"async","checktype":38,"es6-promise":"es6-promise","events":14,"extend":40,"inherits":"inherits","kurento-client-core":"kurento-client-core","kurento-jsonrpc":121,"promisecallback":"promisecallback","reconnect-ws":126,"url":35}],2:[function(require,module,exports){
function getConstructor(e,r){var t=register.classes[e]||register.abstracts[e];if(t)return t;if(r){var n=new SyntaxError("Unknown type '"+e+"'");throw n.type=e,n}return console.warn("Unknown type '"+e+"', using MediaObject instead"),register.abstracts.MediaObject}function createConstructor(e,r){var t=getConstructor(e.type,r);if(t.create){e=t.create(e.params);var n=t.prototype;inherits(t,getConstructor(e.type,r)),extend(t.prototype,n)}return t.item=e,t}function MediaObjectCreator(e,r,t,n,a,i){function c(e){var c=new e(i);return c.on("_describe",a),c.on("_rpc",t),(c instanceof register.abstracts.Hub||c instanceof register.classes.MediaPipeline)&&c.on("_create",r),c instanceof register.classes.MediaPipeline&&c.on("_transaction",n),c}function o(t,n){var a=t.transaction;delete t.transaction;var o=createConstructor(t,i);t=o.item,delete o.item;var s=t.params||{};delete t.params,void 0==s.mediaPipeline&&e instanceof register.classes.MediaPipeline&&(s.mediaPipeline=e);var u=extend({},s);t.constructorParams=checkParams(u,o.constructorParams,t.type),Object.keys(t.constructorParams).length||delete t.constructorParams;try{var d=c(o)}catch(p){return n(p)}return Object.defineProperty(t,"object",{value:d}),r(a,t,n),d}return this instanceof MediaObjectCreator?(this.create=function(r,t,n){function a(r,a){return r?n(r):t===!0&&e.connect?e.connect(a.filter(function(e){try{return checkMediaElement(e),!0}catch(r){}}),function(e){return e?n(e):void n(null,a)}):void n(null,a)}var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(arguments.length){case 1:t=void 0;case 2:n=void 0}if(t instanceof Function){if(n)throw new SyntaxError("Nothing can be defined after the callback");n=t,t=void 0}if(r instanceof Array){var c=!1;return r.forEach(function(e){var r=e.params||{};"number"==typeof r.mediaPipeline&&(c=!0)}),c?e.transaction(function(){var e=[];async.map(r,function(r,t){var n=r.params||{};"number"==typeof n.mediaPipeline&&(n.mediaPipeline=e[n.mediaPipeline]),e.push(o(r,t))},a)}):createPromise(r,o,a)}return r={params:t,transaction:i,type:r},o(r,n)},void(this.createInmediate=function(e){var r=createConstructor(e,i);return delete r.item,c(r)})):new MediaObjectCreator(e,r,t,n,a)}var async=require("async"),checkType=require("checktype"),checkParams=checkType.checkParams,extend=require("extend"),createPromise=require("./createPromise"),register=require("./register"),Transaction=require("./TransactionsManager").Transaction,checkMediaElement=checkType.bind(null,"MediaElement","media");module.exports=MediaObjectCreator;
},{"./TransactionsManager":3,"./createPromise":5,"./register":7,"async":"async","checktype":38,"extend":40}],3:[function(require,module,exports){
function onerror(t){this._transactionError=t}function TransactionNotExecutedException(t){TransactionNotExecutedException.super_.call(this,t)}function TransactionNotCommitedException(t){TransactionNotCommitedException.super_.call(this,t)}function TransactionRollbackException(t){TransactionRollbackException.super_.call(this,t)}function Transaction(t){Transaction.super_.call(this);var n=[];Object.defineProperty(this,"length",{get:function(){return n.length}}),this.push=n.push.bind(n),Object.defineProperty(this,"commited",{configurable:!0,value:!1}),this.commit=function(i){this.exit&&this.exit(),this.removeListener("error",onerror);var e;if(this._transactionError)e=Promise.reject(this._transactionError);else{n.forEach(function(t){var n=t.params.object;n&&n.transactions&&(n.transactions.shift(),n.transactions||delete n.transactions)});var r=this;e=new Promise(function(i,e){function o(t,n){return Object.defineProperty(r,"commited",{value:void 0==t}),t?e(t):void i(n)}t(n,o)})}return e=promiseCallback(e,i),this["catch"]=e["catch"].bind(e),this.then=e.then.bind(e),delete this.push,delete this.commit,delete this.endTransaction,this},this.rollback=function(t){Object.defineProperty(this,"commited",{value:!1});var i=new TransactionRollbackException("Transaction rollback by user");return n.forEach(function(t){"create"==t.method&&t.params.object.emit("_id",i);var n=t.callback;n instanceof Function&&n(i)}),t instanceof Function&&t(i),this},this.once("error",onerror),this.enter&&this.enter()}function TransactionsManager(t,n){var i=[];Object.defineProperty(this,"length",{get:function(){return i.length}}),this.beginTransaction=function(){var t=new Transaction(n);return t},this.endTransaction=function(t){},this.transaction=function(n,e){var r=this.beginTransaction();return i.unshift(r),r.run(n.bind(t)),i.shift().commit(e)},this.push=function(t){i[0].push(t)}}function transactionOperation(t,n,i){var e={method:t,params:n,callback:i},r=n.object;r&&(r.transactions?r.transactions.unshift(this):Object.defineProperty(r,"transactions",{configurable:!0,value:[this]})),this.push(e)}var inherits=require("inherits"),Domain=require("domain").Domain||function(){function t(){}return inherits(t,require("events").EventEmitter),t.prototype.run=function(t){try{t()}catch(n){this.emit("error",n)}return this},t}(),Promise=require("es6-promise").Promise,promiseCallback=require("promisecallback");inherits(TransactionNotExecutedException,Error),inherits(TransactionNotCommitedException,TransactionNotExecutedException),inherits(TransactionRollbackException,TransactionNotExecutedException),inherits(Transaction,Domain),module.exports=TransactionsManager,TransactionsManager.Transaction=Transaction,TransactionsManager.transactionOperation=transactionOperation,TransactionsManager.TransactionNotExecutedException=TransactionNotExecutedException,TransactionsManager.TransactionNotCommitedException=TransactionNotCommitedException,TransactionsManager.TransactionRollbackException=TransactionRollbackException;
},{"domain":13,"es6-promise":"es6-promise","events":14,"inherits":"inherits","promisecallback":"promisecallback"}],4:[function(require,module,exports){
"undefined"==typeof kurentoClient&&(window.kurentoClient=require("."));
},{".":"kurento-client"}],5:[function(require,module,exports){
function createPromise(e,r,i){var a=new Promise(function(i,a){function o(e,r){return e?a(e):void i(r)}e instanceof Array?async.map(e,r,o):r(e,o)});return promiseCallback(a,i)}var Promise=require("es6-promise").Promise,async=require("async"),promiseCallback=require("promisecallback");module.exports=createPromise;
},{"async":"async","es6-promise":"es6-promise","promisecallback":"promisecallback"}],6:[function(require,module,exports){
function disguise(e,n){for(var t in n)void 0===e[t]&&("function"==typeof n[t]?Object.defineProperty(e,t,{value:n[t].bind(n)}):Object.defineProperty(e,t,{get:function(){return n[t]},set:function(e){n[t]=e}}));return e}module.exports=disguise;
},{}],7:[function(require,module,exports){
function registerAbstracts(e){for(var r in e){var s=e[r],t=s.check;t&&(checkType[r]=t),abstracts[r]=s}}function registerClass(e,r){var s=r.check;s&&(checkType[e]=s),classes[e]=r}function registerComplexTypes(e){for(var r in e){var s=e[r],t=s.check;t?(checkType[r]=t,complexTypes[r]=s):checkType[r]=s}}function registerModule(e){modules.push(e),modules.sort()}function register(e,r){if(!e)throw SyntaxError("Need to define an object, a module or a function");if("string"!=typeof e&&(r=e,e=void 0),void 0==r)return register(require(e));if("string"==typeof r)return register(e,require(r));if(r instanceof Function){if(e||(e=r.name),void 0==e)throw new SyntaxError("Can't register an anonymous module");return registerClass(e,r)}e||(e=r.name),e&®isterModule(e);for(var s in r){var t=r[s];if("string"!=typeof t)switch(s){case"abstracts":registerAbstracts(t);break;case"complexTypes":registerComplexTypes(t);break;default:registerClass(s,t)}}}var checkType=require("checktype"),abstracts={},classes={},complexTypes={},modules=[];module.exports=register,register.abstracts=abstracts,register.classes=classes,register.complexTypes=complexTypes,register.modules=modules;
},{"checktype":38}],8:[function(require,module,exports){
},{}],9:[function(require,module,exports){
(function (global){
function typedArraySupport(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(r){return!1}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Buffer(t){return this instanceof Buffer?(this.length=0,this.parent=void 0,"number"==typeof t?fromNumber(this,t):"string"==typeof t?fromString(this,t,arguments.length>1?arguments[1]:"utf8"):fromObject(this,t)):arguments.length>1?new Buffer(t,arguments[1]):new Buffer(t)}function fromNumber(t,e){if(t=allocate(t,0>e?0:0|checked(e)),!Buffer.TYPED_ARRAY_SUPPORT)for(var r=0;e>r;r++)t[r]=0;return t}function fromString(t,e,r){("string"!=typeof r||""===r)&&(r="utf8");var n=0|byteLength(e,r);return t=allocate(t,n),t.write(e,r),t}function fromObject(t,e){if(Buffer.isBuffer(e))return fromBuffer(t,e);if(isArray(e))return fromArray(t,e);if(null==e)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(e.buffer instanceof ArrayBuffer)return fromTypedArray(t,e);if(e instanceof ArrayBuffer)return fromArrayBuffer(t,e)}return e.length?fromArrayLike(t,e):fromJsonObject(t,e)}function fromBuffer(t,e){var r=0|checked(e.length);return t=allocate(t,r),e.copy(t,0,0,r),t}function fromArray(t,e){var r=0|checked(e.length);t=allocate(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function fromTypedArray(t,e){var r=0|checked(e.length);t=allocate(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function fromArrayBuffer(t,e){return Buffer.TYPED_ARRAY_SUPPORT?(e.byteLength,t=Buffer._augment(new Uint8Array(e))):t=fromTypedArray(t,new Uint8Array(e)),t}function fromArrayLike(t,e){var r=0|checked(e.length);t=allocate(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function fromJsonObject(t,e){var r,n=0;"Buffer"===e.type&&isArray(e.data)&&(r=e.data,n=0|checked(r.length)),t=allocate(t,n);for(var i=0;n>i;i+=1)t[i]=255&r[i];return t}function allocate(t,e){Buffer.TYPED_ARRAY_SUPPORT?(t=Buffer._augment(new Uint8Array(e)),t.__proto__=Buffer.prototype):(t.length=e,t._isBuffer=!0);var r=0!==e&&e<=Buffer.poolSize>>>1;return r&&(t.parent=rootParent),t}function checked(t){if(t>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|t}function SlowBuffer(t,e){if(!(this instanceof SlowBuffer))return new SlowBuffer(t,e);var r=new Buffer(t,e);return delete r.parent,r}function byteLength(t,e){"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return utf8ToBytes(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(t).length;default:if(n)return utf8ToBytes(t).length;e=(""+e).toLowerCase(),n=!0}}function slowToString(t,e,r){var n=!1;if(e=0|e,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return hexSlice(this,e,r);case"utf8":case"utf-8":return utf8Slice(this,e,r);case"ascii":return asciiSlice(this,e,r);case"binary":return binarySlice(this,e,r);case"base64":return base64Slice(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function hexWrite(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var f=e.length;if(f%2!==0)throw new Error("Invalid hex string");n>f/2&&(n=f/2);for(var o=0;n>o;o++){var u=parseInt(e.substr(2*o,2),16);if(isNaN(u))throw new Error("Invalid hex string");t[r+o]=u}return o}function utf8Write(t,e,r,n){return blitBuffer(utf8ToBytes(e,t.length-r),t,r,n)}function asciiWrite(t,e,r,n){return blitBuffer(asciiToBytes(e),t,r,n)}function binaryWrite(t,e,r,n){return asciiWrite(t,e,r,n)}function base64Write(t,e,r,n){return blitBuffer(base64ToBytes(e),t,r,n)}function ucs2Write(t,e,r,n){return blitBuffer(utf16leToBytes(e,t.length-r),t,r,n)}function base64Slice(t,e,r){return 0===e&&r===t.length?base64.fromByteArray(t):base64.fromByteArray(t.slice(e,r))}function utf8Slice(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;r>i;){var f=t[i],o=null,u=f>239?4:f>223?3:f>191?2:1;if(r>=i+u){var s,a,h,c;switch(u){case 1:128>f&&(o=f);break;case 2:s=t[i+1],128===(192&s)&&(c=(31&f)<<6|63&s,c>127&&(o=c));break;case 3:s=t[i+1],a=t[i+2],128===(192&s)&&128===(192&a)&&(c=(15&f)<<12|(63&s)<<6|63&a,c>2047&&(55296>c||c>57343)&&(o=c));break;case 4:s=t[i+1],a=t[i+2],h=t[i+3],128===(192&s)&&128===(192&a)&&128===(192&h)&&(c=(15&f)<<18|(63&s)<<12|(63&a)<<6|63&h,c>65535&&1114112>c&&(o=c))}}null===o?(o=65533,u=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=u}return decodeCodePointsArray(n)}function decodeCodePointsArray(t){var e=t.length;if(MAX_ARGUMENTS_LENGTH>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=MAX_ARGUMENTS_LENGTH));return r}function asciiSlice(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(127&t[i]);return n}function binarySlice(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(t[i]);return n}function hexSlice(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",f=e;r>f;f++)i+=toHex(t[f]);return i}function utf16leSlice(t,e,r){for(var n=t.slice(e,r),i="",f=0;ft)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function checkInt(t,e,r,n,i,f){if(!Buffer.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(e>i||f>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range")}function objectWriteUInt16(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,f=Math.min(t.length-r,2);f>i;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function objectWriteUInt32(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,f=Math.min(t.length-r,4);f>i;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function checkIEEE754(t,e,r,n,i,f){if(e>i||f>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function writeFloat(t,e,r,n,i){return i||checkIEEE754(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(t,e,r,n,23,4),r+4}function writeDouble(t,e,r,n,i){return i||checkIEEE754(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(t,e,r,n,52,8),r+8}function base64clean(t){if(t=stringtrim(t).replace(INVALID_BASE64_RE,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function stringtrim(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function toHex(t){return 16>t?"0"+t.toString(16):t.toString(16)}function utf8ToBytes(t,e){e=e||1/0;for(var r,n=t.length,i=null,f=[],o=0;n>o;o++){if(r=t.charCodeAt(o),r>55295&&57344>r){if(!i){if(r>56319){(e-=3)>-1&&f.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&f.push(239,191,189);continue}i=r;continue}if(56320>r){(e-=3)>-1&&f.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&f.push(239,191,189);if(i=null,128>r){if((e-=1)<0)break;f.push(r)}else if(2048>r){if((e-=2)<0)break;f.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;f.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))throw new Error("Invalid code point");if((e-=4)<0)break;f.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return f}function asciiToBytes(t){for(var e=[],r=0;r>8,i=r%256,f.push(i),f.push(n);return f}function base64ToBytes(t){return base64.toByteArray(base64clean(t))}function blitBuffer(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);i++)e[i+r]=t[i];return i}var base64=require("base64-js"),ieee754=require("ieee754"),isArray=require("is-array");exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50,Buffer.poolSize=8192;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=void 0!==global.TYPED_ARRAY_SUPPORT?global.TYPED_ARRAY_SUPPORT:typedArraySupport(),Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array),Buffer.isBuffer=function(t){return!(null==t||!t._isBuffer)},Buffer.compare=function(t,e){if(!Buffer.isBuffer(t)||!Buffer.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,f=Math.min(r,n);f>i&&t[i]===e[i];)++i;return i!==f&&(r=t[i],n=e[i]),n>r?-1:r>n?1:0},Buffer.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function(t,e){if(!isArray(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new Buffer(0);var r;if(void 0===e)for(e=0,r=0;r0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),""},Buffer.prototype.compare=function(t){if(!Buffer.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:Buffer.compare(this,t)},Buffer.prototype.indexOf=function(t,e){function r(t,e,r){for(var n=-1,i=0;r+i2147483647?e=2147483647:-2147483648>e&&(e=-2147483648),e>>=0,0===this.length)return-1;if(e>=this.length)return-1;if(0>e&&(e=Math.max(this.length+e,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,e);if(Buffer.isBuffer(t))return r(this,t,e);if("number"==typeof t)return Buffer.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,e):r(this,[t],e);throw new TypeError("val must be string, number or Buffer")},Buffer.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},Buffer.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},Buffer.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=e,e=0|r,r=i}var f=this.length-e;if((void 0===r||r>f)&&(r=f),t.length>0&&(0>r||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return hexWrite(this,t,e,r);case"utf8":case"utf-8":return utf8Write(this,t,e,r);case"ascii":return asciiWrite(this,t,e,r);case"binary":return binaryWrite(this,t,e,r);case"base64":return base64Write(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;Buffer.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),t>e&&(e=t);var n;if(Buffer.TYPED_ARRAY_SUPPORT)n=Buffer._augment(this.subarray(t,e));else{var i=e-t;n=new Buffer(i,void 0);for(var f=0;i>f;f++)n[f]=this[f+t]}return n.length&&(n.parent=this.parent||this),n},Buffer.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||checkOffset(t,e,this.length);for(var n=this[t],i=1,f=0;++f0&&(i*=256);)n+=this[t+--e]*i;return n},Buffer.prototype.readUInt8=function(t,e){return e||checkOffset(t,1,this.length),this[t]},Buffer.prototype.readUInt16LE=function(t,e){return e||checkOffset(t,2,this.length),this[t]|this[t+1]<<8},Buffer.prototype.readUInt16BE=function(t,e){return e||checkOffset(t,2,this.length),this[t]<<8|this[t+1]},Buffer.prototype.readUInt32LE=function(t,e){return e||checkOffset(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Buffer.prototype.readUInt32BE=function(t,e){return e||checkOffset(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Buffer.prototype.readIntLE=function(t,e,r){t=0|t,e=0|e,r||checkOffset(t,e,this.length);for(var n=this[t],i=1,f=0;++f=i&&(n-=Math.pow(2,8*e)),n},Buffer.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||checkOffset(t,e,this.length);for(var n=e,i=1,f=this[t+--n];n>0&&(i*=256);)f+=this[t+--n]*i;return i*=128,f>=i&&(f-=Math.pow(2,8*e)),f},Buffer.prototype.readInt8=function(t,e){return e||checkOffset(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Buffer.prototype.readInt16LE=function(t,e){e||checkOffset(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function(t,e){e||checkOffset(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function(t,e){return e||checkOffset(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Buffer.prototype.readInt32BE=function(t,e){return e||checkOffset(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Buffer.prototype.readFloatLE=function(t,e){return e||checkOffset(t,4,this.length),ieee754.read(this,t,!0,23,4)},Buffer.prototype.readFloatBE=function(t,e){return e||checkOffset(t,4,this.length),ieee754.read(this,t,!1,23,4)},Buffer.prototype.readDoubleLE=function(t,e){return e||checkOffset(t,8,this.length),ieee754.read(this,t,!0,52,8)},Buffer.prototype.readDoubleBE=function(t,e){return e||checkOffset(t,8,this.length),ieee754.read(this,t,!1,52,8)},Buffer.prototype.writeUIntLE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||checkInt(this,t,e,r,Math.pow(2,8*r),0);var i=1,f=0;for(this[e]=255&t;++f=0&&(f*=256);)this[e+i]=t/f&255;return e+r},Buffer.prototype.writeUInt8=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},Buffer.prototype.writeUInt16LE=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):objectWriteUInt16(this,t,e,!0),e+2},Buffer.prototype.writeUInt16BE=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):objectWriteUInt16(this,t,e,!1),e+2},Buffer.prototype.writeUInt32LE=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):objectWriteUInt32(this,t,e,!0),e+4},Buffer.prototype.writeUInt32BE=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):objectWriteUInt32(this,t,e,!1),e+4},Buffer.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);checkInt(this,t,e,r,i-1,-i)}var f=0,o=1,u=0>t?1:0;for(this[e]=255&t;++f>0)-u&255;return e+r},Buffer.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);checkInt(this,t,e,r,i-1,-i)}var f=r-1,o=1,u=0>t?1:0;for(this[e+f]=255&t;--f>=0&&(o*=256);)this[e+f]=(t/o>>0)-u&255;return e+r},Buffer.prototype.writeInt8=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=255&t,e+1},Buffer.prototype.writeInt16LE=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):objectWriteUInt16(this,t,e,!0),e+2},Buffer.prototype.writeInt16BE=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):objectWriteUInt16(this,t,e,!1),e+2},Buffer.prototype.writeInt32LE=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):objectWriteUInt32(this,t,e,!0),e+4},Buffer.prototype.writeInt32BE=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):objectWriteUInt32(this,t,e,!1),e+4},Buffer.prototype.writeFloatLE=function(t,e,r){return writeFloat(this,t,e,!0,r)},Buffer.prototype.writeFloatBE=function(t,e,r){return writeFloat(this,t,e,!1,r)},Buffer.prototype.writeDoubleLE=function(t,e,r){return writeDouble(this,t,e,!0,r)},Buffer.prototype.writeDoubleBE=function(t,e,r){return writeDouble(this,t,e,!1,r)},Buffer.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&r>n&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>n)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-er&&n>e)for(i=f-1;i>=0;i--)t[i+e]=this[i+r];else if(1e3>f||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;f>i;i++)t[i+e]=this[i+r];else t._set(this.subarray(r,r+f),e);return f},Buffer.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new RangeError("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var i=utf8ToBytes(t.toString()),f=i.length;for(n=e;r>n;n++)this[n]=i[n%f]}return this}},Buffer.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(Buffer.TYPED_ARRAY_SUPPORT)return new Buffer(this).buffer;for(var t=new Uint8Array(this.length),e=0,r=t.length;r>e;e+=1)t[e]=this[e];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var BP=Buffer.prototype;Buffer._augment=function(t){return t.constructor=Buffer,t._isBuffer=!0,t._set=t.set,t.get=BP.get,t.set=BP.set,t.write=BP.write,t.toString=BP.toString,t.toLocaleString=BP.toString,t.toJSON=BP.toJSON,t.equals=BP.equals,t.compare=BP.compare,t.indexOf=BP.indexOf,t.copy=BP.copy,t.slice=BP.slice,t.readUIntLE=BP.readUIntLE,t.readUIntBE=BP.readUIntBE,t.readUInt8=BP.readUInt8,t.readUInt16LE=BP.readUInt16LE,t.readUInt16BE=BP.readUInt16BE,t.readUInt32LE=BP.readUInt32LE,t.readUInt32BE=BP.readUInt32BE,t.readIntLE=BP.readIntLE,t.readIntBE=BP.readIntBE,t.readInt8=BP.readInt8,t.readInt16LE=BP.readInt16LE,t.readInt16BE=BP.readInt16BE,t.readInt32LE=BP.readInt32LE,t.readInt32BE=BP.readInt32BE,t.readFloatLE=BP.readFloatLE,t.readFloatBE=BP.readFloatBE,t.readDoubleLE=BP.readDoubleLE,t.readDoubleBE=BP.readDoubleBE,t.writeUInt8=BP.writeUInt8,t.writeUIntLE=BP.writeUIntLE,t.writeUIntBE=BP.writeUIntBE,t.writeUInt16LE=BP.writeUInt16LE,t.writeUInt16BE=BP.writeUInt16BE,t.writeUInt32LE=BP.writeUInt32LE,t.writeUInt32BE=BP.writeUInt32BE,t.writeIntLE=BP.writeIntLE,t.writeIntBE=BP.writeIntBE,t.writeInt8=BP.writeInt8,t.writeInt16LE=BP.writeInt16LE,t.writeInt16BE=BP.writeInt16BE,t.writeInt32LE=BP.writeInt32LE,t.writeInt32BE=BP.writeInt32BE,t.writeFloatLE=BP.writeFloatLE,t.writeFloatBE=BP.writeFloatBE,t.writeDoubleLE=BP.writeDoubleLE,t.writeDoubleBE=BP.writeDoubleBE,t.fill=BP.fill,t.inspect=BP.inspect,t.toArrayBuffer=BP.toArrayBuffer,t};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"base64-js":10,"ieee754":11,"is-array":12}],10:[function(require,module,exports){
var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function r(t){var r=t.charCodeAt(0);return r===h||r===u?62:r===c||r===f?63:o>r?-1:o+10>r?r-o+26+26:i+26>r?r-i:A+26>r?r-A+26:void 0}function e(t){function e(t){i[f++]=t}var n,h,c,o,A,i;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var u=t.length;A="="===t.charAt(u-2)?2:"="===t.charAt(u-1)?1:0,i=new a(3*t.length/4-A),c=A>0?t.length-4:t.length;var f=0;for(n=0,h=0;c>n;n+=4,h+=3)o=r(t.charAt(n))<<18|r(t.charAt(n+1))<<12|r(t.charAt(n+2))<<6|r(t.charAt(n+3)),e((16711680&o)>>16),e((65280&o)>>8),e(255&o);return 2===A?(o=r(t.charAt(n))<<2|r(t.charAt(n+1))>>4,e(255&o)):1===A&&(o=r(t.charAt(n))<<10|r(t.charAt(n+1))<<4|r(t.charAt(n+2))>>2,e(o>>8&255),e(255&o)),i}function n(t){function r(t){return lookup.charAt(t)}function e(t){return r(t>>18&63)+r(t>>12&63)+r(t>>6&63)+r(63&t)}var n,a,h,c=t.length%3,o="";for(n=0,h=t.length-c;h>n;n+=3)a=(t[n]<<16)+(t[n+1]<<8)+t[n+2],o+=e(a);switch(c){case 1:a=t[t.length-1],o+=r(a>>2),o+=r(a<<4&63),o+="==";break;case 2:a=(t[t.length-2]<<8)+t[t.length-1],o+=r(a>>10),o+=r(a>>4&63),o+=r(a<<2&63),o+="="}return o}var a="undefined"!=typeof Uint8Array?Uint8Array:Array,h="+".charCodeAt(0),c="/".charCodeAt(0),o="0".charCodeAt(0),A="a".charCodeAt(0),i="A".charCodeAt(0),u="-".charCodeAt(0),f="_".charCodeAt(0);t.toByteArray=e,t.fromByteArray=n}("undefined"==typeof exports?this.base64js={}:exports);
},{}],11:[function(require,module,exports){
exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:(s?-1:1)*(1/0);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=0>o||0===o&&0>1/o?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),o+=p+N>=1?n/f:n*Math.pow(2,1-N),o*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};
},{}],12:[function(require,module,exports){
var isArray=Array.isArray,str=Object.prototype.toString;module.exports=isArray||function(r){return!!r&&"[object Array]"==str.call(r)};
},{}],13:[function(require,module,exports){
module.exports=function(){var r=require("events"),t={};return t.createDomain=t.create=function(){function t(r){e.emit("error",r)}var e=new r.EventEmitter;return e.add=function(r){r.on("error",t)},e.remove=function(r){r.removeListener("error",t)},e.bind=function(r){return function(){var e=Array.prototype.slice.call(arguments);try{r.apply(null,e)}catch(n){t(n)}}},e.intercept=function(r){return function(e){if(e)t(e);else{var n=Array.prototype.slice.call(arguments,1);try{r.apply(null,n)}catch(e){t(e)}}}},e.run=function(r){try{r()}catch(e){t(e)}return this},e.dispose=function(){return this.removeAllListeners(),this},e.enter=e.exit=function(){return this},e},t}.call(this);
},{"events":14}],14:[function(require,module,exports){
function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(e){return"function"==typeof e}function isNumber(e){return"number"==typeof e}function isObject(e){return"object"==typeof e&&null!==e}function isUndefined(e){return void 0===e}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(e){if(!isNumber(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},EventEmitter.prototype.emit=function(e){var t,n,s,i,r,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],isUndefined(n))return!1;if(isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(s=arguments.length,i=new Array(s-1),r=1;s>r;r++)i[r-1]=arguments[r];n.apply(this,i)}else if(isObject(n)){for(s=arguments.length,i=new Array(s-1),r=1;s>r;r++)i[r-1]=arguments[r];for(o=n.slice(),s=o.length,r=0;s>r;r++)o[r].apply(this,i)}return!0},EventEmitter.prototype.addListener=function(e,t){var n;if(!isFunction(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,isFunction(t.listener)?t.listener:t),this._events[e]?isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,isObject(this._events[e])&&!this._events[e].warned){var n;n=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(e,t){function n(){this.removeListener(e,n),s||(s=!0,t.apply(this,arguments))}if(!isFunction(t))throw TypeError("listener must be a function");var s=!1;return n.listener=t,this.on(e,n),this},EventEmitter.prototype.removeListener=function(e,t){var n,s,i,r;if(!isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],i=n.length,s=-1,n===t||isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(isObject(n)){for(r=i;r-- >0;)if(n[r]===t||n[r].listener&&n[r].listener===t){s=r;break}if(0>s)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(s,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},EventEmitter.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],isFunction(n))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},EventEmitter.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},EventEmitter.listenerCount=function(e,t){var n;return n=e._events&&e._events[t]?isFunction(e._events[t])?1:e._events[t].length:0};
},{}],15:[function(require,module,exports){
module.exports=function(r){return!(null==r||!(r._isBuffer||r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(r)))};
},{}],16:[function(require,module,exports){
module.exports=Array.isArray||function(r){return"[object Array]"==Object.prototype.toString.call(r)};
},{}],17:[function(require,module,exports){
function cleanUpNextTick(){draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue()}function drainQueue(){if(!draining){var e=setTimeout(cleanUpNextTick);draining=!0;for(var n=queue.length;n;){for(currentQueue=queue,queue=[];++queueIndex1)for(var r=1;r1&&(t=r[0]+"@",e=r[1]),e=e.replace(S,".");var u=e.split("."),i=n(u,o).join(".");return t+i}function t(e){for(var o,n,r=[],t=0,u=e.length;u>t;)o=e.charCodeAt(t++),o>=55296&&56319>=o&&u>t?(n=e.charCodeAt(t++),56320==(64512&n)?r.push(((1023&o)<<10)+(1023&n)+65536):(r.push(o),t--)):r.push(o);return r}function u(e){return n(e,function(e){var o="";return e>65535&&(e-=65536,o+=P(e>>>10&1023|55296),e=56320|1023&e),o+=P(e)}).join("")}function i(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:b}function f(e,o){return e+22+75*(26>e)-((0!=o)<<5)}function c(e,o,n){var r=0;for(e=n?M(e/j):e>>1,e+=M(e/o);e>L*C>>1;r+=b)e=M(e/L);return M(r+(L+1)*e/(e+m))}function l(e){var n,r,t,f,l,s,d,a,p,h,v=[],g=e.length,w=0,m=I,j=A;for(r=e.lastIndexOf(E),0>r&&(r=0),t=0;r>t;++t)e.charCodeAt(t)>=128&&o("not-basic"),v.push(e.charCodeAt(t));for(f=r>0?r+1:0;g>f;){for(l=w,s=1,d=b;f>=g&&o("invalid-input"),a=i(e.charCodeAt(f++)),(a>=b||a>M((x-w)/s))&&o("overflow"),w+=a*s,p=j>=d?y:d>=j+C?C:d-j,!(p>a);d+=b)h=b-p,s>M(x/h)&&o("overflow"),s*=h;n=v.length+1,j=c(w-l,n,0==l),M(w/n)>x-m&&o("overflow"),m+=M(w/n),w%=n,v.splice(w++,0,m)}return u(v)}function s(e){var n,r,u,i,l,s,d,a,p,h,v,g,w,m,j,F=[];for(e=t(e),g=e.length,n=I,r=0,l=A,s=0;g>s;++s)v=e[s],128>v&&F.push(P(v));for(u=i=F.length,i&&F.push(E);g>u;){for(d=x,s=0;g>s;++s)v=e[s],v>=n&&d>v&&(d=v);for(w=u+1,d-n>M((x-r)/w)&&o("overflow"),r+=(d-n)*w,n=d,s=0;g>s;++s)if(v=e[s],n>v&&++r>x&&o("overflow"),v==n){for(a=r,p=b;h=l>=p?y:p>=l+C?C:p-l,!(h>a);p+=b)j=a-h,m=b-h,F.push(P(f(h+j%m,0))),a=M(j/m);F.push(P(f(a,0))),l=c(r,w,u==i),r=0,++u}++r,++n}return F.join("")}function d(e){return r(e,function(e){return F.test(e)?l(e.slice(4).toLowerCase()):e})}function a(e){return r(e,function(e){return O.test(e)?"xn--"+s(e):e})}var p="object"==typeof exports&&exports&&!exports.nodeType&&exports,h="object"==typeof module&&module&&!module.nodeType&&module,v="object"==typeof global&&global;(v.global===v||v.window===v||v.self===v)&&(e=v);var g,w,x=2147483647,b=36,y=1,C=26,m=38,j=700,A=72,I=128,E="-",F=/^xn--/,O=/[^\x20-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=b-y,M=Math.floor,P=String.fromCharCode;if(g={version:"1.3.2",ucs2:{decode:t,encode:u},decode:l,encode:s,toASCII:a,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return g});else if(p&&h)if(module.exports==p)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(p[w]=g[w]);else e.punycode=g}(this);
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],19:[function(require,module,exports){
"use strict";function hasOwnProperty(r,e){return Object.prototype.hasOwnProperty.call(r,e)}module.exports=function(r,e,t,n){e=e||"&",t=t||"=";var o={};if("string"!=typeof r||0===r.length)return o;var a=/\+/g;r=r.split(e);var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var p=r.length;s>0&&p>s&&(p=s);for(var y=0;p>y;++y){var u,c,i,l,f=r[y].replace(a,"%20"),v=f.indexOf(t);v>=0?(u=f.substr(0,v),c=f.substr(v+1)):(u=f,c=""),i=decodeURIComponent(u),l=decodeURIComponent(c),hasOwnProperty(o,i)?isArray(o[i])?o[i].push(l):o[i]=[o[i],l]:o[i]=l}return o};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)};
},{}],20:[function(require,module,exports){
"use strict";function map(r,e){if(r.map)return r.map(e);for(var t=[],n=0;ni;i++)t(e[i],i)}module.exports=Duplex;var objectKeys=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t},util=require("core-util-is");util.inherits=require("inherits");var Readable=require("./_stream_readable"),Writable=require("./_stream_writable");util.inherits(Duplex,Readable),forEach(objectKeys(Writable.prototype),function(e){Duplex.prototype[e]||(Duplex.prototype[e]=Writable.prototype[e])});
}).call(this,require('_process'))
},{"./_stream_readable":25,"./_stream_writable":27,"_process":17,"core-util-is":28,"inherits":"inherits"}],24:[function(require,module,exports){
function PassThrough(r){return this instanceof PassThrough?void Transform.call(this,r):new PassThrough(r)}module.exports=PassThrough;var Transform=require("./_stream_transform"),util=require("core-util-is");util.inherits=require("inherits"),util.inherits(PassThrough,Transform),PassThrough.prototype._transform=function(r,s,i){i(null,r)};
},{"./_stream_transform":26,"core-util-is":28,"inherits":"inherits"}],25:[function(require,module,exports){
(function (process){
function ReadableState(e,t){var n=require("./_stream_duplex");e=e||{};var r=e.highWaterMark,i=e.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!e.objectMode,t instanceof n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder),this.decoder=new StringDecoder(e.encoding),this.encoding=e.encoding)}function Readable(e){require("./_stream_duplex");return this instanceof Readable?(this._readableState=new ReadableState(e,this),this.readable=!0,void Stream.call(this)):new Readable(e)}function readableAddChunk(e,t,n,r,i){var a=chunkInvalid(t,n);if(a)e.emit("error",a);else if(util.isNullOrUndefined(n))t.reading=!1,t.ended||onEofChunk(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var d=new Error("stream.push() after EOF");e.emit("error",d)}else if(t.endEmitted&&i){var d=new Error("stream.unshift() after end event");e.emit("error",d)}else!t.decoder||i||r||(n=t.decoder.write(n)),i||(t.reading=!1),t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&emitReadable(e)),maybeReadMore(e,t);else i||(t.reading=!1);return needMoreData(t)}function needMoreData(e){return!e.ended&&(e.needReadable||e.length=MAX_HWM)e=MAX_HWM;else{e--;for(var t=1;32>t;t<<=1)e|=e>>t;e++}return e}function howMuchToRead(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||util.isNull(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:0>=e?0:(e>t.highWaterMark&&(t.highWaterMark=roundUpToNextPowerOf2(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function chunkInvalid(e,t){var n=null;return util.isBuffer(t)||util.isString(t)||util.isNullOrUndefined(t)||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function onEofChunk(e,t){if(t.decoder&&!t.ended){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,emitReadable(e)}function emitReadable(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(debug("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?process.nextTick(function(){emitReadable_(e)}):emitReadable_(e))}function emitReadable_(e){debug("emit readable"),e.emit("readable"),flow(e)}function maybeReadMore(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(function(){maybeReadMore_(e,t)}))}function maybeReadMore_(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=i)n=a?r.join(""):Buffer.concat(r,i),r.length=0;else if(eu&&e>l;u++){var o=r[0],h=Math.min(e-l,o.length);a?n+=o.slice(0,h):o.copy(n,l,0,h),h0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,process.nextTick(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function forEach(e,t){for(var n=0,r=e.length;r>n;n++)t(e[n],n)}function indexOf(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}module.exports=Readable;var isArray=require("isarray"),Buffer=require("buffer").Buffer;Readable.ReadableState=ReadableState;var EE=require("events").EventEmitter;EE.listenerCount||(EE.listenerCount=function(e,t){return e.listeners(t).length});var Stream=require("stream"),util=require("core-util-is");util.inherits=require("inherits");var StringDecoder,debug=require("util");debug=debug&&debug.debuglog?debug.debuglog("stream"):function(){},util.inherits(Readable,Stream),Readable.prototype.push=function(e,t){var n=this._readableState;return util.isString(e)&&!n.objectMode&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=new Buffer(e,t),t="")),readableAddChunk(this,n,e,t,!1)},Readable.prototype.unshift=function(e){var t=this._readableState;return readableAddChunk(this,t,e,"",!0)},Readable.prototype.setEncoding=function(e){return StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder),this._readableState.decoder=new StringDecoder(e),this._readableState.encoding=e,this};var MAX_HWM=8388608;Readable.prototype.read=function(e){debug("read",e);var t=this._readableState,n=e;if((!util.isNumber(e)||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return debug("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?endReadable(this):emitReadable(this),null;if(e=howMuchToRead(e,t),0===e&&t.ended)return 0===t.length&&endReadable(this),null;var r=t.needReadable;debug("need readable",r),(0===t.length||t.length-e0?fromList(e,t):null,util.isNull(i)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),n!==e&&t.ended&&0===t.length&&endReadable(this),util.isNull(i)||this.emit("data",i),i},Readable.prototype._read=function(e){this.emit("error",new Error("not implemented"))},Readable.prototype.pipe=function(e,t){function n(e){debug("onunpipe"),e===s&&i()}function r(){debug("onend"),e.end()}function i(){debug("cleanup"),e.removeListener("close",o),e.removeListener("finish",l),e.removeListener("drain",g),e.removeListener("error",d),e.removeListener("unpipe",n),s.removeListener("end",r),s.removeListener("end",i),s.removeListener("data",a),!h.awaitDrain||e._writableState&&!e._writableState.needDrain||g()}function a(t){debug("ondata");var n=e.write(t);!1===n&&(debug("false write response, pause",s._readableState.awaitDrain),s._readableState.awaitDrain++,s.pause())}function d(t){debug("onerror",t),u(),e.removeListener("error",d),0===EE.listenerCount(e,"error")&&e.emit("error",t)}function o(){e.removeListener("finish",l),u()}function l(){debug("onfinish"),e.removeListener("close",o),u()}function u(){debug("unpipe"),s.unpipe(e)}var s=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,debug("pipe count=%d opts=%j",h.pipesCount,t);var f=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,b=f?r:i;h.endEmitted?process.nextTick(b):s.once("end",b),e.on("unpipe",n);var g=pipeOnDrain(s);return e.on("drain",g),s.on("data",a),e._events&&e._events.error?isArray(e._events.error)?e._events.error.unshift(d):e._events.error=[d,e._events.error]:e.on("error",d),e.once("close",o),e.once("finish",l),e.emit("pipe",s),h.flowing||(debug("pipe resume"),s.resume()),e},Readable.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;r>i;i++)n[i].emit("unpipe",this);return this}var i=indexOf(t.pipes,e);return-1===i?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},Readable.prototype.on=function(e,t){var n=Stream.prototype.on.call(this,e,t);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&this.readable){var r=this._readableState;if(!r.readableListening)if(r.readableListening=!0,r.emittedReadable=!1,r.needReadable=!0,r.reading)r.length&&emitReadable(this,r);else{var i=this;process.nextTick(function(){debug("readable nexttick read 0"),i.read(0)})}}return n},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){var e=this._readableState;return e.flowing||(debug("resume"),e.flowing=!0,e.reading||(debug("resume read 0"),this.read(0)),resume(this,e)),this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Readable.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(debug("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(i){if(debug("wrapped data"),t.decoder&&(i=t.decoder.write(i)),i&&(t.objectMode||i.length)){var a=r.push(i);a||(n=!0,e.pause())}});for(var i in e)util.isFunction(e[i])&&util.isUndefined(this[i])&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));var a=["error","close","destroy","pause","resume"];return forEach(a,function(t){e.on(t,r.emit.bind(r,t))}),r._read=function(t){debug("wrapped _read",t),n&&(n=!1,e.resume())},r},Readable._fromList=fromList;
}).call(this,require('_process'))
},{"./_stream_duplex":23,"_process":17,"buffer":9,"core-util-is":28,"events":14,"inherits":"inherits","isarray":16,"stream":33,"string_decoder/":34,"util":8}],26:[function(require,module,exports){
function TransformState(r,t){this.afterTransform=function(r,n){return afterTransform(t,r,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function afterTransform(r,t,n){var e=r._transformState;e.transforming=!1;var i=e.writecb;if(!i)return r.emit("error",new Error("no writecb in Transform class"));e.writechunk=null,e.writecb=null,util.isNullOrUndefined(n)||r.push(n),i&&i(t);var a=r._readableState;a.reading=!1,(a.needReadable||a.length1){for(var t=[],r=0;r=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&56319>=h)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,h=t.charCodeAt(i);if(h>=55296&&56319>=h){var c=this.surrogateSize;return this.charLength+=c,this.charReceived+=c,this.charBuffer.copy(this.charBuffer,c,0,c),e.copy(this.charBuffer,0,0,c),t.substring(0,i)}return t},StringDecoder.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(2>=t&&r>>4==14){this.charLength=3;break}if(3>=t&&r>>3==30){this.charLength=4;break}}this.charReceived=t},StringDecoder.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,h=this.charBuffer,i=this.encoding;t+=h.slice(0,r).toString(i)}return t};
},{"buffer":9}],35:[function(require,module,exports){
function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function urlParse(t,s,e){if(t&&isObject(t)&&t instanceof Url)return t;var h=new Url;return h.parse(t,s,e),h}function urlFormat(t){return isString(t)&&(t=urlParse(t)),t instanceof Url?t.format():Url.prototype.format.call(t)}function urlResolve(t,s){return urlParse(t,!1,!0).resolve(s)}function urlResolveObject(t,s){return t?urlParse(t,!1,!0).resolveObject(s):s}function isString(t){return"string"==typeof t}function isObject(t){return"object"==typeof t&&null!==t}function isNull(t){return null===t}function isNullOrUndefined(t){return null==t}var punycode=require("punycode");exports.parse=urlParse,exports.resolve=urlResolve,exports.resolveObject=urlResolveObject,exports.format=urlFormat,exports.Url=Url;var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,delims=["<",">",'"',"`"," ","\r","\n"," "],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require("querystring");Url.prototype.parse=function(t,s,e){if(!isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var h=t;h=h.trim();var r=protocolPattern.exec(h);if(r){r=r[0];var o=r.toLowerCase();this.protocol=o,h=h.substr(r.length)}if(e||r||h.match(/^\/\/[^@\/]+@[^@\/]+/)){var a="//"===h.substr(0,2);!a||r&&hostlessProtocol[r]||(h=h.substr(2),this.slashes=!0)}if(!hostlessProtocol[r]&&(a||r&&!slashedProtocol[r])){for(var n=-1,i=0;il)&&(n=l)}var c,u;u=-1===n?h.lastIndexOf("@"):h.lastIndexOf("@",n),-1!==u&&(c=h.slice(0,u),h=h.slice(u+1),this.auth=decodeURIComponent(c)),n=-1;for(var i=0;il)&&(n=l)}-1===n&&(n=h.length),this.host=h.slice(0,n),h=h.slice(n),this.parseHost(),this.hostname=this.hostname||"";var p="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!p)for(var f=this.hostname.split(/\./),i=0,m=f.length;m>i;i++){var v=f[i];if(v&&!v.match(hostnamePartPattern)){for(var g="",y=0,d=v.length;d>y;y++)g+=v.charCodeAt(y)>127?"x":v[y];if(!g.match(hostnamePartPattern)){var P=f.slice(0,i),b=f.slice(i+1),j=v.match(hostnamePartStart);j&&(P.push(j[1]),b.unshift(j[2])),b.length&&(h="/"+b.join(".")+h),this.hostname=P.join(".");break}}}if(this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),!p){for(var O=this.hostname.split("."),q=[],i=0;ii;i++){var A=autoEscape[i],E=encodeURIComponent(A);E===A&&(E=escape(A)),h=h.split(A).join(E)}var w=h.indexOf("#");-1!==w&&(this.hash=h.substr(w),h=h.slice(0,w));var R=h.indexOf("?");if(-1!==R?(this.search=h.substr(R),this.query=h.substr(R+1),s&&(this.query=querystring.parse(this.query)),h=h.slice(0,R)):s&&(this.search="",this.query={}),h&&(this.pathname=h),slashedProtocol[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var U=this.pathname||"",x=this.search||"";this.path=U+x}return this.href=this.format(),this},Url.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var s=this.protocol||"",e=this.pathname||"",h=this.hash||"",r=!1,o="";this.host?r=t+this.host:this.hostname&&(r=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&isObject(this.query)&&Object.keys(this.query).length&&(o=querystring.stringify(this.query));var a=this.search||o&&"?"+o||"";return s&&":"!==s.substr(-1)&&(s+=":"),this.slashes||(!s||slashedProtocol[s])&&r!==!1?(r="//"+(r||""),e&&"/"!==e.charAt(0)&&(e="/"+e)):r||(r=""),h&&"#"!==h.charAt(0)&&(h="#"+h),a&&"?"!==a.charAt(0)&&(a="?"+a),e=e.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),a=a.replace("#","%23"),s+r+e+a+h},Url.prototype.resolve=function(t){return this.resolveObject(urlParse(t,!1,!0)).format()},Url.prototype.resolveObject=function(t){if(isString(t)){var s=new Url;s.parse(t,!1,!0),t=s}var e=new Url;if(Object.keys(this).forEach(function(t){e[t]=this[t]},this),e.hash=t.hash,""===t.href)return e.href=e.format(),e;if(t.slashes&&!t.protocol)return Object.keys(t).forEach(function(s){"protocol"!==s&&(e[s]=t[s])}),slashedProtocol[e.protocol]&&e.hostname&&!e.pathname&&(e.path=e.pathname="/"),e.href=e.format(),e;if(t.protocol&&t.protocol!==e.protocol){if(!slashedProtocol[t.protocol])return Object.keys(t).forEach(function(s){e[s]=t[s]}),e.href=e.format(),e;if(e.protocol=t.protocol,t.host||hostlessProtocol[t.protocol])e.pathname=t.pathname;else{for(var h=(t.pathname||"").split("/");h.length&&!(t.host=h.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),e.pathname=h.join("/")}if(e.search=t.search,e.query=t.query,e.host=t.host||"",e.auth=t.auth,e.hostname=t.hostname||t.host,e.port=t.port,e.pathname||e.search){var r=e.pathname||"",o=e.search||"";e.path=r+o}return e.slashes=e.slashes||t.slashes,e.href=e.format(),e}var a=e.pathname&&"/"===e.pathname.charAt(0),n=t.host||t.pathname&&"/"===t.pathname.charAt(0),i=n||a||e.host&&t.pathname,l=i,c=e.pathname&&e.pathname.split("/")||[],h=t.pathname&&t.pathname.split("/")||[],u=e.protocol&&!slashedProtocol[e.protocol];if(u&&(e.hostname="",e.port=null,e.host&&(""===c[0]?c[0]=e.host:c.unshift(e.host)),e.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===h[0]?h[0]=t.host:h.unshift(t.host)),t.host=null),i=i&&(""===h[0]||""===c[0])),n)e.host=t.host||""===t.host?t.host:e.host,e.hostname=t.hostname||""===t.hostname?t.hostname:e.hostname,e.search=t.search,e.query=t.query,c=h;else if(h.length)c||(c=[]),c.pop(),c=c.concat(h),e.search=t.search,e.query=t.query;else if(!isNullOrUndefined(t.search)){if(u){e.hostname=e.host=c.shift();var p=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;p&&(e.auth=p.shift(),e.host=e.hostname=p.shift())}return e.search=t.search,e.query=t.query,isNull(e.pathname)&&isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!c.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var f=c.slice(-1)[0],m=(e.host||t.host)&&("."===f||".."===f)||""===f,v=0,g=c.length;g>=0;g--)f=c[g],"."==f?c.splice(g,1):".."===f?(c.splice(g,1),v++):v&&(c.splice(g,1),v--);if(!i&&!l)for(;v--;v)c.unshift("..");!i||""===c[0]||c[0]&&"/"===c[0].charAt(0)||c.unshift(""),m&&"/"!==c.join("/").substr(-1)&&c.push("");var y=""===c[0]||c[0]&&"/"===c[0].charAt(0);if(u){e.hostname=e.host=y?"":c.length?c.shift():"";var p=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;p&&(e.auth=p.shift(),e.host=e.hostname=p.shift())}return i=i||e.host&&c.length,i&&!y&&c.unshift(""),c.length?e.pathname=c.join("/"):(e.pathname=null,e.path=null),isNull(e.pathname)&&isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},Url.prototype.parseHost=function(){var t=this.host,s=portPattern.exec(t);s&&(s=s[0],":"!==s&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t)};
},{"punycode":18,"querystring":21}],36:[function(require,module,exports){
module.exports=function(o){return o&&"object"==typeof o&&"function"==typeof o.copy&&"function"==typeof o.fill&&"function"==typeof o.readUInt8};
},{}],37:[function(require,module,exports){
(function (process,global){
function inspect(e,r){var t={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),isBoolean(r)?t.showHidden=r:r&&exports._extend(t,r),isUndefined(t.showHidden)&&(t.showHidden=!1),isUndefined(t.depth)&&(t.depth=2),isUndefined(t.colors)&&(t.colors=!1),isUndefined(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=stylizeWithColor),formatValue(t,e,t.depth)}function stylizeWithColor(e,r){var t=inspect.styles[r];return t?"["+inspect.colors[t][0]+"m"+e+"["+inspect.colors[t][1]+"m":e}function stylizeNoColor(e,r){return e}function arrayToHash(e){var r={};return e.forEach(function(e,t){r[e]=!0}),r}function formatValue(e,r,t){if(e.customInspect&&r&&isFunction(r.inspect)&&r.inspect!==exports.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(t,e);return isString(n)||(n=formatValue(e,n,t)),n}var i=formatPrimitive(e,r);if(i)return i;var o=Object.keys(r),s=arrayToHash(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),isError(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return formatError(r);if(0===o.length){if(isFunction(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(isRegExp(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(isDate(r))return e.stylize(Date.prototype.toString.call(r),"date");if(isError(r))return formatError(r)}var a="",c=!1,l=["{","}"];if(isArray(r)&&(c=!0,l=["[","]"]),isFunction(r)){var p=r.name?": "+r.name:"";a=" [Function"+p+"]"}if(isRegExp(r)&&(a=" "+RegExp.prototype.toString.call(r)),isDate(r)&&(a=" "+Date.prototype.toUTCString.call(r)),isError(r)&&(a=" "+formatError(r)),0===o.length&&(!c||0==r.length))return l[0]+a+l[1];if(0>t)return isRegExp(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var f;return f=c?formatArray(e,r,t,s,o):o.map(function(n){return formatProperty(e,r,t,s,n,c)}),e.seen.pop(),reduceToSingleString(f,a,l)}function formatPrimitive(e,r){if(isUndefined(r))return e.stylize("undefined","undefined");if(isString(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}return isNumber(r)?e.stylize(""+r,"number"):isBoolean(r)?e.stylize(""+r,"boolean"):isNull(r)?e.stylize("null","null"):void 0}function formatError(e){return"["+Error.prototype.toString.call(e)+"]"}function formatArray(e,r,t,n,i){for(var o=[],s=0,u=r.length;u>s;++s)hasOwnProperty(r,String(s))?o.push(formatProperty(e,r,t,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(formatProperty(e,r,t,n,i,!0))}),o}function formatProperty(e,r,t,n,i,o){var s,u,a;if(a=Object.getOwnPropertyDescriptor(r,i)||{value:r[i]},a.get?u=a.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):a.set&&(u=e.stylize("[Setter]","special")),hasOwnProperty(n,i)||(s="["+i+"]"),u||(e.seen.indexOf(a.value)<0?(u=isNull(t)?formatValue(e,a.value,null):formatValue(e,a.value,t-1),u.indexOf("\n")>-1&&(u=o?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n"))):u=e.stylize("[Circular]","special")),isUndefined(s)){if(o&&i.match(/^\d+$/))return u;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+u}function reduceToSingleString(e,r,t){var n=0,i=e.reduce(function(e,r){return n++,r.indexOf("\n")>=0&&n++,e+r.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?t[0]+(""===r?"":r+"\n ")+" "+e.join(",\n ")+" "+t[1]:t[0]+r+" "+e.join(", ")+" "+t[1]}function isArray(e){return Array.isArray(e)}function isBoolean(e){return"boolean"==typeof e}function isNull(e){return null===e}function isNullOrUndefined(e){return null==e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function isSymbol(e){return"symbol"==typeof e}function isUndefined(e){return void 0===e}function isRegExp(e){return isObject(e)&&"[object RegExp]"===objectToString(e)}function isObject(e){return"object"==typeof e&&null!==e}function isDate(e){return isObject(e)&&"[object Date]"===objectToString(e)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(e){return"function"==typeof e}function isPrimitive(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function objectToString(e){return Object.prototype.toString.call(e)}function pad(e){return 10>e?"0"+e.toString(10):e.toString(10)}function timestamp(){var e=new Date,r=[pad(e.getHours()),pad(e.getMinutes()),pad(e.getSeconds())].join(":");return[e.getDate(),months[e.getMonth()],r].join(" ")}function hasOwnProperty(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var formatRegExp=/%[sdj%]/g;exports.format=function(e){if(!isString(e)){for(var r=[],t=0;t=i)return e;switch(e){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(r){return"[Circular]"}default:return e}}),s=n[t];i>t;s=n[++t])o+=isNull(s)||!isObject(s)?" "+s:" "+inspect(s);return o},exports.deprecate=function(e,r){function t(){if(!n){if(process.throwDeprecation)throw new Error(r);process.traceDeprecation?console.trace(r):console.error(r),n=!0}return e.apply(this,arguments)}if(isUndefined(global.process))return function(){return exports.deprecate(e,r).apply(this,arguments)};if(process.noDeprecation===!0)return e;var n=!1;return t};var debugs={},debugEnviron;exports.debuglog=function(e){if(isUndefined(debugEnviron)&&(debugEnviron=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!debugs[e])if(new RegExp("\\b"+e+"\\b","i").test(debugEnviron)){var r=process.pid;debugs[e]=function(){var t=exports.format.apply(exports,arguments);console.error("%s %d: %s",e,r,t)}}else debugs[e]=function(){};return debugs[e]},exports.inspect=inspect,inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=require("./support/isBuffer");var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))},exports.inherits=require("inherits"),exports._extend=function(e,r){if(!r||!isObject(r))return e;for(var t=Object.keys(r),n=t.length;n--;)e[t[n]]=r[t[n]];return e};
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./support/isBuffer":36,"_process":17,"inherits":"inherits"}],38:[function(require,module,exports){
function ChecktypeError(e,r,c){return SyntaxError(e+" param should be a "+(r.name||r)+", not "+c.constructor.name)}function checkArray(e,r,c){if(!(c instanceof Array))throw ChecktypeError(r,"Array of "+e,c);c.forEach(function(c,n){checkType(e,r+"["+n+"]",c)})}function checkBoolean(e,r){if("boolean"!=typeof r)throw ChecktypeError(e,Boolean,r)}function checkNumber(e,r){if("number"!=typeof r)throw ChecktypeError(e,Number,r)}function checkInteger(e,r){if(!Number.isInteger(r))throw ChecktypeError(e,"Integer",r)}function checkObject(e,r){if("object"!=typeof r)throw ChecktypeError(e,Object,r)}function checkString(e,r){if("string"!=typeof r)throw ChecktypeError(e,String,r)}function checkType(e,r,c,n){if(n=n||{},void 0!=c){if(n.isArray)return checkArray(e,r,c);var t=checkType[e];if(t)return t(r,c);console.warn("Could not check "+r+", unknown type "+e)}else if(n.required)throw SyntaxError(r+" param is required")}function checkParams(e,r,c){var n={};for(var t in r){var o=e[t],h=r[t];checkType(h.type,t,o,h),void 0!=o&&(n[t]=o,delete e[t])}return Object.keys(e).length&&console.warn("Unused params for "+c+":",e),n}function checkMethodParams(e,r){for(var c,n={},t=0;c=r[t];t++){var o=c.name,h=e[t];checkType(c.type,o,h,c),n[o]=h}var a=e.slice(t);return a.length&&console.warning("Unused params:",a),n}Number.isInteger||(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&e>-9007199254740992&&9007199254740992>e&&Math.floor(e)===e}),module.exports=checkType,checkType.checkArray=checkArray,checkType.checkParams=checkParams,checkType.ChecktypeError=ChecktypeError,checkType["boolean"]=checkBoolean,checkType["double"]=checkNumber,checkType["float"]=checkNumber,checkType["int"]=checkInteger,checkType.Object=checkObject,checkType.String=checkString;
},{}],39:[function(require,module,exports){
Object.defineProperty(Error.prototype,"toJSON",{value:function(){var t={};return Object.getOwnPropertyNames(this).forEach(function(r){t[r]=this[r]},this),t},configurable:!0});
},{}],40:[function(require,module,exports){
var hasOwn=Object.prototype.hasOwnProperty,toStr=Object.prototype.toString,undefined,isArray=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===toStr.call(t)},isPlainObject=function(t){"use strict";if(!t||"[object Object]"!==toStr.call(t))return!1;var r=hasOwn.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&hasOwn.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var o;for(o in t);return o===undefined||hasOwn.call(t,o)};module.exports=function t(){"use strict";var r,n,o,e,c,a,i=arguments[0],s=1,u=arguments.length,l=!1;for("boolean"==typeof i?(l=i,i=arguments[1]||{},s=2):("object"!=typeof i&&"function"!=typeof i||null==i)&&(i={});u>s;++s)if(r=arguments[s],null!=r)for(n in r)o=i[n],e=r[n],i!==e&&(l&&e&&(isPlainObject(e)||(c=isArray(e)))?(c?(c=!1,a=o&&isArray(o)?o:[]):a=o&&isPlainObject(o)?o:{},i[n]=t(l,a,e)):e!==undefined&&(i[n]=e));return i};
},{}],41:[function(require,module,exports){
function HubPort(){HubPort.super_.call(this)}function checkHubPort(e,r){if(!(r instanceof HubPort))throw ChecktypeError(e,HubPort,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,MediaElement=require("./abstracts/MediaElement");inherits(HubPort,MediaElement),HubPort.constructorParams={hub:{type:"Hub",required:!0}},HubPort.events=MediaElement.events,module.exports=HubPort,HubPort.check=checkHubPort;
},{"./abstracts/MediaElement":48,"inherits":"inherits","kurento-client":"kurento-client"}],42:[function(require,module,exports){
function noop(e,t){return e&&console.trace(e),t}function MediaPipeline(e){function t(e,t,n){return e?transactionOperation.call(e,"create",t,n):r.length?transactionOperation.call(r,"create",t,n):void a.emit("_create",void 0,t,n)}function n(e,t,n,i){return e?transactionOperation.call(e,t,n,i):r.length?transactionOperation.call(r,t,n,i):void a.emit("_rpc",void 0,t,n,i)}function i(e,t){var n={operations:e};return r.length?transactionOperation.call(r,"transaction",n,t):void a.emit("_transaction",n,t)}MediaPipeline.super_.call(this);var a=this,r=new TransactionsManager(this,i);this.beginTransaction=r.beginTransaction.bind(r),this.endTransaction=r.endTransaction.bind(r),this.transaction=r.transaction.bind(r);var o=this.emit.bind(this,"_describe"),s=new MediaObjectCreator(this,t,n,i,o,e);this.create=s.create.bind(s)}function checkMediaPipeline(e,t){if(!(t instanceof MediaPipeline))throw ChecktypeError(e,MediaPipeline,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,MediaObjectCreator=kurentoClient.MediaObjectCreator,TransactionsManager=kurentoClient.TransactionsManager,transactionOperation=TransactionsManager.transactionOperation,MediaObject=require("./abstracts/MediaObject");inherits(MediaPipeline,MediaObject),MediaPipeline.prototype.getLatencyStats=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getLatencyStats",e),this)},MediaPipeline.prototype.setLatencyStats=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("boolean","latencyStats",e,{required:!0});var i={latencyStats:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"setLatencyStats",i,t),this)},MediaPipeline.prototype.getGstreamerDot=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(t=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 0:e=void 0;break;case 1:break;default:var i=new RangeError("Number of params ("+arguments.length+") not in range [0-1]");throw i.length=arguments.length,i.min=0,i.max=1,i}checkType("GstreamerDotDetails","details",e);var a={details:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"getGstreamerDot",a,t),this)},MediaPipeline.prototype.connect=function(e,t){if(e instanceof Array||(e=Array.prototype.slice.call(arguments,0),t="function"==typeof e[e.length-1]?e.pop():void 0),t=(t||noop).bind(this),e.length<2)throw new SyntaxError("Need at least two media elements to connect");return e[0].connect(e.slice(1),t)},MediaPipeline.constructorParams={},MediaPipeline.events=MediaObject.events,module.exports=MediaPipeline,MediaPipeline.check=checkMediaPipeline;
},{"./abstracts/MediaObject":49,"inherits":"inherits","kurento-client":"kurento-client"}],43:[function(require,module,exports){
function PassThrough(){PassThrough.super_.call(this)}function checkPassThrough(e,r){if(!(r instanceof PassThrough))throw ChecktypeError(e,PassThrough,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,MediaElement=require("./abstracts/MediaElement");inherits(PassThrough,MediaElement),PassThrough.constructorParams={mediaPipeline:{type:"MediaPipeline",required:!0}},PassThrough.events=MediaElement.events,module.exports=PassThrough,PassThrough.check=checkPassThrough;
},{"./abstracts/MediaElement":48,"inherits":"inherits","kurento-client":"kurento-client"}],44:[function(require,module,exports){
function noop(t,n){return t&&console.trace(t),n}function BaseRtpEndpoint(){BaseRtpEndpoint.super_.call(this)}function checkBaseRtpEndpoint(t,n){if(!(n instanceof BaseRtpEndpoint))throw ChecktypeError(t,BaseRtpEndpoint,n)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,SdpEndpoint=require("./SdpEndpoint");inherits(BaseRtpEndpoint,SdpEndpoint),BaseRtpEndpoint.prototype.getConnectionState=function(t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(t=void 0),t=(t||noop).bind(this),disguise(this._invoke(n,"getConnectionState",t),this)},BaseRtpEndpoint.prototype.getMaxVideoSendBandwidth=function(t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(t=void 0),t=(t||noop).bind(this),disguise(this._invoke(n,"getMaxVideoSendBandwidth",t),this)},BaseRtpEndpoint.prototype.setMaxVideoSendBandwidth=function(t,n){var e=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("int","maxVideoSendBandwidth",t,{required:!0});var i={maxVideoSendBandwidth:t};return n=(n||noop).bind(this),disguise(this._invoke(e,"setMaxVideoSendBandwidth",i,n),this)},BaseRtpEndpoint.prototype.getMediaState=function(t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(t=void 0),t=(t||noop).bind(this),disguise(this._invoke(n,"getMediaState",t),this)},BaseRtpEndpoint.prototype.getMinVideoRecvBandwidth=function(t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(t=void 0),t=(t||noop).bind(this),disguise(this._invoke(n,"getMinVideoRecvBandwidth",t),this)},BaseRtpEndpoint.prototype.setMinVideoRecvBandwidth=function(t,n){var e=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("int","minVideoRecvBandwidth",t,{required:!0});var i={minVideoRecvBandwidth:t};return n=(n||noop).bind(this),disguise(this._invoke(e,"setMinVideoRecvBandwidth",i,n),this)},BaseRtpEndpoint.prototype.getMinVideoSendBandwidth=function(t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(t=void 0),t=(t||noop).bind(this),disguise(this._invoke(n,"getMinVideoSendBandwidth",t),this)},BaseRtpEndpoint.prototype.setMinVideoSendBandwidth=function(t,n){var e=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("int","minVideoSendBandwidth",t,{required:!0});var i={minVideoSendBandwidth:t};return n=(n||noop).bind(this),disguise(this._invoke(e,"setMinVideoSendBandwidth",i,n),this)},BaseRtpEndpoint.prototype.getRembParams=function(t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(t=void 0),t=(t||noop).bind(this),disguise(this._invoke(n,"getRembParams",t),this)},BaseRtpEndpoint.prototype.setRembParams=function(t,n){var e=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("RembParams","rembParams",t,{required:!0});var i={rembParams:t};return n=(n||noop).bind(this),disguise(this._invoke(e,"setRembParams",i,n),this)},BaseRtpEndpoint.constructorParams={},BaseRtpEndpoint.events=SdpEndpoint.events.concat(["ConnectionStateChanged","MediaStateChanged"]),module.exports=BaseRtpEndpoint,BaseRtpEndpoint.check=checkBaseRtpEndpoint;
},{"./SdpEndpoint":50,"inherits":"inherits","kurento-client":"kurento-client"}],45:[function(require,module,exports){
function Endpoint(){Endpoint.super_.call(this)}function checkEndpoint(e,n){if(!(n instanceof Endpoint))throw ChecktypeError(e,Endpoint,n)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,MediaElement=require("./MediaElement");inherits(Endpoint,MediaElement),Endpoint.constructorParams={},Endpoint.events=MediaElement.events,module.exports=Endpoint,Endpoint.check=checkEndpoint;
},{"./MediaElement":48,"inherits":"inherits","kurento-client":"kurento-client"}],46:[function(require,module,exports){
function Filter(){Filter.super_.call(this)}function checkFilter(e,r){if(!(r instanceof Filter))throw ChecktypeError(e,Filter,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,MediaElement=require("./MediaElement");inherits(Filter,MediaElement),Filter.constructorParams={},Filter.events=MediaElement.events,module.exports=Filter,Filter.check=checkFilter;
},{"./MediaElement":48,"inherits":"inherits","kurento-client":"kurento-client"}],47:[function(require,module,exports){
function noop(e,t){return e&&console.trace(e),t}function Hub(){Hub.super_.call(this)}function checkHub(e,t){if(!(t instanceof Hub))throw ChecktypeError(e,Hub,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,HubPort=require("../HubPort"),MediaObject=require("./MediaObject");inherits(Hub,MediaObject),Hub.prototype.getGstreamerDot=function(e,t){var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(t=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 0:e=void 0;break;case 1:break;default:var n=new RangeError("Number of params ("+arguments.length+") not in range [0-1]");throw n.length=arguments.length,n.min=0,n.max=1,n}checkType("GstreamerDotDetails","details",e);var i={details:e};return t=(t||noop).bind(this),disguise(this._invoke(r,"getGstreamerDot",i,t),this)},Hub.prototype.createHubPort=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;arguments.length||(e=void 0),e=(e||noop).bind(this);var r=new HubPort;r.on("_rpc",this.emit.bind(this,"_rpc"));var n={type:"HubPort",constructorParams:{hub:this}};return Object.defineProperty(n,"object",{value:r}),this.emit("_create",t,n,e),r},Hub.constructorParams={},Hub.events=MediaObject.events,module.exports=Hub,Hub.check=checkHub;
},{"../HubPort":41,"./MediaObject":49,"inherits":"inherits","kurento-client":"kurento-client"}],48:[function(require,module,exports){
function noop(e,t){return e&&console.trace(e),t}function MediaElement(){MediaElement.super_.call(this)}function checkMediaElement(e,t){if(!(t instanceof MediaElement))throw ChecktypeError(e,MediaElement,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,checkArray=checkType.checkArray,Transaction=kurentoClient.TransactionsManager.Transaction,each=require("async").each,promiseCallback=require("promisecallback"),MediaObject=require("./MediaObject");inherits(MediaElement,MediaObject),MediaElement.prototype.getMaxOuputBitrate=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getMaxOuputBitrate",e),this)},MediaElement.prototype.setMaxOuputBitrate=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("int","maxOuputBitrate",e,{required:!0});var i={maxOuputBitrate:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"setMaxOuputBitrate",i,t),this)},MediaElement.prototype.getMinOuputBitrate=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getMinOuputBitrate",e),this)},MediaElement.prototype.setMinOuputBitrate=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("int","minOuputBitrate",e,{required:!0});var i={minOuputBitrate:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"setMinOuputBitrate",i,t),this)},MediaElement.prototype.connect=function(e,t,n,i,r){var a,o=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;if(e instanceof Array){r=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0;var s=e,c=this;if(e=s[s.length-1],!s.length)throw new SyntaxError("Need at least one media element to connect");checkArray("MediaElement","media",s),a=new Promise(function(e,t){function n(n,i){return n?t(n):void e(i)}each(s,function(e,t){c=c.connect(e,t)},n)}),a=promiseCallback(a,r)}else{var o=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(r=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 1:t=void 0;case 2:n=void 0;case 3:i=void 0;break;case 4:break;default:var p=new RangeError("Number of params ("+arguments.length+") not in range [1-4]");throw p.length=arguments.length,p.min=1,p.max=4,p}checkType("MediaElement","sink",e,{required:!0}),checkType("MediaType","mediaType",t),checkType("String","sourceMediaDescription",n),checkType("String","sinkMediaDescription",i);var u={sink:e,mediaType:t,sourceMediaDescription:n,sinkMediaDescription:i};r=(r||noop).bind(this),a=this._invoke(o,"connect",u,r)}return disguise(a,e)},MediaElement.prototype.disconnect=function(e,t,n,i,r){var a=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(r=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 1:t=void 0;case 2:n=void 0;case 3:i=void 0;break;case 4:break;default:var o=new RangeError("Number of params ("+arguments.length+") not in range [1-4]");throw o.length=arguments.length,o.min=1,o.max=4,o}checkType("MediaElement","sink",e,{required:!0}),checkType("MediaType","mediaType",t),checkType("String","sourceMediaDescription",n),checkType("String","sinkMediaDescription",i);var s={sink:e,mediaType:t,sourceMediaDescription:n,sinkMediaDescription:i};return r=(r||noop).bind(this),disguise(this._invoke(a,"disconnect",s,r),this)},MediaElement.prototype.getGstreamerDot=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(t=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 0:e=void 0;break;case 1:break;default:var i=new RangeError("Number of params ("+arguments.length+") not in range [0-1]");throw i.length=arguments.length,i.min=0,i.max=1,i}checkType("GstreamerDotDetails","details",e);var r={details:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"getGstreamerDot",r,t),this)},MediaElement.prototype.getSinkConnections=function(e,t,n){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(n=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 0:e=void 0;case 1:t=void 0;break;case 2:break;default:var r=new RangeError("Number of params ("+arguments.length+") not in range [0-2]");throw r.length=arguments.length,r.min=0,r.max=2,r}checkType("MediaType","mediaType",e),checkType("String","description",t);var a={mediaType:e,description:t};return n=(n||noop).bind(this),disguise(this._invoke(i,"getSinkConnections",a,n),this)},MediaElement.prototype.getSourceConnections=function(e,t,n){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(n=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 0:e=void 0;case 1:t=void 0;break;case 2:break;default:var r=new RangeError("Number of params ("+arguments.length+") not in range [0-2]");throw r.length=arguments.length,r.min=0,r.max=2,r}checkType("MediaType","mediaType",e),checkType("String","description",t);var a={mediaType:e,description:t};return n=(n||noop).bind(this),disguise(this._invoke(i,"getSourceConnections",a,n),this)},MediaElement.prototype.getStats=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(t=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 0:e=void 0;break;case 1:break;default:var i=new RangeError("Number of params ("+arguments.length+") not in range [0-1]");throw i.length=arguments.length,i.min=0,i.max=1,i}checkType("MediaType","mediaType",e);var r={mediaType:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"getStats",r,t),this)},MediaElement.prototype.setAudioFormat=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("AudioCaps","caps",e,{required:!0});var i={caps:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"setAudioFormat",i,t),this)},MediaElement.prototype.setOutputBitrate=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("int","bitrate",e,{required:!0});var i={bitrate:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"setOutputBitrate",i,t),this)},MediaElement.prototype.setVideoFormat=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("VideoCaps","caps",e,{required:!0});var i={caps:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"setVideoFormat",i,t),this)},MediaElement.constructorParams={},MediaElement.events=MediaObject.events.concat(["ElementConnected","ElementDisconnected"]),module.exports=MediaElement,MediaElement.check=checkMediaElement;
},{"./MediaObject":49,"async":"async","inherits":"inherits","kurento-client":"kurento-client","promisecallback":"promisecallback"}],49:[function(require,module,exports){
function noop(e,t){return e&&console.trace(e),t}function MediaObject(){MediaObject.super_.call(this);var e=this;this.once("_id",function(e,t){return e?Object.defineProperties(this,{_createError:{value:e},id:{value:null,enumerable:!0}}):void Object.defineProperty(this,"id",{configurable:!0,enumerable:!0,value:t})});var t={};this.on("removeListener",function(i,n){if("_"!=i[0]&&"release"!=i&&"newListener"!=i){var r=EventEmitter.listenerCount(this,i);if(!r){var o=t[i],s={object:this,subscription:o.value,sessionId:o.sessionId};this.emit("_rpc",void 0,"unsubscribe",s,function(n){return n?e.emit("error",n):void delete t[i]})}}}),this.on("newListener",function(i,n){if("_"!=i[0]&&"release"!=i){var r=this.constructor;if(r.events.indexOf(i)<0)throw new SyntaxError(r.name+" doesn't accept events of type '"+i+"'");var o=EventEmitter.listenerCount(this,i);if(!o){var s={object:this,type:i};this.emit("_rpc",void 0,"subscribe",s,function(n,r){return n?e.emit("error",n):void(t[i]=r)})}}})}function throwRpcNotReady(){throw new SyntaxError("RPC result is not ready, use .then() method instead")}function checkMediaObject(e,t){if(!(t instanceof MediaObject))throw ChecktypeError(e,MediaObject,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,Promise=require("es6-promise").Promise,promiseCallback=require("promisecallback"),EventEmitter=require("events").EventEmitter;inherits(MediaObject,EventEmitter),MediaObject.prototype.getChilds=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getChilds",function(t,i){return t?e(t):void this.emit("_describe",i,e)}),this)},MediaObject.prototype.getCreationTime=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getCreationTime",e),this)},MediaObject.prototype.getMediaPipeline=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getMediaPipeline",function(t,i){return t?e(t):void this.emit("_describe",i,e)}),this)},MediaObject.prototype.getName=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getName",e),this)},MediaObject.prototype.setName=function(e,t){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("String","name",e,{required:!0});var n={name:e};return t=(t||noop).bind(this),disguise(this._invoke(i,"setName",n,t),this)},MediaObject.prototype.getParent=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getParent",function(t,i){return t?e(t):void this.emit("_describe",i,e)}),this)},MediaObject.prototype.getSendTagsInEvents=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getSendTagsInEvents",e),this)},MediaObject.prototype.setSendTagsInEvents=function(e,t){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("boolean","sendTagsInEvents",e,{required:!0});var n={sendTagsInEvents:e};return t=(t||noop).bind(this),disguise(this._invoke(i,"setSendTagsInEvents",n,t),this)},MediaObject.prototype.addTag=function(e,t,i){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("String","key",e,{required:!0}),checkType("String","value",t,{required:!0});var r={key:e,value:t};return i=(i||noop).bind(this),disguise(this._invoke(n,"addTag",r,i),this)},MediaObject.prototype.getTag=function(e,t){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("String","key",e,{required:!0});var n={key:e};return t=(t||noop).bind(this),disguise(this._invoke(i,"getTag",n,t),this)},MediaObject.prototype.getTags=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getTags",e),this)},MediaObject.prototype.removeTag=function(e,t){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("String","key",e,{required:!0});var n={key:e};return t=(t||noop).bind(this),disguise(this._invoke(i,"removeTag",n,t),this)},Object.defineProperty(MediaObject.prototype,"_invoke",{value:function(e,t,i,n){var r=this;if(i instanceof Function){if(n)throw new SyntaxError("Nothing can be defined after the callback");n=i,i=void 0}var o,s=this._createError;return o=s?Promise.reject(s):new Promise(function(n,o){function s(e,t){if(e)return o(e);var i=t.value;void 0===i&&(i=r),n(i)}var a={object:r,operation:t};i&&(a.operationParams=i),r.emit("_rpc",e,"invoke",a,s)}),promiseCallback(o,n,this)}}),MediaObject.prototype.release=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;arguments.length||(e=void 0),e=(e||noop).bind(this);var i,n=this,r=this._createError;return i=r?Promise.reject(r):new Promise(function(e,i){function r(t){return t?i(t):(Object.keys(n._events).forEach(function(e){"_"!=e[0]&&"newListener"!=e&&"removeListener"!=e&&n.removeAllListeners(e)}),n.emit("release"),void e())}var o={object:n};n.emit("_rpc",t,"release",o,r)}),disguise(promiseCallback(i,e),this)},MediaObject.prototype.then=function(e,t){var i=this,n=new Promise(function(n,r){function o(o){var s;if(e)try{s=e.call(i,o)}catch(a){return t||console.trace("Uncaugh exception",a),r(a)}n(s)}function s(e){if(t)try{e=t.call(i,e)}catch(n){return r(n)}else console.trace("Uncaugh exception",e);r(e)}void 0!==i.id?o(i):i.once("_id",function(e,t){return e?s(e):void o(i)})});return disguise(n,this)},MediaObject.prototype["catch"]=function(e){this.then(null,e)},Object.defineProperty(MediaObject.prototype,"commited",{get:function(){return void 0!==this.id}}),MediaObject.constructorParams={},MediaObject.events=["Error"],module.exports=MediaObject,MediaObject.check=checkMediaObject;
},{"es6-promise":"es6-promise","events":14,"inherits":"inherits","kurento-client":"kurento-client","promisecallback":"promisecallback"}],50:[function(require,module,exports){
function noop(n,t){return n&&console.trace(n),t}function SdpEndpoint(){SdpEndpoint.super_.call(this)}function checkSdpEndpoint(n,t){if(!(t instanceof SdpEndpoint))throw ChecktypeError(n,SdpEndpoint,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,SessionEndpoint=require("./SessionEndpoint");inherits(SdpEndpoint,SessionEndpoint),SdpEndpoint.prototype.getMaxAudioRecvBandwidth=function(n){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(n=void 0),n=(n||noop).bind(this),disguise(this._invoke(t,"getMaxAudioRecvBandwidth",n),this)},SdpEndpoint.prototype.setMaxAudioRecvBandwidth=function(n,t){var e=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("int","maxAudioRecvBandwidth",n,{required:!0});var i={maxAudioRecvBandwidth:n};return t=(t||noop).bind(this),disguise(this._invoke(e,"setMaxAudioRecvBandwidth",i,t),this)},SdpEndpoint.prototype.getMaxVideoRecvBandwidth=function(n){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(n=void 0),n=(n||noop).bind(this),disguise(this._invoke(t,"getMaxVideoRecvBandwidth",n),this)},SdpEndpoint.prototype.setMaxVideoRecvBandwidth=function(n,t){var e=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("int","maxVideoRecvBandwidth",n,{required:!0});var i={maxVideoRecvBandwidth:n};return t=(t||noop).bind(this),disguise(this._invoke(e,"setMaxVideoRecvBandwidth",i,t),this)},SdpEndpoint.prototype.generateOffer=function(n){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(n=void 0),n=(n||noop).bind(this),disguise(this._invoke(t,"generateOffer",n),this)},SdpEndpoint.prototype.getLocalSessionDescriptor=function(n){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(n=void 0),n=(n||noop).bind(this),disguise(this._invoke(t,"getLocalSessionDescriptor",n),this)},SdpEndpoint.prototype.getRemoteSessionDescriptor=function(n){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(n=void 0),n=(n||noop).bind(this),disguise(this._invoke(t,"getRemoteSessionDescriptor",n),this)},SdpEndpoint.prototype.processAnswer=function(n,t){var e=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("String","answer",n,{required:!0});var i={answer:n};return t=(t||noop).bind(this),disguise(this._invoke(e,"processAnswer",i,t),this)},SdpEndpoint.prototype.processOffer=function(n,t){var e=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("String","offer",n,{required:!0});var i={offer:n};return t=(t||noop).bind(this),disguise(this._invoke(e,"processOffer",i,t),this)},SdpEndpoint.constructorParams={},SdpEndpoint.events=SessionEndpoint.events,module.exports=SdpEndpoint,SdpEndpoint.check=checkSdpEndpoint;
},{"./SessionEndpoint":52,"inherits":"inherits","kurento-client":"kurento-client"}],51:[function(require,module,exports){
function noop(e,r){return e&&console.trace(e),r}function ServerManager(){ServerManager.super_.call(this)}function checkServerManager(e,r){if(!(r instanceof ServerManager))throw ChecktypeError(e,ServerManager,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,MediaObject=require("./MediaObject");inherits(ServerManager,MediaObject),ServerManager.prototype.getInfo=function(e){var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(r,"getInfo",e),this)},ServerManager.prototype.getMetadata=function(e){var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(r,"getMetadata",e),this)},ServerManager.prototype.getPipelines=function(e){var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(r,"getPipelines",function(r,t){return r?e(r):void this.emit("_describe",t,e)}),this)},ServerManager.prototype.getSessions=function(e){var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(r,"getSessions",e),this)},ServerManager.prototype.getKmd=function(e,r){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("String","moduleName",e,{required:!0});var n={moduleName:e};return r=(r||noop).bind(this),disguise(this._invoke(t,"getKmd",n,r),this)},ServerManager.constructorParams={},ServerManager.events=MediaObject.events.concat(["ObjectCreated","ObjectDestroyed"]),module.exports=ServerManager,ServerManager.check=checkServerManager;
},{"./MediaObject":49,"inherits":"inherits","kurento-client":"kurento-client"}],52:[function(require,module,exports){
function SessionEndpoint(){SessionEndpoint.super_.call(this)}function checkSessionEndpoint(n,e){if(!(e instanceof SessionEndpoint))throw ChecktypeError(n,SessionEndpoint,e)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,Endpoint=require("./Endpoint");inherits(SessionEndpoint,Endpoint),SessionEndpoint.constructorParams={},SessionEndpoint.events=Endpoint.events.concat(["MediaSessionStarted","MediaSessionTerminated"]),module.exports=SessionEndpoint,SessionEndpoint.check=checkSessionEndpoint;
},{"./Endpoint":45,"inherits":"inherits","kurento-client":"kurento-client"}],53:[function(require,module,exports){
function noop(n,t){return n&&console.trace(n),t}function UriEndpoint(){UriEndpoint.super_.call(this)}function checkUriEndpoint(n,t){if(!(t instanceof UriEndpoint))throw ChecktypeError(n,UriEndpoint,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,Endpoint=require("./Endpoint");inherits(UriEndpoint,Endpoint),UriEndpoint.prototype.getUri=function(n){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(n=void 0),n=(n||noop).bind(this),disguise(this._invoke(t,"getUri",n),this)},UriEndpoint.prototype.pause=function(n){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(n=void 0),n=(n||noop).bind(this),disguise(this._invoke(t,"pause",n),this)},UriEndpoint.prototype.stop=function(n){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(n=void 0),n=(n||noop).bind(this),disguise(this._invoke(t,"stop",n),this)},UriEndpoint.constructorParams={},UriEndpoint.events=Endpoint.events,module.exports=UriEndpoint,UriEndpoint.check=checkUriEndpoint;
},{"./Endpoint":45,"inherits":"inherits","kurento-client":"kurento-client"}],54:[function(require,module,exports){
var BaseRtpEndpoint=require("./BaseRtpEndpoint"),Endpoint=require("./Endpoint"),Filter=require("./Filter"),Hub=require("./Hub"),MediaElement=require("./MediaElement"),MediaObject=require("./MediaObject"),SdpEndpoint=require("./SdpEndpoint"),ServerManager=require("./ServerManager"),SessionEndpoint=require("./SessionEndpoint"),UriEndpoint=require("./UriEndpoint");exports.BaseRtpEndpoint=BaseRtpEndpoint,exports.Endpoint=Endpoint,exports.Filter=Filter,exports.Hub=Hub,exports.MediaElement=MediaElement,exports.MediaObject=MediaObject,exports.SdpEndpoint=SdpEndpoint,exports.ServerManager=ServerManager,exports.SessionEndpoint=SessionEndpoint,exports.UriEndpoint=UriEndpoint;
},{"./BaseRtpEndpoint":44,"./Endpoint":45,"./Filter":46,"./Hub":47,"./MediaElement":48,"./MediaObject":49,"./SdpEndpoint":50,"./ServerManager":51,"./SessionEndpoint":52,"./UriEndpoint":53}],55:[function(require,module,exports){
function AudioCaps(e){return this instanceof AudioCaps?(e=e||{},checkType("AudioCodec","audioCapsDict.codec",e.codec,{required:!0}),checkType("int","audioCapsDict.bitrate",e.bitrate,{required:!0}),AudioCaps.super_.call(this,e),void Object.defineProperties(this,{codec:{writable:!0,enumerable:!0,value:e.codec},bitrate:{writable:!0,enumerable:!0,value:e.bitrate}})):new AudioCaps(e)}function checkAudioCaps(e,i){if(!(i instanceof AudioCaps))throw ChecktypeError(e,AudioCaps,i)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(AudioCaps,ComplexType),Object.defineProperties(AudioCaps.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"AudioCaps"}}),module.exports=AudioCaps,AudioCaps.check=checkAudioCaps;
},{"./ComplexType":58,"inherits":"inherits","kurento-client":"kurento-client"}],56:[function(require,module,exports){
function checkAudioCodec(o,r){if("string"!=typeof r)throw SyntaxError(o+" param should be a String, not "+typeof r);if(!r.match("OPUS|PCMU|RAW"))throw SyntaxError(o+" param is not one of [OPUS|PCMU|RAW] ("+r+")")}var kurentoClient=require("kurento-client");module.exports=checkAudioCodec;
},{"kurento-client":"kurento-client"}],57:[function(require,module,exports){
function CodecConfiguration(e){return this instanceof CodecConfiguration?(e=e||{},checkType("String","codecConfigurationDict.name",e.name,{required:!0}),checkType("String","codecConfigurationDict.properties",e.properties),CodecConfiguration.super_.call(this,e),void Object.defineProperties(this,{name:{writable:!0,enumerable:!0,value:e.name},properties:{writable:!0,enumerable:!0,value:e.properties}})):new CodecConfiguration(e)}function checkCodecConfiguration(e,o){if(!(o instanceof CodecConfiguration))throw ChecktypeError(e,CodecConfiguration,o)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(CodecConfiguration,ComplexType),Object.defineProperties(CodecConfiguration.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"CodecConfiguration"}}),module.exports=CodecConfiguration,CodecConfiguration.check=checkCodecConfiguration;
},{"./ComplexType":58,"inherits":"inherits","kurento-client":"kurento-client"}],58:[function(require,module,exports){
function ComplexType(){}function checkComplexType(e,o){if(!(o instanceof ComplexType))throw ChecktypeError(e,ComplexType,o)}var ChecktypeError=require("kurento-client").checkType.ChecktypeError;ComplexType.prototype.toJSON=function(){var e={};for(var o in this){var p=this[o];"function"!=typeof p&&(e[o]=p)}return e},module.exports=ComplexType,ComplexType.check=checkComplexType;
},{"kurento-client":"kurento-client"}],59:[function(require,module,exports){
function checkConnectionState(t,o){if("string"!=typeof o)throw SyntaxError(t+" param should be a String, not "+typeof o);if(!o.match("DISCONNECTED|CONNECTED"))throw SyntaxError(t+" param is not one of [DISCONNECTED|CONNECTED] ("+o+")")}var kurentoClient=require("kurento-client");module.exports=checkConnectionState;
},{"kurento-client":"kurento-client"}],60:[function(require,module,exports){
function ElementConnectionData(e){return this instanceof ElementConnectionData?(e=e||{},checkType("MediaElement","elementConnectionDataDict.source",e.source,{required:!0}),checkType("MediaElement","elementConnectionDataDict.sink",e.sink,{required:!0}),checkType("MediaType","elementConnectionDataDict.type",e.type,{required:!0}),checkType("String","elementConnectionDataDict.sourceDescription",e.sourceDescription,{required:!0}),checkType("String","elementConnectionDataDict.sinkDescription",e.sinkDescription,{required:!0}),ElementConnectionData.super_.call(this,e),void Object.defineProperties(this,{source:{writable:!0,enumerable:!0,value:e.source},sink:{writable:!0,enumerable:!0,value:e.sink},type:{writable:!0,enumerable:!0,value:e.type},sourceDescription:{writable:!0,enumerable:!0,value:e.sourceDescription},sinkDescription:{writable:!0,enumerable:!0,value:e.sinkDescription}})):new ElementConnectionData(e)}function checkElementConnectionData(e,n){if(!(n instanceof ElementConnectionData))throw ChecktypeError(e,ElementConnectionData,n)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(ElementConnectionData,ComplexType),Object.defineProperties(ElementConnectionData.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"ElementConnectionData"}}),module.exports=ElementConnectionData,ElementConnectionData.check=checkElementConnectionData;
},{"./ComplexType":58,"inherits":"inherits","kurento-client":"kurento-client"}],61:[function(require,module,exports){
function ElementStats(e){return this instanceof ElementStats?(e=e||{},checkType("double","elementStatsDict.inputAudioLatency",e.inputAudioLatency,{required:!0}),checkType("double","elementStatsDict.inputVideoLatency",e.inputVideoLatency,{required:!0}),ElementStats.super_.call(this,e),void Object.defineProperties(this,{inputAudioLatency:{writable:!0,enumerable:!0,value:e.inputAudioLatency},inputVideoLatency:{writable:!0,enumerable:!0,value:e.inputVideoLatency}})):new ElementStats(e)}function checkElementStats(e,t){if(!(t instanceof ElementStats))throw ChecktypeError(e,ElementStats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Stats=require("./Stats");inherits(ElementStats,Stats),Object.defineProperties(ElementStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"ElementStats"}}),module.exports=ElementStats,ElementStats.check=checkElementStats;
},{"./Stats":88,"inherits":"inherits","kurento-client":"kurento-client"}],62:[function(require,module,exports){
function EndpointStats(e){return this instanceof EndpointStats?(e=e||{},checkType("double","endpointStatsDict.audioE2ELatency",e.audioE2ELatency,{required:!0}),checkType("double","endpointStatsDict.videoE2ELatency",e.videoE2ELatency,{required:!0}),EndpointStats.super_.call(this,e),void Object.defineProperties(this,{audioE2ELatency:{writable:!0,enumerable:!0,value:e.audioE2ELatency},videoE2ELatency:{writable:!0,enumerable:!0,value:e.videoE2ELatency}})):new EndpointStats(e)}function checkEndpointStats(e,t){if(!(t instanceof EndpointStats))throw ChecktypeError(e,EndpointStats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ElementStats=require("./ElementStats");inherits(EndpointStats,ElementStats),Object.defineProperties(EndpointStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"EndpointStats"}}),module.exports=EndpointStats,EndpointStats.check=checkEndpointStats;
},{"./ElementStats":61,"inherits":"inherits","kurento-client":"kurento-client"}],63:[function(require,module,exports){
function checkFilterType(r,t){if("string"!=typeof t)throw SyntaxError(r+" param should be a String, not "+typeof t);if(!t.match("AUDIO|AUTODETECT|VIDEO"))throw SyntaxError(r+" param is not one of [AUDIO|AUTODETECT|VIDEO] ("+t+")")}var kurentoClient=require("kurento-client");module.exports=checkFilterType;
},{"kurento-client":"kurento-client"}],64:[function(require,module,exports){
function Fraction(e){return this instanceof Fraction?(e=e||{},checkType("int","fractionDict.numerator",e.numerator,{required:!0}),checkType("int","fractionDict.denominator",e.denominator,{required:!0}),Fraction.super_.call(this,e),void Object.defineProperties(this,{numerator:{writable:!0,enumerable:!0,value:e.numerator},denominator:{writable:!0,enumerable:!0,value:e.denominator}})):new Fraction(e)}function checkFraction(e,r){if(!(r instanceof Fraction))throw ChecktypeError(e,Fraction,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(Fraction,ComplexType),Object.defineProperties(Fraction.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"Fraction"}}),module.exports=Fraction,Fraction.check=checkFraction;
},{"./ComplexType":58,"inherits":"inherits","kurento-client":"kurento-client"}],65:[function(require,module,exports){
function checkGstreamerDotDetails(S,_){if("string"!=typeof _)throw SyntaxError(S+" param should be a String, not "+typeof _);if(!_.match("SHOW_MEDIA_TYPE|SHOW_CAPS_DETAILS|SHOW_NON_DEFAULT_PARAMS|SHOW_STATES|SHOW_FULL_PARAMS|SHOW_ALL|SHOW_VERBOSE"))throw SyntaxError(S+" param is not one of [SHOW_MEDIA_TYPE|SHOW_CAPS_DETAILS|SHOW_NON_DEFAULT_PARAMS|SHOW_STATES|SHOW_FULL_PARAMS|SHOW_ALL|SHOW_VERBOSE] ("+_+")")}var kurentoClient=require("kurento-client");module.exports=checkGstreamerDotDetails;
},{"kurento-client":"kurento-client"}],66:[function(require,module,exports){
function checkMediaState(t,e){if("string"!=typeof e)throw SyntaxError(t+" param should be a String, not "+typeof e);if(!e.match("DISCONNECTED|CONNECTED"))throw SyntaxError(t+" param is not one of [DISCONNECTED|CONNECTED] ("+e+")")}var kurentoClient=require("kurento-client");module.exports=checkMediaState;
},{"kurento-client":"kurento-client"}],67:[function(require,module,exports){
function checkMediaType(e,r){if("string"!=typeof r)throw SyntaxError(e+" param should be a String, not "+typeof r);if(!r.match("AUDIO|DATA|VIDEO"))throw SyntaxError(e+" param is not one of [AUDIO|DATA|VIDEO] ("+r+")")}var kurentoClient=require("kurento-client");module.exports=checkMediaType;
},{"kurento-client":"kurento-client"}],68:[function(require,module,exports){
function ModuleInfo(e){return this instanceof ModuleInfo?(e=e||{},checkType("String","moduleInfoDict.version",e.version,{required:!0}),checkType("String","moduleInfoDict.name",e.name,{required:!0}),checkType("String","moduleInfoDict.factories",e.factories,{isArray:!0,required:!0}),ModuleInfo.super_.call(this,e),void Object.defineProperties(this,{version:{writable:!0,enumerable:!0,value:e.version},name:{writable:!0,enumerable:!0,value:e.name},factories:{writable:!0,enumerable:!0,value:e.factories}})):new ModuleInfo(e)}function checkModuleInfo(e,o){if(!(o instanceof ModuleInfo))throw ChecktypeError(e,ModuleInfo,o)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(ModuleInfo,ComplexType),Object.defineProperties(ModuleInfo.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"ModuleInfo"}}),module.exports=ModuleInfo,ModuleInfo.check=checkModuleInfo;
},{"./ComplexType":58,"inherits":"inherits","kurento-client":"kurento-client"}],69:[function(require,module,exports){
function RTCCertificateStats(e){return this instanceof RTCCertificateStats?(e=e||{},checkType("String","rTCCertificateStatsDict.fingerprint",e.fingerprint,{required:!0}),checkType("String","rTCCertificateStatsDict.fingerprintAlgorithm",e.fingerprintAlgorithm,{required:!0}),checkType("String","rTCCertificateStatsDict.base64Certificate",e.base64Certificate,{required:!0}),checkType("String","rTCCertificateStatsDict.issuerCertificateId",e.issuerCertificateId,{required:!0}),RTCCertificateStats.super_.call(this,e),void Object.defineProperties(this,{fingerprint:{writable:!0,enumerable:!0,value:e.fingerprint},fingerprintAlgorithm:{writable:!0,enumerable:!0,value:e.fingerprintAlgorithm},base64Certificate:{writable:!0,enumerable:!0,value:e.base64Certificate},issuerCertificateId:{writable:!0,enumerable:!0,value:e.issuerCertificateId}})):new RTCCertificateStats(e)}function checkRTCCertificateStats(e,t){if(!(t instanceof RTCCertificateStats))throw ChecktypeError(e,RTCCertificateStats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCCertificateStats,RTCStats),Object.defineProperties(RTCCertificateStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCCertificateStats"}}),module.exports=RTCCertificateStats,RTCCertificateStats.check=checkRTCCertificateStats;
},{"./RTCStats":81,"inherits":"inherits","kurento-client":"kurento-client"}],70:[function(require,module,exports){
function RTCCodec(e){return this instanceof RTCCodec?(e=e||{},checkType("int64","rTCCodecDict.payloadType",e.payloadType,{required:!0}),checkType("String","rTCCodecDict.codec",e.codec,{required:!0}),checkType("int64","rTCCodecDict.clockRate",e.clockRate,{required:!0}),checkType("int64","rTCCodecDict.channels",e.channels,{required:!0}),checkType("String","rTCCodecDict.parameters",e.parameters,{required:!0}),RTCCodec.super_.call(this,e),void Object.defineProperties(this,{payloadType:{writable:!0,enumerable:!0,value:e.payloadType},codec:{writable:!0,enumerable:!0,value:e.codec},clockRate:{writable:!0,enumerable:!0,value:e.clockRate},channels:{writable:!0,enumerable:!0,value:e.channels},parameters:{writable:!0,enumerable:!0,value:e.parameters}})):new RTCCodec(e)}function checkRTCCodec(e,c){if(!(c instanceof RTCCodec))throw ChecktypeError(e,RTCCodec,c)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCCodec,RTCStats),Object.defineProperties(RTCCodec.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCCodec"}}),module.exports=RTCCodec,RTCCodec.check=checkRTCCodec;
},{"./RTCStats":81,"inherits":"inherits","kurento-client":"kurento-client"}],71:[function(require,module,exports){
function checkRTCDataChannelState(n,t){if("string"!=typeof t)throw SyntaxError(n+" param should be a String, not "+typeof t);if(!t.match("connecting|open|closing|closed"))throw SyntaxError(n+" param is not one of [connecting|open|closing|closed] ("+t+")")}var kurentoClient=require("kurento-client");module.exports=checkRTCDataChannelState;
},{"kurento-client":"kurento-client"}],72:[function(require,module,exports){
function RTCDataChannelStats(e){return this instanceof RTCDataChannelStats?(e=e||{},checkType("String","rTCDataChannelStatsDict.label",e.label,{required:!0}),checkType("String","rTCDataChannelStatsDict.protocol",e.protocol,{required:!0}),checkType("int64","rTCDataChannelStatsDict.datachannelid",e.datachannelid,{required:!0}),checkType("RTCDataChannelState","rTCDataChannelStatsDict.state",e.state,{required:!0}),checkType("int64","rTCDataChannelStatsDict.messagesSent",e.messagesSent,{required:!0}),checkType("int64","rTCDataChannelStatsDict.bytesSent",e.bytesSent,{required:!0}),checkType("int64","rTCDataChannelStatsDict.messagesReceived",e.messagesReceived,{required:!0}),checkType("int64","rTCDataChannelStatsDict.bytesReceived",e.bytesReceived,{required:!0}),RTCDataChannelStats.super_.call(this,e),void Object.defineProperties(this,{label:{writable:!0,enumerable:!0,value:e.label},protocol:{writable:!0,enumerable:!0,value:e.protocol},datachannelid:{writable:!0,enumerable:!0,value:e.datachannelid},state:{writable:!0,enumerable:!0,value:e.state},messagesSent:{writable:!0,enumerable:!0,value:e.messagesSent},bytesSent:{writable:!0,enumerable:!0,value:e.bytesSent},messagesReceived:{writable:!0,enumerable:!0,value:e.messagesReceived},bytesReceived:{writable:!0,enumerable:!0,value:e.bytesReceived}})):new RTCDataChannelStats(e)}function checkRTCDataChannelStats(e,t){if(!(t instanceof RTCDataChannelStats))throw ChecktypeError(e,RTCDataChannelStats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCDataChannelStats,RTCStats),Object.defineProperties(RTCDataChannelStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCDataChannelStats"}}),module.exports=RTCDataChannelStats,RTCDataChannelStats.check=checkRTCDataChannelStats;
},{"./RTCStats":81,"inherits":"inherits","kurento-client":"kurento-client"}],73:[function(require,module,exports){
function RTCIceCandidateAttributes(e){return this instanceof RTCIceCandidateAttributes?(e=e||{},checkType("String","rTCIceCandidateAttributesDict.ipAddress",e.ipAddress,{required:!0}),checkType("int64","rTCIceCandidateAttributesDict.portNumber",e.portNumber,{required:!0}),checkType("String","rTCIceCandidateAttributesDict.transport",e.transport,{required:!0}),checkType("RTCStatsIceCandidateType","rTCIceCandidateAttributesDict.candidateType",e.candidateType,{required:!0}),checkType("int64","rTCIceCandidateAttributesDict.priority",e.priority,{required:!0}),checkType("String","rTCIceCandidateAttributesDict.addressSourceUrl",e.addressSourceUrl,{required:!0}),RTCIceCandidateAttributes.super_.call(this,e),void Object.defineProperties(this,{ipAddress:{writable:!0,enumerable:!0,value:e.ipAddress},portNumber:{writable:!0,enumerable:!0,value:e.portNumber},transport:{writable:!0,enumerable:!0,value:e.transport},candidateType:{writable:!0,enumerable:!0,value:e.candidateType},priority:{writable:!0,enumerable:!0,value:e.priority},addressSourceUrl:{writable:!0,enumerable:!0,value:e.addressSourceUrl}})):new RTCIceCandidateAttributes(e)}function checkRTCIceCandidateAttributes(e,t){if(!(t instanceof RTCIceCandidateAttributes))throw ChecktypeError(e,RTCIceCandidateAttributes,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCIceCandidateAttributes,RTCStats),Object.defineProperties(RTCIceCandidateAttributes.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCIceCandidateAttributes"}}),module.exports=RTCIceCandidateAttributes,RTCIceCandidateAttributes.check=checkRTCIceCandidateAttributes;
},{"./RTCStats":81,"inherits":"inherits","kurento-client":"kurento-client"}],74:[function(require,module,exports){
function RTCIceCandidatePairStats(e){return this instanceof RTCIceCandidatePairStats?(e=e||{},checkType("String","rTCIceCandidatePairStatsDict.transportId",e.transportId,{required:!0}),checkType("String","rTCIceCandidatePairStatsDict.localCandidateId",e.localCandidateId,{required:!0}),checkType("String","rTCIceCandidatePairStatsDict.remoteCandidateId",e.remoteCandidateId,{required:!0}),checkType("RTCStatsIceCandidatePairState","rTCIceCandidatePairStatsDict.state",e.state,{required:!0}),checkType("int64","rTCIceCandidatePairStatsDict.priority",e.priority,{required:!0}),checkType("boolean","rTCIceCandidatePairStatsDict.nominated",e.nominated,{required:!0}),checkType("boolean","rTCIceCandidatePairStatsDict.writable",e.writable,{required:!0}),checkType("boolean","rTCIceCandidatePairStatsDict.readable",e.readable,{required:!0}),checkType("int64","rTCIceCandidatePairStatsDict.bytesSent",e.bytesSent,{required:!0}),checkType("int64","rTCIceCandidatePairStatsDict.bytesReceived",e.bytesReceived,{required:!0}),checkType("double","rTCIceCandidatePairStatsDict.roundTripTime",e.roundTripTime,{required:!0}),checkType("double","rTCIceCandidatePairStatsDict.availableOutgoingBitrate",e.availableOutgoingBitrate,{required:!0}),checkType("double","rTCIceCandidatePairStatsDict.availableIncomingBitrate",e.availableIncomingBitrate,{required:!0}),RTCIceCandidatePairStats.super_.call(this,e),void Object.defineProperties(this,{transportId:{writable:!0,enumerable:!0,value:e.transportId},localCandidateId:{writable:!0,enumerable:!0,value:e.localCandidateId},remoteCandidateId:{writable:!0,enumerable:!0,value:e.remoteCandidateId},state:{writable:!0,enumerable:!0,value:e.state},priority:{writable:!0,enumerable:!0,value:e.priority},nominated:{writable:!0,enumerable:!0,value:e.nominated},writable:{writable:!0,enumerable:!0,value:e.writable},readable:{writable:!0,enumerable:!0,value:e.readable},bytesSent:{writable:!0,enumerable:!0,value:e.bytesSent},bytesReceived:{writable:!0,enumerable:!0,value:e.bytesReceived},roundTripTime:{writable:!0,enumerable:!0,value:e.roundTripTime},availableOutgoingBitrate:{writable:!0,enumerable:!0,value:e.availableOutgoingBitrate},availableIncomingBitrate:{writable:!0,enumerable:!0,value:e.availableIncomingBitrate}})):new RTCIceCandidatePairStats(e)}function checkRTCIceCandidatePairStats(e,a){if(!(a instanceof RTCIceCandidatePairStats))throw ChecktypeError(e,RTCIceCandidatePairStats,a)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCIceCandidatePairStats,RTCStats),Object.defineProperties(RTCIceCandidatePairStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCIceCandidatePairStats"}}),module.exports=RTCIceCandidatePairStats,RTCIceCandidatePairStats.check=checkRTCIceCandidatePairStats;
},{"./RTCStats":81,"inherits":"inherits","kurento-client":"kurento-client"}],75:[function(require,module,exports){
function RTCInboundRTPStreamStats(e){return this instanceof RTCInboundRTPStreamStats?(e=e||{},checkType("int64","rTCInboundRTPStreamStatsDict.packetsReceived",e.packetsReceived,{required:!0}),checkType("int64","rTCInboundRTPStreamStatsDict.bytesReceived",e.bytesReceived,{required:!0}),checkType("double","rTCInboundRTPStreamStatsDict.jitter",e.jitter,{required:!0}),RTCInboundRTPStreamStats.super_.call(this,e),void Object.defineProperties(this,{packetsReceived:{writable:!0,enumerable:!0,value:e.packetsReceived},bytesReceived:{writable:!0,enumerable:!0,value:e.bytesReceived},jitter:{writable:!0,enumerable:!0,value:e.jitter}})):new RTCInboundRTPStreamStats(e)}function checkRTCInboundRTPStreamStats(e,t){if(!(t instanceof RTCInboundRTPStreamStats))throw ChecktypeError(e,RTCInboundRTPStreamStats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCRTPStreamStats=require("./RTCRTPStreamStats");inherits(RTCInboundRTPStreamStats,RTCRTPStreamStats),Object.defineProperties(RTCInboundRTPStreamStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCInboundRTPStreamStats"}}),module.exports=RTCInboundRTPStreamStats,RTCInboundRTPStreamStats.check=checkRTCInboundRTPStreamStats;
},{"./RTCRTPStreamStats":80,"inherits":"inherits","kurento-client":"kurento-client"}],76:[function(require,module,exports){
function RTCMediaStreamStats(e){return this instanceof RTCMediaStreamStats?(e=e||{},checkType("String","rTCMediaStreamStatsDict.streamIdentifier",e.streamIdentifier,{required:!0}),checkType("String","rTCMediaStreamStatsDict.trackIds",e.trackIds,{isArray:!0,required:!0}),RTCMediaStreamStats.super_.call(this,e),void Object.defineProperties(this,{streamIdentifier:{writable:!0,enumerable:!0,value:e.streamIdentifier},trackIds:{writable:!0,enumerable:!0,value:e.trackIds}})):new RTCMediaStreamStats(e)}function checkRTCMediaStreamStats(e,t){if(!(t instanceof RTCMediaStreamStats))throw ChecktypeError(e,RTCMediaStreamStats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCMediaStreamStats,RTCStats),Object.defineProperties(RTCMediaStreamStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCMediaStreamStats"}}),module.exports=RTCMediaStreamStats,RTCMediaStreamStats.check=checkRTCMediaStreamStats;
},{"./RTCStats":81,"inherits":"inherits","kurento-client":"kurento-client"}],77:[function(require,module,exports){
function RTCMediaStreamTrackStats(e){return this instanceof RTCMediaStreamTrackStats?(e=e||{},checkType("String","rTCMediaStreamTrackStatsDict.trackIdentifier",e.trackIdentifier,{required:!0}),checkType("boolean","rTCMediaStreamTrackStatsDict.remoteSource",e.remoteSource,{required:!0}),checkType("String","rTCMediaStreamTrackStatsDict.ssrcIds",e.ssrcIds,{isArray:!0,required:!0}),checkType("int64","rTCMediaStreamTrackStatsDict.frameWidth",e.frameWidth,{required:!0}),checkType("int64","rTCMediaStreamTrackStatsDict.frameHeight",e.frameHeight,{required:!0}),checkType("double","rTCMediaStreamTrackStatsDict.framesPerSecond",e.framesPerSecond,{required:!0}),checkType("int64","rTCMediaStreamTrackStatsDict.framesSent",e.framesSent,{required:!0}),checkType("int64","rTCMediaStreamTrackStatsDict.framesReceived",e.framesReceived,{required:!0}),checkType("int64","rTCMediaStreamTrackStatsDict.framesDecoded",e.framesDecoded,{required:!0}),checkType("int64","rTCMediaStreamTrackStatsDict.framesDropped",e.framesDropped,{required:!0}),checkType("int64","rTCMediaStreamTrackStatsDict.framesCorrupted",e.framesCorrupted,{required:!0}),checkType("double","rTCMediaStreamTrackStatsDict.audioLevel",e.audioLevel,{required:!0}),checkType("double","rTCMediaStreamTrackStatsDict.echoReturnLoss",e.echoReturnLoss,{required:!0}),checkType("double","rTCMediaStreamTrackStatsDict.echoReturnLossEnhancement",e.echoReturnLossEnhancement,{required:!0}),RTCMediaStreamTrackStats.super_.call(this,e),void Object.defineProperties(this,{trackIdentifier:{writable:!0,enumerable:!0,value:e.trackIdentifier},remoteSource:{writable:!0,enumerable:!0,value:e.remoteSource},ssrcIds:{writable:!0,enumerable:!0,value:e.ssrcIds},frameWidth:{writable:!0,enumerable:!0,value:e.frameWidth},frameHeight:{writable:!0,enumerable:!0,value:e.frameHeight},framesPerSecond:{writable:!0,enumerable:!0,value:e.framesPerSecond},framesSent:{writable:!0,enumerable:!0,value:e.framesSent},framesReceived:{writable:!0,enumerable:!0,value:e.framesReceived},framesDecoded:{writable:!0,enumerable:!0,value:e.framesDecoded},framesDropped:{writable:!0,enumerable:!0,value:e.framesDropped},framesCorrupted:{writable:!0,enumerable:!0,value:e.framesCorrupted},audioLevel:{writable:!0,enumerable:!0,value:e.audioLevel},echoReturnLoss:{writable:!0,enumerable:!0,value:e.echoReturnLoss},echoReturnLossEnhancement:{writable:!0,enumerable:!0,value:e.echoReturnLossEnhancement}})):new RTCMediaStreamTrackStats(e)}function checkRTCMediaStreamTrackStats(e,r){if(!(r instanceof RTCMediaStreamTrackStats))throw ChecktypeError(e,RTCMediaStreamTrackStats,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCMediaStreamTrackStats,RTCStats),Object.defineProperties(RTCMediaStreamTrackStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCMediaStreamTrackStats"}}),module.exports=RTCMediaStreamTrackStats,RTCMediaStreamTrackStats.check=checkRTCMediaStreamTrackStats;
},{"./RTCStats":81,"inherits":"inherits","kurento-client":"kurento-client"}],78:[function(require,module,exports){
function RTCOutboundRTPStreamStats(t){return this instanceof RTCOutboundRTPStreamStats?(t=t||{},checkType("int64","rTCOutboundRTPStreamStatsDict.packetsSent",t.packetsSent,{required:!0}),checkType("int64","rTCOutboundRTPStreamStatsDict.bytesSent",t.bytesSent,{required:!0}),checkType("double","rTCOutboundRTPStreamStatsDict.targetBitrate",t.targetBitrate,{required:!0}),checkType("double","rTCOutboundRTPStreamStatsDict.roundTripTime",t.roundTripTime,{required:!0}),RTCOutboundRTPStreamStats.super_.call(this,t),void Object.defineProperties(this,{packetsSent:{writable:!0,enumerable:!0,value:t.packetsSent},bytesSent:{writable:!0,enumerable:!0,value:t.bytesSent},targetBitrate:{writable:!0,enumerable:!0,value:t.targetBitrate},roundTripTime:{writable:!0,enumerable:!0,value:t.roundTripTime}})):new RTCOutboundRTPStreamStats(t)}function checkRTCOutboundRTPStreamStats(t,e){if(!(e instanceof RTCOutboundRTPStreamStats))throw ChecktypeError(t,RTCOutboundRTPStreamStats,e)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCRTPStreamStats=require("./RTCRTPStreamStats");inherits(RTCOutboundRTPStreamStats,RTCRTPStreamStats),Object.defineProperties(RTCOutboundRTPStreamStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCOutboundRTPStreamStats"}}),module.exports=RTCOutboundRTPStreamStats,RTCOutboundRTPStreamStats.check=checkRTCOutboundRTPStreamStats;
},{"./RTCRTPStreamStats":80,"inherits":"inherits","kurento-client":"kurento-client"}],79:[function(require,module,exports){
function RTCPeerConnectionStats(e){return this instanceof RTCPeerConnectionStats?(e=e||{},checkType("int64","rTCPeerConnectionStatsDict.dataChannelsOpened",e.dataChannelsOpened,{required:!0}),checkType("int64","rTCPeerConnectionStatsDict.dataChannelsClosed",e.dataChannelsClosed,{required:!0}),RTCPeerConnectionStats.super_.call(this,e),void Object.defineProperties(this,{dataChannelsOpened:{writable:!0,enumerable:!0,value:e.dataChannelsOpened},dataChannelsClosed:{writable:!0,enumerable:!0,value:e.dataChannelsClosed}})):new RTCPeerConnectionStats(e)}function checkRTCPeerConnectionStats(e,t){if(!(t instanceof RTCPeerConnectionStats))throw ChecktypeError(e,RTCPeerConnectionStats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCPeerConnectionStats,RTCStats),Object.defineProperties(RTCPeerConnectionStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCPeerConnectionStats"}}),module.exports=RTCPeerConnectionStats,RTCPeerConnectionStats.check=checkRTCPeerConnectionStats;
},{"./RTCStats":81,"inherits":"inherits","kurento-client":"kurento-client"}],80:[function(require,module,exports){
function RTCRTPStreamStats(e){return this instanceof RTCRTPStreamStats?(e=e||{},checkType("String","rTCRTPStreamStatsDict.ssrc",e.ssrc,{required:!0}),checkType("String","rTCRTPStreamStatsDict.associateStatsId",e.associateStatsId,{required:!0}),checkType("boolean","rTCRTPStreamStatsDict.isRemote",e.isRemote,{required:!0}),checkType("String","rTCRTPStreamStatsDict.mediaTrackId",e.mediaTrackId,{required:!0}),checkType("String","rTCRTPStreamStatsDict.transportId",e.transportId,{required:!0}),checkType("String","rTCRTPStreamStatsDict.codecId",e.codecId,{required:!0}),checkType("int64","rTCRTPStreamStatsDict.firCount",e.firCount,{required:!0}),checkType("int64","rTCRTPStreamStatsDict.pliCount",e.pliCount,{required:!0}),checkType("int64","rTCRTPStreamStatsDict.nackCount",e.nackCount,{required:!0}),checkType("int64","rTCRTPStreamStatsDict.sliCount",e.sliCount,{required:!0}),checkType("int64","rTCRTPStreamStatsDict.remb",e.remb,{required:!0}),checkType("int64","rTCRTPStreamStatsDict.packetsLost",e.packetsLost,{required:!0}),checkType("double","rTCRTPStreamStatsDict.fractionLost",e.fractionLost,{required:!0}),RTCRTPStreamStats.super_.call(this,e),void Object.defineProperties(this,{ssrc:{writable:!0,enumerable:!0,value:e.ssrc},associateStatsId:{writable:!0,enumerable:!0,value:e.associateStatsId},isRemote:{writable:!0,enumerable:!0,value:e.isRemote},mediaTrackId:{writable:!0,enumerable:!0,value:e.mediaTrackId},transportId:{writable:!0,enumerable:!0,value:e.transportId},codecId:{writable:!0,enumerable:!0,value:e.codecId},firCount:{writable:!0,enumerable:!0,value:e.firCount},pliCount:{writable:!0,enumerable:!0,value:e.pliCount},nackCount:{writable:!0,enumerable:!0,value:e.nackCount},sliCount:{writable:!0,enumerable:!0,value:e.sliCount},remb:{writable:!0,enumerable:!0,value:e.remb},packetsLost:{writable:!0,enumerable:!0,value:e.packetsLost},fractionLost:{writable:!0,enumerable:!0,value:e.fractionLost}})):new RTCRTPStreamStats(e)}function checkRTCRTPStreamStats(e,t){if(!(t instanceof RTCRTPStreamStats))throw ChecktypeError(e,RTCRTPStreamStats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCRTPStreamStats,RTCStats),Object.defineProperties(RTCRTPStreamStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCRTPStreamStats"}}),module.exports=RTCRTPStreamStats,RTCRTPStreamStats.check=checkRTCRTPStreamStats;
},{"./RTCStats":81,"inherits":"inherits","kurento-client":"kurento-client"}],81:[function(require,module,exports){
function RTCStats(t){return this instanceof RTCStats?(t=t||{},RTCStats.super_.call(this,t),void Object.defineProperties(this,{})):new RTCStats(t)}function checkRTCStats(t,e){if(!(e instanceof RTCStats))throw ChecktypeError(t,RTCStats,e)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Stats=require("./Stats");inherits(RTCStats,Stats),Object.defineProperties(RTCStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCStats"}}),module.exports=RTCStats,RTCStats.check=checkRTCStats;
},{"./Stats":88,"inherits":"inherits","kurento-client":"kurento-client"}],82:[function(require,module,exports){
function checkRTCStatsIceCandidatePairState(e,t){if("string"!=typeof t)throw SyntaxError(e+" param should be a String, not "+typeof t);if(!t.match("frozen|waiting|inprogress|failed|succeeded|cancelled"))throw SyntaxError(e+" param is not one of [frozen|waiting|inprogress|failed|succeeded|cancelled] ("+t+")")}var kurentoClient=require("kurento-client");module.exports=checkRTCStatsIceCandidatePairState;
},{"kurento-client":"kurento-client"}],83:[function(require,module,exports){
function checkRTCStatsIceCandidateType(e,r){if("string"!=typeof r)throw SyntaxError(e+" param should be a String, not "+typeof r);if(!r.match("host|serverreflexive|peerreflexive|relayed"))throw SyntaxError(e+" param is not one of [host|serverreflexive|peerreflexive|relayed] ("+r+")")}var kurentoClient=require("kurento-client");module.exports=checkRTCStatsIceCandidateType;
},{"kurento-client":"kurento-client"}],84:[function(require,module,exports){
function RTCTransportStats(e){return this instanceof RTCTransportStats?(e=e||{},checkType("int64","rTCTransportStatsDict.bytesSent",e.bytesSent,{required:!0}),checkType("int64","rTCTransportStatsDict.bytesReceived",e.bytesReceived,{required:!0}),checkType("String","rTCTransportStatsDict.rtcpTransportStatsId",e.rtcpTransportStatsId,{required:!0}),checkType("boolean","rTCTransportStatsDict.activeConnection",e.activeConnection,{required:!0}),checkType("String","rTCTransportStatsDict.selectedCandidatePairId",e.selectedCandidatePairId,{required:!0}),checkType("String","rTCTransportStatsDict.localCertificateId",e.localCertificateId,{required:!0}),checkType("String","rTCTransportStatsDict.remoteCertificateId",e.remoteCertificateId,{required:!0}),RTCTransportStats.super_.call(this,e),void Object.defineProperties(this,{bytesSent:{writable:!0,enumerable:!0,value:e.bytesSent},bytesReceived:{writable:!0,enumerable:!0,value:e.bytesReceived},rtcpTransportStatsId:{writable:!0,enumerable:!0,value:e.rtcpTransportStatsId},activeConnection:{writable:!0,enumerable:!0,value:e.activeConnection},selectedCandidatePairId:{writable:!0,enumerable:!0,value:e.selectedCandidatePairId},localCertificateId:{writable:!0,enumerable:!0,value:e.localCertificateId},remoteCertificateId:{writable:!0,enumerable:!0,value:e.remoteCertificateId}})):new RTCTransportStats(e)}function checkRTCTransportStats(e,t){if(!(t instanceof RTCTransportStats))throw ChecktypeError(e,RTCTransportStats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCTransportStats,RTCStats),Object.defineProperties(RTCTransportStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCTransportStats"}}),module.exports=RTCTransportStats,RTCTransportStats.check=checkRTCTransportStats;
},{"./RTCStats":81,"inherits":"inherits","kurento-client":"kurento-client"}],85:[function(require,module,exports){
function RembParams(e){return this instanceof RembParams?(e=e||{},checkType("int","rembParamsDict.packetsRecvIntervalTop",e.packetsRecvIntervalTop),checkType("float","rembParamsDict.exponentialFactor",e.exponentialFactor),checkType("int","rembParamsDict.linealFactorMin",e.linealFactorMin),checkType("float","rembParamsDict.linealFactorGrade",e.linealFactorGrade),checkType("float","rembParamsDict.decrementFactor",e.decrementFactor),checkType("float","rembParamsDict.thresholdFactor",e.thresholdFactor),checkType("int","rembParamsDict.upLosses",e.upLosses),checkType("int","rembParamsDict.rembOnConnect",e.rembOnConnect),RembParams.super_.call(this,e),void Object.defineProperties(this,{packetsRecvIntervalTop:{writable:!0,enumerable:!0,value:e.packetsRecvIntervalTop},exponentialFactor:{writable:!0,enumerable:!0,value:e.exponentialFactor},linealFactorMin:{writable:!0,enumerable:!0,value:e.linealFactorMin},linealFactorGrade:{writable:!0,enumerable:!0,value:e.linealFactorGrade},decrementFactor:{writable:!0,enumerable:!0,value:e.decrementFactor},thresholdFactor:{writable:!0,enumerable:!0,value:e.thresholdFactor},upLosses:{writable:!0,enumerable:!0,value:e.upLosses},rembOnConnect:{writable:!0,enumerable:!0,value:e.rembOnConnect}})):new RembParams(e)}function checkRembParams(e,a){if(!(a instanceof RembParams))throw ChecktypeError(e,RembParams,a)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(RembParams,ComplexType),Object.defineProperties(RembParams.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RembParams"}}),module.exports=RembParams,RembParams.check=checkRembParams;
},{"./ComplexType":58,"inherits":"inherits","kurento-client":"kurento-client"}],86:[function(require,module,exports){
function ServerInfo(e){return this instanceof ServerInfo?(e=e||{},checkType("String","serverInfoDict.version",e.version,{required:!0}),checkType("ModuleInfo","serverInfoDict.modules",e.modules,{isArray:!0,required:!0}),checkType("ServerType","serverInfoDict.type",e.type,{required:!0}),checkType("String","serverInfoDict.capabilities",e.capabilities,{isArray:!0,required:!0}),ServerInfo.super_.call(this,e),void Object.defineProperties(this,{version:{writable:!0,enumerable:!0,value:e.version},modules:{writable:!0,enumerable:!0,value:e.modules},type:{writable:!0,enumerable:!0,value:e.type},capabilities:{writable:!0,enumerable:!0,value:e.capabilities}})):new ServerInfo(e)}function checkServerInfo(e,r){if(!(r instanceof ServerInfo))throw ChecktypeError(e,ServerInfo,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(ServerInfo,ComplexType),Object.defineProperties(ServerInfo.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"ServerInfo"}}),module.exports=ServerInfo,ServerInfo.check=checkServerInfo;
},{"./ComplexType":58,"inherits":"inherits","kurento-client":"kurento-client"}],87:[function(require,module,exports){
function checkServerType(r,e){if("string"!=typeof e)throw SyntaxError(r+" param should be a String, not "+typeof e);if(!e.match("KMS|KCS"))throw SyntaxError(r+" param is not one of [KMS|KCS] ("+e+")")}var kurentoClient=require("kurento-client");module.exports=checkServerType;
},{"kurento-client":"kurento-client"}],88:[function(require,module,exports){
function Stats(e){return this instanceof Stats?(e=e||{},checkType("String","statsDict.id",e.id,{required:!0}),checkType("StatsType","statsDict.type",e.type,{required:!0}),checkType("double","statsDict.timestamp",e.timestamp,{required:!0}),Stats.super_.call(this,e),void Object.defineProperties(this,{id:{writable:!0,enumerable:!0,value:e.id},type:{writable:!0,enumerable:!0,value:e.type},timestamp:{writable:!0,enumerable:!0,value:e.timestamp}})):new Stats(e)}function checkStats(e,t){if(!(t instanceof Stats))throw ChecktypeError(e,Stats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(Stats,ComplexType),Object.defineProperties(Stats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"Stats"}}),module.exports=Stats,Stats.check=checkStats;
},{"./ComplexType":58,"inherits":"inherits","kurento-client":"kurento-client"}],89:[function(require,module,exports){
function checkStatsType(t,n){if("string"!=typeof n)throw SyntaxError(t+" param should be a String, not "+typeof n);if(!n.match("inboundrtp|outboundrtp|session|datachannel|track|transport|candidatepair|localcandidate|remotecandidate|element|endpoint"))throw SyntaxError(t+" param is not one of [inboundrtp|outboundrtp|session|datachannel|track|transport|candidatepair|localcandidate|remotecandidate|element|endpoint] ("+n+")")}var kurentoClient=require("kurento-client");module.exports=checkStatsType;
},{"kurento-client":"kurento-client"}],90:[function(require,module,exports){
function Tag(e){return this instanceof Tag?(e=e||{},checkType("String","tagDict.key",e.key,{required:!0}),checkType("String","tagDict.value",e.value,{required:!0}),Tag.super_.call(this,e),void Object.defineProperties(this,{key:{writable:!0,enumerable:!0,value:e.key},value:{writable:!0,enumerable:!0,value:e.value}})):new Tag(e)}function checkTag(e,r){if(!(r instanceof Tag))throw ChecktypeError(e,Tag,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(Tag,ComplexType),Object.defineProperties(Tag.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"Tag"}}),module.exports=Tag,Tag.check=checkTag;
},{"./ComplexType":58,"inherits":"inherits","kurento-client":"kurento-client"}],91:[function(require,module,exports){
function VideoCaps(e){return this instanceof VideoCaps?(e=e||{},checkType("VideoCodec","videoCapsDict.codec",e.codec,{required:!0}),checkType("Fraction","videoCapsDict.framerate",e.framerate,{required:!0}),VideoCaps.super_.call(this,e),void Object.defineProperties(this,{codec:{writable:!0,enumerable:!0,value:e.codec},framerate:{writable:!0,enumerable:!0,value:e.framerate}})):new VideoCaps(e)}function checkVideoCaps(e,r){if(!(r instanceof VideoCaps))throw ChecktypeError(e,VideoCaps,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(VideoCaps,ComplexType),Object.defineProperties(VideoCaps.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"VideoCaps"}}),module.exports=VideoCaps,VideoCaps.check=checkVideoCaps;
},{"./ComplexType":58,"inherits":"inherits","kurento-client":"kurento-client"}],92:[function(require,module,exports){
function checkVideoCodec(o,e){if("string"!=typeof e)throw SyntaxError(o+" param should be a String, not "+typeof e);if(!e.match("VP8|H264|RAW"))throw SyntaxError(o+" param is not one of [VP8|H264|RAW] ("+e+")")}var kurentoClient=require("kurento-client");module.exports=checkVideoCodec;
},{"kurento-client":"kurento-client"}],93:[function(require,module,exports){
var ComplexType=require("./ComplexType"),AudioCaps=require("./AudioCaps"),AudioCodec=require("./AudioCodec"),CodecConfiguration=require("./CodecConfiguration"),ConnectionState=require("./ConnectionState"),ElementConnectionData=require("./ElementConnectionData"),ElementStats=require("./ElementStats"),EndpointStats=require("./EndpointStats"),FilterType=require("./FilterType"),Fraction=require("./Fraction"),GstreamerDotDetails=require("./GstreamerDotDetails"),MediaState=require("./MediaState"),MediaType=require("./MediaType"),ModuleInfo=require("./ModuleInfo"),RembParams=require("./RembParams"),RTCCertificateStats=require("./RTCCertificateStats"),RTCCodec=require("./RTCCodec"),RTCDataChannelState=require("./RTCDataChannelState"),RTCDataChannelStats=require("./RTCDataChannelStats"),RTCIceCandidateAttributes=require("./RTCIceCandidateAttributes"),RTCIceCandidatePairStats=require("./RTCIceCandidatePairStats"),RTCInboundRTPStreamStats=require("./RTCInboundRTPStreamStats"),RTCMediaStreamStats=require("./RTCMediaStreamStats"),RTCMediaStreamTrackStats=require("./RTCMediaStreamTrackStats"),RTCOutboundRTPStreamStats=require("./RTCOutboundRTPStreamStats"),RTCPeerConnectionStats=require("./RTCPeerConnectionStats"),RTCRTPStreamStats=require("./RTCRTPStreamStats"),RTCStats=require("./RTCStats"),RTCStatsIceCandidatePairState=require("./RTCStatsIceCandidatePairState"),RTCStatsIceCandidateType=require("./RTCStatsIceCandidateType"),RTCTransportStats=require("./RTCTransportStats"),ServerInfo=require("./ServerInfo"),ServerType=require("./ServerType"),Stats=require("./Stats"),StatsType=require("./StatsType"),Tag=require("./Tag"),VideoCaps=require("./VideoCaps"),VideoCodec=require("./VideoCodec");exports.ComplexType=ComplexType,exports.AudioCaps=AudioCaps,exports.AudioCodec=AudioCodec,exports.CodecConfiguration=CodecConfiguration,exports.ConnectionState=ConnectionState,exports.ElementConnectionData=ElementConnectionData,exports.ElementStats=ElementStats,exports.EndpointStats=EndpointStats,exports.FilterType=FilterType,exports.Fraction=Fraction,exports.GstreamerDotDetails=GstreamerDotDetails,exports.MediaState=MediaState,exports.MediaType=MediaType,exports.ModuleInfo=ModuleInfo,exports.RembParams=RembParams,exports.RTCCertificateStats=RTCCertificateStats,exports.RTCCodec=RTCCodec,exports.RTCDataChannelState=RTCDataChannelState,exports.RTCDataChannelStats=RTCDataChannelStats,exports.RTCIceCandidateAttributes=RTCIceCandidateAttributes,exports.RTCIceCandidatePairStats=RTCIceCandidatePairStats,exports.RTCInboundRTPStreamStats=RTCInboundRTPStreamStats,exports.RTCMediaStreamStats=RTCMediaStreamStats,exports.RTCMediaStreamTrackStats=RTCMediaStreamTrackStats,exports.RTCOutboundRTPStreamStats=RTCOutboundRTPStreamStats,exports.RTCPeerConnectionStats=RTCPeerConnectionStats,exports.RTCRTPStreamStats=RTCRTPStreamStats,exports.RTCStats=RTCStats,exports.RTCStatsIceCandidatePairState=RTCStatsIceCandidatePairState,exports.RTCStatsIceCandidateType=RTCStatsIceCandidateType,exports.RTCTransportStats=RTCTransportStats,exports.ServerInfo=ServerInfo,exports.ServerType=ServerType,exports.Stats=Stats,exports.StatsType=StatsType,exports.Tag=Tag,exports.VideoCaps=VideoCaps,exports.VideoCodec=VideoCodec;
},{"./AudioCaps":55,"./AudioCodec":56,"./CodecConfiguration":57,"./ComplexType":58,"./ConnectionState":59,"./ElementConnectionData":60,"./ElementStats":61,"./EndpointStats":62,"./FilterType":63,"./Fraction":64,"./GstreamerDotDetails":65,"./MediaState":66,"./MediaType":67,"./ModuleInfo":68,"./RTCCertificateStats":69,"./RTCCodec":70,"./RTCDataChannelState":71,"./RTCDataChannelStats":72,"./RTCIceCandidateAttributes":73,"./RTCIceCandidatePairStats":74,"./RTCInboundRTPStreamStats":75,"./RTCMediaStreamStats":76,"./RTCMediaStreamTrackStats":77,"./RTCOutboundRTPStreamStats":78,"./RTCPeerConnectionStats":79,"./RTCRTPStreamStats":80,"./RTCStats":81,"./RTCStatsIceCandidatePairState":82,"./RTCStatsIceCandidateType":83,"./RTCTransportStats":84,"./RembParams":85,"./ServerInfo":86,"./ServerType":87,"./Stats":88,"./StatsType":89,"./Tag":90,"./VideoCaps":91,"./VideoCodec":92}],94:[function(require,module,exports){
function noop(e,r){return e&&console.trace(e),r}function AlphaBlending(){AlphaBlending.super_.call(this)}function checkAlphaBlending(e,r){if(!(r instanceof AlphaBlending))throw ChecktypeError(e,AlphaBlending,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,Hub=require("kurento-client-core").abstracts.Hub;inherits(AlphaBlending,Hub),AlphaBlending.prototype.setMaster=function(e,r,t){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("HubPort","source",e,{required:!0}),checkType("int","zOrder",r,{required:!0});var n={source:e,zOrder:r};return t=(t||noop).bind(this),disguise(this._invoke(i,"setMaster",n,t),this)},AlphaBlending.prototype.setPortProperties=function(e,r,t,i,n,a,o){var c=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("float","relativeX",e,{required:!0}),checkType("float","relativeY",r,{required:!0}),checkType("int","zOrder",t,{required:!0}),checkType("float","relativeWidth",i,{required:!0}),checkType("float","relativeHeight",n,{required:!0}),checkType("HubPort","port",a,{required:!0});var l={relativeX:e,relativeY:r,zOrder:t,relativeWidth:i,relativeHeight:n,port:a};return o=(o||noop).bind(this),disguise(this._invoke(c,"setPortProperties",l,o),this)},AlphaBlending.constructorParams={mediaPipeline:{type:"MediaPipeline",required:!0}},AlphaBlending.events=Hub.events,module.exports=AlphaBlending,AlphaBlending.check=checkAlphaBlending;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],95:[function(require,module,exports){
function Composite(){Composite.super_.call(this)}function checkComposite(e,i){if(!(i instanceof Composite))throw ChecktypeError(e,Composite,i)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,Hub=require("kurento-client-core").abstracts.Hub;inherits(Composite,Hub),Composite.constructorParams={mediaPipeline:{type:"MediaPipeline",required:!0}},Composite.events=Hub.events,module.exports=Composite,Composite.check=checkComposite;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],96:[function(require,module,exports){
function noop(e,r){return e&&console.trace(e),r}function Dispatcher(){Dispatcher.super_.call(this)}function checkDispatcher(e,r){if(!(r instanceof Dispatcher))throw ChecktypeError(e,Dispatcher,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,Hub=require("kurento-client-core").abstracts.Hub;inherits(Dispatcher,Hub),Dispatcher.prototype.connect=function(e,r,t){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("HubPort","source",e,{required:!0}),checkType("HubPort","sink",r,{required:!0});var c={source:e,sink:r};return t=(t||noop).bind(this),disguise(this._invoke(i,"connect",c,t),this)},Dispatcher.constructorParams={mediaPipeline:{type:"MediaPipeline",required:!0}},Dispatcher.events=Hub.events,module.exports=Dispatcher,Dispatcher.check=checkDispatcher;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],97:[function(require,module,exports){
function noop(e,n){return e&&console.trace(e),n}function DispatcherOneToMany(){DispatcherOneToMany.super_.call(this)}function checkDispatcherOneToMany(e,n){if(!(n instanceof DispatcherOneToMany))throw ChecktypeError(e,DispatcherOneToMany,n)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,Hub=require("kurento-client-core").abstracts.Hub;inherits(DispatcherOneToMany,Hub),DispatcherOneToMany.prototype.removeSource=function(e){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(n,"removeSource",e),this)},DispatcherOneToMany.prototype.setSource=function(e,n){var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("HubPort","source",e,{required:!0});var t={source:e};return n=(n||noop).bind(this),disguise(this._invoke(r,"setSource",t,n),this)},DispatcherOneToMany.constructorParams={mediaPipeline:{type:"MediaPipeline",required:!0}},DispatcherOneToMany.events=Hub.events,module.exports=DispatcherOneToMany,DispatcherOneToMany.check=checkDispatcherOneToMany;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],98:[function(require,module,exports){
function HttpPostEndpoint(){HttpPostEndpoint.super_.call(this)}function checkHttpPostEndpoint(t,n){if(!(n instanceof HttpPostEndpoint))throw ChecktypeError(t,HttpPostEndpoint,n)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,HttpEndpoint=require("./abstracts/HttpEndpoint");inherits(HttpPostEndpoint,HttpEndpoint),HttpPostEndpoint.constructorParams={disconnectionTimeout:{type:"int"},mediaPipeline:{type:"MediaPipeline",required:!0},useEncodedMedia:{type:"boolean"}},HttpPostEndpoint.events=HttpEndpoint.events.concat(["EndOfStream"]),module.exports=HttpPostEndpoint,HttpPostEndpoint.check=checkHttpPostEndpoint;
},{"./abstracts/HttpEndpoint":104,"inherits":"inherits","kurento-client":"kurento-client"}],99:[function(require,module,exports){
function noop(e,r){return e&&console.trace(e),r}function Mixer(){Mixer.super_.call(this)}function checkMixer(e,r){if(!(r instanceof Mixer))throw ChecktypeError(e,Mixer,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,Hub=require("kurento-client-core").abstracts.Hub;inherits(Mixer,Hub),Mixer.prototype.connect=function(e,r,i,n){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("MediaType","media",e,{required:!0}),checkType("HubPort","source",r,{required:!0}),checkType("HubPort","sink",i,{required:!0});var c={media:e,source:r,sink:i};return n=(n||noop).bind(this),disguise(this._invoke(t,"connect",c,n),this)},Mixer.prototype.disconnect=function(e,r,i,n){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("MediaType","media",e,{required:!0}),checkType("HubPort","source",r,{required:!0}),checkType("HubPort","sink",i,{required:!0});var c={media:e,source:r,sink:i};return n=(n||noop).bind(this),disguise(this._invoke(t,"disconnect",c,n),this)},Mixer.constructorParams={mediaPipeline:{type:"MediaPipeline",required:!0}},Mixer.events=Hub.events,module.exports=Mixer,Mixer.check=checkMixer;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],100:[function(require,module,exports){
function noop(e,n){return e&&console.trace(e),n}function PlayerEndpoint(){PlayerEndpoint.super_.call(this)}function checkPlayerEndpoint(e,n){if(!(n instanceof PlayerEndpoint))throw ChecktypeError(e,PlayerEndpoint,n)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,UriEndpoint=require("kurento-client-core").abstracts.UriEndpoint;inherits(PlayerEndpoint,UriEndpoint),PlayerEndpoint.prototype.play=function(e){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(n,"play",e),this)},PlayerEndpoint.constructorParams={mediaPipeline:{type:"MediaPipeline",required:!0},uri:{type:"String",required:!0},useEncodedMedia:{type:"boolean"}},PlayerEndpoint.events=UriEndpoint.events.concat(["EndOfStream"]),module.exports=PlayerEndpoint,PlayerEndpoint.check=checkPlayerEndpoint;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],101:[function(require,module,exports){
function noop(e,r){return e&&console.trace(e),r}function RecorderEndpoint(){RecorderEndpoint.super_.call(this)}function checkRecorderEndpoint(e,r){if(!(r instanceof RecorderEndpoint))throw ChecktypeError(e,RecorderEndpoint,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,UriEndpoint=require("kurento-client-core").abstracts.UriEndpoint;inherits(RecorderEndpoint,UriEndpoint),RecorderEndpoint.prototype.record=function(e){var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(r,"record",e),this)},RecorderEndpoint.constructorParams={mediaPipeline:{type:"MediaPipeline",required:!0},mediaProfile:{type:"MediaProfileSpecType"},stopOnEndOfStream:{type:"boolean"},uri:{type:"String",required:!0}},RecorderEndpoint.events=UriEndpoint.events,module.exports=RecorderEndpoint,RecorderEndpoint.check=checkRecorderEndpoint;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],102:[function(require,module,exports){
function RtpEndpoint(){RtpEndpoint.super_.call(this)}function checkRtpEndpoint(t,e){if(!(e instanceof RtpEndpoint))throw ChecktypeError(t,RtpEndpoint,e)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,BaseRtpEndpoint=require("kurento-client-core").abstracts.BaseRtpEndpoint;inherits(RtpEndpoint,BaseRtpEndpoint),RtpEndpoint.constructorParams={crypto:{type:"SDES"},mediaPipeline:{type:"MediaPipeline",required:!0}},RtpEndpoint.events=BaseRtpEndpoint.events,module.exports=RtpEndpoint,RtpEndpoint.check=checkRtpEndpoint;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],103:[function(require,module,exports){
function noop(e,t){return e&&console.trace(e),t}function WebRtcEndpoint(){WebRtcEndpoint.super_.call(this)}function checkWebRtcEndpoint(e,t){if(!(t instanceof WebRtcEndpoint))throw ChecktypeError(e,WebRtcEndpoint,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,BaseRtpEndpoint=require("kurento-client-core").abstracts.BaseRtpEndpoint;inherits(WebRtcEndpoint,BaseRtpEndpoint),WebRtcEndpoint.prototype.getStunServerAddress=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getStunServerAddress",e),this)},WebRtcEndpoint.prototype.setStunServerAddress=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("String","stunServerAddress",e,{required:!0});var r={stunServerAddress:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"setStunServerAddress",r,t),this)},WebRtcEndpoint.prototype.getStunServerPort=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getStunServerPort",e),this)},WebRtcEndpoint.prototype.setStunServerPort=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("int","stunServerPort",e,{required:!0});var r={stunServerPort:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"setStunServerPort",r,t),this)},WebRtcEndpoint.prototype.getTurnUrl=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getTurnUrl",e),this)},WebRtcEndpoint.prototype.setTurnUrl=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("String","turnUrl",e,{required:!0});var r={turnUrl:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"setTurnUrl",r,t),this)},WebRtcEndpoint.prototype.addIceCandidate=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("IceCandidate","candidate",e,{required:!0});var r={candidate:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"addIceCandidate",r,t),this)},WebRtcEndpoint.prototype.closeDataChannel=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("int","channelId",e,{required:!0});var r={channelId:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"closeDataChannel",r,t),this)},WebRtcEndpoint.prototype.createDataChannel=function(e,t,n,r,i,o){var a=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(o=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 0:e=void 0;case 1:t=void 0;case 2:n=void 0;case 3:r=void 0;case 4:i=void 0;break;case 5:break;default:var s=new RangeError("Number of params ("+arguments.length+") not in range [0-5]");throw s.length=arguments.length,s.min=0,s.max=5,s}checkType("String","label",e),checkType("boolean","ordered",t),checkType("int","maxPacketLifeTime",n),checkType("int","maxRetransmits",r),checkType("String","protocol",i);var c={label:e,ordered:t,maxPacketLifeTime:n,maxRetransmits:r,protocol:i};return o=(o||noop).bind(this),disguise(this._invoke(a,"createDataChannel",c,o),this)},WebRtcEndpoint.prototype.gatherCandidates=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"gatherCandidates",e),this)},WebRtcEndpoint.constructorParams={mediaPipeline:{type:"MediaPipeline",required:!0},useDataChannels:{type:"boolean"}},WebRtcEndpoint.events=BaseRtpEndpoint.events.concat(["OnDataChannelClosed","OnDataChannelOpened","OnIceCandidate","OnIceComponentStateChanged","OnIceGatheringDone"]),module.exports=WebRtcEndpoint,WebRtcEndpoint.check=checkWebRtcEndpoint;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],104:[function(require,module,exports){
function noop(t,n){return t&&console.trace(t),n}function HttpEndpoint(){HttpEndpoint.super_.call(this)}function checkHttpEndpoint(t,n){if(!(n instanceof HttpEndpoint))throw ChecktypeError(t,HttpEndpoint,n)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,SessionEndpoint=require("kurento-client-core").abstracts.SessionEndpoint;inherits(HttpEndpoint,SessionEndpoint),HttpEndpoint.prototype.getUrl=function(t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(t=void 0),t=(t||noop).bind(this),disguise(this._invoke(n,"getUrl",t),this)},HttpEndpoint.constructorParams={},HttpEndpoint.events=SessionEndpoint.events,module.exports=HttpEndpoint,HttpEndpoint.check=checkHttpEndpoint;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],105:[function(require,module,exports){
var HttpEndpoint=require("./HttpEndpoint");exports.HttpEndpoint=HttpEndpoint;
},{"./HttpEndpoint":104}],106:[function(require,module,exports){
function checkCryptoSuite(_,A){if("string"!=typeof A)throw SyntaxError(_+" param should be a String, not "+typeof A);if(!A.match("AES_128_CM_HMAC_SHA1_32|AES_128_CM_HMAC_SHA1_80|AES_256_CM_HMAC_SHA1_32|AES_256_CM_HMAC_SHA1_80"))throw SyntaxError(_+" param is not one of [AES_128_CM_HMAC_SHA1_32|AES_128_CM_HMAC_SHA1_80|AES_256_CM_HMAC_SHA1_32|AES_256_CM_HMAC_SHA1_80] ("+A+")")}var kurentoClient=require("kurento-client");module.exports=checkCryptoSuite;
},{"kurento-client":"kurento-client"}],107:[function(require,module,exports){
function IceCandidate(e){return this instanceof IceCandidate?(e=e||{},checkType("String","iceCandidateDict.candidate",e.candidate,{required:!0}),checkType("String","iceCandidateDict.sdpMid",e.sdpMid,{required:!0}),checkType("int","iceCandidateDict.sdpMLineIndex",e.sdpMLineIndex,{required:!0}),IceCandidate.super_.call(this,e),void Object.defineProperties(this,{candidate:{writable:!0,enumerable:!0,value:e.candidate},sdpMid:{writable:!0,enumerable:!0,value:e.sdpMid},sdpMLineIndex:{writable:!0,enumerable:!0,value:e.sdpMLineIndex}})):new IceCandidate(e)}function checkIceCandidate(e,i){if(!(i instanceof IceCandidate))throw ChecktypeError(e,IceCandidate,i)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("kurento-client-core").complexTypes.ComplexType;inherits(IceCandidate,ComplexType),Object.defineProperties(IceCandidate.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"IceCandidate"}}),module.exports=IceCandidate,IceCandidate.check=checkIceCandidate;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],108:[function(require,module,exports){
function checkIceComponentState(t,e){if("string"!=typeof e)throw SyntaxError(t+" param should be a String, not "+typeof e);if(!e.match("DISCONNECTED|GATHERING|CONNECTING|CONNECTED|READY|FAILED"))throw SyntaxError(t+" param is not one of [DISCONNECTED|GATHERING|CONNECTING|CONNECTED|READY|FAILED] ("+e+")")}var kurentoClient=require("kurento-client");module.exports=checkIceComponentState;
},{"kurento-client":"kurento-client"}],109:[function(require,module,exports){
function checkMediaProfileSpecType(e,r){if("string"!=typeof r)throw SyntaxError(e+" param should be a String, not "+typeof r);if(!r.match("WEBM|MP4|WEBM_VIDEO_ONLY|WEBM_AUDIO_ONLY|MP4_VIDEO_ONLY|MP4_AUDIO_ONLY"))throw SyntaxError(e+" param is not one of [WEBM|MP4|WEBM_VIDEO_ONLY|WEBM_AUDIO_ONLY|MP4_VIDEO_ONLY|MP4_AUDIO_ONLY] ("+r+")")}var kurentoClient=require("kurento-client");module.exports=checkMediaProfileSpecType;
},{"kurento-client":"kurento-client"}],110:[function(require,module,exports){
function SDES(e){return this instanceof SDES?(e=e||{},checkType("String","sDESDict.key",e.key),checkType("CryptoSuite","sDESDict.crypto",e.crypto),SDES.super_.call(this,e),void Object.defineProperties(this,{key:{writable:!0,enumerable:!0,value:e.key},crypto:{writable:!0,enumerable:!0,value:e.crypto}})):new SDES(e)}function checkSDES(e,r){if(!(r instanceof SDES))throw ChecktypeError(e,SDES,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("kurento-client-core").complexTypes.ComplexType;inherits(SDES,ComplexType),Object.defineProperties(SDES.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"SDES"}}),module.exports=SDES,SDES.check=checkSDES;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],111:[function(require,module,exports){
var CryptoSuite=require("./CryptoSuite"),IceCandidate=require("./IceCandidate"),IceComponentState=require("./IceComponentState"),MediaProfileSpecType=require("./MediaProfileSpecType"),SDES=require("./SDES");exports.CryptoSuite=CryptoSuite,exports.IceCandidate=IceCandidate,exports.IceComponentState=IceComponentState,exports.MediaProfileSpecType=MediaProfileSpecType,exports.SDES=SDES;
},{"./CryptoSuite":106,"./IceCandidate":107,"./IceComponentState":108,"./MediaProfileSpecType":109,"./SDES":110}],112:[function(require,module,exports){
function noop(e,r){return e&&console.trace(e),r}function FaceOverlayFilter(){FaceOverlayFilter.super_.call(this)}function checkFaceOverlayFilter(e,r){if(!(r instanceof FaceOverlayFilter))throw ChecktypeError(e,FaceOverlayFilter,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,Filter=require("kurento-client-core").abstracts.Filter;inherits(FaceOverlayFilter,Filter),FaceOverlayFilter.prototype.setOverlayedImage=function(e,r,t,i,n,a){var c=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("String","uri",e,{required:!0}),checkType("float","offsetXPercent",r,{required:!0}),checkType("float","offsetYPercent",t,{required:!0}),checkType("float","widthPercent",i,{required:!0}),checkType("float","heightPercent",n,{required:!0});var o={uri:e,offsetXPercent:r,offsetYPercent:t,widthPercent:i,heightPercent:n};return a=(a||noop).bind(this),disguise(this._invoke(c,"setOverlayedImage",o,a),this)},FaceOverlayFilter.prototype.unsetOverlayedImage=function(e){var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(r,"unsetOverlayedImage",e),this)},FaceOverlayFilter.constructorParams={mediaPipeline:{type:"MediaPipeline",required:!0}},FaceOverlayFilter.events=Filter.events,module.exports=FaceOverlayFilter,FaceOverlayFilter.check=checkFaceOverlayFilter;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],113:[function(require,module,exports){
function noop(e,r){return e&&console.trace(e),r}function GStreamerFilter(){GStreamerFilter.super_.call(this)}function checkGStreamerFilter(e,r){if(!(r instanceof GStreamerFilter))throw ChecktypeError(e,GStreamerFilter,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,Filter=require("kurento-client-core").abstracts.Filter;inherits(GStreamerFilter,Filter),GStreamerFilter.prototype.getCommand=function(e){var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(r,"getCommand",e),this)},GStreamerFilter.constructorParams={command:{type:"String",required:!0},filterType:{type:"FilterType"},mediaPipeline:{type:"MediaPipeline",required:!0}},GStreamerFilter.events=Filter.events,module.exports=GStreamerFilter,GStreamerFilter.check=checkGStreamerFilter;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],114:[function(require,module,exports){
function noop(e,r){return e&&console.trace(e),r}function ImageOverlayFilter(){ImageOverlayFilter.super_.call(this)}function checkImageOverlayFilter(e,r){if(!(r instanceof ImageOverlayFilter))throw ChecktypeError(e,ImageOverlayFilter,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,Filter=require("kurento-client-core").abstracts.Filter;inherits(ImageOverlayFilter,Filter),ImageOverlayFilter.prototype.addImage=function(e,r,t,i,n,a,c,o,l){var s=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("String","id",e,{required:!0}),checkType("String","uri",r,{required:!0}),checkType("float","offsetXPercent",t,{required:!0}),checkType("float","offsetYPercent",i,{required:!0}),checkType("float","widthPercent",n,{required:!0}),checkType("float","heightPercent",a,{required:!0}),checkType("boolean","keepAspectRatio",c,{required:!0}),checkType("boolean","center",o,{required:!0});var u={id:e,uri:r,offsetXPercent:t,offsetYPercent:i,widthPercent:n,heightPercent:a,keepAspectRatio:c,center:o};return l=(l||noop).bind(this),disguise(this._invoke(s,"addImage",u,l),this)},ImageOverlayFilter.prototype.removeImage=function(e,r){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("String","id",e,{required:!0});var i={id:e};return r=(r||noop).bind(this),disguise(this._invoke(t,"removeImage",i,r),this)},ImageOverlayFilter.constructorParams={mediaPipeline:{type:"MediaPipeline",required:!0}},ImageOverlayFilter.events=Filter.events,module.exports=ImageOverlayFilter,ImageOverlayFilter.check=checkImageOverlayFilter;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],115:[function(require,module,exports){
function ZBarFilter(){ZBarFilter.super_.call(this)}function checkZBarFilter(e,r){if(!(r instanceof ZBarFilter))throw ChecktypeError(e,ZBarFilter,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,Filter=require("kurento-client-core").abstracts.Filter;inherits(ZBarFilter,Filter),ZBarFilter.constructorParams={mediaPipeline:{type:"MediaPipeline",required:!0}},ZBarFilter.events=Filter.events.concat(["CodeFound"]),module.exports=ZBarFilter,ZBarFilter.check=checkZBarFilter;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],116:[function(require,module,exports){
function OpenCVFilter(){OpenCVFilter.super_.call(this)}function checkOpenCVFilter(e,r){if(!(r instanceof OpenCVFilter))throw ChecktypeError(e,OpenCVFilter,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,Filter=require("kurento-client-core").abstracts.Filter;inherits(OpenCVFilter,Filter),OpenCVFilter.constructorParams={},OpenCVFilter.events=Filter.events,module.exports=OpenCVFilter,OpenCVFilter.check=checkOpenCVFilter;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],117:[function(require,module,exports){
var OpenCVFilter=require("./OpenCVFilter");exports.OpenCVFilter=OpenCVFilter;
},{"./OpenCVFilter":116}],118:[function(require,module,exports){
function Mapper(){var r={};this.forEach=function(e){for(var i in r){var t=r[i];for(var o in t)e(t[o])}},this.get=function(e,i){var t=r[i];if(void 0!=t)return t[e]},this.remove=function(e,i){var t=r[i];if(void 0!=t){delete t[e];for(var o in t)return!1;delete r[i]}},this.set=function(e,i,t){if(void 0==e)return this.remove(i,t);var o=r[t];void 0==o&&(r[t]=o={}),o[i]=e}}Mapper.prototype.pop=function(r,e){var i=this.get(r,e);if(void 0!=i)return this.remove(r,e),i},module.exports=Mapper;
},{}],119:[function(require,module,exports){
var JsonRpcClient=require("./jsonrpcclient");exports.JsonRpcClient=JsonRpcClient;
},{"./jsonrpcclient":120}],120:[function(require,module,exports){
function JsonRpcClient(e,r,n){var i=new WebSocket(e);i.addEventListener("error",n);var s=new RpcBuilder(RpcBuilder.packers.JsonRPC,i,r);this.close=s.close.bind(s),this.sendRequest=s.encode.bind(s)}var RpcBuilder=require("../.."),WebSocket=require("ws");module.exports=JsonRpcClient;
},{"../..":121,"ws":125}],121:[function(require,module,exports){
function unifyResponseMethods(e){if(!e)return{};for(var t in e){var r=e[t];"string"==typeof r&&(e[t]={response:r})}return e}function unifyTransport(e){if(e){if(e instanceof Function)return{send:e};if(e.send instanceof Function)return e;if(e.postMessage instanceof Function)return e.send=e.postMessage,e;if(e.write instanceof Function)return e.send=e.write,e;if(void 0===e.onmessage&&!(e.pause instanceof Function))throw new SyntaxError("Transport is not a function nor a valid object")}}function RpcNotification(e,t){defineProperty_IE8?(this.method=e,this.params=t):(Object.defineProperty(this,"method",{value:e,enumerable:!0}),Object.defineProperty(this,"params",{value:t,enumerable:!0}))}function RpcBuilder(e,t,r,n){function i(e){f.decode(e.data||e)}function o(e,t,r){var n={message:e,timeout:setTimeout(function(){y.remove(t,r)},l)};y.set(n,t,r)}function s(e,t){var r=setTimeout(function(){T.remove(e,t)},v);T.set(r,e,t)}function a(t,r,n,i,s){RpcNotification.call(this,t,r),this.getTransport=function(){return s},this.setTransport=function(e){s=unifyTransport(e)},defineProperty_IE8||Object.defineProperty(this,"transport",{get:this.getTransport.bind(this),set:this.setTransport.bind(this)});var a=y.get(n,i);s||f.getTransport()||(defineProperty_IE8?this.duplicated=Boolean(a):Object.defineProperty(this,"duplicated",{value:Boolean(a)}));var c=u[t];this.pack=e.pack.bind(e,this,n),this.reply=function(t,r,s){if(t instanceof Function||t&&t.send instanceof Function){if(void 0!=r)throw new SyntaxError("There can't be parameters after callback");s=t,r=null,t=void 0}else if(r instanceof Function||r&&r.send instanceof Function){if(void 0!=s)throw new SyntaxError("There can't be parameters after callback");s=r,r=null}s=unifyTransport(s),a&&clearTimeout(a.timeout),void 0!=i&&(t&&(t.dest=i),r&&(r.dest=i));var u;if(t||void 0!=r){if(void 0!=f.peerID&&(t?t.from=f.peerID:r.from=f.peerID),c)if(void 0==c.error&&t)u={error:t};else{var p=t?c.error:c.response;u={method:p,params:t||r}}else u={error:t,result:r};u=e.pack(u,n)}else u=a?a.message:e.pack({result:null},n);return o(u,n,i),s=s||this.getTransport()||f.getTransport(),s?s.send(u):u}}function c(e){var t=E[e];if(t){delete E[e];var r=m.pop(t.id,t.dest);r&&(clearTimeout(r.timeout),s(t.id,t.dest))}}var f=this;if(!e)throw new SyntaxError("Packer is not defined");if(!e.pack||!e.unpack)throw new SyntaxError("Packer is invalid");var u=unifyResponseMethods(e.responseMethods);if(t instanceof Function){if(void 0!=r)throw new SyntaxError("There can't be parameters after onRequest");n=t,r=void 0,t=void 0}if(t&&t.send instanceof Function){if(r&&!(r instanceof Function))throw new SyntaxError("Only a function can be after transport");n=r,r=t,t=void 0}if(r instanceof Function){if(void 0!=n)throw new SyntaxError("There can't be parameters after onRequest");n=r,r=void 0}if(r&&r.send instanceof Function&&n&&!(n instanceof Function))throw new SyntaxError("Only a function can be after transport");t=t||{},EventEmitter.call(this),n&&this.on("request",n),defineProperty_IE8?this.peerID=t.peerID:Object.defineProperty(this,"peerID",{value:t.peerID});var p=t.max_retries||0;this.getTransport=function(){return r},this.setTransport=function(e){r&&(r.removeEventListener?r.removeEventListener("message",i):r.removeListener&&r.removeListener("data",i)),e&&(e.addEventListener?e.addEventListener("message",i):e.addListener&&e.addListener("data",i)),r=unifyTransport(e)},defineProperty_IE8||Object.defineProperty(this,"transport",{get:this.getTransport.bind(this),set:this.setTransport.bind(this)}),this.setTransport(r);var d=t.request_timeout||BASE_TIMEOUT,l=t.response_timeout||BASE_TIMEOUT,v=t.duplicates_timeout||BASE_TIMEOUT,h=0,m=new Mapper,y=new Mapper,T=new Mapper,E={};inherits(a,RpcNotification),this.cancel=function(e){if(e)return c(e);for(var e in E)c(e)},this.close=function(){var e=this.getTransport();e&&e.close&&e.close(),this.cancel(),T.forEach(clearTimeout),y.forEach(function(e){clearTimeout(e.timeout)})},this.encode=function(t,r,n,i,o){function s(e,t){f.cancel(v),o(e,t)}function a(e){return b.timeout=setTimeout(l,d*Math.pow(2,w++)),E[v]={id:y,dest:n},m.set(b,y,n),e=e||g||f.getTransport(),e?e.send(v):v}function c(e){e=unifyTransport(e),console.warn(w+" retry for request message:",v);var t=T.pop(y,n);return clearTimeout(t),a(e)}function l(){if(p>w)return c(i);var e=new Error("Request has timed out");e.request=v,e.retry=c,s(e)}if(r instanceof Function){if(void 0!=n)throw new SyntaxError("There can't be parameters after callback");o=r,i=void 0,n=void 0,r=void 0}else if(n instanceof Function){if(void 0!=i)throw new SyntaxError("There can't be parameters after callback");o=n,i=void 0,n=void 0}else if(i instanceof Function){if(void 0!=o)throw new SyntaxError("There can't be parameters after callback");o=i,i=void 0}void 0!=f.peerID&&(r=r||{},r.from=f.peerID),void 0!=n&&(r=r||{},r.dest=n);var v={method:t,params:r};if(o){var y=h++,w=0;v=e.pack(v,y);var b={message:v,callback:s,responseMethods:u[t]||{}},g=unifyTransport(i);return a(i)}return v=e.pack(v),i=i||this.getTransport(),i?i.send(v):v},this.decode=function(t,r){function n(){if(r=unifyTransport(r)||f.getTransport()){var e=y.get(u,v);if(e)return r.send(e.message)}var t=void 0!=u?u:p,n=new a(d,l,t,v,r);return f.emit("request",n)?void 0:n}function i(e,t,r){e.callback(t,r)}function o(e){console.warn("Response already processed",t),clearTimeout(e),s(p,v)}if(!t)throw new TypeError("Message is not defined");try{t=e.unpack(t)}catch(c){return console.debug(c,t)}var u=t.id,p=t.ack,d=t.method,l=t.params||{},v=l.from,h=l.dest;if(void 0==f.peerID||v!=f.peerID){if(void 0==u&&void 0==p){var E=new RpcNotification(d,l);if(f.emit("request",E))return;return E}if(d){if(void 0==h||h==f.peerID){var w=m.get(p,v);if(w){var b=w.responseMethods;return d==b.error?i(w,l):d==b.response?i(w,null,l):n()}var g=T.get(p,v);if(g)return o(g)}return n()}var I=t.error,k=t.result;if(!(I&&I.dest&&I.dest!=f.peerID||k&&k.dest&&k.dest!=f.peerID)){var w=m.get(p,v);if(!w){var g=T.get(p,v);return g?o(g):console.warn("No callback was defined for this message",t)}i(w,I,k)}}}}var defineProperty_IE8=!1;if(Object.defineProperty)try{Object.defineProperty({},"x",{})}catch(e){defineProperty_IE8=!0}Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),r=this,n=function(){},i=function(){return r.apply(this instanceof n&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};return n.prototype=this.prototype,i.prototype=new n,i});var EventEmitter=require("events").EventEmitter,inherits=require("inherits"),packers=require("./packers"),Mapper=require("./Mapper"),BASE_TIMEOUT=5e3;inherits(RpcBuilder,EventEmitter),RpcBuilder.RpcNotification=RpcNotification,module.exports=RpcBuilder;var clients=require("./clients");RpcBuilder.clients=clients,RpcBuilder.packers=packers;
},{"./Mapper":118,"./clients":119,"./packers":124,"events":14,"inherits":"inherits"}],122:[function(require,module,exports){
function pack(r,e){var o={jsonrpc:"2.0"};if(r.method)o.method=r.method,r.params&&(o.params=r.params),void 0!=e&&(o.id=e);else if(void 0!=e){if(r.error){if(void 0!==r.result)throw new TypeError("Both result and error are defined");o.error=r.error}else{if(void 0===r.result)throw new TypeError("No result or error is defined");o.result=r.result}o.id=e}return JSON.stringify(o)}function unpack(r){var e=r;("string"==typeof r||r instanceof String)&&(e=JSON.parse(r));var o=e.jsonrpc;if("2.0"!=o)throw new TypeError("Invalid JsonRPC version '"+o+"': "+r);if(void 0==e.method){if(void 0==e.id)throw new TypeError("Invalid message: "+r);var i=void 0!==e.result,t=void 0!==e.error;if(i&&t)throw new TypeError("Both result and error are defined: "+r);if(!i&&!t)throw new TypeError("No result or error is defined: "+r);e.ack=e.id,delete e.id}return e}exports.pack=pack,exports.unpack=unpack;
},{}],123:[function(require,module,exports){
function pack(e){throw new TypeError("Not yet implemented")}function unpack(e){throw new TypeError("Not yet implemented")}exports.pack=pack,exports.unpack=unpack;
},{}],124:[function(require,module,exports){
var JsonRPC=require("./JsonRPC"),XmlRPC=require("./XmlRPC");exports.JsonRPC=JsonRPC,exports.XmlRPC=XmlRPC;
},{"./JsonRPC":122,"./XmlRPC":123}],125:[function(require,module,exports){
function ws(e,o,t){var b;return b=o?new WebSocket(e,o):new WebSocket(e)}var global=function(){return this}(),WebSocket=global.WebSocket||global.MozWebSocket;module.exports=WebSocket?ws:null,WebSocket&&(ws.prototype=WebSocket.prototype);
},{}],126:[function(require,module,exports){
var websocket=require("websocket-stream"),inject=require("reconnect-core");module.exports=inject(function(){var e=[].slice.call(arguments),r=websocket.apply(null,e),t=this.prevCon;return t&&t._buffer&&(r._buffer=t._buffer),this.prevCon=r,r});
},{"reconnect-core":127,"websocket-stream":134}],127:[function(require,module,exports){
var EventEmitter=require("events").EventEmitter,backoff=require("backoff");module.exports=function(e){return function(n,t){function c(c,f){function a(e){m.removeListener("error",a);try{o.emit("error",e)}catch(n){}u(e)}function u(e){if(o.connected=!1,m.removeListener("close",u),m.removeListener("end",u),"Request"==m.constructor.name&&m.on("error",function(){}),o.emit("disconnect",e),o.reconnect)try{r.backoff(e)}catch(n){}}function s(){o.connected=!0,o.emit("connection",m),o.emit("connect",m)}if(!o.connected&&o.reconnect){o.emit("reconnect",c,f);var m=e.apply(o,i);o._connection=m,m.on("error",a).on("close",u).on("end",u),n.immediate||"Request"==m.constructor.name?(s(),m.once("data",function(){r.reset()})):m.once("connect",function(){r.reset(),t&&m.removeListener("connect",t),s()})}}t="function"==typeof n?n:t,n="object"==typeof n?n:{initialDelay:1e3,maxDelay:3e4},t||(t=n.onConnect);var o=new EventEmitter;o.connected=!1,o.reconnect=!0,t&&o.on("connection",t);var r=(backoff[n.type]||backoff.fibonacci)(n);n.failAfter&&r.failAfter(n.failAfter),r.on("backoff",function(e,n,t){o.emit("backoff",e,n,t)}),r.on("fail",function(e){o.disconnect(),o.emit("fail",e)});var i;return o.connect=o.listen=function(){return this.reconnect=!0,o.connected?void 0:(r.reset(),r.on("ready",c),i=i||[].slice.call(arguments),c(0,0),o)},o.disconnect=function(){return this.reconnect=!1,o._connection&&o._connection.end(),o},o}};
},{"backoff":128,"events":14}],128:[function(require,module,exports){
var Backoff=require("./lib/backoff"),ExponentialBackoffStrategy=require("./lib/strategy/exponential"),FibonacciBackoffStrategy=require("./lib/strategy/fibonacci"),FunctionCall=require("./lib/function_call.js");module.exports.Backoff=Backoff,module.exports.FunctionCall=FunctionCall,module.exports.FibonacciStrategy=FibonacciBackoffStrategy,module.exports.ExponentialStrategy=ExponentialBackoffStrategy,module.exports.fibonacci=function(e){return new Backoff(new FibonacciBackoffStrategy(e))},module.exports.exponential=function(e){return new Backoff(new ExponentialBackoffStrategy(e))},module.exports.call=function(e,t,o){var a=Array.prototype.slice.call(arguments);return e=a[0],t=a.slice(1,a.length-1),o=a[a.length-1],new FunctionCall(e,t,o)};
},{"./lib/backoff":129,"./lib/function_call.js":130,"./lib/strategy/exponential":131,"./lib/strategy/fibonacci":132}],129:[function(require,module,exports){
function Backoff(t){events.EventEmitter.call(this),this.backoffStrategy_=t,this.maxNumberOfRetry_=-1,this.backoffNumber_=0,this.backoffDelay_=0,this.timeoutID_=-1,this.handlers={backoff:this.onBackoff_.bind(this)}}var events=require("events"),util=require("util");util.inherits(Backoff,events.EventEmitter),Backoff.prototype.failAfter=function(t){if(1>t)throw new Error("Maximum number of retry must be greater than 0. Actual: "+t);this.maxNumberOfRetry_=t},Backoff.prototype.backoff=function(t){if(-1!==this.timeoutID_)throw new Error("Backoff in progress.");this.backoffNumber_===this.maxNumberOfRetry_?(this.emit("fail",t),this.reset()):(this.backoffDelay_=this.backoffStrategy_.next(),this.timeoutID_=setTimeout(this.handlers.backoff,this.backoffDelay_),this.emit("backoff",this.backoffNumber_,this.backoffDelay_,t))},Backoff.prototype.onBackoff_=function(){this.timeoutID_=-1,this.emit("ready",this.backoffNumber_,this.backoffDelay_),this.backoffNumber_++},Backoff.prototype.reset=function(){this.backoffNumber_=0,this.backoffStrategy_.reset(),clearTimeout(this.timeoutID_),this.timeoutID_=-1},module.exports=Backoff;
},{"events":14,"util":37}],130:[function(require,module,exports){
function isFunction(t){return"function"==typeof t}function FunctionCall(t,n,i){if(events.EventEmitter.call(this),!isFunction(t))throw new Error("fn should be a function.Actual: "+typeof t);if(!isFunction(i))throw new Error("callback should be a function.Actual: "+typeof t);this.function_=t,this.arguments_=n,this.callback_=i,this.results_=[],this.backoff_=null,this.strategy_=null,this.failAfter_=-1,this.state_=FunctionCall.State_.PENDING}var events=require("events"),util=require("util"),Backoff=require("./backoff"),FibonacciBackoffStrategy=require("./strategy/fibonacci");util.inherits(FunctionCall,events.EventEmitter),FunctionCall.State_={PENDING:0,RUNNING:1,COMPLETED:2,ABORTED:3},FunctionCall.prototype.isPending=function(){return this.state_==FunctionCall.State_.PENDING},FunctionCall.prototype.isRunning=function(){return this.state_==FunctionCall.State_.RUNNING},FunctionCall.prototype.isCompleted=function(){return this.state_==FunctionCall.State_.COMPLETED},FunctionCall.prototype.isAborted=function(){return this.state_==FunctionCall.State_.ABORTED},FunctionCall.prototype.setStrategy=function(t){if(!this.isPending())throw new Error("FunctionCall in progress.");return this.strategy_=t,this},FunctionCall.prototype.getResults=function(){return this.results_.concat()},FunctionCall.prototype.failAfter=function(t){if(!this.isPending())throw new Error("FunctionCall in progress.");return this.failAfter_=t,this},FunctionCall.prototype.abort=function(){if(this.isCompleted())throw new Error("FunctionCall already completed.");this.isRunning()&&this.backoff_.reset(),this.state_=FunctionCall.State_.ABORTED},FunctionCall.prototype.start=function(t){if(this.isAborted())throw new Error("FunctionCall aborted.");if(!this.isPending())throw new Error("FunctionCall already started.");var n=this.strategy_||new FibonacciBackoffStrategy;this.backoff_=t?t(n):new Backoff(n),this.backoff_.on("ready",this.doCall_.bind(this)),this.backoff_.on("fail",this.doCallback_.bind(this)),this.backoff_.on("backoff",this.handleBackoff_.bind(this)),this.failAfter_>0&&this.backoff_.failAfter(this.failAfter_),this.state_=FunctionCall.State_.RUNNING,this.doCall_()},FunctionCall.prototype.doCall_=function(){var t=["call"].concat(this.arguments_);events.EventEmitter.prototype.emit.apply(this,t);var n=this.handleFunctionCallback_.bind(this);this.function_.apply(null,this.arguments_.concat(n))},FunctionCall.prototype.doCallback_=function(){var t=this.results_[this.results_.length-1];this.callback_.apply(null,t)},FunctionCall.prototype.handleFunctionCallback_=function(){if(!this.isAborted()){var t=Array.prototype.slice.call(arguments);this.results_.push(t),events.EventEmitter.prototype.emit.apply(this,["callback"].concat(t)),t[0]?this.backoff_.backoff(t[0]):(this.state_=FunctionCall.State_.COMPLETED,this.doCallback_())}},FunctionCall.prototype.handleBackoff_=function(t,n,i){this.emit("backoff",t,n,i)},module.exports=FunctionCall;
},{"./backoff":129,"./strategy/fibonacci":132,"events":14,"util":37}],131:[function(require,module,exports){
function ExponentialBackoffStrategy(t){BackoffStrategy.call(this,t),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()}var util=require("util"),BackoffStrategy=require("./strategy");util.inherits(ExponentialBackoffStrategy,BackoffStrategy),ExponentialBackoffStrategy.prototype.next_=function(){return this.backoffDelay_=Math.min(this.nextBackoffDelay_,this.getMaxDelay()),this.nextBackoffDelay_=2*this.backoffDelay_,this.backoffDelay_},ExponentialBackoffStrategy.prototype.reset_=function(){this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()},module.exports=ExponentialBackoffStrategy;
},{"./strategy":133,"util":37}],132:[function(require,module,exports){
function FibonacciBackoffStrategy(t){BackoffStrategy.call(this,t),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()}var util=require("util"),BackoffStrategy=require("./strategy");util.inherits(FibonacciBackoffStrategy,BackoffStrategy),FibonacciBackoffStrategy.prototype.next_=function(){var t=Math.min(this.nextBackoffDelay_,this.getMaxDelay());return this.nextBackoffDelay_+=this.backoffDelay_,this.backoffDelay_=t,t},FibonacciBackoffStrategy.prototype.reset_=function(){this.nextBackoffDelay_=this.getInitialDelay(),this.backoffDelay_=0},module.exports=FibonacciBackoffStrategy;
},{"./strategy":133,"util":37}],133:[function(require,module,exports){
function isDef(t){return void 0!==t&&null!==t}function BackoffStrategy(t){if(t=t||{},isDef(t.initialDelay)&&t.initialDelay<1)throw new Error("The initial timeout must be greater than 0.");if(isDef(t.maxDelay)&&t.maxDelay<1)throw new Error("The maximal timeout must be greater than 0.");if(this.initialDelay_=t.initialDelay||100,this.maxDelay_=t.maxDelay||1e4,this.maxDelay_<=this.initialDelay_)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");if(isDef(t.randomisationFactor)&&(t.randomisationFactor<0||t.randomisationFactor>1))throw new Error("The randomisation factor must be between 0 and 1.");this.randomisationFactor_=t.randomisationFactor||0}var events=require("events"),util=require("util");BackoffStrategy.prototype.getMaxDelay=function(){return this.maxDelay_},BackoffStrategy.prototype.getInitialDelay=function(){return this.initialDelay_},BackoffStrategy.prototype.next=function(){var t=this.next_(),e=1+Math.random()*this.randomisationFactor_,a=Math.round(t*e);return a},BackoffStrategy.prototype.next_=function(){throw new Error("BackoffStrategy.next_() unimplemented.")},BackoffStrategy.prototype.reset=function(){this.reset_()},BackoffStrategy.prototype.reset_=function(){throw new Error("BackoffStrategy.reset_() unimplemented.")},module.exports=BackoffStrategy;
},{"events":14,"util":37}],134:[function(require,module,exports){
(function (process){
function WebsocketStream(t,e){if(!(this instanceof WebsocketStream))return new WebsocketStream(t,e);if(this.stream=through(this.write.bind(this),this.end.bind(this)),this.stream.websocketStream=this,this.options=e||{},this._buffer=[],"object"==typeof t)this.ws=t,this.ws.on("message",this.onMessage.bind(this)),this.ws.on("error",this.onError.bind(this)),this.ws.on("close",this.onClose.bind(this)),this.ws.on("open",this.onOpen.bind(this)),1===this.ws.readyState&&(this._open=!0);else{var s="browser"===process.title?this.options.protocol:this.options;this.ws=new WebSocketPoly(t,s),this.ws.binaryType=this.options.binaryType||"arraybuffer",this.ws.onmessage=this.onMessage.bind(this),this.ws.onerror=this.onError.bind(this),this.ws.onclose=this.onClose.bind(this),this.ws.onopen=this.onOpen.bind(this)}return this.stream}var through=require("through"),isBuffer=require("isbuffer"),WebSocketPoly=require("ws");module.exports=WebsocketStream,module.exports.WebsocketStream=WebsocketStream,WebsocketStream.prototype.onMessage=function(t){var e=t;"undefined"!=typeof e.data&&(e=e.data);var s=this.options.type;s&&e instanceof ArrayBuffer&&(e=new s(e)),this.stream.queue(e)},WebsocketStream.prototype.onError=function(t){this.stream.emit("error",t)},WebsocketStream.prototype.onClose=function(t){this._destroy||(this.stream.emit("end"),this.stream.emit("close"))},WebsocketStream.prototype.onOpen=function(t){if(!this._destroy){this._open=!0;for(var e=0;e=0&&n.length%1===0}function u(n,t){return r(n)?i(n,t):f(n,t)}function i(n,t){for(var e=-1,r=n.length;++eu?u:null}):(e=H(n),t=e.length,function(){return u++,t>u?e[u]:null})}function s(n,t){t=t||0;var e=-1,r=n.length;t&&(r-=t,r=0>r?0:r);for(var u=Array(r);++e=r)return o(null);var a=!1,f=0,s=!1;!function p(){if(a&&0>=f)return o(null);for(;r>f&&!s;){var n=c();if(null===n)return a=!0,void(0>=f&&o(null));f+=1,i(u[n],n,t(function(n){f-=1,n?(o(n),s=!0):p()}))}}()}}function m(n){return function(t,e,r){return n(z.eachOf,t,e,r)}}function d(n,t){return function(e,r,u){return t(h(n),e,r,u)}}function v(n){return function(t,e,r){return n(z.eachOfSeries,t,e,r)}}function g(t,r,u,i){i=e(i||n);var o=[];t(r,function(n,t,e){u(n,function(n,r){o[t]=r,e(n)})},function(n){i(n,o)})}function y(n){return d(n,g)}function k(n,t,e,r){var u=[];t=o(t,function(n,t){return{index:t,value:n}}),n(t,function(n,t,r){e(n.value,function(t){t&&u.push(n),r()})},function(){r(o(u.sort(function(n,t){return n.index-t.index}),function(n){return n.value}))})}function w(n,t,e,r){var u=[];t=o(t,function(n,t){return{index:t,value:n}}),n(t,function(n,t,r){e(n.value,function(t){t||u.push(n),r()})},function(){r(o(u.sort(function(n,t){return n.index-t.index}),function(n){return n.value}))})}function x(t,e,r,u){t(e,function(t,e,i){r(t,function(e){e?(u(t),u=n):i()})},function(){u()})}function O(t,e,u){u=u||n;var i=r(e)?[]:{};t(e,function(n,t,e){n(function(n){var r=s(arguments,1);r.length<=1&&(r=r[0]),i[t]=r,e(n)})},function(n){u(n,i)})}function b(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(n,t){u=u.concat(t||[]),r(n)})},function(n){r(n,u)})}function S(e,r,u){function c(t,e,r,u){if(null!=u&&"function"!=typeof u)throw new Error("task callback must be a function");return t.started=!0,P(e)||(e=[e]),0===e.length&&t.idle()?z.setImmediate(function(){t.drain()}):(i(e,function(e){var i={data:e,callback:u||n};r?t.tasks.unshift(i):t.tasks.push(i),t.tasks.length===t.concurrency&&t.saturated()}),void z.setImmediate(t.process))}function a(n,t){return function(){f-=1;var e=arguments;i(t,function(n){n.callback.apply(n,e)}),n.tasks.length+f===0&&n.drain(),n.process()}}if(null==r)r=1;else if(0===r)throw new Error("Concurrency must not be zero");var f=0,l={tasks:[],concurrency:r,saturated:n,empty:n,drain:n,started:!1,paused:!1,push:function(n,t){c(l,n,!1,t)},kill:function(){l.drain=n,l.tasks=[]},unshift:function(n,t){c(l,n,!0,t)},process:function(){if(!l.paused&&f=t;t++)z.setImmediate(l.process)}}};return l}function E(n){return function(t){var e=s(arguments,1);t.apply(null,e.concat([function(t){var e=s(arguments,1);"undefined"!=typeof console&&(t?console.error&&console.error(t):console[n]&&i(e,function(t){console[n](t)}))}]))}}function I(n){return function(t,e,r){n(c(t),e,r)}}function T(n,t){function e(){var e=this,r=s(arguments),u=r.pop();return n(t,function(n,t,u){n.apply(e,r.concat([u]))},u)}if(arguments.length>2){var r=s(arguments,2);return e.apply(this,r)}return e}function j(n){return function(){var t=s(arguments),e=t.pop();t.push(function(){var n=arguments;r?z.setImmediate(function(){e.apply(null,n)}):e.apply(null,n)});var r=!0;n.apply(this,t),r=!1}}var A,L,z={};A="object"==typeof window&&this===window?window:"object"==typeof global&&this===global?global:this,null!=A&&(L=A.async),z.noConflict=function(){return A.async=L,z};var q,C=Object.prototype.toString,P=Array.isArray||function(n){return"[object Array]"===C.call(n)},H=Object.keys||function(n){var t=[];for(var e in n)n.hasOwnProperty(e)&&t.push(e);return t};"function"==typeof setImmediate&&(q=setImmediate),"undefined"!=typeof process&&process.nextTick?(z.nextTick=process.nextTick,q?z.setImmediate=function(n){q(n)}:z.setImmediate=z.nextTick):q?(z.nextTick=function(n){q(n)},z.setImmediate=z.nextTick):(z.nextTick=function(n){setTimeout(n,0)},z.setImmediate=z.nextTick),z.forEach=z.each=function(n,t,e){return z.eachOf(n,p(t),e)},z.forEachSeries=z.eachSeries=function(n,t,e){return z.eachOfSeries(n,p(t),e)},z.forEachLimit=z.eachLimit=function(n,t,e,r){return h(t)(n,p(e),r)},z.forEachOf=z.eachOf=function(i,o,c){function a(n){n?c(n):(l+=1,l>=f&&c(null))}c=e(c||n),i=i||[];var f=r(i)?i.length:H(i).length,l=0;return f?void u(i,function(n,e){o(i[e],e,t(a))}):c(null)},z.forEachOfSeries=z.eachOfSeries=function(r,u,i){function o(){var n=!0;return null===a?i(null):(u(r[a],a,t(function(t){if(t)i(t);else{if(a=c(),null===a)return i(null);n?z.nextTick(o):o()}})),void(n=!1))}i=e(i||n),r=r||[];var c=l(r),a=c();o()},z.forEachOfLimit=z.eachOfLimit=function(n,t,e,r){h(t)(n,e,r)},z.map=m(g),z.mapSeries=v(g),z.mapLimit=function(n,t,e,r){return y(t)(n,e,r)},z.inject=z.foldl=z.reduce=function(n,t,e,r){z.eachOfSeries(n,function(n,r,u){e(t,n,function(n,e){t=e,u(n)})},function(n){r(n||null,t)})},z.foldr=z.reduceRight=function(n,t,e,r){var u=o(n,function(n){return n}).reverse();z.reduce(u,t,e,r)},z.select=z.filter=m(k),z.selectSeries=z.filterSeries=v(k),z.reject=m(w),z.rejectSeries=v(w),z.detect=m(x),z.detectSeries=v(x),z.any=z.some=function(t,e,r){z.eachOf(t,function(t,u,i){e(t,function(t){t&&(r(!0),r=n),i()})},function(){r(!1)})},z.all=z.every=function(t,e,r){z.eachOf(t,function(t,u,i){e(t,function(t){t||(r(!1),r=n),i()})},function(){r(!0)})},z.sortBy=function(n,t,e){function r(n,t){var e=n.criteria,r=t.criteria;return r>e?-1:e>r?1:0}z.map(n,function(n,e){t(n,function(t,r){t?e(t):e(null,{value:n,criteria:r})})},function(n,t){return n?e(n):void e(null,o(t.sort(r),function(n){return n.value}))})},z.auto=function(t,r){function u(n){h.unshift(n)}function o(n){for(var t=0;tr;){var i=r+(u-r+1>>>1);e(t,n[i])>=0?r=i:u=i-1}return r}function o(t,e,o,c){if(null!=c&&"function"!=typeof c)throw new Error("task callback must be a function");return t.started=!0,P(e)||(e=[e]),0===e.length?z.setImmediate(function(){t.drain()}):void i(e,function(e){var i={data:e,priority:o,callback:"function"==typeof c?c:n};t.tasks.splice(u(t.tasks,i,r)+1,0,i),t.tasks.length===t.concurrency&&t.saturated(),z.setImmediate(t.process)})}var c=z.queue(t,e);return c.push=function(n,t,e){o(c,n,t,e)},delete c.unshift,c},z.cargo=function(n,t){return S(n,1,t)},z.log=E("log"),z.dir=E("dir"),z.memoize=function(n,t){function e(){var e=s(arguments),i=e.pop(),o=t.apply(null,e);o in r?z.nextTick(function(){i.apply(null,r[o])}):o in u?u[o].push(i):(u[o]=[i],n.apply(null,e.concat([function(){r[o]=s(arguments);var n=u[o];delete u[o];for(var t=0,e=n.length;e>t;t++)n[t].apply(null,arguments)}])))}var r={},u={};return t=t||function(n){return n},e.memo=r,e.unmemoized=n,e},z.unmemoize=function(n){return function(){return(n.unmemoized||n).apply(null,arguments)}},z.times=I(z.map),z.timesSeries=I(z.mapSeries),z.timesLimit=function(n,t,e,r){return z.mapLimit(c(n),t,e,r)},z.seq=function(){var t=arguments;return function(){var e=this,r=s(arguments),u=r.slice(-1)[0];"function"==typeof u?r.pop():u=n,z.reduce(t,r,function(n,t,r){t.apply(e,n.concat([function(){var n=arguments[0],t=s(arguments,1);r(n,t)}]))},function(n,t){u.apply(e,[n].concat(t))})}},z.compose=function(){return z.seq.apply(null,Array.prototype.reverse.call(arguments))},z.applyEach=function(){var n=s(arguments);return T.apply(null,[z.eachOf].concat(n))},z.applyEachSeries=function(){var n=s(arguments);return T.apply(null,[z.eachOfSeries].concat(n))},z.forever=function(e,r){function u(n){return n?i(n):void o(u)}var i=t(r||n),o=j(e);u()},z.ensureAsync=j,"undefined"!=typeof module&&module.exports?module.exports=z:"undefined"!=typeof define&&define.amd?define([],function(){return z}):A.async=z}();
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"_process":17}],"es6-promise":[function(require,module,exports){
(function (process,global){
(function(){"use strict";function t(t){return"function"==typeof t||"object"==typeof t&&null!==t}function e(t){return"function"==typeof t}function n(t){return"object"==typeof t&&null!==t}function r(t){U=t}function o(t){B=t}function i(){var t=process.nextTick,e=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(e)&&"0"===e[1]&&"10"===e[2]&&(t=setImmediate),function(){t(f)}}function u(){return function(){N(f)}}function s(){var t=0,e=new J(f),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function c(){var t=new MessageChannel;return t.port1.onmessage=f,function(){t.port2.postMessage(0)}}function a(){return function(){setTimeout(f,1)}}function f(){for(var t=0;z>t;t+=2){var e=V[t],n=V[t+1];e(n),V[t]=void 0,V[t+1]=void 0}z=0}function l(){try{var t=require,e=t("vertx");return N=e.runOnLoop||e.runOnContext,u()}catch(n){return a()}}function p(){}function _(){return new TypeError("You cannot resolve a promise with itself")}function h(){return new TypeError("A promises callback cannot return that same promise.")}function d(t){try{return t.then}catch(e){return et.error=e,et}}function v(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function y(t,e,n){B(function(t){var r=!1,o=v(n,e,function(n){r||(r=!0,e!==n?g(t,n):A(t,n))},function(e){r||(r=!0,E(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,E(t,o))},t)}function m(t,e){e._state===Z?A(t,e._result):e._state===tt?E(t,e._result):j(e,void 0,function(e){g(t,e)},function(e){E(t,e)})}function b(t,n){if(n.constructor===t.constructor)m(t,n);else{var r=d(n);r===et?E(t,et.error):void 0===r?A(t,n):e(r)?y(t,n,r):A(t,n)}}function g(e,n){e===n?E(e,_()):t(n)?b(e,n):A(e,n)}function w(t){t._onerror&&t._onerror(t._result),S(t)}function A(t,e){t._state===X&&(t._result=e,t._state=Z,0!==t._subscribers.length&&B(S,t))}function E(t,e){t._state===X&&(t._state=tt,t._result=e,B(w,t))}function j(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+Z]=n,o[i+tt]=r,0===i&&t._state&&B(S,t)}function S(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r,o,i=t._result,u=0;uu;u++)j(r.resolve(t[u]),void 0,e,n);return o}function I(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function Y(t){var e=this,n=new e(p);return E(n,t),n}function q(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function F(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function D(t){this._id=ct++,this._state=void 0,this._result=void 0,this._subscribers=[],p!==t&&(e(t)||q(),this instanceof D||F(),C(this,t))}function K(){var t;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;(!n||"[object Promise]"!==Object.prototype.toString.call(n.resolve())||n.cast)&&(t.Promise=at)}var L;L=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var N,U,W,$=L,z=0,B=({}.toString,function(t,e){V[z]=t,V[z+1]=e,z+=2,2===z&&(U?U(f):W())}),G="undefined"!=typeof window?window:void 0,H=G||{},J=H.MutationObserver||H.WebKitMutationObserver,Q="undefined"!=typeof process&&"[object process]"==={}.toString.call(process),R="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,V=new Array(1e3);W=Q?i():J?s():R?c():void 0===G&&"function"==typeof require?l():a();var X=void 0,Z=1,tt=2,et=new T,nt=new T;M.prototype._validateInput=function(t){return $(t)},M.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},M.prototype._init=function(){this._result=new Array(this.length)};var rt=M;M.prototype._enumerate=function(){for(var t=this,e=t.length,n=t.promise,r=t._input,o=0;n._state===X&&e>o;o++)t._eachEntry(r[o],o)},M.prototype._eachEntry=function(t,e){var r=this,o=r._instanceConstructor;n(t)?t.constructor===o&&t._state!==X?(t._onerror=null,r._settledAt(t._state,e,t._result)):r._willSettleAt(o.resolve(t),e):(r._remaining--,r._result[e]=t)},M.prototype._settledAt=function(t,e,n){var r=this,o=r.promise;o._state===X&&(r._remaining--,t===tt?E(o,n):r._result[e]=n),0===r._remaining&&A(o,r._result)},M.prototype._willSettleAt=function(t,e){var n=this;j(t,void 0,function(t){n._settledAt(Z,e,t)},function(t){n._settledAt(tt,e,t)})};var ot=O,it=k,ut=I,st=Y,ct=0,at=D;D.all=ot,D.race=it,D.resolve=ut,D.reject=st,D._setScheduler=r,D._setAsap=o,D._asap=B,D.prototype={constructor:D,then:function(t,e){var n=this,r=n._state;if(r===Z&&!t||r===tt&&!e)return this;var o=new this.constructor(p),i=n._result;if(r){var u=arguments[r-1];B(function(){x(r,o,u,i)})}else j(n,o,t,e);return o},"catch":function(t){return this.then(null,t)}};var ft=K,lt={Promise:at,polyfill:ft};"function"==typeof define&&define.amd?define(function(){return lt}):"undefined"!=typeof module&&module.exports?module.exports=lt:"undefined"!=typeof this&&(this.ES6Promise=lt),ft()}).call(this);
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"_process":17}],"inherits":[function(require,module,exports){
"function"==typeof Object.create?module.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(t,e){t.super_=e;var o=function(){};o.prototype=e.prototype,t.prototype=new o,t.prototype.constructor=t};
},{}],"kurento-client-core":[function(require,module,exports){
Object.defineProperty(exports,"name",{value:"core"}),Object.defineProperty(exports,"version",{value:"6.2.0"});var HubPort=require("./HubPort"),MediaPipeline=require("./MediaPipeline"),PassThrough=require("./PassThrough");exports.HubPort=HubPort,exports.MediaPipeline=MediaPipeline,exports.PassThrough=PassThrough,exports.abstracts=require("./abstracts"),exports.complexTypes=require("./complexTypes");
},{"./HubPort":41,"./MediaPipeline":42,"./PassThrough":43,"./abstracts":54,"./complexTypes":93}],"kurento-client-elements":[function(require,module,exports){
Object.defineProperty(exports,"name",{value:"elements"}),Object.defineProperty(exports,"version",{value:"6.2.0"});var AlphaBlending=require("./AlphaBlending"),Composite=require("./Composite"),Dispatcher=require("./Dispatcher"),DispatcherOneToMany=require("./DispatcherOneToMany"),HttpPostEndpoint=require("./HttpPostEndpoint"),Mixer=require("./Mixer"),PlayerEndpoint=require("./PlayerEndpoint"),RecorderEndpoint=require("./RecorderEndpoint"),RtpEndpoint=require("./RtpEndpoint"),WebRtcEndpoint=require("./WebRtcEndpoint");exports.AlphaBlending=AlphaBlending,exports.Composite=Composite,exports.Dispatcher=Dispatcher,exports.DispatcherOneToMany=DispatcherOneToMany,exports.HttpPostEndpoint=HttpPostEndpoint,exports.Mixer=Mixer,exports.PlayerEndpoint=PlayerEndpoint,exports.RecorderEndpoint=RecorderEndpoint,exports.RtpEndpoint=RtpEndpoint,exports.WebRtcEndpoint=WebRtcEndpoint,exports.abstracts=require("./abstracts"),exports.complexTypes=require("./complexTypes");
},{"./AlphaBlending":94,"./Composite":95,"./Dispatcher":96,"./DispatcherOneToMany":97,"./HttpPostEndpoint":98,"./Mixer":99,"./PlayerEndpoint":100,"./RecorderEndpoint":101,"./RtpEndpoint":102,"./WebRtcEndpoint":103,"./abstracts":105,"./complexTypes":111}],"kurento-client-filters":[function(require,module,exports){
Object.defineProperty(exports,"name",{value:"filters"}),Object.defineProperty(exports,"version",{value:"6.2.0"});var FaceOverlayFilter=require("./FaceOverlayFilter"),GStreamerFilter=require("./GStreamerFilter"),ImageOverlayFilter=require("./ImageOverlayFilter"),ZBarFilter=require("./ZBarFilter");exports.FaceOverlayFilter=FaceOverlayFilter,exports.GStreamerFilter=GStreamerFilter,exports.ImageOverlayFilter=ImageOverlayFilter,exports.ZBarFilter=ZBarFilter,exports.abstracts=require("./abstracts");
},{"./FaceOverlayFilter":112,"./GStreamerFilter":113,"./ImageOverlayFilter":114,"./ZBarFilter":115,"./abstracts":117}],"kurento-client":[function(require,module,exports){
require("error-tojson");var checkType=require("checktype"),disguise=require("./disguise"),MediaObjectCreator=require("./MediaObjectCreator"),register=require("./register"),TransactionsManager=require("./TransactionsManager");exports.checkType=checkType,exports.disguise=disguise,exports.MediaObjectCreator=MediaObjectCreator,exports.register=register,exports.TransactionsManager=TransactionsManager;var KurentoClient=require("./KurentoClient");module.exports=KurentoClient,KurentoClient.KurentoClient=KurentoClient,KurentoClient.checkType=checkType,KurentoClient.disguise=disguise,KurentoClient.MediaObjectCreator=MediaObjectCreator,KurentoClient.register=register,KurentoClient.TransactionsManager=TransactionsManager,register("kurento-client-core"),register("kurento-client-elements"),register("kurento-client-filters");
},{"./KurentoClient":1,"./MediaObjectCreator":2,"./TransactionsManager":3,"./disguise":6,"./register":7,"checktype":38,"error-tojson":39}],"promisecallback":[function(require,module,exports){
function promiseCallback(l,n,o){function r(l,r){try{return n.call(o,l,r)}catch(t){throw console.trace(t),t}}return n&&(l=l.then(r.bind(void 0,null),r)),l}module.exports=promiseCallback;
},{}]},{},[4])
//# sourceMappingURL=kurento-client.map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy