text: !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).jsforce=t()}}((function(){return function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};e[s][0].call(l.exports,(function(t){return i(e[s][1][t]||t)}),l,l.exports,t,e,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,r){"use strict";var n=t("../core");n.browser=t("./client"),t("../api"),e.exports=n},{"../api":8,"../core":19,"./client":14}],2:[function(t,e,r){"use strict";e.exports="1.8.3"},{}],3:[function(t,e,r){"use strict";e.exports={inherits:t("inherits"),util:t("util"),events:t("events"),"lodash/core":t("lodash/core"),"readable-stream":t("readable-stream"),multistream:t("multistream"),"./VERSION":t("./VERSION"),"./cache":t("./cache"),"./connection":t("./connection"),"./core":t("./core"),"./csv":t("./csv"),"./date":t("./date"),"./http-api":t("./http-api"),"./logger":t("./logger"),"./oauth2":t("./oauth2"),"./process":t("./process"),"./promise":t("./promise"),"./query":t("./query"),"./quick-action":t("./quick-action"),"./record-stream":t("./record-stream"),"./record":t("./record"),"./soap":t("./soap"),"./sobject":t("./sobject"),"./soql-builder":t("./soql-builder"),"./transport":t("./transport")}},{"./VERSION":2,"./cache":17,"./connection":18,"./core":19,"./csv":20,"./date":21,"./http-api":22,"./logger":23,"./oauth2":24,"./process":25,"./promise":26,"./query":27,"./quick-action":28,"./record":30,"./record-stream":29,"./soap":32,"./sobject":33,"./soql-builder":34,"./transport":35,events:77,inherits:119,"lodash/core":127,multistream:128,"readable-stream":155,util:170}],4:[function(t,e,r){"use strict";var n=t("lodash/core"),i=t("../core"),o=(t("../promise"),function(t,e){this._report=t,this._conn=t._conn,this.id=e});o.prototype.retrieve=function(t){var e=this._conn,r=this._report,n=[e._baseUrl(),"analytics","reports",r.id,"instances",this.id].join("/");return e.request(n).thenCall(t)};var s=function(t,e){this._conn=t,this.id=e};s.prototype.describe=function(t){var e=[this._conn._baseUrl(),"analytics","reports",this.id,"describe"].join("/");return this._conn.request(e).thenCall(t)},s.prototype.delete=s.prototype.del=s.prototype.destroy=function(t){var e=[this._conn._baseUrl(),"analytics","reports",this.id].join("/");return this._conn.request({method:"DELETE",url:e}).thenCall(t)},s.prototype.clone=function(t,e){var r=[this._conn._baseUrl(),"analytics","reports"].join("/"),n={reportMetadata:{name:t}},i={method:"POST",url:r+="?cloneId="+this.id,headers:{"Content-Type":"application/json"},body:JSON.stringify(n)};return this._conn.request(i).thenCall(e)},s.prototype.explain=function(t){var e="/query/?explain="+this.id;return this._conn.request(e).thenCall(t)},s.prototype.run=s.prototype.exec=s.prototype.execute=function(t,e){t=t||{},n.isFunction(t)&&(e=t,t={});var r=[this._conn._baseUrl(),"analytics","reports",this.id].join("/");r+="?includeDetails="+(t.details?"true":"false");var i={method:t.metadata?"POST":"GET",url:r};return t.metadata&&(i.headers={"Content-Type":"application/json"},i.body=JSON.stringify(t.metadata)),this._conn.request(i).thenCall(e)},s.prototype.executeAsync=function(t,e){t=t||{},n.isFunction(t)&&(e=t,t={});var r=[this._conn._baseUrl(),"analytics","reports",this.id,"instances"].join("/");t.details&&(r+="?includeDetails=true");var i={method:"POST",url:r,body:""};return t.metadata&&(i.headers={"Content-Type":"application/json"},i.body=JSON.stringify(t.metadata)),this._conn.request(i).thenCall(e)},s.prototype.instance=function(t){return new o(this,t)},s.prototype.instances=function(t){var e=[this._conn._baseUrl(),"analytics","reports",this.id,"instances"].join("/");return this._conn.request(e).thenCall(t)};var a=function(t,e){this._conn=t,this.id=e};a.prototype.describe=function(t){var e=[this._conn._baseUrl(),"analytics","dashboards",this.id,"describe"].join("/");return this._conn.request(e).thenCall(t)},a.prototype.components=function(t,e){var r=[this._conn._baseUrl(),"analytics","dashboards",this.id].join("/"),i={};n.isFunction(t)?e=t:n.isArray(t)?i.componentIds=t:n.isString(t)&&(i.componentIds=[t]);var o={method:"POST",url:r,headers:{"Content-Type":"application/json"},body:JSON.stringify(i)};return this._conn.request(o).thenCall(e)},a.prototype.status=function(t){var e=[this._conn._baseUrl(),"analytics","dashboards",this.id,"status"].join("/");return this._conn.request(e).thenCall(t)},a.prototype.refresh=function(t){var e={method:"PUT",url:[this._conn._baseUrl(),"analytics","dashboards",this.id].join("/"),body:""};return this._conn.request(e).thenCall(t)},a.prototype.clone=function(t,e,r){var i=[this._conn._baseUrl(),"analytics","dashboards"].join("/");i+="?cloneId="+this.id;var o={};n.isObject(t)?(o=t,r=e):(o.name=t,o.folderId=e);var s={method:"POST",url:i,headers:{"Content-Type":"application/json"},body:JSON.stringify(o)};return this._conn.request(s).thenCall(r)},a.prototype.delete=a.prototype.del=a.prototype.destroy=function(t){var e=[this._conn._baseUrl(),"analytics","dashboards",this.id].join("/");return this._conn.request({method:"DELETE",url:e}).thenCall(t)};var u=function(t){this._conn=t};u.prototype.report=function(t){return new s(this._conn,t)},u.prototype.reports=function(t){var e=[this._conn._baseUrl(),"analytics","reports"].join("/");return this._conn.request(e).thenCall(t)},u.prototype.dashboard=function(t){return new a(this._conn,t)},u.prototype.dashboards=function(t){var e=[this._conn._baseUrl(),"analytics","dashboards"].join("/");return this._conn.request(e).thenCall(t)},i.on("connection:new",(function(t){t.analytics=new u(t)})),e.exports=u},{"../core":19,"../promise":26,"lodash/core":127}],5:[function(t,e,r){"use strict";var n=t("../core"),i=function(t){this._conn=t};i.prototype._baseUrl=function(){return this._conn.instanceUrl+"/services/apexrest"},i.prototype._createRequestParams=function(t,e,r,n){var i={method:t,url:this._baseUrl()+e},o={};return n&&"object"==typeof n.headers&&(o=n.headers),/^(GET|DELETE)$/i.test(t)||(o["Content-Type"]="application/json"),i.headers=o,r&&(i.body=JSON.stringify(r)),i},i.prototype.get=function(t,e,r){return"function"==typeof e&&(r=e,e=void 0),this._conn.request(this._createRequestParams("GET",t,void 0,e)).thenCall(r)},i.prototype.post=function(t,e,r,n){"function"==typeof e&&(n=e,e=void 0,r=void 0),"function"==typeof r&&(n=r,r=void 0);var i=this._createRequestParams("POST",t,e,r);return this._conn.request(i).thenCall(n)},i.prototype.put=function(t,e,r,n){"function"==typeof e&&(n=e,e=void 0,r=void 0),"function"==typeof r&&(n=r,r=void 0);var i=this._createRequestParams("PUT",t,e,r);return this._conn.request(i).thenCall(n)},i.prototype.patch=function(t,e,r,n){"function"==typeof e&&(n=e,e=void 0,r=void 0),"function"==typeof r&&(n=r,r=void 0);var i=this._createRequestParams("PATCH",t,e,r);return this._conn.request(i).thenCall(n)},i.prototype.del=i.prototype.delete=function(t,e,r){return"function"==typeof e&&(r=e,e=void 0),this._conn.request(this._createRequestParams("DELETE",t,void 0,e)).thenCall(r)},n.on("connection:new",(function(t){t.apex=new i(t)})),e.exports=i},{"../core":19}],6:[function(t,e,r){(function(r){"use strict";var n=t("inherits"),i=t("readable-stream"),o=i.Duplex,s=t("events"),a=t("lodash/core"),u=t("multistream"),c=t("../core"),l=t("../record-stream"),h=t("../promise"),p=t("../http-api"),f=function(t,e,r,n,i){this._bulk=t,this.type=e,this.operation=r,this.options=n||{},this.id=i,this.state=this.id?"Open":"Unknown",this._batches={}};n(f,s.EventEmitter),f.prototype.info=function(t){var e=this;if(this._jobInfo){if(e.options.pkChunking)return this._jobInfo.then(r=>("0"!==r.numberBatchesTotal&&r.numberBatchesTotal===r.numberBatchesCompleted?e._jobInfo=h.resolve(r):e._jobInfo=e.check(),e._jobInfo.thenCall(t)))}else this._jobInfo=this.check();return this._jobInfo.thenCall(t)},f.prototype.open=function(t){var e=this,r=this._bulk;r._logger;if(!this._jobInfo){var n=this.operation.toLowerCase();"harddelete"===n&&(n="hardDelete");var i=['<?xml version="1.0" encoding="UTF-8"?>','<jobInfo  xmlns="http://www.force.com/2009/06/asyncapi/dataload">',"<operation>"+n+"</operation>","<object>"+this.type+"</object>",this.options.extIdField?"<externalIdFieldName>"+this.options.extIdField+"</externalIdFieldName>":"",this.options.concurrencyMode?"<concurrencyMode>"+this.options.concurrencyMode+"</concurrencyMode>":"",this.options.assignmentRuleId?"<assignmentRuleId>"+this.options.assignmentRuleId+"</assignmentRuleId>":"","<contentType>CSV</contentType>","</jobInfo>"].join(""),o={"Content-Type":"application/xml; charset=utf-8"},s=this.options.pkChunking;if(s){var a=Object.keys(s).filter((function(t){return["chunkSize","parent","startRow"].indexOf(t)>=0})).map((function(t){return t+"="+s[t]}));a.length&&(o["Sforce-Enable-PKChunking"]=a.join("; "))}this._jobInfo=r._request({method:"POST",path:"/job",body:i,headers:o,responseType:"application/xml"}).then((function(t){return e.emit("open",t.jobInfo),e.id=t.jobInfo.id,e.state=t.jobInfo.state,t.jobInfo}),(function(t){throw e.emit("error",t),t}))}return this._jobInfo.thenCall(t)},f.prototype.createBatch=function(){var t=new d(this),e=this;return t.on("queue",(function(){e._batches[t.id]=t})),t},f.prototype.batch=function(t){var e=this._batches[t];return e||(e=new d(this,t),this._batches[t]=e),e},f.prototype.check=function(t){var e=this,r=this._bulk,n=r._logger;return this._jobInfo=this._waitAssign().then((function(){return r._request({method:"GET",path:"/job/"+e.id,responseType:"application/xml"})})).then((function(t){return n.debug(t.jobInfo),e.id=t.jobInfo.id,e.type=t.jobInfo.object,e.operation=t.jobInfo.operation,e.state=t.jobInfo.state,t.jobInfo})),this._jobInfo.thenCall(t)},f.prototype._waitAssign=function(t){return(this.id?h.resolve({id:this.id}):this.open()).thenCall(t)},f.prototype.list=function(t){var e=this,r=this._bulk,n=r._logger;return this._waitAssign().then((function(){return r._request({method:"GET",path:"/job/"+e.id+"/batch",responseType:"application/xml"})})).then((function(t){n.debug(t.batchInfoList.batchInfo);var e=t.batchInfoList;return e=a.isArray(e.batchInfo)?e.batchInfo:[e.batchInfo]})).thenCall(t)},f.prototype.retrieveBatches=function(t){var e=this;return e.list().then(t=>h.all(t.map((function(t){if("NotProcessed"===t.state||0===parseInt(t.numberRecordsProcessed,10))return h.resolve();if("Failed"===t.state&&0===parseInt(t.numberRecordsProcessed,10))throw new Error(t.stateMessage);return e.batch(t.id).retrieve()})))).then((function(t){const e=[];return t.forEach((function(t){t&&e.push(...t)})),e})).then((function(t){return e.close().then((function(){return t}))})).fail((function(t){return e.emit("error",t),e.abort().then(()=>{throw t})})).thenCall(t)},f.prototype.close=function(){var t=this;return this._changeState("Closed").then((function(e){return t.id=null,t.emit("close",e),e}),(function(e){throw t.emit("error",e),e}))},f.prototype.abort=function(){var t=this;return this._changeState("Aborted").then((function(e){return t.id=null,t.emit("abort",e),e}),(function(e){throw t.emit("error",e),e}))},f.prototype._changeState=function(t,e){var r=this,n=this._bulk,i=n._logger;return this._jobInfo=this._waitAssign().then((function(){var e=['<?xml version="1.0" encoding="UTF-8"?>','<jobInfo xmlns="http://www.force.com/2009/06/asyncapi/dataload">',"<state>"+t+"</state>","</jobInfo>"].join("");return n._request({method:"POST",path:"/job/"+r.id,body:e,headers:{"Content-Type":"application/xml; charset=utf-8"},responseType:"application/xml"})})).then((function(t){return i.debug(t.jobInfo),r.state=t.jobInfo.state,t.jobInfo})),this._jobInfo.thenCall(e)};var d=function(t,e){d.super_.call(this,{objectMode:!0}),this.job=t,this.id=e,this._bulk=t._bulk,this._deferred=h.defer(),this._setupDataStreams()};n(d,i.Writable),d.prototype._setupDataStreams=function(){var t=this,e={nullValue:"#N/A"};this._uploadStream=new l.Serializable,this._uploadDataStream=this._uploadStream.stream("csv",e),this._downloadStream=new l.Parsable,this._downloadDataStream=this._downloadStream.stream("csv",e),this.on("finish",(function(){t._uploadStream.end()})),this._uploadDataStream.once("readable",(function(){t.job.open().then((function(){t._uploadDataStream.pipe(t._createRequestStream())}))}));var r=this._dataStream=new o;r._write=function(e,r,n){t._uploadDataStream.write(e,r,n)},r.on("finish",(function(){t._uploadDataStream.end()})),this._downloadDataStream.on("readable",(function(){r.read(0)})),this._downloadDataStream.on("end",(function(){r.push(null)})),r._read=function(e){for(var n;null!==(n=t._downloadDataStream.read());)r.push(n)}},d.prototype._createRequestStream=function(){var t=this,e=t._bulk,r=e._logger;return e._request({method:"POST",path:"/job/"+t.job.id+"/batch",headers:{"Content-Type":"text/csv"},responseType:"application/xml"},(function(e,n){e?t.emit("error",e):(r.debug(n.batchInfo),t.id=n.batchInfo.id,t.emit("queue",n.batchInfo))})).stream()},d.prototype._write=function(t,e,r){t=a.clone(t),"insert"===this.job.operation?delete t.Id:"delete"===this.job.operation&&(t={Id:t.Id}),delete t.type,delete t.attributes,this._uploadStream.write(t,e,r)},d.prototype.stream=function(){return this._dataStream},d.prototype.run=d.prototype.exec=d.prototype.execute=function(t,e){var r=this;if("function"==typeof t&&(e=t,t=null),this._result)throw new Error("Batch already executed.");var n,i=h.defer();(this._result=i.promise,this._result.then((function(t){r._deferred.resolve(t)}),(function(t){r._deferred.reject(t)})),this.once("response",(function(t){i.resolve(t)})),this.once("error",(function(t){i.reject(t)})),a.isObject(t)&&a.isFunction(t.pipe))?t.pipe(this._dataStream):a.isArray(t)?(a.forEach(t,(function(t){Object.keys(t).forEach((function(e){"boolean"==typeof t[e]&&(t[e]=String(t[e]))})),r.write(t)})),r.end()):a.isString(t)&&(n=t,this._dataStream.write(n,"utf8"),this._dataStream.end());return this.thenCall(e)},d.prototype.then=function(t,e,r){return this._deferred.promise.then(t,e,r)},d.prototype.thenCall=function(t){return a.isFunction(t)&&this.then((function(e){r.nextTick((function(){t(null,e)}))}),(function(e){r.nextTick((function(){t(e)}))})),this},d.prototype.check=function(t){var e=this._bulk,r=e._logger,n=this.job.id,i=this.id;if(!n||!i)throw new Error("Batch not started.");return e._request({method:"GET",path:"/job/"+n+"/batch/"+i,responseType:"application/xml"}).then((function(t){return r.debug(t.batchInfo),t.batchInfo})).thenCall(t)},d.prototype.poll=function(t,e){var r=this,n=this.job,i=this.id;if(!n.id||!i)throw new Error("Batch not started.");var o=(new Date).getTime(),s=function(){var a=(new Date).getTime();if(o+e<a){var u=new Error("Polling time out. Job Id = "+n.id+" , batch Id = "+i);return u.name="PollingTimeout",u.jobId=n.id,u.batchId=i,void r.emit("error",u)}n.info().then((function(e){r.check((function(i,o){const a="0"!==e.numberBatchesTotal&&e.numberBatchesTotal===e.numberBatchesCompleted;i?r.emit("error",i):"Failed"===o.state?parseInt(o.numberRecordsProcessed,10)>0?r.retrieve():r.emit("error",new Error(o.stateMessage)):"Completed"===o.state?r.retrieve():"NotProcessed"===o.state&&a?n.retrieveBatches().then(t=>{r.emit("response",t)}).fail((function(t){r.emit("error",t)})):(r.emit("progress",o),setTimeout(s,t))}))}))};setTimeout(s,t)},d.prototype.retrieve=function(t){var e=this,r=this._bulk,n=this.job.id,i=this.job,o=this.id;if(!n||!o)throw new Error("Batch not started.");return i.info().then((function(t){return r._request({method:"GET",path:"/job/"+n+"/batch/"+o+"/result"})})).then((function(t){var s;if("query"===i.operation){r._conn,t["result-list"].result;s=t["result-list"].result,s=a.map(a.isArray(s)?s:[s],(function(t){return{id:t,batchId:o,jobId:n}}))}else s=a.map(t,(function(t){return{id:t.Id||null,success:"true"===t.Success,errors:t.Error?[t.Error]:[]}}));return e.emit("response",s),s})).fail((function(t){throw e.emit("error",t),t})).thenCall(t)},d.prototype.result=function(t){var e=this.job.id,r=this.id;if(!e||!r)throw new Error("Batch not started.");var n=new l.Parsable,i=n.stream("csv");this._bulk._request({method:"GET",path:"/job/"+e+"/batch/"+r+"/result/"+t,responseType:"application/octet-stream",forever:!0,gzip:!0}).stream().on("error",t=>i.emit("error",t)).pipe(i);return n};var y=function(){y.super_.apply(this,arguments)};n(y,p),y.prototype.beforeSend=function(t){t.headers=t.headers||{},t.headers["X-SFDC-SESSION"]=this._conn.accessToken},y.prototype.isSessionExpired=function(t){return 400===t.statusCode&&/<exceptionCode>InvalidSessionId<\/exceptionCode>/.test(t.body)},y.prototype.hasErrorInResponseBody=function(t){return!!t.error},y.prototype.parseError=function(t){return{errorCode:t.error.exceptionCode,message:t.error.exceptionMessage}};var m=function(t){this._conn=t,this._logger=t._logger};m.prototype.pollInterval=1e3,m.prototype.pollTimeout=1e4,m.prototype._request=function(t,e){var r=this._conn;t=a.clone(t);var n=[r.instanceUrl,"services/async",r.version].join("/");t.url=n+t.path;var i={responseType:t.responseType};return delete t.path,delete t.responseType,new y(this._conn,i).on("requestDuration",t=>r.emit("requestDuration",t)).request(t).thenCall(e)},m.prototype.load=function(t,e,r,n,i){var o=this;if(!t||!e)throw new Error("Insufficient arguments. At least, 'type' and 'operation' are required.");a.isObject(r)&&r.constructor===Object||(i=n,n=r,r=null);var s=this.createJob(t,e,r);s.once("error",(function(t){u&&u.emit("error",t)}));var u=s.createBatch(),c=function(){u=null,s.close()};return u.on("response",c),u.on("error",(function(t){"PollingTimeout"!==t.name&&c()})),u.on("queue",(function(){u.poll(o.pollInterval,o.pollTimeout)})),u.execute(n,i)},m.prototype.query=function(t,e){var r=t.replace(/\([\s\S]+\)/g,"").match(/FROM\s+(\w+)/i);if(!r)throw new Error("No sobject type found in query, maybe caused by invalid SOQL.");var n=r[1],i=this,o=new l.Parsable,s=o.stream("csv");return this.load(n,"query",e||{},t).then((function(t){var e=t.map((function(t){const e=i.job(t.jobId).batch(t.batchId);return function(){return e.result(t.id).stream()}}));u(e).on("error",t=>s.emit("error",t)).on("end",()=>s.emit("end")).pipe(s)})).fail((function(t){s.emit("error",t)})),o},m.prototype.createJob=function(t,e,r){return new f(this,t,e,r)},m.prototype.job=function(t){return new f(this,null,null,null,t)},c.on("connection:new",(function(t){t.bulk=new m(t)})),e.exports=m}).call(this,t("_process"))},{"../core":19,"../http-api":22,"../promise":26,"../record-stream":29,_process:138,events:77,inherits:119,"lodash/core":127,multistream:128,"readable-stream":155}],7:[function(t,e,r){"use strict";var n=t("inherits"),i=t("lodash/core"),o=t("../core"),s=t("../promise"),a=e.exports=function(t){this._conn=t};a.prototype._request=function(t,e){return/^(put|post|patch)$/i.test(t.method)&&i.isObject(t.body)&&(t.headers={"Content-Type":"application/json"},t.body=JSON.stringify(t.body)),t.url=this._normalizeUrl(t.url),this._conn.request(t,e)},a.prototype._normalizeUrl=function(t){return 0===t.indexOf("/chatter/")||0===t.indexOf("/connect/")?"/services/data/v"+this._conn.version+t:/^\/v[\d]+\.[\d]+\//.test(t)?"/services/data"+t:0!==t.indexOf("/services/")&&"/"===t[0]?"/services/data/v"+this._conn.version+"/chatter"+t:t},a.prototype.request=function(t,e){return new u(this,t).thenCall(e)},a.prototype.resource=function(t,e){return new c(this,t,e)},a.prototype.batch=function(t,e){var r=[],n=[];i.forEach(t,(function(t){var e=s.defer();t._promise=e.promise,r.push(t.batchParams()),n.push(e)}));var o={method:"POST",url:this._normalizeUrl("/connect/batch"),body:{batchRequests:r}};return this.request(o).then((function(t){return i.forEach(t.results,(function(t,e){var r=n[e];t.statusCode>=400?r.reject(t.result):r.resolve(t.result)})),t})).thenCall(e)};var u=function(t,e){this._chatter=t,this._params=e,this._promise=null};u.prototype.batchParams=function(){var t=this._params,e={method:t.method,url:this._chatter._normalizeUrl(t.url)};return this._params.body&&(e.richInput=this._params.body),e},u.prototype.promise=function(){return this._promise||this._chatter._request(this._params)},u.prototype.stream=function(){return this._chatter._request(this._params).stream()},u.prototype.then=function(t,e){return this.promise().then(t,e)},u.prototype.thenCall=function(t){return i.isFunction(t)?this.promise().thenCall(t):this};var c=function(t,e,r){if(r){var n=i.map(i.keys(r),(function(t){return t+"="+encodeURIComponent(r[t])})).join("&");e+=(e.indexOf("?")>0?"&":"?")+n}c.super_.call(this,t,{method:"GET",url:e}),this._url=e};n(c,u),c.prototype.create=function(t,e){return this._chatter.request({method:"POST",url:this._url,body:t}).thenCall(e)},c.prototype.retrieve=function(t){return this.thenCall(t)},c.prototype.update=function(t,e){return this._chatter.request({method:"POST",url:this._url,body:t}).thenCall(e)},c.prototype.del=c.prototype.delete=function(t){return this._chatter.request({method:"DELETE",url:this._url}).thenCall(t)},o.on("connection:new",(function(t){t.chatter=new a(t)}))},{"../core":19,"../promise":26,inherits:119,"lodash/core":127}],8:[function(t,e,r){t("./analytics"),t("./apex"),t("./bulk"),t("./chatter"),t("./metadata"),t("./soap"),t("./streaming"),t("./tooling")},{"./analytics":4,"./apex":5,"./bulk":6,"./chatter":7,"./metadata":9,"./soap":10,"./streaming":11,"./tooling":12}],9:[function(t,e,r){(function(r,n){"use strict";var i=t("inherits"),o=t("events"),s=t("readable-stream"),a=t("lodash/core"),u=t("../core"),c=t("../promise"),l=t("../soap"),h=e.exports=function(t){this._conn=t};function p(t){var e=a.clone(t);return e.success="true"===e.success,e}function f(t){var e=p(t);return e.created="true"===e.created,e}function d(t){var e=a.clone(t);return delete e.$,e}h.prototype.pollInterval=1e3,h.prototype.pollTimeout=1e4,h.prototype._invoke=function(t,e,r){return new l(this._conn,{xmlns:"http://soap.sforce.com/2006/04/metadata",endpointUrl:this._conn.instanceUrl+"/services/Soap/m/"+this._conn.version}).invoke(t,e).then((function(t){return t.result})).thenCall(r)},h.prototype.createAsync=function(t,e,r){if(Number(this._conn.version)>30)throw new Error("Async metadata CRUD calls are not supported on ver 31.0 or later.");var n=function(e){return e["@xsi:type"]=t,e},i=a.isArray(e);e=i?a.map(e,n):n(e);var o=this._invoke("create",{metadata:e});return new y(this,o,i).thenCall(r)},h.prototype.createSync=h.prototype.create=function(t,e,r){var n=function(e){return e["@xsi:type"]=t,e};return e=a.isArray(e)?a.map(e,n):n(e),this._invoke("createMetadata",{metadata:e}).then((function(t){return a.isArray(t)?a.map(t,p):p(t)})).thenCall(r)},h.prototype.readSync=h.prototype.read=function(t,e,r){return this._invoke("readMetadata",{type:t,fullNames:e}).then((function(t){return a.isArray(t.records)?a.map(t.records,d):d(t.records)})).thenCall(r)},h.prototype.updateAsync=function(t,e,r){if(Number(this._conn.version)>30)throw new Error("Async metadata CRUD calls are not supported on ver 31.0 or later.");var n=function(e){return e.metadata["@xsi:type"]=t,e},i=a.isArray(e);e=i?a.map(e,n):n(e);var o=this._invoke("update",{updateMetadata:e});return new y(this,o,i).thenCall(r)},h.prototype.updateSync=h.prototype.update=function(t,e,r){var n=function(e){return e["@xsi:type"]=t,e};return e=a.isArray(e)?a.map(e,n):n(e),this._invoke("updateMetadata",{metadata:e}).then((function(t){return a.isArray(t)?a.map(t,p):p(t)})).thenCall(r)},h.prototype.upsertSync=h.prototype.upsert=function(t,e,r){var n=function(e){return e["@xsi:type"]=t,e};return e=a.isArray(e)?a.map(e,n):n(e),this._invoke("upsertMetadata",{metadata:e}).then((function(t){return a.isArray(t)?a.map(t,f):f(t)})).thenCall(r)},h.prototype.deleteAsync=function(t,e,r){if(Number(this._conn.version)>30)throw new Error("Async metadata CRUD calls are not supported on ver 31.0 or later.");var n=function(e){return a.isString(e)&&(e={fullName:e}),e["@xsi:type"]=t,e},i=a.isArray(e);e=i?a.map(e,n):n(e);var o=this._invoke("delete",{metadata:e});return new y(this,o,i).thenCall(r)},h.prototype.del=h.prototype.deleteSync=h.prototype.delete=function(t,e,r){return this._invoke("deleteMetadata",{type:t,fullNames:e}).then((function(t){return a.isArray(t)?a.map(t,p):p(t)})).thenCall(r)},h.prototype.rename=function(t,e,r,n){return this._invoke("renameMetadata",{type:t,oldFullName:e,newFullName:r}).then((function(t){return p(t)})).thenCall(n)},h.prototype.checkStatus=function(t,e){var r=a.isArray(t),n=this._invoke("checkStatus",{asyncProcessId:t});return new y(this,n,r).thenCall(e)},h.prototype.describe=function(t,e){return a.isString(t)||(e=t,t=this._conn.version),this._invoke("describeMetadata",{asOfVersion:t}).then((function(t){return t.metadataObjects=a.isArray(t.metadataObjects)?t.metadataObjects:[t.metadataObjects],t.metadataObjects=a.map(t.metadataObjects,(function(t){return t.childXmlNames&&(t.childXmlNames=a.isArray(t.childXmlNames)?t.childXmlNames:[t.childXmlNames]),t.inFolder="true"===t.inFolder,t.metaFile="true"===t.metaFile,t})),t.partialSaveAllowed="true"===t.partialSaveAllowed,t.testRequired="true"===t.testRequired,t})).thenCall(e)},h.prototype.list=function(t,e,r){return a.isString(e)||(r=e,e=this._conn.version),a.isArray(t)||(t=[t]),this._invoke("listMetadata",{queries:t,asOfVersion:e},r)},h.prototype.retrieve=function(t,e){var r=this._invoke("retrieve",{request:t});return new m(this,r).thenCall(e)},h.prototype.checkRetrieveStatus=function(t,e){return this._invoke("checkRetrieveStatus",{asyncProcessId:t},e)},h.prototype.deploy=function(t,e,r){e&&!a.isFunction(e)||(r=e,e={});var i=c.defer();if(a.isObject(t)&&a.isFunction(t.pipe)){var o=[];t.on("data",(function(t){o.push(t)})),t.on("end",(function(){i.resolve(n.concat(o).toString("base64"))}))}else if(t instanceof n)i.resolve(t.toString("base64"));else{if(!(t instanceof String||"string"==typeof t))throw"Unexpected zipInput type";i.resolve(t)}var s=this,u=i.promise.then((function(t){return s._invoke("deploy",{ZipFile:t,DeployOptions:e},r)}));return new g(this,u).thenCall(r)},h.prototype.checkDeployStatus=function(t,e,r){return a.isObject(e)||a.isBoolean(e)?e=!!e:(r=e,e=!1),this._invoke("checkDeployStatus",{asyncProcessId:t,includeDetails:e}).then((function(t){return t.done="true"===t.done,t.success="true"===t.success,t.checkOnly="true"===t.checkOnly,t.ignoreWarnings&&(t.ignoreWarnings="true"===t.ignoreWarnings),t.rollbackOnError&&(t.rollbackOnError="true"===t.rollbackOnError),t.numberComponentErrors=Number(t.numberComponentErrors),t.numberComponentsDeployed=Number(t.numberComponentsDeployed),t.numberComponentsTotal=Number(t.numberComponentsTotal),t.numberTestErrors=Number(t.numberTestErrors),t.numberTestsCompleted=Number(t.numberTestsCompleted),t.numberTestsTotal=Number(t.numberTestsTotal),t})).thenCall(r)};var y=function(t,e,r){this._meta=t,this._results=e,this._isArray=r};i(y,o.EventEmitter),y.prototype.then=function(t,e){var r=this;return this._results.then((function(e){var n=function(t){return t.$&&"true"===t.$["xsi:nil"]?null:(t.done="true"===t.done,t)};return e=a.isArray(e)?a.map(e,n):n(e),r._isArray&&!a.isArray(e)&&(e=[e]),t(e)}),e)},y.prototype.thenCall=function(t){return a.isFunction(t)?this.then((function(e){r.nextTick((function(){t(null,e)}))}),(function(e){r.nextTick((function(){t(e)}))})):this},y.prototype.check=function(t){var e=this,r=this._meta;return this.then((function(t){var n=a.isArray(t)?a.map(t,(function(t){return t.id})):t.id;return e._ids=n,r.checkStatus(n)})).thenCall(t)},y.prototype.poll=function(t,e){var r=this,n=(new Date).getTime(),i=function(){var o=(new Date).getTime();if(n+e<o){var s="Polling time out.";return r._ids&&(s+=" Process Id = "+r._ids),void r.emit("error",new Error(s))}r.check().then((function(e){for(var n=!0,o=a.isArray(e)?e:[e],s=0,u=o.length;s<u;s++){var c=o[s];c&&!c.done&&(r.emit("progress",c),n=!1)}n?r.emit("complete",e):setTimeout(i,t)}),(function(t){r.emit("error",t)}))};setTimeout(i,t)},y.prototype.complete=function(t){var e=c.defer();this.on("complete",(function(t){e.resolve(t)})),this.on("error",(function(t){e.reject(t)}));var r=this._meta;return this.poll(r.pollInterval,r.pollTimeout),e.promise.thenCall(t)};var m=function(t,e){m.super_.call(this,t,e)};i(m,y),m.prototype.complete=function(t){var e=this._meta;return m.super_.prototype.complete.call(this).then((function(t){return e.checkRetrieveStatus(t.id)})).thenCall(t)},m.prototype.stream=function(){var t=this,e=new s.Readable,r=!1;return e._read=function(){r||(r=!0,t.complete((function(t,r){t?e.emit("error",t):(e.push(new n(r.zipFile,"base64")),e.push(null))})))},e};var g=function(t,e){g.super_.call(this,t,e)};i(g,y),g.prototype.complete=function(t,e){a.isFunction(t)&&(e=t,t=!1);var r=this._meta;return g.super_.prototype.complete.call(this).then((function(e){return r.checkDeployStatus(e.id,t)})).thenCall(e)},u.on("connection:new",(function(t){t.metadata=new h(t)}))}).call(this,t("_process"),t("buffer").Buffer)},{"../core":19,"../promise":26,"../soap":32,_process:138,buffer:40,events:77,inherits:119,"lodash/core":127,"readable-stream":155}],10:[function(t,e,r){"use strict";var n=t("lodash/core"),i=t("../core"),o=t("../soap"),s=e.exports=function(t){this._conn=t};s.prototype._invoke=function(t,e,r,n){return new o(this._conn,{xmlns:"urn:partner.soap.sforce.com",endpointUrl:this._conn.instanceUrl+"/services/Soap/u/"+this._conn.version}).invoke(t,e,{result:r}).then((function(t){return t.result})).thenCall(n)};var a={};s.prototype.convertLead=function(t,e){var r=n.isArray(t)?[a.LeadConvertResult]:a.LeadConvertResult;return this._invoke("convertLead",{leadConverts:t},r,e)},a.LeadConvertResult={success:"boolean",errors:[],leadId:"string",accountId:"string",contactId:"string",opportunityId:"string"},s.prototype.merge=function(t,e){var r=n.isArray(t)?[a.MergeResult]:a.MergeResult;return this._invoke("merge",{mergeRequests:t},r,e)},a.MergeResult={success:"boolean",errors:[],id:"string",mergedRecordIds:["string"],updatedRelatedIds:["string"]},s.prototype.emptyRecycleBin=function(t,e){return this._invoke("emptyRecycleBin",{ids:t},[a.EmptyRecycleBinResult],e)},a.EmptyRecycleBinResult={id:"string",success:"boolean",errors:[]},s.prototype.describeTabs=function(t){return this._invoke("describeTabs",{},[a.DescribeTabSetResult],t)},a.DescribeTabSetResult={label:"string",logoUrl:"string",namespace:"string",selected:"boolean",tabs:[{colors:[{theme:"string",color:"string",context:"string"}],iconUrl:"string",icons:[{theme:"string",height:"number",width:"number",url:"string",contentType:"string"}],label:"string",custom:"boolean",miniIconUrl:"string",name:"string",sobjectName:"string",url:"string"}]},s.prototype.getServerTimestamp=function(t){return this._invoke("getServerTimestamp",{},a.GetServerTimestampResult,t)},a.GetServerTimestampResult={timestamp:"string"},s.prototype.getUserInfo=function(t){return this._invoke("getUserInfo",{},a.GetUserInfoResult,t)},a.GetUserInfoResult={accessibilityMode:"boolean",currencySymbol:"string",orgAttachmentFileSizeLimit:"number",orgDefaultCurrencyIsoCode:"string",orgDisallowHtmlAttachments:"boolean",orgHasPersonAccounts:"boolean",organizationId:"string",organizationMultiCurrency:"boolean",organizationName:"string",profileId:"string",roleId:"string",sessionSecondsValid:"number",userDefaultCurrencyIsoCode:"string",userEmail:"string",userFullName:"string",userId:"string",userLanguage:"string",userLocale:"string",userName:"string",userTimeZone:"string",userType:"string",userUiSkin:"string"},s.prototype.setPassword=function(t,e,r){return this._invoke("setPassword",{userId:t,password:e},r)},s.prototype.resetPassword=function(t,e){return this._invoke("resetPassword",{userId:t},e)},s.prototype.create=function(t,e){var r=n.isArray(t)?[a.SaveResult]:a.SaveResult,i={"@xmlns":"urn:partner.soap.sforce.com","@xmlns:ns1":"sobject.partner.soap.sforce.com","ns1:sObjects":t};return this._invoke("create",i,r,e)},s.prototype.update=function(t,e){var r=n.isArray(t)?[a.SaveResult]:a.SaveResult,i={"@xmlns":"urn:partner.soap.sforce.com","@xmlns:ns1":"sobject.partner.soap.sforce.com","ns1:sObjects":t};return this._invoke("update",i,r,e)},a.SaveResult={success:"boolean",errors:[],id:"string"},s.prototype.upsert=function(t,e,r){var i=n.isArray(e)?[a.UpsertResult]:a.UpsertResult,o={"@xmlns":"urn:partner.soap.sforce.com","@xmlns:ns1":"sobject.partner.soap.sforce.com","ns1:externalIDFieldName":t,"ns1:sObjects":e};return this._invoke("upsert",o,i,r)},a.UpsertResult={created:"boolean",success:"boolean",errors:[],id:"string"},s.prototype.delete=function(t,e){var r=n.isArray(t)?[a.DeleteResult]:a.DeleteResult,i={"@xmlns":"urn:partner.soap.sforce.com","@xmlns:ns1":"sobject.partner.soap.sforce.com","ns1:ids":t};return this._invoke("delete",i,r,e)},a.DeleteResult={success:"boolean",errors:[],id:"string"},i.on("connection:new",(function(t){t.soap=new s(t)})),e.exports=s},{"../core":19,"../soap":32,"lodash/core":127}],11:[function(t,e,r){"use strict";var n=t("events"),i=t("inherits"),o=t("lodash/core"),s=t("faye"),a=t("../core"),u=function(t,e){this._streaming=t,this.name=e};u.prototype.subscribe=function(t){return this._streaming.subscribe(this.name,t)},u.prototype.unsubscribe=function(t){return this._streaming.unsubscribe(this.name,t),this};var c=function(t,e){this._streaming=t,this._name=e};c.prototype.subscribe=function(t){return this._streaming.subscribe(this._name,t)},c.prototype.unsubscribe=function(t){return this._streaming.unsubscribe(this._name,t),this},c.prototype.push=function(t,e){var r=o.isArray(t);t=r?t:[t];var n=this._streaming._conn;return this._id||(this._id=n.sobject("StreamingChannel").findOne({Name:this._name},"Id").then((function(t){return t.Id}))),this._id.then((function(e){var r="/sobjects/StreamingChannel/"+e+"/push";return n.requestPost(r,{pushEvents:t})})).then((function(t){return r?t:t[0]})).thenCall(e)};var l=function(t){this._conn=t};i(l,n.EventEmitter),l.prototype._createClient=function(t){var e=[this._conn.instanceUrl,"cometd"+(t&&"36.0"===this._conn.version?"/replay":""),this._conn.version].join("/"),r=new s.Client(e,{});return r.setHeader("Authorization","OAuth "+this._conn.accessToken),r},l.prototype._getFayeClient=function(t){var e=0===t.indexOf("/u/"),r=e?"generic":"pushTopic";return this._fayeClients&&this._fayeClients[r]||(this._fayeClients=this._fayeClients||{},this._fayeClients[r]=this._createClient(e),-1===this._fayeClients[r]._dispatcher.getConnectionTypes().indexOf("callback-polling")&&(this._fayeClients[r]._dispatcher.selectTransport("long-polling"),this._fayeClients[r]._dispatcher._transport.batching=!1)),this._fayeClients[r]},l.prototype.topic=function(t){return this._topics=this._topics||{},this._topics[t]=this._topics[t]||new u(this,t)},l.prototype.channel=function(t){return new c(this,t)},l.prototype.subscribe=function(t,e){var r=0===t.indexOf("/")?t:"/topic/"+t;return this._getFayeClient(r).subscribe(r,e)},l.prototype.unsubscribe=function(t,e){var r=0===t.indexOf("/")?t:"/topic/"+t;return this._getFayeClient(r).unsubscribe(r,e),this},a.on("connection:new",(function(t){t.streaming=new l(t)})),e.exports=l},{"../core":19,events:77,faye:78,inherits:119,"lodash/core":127}],12:[function(t,e,r){"use strict";var n=t("../core"),i=t("lodash/core"),o=t("../cache"),s=function(t){this._conn=t,this._logger=t._logger;["query","queryMore","create","insert","retrieve","update","upsert","del","delete","destroy","describe","describeGlobal","sobject"].forEach((function(e){this[e]=t.constructor.prototype[e]}),this),this.cache=new o;var e={key:function(t){return t?"describe."+t:"describe"}};this.describe$=this.cache.makeCacheable(this.describe,this,e),this.describe=this.cache.makeResponseCacheable(this.describe,this,e),this.describeSObject$=this.describe$,this.describeSObject=this.describe,e={key:"describeGlobal"},this.describeGlobal$=this.cache.makeCacheable(this.describeGlobal,this,e),this.describeGlobal=this.cache.makeResponseCacheable(this.describeGlobal,this,e),this.initialize()};s.prototype.initialize=function(){this.sobjects={},this.cache.clear(),this.cache.get("describeGlobal").on("value",i.bind((function(t){t.result&&i.map(t.result.sobjects,(function(t){return t.name})).forEach(this.sobject,this)}),this))},s.prototype._baseUrl=function(){return this._conn._baseUrl()+"/tooling"},s.prototype.request=function(){return this._conn.request.apply(this._conn,arguments)},s.prototype.executeAnonymous=function(t,e){var r=this._baseUrl()+"/executeAnonymous?anonymousBody="+encodeURIComponent(t);return this.request(r).thenCall(e)},s.prototype.runTestsAsynchronous=function(t,e){var r=this._baseUrl()+"/runTestsAsynchronous/";return this._conn.requestPost(r,{classids:t.join(",")},void 0,e)},s.prototype.runTestsSynchronous=function(t,e){var r=this._baseUrl()+"/runTestsSynchronous/";return this._conn.requestPost(r,{classnames:t.join(",")},void 0,e)},s.prototype.completions=function(t,e){i.isString(t)||(e=t,t="apex");var r=this._baseUrl()+"/completions?type="+encodeURIComponent(t);return this.request(r).thenCall(e)},n.on("connection:new",(function(t){t.tooling=new s(t)})),e.exports=s},{"../cache":17,"../core":19,"lodash/core":127}],13:[function(t,e,r){"use strict";var n=t("readable-stream").Duplex,i=t("lodash/core");e.exports={supported:"object"==typeof Sfdc&&void 0!==Sfdc.canvas,createRequest:function(t){return function(e,r){var o,s=new n;s._read=function(t){o&&s.push(o.body)};var a=[],u=!1;function c(n){var a={client:t.client,method:e.method,data:n};if(e.headers)for(var u in a.headers={},e.headers)"content-type"===u.toLowerCase()?a.contentType=e.headers[u]:a.headers[u]=e.headers[u];a.success=function(t){var e=function(t){var e={};return t.split(/\n/).forEach((function(t){var r=t.split(/\s*:\s*/),n=r[0].toLowerCase(),i=r[1];e[n]=i})),e}(t.responseHeaders),n=t.payload;i.isString(n)||(n=JSON.stringify(n)),o={statusCode:t.status,headers:e,body:n},r&&r(null,o,o.body),s.end()},a.failure=function(t){r&&r(t)},Sfdc.canvas.client.ajax(e.url,a)}return s._write=function(t,e,r){a.push(t.toString(e)),r()},s.on("finish",(function(){u||(c(a.join("")),u=!0)})),!e.body&&""!==e.body&&/^(put|post|patch)$/i.test(e.method)||(c(e.body),u=!0),s}}}},{"lodash/core":127,"readable-stream":155}],14:[function(t,e,r){"use strict";var n=t("events"),i=t("inherits"),o=t("querystring"),s=t("lodash/core"),a=t("../connection"),u=t("../oauth2");function c(){var t=function(){var t;if(window.location.hash){if((t=o.parse(window.location.hash.substring(1))).access_token)return{success:!0,body:t}}else if(window.location.search&&(t=o.parse(window.location.search.substring(1))).error)return{success:!1,body:t}}(),e=localStorage.getItem("jsforce_state");if(t&&e&&t.body.state===e){localStorage.removeItem("jsforce_state");var r=e.split("."),n=r[0],i=r[1],s=new h(n);return t.success?(s._storeTokens(t.body),location.hash=""):s._storeError(t.body),"popup"===i&&window.close(),!0}}var l=0,h=function(t){this._prefix=t||"jsforce"+l++,this.connection=null};i(h,n.EventEmitter),h.prototype.init=function(t){if(!c()){this.config=t,this.connection=new a(t);var e=this._getTokens();if(e){this.connection.initialize(e);var r=this;setTimeout((function(){r.emit("connect",r.connection)}),10)}}},h.prototype.login=function(t,e){s.isFunction(t)&&(e=t,t={}),t=t||{},e=e||function(){},s.extend(t,this.config);this._prompt(t,e)},h.prototype._prompt=function(t,e){var r=this,n=new u(t),i=Math.random().toString(36).substring(2),o=[this._prefix,"popup",i].join(".");localStorage.setItem("jsforce_state",o);var s,a,c,l,h,p=n.getAuthorizationUrl({response_type:"token",scope:t.scope,state:o}),f=t.size||{},d=(s=p,a=f.width||912,c=f.height||513,l=screen.width/2-a/2,h=screen.height/2-c/2,window.open(s,null,"location=yes,toolbar=no,status=no,menubar=no,width="+a+",height="+c+",top="+h+",left="+l));if(!d)return o=[this._prefix,"redirect",i].join("."),localStorage.setItem("jsforce_state",o),p=n.getAuthorizationUrl({response_type:"token",scope:t.scope,state:o}),void(location.href=p);r._removeTokens();var y=setInterval((function(){try{if(!d||d.closed){clearInterval(y);var t=r._getTokens();if(t)r.connection.initialize(t),r.emit("connect",r.connection),e(null,{status:"connect"});else{var n=r._getError();n?e(new Error(n.error+": "+n.error_description)):e(null,{status:"cancel"})}}}catch(t){}}),1e3)},h.prototype.isLoggedIn=function(){return!(!this.connection||!this.connection.accessToken)},h.prototype.logout=function(){this.connection.logout(),this._removeTokens(),this.emit("disconnect")},h.prototype._getTokens=function(){var t=new RegExp("(^|;\\s*)"+this._prefix+"_loggedin=true(;|$)");if(document.cookie.match(t)){var e=Number(localStorage.getItem(this._prefix+"_issued_at"));if(Date.now()<e+72e5){var r,n=localStorage.getItem(this._prefix+"_id");if(n){var i=n.split("/");r={id:i.pop(),organizationId:i.pop(),url:n}}return{accessToken:localStorage.getItem(this._prefix+"_access_token"),instanceUrl:localStorage.getItem(this._prefix+"_instance_url"),userInfo:r}}}return null},h.prototype._storeTokens=function(t){localStorage.setItem(this._prefix+"_access_token",t.access_token),localStorage.setItem(this._prefix+"_instance_url",t.instance_url),localStorage.setItem(this._prefix+"_issued_at",t.issued_at),localStorage.setItem(this._prefix+"_id",t.id),document.cookie=this._prefix+"_loggedin=true;"},h.prototype._removeTokens=function(){localStorage.removeItem(this._prefix+"_access_token"),localStorage.removeItem(this._prefix+"_instance_url"),localStorage.removeItem(this._prefix+"_issued_at"),localStorage.removeItem(this._prefix+"_id"),document.cookie=this._prefix+"_loggedin="},h.prototype._getError=function(){try{var t=JSON.parse(localStorage.getItem(this._prefix+"_error"));return localStorage.removeItem(this._prefix+"_error"),t}catch(t){}},h.prototype._storeError=function(t){localStorage.setItem(this._prefix+"_error",JSON.stringify(t))},e.exports=new h,e.exports.Client=h},{"../connection":18,"../oauth2":24,events:77,inherits:119,"lodash/core":127,querystring:143}],15:[function(t,e,r){"use strict";var n=0;e.exports={supported:"undefined"!=typeof window&&"undefined"!=typeof document,createRequest:function(t,e){return t=t||"callback",e=e||1e4,function(r,i){if("GET"!==r.method.toUpperCase())return i(new Error("JSONP only supports GET request."));var o="_jsforce_jsonpCallback_"+ ++n,s=window,a=r.url;a+=a.indexOf("?")>0?"&":"?",a+=t+"="+o;var u=document.createElement("script");u.type="text/javascript",u.src=a,document.documentElement.appendChild(u);var c=setTimeout((function(){l(),i(new Error("JSONP call time out."))}),e);s[o]=function(t){l(),i(null,{statusCode:200,headers:{"content-type":"application/json"},body:JSON.stringify(t)})};var l=function(){clearTimeout(c),document.documentElement.removeChild(u),delete s[o]}}}}},{}],16:[function(t,e,r){"use strict";var n=t("readable-stream").Duplex,i=t("lodash/core");e.exports=function(t,e){var r,o=new XMLHttpRequest;if(o.open(t.method,t.url),t.headers)for(var s in t.headers)o.setRequestHeader(s,t.headers[s]);o.setRequestHeader("Accept","*/*");var a=new n;a._read=function(t){r&&a.push(r.body)};var u=[],c=!1;return a._write=function(t,e,r){u.push(t.toString("buffer"===e?"binary":e)),r()},a.on("finish",(function(){c||(o.send(u.join("")),c=!0)})),!t.body&&""!==t.body&&/^(put|post|patch)$/i.test(t.method)||(o.send(t.body),c=!0),o.onreadystatechange=function(){if(4===o.readyState){var t=function(t){var e=(t.getAllResponseHeaders()||"").split(/[\r\n]+/);return i.map(e,(function(t){return t.split(/\s*:/)[0].toLowerCase()}))}(o),n={};i.forEach(t,(function(t){t&&(n[t]=o.getResponseHeader(t))})),(r={statusCode:o.status,headers:n,body:o.response}).statusCode||(r.statusCode=400,r.body="Access Declined"),e&&e(null,r,r.body),a.end()}},a}},{"lodash/core":127,"readable-stream":155}],17:[function(t,e,r){"use strict";var n=t("events"),i=t("inherits"),o=t("lodash/core"),s=function(){this.fetching=!1};i(s,n.EventEmitter),s.prototype.get=function(t){if(!t)return this._value;this.once("value",t),o.isUndefined(this._value)||this.emit("value",this._value)},s.prototype.set=function(t){this._value=t,this.emit("value",this._value)},s.prototype.clear=function(){this.fetching=!1,delete this._value};var a=function(){this._entries={}};function u(t,e){return e=Array.prototype.slice.apply(e),t+"("+o.map(e,(function(t){return JSON.stringify(t)})).join(",")+")"}a.prototype.get=function(t){if(t&&this._entries[t])return this._entries[t];var e=new s;return this._entries[t]=e,e},a.prototype.clear=function(t){for(var e in this._entries)t&&0!==e.indexOf(t)||this._entries[e].clear()},a.prototype.makeResponseCacheable=function(t,e,r){var n=this;return r=r||{},function(){var i=Array.prototype.slice.apply(arguments),s=i.pop();o.isFunction(s)||(i.push(s),s=null);var a,c,l=o.isString(r.key)?r.key:o.isFunction(r.key)?r.key.apply(e,i):u(r.namespace,i),h=n.get(l);h.fetching=!0,s&&i.push((function(t,e){h.set({error:t,result:e}),s(t,e)}));try{a=t.apply(e||this,i)}catch(t){c=t}if(a&&o.isFunction(a.then))return s?a:a.then((function(t){return h.set({error:void 0,result:t}),t}),(function(t){throw h.set({error:t,result:void 0}),t}));if(h.set({error:c,result:a}),c)throw c;return a}},a.prototype.makeCacheable=function(t,e,r){var n=this;r=r||{};var i=function(){var i=Array.prototype.slice.apply(arguments),s=i.pop();o.isFunction(s)||i.push(s);var a=o.isString(r.key)?r.key:o.isFunction(r.key)?r.key.apply(e,i):u(r.namespace,i),c=n.get(a);if(!o.isFunction(s)){var l=c.get();if(!l)throw new Error("Function call result is not cached yet.");if(l.error)throw l.error;return l.result}c.get((function(t){s(t.error,t.result)})),c.fetching||(c.fetching=!0,i.push((function(t,e){c.set({error:t,result:e})})),t.apply(e||this,i))};return i.clear=function(){var t=o.isString(r.key)?r.key:o.isFunction(r.key)?r.key.apply(e,arguments):u(r.namespace,arguments);n.clear(t)},i},e.exports=a},{events:77,inherits:119,"lodash/core":127}],18:[function(t,e,r){(function(r){"use strict";var n=t("events"),i=t("inherits"),o=t("lodash/core"),s=t("./promise"),a=t("./logger"),u=t("./oauth2"),c=t("./query"),l=t("./sobject"),h=t("./quick-action"),p=t("./http-api"),f=t("./transport"),d=t("./process"),y=t("./cache"),m="https://login.salesforce.com",g="",b="39.0",v=e.exports=function(e){e=e||{},this._logger=new a(e.logLevel);var r=e.oauth2||{loginUrl:e.loginUrl,clientId:e.clientId,clientSecret:e.clientSecret,redirectUri:e.redirectUri,proxyUrl:e.proxyUrl,httpProxy:e.httpProxy};this.oauth2=r=r instanceof u?r:new u(r),this.loginUrl=e.loginUrl||r.loginUrl||m,this.version=e.version||b,this.maxRequest=e.maxRequest||this.maxRequest||10,e.proxyUrl?this._transport=new f.ProxyTransport(e.proxyUrl):e.httpProxy?this._transport=new f.HttpProxyTransport(e.httpProxy):this._transport=new f,this.callOptions=e.callOptions,t("./core").emit("connection:new",this),this.process=new d(this),this.cache=new y;var n=e.refreshFn;!n&&this.oauth2.clientId&&this.oauth2.clientSecret&&(n=_),n&&(this._refreshDelegate=new p.SessionRefreshDelegate(this,n));var i={key:function(t){return t?"describe."+t:"describe"}};this.describe$=this.cache.makeCacheable(this.describe,this,i),this.describe=this.cache.makeResponseCacheable(this.describe,this,i),this.describeSObject$=this.describe$,this.describeSObject=this.describe,i={key:"describeGlobal"},this.describeGlobal$=this.cache.makeCacheable(this.describeGlobal,this,i),this.describeGlobal=this.cache.makeResponseCacheable(this.describeGlobal,this,i),this.initialize(e)};function _(t,e){t.oauth2.refreshToken(t.refreshToken,(function(r,n){if(r)return e(r);if(!n)return e(new Error("jsforce: oauthRefreshFn: result cannot be falsy"));var i=T(n.id);t.initialize({instanceUrl:n.instance_url,accessToken:n.access_token,userInfo:i}),e(null,n.access_token,n)}))}function w(t){function e(t){return t<10?"0"+t:t}return t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1)+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())+"+00:00"}function T(t){var e=t.split("/");return{id:e.pop(),organizationId:e.pop(),url:t}}function E(t){return t&&String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}i(v,n.EventEmitter),v.prototype.initialize=function(t){if(!t.instanceUrl&&t.serverUrl&&(t.instanceUrl=t.serverUrl.split("/").slice(0,3).join("/")),this.instanceUrl=t.instanceUrl||t.serverUrl||this.instanceUrl||g,this.accessToken=t.sessionId||t.accessToken||this.accessToken,this.refreshToken=t.refreshToken||this.refreshToken,this.refreshToken&&!this._refreshDelegate)throw new Error("Refresh token is specified without oauth2 client information or refresh function");this.signedRequest=t.signedRequest&&function(t){if(o.isString(t)){if("{"===t[0])return JSON.parse(t);var e=t.split(".").pop(),n=new r(e,"base64").toString("utf-8");return JSON.parse(n)}return t}(t.signedRequest),this.signedRequest&&(this.accessToken=this.signedRequest.client.oauthToken,f.CanvasTransport.supported&&(this._transport=new f.CanvasTransport(this.signedRequest))),t.userInfo&&(this.userInfo=t.userInfo),this.limitInfo={},this.sobjects={},this.cache.clear(),this.cache.get("describeGlobal").on("value",o.bind((function(t){t.result&&o.map(t.result.sobjects,(function(t){return t.name})).forEach(this.sobject,this)}),this)),this.tooling&&this.tooling.initialize(),this._sessionType=t.sessionId?"soap":"oauth2"},v.prototype._baseUrl=function(){return[this.instanceUrl,"services/data","v"+this.version].join("/")},v.prototype._normalizeUrl=function(t){return"/"===t[0]?0===t.indexOf("/services/")?this.instanceUrl+t:this._baseUrl()+t:t},v.prototype.request=function(t,e,r){"function"==typeof e&&(r=e,e=null),e=e||{};var n=this;o.isString(t)&&(t={method:"GET",url:t}),t.url=this._normalizeUrl(t.url);var i=new p(this,e);return i.on("requestDuration",t=>this.emit("requestDuration",t)),i.on("response",(function(t){if(t.headers&&t.headers["sforce-limit-info"]){var e=t.headers["sforce-limit-info"].match(/api\-usage=(\d+)\/(\d+)/);e&&(n.limitInfo={apiUsage:{used:parseInt(e[1],10),limit:parseInt(e[2],10)}})}})),i.request(t).thenCall(r)},v.prototype.requestGet=function(t,e,r){var n={method:"GET",url:t};return this.request(n,e,r)},v.prototype.requestPost=function(t,e,r,n){var i={method:"POST",url:t,body:JSON.stringify(e),headers:{"content-type":"application/json"}};return this.request(i,r,n)},v.prototype.requestPut=function(t,e,r,n){var i={method:"PUT",url:t,body:JSON.stringify(e),headers:{"content-type":"application/json"}};return this.request(i,r,n)},v.prototype.requestPatch=function(t,e,r,n){var i={method:"PATCH",url:t,body:JSON.stringify(e),headers:{"content-type":"application/json"}};return this.request(i,r,n)},v.prototype.requestDelete=function(t,e,r){var n={method:"DELETE",url:t};return this.request(n,e,r)},v.prototype.query=function(t,e,r){"function"==typeof e&&(r=e,e=void 0);var n=new c(this,t,e);return r&&n.run(r),n},v.prototype.queryAll=function(t,e,r){"function"==typeof e&&(r=e,e=void 0);var n=new c(this,t,e);return n.scanAll(!0),r&&n.run(r),n},v.prototype.queryMore=function(t,e,r){"function"==typeof e&&(r=e,e=void 0);var n=new c(this,{locator:t},e);return r&&n.run(r),n},v.prototype.retrieve=function(t,e,r,n){"function"==typeof r&&(n=r,r={}),r=r||{};var i=this,a=o.isArray(e);return(e=a?e:[e]).length>i.maxRequest?s.reject(new Error("Exceeded max limit of concurrent call")).thenCall(n):s.all(o.map(e,(function(e){if(!e)return s.reject(new Error("Invalid record ID. Specify valid record ID value")).thenCall(n);var o=[i._baseUrl(),"sobjects",t,e].join("/");return i.request({method:"GET",url:o,headers:r.headers})}))).then((function(t){return!a&&o.isArray(t)?t[0]:t})).thenCall(n)},v.prototype.insert=v.prototype.create=function(t,e,r,n){o.isString(t)||(n=r,r=e,e=t,t=null),"function"==typeof r&&(n=r,r={}),r=r||{};var i=this,a=o.isArray(e);return(e=a?e:[e]).length>i.maxRequest?s.reject(new Error("Exceeded max limit of concurrent call")).thenCall(n):s.all(o.map(e,(function(e){var n=t||e.attributes&&e.attributes.type||e.type;if(!n)throw new Error("No SObject Type defined in record");delete(e=o.clone(e)).Id,delete e.type,delete e.attributes;var s=[i._baseUrl(),"sobjects",n].join("/");return i.request({method:"POST",url:s,body:JSON.stringify(e),headers:o.defaults(r.headers||{},{"Content-Type":"application/json"})})}))).then((function(t){return!a&&o.isArray(t)?t[0]:t})).thenCall(n)},v.prototype.update=function(t,e,r,n){o.isString(t)||(n=r,r=e,e=t,t=null),"function"==typeof r&&(n=r,r={}),r=r||{};var i=this,a=o.isArray(e);return(e=a?e:[e]).length>i.maxRequest?s.reject(new Error("Exceeded max limit of concurrent call")).thenCall(n):s.all(o.map(e,(function(e){var n=e.Id;if(!n)throw new Error("Record id is not found in record.");var s=t||e.attributes&&e.attributes.type||e.type;if(!s)throw new Error("No SObject Type defined in record");delete(e=o.clone(e)).Id,delete e.type,delete e.attributes;var a=[i._baseUrl(),"sobjects",s,n].join("/");return i.request({method:"PATCH",url:a,body:JSON.stringify(e),headers:o.defaults(r.headers||{},{"Content-Type":"application/json"})},{noContentResponse:{id:n,success:!0,errors:[]}})}))).then((function(t){return!a&&o.isArray(t)?t[0]:t})).thenCall(n)},v.prototype.upsert=function(t,e,r,n,i){o.isString(t)||(i=n,n=r,r=e,e=t,t=null),"function"==typeof n&&(i=n,n={}),n=n||{};var a=this,u=o.isArray(e);return(e=u?e:[e]).length>a.maxRequest?s.reject(new Error("Exceeded max limit of concurrent call")).thenCall(i):s.all(o.map(e,(function(e){var i=t||e.attributes&&e.attributes.type||e.type,s=e[r];delete(e=o.clone(e))[r],delete e.type,delete e.attributes;var u=[a._baseUrl(),"sobjects",i,r,s].join("/");return a.request({method:"PATCH",url:u,body:JSON.stringify(e),headers:o.defaults(n.headers||{},{"Content-Type":"application/json"})},{noContentResponse:{success:!0,errors:[]}})}))).then((function(t){return!u&&o.isArray(t)?t[0]:t})).thenCall(i)},v.prototype.delete=v.prototype.del=v.prototype.destroy=function(t,e,r,n){"function"==typeof r&&(n=r,r={}),r=r||{};var i=this,a=o.isArray(e);return(e=a?e:[e]).length>i.maxRequest?s.reject(new Error("Exceeded max limit of concurrent call")).thenCall(n):s.all(o.map(e,(function(e){var n=[i._baseUrl(),"sobjects",t,e].join("/");return i.request({method:"DELETE",url:n,headers:r.headers||null},{noContentResponse:{id:e,success:!0,errors:[]}})}))).then((function(t){return!a&&o.isArray(t)?t[0]:t})).thenCall(n)},v.prototype.search=function(t,e){var r=this._baseUrl()+"/search?q="+encodeURIComponent(t);return this.request(r).thenCall(e)},v.prototype.describe=v.prototype.describeSObject=function(t,e){var r=[this._baseUrl(),"sobjects",t,"describe"].join("/");return this.request(r).thenCall(e)},v.prototype.describeGlobal=function(t){var e=this._baseUrl()+"/sobjects";return this.request(e).thenCall(t)},v.prototype.sobject=function(t){return this.sobjects=this.sobjects||{},this.sobjects[t]=this.sobjects[t]||new l(this,t)},v.prototype.identity=function(t,e){"function"==typeof t&&(e=t,t={}),t=t||{};var r=this,n=this.userInfo&&this.userInfo.url;return s.resolve(n?{identity:n}:this.request({method:"GET",url:this._baseUrl(),headers:t.headers})).then((function(t){var e=t.identity;e+="?format=json&oauth_token="+encodeURIComponent(r.accessToken);var n=f.JsonpTransport.supported?new f.JsonpTransport("callback"):void 0;return r.request({method:"GET",url:e},{transport:n})})).then((function(t){return r.userInfo={id:t.user_id,organizationId:t.organization_id,url:t.id},t})).thenCall(e)},v.prototype.authorize=function(t,e,r){var n=this,i=this._logger;return this.oauth2.requestToken(t,null,r).then((function(t){var e=T(t.id);return n.initialize({instanceUrl:t.instance_url,accessToken:t.access_token,refreshToken:t.refresh_token,userInfo:e}),i.debug("<login> completed. user id = "+e.id+", org id = "+e.organizationId),e})).thenCall(e)},v.prototype.login=function(t,e,r){return this._refreshDelegate=new p.SessionRefreshDelegate(this,function(t,e){return function(r,n){r.login(t,e,(function(t){if(t)return n(t);n(null,r.accessToken)}))}}(t,e)),this.oauth2&&this.oauth2.clientId&&this.oauth2.clientSecret?this.loginByOAuth2(t,e,r):this.loginBySoap(t,e,r)},v.prototype.loginByOAuth2=function(t,e,r){var n=this,i=this._logger;return this.oauth2.authenticate(t,e).then((function(t){var e=T(t.id);return n.initialize({instanceUrl:t.instance_url,accessToken:t.access_token,userInfo:e}),i.debug("<login> completed. user id = "+e.id+", org id = "+e.organizationId),e})).thenCall(r)},v.prototype.loginBySoap=function(t,e,r){var n=this,i=this._logger,o=['<se:Envelope xmlns:se="http://schemas.xmlsoap.org/soap/envelope/">',"<se:Header/>","<se:Body>",'<login xmlns="urn:partner.soap.sforce.com">',"<username>"+E(t)+"</username>","<password>"+E(e)+"</password>","</login>","</se:Body>","</se:Envelope>"].join(""),s=[this.loginUrl,"services/Soap/u",this.version].join("/");return this._transport.httpRequest({method:"POST",url:s,body:o,headers:{"Content-Type":"text/xml",SOAPAction:'""'}}).then((function(t){var e;if(t.statusCode>=400){var r=(e=t.body.match(/<faultstring>([^<]+)<\/faultstring>/))&&e[1];throw new Error(r||t.body)}i.debug("SOAP response = "+t.body);var o=(e=t.body.match(/<serverUrl>([^<]+)<\/serverUrl>/))&&e[1],a=(e=t.body.match(/<sessionId>([^<]+)<\/sessionId>/))&&e[1],u=(e=t.body.match(/<userId>([^<]+)<\/userId>/))&&e[1],c=(e=t.body.match(/<organizationId>([^<]+)<\/organizationId>/))&&e[1],l=s.split("/").slice(0,3).join("/"),h={id:u,organizationId:c,url:l+="/id/"+c+"/"+u};return n.initialize({serverUrl:o.split("/").slice(0,3).join("/"),sessionId:a,userInfo:h}),i.debug("<login> completed. user id = "+u+", org id = "+c),h})).thenCall(r)},v.prototype.logout=function(t){return"oauth2"===this._sessionType?this.logoutByOAuth2(t):this.logoutBySoap(t)},v.prototype.logoutByOAuth2=function(t){var e=this;this._logger;return this.oauth2.revokeToken(this.accessToken).then((function(){e.accessToken=null,e.userInfo=null,e.refreshToken=null,e.instanceUrl=null,e.cache.clear()})).thenCall(t)},v.prototype.logoutBySoap=function(t){var e=this,r=this._logger,n=['<se:Envelope xmlns:se="http://schemas.xmlsoap.org/soap/envelope/">',"<se:Header>",'<SessionHeader xmlns="urn:partner.soap.sforce.com">',"<sessionId>"+E(this.accessToken)+"</sessionId>","</SessionHeader>","</se:Header>","<se:Body>",'<logout xmlns="urn:partner.soap.sforce.com"/>',"</se:Body>","</se:Envelope>"].join("");return this._transport.httpRequest({method:"POST",url:[this.instanceUrl,"services/Soap/u",this.version].join("/"),body:n,headers:{"Content-Type":"text/xml",SOAPAction:'""'}}).then((function(t){if(r.debug("SOAP statusCode = "+t.statusCode+", response = "+t.body),t.statusCode>=400){var n=t.body.match(/<faultstring>([^<]+)<\/faultstring>/),i=n&&n[1];throw new Error(i||t.body)}e.accessToken=null,e.userInfo=null,e.refreshToken=null,e.instanceUrl=null,e.cache.clear()})).thenCall(t)},v.prototype.recent=function(t,e,r){var n;return o.isString(t)||(r=e,e=t,t=void 0),o.isNumber(e)||(r=e,e=void 0),t?(n=[this._baseUrl(),"sobjects",t].join("/"),this.request(n).then((function(t){return e?t.recentItems.slice(0,e):t.recentItems})).thenCall(r)):(n=this._baseUrl()+"/recent",e&&(n+="?limit="+e),this.request(n).thenCall(r))},v.prototype.updated=function(t,e,r,n){var i=[this._baseUrl(),"sobjects",t,"updated"].join("/");return"string"==typeof e&&(e=new Date(e)),e instanceof Date&&(e=w(e)),e&&(i+="?start="+encodeURIComponent(e)),"string"==typeof r&&(r=new Date(r)),r instanceof Date&&(r=w(r)),r&&(i+="&end="+encodeURIComponent(r)),this.request(i).thenCall(n)},v.prototype.deleted=function(t,e,r,n){var i=[this._baseUrl(),"sobjects",t,"deleted"].join("/");return"string"==typeof e&&(e=new Date(e)),e instanceof Date&&(e=w(e)),e&&(i+="?start="+encodeURIComponent(e)),"string"==typeof r&&(r=new Date(r)),r instanceof Date&&(r=w(r)),r&&(i+="&end="+encodeURIComponent(r)),this.request(i).thenCall(n)},v.prototype.tabs=function(t){var e=[this._baseUrl(),"tabs"].join("/");return this.request(e).thenCall(t)},v.prototype.limits=function(t){var e=[this._baseUrl(),"limits"].join("/");return this.request(e).thenCall(t)},v.prototype.theme=function(t){var e=[this._baseUrl(),"theme"].join("/");return this.request(e).thenCall(t)},v.prototype.quickActions=function(t){return this.request("/quickActions").thenCall(t)},v.prototype.quickAction=function(t){return new h(this,"/quickActions/"+t)}}).call(this,t("buffer").Buffer)},{"./cache":17,"./core":19,"./http-api":22,"./logger":23,"./oauth2":24,"./process":25,"./promise":26,"./query":27,"./quick-action":28,"./sobject":33,"./transport":35,buffer:40,events:77,inherits:119,"lodash/core":127}],19:[function(t,e,r){"use strict";var n=t("events").EventEmitter,i=e.exports=new n;i.VERSION=t("./VERSION"),i.Connection=t("./connection"),i.OAuth2=t("./oauth2"),i.Date=i.SfDate=t("./date"),i.RecordStream=t("./record-stream"),i.Promise=t("./promise"),i.require=t("./require")},{"./VERSION":2,"./connection":18,"./date":21,"./oauth2":24,"./promise":26,"./record-stream":29,"./require":31,events:77}],20:[function(t,e,r){"use strict";var n=t("lodash/core"),i=t("csv-parse"),o=t("csv-parse/lib/sync"),s=t("csv-stringify"),a=t("csv-stringify/lib/sync");e.exports={parseCSV:function(t,e){return e=n.extend({},e,{columns:!0}),o(t,e)},toCSV:function(t,e){return e=n.extend({},e,{header:!0}),a(t,e)},parseCSVStream:function(t){return t=n.extend({},t,{columns:!0}),i(t)},serializeCSVStream:function(t){return t=n.extend({},t,{header:!0}),s(t)}}},{"csv-parse":42,"csv-parse/lib/sync":43,"csv-stringify":44,"csv-stringify/lib/sync":45,"lodash/core":127}],21:[function(t,e,r){"use strict";var n=t("lodash/core"),i=e.exports=function(t){this._literal=t};function o(t){return(t<10?"0":"")+t}i.prototype.toString=i.prototype.toJSON=function(){return this._literal},i.toDateLiteral=function(t){n.isNumber(t)?t=new Date(t):n.isString(t)&&(t=i.parseDate(t));var e=t.getFullYear(),r=t.getMonth()+1,s=t.getDate(),a=[e,o(r),o(s)].join("-");return new i(a)},i.toDateTimeLiteral=function(t){n.isNumber(t)?t=new Date(t):n.isString(t)&&(t=i.parseDate(t));var e=t.getUTCFullYear(),r=t.getUTCMonth()+1,s=t.getUTCDate(),a=t.getUTCHours(),u=t.getUTCMinutes(),c=t.getUTCSeconds(),l=[e,o(r),o(s)].join("-")+"T"+[o(a),o(u),o(c)].join(":")+"Z";return new i(l)},i.parseDate=function(t){var e=new Date,r=t.match(/^([\d]{4})-?([\d]{2})-?([\d]{2})(T([\d]{2}):?([\d]{2}):?([\d]{2})(.([\d]{3}))?(Z|([\+\-])([\d]{2}):?([\d]{2})))?$/);if(r){if(e=new Date(0),r[4]){if(e.setUTCFullYear(parseInt(r[1],10)),e.setUTCDate(parseInt(r[3],10)),e.setUTCMonth(parseInt(r[2],10)-1),e.setUTCHours(parseInt(r[5],10)),e.setUTCMinutes(parseInt(r[6],10)),e.setUTCSeconds(parseInt(r[7],10)),e.setUTCMilliseconds(parseInt(r[9]||"0",10)),r[10]&&"Z"!==r[10]){var n=60*parseInt(r[12],10)+parseInt(r[13],10);e.setTime(("+"===r[11]?-1:1)*n*60*1e3+e.getTime())}}else e.setFullYear(parseInt(r[1],10)),e.setDate(parseInt(r[3],10)),e.setMonth(parseInt(r[2],10)-1),e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0);return e}throw new Error("Invalid date format is specified : "+t)};var s={YESTERDAY:1,TODAY:1,TOMORROW:1,LAST_WEEK:1,THIS_WEEK:1,NEXT_WEEK:1,LAST_MONTH:1,THIS_MONTH:1,NEXT_MONTH:1,LAST_90_DAYS:1,NEXT_90_DAYS:1,LAST_N_DAYS:2,NEXT_N_DAYS:2,NEXT_N_WEEKS:2,LAST_N_WEEKS:2,NEXT_N_MONTHS:2,LAST_N_MONTHS:2,THIS_QUARTER:1,LAST_QUARTER:1,NEXT_QUARTER:1,NEXT_N_QUARTERS:2,LAST_N_QUARTERS:2,THIS_YEAR:1,LAST_YEAR:1,NEXT_YEAR:1,NEXT_N_YEARS:2,LAST_N_YEARS:2,THIS_FISCAL_QUARTER:1,LAST_FISCAL_QUARTER:1,NEXT_FISCAL_QUARTER:1,NEXT_N_FISCAL_QUARTERS:2,LAST_N_FISCAL_QUARTERS:2,THIS_FISCAL_YEAR:1,LAST_FISCAL_YEAR:1,NEXT_FISCAL_YEAR:1,NEXT_N_FISCAL_YEARS:2,LAST_N_FISCAL_YEARS:2};for(var a in s){var u=s[a];i[a]=1===u?new i(a):c(a)}function c(t){return function(e){return new i(t+":"+e)}}},{"lodash/core":127}],22:[function(t,e,r){(function(r){"use strict";var n=t("inherits"),i=t("events"),o=t("lodash/core"),s=t("./promise"),a=function(t,e){e=e||{},this._conn=t,this.on("resume",(function(e){t.emit("resume",e)})),this._responseType=e.responseType,this._transport=e.transport||t._transport,this._noContentResponse=e.noContentResponse};function u(t){return JSON.parse(t)}function c(e){var r={};if(t("xml2js").parseString(e,{explicitArray:!1},(function(t,e){r={error:t,result:e}})),r.error)throw r.error;return r.result}function l(e){return t("./csv").parseCSV(e)}function h(t){return t}n(a,i.EventEmitter),a.prototype.request=function(t,e){var n=this,i=this._conn,o=i._logger,a=this.getRefreshDelegate(),u=i.instanceUrl,c=s.defer(),l=function(e){e?c.reject(e):(u!==i.instanceUrl&&(t.url=t.url.replace(u,i.instanceUrl)),n.request(t).then((function(t){c.resolve(t)}),(function(t){c.reject(t)})))};if(a&&a._refreshing)return a.once("resume",l),c.promise.thenCall(e);n.beforeSend(t),n.emit("request",t),o.debug("<request> method="+t.method+", url="+t.url);const h=r.hrtime(),p=()=>{const t=r.hrtime(h),e=1e3*t[0]+(t[1]/1e6|0);this.emit("requestDuration",e),o.debug(`elapsed time: ${e}ms`)};return this._transport.httpRequest(t).then((function(e){if(p(),o.debug("<response> status="+e.statusCode+", url="+t.url),n.emit("response",e),n.isSessionExpired(e)&&a)return a.refresh(h,l),c.promise;if(n.isErrorResponse(e))throw n.getError(e);return n.getResponseBody(e)}),(function(t){throw p(),o.error(t),t})).thenCall(e)},a.prototype.getRefreshDelegate=function(){return this._conn._refreshDelegate},a.prototype.beforeSend=function(t){if(t.headers=t.headers||{},this._conn.accessToken&&(t.headers.Authorization="Bearer "+this._conn.accessToken),this._conn.callOptions){var e=[];for(var r in this._conn.callOptions)e.push(r+"="+this._conn.callOptions[r]);t.headers["Sforce-Call-Options"]=e.join(", ")}},a.prototype.getResponseContentType=function(t){return this._responseType||t.headers&&t.headers["content-type"]},a.prototype.parseResponseBody=function(t){var e=this.getResponseContentType(t),r=/^(text|application)\/xml(;|$)/.test(e)?c:/^application\/json(;|$)/.test(e)?u:/^text\/csv(;|$)/.test(e)?l:h;try{return r(t.body)}catch(e){return t.body}},a.prototype.getResponseBody=function(t){if(204===t.statusCode)return this._noContentResponse;var e,r=this.parseResponseBody(t);if(this.hasErrorInResponseBody(r))throw e=this.getError(t,r);if(300===t.statusCode)throw(e=new Error("Multiple records found")).name="MULTIPLE_CHOICES",e.content=r,e;return r},a.prototype.isSessionExpired=function(t){return 401===t.statusCode},a.prototype.isErrorResponse=function(t){return t.statusCode>=400},a.prototype.hasErrorInResponseBody=function(t){return!1},a.prototype.parseError=function(t){var e=t;return o.isArray(e)?e[0]:e},a.prototype.getError=function(t,e){var r;try{r=this.parseError(e||this.parseResponseBody(t))}catch(t){}r=o.isObject(r)&&o.isString(r.message)?r:{errorCode:"ERROR_HTTP_"+t.statusCode,message:t.body};var n=new Error(r.message);for(var i in n.name=r.errorCode,r)n[i]=r[i];return n};var p=function(t,e){this._conn=t,this._refreshFn=e,this._refreshing=!1};n(p,i.EventEmitter),p.prototype.refresh=function(t,e){if(this._lastRefreshedAt>t)return e();var r=this,n=this._conn,i=n._logger;return r.once("resume",e),r._refreshing?void 0:(i.debug("<refresh token>"),r._refreshing=!0,r._refreshFn(n,(function(t,e,o){t||(i.debug("Connection refresh completed."),n.accessToken=e,n.emit("refresh",e,o)),r._lastRefreshedAt=Date.now(),r._refreshing=!1,r.emit("resume",t)})))},a.SessionRefreshDelegate=p,e.exports=a}).call(this,t("_process"))},{"./csv":20,"./promise":26,_process:138,events:77,inherits:119,"lodash/core":127,xml2js:176}],23:[function(t,e,r){"use strict";var n=e.exports=function(t){"string"==typeof t&&(t=i[t]),t||(t=i.INFO),this._logLevel=t},i=n.LogLevels={DEBUG:1,INFO:2,WARN:3,ERROR:4,FATAL:5};for(var o in n.prototype.log=function(t,e){this._logLevel<=t&&(t<i.ERROR?console.log(e):console.error(e))},i)n.prototype[o.toLowerCase()]=s(i[o]);function s(t){return function(e){this.log(t,e)}}},{}],24:[function(t,e,r){"use strict";var n=t("querystring"),i=t("lodash/core"),o=t("./transport"),s="https://login.salesforce.com",a=e.exports=function(t){t.authzServiceUrl&&t.tokenServiceUrl?(this.loginUrl=t.authzServiceUrl.split("/").slice(0,3).join("/"),this.authzServiceUrl=t.authzServiceUrl,this.tokenServiceUrl=t.tokenServiceUrl,this.revokeServiceUrl=t.revokeServiceUrl):(this.loginUrl=t.loginUrl||s,this.authzServiceUrl=this.loginUrl+"/services/oauth2/authorize",this.tokenServiceUrl=this.loginUrl+"/services/oauth2/token",this.revokeServiceUrl=this.loginUrl+"/services/oauth2/revoke"),this.clientId=t.clientId,this.clientSecret=t.clientSecret,this.redirectUri=t.redirectUri,t.proxyUrl?this._transport=new o.ProxyTransport(t.proxyUrl):t.httpProxy?this._transport=new o.HttpProxyTransport(t.httpProxy):this._transport=new o};i.extend(a.prototype,{getAuthorizationUrl:function(t){return t=i.extend({response_type:"code",client_id:this.clientId,redirect_uri:this.redirectUri},t||{}),this.authzServiceUrl+(this.authzServiceUrl.indexOf("?")>=0?"&":"?")+n.stringify(t)},refreshToken:function(t,e){return this._postParams({grant_type:"refresh_token",refresh_token:t,client_id:this.clientId,client_secret:this.clientSecret},e)},requestToken:function(t,e,r){return this._postParams({grant_type:"authorization_code",code:t,client_id:this.clientId,client_secret:this.clientSecret,redirect_uri:this.redirectUri},e,r)},authenticate:function(t,e,r){return this._postParams({grant_type:"password",username:t,password:e,client_id:this.clientId,client_secret:this.clientSecret,redirect_uri:this.redirectUri},r)},revokeToken:function(t,e){var r;o.JsonpTransport.supported?r=new o.JsonpTransport("callback").httpRequest({method:"GET",url:this.revokeServiceUrl+"?"+n.stringify({token:t})}):r=this._transport.httpRequest({method:"POST",url:this.revokeServiceUrl,body:n.stringify({token:t}),headers:{"Content-Type":"application/x-www-form-urlencoded"}});return r.then((function(t){if(t.statusCode>=400){var e=n.parse(t.body);e&&e.error||(e={error:"ERROR_HTTP_"+t.statusCode,error_description:t.body});var r=new Error(e.error_description);throw r.name=e.error,r}})).thenCall(e)},_postParams:function(t,e,r=(()=>{})){return this._transport.httpRequest({method:"POST",url:this.tokenServiceUrl,body:n.stringify(t),headers:{"content-type":"application/x-www-form-urlencoded"}}).then((function(t){var e;r(t);try{e=JSON.parse(t.body)}catch(t){}if(t.statusCode>=400){e=e||{error:"ERROR_HTTP_"+t.statusCode,error_description:t.body};var n=new Error(e.error_description);throw n.name=e.error,n}return e})).thenCall(e)}})},{"./transport":35,"lodash/core":127,querystring:143}],25:[function(t,e,r){"use strict";var n=t("lodash/core"),i=(t("./promise"),t("./connection"),e.exports=function(t){this.rule=new i(t),this.approval=new o(t)},function(t){this._conn=t});i.prototype.list=function(t){return this._conn.request("/process/rules").then((function(t){return t.rules})).thenCall(t)},i.prototype.trigger=function(t,e){return t=n.isArray(t)?t:[t],this._conn.request({method:"POST",url:"/process/rules/",body:JSON.stringify({contextIds:t}),headers:{"content-type":"application/json"}}).thenCall(e)};var o=function(t){this._conn=t};o.prototype.list=function(t){return this._conn.request("/process/approvals").then((function(t){return t.approvals})).thenCall(t)},o.prototype.request=function(t,e){return t=t.map((function(t){return t._request?t._request:t})),this._conn.request({method:"POST",url:"/process/approvals",headers:{"content-type":"application/json"},body:JSON.stringify({requests:t})}).thenCall(e)},o.prototype._createRequest=function(t,e,r,i,o){"function"==typeof r&&(o=r,i=null,r=null),"function"==typeof i&&(o=i,i=null),i=i||{};var a={actionType:t,contextId:e,comments:r};return n.extend(a,i),new s(this,a).thenCall(o)},o.prototype.submit=function(t,e,r,n){return this._createRequest("Submit",t,e,r,n)},o.prototype.approve=function(t,e,r,n){return this._createRequest("Approve",t,e,r,n)},o.prototype.reject=function(t,e,r,n){return this._createRequest("Reject",t,e,r,n)};var s=function(t,e){this._process=t,this._request=e};s.prototype.then=function(t,e){this._promise||(this._promise=this._process.request([this]).then((function(t){return t[0]}))),this._promise.then(t,e)},s.prototype.thenCall=function(t){return t?this.then((function(e){t(null,e)}),(function(e){t(e)})):this}},{"./connection":18,"./promise":26,"lodash/core":127}],26:[function(t,e,r){(function(r){"use strict";var n=t("lodash/core"),i=t("promise/lib/es6-extensions");i.prototype.thenCall=function(t){return n.isFunction(t)&&this.then((function(e){r.nextTick((function(){t(null,e)}))}),(function(e){r.nextTick((function(){t(e)}))})),this},i.prototype.fail=i.prototype.catch,i.defer=function(){return new o};var o=function(){var t=this;this.promise=new i((function(e,r){t.resolve=e,t.reject=r}))};e.exports=i}).call(this,t("_process"))},{_process:138,"lodash/core":127,"promise/lib/es6-extensions":140}],27:[function(t,e,r){(function(r){"use strict";var n=t("inherits"),i=(t("events"),t("readable-stream")),o=t("lodash/core"),s=t("./promise"),a=(t("./date"),t("./soql-builder")),u=t("./record-stream"),c=e.exports=function(t,e,r){c.super_.call(this,{objectMode:!0}),this._conn=t,o.isString(e)?this._soql=e:e.locator&&e.locator.indexOf("/")>=0?this._locator=e.locator.split("/").pop():(this._config=e,this.select(e.fields),e.includes&&this.include(e.includes)),this._options=o.defaults(r||{},{maxFetch:1e4,autoFetch:!1,scanAll:!1,responseTarget:l.QueryResult}),this._executed=!1,this._finished=!1,this._chaining=!1,this._deferred=s.defer()};n(c,i.Readable),c.prototype.select=function(t){if(this._soql)throw Error("Cannot set select fields for the query which has already built SOQL.");if(t=t||"*",o.isString(t))t=t.split(/\s*,\s*/);else if(o.isObject(t)&&!o.isArray(t)){var e=[];for(var r in t)t[r]&&e.push(r);t=e}return this._config.fields=t,this},c.prototype.where=function(t){if(this._soql)throw Error("Cannot set where conditions for the query which has already built SOQL.");return this._config.conditions=t,this},c.prototype.limit=function(t){if(this._soql)throw Error("Cannot set limit for the query which has already built SOQL.");return this._config.limit=t,this},c.prototype.skip=c.prototype.offset=function(t){if(this._soql)throw Error("Cannot set skip/offset for the query which has already built SOQL.");return this._config.offset=t,this},c.prototype.sort=c.prototype.orderby=function(t,e){if(this._soql)throw Error("Cannot set sort for the query which has already built SOQL.");return o.isString(t)&&o.isString(e)&&(t=[[t,e]]),this._config.sort=t,this},c.prototype.include=function(t,e,r,n){if(this._soql)throw Error("Cannot include child relationship into the query which has already built SOQL.");if(!o.isObject(t)){var i={table:t,conditions:e,fields:r,limit:n&&n.limit,offset:n&&(n.offset||n.skip),sort:n&&n.sort};o.isArray(this._config.includes)||(this._config.includes=[]),this._config.includes.push(i);var s=new h(this._conn,this,i);return this._children=this._children||[],this._children.push(s),s}var a=t;for(var u in a){var c=a[u];this.include(u,c.conditions,c.fields,c)}},c.prototype.maxFetch=function(t){return this._options.maxFetch=t,this},c.prototype.autoFetch=function(t){return this._options.autoFetch=t,this},c.prototype.scanAll=function(t){return this._options.scanAll=t,this};var l=c.ResponseTargets={};["QueryResult","Records","SingleRecord","Count"].forEach((function(t){l[t]=t})),c.prototype.setResponseTarget=function(t){return t in l&&(this._options.responseTarget=t),this},c.prototype.run=c.prototype.exec=c.prototype.execute=function(t,e){var r=this,n=this._conn._logger,i=this._deferred;if(this._executed)return i.reject(new Error("re-executing already executed query")),this;if(this._finished)return i.reject(new Error("executing already closed query")),this;"function"==typeof t&&(e=t,t={}),t={headers:(t=t||{}).headers||r._options.headers,responseTarget:t.responseTarget||r._options.responseTarget,autoFetch:t.autoFetch||r._options.autoFetch,maxFetch:t.maxFetch||r._options.maxFetch,scanAll:t.scanAll||r._options.scanAll};var s=function(t,r){if(o.isFunction(e))try{r=e(t,r),t=null}catch(e){t=e}t?i.reject(t):i.resolve(r)};return this.once("response",(function(t){s(null,t)})),this.once("error",(function(t){s(t)})),this.once("fetch",(function(){if(t.responseTarget===l.Records&&(r._chaining||e)){n.debug("--- collecting all fetched records ---");var i=[],o=function(t){i.push(t)};r.on("record",o),r.once("end",(function(){r.removeListener("record",o),r.emit("response",i,r)}))}})),this._executed=!0,n.debug(">>> Query start >>>"),this._execute(t).then((function(){n.debug("*** Query finished ***")})).fail((function(t){n.debug("--- Query error ---"),r.emit("error",t)})),this},c.prototype._execute=function(t){var e=this,r=this._conn._logger,n=t.responseTarget,i=t.autoFetch,o=t.maxFetch,a=t.scanAll;return s.resolve(e._locator?e._conn._baseUrl()+"/query/"+e._locator:e.toSOQL().then((function(t){return e.totalFetched=0,r.debug("SOQL = "+t),e._conn._baseUrl()+"/"+(a?"queryAll":"query")+"?q="+encodeURIComponent(t)}))).then((function(r){return e._conn.request({method:"GET",url:r,headers:t.headers})})).then((function(r){var s;switch(e.emit("fetch"),e.totalSize=r.totalSize,n){case l.SingleRecord:s=r.records&&r.records.length>0?r.records[0]:null;break;case l.Records:s=r.records;break;case l.Count:s=r.totalSize;break;default:s=r}n!==l.Records&&e.emit("response",s,e);for(var a=r.records&&r.records.length||0,u=0;u<a;u++){if(e.totalFetched>=o){e._finished=!0;break}var c=r.records[u];e.push(c),e.emit("record",c,e.totalFetched++,e)}return r.nextRecordsUrl&&(e._locator=r.nextRecordsUrl.split("/").pop()),e._finished=e._finished||r.done||!i,e._finished?e.push(null):e._execute(t),s}))},c.prototype._read=function(t){this._finished||this._executed||this.execute({autoFetch:!0})},c.prototype.on=function(t,e){if("record"===t){var r=this;this.on("readable",(function(){for(;null!==r.read(););}))}return c.super_.prototype.on.call(this,t,e)},c.prototype.addListener=c.prototype.on,c.prototype._expandFields=function(){if(this._soql)return s.reject(new Error("Cannot expand fields for the query which has already built SOQL."));var t,e,r=this,n=r._conn._logger,i=this._conn,a=this._config.table,u=this._config.fields||[];return n.debug("_expandFields: table = "+a+", fields = "+u.join(", ")),s.all([s.resolve(r._parent?(t=a,e=r._parent._config.table,n.debug('finding table for relation "'+t+'" in "'+e+'"...'),c(e).then((function(e){var r=t.toUpperCase(),n=o.find(e.childRelationships,(function(t){return(t.relationshipName||"").toUpperCase()===r}));return n?n.childSObject:s.reject(new Error("No child relationship found: "+t))}))):a).then((function(t){return s.all(o.map(u,(function(e){return function t(e,r){n.debug('expanding field "'+r+'" in "'+e+'"...');var i=r.split(".");return"*"===i[i.length-1]?c(e).then((function(r){if(n.debug("table "+e+"has been described"),i.length>1){var s=i.shift(),a=o.find(r.fields,(function(t){return t.relationshipName&&t.relationshipName.toUpperCase()===s.toUpperCase()}));if(a){var u=1===a.referenceTo.length?a.referenceTo[0]:"Name";return t(u,i.join(".")).then((function(t){return o.map(t,(function(t){return s+"."+t}))}))}return[]}return o.map(r.fields,(function(t){return t.name}))})):s.resolve([r])}(t,e)}))).then((function(t){r._config.fields=o.flatten(t)}))})),s.all(o.map(r._children||[],(function(t){return t._expandFields()})))]);function c(t){n.debug("describe cache: "+t);var e=s.defer();return i.describe$(t,(function(t,r){n.debug("... done."),t?e.reject(t):e.resolve(r)})),e.promise}},c.prototype.explain=function(t){var e=this,r=this._conn._logger;return e.toSOQL().then((function(t){r.debug("SOQL = "+t);var n="/query/?explain="+encodeURIComponent(t);return e._conn.request(n)})).thenCall(t)},c.prototype.toSOQL=function(t){var e=this;return s.resolve(e._soql||e._expandFields().then((function(){return a.createSOQL(e._config)}))).thenCall(t)},c.prototype.stream=u.Serializable.prototype.stream,c.prototype.map=u.prototype.map,c.prototype.filter=u.prototype.map,c.prototype.delete=c.prototype.del=c.prototype.destroy=function(t,e){if("function"==typeof t&&(e=t,t=null),!(t=t||this._config&&this._config.table))throw new Error("SOQL based query needs SObject type information to bulk delete.");var r=this._conn.sobject(t).deleteBulk(),n=s.defer(),i=function(t){"ClientInputError"===t.name?n.resolve([]):n.reject(t)};return this.on("error",i).pipe(r).on("response",(function(t){n.resolve(t)})).on("error",i),n.promise.thenCall(e)},c.prototype.update=function(t,e,r){if("function"==typeof e&&(r=e,e=null),!(e=e||this._config&&this._config.table))throw new Error("SOQL based query needs SObject type information to bulk update.");var n=o.isFunction(t)?u.map(t):u.recordMapStream(t),i=this._conn.sobject(e).updateBulk(),a=s.defer(),c=function(t){"ClientInputError"===t.name?a.resolve([]):a.reject(t)};return this.on("error",c).pipe(n).on("error",c).pipe(i).on("response",(function(t){a.resolve(t)})).on("error",c),a.promise.thenCall(r)},c.prototype.then=function(t,e){return this._chaining=!0,this._finished||this._executed||this.execute(),this._deferred.promise.then.apply(this._deferred.promise,arguments)},c.prototype.thenCall=function(t){return o.isFunction(t)&&this.then((function(e){r.nextTick((function(){t(null,e)}))}),(function(e){r.nextTick((function(){t(e)}))})),this};var h=function(t,e,r){h.super_.call(this,t,r),this._parent=e};n(h,c),h.prototype.include=function(){throw new Error("Not allowed to include another subquery in subquery.")},h.prototype.end=function(){return this._parent},h.prototype.run=h.prototype.exec=h.prototype.execute=function(){return this._parent.execute.apply(this._parent,arguments)}}).call(this,t("_process"))},{"./date":21,"./promise":26,"./record-stream":29,"./soql-builder":34,_process:138,events:77,inherits:119,"lodash/core":127,"readable-stream":155}],28:[function(t,e,r){"use strict";var n=e.exports=function(t,e){this._conn=t,this._path=e};n.prototype.describe=function(t){var e=this._path+"/describe";return this._conn.request(e).thenCall(t)},n.prototype.defaultValues=function(t,e){"function"==typeof t&&(e=t,t=null);var r=this._path+"/defaultValues";return t&&(r+="/"+t),this._conn.request(r).thenCall(e)},n.prototype.execute=function(t,e,r){var n={contextId:t,record:e};return this._conn.requestPost(this._path,n).thenCall(r)}},{}],29:[function(t,e,r){"use strict";t("events");var n=t("readable-stream"),i=(n.Duplex,n.Transform),o=n.PassThrough,s=t("inherits"),a=t("lodash/core"),u=t("./csv"),c=e.exports=function(){c.super_.call(this,{objectMode:!0})};s(c,i),c.prototype._transform=function(t,e,r){this.emit("record",t),this.push(t),r()},c.prototype.map=function(t){return this.pipe(c.map(t))},c.prototype.filter=function(t){return this.pipe(c.filter(t))};var l=c.Serializable=function(){l.super_.call(this),this._dataStream=null};s(l,c),l.prototype.stream=function(t,e){var r=f[t=t||"csv"];if(!r)throw new Error("Converting ["+t+"] data stream is not supported.");return this._dataStream||(this._dataStream=new o,this.pipe(r.serialize(e)).pipe(this._dataStream)),this._dataStream};var h=c.Parsable=function(){h.super_.call(this),this._dataStream=null};s(h,c),h.prototype.stream=function(t,e){var r=f[t=t||"csv"];if(!r)throw new Error("Converting ["+t+"] data stream is not supported.");return this._dataStream||(this._dataStream=new o,this._parserStream=r.parse(e),this._parserStream.pipe(this).pipe(new o({objectMode:!0,highWaterMark:5e5}))),this._dataStream},h.prototype.on=function(t,e){return"readable"!==t&&"record"!==t||this._dataStream.pipe(this._parserStream),h.super_.prototype.on.call(this,t,e)},h.prototype.addListener=h.prototype.on,c.map=function(t){var e=new c.Serializable;return e._transform=function(e,r,n){var i=t(e)||e;this.push(i),n()},e},c.recordMapStream=function(t,e){return c.map((function(n){var i={Id:n.Id};for(var o in t)i[o]=e?t[o]:r(t[o],n);return i}));function r(t,e){if(a.isString(t)){var r=/^\$\{(\w+)\}$/.exec(t);return r?e[r[1]]:t.replace(/\$\{(\w+)\}/g,(function(t,r){var n=e[r];return a.isNull(n)||a.isUndefined(n)?"":String(n)}))}return t}},c.filter=function(t){var e=new c.Serializable;return e._transform=function(e,r,n){t(e)&&this.push(e),n()},e};var p={serialize:function(t){return t=t||{},e=c.map((function(e){return function t(e,r){return Object.keys(e).reduce((function(e,n){var i=e[n],o={};if("attributes"===n)delete(e=a.extend({},e))[n];else if(r.nullValue&&null===i)o[n]=r.nullValue,e=a.extend({},e,o);else if(null!==i&&"object"==typeof i){var s=t(i,r);e=Object.keys(s).reduce((function(t,e){return t[n+"."+e]=s[e],t}),a.extend({},e))}return e}),e)}(e,t)})),r=u.serializeCSVStream(t),(n=new o).on("pipe",(function(t){t.unpipe(n),t.pipe(e).pipe(r)})),n.pipe=function(t,e){return r.pipe(t,e)},n;var e,r,n},parse:function(t){return u.parseCSVStream(t)}},f=c.DataStreamConverters={csv:p}},{"./csv":20,events:77,inherits:119,"lodash/core":127,"readable-stream":155}],30:[function(t,e,r){"use strict";var n=t("lodash/core"),i=e.exports=function(t,e,r){this._conn=t,this.type=e,this.id=r};i.prototype.retrieve=function(t,e){return"function"==typeof t&&(e=t,t={}),this._conn.retrieve(this.type,this.id,t,e)},i.prototype.update=function(t,e,r){return"function"==typeof e&&(r=e,e={}),(t=n.clone(t)).Id=this.id,this._conn.update(this.type,t,e,r)},i.prototype.delete=i.prototype.del=i.prototype.destroy=function(t,e){return"function"==typeof t&&(e=t,t={}),this._conn.destroy(this.type,this.id,t,e)},i.prototype.blob=function(t){var e=[this._conn._baseUrl(),"sobjects",this.type,this.id,t].join("/");return this._conn.request(e).stream()}},{"lodash/core":127}],31:[function(t,e,r){"use strict";var n=t("./_required");e.exports=function(t){"./jsforce"!==t&&"jsforce"!==t||(t="./core");var e=n[t];if(void 0===e)throw new Error("Cannot find module '"+t+"'");return e}},{"./_required":3}],32:[function(t,e,r){"use strict";var n=t("inherits"),i=t("lodash/core"),o=(t("xml2js"),t("./http-api")),s=e.exports=function(t,e){s.super_.apply(this,arguments),this._endpointUrl=e.endpointUrl,this._xmlns=e.xmlns||"urn:partner.soap.sforce.com"};function a(t,e){var r=e.shift();if(r){for(var n in t)if(r.test(n))return a(t[n],e);return null}return t}function u(t,e){if(i.isObject(t)&&(e=t,t=null),i.isArray(e))return i.map(e,(function(e){return u(t,e)})).join("");var r=[],n=[];if(i.isObject(e)){for(var o in e){var s=e[o];"@"===o[0]?(o=o.substring(1),r.push(o+'="'+s+'"')):n.push(u(o,s))}e=n.join("")}else e=String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;");return(t?"<"+t+(r.length>0?" "+r.join(" "):"")+">":"")+e+(t?"</"+t+">":"")}n(s,o),s.prototype.invoke=function(t,e,r,n){"function"==typeof r&&(n=r,r=null);var o={};return o[t]=e,this.request({method:"POST",url:this._endpointUrl,headers:{"Content-Type":"text/xml",SOAPAction:'""'},message:o}).then((function(t){return r?function t(e,r){if(i.isArray(e))return e.map((function(e){return t(e,r&&r[0])}));if(i.isObject(e)){if(e.$&&"true"===e.$["xsi:nil"])return null;if(i.isArray(r))return[t(e,r[0])];var n={};for(var o in e)n[o]=t(e[o],r&&r[o]);return n}if(i.isArray(r))return[t(e,r[0])];if(i.isObject(r))return{};switch(r){case"string":return String(e);case"number":return Number(e);case"boolean":return"true"===e;default:return e}}(t,r):t})).thenCall(n)},s.prototype.beforeSend=function(t){t.body=this._createEnvelope(t.message)},s.prototype.isSessionExpired=function(t){return 500===t.statusCode&&/<faultcode>[a-zA-Z]+:INVALID_SESSION_ID<\/faultcode>/.test(t.body)},s.prototype.parseError=function(t){var e=a(t,[/:Envelope$/,/:Body$/,/:Fault$/]);return{errorCode:e.faultcode,message:e.faultstring}},s.prototype.getResponseBody=function(t){return a(s.super_.prototype.getResponseBody.call(this,t),[/:Envelope$/,/:Body$/,/.+/])},s.prototype._createEnvelope=function(t){var e={},r=this._conn;return r.accessToken&&(e.SessionHeader={sessionId:this._conn.accessToken}),r.callOptions&&(e.CallOptions=r.callOptions),['<?xml version="1.0" encoding="UTF-8"?>','<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"',' xmlns:xsd="http://www.w3.org/2001/XMLSchema"',' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">','<soapenv:Header xmlns="'+this._xmlns+'">',u(e),"</soapenv:Header>",'<soapenv:Body xmlns="'+this._xmlns+'">',u(t),"</soapenv:Body>","</soapenv:Envelope>"].join("")}},{"./http-api":22,inherits:119,"lodash/core":127,xml2js:176}],33:[function(t,e,r){"use strict";var n=t("lodash/core"),i=t("./record"),o=t("./query"),s=(t("./cache"),t("./quick-action")),a=e.exports=function(t,e){this._conn=t,this.type=e;var r={key:"describe."+this.type};this.describe$=t.cache.makeCacheable(this.describe,this,r),this.describe=t.cache.makeResponseCacheable(this.describe,this,r),r={key:"layouts."+this.type},this.layouts$=t.cache.makeCacheable(this.layouts,this,r),this.layouts=t.cache.makeResponseCacheable(this.layouts,this,r),r={key:"compactLayouts."+this.type},this.compactLayouts$=t.cache.makeCacheable(this.compactLayouts,this,r),this.compactLayouts=t.cache.makeResponseCacheable(this.compactLayouts,this,r),r={key:"approvalLayouts."+this.type},this.approvalLayouts$=t.cache.makeCacheable(this.approvalLayouts,this,r),this.approvalLayouts=t.cache.makeResponseCacheable(this.approvalLayouts,this,r)};a.prototype.insert=a.prototype.create=function(t,e,r){return"function"==typeof e&&(r=e,e={}),this._conn.create(this.type,t,e,r)},a.prototype.retrieve=function(t,e,r){return"function"==typeof e&&(r=e,e={}),this._conn.retrieve(this.type,t,e,r)},a.prototype.update=function(t,e,r){return"function"==typeof e&&(r=e,e={}),this._conn.update(this.type,t,e,r)},a.prototype.upsert=function(t,e,r,n){return"function"==typeof r&&(n=r,r={}),this._conn.upsert(this.type,t,e,r,n)},a.prototype.delete=a.prototype.del=a.prototype.destroy=function(t,e,r){return"function"==typeof e&&(r=e,e={}),this._conn.destroy(this.type,t,e,r)},a.prototype.describe=function(t){return this._conn.describe(this.type,t)},a.prototype.record=function(t){return new i(this._conn,this.type,t)},a.prototype.find=function(t,e,r,n){"function"==typeof t?(n=t,t={},e=null,r=null):"function"==typeof e?(n=e,e=null,r=null):"function"==typeof r&&(n=r,r=null);var i={fields:e,includes:(r=r||{}).includes,table:this.type,conditions:t,limit:r.limit,offset:r.offset||r.skip},s=new o(this._conn,i,r);return s.setResponseTarget(o.ResponseTargets.Records),n&&s.run(n),s},a.prototype.findOne=function(t,e,r,i){"function"==typeof t?(i=t,t={},e=null,r=null):"function"==typeof e?(i=e,e=null,r=null):"function"==typeof r&&(i=r,r=null),r=n.extend(r||{},{limit:1});var s=this.find(t,e,r);return s.setResponseTarget(o.ResponseTargets.SingleRecord),i&&s.run(i),s},a.prototype.select=function(t,e){return this.find(null,t,null,e)},a.prototype.count=function(t,e){"function"==typeof t&&(e=t,t={});var r=this.find(t,{"count()":!0});return r.setResponseTarget("Count"),e&&r.run(e),r},a.prototype.bulkload=function(t,e,r,n){return this._conn.bulk.load(this.type,t,e,r,n)},a.prototype.insertBulk=a.prototype.createBulk=function(t,e){return this.bulkload("insert",t,e)},a.prototype.updateBulk=function(t,e){return this.bulkload("update",t,e)},a.prototype.upsertBulk=function(t,e,r){return this.bulkload("upsert",{extIdField:e},t,r)},a.prototype.deleteBulk=a.prototype.destroyBulk=function(t,e){return this.bulkload("delete",t,e)},a.prototype.deleteHardBulk=a.prototype.destroyHardBulk=function(t,e){return this.bulkload("hardDelete",t,e)},a.prototype.recent=function(t){return this._conn.recent(this.type,t)},a.prototype.updated=function(t,e,r){return this._conn.updated(this.type,t,e,r)},a.prototype.deleted=function(t,e,r){return this._conn.deleted(this.type,t,e,r)},a.prototype.layouts=function(t,e){"function"==typeof t&&(e=t,t=null);var r="/sobjects/"+this.type+"/describe/"+(t?"namedLayouts/"+t:"layouts");return this._conn.request(r,e)},a.prototype.compactLayouts=function(t){var e="/sobjects/"+this.type+"/describe/compactLayouts";return this._conn.request(e,t)},a.prototype.approvalLayouts=function(t){var e="/sobjects/"+this.type+"/describe/approvalLayouts";return this._conn.request(e,t)},a.prototype.listviews=function(t){var e=this._conn._baseUrl()+"/sobjects/"+this.type+"/listviews";return this._conn.request(e,t)},a.prototype.listview=function(t){return new u(this._conn,this.type,t)},a.prototype.quickActions=function(t){return this._conn.request("/sobjects/"+this.type+"/quickActions").thenCall(t)},a.prototype.quickAction=function(t){return new s(this._conn,"/sobjects/"+this.type+"/quickActions/"+t)};var u=function(t,e,r){this._conn=t,this.type=e,this.id=r};u.prototype.results=function(t){var e=this._conn._baseUrl()+"/sobjects/"+this.type+"/listviews/"+this.id+"/results";return this._conn.request(e,t)},u.prototype.describe=function(t,e){"function"==typeof t&&(e=t,t={}),t=t||{};var r=this._conn._baseUrl()+"/sobjects/"+this.type+"/listviews/"+this.id+"/describe";return this._conn.request({method:"GET",url:r,headers:t.headers},e)},u.prototype.explain=function(t){var e="/query/?explain="+this.id;return this._conn.request(e,t)}},{"./cache":17,"./query":27,"./quick-action":28,"./record":30,"lodash/core":127}],34:[function(t,e,r){"use strict";var n=t("lodash/core"),i=t("./date");function o(t){var e=["SELECT ",s(t.fields,t.includes)," FROM ",t.table].join(""),r=function t(e,r,i){if(n.isString(e))return e;r=r||"AND",i=i||0,e=c(e=e||[])?e.map((function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e.length>1?e:e[0]})):n.keys(e).map((function(t){return{key:t,value:e[t]}}));var o;return e=e.map((function(o){var s,c=i+1;switch(o.key){case"$or":case"$and":case"$not":return"NOT"!==r&&1===e.length&&(c=i),s="$or"===o.key?"OR":"$and"===o.key?"AND":"NOT",t(o.value,s,c);default:return function(t,e){var r="$eq";if(n.isArray(e))r="$in";else if(n.isObject(e)){for(var i in e)if("$"===i[0]){r=i,e=e[i];break}}var o=a[r];if(!o||n.isUndefined(e))return null;var s=u(e);if(n.isUndefined(s))return null;switch(o){case"NOT LIKE":return"("+["NOT",t,"LIKE",s].join(" ")+")";case"EXISTS":return[t,e?"!=":"=","null"].join(" ");default:return[t,o,s].join(" ")}}(o.key,o.value)}})).filter((function(t){return t})),"NOT"===r?((o=i>0)?"(":"")+"NOT "+e[0]+(o?")":""):((o=i>0&&e.length>1)?"(":"")+e.join(" "+r+" ")+(o?")":"")}(t.conditions);r&&(e+=" WHERE "+r);var i=function(t){if(t=t||[],n.isString(t)){if(/,|\s+(asc|desc)\s*$/.test(t))return t;t=t.split(/\s+/).map((function(t){var e="ASC",r=t[0];return"-"===r?(e="DESC",t=t.substring(1)):"+"===r&&(t=t.substring(1)),[t,e]}))}else c(t)||(t=n.keys(t).map((function(e){return[e,t[e]]})));return t.map((function(t){var e=t[0],r=t[1];switch(String(r)){case"DESC":case"desc":case"descending":case"-":case"-1":r="DESC";break;default:r="ASC"}return e+" "+r})).join(", ")}(t.sort);return i&&(e+=" ORDER BY "+i),t.limit&&(e+=" LIMIT "+t.limit),t.offset&&(e+=" OFFSET "+t.offset),e}function s(t,e){return e=n.map(n.values(e||{}),(function(t){return"("+o(t)+")"})),(t||["Id"]).concat(e).join(", ")}var a={"=":"=",$eq:"=","!=":"!=",$ne:"!=",">":">",$gt:">","<":"<",$lt:"<",">=":">=",$gte:">=","<=":"<=",$lte:"<=",$like:"LIKE",$nlike:"NOT LIKE",$in:"IN",$nin:"NOT IN",$includes:"INCLUDES",$excludes:"EXCLUDES",$exists:"EXISTS"};function u(t){return c(t)?t.length>0?"("+t.map(u).join(", ")+")":void 0:t instanceof i?t.toString():n.isString(t)?"'"+String(t||"").replace(/'/g,"\\'")+"'":n.isNumber(t)?t.toString():n.isNull(t)?"null":t}function c(t){return n.isObject(t)&&n.isFunction(t.pop)}r.createSOQL=o},{"./date":21,"lodash/core":127}],35:[function(t,e,r){(function(r){"use strict";var n,i=t("inherits"),o=t("./promise"),s=t("request"),a=t("./browser/canvas"),u=t("./browser/jsonp");if(s.defaults){var c={followAllRedirects:!0};r.env.HTTP_PROXY&&(c.proxy=r.env.HTTP_PROXY),parseInt(r.env.HTTP_TIMEOUT)&&(c.timeout=parseInt(r.env.HTTP_TIMEOUT)),s=s.defaults(c)}if("undefined"==typeof window)n=r.env.LOCATION_BASE_URL||"";else{var l=function(t){var e=/(\w+)\.(visual\.force|salesforce)\.com$/.exec(t);e&&(t=e[1]+".salesforce.com");return t}(window.location.host);n=l?"https://"+l:""}var h=e.exports=function(){};h.prototype.httpRequest=function(t,e){var r,n=o.defer(),i=this._getHttpRequestModule();return function t(e,r){var n=e.then;return e.then=function(){r();var i=n.apply(e,arguments);return t(i,r)},e.stream=r,e}(n.promise,(function(){return r||(r=i(t,(function(t,e){t?n.reject(t):n.resolve(e)}))),r})).thenCall(e)},h.prototype._getHttpRequestModule=function(){return s};var p=h.JsonpTransport=function(t){this._jsonpParam=t};i(p,h),p.prototype._getHttpRequestModule=function(){return u.createRequest(this._jsonpParam)},p.supported=u.supported;var f=h.CanvasTransport=function(t){this._signedRequest=t};i(f,h),f.prototype._getHttpRequestModule=function(){return a.createRequest(this._signedRequest)},f.supported=a.supported;var d=h.ProxyTransport=function(t){this._proxyUrl=t};i(d,h),d.prototype.httpRequest=function(t,e){var r=t.url;0===r.indexOf("/")&&(r=n+r);var i={method:t.method,url:this._proxyUrl+"?"+Date.now()+"."+(""+Math.random()).substring(2),headers:{"salesforceproxy-endpoint":r}};if((t.body||""===t.body)&&(i.body=t.body),t.headers)for(var o in t.headers)i.headers[o]=t.headers[o];return d.super_.prototype.httpRequest.call(this,i,e)};var y=h.HttpProxyTransport=function(t){this._httpProxy=t};i(y,h),y.prototype.httpRequest=function(t,e){var r=t.url;0===r.indexOf("/")&&(r=n+r);var i={method:t.method,url:t.url,proxy:this._httpProxy,headers:{}};if((t.body||""===t.body)&&(i.body=t.body),t.headers)for(var o in t.headers)i.headers[o]=t.headers[o];return y.super_.prototype.httpRequest.call(this,i,e)}}).call(this,t("_process"))},{"./browser/canvas":13,"./browser/jsonp":15,"./promise":26,_process:138,inherits:119,request:16}],36:[function(t,e,r){"use strict";var n=t("./raw"),i=[],o=[],s=n.makeRequestCallFromTimer((function(){if(o.length)throw o.shift()}));function a(t){var e;(e=i.length?i.pop():new u).task=t,n(e)}function u(){this.task=null}e.exports=a,u.prototype.call=function(){try{this.task.call()}catch(t){a.onerror?a.onerror(t):(o.push(t),s())}finally{this.task=null,i[i.length]=this}}},{"./raw":37}],37:[function(t,e,r){(function(t){"use strict";function r(t){i.length||(n(),!0),i[i.length]=t}e.exports=r;var n,i=[],o=0;function s(){for(;o<i.length;){var t=o;if(o+=1,i[t].call(),o>1024){for(var e=0,r=i.length-o;e<r;e++)i[e]=i[e+o];i.length-=o,o=0}}i.length=0,o=0,!1}var a,u,c,l=void 0!==t?t:self,h=l.MutationObserver||l.WebKitMutationObserver;function p(t){return function(){var e=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(e),clearInterval(r),t()}}}"function"==typeof h?(a=1,u=new h(s),c=document.createTextNode(""),u.observe(c,{characterData:!0}),n=function(){a=-a,c.data=a}):n=p(s),r.requestFlush=n,r.makeRequestCallFromTimer=p}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],38:[function(t,e,r){"use strict";r.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){var e,r,n=c(t),s=n[0],a=n[1],u=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),l=0,h=a>0?s-4:s;for(r=0;r<h;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===a&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[l++]=255&e);1===a&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;s<a;s+=16383)o.push(l(t,s,s+16383>a?a:s+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,r){for(var i,o,s=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],39:[function(t,e,r){},{}],40:[function(t,e,r){(function(e){
  /*!
   * The buffer module from node.js, for the browser.
   *
   * @author   Feross Aboukhadijeh <https://feross.org>
   * @license  MIT
   */
  "use strict";var n=t("base64-js"),i=t("ieee754"),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=e,r.SlowBuffer=function(t){+t!=t&&(t=0);return e.alloc(+t)},r.INSPECT_MAX_BYTES=50;function s(t){if(t>2147483647)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return Object.setPrototypeOf(r,e.prototype),r}function e(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return c(t)}return a(t,e,r)}function a(t,r,n){if("string"==typeof t)return function(t,r){"string"==typeof r&&""!==r||(r="utf8");if(!e.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|p(t,r),i=s(n),o=i.write(t,r);o!==n&&(i=i.slice(0,o));return i}(t,r);if(ArrayBuffer.isView(t))return l(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(U(t,ArrayBuffer)||t&&U(t.buffer,ArrayBuffer))return function(t,r,n){if(r<0||t.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<r+(n||0))throw new RangeError('"length" is outside of buffer bounds');var i;i=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);return Object.setPrototypeOf(i,e.prototype),i}(t,r,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return e.from(i,r,n);var o=function(t){if(e.isBuffer(t)){var r=0|h(t.length),n=s(r);return 0===n.length?n:(t.copy(n,0,0,r),n)}if(void 0!==t.length)return"number"!=typeof t.length||q(t.length)?s(0):l(t);if("Buffer"===t.type&&Array.isArray(t.data))return l(t.data)}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return e.from(t[Symbol.toPrimitive]("string"),r,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function c(t){return u(t),s(t<0?0:0|h(t))}function l(t){for(var e=t.length<0?0:0|h(t.length),r=s(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(t){if(t>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|t}function p(t,r){if(e.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||U(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var n=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var o=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return L(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return R(t).length;default:if(o)return i?-1:L(t).length;r=(""+r).toLowerCase(),o=!0}}function f(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return x(this,e,r);case"base64":return E(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function d(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,r,n,i,o){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),q(n=+n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=e.from(r,i)),e.isBuffer(r))return 0===r.length?-1:m(t,r,n,i,o);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,n):Uint8Array.prototype.lastIndexOf.call(t,r,n):m(t,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;o<a;o++)if(c(t,o)===c(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var h=!0,p=0;p<u;p++)if(c(t,o+p)!==c(e,p)){h=!1;break}if(h)return o}return-1}function g(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(q(a))return s;t[r+s]=a}return s}function b(t,e,r,n){return M(L(e,t.length-r),t,r,n)}function v(t,e,r,n){return M(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function _(t,e,r,n){return v(t,e,r,n)}function w(t,e,r,n){return M(R(e),t,r,n)}function T(t,e,r,n){return M(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function E(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function S(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,c=t[i],l=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=h}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}r.kMaxLength=2147483647,e.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),e.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&e[Symbol.species]===e&&Object.defineProperty(e,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),e.poolSize=8192,e.from=function(t,e,r){return a(t,e,r)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array),e.alloc=function(t,e,r){return function(t,e,r){return u(t),t<=0?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)}(t,e,r)},e.allocUnsafe=function(t){return c(t)},e.allocUnsafeSlow=function(t){return c(t)},e.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==e.prototype},e.compare=function(t,r){if(U(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),U(r,Uint8Array)&&(r=e.from(r,r.offset,r.byteLength)),!e.isBuffer(t)||!e.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var n=t.length,i=r.length,o=0,s=Math.min(n,i);o<s;++o)if(t[o]!==r[o]){n=t[o],i=r[o];break}return n<i?-1:i<n?1:0},e.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return e.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<t.length;++n)r+=t[n].length;var i=e.allocUnsafe(r),o=0;for(n=0;n<t.length;++n){var s=t[n];if(U(s,Uint8Array)&&(s=e.from(s)),!e.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i},e.byteLength=p,e.prototype._isBuffer=!0,e.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)d(this,e,e+1);return this},e.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)d(this,e,e+3),d(this,e+1,e+2);return this},e.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)d(this,e,e+7),d(this,e+1,e+6),d(this,e+2,e+5),d(this,e+3,e+4);return this},e.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?S(this,0,t):f.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===e.compare(this,t)},e.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},o&&(e.prototype[o]=e.prototype.inspect),e.prototype.compare=function(t,r,n,i,o){if(U(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(this===t)return 0;for(var s=(o>>>=0)-(i>>>=0),a=(n>>>=0)-(r>>>=0),u=Math.min(s,a),c=this.slice(i,o),l=t.slice(r,n),h=0;h<u;++h)if(c[h]!==l[h]){s=c[h],a=l[h];break}return s<a?-1:a<s?1:0},e.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},e.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},e.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},e.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))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return g(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return v(this,t,e,r);case"latin1":case"binary":return _(this,t,e,r);case"base64":return w(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function x(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function I(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=F[t[o]];return i}function C(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function D(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function N(t,r,n,i,o,s){if(!e.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<s)throw new RangeError('"value" argument is out of bounds');if(n+i>t.length)throw new RangeError("Index out of range")}function A(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(t,e,r,n,o){return e=+e,r>>>=0,o||A(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,o){return e=+e,r>>>=0,o||A(t,0,r,8),i.write(t,e,r,n,52,8),r+8}e.prototype.slice=function(t,r){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t);var i=this.subarray(t,r);return Object.setPrototypeOf(i,e.prototype),i},e.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},e.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||D(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},e.prototype.readUInt8=function(t,e){return t>>>=0,e||D(t,1,this.length),this[t]},e.prototype.readUInt16LE=function(t,e){return t>>>=0,e||D(t,2,this.length),this[t]|this[t+1]<<8},e.prototype.readUInt16BE=function(t,e){return t>>>=0,e||D(t,2,this.length),this[t]<<8|this[t+1]},e.prototype.readUInt32LE=function(t,e){return t>>>=0,e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},e.prototype.readUInt32BE=function(t,e){return t>>>=0,e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},e.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},e.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||D(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},e.prototype.readInt8=function(t,e){return t>>>=0,e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},e.prototype.readInt16LE=function(t,e){t>>>=0,e||D(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt16BE=function(t,e){t>>>=0,e||D(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt32LE=function(t,e){return t>>>=0,e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},e.prototype.readInt32BE=function(t,e){return t>>>=0,e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},e.prototype.readFloatLE=function(t,e){return t>>>=0,e||D(t,4,this.length),i.read(this,t,!0,23,4)},e.prototype.readFloatBE=function(t,e){return t>>>=0,e||D(t,4,this.length),i.read(this,t,!1,23,4)},e.prototype.readDoubleLE=function(t,e){return t>>>=0,e||D(t,8,this.length),i.read(this,t,!0,52,8)},e.prototype.readDoubleBE=function(t,e){return t>>>=0,e||D(t,8,this.length),i.read(this,t,!1,52,8)},e.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||N(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},e.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||N(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},e.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,1,255,0),this[e]=255&t,e+1},e.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},e.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);N(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},e.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);N(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},e.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},e.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},e.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeFloatLE=function(t,e,r){return j(this,t,e,!0,r)},e.prototype.writeFloatBE=function(t,e,r){return j(this,t,e,!1,r)},e.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},e.prototype.writeDoubleBE=function(t,e,r){return P(this,t,e,!1,r)},e.prototype.copy=function(t,r,n,i){if(!e.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r<i-n&&(i=t.length-r+n);var o=i-n;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(r,n,i);else if(this===t&&n<r&&r<i)for(var s=o-1;s>=0;--s)t[s+r]=this[s+n];else Uint8Array.prototype.set.call(t,this.subarray(n,i),r);return o},e.prototype.fill=function(t,r,n,i){if("string"==typeof t){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!e.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){var o=t.charCodeAt(0);("utf8"===i&&o<128||"latin1"===i)&&(t=o)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;var s;if(r>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(s=r;s<n;++s)this[s]=t;else{var a=e.isBuffer(t)?t:e.from(t,i),u=a.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(s=0;s<n-r;++s)this[s+r]=a[s%u]}return this};var k=/[^+/0-9A-Za-z-_]/g;function L(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function R(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(k,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function M(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function U(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function q(t){return t!=t}var F=function(){for(var t=new Array(256),e=0;e<16;++e)for(var r=16*e,n=0;n<16;++n)t[r+n]="0123456789abcdef"[e]+"0123456789abcdef"[n];return t}()}).call(this,t("buffer").Buffer)},{"base64-js":38,buffer:40,ieee754:118}],41:[function(t,e,r){(function(t){function e(t){return Object.prototype.toString.call(t)}r.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===e(t)},r.isBoolean=function(t){return"boolean"==typeof t},r.isNull=function(t){return null===t},r.isNullOrUndefined=function(t){return null==t},r.isNumber=function(t){return"number"==typeof t},r.isString=function(t){return"string"==typeof t},r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=function(t){return void 0===t},r.isRegExp=function(t){return"[object RegExp]"===e(t)},r.isObject=function(t){return"object"==typeof t&&null!==t},r.isDate=function(t){return"[object Date]"===e(t)},r.isError=function(t){return"[object Error]"===e(t)||t instanceof Error},r.isFunction=function(t){return"function"==typeof t},r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},r.isBuffer=t.isBuffer}).call(this,{isBuffer:t("../../is-buffer/index.js")})},{"../../is-buffer/index.js":120}],42:[function(t,e,r){(function(r,n,i){var o,s,a,u,c;u=t("stream"),c=t("util"),s=t("string_decoder").StringDecoder,e.exports=function(){var t,e,i,s,u,c,l;if(3===arguments.length){if(s=arguments[0],c=arguments[1],"function"!=typeof(t=arguments[2]))throw Error(`Invalid callback argument: ${JSON.stringify(t)}`);if("string"!=typeof s&&!n.isBuffer(arguments[0]))return t(Error(`Invalid data argument: ${JSON.stringify(s)}`))}else if(2===arguments.length){if("string"==typeof arguments[0]||n.isBuffer(arguments[0])?s=arguments[0]:a(arguments[0])?c=arguments[0]:u=`Invalid first argument: ${JSON.stringify(arguments[0])}`,"function"==typeof arguments[1]?t=arguments[1]:a(arguments[1])?c?u="Invalid arguments: got options twice as first and second arguments":c=arguments[1]:u=`Invalid first argument: ${JSON.stringify(arguments[1])}`,u){if(t)return t(Error(u));throw Error(u)}}else 1===arguments.length&&("function"==typeof arguments[0]?t=arguments[0]:c=arguments[0]);return null==c&&(c={}),l=new o(c),null!=s&&r.nextTick((function(){return l.write(s),l.end()})),t&&(e=!1,i=c.objname?{}:[],l.on("readable",(function(){var t,e;for(e=[];t=l.read();)c.objname?e.push(i[t[0]]=t[1]):e.push(i.push(t));return e})),l.on("error",(function(r){return e=!0,t(r)})),l.on("end",(function(){if(!e)return t(null,i)}))),l},o=function(t={}){var e,r,n,i,o,a,c,l,h,p,f,d,y,m,g,b,v,_,w,T;for(w in this.options={},t)T=t[w],this.options[w]=T;return this.options.objectMode=!0,u.Transform.call(this,this.options),null==(e=this.options).rowDelimiter&&(e.rowDelimiter=null),"string"==typeof this.options.rowDelimiter&&(this.options.rowDelimiter=[this.options.rowDelimiter]),null==(r=this.options).delimiter&&(r.delimiter=","),void 0===this.options.quote||this.options.quote||(this.options.quote=""),null==(f=this.options).quote&&(f.quote='"'),null==(d=this.options).escape&&(d.escape='"'),null==(y=this.options).columns&&(y.columns=null),null==(m=this.options).comment&&(m.comment=""),null==(g=this.options).objname&&(g.objname=!1),null==(b=this.options).trim&&(b.trim=!1),null==(v=this.options).ltrim&&(v.ltrim=!1),null==(_=this.options).rtrim&&(_.rtrim=!1),null!=this.options.auto_parse&&(this.options.cast=this.options.auto_parse),null==(n=this.options).cast&&(n.cast=!1),null!=this.options.auto_parse_date&&(this.options.cast_date=this.options.auto_parse_date),null==(i=this.options).cast_date&&(i.cast_date=!1),!0===this.options.cast_date&&(this.options.cast_date=function(t){var e;return e=Date.parse(t),isNaN(e)||(t=new Date(e)),t}),null==(o=this.options).relax&&(o.relax=!1),null==(a=this.options).relax_column_count&&(a.relax_column_count=!1),null==(c=this.options).skip_empty_lines&&(c.skip_empty_lines=!1),null==(l=this.options).max_limit_on_data_read&&(l.max_limit_on_data_read=128e3),null==(h=this.options).skip_lines_with_empty_values&&(h.skip_lines_with_empty_values=!1),null==(p=this.options).skip_lines_with_error&&(p.skip_lines_with_error=!1),this.lines=0,this.count=0,this.skipped_line_count=0,this.empty_line_count=0,this.is_int=/^(\-|\+)?([1-9]+[0-9]*)$/,this.is_float=function(t){return t-parseFloat(t)+1>=0},this._={decoder:new s,quoting:!1,commenting:!1,field:null,nextChar:null,closingQuote:0,line:[],chunks:[],rawBuf:"",buf:"",rowDelimiterLength:this.options.rowDelimiter?Math.max(...this.options.rowDelimiter.map((function(t){return t.length}))):void 0,lineHasError:!1,isEnded:!1},this},c.inherits(o,u.Transform),e.exports.Parser=o,o.prototype._transform=function(t,e,r){return i(()=>{var e;return t instanceof n&&(t=this._.decoder.write(t)),(e=this.__write(t,!1))?this.emit("error",e):r()})},o.prototype._flush=function(t){return t(this.__flush())},o.prototype.__flush=function(){return this.__write(this._.decoder.end(),!0)||(this._.quoting?this.error(`Quoted field not terminated at line ${this.lines+1}`):this._.line.length>0?this.__push(this._.line):void 0)},o.prototype.__push=function(t){var e,r,n,i,o,s,a,u,c;if(!(this._.isEnded||this.options.skip_lines_with_empty_values&&""===t.join("").trim()))if(c=null,!0!==this.options.columns){if("function"==typeof this.options.columns)return e=function(t,e){try{return[null,t.call(null,e)]}catch(t){return[t]}},[n,r]=e(this.options.columns,t),n||void(this.options.columns=r);if(!this._.line_length&&t.length>0&&(this._.line_length=this.options.columns?this.options.columns.length:t.length),1===t.length&&""===t[0])this.empty_line_count++;else if(t.length!==this._.line_length){if(!this.options.relax_column_count)return n=null!=this.options.columns?this.error(`Number of columns on line ${this.lines} does not match header`):this.error(`Number of columns is inconsistent on line ${this.lines}`);this.count++,this.skipped_line_count++}else this.count++;if(null!=this.options.columns){for(u={},o=s=0,a=t.length;s<a;o=++s)i=t[o],!1!==this.options.columns[o]&&(u[this.options.columns[o]]=i);c=this.options.objname?[u[this.options.objname],u]:u}else c=t;if(!(this.count<this.options.from))return this.options.raw?(this.push({raw:this._.rawBuf,row:c}),this._.rawBuf=""):this.push(c),this.listenerCount("record")&&this.emit("record",c),this.count>=this.options.to?(this._.isEnded=!0,this.push(null)):null}else this.options.columns=t},o.prototype.__write=function(t,e){var r,n,i,o,s,a,u,c,l,h,p,f,d,y,m,g,b,v,_,w,T,E,S,O,x,I,C,D,N,A;for(g=t=>"function"==typeof this.is_int?this.is_int(t):this.is_int.test(t),m=t=>"function"==typeof this.is_float?this.is_float(t):this.is_float.test(t),i=(t,e={})=>this.options.cast?(null==e.quoting&&(e.quoting=!!this._.closingQuote),null==e.lines&&(e.lines=this.lines),null==e.count&&(e.count=this.count),null==e.index&&(e.index=this._.line.length),null==e.header&&(e.header=!0===this.options.columns),null==e.column&&(e.column=Array.isArray(this.options.columns)?this.options.columns[e.index]:e.index),"function"==typeof this.options.cast?this.options.cast(t,e):(g(t)?t=parseInt(t):m(t)?t=parseFloat(t):this.options.cast_date&&(t=this.options.cast_date(t,e)),t)):t,v=this.options.trim||this.options.ltrim,N=this.options.trim||this.options.rtrim,t=this._.buf+t,b=t.length,u=0,0===this.lines&&65279===t.charCodeAt(0)&&u++;u<b&&(e||(C=t.substr(u,b-u),!(!this.options.rowDelimiter&&u+3>b||!this._.commenting&&b-u<this.options.comment.length&&this.options.comment.substr(0,b-u)===C||this.options.rowDelimiter&&b-u<this._.rowDelimiterLength&&this.options.rowDelimiter.some((function(t){return t.substr(0,b-u)===C}))||this.options.rowDelimiter&&this._.quoting&&b-u<this.options.quote.length+this._.rowDelimiterLength&&this.options.rowDelimiter.some(t=>(this.options.quote+t).substr(0,b-u)===C)||b-u<=this.options.delimiter.length&&this.options.delimiter.substr(0,b-u)===C||b-u<=this.options.escape.length&&this.options.escape.substr(0,b-u)===C)));)if(o=this._.nextChar?this._.nextChar:t.charAt(u),this._.nextChar=b>u+1?t.charAt(u+1):null,this.options.raw&&(this._.rawBuf+=o),null==this.options.rowDelimiter&&(_=u,D=null,this._.quoting||"\n"!==o&&"\r"!==o?!this._.quoting||o!==this.options.quote||"\n"!==(w=this._.nextChar)&&"\r"!==w||(D=this._.nextChar,_+=2):(D=o,_+=1),D&&("\r"===D&&"\n"===t.charAt(_)&&(D+="\n"),this.options.rowDelimiter=[D],this._.rowDelimiterLength=D.length)),this._.commenting||o!==this.options.escape||(a=this.options.escape===this.options.quote,l=this._.nextChar===this.options.escape,f=this._.nextChar===this.options.quote,a&&!this._.field&&!this._.quoting||!l&&!f)){if(!this._.commenting&&o===this.options.quote){if(this._.acceptOnlyEmptyChars&&" "!==o&&"\t"!==o)return this.error("Only trimable characters are accepted after quotes");if(this._.quoting){if(p=N&&(" "===(T=this._.nextChar)||"\t"===T),n=this.options.rowDelimiter&&this.options.rowDelimiter.some((function(e){return t.substr(u+1,e.length)===e})),r=t.substr(u+1,this.options.delimiter.length)===this.options.delimiter,h=this._.nextChar===this.options.comment,null==this._.nextChar||p||n||r||h){if(null!=this._.nextChar&&p){u++,this._.quoting=!1,this._.closingQuote=this.options.quote.length,this._.acceptOnlyEmptyChars=!0;continue}u++,this._.quoting=!1,this._.closingQuote=this.options.quote.length,e&&u===b&&(this._.line.push(i(this._.field||"")),this._.field=null);continue}if(this.options.relax)this._.quoting=!1,this._.field&&(this._.field=`${this.options.quote}${this._.field}`);else if(s=this.error(`Invalid closing quote at line ${this.lines+1}; found ${JSON.stringify(this._.nextChar)} instead of delimiter ${JSON.stringify(this.options.delimiter)}`))return s}else{if(!this._.field){this._.quoting=!0,u++;continue}if(null!=this._.field&&!this.options.relax&&(s=this.error(`Invalid opening quote at line ${this.lines+1}`)))return s}}if(((d=this.options.rowDelimiter&&this.options.rowDelimiter.some((function(e){return t.substr(u,e.length)===e})))||e&&u===b-1)&&this.lines++,A=!1,this._.commenting||this._.quoting||!this.options.comment||t.substr(u,this.options.comment.length)!==this.options.comment?this._.commenting&&d&&(A=!0,this._.commenting=!1):this._.commenting=!0,c=t.substr(u,this.options.delimiter.length)===this.options.delimiter,this._.acceptOnlyEmptyChars){if(!c&&!d){if(" "===o||"\t"===o){u++;continue}return this.error("Only trimable characters are accepted after quotes")}this._.acceptOnlyEmptyChars=!1}if(this._.commenting||this._.quoting||!c&&!d)this._.commenting||this._.quoting||" "!==o&&"\t"!==o?this._.commenting?u++:(null==this._.field&&(this._.field=""),this._.field+=o,u++):(null==this._.field&&(this._.field=""),v&&!this._.field||(this._.field+=o),u++);else{if(d&&(y=this.options.rowDelimiter.filter((function(e){return t.substr(u,e.length)===e}))[0].length),d&&0===this._.line.length&&null==this._.field&&(A||this.options.skip_empty_lines)){u+=y,this._.nextChar=t.charAt(u);continue}if(N&&(this._.closingQuote||(this._.field=null!=(E=this._.field)?E.trimRight():void 0)),this._.line.push(i(this._.field||"")),this._.closingQuote=0,this._.field=null,c&&(u+=this.options.delimiter.length,this._.nextChar=t.charAt(u),e&&!this._.nextChar&&(d=!0,this._.line.push(""))),d){if(!this._.lineHasError&&(s=this.__push(this._.line)))return s;this._.lineHasError&&(this._.lineHasError=!1),this._.line=[],u+=y,this._.nextChar=t.charAt(u);continue}}if(!this._.commenting&&(null!=(S=this._.field)?S.length:void 0)>this.options.max_limit_on_data_read)return Error(`Field exceeds max_limit_on_data_read setting (${this.options.max_limit_on_data_read}) ${JSON.stringify(this.options.delimiter)}`);if(!this._.commenting&&(null!=(O=this._.line)?O.length:void 0)>this.options.max_limit_on_data_read)return Error(`Row delimiter not found in the file ${JSON.stringify(this.options.rowDelimiter)}`)}else u++,o=this._.nextChar,this._.nextChar=t.charAt(u+1),null==this._.field&&(this._.field=""),this._.field+=o,this.options.raw&&(this._.rawBuf+=o),u++;if(e){if(0===b&&this.lines++,null!=this._.field&&(N&&(this._.closingQuote||(this._.field=null!=(x=this._.field)?x.trimRight():void 0)),this._.line.push(i(this._.field||"")),this._.field=null),(null!=(I=this._.field)?I.length:void 0)>this.options.max_limit_on_data_read)return Error(`Delimiter not found in the file ${JSON.stringify(this.options.delimiter)}`);if(this._.line.length>this.options.max_limit_on_data_read)return Error(`Row delimiter not found in the file ${JSON.stringify(this.options.rowDelimiter)}`)}return this._.buf=t.substr(u),null},o.prototype.error=function(t){var e;return e=Error(t),this.options.skip_lines_with_error?(this._.lineHasError||(this._.lineHasError=!0,this.emit("skip",e)),null):e},a=function(t){var e;return e=t,"object"==typeof t&&null!==t&&!Array.isArray(t)&&function(){for(;null!==Object.getPrototypeOf(e=Object.getPrototypeOf(e)););return Object.getPrototypeOf(t===e)}()}}).call(this,t("_process"),t("buffer").Buffer,t("timers").setImmediate)},{_process:138,buffer:40,stream:159,string_decoder:160,timers:162,util:170}],43:[function(t,e,r){(function(r){var n,i;({StringDecoder:n}=t("string_decoder")),i=t("./index"),e.exports=function(t,e={}){var o,s,a;if(a=e.objname?{}:[],t instanceof r&&(t=(new n).write(t)),(s=new i.Parser(e)).push=function(t){return e.objname?a[t[0]]=t[1]:a.push(t)},o=s.__write(t,!1))throw o;if(t instanceof r&&(o=s.__write(t.end(),!0)))throw o;if(o=s.__flush())throw o;return a}}).call(this,t("buffer").Buffer)},{"./index":42,buffer:40,string_decoder:160}],44:[function(t,e,r){(function(r){var n,i,o,s;o=t("stream"),s=t("util"),i=t("lodash.get"),e.exports=function(){var t,e,i,o,s;return 3===arguments.length?(i=arguments[0],o=arguments[1],t=arguments[2]):2===arguments.length?(Array.isArray(arguments[0])?i=arguments[0]:o=arguments[0],"function"==typeof arguments[1]?t=arguments[1]:o=arguments[1]):1===arguments.length&&("function"==typeof arguments[0]?t=arguments[0]:Array.isArray(arguments[0])?i=arguments[0]:o=arguments[0]),null==o&&(o={}),s=new n(o),i&&r.nextTick((function(){var t,e,r;for(e=0,r=i.length;e<r;e++)t=i[e],s.write(t);return s.end()})),t&&(e=[],s.on("readable",(function(){var t,r;for(r=[];t=s.read();)r.push(e.push(t));return r})),s.on("error",(function(e){return t(e)})),s.on("end",(function(){return t(null,e.join(""))}))),s},n=function(t){var e,r,n,i,s,a,u,c,l,h,p,f,d,y,m,g,b;for(m in null==t&&(t={}),g={},t)b=t[m],g[m]=b;switch(o.Transform.call(this,g),this.options=g,null==(e=this.options).delimiter&&(e.delimiter=","),null==(r=this.options).quote&&(r.quote='"'),null==(u=this.options).quoted&&(u.quoted=!1),null==(c=this.options).quotedEmpty&&(c.quotedEmpty=void 0),null==(l=this.options).quotedString&&(l.quotedString=!1),null==(h=this.options).eof&&(h.eof=!0),null==(p=this.options).escape&&(p.escape='"'),null==(f=this.options).columns&&(f.columns=null),null==(d=this.options).header&&(d.header=!1),null==(y=this.options).formatters&&(y.formatters={}),null==(n=this.options.formatters).date&&(n.date=function(t){return""+t.getTime()}),null==(i=this.options.formatters).bool&&(i.bool=function(t){return t?"1":""}),null==(s=this.options.formatters).object&&(s.object=function(t){return JSON.stringify(t)}),null==(a=this.options).rowDelimiter&&(a.rowDelimiter="\n"),null==this.countWriten&&(this.countWriten=0),this.options.rowDelimiter){case"auto":this.options.rowDelimiter=null;break;case"unix":this.options.rowDelimiter="\n";break;case"mac":this.options.rowDelimiter="\r";break;case"windows":this.options.rowDelimiter="\r\n";break;case"unicode":this.options.rowDelimiter="\u2028"}return this},s.inherits(n,o.Transform),e.exports.Stringifier=n,n.prototype.headers=function(){var t,e,r;if(this.options.header&&this.options.columns)return"object"==typeof(r=this.options.columns)&&(r=function(){var n;for(t in n=[],r)e=r[t],n.push(e);return n}()),r=this.options.eof?this.stringify(r)+this.options.rowDelimiter:this.stringify(r),o.Transform.prototype.write.call(this,r)},n.prototype.end=function(t,e,r){return 0===this.countWriten&&this.headers(),o.Transform.prototype.end.apply(this,arguments)},n.prototype.write=function(t,e,r){var n,i,s;if(null!=t){if(!(s="object"!=typeof t)){0!==this.countWriten||Array.isArray(t)||null==(n=this.options).columns&&(n.columns=Object.keys(t));try{this.emit("record",t,this.countWriten)}catch(t){return i=t,this.emit("error",i)}this.options.eof?t=this.stringify(t)+this.options.rowDelimiter:(t=this.stringify(t),(this.options.header||this.countWriten)&&(t=this.options.rowDelimiter+t))}return"number"==typeof t&&(t=""+t),0===this.countWriten&&this.headers(),s||this.countWriten++,o.Transform.prototype.write.call(this,t,e,r)}},n.prototype._transform=function(t,e,r){return this.push(t),r()},n.prototype.stringify=function(t){var e,r,n,o,s,a,u,c,l,h,p,f,d,y,m,g,b,v,_,w;if("object"!=typeof t)return t;if("object"!=typeof(n=this.options.columns)||null===n||Array.isArray(n)||(n=Object.keys(n)),c=this.options.delimiter,m=this.options.quote,l=this.options.escape,Array.isArray(t))n&&t.splice(n.length);else{if(e=[],n)for(p=f=0,g=n.length;0<=g?f<g:f>g;p=0<=g?++f:--f)r=n[p],w=i(t,r),e[p]=null==w?"":w;else for(r in t)e.push(t[r]);t=e,e=null}if(Array.isArray(t)){for(y="",p=d=0,b=t.length;0<=b?d<b:d>b;p=0<=b?++d:--d)"string"==typeof(h=t[p])||("number"==typeof h?h=""+h:"boolean"==typeof h?h=this.options.formatters.bool(h):h instanceof Date?h=this.options.formatters.date(h):"object"==typeof h&&null!==h&&(h=this.options.formatters.object(h))),h?(u=h.indexOf(c)>=0,a=h.indexOf(m)>=0,o=h.indexOf(l)>=0&&l!==m,s=h.indexOf("\r")>=0||h.indexOf("\n")>=0,(_=a||u||s||this.options.quoted||this.options.quotedString&&"string"==typeof t[p])&&o&&(v="\\"===l?new RegExp(l+l,"g"):new RegExp(l,"g"),h=h.replace(v,l+l)),a&&(v=new RegExp(m,"g"),h=h.replace(v,l+m)),_&&(h=m+h+m),y+=h):(this.options.quotedEmpty||null==this.options.quotedEmpty&&""===t[p]&&this.options.quotedString)&&(y+=m+m),p!==t.length-1&&(y+=c);t=y}return t}}).call(this,t("_process"))},{_process:138,"lodash.get":126,stream:159,util:170}],45:[function(t,e,r){(function(r){var n,i;n=t("string_decoder").StringDecoder,i=t("./index"),e.exports=function(t,e){var o,s,a,u,c;for(null==e&&(e={}),o=[],t instanceof r&&(t=(new n).write(t)),(c=new i.Stringifier(e)).push=function(t){if(t)return o.push(t.toString())},s=0,a=t.length;s<a;s++)u=t[s],c.write(u);return c.end(),o.join("")}}).call(this,t("buffer").Buffer)},{"./index":44,buffer:40,string_decoder:160}],46:[function(t,e,r){"use strict";var n=t("object-keys"),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,s=Array.prototype.concat,a=Object.defineProperty,u=a&&function(){var t={};try{for(var e in a(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),c=function(t,e,r,n){var i;e in t&&("function"!=typeof(i=n)||"[object Function]"!==o.call(i)||!n())||(u?a(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},o=n(e);i&&(o=s.call(o,Object.getOwnPropertySymbols(e)));for(var a=0;a<o.length;a+=1)c(t,o[a],e[o[a]],r[o[a]])};l.supportsDescriptors=!!u,e.exports=l},{"object-keys":131}],47:[function(t,e,r){"use strict";var n=TypeError,i=Object.getOwnPropertyDescriptor,o=function(){throw new n},s=i?function(){try{return arguments.callee,o}catch(t){try{return i(arguments,"callee").get}catch(t){return o}}}():o,a=t("has-symbols")(),u=Object.getPrototypeOf||function(t){return t.__proto__},c=void 0,l="undefined"==typeof Uint8Array?void 0:u(Uint8Array),h={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":a?u([][Symbol.iterator]()):void 0,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":void 0,"$ %AsyncFunction%":void 0,"$ %AsyncFunctionPrototype%":void 0,"$ %AsyncGenerator%":void 0,"$ %AsyncGeneratorFunction%":void 0,"$ %AsyncGeneratorPrototype%":void 0,"$ %AsyncIteratorPrototype%":c&&a&&Symbol.asyncIterator?c[Symbol.asyncIterator]():void 0,"$ %Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?void 0:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?void 0:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":Error,"$ %ErrorPrototype%":Error.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?void 0:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?void 0:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":void 0,"$ %GeneratorFunction%":void 0,"$ %GeneratorPrototype%":void 0,"$ %Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?void 0:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?void 0:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?void 0:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":isNaN,"$ %IteratorPrototype%":a?u(u([][Symbol.iterator]())):void 0,"$ %JSON%":"object"==typeof JSON?JSON:void 0,"$ %JSONParse%":"object"==typeof JSON?JSON.parse:void 0,"$ %Map%":"undefined"==typeof Map?void 0:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&a?u((new Map)[Symbol.iterator]()):void 0,"$ %MapPrototype%":"undefined"==typeof Map?void 0:Map.prototype,"$ %Math%":Math,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":Object,"$ %ObjectPrototype%":Object.prototype,"$ %ObjProto_toString%":Object.prototype.toString,"$ %ObjProto_valueOf%":Object.prototype.valueOf,"$ %parseFloat%":parseFloat,"$ %parseInt%":parseInt,"$ %Promise%":"undefined"==typeof Promise?void 0:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?void 0:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?void 0:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?void 0:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?void 0:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?void 0:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?void 0:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&a?u((new Set)[Symbol.iterator]()):void 0,"$ %SetPrototype%":"undefined"==typeof Set?void 0:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":a?u(""[Symbol.iterator]()):void 0,"$ %StringPrototype%":String.prototype,"$ %Symbol%":a?Symbol:void 0,"$ %SymbolPrototype%":a?Symbol.prototype:void 0,"$ %SyntaxError%":SyntaxError,"$ %SyntaxErrorPrototype%":SyntaxError.prototype,"$ %ThrowTypeError%":s,"$ %TypedArray%":l,"$ %TypedArrayPrototype%":l?l.prototype:void 0,"$ %TypeError%":n,"$ %TypeErrorPrototype%":n.prototype,"$ %Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"$ %Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?void 0:Uint8Array.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?void 0:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?void 0:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?void 0:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?void 0:WeakSet.prototype},p=t("function-bind").call(Function.call,String.prototype.replace),f=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,d=/\\(\\)?/g,y=function(t){var e=[];return p(t,f,(function(t,r,n,i){e[e.length]=n?p(i,d,"$1"):r||t})),e},m=function(t,e){var r="$ "+t;if(!(r in h))throw new SyntaxError("intrinsic "+t+" does not exist!");if(void 0===h[r]&&!e)throw new n("intrinsic "+t+" exists, but is not available. Please file an issue!");return h[r]};e.exports=function(t,e){if(arguments.length>1&&"boolean"!=typeof e)throw new TypeError('"allowMissing" argument must be a boolean');var r=y(t);if(0===r.length)return m(t,e);for(var n=m("%"+r[0]+"%",e),o=1;o<r.length;o+=1)if(null!=n)if(i&&o+1>=r.length){var s=i(n,r[o]);n=s?s.get||s.value:n[r[o]]}else n=n[r[o]];return n}},{"function-bind":114,"has-symbols":115}],48:[function(t,e,r){"use strict";var n=t("has"),i=t("es-to-primitive/es6"),o=t("object-keys"),s=t("object-inspect"),a=t("./GetIntrinsic"),u=a("%TypeError%"),c=a("%RangeError%"),l=a("%SyntaxError%"),h=a("%Array%"),p=h.prototype,f=a("%String%"),d=a("%Object%"),y=a("%Number%"),m=a("%Symbol%",!0),g=a("%RegExp%"),b=a("%Date%"),v=a("%Function%"),_=d.preventExtensions,w=t("has-symbols")(),T=t("./helpers/assertRecord"),E=t("./helpers/isNaN"),S=t("./helpers/isFinite"),O=Math.pow(2,32)-1,x=t("./helpers/maxSafeInteger"),I=t("./helpers/assign"),C=t("./helpers/sign"),D=t("./helpers/mod"),N=t("./helpers/isPrimitive"),A=t("./helpers/forEach"),j=t("./helpers/every"),P=t("./helpers/isSamePropertyDescriptor"),k=t("./helpers/isPropertyDescriptor"),L=parseInt,R=t("./helpers/callBound"),M=t("./helpers/regexTester"),U=t("./helpers/getIteratorMethod"),q=t("./helpers/getSymbolDescription"),F=R("Promise.prototype.then",!0),B=R("Array.prototype.slice"),$=R("String.prototype.slice"),X=R("Array.prototype.indexOf"),V=R("Array.prototype.push"),G=M(/^0b[01]+$/i),W=M(/^0o[0-7]+$/i),z=M(/^[0-9]$/),H=R("RegExp.prototype.exec"),Y=M(new g("["+["","​",""].join("")+"]","g")),K=M(/^[-+]0x[0-9a-f]+$/i),J=R("String.prototype.charCodeAt"),Q=R("Object.prototype.propertyIsEnumerable"),Z=R("Object.prototype.toString"),tt=R("Number.prototype.valueOf"),et=R("Boolean.prototype.valueOf"),rt=R("String.prototype.valueOf"),nt=R("Date.prototype.valueOf"),it=R("Symbol.prototype.toString",!0),ot=Math.floor,st=Math.abs,at=d.create,ut=d.getOwnPropertyDescriptor,ct=d.getOwnPropertyNames,lt=d.getOwnPropertySymbols,ht=d.isExtensible,pt=d.defineProperty,ft=t("./helpers/setProto"),dt=function(t,e,r,n){if(!pt){if(!t.IsDataDescriptor(n))return!1;if(!n["[[Configurable]]"]||!n["[[Writable]]"])return!1;if(r in e&&Q(e,r)!==!!n["[[Enumerable]]"])return!1;var i=n["[[Value]]"];return e[r]=i,t.SameValue(e[r],i)}return pt(e,r,t.FromPropertyDescriptor(n)),!0},yt=["\t\n\v\f\r   ᠎    ","         　\u2028","\u2029\ufeff"].join(""),mt=new RegExp("(^["+yt+"]+)|(["+yt+"]+$)","g"),gt=R("String.prototype.replace"),bt=t("./es5"),vt=t("is-regex"),_t=I(I({},bt),{Call:function(t,e){var r=arguments.length>2?arguments[2]:[];if(!this.IsCallable(t))throw new u(s(t)+" is not a function");return t.apply(e,r)},ToPrimitive:i,ToNumber:function(t){var e=N(t)?t:i(t,y);if("symbol"==typeof e)throw new u("Cannot convert a Symbol value to a number");if("string"==typeof e){if(G(e))return this.ToNumber(L($(e,2),2));if(W(e))return this.ToNumber(L($(e,2),8));if(Y(e)||K(e))return NaN;var r=function(t){return gt(t,mt,"")}(e);if(r!==e)return this.ToNumber(r)}return y(e)},ToInt16:function(t){var e=this.ToUint16(t);return e>=32768?e-65536:e},ToInt8:function(t){var e=this.ToUint8(t);return e>=128?e-256:e},ToUint8:function(t){var e=this.ToNumber(t);if(E(e)||0===e||!S(e))return 0;var r=C(e)*ot(st(e));return D(r,256)},ToUint8Clamp:function(t){var e=this.ToNumber(t);if(E(e)||e<=0)return 0;if(e>=255)return 255;var r=ot(t);return r+.5<e?r+1:e<r+.5?r:r%2!=0?r+1:r},ToString:function(t){if("symbol"==typeof t)throw new u("Cannot convert a Symbol value to a string");return f(t)},ToObject:function(t){return this.RequireObjectCoercible(t),d(t)},ToPropertyKey:function(t){var e=this.ToPrimitive(t,f);return"symbol"==typeof e?e:this.ToString(e)},ToLength:function(t){var e=this.ToInteger(t);return e<=0?0:e>x?x:e},CanonicalNumericIndexString:function(t){if("[object String]"!==Z(t))throw new u("must be a string");if("-0"===t)return-0;var e=this.ToNumber(t);return this.SameValue(this.ToString(e),t)?e:void 0},RequireObjectCoercible:bt.CheckObjectCoercible,IsArray:h.isArray||function(t){return"[object Array]"===Z(t)},IsConstructor:function(t){return"function"==typeof t&&!!t.prototype},IsExtensible:_?function(t){return!N(t)&&ht(t)}:function(t){return!0},IsInteger:function(t){if("number"!=typeof t||E(t)||!S(t))return!1;var e=st(t);return ot(e)===e},IsPropertyKey:function(t){return"string"==typeof t||"symbol"==typeof t},IsRegExp:function(t){if(!t||"object"!=typeof t)return!1;if(w){var e=t[m.match];if(void 0!==e)return bt.ToBoolean(e)}return vt(t)},SameValueZero:function(t,e){return t===e||E(t)&&E(e)},GetV:function(t,e){if(!this.IsPropertyKey(e))throw new u("Assertion failed: IsPropertyKey(P) is not true");return this.ToObject(t)[e]},GetMethod:function(t,e){if(!this.IsPropertyKey(e))throw new u("Assertion failed: IsPropertyKey(P) is not true");var r=this.GetV(t,e);if(null!=r){if(!this.IsCallable(r))throw new u(e+"is not a function");return r}},Get:function(t,e){if("Object"!==this.Type(t))throw new u("Assertion failed: Type(O) is not Object");if(!this.IsPropertyKey(e))throw new u("Assertion failed: IsPropertyKey(P) is not true, got "+s(e));return t[e]},Type:function(t){return"symbol"==typeof t?"Symbol":bt.Type(t)},SpeciesConstructor:function(t,e){if("Object"!==this.Type(t))throw new u("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==this.Type(r))throw new u("O.constructor is not an Object");var n=w&&m.species?r[m.species]:void 0;if(null==n)return e;if(this.IsConstructor(n))return n;throw new u("no constructor found")},FromPropertyDescriptor:function(t){if(void 0===t)return t;T(this,"Property Descriptor","Desc",t);var e={};return"[[Value]]"in t&&(e.value=t["[[Value]]"]),"[[Writable]]"in t&&(e.writable=t["[[Writable]]"]),"[[Get]]"in t&&(e.get=t["[[Get]]"]),"[[Set]]"in t&&(e.set=t["[[Set]]"]),"[[Enumerable]]"in t&&(e.enumerable=t["[[Enumerable]]"]),"[[Configurable]]"in t&&(e.configurable=t["[[Configurable]]"]),e},CompletePropertyDescriptor:function(t){return T(this,"Property Descriptor","Desc",t),this.IsGenericDescriptor(t)||this.IsDataDescriptor(t)?(n(t,"[[Value]]")||(t["[[Value]]"]=void 0),n(t,"[[Writable]]")||(t["[[Writable]]"]=!1)):(n(t,"[[Get]]")||(t["[[Get]]"]=void 0),n(t,"[[Set]]")||(t["[[Set]]"]=void 0)),n(t,"[[Enumerable]]")||(t["[[Enumerable]]"]=!1),n(t,"[[Configurable]]")||(t["[[Configurable]]"]=!1),t},Set:function(t,e,r,n){if("Object"!==this.Type(t))throw new u("O must be an Object");if(!this.IsPropertyKey(e))throw new u("P must be a Property Key");if("Boolean"!==this.Type(n))throw new u("Throw must be a Boolean");if(n)return t[e]=r,!0;try{t[e]=r}catch(t){return!1}},HasOwnProperty:function(t,e){if("Object"!==this.Type(t))throw new u("O must be an Object");if(!this.IsPropertyKey(e))throw new u("P must be a Property Key");return n(t,e)},HasProperty:function(t,e){if("Object"!==this.Type(t))throw new u("O must be an Object");if(!this.IsPropertyKey(e))throw new u("P must be a Property Key");return e in t},IsConcatSpreadable:function(t){if("Object"!==this.Type(t))return!1;if(w&&"symbol"==typeof m.isConcatSpreadable){var e=this.Get(t,Symbol.isConcatSpreadable);if(void 0!==e)return this.ToBoolean(e)}return this.IsArray(t)},Invoke:function(t,e){if(!this.IsPropertyKey(e))throw new u("P must be a Property Key");var r=B(arguments,2),n=this.GetV(t,e);return this.Call(n,t,r)},GetIterator:function(t,e){var r=e;arguments.length<2&&(r=U(this,t));var n=this.Call(r,t);if("Object"!==this.Type(n))throw new u("iterator must return an object");return n},IteratorNext:function(t,e){var r=this.Invoke(t,"next",arguments.length<2?[]:[e]);if("Object"!==this.Type(r))throw new u("iterator next must return an object");return r},IteratorComplete:function(t){if("Object"!==this.Type(t))throw new u("Assertion failed: Type(iterResult) is not Object");return this.ToBoolean(this.Get(t,"done"))},IteratorValue:function(t){if("Object"!==this.Type(t))throw new u("Assertion failed: Type(iterResult) is not Object");return this.Get(t,"value")},IteratorStep:function(t){var e=this.IteratorNext(t);return!0!==this.IteratorComplete(e)&&e},IteratorClose:function(t,e){if("Object"!==this.Type(t))throw new u("Assertion failed: Type(iterator) is not Object");if(!this.IsCallable(e))throw new u("Assertion failed: completion is not a thunk for a Completion Record");var r,n=e,i=this.GetMethod(t,"return");if(void 0===i)return n();try{var o=this.Call(i,t,[])}catch(t){throw r=n(),n=null,t}if(r=n(),n=null,"Object"!==this.Type(o))throw new u("iterator .return must return an object");return r},CreateIterResultObject:function(t,e){if("Boolean"!==this.Type(e))throw new u("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}},RegExpExec:function(t,e){if("Object"!==this.Type(t))throw new u("R must be an Object");if("String"!==this.Type(e))throw new u("S must be a String");var r=this.Get(t,"exec");if(this.IsCallable(r)){var n=this.Call(r,t,[e]);if(null===n||"Object"===this.Type(n))return n;throw new u('"exec" method must return `null` or an Object')}return H(t,e)},ArraySpeciesCreate:function(t,e){if(!this.IsInteger(e)||e<0)throw new u("Assertion failed: length must be an integer >= 0");var r,n=0===e?0:e;if(this.IsArray(t)&&(r=this.Get(t,"constructor"),"Object"===this.Type(r)&&w&&m.species&&null===(r=this.Get(r,m.species))&&(r=void 0)),void 0===r)return h(n);if(!this.IsConstructor(r))throw new u("C must be a constructor");return new r(n)},CreateDataProperty:function(t,e,r){if("Object"!==this.Type(t))throw new u("Assertion failed: Type(O) is not Object");if(!this.IsPropertyKey(e))throw new u("Assertion failed: IsPropertyKey(P) is not true");var n=ut(t,e),i=n||this.IsExtensible(t);return!(n&&(!n.writable||!n.configurable)||!i)&&dt(this,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Value]]":r,"[[Writable]]":!0})},CreateDataPropertyOrThrow:function(t,e,r){if("Object"!==this.Type(t))throw new u("Assertion failed: Type(O) is not Object");if(!this.IsPropertyKey(e))throw new u("Assertion failed: IsPropertyKey(P) is not true");var n=this.CreateDataProperty(t,e,r);if(!n)throw new u("unable to create data property");return n},ObjectCreate:function(t,e){if(null!==t&&"Object"!==this.Type(t))throw new u("Assertion failed: proto must be null or an object");var r=arguments.length<2?[]:e;if(r.length>0)throw new l("es-abstract does not yet support internal slots");if(null===t&&!at)throw new l("native Object.create support is required to create null objects");return at(t)},AdvanceStringIndex:function(t,e,r){if("String"!==this.Type(t))throw new u("S must be a String");if(!this.IsInteger(e)||e<0||e>x)throw new u("Assertion failed: length must be an integer >= 0 and <= 2**53");if("Boolean"!==this.Type(r))throw new u("Assertion failed: unicode must be a Boolean");if(!r)return e+1;if(e+1>=t.length)return e+1;var n=J(t,e);if(n<55296||n>56319)return e+1;var i=J(t,e+1);return i<56320||i>57343?e+1:e+2},CreateMethodProperty:function(t,e,r){if("Object"!==this.Type(t))throw new u("Assertion failed: Type(O) is not Object");if(!this.IsPropertyKey(e))throw new u("Assertion failed: IsPropertyKey(P) is not true");return dt(this,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})},DefinePropertyOrThrow:function(t,e,r){if("Object"!==this.Type(t))throw new u("Assertion failed: Type(O) is not Object");if(!this.IsPropertyKey(e))throw new u("Assertion failed: IsPropertyKey(P) is not true");var n=k(this,r)?r:this.ToPropertyDescriptor(r);if(!k(this,n))throw new u("Assertion failed: Desc is not a valid Property Descriptor");return dt(this,t,e,n)},DeletePropertyOrThrow:function(t,e){if("Object"!==this.Type(t))throw new u("Assertion failed: Type(O) is not Object");if(!this.IsPropertyKey(e))throw new u("Assertion failed: IsPropertyKey(P) is not true");var r=delete t[e];if(!r)throw new TypeError("Attempt to delete property failed.");return r},EnumerableOwnNames:function(t){if("Object"!==this.Type(t))throw new u("Assertion failed: Type(O) is not Object");return o(t)},thisNumberValue:function(t){return"Number"===this.Type(t)?t:tt(t)},thisBooleanValue:function(t){return"Boolean"===this.Type(t)?t:et(t)},thisStringValue:function(t){return"String"===this.Type(t)?t:rt(t)},thisTimeValue:function(t){return nt(t)},SetIntegrityLevel:function(t,e){if("Object"!==this.Type(t))throw new u("Assertion failed: Type(O) is not Object");if("sealed"!==e&&"frozen"!==e)throw new u('Assertion failed: `level` must be `"sealed"` or `"frozen"`');if(!_)throw new l("SetIntegrityLevel requires native `Object.preventExtensions` support");if(!_(t))return!1;if(!ct)throw new l("SetIntegrityLevel requires native `Object.getOwnPropertyNames` support");var r=ct(t),n=this;return"sealed"===e?A(r,(function(e){n.DefinePropertyOrThrow(t,e,{configurable:!1})})):"frozen"===e&&A(r,(function(e){var r,i=ut(t,e);void 0!==i&&(r=n.IsAccessorDescriptor(n.ToPropertyDescriptor(i))?{configurable:!1}:{configurable:!1,writable:!1},n.DefinePropertyOrThrow(t,e,r))})),!0},TestIntegrityLevel:function(t,e){if("Object"!==this.Type(t))throw new u("Assertion failed: Type(O) is not Object");if("sealed"!==e&&"frozen"!==e)throw new u('Assertion failed: `level` must be `"sealed"` or `"frozen"`');if(this.IsExtensible(t))return!1;var r=ct(t),n=this;return 0===r.length||j(r,(function(r){var i=ut(t,r);if(void 0!==i){if(i.configurable)return!1;if("frozen"===e&&n.IsDataDescriptor(n.ToPropertyDescriptor(i))&&i.writable)return!1}return!0}))},OrdinaryHasInstance:function(t,e){if(!1===this.IsCallable(t))return!1;if("Object"!==this.Type(e))return!1;var r=this.Get(t,"prototype");if("Object"!==this.Type(r))throw new u("OrdinaryHasInstance called on an object with an invalid prototype property.");return e instanceof t},OrdinaryHasProperty:function(t,e){if("Object"!==this.Type(t))throw new u("Assertion failed: Type(O) is not Object");if(!this.IsPropertyKey(e))throw new u("Assertion failed: P must be a Property Key");return e in t},InstanceofOperator:function(t,e){if("Object"!==this.Type(t))throw new u("Assertion failed: Type(O) is not Object");var r=w&&m.hasInstance?this.GetMethod(e,m.hasInstance):void 0;if(void 0!==r)return this.ToBoolean(this.Call(r,e,[t]));if(!this.IsCallable(e))throw new u("`C` is not Callable");return this.OrdinaryHasInstance(e,t)},IsPromise:function(t){if("Object"!==this.Type(t))return!1;if(!F)return!1;try{F(t)}catch(t){return!1}return!0},"Abstract Equality Comparison":function(t,e){var r=this.Type(t),n=this.Type(e);return r===n?t===e:null==t&&null==e||("Number"===r&&"String"===n?this["Abstract Equality Comparison"](t,this.ToNumber(e)):"String"===r&&"Number"===n?this["Abstract Equality Comparison"](this.ToNumber(t),e):"Boolean"===r?this["Abstract Equality Comparison"](this.ToNumber(t),e):"Boolean"===n?this["Abstract Equality Comparison"](t,this.ToNumber(e)):"String"!==r&&"Number"!==r&&"Symbol"!==r||"Object"!==n?"Object"===r&&("String"===n||"Number"===n||"Symbol"===n)&&this["Abstract Equality Comparison"](this.ToPrimitive(t),e):this["Abstract Equality Comparison"](t,this.ToPrimitive(e)))},ValidateAndApplyPropertyDescriptor:function(t,e,r,n,i){var o=this.Type(t);if("Undefined"!==o&&"Object"!==o)throw new u("Assertion failed: O must be undefined or an Object");if("Boolean"!==this.Type(r))throw new u("Assertion failed: extensible must be a Boolean");if(!k(this,n))throw new u("Assertion failed: Desc must be a Property Descriptor");if("Undefined"!==this.Type(i)&&!k(this,i))throw new u("Assertion failed: current must be a Property Descriptor, or undefined");if("Undefined"!==o&&!this.IsPropertyKey(e))throw new u("Assertion failed: if O is not undefined, P must be a Property Key");if("Undefined"===this.Type(i)){if(!r)return!1;if(this.IsGenericDescriptor(n)||this.IsDataDescriptor(n))"Undefined"!==o&&dt(this,t,e,{"[[Configurable]]":n["[[Configurable]]"],"[[Enumerable]]":n["[[Enumerable]]"],"[[Value]]":n["[[Value]]"],"[[Writable]]":n["[[Writable]]"]});else{if(!this.IsAccessorDescriptor(n))throw new u("Assertion failed: Desc is not an accessor descriptor");if("Undefined"!==o)return dt(this,t,e,n)}return!0}if(this.IsGenericDescriptor(n)&&!("[[Configurable]]"in n)&&!("[[Enumerable]]"in n))return!0;if(P(this,n,i))return!0;if(!i["[[Configurable]]"]){if(n["[[Configurable]]"])return!1;if("[[Enumerable]]"in n&&!n["[[Enumerable]]"]==!!i["[[Enumerable]]"])return!1}if(this.IsGenericDescriptor(n));else if(this.IsDataDescriptor(i)!==this.IsDataDescriptor(n)){if(!i["[[Configurable]]"])return!1;this.IsDataDescriptor(i)?"Undefined"!==o&&dt(this,t,e,{"[[Configurable]]":i["[[Configurable]]"],"[[Enumerable]]":i["[[Enumerable]]"],"[[Get]]":void 0}):"Undefined"!==o&&dt(this,t,e,{"[[Configurable]]":i["[[Configurable]]"],"[[Enumerable]]":i["[[Enumerable]]"],"[[Value]]":void 0})}else if(this.IsDataDescriptor(i)&&this.IsDataDescriptor(n)){if(!i["[[Configurable]]"]&&!i["[[Writable]]"])return!("[[Writable]]"in n&&n["[[Writable]]"])&&!("[[Value]]"in n&&!this.SameValue(n["[[Value]]"],i["[[Value]]"]))}else{if(!this.IsAccessorDescriptor(i)||!this.IsAccessorDescriptor(n))throw new u("Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.");if(!i["[[Configurable]]"])return!("[[Set]]"in n&&!this.SameValue(n["[[Set]]"],i["[[Set]]"]))&&!("[[Get]]"in n&&!this.SameValue(n["[[Get]]"],i["[[Get]]"]))}return"Undefined"===o||dt(this,t,e,n)},OrdinaryDefineOwnProperty:function(t,e,r){if("Object"!==this.Type(t))throw new u("Assertion failed: O must be an Object");if(!this.IsPropertyKey(e))throw new u("Assertion failed: P must be a Property Key");if(!k(this,r))throw new u("Assertion failed: Desc must be a Property Descriptor");var n=ut(t,e),i=n&&this.ToPropertyDescriptor(n),o=this.IsExtensible(t);return this.ValidateAndApplyPropertyDescriptor(t,e,o,r,i)},OrdinaryGetOwnProperty:function(t,e){if("Object"!==this.Type(t))throw new u("Assertion failed: O must be an Object");if(!this.IsPropertyKey(e))throw new u("Assertion failed: P must be a Property Key");if(n(t,e)){if(!ut){var r=this.IsArray(t)&&"length"===e,i=this.IsRegExp(t)&&"lastIndex"===e;return{"[[Configurable]]":!(r||i),"[[Enumerable]]":Q(t,e),"[[Value]]":t[e],"[[Writable]]":!0}}return this.ToPropertyDescriptor(ut(t,e))}},ArrayCreate:function(t){if(!this.IsInteger(t)||t<0)throw new u("Assertion failed: `length` must be an integer Number >= 0");if(t>O)throw new c("length is greater than (2**32 - 1)");var e=arguments.length>1?arguments[1]:p,r=[];if(e!==p){if(!ft)throw new l("ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]");ft(r,e)}return 0!==t&&(r.length=t),r},ArraySetLength:function(t,e){if(!this.IsArray(t))throw new u("Assertion failed: A must be an Array");if(!k(this,e))throw new u("Assertion failed: Desc must be a Property Descriptor");if(!("[[Value]]"in e))return this.OrdinaryDefineOwnProperty(t,"length",e);var r=I({},e),n=this.ToUint32(e["[[Value]]"]);if(n!==this.ToNumber(e["[[Value]]"]))throw new c("Invalid array length");r["[[Value]]"]=n;var i=this.OrdinaryGetOwnProperty(t,"length");if(!this.IsDataDescriptor(i))throw new u("Assertion failed: an array had a non-data descriptor on `length`");var o,s=i["[[Value]]"];if(n>=s)return this.OrdinaryDefineOwnProperty(t,"length",r);if(!i["[[Writable]]"])return!1;if("[[Writable]]"in r&&!r["[[Writable]]"]?(o=!1,r["[[Writable]]"]=!0):o=!0,!this.OrdinaryDefineOwnProperty(t,"length",r))return!1;for(;n<s;){if(s-=1,!delete t[this.ToString(s)]&&(r["[[Value]]"]=s+1,!o))return r["[[Writable]]"]=!1,this.OrdinaryDefineOwnProperty(t,"length",r),!1}return!!o||this.OrdinaryDefineOwnProperty(t,"length",{"[[Writable]]":!1})},CreateHTML:function(t,e,r,n){if("String"!==this.Type(e)||"String"!==this.Type(r))throw new u("Assertion failed: `tag` and `attribute` must be strings");var i=this.RequireObjectCoercible(t),o=this.ToString(i),s="<"+e;if(""!==r){var a=this.ToString(n);s+=" "+r+'="'+gt(a,/\x22/g,"&quot;")+'"'}return s+">"+o+"</"+e+">"},GetOwnPropertyKeys:function(t,e){if("Object"!==this.Type(t))throw new u("Assertion failed: Type(O) is not Object");if("Symbol"===e)return w&&lt?lt(t):[];if("String"===e)return ct?ct(t):o(t);throw new u('Assertion failed: `Type` must be `"String"` or `"Symbol"`')},SymbolDescriptiveString:function(t){if("Symbol"!==this.Type(t))throw new u("Assertion failed: `sym` must be a Symbol");return it(t)},GetSubstitution:function(t,e,r,n,i){if("String"!==this.Type(t))throw new u("Assertion failed: `matched` must be a String");var o=t.length;if("String"!==this.Type(e))throw new u("Assertion failed: `str` must be a String");var a=e.length;if(!this.IsInteger(r)||r<0||r>a)throw new u("Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got "+s(r));var c=this;if(!this.IsArray(n)||!j(n,(function(t,e,r){return"String"===c.Type(t)||!(e in r)})))throw new u("Assertion failed: `captures` must be a List of Strings, got "+s(n));if("String"!==this.Type(i))throw new u("Assertion failed: `replacement` must be a String");for(var l=r+o,h=n.length,p="",f=0;f<i.length;f+=1){var d=i[f],y=f+1>=i.length,m=f+2>=i.length;if("$"!==d||y)p+=i[f];else{var g=i[f+1];if("$"===g)p+="$",f+=1;else if("&"===g)p+=t,f+=1;else if("`"===g)p+=0===r?"":$(e,0,r-1),f+=1;else if("'"===g)p+=l>=a?"":$(e,l),f+=1;else{var b=m?null:i[f+2];if(!z(g)||"0"===g||!m&&z(b))if(z(g)&&(m||z(b))){var v=g+b,_=L(v,10)-1;p+=v<=h&&"Undefined"===this.Type(n[_])?"":n[_],f+=2}else p+="$";else{var w=L(g,10);p+=w<=h&&"Undefined"===this.Type(n[w-1])?"":n[w-1],f+=1}}}}return p},ToDateString:function(t){if("Number"!==this.Type(t))throw new u("Assertion failed: `tv` must be a Number");return E(t)?"Invalid Date":b(t)},CreateListFromArrayLike:function(t){var e=arguments.length>1?arguments[1]:["Undefined","Null","Boolean","String","Symbol","Number","Object"];if("Object"!==this.Type(t))throw new u("Assertion failed: `obj` must be an Object");if(!this.IsArray(e))throw new u("Assertion failed: `elementTypes`, if provided, must be an array");for(var r=this.ToLength(this.Get(t,"length")),n=[],i=0;i<r;){var o=this.ToString(i),s=this.Get(t,o),a=this.Type(s);if(X(e,a)<0)throw new u("item type "+a+" is not a valid elementType");V(n,s),i+=1}return n},GetPrototypeFromConstructor:function(t,e){var r=a(e);if(!this.IsConstructor(t))throw new u("Assertion failed: `constructor` must be a constructor");var n=this.Get(t,"prototype");if("Object"!==this.Type(n)){if(!(t instanceof v))throw new u("cross-realm constructors not currently supported");n=r}return n},SetFunctionName:function(t,e){if("function"!=typeof t)throw new u("Assertion failed: `F` must be a function");if(!this.IsExtensible(t)||n(t,"name"))throw new u("Assertion failed: `F` must be extensible, and must not have a `name` own property");var r=this.Type(e);if("Symbol"!==r&&"String"!==r)throw new u("Assertion failed: `name` must be a Symbol or a String");if("Symbol"===r){var i=q(e);e=void 0===i?"":"["+i+"]"}if(arguments.length>2){var o=arguments[2];e=o+" "+e}return this.DefinePropertyOrThrow(t,"name",{"[[Value]]":e,"[[Writable]]":!1,"[[Enumerable]]":!1,"[[Configurable]]":!0})}});delete _t.CheckObjectCoercible,e.exports=_t},{"./GetIntrinsic":47,"./es5":50,"./helpers/assertRecord":52,"./helpers/assign":53,"./helpers/callBound":55,"./helpers/every":56,"./helpers/forEach":57,"./helpers/getIteratorMethod":59,"./helpers/getSymbolDescription":61,"./helpers/isFinite":62,"./helpers/isNaN":63,"./helpers/isPrimitive":65,"./helpers/isPropertyDescriptor":66,"./helpers/isSamePropertyDescriptor":67,"./helpers/maxSafeInteger":68,"./helpers/mod":69,"./helpers/regexTester":70,"./helpers/setProto":71,"./helpers/sign":72,"es-to-primitive/es6":75,has:117,"has-symbols":115,"is-regex":123,"object-inspect":129,"object-keys":131}],49:[function(t,e,r){"use strict";var n=t("./es2015"),i=t("./GetIntrinsic"),o=t("./helpers/assign"),s=t("./helpers/setProto"),a=t("./helpers/callBound"),u=t("./helpers/getIteratorMethod"),c=i("%TypeError%"),l=a("Array.prototype.push"),h=t("./helpers/getProto"),p=o(o({},n),{SameValueNonNumber:function(t,e){if("number"==typeof t||typeof t!=typeof e)throw new TypeError("SameValueNonNumber requires two non-number values of the same type.");return this.SameValue(t,e)},IterableToArrayLike:function(t){var e=u(this,t);if(void 0!==e){for(var r=this.GetIterator(t,e),n=[],i=!0;i;)if(i=this.IteratorStep(r)){var o=this.IteratorValue(i);l(n,o)}return n}return this.ToObject(t)},OrdinaryGetPrototypeOf:function(t){if("Object"!==this.Type(t))throw new c("Assertion failed: O must be an Object");if(!h)throw new c("This environment does not support fetching prototypes.");return h(t)},OrdinarySetPrototypeOf:function(t,e){if("Object"!==this.Type(e)&&"Null"!==this.Type(e))throw new c("Assertion failed: V must be Object or Null");try{s(t,e)}catch(t){return!1}return this.OrdinaryGetPrototypeOf(t)===e}});e.exports=p},{"./GetIntrinsic":47,"./es2015":48,"./helpers/assign":53,"./helpers/callBound":55,"./helpers/getIteratorMethod":59,"./helpers/getProto":60,"./helpers/setProto":71}],50:[function(t,e,r){"use strict";var n=t("./GetIntrinsic"),i=n("%Object%"),o=n("%EvalError%"),s=n("%TypeError%"),a=n("%String%"),u=n("%Date%"),c=n("%Number%"),l=n("%Math.floor%"),h=n("%Date.UTC%"),p=n("%Math.abs%"),f=t("./helpers/assertRecord"),d=t("./helpers/isPropertyDescriptor"),y=t("./helpers/isNaN"),m=t("./helpers/isFinite"),g=t("./helpers/sign"),b=t("./helpers/mod"),v=t("./helpers/isPrefixOf"),_=t("./helpers/callBound"),w=t("is-callable"),T=t("es-to-primitive/es5"),E=t("has"),S=_("Date.prototype.getUTCFullYear"),O={ToPrimitive:T,ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var e=this.ToNumber(t);return y(e)?0:0!==e&&m(e)?g(e)*Math.floor(Math.abs(e)):e},ToInt32:function(t){return this.ToNumber(t)>>0},ToUint32:function(t){return this.ToNumber(t)>>>0},ToUint16:function(t){var e=this.ToNumber(t);if(y(e)||0===e||!m(e))return 0;var r=g(e)*Math.floor(Math.abs(e));return b(r,65536)},ToString:function(t){return a(t)},ToObject:function(t){return this.CheckObjectCoercible(t),i(t)},CheckObjectCoercible:function(t,e){if(null==t)throw new s(e||"Cannot call method on "+t);return t},IsCallable:w,SameValue:function(t,e){return t===e?0!==t||1/t==1/e:y(t)&&y(e)},Type:function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0},IsPropertyDescriptor:function(t){return d(this,t)},IsAccessorDescriptor:function(t){return void 0!==t&&(f(this,"Property Descriptor","Desc",t),!(!E(t,"[[Get]]")&&!E(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(f(this,"Property Descriptor","Desc",t),!(!E(t,"[[Value]]")&&!E(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(f(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(f(this,"Property Descriptor","Desc",t),this.IsDataDescriptor(t))return{value:t["[[Value]]"],writable:!!t["[[Writable]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};if(this.IsAccessorDescriptor(t))return{get:t["[[Get]]"],set:t["[[Set]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};throw new s("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new s("ToPropertyDescriptor requires an object");var e={};if(E(t,"enumerable")&&(e["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),E(t,"configurable")&&(e["[[Configurable]]"]=this.ToBoolean(t.configurable)),E(t,"value")&&(e["[[Value]]"]=t.value),E(t,"writable")&&(e["[[Writable]]"]=this.ToBoolean(t.writable)),E(t,"get")){var r=t.get;if(void 0!==r&&!this.IsCallable(r))throw new TypeError("getter must be a function");e["[[Get]]"]=r}if(E(t,"set")){var n=t.set;if(void 0!==n&&!this.IsCallable(n))throw new s("setter must be a function");e["[[Set]]"]=n}if((E(e,"[[Get]]")||E(e,"[[Set]]"))&&(E(e,"[[Value]]")||E(e,"[[Writable]]")))throw new s("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e},"Abstract Equality Comparison":function(t,e){var r=this.Type(t),n=this.Type(e);return r===n?t===e:null==t&&null==e||("Number"===r&&"String"===n?this["Abstract Equality Comparison"](t,this.ToNumber(e)):"String"===r&&"Number"===n?this["Abstract Equality Comparison"](this.ToNumber(t),e):"Boolean"===r?this["Abstract Equality Comparison"](this.ToNumber(t),e):"Boolean"===n?this["Abstract Equality Comparison"](t,this.ToNumber(e)):"String"!==r&&"Number"!==r||"Object"!==n?"Object"===r&&("String"===n||"Number"===n)&&this["Abstract Equality Comparison"](this.ToPrimitive(t),e):this["Abstract Equality Comparison"](t,this.ToPrimitive(e)))},"Strict Equality Comparison":function(t,e){var r=this.Type(t);return r===this.Type(e)&&("Undefined"===r||"Null"===r||t===e)},"Abstract Relational Comparison":function(t,e,r){if("Boolean"!==this.Type(r))throw new s("Assertion failed: LeftFirst argument must be a Boolean");var n,i;if(r?(n=this.ToPrimitive(t,c),i=this.ToPrimitive(e,c)):(i=this.ToPrimitive(e,c),n=this.ToPrimitive(t,c)),!("String"===this.Type(n)&&"String"===this.Type(i))){var o=this.ToNumber(n),a=this.ToNumber(i);if(y(o)||y(a))return;return(!m(o)||!m(a)||o!==a)&&((0!==o||0!==a)&&(o!==1/0&&(a===1/0||a!==-1/0&&(o===-1/0||o<a))))}return!v(i,n)&&(!!v(n,i)||n<i)},msFromTime:function(t){return b(t,1e3)},SecFromTime:function(t){return b(l(t/1e3),60)},MinFromTime:function(t){return b(l(t/6e4),60)},HourFromTime:function(t){return b(l(t/36e5),24)},Day:function(t){return l(t/864e5)},TimeWithinDay:function(t){return b(t,864e5)},DayFromYear:function(t){return 365*(t-1970)+l((t-1969)/4)-l((t-1901)/100)+l((t-1601)/400)},TimeFromYear:function(t){return 864e5*this.DayFromYear(t)},YearFromTime:function(t){return S(new u(t))},WeekDay:function(t){return b(this.Day(t)+4,7)},DaysInYear:function(t){return 0!==b(t,4)?365:0!==b(t,100)?366:0!==b(t,400)?365:366},InLeapYear:function(t){var e=this.DaysInYear(this.YearFromTime(t));if(365===e)return 0;if(366===e)return 1;throw new o("Assertion failed: there are not 365 or 366 days in a year, got: "+e)},DayWithinYear:function(t){return this.Day(t)-this.DayFromYear(this.YearFromTime(t))},MonthFromTime:function(t){var e=this.DayWithinYear(t);if(0<=e&&e<31)return 0;var r=this.InLeapYear(t);return 31<=e&&e<59+r?1:59+r<=e&&e<90+r?2:90+r<=e&&e<120+r?3:120+r<=e&&e<151+r?4:151+r<=e&&e<181+r?5:181+r<=e&&e<212+r?6:212+r<=e&&e<243+r?7:243+r<=e&&e<273+r?8:273+r<=e&&e<304+r?9:304+r<=e&&e<334+r?10:334+r<=e&&e<365+r?11:void 0},DateFromTime:function(t){var e=this.MonthFromTime(t),r=this.DayWithinYear(t);if(0===e)return r+1;if(1===e)return r-30;var n=this.InLeapYear(t);if(2===e)return r-58-n;if(3===e)return r-89-n;if(4===e)return r-119-n;if(5===e)return r-150-n;if(6===e)return r-180-n;if(7===e)return r-211-n;if(8===e)return r-242-n;if(9===e)return r-272-n;if(10===e)return r-303-n;if(11===e)return r-333-n;throw new o("Assertion failed: MonthFromTime returned an impossible value: "+e)},MakeDay:function(t,e,r){if(!m(t)||!m(e)||!m(r))return NaN;var n=this.ToInteger(t),i=this.ToInteger(e),o=this.ToInteger(r),s=n+l(i/12),a=b(i,12),u=h(s,a,1);return this.YearFromTime(u)!==s||this.MonthFromTime(u)!==a||1!==this.DateFromTime(u)?NaN:this.Day(u)+o-1},MakeDate:function(t,e){return m(t)&&m(e)?864e5*t+e:NaN},MakeTime:function(t,e,r,n){return m(t)&&m(e)&&m(r)&&m(n)?36e5*this.ToInteger(t)+6e4*this.ToInteger(e)+1e3*this.ToInteger(r)+this.ToInteger(n):NaN},TimeClip:function(t){return!m(t)||p(t)>864e13?NaN:c(new u(this.ToNumber(t)))},modulo:function(t,e){return b(t,e)}};e.exports=O},{"./GetIntrinsic":47,"./helpers/assertRecord":52,"./helpers/callBound":55,"./helpers/isFinite":62,"./helpers/isNaN":63,"./helpers/isPrefixOf":64,"./helpers/isPropertyDescriptor":66,"./helpers/mod":69,"./helpers/sign":72,"es-to-primitive/es5":74,has:117,"is-callable":121}],51:[function(t,e,r){"use strict";e.exports=t("./es2016")},{"./es2016":49}],52:[function(t,e,r){"use strict";var n=t("../GetIntrinsic"),i=n("%TypeError%"),o=n("%SyntaxError%"),s=t("has"),a={"Property Descriptor":function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(s(e,n)&&!r[n])return!1;var o=s(e,"[[Value]]"),a=s(e,"[[Get]]")||s(e,"[[Set]]");if(o&&a)throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}};e.exports=function(t,e,r,n){var s=a[e];if("function"!=typeof s)throw new o("unknown record type: "+e);if(!s(t,n))throw new i(r+" must be a "+e)}},{"../GetIntrinsic":47,has:117}],53:[function(t,e,r){"use strict";var n=t("../GetIntrinsic"),i=t("has"),o=n("%Object%").assign;e.exports=function(t,e){if(o)return o(t,e);for(var r in e)i(e,r)&&(t[r]=e[r]);return t}},{"../GetIntrinsic":47,has:117}],54:[function(t,e,r){"use strict";var n=t("function-bind"),i=t("../GetIntrinsic")("%Function%"),o=i.apply,s=i.call;e.exports=function(){return n.apply(s,arguments)},e.exports.apply=function(){return n.apply(o,arguments)}},{"../GetIntrinsic":47,"function-bind":114}],55:[function(t,e,r){"use strict";var n=t("../GetIntrinsic"),i=t("./callBind"),o=i(n("String.prototype.indexOf"));e.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&o(t,".prototype.")?i(r):r}},{"../GetIntrinsic":47,"./callBind":54}],56:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=0;r<t.length;r+=1)if(!e(t[r],r,t))return!1;return!0}},{}],57:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=0;r<t.length;r+=1)e(t[r],r,t)}},{}],58:[function(t,e,r){"use strict";var n;try{n=Function("s","return { [s]() {} }[s].name;")}catch(t){}e.exports=n&&"inferred"===function(){}.name?n:null},{}],59:[function(t,e,r){"use strict";var n=t("has-symbols")(),i=t("../GetIntrinsic"),o=t("./callBound"),s=i("%Symbol.iterator%",!0),a=o("String.prototype.slice");e.exports=function(t,e){var r;return n?r=t.GetMethod(e,s):t.IsArray(e)?r=function(){var t=-1,e=this;return{next:function(){return{done:(t+=1)>=e.length,value:e[t]}}}}:"String"===t.Type(e)&&(r=function(){var r=0;return{next:function(){var n=t.AdvanceStringIndex(e,r,!0),i=a(e,r,n);return r=n,{done:n>e.length,value:i}}}}),r}},{"../GetIntrinsic":47,"./callBound":55,"has-symbols":115}],60:[function(t,e,r){"use strict";var n=t("../GetIntrinsic"),i=n("%Object.getPrototypeOf%",!0),o=n("%Array.prototype%");e.exports=i||([].__proto__===o?function(t){return t.__proto__}:null)},{"../GetIntrinsic":47}],61:[function(t,e,r){"use strict";var n=t("../GetIntrinsic"),i=t("./callBound"),o=n("%SyntaxError%"),s=i("Symbol.prototype.toString",!0),a=t("./getInferredName");e.exports=function(t){if(!s)throw new o("Symbols are not supported in this environment");var e=s(t);if(a){var r=a(t);if(""===r)return;return r.slice(1,-1)}var n=e.slice(7,-1);if(n)return n}},{"../GetIntrinsic":47,"./callBound":55,"./getInferredName":58}],62:[function(t,e,r){"use strict";var n=Number.isNaN||function(t){return t!=t};e.exports=Number.isFinite||function(t){return"number"==typeof t&&!n(t)&&t!==1/0&&t!==-1/0}},{}],63:[function(t,e,r){"use strict";e.exports=Number.isNaN||function(t){return t!=t}},{}],64:[function(t,e,r){"use strict";var n=t("../helpers/callBound")("String.prototype.slice");e.exports=function(t,e){return t===e||!(t.length>e.length)&&n(e,0,t.length)===t}},{"../helpers/callBound":55}],65:[function(t,e,r){"use strict";e.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},{}],66:[function(t,e,r){"use strict";var n=t("../GetIntrinsic"),i=t("has"),o=n("%TypeError%");e.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(i(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new o("Property Descriptors may not be both accessor and data descriptors");return!0}},{"../GetIntrinsic":47,has:117}],67:[function(t,e,r){"use strict";var n=t("./every");e.exports=function(t,e,r){return n(["[[Configurable]]","[[Enumerable]]","[[Get]]","[[Set]]","[[Value]]","[[Writable]]"],(function(n){return n in e==n in r&&t.SameValue(e[n],r[n])}))}},{"./every":56}],68:[function(t,e,r){"use strict";var n=t("../GetIntrinsic"),i=n("%Math%"),o=n("%Number%");e.exports=o.MAX_SAFE_INTEGER||i.pow(2,53)-1},{"../GetIntrinsic":47}],69:[function(t,e,r){"use strict";e.exports=function(t,e){var r=t%e;return Math.floor(r>=0?r:r+e)}},{}],70:[function(t,e,r){"use strict";var n=t("../GetIntrinsic")("RegExp.prototype.test"),i=t("./callBind");e.exports=function(t){return i(n,t)}},{"../GetIntrinsic":47,"./callBind":54}],71:[function(t,e,r){"use strict";var n=t("../GetIntrinsic"),i=n("%Object.setPrototypeOf%",!0),o=n("%Array.prototype%");e.exports=i||([].__proto__!==o?null:function(t,e){return t.__proto__=e,t})},{"../GetIntrinsic":47}],72:[function(t,e,r){"use strict";e.exports=function(t){return t>=0?1:-1}},{}],73:[function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,i=t("./helpers/isPrimitive"),o=t("is-callable"),s=t("is-date-object"),a=t("is-symbol"),u=function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,s,a="string"===e?["toString","valueOf"]:["valueOf","toString"];for(s=0;s<a.length;++s)if(r=t[a[s]],o(r)&&(n=r.call(t),i(n)))return n;throw new TypeError("No default value")},c=function(t,e){var r=t[e];if(null!=r){if(!o(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}};e.exports=function(t){if(i(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=c(t,Symbol.toPrimitive):a(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var o=e.call(t,r);if(i(o))return o;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(s(t)||a(t))&&(r="string"),u(t,"default"===r?"number":r)}},{"./helpers/isPrimitive":76,"is-callable":121,"is-date-object":122,"is-symbol":124}],74:[function(t,e,r){"use strict";var n=Object.prototype.toString,i=t("./helpers/isPrimitive"),o=t("is-callable"),s=function(t){var e;if((e=arguments.length>1?arguments[1]:"[object Date]"===n.call(t)?String:Number)===String||e===Number){var r,s,a=e===String?["toString","valueOf"]:["valueOf","toString"];for(s=0;s<a.length;++s)if(o(t[a[s]])&&(r=t[a[s]](),i(r)))return r;throw new TypeError("No default value")}throw new TypeError("invalid [[DefaultValue]] hint supplied")};e.exports=function(t){return i(t)?t:arguments.length>1?s(t,arguments[1]):s(t)}},{"./helpers/isPrimitive":76,"is-callable":121}],75:[function(t,e,r){"use strict";e.exports=t("./es2015")},{"./es2015":73}],76:[function(t,e,r){arguments[4][65][0].apply(r,arguments)},{dup:65}],77:[function(t,e,r){var n=Object.create||function(t){var e=function(){};return e.prototype=t,new e},i=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return r},o=Function.prototype.bind||function(t){var e=this;return function(){return e.apply(t,arguments)}};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var a,u=10;try{var c={};Object.defineProperty&&Object.defineProperty(c,"x",{value:0}),a=0===c.x}catch(t){a=!1}function l(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function h(t,e,r){if(e)t.call(r);else for(var n=t.length,i=w(t,n),o=0;o<n;++o)i[o].call(r)}function p(t,e,r,n){if(e)t.call(r,n);else for(var i=t.length,o=w(t,i),s=0;s<i;++s)o[s].call(r,n)}function f(t,e,r,n,i){if(e)t.call(r,n,i);else for(var o=t.length,s=w(t,o),a=0;a<o;++a)s[a].call(r,n,i)}function d(t,e,r,n,i,o){if(e)t.call(r,n,i,o);else for(var s=t.length,a=w(t,s),u=0;u<s;++u)a[u].call(r,n,i,o)}function y(t,e,r,n){if(e)t.apply(r,n);else for(var i=t.length,o=w(t,i),s=0;s<i;++s)o[s].apply(r,n)}function m(t,e,r,i){var o,s,a;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((s=t._events)?(s.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),s=t._events),a=s[e]):(s=t._events=n(null),t._eventsCount=0),a){if("function"==typeof a?a=s[e]=i?[r,a]:[a,r]:i?a.unshift(r):a.push(r),!a.warned&&(o=l(t))&&o>0&&a.length>o){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",u.name,u.message)}}else a=s[e]=r,++t._eventsCount;return t}function g(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e<t.length;++e)t[e]=arguments[e];this.listener.apply(this.target,t)}}function b(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=o.call(g,n);return i.listener=r,n.wrapFn=i,i}function v(t,e,r){var n=t._events;if(!n)return[];var i=n[e];return i?"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):w(i,i.length):[]}function _(t){var e=this._events;if(e){var r=e[t];if("function"==typeof r)return 1;if(r)return r.length}return 0}function w(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}a?Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t||t<0||t!=t)throw new TypeError('"defaultMaxListeners" must be a positive number');u=t}}):s.defaultMaxListeners=u,s.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(t){var e,r,n,i,o,s,a="error"===t;if(s=this._events)a=a&&null==s.error;else if(!a)return!1;if(a){if(arguments.length>1&&(e=arguments[1]),e instanceof Error)throw e;var u=new Error('Unhandled "error" event. ('+e+")");throw u.context=e,u}if(!(r=s[t]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:h(r,c,this);break;case 2:p(r,c,this,arguments[1]);break;case 3:f(r,c,this,arguments[1],arguments[2]);break;case 4:d(r,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(n-1),o=1;o<n;o++)i[o-1]=arguments[o];y(r,c,this,i)}return!0},s.prototype.addListener=function(t,e){return m(this,t,e,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(t,e){return m(this,t,e,!0)},s.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,b(this,t,e)),this},s.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,b(this,t,e)),this},s.prototype.removeListener=function(t,e){var r,i,o,s,a;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(i=this._events))return this;if(!(r=i[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=n(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(o=-1,s=r.length-1;s>=0;s--)if(r[s]===e||r[s].listener===e){a=r[s].listener,o=s;break}if(o<0)return this;0===o?r.shift():function(t,e){for(var r=e,n=r+1,i=t.length;n<i;r+=1,n+=1)t[r]=t[n];t.pop()}(r,o),1===r.length&&(i[t]=r[0]),i.removeListener&&this.emit("removeListener",t,a||e)}return this},s.prototype.removeAllListeners=function(t){var e,r,o;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=n(null),this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=n(null):delete r[t]),this;if(0===arguments.length){var s,a=i(r);for(o=0;o<a.length;++o)"removeListener"!==(s=a[o])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=n(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(e)for(o=e.length-1;o>=0;o--)this.removeListener(t,e[o]);return this},s.prototype.listeners=function(t){return v(this,t,!0)},s.prototype.rawListeners=function(t){return v(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):_.call(t,e)},s.prototype.listenerCount=_,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],78:[function(t,e,r){"use strict";var n=t("./util/constants"),i=t("./mixins/logging"),o={VERSION:n.VERSION,Client:t("./protocol/client"),Scheduler:t("./protocol/scheduler")};i.wrapper=o,e.exports=o},{"./mixins/logging":80,"./protocol/client":84,"./protocol/scheduler":90,"./util/constants":102}],79:[function(t,e,r){(function(r){"use strict";var n=t("../util/promise");e.exports={then:function(t,e){var r=this;return this._promise||(this._promise=new n((function(t,e){r._resolve=t,r._reject=e}))),0===arguments.length?this._promise:this._promise.then(t,e)},callback:function(t,e){return this.then((function(r){t.call(e,r)}))},errback:function(t,e){return this.then(null,(function(r){t.call(e,r)}))},timeout:function(t,e){this.then();var n=this;this._timer=r.setTimeout((function(){n._reject(e)}),1e3*t)},setDeferredStatus:function(t,e){this._timer&&r.clearTimeout(this._timer),this.then(),"succeeded"===t?this._resolve(e):"failed"===t?this._reject(e):delete this._promise}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util/promise":107}],80:[function(t,e,r){"use strict";var n=t("../util/to_json"),i={LOG_LEVELS:{fatal:4,error:3,warn:2,info:1,debug:0},writeLog:function(t,e){var r=i.logger||(i.wrapper||i).logger;if(r){var o=Array.prototype.slice.apply(t),s="[Faye",a=this.className,u=o.shift().replace(/\?/g,(function(){try{return n(o.shift())}catch(t){return"[Object]"}}));a&&(s+="."+a),s+="] ","function"==typeof r[e]?r[e](s+u):"function"==typeof r&&r(s+u)}}};for(var o in i.LOG_LEVELS)!function(t){i[t]=function(){this.writeLog(arguments,t)}}(o);e.exports=i},{"../util/to_json":109}],81:[function(t,e,r){"use strict";var n={countListeners:function(t){return this.listeners(t).length},bind:function(t,e,r){var n=Array.prototype.slice,i=function(){e.apply(r,n.call(arguments))};return this._listeners=this._listeners||[],this._listeners.push([t,e,r,i]),this.on(t,i)},unbind:function(t,e,r){this._listeners=this._listeners||[];for(var n,i=this._listeners.length;i--;)(n=this._listeners[i])[0]===t&&(!e||n[1]===e&&n[2]===r)&&(this._listeners.splice(i,1),this.removeListener(t,n[3]))}};t("../util/extend")(n,t("../util/event_emitter").prototype),n.trigger=n.emit,e.exports=n},{"../util/event_emitter":105,"../util/extend":106}],82:[function(t,e,r){(function(t){"use strict";e.exports={addTimeout:function(e,r,n,i){if(this._timeouts=this._timeouts||{},!this._timeouts.hasOwnProperty(e)){var o=this;this._timeouts[e]=t.setTimeout((function(){delete o._timeouts[e],n.call(i)}),1e3*r)}},removeTimeout:function(e){this._timeouts=this._timeouts||{};var r=this._timeouts[e];r&&(t.clearTimeout(r),delete this._timeouts[e])},removeAllTimeouts:function(){for(var t in this._timeouts=this._timeouts||{},this._timeouts)this.removeTimeout(t)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],83:[function(t,e,r){"use strict";var n=t("../util/class"),i=t("../util/extend"),o=t("../mixins/publisher"),s=t("./grammar"),a=n({initialize:function(t){this.id=this.name=t},push:function(t){this.trigger("message",t)},isUnused:function(){return 0===this.countListeners("message")}});i(a.prototype,o),i(a,{HANDSHAKE:"/meta/handshake",CONNECT:"/meta/connect",SUBSCRIBE:"/meta/subscribe",UNSUBSCRIBE:"/meta/unsubscribe",DISCONNECT:"/meta/disconnect",META:"meta",SERVICE:"service",expand:function(t){var e=this.parse(t),r=["/**",t],n=e.slice();n[n.length-1]="*",r.push(this.unparse(n));for(var i=1,o=e.length;i<o;i++)(n=e.slice(0,i)).push("**"),r.push(this.unparse(n));return r},isValid:function(t){return s.CHANNEL_NAME.test(t)||s.CHANNEL_PATTERN.test(t)},parse:function(t){return this.isValid(t)?t.split("/").slice(1):null},unparse:function(t){return"/"+t.join("/")},isMeta:function(t){var e=this.parse(t);return e?e[0]===this.META:null},isService:function(t){var e=this.parse(t);return e?e[0]===this.SERVICE:null},isSubscribable:function(t){return this.isValid(t)?!this.isMeta(t)&&!this.isService(t):null},Set:n({initialize:function(){this._channels={}},getKeys:function(){var t=[];for(var e in this._channels)t.push(e);return t},remove:function(t){delete this._channels[t]},hasSubscription:function(t){return this._channels.hasOwnProperty(t)},subscribe:function(t,e){for(var r,n=0,i=t.length;n<i;n++){r=t[n],(this._channels[r]=this._channels[r]||new a(r)).bind("message",e)}},unsubscribe:function(t,e){var r=this._channels[t];return!!r&&(r.unbind("message",e),!!r.isUnused()&&(this.remove(t),!0))},distributeMessage:function(t){for(var e=a.expand(t.channel),r=0,n=e.length;r<n;r++){var i=this._channels[e[r]];i&&i.trigger("message",t)}}})}),e.exports=a},{"../mixins/publisher":81,"../util/class":101,"../util/extend":106,"./grammar":88}],84:[function(t,e,r){(function(r){"use strict";var n=t("asap"),i=t("../util/class"),o=(t("../util/promise"),t("../util/uri")),s=t("../util/array"),a=t("../util/browser"),u=t("../util/constants"),c=t("../util/extend"),l=t("../util/validate_options"),h=t("../mixins/deferrable"),p=t("../mixins/logging"),f=t("../mixins/publisher"),d=t("./channel"),y=t("./dispatcher"),m=t("./error"),g=t("./extensible"),b=t("./publication"),v=t("./subscription"),_=i({className:"Client",UNCONNECTED:1,CONNECTING:2,CONNECTED:3,DISCONNECTED:4,HANDSHAKE:"handshake",RETRY:"retry",NONE:"none",CONNECTION_TIMEOUT:60,DEFAULT_ENDPOINT:"/bayeux",INTERVAL:0,initialize:function(t,e){this.info("New client created for ?",t),l(e=e||{},["interval","timeout","endpoints","proxy","retry","scheduler","websocketExtensions","tls","ca"]),this._channels=new d.Set,this._dispatcher=y.create(this,t||this.DEFAULT_ENDPOINT,e),this._messageId=0,this._state=this.UNCONNECTED,this._responseCallbacks={},this._advice={reconnect:this.RETRY,interval:1e3*(e.interval||this.INTERVAL),timeout:1e3*(e.timeout||this.CONNECTION_TIMEOUT)},this._dispatcher.timeout=this._advice.timeout/1e3,this._dispatcher.bind("message",this._receiveMessage,this),a.Event&&void 0!==r.onbeforeunload&&a.Event.on(r,"beforeunload",(function(){s.indexOf(this._dispatcher._disabled,"autodisconnect")<0&&this.disconnect()}),this)},addWebsocketExtension:function(t){return this._dispatcher.addWebsocketExtension(t)},disable:function(t){return this._dispatcher.disable(t)},setHeader:function(t,e){return this._dispatcher.setHeader(t,e)},handshake:function(t,e){if(this._advice.reconnect!==this.NONE&&this._state===this.UNCONNECTED){this._state=this.CONNECTING;var i=this;this.info("Initiating handshake with ?",o.stringify(this._dispatcher.endpoint)),this._dispatcher.selectTransport(u.MANDATORY_CONNECTION_TYPES),this._sendMessage({channel:d.HANDSHAKE,version:u.BAYEUX_VERSION,supportedConnectionTypes:this._dispatcher.getConnectionTypes()},{},(function(o){o.successful?(this._state=this.CONNECTED,this._dispatcher.clientId=o.clientId,this._dispatcher.selectTransport(o.supportedConnectionTypes),this.info("Handshake successful: ?",this._dispatcher.clientId),this.subscribe(this._channels.getKeys(),!0),t&&n((function(){t.call(e)}))):(this.info("Handshake unsuccessful"),r.setTimeout((function(){i.handshake(t,e)}),1e3*this._dispatcher.retry),this._state=this.UNCONNECTED)}),this)}},connect:function(t,e){if(this._advice.reconnect!==this.NONE&&this._state!==this.DISCONNECTED){if(this._state===this.UNCONNECTED)return this.handshake((function(){this.connect(t,e)}),this);this.callback(t,e),this._state===this.CONNECTED&&(this.info("Calling deferred actions for ?",this._dispatcher.clientId),this.setDeferredStatus("succeeded"),this.setDeferredStatus("unknown"),this._connectRequest||(this._connectRequest=!0,this.info("Initiating connection for ?",this._dispatcher.clientId),this._sendMessage({channel:d.CONNECT,clientId:this._dispatcher.clientId,connectionType:this._dispatcher.connectionType},{},this._cycleConnection,this)))}},disconnect:function(){if(this._state===this.CONNECTED){this._state=this.DISCONNECTED,this.info("Disconnecting ?",this._dispatcher.clientId);var t=new b;return this._sendMessage({channel:d.DISCONNECT,clientId:this._dispatcher.clientId},{},(function(e){e.successful?(this._dispatcher.close(),t.setDeferredStatus("succeeded")):t.setDeferredStatus("failed",m.parse(e.error))}),this),this.info("Clearing channel listeners for ?",this._dispatcher.clientId),this._channels=new d.Set,t}},subscribe:function(t,e,r){if(t instanceof Array)return s.map(t,(function(t){return this.subscribe(t,e,r)}),this);var n=new v(this,t,e,r),i=!0===e;return this._channels.hasSubscription(t)&&!i?(this._channels.subscribe([t],n),n.setDeferredStatus("succeeded"),n):(this.connect((function(){this.info("Client ? attempting to subscribe to ?",this._dispatcher.clientId,t),i||this._channels.subscribe([t],n),this._sendMessage({channel:d.SUBSCRIBE,clientId:this._dispatcher.clientId,subscription:t},{},(function(e){if(!e.successful)return n.setDeferredStatus("failed",m.parse(e.error)),this._channels.unsubscribe(t,n);var r=[].concat(e.subscription);this.info("Subscription acknowledged for ? to ?",this._dispatcher.clientId,r),n.setDeferredStatus("succeeded")}),this)}),this),n)},unsubscribe:function(t,e){if(t instanceof Array)return s.map(t,(function(t){return this.unsubscribe(t,e)}),this);this._channels.unsubscribe(t,e)&&this.connect((function(){this.info("Client ? attempting to unsubscribe from ?",this._dispatcher.clientId,t),this._sendMessage({channel:d.UNSUBSCRIBE,clientId:this._dispatcher.clientId,subscription:t},{},(function(t){if(t.successful){var e=[].concat(t.subscription);this.info("Unsubscription acknowledged for ? from ?",this._dispatcher.clientId,e)}}),this)}),this)},publish:function(t,e,r){l(r||{},["attempts","deadline"]);var n=new b;return this.connect((function(){this.info("Client ? queueing published message to ?: ?",this._dispatcher.clientId,t,e),this._sendMessage({channel:t,data:e,clientId:this._dispatcher.clientId},r,(function(t){t.successful?n.setDeferredStatus("succeeded"):n.setDeferredStatus("failed",m.parse(t.error))}),this)}),this),n},_sendMessage:function(t,e,r,n){t.id=this._generateMessageId();var i=this._advice.timeout?1.2*this._advice.timeout/1e3:1.2*this._dispatcher.retry;this.pipeThroughExtensions("outgoing",t,null,(function(t){t&&(r&&(this._responseCallbacks[t.id]=[r,n]),this._dispatcher.sendMessage(t,i,e||{}))}),this)},_generateMessageId:function(){return this._messageId+=1,this._messageId>=Math.pow(2,32)&&(this._messageId=0),this._messageId.toString(36)},_receiveMessage:function(t){var e,r=t.id;void 0!==t.successful&&(e=this._responseCallbacks[r],delete this._responseCallbacks[r]),this.pipeThroughExtensions("incoming",t,null,(function(t){t&&(t.advice&&this._handleAdvice(t.advice),this._deliverMessage(t),e&&e[0].call(e[1],t))}),this)},_handleAdvice:function(t){c(this._advice,t),this._dispatcher.timeout=this._advice.timeout/1e3,this._advice.reconnect===this.HANDSHAKE&&this._state!==this.DISCONNECTED&&(this._state=this.UNCONNECTED,this._dispatcher.clientId=null,this._cycleConnection())},_deliverMessage:function(t){t.channel&&void 0!==t.data&&(this.info("Client ? calling listeners for ? with ?",this._dispatcher.clientId,t.channel,t.data),this._channels.distributeMessage(t))},_cycleConnection:function(){this._connectRequest&&(this._connectRequest=null,this.info("Closed connection for ?",this._dispatcher.clientId));var t=this;r.setTimeout((function(){t.connect()}),this._advice.interval)}});c(_.prototype,h),c(_.prototype,f),c(_.prototype,p),c(_.prototype,g),e.exports=_}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../mixins/deferrable":79,"../mixins/logging":80,"../mixins/publisher":81,"../util/array":99,"../util/browser":100,"../util/class":101,"../util/constants":102,"../util/extend":106,"../util/promise":107,"../util/uri":110,"../util/validate_options":111,"./channel":83,"./dispatcher":85,"./error":86,"./extensible":87,"./publication":89,"./subscription":91,asap:36}],85:[function(t,e,r){(function(r){"use strict";var n=t("../util/class"),i=t("../util/uri"),o=t("../util/cookies"),s=t("../util/extend"),a=t("../mixins/logging"),u=t("../mixins/publisher"),c=t("../transport"),l=t("./scheduler"),h=n({className:"Dispatcher",MAX_REQUEST_SIZE:2048,DEFAULT_RETRY:5,UP:1,DOWN:2,initialize:function(t,e,r){this._client=t,this.endpoint=i.parse(e),this._alternates=r.endpoints||{},this.cookies=o.CookieJar&&new o.CookieJar,this._disabled=[],this._envelopes={},this.headers={},this.retry=r.retry||this.DEFAULT_RETRY,this._scheduler=r.scheduler||l,this._state=0,this.transports={},this.wsExtensions=[],this.proxy=r.proxy||{},"string"==typeof this._proxy&&(this._proxy={origin:this._proxy});var n=r.websocketExtensions;if(n)for(var s=0,a=(n=[].concat(n)).length;s<a;s++)this.addWebsocketExtension(n[s]);for(var u in this.tls=r.tls||{},this.tls.ca=this.tls.ca||r.ca,this._alternates)this._alternates[u]=i.parse(this._alternates[u]);this.maxRequestSize=this.MAX_REQUEST_SIZE},endpointFor:function(t){return this._alternates[t]||this.endpoint},addWebsocketExtension:function(t){this.wsExtensions.push(t)},disable:function(t){this._disabled.push(t)},setHeader:function(t,e){this.headers[t]=e},close:function(){var t=this._transport;delete this._transport,t&&t.close()},getConnectionTypes:function(){return c.getConnectionTypes()},selectTransport:function(t){c.get(this,t,this._disabled,(function(t){this.debug("Selected ? transport for ?",t.connectionType,i.stringify(t.endpoint)),t!==this._transport&&(this._transport&&this._transport.close(),this._transport=t,this.connectionType=t.connectionType)}),this)},sendMessage:function(t,e,r){r=r||{};var n,i=t.id,o=r.attempts,s=r.deadline&&(new Date).getTime()+1e3*r.deadline,a=this._envelopes[i];a||(n=new this._scheduler(t,{timeout:e,interval:this.retry,attempts:o,deadline:s}),a=this._envelopes[i]={message:t,scheduler:n}),this._sendEnvelope(a)},_sendEnvelope:function(t){if(this._transport&&!t.request&&!t.timer){var e=t.message,n=t.scheduler,i=this;if(!n.isDeliverable())return n.abort(),void delete this._envelopes[e.id];t.timer=r.setTimeout((function(){i.handleError(e)}),1e3*n.getTimeout()),n.send(),t.request=this._transport.sendMessage(e)}},handleResponse:function(t){var e=this._envelopes[t.id];void 0!==t.successful&&e&&(e.scheduler.succeed(),delete this._envelopes[t.id],r.clearTimeout(e.timer)),this.trigger("message",t),this._state!==this.UP&&(this._state=this.UP,this._client.trigger("transport:up"))},handleError:function(t,e){var n=this._envelopes[t.id],i=n&&n.request,o=this;if(i){i.then((function(t){t&&t.abort&&t.abort()}));var s=n.scheduler;s.fail(),r.clearTimeout(n.timer),n.request=n.timer=null,e?this._sendEnvelope(n):n.timer=r.setTimeout((function(){n.timer=null,o._sendEnvelope(n)}),1e3*s.getInterval()),this._state!==this.DOWN&&(this._state=this.DOWN,this._client.trigger("transport:down"))}}});h.create=function(t,e,r){return new h(t,e,r)},s(h.prototype,u),s(h.prototype,a),e.exports=h}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../mixins/logging":80,"../mixins/publisher":81,"../transport":92,"../util/class":101,"../util/cookies":103,"../util/extend":106,"../util/uri":110,"./scheduler":90}],86:[function(t,e,r){"use strict";var n=t("../util/class"),i=t("./grammar"),o=n({initialize:function(t,e,r){this.code=t,this.params=Array.prototype.slice.call(e),this.message=r},toString:function(){return this.code+":"+this.params.join(",")+":"+this.message}});o.parse=function(t){if(t=t||"",!i.ERROR.test(t))return new o(null,[],t);var e=t.split(":"),r=parseInt(e[0]),n=e[1].split(",");t=e[2];return new o(r,n,t)};var s={versionMismatch:[300,"Version mismatch"],conntypeMismatch:[301,"Connection types not supported"],extMismatch:[302,"Extension mismatch"],badRequest:[400,"Bad request"],clientUnknown:[401,"Unknown client"],parameterMissing:[402,"Missing required parameter"],channelForbidden:[403,"Forbidden channel"],channelUnknown:[404,"Unknown channel"],channelInvalid:[405,"Invalid channel"],extUnknown:[406,"Unknown extension"],publishFailed:[407,"Failed to publish"],serverError:[500,"Internal server error"]};for(var a in s)!function(t){o[t]=function(){return new o(s[t][0],arguments,s[t][1]).toString()}}(a);e.exports=o},{"../util/class":101,"./grammar":88}],87:[function(t,e,r){"use strict";var n={addExtension:function(t){this._extensions=this._extensions||[],this._extensions.push(t),t.added&&t.added(this)},removeExtension:function(t){if(this._extensions)for(var e=this._extensions.length;e--;)this._extensions[e]===t&&(this._extensions.splice(e,1),t.removed&&t.removed(this))},pipeThroughExtensions:function(t,e,r,n,i){if(this.debug("Passing through ? extensions: ?",t,e),!this._extensions)return n.call(i,e);var o=this._extensions.slice(),s=function(e){if(!e)return n.call(i,e);var a=o.shift();if(!a)return n.call(i,e);var u=a[t];if(!u)return s(e);u.length>=3?a[t](e,r,s):a[t](e,s)};s(e)}};t("../util/extend")(n,t("../mixins/logging")),e.exports=n},{"../mixins/logging":80,"../util/extend":106}],88:[function(t,e,r){"use strict";e.exports={CHANNEL_NAME:/^\/(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)))+(\/(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)))+)*$/,CHANNEL_PATTERN:/^(\/(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)))+)*\/\*{1,2}$/,ERROR:/^([0-9][0-9][0-9]:(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*(,(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*)*:(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*|[0-9][0-9][0-9]::(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*)$/,VERSION:/^([0-9])+(\.(([a-z]|[A-Z])|[0-9])(((([a-z]|[A-Z])|[0-9])|\-|\_))*)*$/}},{}],89:[function(t,e,r){"use strict";var n=t("../util/class"),i=t("../mixins/deferrable");e.exports=n(i)},{"../mixins/deferrable":79,"../util/class":101}],90:[function(t,e,r){"use strict";var n=function(t,e){this.message=t,this.options=e,this.attempts=0};t("../util/extend")(n.prototype,{getTimeout:function(){return this.options.timeout},getInterval:function(){return this.options.interval},isDeliverable:function(){var t=this.options.attempts,e=this.attempts,r=this.options.deadline,n=(new Date).getTime();return!(void 0!==t&&e>=t)&&!(void 0!==r&&n>r)},send:function(){this.attempts+=1},succeed:function(){},fail:function(){},abort:function(){}}),e.exports=n},{"../util/extend":106}],91:[function(t,e,r){"use strict";var n=t("../util/class"),i=t("../util/extend"),o=t("../mixins/deferrable"),s=n({initialize:function(t,e,r,n){this._client=t,this._channels=e,this._callback=r,this._context=n,this._cancelled=!1},withChannel:function(t,e){return this._withChannel=[t,e],this},apply:function(t,e){var r=e[0];this._callback&&this._callback.call(this._context,r.data),this._withChannel&&this._withChannel[0].call(this._withChannel[1],r.channel,r.data)},cancel:function(){this._cancelled||(this._client.unsubscribe(this._channels,this),this._cancelled=!0)},unsubscribe:function(){this.cancel()}});i(s.prototype,o),e.exports=s},{"../mixins/deferrable":79,"../util/class":101,"../util/extend":106}],92:[function(t,e,r){"use strict";var n=t("./transport");n.register("websocket",t("./web_socket")),n.register("eventsource",t("./event_source")),n.register("long-polling",t("./xhr")),n.register("cross-origin-long-polling",t("./cors")),n.register("callback-polling",t("./jsonp")),e.exports=n},{"./cors":93,"./event_source":94,"./jsonp":95,"./transport":96,"./web_socket":97,"./xhr":98}],93:[function(t,e,r){(function(r){"use strict";var n=t("../util/class"),i=t("../util/set"),o=t("../util/uri"),s=t("../util/extend"),a=t("../util/to_json"),u=s(n(t("./transport"),{encode:function(t){return"message="+encodeURIComponent(a(t))},request:function(t){var e,n=r.XDomainRequest?XDomainRequest:XMLHttpRequest,i=new n,s=++u._id,a=this._dispatcher.headers,c=this;if(i.open("POST",o.stringify(this.endpoint),!0),i.setRequestHeader)for(e in i.setRequestHeader("Pragma","no-cache"),a)a.hasOwnProperty(e)&&i.setRequestHeader(e,a[e]);var l=function(){if(!i)return!1;u._pending.remove(s),i.onload=i.onerror=i.ontimeout=i.onprogress=null,i=null};return i.onload=function(){var e;try{e=JSON.parse(i.responseText)}catch(t){}l(),e?c._receive(e):c._handleError(t)},i.onerror=i.ontimeout=function(){l(),c._handleError(t)},i.onprogress=function(){},n===r.XDomainRequest&&u._pending.add({id:s,xhr:i}),i.send(this.encode(t)),i}}),{_id:0,_pending:new i,isUsable:function(t,e,n,i){if(o.isSameOrigin(e))return n.call(i,!1);if(r.XDomainRequest)return n.call(i,e.protocol===location.protocol);if(r.XMLHttpRequest){var s=new XMLHttpRequest;return n.call(i,void 0!==s.withCredentials)}return n.call(i,!1)}});e.exports=u}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util/class":101,"../util/extend":106,"../util/set":108,"../util/to_json":109,"../util/uri":110,"./transport":96}],94:[function(t,e,r){(function(r){"use strict";var n=t("../util/class"),i=t("../util/uri"),o=t("../util/copy_object"),s=t("../util/extend"),a=t("../mixins/deferrable"),u=t("./transport"),c=t("./xhr"),l=s(n(u,{initialize:function(t,e){if(u.prototype.initialize.call(this,t,e),!r.EventSource)return this.setDeferredStatus("failed");this._xhr=new c(t,e),(e=o(e)).pathname+="/"+t.clientId;var n=new r.EventSource(i.stringify(e)),s=this;n.onopen=function(){s._everConnected=!0,s.setDeferredStatus("succeeded")},n.onerror=function(){s._everConnected?s._handleError([]):(s.setDeferredStatus("failed"),n.close())},n.onmessage=function(t){var e;try{e=JSON.parse(t.data)}catch(t){}e?s._receive(e):s._handleError([])},this._socket=n},close:function(){this._socket&&(this._socket.onopen=this._socket.onerror=this._socket.onmessage=null,this._socket.close(),delete this._socket)},isUsable:function(t,e){this.callback((function(){t.call(e,!0)})),this.errback((function(){t.call(e,!1)}))},encode:function(t){return this._xhr.encode(t)},request:function(t){return this._xhr.request(t)}}),{isUsable:function(t,e,r,n){if(!t.clientId)return r.call(n,!1);c.isUsable(t,e,(function(i){if(!i)return r.call(n,!1);this.create(t,e).isUsable(r,n)}),this)},create:function(t,e){var r=t.transports.eventsource=t.transports.eventsource||{},n=t.clientId,s=o(e);return s.pathname+="/"+(n||""),r[s=i.stringify(s)]=r[s]||new this(t,e),r[s]}});s(l.prototype,a),e.exports=l}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../mixins/deferrable":79,"../util/class":101,"../util/copy_object":104,"../util/extend":106,"../util/uri":110,"./transport":96,"./xhr":98}],95:[function(t,e,r){(function(r){"use strict";var n=t("../util/class"),i=t("../util/uri"),o=t("../util/copy_object"),s=t("../util/extend"),a=t("../util/to_json"),u=s(n(t("./transport"),{encode:function(t){var e=o(this.endpoint);return e.query.message=a(t),e.query.jsonp="__jsonp"+u._cbCount+"__",i.stringify(e)},request:function(t){var e=document.getElementsByTagName("head")[0],n=document.createElement("script"),s=u.getCallbackName(),c=o(this.endpoint),l=this;c.query.message=a(t),c.query.jsonp=s;var h=function(){if(!r[s])return!1;r[s]=void 0;try{delete r[s]}catch(t){}n.parentNode.removeChild(n)};return r[s]=function(t){h(),l._receive(t)},n.type="text/javascript",n.src=i.stringify(c),e.appendChild(n),n.onerror=function(){h(),l._handleError(t)},{abort:h}}}),{_cbCount:0,getCallbackName:function(){return this._cbCount+=1,"__jsonp"+this._cbCount+"__"},isUsable:function(t,e,r,n){r.call(n,!0)}});e.exports=u}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util/class":101,"../util/copy_object":104,"../util/extend":106,"../util/to_json":109,"../util/uri":110,"./transport":96}],96:[function(t,e,r){(function(r){"use strict";var n=t("../util/class"),i=t("../util/cookies").Cookie,o=t("../util/promise"),s=t("../util/uri"),a=t("../util/array"),u=t("../util/extend"),c=t("../mixins/logging"),l=t("../mixins/timeouts"),h=t("../protocol/channel"),p=u(n({className:"Transport",DEFAULT_PORTS:{"http:":80,"https:":443,"ws:":80,"wss:":443},MAX_DELAY:0,batching:!0,initialize:function(t,e){this._dispatcher=t,this.endpoint=e,this._outbox=[],this._proxy=u({},this._dispatcher.proxy),this._proxy.origin||(this._proxy.origin=this._findProxy())},close:function(){},encode:function(t){return""},sendMessage:function(t){return this.debug("Client ? sending message to ?: ?",this._dispatcher.clientId,s.stringify(this.endpoint),t),this.batching?(this._outbox.push(t),this._flushLargeBatch(),t.channel===h.HANDSHAKE?this._publish(.01):(t.channel===h.CONNECT&&(this._connectMessage=t),this._publish(this.MAX_DELAY))):o.resolve(this.request([t]))},_makePromise:function(){var t=this;this._requestPromise=this._requestPromise||new o((function(e){t._resolvePromise=e}))},_publish:function(t){return this._makePromise(),this.addTimeout("publish",t,(function(){this._flush(),delete this._requestPromise}),this),this._requestPromise},_flush:function(){this.removeTimeout("publish"),this._outbox.length>1&&this._connectMessage&&(this._connectMessage.advice={timeout:0}),this._resolvePromise(this.request(this._outbox)),this._connectMessage=null,this._outbox=[]},_flushLargeBatch:function(){if(!(this.encode(this._outbox).length<this._dispatcher.maxRequestSize)){var t=this._outbox.pop();this._makePromise(),this._flush(),t&&this._outbox.push(t)}},_receive:function(t){if(t){t=[].concat(t),this.debug("Client ? received from ? via ?: ?",this._dispatcher.clientId,s.stringify(this.endpoint),this.connectionType,t);for(var e=0,r=t.length;e<r;e++)this._dispatcher.handleResponse(t[e])}},_handleError:function(t,e){t=[].concat(t),this.debug("Client ? failed to send to ? via ?: ?",this._dispatcher.clientId,s.stringify(this.endpoint),this.connectionType,t);for(var r=0,n=t.length;r<n;r++)this._dispatcher.handleError(t[r])},_getCookies:function(){var t=this._dispatcher.cookies,e=s.stringify(this.endpoint);return t?a.map(t.getCookiesSync(e),(function(t){return t.cookieString()})).join("; "):""},_storeCookies:function(t){var e,r=this._dispatcher.cookies,n=s.stringify(this.endpoint);if(t&&r)for(var o=0,a=(t=[].concat(t)).length;o<a;o++)e=i.parse(t[o]),r.setCookieSync(e,n)},_findProxy:function(){if(void 0!==r){var t=this.endpoint.protocol;if(t){var e,n,i=t.replace(/:$/,"").toLowerCase()+"_proxy",o=i.toUpperCase(),s=r.env;return"http_proxy"===i&&s.REQUEST_METHOD?(1===(e=Object.keys(s).filter((function(t){return/^http_proxy$/i.test(t)}))).length?e[0]===i&&void 0===s[o]&&(n=s[i]):e.length>1&&(n=s[i]),n=n||s["CGI_"+o]):(n=s[i]||s[o])&&!s[i]&&console.warn("The environment variable "+o+" is discouraged. Use "+i+"."),n}}}}),{get:function(t,e,r,n,i){var o=t.endpoint;a.asyncEach(this._transports,(function(o,s){var u=o[0],c=o[1],l=t.endpointFor(u);return a.indexOf(r,u)>=0?s():a.indexOf(e,u)<0?(c.isUsable(t,l,(function(){})),s()):void c.isUsable(t,l,(function(e){if(!e)return s();var r=c.hasOwnProperty("create")?c.create(t,l):new c(t,l);n.call(i,r)}))}),(function(){throw new Error("Could not find a usable connection type for "+s.stringify(o))}))},register:function(t,e){this._transports.push([t,e]),e.prototype.connectionType=t},getConnectionTypes:function(){return a.map(this._transports,(function(t){return t[0]}))},_transports:[]});u(p.prototype,c),u(p.prototype,l),e.exports=p}).call(this,t("_process"))},{"../mixins/logging":80,"../mixins/timeouts":82,"../protocol/channel":83,"../util/array":99,"../util/class":101,"../util/cookies":103,"../util/extend":106,"../util/promise":107,"../util/uri":110,_process:138}],97:[function(t,e,r){(function(r){"use strict";var n=t("../util/class"),i=t("../util/promise"),o=t("../util/set"),s=t("../util/uri"),a=t("../util/browser"),u=t("../util/copy_object"),c=t("../util/extend"),l=t("../util/to_json"),h=t("../util/websocket"),p=t("../mixins/deferrable"),f=c(n(t("./transport"),{UNCONNECTED:1,CONNECTING:2,CONNECTED:3,batching:!1,isUsable:function(t,e){this.callback((function(){t.call(e,!0)})),this.errback((function(){t.call(e,!1)})),this.connect()},request:function(t){this._pending=this._pending||new o;for(var e=0,r=t.length;e<r;e++)this._pending.add(t[e]);var n=this,s=new i((function(e,r){n.callback((function(r){r&&1===r.readyState&&(r.send(l(t)),e(r))})),n.connect()}));return{abort:function(){s.then((function(t){t.close()}))}}},connect:function(){if(!f._unloaded&&(this._state=this._state||this.UNCONNECTED,this._state===this.UNCONNECTED)){this._state=this.CONNECTING;var t=this._createSocket();if(!t)return this.setDeferredStatus("failed");var e=this;t.onopen=function(){t.headers&&e._storeCookies(t.headers["set-cookie"]),e._socket=t,e._state=e.CONNECTED,e._everConnected=!0,e._ping(),e.setDeferredStatus("succeeded",t)};var r=!1;t.onclose=t.onerror=function(){if(!r){r=!0;var n=e._state===e.CONNECTED;t.onopen=t.onclose=t.onerror=t.onmessage=null,delete e._socket,e._state=e.UNCONNECTED,e.removeTimeout("ping");var i=e._pending?e._pending.toArray():[];delete e._pending,n||e._everConnected?(e.setDeferredStatus("unknown"),e._handleError(i,n)):e.setDeferredStatus("failed")}},t.onmessage=function(t){var r;try{r=JSON.parse(t.data)}catch(t){}if(r){for(var n=0,i=(r=[].concat(r)).length;n<i;n++)void 0!==r[n].successful&&e._pending.remove(r[n]);e._receive(r)}}}},close:function(){this._socket&&this._socket.close()},_createSocket:function(){var t=f.getSocketUrl(this.endpoint),e=this._dispatcher.headers,r=this._dispatcher.wsExtensions,n=this._getCookies(),i=this._dispatcher.tls,o={extensions:r,headers:e,proxy:this._proxy,tls:i};return""!==n&&(o.headers.Cookie=n),h.create(t,[],o)},_ping:function(){this._socket&&1===this._socket.readyState&&(this._socket.send("[]"),this.addTimeout("ping",this._dispatcher.timeout/2,this._ping,this))}}),{PROTOCOLS:{"http:":"ws:","https:":"wss:"},create:function(t,e){var r=t.transports.websocket=t.transports.websocket||{};return r[e.href]=r[e.href]||new this(t,e),r[e.href]},getSocketUrl:function(t){return(t=u(t)).protocol=this.PROTOCOLS[t.protocol],s.stringify(t)},isUsable:function(t,e,r,n){this.create(t,e).isUsable(r,n)}});c(f.prototype,p),a.Event&&void 0!==r.onbeforeunload&&a.Event.on(r,"beforeunload",(function(){f._unloaded=!0})),e.exports=f}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../mixins/deferrable":79,"../util/browser":100,"../util/class":101,"../util/copy_object":104,"../util/extend":106,"../util/promise":107,"../util/set":108,"../util/to_json":109,"../util/uri":110,"../util/websocket":112,"./transport":96}],98:[function(t,e,r){(function(r){"use strict";var n=t("../util/class"),i=t("../util/uri"),o=t("../util/browser"),s=t("../util/extend"),a=t("../util/to_json"),u=s(n(t("./transport"),{encode:function(t){return a(t)},request:function(t){var e,n=this.endpoint.href,i=this;if(r.XMLHttpRequest)e=new XMLHttpRequest;else{if(!r.ActiveXObject)return this._handleError(t);e=new ActiveXObject("Microsoft.XMLHTTP")}e.open("POST",n,!0),e.setRequestHeader("Content-Type","application/json"),e.setRequestHeader("Pragma","no-cache"),e.setRequestHeader("X-Requested-With","XMLHttpRequest");var s=this._dispatcher.headers;for(var a in s)s.hasOwnProperty(a)&&e.setRequestHeader(a,s[a]);var u=function(){e.abort()};return void 0!==r.onbeforeunload&&o.Event.on(r,"beforeunload",u),e.onreadystatechange=function(){if(e&&4===e.readyState){var n=null,s=e.status,a=e.responseText,c=s>=200&&s<300||304===s||1223===s;if(void 0!==r.onbeforeunload&&o.Event.detach(r,"beforeunload",u),e.onreadystatechange=function(){},e=null,!c)return i._handleError(t);try{n=JSON.parse(a)}catch(t){}n?i._receive(n):i._handleError(t)}},e.send(this.encode(t)),e}}),{isUsable:function(t,e,r,n){var o="ReactNative"===navigator.product||i.isSameOrigin(e);r.call(n,o)}});e.exports=u}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util/browser":100,"../util/class":101,"../util/extend":106,"../util/to_json":109,"../util/uri":110,"./transport":96}],99:[function(t,e,r){"use strict";e.exports={commonElement:function(t,e){for(var r=0,n=t.length;r<n;r++)if(-1!==this.indexOf(e,t[r]))return t[r];return null},indexOf:function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1},map:function(t,e,r){if(t.map)return t.map(e,r);var n=[];if(t instanceof Array)for(var i=0,o=t.length;i<o;i++)n.push(e.call(r||null,t[i],i));else for(var s in t)t.hasOwnProperty(s)&&n.push(e.call(r||null,s,t[s]));return n},filter:function(t,e,r){if(t.filter)return t.filter(e,r);for(var n=[],i=0,o=t.length;i<o;i++)e.call(r||null,t[i],i)&&n.push(t[i]);return n},asyncEach:function(t,e,r,n){var i=t.length,o=-1,s=0,a=!1,u=function(){if(s-=1,(o+=1)===i)return r&&r.call(n);e(t[o],c)},c=function(){s+=1,function(){if(!a){for(a=!0;s>0;)u();a=!1}}()};c()}}},{}],100:[function(t,e,r){(function(t){"use strict";var r={_registry:[],on:function(t,e,r,n){var i=function(){r.call(n)};t.addEventListener?t.addEventListener(e,i,!1):t.attachEvent("on"+e,i),this._registry.push({_element:t,_type:e,_callback:r,_context:n,_handler:i})},detach:function(t,e,r,n){for(var i,o=this._registry.length;o--;)i=this._registry[o],t&&t!==i._element||e&&e!==i._type||r&&r!==i._callback||n&&n!==i._context||(i._element.removeEventListener?i._element.removeEventListener(i._type,i._handler,!1):i._element.detachEvent("on"+i._type,i._handler),this._registry.splice(o,1),i=null)}};void 0!==t.onunload&&r.on(t,"unload",r.detach,r),e.exports={Event:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],101:[function(t,e,r){"use strict";var n=t("./extend");e.exports=function(t,e){"function"!=typeof t&&(e=t,t=Object);var r=function(){return this.initialize&&this.initialize.apply(this,arguments)||this},i=function(){};return i.prototype=t.prototype,r.prototype=new i,n(r.prototype,e),r}},{"./extend":106}],102:[function(t,e,r){e.exports={VERSION:"1.2.4",BAYEUX_VERSION:"1.0",ID_LENGTH:160,JSONP_CALLBACK:"jsonpcallback",CONNECTION_TYPES:["long-polling","cross-origin-long-polling","callback-polling","websocket","eventsource","in-process"],MANDATORY_CONNECTION_TYPES:["long-polling","callback-polling","in-process"]}},{}],103:[function(t,e,r){"use strict";e.exports={}},{}],104:[function(t,e,r){"use strict";var n=function(t){var e,r,i;if(t instanceof Array){for(e=[],r=t.length;r--;)e[r]=n(t[r]);return e}if("object"==typeof t){for(i in e=null===t?null:{},t)e[i]=n(t[i]);return e}return t};e.exports=n},{}],105:[function(t,e,r){var n="function"==typeof Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(){}e.exports=i,i.prototype.emit=function(t){if("error"===t&&(!this._events||!this._events.error||n(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var e=this._events[t];if(!e)return!1;if("function"==typeof e){switch(arguments.length){case 1:e.call(this);break;case 2:e.call(this,arguments[1]);break;case 3:e.call(this,arguments[1],arguments[2]);break;default:var r=Array.prototype.slice.call(arguments,1);e.apply(this,r)}return!0}if(n(e)){r=Array.prototype.slice.call(arguments,1);for(var i=e.slice(),o=0,s=i.length;o<s;o++)i[o].apply(this,r);return!0}return!1},i.prototype.addListener=function(t,e){if("function"!=typeof e)throw new Error("addListener only takes instances of Function");return this._events||(this._events={}),this.emit("newListener",t,e),this._events[t]?n(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(t,e){var r=this;return r.on(t,(function n(){r.removeListener(t,n),e.apply(this,arguments)})),this},i.prototype.removeListener=function(t,e){if("function"!=typeof e)throw new Error("removeListener only takes instances of Function");if(!this._events||!this._events[t])return this;var r=this._events[t];if(n(r)){var i=function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;r<t.length;r++)if(e===t[r])return r;return-1}(r,e);if(i<0)return this;r.splice(i,1),0==r.length&&delete this._events[t]}else this._events[t]===e&&delete this._events[t];return this},i.prototype.removeAllListeners=function(t){return 0===arguments.length?(this._events={},this):(t&&this._events&&this._events[t]&&(this._events[t]=null),this)},i.prototype.listeners=function(t){return this._events||(this._events={}),this._events[t]||(this._events[t]=[]),n(this._events[t])||(this._events[t]=[this._events[t]]),this._events[t]}},{}],106:[function(t,e,r){"use strict";e.exports=function(t,e,r){if(!e)return t;for(var n in e)e.hasOwnProperty(n)&&(t.hasOwnProperty(n)&&!1===r||t[n]!==e[n]&&(t[n]=e[n]));return t}},{}],107:[function(t,e,r){"use strict";var n=t("asap"),i=function(t){return t},o=function(t){throw t},s=function(t){if(this._state=0,this._onFulfilled=[],this._onRejected=[],"function"==typeof t){var e=this;t((function(t){h(e,t)}),(function(t){f(e,t)}))}};s.prototype.then=function(t,e){var r=new s;return a(this,t,r),u(this,e,r),r},s.prototype.catch=function(t){return this.then(null,t)};var a=function(t,e,r){"function"!=typeof e&&(e=i);var n=function(t){c(e,t,r)};0===t._state?t._onFulfilled.push(n):1===t._state&&n(t._value)},u=function(t,e,r){"function"!=typeof e&&(e=o);var n=function(t){c(e,t,r)};0===t._state?t._onRejected.push(n):2===t._state&&n(t._reason)},c=function(t,e,r){n((function(){l(t,e,r)}))},l=function(t,e,r){var n;try{n=t(e)}catch(t){return f(r,t)}n===r?f(r,new TypeError("Recursive promise chain detected")):h(r,n)},h=function(t,e){var r,n,i=!1;try{if(r=typeof e,"function"!=typeof(n=null!==e&&("function"===r||"object"===r)&&e.then))return p(t,e);n.call(e,(function(e){i^(i=!0)&&h(t,e)}),(function(e){i^(i=!0)&&f(t,e)}))}catch(e){if(!(i^(i=!0)))return;f(t,e)}},p=function(t,e){if(0===t._state){t._state=1,t._value=e,t._onRejected=[];for(var r,n=t._onFulfilled;r=n.shift();)r(e)}},f=function(t,e){if(0===t._state){t._state=2,t._reason=e,t._onFulfilled=[];for(var r,n=t._onRejected;r=n.shift();)r(e)}};s.resolve=function(t){return new s((function(e,r){e(t)}))},s.reject=function(t){return new s((function(e,r){r(t)}))},s.all=function(t){return new s((function(e,r){var n,i=[],o=t.length;if(0===o)return e(i);for(n=0;n<o;n++)!function(t,n){s.resolve(t).then((function(t){i[n]=t,0==--o&&e(i)}),r)}(t[n],n)}))},s.race=function(t){return new s((function(e,r){for(var n=0,i=t.length;n<i;n++)s.resolve(t[n]).then(e,r)}))},s.deferred=s.pending=function(){var t={};return t.promise=new s((function(e,r){t.resolve=e,t.reject=r})),t},e.exports=s},{asap:36}],108:[function(t,e,r){"use strict";var n=t("./class");e.exports=n({initialize:function(){this._index={}},add:function(t){var e=void 0!==t.id?t.id:t;return!this._index.hasOwnProperty(e)&&(this._index[e]=t,!0)},forEach:function(t,e){for(var r in this._index)this._index.hasOwnProperty(r)&&t.call(e,this._index[r])},isEmpty:function(){for(var t in this._index)if(this._index.hasOwnProperty(t))return!1;return!0},member:function(t){for(var e in this._index)if(this._index[e]===t)return!0;return!1},remove:function(t){var e=void 0!==t.id?t.id:t,r=this._index[e];return delete this._index[e],r},toArray:function(){var t=[];return this.forEach((function(e){t.push(e)})),t}})},{"./class":101}],109:[function(t,e,r){"use strict";e.exports=function(t){return JSON.stringify(t,(function(t,e){return this[t]instanceof Array?this[t]:e}))}},{}],110:[function(t,e,r){"use strict";e.exports={isURI:function(t){return t&&t.protocol&&t.host&&t.path},isSameOrigin:function(t){return t.protocol===location.protocol&&t.hostname===location.hostname&&t.port===location.port},parse:function(t){if("string"!=typeof t)return t;var e,r,n,i,o,s,a={},u=function(e,r){t=t.replace(r,(function(t){return a[e]=t,""})),a[e]=a[e]||""};for(u("protocol",/^[a-z]+\:/i),u("host",/^\/\/[^\/\?#]+/),/^\//.test(t)||a.host||(t=location.pathname.replace(/[^\/]*$/,"")+t),u("pathname",/^[^\?#]*/),u("search",/^\?[^#]*/),u("hash",/^#.*/),a.protocol=a.protocol||location.protocol,a.host?(a.host=a.host.substr(2),e=a.host.split(":"),a.hostname=e[0],a.port=e[1]||""):(a.host=location.host,a.hostname=location.hostname,a.port=location.port),a.pathname=a.pathname||"/",a.path=a.pathname+a.search,s={},i=0,o=(n=(r=a.search.replace(/^\?/,""))?r.split("&"):[]).length;i<o;i++)e=n[i].split("="),s[decodeURIComponent(e[0]||"")]=decodeURIComponent(e[1]||"");return a.query=s,a.href=this.stringify(a),a},stringify:function(t){var e=t.protocol+"//"+t.hostname;return t.port&&(e+=":"+t.port),e+=t.pathname+this.queryString(t.query)+(t.hash||"")},queryString:function(t){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return 0===e.length?"":"?"+e.join("&")}}},{}],111:[function(t,e,r){"use strict";var n=t("./array");e.exports=function(t,e){for(var r in t)if(n.indexOf(e,r)<0)throw new Error("Unrecognized option: "+r)}},{"./array":99}],112:[function(t,e,r){(function(t){"use strict";var r=t.MozWebSocket||t.WebSocket;e.exports={create:function(t,e,n){return"function"!=typeof r?null:new r(t)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],113:[function(t,e,r){"use strict";var n="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,o=Object.prototype.toString;e.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==o.call(e))throw new TypeError(n+e);for(var r,s=i.call(arguments,1),a=function(){if(this instanceof r){var n=e.apply(this,s.concat(i.call(arguments)));return Object(n)===n?n:this}return e.apply(t,s.concat(i.call(arguments)))},u=Math.max(0,e.length-s.length),c=[],l=0;l<u;l++)c.push("$"+l);if(r=Function("binder","return function ("+c.join(",")+"){ return binder.apply(this,arguments); }")(a),e.prototype){var h=function(){};h.prototype=e.prototype,r.prototype=new h,h.prototype=null}return r}},{}],114:[function(t,e,r){"use strict";var n=t("./implementation");e.exports=Function.prototype.bind||n},{"./implementation":113}],115:[function(t,e,r){(function(r){"use strict";var n=r.Symbol,i=t("./shams");e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&i())))}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./shams":116}],116:[function(t,e,r){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},{}],117:[function(t,e,r){"use strict";var n=t("function-bind");e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":114}],118:[function(t,e,r){r.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,h=r?i-1:0,p=r?-1:1,f=t[e+h];for(h+=p,o=f&(1<<-l)-1,f>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=p,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+h],h+=p,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,n),o-=c}return(f?-1:1)*s*Math.pow(2,o-n)},r.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,h=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?p/u:p*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+f]=255&a,f+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+f]=255&s,f+=d,s/=256,c-=8);t[r+f-d]|=128*y}},{}],119:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],120:[function(t,e,r){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}
  /*!
   * Determine if an object is a Buffer
   *
   * @author   Feross Aboukhadijeh <https://feross.org>
   * @license  MIT
   */
  e.exports=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},{}],121:[function(t,e,r){"use strict";var n=Function.prototype.toString,i=/^\s*class\b/,o=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=Object.prototype.toString,a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(a)return function(t){try{return!o(t)&&(n.call(t),!0)}catch(t){return!1}}(t);if(o(t))return!1;var e=s.call(t);return"[object Function]"===e||"[object GeneratorFunction]"===e}},{}],122:[function(t,e,r){"use strict";var n=Date.prototype.getDay,i=Object.prototype.toString,o="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(t){return"object"==typeof t&&null!==t&&(o?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===i.call(t))}},{}],123:[function(t,e,r){"use strict";var n=t("has"),i=RegExp.prototype.exec,o=Object.getOwnPropertyDescriptor,s=Object.prototype.toString,a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(t){if(!t||"object"!=typeof t)return!1;if(!a)return"[object RegExp]"===s.call(t);var e=o(t,"lastIndex");return!(!e||!n(e,"value"))&&function(t){try{var e=t.lastIndex;return t.lastIndex=0,i.call(t),!0}catch(t){return!1}finally{t.lastIndex=e}}(t)}},{has:117}],124:[function(t,e,r){"use strict";var n=Object.prototype.toString;if(t("has-symbols")()){var i=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;e.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&o.test(i.call(t))}(t)}catch(t){return!1}}}else e.exports=function(t){return!1}},{"has-symbols":115}],125:[function(t,e,r){var n={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},{}],126:[function(t,e,r){(function(t){var r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/,i=/^\./,o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,a=/^\[object .+?Constructor\]$/,u="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,l=u||c||Function("return this")();var h,p=Array.prototype,f=Function.prototype,d=Object.prototype,y=l["__core-js_shared__"],m=(h=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||""))?"Symbol(src)_1."+h:"",g=f.toString,b=d.hasOwnProperty,v=d.toString,_=RegExp("^"+g.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),w=l.Symbol,T=p.splice,E=k(l,"Map"),S=k(Object,"create"),O=w?w.prototype:void 0,x=O?O.toString:void 0;function I(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function C(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function D(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function N(t,e){for(var r,n,i=t.length;i--;)if((r=t[i][0])===(n=e)||r!=r&&n!=n)return i;return-1}function A(t,e){for(var i,o=0,s=(e=function(t,e){if(U(t))return!1;var i=typeof t;if("number"==i||"symbol"==i||"boolean"==i||null==t||F(t))return!0;return n.test(t)||!r.test(t)||null!=e&&t in Object(e)}(e,t)?[e]:U(i=e)?i:L(i)).length;null!=t&&o<s;)t=t[R(e[o++])];return o&&o==s?t:void 0}function j(t){return!(!q(t)||(e=t,m&&m in e))&&(function(t){var e=q(t)?v.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?_:a).test(function(t){if(null!=t){try{return g.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function P(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function k(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return j(r)?r:void 0}I.prototype.clear=function(){this.__data__=S?S(null):{}},I.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},I.prototype.get=function(t){var e=this.__data__;if(S){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return b.call(e,t)?e[t]:void 0},I.prototype.has=function(t){var e=this.__data__;return S?void 0!==e[t]:b.call(e,t)},I.prototype.set=function(t,e){return this.__data__[t]=S&&void 0===e?"__lodash_hash_undefined__":e,this},C.prototype.clear=function(){this.__data__=[]},C.prototype.delete=function(t){var e=this.__data__,r=N(e,t);return!(r<0)&&(r==e.length-1?e.pop():T.call(e,r,1),!0)},C.prototype.get=function(t){var e=this.__data__,r=N(e,t);return r<0?void 0:e[r][1]},C.prototype.has=function(t){return N(this.__data__,t)>-1},C.prototype.set=function(t,e){var r=this.__data__,n=N(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},D.prototype.clear=function(){this.__data__={hash:new I,map:new(E||C),string:new I}},D.prototype.delete=function(t){return P(this,t).delete(t)},D.prototype.get=function(t){return P(this,t).get(t)},D.prototype.has=function(t){return P(this,t).has(t)},D.prototype.set=function(t,e){return P(this,t).set(t,e),this};var L=M((function(t){var e;t=null==(e=t)?"":function(t){if("string"==typeof t)return t;if(F(t))return x?x.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(e);var r=[];return i.test(t)&&r.push(""),t.replace(o,(function(t,e,n,i){r.push(n?i.replace(s,"$1"):e||t)})),r}));function R(t){if("string"==typeof t||F(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function M(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(M.Cache||D),r}M.Cache=D;var U=Array.isArray;function q(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function F(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==v.call(t)}e.exports=function(t,e,r){var n=null==t?void 0:A(t,e);return void 0===n?r:n}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],127:[function(t,e,r){(function(t){(function(){var n="[object Object]",i=/[&<>"']/g,o=RegExp(i.source),s=/^(?:0|[1-9]\d*)$/,a="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,c=a||u||Function("return this")(),l="object"==typeof r&&r&&!r.nodeType&&r,h=l&&"object"==typeof e&&e&&!e.nodeType&&e;function p(t,e){return t.push.apply(t,e),t}function f(t){return function(e){return null==e?void 0:e[t]}}function d(t,e,r,n,i){return i(t,(function(t,i,o){r=n?(n=!1,t):e(r,t,i,o)})),r}var y,m=(y={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},function(t){return null==y?void 0:y[t]});var g,b,v=Array.prototype,_=Object.prototype,w=_.hasOwnProperty,T=0,E=_.toString,S=c._,O=Object.create,x=_.propertyIsEnumerable,I=c.isFinite,C=(g=Object.keys,b=Object,function(t){return g(b(t))}),D=Math.max;function N(t){return t instanceof j?t:new j(t)}var A=function(){function t(){}return function(e){if(!Dt(e))return{};if(O)return O(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function j(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e}function P(t,e,r){var n=t[e];w.call(t,e)&&Et(n,r)&&(void 0!==r||e in t)||k(t,e,r)}function k(t,e,r){t[e]=r}function L(t,e,r){if("function"!=typeof t)throw new TypeError("Expected a function");return setTimeout((function(){t.apply(void 0,r)}),e)}j.prototype=A(N.prototype),j.prototype.constructor=j;var R,M,U=(R=X,function(t,e){if(null==t)return t;if(!xt(t))return R(t,e);for(var r=t.length,n=M?r:-1,i=Object(t);(M?n--:++n<r)&&!1!==e(i[n],n,i););return t});function q(t,e,r){for(var n=-1,i=t.length;++n<i;){var o=t[n],s=e(o);if(null!=s&&(void 0===a?s==s:r(s,a)))var a=s,u=o}return u}function F(t,e){var r=[];return U(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function B(t,e,r,n,i){var o=-1,s=t.length;for(r||(r=st),i||(i=[]);++o<s;){var a=t[o];e>0&&r(a)?e>1?B(a,e-1,r,n,i):p(i,a):n||(i[i.length]=a)}return i}var $=function(t){return function(e,r,n){for(var i=-1,o=Object(e),s=n(e),a=s.length;a--;){var u=s[t?a:++i];if(!1===r(o[u],u,o))break}return e}}();function X(t,e){return t&&$(t,e,Ft)}function V(t,e){return F(e,(function(e){return Ct(t[e])}))}function G(t){return function(t){return E.call(t)}(t)}function W(t,e){return t>e}var z=Ht;function H(t,e,r,i,o){return t===e||(null==t||null==e||!Nt(t)&&!Nt(e)?t!=t&&e!=e:function(t,e,r,i,o,s){var a=Ot(t),u=Ot(e),c=a?"[object Array]":G(t),l=u?"[object Array]":G(e),h=(c="[object Arguments]"==c?n:c)==n,p=(l="[object Arguments]"==l?n:l)==n,f=c==l;s||(s=[]);var d=mt(s,(function(e){return e[0]==t})),y=mt(s,(function(t){return t[0]==e}));if(d&&y)return d[1]==e;if(s.push([t,e]),s.push([e,t]),f&&!h){var m=a?function(t,e,r,n,i,o){var s=1&r,a=t.length,u=e.length;if(a!=u&&!(s&&u>a))return!1;var c=-1,l=!0,h=2&r?[]:void 0;for(;++c<a;){var p=t[c],f=e[c];if(h){if(!rt(e,(function(t,e){if(!ft(h,e)&&(p===t||i(p,t,r,n,o)))return h.push(e)}))){l=!1;break}}else if(p!==f&&!i(p,f,r,n,o)){l=!1;break}}return l}(t,e,r,i,o,s):function(t,e,r,n,i,o,s){switch(r){case"[object Boolean]":case"[object Date]":case"[object Number]":return Et(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+""}return!1}(t,e,c);return s.pop(),m}if(!(1&r)){var g=h&&w.call(t,"__wrapped__"),b=p&&w.call(e,"__wrapped__");if(g||b){var v=g?t.value():t,_=b?e.value():e;m=o(v,_,r,i,s);return s.pop(),m}}if(!f)return!1;m=function(t,e,r,n,i,o){var s=1&r,a=Ft(t),u=a.length,c=Ft(e).length;if(u!=c&&!s)return!1;var l=u;for(;l--;){var h=a[l];if(!(s?h in e:w.call(e,h)))return!1}var p=!0,f=s;for(;++l<u;){h=a[l];var d=t[h],y=e[h];if(d!==y&&!i(d,y,r,n,o)){p=!1;break}f||(f="constructor"==h)}if(p&&!f){var m=t.constructor,g=e.constructor;m!=g&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof g&&g instanceof g)&&(p=!1)}return p}(t,e,r,i,o,s);return s.pop(),m}(t,e,r,i,H,o))}function Y(t){return"function"==typeof t?t:null==t?Vt:("object"==typeof t?Q:f)(t)}function K(t,e){return t<e}function J(t,e){var r=-1,n=xt(t)?Array(t.length):[];return U(t,(function(t,i,o){n[++r]=e(t,i,o)})),n}function Q(t){var e=C(t);return function(r){var n=e.length;if(null==r)return!n;for(r=Object(r);n--;){var i=e[n];if(!(i in r&&H(t[i],r[i],3)))return!1}return!0}}function Z(t,e){return lt(ct(t,e,Vt),t+"")}function tt(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n<i;)o[n]=t[n+e];return o}function et(t){return tt(t,0,t.length)}function rt(t,e){var r;return U(t,(function(t,n,i){return!(r=e(t,n,i))})),!!r}function nt(t,e,r,n){var i=!r;r||(r={});for(var o=-1,s=e.length;++o<s;){var a=e[o],u=n?n(r[a],t[a],a,r,t):void 0;void 0===u&&(u=t[a]),i?k(r,a,u):P(r,a,u)}return r}function it(t){return Z((function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,e=Object(e);++n<i;){var s=r[n];s&&t(e,s,n,o)}return e}))}function ot(t,e,r,n){if("function"!=typeof t)throw new TypeError("Expected a function");var i=1&e,o=function(t){return function(){var e=arguments,r=A(t.prototype),n=t.apply(r,e);return Dt(n)?n:r}}(t);return function e(){for(var s=-1,a=arguments.length,u=-1,l=n.length,h=Array(l+a),p=this&&this!==c&&this instanceof e?o:t;++u<l;)h[u]=n[u];for(;a--;)h[u++]=arguments[++s];return p.apply(i?r:this,h)}}function st(t){return Ot(t)||St(t)}function at(t,e,r){if(!Dt(r))return!1;var n=typeof e;return!!("number"==n?xt(r)&&function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&s.test(t))&&t>-1&&t%1==0&&t<e}(e,r.length):"string"==n&&e in r)&&Et(r[e],t)}function ut(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}function ct(t,e,r){return e=D(void 0===e?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=D(n.length-e,0),s=Array(o);++i<o;)s[i]=n[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=n[i];return a[e]=r(s),t.apply(this,a)}}var lt=Vt;function ht(t){return(null==t?0:t.length)?B(t,1):[]}function pt(t){return t&&t.length?t[0]:void 0}function ft(t,e,r){for(var n=null==t?0:t.length,i=((r="number"==typeof r?r<0?D(n+r,0):r:0)||0)-1,o=e==e;++i<n;){var s=t[i];if(o?s===e:s!=s)return i}return-1}function dt(t){var e=N(t);return e.__chain__=!0,e}var yt,mt=(yt=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:kt(r);return i<0&&(i=D(n+i,0)),function(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}(t,Y(e),i)},function(t,e,r){var n=Object(t);if(!xt(t)){var i=Y(e);t=Ft(t),e=function(t){return i(n[t],t,n)}}var o=yt(t,e,r);return o>-1?n[i?t[o]:o]:void 0});function gt(t,e){return U(t,Y(e))}function bt(t,e,r){return d(t,Y(e),r,arguments.length<3,U)}function vt(t,e){var r;if("function"!=typeof e)throw new TypeError("Expected a function");return t=kt(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=void 0),r}}var _t=Z((function(t,e,r){return ot(t,33,e,r)})),wt=Z((function(t,e){return L(t,1,e)})),Tt=Z((function(t,e,r){return L(t,Lt(e)||0,r)}));function Et(t,e){return t===e||t!=t&&e!=e}var St=z(function(){return arguments}())?z:function(t){return Nt(t)&&w.call(t,"callee")&&!x.call(t,"callee")},Ot=Array.isArray;function xt(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!Ct(t)}var It=function(t){return Nt(t)&&"[object Date]"==G(t)};function Ct(t){if(!Dt(t))return!1;var e=G(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Dt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Nt(t){return null!=t&&"object"==typeof t}function At(t){return"number"==typeof t||Nt(t)&&"[object Number]"==G(t)}var jt=function(t){return Nt(t)&&"[object RegExp]"==G(t)};function Pt(t){return"string"==typeof t||!Ot(t)&&Nt(t)&&"[object String]"==G(t)}var kt=Number,Lt=Number;function Rt(t){return"string"==typeof t?t:null==t?"":t+""}var Mt=it((function(t,e){nt(e,C(e),t)})),Ut=it((function(t,e){nt(e,ut(e),t)}));var qt=Z((function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&at(e[0],e[1],i)&&(n=1);++r<n;)for(var o=e[r],s=Bt(o),a=-1,u=s.length;++a<u;){var c=s[a],l=t[c];(void 0===l||Et(l,_[c])&&!w.call(t,c))&&(t[c]=o[c])}return t}));var Ft=C,Bt=ut,$t=function(t){return lt(ct(t,void 0,ht),t+"")}((function(t,e){return null==t?{}:function(t,e){return t=Object(t),bt(e,(function(e,r){return r in t&&(e[r]=t[r]),e}),{})}(t,e)}));function Xt(t){return null==t?[]:function(t,e){return J(e,(function(e){return t[e]}))}(t,Ft(t))}function Vt(t){return t}var Gt,Wt=Y;function zt(t,e,r){var n=Ft(e),i=V(e,n);null!=r||Dt(e)&&(i.length||!n.length)||(r=e,e=t,t=this,i=V(e,Ft(e)));var o=!(Dt(r)&&"chain"in r&&!r.chain),s=Ct(t);return U(i,(function(r){var n=e[r];t[r]=n,s&&(t.prototype[r]=function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__),i=r.__actions__=et(this.__actions__);return i.push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,p([this.value()],arguments))})})),t}function Ht(){}N.assignIn=Ut,N.before=vt,N.bind=_t,N.chain=dt,N.compact=function(t){return F(t,Boolean)},N.concat=function(){var t=arguments.length;if(!t)return[];for(var e=Array(t-1),r=arguments[0],n=t;n--;)e[n-1]=arguments[n];return p(Ot(r)?et(r):[r],B(e,1))},N.create=function(t,e){var r=A(t);return null==e?r:Mt(r,e)},N.defaults=qt,N.defer=wt,N.delay=Tt,N.filter=function(t,e){return F(t,Y(e))},N.flatten=ht,N.flattenDeep=function(t){return(null==t?0:t.length)?B(t,1/0):[]},N.iteratee=Wt,N.keys=Ft,N.map=function(t,e){return J(t,Y(e))},N.matches=function(t){return Q(Mt({},t))},N.mixin=zt,N.negate=function(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var e=arguments;return!t.apply(this,e)}},N.once=function(t){return vt(2,t)},N.pick=$t,N.slice=function(t,e,r){var n=null==t?0:t.length;return e=null==e?0:+e,r=void 0===r?n:+r,n?tt(t,e,r):[]},N.sortBy=function(t,e){var r=0;return e=Y(e),J(J(t,(function(t,n,i){return{value:t,index:r++,criteria:e(t,n,i)}})).sort((function(t,e){return function(t,e){if(t!==e){var r=void 0!==t,n=null===t,i=t==t,o=void 0!==e,s=null===e,a=e==e;if(!s&&t>e||n&&o&&a||!r&&a||!i)return 1;if(!n&&t<e||s&&r&&i||!o&&i||!a)return-1}return 0}(t.criteria,e.criteria)||t.index-e.index})),f("value"))},N.tap=function(t,e){return e(t),t},N.thru=function(t,e){return e(t)},N.toArray=function(t){return xt(t)?t.length?et(t):[]:Xt(t)},N.values=Xt,N.extend=Ut,zt(N,N),N.clone=function(t){return Dt(t)?Ot(t)?et(t):nt(t,C(t)):t},N.escape=function(t){return(t=Rt(t))&&o.test(t)?t.replace(i,m):t},N.every=function(t,e,r){return function(t,e){var r=!0;return U(t,(function(t,n,i){return r=!!e(t,n,i)})),r}(t,Y(e=r?void 0:e))},N.find=mt,N.forEach=gt,N.has=function(t,e){return null!=t&&w.call(t,e)},N.head=pt,N.identity=Vt,N.indexOf=ft,N.isArguments=St,N.isArray=Ot,N.isBoolean=function(t){return!0===t||!1===t||Nt(t)&&"[object Boolean]"==G(t)},N.isDate=It,N.isEmpty=function(t){return xt(t)&&(Ot(t)||Pt(t)||Ct(t.splice)||St(t))?!t.length:!C(t).length},N.isEqual=function(t,e){return H(t,e)},N.isFinite=function(t){return"number"==typeof t&&I(t)},N.isFunction=Ct,N.isNaN=function(t){return At(t)&&t!=+t},N.isNull=function(t){return null===t},N.isNumber=At,N.isObject=Dt,N.isRegExp=jt,N.isString=Pt,N.isUndefined=function(t){return void 0===t},N.last=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},N.max=function(t){return t&&t.length?q(t,Vt,W):void 0},N.min=function(t){return t&&t.length?q(t,Vt,K):void 0},N.noConflict=function(){return c._===this&&(c._=S),this},N.noop=Ht,N.reduce=bt,N.result=function(t,e,r){var n=null==t?void 0:t[e];return void 0===n&&(n=r),Ct(n)?n.call(t):n},N.size=function(t){return null==t?0:(t=xt(t)?t:C(t)).length},N.some=function(t,e,r){return rt(t,Y(e=r?void 0:e))},N.uniqueId=function(t){var e=++T;return Rt(t)+e},N.each=gt,N.first=pt,zt(N,(Gt={},X(N,(function(t,e){w.call(N.prototype,e)||(Gt[e]=t)})),Gt),{chain:!1}),N.VERSION="4.17.15",U(["pop","join","replace","reverse","split","push","shift","sort","splice","unshift"],(function(t){var e=(/^(?:replace|split)$/.test(t)?String.prototype:v)[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|join|replace|shift)$/.test(t);N.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var i=this.value();return e.apply(Ot(i)?i:[],t)}return this[r]((function(r){return e.apply(Ot(r)?r:[],t)}))}})),N.prototype.toJSON=N.prototype.valueOf=N.prototype.value=function(){return t=this.__wrapped__,bt(this.__actions__,(function(t,e){return e.func.apply(e.thisArg,p([t],e.args))}),t);var t},h?((h.exports=N)._=N,l._=N):c._=N}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],128:[function(t,e,r){e.exports=o;var n=t("inherits"),i=t("readable-stream");function o(t,e){var r=this;if(!(r instanceof o))return new o(t,e);i.Readable.call(r,e),r.destroyed=!1,r._drained=!1,r._forwarding=!1,r._current=null,r._toStreams2=e&&e.objectMode?s:a,"function"==typeof t?r._queue=t:(r._queue=t.map(r._toStreams2),r._queue.forEach((function(t){"function"!=typeof t&&r._attachErrorListener(t)}))),r._next()}function s(t){return u(t,{objectMode:!0,highWaterMark:16})}function a(t){return u(t)}function u(t,e){if(!t||"function"==typeof t||t._readableState)return t;var r=new i.Readable(e).wrap(t);return t.destroy&&(r.destroy=t.destroy.bind(t)),r}n(o,i.Readable),o.obj=function(t){return new o(t,{objectMode:!0,highWaterMark:16})},o.prototype._read=function(){this._drained=!0,this._forward()},o.prototype._forward=function(){if(!this._forwarding&&this._drained&&this._current){var t;for(this._forwarding=!0;null!==(t=this._current.read());)this._drained=this.push(t);this._forwarding=!1}},o.prototype.destroy=function(t){this.destroyed||(this.destroyed=!0,this._current&&this._current.destroy&&this._current.destroy(),"function"!=typeof this._queue&&this._queue.forEach((function(t){t.destroy&&t.destroy()})),t&&this.emit("error",t),this.emit("close"))},o.prototype._next=function(){var t=this;if(t._current=null,"function"==typeof t._queue)t._queue((function(e,r){if(e)return t.destroy(e);r=t._toStreams2(r),t._attachErrorListener(r),t._gotNextStream(r)}));else{var e=t._queue.shift();"function"==typeof e&&(e=t._toStreams2(e()),t._attachErrorListener(e)),t._gotNextStream(e)}},o.prototype._gotNextStream=function(t){var e=this;if(!t)return e.push(null),void e.destroy();function r(){e._forward()}function n(){t._readableState.ended||e.destroy()}e._current=t,e._forward(),t.on("readable",r),t.once("end",(function i(){e._current=null,t.removeListener("readable",r),t.removeListener("end",i),t.removeListener("close",n),e._next()})),t.once("close",n)},o.prototype._attachErrorListener=function(t){var e=this;t&&t.once("error",(function r(n){t.removeListener("error",r),e.destroy(n)}))}},{inherits:119,"readable-stream":155}],129:[function(t,e,r){var n="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=n&&i&&"function"==typeof i.get?i.get:null,s=n&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&u&&"function"==typeof u.get?u.get:null,l=a&&Set.prototype.forEach,h="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f=Boolean.prototype.valueOf,d=Object.prototype.toString,y=String.prototype.match,m="function"==typeof BigInt?BigInt.prototype.valueOf:null,g=t("./util.inspect").custom,b=g&&T(g)?g:null;function v(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function _(t){return String(t).replace(/"/g,"&quot;")}function w(t){return"[object Array]"===O(t)}function T(t){return"[object Symbol]"===O(t)}e.exports=function t(e,r,n,i){var a=r||{};if(S(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return function(t,e){return v(t.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,x),"single",e)}(e,a);if("number"==typeof e)return 0===e?1/0/e>0?"0":"-0":String(e);if("bigint"==typeof e)return String(e)+"n";var u=void 0===a.depth?5:a.depth;if(void 0===n&&(n=0),n>=u&&u>0&&"object"==typeof e)return"[Object]";if(void 0===i)i=[];else if(function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}(i,e)>=0)return"[Circular]";function d(e,r){return r&&(i=i.slice()).push(r),t(e,a,n+1,i)}if("function"==typeof e){var g=function(t){if(t.name)return t.name;var e=y.call(t,/^function\s*([\w$]+)/);if(e)return e[1];return null}(e);return"[Function"+(g?": "+g:"")+"]"}if(T(e)){var E=Symbol.prototype.toString.call(e);return"object"==typeof e?I(E):E}if(function(t){if(!t||"object"!=typeof t)return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(e)){for(var A="<"+String(e.nodeName).toLowerCase(),j=e.attributes||[],P=0;P<j.length;P++)A+=" "+j[P].name+"="+v(_(j[P].value),"double",a);return A+=">",e.childNodes&&e.childNodes.length&&(A+="..."),A+="</"+String(e.nodeName).toLowerCase()+">"}if(w(e))return 0===e.length?"[]":"[ "+N(e,d).join(", ")+" ]";if(function(t){return"[object Error]"===O(t)}(e)){var k=N(e,d);return 0===k.length?"["+String(e)+"]":"{ ["+String(e)+"] "+k.join(", ")+" }"}if("object"==typeof e){if(b&&"function"==typeof e[b])return e[b]();if("function"==typeof e.inspect)return e.inspect()}if(function(t){if(!o||!t||"object"!=typeof t)return!1;try{o.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var L=[];return s.call(e,(function(t,r){L.push(d(r,e)+" => "+d(t,e))})),D("Map",o.call(e),L)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{o.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var R=[];return l.call(e,(function(t){R.push(d(t,e))})),D("Set",c.call(e),R)}if(function(t){if(!h||!t||"object"!=typeof t)return!1;try{h.call(t,h);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return C("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{h.call(t,h)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return C("WeakSet");if(function(t){return"[object Number]"===O(t)}(e))return I(d(Number(e)));if(function(t){return"[object BigInt]"===O(t)}(e))return I(d(m.call(e)));if(function(t){return"[object Boolean]"===O(t)}(e))return I(f.call(e));if(function(t){return"[object String]"===O(t)}(e))return I(d(String(e)));if(!function(t){return"[object Date]"===O(t)}(e)&&!function(t){return"[object RegExp]"===O(t)}(e)){var M=N(e,d);return 0===M.length?"{}":"{ "+M.join(", ")+" }"}return String(e)};var E=Object.prototype.hasOwnProperty||function(t){return t in this};function S(t,e){return E.call(t,e)}function O(t){return d.call(t)}function x(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+e.toString(16)}function I(t){return"Object("+t+")"}function C(t){return t+" { ? }"}function D(t,e,r){return t+" ("+e+") {"+r.join(", ")+"}"}function N(t,e){var r=w(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=S(t,i)?e(t[i],t):""}for(var o in t)S(t,o)&&(r&&String(Number(o))===o&&o<t.length||(/[^\w$]/.test(o)?n.push(e(o,t)+": "+e(t[o],t)):n.push(o+": "+e(t[o],t))));return n}},{"./util.inspect":39}],130:[function(t,e,r){"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,s=t("./isArguments"),a=Object.prototype.propertyIsEnumerable,u=!a.call({toString:null},"toString"),c=a.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],h=function(t){var e=t.constructor;return e&&e.prototype===t},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!p["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{h(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===o.call(t),n=s(t),a=e&&"[object String]"===o.call(t),p=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var d=c&&r;if(a&&t.length>0&&!i.call(t,0))for(var y=0;y<t.length;++y)p.push(String(y));if(n&&t.length>0)for(var m=0;m<t.length;++m)p.push(String(m));else for(var g in t)d&&"prototype"===g||!i.call(t,g)||p.push(String(g));if(u)for(var b=function(t){if("undefined"==typeof window||!f)return h(t);try{return h(t)}catch(t){return!1}}(t),v=0;v<l.length;++v)b&&"constructor"===l[v]||!i.call(t,l[v])||p.push(l[v]);return p}}e.exports=n},{"./isArguments":132}],131:[function(t,e,r){"use strict";var n=Array.prototype.slice,i=t("./isArguments"),o=Object.keys,s=o?function(t){return o(t)}:t("./implementation"),a=Object.keys;s.shim=function(){Object.keys?function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2)||(Object.keys=function(t){return i(t)?a(n.call(t)):a(t)}):Object.keys=s;return Object.keys||s},e.exports=s},{"./implementation":130,"./isArguments":132}],132:[function(t,e,r){"use strict";var n=Object.prototype.toString;e.exports=function(t){var e=n.call(t),r="[object Arguments]"===e;return r||(r="[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===n.call(t.callee)),r}},{}],133:[function(t,e,r){"use strict";var n=t("es-abstract/es7"),i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,u=Function.call.bind(Array.prototype.concat),c=Function.call.bind(Array.prototype.reduce),l=a?function(t){return u(s(t),a(t))}:s,h=n.IsCallable(o)&&n.IsCallable(s);e.exports=function(t){if(n.RequireObjectCoercible(t),!h)throw new TypeError("getOwnPropertyDescriptors requires Object.getOwnPropertyDescriptor");var e=n.ToObject(t);return c(l(e),(function(t,r){var n,s,a,u=o(e,r);return void 0!==u&&(n=t,s=r,a=u,i&&s in n?i(n,s,{configurable:!0,enumerable:!0,value:a,writable:!0}):n[s]=a),t}),{})}},{"es-abstract/es7":51}],134:[function(t,e,r){"use strict";var n=t("define-properties"),i=t("./implementation");n(i,{getPolyfill:t("./polyfill"),implementation:i,shim:t("./shim")}),e.exports=i},{"./implementation":133,"./polyfill":135,"./shim":136,"define-properties":46}],135:[function(t,e,r){"use strict";var n=t("./implementation");e.exports=function(){return"function"==typeof Object.getOwnPropertyDescriptors?Object.getOwnPropertyDescriptors:n}},{"./implementation":133}],136:[function(t,e,r){"use strict";var n=t("./polyfill"),i=t("define-properties");e.exports=function(){var t=n();return i(Object,{getOwnPropertyDescriptors:t},{getOwnPropertyDescriptors:function(){return Object.getOwnPropertyDescriptors!==t}}),t}},{"./polyfill":135,"define-properties":46}],137:[function(t,e,r){(function(t){"use strict";void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,r)}));case 3:return t.nextTick((function(){e.call(null,r,n)}));case 4:return t.nextTick((function(){e.call(null,r,n,i)}));default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return t.nextTick((function(){e.apply(null,o)}))}}}:e.exports=t}).call(this,t("_process"))},{_process:138}],138:[function(t,e,r){var n,i,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(t){n=s}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var c,l=[],h=!1,p=-1;function f(){h&&c&&(h=!1,c.length?l=c.concat(l):p=-1,l.length&&d())}function d(){if(!h){var t=u(f);h=!0;for(var e=l.length;e;){for(c=l,l=[];++p<e;)c&&c[p].run();p=-1,e=l.length}c=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function m(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new y(t,e)),1!==l.length||h||u(d)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],139:[function(t,e,r){"use strict";var n=t("asap/raw");function i(){}var o=null,s={};function a(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("Promise constructor's argument is not a function");this._40=0,this._65=0,this._55=null,this._72=null,t!==i&&f(t,this)}function u(t,e){for(;3===t._65;)t=t._55;if(a._37&&a._37(t),0===t._65)return 0===t._40?(t._40=1,void(t._72=e)):1===t._40?(t._40=2,void(t._72=[t._72,e])):void t._72.push(e);!function(t,e){n((function(){var r=1===t._65?e.onFulfilled:e.onRejected;if(null!==r){var n=function(t,e){try{return t(e)}catch(t){return o=t,s}}(r,t._55);n===s?l(e.promise,o):c(e.promise,n)}else 1===t._65?c(e.promise,t._55):l(e.promise,t._55)}))}(t,e)}function c(t,e){if(e===t)return l(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var r=function(t){try{return t.then}catch(t){return o=t,s}}(e);if(r===s)return l(t,o);if(r===t.then&&e instanceof a)return t._65=3,t._55=e,void h(t);if("function"==typeof r)return void f(r.bind(e),t)}t._65=1,t._55=e,h(t)}function l(t,e){t._65=2,t._55=e,a._87&&a._87(t,e),h(t)}function h(t){if(1===t._40&&(u(t,t._72),t._72=null),2===t._40){for(var e=0;e<t._72.length;e++)u(t,t._72[e]);t._72=null}}function p(t,e,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=r}function f(t,e){var r=!1,n=function(t,e,r){try{t(e,r)}catch(t){return o=t,s}}(t,(function(t){r||(r=!0,c(e,t))}),(function(t){r||(r=!0,l(e,t))}));r||n!==s||(r=!0,l(e,o))}e.exports=a,a._37=null,a._87=null,a._61=i,a.prototype.then=function(t,e){if(this.constructor!==a)return function(t,e,r){return new t.constructor((function(n,o){var s=new a(i);s.then(n,o),u(t,new p(e,r,s))}))}(this,t,e);var r=new a(i);return u(this,new p(t,e,r)),r}},{"asap/raw":37}],140:[function(t,e,r){"use strict";var n=t("./core.js");e.exports=n;var i=l(!0),o=l(!1),s=l(null),a=l(void 0),u=l(0),c=l("");function l(t){var e=new n(n._61);return e._65=1,e._55=t,e}n.resolve=function(t){if(t instanceof n)return t;if(null===t)return s;if(void 0===t)return a;if(!0===t)return i;if(!1===t)return o;if(0===t)return u;if(""===t)return c;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new n(e.bind(t))}catch(t){return new n((function(e,r){r(t)}))}return l(t)},n.all=function(t){var e=Array.prototype.slice.call(t);return new n((function(t,r){if(0===e.length)return t([]);var i=e.length;function o(s,a){if(a&&("object"==typeof a||"function"==typeof a)){if(a instanceof n&&a.then===n.prototype.then){for(;3===a._65;)a=a._55;return 1===a._65?o(s,a._55):(2===a._65&&r(a._55),void a.then((function(t){o(s,t)}),r))}var u=a.then;if("function"==typeof u)return void new n(u.bind(a)).then((function(t){o(s,t)}),r)}e[s]=a,0==--i&&t(e)}for(var s=0;s<e.length;s++)o(s,e[s])}))},n.reject=function(t){return new n((function(e,r){r(t)}))},n.race=function(t){return new n((function(e,r){t.forEach((function(t){n.resolve(t).then(e,r)}))}))},n.prototype.catch=function(t){return this.then(null,t)}},{"./core.js":139}],141:[function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,o){e=e||"&",r=r||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var h,p,f,d,y=t[l].replace(a,"%20"),m=y.indexOf(r);m>=0?(h=y.substr(0,m),p=y.substr(m+1)):(h=y,p=""),f=decodeURIComponent(h),d=decodeURIComponent(p),n(s,f)?i(s[f])?s[f].push(d):s[f]=[s[f],d]:s[f]=d}return s};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],142:[function(t,e,r){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,r,a){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?o(s(t),(function(s){var a=encodeURIComponent(n(s))+r;return i(t[s])?o(t[s],(function(t){return a+encodeURIComponent(n(t))})).join(e):a+encodeURIComponent(n(t[s]))})).join(e):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var s=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},{}],143:[function(t,e,r){"use strict";r.decode=r.parse=t("./decode"),r.encode=r.stringify=t("./encode")},{"./decode":141,"./encode":142}],144:[function(t,e,r){e.exports=t("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":145}],145:[function(t,e,r){"use strict";var n=t("process-nextick-args"),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=h;var o=t("core-util-is");o.inherits=t("inherits");var s=t("./_stream_readable"),a=t("./_stream_writable");o.inherits(h,s);for(var u=i(a.prototype),c=0;c<u.length;c++){var l=u[c];h.prototype[l]||(h.prototype[l]=a.prototype[l])}function h(t){if(!(this instanceof h))return new h(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",p)}function p(){this.allowHalfOpen||this._writableState.ended||n.nextTick(f,this)}function f(t){t.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),h.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},{"./_stream_readable":147,"./_stream_writable":149,"core-util-is":41,inherits:119,"process-nextick-args":137}],146:[function(t,e,r){"use strict";e.exports=o;var n=t("./_stream_transform"),i=t("core-util-is");function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=t("inherits"),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},{"./_stream_transform":148,"core-util-is":41,inherits:119}],147:[function(t,e,r){(function(r,n){"use strict";var i=t("process-nextick-args");e.exports=v;var o,s=t("isarray");v.ReadableState=b;t("events").EventEmitter;var a=function(t,e){return t.listeners(e).length},u=t("./internal/streams/stream"),c=t("safe-buffer").Buffer,l=n.Uint8Array||function(){};var h=t("core-util-is");h.inherits=t("inherits");var p=t("util"),f=void 0;f=p&&p.debuglog?p.debuglog("stream"):function(){};var d,y=t("./internal/streams/BufferList"),m=t("./internal/streams/destroy");h.inherits(v,u);var g=["error","close","destroy","pause","resume"];function b(e,r){e=e||{};var n=r instanceof(o=o||t("./_stream_duplex"));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=t("string_decoder/").StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function v(e){if(o=o||t("./_stream_duplex"),!(this instanceof v))return new v(e);this._readableState=new b(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function _(t,e,r,n,i){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,E(t)}(t,s)):(i||(o=function(t,e){var r;n=e,c.isBuffer(n)||n instanceof l||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?w(t,s,e,!1):O(t,s)):w(t,s,e,!1))):n||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function w(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&E(t)),O(t,e)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),v.prototype.destroy=m.destroy,v.prototype._undestroy=m.undestroy,v.prototype._destroy=function(t,e){this.push(null),e(t)},v.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=c.from(t,e),e=""),r=!0),_(this,t,e,!1,r)},v.prototype.unshift=function(t){return _(this,t,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(e){return d||(d=t("string_decoder/").StringDecoder),this._readableState.decoder=new d(e),this._readableState.encoding=e,this};function T(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function E(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(f("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(S,t):S(t))}function S(t){f("emit readable"),t.emit("readable"),D(t)}function O(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(x,t,e))}function x(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(f("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function I(t){f("readable nexttick read 0"),t.read(0)}function C(t,e){e.reading||(f("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),D(t),e.flowing&&!e.reading&&t.read(0)}function D(t){var e=t._readableState;for(f("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=c.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function A(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(j,e,t))}function j(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function P(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}v.prototype.read=function(t){f("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return f("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?A(this):E(this),null;if(0===(t=T(t,e))&&e.ended)return 0===e.length&&A(this),null;var n,i=e.needReadable;return f("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&f("length less than watermark",i=!0),e.ended||e.reading?f("reading or ended",i=!1):i&&(f("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=T(r,e))),null===(n=t>0?N(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&A(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,f("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?l:v;function c(e,r){f("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,f("cleanup"),t.removeListener("close",g),t.removeListener("finish",b),t.removeListener("drain",h),t.removeListener("error",m),t.removeListener("unpipe",c),n.removeListener("end",l),n.removeListener("end",v),n.removeListener("data",y),p=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function l(){f("onend"),t.end()}o.endEmitted?i.nextTick(u):n.once("end",u),t.on("unpipe",c);var h=function(t){return function(){var e=t._readableState;f("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,D(t))}}(n);t.on("drain",h);var p=!1;var d=!1;function y(e){f("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==P(o.pipes,t))&&!p&&(f("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function m(e){f("onerror",e),v(),t.removeListener("error",m),0===a(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",b),v()}function b(){f("onfinish"),t.removeListener("close",g),v()}function v(){f("unpipe"),n.unpipe(t)}return n.on("data",y),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",m),t.once("close",g),t.once("finish",b),t.emit("pipe",n),o.flowing||(f("pipe resume"),n.resume()),t},v.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,r);return this}var s=P(e.pipes,t);return-1===s?this:(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)},v.prototype.on=function(t,e){var r=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&E(this):i.nextTick(I,this))}return r},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var t=this._readableState;return t.flowing||(f("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(C,t,e))}(this,t)),this},v.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(f("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(f("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<g.length;o++)t.on(g[o],this.emit.bind(this,g[o]));return this._read=function(e){f("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=N}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":145,"./internal/streams/BufferList":150,"./internal/streams/destroy":151,"./internal/streams/stream":152,_process:138,"core-util-is":41,events:77,inherits:119,isarray:125,"process-nextick-args":137,"safe-buffer":153,"string_decoder/":160,util:39}],148:[function(t,e,r){"use strict";e.exports=s;var n=t("./_stream_duplex"),i=t("core-util-is");function o(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);n.call(this,t),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",a)}function a(){var t=this;"function"==typeof this._flush?this._flush((function(e,r){u(t,e,r)})):u(this,null,null)}function u(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=t("inherits"),i.inherits(s,n),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},s.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},s.prototype._destroy=function(t,e){var r=this;n.prototype._destroy.call(this,t,(function(t){e(t),r.emit("close")}))}},{"./_stream_duplex":145,"core-util-is":41,inherits:119}],149:[function(t,e,r){(function(r,n,i){"use strict";var o=t("process-nextick-args");function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}e.exports=b;var a,u=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?i:o.nextTick;b.WritableState=g;var c=t("core-util-is");c.inherits=t("inherits");var l={deprecate:t("util-deprecate")},h=t("./internal/streams/stream"),p=t("safe-buffer").Buffer,f=n.Uint8Array||function(){};var d,y=t("./internal/streams/destroy");function m(){}function g(e,r){a=a||t("./_stream_duplex"),e=e||{};var n=r instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,c=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===e.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(S,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),S(t,e))}(t,r,n,e,i);else{var s=T(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),n?u(_,t,r,s,i):_(t,r,s,i)}}(r,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(e){if(a=a||t("./_stream_duplex"),!(d.call(b,this)||this instanceof a))return new b(e);this._writableState=new g(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),h.call(this)}function v(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function _(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),S(t,e)}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,v(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(v(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function T(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function E(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),S(t,e)}))}function S(t,e){var r=T(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(E,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}c.inherits(b,h),g.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(g.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===b&&(t&&t._writableState instanceof g)}})):d=function(t){return t instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(t,e,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=t,p.isBuffer(n)||n instanceof f);return a&&!p.isBuffer(t)&&(t=function(t){return p.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=m),i.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,t,r))&&(i.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=p.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else v(t,e,!1,a,n,i,o);return u}(this,i,a,t,e,r)),s},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||w(this,t))},b.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,S(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),b.prototype.destroy=y.destroy,b.prototype._undestroy=y.undestroy,b.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("timers").setImmediate)},{"./_stream_duplex":145,"./internal/streams/destroy":151,"./internal/streams/stream":152,_process:138,"core-util-is":41,inherits:119,"process-nextick-args":137,"safe-buffer":153,timers:162,"util-deprecate":163}],150:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer,i=t("util");e.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e,r,i,o=n.allocUnsafe(t>>>0),s=this.head,a=0;s;)e=s.data,r=o,i=a,e.copy(r,i),a+=s.data.length,s=s.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},{"safe-buffer":153,util:39}],151:[function(t,e,r){"use strict";var n=t("process-nextick-args");function i(t,e){t.emit("error",e)}e.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(n.nextTick(i,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":137}],152:[function(t,e,r){e.exports=t("events").EventEmitter},{events:77}],153:[function(t,e,r){var n=t("buffer"),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,r),r.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},{buffer:40}],154:[function(t,e,r){e.exports=t("./readable").PassThrough},{"./readable":155}],155:[function(t,e,r){(r=e.exports=t("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=t("./lib/_stream_writable.js"),r.Duplex=t("./lib/_stream_duplex.js"),r.Transform=t("./lib/_stream_transform.js"),r.PassThrough=t("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":145,"./lib/_stream_passthrough.js":146,"./lib/_stream_readable.js":147,"./lib/_stream_transform.js":148,"./lib/_stream_writable.js":149}],156:[function(t,e,r){e.exports=t("./readable").Transform},{"./readable":155}],157:[function(t,e,r){e.exports=t("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":149}],158:[function(t,e,r){(function(e){!function(r){r.parser=function(t,e){return new o(t,e)},r.SAXParser=o,r.SAXStream=a,r.createStream=function(t,e){return new a(t,e)},r.MAX_BUFFER_LENGTH=65536;var n,i=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function o(t,e){if(!(this instanceof o))return new o(t,e);!function(t){for(var e=0,r=i.length;e<r;e++)t[i[e]]=""}(this),this.q=this.c="",this.bufferCheckPosition=r.MAX_BUFFER_LENGTH,this.opt=e||{},this.opt.lowercase=this.opt.lowercase||this.opt.lowercasetags,this.looseCase=this.opt.lowercase?"toLowerCase":"toUpperCase",this.tags=[],this.closed=this.closedRoot=this.sawRoot=!1,this.tag=this.error=null,this.strict=!!t,this.noscript=!(!t&&!this.opt.noscript),this.state=T.BEGIN,this.strictEntities=this.opt.strictEntities,this.ENTITIES=this.strictEntities?Object.create(r.XML_ENTITIES):Object.create(r.ENTITIES),this.attribList=[],this.opt.xmlns&&(this.ns=Object.create(c)),this.trackPosition=!1!==this.opt.position,this.trackPosition&&(this.position=this.line=this.column=0),S(this,"onready")}r.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(t){function e(){}return e.prototype=t,new e}),Object.keys||(Object.keys=function(t){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);return e}),o.prototype={end:function(){D(this)},write:function(t){if(this.error)throw this.error;if(this.closed)return C(this,"Cannot write after close. Assign an onready handler.");if(null===t)return D(this);"object"==typeof t&&(t=t.toString());var e=0,n="";for(;n=U(t,e++),this.c=n,n;)switch(this.trackPosition&&(this.position++,"\n"===n?(this.line++,this.column=0):this.column++),this.state){case T.BEGIN:if(this.state=T.BEGIN_WHITESPACE,"\ufeff"===n)continue;M(this,n);continue;case T.BEGIN_WHITESPACE:M(this,n);continue;case T.TEXT:if(this.sawRoot&&!this.closedRoot){for(var o=e-1;n&&"<"!==n&&"&"!==n;)(n=U(t,e++))&&this.trackPosition&&(this.position++,"\n"===n?(this.line++,this.column=0):this.column++);this.textNode+=t.substring(o,e-1)}"<"!==n||this.sawRoot&&this.closedRoot&&!this.strict?(d(n)||this.sawRoot&&!this.closedRoot||N(this,"Text data outside of root node."),"&"===n?this.state=T.TEXT_ENTITY:this.textNode+=n):(this.state=T.OPEN_WAKA,this.startTagPosition=this.position);continue;case T.SCRIPT:"<"===n?this.state=T.SCRIPT_ENDING:this.script+=n;continue;case T.SCRIPT_ENDING:"/"===n?this.state=T.CLOSE_TAG:(this.script+="<"+n,this.state=T.SCRIPT);continue;case T.OPEN_WAKA:if("!"===n)this.state=T.SGML_DECL,this.sgmlDecl="";else if(d(n));else if(g(l,n))this.state=T.OPEN_TAG,this.tagName=n;else if("/"===n)this.state=T.CLOSE_TAG,this.tagName="";else if("?"===n)this.state=T.PROC_INST,this.procInstName=this.procInstBody="";else{if(N(this,"Unencoded <"),this.startTagPosition+1<this.position){var s=this.position-this.startTagPosition;n=new Array(s).join(" ")+n}this.textNode+="<"+n,this.state=T.TEXT}continue;case T.SGML_DECL:"[CDATA["===(this.sgmlDecl+n).toUpperCase()?(O(this,"onopencdata"),this.state=T.CDATA,this.sgmlDecl="",this.cdata=""):this.sgmlDecl+n==="--"?(this.state=T.COMMENT,this.comment="",this.sgmlDecl=""):"DOCTYPE"===(this.sgmlDecl+n).toUpperCase()?(this.state=T.DOCTYPE,(this.doctype||this.sawRoot)&&N(this,"Inappropriately located doctype declaration"),this.doctype="",this.sgmlDecl=""):">"===n?(O(this,"onsgmldeclaration",this.sgmlDecl),this.sgmlDecl="",this.state=T.TEXT):y(n)?(this.state=T.SGML_DECL_QUOTED,this.sgmlDecl+=n):this.sgmlDecl+=n;continue;case T.SGML_DECL_QUOTED:n===this.q&&(this.state=T.SGML_DECL,this.q=""),this.sgmlDecl+=n;continue;case T.DOCTYPE:">"===n?(this.state=T.TEXT,O(this,"ondoctype",this.doctype),this.doctype=!0):(this.doctype+=n,"["===n?this.state=T.DOCTYPE_DTD:y(n)&&(this.state=T.DOCTYPE_QUOTED,this.q=n));continue;case T.DOCTYPE_QUOTED:this.doctype+=n,n===this.q&&(this.q="",this.state=T.DOCTYPE);continue;case T.DOCTYPE_DTD:this.doctype+=n,"]"===n?this.state=T.DOCTYPE:y(n)&&(this.state=T.DOCTYPE_DTD_QUOTED,this.q=n);continue;case T.DOCTYPE_DTD_QUOTED:this.doctype+=n,n===this.q&&(this.state=T.DOCTYPE_DTD,this.q="");continue;case T.COMMENT:"-"===n?this.state=T.COMMENT_ENDING:this.comment+=n;continue;case T.COMMENT_ENDING:"-"===n?(this.state=T.COMMENT_ENDED,this.comment=I(this.opt,this.comment),this.comment&&O(this,"oncomment",this.comment),this.comment=""):(this.comment+="-"+n,this.state=T.COMMENT);continue;case T.COMMENT_ENDED:">"!==n?(N(this,"Malformed comment"),this.comment+="--"+n,this.state=T.COMMENT):this.state=T.TEXT;continue;case T.CDATA:"]"===n?this.state=T.CDATA_ENDING:this.cdata+=n;continue;case T.CDATA_ENDING:"]"===n?this.state=T.CDATA_ENDING_2:(this.cdata+="]"+n,this.state=T.CDATA);continue;case T.CDATA_ENDING_2:">"===n?(this.cdata&&O(this,"oncdata",this.cdata),O(this,"onclosecdata"),this.cdata="",this.state=T.TEXT):"]"===n?this.cdata+="]":(this.cdata+="]]"+n,this.state=T.CDATA);continue;case T.PROC_INST:"?"===n?this.state=T.PROC_INST_ENDING:d(n)?this.state=T.PROC_INST_BODY:this.procInstName+=n;continue;case T.PROC_INST_BODY:if(!this.procInstBody&&d(n))continue;"?"===n?this.state=T.PROC_INST_ENDING:this.procInstBody+=n;continue;case T.PROC_INST_ENDING:">"===n?(O(this,"onprocessinginstruction",{name:this.procInstName,body:this.procInstBody}),this.procInstName=this.procInstBody="",this.state=T.TEXT):(this.procInstBody+="?"+n,this.state=T.PROC_INST_BODY);continue;case T.OPEN_TAG:g(h,n)?this.tagName+=n:(A(this),">"===n?k(this):"/"===n?this.state=T.OPEN_TAG_SLASH:(d(n)||N(this,"Invalid character in tag name"),this.state=T.ATTRIB));continue;case T.OPEN_TAG_SLASH:">"===n?(k(this,!0),L(this)):(N(this,"Forward-slash in opening tag not followed by >"),this.state=T.ATTRIB);continue;case T.ATTRIB:if(d(n))continue;">"===n?k(this):"/"===n?this.state=T.OPEN_TAG_SLASH:g(l,n)?(this.attribName=n,this.attribValue="",this.state=T.ATTRIB_NAME):N(this,"Invalid attribute name");continue;case T.ATTRIB_NAME:"="===n?this.state=T.ATTRIB_VALUE:">"===n?(N(this,"Attribute without value"),this.attribValue=this.attribName,P(this),k(this)):d(n)?this.state=T.ATTRIB_NAME_SAW_WHITE:g(h,n)?this.attribName+=n:N(this,"Invalid attribute name");continue;case T.ATTRIB_NAME_SAW_WHITE:if("="===n)this.state=T.ATTRIB_VALUE;else{if(d(n))continue;N(this,"Attribute without value"),this.tag.attributes[this.attribName]="",this.attribValue="",O(this,"onattribute",{name:this.attribName,value:""}),this.attribName="",">"===n?k(this):g(l,n)?(this.attribName=n,this.state=T.ATTRIB_NAME):(N(this,"Invalid attribute name"),this.state=T.ATTRIB)}continue;case T.ATTRIB_VALUE:if(d(n))continue;y(n)?(this.q=n,this.state=T.ATTRIB_VALUE_QUOTED):(N(this,"Unquoted attribute value"),this.state=T.ATTRIB_VALUE_UNQUOTED,this.attribValue=n);continue;case T.ATTRIB_VALUE_QUOTED:if(n!==this.q){"&"===n?this.state=T.ATTRIB_VALUE_ENTITY_Q:this.attribValue+=n;continue}P(this),this.q="",this.state=T.ATTRIB_VALUE_CLOSED;continue;case T.ATTRIB_VALUE_CLOSED:d(n)?this.state=T.ATTRIB:">"===n?k(this):"/"===n?this.state=T.OPEN_TAG_SLASH:g(l,n)?(N(this,"No whitespace between attributes"),this.attribName=n,this.attribValue="",this.state=T.ATTRIB_NAME):N(this,"Invalid attribute name");continue;case T.ATTRIB_VALUE_UNQUOTED:if(!m(n)){"&"===n?this.state=T.ATTRIB_VALUE_ENTITY_U:this.attribValue+=n;continue}P(this),">"===n?k(this):this.state=T.ATTRIB;continue;case T.CLOSE_TAG:if(this.tagName)">"===n?L(this):g(h,n)?this.tagName+=n:this.script?(this.script+="</"+this.tagName,this.tagName="",this.state=T.SCRIPT):(d(n)||N(this,"Invalid tagname in closing tag"),this.state=T.CLOSE_TAG_SAW_WHITE);else{if(d(n))continue;b(l,n)?this.script?(this.script+="</"+n,this.state=T.SCRIPT):N(this,"Invalid tagname in closing tag."):this.tagName=n}continue;case T.CLOSE_TAG_SAW_WHITE:if(d(n))continue;">"===n?L(this):N(this,"Invalid characters in closing tag");continue;case T.TEXT_ENTITY:case T.ATTRIB_VALUE_ENTITY_Q:case T.ATTRIB_VALUE_ENTITY_U:var a,u;switch(this.state){case T.TEXT_ENTITY:a=T.TEXT,u="textNode";break;case T.ATTRIB_VALUE_ENTITY_Q:a=T.ATTRIB_VALUE_QUOTED,u="attribValue";break;case T.ATTRIB_VALUE_ENTITY_U:a=T.ATTRIB_VALUE_UNQUOTED,u="attribValue"}";"===n?(this[u]+=R(this),this.entity="",this.state=a):g(this.entity.length?f:p,n)?this.entity+=n:(N(this,"Invalid character in entity name"),this[u]+="&"+this.entity+n,this.entity="",this.state=a);continue;default:throw new Error(this,"Unknown state: "+this.state)}this.position>=this.bufferCheckPosition&&function(t){for(var e=Math.max(r.MAX_BUFFER_LENGTH,10),n=0,o=0,s=i.length;o<s;o++){var a=t[i[o]].length;if(a>e)switch(i[o]){case"textNode":x(t);break;case"cdata":O(t,"oncdata",t.cdata),t.cdata="";break;case"script":O(t,"onscript",t.script),t.script="";break;default:C(t,"Max buffer length exceeded: "+i[o])}n=Math.max(n,a)}var u=r.MAX_BUFFER_LENGTH-n;t.bufferCheckPosition=u+t.position}(this);return this}
  /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var t;x(t=this),""!==t.cdata&&(O(t,"oncdata",t.cdata),t.cdata=""),""!==t.script&&(O(t,"onscript",t.script),t.script="")}};try{n=t("stream").Stream}catch(t){n=function(){}}var s=r.EVENTS.filter((function(t){return"error"!==t&&"end"!==t}));function a(t,e){if(!(this instanceof a))return new a(t,e);n.apply(this),this._parser=new o(t,e),this.writable=!0,this.readable=!0;var r=this;this._parser.onend=function(){r.emit("end")},this._parser.onerror=function(t){r.emit("error",t),r._parser.error=null},this._decoder=null,s.forEach((function(t){Object.defineProperty(r,"on"+t,{get:function(){return r._parser["on"+t]},set:function(e){if(!e)return r.removeAllListeners(t),r._parser["on"+t]=e,e;r.on(t,e)},enumerable:!0,configurable:!1})}))}a.prototype=Object.create(n.prototype,{constructor:{value:a}}),a.prototype.write=function(r){if("function"==typeof e&&"function"==typeof e.isBuffer&&e.isBuffer(r)){if(!this._decoder){var n=t("string_decoder").StringDecoder;this._decoder=new n("utf8")}r=this._decoder.write(r)}return this._parser.write(r.toString()),this.emit("data",r),!0},a.prototype.end=function(t){return t&&t.length&&this.write(t),this._parser.end(),!0},a.prototype.on=function(t,e){var r=this;return r._parser["on"+t]||-1===s.indexOf(t)||(r._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),r.emit.apply(r,e)}),n.prototype.on.call(r,t,e)};var u="http://www.w3.org/XML/1998/namespace",c={xml:u,xmlns:"http://www.w3.org/2000/xmlns/"},l=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,h=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,p=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,f=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function d(t){return" "===t||"\n"===t||"\r"===t||"\t"===t}function y(t){return'"'===t||"'"===t}function m(t){return">"===t||d(t)}function g(t,e){return t.test(e)}function b(t,e){return!g(t,e)}var v,_,w,T=0;for(var E in r.STATE={BEGIN:T++,BEGIN_WHITESPACE:T++,TEXT:T++,TEXT_ENTITY:T++,OPEN_WAKA:T++,SGML_DECL:T++,SGML_DECL_QUOTED:T++,DOCTYPE:T++,DOCTYPE_QUOTED:T++,DOCTYPE_DTD:T++,DOCTYPE_DTD_QUOTED:T++,COMMENT_STARTING:T++,COMMENT:T++,COMMENT_ENDING:T++,COMMENT_ENDED:T++,CDATA:T++,CDATA_ENDING:T++,CDATA_ENDING_2:T++,PROC_INST:T++,PROC_INST_BODY:T++,PROC_INST_ENDING:T++,OPEN_TAG:T++,OPEN_TAG_SLASH:T++,ATTRIB:T++,ATTRIB_NAME:T++,ATTRIB_NAME_SAW_WHITE:T++,ATTRIB_VALUE:T++,ATTRIB_VALUE_QUOTED:T++,ATTRIB_VALUE_CLOSED:T++,ATTRIB_VALUE_UNQUOTED:T++,ATTRIB_VALUE_ENTITY_Q:T++,ATTRIB_VALUE_ENTITY_U:T++,CLOSE_TAG:T++,CLOSE_TAG_SAW_WHITE:T++,SCRIPT:T++,SCRIPT_ENDING:T++},r.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},r.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(r.ENTITIES).forEach((function(t){var e=r.ENTITIES[t],n="number"==typeof e?String.fromCharCode(e):e;r.ENTITIES[t]=n})),r.STATE)r.STATE[r.STATE[E]]=E;function S(t,e,r){t[e]&&t[e](r)}function O(t,e,r){t.textNode&&x(t),S(t,e,r)}function x(t){t.textNode=I(t.opt,t.textNode),t.textNode&&S(t,"ontext",t.textNode),t.textNode=""}function I(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function C(t,e){return x(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=new Error(e),t.error=e,S(t,"onerror",e),t}function D(t){return t.sawRoot&&!t.closedRoot&&N(t,"Unclosed root tag"),t.state!==T.BEGIN&&t.state!==T.BEGIN_WHITESPACE&&t.state!==T.TEXT&&C(t,"Unexpected end"),x(t),t.c="",t.closed=!0,S(t,"onend"),o.call(t,t.strict,t.opt),t}function N(t,e){if("object"!=typeof t||!(t instanceof o))throw new Error("bad call to strictFail");t.strict&&C(t,e)}function A(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,r=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(r.ns=e.ns),t.attribList.length=0,O(t,"onopentagstart",r)}function j(t,e){var r=t.indexOf(":")<0?["",t]:t.split(":"),n=r[0],i=r[1];return e&&"xmlns"===t&&(n="xmlns",i=""),{prefix:n,local:i}}function P(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))t.attribName=t.attribValue="";else{if(t.opt.xmlns){var e=j(t.attribName,!0),r=e.prefix,n=e.local;if("xmlns"===r)if("xml"===n&&t.attribValue!==u)N(t,"xml: prefix must be bound to "+u+"\nActual: "+t.attribValue);else if("xmlns"===n&&"http://www.w3.org/2000/xmlns/"!==t.attribValue)N(t,"xmlns: prefix must be bound to http://www.w3.org/2000/xmlns/\nActual: "+t.attribValue);else{var i=t.tag,o=t.tags[t.tags.length-1]||t;i.ns===o.ns&&(i.ns=Object.create(o.ns)),i.ns[n]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,O(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}}function k(t,e){if(t.opt.xmlns){var r=t.tag,n=j(t.tagName);r.prefix=n.prefix,r.local=n.local,r.uri=r.ns[n.prefix]||"",r.prefix&&!r.uri&&(N(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),r.uri=n.prefix);var i=t.tags[t.tags.length-1]||t;r.ns&&i.ns!==r.ns&&Object.keys(r.ns).forEach((function(e){O(t,"onopennamespace",{prefix:e,uri:r.ns[e]})}));for(var o=0,s=t.attribList.length;o<s;o++){var a=t.attribList[o],u=a[0],c=a[1],l=j(u,!0),h=l.prefix,p=l.local,f=""===h?"":r.ns[h]||"",d={name:u,value:c,prefix:h,local:p,uri:f};h&&"xmlns"!==h&&!f&&(N(t,"Unbound namespace prefix: "+JSON.stringify(h)),d.uri=h),t.tag.attributes[u]=d,O(t,"onattribute",d)}t.attribList.length=0}t.tag.isSelfClosing=!!e,t.sawRoot=!0,t.tags.push(t.tag),O(t,"onopentag",t.tag),e||(t.noscript||"script"!==t.tagName.toLowerCase()?t.state=T.TEXT:t.state=T.SCRIPT,t.tag=null,t.tagName=""),t.attribName=t.attribValue="",t.attribList.length=0}function L(t){if(!t.tagName)return N(t,"Weird empty close tag."),t.textNode+="</>",void(t.state=T.TEXT);if(t.script){if("script"!==t.tagName)return t.script+="</"+t.tagName+">",t.tagName="",void(t.state=T.SCRIPT);O(t,"onscript",t.script),t.script=""}var e=t.tags.length,r=t.tagName;t.strict||(r=r[t.looseCase]());for(var n=r;e--;){if(t.tags[e].name===n)break;N(t,"Unexpected close tag")}if(e<0)return N(t,"Unmatched closing tag: "+t.tagName),t.textNode+="</"+t.tagName+">",void(t.state=T.TEXT);t.tagName=r;for(var i=t.tags.length;i-- >e;){var o=t.tag=t.tags.pop();t.tagName=t.tag.name,O(t,"onclosetag",t.tagName);var s={};for(var a in o.ns)s[a]=o.ns[a];var u=t.tags[t.tags.length-1]||t;t.opt.xmlns&&o.ns!==u.ns&&Object.keys(o.ns).forEach((function(e){var r=o.ns[e];O(t,"onclosenamespace",{prefix:e,uri:r})}))}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=T.TEXT}function R(t){var e,r=t.entity,n=r.toLowerCase(),i="";return t.ENTITIES[r]?t.ENTITIES[r]:t.ENTITIES[n]?t.ENTITIES[n]:("#"===(r=n).charAt(0)&&("x"===r.charAt(1)?(r=r.slice(2),i=(e=parseInt(r,16)).toString(16)):(r=r.slice(1),i=(e=parseInt(r,10)).toString(10))),r=r.replace(/^0+/,""),isNaN(e)||i.toLowerCase()!==r?(N(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCodePoint(e))}function M(t,e){"<"===e?(t.state=T.OPEN_WAKA,t.startTagPosition=t.position):d(e)||(N(t,"Non-whitespace before first tag."),t.textNode=e,t.state=T.TEXT)}function U(t,e){var r="";return e<t.length&&(r=t.charAt(e)),r}T=r.STATE,String.fromCodePoint||(v=String.fromCharCode,_=Math.floor,w=function(){var t,e,r=16384,n=[],i=-1,o=arguments.length;if(!o)return"";for(var s="";++i<o;){var a=Number(arguments[i]);if(!isFinite(a)||a<0||a>1114111||_(a)!==a)throw RangeError("Invalid code point: "+a);a<=65535?n.push(a):(t=55296+((a-=65536)>>10),e=a%1024+56320,n.push(t,e)),(i+1===o||n.length>r)&&(s+=v.apply(null,n),n.length=0)}return s},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:w,configurable:!0,writable:!0}):String.fromCodePoint=w)}(void 0===r?this.sax={}:r)}).call(this,t("buffer").Buffer)},{buffer:40,stream:159,string_decoder:160}],159:[function(t,e,r){e.exports=i;var n=t("events").EventEmitter;function i(){n.call(this)}t("inherits")(i,n),i.Readable=t("readable-stream/readable.js"),i.Writable=t("readable-stream/writable.js"),i.Duplex=t("readable-stream/duplex.js"),i.Transform=t("readable-stream/transform.js"),i.PassThrough=t("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(l(),0===n.listenerCount(this,"error"))throw t}function l(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",l),r.removeListener("close",l),t.removeListener("close",l)}return r.on("error",c),t.on("error",c),r.on("end",l),r.on("close",l),t.on("close",l),t.emit("pipe",r),t}},{events:77,inherits:119,"readable-stream/duplex.js":144,"readable-stream/passthrough.js":154,"readable-stream/readable.js":155,"readable-stream/transform.js":156,"readable-stream/writable.js":157}],160:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=l,this.end=h,e=3;break;default:return this.write=p,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function l(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function p(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}r.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{"safe-buffer":161}],161:[function(t,e,r){arguments[4][153][0].apply(r,arguments)},{buffer:40,dup:153}],162:[function(t,e,r){(function(e,n){var i=t("process/browser.js").nextTick,o=Function.prototype.apply,s=Array.prototype.slice,a={},u=0;function c(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new c(o.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(o.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate="function"==typeof e?e:function(t){var e=u++,n=!(arguments.length<2)&&s.call(arguments,1);return a[e]=!0,i((function(){a[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate="function"==typeof n?n:function(t){delete a[t]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":138,timers:162}],163:[function(t,e,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(t){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],164:[function(t,e,r){"use strict";if(!("function"==typeof Object.defineProperty&&"function"==typeof Object.defineProperties&&"function"==typeof Object.getPrototypeOf&&"function"==typeof Object.setPrototypeOf))throw new TypeError("util.promisify requires a true ES5 environment");var n=t("object.getownpropertydescriptors");if("function"!=typeof Promise)throw new TypeError("`Promise` must be globally available for util.promisify to work.");var i=Function.call.bind(Array.prototype.slice),o=Function.call.bind(Array.prototype.concat),s=Function.call.bind(Array.prototype.forEach),a="function"==typeof Symbol&&"symbol"==typeof Symbol(""),u=a?Symbol("util.promisify.custom"):null,c=a?Symbol("customPromisifyArgs"):null;e.exports=function(t){if("function"!=typeof t){var e=new TypeError('The "original" argument must be of type function');throw e.name="TypeError [ERR_INVALID_ARG_TYPE]",e.code="ERR_INVALID_ARG_TYPE",e}if(a&&t[u]){var r=t[u];if("function"!=typeof r)throw new TypeError("The [util.promisify.custom] property must be a function");return Object.defineProperty(r,u,{configurable:!0,enumerable:!1,value:r,writable:!1}),r}var l=t[c],h=function(){var e=i(arguments),r=this;return new Promise((function(n,a){t.apply(r,o(e,(function(t){var e=arguments.length>1?i(arguments,1):[];if(t)a(t);else if(void 0!==l&&e.length>1){var r={};s(l,(function(t,n){r[t]=e[n]})),n(r)}else n(e[0])})))}))};return Object.setPrototypeOf(h,Object.getPrototypeOf(t)),Object.defineProperty(h,u,{configurable:!0,enumerable:!1,value:h,writable:!1}),Object.defineProperties(h,n(t))},e.exports.custom=u,e.exports.customPromisifyArgs=c},{"object.getownpropertydescriptors":134}],165:[function(t,e,r){"use strict";var n=t("define-properties"),i=t("util"),o=t("./implementation"),s=t("./polyfill"),a=s(),u=t("./shim"),c=function(t){return a.apply(i,arguments)};n(c,{custom:a.custom,customPromisifyArgs:a.customPromisifyArgs,getPolyfill:s,implementation:o,shim:u}),e.exports=c},{"./implementation":164,"./polyfill":166,"./shim":167,"define-properties":46,util:170}],166:[function(t,e,r){"use strict";var n=t("util"),i=t("./implementation");e.exports=function(){return"function"==typeof n.promisify?n.promisify:i}},{"./implementation":164,util:170}],167:[function(t,e,r){"use strict";var n=t("util"),i=t("./polyfill");e.exports=function(){var t=i();return t!==n.promisify&&(n.promisify=t,Object.defineProperty(n,"promisify",{value:t})),t}},{"./polyfill":166,util:170}],168:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],169:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],170:[function(t,e,r){(function(e,n){var i=/%[sdj%]/g;r.format=function(t){if(!g(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(a(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(t).replace(i,(function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),u=n[r];r<o;u=n[++r])y(u)||!_(u)?s+=" "+u:s+=" "+a(u);return s},r.deprecate=function(t,i){if(b(n.process))return function(){return r.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var o=!1;return function(){if(!o){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),o=!0}return t.apply(this,arguments)}};var o,s={};function a(t,e){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(e)?n.showHidden=e:e&&r._extend(n,e),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),l(n,t,n.depth)}function u(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function c(t,e){return t}function l(t,e,n){if(t.customInspect&&e&&E(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return g(i)||(i=l(t,i,n)),i}var o=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(g(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(m(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(y(e))return t.stylize("null","null")}(t,e);if(o)return o;var s=Object.keys(e),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(e)),T(e)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(e);if(0===s.length){if(E(e)){var u=e.name?": "+e.name:"";return t.stylize("[Function"+u+"]","special")}if(v(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(w(e))return t.stylize(Date.prototype.toString.call(e),"date");if(T(e))return h(e)}var c,_="",S=!1,O=["{","}"];(f(e)&&(S=!0,O=["[","]"]),E(e))&&(_=" [Function"+(e.name?": "+e.name:"")+"]");return v(e)&&(_=" "+RegExp.prototype.toString.call(e)),w(e)&&(_=" "+Date.prototype.toUTCString.call(e)),T(e)&&(_=" "+h(e)),0!==s.length||S&&0!=e.length?n<0?v(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=S?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)C(e,String(s))?o.push(p(t,e,r,n,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(p(t,e,r,n,i,!0))})),o}(t,e,n,a,s):s.map((function(r){return p(t,e,n,a,r,S)})),t.seen.pop(),function(t,e,r){if(t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n  ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,_,O)):O[0]+_+O[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),C(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=y(r)?l(t,u.value,null):l(t,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return"  "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return"   "+t})).join("\n")):a=t.stylize("[Circular]","special")),b(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function f(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function y(t){return null===t}function m(t){return"number"==typeof t}function g(t){return"string"==typeof t}function b(t){return void 0===t}function v(t){return _(t)&&"[object RegExp]"===S(t)}function _(t){return"object"==typeof t&&null!==t}function w(t){return _(t)&&"[object Date]"===S(t)}function T(t){return _(t)&&("[object Error]"===S(t)||t instanceof Error)}function E(t){return"function"==typeof t}function S(t){return Object.prototype.toString.call(t)}function O(t){return t<10?"0"+t.toString(10):t.toString(10)}r.debuglog=function(t){if(b(o)&&(o=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var n=e.pid;s[t]=function(){var e=r.format.apply(r,arguments);console.error("%s %d: %s",t,n,e)}}else s[t]=function(){};return s[t]},r.inspect=a,a.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]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=f,r.isBoolean=d,r.isNull=y,r.isNullOrUndefined=function(t){return null==t},r.isNumber=m,r.isString=g,r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=b,r.isRegExp=v,r.isObject=_,r.isDate=w,r.isError=T,r.isFunction=E,r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},r.isBuffer=t("./support/isBuffer");var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function I(){var t=new Date,e=[O(t.getHours()),O(t.getMinutes()),O(t.getSeconds())].join(":");return[t.getDate(),x[t.getMonth()],e].join(" ")}function C(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.log=function(){console.log("%s - %s",I(),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!_(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":169,_process:138,inherits:168}],171:[function(t,e,r){(function(){"use strict";r.stripBOM=function(t){return"\ufeff"===t[0]?t.substring(1):t}}).call(this)},{}],172:[function(t,e,r){(function(){"use strict";var e,n,i,o,s,a={}.hasOwnProperty;e=t("xmlbuilder"),n=t("./defaults").defaults,o=function(t){return"string"==typeof t&&(t.indexOf("&")>=0||t.indexOf(">")>=0||t.indexOf("<")>=0)},s=function(t){return"<![CDATA["+i(t)+"]]>"},i=function(t){return t.replace("]]>","]]]]><![CDATA[>")},r.Builder=function(){function t(t){var e,r,i;for(e in this.options={},r=n[.2])a.call(r,e)&&(i=r[e],this.options[e]=i);for(e in t)a.call(t,e)&&(i=t[e],this.options[e]=i)}return t.prototype.buildObject=function(t){var r,i,u,c,l,h;return r=this.options.attrkey,i=this.options.charkey,1===Object.keys(t).length&&this.options.rootName===n[.2].rootName?t=t[l=Object.keys(t)[0]]:l=this.options.rootName,h=this,u=function(t,e){var n,c,l,p,f,d;if("object"!=typeof e)h.options.cdata&&o(e)?t.raw(s(e)):t.txt(e);else if(Array.isArray(e)){for(p in e)if(a.call(e,p))for(f in c=e[p])l=c[f],t=u(t.ele(f),l).up()}else for(f in e)if(a.call(e,f))if(c=e[f],f===r){if("object"==typeof c)for(n in c)d=c[n],t=t.att(n,d)}else if(f===i)t=h.options.cdata&&o(c)?t.raw(s(c)):t.txt(c);else if(Array.isArray(c))for(p in c)a.call(c,p)&&(t="string"==typeof(l=c[p])?h.options.cdata&&o(l)?t.ele(f).raw(s(l)).up():t.ele(f,l).up():u(t.ele(f),l).up());else"object"==typeof c?t=u(t.ele(f),c).up():"string"==typeof c&&h.options.cdata&&o(c)?t=t.ele(f).raw(s(c)).up():(null==c&&(c=""),t=t.ele(f,c.toString()).up());return t},c=e.create(l,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),u(c,t).end(this.options.renderOpts)},t}()}).call(this)},{"./defaults":173,xmlbuilder:209}],173:[function(t,e,r){(function(){r.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:"  ",newline:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},{}],174:[function(t,e,r){(function(){"use strict";var e,n,i,o,s,a,u,c,l,h=function(t,e){return function(){return t.apply(e,arguments)}},p={}.hasOwnProperty;c=t("sax"),i=t("events"),e=t("./bom"),a=t("./processors"),l=t("timers").setImmediate,n=t("./defaults").defaults,u=t("util.promisify"),o=function(t){return"object"==typeof t&&null!=t&&0===Object.keys(t).length},s=function(t,e,r){var n,i;for(n=0,i=t.length;n<i;n++)e=(0,t[n])(e,r);return e},r.Parser=function(t){function i(t){var e,i,o;if(this.parseStringPromise=h(this.parseStringPromise,this),this.parseString=h(this.parseString,this),this.reset=h(this.reset,this),this.assignOrPush=h(this.assignOrPush,this),this.processAsync=h(this.processAsync,this),!(this instanceof r.Parser))return new r.Parser(t);for(e in this.options={},i=n[.2])p.call(i,e)&&(o=i[e],this.options[e]=o);for(e in t)p.call(t,e)&&(o=t[e],this.options[e]=o);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(a.normalize)),this.reset()}return function(t,e){for(var r in e)p.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(i,t),i.prototype.processAsync=function(){var t,e;try{return this.remaining.length<=this.options.chunkSize?(t=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(t),this.saxParser.close()):(t=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(t),l(this.processAsync))}catch(t){if(e=t,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(e)}},i.prototype.assignOrPush=function(t,e,r){return e in t?(t[e]instanceof Array||(t[e]=[t[e]]),t[e].push(r)):this.options.explicitArray?t[e]=[r]:t[e]=r},i.prototype.reset=function(){var t,e,r,n,i;return this.removeAllListeners(),this.saxParser=c.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(i=this,function(t){if(i.saxParser.resume(),!i.saxParser.errThrown)return i.saxParser.errThrown=!0,i.emit("error",t)}),this.saxParser.onend=function(t){return function(){if(!t.saxParser.ended)return t.saxParser.ended=!0,t.emit("end",t.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,n=[],t=this.options.attrkey,e=this.options.charkey,this.saxParser.onopentag=function(r){return function(i){var o,a,u,c,l;if((u={})[e]="",!r.options.ignoreAttrs)for(o in l=i.attributes)p.call(l,o)&&(t in u||r.options.mergeAttrs||(u[t]={}),a=r.options.attrValueProcessors?s(r.options.attrValueProcessors,i.attributes[o],o):i.attributes[o],c=r.options.attrNameProcessors?s(r.options.attrNameProcessors,o):o,r.options.mergeAttrs?r.assignOrPush(u,c,a):u[t][c]=a);return u["#name"]=r.options.tagNameProcessors?s(r.options.tagNameProcessors,i.name):i.name,r.options.xmlns&&(u[r.options.xmlnskey]={uri:i.uri,local:i.local}),n.push(u)}}(this),this.saxParser.onclosetag=function(t){return function(){var r,i,a,u,c,l,h,f,d,y;if(l=n.pop(),c=l["#name"],t.options.explicitChildren&&t.options.preserveChildrenOrder||delete l["#name"],!0===l.cdata&&(r=l.cdata,delete l.cdata),d=n[n.length-1],l[e].match(/^\s*$/)&&!r?(i=l[e],delete l[e]):(t.options.trim&&(l[e]=l[e].trim()),t.options.normalize&&(l[e]=l[e].replace(/\s{2,}/g," ").trim()),l[e]=t.options.valueProcessors?s(t.options.valueProcessors,l[e],c):l[e],1===Object.keys(l).length&&e in l&&!t.EXPLICIT_CHARKEY&&(l=l[e])),o(l)&&(l=""!==t.options.emptyTag?t.options.emptyTag:i),null!=t.options.validator&&(y="/"+function(){var t,e,r;for(r=[],t=0,e=n.length;t<e;t++)u=n[t],r.push(u["#name"]);return r}().concat(c).join("/"),function(){var e;try{l=t.options.validator(y,d&&d[c],l)}catch(r){return e=r,t.emit("error",e)}}()),t.options.explicitChildren&&!t.options.mergeAttrs&&"object"==typeof l)if(t.options.preserveChildrenOrder){if(d){for(a in d[t.options.childkey]=d[t.options.childkey]||[],h={},l)p.call(l,a)&&(h[a]=l[a]);d[t.options.childkey].push(h),delete l["#name"],1===Object.keys(l).length&&e in l&&!t.EXPLICIT_CHARKEY&&(l=l[e])}}else u={},t.options.attrkey in l&&(u[t.options.attrkey]=l[t.options.attrkey],delete l[t.options.attrkey]),!t.options.charsAsChildren&&t.options.charkey in l&&(u[t.options.charkey]=l[t.options.charkey],delete l[t.options.charkey]),Object.getOwnPropertyNames(l).length>0&&(u[t.options.childkey]=l),l=u;return n.length>0?t.assignOrPush(d,c,l):(t.options.explicitRoot&&(f=l,(l={})[c]=f),t.resultObject=l,t.saxParser.ended=!0,t.emit("end",t.resultObject))}}(this),r=function(t){return function(r){var i,o;if(o=n[n.length-1])return o[e]+=r,t.options.explicitChildren&&t.options.preserveChildrenOrder&&t.options.charsAsChildren&&(t.options.includeWhiteChars||""!==r.replace(/\\n/g,"").trim())&&(o[t.options.childkey]=o[t.options.childkey]||[],(i={"#name":"__text__"})[e]=r,t.options.normalize&&(i[e]=i[e].replace(/\s{2,}/g," ").trim()),o[t.options.childkey].push(i)),o}}(this),this.saxParser.ontext=r,this.saxParser.oncdata=function(t){var e;if(e=r(t))return e.cdata=!0}},i.prototype.parseString=function(t,r){var n;null!=r&&"function"==typeof r&&(this.on("end",(function(t){return this.reset(),r(null,t)})),this.on("error",(function(t){return this.reset(),r(t)})));try{return""===(t=t.toString()).trim()?(this.emit("end",null),!0):(t=e.stripBOM(t),this.options.async?(this.remaining=t,l(this.processAsync),this.saxParser):this.saxParser.write(t).close())}catch(t){if(n=t,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",n),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw n}},i.prototype.parseStringPromise=function(t){return u(this.parseString)(t)},i}(i),r.parseString=function(t,e,n){var i,o;return null!=n?("function"==typeof n&&(i=n),"object"==typeof e&&(o=e)):("function"==typeof e&&(i=e),o={}),new r.Parser(o).parseString(t,i)},r.parseStringPromise=function(t,e){var n;return"object"==typeof e&&(n=e),new r.Parser(n).parseStringPromise(t)}}).call(this)},{"./bom":171,"./defaults":173,"./processors":175,events:77,sax:158,timers:162,"util.promisify":165}],175:[function(t,e,r){(function(){"use strict";var t;t=new RegExp(/(?!xmlns)^.*:/),r.normalize=function(t){return t.toLowerCase()},r.firstCharLowerCase=function(t){return t.charAt(0).toLowerCase()+t.slice(1)},r.stripPrefix=function(e){return e.replace(t,"")},r.parseNumbers=function(t){return isNaN(t)||(t=t%1==0?parseInt(t,10):parseFloat(t)),t},r.parseBooleans=function(t){return/^(?:true|false)$/i.test(t)&&(t="true"===t.toLowerCase()),t}}).call(this)},{}],176:[function(t,e,r){(function(){"use strict";var e,n,i,o,s={}.hasOwnProperty;n=t("./defaults"),e=t("./builder"),i=t("./parser"),o=t("./processors"),r.defaults=n.defaults,r.processors=o,r.ValidationError=function(t){function e(t){this.message=t}return function(t,e){for(var r in e)s.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,Error),e}(),r.Builder=e.Builder,r.Parser=i.Parser,r.parseString=i.parseString,r.parseStringPromise=i.parseStringPromise}).call(this)},{"./builder":172,"./defaults":173,"./parser":174,"./processors":175}],177:[function(t,e,r){(function(){e.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],178:[function(t,e,r){(function(){e.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},{}],179:[function(t,e,r){(function(){var t,r,n,i,o,s,a,u=[].slice,c={}.hasOwnProperty;t=function(){var t,e,r,n,i,s;if(s=arguments[0],i=2<=arguments.length?u.call(arguments,1):[],o(Object.assign))Object.assign.apply(null,arguments);else for(t=0,r=i.length;t<r;t++)if(null!=(n=i[t]))for(e in n)c.call(n,e)&&(s[e]=n[e]);return s},o=function(t){return!!t&&"[object Function]"===Object.prototype.toString.call(t)},s=function(t){var e;return!!t&&("function"==(e=typeof t)||"object"===e)},n=function(t){return o(Array.isArray)?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)},i=function(t){var e;if(n(t))return!t.length;for(e in t)if(c.call(t,e))return!1;return!0},a=function(t){var e,r;return s(t)&&(r=Object.getPrototypeOf(t))&&(e=r.constructor)&&"function"==typeof e&&e instanceof e&&Function.prototype.toString.call(e)===Function.prototype.toString.call(Object)},r=function(t){return o(t.valueOf)?t.valueOf():t},e.exports.assign=t,e.exports.isFunction=o,e.exports.isObject=s,e.exports.isArray=n,e.exports.isEmpty=i,e.exports.isPlainObject=a,e.exports.getValue=r}).call(this)},{}],180:[function(t,e,r){(function(){e.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],181:[function(t,e,r){(function(){var r;r=t("./NodeType"),t("./XMLNode"),e.exports=function(){function t(t,e,n){if(this.parent=t,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),null==e)throw new Error("Missing attribute name. "+this.debugInfo(e));this.name=this.stringify.name(e),this.value=this.stringify.attValue(n),this.type=r.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(t.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(t.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(t.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(t.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"specified",{get:function(){return!0}}),t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(t){return this.options.writer.attribute(this,this.options.writer.filterOptions(t))},t.prototype.debugInfo=function(t){return null==(t=t||this.name)?"parent: <"+this.parent.name+">":"attribute: {"+t+"}, parent: <"+this.parent.name+">"},t.prototype.isEqualNode=function(t){return t.namespaceURI===this.namespaceURI&&(t.prefix===this.prefix&&(t.localName===this.localName&&t.value===this.value))},t}()}).call(this)},{"./NodeType":178,"./XMLNode":200}],182:[function(t,e,r){(function(){var r,n,i={}.hasOwnProperty;r=t("./NodeType"),n=t("./XMLCharacterData"),e.exports=function(t){function e(t,n){if(e.__super__.constructor.call(this,t),null==n)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=r.CData,this.value=this.stringify.cdata(n)}return function(t,e){for(var r in e)i.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.clone=function(){return Object.create(this)},e.prototype.toString=function(t){return this.options.writer.cdata(this,this.options.writer.filterOptions(t))},e}(n)}).call(this)},{"./NodeType":178,"./XMLCharacterData":183}],183:[function(t,e,r){(function(){var r,n={}.hasOwnProperty;r=t("./XMLNode"),e.exports=function(t){function e(t){e.__super__.constructor.call(this,t),this.value=""}return function(t,e){for(var r in e)n.call(e,r)&&(t[r]=e[r]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,t),Object.defineProperty(e.prototype,"data",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(e.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(e.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),e.prototype.clone=function(){return Object.create(this)},e.prototype.substringData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.appendData=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.insertData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.deleteData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.replaceData=function(t,e,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(t){return!!e.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)&&t.data===this.data},e}(r)}).call(this)},{"./XMLNode":200}],184:[function(t,e,r){(function(){var r,n,i={}.hasOwnProperty;r=t("./NodeType"),n=t("./XMLCharacterData"),e.exports=function(t){function e(t,n){if(e.__super__.constructor.call(this,t),null==n)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=r.Comment,this.value=this.stringify.comment(n)}return function(t,e){for(var r in e)i.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.clone=function(){return Object.create(this)},e.prototype.toString=function(t){return this.options.writer.comment(this,this.options.writer.filterOptions(t))},e}(n)}).call(this)},{"./NodeType":178,"./XMLCharacterData":183}],185:[function(t,e,r){(function(){var r,n;r=t("./XMLDOMErrorHandler"),n=t("./XMLDOMStringList"),e.exports=function(){function t(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new r,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Object.create(this.defaultParams)}return Object.defineProperty(t.prototype,"parameterNames",{get:function(){return new n(Object.keys(this.defaultParams))}}),t.prototype.getParameter=function(t){return this.params.hasOwnProperty(t)?this.params[t]:null},t.prototype.canSetParameter=function(t,e){return!0},t.prototype.setParameter=function(t,e){return null!=e?this.params[t]=e:delete this.params[t]},t}()}).call(this)},{"./XMLDOMErrorHandler":186,"./XMLDOMStringList":188}],186:[function(t,e,r){(function(){e.exports=function(){function t(){}return t.prototype.handleError=function(t){throw new Error(t)},t}()}).call(this)},{}],187:[function(t,e,r){(function(){e.exports=function(){function t(){}return t.prototype.hasFeature=function(t,e){return!0},t.prototype.createDocumentType=function(t,e,r){throw new Error("This DOM method is not implemented.")},t.prototype.createDocument=function(t,e,r){throw new Error("This DOM method is not implemented.")},t.prototype.createHTMLDocument=function(t){throw new Error("This DOM method is not implemented.")},t.prototype.getFeature=function(t,e){throw new Error("This DOM method is not implemented.")},t}()}).call(this)},{}],188:[function(t,e,r){(function(){e.exports=function(){function t(t){this.arr=t||[]}return Object.defineProperty(t.prototype,"length",{get:function(){return this.arr.length}}),t.prototype.item=function(t){return this.arr[t]||null},t.prototype.contains=function(t){return-1!==this.arr.indexOf(t)},t}()}).call(this)},{}],189:[function(t,e,r){(function(){var r,n,i={}.hasOwnProperty;n=t("./XMLNode"),r=t("./NodeType"),e.exports=function(t){function e(t,n,i,o,s,a){if(e.__super__.constructor.call(this,t),null==n)throw new Error("Missing DTD element name. "+this.debugInfo());if(null==i)throw new Error("Missing DTD attribute name. "+this.debugInfo(n));if(!o)throw new Error("Missing DTD attribute type. "+this.debugInfo(n));if(!s)throw new Error("Missing DTD attribute default. "+this.debugInfo(n));if(0!==s.indexOf("#")&&(s="#"+s),!s.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(n));if(a&&!s.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(n));this.elementName=this.stringify.name(n),this.type=r.AttributeDeclaration,this.attributeName=this.stringify.name(i),this.attributeType=this.stringify.dtdAttType(o),a&&(this.defaultValue=this.stringify.dtdAttDefault(a)),this.defaultValueType=s}return function(t,e){for(var r in e)i.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.toString=function(t){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(t))},e}(n)}).call(this)},{"./NodeType":178,"./XMLNode":200}],190:[function(t,e,r){(function(){var r,n,i={}.hasOwnProperty;n=t("./XMLNode"),r=t("./NodeType"),e.exports=function(t){function e(t,n,i){if(e.__super__.constructor.call(this,t),null==n)throw new Error("Missing DTD element name. "+this.debugInfo());i||(i="(#PCDATA)"),Array.isArray(i)&&(i="("+i.join(",")+")"),this.name=this.stringify.name(n),this.type=r.ElementDeclaration,this.value=this.stringify.dtdElementValue(i)}return function(t,e){for(var r in e)i.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.toString=function(t){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(t))},e}(n)}).call(this)},{"./NodeType":178,"./XMLNode":200}],191:[function(t,e,r){(function(){var r,n,i,o={}.hasOwnProperty;i=t("./Utility").isObject,n=t("./XMLNode"),r=t("./NodeType"),e.exports=function(t){function e(t,n,o,s){if(e.__super__.constructor.call(this,t),null==o)throw new Error("Missing DTD entity name. "+this.debugInfo(o));if(null==s)throw new Error("Missing DTD entity value. "+this.debugInfo(o));if(this.pe=!!n,this.name=this.stringify.name(o),this.type=r.EntityDeclaration,i(s)){if(!s.pubID&&!s.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(o));if(s.pubID&&!s.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(o));if(this.internal=!1,null!=s.pubID&&(this.pubID=this.stringify.dtdPubID(s.pubID)),null!=s.sysID&&(this.sysID=this.stringify.dtdSysID(s.sysID)),null!=s.nData&&(this.nData=this.stringify.dtdNData(s.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(o))}else this.value=this.stringify.dtdEntityValue(s),this.internal=!0}return function(t,e){for(var r in e)o.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),Object.defineProperty(e.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(e.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(e.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(e.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(e.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(e.prototype,"xmlVersion",{get:function(){return null}}),e.prototype.toString=function(t){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(t))},e}(n)}).call(this)},{"./NodeType":178,"./Utility":179,"./XMLNode":200}],192:[function(t,e,r){(function(){var r,n,i={}.hasOwnProperty;n=t("./XMLNode"),r=t("./NodeType"),e.exports=function(t){function e(t,n,i){if(e.__super__.constructor.call(this,t),null==n)throw new Error("Missing DTD notation name. "+this.debugInfo(n));if(!i.pubID&&!i.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(n));this.name=this.stringify.name(n),this.type=r.NotationDeclaration,null!=i.pubID&&(this.pubID=this.stringify.dtdPubID(i.pubID)),null!=i.sysID&&(this.sysID=this.stringify.dtdSysID(i.sysID))}return function(t,e){for(var r in e)i.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),Object.defineProperty(e.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(e.prototype,"systemId",{get:function(){return this.sysID}}),e.prototype.toString=function(t){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(t))},e}(n)}).call(this)},{"./NodeType":178,"./XMLNode":200}],193:[function(t,e,r){(function(){var r,n,i,o={}.hasOwnProperty;i=t("./Utility").isObject,n=t("./XMLNode"),r=t("./NodeType"),e.exports=function(t){function e(t,n,o,s){var a;e.__super__.constructor.call(this,t),i(n)&&(n=(a=n).version,o=a.encoding,s=a.standalone),n||(n="1.0"),this.type=r.Declaration,this.version=this.stringify.xmlVersion(n),null!=o&&(this.encoding=this.stringify.xmlEncoding(o)),null!=s&&(this.standalone=this.stringify.xmlStandalone(s))}return function(t,e){for(var r in e)o.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.toString=function(t){return this.options.writer.declaration(this,this.options.writer.filterOptions(t))},e}(n)}).call(this)},{"./NodeType":178,"./Utility":179,"./XMLNode":200}],194:[function(t,e,r){(function(){var r,n,i,o,s,a,u,c,l={}.hasOwnProperty;c=t("./Utility").isObject,u=t("./XMLNode"),r=t("./NodeType"),n=t("./XMLDTDAttList"),o=t("./XMLDTDEntity"),i=t("./XMLDTDElement"),s=t("./XMLDTDNotation"),a=t("./XMLNamedNodeMap"),e.exports=function(t){function e(t,n,i){var o,s,a,u,l,h;if(e.__super__.constructor.call(this,t),this.type=r.DocType,t.children)for(s=0,a=(u=t.children).length;s<a;s++)if((o=u[s]).type===r.Element){this.name=o.name;break}this.documentObject=t,c(n)&&(n=(l=n).pubID,i=l.sysID),null==i&&(i=(h=[n,i])[0],n=h[1]),null!=n&&(this.pubID=this.stringify.dtdPubID(n)),null!=i&&(this.sysID=this.stringify.dtdSysID(i))}return function(t,e){for(var r in e)l.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),Object.defineProperty(e.prototype,"entities",{get:function(){var t,e,n,i,o;for(i={},e=0,n=(o=this.children).length;e<n;e++)(t=o[e]).type!==r.EntityDeclaration||t.pe||(i[t.name]=t);return new a(i)}}),Object.defineProperty(e.prototype,"notations",{get:function(){var t,e,n,i,o;for(i={},e=0,n=(o=this.children).length;e<n;e++)(t=o[e]).type===r.NotationDeclaration&&(i[t.name]=t);return new a(i)}}),Object.defineProperty(e.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(e.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(e.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),e.prototype.element=function(t,e){var r;return r=new i(this,t,e),this.children.push(r),this},e.prototype.attList=function(t,e,r,i,o){var s;return s=new n(this,t,e,r,i,o),this.children.push(s),this},e.prototype.entity=function(t,e){var r;return r=new o(this,!1,t,e),this.children.push(r),this},e.prototype.pEntity=function(t,e){var r;return r=new o(this,!0,t,e),this.children.push(r),this},e.prototype.notation=function(t,e){var r;return r=new s(this,t,e),this.children.push(r),this},e.prototype.toString=function(t){return this.options.writer.docType(this,this.options.writer.filterOptions(t))},e.prototype.ele=function(t,e){return this.element(t,e)},e.prototype.att=function(t,e,r,n,i){return this.attList(t,e,r,n,i)},e.prototype.ent=function(t,e){return this.entity(t,e)},e.prototype.pent=function(t,e){return this.pEntity(t,e)},e.prototype.not=function(t,e){return this.notation(t,e)},e.prototype.up=function(){return this.root()||this.documentObject},e.prototype.isEqualNode=function(t){return!!e.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)&&(t.name===this.name&&(t.publicId===this.publicId&&t.systemId===this.systemId))},e}(u)}).call(this)},{"./NodeType":178,"./Utility":179,"./XMLDTDAttList":189,"./XMLDTDElement":190,"./XMLDTDEntity":191,"./XMLDTDNotation":192,"./XMLNamedNodeMap":199,"./XMLNode":200}],195:[function(t,e,r){(function(){var r,n,i,o,s,a,u,c={}.hasOwnProperty;u=t("./Utility").isPlainObject,i=t("./XMLDOMImplementation"),n=t("./XMLDOMConfiguration"),o=t("./XMLNode"),r=t("./NodeType"),a=t("./XMLStringifier"),s=t("./XMLStringWriter"),e.exports=function(t){function e(t){e.__super__.constructor.call(this,null),this.name="#document",this.type=r.Document,this.documentURI=null,this.domConfig=new n,t||(t={}),t.writer||(t.writer=new s),this.options=t,this.stringify=new a(t)}return function(t,e){for(var r in e)c.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),Object.defineProperty(e.prototype,"implementation",{value:new i}),Object.defineProperty(e.prototype,"doctype",{get:function(){var t,e,n,i;for(e=0,n=(i=this.children).length;e<n;e++)if((t=i[e]).type===r.DocType)return t;return null}}),Object.defineProperty(e.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(e.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(e.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(e.prototype,"xmlEncoding",{get:function(){return 0!==this.children.length&&this.children[0].type===r.Declaration?this.children[0].encoding:null}}),Object.defineProperty(e.prototype,"xmlStandalone",{get:function(){return 0!==this.children.length&&this.children[0].type===r.Declaration&&"yes"===this.children[0].standalone}}),Object.defineProperty(e.prototype,"xmlVersion",{get:function(){return 0!==this.children.length&&this.children[0].type===r.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(e.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(e.prototype,"origin",{get:function(){return null}}),Object.defineProperty(e.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(e.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(e.prototype,"contentType",{get:function(){return null}}),e.prototype.end=function(t){var e;return e={},t?u(t)&&(e=t,t=this.options.writer):t=this.options.writer,t.document(this,t.filterOptions(e))},e.prototype.toString=function(t){return this.options.writer.document(this,this.options.writer.filterOptions(t))},e.prototype.createElement=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createTextNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createComment=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createCDATASection=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createProcessingInstruction=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createAttribute=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createEntityReference=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getElementsByTagName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.importNode=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createElementNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getElementsByTagNameNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getElementById=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.adoptNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.renameNode=function(t,e,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getElementsByClassName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createEvent=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createNodeIterator=function(t,e,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createTreeWalker=function(t,e,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},e}(o)}).call(this)},{"./NodeType":178,"./Utility":179,"./XMLDOMConfiguration":185,"./XMLDOMImplementation":187,"./XMLNode":200,"./XMLStringWriter":205,"./XMLStringifier":206}],196:[function(t,e,r){(function(){var r,n,i,o,s,a,u,c,l,h,p,f,d,y,m,g,b,v,_,w,T,E,S,O={}.hasOwnProperty;S=t("./Utility"),T=S.isObject,w=S.isFunction,E=S.isPlainObject,_=S.getValue,r=t("./NodeType"),f=t("./XMLDocument"),d=t("./XMLElement"),o=t("./XMLCData"),s=t("./XMLComment"),m=t("./XMLRaw"),v=t("./XMLText"),y=t("./XMLProcessingInstruction"),h=t("./XMLDeclaration"),p=t("./XMLDocType"),a=t("./XMLDTDAttList"),c=t("./XMLDTDEntity"),u=t("./XMLDTDElement"),l=t("./XMLDTDNotation"),i=t("./XMLAttribute"),b=t("./XMLStringifier"),g=t("./XMLStringWriter"),n=t("./WriterState"),e.exports=function(){function t(t,e,n){var i;this.name="?xml",this.type=r.Document,t||(t={}),i={},t.writer?E(t.writer)&&(i=t.writer,t.writer=new g):t.writer=new g,this.options=t,this.writer=t.writer,this.writerOptions=this.writer.filterOptions(i),this.stringify=new b(t),this.onDataCallback=e||function(){},this.onEndCallback=n||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return t.prototype.createChildNode=function(t){var e,n,i,o,s,a,u,c;switch(t.type){case r.CData:this.cdata(t.value);break;case r.Comment:this.comment(t.value);break;case r.Element:for(n in i={},u=t.attribs)O.call(u,n)&&(e=u[n],i[n]=e.value);this.node(t.name,i);break;case r.Dummy:this.dummy();break;case r.Raw:this.raw(t.value);break;case r.Text:this.text(t.value);break;case r.ProcessingInstruction:this.instruction(t.target,t.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+t.constructor.name)}for(s=0,a=(c=t.children).length;s<a;s++)o=c[s],this.createChildNode(o),o.type===r.Element&&this.up();return this},t.prototype.dummy=function(){return this},t.prototype.node=function(t,e,r){var n;if(null==t)throw new Error("Missing node name.");if(this.root&&-1===this.currentLevel)throw new Error("Document can only have one root node. "+this.debugInfo(t));return this.openCurrent(),t=_(t),null==e&&(e={}),e=_(e),T(e)||(r=(n=[e,r])[0],e=n[1]),this.currentNode=new d(this,t,e),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,null!=r&&this.text(r),this},t.prototype.element=function(t,e,n){var i,o,s,a,u,c;if(this.currentNode&&this.currentNode.type===r.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(t)||T(t)||w(t))for(a=this.options.noValidation,this.options.noValidation=!0,(c=new f(this.options).element("TEMP_ROOT")).element(t),this.options.noValidation=a,o=0,s=(u=c.children).length;o<s;o++)i=u[o],this.createChildNode(i),i.type===r.Element&&this.up();else this.node(t,e,n);return this},t.prototype.attribute=function(t,e){var r,n;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(t));if(null!=t&&(t=_(t)),T(t))for(r in t)O.call(t,r)&&(n=t[r],this.attribute(r,n));else w(e)&&(e=e.apply()),this.options.keepNullAttributes&&null==e?this.currentNode.attribs[t]=new i(this,t,""):null!=e&&(this.currentNode.attribs[t]=new i(this,t,e));return this},t.prototype.text=function(t){var e;return this.openCurrent(),e=new v(this,t),this.onData(this.writer.text(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.cdata=function(t){var e;return this.openCurrent(),e=new o(this,t),this.onData(this.writer.cdata(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.comment=function(t){var e;return this.openCurrent(),e=new s(this,t),this.onData(this.writer.comment(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.raw=function(t){var e;return this.openCurrent(),e=new m(this,t),this.onData(this.writer.raw(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.instruction=function(t,e){var r,n,i,o,s;if(this.openCurrent(),null!=t&&(t=_(t)),null!=e&&(e=_(e)),Array.isArray(t))for(r=0,o=t.length;r<o;r++)n=t[r],this.instruction(n);else if(T(t))for(n in t)O.call(t,n)&&(i=t[n],this.instruction(n,i));else w(e)&&(e=e.apply()),s=new y(this,t,e),this.onData(this.writer.processingInstruction(s,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},t.prototype.declaration=function(t,e,r){var n;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return n=new h(this,t,e,r),this.onData(this.writer.declaration(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.doctype=function(t,e,r){if(this.openCurrent(),null==t)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new p(this,e,r),this.currentNode.rootNodeName=t,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},t.prototype.dtdElement=function(t,e){var r;return this.openCurrent(),r=new u(this,t,e),this.onData(this.writer.dtdElement(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.attList=function(t,e,r,n,i){var o;return this.openCurrent(),o=new a(this,t,e,r,n,i),this.onData(this.writer.dtdAttList(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.entity=function(t,e){var r;return this.openCurrent(),r=new c(this,!1,t,e),this.onData(this.writer.dtdEntity(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.pEntity=function(t,e){var r;return this.openCurrent(),r=new c(this,!0,t,e),this.onData(this.writer.dtdEntity(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.notation=function(t,e){var r;return this.openCurrent(),r=new l(this,t,e),this.onData(this.writer.dtdNotation(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},t.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},t.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},t.prototype.openNode=function(t){var e,i,o,s;if(!t.isOpen){if(this.root||0!==this.currentLevel||t.type!==r.Element||(this.root=t),i="",t.type===r.Element){for(o in this.writerOptions.state=n.OpenTag,i=this.writer.indent(t,this.writerOptions,this.currentLevel)+"<"+t.name,s=t.attribs)O.call(s,o)&&(e=s[o],i+=this.writer.attribute(e,this.writerOptions,this.currentLevel));i+=(t.children?">":"/>")+this.writer.endline(t,this.writerOptions,this.currentLevel),this.writerOptions.state=n.InsideTag}else this.writerOptions.state=n.OpenTag,i=this.writer.indent(t,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+t.rootNodeName,t.pubID&&t.sysID?i+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(i+=' SYSTEM "'+t.sysID+'"'),t.children?(i+=" [",this.writerOptions.state=n.InsideTag):(this.writerOptions.state=n.CloseTag,i+=">"),i+=this.writer.endline(t,this.writerOptions,this.currentLevel);return this.onData(i,this.currentLevel),t.isOpen=!0}},t.prototype.closeNode=function(t){var e;if(!t.isClosed)return e="",this.writerOptions.state=n.CloseTag,e=t.type===r.Element?this.writer.indent(t,this.writerOptions,this.currentLevel)+"</"+t.name+">"+this.writer.endline(t,this.writerOptions,this.currentLevel):this.writer.indent(t,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(t,this.writerOptions,this.currentLevel),this.writerOptions.state=n.None,this.onData(e,this.currentLevel),t.isClosed=!0},t.prototype.onData=function(t,e){return this.documentStarted=!0,this.onDataCallback(t,e+1)},t.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},t.prototype.debugInfo=function(t){return null==t?"":"node: <"+t+">"},t.prototype.ele=function(){return this.element.apply(this,arguments)},t.prototype.nod=function(t,e,r){return this.node(t,e,r)},t.prototype.txt=function(t){return this.text(t)},t.prototype.dat=function(t){return this.cdata(t)},t.prototype.com=function(t){return this.comment(t)},t.prototype.ins=function(t,e){return this.instruction(t,e)},t.prototype.dec=function(t,e,r){return this.declaration(t,e,r)},t.prototype.dtd=function(t,e,r){return this.doctype(t,e,r)},t.prototype.e=function(t,e,r){return this.element(t,e,r)},t.prototype.n=function(t,e,r){return this.node(t,e,r)},t.prototype.t=function(t){return this.text(t)},t.prototype.d=function(t){return this.cdata(t)},t.prototype.c=function(t){return this.comment(t)},t.prototype.r=function(t){return this.raw(t)},t.prototype.i=function(t,e){return this.instruction(t,e)},t.prototype.att=function(){return this.currentNode&&this.currentNode.type===r.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},t.prototype.a=function(){return this.currentNode&&this.currentNode.type===r.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},t.prototype.ent=function(t,e){return this.entity(t,e)},t.prototype.pent=function(t,e){return this.pEntity(t,e)},t.prototype.not=function(t,e){return this.notation(t,e)},t}()}).call(this)},{"./NodeType":178,"./Utility":179,"./WriterState":180,"./XMLAttribute":181,"./XMLCData":182,"./XMLComment":184,"./XMLDTDAttList":189,"./XMLDTDElement":190,"./XMLDTDEntity":191,"./XMLDTDNotation":192,"./XMLDeclaration":193,"./XMLDocType":194,"./XMLDocument":195,"./XMLElement":198,"./XMLProcessingInstruction":202,"./XMLRaw":203,"./XMLStringWriter":205,"./XMLStringifier":206,"./XMLText":207}],197:[function(t,e,r){(function(){var r,n,i={}.hasOwnProperty;n=t("./XMLNode"),r=t("./NodeType"),e.exports=function(t){function e(t){e.__super__.constructor.call(this,t),this.type=r.Dummy}return function(t,e){for(var r in e)i.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.clone=function(){return Object.create(this)},e.prototype.toString=function(t){return""},e}(n)}).call(this)},{"./NodeType":178,"./XMLNode":200}],198:[function(t,e,r){(function(){var r,n,i,o,s,a,u,c,l={}.hasOwnProperty;c=t("./Utility"),u=c.isObject,a=c.isFunction,s=c.getValue,o=t("./XMLNode"),r=t("./NodeType"),n=t("./XMLAttribute"),i=t("./XMLNamedNodeMap"),e.exports=function(t){function e(t,n,i){var o,s,a,u;if(e.__super__.constructor.call(this,t),null==n)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(n),this.type=r.Element,this.attribs={},this.schemaTypeInfo=null,null!=i&&this.attribute(i),t.type===r.Document&&(this.isRoot=!0,this.documentObject=t,t.rootObject=this,t.children))for(s=0,a=(u=t.children).length;s<a;s++)if((o=u[s]).type===r.DocType){o.name=this.name;break}}return function(t,e){for(var r in e)l.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(e.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(e.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(e.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(e.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(e.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(e.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(e.prototype,"attributes",{get:function(){return this.attributeMap&&this.attributeMap.nodes||(this.attributeMap=new i(this.attribs)),this.attributeMap}}),e.prototype.clone=function(){var t,e,r,n;for(e in(r=Object.create(this)).isRoot&&(r.documentObject=null),r.attribs={},n=this.attribs)l.call(n,e)&&(t=n[e],r.attribs[e]=t.clone());return r.children=[],this.children.forEach((function(t){var e;return(e=t.clone()).parent=r,r.children.push(e)})),r},e.prototype.attribute=function(t,e){var r,i;if(null!=t&&(t=s(t)),u(t))for(r in t)l.call(t,r)&&(i=t[r],this.attribute(r,i));else a(e)&&(e=e.apply()),this.options.keepNullAttributes&&null==e?this.attribs[t]=new n(this,t,""):null!=e&&(this.attribs[t]=new n(this,t,e));return this},e.prototype.removeAttribute=function(t){var e,r,n;if(null==t)throw new Error("Missing attribute name. "+this.debugInfo());if(t=s(t),Array.isArray(t))for(r=0,n=t.length;r<n;r++)e=t[r],delete this.attribs[e];else delete this.attribs[t];return this},e.prototype.toString=function(t){return this.options.writer.element(this,this.options.writer.filterOptions(t))},e.prototype.att=function(t,e){return this.attribute(t,e)},e.prototype.a=function(t,e){return this.attribute(t,e)},e.prototype.getAttribute=function(t){return this.attribs.hasOwnProperty(t)?this.attribs[t].value:null},e.prototype.setAttribute=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getAttributeNode=function(t){return this.attribs.hasOwnProperty(t)?this.attribs[t]:null},e.prototype.setAttributeNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.removeAttributeNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getElementsByTagName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.setAttributeNS=function(t,e,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.removeAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getAttributeNodeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.setAttributeNodeNS=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getElementsByTagNameNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.hasAttribute=function(t){return this.attribs.hasOwnProperty(t)},e.prototype.hasAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.setIdAttribute=function(t,e){return this.attribs.hasOwnProperty(t)?this.attribs[t].isId:e},e.prototype.setIdAttributeNS=function(t,e,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.setIdAttributeNode=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getElementsByTagName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getElementsByTagNameNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getElementsByClassName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(t){var r,n,i;if(!e.__super__.isEqualNode.apply(this,arguments).isEqualNode(t))return!1;if(t.namespaceURI!==this.namespaceURI)return!1;if(t.prefix!==this.prefix)return!1;if(t.localName!==this.localName)return!1;if(t.attribs.length!==this.attribs.length)return!1;for(r=n=0,i=this.attribs.length-1;0<=i?n<=i:n>=i;r=0<=i?++n:--n)if(!this.attribs[r].isEqualNode(t.attribs[r]))return!1;return!0},e}(o)}).call(this)},{"./NodeType":178,"./Utility":179,"./XMLAttribute":181,"./XMLNamedNodeMap":199,"./XMLNode":200}],199:[function(t,e,r){(function(){e.exports=function(){function t(t){this.nodes=t}return Object.defineProperty(t.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),t.prototype.clone=function(){return this.nodes=null},t.prototype.getNamedItem=function(t){return this.nodes[t]},t.prototype.setNamedItem=function(t){var e;return e=this.nodes[t.nodeName],this.nodes[t.nodeName]=t,e||null},t.prototype.removeNamedItem=function(t){var e;return e=this.nodes[t],delete this.nodes[t],e||null},t.prototype.item=function(t){return this.nodes[Object.keys(this.nodes)[t]]||null},t.prototype.getNamedItemNS=function(t,e){throw new Error("This DOM method is not implemented.")},t.prototype.setNamedItemNS=function(t){throw new Error("This DOM method is not implemented.")},t.prototype.removeNamedItemNS=function(t,e){throw new Error("This DOM method is not implemented.")},t}()}).call(this)},{}],200:[function(t,e,r){(function(){var r,n,i,o,s,a,u,c,l,h,p,f,d,y,m,g,b,v={}.hasOwnProperty;b=t("./Utility"),g=b.isObject,m=b.isFunction,y=b.isEmpty,d=b.getValue,c=null,i=null,o=null,s=null,a=null,p=null,f=null,h=null,u=null,n=null,l=null,r=null,e.exports=function(){function e(e){this.parent=e,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,c||(c=t("./XMLElement"),i=t("./XMLCData"),o=t("./XMLComment"),s=t("./XMLDeclaration"),a=t("./XMLDocType"),p=t("./XMLRaw"),f=t("./XMLText"),h=t("./XMLProcessingInstruction"),u=t("./XMLDummy"),n=t("./NodeType"),l=t("./XMLNodeList"),t("./XMLNamedNodeMap"),r=t("./DocumentPosition"))}return Object.defineProperty(e.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(e.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.childNodeList&&this.childNodeList.nodes||(this.childNodeList=new l(this.children)),this.childNodeList}}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){var t;return t=this.parent.children.indexOf(this),this.parent.children[t-1]||null}}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){var t;return t=this.parent.children.indexOf(this),this.parent.children[t+1]||null}}),Object.defineProperty(e.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,r,i,o;if(this.nodeType===n.Element||this.nodeType===n.DocumentFragment){for(o="",e=0,r=(i=this.children).length;e<r;e++)(t=i[e]).textContent&&(o+=t.textContent);return o}return null},set:function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),e.prototype.setParent=function(t){var e,r,n,i,o;for(this.parent=t,t&&(this.options=t.options,this.stringify=t.stringify),o=[],r=0,n=(i=this.children).length;r<n;r++)e=i[r],o.push(e.setParent(this));return o},e.prototype.element=function(t,e,r){var n,i,o,s,a,u,c,l,h,p,f;if(u=null,null===e&&null==r&&(e=(h=[{},null])[0],r=h[1]),null==e&&(e={}),e=d(e),g(e)||(r=(p=[e,r])[0],e=p[1]),null!=t&&(t=d(t)),Array.isArray(t))for(o=0,c=t.length;o<c;o++)i=t[o],u=this.element(i);else if(m(t))u=this.element(t.apply());else if(g(t)){for(a in t)if(v.call(t,a))if(f=t[a],m(f)&&(f=f.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===a.indexOf(this.stringify.convertAttKey))u=this.attribute(a.substr(this.stringify.convertAttKey.length),f);else if(!this.options.separateArrayItems&&Array.isArray(f)&&y(f))u=this.dummy();else if(g(f)&&y(f))u=this.element(a);else if(this.options.keepNullNodes||null!=f)if(!this.options.separateArrayItems&&Array.isArray(f))for(s=0,l=f.length;s<l;s++)i=f[s],(n={})[a]=i,u=this.element(n);else g(f)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===a.indexOf(this.stringify.convertTextKey)?u=this.element(f):(u=this.element(a)).element(f):u=this.element(a,f);else u=this.dummy()}else u=this.options.keepNullNodes||null!==r?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===t.indexOf(this.stringify.convertTextKey)?this.text(r):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===t.indexOf(this.stringify.convertCDataKey)?this.cdata(r):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===t.indexOf(this.stringify.convertCommentKey)?this.comment(r):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===t.indexOf(this.stringify.convertRawKey)?this.raw(r):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===t.indexOf(this.stringify.convertPIKey)?this.instruction(t.substr(this.stringify.convertPIKey.length),r):this.node(t,e,r):this.dummy();if(null==u)throw new Error("Could not create any elements with: "+t+". "+this.debugInfo());return u},e.prototype.insertBefore=function(t,e,r){var n,i,o,s,a;if(null!=t?t.type:void 0)return s=e,(o=t).setParent(this),s?(i=children.indexOf(s),a=children.splice(i),children.push(o),Array.prototype.push.apply(children,a)):children.push(o),o;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(t));return i=this.parent.children.indexOf(this),a=this.parent.children.splice(i),n=this.parent.element(t,e,r),Array.prototype.push.apply(this.parent.children,a),n},e.prototype.insertAfter=function(t,e,r){var n,i,o;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(t));return i=this.parent.children.indexOf(this),o=this.parent.children.splice(i+1),n=this.parent.element(t,e,r),Array.prototype.push.apply(this.parent.children,o),n},e.prototype.remove=function(){var t;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return t=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[t,t-t+1].concat([])),this.parent},e.prototype.node=function(t,e,r){var n,i;return null!=t&&(t=d(t)),e||(e={}),e=d(e),g(e)||(r=(i=[e,r])[0],e=i[1]),n=new c(this,t,e),null!=r&&n.text(r),this.children.push(n),n},e.prototype.text=function(t){var e;return g(t)&&this.element(t),e=new f(this,t),this.children.push(e),this},e.prototype.cdata=function(t){var e;return e=new i(this,t),this.children.push(e),this},e.prototype.comment=function(t){var e;return e=new o(this,t),this.children.push(e),this},e.prototype.commentBefore=function(t){var e,r;return e=this.parent.children.indexOf(this),r=this.parent.children.splice(e),this.parent.comment(t),Array.prototype.push.apply(this.parent.children,r),this},e.prototype.commentAfter=function(t){var e,r;return e=this.parent.children.indexOf(this),r=this.parent.children.splice(e+1),this.parent.comment(t),Array.prototype.push.apply(this.parent.children,r),this},e.prototype.raw=function(t){var e;return e=new p(this,t),this.children.push(e),this},e.prototype.dummy=function(){return new u(this)},e.prototype.instruction=function(t,e){var r,n,i,o,s;if(null!=t&&(t=d(t)),null!=e&&(e=d(e)),Array.isArray(t))for(o=0,s=t.length;o<s;o++)r=t[o],this.instruction(r);else if(g(t))for(r in t)v.call(t,r)&&(n=t[r],this.instruction(r,n));else m(e)&&(e=e.apply()),i=new h(this,t,e),this.children.push(i);return this},e.prototype.instructionBefore=function(t,e){var r,n;return r=this.parent.children.indexOf(this),n=this.parent.children.splice(r),this.parent.instruction(t,e),Array.prototype.push.apply(this.parent.children,n),this},e.prototype.instructionAfter=function(t,e){var r,n;return r=this.parent.children.indexOf(this),n=this.parent.children.splice(r+1),this.parent.instruction(t,e),Array.prototype.push.apply(this.parent.children,n),this},e.prototype.declaration=function(t,e,r){var i,o;return i=this.document(),o=new s(i,t,e,r),0===i.children.length?i.children.unshift(o):i.children[0].type===n.Declaration?i.children[0]=o:i.children.unshift(o),i.root()||i},e.prototype.dtd=function(t,e){var r,i,o,s,u,c,l,h,p;for(r=this.document(),i=new a(r,t,e),o=s=0,c=(h=r.children).length;s<c;o=++s)if(h[o].type===n.DocType)return r.children[o]=i,i;for(o=u=0,l=(p=r.children).length;u<l;o=++u)if(p[o].isRoot)return r.children.splice(o,0,i),i;return r.children.push(i),i},e.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},e.prototype.root=function(){var t;for(t=this;t;){if(t.type===n.Document)return t.rootObject;if(t.isRoot)return t;t=t.parent}},e.prototype.document=function(){var t;for(t=this;t;){if(t.type===n.Document)return t;t=t.parent}},e.prototype.end=function(t){return this.document().end(t)},e.prototype.prev=function(){var t;if((t=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[t-1]},e.prototype.next=function(){var t;if(-1===(t=this.parent.children.indexOf(this))||t===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[t+1]},e.prototype.importDocument=function(t){var e;return(e=t.root().clone()).parent=this,e.isRoot=!1,this.children.push(e),this},e.prototype.debugInfo=function(t){var e,r;return null!=(t=t||this.name)||(null!=(e=this.parent)?e.name:void 0)?null==t?"parent: <"+this.parent.name+">":(null!=(r=this.parent)?r.name:void 0)?"node: <"+t+">, parent: <"+this.parent.name+">":"node: <"+t+">":""},e.prototype.ele=function(t,e,r){return this.element(t,e,r)},e.prototype.nod=function(t,e,r){return this.node(t,e,r)},e.prototype.txt=function(t){return this.text(t)},e.prototype.dat=function(t){return this.cdata(t)},e.prototype.com=function(t){return this.comment(t)},e.prototype.ins=function(t,e){return this.instruction(t,e)},e.prototype.doc=function(){return this.document()},e.prototype.dec=function(t,e,r){return this.declaration(t,e,r)},e.prototype.e=function(t,e,r){return this.element(t,e,r)},e.prototype.n=function(t,e,r){return this.node(t,e,r)},e.prototype.t=function(t){return this.text(t)},e.prototype.d=function(t){return this.cdata(t)},e.prototype.c=function(t){return this.comment(t)},e.prototype.r=function(t){return this.raw(t)},e.prototype.i=function(t,e){return this.instruction(t,e)},e.prototype.u=function(){return this.up()},e.prototype.importXMLBuilder=function(t){return this.importDocument(t)},e.prototype.replaceChild=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.removeChild=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.appendChild=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.hasChildNodes=function(){return 0!==this.children.length},e.prototype.cloneNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isSupported=function(t,e){return!0},e.prototype.hasAttributes=function(){return 0!==this.attribs.length},e.prototype.compareDocumentPosition=function(t){var e;return this,this===t?0:this.document()!==t.document()?(e=r.Disconnected|r.ImplementationSpecific,Math.random()<.5?e|=r.Preceding:e|=r.Following,e):this.isAncestor(t)?r.Contains|r.Preceding:this.isDescendant(t)?r.Contains|r.Following:this.isPreceding(t)?r.Preceding:r.Following},e.prototype.isSameNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.lookupPrefix=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isDefaultNamespace=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.lookupNamespaceURI=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(t){var e,r,n;if(t.nodeType!==this.nodeType)return!1;if(t.children.length!==this.children.length)return!1;for(e=r=0,n=this.children.length-1;0<=n?r<=n:r>=n;e=0<=n?++r:--r)if(!this.children[e].isEqualNode(t.children[e]))return!1;return!0},e.prototype.getFeature=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.setUserData=function(t,e,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getUserData=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.contains=function(t){return!!t&&(t===this||this.isDescendant(t))},e.prototype.isDescendant=function(t){var e,r,n,i;for(r=0,n=(i=this.children).length;r<n;r++){if(t===(e=i[r]))return!0;if(e.isDescendant(t))return!0}return!1},e.prototype.isAncestor=function(t){return t.isDescendant(this)},e.prototype.isPreceding=function(t){var e,r;return e=this.treePosition(t),r=this.treePosition(this),-1!==e&&-1!==r&&e<r},e.prototype.isFollowing=function(t){var e,r;return e=this.treePosition(t),r=this.treePosition(this),-1!==e&&-1!==r&&e>r},e.prototype.treePosition=function(t){var e,r;return r=0,e=!1,this.foreachTreeNode(this.document(),(function(n){if(r++,!e&&n===t)return e=!0})),e?r:-1},e.prototype.foreachTreeNode=function(t,e){var r,n,i,o,s;for(t||(t=this.document()),n=0,i=(o=t.children).length;n<i;n++){if(s=e(r=o[n]))return s;if(s=this.foreachTreeNode(r,e))return s}},e}()}).call(this)},{"./DocumentPosition":177,"./NodeType":178,"./Utility":179,"./XMLCData":182,"./XMLComment":184,"./XMLDeclaration":193,"./XMLDocType":194,"./XMLDummy":197,"./XMLElement":198,"./XMLNamedNodeMap":199,"./XMLNodeList":201,"./XMLProcessingInstruction":202,"./XMLRaw":203,"./XMLText":207}],201:[function(t,e,r){(function(){e.exports=function(){function t(t){this.nodes=t}return Object.defineProperty(t.prototype,"length",{get:function(){return this.nodes.length||0}}),t.prototype.clone=function(){return this.nodes=null},t.prototype.item=function(t){return this.nodes[t]||null},t}()}).call(this)},{}],202:[function(t,e,r){(function(){var r,n,i={}.hasOwnProperty;r=t("./NodeType"),n=t("./XMLCharacterData"),e.exports=function(t){function e(t,n,i){if(e.__super__.constructor.call(this,t),null==n)throw new Error("Missing instruction target. "+this.debugInfo());this.type=r.ProcessingInstruction,this.target=this.stringify.insTarget(n),this.name=this.target,i&&(this.value=this.stringify.insValue(i))}return function(t,e){for(var r in e)i.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.clone=function(){return Object.create(this)},e.prototype.toString=function(t){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(t))},e.prototype.isEqualNode=function(t){return!!e.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)&&t.target===this.target},e}(n)}).call(this)},{"./NodeType":178,"./XMLCharacterData":183}],203:[function(t,e,r){(function(){var r,n,i={}.hasOwnProperty;r=t("./NodeType"),n=t("./XMLNode"),e.exports=function(t){function e(t,n){if(e.__super__.constructor.call(this,t),null==n)throw new Error("Missing raw text. "+this.debugInfo());this.type=r.Raw,this.value=this.stringify.raw(n)}return function(t,e){for(var r in e)i.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.clone=function(){return Object.create(this)},e.prototype.toString=function(t){return this.options.writer.raw(this,this.options.writer.filterOptions(t))},e}(n)}).call(this)},{"./NodeType":178,"./XMLNode":200}],204:[function(t,e,r){(function(){var r,n,i,o={}.hasOwnProperty;r=t("./NodeType"),i=t("./XMLWriterBase"),n=t("./WriterState"),e.exports=function(t){function e(t,r){this.stream=t,e.__super__.constructor.call(this,r)}return function(t,e){for(var r in e)o.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.endline=function(t,r,i){return t.isLastRootNode&&r.state===n.CloseTag?"":e.__super__.endline.call(this,t,r,i)},e.prototype.document=function(t,e){var r,n,i,o,s,a,u,c,l;for(n=i=0,s=(u=t.children).length;i<s;n=++i)(r=u[n]).isLastRootNode=n===t.children.length-1;for(e=this.filterOptions(e),l=[],o=0,a=(c=t.children).length;o<a;o++)r=c[o],l.push(this.writeChildNode(r,e,0));return l},e.prototype.attribute=function(t,r,n){return this.stream.write(e.__super__.attribute.call(this,t,r,n))},e.prototype.cdata=function(t,r,n){return this.stream.write(e.__super__.cdata.call(this,t,r,n))},e.prototype.comment=function(t,r,n){return this.stream.write(e.__super__.comment.call(this,t,r,n))},e.prototype.declaration=function(t,r,n){return this.stream.write(e.__super__.declaration.call(this,t,r,n))},e.prototype.docType=function(t,e,r){var i,o,s,a;if(r||(r=0),this.openNode(t,e,r),e.state=n.OpenTag,this.stream.write(this.indent(t,e,r)),this.stream.write("<!DOCTYPE "+t.root().name),t.pubID&&t.sysID?this.stream.write(' PUBLIC "'+t.pubID+'" "'+t.sysID+'"'):t.sysID&&this.stream.write(' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(t,e,r)),e.state=n.InsideTag,o=0,s=(a=t.children).length;o<s;o++)i=a[o],this.writeChildNode(i,e,r+1);e.state=n.CloseTag,this.stream.write("]")}return e.state=n.CloseTag,this.stream.write(e.spaceBeforeSlash+">"),this.stream.write(this.endline(t,e,r)),e.state=n.None,this.closeNode(t,e,r)},e.prototype.element=function(t,e,i){var s,a,u,c,l,h,p,f,d;for(p in i||(i=0),this.openNode(t,e,i),e.state=n.OpenTag,this.stream.write(this.indent(t,e,i)+"<"+t.name),f=t.attribs)o.call(f,p)&&(s=f[p],this.attribute(s,e,i));if(c=0===(u=t.children.length)?null:t.children[0],0===u||t.children.every((function(t){return(t.type===r.Text||t.type===r.Raw)&&""===t.value})))e.allowEmpty?(this.stream.write(">"),e.state=n.CloseTag,this.stream.write("</"+t.name+">")):(e.state=n.CloseTag,this.stream.write(e.spaceBeforeSlash+"/>"));else if(!e.pretty||1!==u||c.type!==r.Text&&c.type!==r.Raw||null==c.value){for(this.stream.write(">"+this.endline(t,e,i)),e.state=n.InsideTag,l=0,h=(d=t.children).length;l<h;l++)a=d[l],this.writeChildNode(a,e,i+1);e.state=n.CloseTag,this.stream.write(this.indent(t,e,i)+"</"+t.name+">")}else this.stream.write(">"),e.state=n.InsideTag,e.suppressPrettyCount++,!0,this.writeChildNode(c,e,i+1),e.suppressPrettyCount--,!1,e.state=n.CloseTag,this.stream.write("</"+t.name+">");return this.stream.write(this.endline(t,e,i)),e.state=n.None,this.closeNode(t,e,i)},e.prototype.processingInstruction=function(t,r,n){return this.stream.write(e.__super__.processingInstruction.call(this,t,r,n))},e.prototype.raw=function(t,r,n){return this.stream.write(e.__super__.raw.call(this,t,r,n))},e.prototype.text=function(t,r,n){return this.stream.write(e.__super__.text.call(this,t,r,n))},e.prototype.dtdAttList=function(t,r,n){return this.stream.write(e.__super__.dtdAttList.call(this,t,r,n))},e.prototype.dtdElement=function(t,r,n){return this.stream.write(e.__super__.dtdElement.call(this,t,r,n))},e.prototype.dtdEntity=function(t,r,n){return this.stream.write(e.__super__.dtdEntity.call(this,t,r,n))},e.prototype.dtdNotation=function(t,r,n){return this.stream.write(e.__super__.dtdNotation.call(this,t,r,n))},e}(i)}).call(this)},{"./NodeType":178,"./WriterState":180,"./XMLWriterBase":208}],205:[function(t,e,r){(function(){var r,n={}.hasOwnProperty;r=t("./XMLWriterBase"),e.exports=function(t){function e(t){e.__super__.constructor.call(this,t)}return function(t,e){for(var r in e)n.call(e,r)&&(t[r]=e[r]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,t),e.prototype.document=function(t,e){var r,n,i,o,s;for(e=this.filterOptions(e),o="",n=0,i=(s=t.children).length;n<i;n++)r=s[n],o+=this.writeChildNode(r,e,0);return e.pretty&&o.slice(-e.newline.length)===e.newline&&(o=o.slice(0,-e.newline.length)),o},e}(r)}).call(this)},{"./XMLWriterBase":208}],206:[function(t,e,r){(function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},r={}.hasOwnProperty;e.exports=function(){function e(e){var n,i,o;for(n in this.assertLegalName=t(this.assertLegalName,this),this.assertLegalChar=t(this.assertLegalChar,this),e||(e={}),this.options=e,this.options.version||(this.options.version="1.0"),i=e.stringify||{})r.call(i,n)&&(o=i[n],this[n]=o)}return e.prototype.name=function(t){return this.options.noValidation?t:this.assertLegalName(""+t||"")},e.prototype.text=function(t){return this.options.noValidation?t:this.assertLegalChar(this.textEscape(""+t||""))},e.prototype.cdata=function(t){return this.options.noValidation?t:(t=(t=""+t||"").replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(t))},e.prototype.comment=function(t){if(this.options.noValidation)return t;if((t=""+t||"").match(/--/))throw new Error("Comment text cannot contain double-hypen: "+t);return this.assertLegalChar(t)},e.prototype.raw=function(t){return this.options.noValidation?t:""+t||""},e.prototype.attValue=function(t){return this.options.noValidation?t:this.assertLegalChar(this.attEscape(t=""+t||""))},e.prototype.insTarget=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.insValue=function(t){if(this.options.noValidation)return t;if((t=""+t||"").match(/\?>/))throw new Error("Invalid processing instruction value: "+t);return this.assertLegalChar(t)},e.prototype.xmlVersion=function(t){if(this.options.noValidation)return t;if(!(t=""+t||"").match(/1\.[0-9]+/))throw new Error("Invalid version number: "+t);return t},e.prototype.xmlEncoding=function(t){if(this.options.noValidation)return t;if(!(t=""+t||"").match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+t);return this.assertLegalChar(t)},e.prototype.xmlStandalone=function(t){return this.options.noValidation?t:t?"yes":"no"},e.prototype.dtdPubID=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.dtdSysID=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.dtdElementValue=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.dtdAttType=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.dtdAttDefault=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.dtdEntityValue=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.dtdNData=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.convertAttKey="@",e.prototype.convertPIKey="?",e.prototype.convertTextKey="#text",e.prototype.convertCDataKey="#cdata",e.prototype.convertCommentKey="#comment",e.prototype.convertRawKey="#raw",e.prototype.assertLegalChar=function(t){var e,r;if(this.options.noValidation)return t;if(e="","1.0"===this.options.version){if(e=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,r=t.match(e))throw new Error("Invalid character in string: "+t+" at index "+r.index)}else if("1.1"===this.options.version&&(e=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,r=t.match(e)))throw new Error("Invalid character in string: "+t+" at index "+r.index);return t},e.prototype.assertLegalName=function(t){var e;if(this.options.noValidation)return t;if(this.assertLegalChar(t),e=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!t.match(e))throw new Error("Invalid character in name");return t},e.prototype.textEscape=function(t){var e;return this.options.noValidation?t:(e=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,t.replace(e,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},e.prototype.attEscape=function(t){var e;return this.options.noValidation?t:(e=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,t.replace(e,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},e}()}).call(this)},{}],207:[function(t,e,r){(function(){var r,n,i={}.hasOwnProperty;r=t("./NodeType"),n=t("./XMLCharacterData"),e.exports=function(t){function e(t,n){if(e.__super__.constructor.call(this,t),null==n)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=r.Text,this.value=this.stringify.text(n)}return function(t,e){for(var r in e)i.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),Object.defineProperty(e.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(e.prototype,"wholeText",{get:function(){var t,e,r;for(r="",e=this.previousSibling;e;)r=e.data+r,e=e.previousSibling;for(r+=this.data,t=this.nextSibling;t;)r+=t.data,t=t.nextSibling;return r}}),e.prototype.clone=function(){return Object.create(this)},e.prototype.toString=function(t){return this.options.writer.text(this,this.options.writer.filterOptions(t))},e.prototype.splitText=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.replaceWholeText=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e}(n)}).call(this)},{"./NodeType":178,"./XMLCharacterData":183}],208:[function(t,e,r){(function(){var r,n,i,o={}.hasOwnProperty;i=t("./Utility").assign,r=t("./NodeType"),t("./XMLDeclaration"),t("./XMLDocType"),t("./XMLCData"),t("./XMLComment"),t("./XMLElement"),t("./XMLRaw"),t("./XMLText"),t("./XMLProcessingInstruction"),t("./XMLDummy"),t("./XMLDTDAttList"),t("./XMLDTDElement"),t("./XMLDTDEntity"),t("./XMLDTDNotation"),n=t("./WriterState"),e.exports=function(){function t(t){var e,r,n;for(e in t||(t={}),this.options=t,r=t.writer||{})o.call(r,e)&&(n=r[e],this["_"+e]=this[e],this[e]=n)}return t.prototype.filterOptions=function(t){var e,r,o,s,a,u,c,l;return t||(t={}),t=i({},this.options,t),(e={writer:this}).pretty=t.pretty||!1,e.allowEmpty=t.allowEmpty||!1,e.indent=null!=(r=t.indent)?r:"  ",e.newline=null!=(o=t.newline)?o:"\n",e.offset=null!=(s=t.offset)?s:0,e.dontPrettyTextNodes=null!=(a=null!=(u=t.dontPrettyTextNodes)?u:t.dontprettytextnodes)?a:0,e.spaceBeforeSlash=null!=(c=null!=(l=t.spaceBeforeSlash)?l:t.spacebeforeslash)?c:"",!0===e.spaceBeforeSlash&&(e.spaceBeforeSlash=" "),e.suppressPrettyCount=0,e.user={},e.state=n.None,e},t.prototype.indent=function(t,e,r){var n;return!e.pretty||e.suppressPrettyCount?"":e.pretty&&(n=(r||0)+e.offset+1)>0?new Array(n).join(e.indent):""},t.prototype.endline=function(t,e,r){return!e.pretty||e.suppressPrettyCount?"":e.newline},t.prototype.attribute=function(t,e,r){var n;return this.openAttribute(t,e,r),n=" "+t.name+'="'+t.value+'"',this.closeAttribute(t,e,r),n},t.prototype.cdata=function(t,e,r){var i;return this.openNode(t,e,r),e.state=n.OpenTag,i=this.indent(t,e,r)+"<![CDATA[",e.state=n.InsideTag,i+=t.value,e.state=n.CloseTag,i+="]]>"+this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),i},t.prototype.comment=function(t,e,r){var i;return this.openNode(t,e,r),e.state=n.OpenTag,i=this.indent(t,e,r)+"\x3c!-- ",e.state=n.InsideTag,i+=t.value,e.state=n.CloseTag,i+=" --\x3e"+this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),i},t.prototype.declaration=function(t,e,r){var i;return this.openNode(t,e,r),e.state=n.OpenTag,i=this.indent(t,e,r)+"<?xml",e.state=n.InsideTag,i+=' version="'+t.version+'"',null!=t.encoding&&(i+=' encoding="'+t.encoding+'"'),null!=t.standalone&&(i+=' standalone="'+t.standalone+'"'),e.state=n.CloseTag,i+=e.spaceBeforeSlash+"?>",i+=this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),i},t.prototype.docType=function(t,e,r){var i,o,s,a,u;if(r||(r=0),this.openNode(t,e,r),e.state=n.OpenTag,a=this.indent(t,e,r),a+="<!DOCTYPE "+t.root().name,t.pubID&&t.sysID?a+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(a+=' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(a+=" [",a+=this.endline(t,e,r),e.state=n.InsideTag,o=0,s=(u=t.children).length;o<s;o++)i=u[o],a+=this.writeChildNode(i,e,r+1);e.state=n.CloseTag,a+="]"}return e.state=n.CloseTag,a+=e.spaceBeforeSlash+">",a+=this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),a},t.prototype.element=function(t,e,i){var s,a,u,c,l,h,p,f,d,y,m,g,b,v;for(d in i||(i=0),y=!1,m="",this.openNode(t,e,i),e.state=n.OpenTag,m+=this.indent(t,e,i)+"<"+t.name,g=t.attribs)o.call(g,d)&&(s=g[d],m+=this.attribute(s,e,i));if(c=0===(u=t.children.length)?null:t.children[0],0===u||t.children.every((function(t){return(t.type===r.Text||t.type===r.Raw)&&""===t.value})))e.allowEmpty?(m+=">",e.state=n.CloseTag,m+="</"+t.name+">"+this.endline(t,e,i)):(e.state=n.CloseTag,m+=e.spaceBeforeSlash+"/>"+this.endline(t,e,i));else if(!e.pretty||1!==u||c.type!==r.Text&&c.type!==r.Raw||null==c.value){if(e.dontPrettyTextNodes)for(l=0,p=(b=t.children).length;l<p;l++)if(((a=b[l]).type===r.Text||a.type===r.Raw)&&null!=a.value){e.suppressPrettyCount++,y=!0;break}for(m+=">"+this.endline(t,e,i),e.state=n.InsideTag,h=0,f=(v=t.children).length;h<f;h++)a=v[h],m+=this.writeChildNode(a,e,i+1);e.state=n.CloseTag,m+=this.indent(t,e,i)+"</"+t.name+">",y&&e.suppressPrettyCount--,m+=this.endline(t,e,i),e.state=n.None}else m+=">",e.state=n.InsideTag,e.suppressPrettyCount++,y=!0,m+=this.writeChildNode(c,e,i+1),e.suppressPrettyCount--,y=!1,e.state=n.CloseTag,m+="</"+t.name+">"+this.endline(t,e,i);return this.closeNode(t,e,i),m},t.prototype.writeChildNode=function(t,e,n){switch(t.type){case r.CData:return this.cdata(t,e,n);case r.Comment:return this.comment(t,e,n);case r.Element:return this.element(t,e,n);case r.Raw:return this.raw(t,e,n);case r.Text:return this.text(t,e,n);case r.ProcessingInstruction:return this.processingInstruction(t,e,n);case r.Dummy:return"";case r.Declaration:return this.declaration(t,e,n);case r.DocType:return this.docType(t,e,n);case r.AttributeDeclaration:return this.dtdAttList(t,e,n);case r.ElementDeclaration:return this.dtdElement(t,e,n);case r.EntityDeclaration:return this.dtdEntity(t,e,n);case r.NotationDeclaration:return this.dtdNotation(t,e,n);default:throw new Error("Unknown XML node type: "+t.constructor.name)}},t.prototype.processingInstruction=function(t,e,r){var i;return this.openNode(t,e,r),e.state=n.OpenTag,i=this.indent(t,e,r)+"<?",e.state=n.InsideTag,i+=t.target,t.value&&(i+=" "+t.value),e.state=n.CloseTag,i+=e.spaceBeforeSlash+"?>",i+=this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),i},t.prototype.raw=function(t,e,r){var i;return this.openNode(t,e,r),e.state=n.OpenTag,i=this.indent(t,e,r),e.state=n.InsideTag,i+=t.value,e.state=n.CloseTag,i+=this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),i},t.prototype.text=function(t,e,r){var i;return this.openNode(t,e,r),e.state=n.OpenTag,i=this.indent(t,e,r),e.state=n.InsideTag,i+=t.value,e.state=n.CloseTag,i+=this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),i},t.prototype.dtdAttList=function(t,e,r){var i;return this.openNode(t,e,r),e.state=n.OpenTag,i=this.indent(t,e,r)+"<!ATTLIST",e.state=n.InsideTag,i+=" "+t.elementName+" "+t.attributeName+" "+t.attributeType,"#DEFAULT"!==t.defaultValueType&&(i+=" "+t.defaultValueType),t.defaultValue&&(i+=' "'+t.defaultValue+'"'),e.state=n.CloseTag,i+=e.spaceBeforeSlash+">"+this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),i},t.prototype.dtdElement=function(t,e,r){var i;return this.openNode(t,e,r),e.state=n.OpenTag,i=this.indent(t,e,r)+"<!ELEMENT",e.state=n.InsideTag,i+=" "+t.name+" "+t.value,e.state=n.CloseTag,i+=e.spaceBeforeSlash+">"+this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),i},t.prototype.dtdEntity=function(t,e,r){var i;return this.openNode(t,e,r),e.state=n.OpenTag,i=this.indent(t,e,r)+"<!ENTITY",e.state=n.InsideTag,t.pe&&(i+=" %"),i+=" "+t.name,t.value?i+=' "'+t.value+'"':(t.pubID&&t.sysID?i+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(i+=' SYSTEM "'+t.sysID+'"'),t.nData&&(i+=" NDATA "+t.nData)),e.state=n.CloseTag,i+=e.spaceBeforeSlash+">"+this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),i},t.prototype.dtdNotation=function(t,e,r){var i;return this.openNode(t,e,r),e.state=n.OpenTag,i=this.indent(t,e,r)+"<!NOTATION",e.state=n.InsideTag,i+=" "+t.name,t.pubID&&t.sysID?i+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.pubID?i+=' PUBLIC "'+t.pubID+'"':t.sysID&&(i+=' SYSTEM "'+t.sysID+'"'),e.state=n.CloseTag,i+=e.spaceBeforeSlash+">"+this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),i},t.prototype.openNode=function(t,e,r){},t.prototype.closeNode=function(t,e,r){},t.prototype.openAttribute=function(t,e,r){},t.prototype.closeAttribute=function(t,e,r){},t}()}).call(this)},{"./NodeType":178,"./Utility":179,"./WriterState":180,"./XMLCData":182,"./XMLComment":184,"./XMLDTDAttList":189,"./XMLDTDElement":190,"./XMLDTDEntity":191,"./XMLDTDNotation":192,"./XMLDeclaration":193,"./XMLDocType":194,"./XMLDummy":197,"./XMLElement":198,"./XMLProcessingInstruction":202,"./XMLRaw":203,"./XMLText":207}],209:[function(t,e,r){(function(){var r,n,i,o,s,a,u,c,l,h;h=t("./Utility"),c=h.assign,l=h.isFunction,i=t("./XMLDOMImplementation"),o=t("./XMLDocument"),s=t("./XMLDocumentCB"),u=t("./XMLStringWriter"),a=t("./XMLStreamWriter"),r=t("./NodeType"),n=t("./WriterState"),e.exports.create=function(t,e,r,n){var i,s;if(null==t)throw new Error("Root element needs a name.");return n=c({},e,r,n),s=(i=new o(n)).element(t),n.headless||(i.declaration(n),null==n.pubID&&null==n.sysID||i.dtd(n)),s},e.exports.begin=function(t,e,r){var n;return l(t)&&(e=(n=[t,e])[0],r=n[1],t={}),e?new s(t,e,r):new o(t)},e.exports.stringWriter=function(t){return new u(t)},e.exports.streamWriter=function(t,e){return new a(t,e)},e.exports.implementation=new i,e.exports.nodeType=r,e.exports.writerState=n}).call(this)},{"./NodeType":178,"./Utility":179,"./WriterState":180,"./XMLDOMImplementation":187,"./XMLDocument":195,"./XMLDocumentCB":196,"./XMLStreamWriter":204,"./XMLStringWriter":205}]},{},[1])(1)}));
  //# sourceMappingURL=jsforce.min.js.map
  