>>0?1:0)|0}d=n.low=d+R,n.high=p+T+(d>>>0>>0?1:0),m=i.low=m+P,i.high=y+O+(m>>>0>>0?1:0),g=o.low=g+L,o.high=v+N+(g>>>0>>0?1:0),_=s.low=_+j,s.high=b+D+(_>>>0>>0?1:0),S=a.low=S+q,a.high=w+M+(S>>>0>>0?1:0),I=l.low=I+B,l.high=E+U+(I>>>0>>0?1:0),k=f.low=k+H,f.high=A+F+(k>>>0>>0?1:0),x=h.low=x+z,h.high=C+V+(x>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(n+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(l),e.HmacSHA512=t._createHmacHelper(l)}(),n.SHA512)},function(e,t,r){var n=r(3),i=r(7),o=r(271),s=r(39),a=r(73).populateHostPrefix;e.exports={buildRequest:function(e){var t=e.service.api.operations[e.operation],r=e.httpRequest;r.headers["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8",r.params={Version:e.service.api.apiVersion,Action:t.name},(new o).serialize(e.params,t.input,(function(e,t){r.params[e]=t})),r.body=i.queryParamsToString(r.params),a(e)},extractError:function(e){var t,r=e.httpResponse.body.toString();if(r.match("0){var f=(t=new n.XML.Parser).parse(s.toString(),u);i.update(e.data,f)}}}},function(e,t,r){var n=r(113),i=r(117),o=r(39),s=r(118),a=r(119),u=r(120),c=r(7),l=c.property,f=c.memoizedProperty;e.exports=function(e,t){var r=this;e=e||{},(t=t||{}).api=this,e.metadata=e.metadata||{};var h=t.serviceIdentifier;delete t.serviceIdentifier,l(this,"isApi",!0,!1),l(this,"apiVersion",e.metadata.apiVersion),l(this,"endpointPrefix",e.metadata.endpointPrefix),l(this,"signingName",e.metadata.signingName),l(this,"globalEndpoint",e.metadata.globalEndpoint),l(this,"signatureVersion",e.metadata.signatureVersion),l(this,"jsonVersion",e.metadata.jsonVersion),l(this,"targetPrefix",e.metadata.targetPrefix),l(this,"protocol",e.metadata.protocol),l(this,"timestampFormat",e.metadata.timestampFormat),l(this,"xmlNamespaceUri",e.metadata.xmlNamespace),l(this,"abbreviation",e.metadata.serviceAbbreviation),l(this,"fullName",e.metadata.serviceFullName),l(this,"serviceId",e.metadata.serviceId),h&&u[h]&&l(this,"xmlNoDefaultLists",u[h].xmlNoDefaultLists,!1),f(this,"className",(function(){var t=e.metadata.serviceAbbreviation||e.metadata.serviceFullName;return t?("ElasticLoadBalancing"===(t=t.replace(/^Amazon|AWS\s*|\(.*|\s+|\W+/g,""))&&(t="ELB"),t):null})),l(this,"operations",new n(e.operations,t,(function(e,r){return new i(e,r,t)}),c.string.lowerFirst,(function(e,t){!0===t.endpointoperation&&l(r,"endpointOperation",c.string.lowerFirst(e))}))),l(this,"shapes",new n(e.shapes,t,(function(e,r){return o.create(r,t)}))),l(this,"paginators",new n(e.paginators,t,(function(e,r){return new s(e,r,t)}))),l(this,"waiters",new n(e.waiters,t,(function(e,r){return new a(e,r,t)}),c.string.lowerFirst)),t.documentation&&(l(this,"documentation",e.documentation),l(this,"documentationUrl",e.documentationUrl))}},function(e,t,r){var n=r(39),i=r(7),o=i.property,s=i.memoizedProperty;e.exports=function(e,t,r){var i=this;r=r||{},o(this,"name",t.name||e),o(this,"api",r.api,!1),t.http=t.http||{},o(this,"endpoint",t.endpoint),o(this,"httpMethod",t.http.method||"POST"),o(this,"httpPath",t.http.requestUri||"/"),o(this,"authtype",t.authtype||""),o(this,"endpointDiscoveryRequired",t.endpointdiscovery?t.endpointdiscovery.required?"REQUIRED":"OPTIONAL":"NULL"),s(this,"input",(function(){return t.input?n.create(t.input,r):new n.create({type:"structure"},r)})),s(this,"output",(function(){return t.output?n.create(t.output,r):new n.create({type:"structure"},r)})),s(this,"errors",(function(){var e=[];if(!t.errors)return null;for(var i=0;i-1&&r.splice(i,1)}return this},removeAllListeners:function(e){return e?delete this._events[e]:this._events={},this},emit:function(e,t,r){r||(r=function(){});var n=this.listeners(e),i=n.length;return this.callListeners(n,t,r),i>0},callListeners:function(e,t,r,i){var o=this,s=i||null;function a(i){if(i&&(s=n.util.error(s||new Error,i),o._haltHandlersOnError))return r.call(o,s);o.callListeners(e,t,r,s)}for(;e.length>0;){var u=e.shift();if(u._isAsync)return void u.apply(o,t.concat([a]));try{u.apply(o,t)}catch(e){s=n.util.error(s||new Error,e)}if(s&&o._haltHandlersOnError)return void r.call(o,s)}r.call(o,s)},addListeners:function(e){var t=this;return e._events&&(e=e._events),n.util.each(e,(function(e,r){"function"==typeof r&&(r=[r]),n.util.arrayEach(r,(function(r){t.on(e,r)}))})),t},addNamedListener:function(e,t,r,n){return this[e]=r,this.addListener(t,r,n),this},addNamedAsyncListener:function(e,t,r,n){return r._isAsync=!0,this.addNamedListener(e,t,r,n)},addNamedListeners:function(e){var t=this;return e((function(){t.addNamedListener.apply(t,arguments)}),(function(){t.addNamedAsyncListener.apply(t,arguments)})),this}}),n.SequentialExecutor.prototype.addListener=n.SequentialExecutor.prototype.on,e.exports=n.SequentialExecutor},function(e,t,r){var n=r(3);n.Credentials=n.util.inherit({constructor:function(){if(n.util.hideProperties(this,["secretAccessKey"]),this.expired=!1,this.expireTime=null,this.refreshCallbacks=[],1===arguments.length&&"object"==typeof arguments[0]){var e=arguments[0].credentials||arguments[0];this.accessKeyId=e.accessKeyId,this.secretAccessKey=e.secretAccessKey,this.sessionToken=e.sessionToken}else this.accessKeyId=arguments[0],this.secretAccessKey=arguments[1],this.sessionToken=arguments[2]},expiryWindow:15,needsRefresh:function(){var e=n.util.date.getDate().getTime(),t=new Date(e+1e3*this.expiryWindow);return!!(this.expireTime&&t>this.expireTime)||(this.expired||!this.accessKeyId||!this.secretAccessKey)},get:function(e){var t=this;this.needsRefresh()?this.refresh((function(r){r||(t.expired=!1),e&&e(r)})):e&&e()},refresh:function(e){this.expired=!1,e()},coalesceRefresh:function(e,t){var r=this;1===r.refreshCallbacks.push(e)&&r.load((function(e){n.util.arrayEach(r.refreshCallbacks,(function(r){t?r(e):n.util.defer((function(){r(e)}))})),r.refreshCallbacks.length=0}))},load:function(e){e()}}),n.Credentials.addPromisesToClass=function(e){this.prototype.getPromise=n.util.promisifyMethod("get",e),this.prototype.refreshPromise=n.util.promisifyMethod("refresh",e)},n.Credentials.deletePromisesFromClass=function(){delete this.prototype.getPromise,delete this.prototype.refreshPromise},n.util.addPromises(n.Credentials)},function(e,t,r){var n=r(3);n.CredentialProviderChain=n.util.inherit(n.Credentials,{constructor:function(e){this.providers=e||n.CredentialProviderChain.defaultProviders.slice(0),this.resolveCallbacks=[]},resolve:function(e){var t=this;if(0===t.providers.length)return e(new Error("No providers")),t;if(1===t.resolveCallbacks.push(e)){var r=0,i=t.providers.slice(0);!function e(o,s){if(!o&&s||r===i.length)return n.util.arrayEach(t.resolveCallbacks,(function(e){e(o,s)})),void(t.resolveCallbacks.length=0);var a=i[r++];(s="function"==typeof a?a.call():a).get?s.get((function(t){e(t,t?null:s)})):e(null,s)}()}return t}}),n.CredentialProviderChain.defaultProviders=[],n.CredentialProviderChain.addPromisesToClass=function(e){this.prototype.resolvePromise=n.util.promisifyMethod("resolve",e)},n.CredentialProviderChain.deletePromisesFromClass=function(){delete this.prototype.resolvePromise},n.util.addPromises(n.CredentialProviderChain)},function(e,t,r){var n=r(3),i=n.util.inherit;n.Endpoint=i({constructor:function(e,t){if(n.util.hideProperties(this,["slashes","auth","hash","search","query"]),null==e)throw new Error("Invalid endpoint: "+e);if("string"!=typeof e)return n.util.copy(e);e.match(/^http/)||(e=((t&&void 0!==t.sslEnabled?t.sslEnabled:n.config.sslEnabled)?"https":"http")+"://"+e);n.util.update(this,n.util.urlParse(e)),this.port?this.port=parseInt(this.port,10):this.port="https:"===this.protocol?443:80}}),n.HttpRequest=i({constructor:function(e,t){e=new n.Endpoint(e),this.method="POST",this.path=e.path||"/",this.headers={},this.body="",this.endpoint=e,this.region=t,this._userAgent="",this.setUserAgent()},setUserAgent:function(){this._userAgent=this.headers[this.getUserAgentHeaderName()]=n.util.userAgent()},getUserAgentHeaderName:function(){return(n.util.isBrowser()?"X-Amz-":"")+"User-Agent"},appendToUserAgent:function(e){"string"==typeof e&&e&&(this._userAgent+=" "+e),this.headers[this.getUserAgentHeaderName()]=this._userAgent},getUserAgent:function(){return this._userAgent},pathname:function(){return this.path.split("?",1)[0]},search:function(){var e=this.path.split("?",2)[1];return e?(e=n.util.queryStringParse(e),n.util.queryParamsToString(e)):""},updateEndpoint:function(e){var t=new n.Endpoint(e);this.endpoint=t,this.path=t.path||"/",this.headers.Host&&(this.headers.Host=t.host)}}),n.HttpResponse=i({constructor:function(){this.statusCode=void 0,this.headers={},this.body=void 0,this.streaming=!1,this.stream=null},createUnbufferedStream:function(){return this.streaming=!0,this.stream}}),n.HttpClient=i({}),n.HttpClient.getInstance=function(){return void 0===this.singleton&&(this.singleton=new this),this.singleton}},function(e,t,r){var n=r(3),i=n.util.inherit;n.Signers.V3=i(n.Signers.RequestSigner,{addAuthorization:function(e,t){var r=n.util.date.rfc822(t);this.request.headers["X-Amz-Date"]=r,e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken),this.request.headers["X-Amzn-Authorization"]=this.authorization(e,r)},authorization:function(e){return"AWS3 AWSAccessKeyId="+e.accessKeyId+",Algorithm=HmacSHA256,SignedHeaders="+this.signedHeaders()+",Signature="+this.signature(e)},signedHeaders:function(){var e=[];return n.util.arrayEach(this.headersToSign(),(function(t){e.push(t.toLowerCase())})),e.sort().join(";")},canonicalHeaders:function(){var e=this.request.headers,t=[];return n.util.arrayEach(this.headersToSign(),(function(r){t.push(r.toLowerCase().trim()+":"+String(e[r]).trim())})),t.sort().join("\n")+"\n"},headersToSign:function(){var e=[];return n.util.each(this.request.headers,(function(t){("Host"===t||"Content-Encoding"===t||t.match(/^X-Amz/i))&&e.push(t)})),e},signature:function(e){return n.util.crypto.hmac(e.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var e=[];return e.push(this.request.method),e.push("/"),e.push(""),e.push(this.canonicalHeaders()),e.push(this.request.body),n.util.crypto.sha256(e.join("\n"))}}),e.exports=n.Signers.V3},function(e,t,r){e.exports=r(130)},function(e,t,r){"use strict";r.d(t,"a",(function(){return y}));var n=r(10),i=r(50),o=r(52),s=r(35),a=r(55),u=r(8),c=r(22),l=r(18),f=r(51),h=r(54),p=r(53),d=r(56),y={User:{Service:i.a,Model:u.a,ListQuery:f.a},Conversation:{Service:o.a,Model:c.a,ListQuery:h.a},Message:{Service:s.a,Model:l.a,ListQuery:p.a},File:{Service:d.a},PushNotification:{Service:a.a},Client:n.a}},function(e,t,r){"use strict";r.d(t,"a",(function(){return g}));var n=r(26),i=r(2),o=r(27);function s(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};y(this,e),v(this,"__socketClass",u),v(this,"__socket",void 0),v(this,"__events",{connected:{topic:"connected"},disconnected:{topic:"disconnected"},reconnected:{topic:"reconnected"},"conversation.updated":{topic:"users/[login_user]/conversation/updated"},"conversation.members_added":{topic:"users/[login_user]/conversation/members_added"},"conversation.members_removed":{topic:"users/[login_user]/conversation/members_removed"},"conversation.admin_added":{topic:"users/[login_user]/conversation/admin_added"},"conversation.typing":{topic:"users/[login_user]/conversation_typing"},"conversation.mark_as_read":{topic:"users/[login_user]/conversation/mark_as_read"},"message.deleted_for_everyone":{topic:"users/[login_user]/messages/deleted_for_everyone"},"user.friends_added":{topic:"users/[login_user]/friends_added"},"user.friends_removed":{topic:"users/[login_user]/friends_removed"},"user.blocked":{topic:"users/[login_user]/blocked"},"user.unblocked":{topic:"users/[login_user]/unblocked"},"user.conversation_deleted":{topic:"users/[login_user]/conversation_deleted"},"user.conversation_cleared":{topic:"users/[login_user]/conversation_cleared"},"user.mute_updated":{topic:"users/[login_user]/mute_updated"},"user.joined":{topic:"users/[login_user]/joined"},"user.removed":{topic:"users/[login_user]/removed"},"user.message_created":{topic:"users/[login_user]/message_created"},"user.message_deleted":{topic:"users/[login_user]/message_deleted"},"user.total_unread_message_count_updated":{topic:"users/[login_user]/total_unread_message_count_updated"},"user.status_updated":{topic:"users/status_updated"},"user.updated":{topic:"users/updated"}}),v(this,"allowForceResubscribe",!1),v(this,"__baseEvents",["connected","disconnected","reconnected"]),v(this,"__subscribedTopics",{}),v(this,"__preConnectEvents",[]),this.__socket=new this.__socketClass(this),this.__connected=!1,this.__autoSubscribed=!1,this.__publicKey=t.publicKey}var t,r,n;return t=e,(r=[{key:"connect",value:function(e,t,r){var n=this;return Object(i.a)(r,(function(r){n.__userId=e,n.__socket.connect(e,t,r)}))}},{key:"__onConnected",value:function(e){this.__connected=!0,e?this.__trigger("reconnected",null):this.__trigger("connected",null),this.allowForceResubscribe&&e&&this.__autoSubscribed?this.__resubscribe():this.__autoSubscribed||this.__subscribeAll(),this.__preConnectSubscribe(),this.__setUserOnline()}},{key:"__onConnectionLost",value:function(e){this.__connected=!1,this.__trigger("disconnected",e)}},{key:"__disconnect",value:function(){this.__socket.__disconnect()}},{key:"__validate",value:function(e,t,r){if(!this.__isSupported(e))return function(e){throw e}(new Error(l.a.sprintf(c.a.INVALID_EVENT,e)));if(!this.__hasDependencyVars(e))return!0;this.__events[e].vars.forEach((function(r){if(!t[r])return function(e){throw e}(new Error(l.a.sprintf(c.a.REQUIRED_SOCKET_EVENT_PARAM,r,e)))}));var n="__validate"+this.__capitalize(e);if("function"==typeof this[n]){var i=this[n](e,t);if(i.error)return function(e){throw e}(new Error(i.message))}}},{key:"on",value:function(){var e=Array.prototype.slice.call(arguments,0,arguments.length),t=e.shift(),r=e.pop(),n={};e.length&&this.__hasDependencyVars(t)&&this.__events[t].vars.forEach((function(t){n[t]=e.shift()})),this.__validate(t,n,r),this.__isConnected()||this.__isBaseEvent(t)?this.__subscribe(t,n,r):this.__preConnectAdd(t,n,r)}},{key:"__preConnectAdd",value:function(e,t,r){this.__preConnectEvents.push({event:e,params:t,cb:r})}},{key:"__isBaseEvent",value:function(e){return this.__baseEvents.includes(e)}},{key:"__isConnected",value:function(){return this.__connected}},{key:"__preConnectSubscribe",value:function(){for(var e;e=this.__preConnectEvents.shift();)this.__subscribe(e.event,e.params,e.cb)}},{key:"__getEventTopic",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.__events[e].topic,i=this.__events[e].vars;return Array.isArray(n)?n.map((function(e){return t.__replaceTopicVar(e,i,r)})):this.__replaceTopicVar(n,i,r)}},{key:"__isSubscribed",value:function(e){return this.__subscribedTopics.hasOwnProperty(e)}},{key:"__isSupported",value:function(e){return this.__events.hasOwnProperty(e)}},{key:"__hasDependencyVars",value:function(e){return this.__events[e]&&this.__events[e].hasOwnProperty("vars")&&this.__events[e].vars.length}},{key:"__subscribe",value:function(e,t,r){var n=this,i=this.__getEventTopic(e,t);(Array.isArray(i)?i:[i]).forEach((function(t){n.__isSubscribed(t)||(n.__isBaseEvent(e)||n.__subscribeSocket(t),n.__subscribedTopics[t]={event:e,cb:[]}),r&&"function"==typeof r&&n.__subscribedTopics[t].cb.push(r)}))}},{key:"__subscribeSocket",value:function(e){this.__socket.__subscribe(this.__publicKey+"/"+e)}},{key:"__publishSocket",value:function(e,t){t=this.__addDefaultProperties(t),e=e.replace("[login_user]",this.__userId),this.__socket.__publish(this.__publicKey+"/"+e,JSON.stringify(t))}},{key:"__addDefaultProperties",value:function(e){return Object.assign(e,{version:"v2"})}},{key:"__subscribeAll",value:function(){var e=this;Object.keys(this.__events).forEach((function(t){e.__hasDependencyVars(t)||e.__subscribe(t,null)})),this.__autoSubscribed=!0}},{key:"__resubscribe",value:function(){var e=this;Object.keys(this.__subscribedTopics).forEach((function(t){var r=e.__subscribedTopics[t].event;e.__isBaseEvent(r)||e.__subscribeSocket(t)}))}},{key:"__trigger",value:function(e,t){e=e.replace(this.__publicKey+"/",""),this.__isSubscribed(e)&&this.__subscribedTopics[e].cb.forEach((function(e){e(t)}))}},{key:"__processPayload",value:function(e,t){var r=this.__subscribedTopics[e].event;return"function"==typeof d[r]?d[r](e,t):[t]}},{key:"__replaceTopicVar",value:function(e,t,r){return e=e.replace("[login_user]",this.__userId),t&&t.length?(t.forEach((function(t){e=e.replace("["+t+"]",r[t])})),e):e}},{key:"__capitalize",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"__validateUserUpdated",value:function(e,t){return{error:"string"!=typeof t.user_id,message:"User Id should be string"}}},{key:"__setUserOnline",value:function(){this.__publishSocket("users/server/online",{userId:this.__userId})}}])&&m(t.prototype,r),n&&m(t,n),e}()},function(e,t,r){"use strict";r.r(t),function(e){r.d(t,"Channelize",(function(){return o})),r.d(t,"core",(function(){return a})),r.d(t,"client",(function(){return u}));var n=r(10),i=r(127);e.Channelize?console.error("ERROR: It appears that you have multiple copies of the Channelize WebSDK in your build!"):e.Channelize={core:i.a,client:n.a};var o=e.Channelize,s=e.Channelize,a=s.core,u=s.client}.call(this,r(13))},function(e,t,r){"use strict";var n=r(11),i=r(76),o=r(132),s=r(57);function a(e){var t=new o(e),r=i(o.prototype.request,t);return n.extend(r,o.prototype,t),n.extend(r,t),r}var u=a(s);u.Axios=o,u.create=function(e){return a(n.merge(s,e))},u.Cancel=r(80),u.CancelToken=r(145),u.isCancel=r(79),u.all=function(e){return Promise.all(e)},u.spread=r(146),e.exports=u,e.exports.default=u},function(e,t){
+/*!
+ * Determine if an object is a Buffer
+ *
+ * @author Feross Aboukhadijeh
+ * @license MIT
+ */
+e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,r){"use strict";var n=r(57),i=r(11),o=r(140),s=r(141);function a(e){this.defaults=e,this.interceptors={request:new o,response:new o}}a.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),(e=i.merge(n,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[s,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},i.forEach(["delete","get","head","options"],(function(e){a.prototype[e]=function(t,r){return this.request(i.merge(r||{},{method:e,url:t}))}})),i.forEach(["post","put","patch"],(function(e){a.prototype[e]=function(t,r,n){return this.request(i.merge(n||{},{method:e,url:t,data:r}))}})),e.exports=a},function(e,t,r){"use strict";var n=r(11);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},function(e,t,r){"use strict";var n=r(78);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e}},function(e,t,r){"use strict";var n=r(11);function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var s=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(i(t)+"="+i(e))})))})),o=s.join("&")}return o&&(e+=(-1===e.indexOf("?")?"?":"&")+o),e}},function(e,t,r){"use strict";var n=r(11),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,o,s={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t){if(s[t]&&i.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},function(e,t,r){"use strict";var n=r(11);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(11);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(i)&&a.push("path="+i),n.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n=r(11);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},function(e,t,r){"use strict";var n=r(11),i=r(142),o=r(79),s=r(57),a=r(143),u=r(144);function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return c(e),e.baseURL&&!a(e.url)&&(e.url=u(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return c(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(c(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,r){"use strict";var n=r(11);e.exports=function(e,t,r){return n.forEach(r,(function(r){e=r(e,t)})),e}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var n=r(80);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){var n,i,o=r(82),s=r(83),a=0,u=0;e.exports=function(e,t,r){var c=t&&r||0,l=t||[],f=(e=e||{}).node||n,h=void 0!==e.clockseq?e.clockseq:i;if(null==f||null==h){var p=o();null==f&&(f=n=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==h&&(h=i=16383&(p[6]<<8|p[7]))}var d=void 0!==e.msecs?e.msecs:(new Date).getTime(),y=void 0!==e.nsecs?e.nsecs:u+1,m=d-a+(y-u)/1e4;if(m<0&&void 0===e.clockseq&&(h=h+1&16383),(m<0||d>a)&&void 0===e.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=d,u=y,i=h;var v=(1e4*(268435455&(d+=122192928e5))+y)%4294967296;l[c++]=v>>>24&255,l[c++]=v>>>16&255,l[c++]=v>>>8&255,l[c++]=255&v;var g=d/4294967296*1e4&268435455;l[c++]=g>>>8&255,l[c++]=255&g,l[c++]=g>>>24&15|16,l[c++]=g>>>16&255,l[c++]=h>>>8|128,l[c++]=255&h;for(var b=0;b<6;++b)l[c+b]=f[b];return t||s(l)}},function(e,t,r){var n=r(82),i=r(83);e.exports=function(e,t,r){var o=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||n)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},function(e,t,r){e.exports.device=r(58),e.exports.thingShadow=r(269),e.exports.jobs=r(270)},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){"use strict";(function(t){var n=r(153),i=r(84),o=r(63),s=r(59),a={};function u(e,t){if("object"!=typeof e||t||(t=e,e=null),t=t||{},e){var r=o.parse(e,!0);if(null!=r.port&&(r.port=Number(r.port)),null===(t=s(r,t)).protocol)throw new Error("Missing protocol");t.protocol=t.protocol.replace(/:$/,"")}if(function(e){var t;e.auth&&((t=e.auth.match(/^(.+):(.+)$/))?(e.username=t[1],e.password=t[2]):e.username=e.auth)}(t),t.query&&"string"==typeof t.query.clientId&&(t.clientId=t.query.clientId),t.cert&&t.key){if(!t.protocol)throw new Error("Missing secure protocol key");if(-1===["mqtts","wss","wxs"].indexOf(t.protocol))switch(t.protocol){case"mqtt":t.protocol="mqtts";break;case"ws":t.protocol="wss";break;case"wx":t.protocol="wxs";break;default:throw new Error('Unknown protocol for secure connection: "'+t.protocol+'"!')}}if(!a[t.protocol]){var i=-1!==["mqtts","wss"].indexOf(t.protocol);t.protocol=["mqtt","mqtts","ws","wss","wx","wxs"].filter((function(e,t){return(!i||t%2!=0)&&"function"==typeof a[e]}))[0]}if(!1===t.clean&&!t.clientId)throw new Error("Missing clientId for unclean clients");return t.protocol&&(t.defaultProtocol=t.protocol),new n((function(e){return t.servers&&(e._reconnectCount&&e._reconnectCount!==t.servers.length||(e._reconnectCount=0),t.host=t.servers[e._reconnectCount].host,t.port=t.servers[e._reconnectCount].port,t.protocol=t.servers[e._reconnectCount].protocol?t.servers[e._reconnectCount].protocol:t.defaultProtocol,t.hostname=t.host,e._reconnectCount++),a[t.protocol](e,t)}),t)}"browser"!==t.title?(a.mqtt=r(107),a.tcp=r(107),a.ssl=r(64),a.tls=r(64),a.mqtts=r(64)):(a.wx=r(108),a.wxs=r(108)),a.ws=r(109),a.wss=r(109),e.exports=u,e.exports.connect=u,e.exports.MqttClient=n,e.exports.Store=i}).call(this,r(6))},function(e,t,r){"use strict";(function(t,n){var i=r(19),o=r(84),s=r(103),a=r(219),u=r(41).Writable,c=r(20),l=r(226),f=r(227),h=r(59),p=t.setImmediate||function(e){n.nextTick(e)},d={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:3e4,clean:!0,resubscribe:!0};function y(e,t,r){e.emit("packetsend",t),!a.writeToStream(t,e.stream)&&r?e.stream.once("drain",r):r&&r()}function m(e,t,r){e.outgoingStore.put(t,(function(n){if(n)return r&&r(n);y(e,t,r)}))}function v(){}function g(e,t){var r,n=this;if(!(this instanceof g))return new g(e,t);for(r in this.options=t||{},d)void 0===this.options[r]?this.options[r]=d[r]:this.options[r]=t[r];this.options.clientId="string"==typeof this.options.clientId?this.options.clientId:"mqttjs_"+Math.random().toString(16).substr(2,8),this.streamBuilder=e,this.outgoingStore=this.options.outgoingStore||new o,this.incomingStore=this.options.incomingStore||new o,this.queueQoSZero=void 0===this.options.queueQoSZero||this.options.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this.nextId=Math.max(1,Math.floor(65535*Math.random())),this.outgoing={},this.on("connect",(function(){if(!this.disconnected){this.connected=!0;var e=this.outgoingStore.createStream();this.once("close",t),e.on("end",(function(){n.removeListener("close",t)})),e.on("error",(function(e){n.removeListener("close",t),n.emit("error",e)})),function t(){if(e){var r,i=e.read(1);i?n.disconnecting||n.reconnectTimer?e.destroy&&e.destroy():(r=n.outgoing[i.messageId],n.outgoing[i.messageId]=function(e,n){r&&r(e,n),t()},n._sendPacket(i)):e.once("readable",t)}}()}function t(){e.destroy(),e=null}})),this.on("close",(function(){this.connected=!1,clearTimeout(this.connackTimer)})),this.on("connect",this._setupPingTimer),this.on("connect",(function(){var e=this.queue;!function t(){var r,i=e.shift();i&&(r=i.packet,n._sendPacket(r,(function(e){i.cb&&i.cb(e),t()})))}()}));var s=!0;this.on("connect",(function(){!s&&this.options.clean&&Object.keys(this._resubscribeTopics).length>0&&(this.options.resubscribe?(this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics)):this._resubscribeTopics={}),s=!1})),this.on("close",(function(){null!==n.pingTimer&&(n.pingTimer.clear(),n.pingTimer=null)})),this.on("close",this._setupReconnect),i.EventEmitter.call(this),this._setupStream()}c(g,i.EventEmitter),g.prototype._setupStream=function(){var e,t=this,r=new u,i=a.parser(this.options),o=null,c=[];function l(){n.nextTick(f)}function f(){var e=c.shift(),r=o;e?t._handlePacket(e,l):(o=null,r())}this._clearReconnect(),this.stream=this.streamBuilder(this),i.on("packet",(function(e){c.push(e)})),r._write=function(e,t,r){o=r,i.parse(e),f()},this.stream.pipe(r),this.stream.on("error",v),s(this.stream,this.emit.bind(this,"close")),(e=Object.create(this.options)).cmd="connect",y(this,e),i.on("error",this.emit.bind(this,"error")),this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout((function(){t._cleanUp(!0)}),this.options.connectTimeout)},g.prototype._handlePacket=function(e,t){switch(this.emit("packetreceive",e),e.cmd){case"publish":this._handlePublish(e,t);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":this._handleAck(e),t();break;case"pubrel":this._handlePubrel(e,t);break;case"connack":this._handleConnack(e),t();break;case"pingresp":this._handlePingresp(e),t()}},g.prototype._checkDisconnecting=function(e){return this.disconnecting&&(e?e(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting},g.prototype.publish=function(e,t,r,n){var i;"function"==typeof r&&(n=r,r=null);if(r=h({qos:0,retain:!1,dup:!1},r),this._checkDisconnecting(n))return this;switch(i={cmd:"publish",topic:e,payload:t,qos:r.qos,retain:r.retain,messageId:this._nextId(),dup:r.dup},r.qos){case 1:case 2:this.outgoing[i.messageId]=n||v,this._sendPacket(i);break;default:this._sendPacket(i,n)}return this},g.prototype.subscribe=function(){var e,t,r=Array.prototype.slice.call(arguments),n=[],i=r.shift(),o=i.resubscribe,s=r.pop()||v,a=r.pop(),u=this;if(delete i.resubscribe,"string"==typeof i&&(i=[i]),"function"!=typeof s&&(a=s,s=v),null!==(t=f.validateTopics(i)))return p(s,new Error("Invalid topic "+t)),this;if(this._checkDisconnecting(s))return this;var c={qos:0};if(a=h(c,a),Array.isArray(i)?i.forEach((function(e){(u._resubscribeTopics[e]0&&(u._resubscribeTopics[e.topic]=e.qos,l.push(e.topic))})),u.messageIdToTopic[e.messageId]=l}return this.outgoing[e.messageId]=function(e,t){if(!e)for(var r=t.granted,i=0;i0?this.once("outgoingEmpty",setTimeout.bind(null,i,10)):i()),this},g.prototype.removeOutgoingMessage=function(e){var t=this.outgoing[e];return delete this.outgoing[e],this.outgoingStore.del({messageId:e},(function(){t(new Error("Message removed"))})),this},g.prototype.reconnect=function(e){var t=this,r=function(){e?(t.options.incomingStore=e.incomingStore,t.options.outgoingStore=e.outgoingStore):(t.options.incomingStore=null,t.options.outgoingStore=null),t.incomingStore=t.options.incomingStore||new o,t.outgoingStore=t.options.outgoingStore||new o,t.disconnecting=!1,t.disconnected=!1,t._deferredReconnect=null,t._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=r:r(),this},g.prototype._reconnect=function(){this.emit("reconnect"),this._setupStream()},g.prototype._setupReconnect=function(){var e=this;!e.disconnecting&&!e.reconnectTimer&&e.options.reconnectPeriod>0&&(this.reconnecting||(this.emit("offline"),this.reconnecting=!0),e.reconnectTimer=setInterval((function(){e._reconnect()}),e.options.reconnectPeriod))},g.prototype._clearReconnect=function(){this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},g.prototype._cleanUp=function(e,t){var r;t&&this.stream.on("close",t),e?(0===this.options.reconnectPeriod&&this.options.clean&&(r=this.outgoing)&&Object.keys(r).forEach((function(e){"function"==typeof r[e]&&(r[e](new Error("Connection closed")),delete r[e])})),this.stream.destroy()):this._sendPacket({cmd:"disconnect"},p.bind(null,this.stream.end.bind(this.stream))),this.disconnecting||(this._clearReconnect(),this._setupReconnect()),null!==this.pingTimer&&(this.pingTimer.clear(),this.pingTimer=null),t&&!this.connected&&(this.stream.removeListener("close",t),t())},g.prototype._sendPacket=function(e,t){if(this.connected){switch(this._shiftPingInterval(),e.cmd){case"publish":break;case"pubrel":return void m(this,e,t);default:return void y(this,e,t)}switch(e.qos){case 2:case 1:m(this,e,t);break;case 0:default:y(this,e,t)}}else 0===(e.qos||0)&&this.queueQoSZero||"publish"!==e.cmd?this.queue.push({packet:e,cb:t}):e.qos>0?(t=this.outgoing[e.messageId],this.outgoingStore.put(e,(function(e){if(e)return t&&t(e)}))):t&&t(new Error("No connection to broker"))},g.prototype._setupPingTimer=function(){var e=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=l((function(){e._checkPing()}),1e3*this.options.keepalive))},g.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(1e3*this.options.keepalive)},g.prototype._checkPing=function(){this.pingResp?(this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):this._cleanUp(!0)},g.prototype._handlePingresp=function(){this.pingResp=!0},g.prototype._handleConnack=function(e){var t=e.returnCode;if(clearTimeout(this.connackTimer),0===t)this.reconnecting=!1,this.emit("connect",e);else if(t>0){var r=new Error("Connection refused: "+["","Unacceptable protocol version","Identifier rejected","Server unavailable","Bad username or password","Not authorized"][t]);r.code=t,this.emit("error",r)}},g.prototype._handlePublish=function(e,t){t=void 0!==t?t:v;var r=e.topic.toString(),n=e.payload,i=e.qos,o=e.messageId,s=this;switch(i){case 2:this.incomingStore.put(e,(function(e){if(e)return t(e);s._sendPacket({cmd:"pubrec",messageId:o},t)}));break;case 1:this.emit("message",r,n,e),this.handleMessage(e,(function(e){if(e)return t(e);s._sendPacket({cmd:"puback",messageId:o},t)}));break;case 0:this.emit("message",r,n,e),this.handleMessage(e,t)}},g.prototype.handleMessage=function(e,t){t()},g.prototype._handleAck=function(e){var t=e.messageId,r=e.cmd,n=null,i=this.outgoing[t],o=this;if(i){switch(r){case"pubcomp":case"puback":delete this.outgoing[t],this.outgoingStore.del(e,i);break;case"pubrec":n={cmd:"pubrel",qos:2,messageId:t},this._sendPacket(n);break;case"suback":if(delete this.outgoing[t],1===e.granted.length&&0!=(128&e.granted[0])){var s=this.messageIdToTopic[t];s&&s.forEach((function(e){delete o._resubscribeTopics[e]}))}i(null,e);break;case"unsuback":delete this.outgoing[t],i(null);break;default:o.emit("error",new Error("unrecognized packet type"))}this.disconnecting&&0===Object.keys(this.outgoing).length&&this.emit("outgoingEmpty")}},g.prototype._handlePubrel=function(e,t){t=void 0!==t?t:v;var r=e.messageId,n=this,i={cmd:"pubcomp",messageId:r};n.incomingStore.get(e,(function(r,o){r||"pubrel"===o.cmd?n._sendPacket(i,t):(n.emit("message",o.topic,o.payload,o),n.incomingStore.put(e,(function(e){if(e)return t(e);n.handleMessage(o,(function(e){if(e)return t(e);n._sendPacket(i,t)}))})))}))},g.prototype._nextId=function(){var e=this.nextId++;return 65536===this.nextId&&(this.nextId=1),e},g.prototype.getLastMessageId=function(){return 1===this.nextId?65535:this.nextId-1},e.exports=g}).call(this,r(13),r(6))},function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=c(e),s=n[0],a=n[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),l=0,f=a>0?s-4:s;for(r=0;r>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===a&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[l++]=255&t);1===a&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,r){for(var i,o,s=[],a=t;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,l=-7,f=r?i-1:0,h=r?-1:1,p=e[t+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;e[r+p]=255&s,p+=d,s/=256,c-=8);e[r+p-d]|=128*y}},function(e,t){},function(e,t,r){"use strict";var n=r(14).Buffer,i=r(158);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,o=n.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=o,i=a,t.copy(r,i),a+=s.data.length,s=s.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,i,o,s,a,u=1,c={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){d(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){d(e.data)},n=function(e){o.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,n=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(d,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&d(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),n=function(t){e.postMessage(s+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r=0?c(l):i(this.length)-c(u(l));t0?1:-1}},function(e,t,r){"use strict";var n=r(28),i={function:!0,object:!0};e.exports=function(e){return n(e)&&i[typeof e]||!1}},function(e,t,r){"use strict";var n,i,o,s,a=Object.create;r(95)()||(n=r(96)),e.exports=n?1!==n.level?a:(i={},o={},s={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach((function(e){o[e]="__proto__"!==e?s:{configurable:!0,enumerable:!1,writable:!0,value:void 0}})),Object.defineProperties(i,o),Object.defineProperty(n,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:i}),function(e,t){return a(null===e?i:e,t)}):a},function(e,t,r){"use strict";var n=r(177);e.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!n(e)}},function(e,t,r){"use strict";var n=r(60);e.exports=function(e){if(!n(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},function(e,t,r){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,r){"use strict";var n=r(180),i=r(21),o=Math.max;e.exports=function(e,t){var r,s,a,u=o(arguments.length,2);for(e=Object(i(e)),a=function(n){try{e[n]=t[n]}catch(e){r||(r=e)}},s=1;s-1}},function(e,t,r){"use strict";var n,i,o,s,a,u,c,l=r(16),f=r(25),h=Function.prototype.apply,p=Function.prototype.call,d=Object.create,y=Object.defineProperty,m=Object.defineProperties,v=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};i=function(e,t){var r,i;return f(t),i=this,n.call(this,e,r=function(){o.call(i,e,r),h.call(t,this,arguments)}),r.__eeOnceListener__=t,this},a={on:n=function(e,t){var r;return f(t),v.call(this,"__ee__")?r=this.__ee__:(r=g.value=d(null),y(this,"__ee__",g),g.value=null),r[e]?"object"==typeof r[e]?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},once:i,off:o=function(e,t){var r,n,i,o;if(f(t),!v.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"==typeof(n=r[e]))for(o=0;i=n[o];++o)i!==t&&i.__eeOnceListener__!==t||(2===n.length?r[e]=n[o?0:1]:n.splice(o,1));else n!==t&&n.__eeOnceListener__!==t||delete r[e];return this},emit:s=function(e){var t,r,n,i,o;if(v.call(this,"__ee__")&&(i=this.__ee__[e]))if("object"==typeof i){for(r=arguments.length,o=new Array(r-1),t=1;t=55296&&m<=56319&&(y+=e[++p]),u.call(t,v,y,f),!h);++p);else c.call(e,(function(e){return u.call(t,v,e,f),h}))}},function(e,t,r){"use strict";var n=r(44),i=r(45),o=r(197),s=r(212),a=r(101),u=r(23).iterator;e.exports=function(e){return"function"==typeof a(e)[u]?e[u]():n(e)?new o(e):i(e)?new s(e):new o(e)}},function(e,t,r){"use strict";var n,i=r(42),o=r(99),s=r(16),a=r(23),u=r(62),c=Object.defineProperty;n=e.exports=function(e,t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");u.call(this,e),t=t?o.call(t,"key+value")?"key+value":o.call(t,"key")?"key":"value":"value",c(this,"__kind__",s("",t))},i&&i(n,u),delete n.prototype.constructor,n.prototype=Object.create(u.prototype,{_resolve:s((function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e}))}),c(n.prototype,a.toStringTag,s("c","Array Iterator"))},function(e,t,r){"use strict";var n,i=r(29),o=r(199),s=r(203),a=r(204),u=r(98),c=r(209),l=Function.prototype.bind,f=Object.defineProperty,h=Object.prototype.hasOwnProperty;n=function(e,t,r){var n,i=o(t)&&s(t.value);return delete(n=a(t)).writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&h.call(this,e)?i:(t.value=l.call(i,r.resolveContext?r.resolveContext(this):this),f(this,e,t),this[e])},n},e.exports=function(e){var t=u(arguments[1]);return i(t.resolveContext)&&s(t.resolveContext),c(e,(function(e,r){return n(r,e,t)}))}},function(e,t,r){"use strict";var n=r(102),i=r(29);e.exports=function(e){return i(e)?e:n(e,"Cannot use %v",arguments[1])}},function(e,t,r){"use strict";var n=r(29),i=r(60),o=Object.prototype.toString;e.exports=function(e){if(!n(e))return null;if(i(e)){var t=e.toString;if("function"!=typeof t)return null;if(t===o)return null}try{return""+e}catch(e){return null}}},function(e,t,r){"use strict";var n=r(202),i=/[\n\r\u2028\u2029]/g;e.exports=function(e){var t=n(e);return null===t?"":(t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(i,(function(e){switch(e){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})))}},function(e,t,r){"use strict";e.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(e){return null}}}},function(e,t,r){"use strict";var n=r(102),i=r(97);e.exports=function(e){return i(e)?e:n(e,"%v is not a plain function",arguments[1])}},function(e,t,r){"use strict";var n=r(205),i=r(61),o=r(21);e.exports=function(e){var t=Object(o(e)),r=arguments[1],s=Object(arguments[2]);if(t!==e&&!r)return t;var a={};return r?n(r,(function(t){(s.ensure||t in e)&&(a[t]=e[t])})):i(a,e),a}},function(e,t,r){"use strict";e.exports=r(206)()?Array.from:r(207)},function(e,t,r){"use strict";e.exports=function(){var e,t,r=Array.from;return"function"==typeof r&&(t=r(e=["raz","dwa"]),Boolean(t&&t!==e&&"dwa"===t[1]))}},function(e,t,r){"use strict";var n=r(23).iterator,i=r(44),o=r(208),s=r(94),a=r(25),u=r(21),c=r(28),l=r(45),f=Array.isArray,h=Function.prototype.call,p={configurable:!0,enumerable:!0,writable:!0,value:null},d=Object.defineProperty;e.exports=function(e){var t,r,y,m,v,g,b,_,w,S,E=arguments[1],I=arguments[2];if(e=Object(u(e)),c(E)&&a(E),this&&this!==Array&&o(this))t=this;else{if(!E){if(i(e))return 1!==(v=e.length)?Array.apply(null,e):((m=new Array(1))[0]=e[0],m);if(f(e)){for(m=new Array(v=e.length),r=0;r=55296&&g<=56319&&(S+=e[++r]),S=E?h.call(E,I,S,y):S,t?(p.value=S,d(m,y,p)):m[y]=S,++y;v=y}if(void 0===v)for(v=s(e.length),t&&(m=new t(v)),r=0;r=55296&&t<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),u(n.prototype,s.toStringTag,o("c","String Iterator"))},function(e,t,r){"use strict";var n,i=r(42),o=r(16),s=r(62),a=r(23).toStringTag,u=r(214),c=Object.defineProperties,l=s.prototype._unBind;n=e.exports=function(e,t){if(!(this instanceof n))return new n(e,t);s.call(this,e.__mapKeysData__,e),t&&u[t]||(t="key+value"),c(this,{__kind__:o("",t),__values__:o("w",e.__mapValuesData__)})},i&&i(n,s),n.prototype=Object.create(s.prototype,{constructor:o(n),_resolve:o((function(e){return"value"===this.__kind__?this.__values__[e]:"key"===this.__kind__?this.__list__[e]:[this.__list__[e],this.__values__[e]]})),_unBind:o((function(){this.__values__=null,l.call(this)})),toString:o((function(){return"[object Map Iterator]"}))}),Object.defineProperty(n.prototype,a,o("c","Map Iterator"))},function(e,t,r){"use strict";e.exports=r(215)("key","value","key+value")},function(e,t,r){"use strict";var n=Array.prototype.forEach,i=Object.create;e.exports=function(e){var t=i(null);return n.call(arguments,(function(e){t[e]=!0})),t}},function(e,t,r){"use strict";e.exports="undefined"!=typeof Map&&"[object Map]"===Object.prototype.toString.call(new Map)},function(e,t,r){var n=r(218);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}e.exports=n(i),e.exports.strict=n(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},function(e,t){e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,this._stateCounter>=this._states.length&&(this._stateCounter=0);return this._list.length},u.prototype._parseHeader=function(){var e=this._list.readUInt8(0);return this.packet.cmd=a.types[e>>a.CMD_SHIFT],this.packet.retain=0!=(e&a.RETAIN_MASK),this.packet.qos=e>>a.QOS_SHIFT&a.QOS_MASK,this.packet.dup=0!=(e&a.DUP_MASK),this._list.consume(1),!0},u.prototype._parseLength=function(){for(var e,t=0,r=1,n=0,i=!0;t<5&&(n+=r*((e=this._list.readUInt8(t++))&a.LENGTH_MASK),r*=128,0!=(e&a.LENGTH_FIN_MASK));)if(this._list.length<=t){i=!1;break}return i&&(this.packet.length=n,this._list.consume(t)),i},u.prototype._parsePayload=function(){var e=!1;if(0===this.packet.length||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseMessageId();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":case"disconnect":break;default:this._emitError(new Error("Not supported"))}e=!0}return e},u.prototype._parseConnect=function(){var e,t,r,n,i,o,s={},u=this.packet;if(null===(e=this._parseString()))return this._emitError(new Error("Cannot parse protocolId"));if("MQTT"!==e&&"MQIsdp"!==e)return this._emitError(new Error("Invalid protocolId"));if(u.protocolId=e,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(u.protocolVersion=this._list.readUInt8(this._pos),3!==u.protocolVersion&&4!==u.protocolVersion)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(s.username=this._list.readUInt8(this._pos)&a.USERNAME_MASK,s.password=this._list.readUInt8(this._pos)&a.PASSWORD_MASK,s.will=this._list.readUInt8(this._pos)&a.WILL_FLAG_MASK,s.will&&(u.will={},u.will.retain=0!=(this._list.readUInt8(this._pos)&a.WILL_RETAIN_MASK),u.will.qos=(this._list.readUInt8(this._pos)&a.WILL_QOS_MASK)>>a.WILL_QOS_SHIFT),u.clean=0!=(this._list.readUInt8(this._pos)&a.CLEAN_SESSION_MASK),this._pos++,u.keepalive=this._parseNum(),-1===u.keepalive)return this._emitError(new Error("Packet too short"));if(null===(t=this._parseString()))return this._emitError(new Error("Packet too short"));if(u.clientId=t,s.will){if(null===(r=this._parseString()))return this._emitError(new Error("Cannot parse will topic"));if(u.will.topic=r,null===(n=this._parseBuffer()))return this._emitError(new Error("Cannot parse will payload"));u.will.payload=n}if(s.username){if(null===(o=this._parseString()))return this._emitError(new Error("Cannot parse username"));u.username=o}if(s.password){if(null===(i=this._parseBuffer()))return this._emitError(new Error("Cannot parse password"));u.password=i}return u},u.prototype._parseConnack=function(){var e=this.packet;return this._list.length<2?null:(e.sessionPresent=!!(this._list.readUInt8(this._pos++)&a.SESSIONPRESENT_MASK),e.returnCode=this._list.readUInt8(this._pos),-1===e.returnCode?this._emitError(new Error("Cannot parse return code")):void 0)},u.prototype._parsePublish=function(){var e=this.packet;if(e.topic=this._parseString(),null===e.topic)return this._emitError(new Error("Cannot parse topic"));e.qos>0&&!this._parseMessageId()||(e.payload=this._list.slice(this._pos,e.length))},u.prototype._parseSubscribe=function(){var e,t,r=this.packet;if(1!==r.qos)return this._emitError(new Error("Wrong subscribe header"));if(r.subscriptions=[],this._parseMessageId())for(;this._pos=r.length)return this._emitError(new Error("Malformed Subscribe Payload"));t=this._list.readUInt8(this._pos++),r.subscriptions.push({topic:e,qos:t})}},u.prototype._parseSuback=function(){if(this.packet.granted=[],this._parseMessageId())for(;this._posthis._list.length||n>this.packet.length?null:(t=this._list.toString("utf8",this._pos,n),this._pos+=r,t)},u.prototype._parseBuffer=function(){var e,t=this._parseNum(),r=t+this._pos;return-1===t||r>this._list.length||r>this.packet.length?null:(e=this._list.slice(this._pos,r),this._pos+=t,e)},u.prototype._parseNum=function(){if(this._list.length-this._pos<2)return-1;var e=this._list.readUInt16BE(this._pos);return this._pos+=2,e},u.prototype._newPacket=function(){return this.packet&&(this._list.consume(this.packet.length),this.emit("packet",this.packet)),this.packet=new s,!0},u.prototype._emitError=function(e){this.error=e,this.emit("error",e)},e.exports=u},function(e,t,r){var n=r(222),i=r(36),o=r(14).Buffer;function s(e){if(!(this instanceof s))return new s(e);if(this._bufs=[],this.length=0,"function"==typeof e){this._callback=e;var t=function(e){this._callback&&(this._callback(e),this._callback=null)}.bind(this);this.on("pipe",(function(e){e.on("error",t)})),this.on("unpipe",(function(e){e.removeListener("error",t)}))}else this.append(e);n.call(this)}i.inherits(s,n),s.prototype._offset=function(e){var t,r=0,n=0;if(0===e)return[0,0];for(;nthis.length)&&(n=this.length),r>=this.length)return e||o.alloc(0);if(n<=0)return e||o.alloc(0);var i,s,a=!!e,u=this._offset(r),c=n-r,l=c,f=a&&t||0,h=u[1];if(0===r&&n==this.length){if(!a)return 1===this._bufs.length?this._bufs[0]:o.concat(this._bufs,this.length);for(s=0;s(i=this._bufs[s].length-h))){this._bufs[s].copy(e,f,h,h+l);break}this._bufs[s].copy(e,f,h),f+=i,l-=i,h&&(h=0)}return e},s.prototype.shallowSlice=function(e,t){e=e||0,t=t||this.length,e<0&&(e+=this.length),t<0&&(t+=this.length);var r=this._offset(e),n=this._offset(t),i=this._bufs.slice(r[0],n[0]+1);return 0==n[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,n[1]),0!=r[1]&&(i[0]=i[0].slice(r[1])),new s(i)},s.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)},s.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},s.prototype.duplicate=function(){for(var e=0,t=new s;e>8,0),t.writeUInt8(255&e,1),t}e.exports={cache:i,generateCache:function(){for(var e=0;e<65536;e++)i[e]=o(e)},generateNumber:o}},function(e,t,r){"use strict";function n(e,t,r){var n=this;this._callback=e,this._args=r,this._interval=setInterval(e,t,this._args),this.reschedule=function(e){e||(e=n._interval),n._interval&&clearInterval(n._interval),n._interval=setInterval(n._callback,e,n._args)},this.clear=function(){n._interval&&(clearInterval(n._interval),n._interval=void 0)},this.destroy=function(){n._interval&&clearInterval(n._interval),n._callback=void 0,n._interval=void 0,n._args=void 0}}e.exports=function(){if("function"!=typeof arguments[0])throw new Error("callback needed");if("number"!=typeof arguments[1])throw new Error("interval needed");var e;if(arguments.length>0){e=new Array(arguments.length-2);for(var t=0;t= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,d=String.fromCharCode;function y(e){throw RangeError(h[e])}function m(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function v(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+m((e=e.replace(f,".")).split("."),t).join(".")}function g(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=d((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=d(e)})).join("")}function _(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function w(e,t,r){var n=0;for(e=r?p(e/700):e>>1,e+=p(e/t);e>455;n+=36)e=p(e/35);return p(n+36*e/(e+38))}function S(e){var t,r,n,i,o,s,a,c,l,f,h,d=[],m=e.length,v=0,g=128,_=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&y("not-basic"),d.push(e.charCodeAt(n));for(i=r>0?r+1:0;i=m&&y("invalid-input"),((c=(h=e.charCodeAt(i++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36)>=36||c>p((u-v)/s))&&y("overflow"),v+=c*s,!(c<(l=a<=_?1:a>=_+26?26:a-_));a+=36)s>p(u/(f=36-l))&&y("overflow"),s*=f;_=w(v-o,t=d.length+1,0==o),p(v/t)>u-g&&y("overflow"),g+=p(v/t),v%=t,d.splice(v++,0,g)}return b(d)}function E(e){var t,r,n,i,o,s,a,c,l,f,h,m,v,b,S,E=[];for(m=(e=g(e)).length,t=128,r=0,o=72,s=0;s=t&&hp((u-r)/(v=n+1))&&y("overflow"),r+=(a-t)*v,t=a,s=0;su&&y("overflow"),h==t){for(c=r,l=36;!(c<(f=l<=o?1:l>=o+26?26:l-o));l+=36)S=c-f,b=36-f,E.push(d(_(f+S%b,0))),c=p(S/b);E.push(d(_(c,0))),o=w(r,v,n==i),r=0,++n}++r,++t}return E.join("")}a={version:"1.3.2",ucs2:{decode:g,encode:b},decode:S,encode:E,toASCII:function(e){return v(e,(function(e){return l.test(e)?"xn--"+E(e):e}))},toUnicode:function(e){return v(e,(function(e){return c.test(e)?S(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return a}.call(t,r,t,e))||(e.exports=i)}()}).call(this,r(229)(e),r(13))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,o){t=t||"&",r=r||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l=0?(f=y.substr(0,m),h=y.substr(m+1)):(f=y,h=""),p=decodeURIComponent(f),d=decodeURIComponent(h),n(s,p)?i(s[p])?s[p].push(d):s[p]=[s[p],d]:s[p]=d}return s};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?o(s(e),(function(s){var a=encodeURIComponent(n(s))+r;return i(e[s])?o(e[s],(function(e){return a+encodeURIComponent(n(e))})).join(t):a+encodeURIComponent(n(e[s]))})).join(t):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n>>2]|=e[i]<<24-i%4*8;t.call(this,n,r)}else t.apply(this,arguments)}).prototype=e}}(),n.lib.WordArray)},function(e,t,r){var n;e.exports=(n=r(4),function(){var e=n,t=e.lib.WordArray,r=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}r.Utf16=r.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var r=e.length,n=[],i=0;i>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(n,2*r)}},r.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(s))}return n.join("")},parse:function(e){for(var r=e.length,n=[],o=0;o>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return t.create(n,2*r)}}}(),n.enc.Utf16)},function(e,t,r){var n,i,o,s,a,u;e.exports=(u=r(4),r(110),i=(n=u).lib.WordArray,o=n.algo,s=o.SHA256,a=o.SHA224=s.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=s._doFinalize.call(this);return e.sigBytes-=4,e}}),n.SHA224=s._createHelper(a),n.HmacSHA224=s._createHmacHelper(a),u.SHA224)},function(e,t,r){var n,i,o,s,a,u,c,l;e.exports=(l=r(4),r(46),r(111),i=(n=l).x64,o=i.Word,s=i.WordArray,a=n.algo,u=a.SHA512,c=a.SHA384=u.extend({_doReset:function(){this._hash=new s.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var e=u._doFinalize.call(this);return e.sigBytes-=16,e}}),n.SHA384=u._createHelper(c),n.HmacSHA384=u._createHmacHelper(c),l.SHA384)},function(e,t,r){var n;e.exports=(n=r(4),r(46),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.x64.Word,a=t.algo,u=[],c=[],l=[];!function(){for(var e=1,t=0,r=0;r<24;r++){u[e+5*t]=(r+1)*(r+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var a=0,f=0,h=0;h<7;h++){if(1&i){var p=(1<>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(x=r[i]).high^=s,x.low^=o}for(var a=0;a<24;a++){for(var h=0;h<5;h++){for(var p=0,d=0,y=0;y<5;y++)p^=(x=r[h+5*y]).high,d^=x.low;var m=f[h];m.high=p,m.low=d}for(h=0;h<5;h++){var v=f[(h+4)%5],g=f[(h+1)%5],b=g.high,_=g.low;for(p=v.high^(b<<1|_>>>31),d=v.low^(_<<1|b>>>31),y=0;y<5;y++)(x=r[h+5*y]).high^=p,x.low^=d}for(var w=1;w<25;w++){var S=(x=r[w]).high,E=x.low,I=u[w];I<32?(p=S<>>32-I,d=E<>>32-I):(p=E<>>64-I,d=S<>>64-I);var A=f[c[w]];A.high=p,A.low=d}var k=f[0],C=r[0];for(k.high=C.high,k.low=C.low,h=0;h<5;h++)for(y=0;y<5;y++){var x=r[w=h+5*y],T=f[w],R=f[(h+1)%5+5*y],O=f[(h+2)%5+5*y];x.high=T.high^~R.high&O.high,x.low=T.low^~R.low&O.low}x=r[0];var P=l[a];x.high^=P.high,x.low^=P.low}},_doFinalize:function(){var t=this._data,r=t.words,n=(this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(e.ceil((n+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,u=a/8,c=[],l=0;l>>24)|4278255360&(h<<24|h>>>8),p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),c.push(p),c.push(h)}return new i.init(c,a)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});t.SHA3=o._createHelper(h),t.HmacSHA3=o._createHmacHelper(h)}(Math),n.SHA3)},function(e,t,r){var n;e.exports=(n=r(4),
+/** @preserve
+ (c) 2012 by Cédric Mesnil. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.algo,a=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=i.create([0,1518500249,1859775393,2400959708,2840853838]),h=i.create([1352829926,1548603684,1836072691,2053994217,0]),p=s.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,s,p,_,w,S,E,I,A,k,C,x=this._hash.words,T=f.words,R=h.words,O=a.words,P=u.words,N=c.words,L=l.words;for(S=o=x[0],E=s=x[1],I=p=x[2],A=_=x[3],k=w=x[4],r=0;r<80;r+=1)C=o+e[t+O[r]]|0,C+=r<16?d(s,p,_)+T[0]:r<32?y(s,p,_)+T[1]:r<48?m(s,p,_)+T[2]:r<64?v(s,p,_)+T[3]:g(s,p,_)+T[4],C=(C=b(C|=0,N[r]))+w|0,o=w,w=_,_=b(p,10),p=s,s=C,C=S+e[t+P[r]]|0,C+=r<16?g(E,I,A)+R[0]:r<32?v(E,I,A)+R[1]:r<48?m(E,I,A)+R[2]:r<64?y(E,I,A)+R[3]:d(E,I,A)+R[4],C=(C=b(C|=0,L[r]))+k|0,S=k,k=A,A=b(I,10),I=E,E=C;C=x[1]+p+A|0,x[1]=x[2]+_+k|0,x[2]=x[3]+w+S|0,x[3]=x[4]+o+E|0,x[4]=x[0]+s+I|0,x[0]=C},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,s=0;s<5;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return i},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function d(e,t,r){return e^t^r}function y(e,t,r){return e&t|~e&r}function m(e,t,r){return(e|~t)^r}function v(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function b(e,t){return e<>>32-t}t.RIPEMD160=o._createHelper(p),t.HmacRIPEMD160=o._createHmacHelper(p)}(Math),n.RIPEMD160)},function(e,t,r){var n,i,o,s,a,u,c,l,f;e.exports=(f=r(4),r(66),r(67),i=(n=f).lib,o=i.Base,s=i.WordArray,a=n.algo,u=a.SHA1,c=a.HMAC,l=a.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=c.create(r.hasher,e),i=s.create(),o=s.create([1]),a=i.words,u=o.words,l=r.keySize,f=r.iterations;a.length>24&255)){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}var r=e.Encryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),function(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}(s);var a=s.slice(0);n.encryptBlock(a,0);for(var u=0;u>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Ansix923)},function(e,t,r){var n;e.exports=(n=r(4),r(9),n.pad.Iso10126={pad:function(e,t){var r=4*t,i=r-e.sigBytes%r;e.concat(n.lib.WordArray.random(i-1)).concat(n.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Iso10126)},function(e,t,r){var n;e.exports=(n=r(4),r(9),n.pad.Iso97971={pad:function(e,t){e.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(e,t)},unpad:function(e){n.pad.ZeroPadding.unpad(e),e.sigBytes--}},n.pad.Iso97971)},function(e,t,r){var n;e.exports=(n=r(4),r(9),n.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){for(var t=e.words,r=e.sigBytes-1;!(t[r>>>2]>>>24-r%4*8&255);)r--;e.sigBytes=r+1}},n.pad.ZeroPadding)},function(e,t,r){var n;e.exports=(n=r(4),r(9),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},function(e,t,r){var n,i,o,s;e.exports=(s=r(4),r(9),i=(n=s).lib.CipherParams,o=n.enc.Hex,n.format.Hex={stringify:function(e){return e.ciphertext.toString(o)},parse:function(e){var t=o.parse(e);return i.create({ciphertext:t})}},s.format.Hex)},function(e,t,r){var n;e.exports=(n=r(4),r(30),r(31),r(32),r(9),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],o=[],s=[],a=[],u=[],c=[],l=[],f=[],h=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var d=n^n<<1^n<<2^n<<3^n<<4;d=d>>>8^255&d^99,i[r]=d,o[d]=r;var y=e[r],m=e[y],v=e[m],g=257*e[d]^16843008*d;s[r]=g<<24|g>>>8,a[r]=g<<16|g>>>16,u[r]=g<<8|g>>>24,c[r]=g,g=16843009*v^65537*m^257*y^16843008*r,l[d]=g<<24|g>>>8,f[d]=g<<16|g>>>16,h[d]=g<<8|g>>>24,p[d]=g,r?(r=y^e[e[e[v^y]]],n^=e[e[n]]):r=n=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],y=r.AES=t.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],s=0;s6&&s%r==4&&(a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a]):(a=i[(a=a<<8|a>>>24)>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a],a^=d[s/r|0]<<24),o[s]=o[s-r]^a}for(var u=this._invKeySchedule=[],c=0;c>>24]]^f[i[a>>>16&255]]^h[i[a>>>8&255]]^p[i[255&a]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,u,c,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,f,h,p,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,s,a){for(var u=this._nRounds,c=e[t]^r[0],l=e[t+1]^r[1],f=e[t+2]^r[2],h=e[t+3]^r[3],p=4,d=1;d>>24]^i[l>>>16&255]^o[f>>>8&255]^s[255&h]^r[p++],m=n[l>>>24]^i[f>>>16&255]^o[h>>>8&255]^s[255&c]^r[p++],v=n[f>>>24]^i[h>>>16&255]^o[c>>>8&255]^s[255&l]^r[p++],g=n[h>>>24]^i[c>>>16&255]^o[l>>>8&255]^s[255&f]^r[p++];c=y,l=m,f=v,h=g}y=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&h])^r[p++],m=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[h>>>8&255]<<8|a[255&c])^r[p++],v=(a[f>>>24]<<24|a[h>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^r[p++],g=(a[h>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^r[p++],e[t]=y,e[t+1]=m,e[t+2]=v,e[t+3]=g},keySize:8});e.AES=t._createHelper(y)}(),n.AES)},function(e,t,r){var n;e.exports=(n=r(4),r(30),r(31),r(32),r(9),function(){var e=n,t=e.lib,r=t.WordArray,i=t.BlockCipher,o=e.algo,s=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=s[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var c=i[o]=[],l=u[o];for(r=0;r<24;r++)c[r/6|0]|=t[(a[r]-1+l)%28]<<31-r%6,c[4+(r/6|0)]|=t[28+(a[r+24]-1+l)%28]<<31-r%6;for(c[0]=c[0]<<1|c[0]>>>31,r=1;r<7;r++)c[r]=c[r]>>>4*(r-1)+3;c[7]=c[7]<<5|c[7]>>>27}var f=this._invSubKeys=[];for(r=0;r<16;r++)f[r]=i[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),h.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],o=this._lBlock,s=this._rBlock,a=0,u=0;u<8;u++)a|=c[u][((s^i[u])&l[u])>>>0];this._lBlock=s,this._rBlock=o^a}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,h.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<>>2]>>>24-s%4*8&255;o=(o+n[i]+a)%256;var u=n[i];n[i]=n[o],n[o]=u}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[r],e[r]=o,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}e.RC4=t._createHelper(i);var s=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(s)}(),n.RC4)},function(e,t,r){var n;e.exports=(n=r(4),r(30),r(31),r(32),r(9),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],o=[],s=[],a=r.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)u.call(this);for(r=0;r<8;r++)i[r]^=n[r+4&7];if(t){var o=t.words,s=o[0],a=o[1],c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),f=c>>>16|4294901760&l,h=l<<16|65535&c;for(i[0]^=c,i[1]^=f,i[2]^=l,i[3]^=h,i[4]^=c,i[5]^=f,i[6]^=l,i[7]^=h,r=0;r<4;r++)u.call(this)}},_doProcessBlock:function(e,t){var r=this._X;u.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,a=n>>>16,u=((i*i>>>17)+i*a>>>15)+a*a,c=((4294901760&n)*n|0)+((65535&n)*n|0);s[r]=u^c}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.Rabbit=t._createHelper(a)}(),n.Rabbit)},function(e,t,r){var n;e.exports=(n=r(4),r(30),r(31),r(32),r(9),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],o=[],s=[],a=r.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)u.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(t){var o=t.words,s=o[0],a=o[1],c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),f=c>>>16|4294901760&l,h=l<<16|65535&c;for(n[0]^=c,n[1]^=f,n[2]^=l,n[3]^=h,n[4]^=c,n[5]^=f,n[6]^=l,n[7]^=h,i=0;i<4;i++)u.call(this)}},_doProcessBlock:function(e,t){var r=this._X;u.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,a=n>>>16,u=((i*i>>>17)+i*a>>>15)+a*a,c=((4294901760&n)*n|0)+((65535&n)*n|0);s[r]=u^c}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.RabbitLegacy=t._createHelper(a)}(),n.RabbitLegacy)},function(e,t){e.exports={INVALID_CONNECT_OPTIONS:"Invalid connect options supplied.",INVALID_CLIENT_ID_OPTION:'Invalid "clientId" (mqtt client id) option supplied.',INVALID_RECONNECT_TIMING:"Invalid reconnect timing options supplied.",INVALID_OFFLINE_QUEUEING_PARAMETERS:"Invalid offline queueing options supplied."}},function(e,t,r){(function(t){var n=r(68),i=r(47),o=r(264);e.exports=function(e){if(i(e.keyPath)&&i(e.privateKey))throw new Error(o.NO_KEY_OPTION);if(i(e.certPath)&&i(e.clientCert))throw new Error(o.NO_CERT_OPTION);if(i(e.caPath)&&i(e.caCert))throw new Error(o.NO_CA_OPTION);if(!i(e.caCert))if(t.isBuffer(e.caCert))e.ca=e.caCert;else{if(!n.existsSync(e.caCert))throw new Error(o.INVALID_CA_CERT_OPTION);e.ca=n.readFileSync(e.caCert)}if(!i(e.privateKey))if(t.isBuffer(e.privateKey))e.key=e.privateKey;else{if(!n.existsSync(e.privateKey))throw new Error(o.INVALID_PRIVATE_KEY_OPTION);e.key=n.readFileSync(e.privateKey)}if(!i(e.clientCert))if(t.isBuffer(e.clientCert))e.cert=e.clientCert;else{if(!n.existsSync(e.clientCert))throw new Error(o.INVALID_CLIENT_CERT_OPTION);e.cert=n.readFileSync(e.clientCert)}if(n.existsSync(e.keyPath))e.key=n.readFileSync(e.keyPath);else if(!i(e.keyPath))throw new Error(o.INVALID_KEY_PATH_OPTION);if(n.existsSync(e.certPath))e.cert=n.readFileSync(e.certPath);else if(!i(e.certPath))throw new Error(o.INVALID_CERT_PATH_OPTION);if(n.existsSync(e.caPath))e.ca=n.readFileSync(e.caPath);else if(!i(e.caPath))throw new Error(o.INVALID_CA_PATH_OPTION);e.requestCert=!0,e.rejectUnauthorized=!0}}).call(this,r(15).Buffer)},function(e,t){e.exports={NO_KEY_OPTION:'No "keyPath" or "privateKey" option supplied.',NO_CERT_OPTION:'No "certPath" or "clientCert" option supplied.',NO_CA_OPTION:'No "caPath" or "caCert" option supplied.',INVALID_KEY_PATH_OPTION:'Invalid "keyPath" option supplied.',INVALID_CERT_PATH_OPTION:'Invalid "certPath" option supplied.',INVALID_CA_PATH_OPTION:'Invalid "caPath" option supplied.',INVALID_CLIENT_CERT_OPTION:'Invalid "clientCert" option supplied.',INVALID_PRIVATE_KEY_OPTION:'Invalid "privateKey" option supplied.',INVALID_CA_CERT_OPTION:'Invalid "caCert" option supplied.'}},function(e,t,r){(function(e){function r(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n=-1&&!i;o--){var s=o>=0?arguments[o]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,i="/"===s.charAt(0))}return(i?"/":"")+(t=r(n(t.split("/"),(function(e){return!!e})),!i).join("/"))||"."},t.normalize=function(e){var o=t.isAbsolute(e),s="/"===i(e,-1);return(e=r(n(e.split("/"),(function(e){return!!e})),!o).join("/"))||o||(e="."),e&&s&&(e+="/"),(o?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(n(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,r){function n(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var i=n(e.split("/")),o=n(r.split("/")),s=Math.min(i.length,o.length),a=s,u=0;u=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){n=o;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"/":e.slice(0,n)},t.basename=function(e,t){var r=function(e){"string"!=typeof e&&(e+="");var t,r=0,n=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){r=t+1;break}}else-1===n&&(i=!1,n=t+1);return-1===n?"":e.slice(r,n)}(e);return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,r=0,n=-1,i=!0,o=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===n&&(i=!1,n=s+1),46===a?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){r=s+1;break}}return-1===t||-1===n||0===o||1===o&&t===n-1&&t===r+1?"":e.slice(t,n)};var i="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,r(6))},function(e){e.exports=JSON.parse('{"_from":"aws-iot-device-sdk@^2.2.1","_id":"aws-iot-device-sdk@2.2.4","_inBundle":false,"_integrity":"sha512-DgNVTPQMVHxC1o6SENWDjio2Ku8gz70XPi5CoS31Q4ndWpx3zwq3QKBvGdRm02SF4Xb4ft5cd9tXQCeIjgkqlQ==","_location":"/aws-iot-device-sdk","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"aws-iot-device-sdk@^2.2.1","name":"aws-iot-device-sdk","escapedName":"aws-iot-device-sdk","rawSpec":"^2.2.1","saveSpec":null,"fetchSpec":"^2.2.1"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/aws-iot-device-sdk/-/aws-iot-device-sdk-2.2.4.tgz","_shasum":"ce21632833e72ee1d6051c425ce8b4822069bf05","_spec":"aws-iot-device-sdk@^2.2.1","_where":"/opt/lampp/htdocs/channelize-js-sdk/channelize-websdk","author":{"name":"Amazon Web Services","url":"http://aws.amazon.com"},"bugs":{"url":"http://github.com/aws/aws-iot-device-sdk-js/issues"},"bundleDependencies":false,"dependencies":{"crypto-js":"3.1.6","minimist":"1.2.5","mqtt":"2.18.8","websocket-stream":"^5.0.1"},"deprecated":false,"description":"AWS IoT Node.js SDK for Embedded Devices","devDependencies":{"gulp":"^3.9.0","gulp-beautify":"^2.0.0","gulp-concat":"^2.6.0","gulp-coverage":"^0.3.38","gulp-jscs":"^4.0.0","gulp-jshint":"^2.0.0","gulp-mocha":"^3.0.1","jshint":"^2.9.1","jshint-stylish":"^2.2.1","rewire":"^2.5.1","sinon":"^1.17.3"},"engines":{"node":">=4.0.0"},"homepage":"https://github.com/aws/aws-iot-device-sdk-js","keywords":["api","amazon","aws","iot","mqtt"],"license":"Apache-2.0","main":"index.js","name":"aws-iot-device-sdk","repository":{"type":"git","url":"git://github.com/aws/aws-iot-device-sdk-js.git"},"scripts":{"beautify":"node ./node_modules/gulp/bin/gulp.js beautify","browserize":"./scripts/browserize.sh","test":"node ./node_modules/gulp/bin/gulp.js test --verbose"},"version":"2.2.4"}')},function(e,t,r){var n=r(68);e.exports=function(e,t){var r;function i(t){e.emit("error",t),r.end()}return(r=n.connect(t)).on("secureConnect",(function(){r.authorized?r.removeListener("error",i):r.emit("error",new Error("TLS not authorized"))})),r.on("error",i),r}},function(e,t,r){const n=r(65);e.exports=function(e,t){return n(t.url,["mqttv3.1"],t.websocketOptions)}},function(e,t,r){var n=r(19),i=r(36).inherits,o=r(58),s=r(47);function a(e,t,r){return s(r)?"$aws/things/"+e+"/shadow/"+t:"$aws/things/"+e+"/shadow/"+t+"/"+r}function u(e){return"$aws/things/"===e.substring(0,12)}function c(e,t){if(!(this instanceof c))return new c(e,t);var r=this,i=[{}],l=0,f=1e4,h=!0,p=o.DeviceClient(e);s(t)||s(t.operationTimeout)||(f=t.operationTimeout),this._handleSubscriptions=function(e,t,r,n){for(var o=[],u=0,c=t.length;u0)return void n("Not all subscriptions were granted",r);n()}}))):s(n)||y.push(n),p[r].apply(p,y)},this._handleMessages=function(t,r,n,o){var a={};try{a=JSON.parse(o.toString())}catch(t){return void(!0===e.debug&&console.error("failed parsing JSON '"+o.toString()+"', "+t))}var u=a.clientToken,c=a.version;if(delete a.clientToken,!s(c)&&"rejected"!==n)if(s(i[t].version)||c>=i[t].version)i[t].version=c;else if("delete"!==r&&!0===i[t].discardStale)return void(!0===e.debug&&console.warn("out-of-date version '"+c+"' on '"+t+"' (local version '"+i[t].version+"')"));"delta"!==n?s(i[t].clientToken)||i[t].clientToken!==u?"accepted"===n&&"get"!==r&&this.emit("foreignStateChange",t,r,a):(clearTimeout(i[t].timeout),delete i[t].timeout,delete i[t].clientToken,i[t].pending=!1,!1===i[t].persistentSubscribe&&this._handleSubscriptions(t,[{operations:[r],statii:["accepted","rejected"]}],"unsubscribe"),this.emit("status",t,n,u,a)):this.emit("delta",t,a)},p.on("connect",(function(){r.emit("connect")})),p.on("close",(function(){r.emit("close")})),p.on("reconnect",(function(){r.emit("reconnect")})),p.on("offline",(function(){r.emit("offline")})),p.on("error",(function(e){r.emit("error",e)})),p.on("packetsend",(function(e){r.emit("packetsend",e)})),p.on("packetreceive",(function(e){r.emit("packetreceive",e)})),p.on("message",(function(e,t){if(!0===h){var n=e.split("/");!function(e,t){var r=!1;return"$aws"===e[0]&&("things"!==e[1]||"shadow"!==e[3]||"update"!==e[4]&&"get"!==e[4]&&"delete"!==e[4]||("subscribe"===t?"accepted"!==e[5]&&"rejected"!==e[5]&&"delta"!==e[5]||6!==e.length||(r=!0):5===e.length&&(r=!0))),r}(n,"subscribe")?r.emit("message",e,t):i.hasOwnProperty(n[2])&&r._handleMessages(n[2],n[4],n[5],t)}})),this._thingOperation=function(t,n,o){var u=null;if(i.hasOwnProperty(t))if(!1===i[t].pending){var c;if(i[t].pending=!0,s(o.clientToken)){var h=e.clientId.length;c=h>48?e.clientId.substr(h-48)+"-"+l++:e.clientId+"-"+l++}else c=o.clientToken;i[t].clientToken=c;var d=a(t,n);i[t].timeout=setTimeout((function(e,t){!1===i[e].persistentSubscribe&&r._handleSubscriptions(e,[{operations:[n],statii:["accepted","rejected"]}],"unsubscribe"),i[e].pending=!1,delete i[e].timeout,delete i[e].clientToken,r.emit("timeout",e,t)}),f,t,c),!1===i[t].persistentSubscribe?this._handleSubscriptions(t,[{operations:[n],statii:["accepted","rejected"]}],"subscribe",(function(e,r){s(e)&&s(r)?s(o)||(!s(i[t].version)&&i[t].enableVersioning&&(o.version=i[t].version),o.clientToken=c,p.publish(d,JSON.stringify(o),{qos:i[t].qos}),s(i[t])||!0!==i[t].debug||console.log("publishing '"+JSON.stringify(o)+" on '"+d+"'")):console.warn("failed subscription to accepted/rejected topics")})):(!s(i[t].version)&&i[t].enableVersioning&&(o.version=i[t].version),o.clientToken=c,p.publish(d,JSON.stringify(o),{qos:i[t].qos}),!0===i[t].debug&&console.log("publishing '"+JSON.stringify(o)+" on '"+d+"'")),u=c}else!0===e.debug&&console.error(n+" still in progress on thing: ",t);else!0===e.debug&&console.error("attempting to "+n+" unknown thing: ",t);return u},this.register=function(t,r,n){if(i.hasOwnProperty(t))!0===e.debug&&console.error("thing already registered: ",t);else{var o=!1,a=[];i[t]={persistentSubscribe:!0,debug:!1,discardStale:!0,enableVersioning:!0,qos:0,pending:!0},"function"==typeof r&&(n=r,r=null),s(r)||(s(r.ignoreDeltas)||(o=r.ignoreDeltas),s(r.persistentSubscribe)||(i[t].persistentSubscribe=r.persistentSubscribe),s(r.debug)||(i[t].debug=r.debug),s(r.discardStale)||(i[t].discardStale=r.discardStale),s(r.enableVersioning)||(i[t].enableVersioning=r.enableVersioning),s(r.qos)||(i[t].qos=r.qos)),!1===o&&a.push({operations:["update"],statii:["delta"]}),!0===i[t].persistentSubscribe&&a.push({operations:["update","get","delete"],statii:["accepted","rejected"]}),a.length>0?this._handleSubscriptions(t,a,"subscribe",(function(e,r){s(e)&&s(r)&&(i[t].pending=!1),s(n)||n(e,r)})):(i[t].pending=!1,s(n)||n())}},this.unregister=function(t){if(i.hasOwnProperty(t)){var r=[];r.push({operations:["update"],statii:["delta"]}),!0===i[t].persistentSubscribe&&r.push({operations:["update","get","delete"],statii:["accepted","rejected"]}),this._handleSubscriptions(t,r,"unsubscribe"),s(i[t].timeout)||clearTimeout(i[t].timeout),delete i[t]}else!0===e.debug&&console.error("attempting to unregister unknown thing: ",t)},this.update=function(e,t){var n=null;return s(t.version)?n=r._thingOperation(e,"update",t):console.error("message can't contain 'version' property"),n},this.get=function(e,t){var n={};return s(t)||(n.clientToken=t),r._thingOperation(e,"get",n)},this.delete=function(e,t){var n={};return s(t)||(n.clientToken=t),r._thingOperation(e,"delete",n)},this.publish=function(e,t,r,n){if(u(e))throw"cannot publish to reserved topic '"+e+"'";p.publish(e,t,r,n)},this.subscribe=function(e,t,r){var n=[];"string"==typeof e?n.push(e):"object"==typeof e&&e.length&&(n=e);for(var i=0;i0||n?o.toString():""},e.exports=s},function(e,t,r){var n=r(274).escapeAttribute;function i(e,t){void 0===t&&(t=[]),this.name=e,this.children=t,this.attributes={}}i.prototype.addAttribute=function(e,t){return this.attributes[e]=t,this},i.prototype.addChildNode=function(e){return this.children.push(e),this},i.prototype.removeAttribute=function(e){return delete this.attributes[e],this},i.prototype.toString=function(){for(var e=Boolean(this.children.length),t="<"+this.name,r=this.attributes,i=0,o=Object.keys(r);i"+this.children.map((function(e){return e.toString()})).join("")+""+this.name+">":"/>")},e.exports={XmlNode:i}},function(e,t){e.exports={escapeAttribute:function(e){return e.replace(/&/g,"&").replace(/'/g,"'").replace(//g,">").replace(/"/g,""")}}},function(e,t,r){var n=r(276).escapeElement;function i(e){this.value=e}i.prototype.toString=function(){return n(""+this.value)},e.exports={XmlText:i}},function(e,t){e.exports={escapeElement:function(e){return e.replace(/&/g,"&").replace(//g,">")}}},function(e,t){function r(e,t){if(!r.services.hasOwnProperty(e))throw new Error("InvalidService: Failed to load api for "+e);return r.services[e][t]}r.services={},e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(279),i=function(){function e(e){void 0===e&&(e=1e3),this.maxSize=e,this.cache=new n.LRUCache(e)}return Object.defineProperty(e.prototype,"size",{get:function(){return this.cache.length},enumerable:!0,configurable:!0}),e.prototype.put=function(t,r){var n="string"!=typeof t?e.getKeyString(t):t,i=this.populateValue(r);this.cache.put(n,i)},e.prototype.get=function(t){var r="string"!=typeof t?e.getKeyString(t):t,n=Date.now(),i=this.cache.get(r);if(i)for(var o=0;o=0;i--)if("*"!==t[i][t[i].length-1]&&(r=t[i]),t[i].substr(0,10)<=e)return r;throw new Error("Could not find "+this.constructor.serviceIdentifier+" API to satisfy version constraint `"+e+"'")},api:{},defaultRetryCount:3,customizeRequests:function(e){if(e){if("function"!=typeof e)throw new Error("Invalid callback type '"+typeof e+"' provided in customizeRequests");this.customRequestHandler=e}else this.customRequestHandler=null},makeRequest:function(e,t,r){if("function"==typeof t&&(r=t,t=null),t=t||{},this.config.params){var i=this.api.operations[e];i&&(t=n.util.copy(t),n.util.each(this.config.params,(function(e,r){i.input.members[e]&&(void 0!==t[e]&&null!==t[e]||(t[e]=r))})))}var o=new n.Request(this,e,t);return this.addAllRequestListeners(o),this.attachMonitoringEmitter(o),r&&o.send(r),o},makeUnauthenticatedRequest:function(e,t,r){"function"==typeof t&&(r=t,t={});var n=this.makeRequest(e,t).toUnauthenticated();return r?n.send(r):n},waitFor:function(e,t,r){return new n.ResourceWaiter(this,e).wait(t,r)},addAllRequestListeners:function(e){for(var t=[n.events,n.EventListeners.Core,this.serviceInterface(),n.EventListeners.CorePost],r=0;r299?(i.code&&(r.FinalAwsException=i.code),i.message&&(r.FinalAwsExceptionMessage=i.message)):((i.code||i.name)&&(r.FinalSdkException=i.code||i.name),i.message&&(r.FinalSdkExceptionMessage=i.message))}return r},apiAttemptEvent:function(e){var t=e.service.api.operations[e.operation],r={Type:"ApiCallAttempt",Api:t?t.name:e.operation,Version:1,Service:e.service.api.serviceId||e.service.api.endpointPrefix,Fqdn:e.httpRequest.endpoint.hostname,UserAgent:e.httpRequest.getUserAgent()},n=e.response;return n.httpResponse.statusCode&&(r.HttpStatusCode=n.httpResponse.statusCode),!e._unAuthenticated&&e.service.config.credentials&&e.service.config.credentials.accessKeyId&&(r.AccessKey=e.service.config.credentials.accessKeyId),n.httpResponse.headers?(e.httpRequest.headers["x-amz-security-token"]&&(r.SessionToken=e.httpRequest.headers["x-amz-security-token"]),n.httpResponse.headers["x-amzn-requestid"]&&(r.XAmznRequestId=n.httpResponse.headers["x-amzn-requestid"]),n.httpResponse.headers["x-amz-request-id"]&&(r.XAmzRequestId=n.httpResponse.headers["x-amz-request-id"]),n.httpResponse.headers["x-amz-id-2"]&&(r.XAmzId2=n.httpResponse.headers["x-amz-id-2"]),r):r},attemptFailEvent:function(e){var t=this.apiAttemptEvent(e),r=e.response,n=r.error;return r.httpResponse.statusCode>299?(n.code&&(t.AwsException=n.code),n.message&&(t.AwsExceptionMessage=n.message)):((n.code||n.name)&&(t.SdkException=n.code||n.name),n.message&&(t.SdkExceptionMessage=n.message)),t},attachMonitoringEmitter:function(e){var t,r,i,o,s,a,u=0,c=this;e.on("validate",(function(){o=n.util.realClock.now(),a=Date.now()}),!0),e.on("sign",(function(){r=n.util.realClock.now(),t=Date.now(),s=e.httpRequest.region,u++}),!0),e.on("validateResponse",(function(){i=Math.round(n.util.realClock.now()-r)})),e.addNamedListener("API_CALL_ATTEMPT","success",(function(){var r=c.apiAttemptEvent(e);r.Timestamp=t,r.AttemptLatency=i>=0?i:0,r.Region=s,c.emit("apiCallAttempt",[r])})),e.addNamedListener("API_CALL_ATTEMPT_RETRY","retry",(function(){var o=c.attemptFailEvent(e);o.Timestamp=t,i=i||Math.round(n.util.realClock.now()-r),o.AttemptLatency=i>=0?i:0,o.Region=s,c.emit("apiCallAttempt",[o])})),e.addNamedListener("API_CALL","complete",(function(){var t=c.apiCallEvent(e);if(t.AttemptCount=u,!(t.AttemptCount<=0)){t.Timestamp=a;var r=Math.round(n.util.realClock.now()-o);t.Latency=r>=0?r:0;var i=e.response;i.error&&i.error.retryable&&"number"==typeof i.retryCount&&"number"==typeof i.maxRetries&&i.retryCount>=i.maxRetries&&(t.MaxRetriesExceeded=1),c.emit("apiCall",[t])}}))},setupRequestListeners:function(e){},getSignerClass:function(e){var t,r=null,i="";e&&(i=(r=(e.service.api.operations||{})[e.operation]||null)?r.authtype:"");return t=this.config.signatureVersion?this.config.signatureVersion:"v4"===i||"v4-unsigned-body"===i?"v4":this.api.signatureVersion,n.Signers.RequestSigner.getVersion(t)},serviceInterface:function(){switch(this.api.protocol){case"ec2":case"query":return n.EventListeners.Query;case"json":return n.EventListeners.Json;case"rest-json":return n.EventListeners.RestJson;case"rest-xml":return n.EventListeners.RestXml}if(this.api.protocol)throw new Error("Invalid service `protocol' "+this.api.protocol+" in API config")},successfulResponse:function(e){return e.httpResponse.statusCode<300},numRetries:function(){return void 0!==this.config.maxRetries?this.config.maxRetries:this.defaultRetryCount},retryDelays:function(e,t){return n.util.calculateRetryDelay(e,this.config.retryDelayOptions,t)},retryableError:function(e){return!!this.timeoutError(e)||(!!this.networkingError(e)||(!!this.expiredCredentialsError(e)||(!!this.throttledError(e)||e.statusCode>=500)))},networkingError:function(e){return"NetworkingError"===e.code},timeoutError:function(e){return"TimeoutError"===e.code},expiredCredentialsError:function(e){return"ExpiredTokenException"===e.code},clockSkewError:function(e){switch(e.code){case"RequestTimeTooSkewed":case"RequestExpired":case"InvalidSignatureException":case"SignatureDoesNotMatch":case"AuthFailure":case"RequestInTheFuture":return!0;default:return!1}},getSkewCorrectedDate:function(){return new Date(Date.now()+this.config.systemClockOffset)},applyClockOffset:function(e){e&&(this.config.systemClockOffset=e-Date.now())},isClockSkewed:function(e){if(e)return Math.abs(this.getSkewCorrectedDate().getTime()-e)>=3e5},throttledError:function(e){if(429===e.statusCode)return!0;switch(e.code){case"ProvisionedThroughputExceededException":case"Throttling":case"ThrottlingException":case"RequestLimitExceeded":case"RequestThrottled":case"RequestThrottledException":case"TooManyRequestsException":case"TransactionInProgressException":case"EC2ThrottledException":return!0;default:return!1}},endpointFromTemplate:function(e){if("string"!=typeof e)return e;var t=e;return t=(t=(t=t.replace(/\{service\}/g,this.api.endpointPrefix)).replace(/\{region\}/g,this.config.region)).replace(/\{scheme\}/g,this.config.sslEnabled?"https":"http")},setEndpoint:function(e){this.endpoint=new n.Endpoint(e,this.config)},paginationConfig:function(e,t){var r=this.api.operations[e].paginator;if(!r){if(t){var i=new Error;throw n.util.error(i,"No pagination configuration for "+e)}return null}return r}}),n.util.update(n.Service,{defineMethods:function(e){n.util.each(e.prototype.api.operations,(function(t){e.prototype[t]||("none"===e.prototype.api.operations[t].authtype?e.prototype[t]=function(e,r){return this.makeUnauthenticatedRequest(t,e,r)}:e.prototype[t]=function(e,r){return this.makeRequest(t,e,r)})}))},defineService:function(e,t,r){n.Service._serviceMap[e]=!0,Array.isArray(t)||(r=t,t=[]);var i=s(n.Service,r||{});if("string"==typeof e){n.Service.addVersions(i,t);var o=i.serviceIdentifier||e;i.serviceIdentifier=o}else i.prototype.api=e,n.Service.defineMethods(i);if(n.SequentialExecutor.call(this.prototype),!this.prototype.publisher&&n.util.clientSideMonitoring){var a=n.util.clientSideMonitoring.Publisher,u=(0,n.util.clientSideMonitoring.configProvider)();this.prototype.publisher=new a(u),u.enabled&&(n.Service._clientSideMonitoring=!0)}return n.SequentialExecutor.call(i.prototype),n.Service.addDefaultMonitoringListeners(i.prototype),i},addVersions:function(e,t){Array.isArray(t)||(t=[t]),e.services=e.services||{};for(var r=0;r=0)return e.httpRequest.headers["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD",t();n.util.computeSha256(o,(function(r,n){r?t(r):(e.httpRequest.headers["X-Amz-Content-Sha256"]=n,t())}))}else t()}})),e("SET_CONTENT_LENGTH","afterBuild",(function(e){var t=function(e){if(!e.service.api.operations)return"";var t=e.service.api.operations[e.operation];return t?t.authtype:""}(e),r=n.util.getRequestPayloadShape(e);if(void 0===e.httpRequest.headers["Content-Length"])try{var i=n.util.string.byteLength(e.httpRequest.body);e.httpRequest.headers["Content-Length"]=i}catch(n){if(r&&r.isStreaming){if(r.requiresLength)throw n;if(t.indexOf("unsigned-body")>=0)return void(e.httpRequest.headers["Transfer-Encoding"]="chunked");throw n}throw n}})),e("SET_HTTP_HOST","afterBuild",(function(e){e.httpRequest.headers.Host=e.httpRequest.endpoint.host})),e("RESTART","restart",(function(){var e=this.response.error;e&&e.retryable&&(this.httpRequest=new n.HttpRequest(this.service.endpoint,this.service.region),this.response.retryCount=600?this.emit("sign",[this],(function(e){e?t(e):o()})):o()})),e("HTTP_HEADERS","httpHeaders",(function(e,t,r,i){r.httpResponse.statusCode=e,r.httpResponse.statusMessage=i,r.httpResponse.headers=t,r.httpResponse.body=n.util.buffer.toBuffer(""),r.httpResponse.buffers=[],r.httpResponse.numBytes=0;var o=t.date||t.Date,s=r.request.service;if(o){var a=Date.parse(o);s.config.correctClockSkew&&s.isClockSkewed(a)&&s.applyClockOffset(a)}})),e("HTTP_DATA","httpData",(function(e,t){if(e){if(n.util.isNode()){t.httpResponse.numBytes+=e.length;var r=t.httpResponse.headers["content-length"],i={loaded:t.httpResponse.numBytes,total:r};t.request.emit("httpDownloadProgress",[i,t])}t.httpResponse.buffers.push(n.util.buffer.toBuffer(e))}})),e("HTTP_DONE","httpDone",(function(e){if(e.httpResponse.buffers&&e.httpResponse.buffers.length>0){var t=n.util.buffer.concat(e.httpResponse.buffers);e.httpResponse.body=t}delete e.httpResponse.numBytes,delete e.httpResponse.buffers})),e("FINALIZE_ERROR","retry",(function(e){e.httpResponse.statusCode&&(e.error.statusCode=e.httpResponse.statusCode,void 0===e.error.retryable&&(e.error.retryable=this.service.retryableError(e.error,this)))})),e("INVALIDATE_CREDENTIALS","retry",(function(e){if(e.error)switch(e.error.code){case"RequestExpired":case"ExpiredTokenException":case"ExpiredToken":e.error.retryable=!0,e.request.service.config.credentials.expired=!0}})),e("EXPIRED_SIGNATURE","retry",(function(e){var t=e.error;t&&"string"==typeof t.code&&"string"==typeof t.message&&t.code.match(/Signature/)&&t.message.match(/expired/)&&(e.error.retryable=!0)})),e("CLOCK_SKEWED","retry",(function(e){e.error&&this.service.clockSkewError(e.error)&&this.service.config.correctClockSkew&&(e.error.retryable=!0)})),e("REDIRECT","retry",(function(e){e.error&&e.error.statusCode>=300&&e.error.statusCode<400&&e.httpResponse.headers.location&&(this.httpRequest.endpoint=new n.Endpoint(e.httpResponse.headers.location),this.httpRequest.headers.Host=this.httpRequest.endpoint.host,e.error.redirect=!0,e.error.retryable=!0)})),e("RETRY_CHECK","retry",(function(e){e.error&&(e.error.redirect&&e.redirectCount=0?(e.error=null,setTimeout(t,r)):t()}))})),CorePost:(new i).addNamedListeners((function(e){e("EXTRACT_REQUEST_ID","extractData",n.util.extractRequestId),e("EXTRACT_REQUEST_ID","extractError",n.util.extractRequestId),e("ENOTFOUND_ERROR","httpError",(function(e){if("NetworkingError"===e.code&&"ENOTFOUND"===e.errno){var t="Inaccessible host: `"+e.hostname+"'. This service may not be available in the `"+e.region+"' region.";this.response.error=n.util.error(new Error(t),{code:"UnknownEndpoint",region:e.region,hostname:e.hostname,retryable:!0,originalError:e})}}))})),Logger:(new i).addNamedListeners((function(e){e("LOG_REQUEST","complete",(function(e){var t=e.request,i=t.service.config.logger;if(i){var o=function(){var o=(e.request.service.getSkewCorrectedDate().getTime()-t.startTime.getTime())/1e3,s=!!i.isTTY,a=e.httpResponse.statusCode,u=t.params;t.service.api.operations&&t.service.api.operations[t.operation]&&t.service.api.operations[t.operation].input&&(u=function e(t,r){if(!r)return r;switch(t.type){case"structure":var i={};return n.util.each(r,(function(r,n){Object.prototype.hasOwnProperty.call(t.members,r)?i[r]=e(t.members[r],n):i[r]=n})),i;case"list":var o=[];return n.util.arrayEach(r,(function(r,n){o.push(e(t.member,r))})),o;case"map":var s={};return n.util.each(r,(function(r,n){s[r]=e(t.value,n)})),s;default:return t.isSensitive?"***SensitiveInformation***":r}}(t.service.api.operations[t.operation].input,t.params));var c=r(36).inspect(u,!0,null),l="";return s&&(l+="[33m"),l+="[AWS "+t.service.serviceIdentifier+" "+a,l+=" "+o.toString()+"s "+e.retryCount+" retries]",s&&(l+="[0;1m"),l+=" "+n.util.string.lowerFirst(t.operation),l+="("+c+")",s&&(l+="[0m"),l}();"function"==typeof i.log?i.log(o):"function"==typeof i.write&&i.write(o+"\n")}}))})),Json:(new i).addNamedListeners((function(e){var t=r(70);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)})),Rest:(new i).addNamedListeners((function(e){var t=r(48);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)})),RestJson:(new i).addNamedListeners((function(e){var t=r(114);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)})),RestXml:(new i).addNamedListeners((function(e){var t=r(115);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)})),Query:(new i).addNamedListeners((function(e){var t=r(112);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}))}},function(e,t,r){(function(t){var n=r(3),i=r(7),o=["AWS_ENABLE_ENDPOINT_DISCOVERY","AWS_ENDPOINT_DISCOVERY_ENABLED"];function s(e){var t=e.service,r=t.api||{},n=(r.operations,{});return t.config.region&&(n.region=t.config.region),r.serviceId&&(n.serviceId=r.serviceId),t.config.credentials.accessKeyId&&(n.accessKeyId=t.config.credentials.accessKeyId),n}function a(e,t){var r={};return function e(t,r,n){n&&null!=r&&"structure"===n.type&&n.required&&n.required.length>0&&i.arrayEach(n.required,(function(i){var o=n.members[i];if(!0===o.endpointDiscoveryId){var s=o.isLocationName?o.name:i;t[s]=String(r[i])}else e(t,r[i],o)}))}(r,e.params,t),r}function u(e){var t=e.service,r=t.api,o=r.operations?r.operations[e.operation]:void 0,u=a(e,o?o.input:void 0),c=s(e);Object.keys(u).length>0&&(c=i.update(c,u),o&&(c.operation=o.name));var l=n.endpointCache.get(c);if(!l||1!==l.length||""!==l[0].Address)if(l&&l.length>0)e.httpRequest.updateEndpoint(l[0].Address);else{var h=t.makeRequest(r.endpointOperation,{Operation:o.name,Identifiers:u});f(h),h.removeListener("validate",n.EventListeners.Core.VALIDATE_PARAMETERS),h.removeListener("retry",n.EventListeners.Core.RETRY_CHECK),n.endpointCache.put(c,[{Address:"",CachePeriodInMinutes:1}]),h.send((function(e,t){t&&t.Endpoints?n.endpointCache.put(c,t.Endpoints):e&&n.endpointCache.put(c,[{Address:"",CachePeriodInMinutes:1}])}))}}var c={};function l(e,t){var r=e.service,o=r.api,u=o.operations?o.operations[e.operation]:void 0,l=u?u.input:void 0,h=a(e,l),p=s(e);Object.keys(h).length>0&&(p=i.update(p,h),u&&(p.operation=u.name));var d=n.EndpointCache.getKeyString(p),y=n.endpointCache.get(d);if(y&&1===y.length&&""===y[0].Address)return c[d]||(c[d]=[]),void c[d].push({request:e,callback:t});if(y&&y.length>0)e.httpRequest.updateEndpoint(y[0].Address),t();else{var m=r.makeRequest(o.endpointOperation,{Operation:u.name,Identifiers:h});m.removeListener("validate",n.EventListeners.Core.VALIDATE_PARAMETERS),f(m),n.endpointCache.put(d,[{Address:"",CachePeriodInMinutes:60}]),m.send((function(r,o){if(r){var s={code:"EndpointDiscoveryException",message:"Request cannot be fulfilled without specifying an endpoint",retryable:!1};if(e.response.error=i.error(r,s),n.endpointCache.remove(p),c[d]){var a=c[d];i.arrayEach(a,(function(e){e.request.response.error=i.error(r,s),e.callback()})),delete c[d]}}else if(o&&(n.endpointCache.put(d,o.Endpoints),e.httpRequest.updateEndpoint(o.Endpoints[0].Address),c[d])){a=c[d];i.arrayEach(a,(function(e){e.request.httpRequest.updateEndpoint(o.Endpoints[0].Address),e.callback()})),delete c[d]}t()}))}}function f(e){var t=e.service.api.apiVersion;t&&!e.httpRequest.headers["x-amz-api-version"]&&(e.httpRequest.headers["x-amz-api-version"]=t)}function h(e){var t=e.error,r=e.httpResponse;if(t&&("InvalidEndpointException"===t.code||421===r.statusCode)){var o=e.request,u=o.service.api.operations||{},c=a(o,u[o.operation]?u[o.operation].input:void 0),l=s(o);Object.keys(c).length>0&&(l=i.update(l,c),u[o.operation]&&(l.operation=u[o.operation].name)),n.endpointCache.remove(l)}}function p(e){return["false","0"].indexOf(e)>=0}e.exports={discoverEndpoint:function(e,r){var s=e.service||{};if(function(e){if(e._originalConfig&&e._originalConfig.endpoint&&!0===e._originalConfig.endpointDiscoveryEnabled)throw i.error(new Error,{code:"ConfigurationException",message:"Custom endpoint is supplied; endpointDiscoveryEnabled must not be true."});var t=n.config[e.serviceIdentifier]||{};return Boolean(n.config.endpoint||t.endpoint||e._originalConfig&&e._originalConfig.endpoint)}(s)||e.isPresigned())return r();var a=(s.api.operations||{})[e.operation],c=a?a.endpointDiscoveryRequired:"NULL";if(!function(e){if(!0===(e.service||{}).config.endpointDiscoveryEnabled)return!0;if(i.isBrowser())return!1;for(var r=0;r=0){u=!0;var c=0}var l=function(){u&&c!==a?i.emit("error",t.util.error(new Error("Stream content length mismatch. Received "+c+" of "+a+" bytes."),{code:"StreamContentLengthMismatch"})):2===t.HttpClient.streamsApiVersion?i.end():i.emit("end")},f=s.httpResponse.createUnbufferedStream();if(2===t.HttpClient.streamsApiVersion)if(u){var h=new r.PassThrough;h._write=function(e){return e&&e.length&&(c+=e.length),r.PassThrough.prototype._write.apply(this,arguments)},h.on("end",l),i.on("error",(function(e){u=!1,f.unpipe(h),h.emit("end"),h.end()})),f.pipe(h).pipe(i,{end:!1})}else f.pipe(i);else u&&f.on("data",(function(e){e&&e.length&&(c+=e.length)})),f.on("data",(function(e){i.emit("data",e)})),f.on("end",l);f.on("error",(function(e){u=!1,i.emit("error",e)}))}})),i},emitEvent:function(e,r,n){"function"==typeof r&&(n=r,r=null),n||(n=function(){}),r||(r=this.eventParameters(e,this.response)),t.SequentialExecutor.prototype.emit.call(this,e,r,(function(e){e&&(this.response.error=e),n.call(this,e)}))},eventParameters:function(e){switch(e){case"restart":case"validate":case"sign":case"build":case"afterValidate":case"afterBuild":return[this];case"error":return[this.response.error,this.response];default:return[this.response]}},presign:function(e,r){return r||"function"!=typeof e||(r=e,e=null),(new t.Signers.Presign).sign(this.toGet(),e,r)},isPresigned:function(){return Object.prototype.hasOwnProperty.call(this.httpRequest.headers,"presigned-expires")},toUnauthenticated:function(){return this._unAuthenticated=!0,this.removeListener("validate",t.EventListeners.Core.VALIDATE_CREDENTIALS),this.removeListener("sign",t.EventListeners.Core.SIGN),this},toGet:function(){return"query"!==this.service.api.protocol&&"ec2"!==this.service.api.protocol||(this.removeListener("build",this.buildAsGet),this.addListener("build",this.buildAsGet)),this},buildAsGet:function(e){e.httpRequest.method="GET",e.httpRequest.path=e.service.endpoint.path+"?"+e.httpRequest.body,e.httpRequest.body="",delete e.httpRequest.headers["Content-Length"],delete e.httpRequest.headers["Content-Type"]},haltHandlersOnError:function(){this._haltHandlersOnError=!0}}),t.Request.addPromisesToClass=function(e){this.prototype.promise=function(){var t=this;return this.httpRequest.appendToUserAgent("promise"),new e((function(e,r){t.on("complete",(function(t){t.error?r(t.error):e(Object.defineProperty(t.data||{},"$response",{value:t}))})),t.runTo()}))}},t.Request.deletePromisesFromClass=function(){delete this.prototype.promise},t.util.addPromises(t.Request),t.util.mixin(t.Request,t.SequentialExecutor)}).call(this,r(6))},function(e,t){function r(e,t){this.currentState=t||null,this.states=e||{}}r.prototype.runTo=function(e,t,r,n){"function"==typeof e&&(n=r,r=t,t=e,e=null);var i=this,o=i.states[i.currentState];o.fn.call(r||i,n,(function(n){if(n){if(!o.fail)return t?t.call(r,n):null;i.currentState=o.fail}else{if(!o.accept)return t?t.call(r):null;i.currentState=o.accept}if(i.currentState===e)return t?t.call(r,n):null;i.runTo(e,t,r,n)}))},r.prototype.addState=function(e,t,r,n){return"function"==typeof t?(n=t,t=null,r=null):"function"==typeof r&&(n=r,r=null),this.currentState||(this.currentState=e),this.states[e]={accept:t,fail:r,fn:n},this},e.exports=r},function(e,t,r){var n=r(3),i=n.util.inherit,o=r(74);n.Response=i({constructor:function(e){this.request=e,this.data=null,this.error=null,this.retryCount=0,this.redirectCount=0,this.httpResponse=new n.HttpResponse,e&&(this.maxRetries=e.service.numRetries(),this.maxRedirects=e.service.config.maxRedirects)},nextPage:function(e){var t,r=this.request.service,i=this.request.operation;try{t=r.paginationConfig(i,!0)}catch(e){this.error=e}if(!this.hasNextPage()){if(e)e(this.error,null);else if(this.error)throw this.error;return null}var o=n.util.copy(this.request.params);if(this.nextPageTokens){var s=t.inputToken;"string"==typeof s&&(s=[s]);for(var a=0;a=0?"&":"?";this.request.path+=o+n.util.queryParamsToString(i)},authorization:function(e,t){var r=[],n=this.credentialString(t);return r.push(this.algorithm+" Credential="+e.accessKeyId+"/"+n),r.push("SignedHeaders="+this.signedHeaders()),r.push("Signature="+this.signature(e,t)),r.join(", ")},signature:function(e,t){var r=i.getSigningKey(e,t.substr(0,8),this.request.region,this.serviceName,this.signatureCache);return n.util.crypto.hmac(r,this.stringToSign(t),"hex")},stringToSign:function(e){var t=[];return t.push("AWS4-HMAC-SHA256"),t.push(e),t.push(this.credentialString(e)),t.push(this.hexEncodedHash(this.canonicalString())),t.join("\n")},canonicalString:function(){var e=[],t=this.request.pathname();return"s3"!==this.serviceName&&"s3v4"!==this.signatureVersion&&(t=n.util.uriEscapePath(t)),e.push(this.request.method),e.push(t),e.push(this.request.search()),e.push(this.canonicalHeaders()+"\n"),e.push(this.signedHeaders()),e.push(this.hexEncodedBodyHash()),e.join("\n")},canonicalHeaders:function(){var e=[];n.util.each.call(this,this.request.headers,(function(t,r){e.push([t,r])})),e.sort((function(e,t){return e[0].toLowerCase()50&&delete i[o.shift()]),p},emptyCache:function(){i={},o=[]}}},function(e,t,r){var n=r(3),i=n.util.inherit;n.Signers.S3=i(n.Signers.RequestSigner,{subResources:{acl:1,accelerate:1,analytics:1,cors:1,lifecycle:1,delete:1,inventory:1,location:1,logging:1,metrics:1,notification:1,partNumber:1,policy:1,requestPayment:1,replication:1,restore:1,tagging:1,torrent:1,uploadId:1,uploads:1,versionId:1,versioning:1,versions:1,website:1},responseHeaders:{"response-content-type":1,"response-content-language":1,"response-expires":1,"response-cache-control":1,"response-content-disposition":1,"response-content-encoding":1},addAuthorization:function(e,t){this.request.headers["presigned-expires"]||(this.request.headers["X-Amz-Date"]=n.util.date.rfc822(t)),e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken);var r=this.sign(e.secretAccessKey,this.stringToSign()),i="AWS "+e.accessKeyId+":"+r;this.request.headers.Authorization=i},stringToSign:function(){var e=this.request,t=[];t.push(e.method),t.push(e.headers["Content-MD5"]||""),t.push(e.headers["Content-Type"]||""),t.push(e.headers["presigned-expires"]||"");var r=this.canonicalizedAmzHeaders();return r&&t.push(r),t.push(this.canonicalizedResource()),t.join("\n")},canonicalizedAmzHeaders:function(){var e=[];n.util.each(this.request.headers,(function(t){t.match(/^x-amz-/i)&&e.push(t)})),e.sort((function(e,t){return e.toLowerCase()604800){throw n.util.error(new Error,{code:"InvalidExpiryTime",message:"Presigning does not support expiry time greater than a week with SigV4 signing.",retryable:!1})}e.httpRequest.headers[o]=t}else{if(r!==n.Signers.S3)throw n.util.error(new Error,{message:"Presigning only supports S3 or SigV4 signing.",code:"UnsupportedSigner",retryable:!1});var i=e.service?e.service.getSkewCorrectedDate():n.util.date.getDate();e.httpRequest.headers[o]=parseInt(n.util.date.unixTimestamp(i)+t,10).toString()}}function a(e){var t=e.httpRequest.endpoint,r=n.util.urlParse(e.httpRequest.path),i={};r.search&&(i=n.util.queryStringParse(r.search.substr(1)));var s=e.httpRequest.headers.Authorization.split(" ");if("AWS"===s[0])s=s[1].split(":"),i.AWSAccessKeyId=s[0],i.Signature=s[1],n.util.each(e.httpRequest.headers,(function(e,t){e===o&&(e="Expires"),0===e.indexOf("x-amz-meta-")&&(delete i[e],e=e.toLowerCase()),i[e]=t})),delete e.httpRequest.headers[o],delete i.Authorization,delete i.Host;else if("AWS4-HMAC-SHA256"===s[0]){s.shift();var a=s.join(" ").match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1];i["X-Amz-Signature"]=a,delete i.Expires}t.pathname=r.pathname,t.search=n.util.queryParamsToString(i)}n.Signers.Presign=i({sign:function(e,t,r){if(e.httpRequest.headers[o]=t||3600,e.on("build",s),e.on("sign",a),e.removeListener("afterBuild",n.EventListeners.Core.SET_CONTENT_LENGTH),e.removeListener("afterBuild",n.EventListeners.Core.COMPUTE_SHA256),e.emit("beforePresign",[e]),!r){if(e.build(),e.response.error)throw e.response.error;return n.util.urlFormat(e.httpRequest.endpoint)}e.build((function(){this.response.error?r(this.response.error):r(null,n.util.urlFormat(e.httpRequest.endpoint))}))}}),e.exports=n.Signers.Presign},function(e,t,r){var n=r(3);n.ParamValidator=n.util.inherit({constructor:function(e){!0!==e&&void 0!==e||(e={min:!0}),this.validation=e},validate:function(e,t,r){if(this.errors=[],this.validateMember(e,t||{},r||"params"),this.errors.length>1){var i=this.errors.join("\n* ");throw i="There were "+this.errors.length+" validation errors:\n* "+i,n.util.error(new Error(i),{code:"MultipleValidationErrors",errors:this.errors})}if(1===this.errors.length)throw this.errors[0];return!0},fail:function(e,t){this.errors.push(n.util.error(new Error(t),{code:e}))},validateStructure:function(e,t,r){var n;this.validateType(t,r,["object"],"structure");for(var i=0;e.required&&i= 1, but found "'+t+'" for '+r)},validatePattern:function(e,t,r){this.validation.pattern&&void 0!==e.pattern&&(new RegExp(e.pattern).test(t)||this.fail("PatternMatchError",'Provided value "'+t+'" does not match regex pattern /'+e.pattern+"/ for "+r))},validateRange:function(e,t,r,n){this.validation.min&&void 0!==e.min&&t= "+e.min+", but found "+t+" for "+r),this.validation.max&&void 0!==e.max&&t>e.max&&this.fail("MaxRangeError","Expected "+n+" <= "+e.max+", but found "+t+" for "+r)},validateEnum:function(e,t,r){this.validation.enum&&void 0!==e.enum&&-1===e.enum.indexOf(t)&&this.fail("EnumError","Found string value of "+t+", but expected "+e.enum.join("|")+" for "+r)},validateType:function(e,t,r,i){if(null==e)return!1;for(var o=!1,s=0;se.BLOCK_SIZE){var i=new e;i.update(r),r=i.digest()}var o=new Uint8Array(e.BLOCK_SIZE);return o.set(r),o}(e,t),i=new Uint8Array(e.BLOCK_SIZE);i.set(r);for(var o=0;o>>32-i)+r&4294967295}function a(e,t,r,n,i,o,a){return s(t&r|~t&n,e,t,i,o,a)}function u(e,t,r,n,i,o,a){return s(t&n|r&~n,e,t,i,o,a)}function c(e,t,r,n,i,o,a){return s(t^r^n,e,t,i,o,a)}function l(e,t,r,n,i,o,a){return s(r^(t|~n),e,t,i,o,a)}e.exports=o,o.BLOCK_SIZE=64,o.prototype.update=function(e){if(n.isEmptyData(e))return this;if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=n.convertToBuffer(e),r=0,i=t.byteLength;for(this.bytesHashed+=i;i>0;)this.buffer.setUint8(this.bufferLength++,t[r++]),i--,64===this.bufferLength&&(this.hashBuffer(),this.bufferLength=0);return this},o.prototype.digest=function(e){if(!this.finished){var t=this.buffer,r=this.bufferLength,n=8*this.bytesHashed;if(t.setUint8(this.bufferLength++,128),r%64>=56){for(var o=this.bufferLength;o<64;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<56;o++)t.setUint8(o,0);t.setUint32(56,n>>>0,!0),t.setUint32(60,Math.floor(n/4294967296),!0),this.hashBuffer(),this.finished=!0}var s=new DataView(new ArrayBuffer(16));for(o=0;o<4;o++)s.setUint32(4*o,this.state[o],!0);var a=new i(s.buffer,s.byteOffset,s.byteLength);return e?a.toString(e):a},o.prototype.hashBuffer=function(){var e=this.buffer,t=this.state,r=t[0],n=t[1],i=t[2],o=t[3];r=a(r,n,i,o,e.getUint32(0,!0),7,3614090360),o=a(o,r,n,i,e.getUint32(4,!0),12,3905402710),i=a(i,o,r,n,e.getUint32(8,!0),17,606105819),n=a(n,i,o,r,e.getUint32(12,!0),22,3250441966),r=a(r,n,i,o,e.getUint32(16,!0),7,4118548399),o=a(o,r,n,i,e.getUint32(20,!0),12,1200080426),i=a(i,o,r,n,e.getUint32(24,!0),17,2821735955),n=a(n,i,o,r,e.getUint32(28,!0),22,4249261313),r=a(r,n,i,o,e.getUint32(32,!0),7,1770035416),o=a(o,r,n,i,e.getUint32(36,!0),12,2336552879),i=a(i,o,r,n,e.getUint32(40,!0),17,4294925233),n=a(n,i,o,r,e.getUint32(44,!0),22,2304563134),r=a(r,n,i,o,e.getUint32(48,!0),7,1804603682),o=a(o,r,n,i,e.getUint32(52,!0),12,4254626195),i=a(i,o,r,n,e.getUint32(56,!0),17,2792965006),r=u(r,n=a(n,i,o,r,e.getUint32(60,!0),22,1236535329),i,o,e.getUint32(4,!0),5,4129170786),o=u(o,r,n,i,e.getUint32(24,!0),9,3225465664),i=u(i,o,r,n,e.getUint32(44,!0),14,643717713),n=u(n,i,o,r,e.getUint32(0,!0),20,3921069994),r=u(r,n,i,o,e.getUint32(20,!0),5,3593408605),o=u(o,r,n,i,e.getUint32(40,!0),9,38016083),i=u(i,o,r,n,e.getUint32(60,!0),14,3634488961),n=u(n,i,o,r,e.getUint32(16,!0),20,3889429448),r=u(r,n,i,o,e.getUint32(36,!0),5,568446438),o=u(o,r,n,i,e.getUint32(56,!0),9,3275163606),i=u(i,o,r,n,e.getUint32(12,!0),14,4107603335),n=u(n,i,o,r,e.getUint32(32,!0),20,1163531501),r=u(r,n,i,o,e.getUint32(52,!0),5,2850285829),o=u(o,r,n,i,e.getUint32(8,!0),9,4243563512),i=u(i,o,r,n,e.getUint32(28,!0),14,1735328473),r=c(r,n=u(n,i,o,r,e.getUint32(48,!0),20,2368359562),i,o,e.getUint32(20,!0),4,4294588738),o=c(o,r,n,i,e.getUint32(32,!0),11,2272392833),i=c(i,o,r,n,e.getUint32(44,!0),16,1839030562),n=c(n,i,o,r,e.getUint32(56,!0),23,4259657740),r=c(r,n,i,o,e.getUint32(4,!0),4,2763975236),o=c(o,r,n,i,e.getUint32(16,!0),11,1272893353),i=c(i,o,r,n,e.getUint32(28,!0),16,4139469664),n=c(n,i,o,r,e.getUint32(40,!0),23,3200236656),r=c(r,n,i,o,e.getUint32(52,!0),4,681279174),o=c(o,r,n,i,e.getUint32(0,!0),11,3936430074),i=c(i,o,r,n,e.getUint32(12,!0),16,3572445317),n=c(n,i,o,r,e.getUint32(24,!0),23,76029189),r=c(r,n,i,o,e.getUint32(36,!0),4,3654602809),o=c(o,r,n,i,e.getUint32(48,!0),11,3873151461),i=c(i,o,r,n,e.getUint32(60,!0),16,530742520),r=l(r,n=c(n,i,o,r,e.getUint32(8,!0),23,3299628645),i,o,e.getUint32(0,!0),6,4096336452),o=l(o,r,n,i,e.getUint32(28,!0),10,1126891415),i=l(i,o,r,n,e.getUint32(56,!0),15,2878612391),n=l(n,i,o,r,e.getUint32(20,!0),21,4237533241),r=l(r,n,i,o,e.getUint32(48,!0),6,1700485571),o=l(o,r,n,i,e.getUint32(12,!0),10,2399980690),i=l(i,o,r,n,e.getUint32(40,!0),15,4293915773),n=l(n,i,o,r,e.getUint32(4,!0),21,2240044497),r=l(r,n,i,o,e.getUint32(32,!0),6,1873313359),o=l(o,r,n,i,e.getUint32(60,!0),10,4264355552),i=l(i,o,r,n,e.getUint32(24,!0),15,2734768916),n=l(n,i,o,r,e.getUint32(52,!0),21,1309151649),r=l(r,n,i,o,e.getUint32(16,!0),6,4149444226),o=l(o,r,n,i,e.getUint32(44,!0),10,3174756917),i=l(i,o,r,n,e.getUint32(8,!0),15,718787259),n=l(n,i,o,r,e.getUint32(36,!0),21,3951481745),t[0]=r+t[0]&4294967295,t[1]=n+t[1]&4294967295,t[2]=i+t[2]&4294967295,t[3]=o+t[3]&4294967295}},function(e,t,r){var n=r(15).Buffer,i=r(49);new Uint32Array([1518500249,1859775393,-1894007588,-899497514]),Math.pow(2,53);function o(){this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=new Uint32Array(80),this.offset=0,this.shift=24,this.totalLength=0}e.exports=o,o.BLOCK_SIZE=64,o.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(i.isEmptyData(e))return this;var t=(e=i.convertToBuffer(e)).length;this.totalLength+=8*t;for(var r=0;r14||14===this.offset&&this.shift<24)&&this.processBlock(),this.offset=14,this.shift=24,this.write(0),this.write(0),this.write(this.totalLength>0xffffffffff?this.totalLength/1099511627776:0),this.write(this.totalLength>4294967295?this.totalLength/4294967296:0);for(var t=24;t>=0;t-=8)this.write(this.totalLength>>t);var r=new n(20),i=new DataView(r.buffer);return i.setUint32(0,this.h0,!1),i.setUint32(4,this.h1,!1),i.setUint32(8,this.h2,!1),i.setUint32(12,this.h3,!1),i.setUint32(16,this.h4,!1),e?r.toString(e):r},o.prototype.processBlock=function(){for(var e=16;e<80;e++){var t=this.block[e-3]^this.block[e-8]^this.block[e-14]^this.block[e-16];this.block[e]=t<<1|t>>>31}var r,n,i=this.h0,o=this.h1,s=this.h2,a=this.h3,u=this.h4;for(e=0;e<80;e++){e<20?(r=a^o&(s^a),n=1518500249):e<40?(r=o^s^a,n=1859775393):e<60?(r=o&s|a&(o|s),n=2400959708):(r=o^s^a,n=3395469782);var c=(i<<5|i>>>27)+r+u+n+(0|this.block[e]);u=a,a=s,s=o<<30|o>>>2,o=i,i=c}for(this.h0=this.h0+i|0,this.h1=this.h1+o|0,this.h2=this.h2+s|0,this.h3=this.h3+a|0,this.h4=this.h4+u|0,this.offset=0,e=0;e<16;e++)this.block[e]=0}},function(e,t,r){var n=r(15).Buffer,i=r(49),o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=Math.pow(2,53)-1;function a(){this.state=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}e.exports=a,a.BLOCK_SIZE=64,a.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(i.isEmptyData(e))return this;var t=0,r=(e=i.convertToBuffer(e)).byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>s)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,64===this.bufferLength&&(this.hashBuffer(),this.bufferLength=0);return this},a.prototype.digest=function(e){if(!this.finished){var t=8*this.bytesHashed,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),i=this.bufferLength;if(r.setUint8(this.bufferLength++,128),i%64>=56){for(var o=this.bufferLength;o<64;o++)r.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<56;o++)r.setUint8(o,0);r.setUint32(56,Math.floor(t/4294967296),!0),r.setUint32(60,t),this.hashBuffer(),this.finished=!0}var s=new n(32);for(o=0;o<8;o++)s[4*o]=this.state[o]>>>24&255,s[4*o+1]=this.state[o]>>>16&255,s[4*o+2]=this.state[o]>>>8&255,s[4*o+3]=this.state[o]>>>0&255;return e?s.toString(e):s},a.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,r=t[0],n=t[1],i=t[2],s=t[3],a=t[4],u=t[5],c=t[6],l=t[7],f=0;f<64;f++){if(f<16)this.temp[f]=(255&e[4*f])<<24|(255&e[4*f+1])<<16|(255&e[4*f+2])<<8|255&e[4*f+3];else{var h=this.temp[f-2],p=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,d=((h=this.temp[f-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[f]=(p+this.temp[f-7]|0)+(d+this.temp[f-16]|0)}var y=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&u^~a&c)|0)+(l+(o[f]+this.temp[f]|0)|0)|0,m=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&n^r&i^n&i)|0;l=c,c=u,u=a,a=s+y|0,s=i,i=n,n=r,r=y+m|0}t[0]+=r,t[1]+=n,t[2]+=i,t[3]+=s,t[4]+=a,t[5]+=u,t[6]+=c,t[7]+=l}},function(e,t){e.exports={now:function(){return"undefined"!=typeof performance&&"function"==typeof performance.now?performance.now():Date.now()}}},function(e,t,r){var n=r(305).eventMessageChunker,i=r(306).parseEvent;e.exports={createEventStream:function(e,t,r){for(var o=n(e),s=[],a=0;a-1&&(e[t]++,0===e[t]);t--);}o.fromNumber=function(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(e+" is too large (or, if negative, too small) to represent as an Int64");for(var t=new Uint8Array(8),r=7,n=Math.abs(Math.round(e));r>-1&&n>0;r--,n/=256)t[r]=n;return e<0&&s(t),new o(t)},o.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&s(e),parseInt(e.toString("hex"),16)*(t?-1:1)},o.prototype.toString=function(){return String(this.valueOf())},e.exports={Int64:o}},function(e,t,r){var n=r(3).util,i=n.buffer.toBuffer;e.exports={splitMessage:function(e){if(n.Buffer.isBuffer(e)||(e=i(e)),e.length<16)throw new Error("Provided message too short to accommodate event stream message overhead");if(e.length!==e.readUInt32BE(0))throw new Error("Reported message length does not match received message length");var t=e.readUInt32BE(8);if(t!==n.crypto.crc32(e.slice(0,8)))throw new Error("The prelude checksum specified in the message ("+t+") does not match the calculated CRC32 checksum.");var r=e.readUInt32BE(e.length-4);if(r!==n.crypto.crc32(e.slice(0,e.length-4)))throw new Error("The message checksum did not match the expected value of "+r);var o=12+e.readUInt32BE(4);return{headers:e.slice(12,o),body:e.slice(o,e.length-4)}}}},function(e,t,r){var n=r(3),i=r(40);n.TemporaryCredentials=n.util.inherit(n.Credentials,{constructor:function(e,t){n.Credentials.call(this),this.loadMasterCredentials(t),this.expired=!0,this.params=e||{},this.params.RoleArn&&(this.params.RoleSessionName=this.params.RoleSessionName||"temporary-credentials")},refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.masterCredentials.get((function(){t.service.config.credentials=t.masterCredentials,(t.params.RoleArn?t.service.assumeRole:t.service.getSessionToken).call(t.service,(function(r,n){r||t.service.credentialsFrom(n,t),e(r)}))}))},loadMasterCredentials:function(e){for(this.masterCredentials=e||n.config.credentials;this.masterCredentials.masterCredentials;)this.masterCredentials=this.masterCredentials.masterCredentials;"function"!=typeof this.masterCredentials.get&&(this.masterCredentials=new n.Credentials(this.masterCredentials))},createClients:function(){this.service=this.service||new i({params:this.params})}})},function(e,t,r){var n=r(3),i=r(312);n.util.update(n.STS.prototype,{credentialsFrom:function(e,t){return e?(t||(t=new n.TemporaryCredentials),t.expired=!1,t.accessKeyId=e.Credentials.AccessKeyId,t.secretAccessKey=e.Credentials.SecretAccessKey,t.sessionToken=e.Credentials.SessionToken,t.expireTime=e.Credentials.Expiration,t):null},assumeRoleWithWebIdentity:function(e,t){return this.makeUnauthenticatedRequest("assumeRoleWithWebIdentity",e,t)},assumeRoleWithSAML:function(e,t){return this.makeUnauthenticatedRequest("assumeRoleWithSAML",e,t)},setupRequestListeners:function(e){e.addListener("validate",this.optInRegionalEndpoint,!0)},optInRegionalEndpoint:function(e){var t=e.service,r=t.config;if(r.stsRegionalEndpoints=i(t._originalConfig,{env:"AWS_STS_REGIONAL_ENDPOINTS",sharedConfig:"sts_regional_endpoints",clientConfig:"stsRegionalEndpoints"}),"regional"===r.stsRegionalEndpoints&&t.isGlobalEndpoint){if(!r.region)throw n.util.error(new Error,{code:"ConfigError",message:"Missing region in config"});var o=r.endpoint.indexOf(".amazonaws.com"),s=r.endpoint.substring(0,o)+"."+r.region+r.endpoint.substring(o);e.httpRequest.updateEndpoint(s),e.httpRequest.region=r.region}}})},function(e,t,r){(function(t){var n=r(3);function i(e,t){if("string"==typeof e){if(["legacy","regional"].indexOf(e.toLowerCase())>=0)return e.toLowerCase();throw n.util.error(new Error,t)}}e.exports=function(e,r){var o;if((e=e||{})[r.clientConfig]&&(o=i(e[r.clientConfig],{code:"InvalidConfiguration",message:'invalid "'+r.clientConfig+'" configuration. Expect "legacy" or "regional". Got "'+e[r.clientConfig]+'".'})))return o;if(!n.util.isNode())return o;if(Object.prototype.hasOwnProperty.call(t.env,r.env)&&(o=i(t.env[r.env],{code:"InvalidEnvironmentalVariable",message:"invalid "+r.env+' environmental variable. Expect "legacy" or "regional". Got "'+t.env[r.env]+'".'})))return o;var s={};try{s=n.util.getProfilesFromSharedConfig(n.util.iniLoader)[t.env.AWS_PROFILE||n.util.defaultProfile]}catch(e){}return s&&Object.prototype.hasOwnProperty.call(s,r.sharedConfig)&&(o=i(s[r.sharedConfig],{code:"InvalidConfiguration",message:"invalid "+r.sharedConfig+' profile config. Expect "legacy" or "regional". Got "'+s[r.sharedConfig]+'".'})),o}}).call(this,r(6))},function(e){e.exports=JSON.parse('{"version":"2.0","metadata":{"apiVersion":"2011-06-15","endpointPrefix":"sts","globalEndpoint":"sts.amazonaws.com","protocol":"query","serviceAbbreviation":"AWS STS","serviceFullName":"AWS Security Token Service","serviceId":"STS","signatureVersion":"v4","uid":"sts-2011-06-15","xmlNamespace":"https://sts.amazonaws.com/doc/2011-06-15/"},"operations":{"AssumeRole":{"input":{"type":"structure","required":["RoleArn","RoleSessionName"],"members":{"RoleArn":{},"RoleSessionName":{},"PolicyArns":{"shape":"S4"},"Policy":{},"DurationSeconds":{"type":"integer"},"Tags":{"shape":"S8"},"TransitiveTagKeys":{"type":"list","member":{}},"ExternalId":{},"SerialNumber":{},"TokenCode":{}}},"output":{"resultWrapper":"AssumeRoleResult","type":"structure","members":{"Credentials":{"shape":"Sh"},"AssumedRoleUser":{"shape":"Sm"},"PackedPolicySize":{"type":"integer"}}}},"AssumeRoleWithSAML":{"input":{"type":"structure","required":["RoleArn","PrincipalArn","SAMLAssertion"],"members":{"RoleArn":{},"PrincipalArn":{},"SAMLAssertion":{},"PolicyArns":{"shape":"S4"},"Policy":{},"DurationSeconds":{"type":"integer"}}},"output":{"resultWrapper":"AssumeRoleWithSAMLResult","type":"structure","members":{"Credentials":{"shape":"Sh"},"AssumedRoleUser":{"shape":"Sm"},"PackedPolicySize":{"type":"integer"},"Subject":{},"SubjectType":{},"Issuer":{},"Audience":{},"NameQualifier":{}}}},"AssumeRoleWithWebIdentity":{"input":{"type":"structure","required":["RoleArn","RoleSessionName","WebIdentityToken"],"members":{"RoleArn":{},"RoleSessionName":{},"WebIdentityToken":{},"ProviderId":{},"PolicyArns":{"shape":"S4"},"Policy":{},"DurationSeconds":{"type":"integer"}}},"output":{"resultWrapper":"AssumeRoleWithWebIdentityResult","type":"structure","members":{"Credentials":{"shape":"Sh"},"SubjectFromWebIdentityToken":{},"AssumedRoleUser":{"shape":"Sm"},"PackedPolicySize":{"type":"integer"},"Provider":{},"Audience":{}}}},"DecodeAuthorizationMessage":{"input":{"type":"structure","required":["EncodedMessage"],"members":{"EncodedMessage":{}}},"output":{"resultWrapper":"DecodeAuthorizationMessageResult","type":"structure","members":{"DecodedMessage":{}}}},"GetAccessKeyInfo":{"input":{"type":"structure","required":["AccessKeyId"],"members":{"AccessKeyId":{}}},"output":{"resultWrapper":"GetAccessKeyInfoResult","type":"structure","members":{"Account":{}}}},"GetCallerIdentity":{"input":{"type":"structure","members":{}},"output":{"resultWrapper":"GetCallerIdentityResult","type":"structure","members":{"UserId":{},"Account":{},"Arn":{}}}},"GetFederationToken":{"input":{"type":"structure","required":["Name"],"members":{"Name":{},"Policy":{},"PolicyArns":{"shape":"S4"},"DurationSeconds":{"type":"integer"},"Tags":{"shape":"S8"}}},"output":{"resultWrapper":"GetFederationTokenResult","type":"structure","members":{"Credentials":{"shape":"Sh"},"FederatedUser":{"type":"structure","required":["FederatedUserId","Arn"],"members":{"FederatedUserId":{},"Arn":{}}},"PackedPolicySize":{"type":"integer"}}}},"GetSessionToken":{"input":{"type":"structure","members":{"DurationSeconds":{"type":"integer"},"SerialNumber":{},"TokenCode":{}}},"output":{"resultWrapper":"GetSessionTokenResult","type":"structure","members":{"Credentials":{"shape":"Sh"}}}}},"shapes":{"S4":{"type":"list","member":{"type":"structure","members":{"arn":{}}}},"S8":{"type":"list","member":{"type":"structure","required":["Key","Value"],"members":{"Key":{},"Value":{}}}},"Sh":{"type":"structure","required":["AccessKeyId","SecretAccessKey","SessionToken","Expiration"],"members":{"AccessKeyId":{},"SecretAccessKey":{},"SessionToken":{},"Expiration":{"type":"timestamp"}}},"Sm":{"type":"structure","required":["AssumedRoleId","Arn"],"members":{"AssumedRoleId":{},"Arn":{}}}}}')},function(e){e.exports=JSON.parse('{"pagination":{}}')},function(e,t,r){var n=r(3),i=r(40);n.ChainableTemporaryCredentials=n.util.inherit(n.Credentials,{constructor:function(e){n.Credentials.call(this),e=e||{},this.errorCode="ChainableTemporaryCredentialsProviderFailure",this.expired=!0,this.tokenCodeFn=null;var t=n.util.copy(e.params)||{};if(t.RoleArn&&(t.RoleSessionName=t.RoleSessionName||"temporary-credentials"),t.SerialNumber){if(!e.tokenCodeFn||"function"!=typeof e.tokenCodeFn)throw new n.util.error(new Error("tokenCodeFn must be a function when params.SerialNumber is given"),{code:this.errorCode});this.tokenCodeFn=e.tokenCodeFn}var r=n.util.merge({params:t,credentials:e.masterCredentials||n.config.credentials},e.stsConfig||{});this.service=new i(r)},refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this,r=t.service.config.params.RoleArn?"assumeRole":"getSessionToken";this.getTokenCode((function(n,i){var o={};n?e(n):(i&&(o.TokenCode=i),t.service[r](o,(function(r,n){r||t.service.credentialsFrom(n,t),e(r)})))}))},getTokenCode:function(e){var t=this;this.tokenCodeFn?this.tokenCodeFn(this.service.config.params.SerialNumber,(function(r,i){if(r){var o=r;return r instanceof Error&&(o=r.message),void e(n.util.error(new Error("Error fetching MFA token: "+o),{code:t.errorCode}))}e(null,i)})):e(null)}})},function(e,t,r){var n=r(3),i=r(40);n.WebIdentityCredentials=n.util.inherit(n.Credentials,{constructor:function(e,t){n.Credentials.call(this),this.expired=!0,this.params=e,this.params.RoleSessionName=this.params.RoleSessionName||"web-identity",this.data=null,this._clientConfig=n.util.copy(t||{})},refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.service.assumeRoleWithWebIdentity((function(r,n){t.data=null,r||(t.data=n,t.service.credentialsFrom(n,t)),e(r)}))},createClients:function(){if(!this.service){var e=n.util.merge({},this._clientConfig);e.params=this.params,this.service=new i(e)}}})},function(e,t,r){var n=r(3),i=r(318),o=r(40);n.CognitoIdentityCredentials=n.util.inherit(n.Credentials,{localStorageKey:{id:"aws.cognito.identity-id.",providers:"aws.cognito.identity-providers."},constructor:function(e,t){n.Credentials.call(this),this.expired=!0,this.params=e,this.data=null,this._identityId=null,this._clientConfig=n.util.copy(t||{}),this.loadCachedId();var r=this;Object.defineProperty(this,"identityId",{get:function(){return r.loadCachedId(),r._identityId||r.params.IdentityId},set:function(e){r._identityId=e}})},refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.data=null,t._identityId=null,t.getId((function(r){r?(t.clearIdOnNotAuthorized(r),e(r)):t.params.RoleArn?t.getCredentialsFromSTS(e):t.getCredentialsForIdentity(e)}))},clearCachedId:function(){this._identityId=null,delete this.params.IdentityId;var e=this.params.IdentityPoolId,t=this.params.LoginId||"";delete this.storage[this.localStorageKey.id+e+t],delete this.storage[this.localStorageKey.providers+e+t]},clearIdOnNotAuthorized:function(e){"NotAuthorizedException"==e.code&&this.clearCachedId()},getId:function(e){var t=this;if("string"==typeof t.params.IdentityId)return e(null,t.params.IdentityId);t.cognito.getId((function(r,n){!r&&n.IdentityId?(t.params.IdentityId=n.IdentityId,e(null,n.IdentityId)):e(r)}))},loadCredentials:function(e,t){e&&t&&(t.expired=!1,t.accessKeyId=e.Credentials.AccessKeyId,t.secretAccessKey=e.Credentials.SecretKey,t.sessionToken=e.Credentials.SessionToken,t.expireTime=e.Credentials.Expiration)},getCredentialsForIdentity:function(e){var t=this;t.cognito.getCredentialsForIdentity((function(r,n){r?t.clearIdOnNotAuthorized(r):(t.cacheId(n),t.data=n,t.loadCredentials(t.data,t)),e(r)}))},getCredentialsFromSTS:function(e){var t=this;t.cognito.getOpenIdToken((function(r,n){r?(t.clearIdOnNotAuthorized(r),e(r)):(t.cacheId(n),t.params.WebIdentityToken=n.Token,t.webIdentityCredentials.refresh((function(r){r||(t.data=t.webIdentityCredentials.data,t.sts.credentialsFrom(t.data,t)),e(r)})))}))},loadCachedId:function(){if(n.util.isBrowser()&&!this.params.IdentityId){var e=this.getStorage("id");if(e&&this.params.Logins){var t=Object.keys(this.params.Logins);0!==(this.getStorage("providers")||"").split(",").filter((function(e){return-1!==t.indexOf(e)})).length&&(this.params.IdentityId=e)}else e&&(this.params.IdentityId=e)}},createClients:function(){var e=this._clientConfig;if(this.webIdentityCredentials=this.webIdentityCredentials||new n.WebIdentityCredentials(this.params,e),!this.cognito){var t=n.util.merge({},e);t.params=this.params,this.cognito=new i(t)}this.sts=this.sts||new o(e)},cacheId:function(e){this._identityId=e.IdentityId,this.params.IdentityId=this._identityId,n.util.isBrowser()&&(this.setStorage("id",e.IdentityId),this.params.Logins&&this.setStorage("providers",Object.keys(this.params.Logins).join(",")))},getStorage:function(e){return this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]},setStorage:function(e,t){try{this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]=t}catch(e){}},storage:function(){try{var e=n.util.isBrowser()&&null!==window.localStorage&&"object"==typeof window.localStorage?window.localStorage:{};return e["aws.test-storage"]="foobar",delete e["aws.test-storage"],e}catch(e){return{}}}()})},function(e,t,r){r(69);var n=r(3),i=n.Service,o=n.apiLoader;o.services.cognitoidentity={},n.CognitoIdentity=i.defineService("cognitoidentity",["2014-06-30"]),r(319),Object.defineProperty(o.services.cognitoidentity,"2014-06-30",{get:function(){var e=r(320);return e.paginators=r(321).pagination,e},enumerable:!0,configurable:!0}),e.exports=n.CognitoIdentity},function(e,t,r){var n=r(3);n.util.update(n.CognitoIdentity.prototype,{getOpenIdToken:function(e,t){return this.makeUnauthenticatedRequest("getOpenIdToken",e,t)},getId:function(e,t){return this.makeUnauthenticatedRequest("getId",e,t)},getCredentialsForIdentity:function(e,t){return this.makeUnauthenticatedRequest("getCredentialsForIdentity",e,t)}})},function(e){e.exports=JSON.parse('{"version":"2.0","metadata":{"apiVersion":"2014-06-30","endpointPrefix":"cognito-identity","jsonVersion":"1.1","protocol":"json","serviceFullName":"Amazon Cognito Identity","serviceId":"Cognito Identity","signatureVersion":"v4","targetPrefix":"AWSCognitoIdentityService","uid":"cognito-identity-2014-06-30"},"operations":{"CreateIdentityPool":{"input":{"type":"structure","required":["IdentityPoolName","AllowUnauthenticatedIdentities"],"members":{"IdentityPoolName":{},"AllowUnauthenticatedIdentities":{"type":"boolean"},"AllowClassicFlow":{"type":"boolean"},"SupportedLoginProviders":{"shape":"S5"},"DeveloperProviderName":{},"OpenIdConnectProviderARNs":{"shape":"S9"},"CognitoIdentityProviders":{"shape":"Sb"},"SamlProviderARNs":{"shape":"Sg"},"IdentityPoolTags":{"shape":"Sh"}}},"output":{"shape":"Sk"}},"DeleteIdentities":{"input":{"type":"structure","required":["IdentityIdsToDelete"],"members":{"IdentityIdsToDelete":{"type":"list","member":{}}}},"output":{"type":"structure","members":{"UnprocessedIdentityIds":{"type":"list","member":{"type":"structure","members":{"IdentityId":{},"ErrorCode":{}}}}}}},"DeleteIdentityPool":{"input":{"type":"structure","required":["IdentityPoolId"],"members":{"IdentityPoolId":{}}}},"DescribeIdentity":{"input":{"type":"structure","required":["IdentityId"],"members":{"IdentityId":{}}},"output":{"shape":"Sv"}},"DescribeIdentityPool":{"input":{"type":"structure","required":["IdentityPoolId"],"members":{"IdentityPoolId":{}}},"output":{"shape":"Sk"}},"GetCredentialsForIdentity":{"input":{"type":"structure","required":["IdentityId"],"members":{"IdentityId":{},"Logins":{"shape":"S10"},"CustomRoleArn":{}}},"output":{"type":"structure","members":{"IdentityId":{},"Credentials":{"type":"structure","members":{"AccessKeyId":{},"SecretKey":{},"SessionToken":{},"Expiration":{"type":"timestamp"}}}}}},"GetId":{"input":{"type":"structure","required":["IdentityPoolId"],"members":{"AccountId":{},"IdentityPoolId":{},"Logins":{"shape":"S10"}}},"output":{"type":"structure","members":{"IdentityId":{}}}},"GetIdentityPoolRoles":{"input":{"type":"structure","required":["IdentityPoolId"],"members":{"IdentityPoolId":{}}},"output":{"type":"structure","members":{"IdentityPoolId":{},"Roles":{"shape":"S1c"},"RoleMappings":{"shape":"S1e"}}}},"GetOpenIdToken":{"input":{"type":"structure","required":["IdentityId"],"members":{"IdentityId":{},"Logins":{"shape":"S10"}}},"output":{"type":"structure","members":{"IdentityId":{},"Token":{}}}},"GetOpenIdTokenForDeveloperIdentity":{"input":{"type":"structure","required":["IdentityPoolId","Logins"],"members":{"IdentityPoolId":{},"IdentityId":{},"Logins":{"shape":"S10"},"TokenDuration":{"type":"long"}}},"output":{"type":"structure","members":{"IdentityId":{},"Token":{}}}},"ListIdentities":{"input":{"type":"structure","required":["IdentityPoolId","MaxResults"],"members":{"IdentityPoolId":{},"MaxResults":{"type":"integer"},"NextToken":{},"HideDisabled":{"type":"boolean"}}},"output":{"type":"structure","members":{"IdentityPoolId":{},"Identities":{"type":"list","member":{"shape":"Sv"}},"NextToken":{}}}},"ListIdentityPools":{"input":{"type":"structure","required":["MaxResults"],"members":{"MaxResults":{"type":"integer"},"NextToken":{}}},"output":{"type":"structure","members":{"IdentityPools":{"type":"list","member":{"type":"structure","members":{"IdentityPoolId":{},"IdentityPoolName":{}}}},"NextToken":{}}}},"ListTagsForResource":{"input":{"type":"structure","required":["ResourceArn"],"members":{"ResourceArn":{}}},"output":{"type":"structure","members":{"Tags":{"shape":"Sh"}}}},"LookupDeveloperIdentity":{"input":{"type":"structure","required":["IdentityPoolId"],"members":{"IdentityPoolId":{},"IdentityId":{},"DeveloperUserIdentifier":{},"MaxResults":{"type":"integer"},"NextToken":{}}},"output":{"type":"structure","members":{"IdentityId":{},"DeveloperUserIdentifierList":{"type":"list","member":{}},"NextToken":{}}}},"MergeDeveloperIdentities":{"input":{"type":"structure","required":["SourceUserIdentifier","DestinationUserIdentifier","DeveloperProviderName","IdentityPoolId"],"members":{"SourceUserIdentifier":{},"DestinationUserIdentifier":{},"DeveloperProviderName":{},"IdentityPoolId":{}}},"output":{"type":"structure","members":{"IdentityId":{}}}},"SetIdentityPoolRoles":{"input":{"type":"structure","required":["IdentityPoolId","Roles"],"members":{"IdentityPoolId":{},"Roles":{"shape":"S1c"},"RoleMappings":{"shape":"S1e"}}}},"TagResource":{"input":{"type":"structure","required":["ResourceArn","Tags"],"members":{"ResourceArn":{},"Tags":{"shape":"Sh"}}},"output":{"type":"structure","members":{}}},"UnlinkDeveloperIdentity":{"input":{"type":"structure","required":["IdentityId","IdentityPoolId","DeveloperProviderName","DeveloperUserIdentifier"],"members":{"IdentityId":{},"IdentityPoolId":{},"DeveloperProviderName":{},"DeveloperUserIdentifier":{}}}},"UnlinkIdentity":{"input":{"type":"structure","required":["IdentityId","Logins","LoginsToRemove"],"members":{"IdentityId":{},"Logins":{"shape":"S10"},"LoginsToRemove":{"shape":"Sw"}}}},"UntagResource":{"input":{"type":"structure","required":["ResourceArn","TagKeys"],"members":{"ResourceArn":{},"TagKeys":{"type":"list","member":{}}}},"output":{"type":"structure","members":{}}},"UpdateIdentityPool":{"input":{"shape":"Sk"},"output":{"shape":"Sk"}}},"shapes":{"S5":{"type":"map","key":{},"value":{}},"S9":{"type":"list","member":{}},"Sb":{"type":"list","member":{"type":"structure","members":{"ProviderName":{},"ClientId":{},"ServerSideTokenCheck":{"type":"boolean"}}}},"Sg":{"type":"list","member":{}},"Sh":{"type":"map","key":{},"value":{}},"Sk":{"type":"structure","required":["IdentityPoolId","IdentityPoolName","AllowUnauthenticatedIdentities"],"members":{"IdentityPoolId":{},"IdentityPoolName":{},"AllowUnauthenticatedIdentities":{"type":"boolean"},"AllowClassicFlow":{"type":"boolean"},"SupportedLoginProviders":{"shape":"S5"},"DeveloperProviderName":{},"OpenIdConnectProviderARNs":{"shape":"S9"},"CognitoIdentityProviders":{"shape":"Sb"},"SamlProviderARNs":{"shape":"Sg"},"IdentityPoolTags":{"shape":"Sh"}}},"Sv":{"type":"structure","members":{"IdentityId":{},"Logins":{"shape":"Sw"},"CreationDate":{"type":"timestamp"},"LastModifiedDate":{"type":"timestamp"}}},"Sw":{"type":"list","member":{}},"S10":{"type":"map","key":{},"value":{}},"S1c":{"type":"map","key":{},"value":{}},"S1e":{"type":"map","key":{},"value":{"type":"structure","required":["Type"],"members":{"Type":{},"AmbiguousRoleResolution":{},"RulesConfiguration":{"type":"structure","required":["Rules"],"members":{"Rules":{"type":"list","member":{"type":"structure","required":["Claim","MatchType","Value","RoleARN"],"members":{"Claim":{},"MatchType":{},"Value":{},"RoleARN":{}}}}}}}}}}}')},function(e){e.exports=JSON.parse('{"pagination":{}}')},function(e,t,r){var n=r(3),i=r(40);n.SAMLCredentials=n.util.inherit(n.Credentials,{constructor:function(e){n.Credentials.call(this),this.expired=!0,this.params=e},refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.service.assumeRoleWithSAML((function(r,n){r||t.service.credentialsFrom(n,t),e(r)}))},createClients:function(){this.service=this.service||new i({params:this.params})}})},function(e,t,r){var n=r(7),i=r(39);function o(){}function s(e,t){for(var r=e.getElementsByTagName(t),n=0,i=r.length;n=this.HEADERS_RECEIVED&&!f&&(u.statusCode=l.status,u.headers=s.parseHeaders(l.getAllResponseHeaders()),u.emit("headers",u.statusCode,u.headers,l.statusText),f=!0),this.readyState===this.DONE&&s.finishRequest(l,u)}),!1),l.upload.addEventListener("progress",(function(e){u.emit("sendProgress",e)})),l.addEventListener("progress",(function(e){u.emit("receiveProgress",e)}),!1),l.addEventListener("timeout",(function(){o(n.util.error(new Error("Timeout"),{code:"TimeoutError"}))}),!1),l.addEventListener("error",(function(){o(n.util.error(new Error("Network Failure"),{code:"NetworkingError"}))}),!1),l.addEventListener("abort",(function(){o(n.util.error(new Error("Request aborted"),{code:"RequestAbortedError"}))}),!1),r(u),l.open(e.method,c,!1!==t.xhrAsync),n.util.each(e.headers,(function(e,t){"Content-Length"!==e&&"User-Agent"!==e&&"Host"!==e&&l.setRequestHeader(e,t)})),t.timeout&&!1!==t.xhrAsync&&(l.timeout=t.timeout),t.xhrWithCredentials&&(l.withCredentials=!0);try{l.responseType="arraybuffer"}catch(e){}try{e.body?l.send(e.body):l.send()}catch(t){if(!e.body||"object"!=typeof e.body.buffer)throw t;l.send(e.body.buffer)}return u},parseHeaders:function(e){var t={};return n.util.arrayEach(e.split(/\r?\n/),(function(e){var r=e.split(":",1)[0],n=e.substring(r.length+2);r.length>0&&(t[r.toLowerCase()]=n)})),t},finishRequest:function(e,t){var r;if("arraybuffer"===e.responseType&&e.response){var i=e.response;r=new n.util.Buffer(i.byteLength);for(var o=new Uint8Array(i),s=0;s2?e(Array.prototype.slice.call(arguments,1)):void e(n)}))}))}r.d(t,"a",(function(){return n}))}).call(this,r(6))},function(e,t,r){var n={util:r(7)};({}).toString(),e.exports=n,n.util.update(n,{VERSION:"2.656.0",Signers:{},Protocol:{Json:r(70),Query:r(112),Rest:r(48),RestJson:r(114),RestXml:r(115)},XML:{Builder:r(272),Parser:null},JSON:{Builder:r(71),Parser:r(72)},Model:{Api:r(116),Operation:r(117),Shape:r(39),Paginator:r(118),ResourceWaiter:r(119)},apiLoader:r(277),EndpointCache:r(278).EndpointCache}),r(121),r(280),r(283),r(124),r(284),r(286),r(288),r(289),r(290),r(297),n.events=new n.SequentialExecutor,n.util.memoizedProperty(n,"endpointCache",(function(){return new n.EndpointCache(n.config.endpointCacheSize)}),!0)},function(e,t,r){var n;e.exports=(n=n||function(e,t){var r={},n=r.lib={},i=n.Base=function(){function e(){}return{extend:function(t){e.prototype=this;var r=new e;return t&&r.mixIn(t),r.hasOwnProperty("init")||(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),o=n.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||a).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[n+o>>>2]|=s<<24-(n+o)%4*8}else for(o=0;o>>2]=r[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r,n=[],i=function(t){t=t;var r=987654321,n=4294967295;return function(){var i=((r=36969*(65535&r)+(r>>16)&n)<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},s=0;s>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new o.init(r,t/2)}},u=s.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new o.init(r,t)}},c=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},l=n.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,s=this.blockSize,a=i/(4*s),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,c=e.min(4*u,i);if(u){for(var l=0;l1)for(var r=1;r=e.length)return t.push(null);var i=r+n;i>e.length&&(i=e.length),t.push(e.slice(r,i)),r=i},t},concat:function(e){var t,r,n=0,i=0;for(r=0;r>>8^t[255&(r^e.readUInt8(n))]}return(-1^r)>>>0},hmac:function(e,t,r,n){return r||(r="binary"),"buffer"===r&&(r=void 0),n||(n="sha256"),"string"==typeof t&&(t=o.buffer.toBuffer(t)),o.crypto.lib.createHmac(n,e).update(t).digest(r)},md5:function(e,t,r){return o.crypto.hash("md5",e,t,r)},sha256:function(e,t,r){return o.crypto.hash("sha256",e,t,r)},hash:function(e,t,r,n){var i=o.crypto.createHash(e);r||(r="binary"),"buffer"===r&&(r=void 0),"string"==typeof t&&(t=o.buffer.toBuffer(t));var s=o.arraySliceFn(t),a=o.Buffer.isBuffer(t);if(o.isBrowser()&&"undefined"!=typeof ArrayBuffer&&t&&t.buffer instanceof ArrayBuffer&&(a=!0),n&&"object"==typeof t&&"function"==typeof t.on&&!a)t.on("data",(function(e){i.update(e)})),t.on("error",(function(e){n(e)})),t.on("end",(function(){n(null,i.digest(r))}));else{if(!n||!s||a||"undefined"==typeof FileReader){o.isBrowser()&&"object"==typeof t&&!a&&(t=new o.Buffer(new Uint8Array(t)));var u=i.update(t).digest(r);return n&&n(null,u),u}var c=0,l=new FileReader;l.onerror=function(){n(new Error("Failed to read data."))},l.onload=function(){var e=new o.Buffer(new Uint8Array(l.result));i.update(e),c+=e.length,l._continueReading()},l._continueReading=function(){if(c>=t.size)n(null,i.digest(r));else{var e=c+524288;e>t.size&&(e=t.size),l.readAsArrayBuffer(s.call(t,c,e))}},l._continueReading()}},toHex:function(e){for(var t=[],r=0;r=3e5,!1),i.config.isClockSkewed},applyClockOffset:function(e){e&&(i.config.systemClockOffset=e-(new Date).getTime())},extractRequestId:function(e){var t=e.httpResponse.headers["x-amz-request-id"]||e.httpResponse.headers["x-amzn-requestid"];!t&&e.data&&e.data.ResponseMetadata&&(t=e.data.ResponseMetadata.RequestId),t&&(e.requestId=t),e.error&&(e.error.requestId=t)},addPromises:function(e,t){var r=!1;void 0===t&&i&&i.config&&(t=i.config.getPromisesDependency()),void 0===t&&"undefined"!=typeof Promise&&(t=Promise),"function"!=typeof t&&(r=!0),Array.isArray(e)||(e=[e]);for(var n=0;n=0?(a++,setTimeout(c,i+(e.retryAfter||0))):r(e)},c=function(){var t="";n.handleRequest(e,s,(function(e){e.on("data",(function(e){t+=e.toString()})),e.on("end",(function(){var n=e.statusCode;if(n<300)r(null,t);else{var i=1e3*parseInt(e.headers["retry-after"],10)||0,s=o.error(new Error,{statusCode:n,retryable:n>=500||429===n});i&&s.retryable&&(s.retryAfter=i),u(s)}}))}),u)};i.util.defer(c)},uuid:{v4:function(){return r(81).v4()}},convertPayloadToString:function(e){var t=e.request,r=t.operation,n=t.service.api.operations[r].output||{};n.payload&&e.data[n.payload]&&(e.data[n.payload]=e.data[n.payload].toString())},defer:function(e){"object"==typeof t&&"function"==typeof t.nextTick?t.nextTick(e):"function"==typeof n?n(e):setTimeout(e,0)},getRequestPayloadShape:function(e){var t=e.service.api.operations;if(t){var r=(t||{})[e.operation];if(r&&r.input&&r.input.payload)return r.input.members[r.input.payload]}},getProfilesFromSharedConfig:function(e,r){var n={},i={};if(t.env[o.configOptInEnv])i=e.loadFrom({isConfig:!0,filename:t.env[o.sharedConfigFileEnv]});for(var s=e.loadFrom({filename:r||t.env[o.configOptInEnv]&&t.env[o.sharedCredentialsFileEnv]}),a=0,u=Object.keys(i);a=6},parse:function(e){var t=e.split(":");return{partition:t[1],service:t[2],region:t[3],accountId:t[4],resource:t.slice(5).join(":")}},build:function(e){if(void 0===e.service||void 0===e.region||void 0===e.accountId||void 0===e.resource)throw o.error(new Error("Input ARN object is invalid"));return"arn:"+(e.partition||"aws")+":"+e.service+":"+e.region+":"+e.accountId+":"+e.resource}},defaultProfile:"default",configOptInEnv:"AWS_SDK_LOAD_CONFIG",sharedCredentialsFileEnv:"AWS_SHARED_CREDENTIALS_FILE",sharedConfigFileEnv:"AWS_CONFIG_FILE",imdsDisabledEnv:"AWS_EC2_METADATA_DISABLED"};e.exports=o}).call(this,r(6),r(90).setImmediate)},function(e,t,r){"use strict";r.d(t,"a",(function(){return v}));var n=r(33),i=r(10),o=r(5),s=r(1),a=r(12),u=r(0),c=r(2);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var r=0;r>>2];e.sigBytes-=t}},o.BlockCipher=h.extend({cfg:h.cfg.extend({mode:y,padding:m}),reset:function(){h.reset.call(this);var e=this.cfg,t=e.iv,r=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=r.createEncryptor;else n=r.createDecryptor,this._minBufferSize=1;this._mode=n.call(r,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4}),v=o.CipherParams=s.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(i.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;if(r)var n=a.create([1398893684,1701076831]).concat(r).concat(t);else n=t;return n.toString(l)},parse:function(e){var t=l.parse(e),r=t.words;if(1398893684==r[0]&&1701076831==r[1]){var n=a.create(r.slice(2,4));r.splice(0,4),t.sigBytes-=16}return v.create({ciphertext:t,salt:n})}},b=o.SerializableCipher=s.extend({cfg:s.extend({format:g}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),o=i.finalize(t),s=i.cfg;return v.create({ciphertext:o,key:r,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),_=(i.kdf={}).OpenSSL={execute:function(e,t,r,n){n||(n=a.random(8));var i=f.create({keySize:t+r}).compute(e,n),o=a.create(i.words.slice(t),4*r);return i.sigBytes=4*t,v.create({key:i,iv:o,salt:n})}},w=o.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:_}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=i.iv;var o=b.encrypt.call(this,e,t,i.key,n);return o.mixIn(i),o},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);return n.iv=i.iv,b.decrypt.call(this,e,t,i.key,n)}}))))},function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return b}));var n=r(50),i=r(8),o=r(52),s=r(35),a=r(55),u=r(56),c=r(128),l=r(1),f=r(5),h=r(0),p=r(2);function d(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null;return Object.keys(t).forEach((function(t){e.includes(t)||(r=t)})),r},getRequiedFilter:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[],n=Object.keys(t);return e.forEach((function(e){n.includes(e)||r.push(e)})),r}}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){var n=r(15),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";(function(e){
+/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author Feross Aboukhadijeh
+ * @license MIT
+ */
+var n=r(154),i=r(155),o=r(86);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(e).length;default:if(n)return B(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return x(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,i){var o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var f=!0,h=0;hi&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],s=e[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=e[i+1],s=e[i+2],a=e[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,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(n,i),l=e.slice(t,r),f=0;fi)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return S(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function L(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function D(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,o){return o||D(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function M(e,t,r,n,o){return o||D(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||P(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=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((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function F(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(13))},function(e,t,r){"use strict";var n=r(29),i=r(97),o=r(61),s=r(98),a=r(99);(e.exports=function(e,t){var r,i,u,c,l;return arguments.length<2||"string"!=typeof e?(c=t,t=e,e=null):c=arguments[2],n(e)?(r=a.call(e,"c"),i=a.call(e,"e"),u=a.call(e,"w")):(r=u=!0,i=!1),l={value:t,configurable:r,enumerable:i,writable:u},c?o(s(c),l):l}).gs=function(e,t,r){var u,c,l,f;return"string"!=typeof e?(l=r,r=t,t=e,e=null):l=arguments[3],n(t)?i(t)?n(r)?i(r)||(l=r,r=void 0):r=void 0:(l=t,t=r=void 0):t=void 0,n(e)?(u=a.call(e,"c"),c=a.call(e,"e")):(u=!0,c=!1),f={get:t,set:r,configurable:u,enumerable:c},l?o(s(l),f):f}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var n=r(33),i=(r(1),r(5)),o=(r(10),r(0)),s=r(2);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var r=0;r0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)o(u,this,t);else{var c=u.length,l=m(u,c);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):y.call(e,t)},a.prototype.listenerCount=y,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){"use strict";var n=r(28);e.exports=function(e){if(!n(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,r){"use strict";r.d(t,"a",(function(){return _}));var n=r(33),i=(r(18),r(35)),o=r(10),s=r(5),a=r(1),u=(r(12),r(53)),c=(r(81),r(0)),l=r(2);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null,t={typing_events:!0,read_events:!0,push_notification:!0},r=this.config||{};return r=p({},t,{},r),e?r[e]:r}},{key:"join",value:function(e){var t=this;return Object(l.a)(e,(function(e){return t.isGroup?"public"!=t.type?function(e){throw e}(new Error(a.a.PUBLIC_CONVERSATION_REQUIRED)):void c.a.request(b.basePath+"/"+t.id+"/join",{method:"post"}).then((function(t){return e(null,t.data)})).catch((function(t){return e(c.a.error(t))})):function(e){throw e}(new Error(a.a.GROUP_CONVERSATION_REQUIRED))}))}},{key:"addAdmin",value:function(e,t){var r=this;return Object(l.a)(t,(function(t){return r.isGroup?e&&"string"==typeof e?void c.a.request(b.basePath+"/"+r.id+"/add_admin",{method:"put",data:{userId:e}}).then((function(e){return t(null,e.data)})).catch((function(e){return t(c.a.error(e))})):function(e){throw e}(new Error(a.a.INVALID_USER_ID)):function(e){throw e}(new Error(a.a.GROUP_CONVERSATION_REQUIRED))}))}},{key:"addMembers",value:function(e,t){var r=this;return Object(l.a)(t,(function(t){return r.isGroup?Array.isArray(e)?void c.a.request(b.basePath+"/"+r.id+"/add_members",{method:"post",data:{members:e}}).then((function(e){return t(null,e.data)})).catch((function(e){return t(c.a.error(e))})):function(e){throw e}(new Error(a.a.INVALID_MEMBER_IDS)):function(e){throw e}(new Error(a.a.GROUP_CONVERSATION_REQUIRED))}))}},{key:"removeMembers",value:function(e,t){var r=this;return Object(l.a)(t,(function(t){return r.isGroup?Array.isArray(e)?void c.a.request(b.basePath+"/"+r.id+"/remove_members",{method:"post",data:{members:e}}).then((function(e){return t(null,e.data)})).catch((function(e){return t(c.a.error(e))})):function(e){throw e}(new Error(a.a.INVALID_MEMBER_IDS)):function(e){throw e}(new Error(a.a.GROUP_CONVERSATION_REQUIRED))}))}},{key:"clear",value:function(e){var t=this;return Object(l.a)(e,(function(e){if("private"!=t.type)return e(new Error(a.a.CAN_NOT_CLEAR_CONVERSATION));c.a.request(b.basePath+"/"+t.id+"/clear",{method:"delete"}).then((function(t){return e(null,t.data)})).catch((function(t){return e(c.a.error(t))}))}))}},{key:"delete",value:function(e){var t=this;return Object(l.a)(e,(function(e){c.a.request(b.basePath+"/"+t.id+"/delete",{method:"delete"}).then((function(t){return e(null,t.data)})).catch((function(t){return e(c.a.error(t))}))}))}},{key:"leave",value:function(e){var t=this;return Object(l.a)(e,(function(e){c.a.request(b.basePath+"/"+t.id+"/leave",{method:"post"}).then((function(t){return e(null,t.data)})).catch((function(t){return e(c.a.error(t))}))}))}},{key:"markAsRead",value:function(e,t){var r=this;return Object(l.a)(t,(function(t){if(!r.getConfig("read_events"))return t(new Error(a.a.CONVERSATION_NOT_CONFIGURED_READ_EVENTS));var n;if(e)n=e;else{var i=new Date;n=i.toISOString()}c.a.request(b.basePath+"/"+r.id+"/mark_as_read",{method:"put",data:{timestamp:n}}).then((function(e){var i=o.a.getInstance();return r.lastReadAt.hasOwnProperty(i.loginUser.id)&&(r.lastReadAt[i.loginUser.id]=n),t(null,e.data)})).catch((function(e){return t(c.a.error(e))}))}))}},{key:"updateTitle",value:function(e,t){var r=this;return Object(l.a)(t,(function(t){return r.isGroup?"string"!=typeof e?function(e){throw e}(new Error(a.a.INVALID_TITLE)):void c.a.request(b.basePath+"/"+r.id+"/update_title",{method:"put",data:{title:e}}).then((function(e){return t(null,e.data)})).catch((function(e){return t(c.a.error(e))})):function(e){throw e}(new Error(a.a.GROUP_CONVERSATION_REQUIRED))}))}},{key:"muteConversation",value:function(e){var t=this;return Object(l.a)(e,(function(e){c.a.request(b.basePath+"/"+t.id+"/update_settings",{method:"put",data:{mute:!0}}).then((function(t){return e(null,t.data)})).catch((function(t){return e(c.a.error(t))}))}))}},{key:"unmuteConversation",value:function(e){var t=this;return Object(l.a)(e,(function(e){c.a.request(b.basePath+"/"+t.id+"/update_settings",{method:"put",data:{mute:!1}}).then((function(t){return e(null,t.data)})).catch((function(t){return e(c.a.error(t))}))}))}},{key:"updateProfilePhoto",value:function(e,t){var r=this;return Object(l.a)(t,(function(t){return r.isGroup?"object"!=f(e)?function(e){throw e}(new Error(a.a.INVALID_PROFILE_IMG)):void o.a.getInstance().File.upload(e,"image",!1,(function(e,n){if(e)return t(e);var i={profileImageUrl:n.fileUrl};c.a.request(b.basePath+"/"+r.id+"/update_profile",{method:"put",data:i}).then((function(e){return t(null,e.data)})).catch((function(e){return t(e,null)}))})):function(e){throw e}(new Error(a.a.GROUP_CONVERSATION_REQUIRED))}))}},{key:"sendMessage",value:function(e,t){var r=this;return Object(l.a)(t,(function(t){e.conversationId=r.id,e.isGroup=r.isGroup,r.messageService._sendMessage(e,(function(e,r){return e?t(c.a.error(e)):t(null,r)}))}))}},{key:"startTyping",value:function(e){var t=this;return Object(l.a)(e,(function(e){if(!t.getConfig("typing_events"))return e(new Error(a.a.CONVERSATION_NOT_CONFIGURED_TYPING_EVENTS));c.a.request(b.basePath+"/"+t.id+"/send_typing_status",{method:"post",data:{isTyping:!0}}).then((function(t){return e(null,t.data)})).catch((function(t){return e(c.a.error(t))}))}))}},{key:"stopTyping",value:function(e){var t=this;return Object(l.a)(e,(function(e){if(!t.getConfig("typing_events"))return e(new Error(a.a.CONVERSATION_NOT_CONFIGURED_TYPING_EVENTS));c.a.request(b.basePath+"/"+t.id+"/send_typing_status",{method:"post",data:{isTyping:!1}}).then((function(t){return e(null,t.data)})).catch((function(t){return e(c.a.error(t))}))}))}},{key:"getMembers",value:function(e){var t=this;if(this.members.length)return e(null,this.members);c.a.request(b.basePath+"/"+this.id+"/members").then((function(r){return t.members=r.data,e(null,r.data)})).catch((function(t){return e(c.a.error(t))}))}},{key:"getReadMembers",value:function(e){var t=this;if("object"!=f(e))return function(e){throw e}(new Error(a.a.INVALID_MESSAGE_OBJECT));var r={};return Object.keys(this.lastReadAt).forEach((function(n){e.createdAt<=t.lastReadAt[n]&&(r[n]=t.lastReadAt[n])})),r}},{key:"readByAllMembers",value:function(e){var t=this;if("object"!=f(e))return function(e){throw e}(new Error(a.a.INVALID_MESSAGE_OBJECT));var r=!0;return Object.keys(this.lastReadAt).forEach((function(n){e.createdAt>=t.lastReadAt[n]&&e.ownerId!=n&&(r=!1)})),r}},{key:"createMessageListQuery",value:function(){return new u.a(this.id)}}])&&d(r.prototype,n),s&&d(r,s),b}(n.a);b(_,"__properties",{id:null,type:null,config:{},customType:null,metaData:{},lastMessage:{},lastReadAt:{},title:null,isGroup:null,createdAt:null,memberCount:0,ownerId:null,members:[],profileImageUrl:null,isActive:null,isAdmin:null,isDeleted:null,mute:null,unreadMessageCount:null,updatedAt:null,user:{}}),b(_,"basePath",s.a.BASEPATH_CONVERSATIONS)},function(e,t,r){"use strict";e.exports=r(186)()?r(43).Symbol:r(189)},function(e,t,r){"use strict";var n=r(37),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=f;var o=Object.create(r(38));o.inherits=r(20);var s=r(85),a=r(89);o.inherits(f,s);for(var u=i(a.prototype),c=0;c>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a