text: !function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){var t={};function r(s){if(t[s])return t[s].exports;var n=t[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,s){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(r.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(s,n,function(t){return e[t]}.bind(null,n));return s},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=12)}([function(e,t,r){"use strict";const s=r(4),n=r(16),i=r(17),o=r(1),a=r(2),c=new s.Agent({keepAlive:!0}),u=new n.Agent({keepAlive:!0});function p(e,t){if(this._stripe=e,t)throw new a("Support for curried url params was dropped in stripe-node v7.0.0. Instead, pass two ids.");this.basePath=o.makeURLInterpolator(this.basePath||e.getApiField("basePath")),this.resourcePath=this.path,this.path=o.makeURLInterpolator(this.path),this.includeBasic&&this.includeBasic.forEach(function(e){this[e]=p.BASIC_METHODS[e]},this),this.initialize(...arguments)}p.extend=o.protoExtend,p.method=r(9),p.BASIC_METHODS=r(23),p.MAX_BUFFERED_REQUEST_METRICS=100,p.prototype={path:"",basePath:null,initialize(){},requestDataProcessor:null,validateRequest:null,createFullPath(e,t){return i.join(this.basePath(t),this.path(t),"function"==typeof e?e(t):e).replace(/\\/g,"/")},createResourcePathWithSymbols(e){return`/${i.join(this.resourcePath,e||"").replace(/\\/g,"/")}`},wrapTimeout:o.callbackifyPromiseWithTimeout,_timeoutHandler(e,t,r){return()=>{const s=new TypeError("ETIMEDOUT");s.code="ETIMEDOUT",t._isAborted=!0,t.abort(),r.call(this,new a.StripeConnectionError({message:`Request aborted due to timeout being reached (${e}ms)`,detail:s}),null)}},_responseHandler(e,t){return r=>{let s="";r.setEncoding("utf8"),r.on("data",e=>{s+=e}),r.once("end",()=>{const n=r.headers||{};r.requestId=n["request-id"];const i=Date.now(),c=i-e._requestStart,u=o.removeNullish({api_version:n["stripe-version"],account:n["stripe-account"],idempotency_key:n["idempotency-key"],method:e._requestEvent.method,path:e._requestEvent.path,status:r.statusCode,request_id:r.requestId,elapsed:c,request_start_time:e._requestStart,request_end_time:i});this._stripe._emitter.emit("response",u);try{if((s=JSON.parse(s)).error){let e;return"string"==typeof s.error&&(s.error={type:s.error,message:s.error_description}),s.error.headers=n,s.error.statusCode=r.statusCode,s.error.requestId=r.requestId,e=401===r.statusCode?new a.StripeAuthenticationError(s.error):403===r.statusCode?new a.StripePermissionError(s.error):429===r.statusCode?new a.StripeRateLimitError(s.error):a.StripeError.generate(s.error),t.call(this,e,null)}}catch(e){return t.call(this,new a.StripeAPIError({message:"Invalid JSON received from the Stripe API",response:s,exception:e,requestId:n["request-id"]}),null)}this._recordRequestMetrics(r.requestId,c),Object.defineProperty(s,"lastResponse",{enumerable:!1,writable:!1,value:r}),t.call(this,null,s)})}},_generateConnectionErrorMessage:e=>`An error occurred with our connection to Stripe.${e>0?` Request was retried ${e} times.`:""}`,_errorHandler(e,t,r){return s=>{e._isAborted||r.call(this,new a.StripeConnectionError({message:this._generateConnectionErrorMessage(t),detail:s}),null)}},_shouldRetry(e,t){return!(t>=this._stripe.getMaxNetworkRetries())&&(!e||(409===e.statusCode||503===e.statusCode||e.statusCode>=500&&"POST"!==e.req._requestEvent.method))},_getSleepTimeInMS(e){const t=this._stripe.getInitialNetworkRetryDelay(),r=this._stripe.getMaxNetworkRetryDelay();let s=Math.min(t*Math.pow(e-1,2),r);return s*=.5*(1+Math.random()),1e3*(s=Math.max(t,s))},_defaultIdempotencyKey(e){return"POST"===e&&this._stripe.getMaxNetworkRetries()>0?`stripe-node-retry-${o.uuid4()}`:null},_makeHeaders(e,t,r,s,n,i){const a={Authorization:e?`Bearer ${e}`:this._stripe.getApiField("auth"),Accept:"application/json","Content-Type":"application/x-www-form-urlencoded","Content-Length":t,"User-Agent":this._getUserAgentString(),"X-Stripe-Client-User-Agent":s,"X-Stripe-Client-Telemetry":this._getTelemetryHeader(),"Stripe-Version":r,"Idempotency-Key":this._defaultIdempotencyKey(n)};return Object.assign(o.removeNullish(a),o.normalizeHeaders(i))},_getUserAgentString(){return`Stripe/v1 NodeBindings/${this._stripe.getConstant("PACKAGE_VERSION")} ${this._stripe._appInfo?this._stripe.getAppInfoAsString():""}`.trim()},_getTelemetryHeader(){if(this._stripe.getTelemetryEnabled()&&this._stripe._prevRequestMetrics.length>0){const e=this._stripe._prevRequestMetrics.shift();return JSON.stringify({last_request_metrics:e})}},_recordRequestMetrics(e,t){this._stripe.getTelemetryEnabled()&&e&&(this._stripe._prevRequestMetrics.length>p.MAX_BUFFERED_REQUEST_METRICS?o.emitWarning("Request metrics buffer is full, dropping telemetry message."):this._stripe._prevRequestMetrics.push({request_id:e,request_duration_ms:t}))},_request(e,t,r,i,a,p,l){let d;const h=(e,t,r,s)=>setTimeout(e,this._getSleepTimeInMS(s),t,r,s+1),m=(i,a,p)=>{const f=this._stripe.getApiField("timeout"),g="http"==this._stripe.getApiField("protocol");let y=this._stripe.getApiField("agent");null==y&&(y=g?c:u);const x=(g?s:n).request({host:t||this._stripe.getApiField("host"),port:this._stripe.getApiField("port"),path:r,method:e,agent:y,headers:a,ciphers:"DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:!MD5"}),_=Date.now(),E=o.removeNullish({api_version:i,account:a["Stripe-Account"],idempotency_key:a["Idempotency-Key"],method:e,path:r,request_start_time:_}),v=p||0;x._requestEvent=E,x._requestStart=_,this._stripe._emitter.emit("request",E),x.setTimeout(f,this._timeoutHandler(f,x,l)),x.once("response",e=>this._shouldRetry(e,v)?h(m,i,a,v):this._responseHandler(x,l)(e)),x.on("error",e=>this._shouldRetry(null,v)?h(m,i,a,v):this._errorHandler(x,v,l)(e)),x.once("socket",e=>{e.connecting?e.once(g?"connect":"secureConnect",()=>{x.write(d),x.end()}):(x.write(d),x.end())})},f=(t,r)=>{if(t)return l(t);d=r,this._stripe.getClientUserAgent(t=>{const r=this._stripe.getApiField("version"),s=this._makeHeaders(a,d.length,r,t,e,p.headers);m(r,s)})};this.requestDataProcessor?this.requestDataProcessor(e,i,p.headers,f):f(null,o.stringifyRequestData(i||{}))}},e.exports=p},function(e,t,r){"use strict";const s=r(5).EventEmitter,n=r(18).exec,i=r(19),o=r(8),a=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c=["api_key","idempotency_key","stripe_account","stripe_version"],u=e.exports={isOptionsHash:e=>e&&"object"==typeof e&&c.some(t=>a(e,t)),stringifyRequestData:e=>i.stringify(e,{serializeDate:e=>Math.floor(e.getTime()/1e3)}).replace(/%5B/g,"[").replace(/%5D/g,"]"),makeURLInterpolator:(()=>{const e={"\n":"\\n",'"':'\\"',"\u2028":"\\u2028","\u2029":"\\u2029"};return t=>{const r=t.replace(/["\n\r\u2028\u2029]/g,t=>e[t]);return e=>r.replace(/\{([\s\S]+?)\}/g,(t,r)=>encodeURIComponent(e[r]||""))}})(),extractUrlParams:e=>{const t=e.match(/\{\w+\}/g);return t?t.map(e=>e.replace(/[{}]/g,"")):[]},getDataFromArgs(e){if(!Array.isArray(e)||!e[0]||"object"!=typeof e[0])return{};if(!u.isOptionsHash(e[0]))return e.shift();const t=Object.keys(e[0]),r=t.filter(e=>c.includes(e));return r.length>0&&r.length!==t.length&&p(`Options found in arguments (${r.join(", ")}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options.`),{}},getOptionsFromArgs:e=>{const t={auth:null,headers:{}};if(e.length>0){const r=e[e.length-1];if("string"==typeof r)t.auth=e.pop();else if(u.isOptionsHash(r)){const r=e.pop(),s=Object.keys(r).filter(e=>!c.includes(e));s.length&&p(`Invalid options found (${s.join(", ")}); ignoring.`),r.api_key&&(t.auth=r.api_key),r.idempotency_key&&(t.headers["Idempotency-Key"]=r.idempotency_key),r.stripe_account&&(t.headers["Stripe-Account"]=r.stripe_account),r.stripe_version&&(t.headers["Stripe-Version"]=r.stripe_version)}}return t},protoExtend(e){const t=this,r=a(e,"constructor")?e.constructor:function(...e){t.apply(this,e)};return Object.assign(r,t),r.prototype=Object.create(t.prototype),Object.assign(r.prototype,e),r},secureCompare:(e,t)=>{if(e=Buffer.from(e),t=Buffer.from(t),e.length!==t.length)return!1;if(o.timingSafeEqual)return o.timingSafeEqual(e,t);const r=e.length;let s=0;for(let n=0;n<r;++n)s|=e[n]^t[n];return 0===s},removeNullish:e=>{if("object"!=typeof e)throw new Error("Argument must be an object");return Object.keys(e).reduce((t,r)=>(null!=e[r]&&(t[r]=e[r]),t),{})},normalizeHeaders:e=>e&&"object"==typeof e?Object.keys(e).reduce((t,r)=>(t[u.normalizeHeader(r)]=e[r],t),{}):e,normalizeHeader:e=>e.split("-").map(e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()).join("-"),checkForStream:e=>!(!e.file||!e.file.data)&&e.file.data instanceof s,callbackifyPromiseWithTimeout:(e,t)=>t?e.then(e=>{setTimeout(()=>{t(null,e)},0)},e=>{setTimeout(()=>{t(e,null)},0)}):e,pascalToCamelCase:e=>"OAuth"===e?"oauth":e[0].toLowerCase()+e.substring(1),emitWarning:p,safeExec:(e,t)=>{try{u._exec(e,t)}catch(e){t(e,null)}},_exec:n,isObject:e=>{const t=typeof e;return("function"===t||"object"===t)&&!!e},flattenAndStringify:e=>{const t={},r=(e,s)=>{Object.keys(e).forEach(n=>{const i=e[n],o=s?`${s}[${n}]`:n;if(u.isObject(i)){if(!Buffer.isBuffer(i)&&!i.hasOwnProperty("data"))return r(i,o);t[o]=i}else t[o]=String(i)})};return r(e),t},uuid4:()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})};function p(e){return"function"!=typeof process.emitWarning?console.warn(`Stripe: ${e}`):process.emitWarning(e,"Stripe")}},function(e,t,r){"use strict";const s=r(1);class n extends Error{constructor(e={}){super(e.message),this.populate(...arguments)}get type(){return this.constructor.name}populate(e){this.raw=e,e&&"object"==typeof e&&(this.rawType=e.type,this.code=e.code,this.param=e.param,this.detail=e.detail,this.headers=e.headers,this.requestId=e.requestId,this.statusCode=e.statusCode,this.message=e.message)}static generate(e){switch(e.type){case"card_error":return new i(e);case"invalid_request_error":return new o(e);case"api_error":return new a(e);case"idempotency_error":return new c(e);case"invalid_grant":return new u(e);default:return new GenericError("Generic","Unknown Error")}}static extend(e){const t=e.type;class r extends n{get type(){return t}}return delete e.type,Object.assign(r.prototype,e),r}}class i extends n{}class o extends n{}class a extends n{}class c extends n{}class u extends n{}function p(e){this.populate(...arguments),this.stack=new Error(this.message).stack}p.prototype=Object.create(Error.prototype),p.prototype.type="GenericError",p.prototype.populate=function(e,t){this.type=e,this.message=t},p.extend=s.protoExtend,e.exports=p,e.exports.StripeError=n,e.exports.StripeCardError=i,e.exports.StripeInvalidRequestError=o,e.exports.StripeAPIError=a,e.exports.StripeAuthenticationError=class extends n{},e.exports.StripePermissionError=class extends n{},e.exports.StripeRateLimitError=class extends n{},e.exports.StripeConnectionError=class extends n{},e.exports.StripeSignatureVerificationError=class extends n{},e.exports.StripeIdempotencyError=c,e.exports.StripeInvalidGrantError=u},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"",reject:n({method:"POST",path:"accounts/{account}/reject"}),create:n({method:"POST",path:"accounts"}),list:n({method:"GET",path:"accounts",methodType:"list"}),update:n({method:"POST",path:"accounts/{id}"}),del:n({method:"DELETE",path:"accounts/{id}"}),retrieve(e){return"string"==typeof e?n({method:"GET",path:"accounts/{id}"}).apply(this,arguments):(null==e&&[].shift.apply(arguments),n({method:"GET",path:"account"}).apply(this,arguments))},createLoginLink:n({method:"POST",path:"accounts/{account}/login_links"}),listCapabilities:n({method:"GET",path:"accounts/{account}/capabilities",methodType:"list"}),retrieveCapability:n({method:"GET",path:"accounts/{account}/capabilities/{capability}"}),updateCapability:n({method:"POST",path:"accounts/{account}/capabilities/{capability}"}),createExternalAccount:n({method:"POST",path:"accounts/{account}/external_accounts"}),deleteExternalAccount:n({method:"DELETE",path:"accounts/{account}/external_accounts/{id}"}),listExternalAccounts:n({method:"GET",path:"accounts/{account}/external_accounts",methodType:"list"}),retrieveExternalAccount:n({method:"GET",path:"accounts/{account}/external_accounts/{id}"}),updateExternalAccount:n({method:"POST",path:"accounts/{account}/external_accounts/{id}"}),createPerson:n({method:"POST",path:"accounts/{account}/persons"}),deletePerson:n({method:"DELETE",path:"accounts/{account}/persons/{person}"}),listPersons:n({method:"GET",path:"accounts/{account}/persons",methodType:"list"}),retrievePerson:n({method:"GET",path:"accounts/{account}/persons/{person}"}),updatePerson:n({method:"POST",path:"accounts/{account}/persons/{person}"})})},function(e,t){e.exports=require("http")},function(e,t){e.exports=require("events")},function(e,t,r){"use strict";var s=Object.prototype.hasOwnProperty,n=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},s=0;s<e.length;++s)void 0!==e[s]&&(r[s]=e[s]);return r};e.exports={arrayToObject:o,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],s=0;s<t.length;++s)for(var i=t[s],o=i.obj[i.prop],a=Object.keys(o),c=0;c<a.length;++c){var u=a[c],p=o[u];"object"==typeof p&&null!==p&&-1===r.indexOf(p)&&(t.push({obj:o,prop:u}),r.push(p))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(n(r)){for(var s=[],i=0;i<r.length;++i)void 0!==r[i]&&s.push(r[i]);t.obj[t.prop]=s}}}(t),e},decode:function(e,t,r){var s=e.replace(/\+/g," ");if("iso-8859-1"===r)return s.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(s)}catch(e){return s}},encode:function(e,t,r){if(0===e.length)return e;var s="string"==typeof e?e:String(e);if("iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var n="",o=0;o<s.length;++o){var a=s.charCodeAt(o);45===a||46===a||95===a||126===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?n+=s.charAt(o):a<128?n+=i[a]:a<2048?n+=i[192|a>>6]+i[128|63&a]:a<55296||a>=57344?n+=i[224|a>>12]+i[128|a>>6&63]+i[128|63&a]:(o+=1,a=65536+((1023&a)<<10|1023&s.charCodeAt(o)),n+=i[240|a>>18]+i[128|a>>12&63]+i[128|a>>6&63]+i[128|63&a])}return n},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(t,r,i){if(!r)return t;if("object"!=typeof r){if(n(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(i&&(i.plainObjects||i.allowPrototypes)||!s.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var a=t;return n(t)&&!n(r)&&(a=o(t,i)),n(t)&&n(r)?(r.forEach(function(r,n){if(s.call(t,n)){var o=t[n];o&&"object"==typeof o&&r&&"object"==typeof r?t[n]=e(o,r,i):t.push(r)}else t[n]=r}),t):Object.keys(r).reduce(function(t,n){var o=r[n];return s.call(t,n)?t[n]=e(t[n],o,i):t[n]=o,t},a)}}},function(e,t,r){"use strict";var s=String.prototype.replace,n=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return s.call(e,n,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t){e.exports=require("crypto")},function(e,t,r){"use strict";const s=r(1),n=r(10),i=r(22).makeAutoPaginationMethods;e.exports=function(e){return function(...t){const r="function"==typeof t[t.length-1]&&t.pop();e.urlParams=s.extractUrlParams(this.createResourcePathWithSymbols(e.path||""));const o=s.callbackifyPromiseWithTimeout(n(this,t,e,{}),r);if("list"===e.methodType){const r=i(this,t,e,o);Object.assign(o,r)}return o}}},function(e,t,r){"use strict";const s=r(1);e.exports=function(e,t,r,n){return new Promise((i,o)=>{try{var a=function(e,t,r,n){const i=s.makeURLInterpolator(r.path||""),o=(r.method||"GET").toUpperCase(),a=r.urlParams||[],c=r.encode||(e=>e),u=r.host,p=e.createResourcePathWithSymbols(r.path),l=[].slice.call(t),d=a.reduce((e,t)=>{const r=l.shift();if("string"!=typeof r)throw new Error(`Stripe: Argument "${t}" must be a string, but got: ${r} (on API request to \`${o} ${p}\`)`);return e[t]=r,e},{}),h=s.getDataFromArgs(l),m=c(Object.assign({},h,n)),f=s.getOptionsFromArgs(l);if(l.length)throw new Error(`Stripe: Unknown arguments (${l}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options. (on API request to ${o} \`${p}\`)`);const g=e.createFullPath(i,d),y=Object.assign(f.headers,r.headers);return r.validator&&r.validator(m,{headers:y}),{requestMethod:o,requestPath:g,data:m,auth:f.auth,headers:y,host:u}}(e,t,r,n)}catch(e){return void o(e)}e._request(a.requestMethod,a.host,a.requestPath,a.data,a.auth,{headers:a.headers},function(e,t){e?o(e):i(r.transformResponseData?r.transformResponseData(t):t)})})}},function(e,t,r){"use strict";const s=r(8),n=r(1),i=r(2),o={DEFAULT_TOLERANCE:300,constructEvent(e,t,r,s){return this.signature.verifyHeader(e,t,r,s||o.DEFAULT_TOLERANCE),JSON.parse(e)},generateTestHeaderString:function(e){if(!e)throw new i.StripeError({message:"Options are required"});return e.timestamp=Math.floor(e.timestamp)||Math.floor(Date.now()/1e3),e.scheme=e.scheme||a.EXPECTED_SCHEME,e.signature=e.signature||a._computeSignature(e.timestamp+"."+e.payload,e.secret),["t="+e.timestamp,e.scheme+"="+e.signature].join(",")}},a={EXPECTED_SCHEME:"v1",_computeSignature:(e,t)=>s.createHmac("sha256",t).update(e,"utf8").digest("hex"),verifyHeader(e,t,r,s){e=Buffer.isBuffer(e)?e.toString("utf8"):e;const o=function(e,t){if("string"!=typeof e)return null;return e.split(",").reduce((e,r)=>{const s=r.split("=");return"t"===s[0]&&(e.timestamp=s[1]),s[0]===t&&e.signatures.push(s[1]),e},{timestamp:-1,signatures:[]})}(t=Buffer.isBuffer(t)?t.toString("utf8"):t,this.EXPECTED_SCHEME);if(!o||-1===o.timestamp)throw new i.StripeSignatureVerificationError({message:"Unable to extract timestamp and signatures from header",detail:{header:t,payload:e}});if(!o.signatures.length)throw new i.StripeSignatureVerificationError({message:"No signatures found with expected scheme",detail:{header:t,payload:e}});const a=this._computeSignature(`${o.timestamp}.${e}`,r);if(!!!o.signatures.filter(n.secureCompare.bind(n,a)).length)throw new i.StripeSignatureVerificationError({message:"No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe? https://github.com/stripe/stripe-node#webhook-signing",detail:{header:t,payload:e}});const c=Math.floor(Date.now()/1e3)-o.timestamp;if(s>0&&c>s)throw new i.StripeSignatureVerificationError({message:"Timestamp outside the tolerance zone",detail:{header:t,payload:e}});return!0}};o.signature=a,e.exports=o},function(e,t,r){const s=r(13)("sk_test_g9TaOomlhXgoN5ZQ8DkfCSKu00uRRiuO5d");t.handler=async function(e){const{tokenId:t,email:r,name:n,description:i,amount:o}=JSON.parse(e.body),a=await s.customers.create({description:r,source:t});await s.charges.create({customer:a.id,amount:o,name:n,description:i,currency:"usd"})}},function(e,t,r){"use strict";const s=r(14);a.DEFAULT_HOST="api.stripe.com",a.DEFAULT_PORT="443",a.DEFAULT_BASE_PATH="/v1/",a.DEFAULT_API_VERSION=null,a.DEFAULT_TIMEOUT=r(4).createServer().timeout,a.PACKAGE_VERSION=r(85).version,a.USER_AGENT={bindings_version:a.PACKAGE_VERSION,lang:"node",lang_version:process.version,platform:process.platform,publisher:"stripe",uname:null},a.USER_AGENT_SERIALIZED=null,a.MAX_NETWORK_RETRY_DELAY_SEC=2,a.INITIAL_NETWORK_RETRY_DELAY_SEC=.5;const n=["name","version","url","partner_id"],i=r(5).EventEmitter,o=r(1);function a(e,t){if(!(this instanceof a))return new a(e,t);Object.defineProperty(this,"_emitter",{value:new i,enumerable:!1,configurable:!1,writable:!1}),this.on=this._emitter.on.bind(this._emitter),this.once=this._emitter.once.bind(this._emitter),this.off=this._emitter.removeListener.bind(this._emitter),this._api={auth:null,host:a.DEFAULT_HOST,port:a.DEFAULT_PORT,basePath:a.DEFAULT_BASE_PATH,version:a.DEFAULT_API_VERSION,timeout:a.DEFAULT_TIMEOUT,agent:null,dev:!1,maxNetworkRetries:0},this._prepResources(),this.setApiKey(e),this.setApiVersion(t),this.errors=r(2),this.webhooks=r(11),this._prevRequestMetrics=[],this.setTelemetryEnabled(!0)}a.StripeResource=r(0),a.resources=s,a.errors=r(2),a.webhooks=r(11),a.prototype={setHost(e,t,r){this._setApiField("host",e),t&&this.setPort(t),r&&this.setProtocol(r)},setProtocol(e){this._setApiField("protocol",e.toLowerCase())},setPort(e){this._setApiField("port",e)},setApiVersion(e){e&&this._setApiField("version",e)},setApiKey(e){e&&this._setApiField("auth",`Bearer ${e}`)},setTimeout(e){this._setApiField("timeout",null==e?a.DEFAULT_TIMEOUT:e)},setAppInfo(e){if(e&&"object"!=typeof e)throw new Error("AppInfo must be an object.");if(e&&!e.name)throw new Error("AppInfo.name is required");e=e||{};const t=n.reduce((t,r)=>("string"==typeof e[r]&&((t=t||{})[r]=e[r]),t),void 0);a.USER_AGENT_SERIALIZED=void 0,this._appInfo=t},setHttpAgent(e){this._setApiField("agent",e)},_setApiField(e,t){this._api[e]=t},getApiField(e){return this._api[e]},setClientId(e){this._clientId=e},getClientId(){return this._clientId},getConstant:e=>a[e],getMaxNetworkRetries(){return this.getApiField("maxNetworkRetries")},setMaxNetworkRetries(e){if(e&&"number"!=typeof e||arguments.length<1)throw new Error("maxNetworkRetries must be a number.");this._setApiField("maxNetworkRetries",e)},getMaxNetworkRetryDelay(){return this.getConstant("MAX_NETWORK_RETRY_DELAY_SEC")},getInitialNetworkRetryDelay(){return this.getConstant("INITIAL_NETWORK_RETRY_DELAY_SEC")},getClientUserAgent(e){if(a.USER_AGENT_SERIALIZED)return e(a.USER_AGENT_SERIALIZED);this.getClientUserAgentSeeded(a.USER_AGENT,t=>{a.USER_AGENT_SERIALIZED=t,e(a.USER_AGENT_SERIALIZED)})},getClientUserAgentSeeded(e,t){o.safeExec("uname -a",(r,s)=>{const n={};for(const t in e)n[t]=encodeURIComponent(e[t]);n.uname=encodeURIComponent(s||"UNKNOWN"),this._appInfo&&(n.application=this._appInfo),t(JSON.stringify(n))})},getAppInfoAsString(){if(!this._appInfo)return"";let e=this._appInfo.name;return this._appInfo.version&&(e+=`/${this._appInfo.version}`),this._appInfo.url&&(e+=` (${this._appInfo.url})`),e},setTelemetryEnabled(e){this._enableTelemetry=e},getTelemetryEnabled(){return this._enableTelemetry},_prepResources(){for(const e in s)this[o.pascalToCamelCase(e)]=new s[e](this)}},e.exports=a,e.exports.Stripe=a},function(e,t,r){"use strict";const s=r(15);e.exports={Accounts:r(3),Account:r(3),AccountLinks:r(24),ApplePayDomains:r(25),ApplicationFees:r(26),Balance:r(27),BalanceTransactions:r(28),BitcoinReceivers:r(29),Charges:r(30),CountrySpecs:r(31),Coupons:r(32),CreditNotes:r(33),Customers:r(34),Disputes:r(35),EphemeralKeys:r(36),Events:r(37),ExchangeRates:r(38),Files:r(39),FileLinks:r(41),Invoices:r(42),InvoiceItems:r(43),IssuerFraudRecords:r(44),OAuth:r(45),Orders:r(46),OrderReturns:r(47),PaymentIntents:r(48),PaymentMethods:r(49),Payouts:r(50),Plans:r(51),Products:r(52),Recipients:r(53),Refunds:r(54),Reviews:r(55),SetupIntents:r(56),Skus:r(57),Sources:r(58),Subscriptions:r(59),SubscriptionItems:r(60),SubscriptionSchedules:r(61),TaxRates:r(62),ThreeDSecure:r(63),Tokens:r(64),Topups:r(65),Transfers:r(66),UsageRecords:r(67),UsageRecordSummaries:r(68),WebhookEndpoints:r(69),Checkout:s("checkout",{Sessions:r(70)}),Issuing:s("issuing",{Authorizations:r(71),Cards:r(72),Cardholders:r(73),Disputes:r(74),Transactions:r(75)}),Radar:s("radar",{EarlyFraudWarnings:r(76),ValueLists:r(77),ValueListItems:r(78)}),Reporting:s("reporting",{ReportRuns:r(79),ReportTypes:r(80)}),Sigma:s("sigma",{ScheduledQueryRuns:r(81)}),Terminal:s("terminal",{ConnectionTokens:r(82),Locations:r(83),Readers:r(84)})}},function(e,t,r){"use strict";function s(e,t){for(const r in t){const s=r[0].toLowerCase()+r.substring(1),n=new t[r](e);this[s]=n}}e.exports=function(e,t){return function(e){return new s(e,t)}},e.exports.ResourceNamespace=s},function(e,t){e.exports=require("https")},function(e,t){e.exports=require("path")},function(e,t){e.exports=require("child_process")},function(e,t,r){"use strict";var s=r(20),n=r(21),i=r(7);e.exports={formats:i,parse:n,stringify:s}},function(e,t,r){"use strict";var s=r(6),n=r(7),i=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,a(t)?t:[t])},p=Date.prototype.toISOString,l={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:s.encode,encodeValuesOnly:!1,formatter:n.formatters[n.default],indices:!1,serializeDate:function(e){return p.call(e)},skipNulls:!1,strictNullHandling:!1},d=function e(t,r,n,i,o,c,p,d,h,m,f,g,y){var x=t;if("function"==typeof p?x=p(r,x):x instanceof Date?x=m(x):"comma"===n&&a(x)&&(x=x.join(",")),null===x){if(i)return c&&!g?c(r,l.encoder,y):r;x=""}if("string"==typeof x||"number"==typeof x||"boolean"==typeof x||s.isBuffer(x))return c?[f(g?r:c(r,l.encoder,y))+"="+f(c(x,l.encoder,y))]:[f(r)+"="+f(String(x))];var _,E=[];if(void 0===x)return E;if(a(p))_=p;else{var v=Object.keys(x);_=d?v.sort(d):v}for(var T=0;T<_.length;++T){var S=_[T];o&&null===x[S]||(a(x)?u(E,e(x[S],"function"==typeof n?n(r,S):r,n,i,o,c,p,d,h,m,f,g,y)):u(E,e(x[S],r+(h?"."+S:"["+S+"]"),n,i,o,c,p,d,h,m,f,g,y)))}return E};e.exports=function(e,t){var r,s=e,c=function(e){if(!e)return l;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||l.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=n.default;if(void 0!==e.format){if(!i.call(n.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var s=n.formatters[r],o=l.filter;return("function"==typeof e.filter||a(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:l.addQueryPrefix,allowDots:void 0===e.allowDots?l.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:l.charsetSentinel,delimiter:void 0===e.delimiter?l.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:l.encode,encoder:"function"==typeof e.encoder?e.encoder:l.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:l.encodeValuesOnly,filter:o,formatter:s,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:l.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:l.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:l.strictNullHandling}}(t);"function"==typeof c.filter?s=(0,c.filter)("",s):a(c.filter)&&(r=c.filter);var p,h=[];if("object"!=typeof s||null===s)return"";p=t&&t.arrayFormat in o?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var m=o[p];r||(r=Object.keys(s)),c.sort&&r.sort(c.sort);for(var f=0;f<r.length;++f){var g=r[f];c.skipNulls&&null===s[g]||u(h,d(s[g],g,m,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.formatter,c.encodeValuesOnly,c.charset))}var y=h.join(c.delimiter),x=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?x+="utf8=%26%2310003%3B&":x+="utf8=%E2%9C%93&"),y.length>0?x+y:""}},function(e,t,r){"use strict";var s=r(6),n=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:s.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},a=function(e,t,r){if(e){var s=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,o=/(\[[^[\]]*])/.exec(s),a=o?s.slice(0,o.index):s,c=[];if(a){if(!r.plainObjects&&n.call(Object.prototype,a)&&!r.allowPrototypes)return;c.push(a)}for(var u=0;null!==(o=i.exec(s))&&u<r.depth;){if(u+=1,!r.plainObjects&&n.call(Object.prototype,o[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(o[1])}return o&&c.push("["+s.slice(o.index)+"]"),function(e,t,r){for(var s=t,n=e.length-1;n>=0;--n){var i,o=e[n];if("[]"===o&&r.parseArrays)i=[].concat(s);else{i=r.plainObjects?Object.create(null):{};var a="["===o.charAt(0)&&"]"===o.charAt(o.length-1)?o.slice(1,-1):o,c=parseInt(a,10);r.parseArrays||""!==a?!isNaN(c)&&o!==a&&String(c)===a&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(i=[])[c]=s:i[a]=s:i={0:s}}s=i}return s}(c,t,r)}};e.exports=function(e,t){var r=function(e){if(!e)return i;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?i.charset:e.charset;return{allowDots:void 0===e.allowDots?i.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:i.comma,decoder:"function"==typeof e.decoder?e.decoder:i.decoder,delimiter:"string"==typeof e.delimiter||s.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"==typeof e.depth?e.depth:i.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:i.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var c="string"==typeof e?function(e,t){var r,a={},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,u=t.parameterLimit===1/0?void 0:t.parameterLimit,p=c.split(t.delimiter,u),l=-1,d=t.charset;if(t.charsetSentinel)for(r=0;r<p.length;++r)0===p[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[r]?d="utf-8":"utf8=%26%2310003%3B"===p[r]&&(d="iso-8859-1"),l=r,r=p.length);for(r=0;r<p.length;++r)if(r!==l){var h,m,f=p[r],g=f.indexOf("]="),y=-1===g?f.indexOf("="):g+1;-1===y?(h=t.decoder(f,i.decoder,d),m=t.strictNullHandling?null:""):(h=t.decoder(f.slice(0,y),i.decoder,d),m=t.decoder(f.slice(y+1),i.decoder,d)),m&&t.interpretNumericEntities&&"iso-8859-1"===d&&(m=o(m)),m&&t.comma&&m.indexOf(",")>-1&&(m=m.split(",")),n.call(a,h)?a[h]=s.combine(a[h],m):a[h]=m}return a}(e,r):e,u=r.plainObjects?Object.create(null):{},p=Object.keys(c),l=0;l<p.length;++l){var d=p[l],h=a(d,c[d],r);u=s.merge(u,h,r)}return s.compact(u)}},function(e,t,r){"use strict";const s=r(10),n=r(1);function i(){return"undefined"!=typeof Symbol&&Symbol.asyncIterator?Symbol.asyncIterator:"@@asyncIterator"}function o(e){if(e.length<2)return;const t=e[1];if("function"!=typeof t)throw Error(`The second argument to autoPagingEach, if present, must be a callback function; receieved ${typeof t}`);return t}function a(e){if(0===e.length)return;const t=e[0];if("function"!=typeof t)throw Error(`The first argument to autoPagingEach, if present, must be a callback function; receieved ${typeof t}`);if(2===t.length)return t;if(t.length>2)throw Error(`The \`onItem\` callback function passed to autoPagingEach must accept at most two arguments; got ${t}`);return function(e,r){r(t(e))}}function c(e,t){return new Promise((r,s)=>{e().then(function s(n){if(n.done)return void r();const i=n.value;return new Promise(e=>{t(i,e)}).then(t=>!1===t?s({done:!0}):e().then(s))}).catch(s)})}e.exports.makeAutoPaginationMethods=function(e,t,r,u){const p={currentPromise:null};let l=u,d=0;function h(n){if(!n||!n.data||"number"!=typeof n.data.length)throw Error("Unexpected: Stripe API response does not have a well-formed `data` array.");if(d<n.data.length){const e=n.data[d];return d+=1,{value:e,done:!1}}if(n.has_more){d=0;const i=function(e){const t=e.data.length-1,r=e.data[t],s=r&&r.id;if(!s)throw Error("Unexpected: No `id` found on the last item while auto-paging a list.");return s}(n);return(l=s(e,t,r,{starting_after:i})).then(h)}return{value:void 0,done:!0}}function m(){return function(e,t){if(e.currentPromise)return e.currentPromise;return e.currentPromise=new Promise(t).then(t=>(e.currentPromise=void 0,t)),e.currentPromise}(p,(e,t)=>l.then(h).then(e).catch(t))}const f=function(e){return function(){const t=[].slice.call(arguments),r=a(t),s=o(t);if(t.length>2)throw Error("autoPagingEach takes up to two arguments; received:",t);const i=c(e,r);return n.callbackifyPromiseWithTimeout(i,s)}}(m),g=function(e){return function(t,r){const s=t&&t.limit;if(!s)throw Error("You must pass a `limit` option to autoPagingToArray, eg; `autoPagingToArray({limit: 1000});`.");if(s>1e4)throw Error("You cannot specify a limit of more than 10,000 items to fetch in `autoPagingToArray`; use `autoPagingEach` to iterate through longer lists.");const i=new Promise((t,r)=>{const n=[];e(e=>{if(n.push(e),n.length>=s)return!1}).then(()=>{t(n)}).catch(r)});return n.callbackifyPromiseWithTimeout(i,r)}}(f),y={autoPagingEach:f,autoPagingToArray:g,next:m,return:()=>({}),[i()]:()=>y};return y}},function(e,t,r){"use strict";const s=r(9);e.exports={create:s({method:"POST"}),list:s({method:"GET",methodType:"list"}),retrieve:s({method:"GET",path:"/{id}"}),update:s({method:"POST",path:"{id}"}),del:s({method:"DELETE",path:"{id}"})}},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"account_links",includeBasic:["create"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"apple_pay/domains",includeBasic:["create","del","list","retrieve"]})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"application_fees",includeBasic:["list","retrieve"],createRefund:n({method:"POST",path:"/{id}/refunds"}),listRefunds:n({method:"GET",path:"/{id}/refunds",methodType:"list"}),retrieveRefund:n({method:"GET",path:"/{fee}/refunds/{id}"}),updateRefund:n({method:"POST",path:"/{fee}/refunds/{id}"})})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"balance",retrieve:n({method:"GET"})})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"balance_transactions",includeBasic:["list","retrieve"]})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"bitcoin/receivers",includeBasic:["list","retrieve"],listTransactions:n({method:"GET",path:"/{receiver}/transactions",methodType:"list"})})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"charges",includeBasic:["create","list","retrieve","update"],capture:n({method:"POST",path:"/{charge}/capture"})})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"country_specs",includeBasic:["list","retrieve"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"coupons",includeBasic:["create","del","list","retrieve","update"]})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"credit_notes",includeBasic:["create","list","retrieve","update"],voidCreditNote:n({method:"POST",path:"/{id}/void"})})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"customers",includeBasic:["create","del","list","retrieve","update"],deleteDiscount:n({method:"DELETE",path:"/{customer}/discount"}),updateSource:n({method:"POST",path:"/{customer}/sources/{id}"}),deleteSource:n({method:"DELETE",path:"/{customer}/sources/{id}"}),verifySource:n({method:"POST",path:"/{customer}/sources/{sourceId}/verify"}),createBalanceTransaction:n({method:"POST",path:"/{customer}/balance_transactions"}),listBalanceTransactions:n({method:"GET",path:"/{customer}/balance_transactions",methodType:"list"}),retrieveBalanceTransaction:n({method:"GET",path:"/{customer}/balance_transactions/{transaction}"}),updateBalanceTransaction:n({method:"POST",path:"/{customer}/balance_transactions/{transaction}"}),createSource:n({method:"POST",path:"/{customer}/sources"}),listSources:n({method:"GET",path:"/{customer}/sources",methodType:"list"}),retrieveSource:n({method:"GET",path:"/{customer}/sources/{id}"}),createTaxId:n({method:"POST",path:"/{customer}/tax_ids"}),deleteTaxId:n({method:"DELETE",path:"/{customer}/tax_ids/{id}"}),listTaxIds:n({method:"GET",path:"/{customer}/tax_ids",methodType:"list"}),retrieveTaxId:n({method:"GET",path:"/{customer}/tax_ids/{id}"})})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"disputes",includeBasic:["list","retrieve","update"],close:n({method:"POST",path:"/{dispute}/close"})})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"ephemeral_keys",includeBasic:["del"],create:n({method:"POST",validator:(e,t)=>{if(!t.headers||!t.headers["Stripe-Version"])throw new Error("stripe_version must be specified to create an ephemeral key")}})})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"events",includeBasic:["list","retrieve"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"exchange_rates",includeBasic:["list","retrieve"]})},function(e,t,r){"use strict";const{multipartRequestDataProcessor:s}=r(40),n=r(0),i=n.method;e.exports=n.extend({path:"files",includeBasic:["list","retrieve"],requestDataProcessor:s,create:i({method:"POST",headers:{"Content-Type":"multipart/form-data"},host:"files.stripe.com"})})},function(e,t,r){"use strict";const s=r(1),{StripeError:n}=r(2);class i extends n{}const o=(e,t,r)=>{const n=(Math.round(1e16*Math.random())+Math.round(1e16*Math.random())).toString();r["Content-Type"]=`multipart/form-data; boundary=${n}`;let i=Buffer.alloc(0);function o(e){const t=i,r=e instanceof Buffer?e:Buffer.from(e);i=Buffer.alloc(t.length+r.length+2),t.copy(i),r.copy(i,t.length),i.write("\r\n",i.length-2)}function a(e){return`"${e.replace(/"|"/g,"%22").replace(/\r\n|\r|\n/g," ")}"`}for(const e in s.flattenAndStringify(t)){const r=t[e];o(`--${n}`),r.hasOwnProperty("data")?(o(`Content-Disposition: form-data; name=${a(e)}; filename=${a(r.name||"blob")}`),o(`Content-Type: ${r.type||"application/octet-stream"}`),o(""),o(r.data)):(o(`Content-Disposition: form-data; name=${a(e)}`),o(""),o(r))}return o(`--${n}--`),i};e.exports.multipartRequestDataProcessor=(e,t,r,n)=>{if(t=t||{},"POST"!==e)return n(null,s.stringifyRequestData(t));return s.checkForStream(t)?((e,t,r,s)=>{const n=[];t.file.data.on("data",e=>{n.push(e)}).once("end",()=>{const e=Object.assign({},t);e.file.data=Buffer.concat(n);const i=o(0,e,r);s(null,i)}).on("error",e=>{s(new i({message:"An error occurred while attempting to process the file for upload.",detail:e}),null)})})(0,t,r,n):n(null,o(0,t,r))}},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"file_links",includeBasic:["create","list","retrieve","update"]})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"invoices",includeBasic:["create","del","list","retrieve","update"],finalizeInvoice:n({method:"POST",path:"/{invoice}/finalize"}),markUncollectible:n({method:"POST",path:"/{invoice}/mark_uncollectible"}),pay:n({method:"POST",path:"/{invoice}/pay"}),sendInvoice:n({method:"POST",path:"/{invoice}/send"}),voidInvoice:n({method:"POST",path:"/{invoice}/void"}),listUpcomingLineItems:n({method:"GET",path:"upcoming/lines",methodType:"list"}),retrieveUpcoming:n({method:"GET",path:"upcoming"}),listLineItems:n({method:"GET",path:"/{invoice}/lines",methodType:"list"})})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"invoiceitems",includeBasic:["create","del","list","retrieve","update"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"issuer_fraud_records",includeBasic:["list","retrieve"]})},function(e,t,r){"use strict";const s=r(0),n=s.method,i=r(1),o="connect.stripe.com";e.exports=s.extend({basePath:"/",authorizeUrl(e,t){e=e||{};let r="oauth/authorize";return(t=t||{}).express&&(r=`express/${r}`),e.response_type||(e.response_type="code"),e.client_id||(e.client_id=this._stripe.getClientId()),e.scope||(e.scope="read_write"),`https://${o}/${r}?${i.stringifyRequestData(e)}`},token:n({method:"POST",path:"oauth/token",host:o}),deauthorize(e){return e.client_id||(e.client_id=this._stripe.getClientId()),n({method:"POST",path:"oauth/deauthorize",host:o}).apply(this,arguments)}})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"orders",includeBasic:["create","list","retrieve","update"],pay:n({method:"POST",path:"/{id}/pay"}),returnOrder:n({method:"POST",path:"/{id}/returns"})})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"order_returns",includeBasic:["list","retrieve"]})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"payment_intents",includeBasic:["create","list","retrieve","update"],cancel:n({method:"POST",path:"/{intent}/cancel"}),capture:n({method:"POST",path:"/{intent}/capture"}),confirm:n({method:"POST",path:"/{intent}/confirm"})})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"payment_methods",includeBasic:["create","list","retrieve","update"],attach:n({method:"POST",path:"/{paymentMethod}/attach"}),detach:n({method:"POST",path:"/{paymentMethod}/detach"})})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"payouts",includeBasic:["create","list","retrieve","update"],cancel:n({method:"POST",path:"/{payout}/cancel"})})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"plans",includeBasic:["create","del","list","retrieve","update"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"products",includeBasic:["create","del","list","retrieve","update"]})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"recipients",includeBasic:["create","del","list","retrieve","update"],createCard:n({method:"POST",path:"/{id}/cards"}),listCards:n({method:"GET",path:"/{id}/cards",methodType:"list"}),retrieveCard:n({method:"GET",path:"/{recipientId}/cards/{cardId}"}),updateCard:n({method:"POST",path:"/{recipientId}/cards/{cardId}"}),deleteCard:n({method:"DELETE",path:"/{recipientId}/cards/{cardId}"})})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"refunds",includeBasic:["create","list","retrieve","update"]})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"reviews",includeBasic:["list","retrieve"],approve:n({method:"POST",path:"/{review}/approve"})})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"setup_intents",includeBasic:["create","list","retrieve","update"],cancel:n({method:"POST",path:"/{intent}/cancel"}),confirm:n({method:"POST",path:"/{intent}/confirm"})})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"skus",includeBasic:["create","del","list","retrieve","update"]})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"sources",includeBasic:["create","retrieve","update"],verify:n({method:"POST",path:"/{source}/verify"}),listSourceTransactions:n({method:"GET",path:"/{source}/source_transactions",methodType:"list"})})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"subscriptions",includeBasic:["create","list","retrieve","update","del"],deleteDiscount:n({method:"DELETE",path:"/{subscriptionExposedId}/discount"})})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"subscription_items",includeBasic:["create","del","list","retrieve","update"],createUsageRecord:n({method:"POST",path:"/{subscriptionItem}/usage_records"})})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"subscription_schedules",includeBasic:["create","list","retrieve","update"],cancel:n({method:"POST",path:"/{schedule}/cancel"}),release:n({method:"POST",path:"/{schedule}/release"})})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"tax_rates",includeBasic:["create","list","retrieve","update"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"3d_secure",includeBasic:["create","retrieve"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"tokens",includeBasic:["create","retrieve"]})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"topups",includeBasic:["create","list","retrieve","update"],cancel:n({method:"POST",path:"/{topup}/cancel"})})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"transfers",includeBasic:["create","list","retrieve","update"],createReversal:n({method:"POST",path:"/{id}/reversals"}),listReversals:n({method:"GET",path:"/{id}/reversals",methodType:"list"}),retrieveReversal:n({method:"GET",path:"/{transfer}/reversals/{id}"}),updateReversal:n({method:"POST",path:"/{transfer}/reversals/{id}"})})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"subscription_items",create:n({method:"POST",path:"/{id}/usage_records"})})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"subscription_items",list:n({method:"GET",path:"{subscriptionItem}/usage_record_summaries",methodType:"list"})})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"webhook_endpoints",includeBasic:["create","del","list","retrieve","update"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"checkout/sessions",includeBasic:["create","retrieve"]})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"issuing/authorizations",includeBasic:["list","retrieve","update"],approve:n({method:"POST",path:"/{authorization}/approve"}),decline:n({method:"POST",path:"/{authorization}/decline"})})},function(e,t,r){"use strict";const s=r(0),n=s.method;e.exports=s.extend({path:"issuing/cards",includeBasic:["create","list","retrieve","update"],retrieveDetails:n({method:"GET",path:"/{card}/details"})})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"issuing/cardholders",includeBasic:["create","list","retrieve","update"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"issuing/disputes",includeBasic:["create","list","retrieve","update"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"issuing/transactions",includeBasic:["list","retrieve","update"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"radar/early_fraud_warnings",includeBasic:["list","retrieve"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"radar/value_lists",includeBasic:["create","del","list","retrieve","update"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"radar/value_list_items",includeBasic:["create","del","list","retrieve"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"reporting/report_runs",includeBasic:["create","list","retrieve"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"reporting/report_types",includeBasic:["list","retrieve"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"sigma/scheduled_query_runs",includeBasic:["list","retrieve"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"terminal/connection_tokens",includeBasic:["create"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"terminal/locations",includeBasic:["create","del","list","retrieve","update"]})},function(e,t,r){"use strict";const s=r(0);e.exports=s.extend({path:"terminal/readers",includeBasic:["create","del","list","retrieve","update"]})},function(e){e.exports=JSON.parse('{"_from":"stripe","_id":"stripe@7.8.0","_inBundle":false,"_integrity":"sha512-Tmq0xB68W2e4m1FCHLly1dr6SXg+m4cXKhN77NCRkiefaetq/H2+8jDKYerY63Otd6fsRmWTVjuqy+NfUkVVwQ==","_location":"/stripe","_phantomChildren":{},"_requested":{"type":"tag","registry":true,"raw":"stripe","name":"stripe","escapedName":"stripe","rawSpec":"","saveSpec":null,"fetchSpec":"latest"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/stripe/-/stripe-7.8.0.tgz","_shasum":"4b21a21721cb4a20fbc5c5c97ea32bf690262ed6","_spec":"stripe","_where":"/home/faisal/myapp","author":{"name":"Stripe","email":"support@stripe.com","url":"https://stripe.com/"},"bugs":{"url":"https://github.com/stripe/stripe-node/issues"},"bugs:":"https://github.com/stripe/stripe-node/issues","bundleDependencies":false,"contributors":[{"name":"Ask Bjørn Hansen","email":"ask@develooper.com","url":"http://www.askask.com/"},{"name":"Michelle Bu","email":"michelle@stripe.com"},{"name":"Alex Sexton","email":"alex@stripe.com"},{"name":"James Padolsey"}],"dependencies":{"qs":"^6.6.0"},"deprecated":false,"description":"Stripe API wrapper","devDependencies":{"chai":"~4.2.0","chai-as-promised":"~7.1.1","coveralls":"^3.0.0","eslint":"^5.16.0","eslint-config-prettier":"^4.1.0","eslint-plugin-chai-friendly":"^0.4.0","eslint-plugin-prettier":"^3.0.1","mocha":"~6.1.4","nock":"^10.0.6","nyc":"^14.1.0","prettier":"^1.16.4"},"engines":{"node":"^6 || ^8.1 || >=10.*"},"homepage":"https://github.com/stripe/stripe-node","keywords":["stripe","payment processing","credit cards","api"],"license":"MIT","main":"lib/stripe.js","name":"stripe","repository":{"type":"git","url":"git://github.com/stripe/stripe-node.git"},"scripts":{"clean":"rm -rf ./.nyc_output ./node_modules/.cache ./coverage","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"yarn lint --fix","lint":"eslint --ext .js,.jsx .","mocha":"nyc mocha","mocha-only":"mocha","report":"nyc -r text -r lcov report","test":"npm run lint && npm run mocha"},"version":"7.8.0"}')}]));