@stacksjs/orm 0.70.112 → 0.70.114

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +18 -15
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -1,31 +1,34 @@
1
1
  // @bun
2
- var i3=Object.create;var{getPrototypeOf:a3,defineProperty:HZ,getOwnPropertyNames:o3}=Object;var s3=Object.prototype.hasOwnProperty;function r3(Z){return this[Z]}var t3,e3,ZB=(Z,$,J)=>{var Q=Z!=null&&typeof Z==="object";if(Q){var X=$?t3??=new WeakMap:e3??=new WeakMap,Y=X.get(Z);if(Y)return Y}J=Z!=null?i3(a3(Z)):{};let G=$||!Z||!Z.__esModule?HZ(J,"default",{value:Z,enumerable:!0}):J;for(let V of o3(Z))if(!s3.call(G,V))HZ(G,V,{get:r3.bind(Z,V),enumerable:!0});if(Q)X.set(Z,G);return G};var K=(Z,$)=>()=>($||Z(($={exports:{}}).exports,$),$.exports);var C=import.meta.require;var j0=K((hZ)=>{Object.defineProperty(hZ,"__esModule",{value:!0});hZ.CryptoProviderOnlySupportsAsyncError=hZ.CryptoProvider=void 0;class _Z{computeHMACSignature(Z,$){throw Error("computeHMACSignature not implemented.")}computeHMACSignatureAsync(Z,$){throw Error("computeHMACSignatureAsync not implemented.")}computeSHA256Async(Z){throw Error("computeSHA256 not implemented.")}}hZ.CryptoProvider=_Z;class gZ extends Error{}hZ.CryptoProviderOnlySupportsAsyncError=gZ});var pZ=K((lZ)=>{Object.defineProperty(lZ,"__esModule",{value:!0});lZ.NodeCryptoProvider=void 0;var uZ=C("crypto"),PB=j0();class cZ extends PB.CryptoProvider{computeHMACSignature(Z,$){return uZ.createHmac("sha256",$).update(Z,"utf8").digest("hex")}async computeHMACSignatureAsync(Z,$){return await this.computeHMACSignature(Z,$)}async computeSHA256Async(Z){return new Uint8Array(await uZ.createHash("sha256").update(Z).digest())}}lZ.NodeCryptoProvider=cZ});var b0=K((iZ)=>{Object.defineProperty(iZ,"__esModule",{value:!0});iZ.HttpClientResponse=iZ.HttpClient=void 0;class H0{getClientName(){throw Error("getClientName not implemented.")}makeRequest(Z,$,J,Q,X,Y,G,V){throw Error("makeRequest not implemented.")}static makeTimeoutError(){let Z=TypeError(H0.TIMEOUT_ERROR_CODE);return Z.code=H0.TIMEOUT_ERROR_CODE,Z}}iZ.HttpClient=H0;H0.CONNECTION_CLOSED_ERROR_CODES=["ECONNRESET","EPIPE"];H0.TIMEOUT_ERROR_CODE="ETIMEDOUT";class dZ{constructor(Z,$){this._statusCode=Z,this._headers=$}getStatusCode(){return this._statusCode}getHeaders(){return this._headers}getRawResponse(){throw Error("getRawResponse not implemented.")}toStream(Z){throw Error("toStream not implemented.")}toJSON(){throw Error("toJSON not implemented.")}}iZ.HttpClientResponse=dZ});var J$=K((Z$)=>{Object.defineProperty(Z$,"__esModule",{value:!0});Z$.NodeHttpClientResponse=Z$.NodeHttpClient=void 0;var oZ=C("http"),sZ=C("https"),k9=b0(),rZ=oZ.default||oZ,tZ=sZ.default||sZ,RB=new rZ.Agent({keepAlive:!0}),vB=new tZ.Agent({keepAlive:!0});class eZ extends k9.HttpClient{constructor(Z){super();this._agent=Z}getClientName(){return"node"}makeRequest(Z,$,J,Q,X,Y,G,V){let U=G==="http",W=this._agent;if(!W)W=U?RB:vB;return new Promise((z,L)=>{let H=(U?rZ:tZ).request({host:Z,port:$,path:J,method:Q,agent:W,headers:X,ciphers:"DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:!MD5"});H.setTimeout(V,()=>{H.destroy(k9.HttpClient.makeTimeoutError())}),H.on("response",(T)=>{z(new A9(T))}),H.on("error",(T)=>{L(T)}),H.once("socket",(T)=>{if(T.connecting)T.once(U?"connect":"secureConnect",()=>{H.write(Y),H.end()});else H.write(Y),H.end()})})}}Z$.NodeHttpClient=eZ;class A9 extends k9.HttpClientResponse{constructor(Z){super(Z.statusCode,Z.headers||{});this._res=Z}getRawResponse(){return this._res}toStream(Z){return this._res.once("end",()=>Z()),this._res}toJSON(){return new Promise((Z,$)=>{let J="";this._res.setEncoding("utf8"),this._res.on("data",(Q)=>{J+=Q}),this._res.once("end",()=>{try{Z(JSON.parse(J))}catch(Q){$(Q)}})})}}Z$.NodeHttpClientResponse=A9});var c=K((V$)=>{Object.defineProperty(V$,"__esModule",{value:!0});V$.parseHeadersForFetch=V$.parseHttpHeaderAsNumber=V$.parseHttpHeaderAsString=V$.getAPIMode=V$.jsonStringifyRequestData=V$.concat=V$.createApiKeyAuthenticator=V$.detectAIAgent=V$.AI_AGENTS=V$.determineProcessUserAgentProperties=V$.validateInteger=V$.flattenAndStringify=V$.isObject=V$.emitWarning=V$.pascalToCamelCase=V$.callbackifyPromiseWithTimeout=V$.normalizeHeader=V$.normalizeHeaders=V$.removeNullish=V$.protoExtend=V$.getOptionsFromArgs=V$.getDataFromArgs=V$.extractUrlParams=V$.makeURLInterpolator=V$.queryStringifyRequestData=V$.isOptionsHash=void 0;var x9=["apiKey","idempotencyKey","stripeAccount","apiVersion","maxNetworkRetries","timeout","host","authenticator","stripeContext","headers","additionalHeaders","streaming"];function I9(Z){return Z&&typeof Z==="object"&&x9.some(($)=>Object.prototype.hasOwnProperty.call(Z,$))}V$.isOptionsHash=I9;function jB(Z){return fB(Z)}V$.queryStringifyRequestData=jB;function Q$(Z){return encodeURIComponent(Z).replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27").replace(/%5B/g,"[").replace(/%5D/g,"]")}function bB(Z){if(Z instanceof Date)return Math.floor(Z.getTime()/1000).toString();if(Z===null)return"";return String(Z)}function fB(Z){let $=[];function J(Q,X){if(X===void 0)return;if(X===null||typeof X!=="object"||X instanceof Date){$.push(Q$(Q)+"="+Q$(bB(X)));return}if(Array.isArray(X)){for(let Y=0;Y<X.length;Y++)if(X[Y]!==void 0)J(Q+"["+Y+"]",X[Y]);return}for(let Y of Object.keys(X))J(Q+"["+Y+"]",X[Y])}if(typeof Z==="object"&&Z!==null)for(let Q of Object.keys(Z))J(Q,Z[Q]);return $.join("&")}V$.makeURLInterpolator=(()=>{let Z={"\n":"\\n",'"':"\\\"","\u2028":"\\u2028","\u2029":"\\u2029"};return($)=>{let J=$.replace(/["\n\r\u2028\u2029]/g,(Q)=>Z[Q]);return(Q)=>{return J.replace(/\{([\s\S]+?)\}/g,(X,Y)=>{let G=Q[Y];if(MB(G))return encodeURIComponent(G);return""})}}})();function MB(Z){return["number","string","boolean"].includes(typeof Z)}function _B(Z){let $=Z.match(/\{\w+\}/g);if(!$)return[];return $.map((J)=>J.replace(/[{}]/g,""))}V$.extractUrlParams=_B;function gB(Z){if(!Array.isArray(Z)||!Z[0]||typeof Z[0]!=="object")return{};if(!I9(Z[0]))return Z.shift();let $=Object.keys(Z[0]),J=$.filter((Q)=>x9.includes(Q));if(J.length>0&&J.length!==$.length)P9(`Options found in arguments (${J.join(", ")}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options.`);return{}}V$.getDataFromArgs=gB;function hB(Z){let $={host:null,headers:{},settings:{},streaming:!1};if(Z.length>0){let J=Z[Z.length-1];if(typeof J==="string")$.authenticator=N9(Z.pop());else if(I9(J)){let Q={...Z.pop()},X=Object.keys(Q).filter((Y)=>!x9.includes(Y));if(X.length)P9(`Invalid options found (${X.join(", ")}); ignoring.`);if(Q.apiKey)$.authenticator=N9(Q.apiKey);if(Q.idempotencyKey)$.headers["Idempotency-Key"]=Q.idempotencyKey;if(Q.stripeAccount)$.headers["Stripe-Account"]=Q.stripeAccount;if(Q.stripeContext){if($.headers["Stripe-Account"])throw Error("Can't specify both stripeAccount and stripeContext.");$.headers["Stripe-Context"]=Q.stripeContext}if(Q.apiVersion)$.headers["Stripe-Version"]=Q.apiVersion;if(Number.isInteger(Q.maxNetworkRetries))$.settings.maxNetworkRetries=Q.maxNetworkRetries;if(Number.isInteger(Q.timeout))$.settings.timeout=Q.timeout;if(Q.host)$.host=Q.host;if(Q.authenticator){if(Q.apiKey)throw Error("Can't specify both apiKey and authenticator.");if(typeof Q.authenticator!=="function")throw Error("The authenticator must be a function receiving a request as the first parameter.");$.authenticator=Q.authenticator}if(Q.headers)Object.assign($.headers,Q.headers);if(Q.additionalHeaders)Object.assign($.headers,Q.additionalHeaders);if(Q.streaming)$.streaming=!0}}return $}V$.getOptionsFromArgs=hB;function mB(Z){let $=this,J=Object.prototype.hasOwnProperty.call(Z,"constructor")?Z.constructor:function(...Q){$.apply(this,Q)};return Object.assign(J,$),J.prototype=Object.create($.prototype),Object.assign(J.prototype,Z),J}V$.protoExtend=mB;function uB(Z){if(typeof Z!=="object")throw Error("Argument must be an object");return Object.keys(Z).reduce(($,J)=>{if(Z[J]!=null)$[J]=Z[J];return $},{})}V$.removeNullish=uB;function cB(Z){if(!(Z&&typeof Z==="object"))return Z;return Object.keys(Z).reduce(($,J)=>{return $[X$(J)]=Z[J],$},{})}V$.normalizeHeaders=cB;function X$(Z){return Z.split("-").map(($)=>$.charAt(0).toUpperCase()+$.substr(1).toLowerCase()).join("-")}V$.normalizeHeader=X$;function lB(Z,$){if($)return Z.then((J)=>{setTimeout(()=>{$(null,J)},0)},(J)=>{setTimeout(()=>{$(J,null)},0)});return Z}V$.callbackifyPromiseWithTimeout=lB;function nB(Z){if(Z==="OAuth")return"oauth";else return Z[0].toLowerCase()+Z.substring(1)}V$.pascalToCamelCase=nB;function P9(Z){if(typeof process.emitWarning!=="function")return console.warn(`Stripe: ${Z}`);return process.emitWarning(Z,"Stripe")}V$.emitWarning=P9;function Y$(Z){let $=typeof Z;return($==="function"||$==="object")&&!!Z}V$.isObject=Y$;function pB(Z){let $={},J=(Q,X)=>{Object.entries(Q).forEach(([Y,G])=>{let V=X?`${X}[${Y}]`:Y;if(Y$(G))if(!(G instanceof Uint8Array)&&!Object.prototype.hasOwnProperty.call(G,"data"))return J(G,V);else $[V]=G;else $[V]=String(G)})};return J(Z,null),$}V$.flattenAndStringify=pB;function dB(Z,$,J){if(!Number.isInteger($))if(J!==void 0)return J;else throw Error(`${Z} must be an integer`);return $}V$.validateInteger=dB;function iB(){return typeof process>"u"?{}:{lang_version:process.version}}V$.determineProcessUserAgentProperties=iB;V$.AI_AGENTS=[["ANTIGRAVITY_CLI_ALIAS","antigravity"],["CLAUDECODE","claude_code"],["CLINE_ACTIVE","cline"],["CODEX_SANDBOX","codex_cli"],["CODEX_THREAD_ID","codex_cli"],["CODEX_SANDBOX_NETWORK_DISABLED","codex_cli"],["CODEX_CI","codex_cli"],["CURSOR_AGENT","cursor"],["GEMINI_CLI","gemini_cli"],["OPENCLAW_SHELL","openclaw"],["OPENCODE","open_code"]];function aB(Z){for(let[$,J]of V$.AI_AGENTS)if(Z[$])return J;return""}V$.detectAIAgent=aB;function N9(Z){let $=(J)=>{return J.headers.Authorization="Bearer "+Z,Promise.resolve()};return $._apiKey=Z,$}V$.createApiKeyAuthenticator=N9;function oB(Z){let $=Z.reduce((X,Y)=>X+Y.length,0),J=new Uint8Array($),Q=0;return Z.forEach((X)=>{J.set(X,Q),Q+=X.length}),J}V$.concat=oB;function sB(Z,$){if(this[Z]instanceof Date)return Math.floor(this[Z].getTime()/1000).toString();return $}function rB(Z){return JSON.stringify(Z,sB)}V$.jsonStringifyRequestData=rB;function tB(Z){if(!Z)return"v1";return Z.startsWith("/v2")?"v2":"v1"}V$.getAPIMode=tB;function G$(Z){if(Array.isArray(Z))return Z.join(", ");return String(Z)}V$.parseHttpHeaderAsString=G$;function eB(Z){let $=Array.isArray(Z)?Z[0]:Z;return Number($)}V$.parseHttpHeaderAsNumber=eB;function ZW(Z){return Object.entries(Z).map(([$,J])=>{return[$,G$(J)]})}V$.parseHeadersForFetch=ZW});var L$=K((U$)=>{Object.defineProperty(U$,"__esModule",{value:!0});U$.FetchHttpClientResponse=U$.FetchHttpClient=void 0;var NW=c(),f0=b0();class E8 extends f0.HttpClient{constructor(Z){super();if(!Z){if(!globalThis.fetch)throw Error("fetch() function not provided and is not defined in the global scope. You must provide a fetch implementation.");Z=globalThis.fetch}if(globalThis.AbortController)this._fetchFn=E8.makeFetchWithAbortTimeout(Z);else this._fetchFn=E8.makeFetchWithRaceTimeout(Z)}static makeFetchWithRaceTimeout(Z){return($,J,Q)=>{let X,Y=new Promise((V,U)=>{X=setTimeout(()=>{X=null,U(f0.HttpClient.makeTimeoutError())},Q)}),G=Z($,J);return Promise.race([G,Y]).finally(()=>{if(X)clearTimeout(X)})}}static makeFetchWithAbortTimeout(Z){return async($,J,Q)=>{let X=new AbortController,Y=setTimeout(()=>{Y=null,X.abort(f0.HttpClient.makeTimeoutError())},Q);try{return await Z($,{...J,signal:X.signal})}catch(G){if(G.name==="AbortError")throw f0.HttpClient.makeTimeoutError();else throw G}finally{if(Y)clearTimeout(Y)}}}getClientName(){return"fetch"}async makeRequest(Z,$,J,Q,X,Y,G,V){let W=new URL(J,`${G==="http"?"http":"https"}://${Z}`);W.port=$;let B=Q=="POST"||Q=="PUT"||Q=="PATCH",z=Y||(B?"":void 0),L=await this._fetchFn(W.toString(),{method:Q,headers:(0,NW.parseHeadersForFetch)(X),body:z},V);return new F8(L)}}U$.FetchHttpClient=E8;class F8 extends f0.HttpClientResponse{constructor(Z){super(Z.status,F8._transformHeadersToObject(Z.headers));this._res=Z}getRawResponse(){return this._res}toStream(Z){return Z(),this._res.body}toJSON(){return this._res.json()}static _transformHeadersToObject(Z){let $={};for(let J of Z){if(!Array.isArray(J)||J.length!=2)throw Error("Response objects produced by the fetch function given to FetchHttpClient do not have an iterable headers map. Response#headers should be an iterable object.");$[J[0]]=J[1]}return $}}U$.FetchHttpClientResponse=F8});var D$=K((w$)=>{Object.defineProperty(w$,"__esModule",{value:!0});w$.SubtleCryptoProvider=void 0;var K$=j0();class H$ extends K$.CryptoProvider{constructor(Z){super();this.subtleCrypto=Z||crypto.subtle}computeHMACSignature(Z,$){throw new K$.CryptoProviderOnlySupportsAsyncError("SubtleCryptoProvider cannot be used in a synchronous context.")}async computeHMACSignatureAsync(Z,$){let J=new TextEncoder,Q=await this.subtleCrypto.importKey("raw",J.encode($),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),X=await this.subtleCrypto.sign("hmac",Q,J.encode(Z)),Y=new Uint8Array(X),G=Array(Y.length);for(let V=0;V<Y.length;V++)G[V]=S9[Y[V]];return G.join("")}async computeSHA256Async(Z){return new Uint8Array(await this.subtleCrypto.digest("SHA-256",Z))}}w$.SubtleCryptoProvider=H$;var S9=Array(256);for(let Z=0;Z<S9.length;Z++)S9[Z]=Z.toString(16).padStart(2,"0")});var F$=K((q$)=>{Object.defineProperty(q$,"__esModule",{value:!0});q$.PlatformFunctions=void 0;var IW=L$(),PW=D$();class O${constructor(){this._fetchFn=null,this._agent=null}getPlatformInfo(){return null}uuid4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(Z)=>{let $=Math.random()*16|0;return(Z==="x"?$:$&3|8).toString(16)})}secureCompare(Z,$){if(Z.length!==$.length)return!1;let J=Z.length,Q=0;for(let X=0;X<J;++X)Q|=Z.charCodeAt(X)^$.charCodeAt(X);return Q===0}createEmitter(){throw Error("createEmitter not implemented.")}tryBufferData(Z){throw Error("tryBufferData not implemented.")}createNodeHttpClient(Z){throw Error("createNodeHttpClient not implemented.")}createFetchHttpClient(Z){return new IW.FetchHttpClient(Z)}createDefaultHttpClient(){throw Error("createDefaultHttpClient not implemented.")}createNodeCryptoProvider(){throw Error("createNodeCryptoProvider not implemented.")}createSubtleCryptoProvider(Z){return new PW.SubtleCryptoProvider(Z)}createDefaultCryptoProvider(){throw Error("createDefaultCryptoProvider not implemented.")}}q$.PlatformFunctions=O$});var M0=K((A$)=>{Object.defineProperty(A$,"__esModule",{value:!0});A$.TemporarySessionExpiredError=A$.RateLimitError=A$.StripeUnsupportedResponseTypeError=A$.StripeUnsupportedGrantTypeError=A$.StripeInvalidScopeError=A$.StripeOAuthInvalidRequestError=A$.StripeInvalidClientError=A$.StripeInvalidGrantError=A$.StripeOAuthError=A$.StripeIdempotencyError=A$.StripeSignatureVerificationError=A$.StripeConnectionError=A$.StripeRateLimitError=A$.StripePermissionError=A$.StripeAuthenticationError=A$.StripeAPIError=A$.StripeInvalidRequestError=A$.StripeCardError=A$.StripeError=A$.generateV2Error=A$.generateOAuthError=A$.generateV1Error=void 0;var SW=(Z)=>{let $=Z.statusCode;if($===429||$===400&&Z.code==="rate_limit")return new b9(Z);if($===400||$===404){if(Z.type==="idempotency_error")return new k8(Z);return new C8(Z)}if($===401)return new y9(Z);if($===402)return new R9(Z);if($===403)return new j9(Z);return new v9(Z)};A$.generateV1Error=SW;var RW=(Z)=>{switch(Z.type){case"invalid_grant":return new f9(Z);case"invalid_client":return new M9(Z);case"invalid_request":return new _9(Z);case"invalid_scope":return new g9(Z);case"unsupported_grant_type":return new h9(Z);case"unsupported_response_type":return new m9(Z);default:return new d(Z)}};A$.generateOAuthError=RW;var vW=(Z)=>{switch(Z.type){case"idempotency_error":return new k8(Z);case"rate_limit":return new u9(Z);case"temporary_session_expired":return new c9(Z)}switch(Z.code){case"invalid_fields":return new C8(Z)}return A$.generateV1Error(Z)};A$.generateV2Error=vW;class v extends Error{constructor(Z={},$=null){super(Z.message);this.type=$||this.constructor.name,this.raw=Z,this.rawType=Z.type,this.code=Z.code,this.doc_url=Z.doc_url,this.param=Z.param,this.detail=Z.detail,this.headers=Z.headers,this.requestId=Z.requestId,this.statusCode=Z.statusCode,this.message=Z.message??"",this.userMessage=Z.user_message,this.charge=Z.charge,this.decline_code=Z.decline_code,this.payment_intent=Z.payment_intent,this.payment_method=Z.payment_method,this.payment_method_type=Z.payment_method_type,this.setup_intent=Z.setup_intent,this.source=Z.source}}A$.StripeError=v;v.generate=A$.generateV1Error;class R9 extends v{constructor(Z={}){super(Z,"StripeCardError")}}A$.StripeCardError=R9;class C8 extends v{constructor(Z={}){super(Z,"StripeInvalidRequestError")}}A$.StripeInvalidRequestError=C8;class v9 extends v{constructor(Z={}){super(Z,"StripeAPIError")}}A$.StripeAPIError=v9;class y9 extends v{constructor(Z={}){super(Z,"StripeAuthenticationError")}}A$.StripeAuthenticationError=y9;class j9 extends v{constructor(Z={}){super(Z,"StripePermissionError")}}A$.StripePermissionError=j9;class b9 extends v{constructor(Z={}){super(Z,"StripeRateLimitError")}}A$.StripeRateLimitError=b9;class C$ extends v{constructor(Z={}){super(Z,"StripeConnectionError")}}A$.StripeConnectionError=C$;class k$ extends v{constructor(Z,$,J={}){super(J,"StripeSignatureVerificationError");this.header=Z,this.payload=$}}A$.StripeSignatureVerificationError=k$;class k8 extends v{constructor(Z={}){super(Z,"StripeIdempotencyError")}}A$.StripeIdempotencyError=k8;class d extends v{constructor(Z={},$="StripeOAuthError"){super(Z,$)}}A$.StripeOAuthError=d;class f9 extends d{constructor(Z={}){super(Z,"StripeInvalidGrantError")}}A$.StripeInvalidGrantError=f9;class M9 extends d{constructor(Z={}){super(Z,"StripeInvalidClientError")}}A$.StripeInvalidClientError=M9;class _9 extends d{constructor(Z={}){super(Z,"StripeOAuthInvalidRequestError")}}A$.StripeOAuthInvalidRequestError=_9;class g9 extends d{constructor(Z={}){super(Z,"StripeInvalidScopeError")}}A$.StripeInvalidScopeError=g9;class h9 extends d{constructor(Z={}){super(Z,"StripeUnsupportedGrantTypeError")}}A$.StripeUnsupportedGrantTypeError=h9;class m9 extends d{constructor(Z={}){super(Z,"StripeUnsupportedResponseTypeError")}}A$.StripeUnsupportedResponseTypeError=m9;class u9 extends v{constructor(Z={}){super(Z,"RateLimitError")}}A$.RateLimitError=u9;class c9 extends v{constructor(Z={}){super(Z,"TemporarySessionExpiredError")}}A$.TemporarySessionExpiredError=c9});var j$=K((v$)=>{Object.defineProperty(v$,"__esModule",{value:!0});v$.NodePlatformFunctions=void 0;var A8=C("crypto"),x$=C("events"),tW=pZ(),I$=J$(),eW=F$(),ZU=M0(),$U=c(),P$=C("os");class S$ extends ZU.StripeError{}class R$ extends eW.PlatformFunctions{uuid4(){if(A8.randomUUID)return A8.randomUUID();return super.uuid4()}getPlatformInfo(){return`${process.platform} ${(0,P$.release)()} ${(0,P$.arch)()}`}secureCompare(Z,$){if(!Z||!$)throw Error("secureCompare must receive two arguments");if(Z.length!==$.length)return!1;if(A8.timingSafeEqual){let J=new TextEncoder,Q=J.encode(Z),X=J.encode($);return A8.timingSafeEqual(Q,X)}return super.secureCompare(Z,$)}createEmitter(){return new x$.EventEmitter}tryBufferData(Z){if(!(Z.file.data instanceof x$.EventEmitter))return Promise.resolve(Z);let $=[];return new Promise((J,Q)=>{Z.file.data.on("data",(X)=>{$.push(X)}).once("end",()=>{let X=Object.assign({},Z);X.file.data=(0,$U.concat)($),J(X)}).on("error",(X)=>{Q(new S$({message:"An error occurred while attempting to process the file for upload.",detail:X}))})})}createNodeHttpClient(Z){return new I$.NodeHttpClient(Z)}createDefaultHttpClient(){return new I$.NodeHttpClient}createNodeCryptoProvider(){return new tW.NodeCryptoProvider}createDefaultCryptoProvider(){return this.createNodeCryptoProvider()}}v$.NodePlatformFunctions=R$});var _$=K((f$)=>{Object.defineProperty(f$,"__esModule",{value:!0});f$.RequestSender=void 0;var w0=M0(),b$=b0(),b=c(),JU=60;class _0{constructor(Z,$){this._stripe=Z,this._maxBufferedRequestMetric=$}_normalizeStripeContext(Z,$){if(Z)return Z.toString()||null;return $?.toString()||null}_addHeadersDirectlyToObject(Z,$){Z.requestId=$["request-id"],Z.stripeAccount=Z.stripeAccount||$["stripe-account"],Z.apiVersion=Z.apiVersion||$["stripe-version"],Z.idempotencyKey=Z.idempotencyKey||$["idempotency-key"]}_makeResponseEvent(Z,$,J){let Q=Date.now(),X=Q-Z.request_start_time;return(0,b.removeNullish)({api_version:J["stripe-version"],account:J["stripe-account"],idempotency_key:J["idempotency-key"],method:Z.method,path:Z.path,status:$,request_id:this._getRequestId(J),elapsed:X,request_start_time:Z.request_start_time,request_end_time:Q})}_getRequestId(Z){return Z["request-id"]}_streamingResponseHandler(Z,$,J){return(Q)=>{let X=Q.getHeaders(),Y=()=>{let V=this._makeResponseEvent(Z,Q.getStatusCode(),X);this._stripe._emitter.emit("response",V),this._recordRequestMetrics(this._getRequestId(X),V.elapsed,$)},G=Q.toStream(Y);return this._addHeadersDirectlyToObject(G,X),J(null,G)}}_jsonResponseHandler(Z,$,J,Q){return(X)=>{let Y=X.getHeaders(),G=this._getRequestId(Y),V=X.getStatusCode(),U=this._makeResponseEvent(Z,V,Y);this._stripe._emitter.emit("response",U),X.toJSON().then((W)=>{if(W.error){let B=typeof W.error==="string";if(B)W.error={type:W.error,message:W.error_description};W.error.headers=Y,W.error.statusCode=V,W.error.requestId=G;let z;if(B)z=(0,w0.generateOAuthError)(W.error);else if($==="v2")z=(0,w0.generateV2Error)(W.error);else z=(0,w0.generateV1Error)(W.error);throw z}return W},(W)=>{throw new w0.StripeAPIError({message:"Invalid JSON received from the Stripe API",exception:W,requestId:Y["request-id"]})}).then((W)=>{this._recordRequestMetrics(G,U.elapsed,J);let B=X.getRawResponse();this._addHeadersDirectlyToObject(B,Y),Object.defineProperty(W,"lastResponse",{enumerable:!1,writable:!1,value:B}),Q(null,W)},(W)=>Q(W,null))}}static _generateConnectionErrorMessage(Z){return`An error occurred with our connection to Stripe.${Z>0?` Request was retried ${Z} times.`:""}`}static _shouldRetry(Z,$,J,Q){if(Q&&$===0&&b$.HttpClient.CONNECTION_CLOSED_ERROR_CODES.includes(Q.code))return!0;if($>=J)return!1;if(!Z)return!0;if(Z.getHeaders()["stripe-should-retry"]==="false")return!1;if(Z.getHeaders()["stripe-should-retry"]==="true")return!0;if(Z.getStatusCode()===409)return!0;if(Z.getStatusCode()>=500)return!0;return!1}_getSleepTimeInMS(Z,$=null){let J=this._stripe.getInitialNetworkRetryDelay(),Q=this._stripe.getMaxNetworkRetryDelay(),X=Math.min(J*Math.pow(2,Z-1),Q);if(X*=0.5*(1+Math.random()),X=Math.max(J,X),Number.isInteger($)&&$<=JU)X=Math.max(X,$);return X*1000}_getMaxNetworkRetries(Z={}){return Z.maxNetworkRetries!==void 0&&Number.isInteger(Z.maxNetworkRetries)?Z.maxNetworkRetries:this._stripe.getMaxNetworkRetries()}_defaultIdempotencyKey(Z,$,J){let Q=this._getMaxNetworkRetries($),X=()=>`stripe-node-retry-${this._stripe._platformFunctions.uuid4()}`;if(J==="v2"){if(Z==="POST"||Z==="DELETE")return X()}else if(J==="v1"){if(Z==="POST"&&Q>0)return X()}return null}_makeHeaders({contentType:Z,contentLength:$,apiVersion:J,clientUserAgent:Q,method:X,userSuppliedHeaders:Y,userSuppliedSettings:G,stripeAccount:V,stripeContext:U,apiMode:W}){let B={Accept:"application/json","Content-Type":Z,"User-Agent":this._getUserAgentString(W),"X-Stripe-Client-User-Agent":Q,"X-Stripe-Client-Telemetry":this._getTelemetryHeader(),"Stripe-Version":J,"Stripe-Account":V,"Stripe-Context":U,"Idempotency-Key":this._defaultIdempotencyKey(X,G,W)},z=X=="POST"||X=="PUT"||X=="PATCH";if(z||$){if(!z)(0,b.emitWarning)(`${X} method had non-zero contentLength but no payload is expected for this verb`);B["Content-Length"]=$}return Object.assign((0,b.removeNullish)(B),(0,b.normalizeHeaders)(Y))}_getUserAgentString(Z){let $=this._stripe.getConstant("PACKAGE_VERSION"),J=this._stripe._appInfo?this._stripe.getAppInfoAsString():"",Q=this._stripe.getConstant("AI_AGENT"),X=`Stripe/${Z} NodeBindings/${$}`;if(J)X+=` ${J}`;if(Q)X+=` AIAgent/${Q}`;return X}_getTelemetryHeader(){if(this._stripe.getTelemetryEnabled()&&this._stripe._prevRequestMetrics.length>0){let Z=this._stripe._prevRequestMetrics.shift();return JSON.stringify({last_request_metrics:Z})}}_recordRequestMetrics(Z,$,J){if(this._stripe.getTelemetryEnabled()&&Z)if(this._stripe._prevRequestMetrics.length>this._maxBufferedRequestMetric)(0,b.emitWarning)("Request metrics buffer is full, dropping telemetry message.");else{let Q={request_id:Z,request_duration_ms:$};if(J&&J.length>0)Q.usage=J;this._stripe._prevRequestMetrics.push(Q)}}_rawRequest(Z,$,J,Q,X){return new Promise((G,V)=>{let U;try{let H=Z.toUpperCase();if(H!=="POST"&&J&&Object.keys(J).length!==0)throw Error("rawRequest only supports params on POST requests. Please pass null and add your parameters to path.");let T=[].slice.call([J,Q]),D=(0,b.getDataFromArgs)(T),q=H==="POST"?Object.assign({},D):null,O=(0,b.getOptionsFromArgs)(T),k=O.headers,N=O.authenticator;U={requestMethod:H,requestPath:$,bodyData:q,queryData:{},authenticator:N,headers:k,host:O.host,streaming:!!O.streaming,settings:{},usage:X||["raw_request"]}}catch(H){V(H);return}function W(H,T){if(H)V(H);else G(T)}let{headers:B,settings:z}=U,L=U.authenticator;this._request(U.requestMethod,U.host,$,U.bodyData,L,{headers:B,settings:z,streaming:U.streaming},U.usage,W)})}_getContentLength(Z){return typeof Z==="string"?new TextEncoder().encode(Z).length:Z.length}_request(Z,$,J,Q,X,Y,G=[],V,U=null){let W;X=X??this._stripe._authenticator??null;let B=(0,b.getAPIMode)(J),z=(T,D,q,O,k)=>{return setTimeout(T,this._getSleepTimeInMS(O,k),D,q,O+1)},L=(T,D,q)=>{let O=Y.settings&&Y.settings.timeout&&Number.isInteger(Y.settings.timeout)&&Y.settings.timeout>=0?Y.settings.timeout:this._stripe.getApiField("timeout"),k={host:$||this._stripe.getApiField("host"),port:this._stripe.getApiField("port"),path:J,method:Z,headers:Object.assign({},D),body:W,protocol:this._stripe.getApiField("protocol")};X(k).then(()=>{let N=this._stripe.getApiField("httpClient").makeRequest(k.host,k.port,k.path,k.method,k.headers,k.body,k.protocol,O),R=Date.now(),M=(0,b.removeNullish)({api_version:T,account:(0,b.parseHttpHeaderAsString)(D["Stripe-Account"]),idempotency_key:(0,b.parseHttpHeaderAsString)(D["Idempotency-Key"]),method:Z,path:J,request_start_time:R}),_=q||0,P0=this._getMaxNetworkRetries(Y.settings||{});this._stripe._emitter.emit("request",M),N.then((y)=>{if(_0._shouldRetry(y,_,P0))return z(L,T,D,_,(0,b.parseHttpHeaderAsNumber)(y.getHeaders()["retry-after"]));else if(Y.streaming&&y.getStatusCode()<400)return this._streamingResponseHandler(M,G,V)(y);else return this._jsonResponseHandler(M,B,G,V)(y)}).catch((y)=>{if(_0._shouldRetry(null,_,P0,y))return z(L,T,D,_,null);else{let d3=y.code&&y.code===b$.HttpClient.TIMEOUT_ERROR_CODE;return V(new w0.StripeConnectionError({message:d3?`Request aborted due to timeout being reached (${O}ms)`:_0._generateConnectionErrorMessage(_),detail:y}))}})}).catch((N)=>{throw new w0.StripeError({message:"Unable to authenticate the request",exception:N})})},H=(T,D)=>{if(T)return V(T);W=D,this._stripe.getClientUserAgent((q)=>{let O=this._stripe.getApiField("version"),k=this._makeHeaders({contentType:B=="v2"?"application/json":"application/x-www-form-urlencoded",contentLength:this._getContentLength(D),apiVersion:O,clientUserAgent:q,method:Z,userSuppliedHeaders:Y.headers??null,userSuppliedSettings:Y.settings??{},stripeAccount:Y.stripeAccount??this._stripe.getApiField("stripeAccount"),stripeContext:this._normalizeStripeContext(Y.stripeContext,this._stripe.getApiField("stripeContext")),apiMode:B});L(O,k,0)})};if(U)U(Z,Q,Y.headers,H);else{let T;if(B=="v2")T=Q?(0,b.jsonStringifyRequestData)(Q):"";else T=(0,b.queryStringifyRequestData)(Q||{});H(null,T)}}}f$.RequestSender=_0});var n$=K((c$)=>{Object.defineProperty(c$,"__esModule",{value:!0});c$.makeAutoPaginationMethods=void 0;var N8=c();class p9{constructor(Z,$,J,Q){this.index=0,this.pagePromise=Z,this.promiseCache={currentPromise:null},this.requestArgs=$,this.spec=J,this.stripeResource=Q}async iterate(Z){if(!(Z&&Z.data&&typeof Z.data.length==="number"))throw Error("Unexpected: Stripe API response does not have a well-formed `data` array.");let $=u$(this.requestArgs);if(this.index<Z.data.length){let J=$?Z.data.length-1-this.index:this.index,Q=Z.data[J];return this.index+=1,{value:Q,done:!1}}else if(Z.has_more){this.index=0,this.pagePromise=this.getNextPage(Z);let J=await this.pagePromise;return this.iterate(J)}return{done:!0,value:void 0}}getNextPage(Z){throw Error("Unimplemented")}async _next(){return this.iterate(await this.pagePromise)}next(){if(this.promiseCache.currentPromise)return this.promiseCache.currentPromise;let Z=(async()=>{let $=await this._next();return this.promiseCache.currentPromise=null,$})();return this.promiseCache.currentPromise=Z,Z}}class g$ extends p9{getNextPage(Z){let $=u$(this.requestArgs),J=VU(Z,$);return this.stripeResource._makeRequest(this.requestArgs,this.spec,{[$?"ending_before":"starting_after"]:J})}}class h$ extends p9{getNextPage(Z){if(!Z.next_page)throw Error("Unexpected: Stripe API response does not have a well-formed `next_page` field, but `has_more` was true.");return this.stripeResource._makeRequest(this.requestArgs,this.spec,{page:Z.next_page})}}class m${constructor(Z,$,J,Q){this.firstPagePromise=Z,this.currentPageIterator=null,this.nextPageUrl=null,this.requestArgs=$,this.spec=J,this.stripeResource=Q}async initFirstPage(){if(this.firstPagePromise){let Z=await this.firstPagePromise;this.firstPagePromise=null,this.currentPageIterator=Z.data[Symbol.iterator](),this.nextPageUrl=Z.next_page_url||null}}async turnPage(){if(!this.nextPageUrl)return null;this.spec.fullPath=this.nextPageUrl;let Z=await this.stripeResource._makeRequest([],this.spec,{});return this.nextPageUrl=Z.next_page_url||null,this.currentPageIterator=Z.data[Symbol.iterator](),this.currentPageIterator}async next(){if(await this.initFirstPage(),this.currentPageIterator){let J=this.currentPageIterator.next();if(!J.done)return{done:!1,value:J.value}}let Z=await this.turnPage();if(!Z)return{done:!0,value:void 0};let $=Z.next();if(!$.done)return{done:!1,value:$.value};return{done:!0,value:void 0}}}var QU=(Z,$,J,Q)=>{let X=(0,N8.getAPIMode)(J.fullPath||J.path);if(X!=="v2"&&J.methodType==="search")return n9(new h$(Q,$,J,Z));if(X!=="v2"&&J.methodType==="list")return n9(new g$(Q,$,J,Z));if(X==="v2"&&J.methodType==="list")return n9(new m$(Q,$,J,Z));return null};c$.makeAutoPaginationMethods=QU;var n9=(Z)=>{let $=BU((...X)=>Z.next(...X)),J=WU($),Q={autoPagingEach:$,autoPagingToArray:J,next:()=>Z.next(),return:()=>{return{}},[XU()]:()=>{return Q}};return Q};function XU(){if(typeof Symbol<"u"&&Symbol.asyncIterator)return Symbol.asyncIterator;return"@@asyncIterator"}function YU(Z){if(Z.length<2)return null;let $=Z[1];if(typeof $!=="function")throw Error(`The second argument to autoPagingEach, if present, must be a callback function; received ${typeof $}`);return $}function GU(Z){if(Z.length===0)return;let $=Z[0];if(typeof $!=="function")throw Error(`The first argument to autoPagingEach, if present, must be a callback function; received ${typeof $}`);if($.length===2)return $;if($.length>2)throw Error(`The \`onItem\` callback function passed to autoPagingEach must accept at most two arguments; got ${$}`);return function(Q,X){let Y=$(Q);X(Y)}}function VU(Z,$){let J=$?0:Z.data.length-1,Q=Z.data[J],X=Q&&Q.id;if(!X)throw Error("Unexpected: No `id` found on the last item while auto-paging a list.");return X}function BU(Z){return function(){let J=[].slice.call(arguments),Q=GU(J),X=YU(J);if(J.length>2)throw Error(`autoPagingEach takes up to two arguments; received ${J}`);let Y=UU(Z,Q);return(0,N8.callbackifyPromiseWithTimeout)(Y,X)}}function WU(Z){return function(J,Q){let X=J&&J.limit;if(!X)throw Error("You must pass a `limit` option to autoPagingToArray, e.g., `autoPagingToArray({limit: 1000});`.");if(X>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.");let Y=new Promise((G,V)=>{let U=[];Z((W)=>{if(U.push(W),U.length>=X)return!1}).then(()=>{G(U)}).catch(V)});return(0,N8.callbackifyPromiseWithTimeout)(Y,Q)}}function UU(Z,$){return new Promise((J,Q)=>{function X(Y){if(Y.done){J();return}let G=Y.value;return new Promise((V)=>{$(G,V)}).then((V)=>{if(V===!1)return X({done:!0,value:void 0});else return Z().then(X)})}Z().then(X).catch(Q)})}function u$(Z){let $=[].slice.call(Z);return!!(0,N8.getDataFromArgs)($).ending_before}});var a$=K((d$)=>{Object.defineProperty(d$,"__esModule",{value:!0});d$.stripeMethod=void 0;var p$=c(),zU=n$();function LU(Z){if(Z.path!==void 0&&Z.fullPath!==void 0)throw Error(`Method spec specified both a 'path' (${Z.path}) and a 'fullPath' (${Z.fullPath}).`);return function(...$){let J=typeof $[$.length-1]=="function"&&$.pop();Z.urlParams=(0,p$.extractUrlParams)(Z.fullPath||this.createResourcePathWithSymbols(Z.path||""));let Q=(0,p$.callbackifyPromiseWithTimeout)(this._makeRequest($,Z,{}),J);return Object.assign(Q,(0,zU.makeAutoPaginationMethods)(this,$,Z,Q)),Q}}d$.stripeMethod=LU});var I8=K((s$)=>{Object.defineProperty(s$,"__esModule",{value:!0});s$.Decimal=s$.isDecimal=s$.DEFAULT_DIV_PRECISION=void 0;var KU={"ubb-usage-count":{mode:"significant-figures",value:15},"v1-api":{mode:"decimal-places",value:12}};s$.DEFAULT_DIV_PRECISION=34;var o$=30,x8=1e6;class P{constructor(Z,$){let[J,Q]=P.normalize(Z,$);this._coefficient=J,this._exponent=Q,Object.freeze(this)}static normalize(Z,$){if(Z===0n)return[0n,0];let J=Z,Q=$;while(J!==0n&&J%10n===0n)J/=10n,Q+=1;return[J,Q]}static roundDivision(Z,$,J,Q){if($===0n)return Z;if(Q==="round-down")return Z;let X=$>0n===J>0n?1n:-1n;if(Q==="round-up")return Z+X;if(Q==="ceil")return X===1n?Z+1n:Z;if(Q==="floor")return X===-1n?Z-1n:Z;let Y=$<0n?-$:$,G=J<0n?-J:J,V=Y*2n,U;if(V===G)U=0;else if(V<G)U=-1;else U=1;if(U<0)return Z;if(U>0)return Z+X;if(Q==="half-up")return Z+X;if(Q==="half-down")return Z;if(Z%2n===0n)return Z;else return Z+X}add(Z){let $=Z;if(this._exponent===$._exponent)return new P(this._coefficient+$._coefficient,this._exponent);if(this._exponent<$._exponent){let J=10n**BigInt($._exponent-this._exponent);return new P(this._coefficient+$._coefficient*J,this._exponent)}else{let J=10n**BigInt(this._exponent-$._exponent);return new P(this._coefficient*J+$._coefficient,$._exponent)}}sub(Z){let $=Z;if(this._exponent===$._exponent)return new P(this._coefficient-$._coefficient,this._exponent);if(this._exponent<$._exponent){let J=10n**BigInt($._exponent-this._exponent);return new P(this._coefficient-$._coefficient*J,this._exponent)}else{let J=10n**BigInt(this._exponent-$._exponent);return new P(this._coefficient*J-$._coefficient,$._exponent)}}mul(Z){let $=Z;return new P(this._coefficient*$._coefficient,this._exponent+$._exponent)}div(Z,$,J){if($<0||!Number.isInteger($))throw Error("precision must be a non-negative integer");let Q=Z;if(Q._coefficient===0n)throw Error("Division by zero");let X=this._exponent-Q._exponent+$,Y,G,V;if(X>=0){let W=this._coefficient*10n**BigInt(X);Y=W/Q._coefficient,G=W%Q._coefficient,V=Q._coefficient}else{let W=Q._coefficient*10n**BigInt(-X);Y=this._coefficient/W,G=this._coefficient%W,V=W}let U=P.roundDivision(Y,G,V,J);return new P(U,-$)}cmp(Z){let $=Z;if(this._exponent===$._exponent){if(this._coefficient<$._coefficient)return-1;if(this._coefficient>$._coefficient)return 1;return 0}if(this._exponent<$._exponent){let J=10n**BigInt($._exponent-this._exponent),Q=$._coefficient*J;if(this._coefficient<Q)return-1;if(this._coefficient>Q)return 1;return 0}else{let J=10n**BigInt(this._exponent-$._exponent),Q=this._coefficient*J;if(Q<$._coefficient)return-1;if(Q>$._coefficient)return 1;return 0}}eq(Z){return this.cmp(Z)===0}lt(Z){return this.cmp(Z)===-1}lte(Z){return this.cmp(Z)<=0}gt(Z){return this.cmp(Z)===1}gte(Z){return this.cmp(Z)>=0}isZero(){return this._coefficient===0n}isNegative(){return this._coefficient<0n}isPositive(){return this._coefficient>0n}neg(){return new P(-this._coefficient,this._exponent)}abs(){if(this._coefficient<0n)return new P(-this._coefficient,this._exponent);return this}round(Z,$){let J=typeof $==="string"?KU[$]:$;if(J===void 0)throw Error(`Unknown rounding preset: "${$}"`);if(J.value<0||!Number.isInteger(J.value))throw Error("DecimalRoundingOptions.value must be a non-negative integer");if(J.mode==="decimal-places"){let B=this.toFixed(J.value,Z);return s$.Decimal.from(B)}if(this._coefficient===0n)return this;let X=(this._coefficient<0n?(-this._coefficient).toString():this._coefficient.toString()).length;if(J.value===0)return s$.Decimal.zero;if(X<=J.value)return this;let Y=X-J.value,G=10n**BigInt(Y),V=this._coefficient/G,U=this._coefficient%G,W=P.roundDivision(V,U,G,Z);return new P(W,this._exponent+Y)}toString(){if(this._coefficient===0n)return"0";let Z=this._coefficient.toString(),$=Z.startsWith("-"),J=$?Z.slice(1):Z;if(this._exponent<0){let X=-this._exponent;if((X>=J.length?X-J.length:0)>o$){if(J.length===1)return`${Z}E${String(this._exponent)}`;let G=J[0]??"",V=J.slice(1),U=this._exponent+J.length-1;return`${$?"-":""}${G}.${V}E${String(U)}`}if(X>=J.length){let G="0".repeat(X-J.length);return`${$?"-":""}0.${G}${J}`}else{let G=J.slice(0,J.length-X),V=J.slice(J.length-X);return`${$?"-":""}${G}.${V}`}}if(J.length+this._exponent<=o$){if(this._exponent===0)return Z;let X="0".repeat(this._exponent);return`${$?"-":""}${J}${X}`}else{if(J.length===1)return`${Z}E+${String(this._exponent)}`;let X=J[0]??"",Y=J.slice(1),G=this._exponent+J.length-1;return`${$?"-":""}${X}.${Y}E+${String(G)}`}}toJSON(){return this.toString()}toNumber(){return Number(this.toString())}toFixed(Z,$){if(Z<0||!Number.isInteger(Z))throw Error("decimalPlaces must be a non-negative integer");let J=(X)=>{let Y=X.toString(),G=Y.startsWith("-"),V=G?Y.slice(1):Y;if(Z===0)return Y;if(Z>=V.length){let U="0".repeat(Z-V.length);return`${G?"-":""}0.${U}${V}`}else{let U=V.slice(0,V.length-Z),W=V.slice(V.length-Z);return`${G?"-":""}${U}.${W}`}},Q=-Z;if(this._exponent===Q)return J(this._coefficient);if(this._exponent<Q){let X=Q-this._exponent,Y=10n**BigInt(X),G=this._coefficient/Y,V=this._coefficient%Y,U=P.roundDivision(G,V,Y,$);return J(U)}else{let X=this._exponent-Q,Y=this._coefficient*10n**BigInt(X);return J(Y)}}valueOf(){return this.toString()}}function HU(Z){return Z instanceof P}s$.isDecimal=HU;s$.Decimal={from(Z){if(typeof Z==="bigint")return new P(Z,0);if(typeof Z==="number"){if(!Number.isFinite(Z))throw Error("Number must be finite");return s$.Decimal.from(Z.toString())}let $=Z.trim();if($==="")throw Error("Cannot parse empty string as Decimal");let J=/^([+-]?)(\d+)(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/.exec($);if(!J)throw Error(`Invalid decimal string: ${Z}`);let Q=J[1]==="-"?-1n:1n,X=J[2]??"",Y=J[3]??"",G=J[4]?Number(J[4]):0;if(!Number.isSafeInteger(G)||G>x8||G<-x8)throw Error(`Exponent out of range: ${String(J[4])} exceeds safe integer bounds`);let V=X+Y,U=Q*BigInt(V),W=G-Y.length;if(!Number.isSafeInteger(W)||W>x8||W<-x8)throw Error(`Computed exponent out of range: ${String(W)} exceeds safe integer bounds`);return new P(U,W)},zero:new P(0n,0)}});var t$=K((r$)=>{Object.defineProperty(r$,"__esModule",{value:!0});r$.coerceV2ResponseData=r$.coerceV2RequestData=void 0;var DU=I8(),OU=(Z,$)=>{if(Z==null)return Z;switch($.kind){case"int64_string":return typeof Z==="bigint"||typeof Z==="number"?String(Z):Z;case"decimal_string":return typeof Z.toFixed==="function"&&typeof Z.isZero==="function"?Z.toString():Z;case"object":{if(typeof Z!=="object"||Array.isArray(Z))return Z;let J=Z,Q={};for(let X of Object.keys(J)){let Y=$.fields[X];Q[X]=Y?r$.coerceV2RequestData(J[X],Y):J[X]}return Q}case"array":{if(!Array.isArray(Z))return Z;return Z.map((J)=>r$.coerceV2RequestData(J,$.element))}case"nullable":return r$.coerceV2RequestData(Z,$.inner)}};r$.coerceV2RequestData=OU;var qU=(Z,$)=>{if(Z==null)return Z;switch($.kind){case"int64_string":if(typeof Z==="string")try{return BigInt(Z)}catch{throw Error(`Failed to coerce int64_string value: expected an integer string, got '${Z}'`)}return Z;case"decimal_string":if(typeof Z==="string")try{return DU.Decimal.from(Z)}catch{throw Error(`Failed to coerce decimal_string value: expected a decimal string, got '${Z}'`)}return Z;case"object":{if(typeof Z!=="object"||Array.isArray(Z))return Z;let J=Z;for(let Q of Object.keys($.fields))if(Q in J)J[Q]=r$.coerceV2ResponseData(J[Q],$.fields[Q]);return J}case"array":{if(!Array.isArray(Z))return Z;for(let J=0;J<Z.length;J++)Z[J]=r$.coerceV2ResponseData(Z[J],$.element);return Z}case"nullable":return r$.coerceV2ResponseData(Z,$.inner)}};r$.coerceV2ResponseData=qU});var w=K((Z1)=>{Object.defineProperty(Z1,"__esModule",{value:!0});Z1.StripeResource=void 0;var $0=c(),EU=a$(),e$=t$();m0.extend=$0.protoExtend;m0.method=EU.stripeMethod;m0.MAX_BUFFERED_REQUEST_METRICS=100;function m0(Z,$){if(this._stripe=Z,$)throw Error("Support for curried url params was dropped in stripe-node v7.0.0. Instead, pass two ids.");this.basePath=(0,$0.makeURLInterpolator)(this.basePath||Z.getApiField("basePath")),this.resourcePath=this.path,this.path=(0,$0.makeURLInterpolator)(this.path),this.initialize(...arguments)}Z1.StripeResource=m0;m0.prototype={_stripe:null,path:"",resourcePath:"",basePath:null,initialize(){},requestDataProcessor:null,validateRequest:null,createFullPath(Z,$){let J=[this.basePath($),this.path($)];if(typeof Z==="function"){let Q=Z($);if(Q)J.push(Q)}else J.push(Z);return this._joinUrlParts(J)},createResourcePathWithSymbols(Z){if(Z)return`/${this._joinUrlParts([this.resourcePath,Z])}`;else return`/${this.resourcePath}`},_joinUrlParts(Z){return Z.join("/").replace(/\/{2,}/g,"/")},_getRequestOpts(Z,$,J){let Q=($.method||"GET").toUpperCase(),X=$.usage||[],Y=$.urlParams||[],G=$.encode||((_)=>_),V=!!$.fullPath,U=(0,$0.makeURLInterpolator)(V?$.fullPath:$.path||""),W=V?$.fullPath:this.createResourcePathWithSymbols($.path),B=[].slice.call(Z),z=Y.reduce((_,P0)=>{let y=B.shift();if(typeof y!=="string")throw Error(`Stripe: Argument "${P0}" must be a string, but got: ${y} (on API request to \`${Q} ${W}\`)`);return _[P0]=y,_},{}),L=(0,$0.getDataFromArgs)(B),H=G(Object.assign({},L,J)),T=(0,$0.getOptionsFromArgs)(B),D=T.host||$.host,q=!!$.streaming||!!T.streaming;if(B.filter((_)=>_!=null).length)throw Error(`Stripe: Unknown arguments (${B}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options. (on API request to ${Q} \`${W}\`)`);let O=V?U(z):this.createFullPath(U,z),k=Object.assign(T.headers,$.headers);if($.validator)$.validator(H,{headers:k});let N=$.method==="GET"||$.method==="DELETE";return{requestMethod:Q,requestPath:O,bodyData:N?null:H,queryData:N?H:{},authenticator:T.authenticator??null,headers:k,host:D??null,streaming:q,settings:T.settings,usage:X}},_makeRequest(Z,$,J){return new Promise((Q,X)=>{let Y;try{Y=this._getRequestOpts(Z,$,J)}catch(z){X(z);return}if($.requestSchema&&Y.bodyData)Y.bodyData=(0,e$.coerceV2RequestData)(Y.bodyData,$.requestSchema);function G(z,L){if(z)X(z);else try{if($.responseSchema)(0,e$.coerceV2ResponseData)(L,$.responseSchema);Q($.transformResponseData?$.transformResponseData(L):L)}catch(H){X(H)}}let V=Object.keys(Y.queryData).length===0,U=[Y.requestPath,V?"":"?",(0,$0.queryStringifyRequestData)(Y.queryData)].join(""),{headers:W,settings:B}=Y;this._stripe._requestSender._request(Y.requestMethod,Y.host,U,Y.bodyData,Y.authenticator,{headers:W,settings:B,streaming:Y.streaming},Y.usage,G,this.requestDataProcessor?.bind(this))})}}});var X1=K((J1)=>{Object.defineProperty(J1,"__esModule",{value:!0});J1.StripeContext=void 0;class T0{constructor(Z=[]){this._segments=[...Z]}get segments(){return[...this._segments]}push(Z){if(!Z)throw Error("Segment cannot be null or undefined");return new T0([...this._segments,Z])}pop(){if(this._segments.length===0)throw Error("Cannot pop from an empty context");return new T0(this._segments.slice(0,-1))}toString(){return this._segments.join("/")}static parse(Z){if(!Z)return new T0([]);return new T0(Z.split("/"))}}J1.StripeContext=T0});var V1=K((Y1)=>{Object.defineProperty(Y1,"__esModule",{value:!0});Y1.createWebhooks=void 0;var a=M0(),FU=j0();function CU(Z){let $={DEFAULT_TOLERANCE:300,signature:null,constructEvent(B,z,L,H,T,D){try{if(!this.signature)throw Error("ERR: missing signature helper, unable to verify");this.signature.verifyHeader(B,z,L,H||$.DEFAULT_TOLERANCE,T,D)}catch(O){if(O instanceof FU.CryptoProviderOnlySupportsAsyncError)O.message+="\nUse `await constructEventAsync(...)` instead of `constructEvent(...)`";throw O}let q=B instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(B)):JSON.parse(B);if(q&&q.object==="v2.core.event")throw Error("You passed an event notification to stripe.webhooks.constructEvent, which expects a webhook payload. Use stripe.parseEventNotification instead.");return q},async constructEventAsync(B,z,L,H,T,D){if(!this.signature)throw Error("ERR: missing signature helper, unable to verify");await this.signature.verifyHeaderAsync(B,z,L,H||$.DEFAULT_TOLERANCE,T,D);let q=B instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(B)):JSON.parse(B);if(q&&q.object==="v2.core.event")throw Error("You passed an event notification to stripe.webhooks.constructEvent, which expects a webhook payload. Use stripe.parseEventNotification instead.");return q},generateTestHeaderString:function(B){let z=W(B),L=z.signature||z.cryptoProvider.computeHMACSignature(z.payloadString,z.secret);return z.generateHeaderString(L)},generateTestHeaderStringAsync:async function(B){let z=W(B),L=z.signature||await z.cryptoProvider.computeHMACSignatureAsync(z.payloadString,z.secret);return z.generateHeaderString(L)}},J={EXPECTED_SCHEME:"v1",verifyHeader(B,z,L,H,T,D){let{decodedHeader:q,decodedPayload:O,details:k,suspectPayloadType:N}=X(B,z,this.EXPECTED_SCHEME),R=/\s/.test(L);T=T||U();let M=T.computeHMACSignature(Q(O,k),L);return Y(O,q,k,M,H,N,R,D),!0},async verifyHeaderAsync(B,z,L,H,T,D){let{decodedHeader:q,decodedPayload:O,details:k,suspectPayloadType:N}=X(B,z,this.EXPECTED_SCHEME),R=/\s/.test(L);T=T||U();let M=await T.computeHMACSignatureAsync(Q(O,k),L);return Y(O,q,k,M,H,N,R,D)}};function Q(B,z){return`${z.timestamp}.${B}`}function X(B,z,L){if(!B)throw new a.StripeSignatureVerificationError(z,B,{message:"No webhook payload was provided."});let H=typeof B!="string"&&!(B instanceof Uint8Array),T=new TextDecoder("utf8"),D=B instanceof Uint8Array?T.decode(B):B;if(Array.isArray(z))throw Error("Unexpected: An array was passed as a header, which should not be possible for the stripe-signature header.");if(z==null||z=="")throw new a.StripeSignatureVerificationError(z,B,{message:"No stripe-signature header value was provided."});let q=z instanceof Uint8Array?T.decode(z):z,O=G(q,L);if(!O||O.timestamp===-1)throw new a.StripeSignatureVerificationError(q,D,{message:"Unable to extract timestamp and signatures from header"});if(!O.signatures.length)throw new a.StripeSignatureVerificationError(q,D,{message:"No signatures found with expected scheme"});return{decodedPayload:D,decodedHeader:q,details:O,suspectPayloadType:H}}function Y(B,z,L,H,T,D,q,O){let k=!!L.signatures.filter(Z.secureCompare.bind(Z,H)).length,N=`
3
- Learn more about webhook signing and explore webhook integration examples for various frameworks at https://docs.stripe.com/webhooks/signature`,R=q?`
2
+ var pW=Object.create;var{getPrototypeOf:iW,defineProperty:UZ,getOwnPropertyNames:rW}=Object;var tW=Object.prototype.hasOwnProperty;function aW(Z){return this[Z]}var oW,sW,eW=(Z,$,J)=>{var Y=Z!=null&&typeof Z==="object";if(Y){var X=$?oW??=new WeakMap:sW??=new WeakMap,Q=X.get(Z);if(Q)return Q}J=Z!=null?pW(iW(Z)):{};let G=$||!Z||!Z.__esModule?UZ(J,"default",{value:Z,enumerable:!0}):J;for(let W of rW(Z))if(!tW.call(G,W))UZ(G,W,{get:aW.bind(Z,W),enumerable:!0});if(Y)X.set(Z,G);return G};var O=(Z,$)=>()=>($||Z(($={exports:{}}).exports,$),$.exports);var E=import.meta.require;var V0=O((cZ)=>{Object.defineProperty(cZ,"__esModule",{value:!0});cZ.CryptoProviderOnlySupportsAsyncError=cZ.CryptoProvider=void 0;class gZ{computeHMACSignature(Z,$){throw Error("computeHMACSignature not implemented.")}computeHMACSignatureAsync(Z,$){throw Error("computeHMACSignatureAsync not implemented.")}computeSHA256Async(Z){throw Error("computeSHA256 not implemented.")}}cZ.CryptoProvider=gZ;class uZ extends Error{}cZ.CryptoProviderOnlySupportsAsyncError=uZ});var iZ=O((nZ)=>{Object.defineProperty(nZ,"__esModule",{value:!0});nZ.NodeCryptoProvider=void 0;var lZ=E("crypto"),IV=V0();class dZ extends IV.CryptoProvider{computeHMACSignature(Z,$){return lZ.createHmac("sha256",$).update(Z,"utf8").digest("hex")}async computeHMACSignatureAsync(Z,$){return await this.computeHMACSignature(Z,$)}async computeSHA256Async(Z){return new Uint8Array(await lZ.createHash("sha256").update(Z).digest())}}nZ.NodeCryptoProvider=dZ});var B0=O((tZ)=>{Object.defineProperty(tZ,"__esModule",{value:!0});tZ.HttpClientResponse=tZ.HttpClient=void 0;class o{getClientName(){throw Error("getClientName not implemented.")}makeRequest(Z,$,J,Y,X,Q,G,W){throw Error("makeRequest not implemented.")}static makeTimeoutError(){let Z=TypeError(o.TIMEOUT_ERROR_CODE);return Z.code=o.TIMEOUT_ERROR_CODE,Z}}tZ.HttpClient=o;o.CONNECTION_CLOSED_ERROR_CODES=["ECONNRESET","EPIPE"];o.TIMEOUT_ERROR_CODE="ETIMEDOUT";class rZ{constructor(Z,$){this._statusCode=Z,this._headers=$}getStatusCode(){return this._statusCode}getHeaders(){return this._headers}getRawResponse(){throw Error("getRawResponse not implemented.")}toStream(Z){throw Error("toStream not implemented.")}toJSON(){throw Error("toJSON not implemented.")}}tZ.HttpClientResponse=rZ});var X$=O((J$)=>{Object.defineProperty(J$,"__esModule",{value:!0});J$.NodeHttpClientResponse=J$.NodeHttpClient=void 0;var oZ=E("http"),sZ=E("https"),z8=B0(),eZ=oZ.default||oZ,Z$=sZ.default||sZ,SV=new eZ.Agent({keepAlive:!0}),MV=new Z$.Agent({keepAlive:!0});class $$ extends z8.HttpClient{constructor(Z){super();this._agent=Z}getClientName(){return"node"}makeRequest(Z,$,J,Y,X,Q,G,W){let z=G==="http",V=this._agent;if(!V)V=z?SV:MV;return new Promise((K,H)=>{let w=(z?eZ:Z$).request({host:Z,port:$,path:J,method:Y,agent:V,headers:X,ciphers:"DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:!MD5"});w.setTimeout(W,()=>{w.destroy(z8.HttpClient.makeTimeoutError())}),w.on("response",(U)=>{K(new K8(U))}),w.on("error",(U)=>{H(U)}),w.once("socket",(U)=>{if(U.connecting)U.once(z?"connect":"secureConnect",()=>{w.write(Q),w.end()});else w.write(Q),w.end()})})}}J$.NodeHttpClient=$$;class K8 extends z8.HttpClientResponse{constructor(Z){super(Z.statusCode,Z.headers||{});this._res=Z}getRawResponse(){return this._res}toStream(Z){return this._res.once("end",()=>Z()),this._res}toJSON(){return new Promise((Z,$)=>{let J="";this._res.setEncoding("utf8"),this._res.on("data",(Y)=>{J+=Y}),this._res.once("end",()=>{try{Z(JSON.parse(J))}catch(Y){if(Y instanceof Error)Y.rawBody=J;$(Y)}})})}}J$.NodeHttpClientResponse=K8});var H8=O((Q$)=>{Object.defineProperty(Q$,"__esModule",{value:!0});Q$.DEFAULT_BASE_ADDRESSES=void 0;Q$.DEFAULT_BASE_ADDRESSES={api:"api.stripe.com",files:"files.stripe.com",connect:"connect.stripe.com",meter_events:"meter-events.stripe.com"}});var R=O((O$)=>{Object.defineProperty(O$,"__esModule",{value:!0});O$.attachCallSiteToError=O$.parseHeadersForFetch=O$.parseHttpHeaderAsString=O$.getAPIMode=O$.jsonStringifyRequestData=O$.concat=O$.createApiKeyAuthenticator=O$.detectAIAgent=O$.AI_AGENTS=O$.validateInteger=O$.flattenAndStringify=O$.isObject=O$.pascalToCamelCase=O$.normalizeHeader=O$.normalizeHeaders=O$.removeNullish=O$.processOptions=O$.validateApiBase=O$.extractUrlParams=O$.makeURLInterpolator=O$.queryStringifyRequestData=O$.isOptionsHash=void 0;var hV=H8(),bV=["apiKey","idempotencyKey","stripeAccount","apiVersion","maxNetworkRetries","timeout","apiBase","authenticator","stripeContext","headers","additionalHeaders","streaming"];function yV(Z){return Z&&typeof Z==="object"&&bV.some(($)=>Object.prototype.hasOwnProperty.call(Z,$))}O$.isOptionsHash=yV;function vV(Z){return _V(Z)}O$.queryStringifyRequestData=vV;function W$(Z){return encodeURIComponent(Z).replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27").replace(/%5B/g,"[").replace(/%5D/g,"]")}function jV(Z){if(Z instanceof Date)return Math.floor(Z.getTime()/1000).toString();if(Z===null)return"";return String(Z)}function _V(Z){let $=[];function J(Y,X){if(X===void 0)return;if(X===null||typeof X!=="object"||X instanceof Date){$.push(W$(Y)+"="+W$(jV(X)));return}if(Array.isArray(X)){for(let Q=0;Q<X.length;Q++)if(X[Q]!==void 0)J(Y+"["+Q+"]",X[Q]);return}for(let Q of Object.keys(X))J(Y+"["+Q+"]",X[Q])}if(typeof Z==="object"&&Z!==null)for(let Y of Object.keys(Z))J(Y,Z[Y]);return $.join("&")}O$.makeURLInterpolator=(()=>{let Z={"\n":"\\n",'"':"\\\"","\u2028":"\\u2028","\u2029":"\\u2029"};return($)=>{let J=$.replace(/["\n\r\u2028\u2029]/g,(Y)=>Z[Y]);return(Y)=>{return J.replace(/\{([\s\S]+?)\}/g,(X,Q)=>{let G=Y[Q];if(RV(G))return encodeURIComponent(G);return""})}}})();function RV(Z){return["number","string","boolean"].includes(typeof Z)}function gV(Z){let $=Z.match(/\{\w+\}/g);if(!$)return[];return $.map((J)=>J.replace(/[{}]/g,""))}O$.extractUrlParams=gV;var uV=(Z)=>{if(typeof Z!=="string")throw Error(`API base must be a string, got: ${typeof Z}`);return Z in hV.DEFAULT_BASE_ADDRESSES};O$.validateApiBase=uV;function cV(Z){let $={authenticator:null,headers:{},settings:{},streaming:!1,apiBase:null};if(!Z)return $;if(Z.apiKey)$.authenticator=K$(Z.apiKey);if(Z.idempotencyKey)$.headers["Idempotency-Key"]=Z.idempotencyKey;if(Z.stripeAccount)$.headers["Stripe-Account"]=Z.stripeAccount;if(Z.stripeContext){if($.headers["Stripe-Account"])throw Error("Can't specify both stripeAccount and stripeContext.");$.headers["Stripe-Context"]=Z.stripeContext}if(Z.apiVersion)$.headers["Stripe-Version"]=Z.apiVersion;if(Number.isInteger(Z.maxNetworkRetries))$.settings.maxNetworkRetries=Z.maxNetworkRetries;if(Number.isInteger(Z.timeout))$.settings.timeout=Z.timeout;if(Z.authenticator){if(Z.apiKey)throw Error("Can't specify both apiKey and authenticator.");if(typeof Z.authenticator!=="function")throw Error("The authenticator must be a function receiving a request as the first parameter.");$.authenticator=Z.authenticator}if(Z.headers)Object.assign($.headers,Z.headers);if(Z.streaming)$.streaming=!0;return $}O$.processOptions=cV;function mV(Z){if(typeof Z!=="object")throw Error("Argument must be an object");return Object.keys(Z).reduce(($,J)=>{if(Z[J]!=null)$[J]=Z[J];return $},{})}O$.removeNullish=mV;function lV(Z){if(!(Z&&typeof Z==="object"))return Z;return Object.keys(Z).reduce(($,J)=>{return $[B$(J)]=Z[J],$},{})}O$.normalizeHeaders=lV;function B$(Z){return Z.split("-").map(($)=>$.charAt(0).toUpperCase()+$.substr(1).toLowerCase()).join("-")}O$.normalizeHeader=B$;function dV(Z){if(Z==="OAuth")return"oauth";else return Z[0].toLowerCase()+Z.substring(1)}O$.pascalToCamelCase=dV;function z$(Z){let $=typeof Z;return($==="function"||$==="object")&&!!Z}O$.isObject=z$;function nV(Z){let $={},J=(Y,X)=>{Object.entries(Y).forEach(([Q,G])=>{let W=X?`${X}[${Q}]`:Q;if(z$(G))if(!(G instanceof Uint8Array)&&!Object.prototype.hasOwnProperty.call(G,"data"))return J(G,W);else $[W]=G;else $[W]=String(G)})};return J(Z,null),$}O$.flattenAndStringify=nV;function pV(Z,$,J){if(!Number.isInteger($))if(J!==void 0)return J;else throw Error(`${Z} must be an integer`);return $}O$.validateInteger=pV;O$.AI_AGENTS=[["ANTIGRAVITY_CLI_ALIAS","antigravity"],["CLAUDECODE","claude_code"],["CLINE_ACTIVE","cline"],["CODEX_SANDBOX","codex_cli"],["CODEX_THREAD_ID","codex_cli"],["CODEX_SANDBOX_NETWORK_DISABLED","codex_cli"],["CODEX_CI","codex_cli"],["CURSOR_AGENT","cursor"],["GEMINI_CLI","gemini_cli"],["OPENCLAW_SHELL","openclaw"],["OPENCODE","open_code"]];function iV(Z){for(let[$,J]of O$.AI_AGENTS)if(Z[$])return J;return""}O$.detectAIAgent=iV;function K$(Z){let $=(J)=>{return J.headers.Authorization="Bearer "+Z,Promise.resolve()};return $._apiKey=Z,$}O$.createApiKeyAuthenticator=K$;function rV(Z){let $=Z.reduce((X,Q)=>X+Q.length,0),J=new Uint8Array($),Y=0;return Z.forEach((X)=>{J.set(X,Y),Y+=X.length}),J}O$.concat=rV;function tV(Z,$){if(this[Z]instanceof Date)return Math.floor(this[Z].getTime()/1000).toString();return $}function aV(Z){return JSON.stringify(Z,tV)}O$.jsonStringifyRequestData=aV;function oV(Z){if(!Z)return"v1";return Z.startsWith("/v2")?"v2":"v1"}O$.getAPIMode=oV;function H$(Z){if(Array.isArray(Z))return Z.join(", ");return String(Z)}O$.parseHttpHeaderAsString=H$;function sV(Z){return Object.entries(Z).map(([$,J])=>{return[$,H$(J)]})}O$.parseHeadersForFetch=sV;var V$=`
3
+ Originating from:`;function eV(Z,$){if(!Z||!Z.stack||!$)return;let J=$.substring($.indexOf(`
4
+ `)+1),Y=Z.stack.indexOf(V$),X=Y>=0?Z.stack.substring(0,Y):Z.stack;Z.stack=`${X}${V$}
5
+ ${J}`}O$.attachCallSiteToError=eV});var D$=O((U$)=>{Object.defineProperty(U$,"__esModule",{value:!0});U$.FetchHttpClientResponse=U$.FetchHttpClient=void 0;var AB=R(),z0=B0();class M0 extends z0.HttpClient{constructor(Z){super();if(!Z){if(!globalThis.fetch)throw Error("fetch() function not provided and is not defined in the global scope. You must provide a fetch implementation.");Z=globalThis.fetch}if(globalThis.AbortController)this._fetchFn=M0.makeFetchWithAbortTimeout(Z);else this._fetchFn=M0.makeFetchWithRaceTimeout(Z)}static makeFetchWithRaceTimeout(Z){return($,J,Y)=>{let X,Q=new Promise((W,z)=>{X=setTimeout(()=>{X=null,z(z0.HttpClient.makeTimeoutError())},Y)}),G=Z($,J);return Promise.race([G,Q]).finally(()=>{if(X)clearTimeout(X)})}}static makeFetchWithAbortTimeout(Z){return async($,J,Y)=>{let X=new AbortController,Q=setTimeout(()=>{Q=null,X.abort(z0.HttpClient.makeTimeoutError())},Y);try{return await Z($,{...J,signal:X.signal})}catch(G){if(G.name==="AbortError")throw z0.HttpClient.makeTimeoutError();else throw G}finally{if(Q)clearTimeout(Q)}}}getClientName(){return"fetch"}async makeRequest(Z,$,J,Y,X,Q,G,W){let z=G==="http";if(!J.startsWith("/"))throw Error(`Only relative paths are supported, got: "${J}"`);let V=new URL(`${z?"http":"https"}://${Z}${J}`);V.port=$;let B=Y=="POST"||Y=="PUT"||Y=="PATCH",K=Q||(B?"":void 0),H=await this._fetchFn(V.toString(),{method:Y,headers:(0,AB.parseHeadersForFetch)(X),body:K},W);return new f0(H)}}U$.FetchHttpClient=M0;class f0 extends z0.HttpClientResponse{constructor(Z){super(Z.status,f0._transformHeadersToObject(Z.headers));this._res=Z}getRawResponse(){return this._res}toStream(Z){return Z(),this._res.body}toJSON(){return this._res.text().then((Z)=>{try{return JSON.parse(Z)}catch($){if($ instanceof Error)$.rawBody=Z;throw $}})}static _transformHeadersToObject(Z){let $={};for(let J of Z){if(!Array.isArray(J)||J.length!=2)throw Error("Response objects produced by the fetch function given to FetchHttpClient do not have an iterable headers map. Response#headers should be an iterable object.");$[J[0]]=J[1]}return $}}U$.FetchHttpClientResponse=f0});var N$=O((T$)=>{Object.defineProperty(T$,"__esModule",{value:!0});T$.SubtleCryptoProvider=void 0;var L$=V0();class A$ extends L$.CryptoProvider{constructor(Z){super();this.subtleCrypto=Z||crypto.subtle}computeHMACSignature(Z,$){throw new L$.CryptoProviderOnlySupportsAsyncError("SubtleCryptoProvider cannot be used in a synchronous context.")}async computeHMACSignatureAsync(Z,$){let J=new TextEncoder,Y=await this.subtleCrypto.importKey("raw",J.encode($),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),X=await this.subtleCrypto.sign("hmac",Y,J.encode(Z)),Q=new Uint8Array(X),G=Array(Q.length);for(let W=0;W<Q.length;W++)G[W]=O8[Q[W]];return G.join("")}async computeSHA256Async(Z){return new Uint8Array(await this.subtleCrypto.digest("SHA-256",Z))}}T$.SubtleCryptoProvider=A$;var O8=Array(256);for(let Z=0;Z<O8.length;Z++)O8[Z]=Z.toString(16).padStart(2,"0")});var I$=O((C$)=>{Object.defineProperty(C$,"__esModule",{value:!0});C$.PlatformFunctions=void 0;var EB=D$(),NB=N$();class k${constructor(){this._fetchFn=null,this._agent=null}getPlatformInfo(){return null}getTelemetryId(){return null}emitWarning(Z){console.warn(`Stripe: ${Z}`)}getEnv(){return null}getRuntimeVersion(){return null}uuid4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(Z)=>{let $=Math.random()*16|0;return(Z==="x"?$:$&3|8).toString(16)})}secureCompare(Z,$){if(Z.length!==$.length)return!1;let J=Z.length,Y=0;for(let X=0;X<J;++X)Y|=Z.charCodeAt(X)^$.charCodeAt(X);return Y===0}createEmitter(){throw Error("createEmitter not implemented.")}tryBufferData(Z){throw Error("tryBufferData not implemented.")}createNodeHttpClient(Z){throw Error("createNodeHttpClient not implemented.")}createFetchHttpClient(Z){return new EB.FetchHttpClient(Z)}createDefaultHttpClient(){throw Error("createDefaultHttpClient not implemented.")}createNodeCryptoProvider(){throw Error("createNodeCryptoProvider not implemented.")}createSubtleCryptoProvider(Z){return new NB.SubtleCryptoProvider(Z)}createDefaultCryptoProvider(){throw Error("createDefaultCryptoProvider not implemented.")}}C$.PlatformFunctions=k$});var K0=O((M$)=>{Object.defineProperty(M$,"__esModule",{value:!0});M$.TemporarySessionExpiredError=M$.RateLimitError=M$.StripeUnsupportedResponseTypeError=M$.StripeUnsupportedGrantTypeError=M$.StripeInvalidScopeError=M$.StripeOAuthInvalidRequestError=M$.StripeInvalidClientError=M$.StripeInvalidGrantError=M$.StripeOAuthError=M$.StripeIdempotencyError=M$.StripeSignatureVerificationError=M$.StripeConnectionError=M$.StripeRateLimitError=M$.StripePermissionError=M$.StripeAuthenticationError=M$.StripeAPIError=M$.StripeInvalidRequestError=M$.StripeCardError=M$.StripeError=M$.generateV2Error=M$.generateOAuthError=M$.generateV1Error=void 0;var kB=(Z)=>{let $=Z.statusCode;if($===429||$===400&&Z.code==="rate_limit")return new D8(Z);if($===400||$===404){if(Z.type==="idempotency_error")return new b0(Z);return new h0(Z)}if($===401)return new U8(Z);if($===402)return new w8(Z);if($===403)return new q8(Z);return new F8(Z)};M$.generateV1Error=kB;var CB=(Z)=>{switch(Z.type){case"invalid_grant":return new L8(Z);case"invalid_client":return new A8(Z);case"invalid_request":return new T8(Z);case"invalid_scope":return new E8(Z);case"unsupported_grant_type":return new N8(Z);case"unsupported_response_type":return new k8(Z);default:return new g(Z)}};M$.generateOAuthError=CB;var PB=(Z)=>{switch(Z.type){case"idempotency_error":return new b0(Z);case"rate_limit":return new C8(Z);case"temporary_session_expired":return new P8(Z)}switch(Z.code){case"invalid_fields":return new h0(Z)}return M$.generateV1Error(Z)};M$.generateV2Error=PB;class S extends Error{constructor(Z={},$=null){super(Z.message);this.type=$||this.constructor.name,this.raw=Z,this.rawType=Z.type,this.detail=Z.detail,this.headers=Z.headers,this.requestId=Z.requestId,this.statusCode=Z.statusCode,this.message=Z.message??"",this.userMessage=Z.user_message,this.advice_code=Z.advice_code,this.charge=Z.charge,this.code=Z.code,this.decline_code=Z.decline_code,this.doc_url=Z.doc_url,this.network_advice_code=Z.network_advice_code,this.network_decline_code=Z.network_decline_code,this.param=Z.param,this.payment_intent=Z.payment_intent,this.payment_method=Z.payment_method,this.payment_method_type=Z.payment_method_type,this.request_log_url=Z.request_log_url,this.setup_intent=Z.setup_intent,this.source=Z.source,this.user_message=Z.user_message}}M$.StripeError=S;S.generate=M$.generateV1Error;class w8 extends S{constructor(Z={}){super(Z,"StripeCardError");this.decline_code=Z.decline_code??""}}M$.StripeCardError=w8;class h0 extends S{constructor(Z={}){super(Z,"StripeInvalidRequestError")}}M$.StripeInvalidRequestError=h0;class F8 extends S{constructor(Z={}){super(Z,"StripeAPIError")}}M$.StripeAPIError=F8;class U8 extends S{constructor(Z={}){super(Z,"StripeAuthenticationError")}}M$.StripeAuthenticationError=U8;class q8 extends S{constructor(Z={}){super(Z,"StripePermissionError")}}M$.StripePermissionError=q8;class D8 extends S{constructor(Z={}){super(Z,"StripeRateLimitError")}}M$.StripeRateLimitError=D8;class x$ extends S{constructor(Z={}){super(Z,"StripeConnectionError")}}M$.StripeConnectionError=x$;class S$ extends S{constructor(Z,$,J={}){super(J,"StripeSignatureVerificationError");this.header=Z,this.payload=$}}M$.StripeSignatureVerificationError=S$;class b0 extends S{constructor(Z={}){super(Z,"StripeIdempotencyError")}}M$.StripeIdempotencyError=b0;class g extends S{constructor(Z={},$="StripeOAuthError"){super(Z,$)}}M$.StripeOAuthError=g;class L8 extends g{constructor(Z={}){super(Z,"StripeInvalidGrantError")}}M$.StripeInvalidGrantError=L8;class A8 extends g{constructor(Z={}){super(Z,"StripeInvalidClientError")}}M$.StripeInvalidClientError=A8;class T8 extends g{constructor(Z={}){super(Z,"StripeOAuthInvalidRequestError")}}M$.StripeOAuthInvalidRequestError=T8;class E8 extends g{constructor(Z={}){super(Z,"StripeInvalidScopeError")}}M$.StripeInvalidScopeError=E8;class N8 extends g{constructor(Z={}){super(Z,"StripeUnsupportedGrantTypeError")}}M$.StripeUnsupportedGrantTypeError=N8;class k8 extends g{constructor(Z={}){super(Z,"StripeUnsupportedResponseTypeError")}}M$.StripeUnsupportedResponseTypeError=k8;class C8 extends S{constructor(Z={}){super(Z,"RateLimitError")}}M$.RateLimitError=C8;class P8 extends S{constructor(Z={}){super(Z,"TemporarySessionExpiredError")}}M$.TemporarySessionExpiredError=P8});var R$=O((j$)=>{Object.defineProperty(j$,"__esModule",{value:!0});j$.NodePlatformFunctions=void 0;var H0=E("crypto"),x8=E("fs"),S8=E("os"),y0=E("path"),h$=E("events"),iB=iZ(),b$=X$(),rB=I$(),tB=K0(),aB=R();class y$ extends tB.StripeError{}class v$ extends rB.PlatformFunctions{constructor(){super(...arguments);this._telemetryId=void 0}uuid4(){if(H0.randomUUID)return H0.randomUUID();return super.uuid4()}getPlatformInfo(){return`${process.platform} ${S8.release()} ${S8.arch()}`}emitWarning(Z){if(typeof process.emitWarning==="function")process.emitWarning(Z,"Stripe");else super.emitWarning(Z)}getEnv(){return process.env}getRuntimeVersion(){return process.version}getTelemetryId(){if(this._telemetryId!==void 0)return this._telemetryId;let Z=this._getTelemetryIdPath();if(!Z)return this._telemetryId=null,null;try{let J=x8.readFileSync(Z,"utf8").trim();if(J)return this._telemetryId=J,J}catch{}let $=H0.randomBytes(16).toString("hex");try{x8.mkdirSync(y0.dirname(Z),{recursive:!0}),x8.writeFileSync(Z,$,"utf8")}catch{return this._telemetryId=null,null}return this._telemetryId=$,$}_getTelemetryIdPath(){if(process.platform==="win32"){let J=process.env.APPDATA;if(!J)return null;return y0.join(J,"Stripe","telemetry_id")}let Z=process.env.XDG_CONFIG_HOME;if(Z)return y0.join(Z,"stripe","telemetry_id");let $=S8.homedir();if(!$)return null;return y0.join($,".config","stripe","telemetry_id")}secureCompare(Z,$){if(!Z||!$)throw Error("secureCompare must receive two arguments");if(Z.length!==$.length)return!1;if(H0.timingSafeEqual){let J=new TextEncoder,Y=J.encode(Z),X=J.encode($);return H0.timingSafeEqual(Y,X)}return super.secureCompare(Z,$)}createEmitter(){return new h$.EventEmitter}tryBufferData(Z){if(!(Z.file.data instanceof h$.EventEmitter))return Promise.resolve(Z);let $=[];return new Promise((J,Y)=>{Z.file.data.on("data",(X)=>{$.push(X)}).once("end",()=>{let X=Object.assign({},Z);X.file.data=(0,aB.concat)($),J(X)}).on("error",(X)=>{Y(new y$({message:"An error occurred while attempting to process the file for upload.",detail:X}))})})}createNodeHttpClient(Z){return new b$.NodeHttpClient(Z)}createDefaultHttpClient(){return new b$.NodeHttpClient}createNodeCryptoProvider(){return new iB.NodeCryptoProvider}createDefaultCryptoProvider(){return this.createNodeCryptoProvider()}}j$.NodePlatformFunctions=v$});var m$=O((u$)=>{Object.defineProperty(u$,"__esModule",{value:!0});u$.RequestSender=void 0;var s=K0(),g$=B0(),j=R();class O0{constructor(Z,$){this._stripe=Z,this._maxBufferedRequestMetric=$}_normalizeStripeContext(Z,$){if(Z)return Z.toString()||null;return $?.toString()||null}_addHeadersDirectlyToObject(Z,$){Z.requestId=$["request-id"],Z.stripeAccount=Z.stripeAccount||$["stripe-account"],Z.apiVersion=Z.apiVersion||$["stripe-version"],Z.idempotencyKey=Z.idempotencyKey||$["idempotency-key"]}_makeResponseEvent(Z,$,J){let Y=Date.now(),X=Y-Z.request_start_time;return(0,j.removeNullish)({api_version:J["stripe-version"],account:J["stripe-account"],idempotency_key:J["idempotency-key"],method:Z.method,path:Z.path,status:$,request_id:this._getRequestId(J),elapsed:X,request_start_time:Z.request_start_time,request_end_time:Y})}_getRequestId(Z){return Z["request-id"]}_emitStripeNotice(Z){let $=Z["stripe-notice"];if($)this._stripe._platformFunctions.emitWarning(typeof $==="string"?$:$[0])}_streamingResponseHandler(Z,$,J){return(Y)=>{let X=Y.getHeaders();this._emitStripeNotice(X);let Q=()=>{let W=this._makeResponseEvent(Z,Y.getStatusCode(),X);this._stripe._emitter.emit("response",W),this._recordRequestMetrics(this._getRequestId(X),W.elapsed,$)},G=Y.toStream(Q);return this._addHeadersDirectlyToObject(G,X),J(null,G)}}_jsonResponseHandler(Z,$,J,Y){return(X)=>{let Q=X.getHeaders();this._emitStripeNotice(Q);let G=this._getRequestId(Q),W=X.getStatusCode(),z=this._makeResponseEvent(Z,W,Q);X.toJSON().then((V)=>{if(this._stripe.getEmitEventBodiesEnabled())z.body=V;if(V.error){let B=typeof V.error==="string";if(B)V.error={type:V.error,message:V.error_description};V.error.headers=Q,V.error.statusCode=W,V.error.requestId=G;let K;if(B)K=(0,s.generateOAuthError)(V.error);else if($==="v2")K=(0,s.generateV2Error)(V.error);else K=(0,s.generateV1Error)(V.error);throw K}return V},(V)=>{if(this._stripe.getEmitEventBodiesEnabled()&&V.rawBody)z.body=V.rawBody;throw new s.StripeAPIError({message:"Invalid JSON received from the Stripe API",exception:V,requestId:Q["request-id"]})}).then((V)=>{this._stripe._emitter.emit("response",z),this._recordRequestMetrics(G,z.elapsed,J);let B=X.getRawResponse();this._addHeadersDirectlyToObject(B,Q),Object.defineProperty(V,"lastResponse",{enumerable:!1,writable:!1,value:B}),Y(null,V)},(V)=>{this._stripe._emitter.emit("response",z),Y(V,null)})}}static _generateConnectionErrorMessage(Z){return`An error occurred with our connection to Stripe.${Z>0?` Request was retried ${Z} times.`:""}`}static _shouldRetry(Z,$,J,Y){if(Y&&$===0&&g$.HttpClient.CONNECTION_CLOSED_ERROR_CODES.includes(Y.code))return!0;if($>=J)return!1;if(!Z)return!0;if(Z.getHeaders()["stripe-should-retry"]==="false")return!1;if(Z.getHeaders()["stripe-should-retry"]==="true")return!0;if(Z.getStatusCode()===409)return!0;if(Z.getStatusCode()>=500)return!0;return!1}_getSleepTimeInMS(Z){let $=this._stripe.getInitialNetworkRetryDelay(),J=this._stripe.getMaxNetworkRetryDelay(),Y=Math.min($*Math.pow(2,Z-1),J);return Y*=0.5*(1+Math.random()),Y=Math.max($,Y),Y*1000}_getMaxNetworkRetries(Z={}){return Z.maxNetworkRetries!==void 0&&Number.isInteger(Z.maxNetworkRetries)?Z.maxNetworkRetries:this._stripe.getMaxNetworkRetries()}_defaultIdempotencyKey(Z,$,J){let Y=this._getMaxNetworkRetries($),X=()=>`stripe-node-retry-${this._stripe._platformFunctions.uuid4()}`;if(J==="v2"){if(Z==="POST"||Z==="DELETE")return X()}else if(J==="v1"){if(Z==="POST"&&Y>0)return X()}return null}_makeHeaders({contentType:Z,contentLength:$,apiVersion:J,clientUserAgent:Y,method:X,userSuppliedHeaders:Q,userSuppliedSettings:G,stripeAccount:W,stripeContext:z,apiMode:V}){let B={Accept:"application/json","Content-Type":Z,"User-Agent":this._getUserAgentString(V),"X-Stripe-Client-User-Agent":Y,"X-Stripe-Client-Telemetry":this._getTelemetryHeader(),"Stripe-Version":J,"Stripe-Account":W,"Stripe-Context":z,"Idempotency-Key":this._defaultIdempotencyKey(X,G,V)},K=X=="POST"||X=="PUT"||X=="PATCH";if(K||$){if(!K)this._stripe._platformFunctions.emitWarning(`${X} method had non-zero contentLength but no payload is expected for this verb`);B["Content-Length"]=$}return Object.assign((0,j.removeNullish)(B),(0,j.normalizeHeaders)(Q))}_getUserAgentString(Z){let $=this._stripe.getConstant("PACKAGE_VERSION"),J=this._stripe._appInfo?this._stripe.getAppInfoAsString():"",Y=this._stripe.getConstant("AI_AGENT"),X=`Stripe/${Z} NodeBindings/${$}`;if(J)X+=` ${J}`;if(Y)X+=` AIAgent/${Y}`;return X}_getTelemetryHeader(){if(this._stripe.getTelemetryEnabled()&&this._stripe._prevRequestMetrics.length>0){let Z=this._stripe._prevRequestMetrics.shift();return JSON.stringify({last_request_metrics:Z})}}_recordRequestMetrics(Z,$,J){if(this._stripe.getTelemetryEnabled()&&Z)if(this._stripe._prevRequestMetrics.length>this._maxBufferedRequestMetric)this._stripe._platformFunctions.emitWarning("Request metrics buffer is full, dropping telemetry message.");else{let Y={request_id:Z,request_duration_ms:$};if(J&&J.length>0)Y.usage=J;this._stripe._prevRequestMetrics.push(Y)}}_rawRequest(Z,$,J,Y,X){return new Promise((Q,G)=>{try{let W=Z.toUpperCase();if(W!=="POST"&&J&&Object.keys(J).length!==0)throw Error("rawRequest only supports params on POST requests. Please pass null and add your parameters to path.");let z=W==="POST"?Object.assign({},J):null,V=(0,j.processOptions)(Y);if(Y?.additionalHeaders)Object.assign(V.headers,Y.additionalHeaders);let B=V.apiBase||(Y?.apiBase??null),K=B?this._stripe.resolveBaseAddress(B):null;this._request(W,K,$,z,V.authenticator,{headers:V.headers,settings:V.settings,streaming:V.streaming},X||["raw_request"],(H,w)=>{if(H)G(H);else Q(w)})}catch(W){G(W)}})}_getContentLength(Z){return typeof Z==="string"?new TextEncoder().encode(Z).length:Z.length}_request(Z,$,J,Y,X,Q,G=[],W,z=null){let V;X=X??this._stripe._authenticator;let B=(0,j.getAPIMode)(J),K=(U,q,L,T)=>{return setTimeout(U,this._getSleepTimeInMS(T),q,L,T+1)},H=(U,q,L)=>{let T=Q.settings&&Q.settings.timeout&&Number.isInteger(Q.settings.timeout)&&Q.settings.timeout>=0?Q.settings.timeout:this._stripe.getApiField("timeout"),N={host:$||this._stripe.getApiField("host"),port:this._stripe.getApiField("port"),path:J,method:Z,headers:Object.assign({},q),body:V,protocol:this._stripe.getApiField("protocol")};if(!X)throw Error("Authenticator was't initialized. Please pass an API Key or an Authenticator when initializing StripeClient.");X(N).then(()=>{let C=this._stripe.getApiField("httpClient").makeRequest(N.host,N.port,N.path,N.method,N.headers,N.body,N.protocol,T),x=Date.now(),f=(0,j.removeNullish)({api_version:U,account:(0,j.parseHttpHeaderAsString)(q["Stripe-Account"]),idempotency_key:(0,j.parseHttpHeaderAsString)(q["Idempotency-Key"]),method:Z,path:J,body:this._stripe.getEmitEventBodiesEnabled()?Y??void 0:void 0,request_start_time:x}),m=L||0,E0=this._getMaxNetworkRetries(Q.settings||{});this._stripe._emitter.emit("request",f),C.then((h)=>{if(O0._shouldRetry(h,m,E0))return K(H,U,q,m);else if(Q.streaming&&h.getStatusCode()<400)return this._streamingResponseHandler(f,G,W)(h);else return this._jsonResponseHandler(f,B,G,W)(h)}).catch((h)=>{if(O0._shouldRetry(null,m,E0,h))return K(H,U,q,m);else{let Y0=h.code&&h.code===g$.HttpClient.TIMEOUT_ERROR_CODE;return W(new s.StripeConnectionError({message:Y0?`Request aborted due to timeout being reached (${T}ms)`:O0._generateConnectionErrorMessage(m),detail:h}))}})}).catch((C)=>{throw new s.StripeError({message:"Unable to authenticate the request",exception:C})})},w=(U,q)=>{if(U)return W(U);V=q,this._stripe.getClientUserAgent((L)=>{let T=this._stripe.getApiField("version"),N=this._makeHeaders({contentType:B=="v2"?"application/json":"application/x-www-form-urlencoded",contentLength:this._getContentLength(q),apiVersion:T,clientUserAgent:L,method:Z,userSuppliedHeaders:Q.headers??null,userSuppliedSettings:Q.settings??{},stripeAccount:Q.stripeAccount??this._stripe.getApiField("stripeAccount"),stripeContext:this._normalizeStripeContext(Q.stripeContext,this._stripe.getApiField("stripeContext")),apiMode:B});H(T,N,0)})};if(z)z(Z,Y,Q.headers,w);else{let U;if(B=="v2")U=Y?(0,j.jsonStringifyRequestData)(Y):"";else U=(0,j.queryStringifyRequestData)(Y||{});w(null,U)}}}u$.RequestSender=O0});var M8=O((d$)=>{Object.defineProperty(d$,"__esModule",{value:!0});d$.Decimal=d$.isDecimal=d$.DEFAULT_DIV_PRECISION=void 0;var oB={"ubb-usage-count":{mode:"significant-figures",value:15},"v1-api":{mode:"decimal-places",value:12}};d$.DEFAULT_DIV_PRECISION=34;var l$=30,v0=1e6;class I{constructor(Z,$){let[J,Y]=I.normalize(Z,$);this._coefficient=J,this._exponent=Y,Object.freeze(this)}static normalize(Z,$){if(Z===0n)return[0n,0];let J=Z,Y=$;while(J!==0n&&J%10n===0n)J/=10n,Y+=1;return[J,Y]}static roundDivision(Z,$,J,Y){if($===0n)return Z;if(Y==="round-down")return Z;let X=$>0n===J>0n?1n:-1n;if(Y==="round-up")return Z+X;if(Y==="ceil")return X===1n?Z+1n:Z;if(Y==="floor")return X===-1n?Z-1n:Z;let Q=$<0n?-$:$,G=J<0n?-J:J,W=Q*2n,z;if(W===G)z=0;else if(W<G)z=-1;else z=1;if(z<0)return Z;if(z>0)return Z+X;if(Y==="half-up")return Z+X;if(Y==="half-down")return Z;if(Z%2n===0n)return Z;else return Z+X}add(Z){let $=Z;if(this._exponent===$._exponent)return new I(this._coefficient+$._coefficient,this._exponent);if(this._exponent<$._exponent){let J=10n**BigInt($._exponent-this._exponent);return new I(this._coefficient+$._coefficient*J,this._exponent)}else{let J=10n**BigInt(this._exponent-$._exponent);return new I(this._coefficient*J+$._coefficient,$._exponent)}}sub(Z){let $=Z;if(this._exponent===$._exponent)return new I(this._coefficient-$._coefficient,this._exponent);if(this._exponent<$._exponent){let J=10n**BigInt($._exponent-this._exponent);return new I(this._coefficient-$._coefficient*J,this._exponent)}else{let J=10n**BigInt(this._exponent-$._exponent);return new I(this._coefficient*J-$._coefficient,$._exponent)}}mul(Z){let $=Z;return new I(this._coefficient*$._coefficient,this._exponent+$._exponent)}div(Z,$,J){if($<0||!Number.isInteger($))throw Error("precision must be a non-negative integer");let Y=Z;if(Y._coefficient===0n)throw Error("Division by zero");let X=this._exponent-Y._exponent+$,Q,G,W;if(X>=0){let V=this._coefficient*10n**BigInt(X);Q=V/Y._coefficient,G=V%Y._coefficient,W=Y._coefficient}else{let V=Y._coefficient*10n**BigInt(-X);Q=this._coefficient/V,G=this._coefficient%V,W=V}let z=I.roundDivision(Q,G,W,J);return new I(z,-$)}cmp(Z){let $=Z;if(this._exponent===$._exponent){if(this._coefficient<$._coefficient)return-1;if(this._coefficient>$._coefficient)return 1;return 0}if(this._exponent<$._exponent){let J=10n**BigInt($._exponent-this._exponent),Y=$._coefficient*J;if(this._coefficient<Y)return-1;if(this._coefficient>Y)return 1;return 0}else{let J=10n**BigInt(this._exponent-$._exponent),Y=this._coefficient*J;if(Y<$._coefficient)return-1;if(Y>$._coefficient)return 1;return 0}}eq(Z){return this.cmp(Z)===0}lt(Z){return this.cmp(Z)===-1}lte(Z){return this.cmp(Z)<=0}gt(Z){return this.cmp(Z)===1}gte(Z){return this.cmp(Z)>=0}isZero(){return this._coefficient===0n}isNegative(){return this._coefficient<0n}isPositive(){return this._coefficient>0n}neg(){return new I(-this._coefficient,this._exponent)}abs(){if(this._coefficient<0n)return new I(-this._coefficient,this._exponent);return this}round(Z,$){let J=typeof $==="string"?oB[$]:$;if(J===void 0)throw Error(`Unknown rounding preset: "${$}"`);if(J.value<0||!Number.isInteger(J.value))throw Error("DecimalRoundingOptions.value must be a non-negative integer");if(J.mode==="decimal-places"){let B=this.toFixed(J.value,Z);return d$.Decimal.from(B)}if(this._coefficient===0n)return this;let X=(this._coefficient<0n?(-this._coefficient).toString():this._coefficient.toString()).length;if(J.value===0)return d$.Decimal.zero;if(X<=J.value)return this;let Q=X-J.value,G=10n**BigInt(Q),W=this._coefficient/G,z=this._coefficient%G,V=I.roundDivision(W,z,G,Z);return new I(V,this._exponent+Q)}toString(){if(this._coefficient===0n)return"0";let Z=this._coefficient.toString(),$=Z.startsWith("-"),J=$?Z.slice(1):Z;if(this._exponent<0){let X=-this._exponent;if((X>=J.length?X-J.length:0)>l$){if(J.length===1)return`${Z}E${String(this._exponent)}`;let G=J[0]??"",W=J.slice(1),z=this._exponent+J.length-1;return`${$?"-":""}${G}.${W}E${String(z)}`}if(X>=J.length){let G="0".repeat(X-J.length);return`${$?"-":""}0.${G}${J}`}else{let G=J.slice(0,J.length-X),W=J.slice(J.length-X);return`${$?"-":""}${G}.${W}`}}if(J.length+this._exponent<=l$){if(this._exponent===0)return Z;let X="0".repeat(this._exponent);return`${$?"-":""}${J}${X}`}else{if(J.length===1)return`${Z}E+${String(this._exponent)}`;let X=J[0]??"",Q=J.slice(1),G=this._exponent+J.length-1;return`${$?"-":""}${X}.${Q}E+${String(G)}`}}toJSON(){return this.toString()}toNumber(){return Number(this.toString())}toFixed(Z,$){if(Z<0||!Number.isInteger(Z))throw Error("decimalPlaces must be a non-negative integer");let J=(X)=>{let Q=X.toString(),G=Q.startsWith("-"),W=G?Q.slice(1):Q;if(Z===0)return Q;if(Z>=W.length){let z="0".repeat(Z-W.length);return`${G?"-":""}0.${z}${W}`}else{let z=W.slice(0,W.length-Z),V=W.slice(W.length-Z);return`${G?"-":""}${z}.${V}`}},Y=-Z;if(this._exponent===Y)return J(this._coefficient);if(this._exponent<Y){let X=Y-this._exponent,Q=10n**BigInt(X),G=this._coefficient/Q,W=this._coefficient%Q,z=I.roundDivision(G,W,Q,$);return J(z)}else{let X=this._exponent-Y,Q=this._coefficient*10n**BigInt(X);return J(Q)}}valueOf(){return this.toString()}}function sB(Z){return Z instanceof I}d$.isDecimal=sB;d$.Decimal={from(Z){if(typeof Z==="bigint")return new I(Z,0);if(typeof Z==="number"){if(!Number.isFinite(Z))throw Error("Number must be finite");return d$.Decimal.from(Z.toString())}let $=Z.trim();if($==="")throw Error("Cannot parse empty string as Decimal");let J=/^([+-]?)(\d+)(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/.exec($);if(!J)throw Error(`Invalid decimal string: ${Z}`);let Y=J[1]==="-"?-1n:1n,X=J[2]??"",Q=J[3]??"",G=J[4]?Number(J[4]):0;if(!Number.isSafeInteger(G)||G>v0||G<-v0)throw Error(`Exponent out of range: ${String(J[4])} exceeds safe integer bounds`);let W=X+Q,z=Y*BigInt(W),V=G-Q.length;if(!Number.isSafeInteger(V)||V>v0||V<-v0)throw Error(`Computed exponent out of range: ${String(V)} exceeds safe integer bounds`);return new I(z,V)},zero:new I(0n,0)}});var p$=O((n$)=>{Object.defineProperty(n$,"__esModule",{value:!0});n$.coerceV2ResponseData=n$.coerceV2RequestData=void 0;var $z=M8(),Jz=(Z,$)=>{if(Z==null)return Z;switch($.kind){case"int64_string":return typeof Z==="bigint"||typeof Z==="number"?String(Z):Z;case"decimal_string":return typeof Z.toFixed==="function"&&typeof Z.isZero==="function"?Z.toString():Z;case"object":{if(typeof Z!=="object"||Array.isArray(Z))return Z;let J=Z,Y={};for(let X of Object.keys(J)){let Q=$.fields[X];Y[X]=Q?n$.coerceV2RequestData(J[X],Q):J[X]}return Y}case"array":{if(!Array.isArray(Z))return Z;return Z.map((J)=>n$.coerceV2RequestData(J,$.element))}case"nullable":return n$.coerceV2RequestData(Z,$.inner)}};n$.coerceV2RequestData=Jz;var Yz=(Z,$)=>{if(Z==null)return Z;switch($.kind){case"int64_string":if(typeof Z==="string")try{return BigInt(Z)}catch{throw Error(`Failed to coerce int64_string value: expected an integer string, got '${Z}'`)}return Z;case"decimal_string":if(typeof Z==="string")try{return $z.Decimal.from(Z)}catch{throw Error(`Failed to coerce decimal_string value: expected a decimal string, got '${Z}'`)}return Z;case"object":{if(typeof Z!=="object"||Array.isArray(Z))return Z;let J=Z;for(let Y of Object.keys($.fields))if(Y in J)J[Y]=n$.coerceV2ResponseData(J[Y],$.fields[Y]);return J}case"array":{if(!Array.isArray(Z))return Z;for(let J=0;J<Z.length;J++)Z[J]=n$.coerceV2ResponseData(Z[J],$.element);return Z}case"nullable":return n$.coerceV2ResponseData(Z,$.inner)}};n$.coerceV2ResponseData=Yz});var s$=O((a$)=>{Object.defineProperty(a$,"__esModule",{value:!0});a$.makeAutoPaginationMethods=void 0;var h8=R();class b8{constructor(Z,$,J,Y,X,Q,G){this.index=0,this.pagePromise=Z,this.promiseCache={currentPromise:null},this.params=$,this.options=J,this.method=Y,this.path=X,this.spec=Q,this.stripeResource=G}async iterate(Z){if(!(Z&&Z.data&&typeof Z.data.length==="number"))throw Error("Unexpected: Stripe API response does not have a well-formed `data` array.");let $=!!this.params.ending_before;if(this.index<Z.data.length){let J=$?Z.data.length-1-this.index:this.index,Y=Z.data[J];return this.index+=1,{value:Y,done:!1}}else if(Z.has_more){this.index=0,this.pagePromise=this.getNextPage(Z);let J=await this.pagePromise;return this.iterate(J)}return{done:!0,value:void 0}}getNextPage(Z){throw Error("Unimplemented")}async _next(){return this.iterate(await this.pagePromise)}next(){if(this.promiseCache.currentPromise)return this.promiseCache.currentPromise;let Z=(async()=>{let $=await this._next();return this.promiseCache.currentPromise=null,$})();return this.promiseCache.currentPromise=Z,Z}}class i$ extends b8{getNextPage(Z){let $=!!this.params.ending_before,J=Vz(Z,$),Y={...this.params,[$?"ending_before":"starting_after"]:J};return this.stripeResource._makeRequest(this.method,this.path,Y,this.options,this.spec)}}class r$ extends b8{getNextPage(Z){if(!Z.next_page)throw Error("Unexpected: Stripe API response does not have a well-formed `next_page` field, but `has_more` was true.");let $={...this.params,page:Z.next_page};return this.stripeResource._makeRequest(this.method,this.path,$,this.options,this.spec)}}class t${constructor(Z,$,J,Y){this.firstPagePromise=Z,this.currentPageIterator=null,this.nextPageUrl=null,this.promiseCache={currentPromise:null},this.options=$,this.spec=J,this.stripeResource=Y}async initFirstPage(){if(this.firstPagePromise){let Z=await this.firstPagePromise;this.firstPagePromise=null,this.currentPageIterator=Z.data[Symbol.iterator](),this.nextPageUrl=Z.next_page_url||null}}async turnPage(){if(!this.nextPageUrl)return null;let Z=await this.stripeResource._makeRequest("GET",this.nextPageUrl,void 0,this.options,this.spec);return this.nextPageUrl=Z.next_page_url||null,this.currentPageIterator=Z.data[Symbol.iterator](),this.currentPageIterator}async _next(){if(await this.initFirstPage(),this.currentPageIterator){let Z=this.currentPageIterator.next();if(!Z.done)return{done:!1,value:Z.value}}return this.nextFromNewPage()}async nextFromNewPage(){let Z=await this.turnPage();if(!Z)return{done:!0,value:void 0};let $=Z.next();if(!$.done)return{done:!1,value:$.value};return this.nextFromNewPage()}next(){if(this.promiseCache.currentPromise)return this.promiseCache.currentPromise;let Z=(async()=>{try{return await this._next()}finally{this.promiseCache.currentPromise=null}})();return this.promiseCache.currentPromise=Z,Z}}var Xz=(Z,$,J,Y,X,Q,G)=>{let W=(0,h8.getAPIMode)(X),z=Q?.methodType;if(W!=="v2"&&z==="search")return f8(new r$(G,$,J,Y,X,Q,Z));if(W!=="v2"&&z==="list")return f8(new i$(G,$,J,Y,X,Q,Z));if(W==="v2"&&z==="list")return f8(new t$(G,J,Q,Z));return null};a$.makeAutoPaginationMethods=Xz;var f8=(Z)=>{let $=Bz((...X)=>Z.next(...X)),J=zz($),Y={autoPagingEach:$,autoPagingToArray:J,next:()=>Z.next(),return:()=>{return{}},[Qz()]:()=>{return Y}};return Y};function Qz(){if(typeof Symbol<"u"&&Symbol.asyncIterator)return Symbol.asyncIterator;return"@@asyncIterator"}function Gz(Z){if(Z.length<2)return null;let $=Z[1];if(typeof $!=="function")throw Error(`The second argument to autoPagingEach, if present, must be a callback function; received ${typeof $}`);return $}function Wz(Z){if(Z.length===0)return;let $=Z[0];if(typeof $!=="function")throw Error(`The first argument to autoPagingEach, if present, must be a callback function; received ${typeof $}`);if($.length===2)return $;if($.length>2)throw Error(`The \`onItem\` callback function passed to autoPagingEach must accept at most two arguments; got ${$}`);return function(Y,X){let Q=$(Y);X(Q)}}function Vz(Z,$){let J=$?0:Z.data.length-1,Y=Z.data[J],X=Y&&Y.id;if(!X)throw Error("Unexpected: No `id` found on the last item while auto-paging a list.");return X}function Bz(Z){return function(){let J=Error().stack,Y=[].slice.call(arguments),X=Wz(Y),Q=Gz(Y);if(Y.length>2)throw Error(`autoPagingEach takes up to two arguments; received ${Y}`);let G=Kz(Z,X).catch((W)=>{throw(0,h8.attachCallSiteToError)(W,J),W});if(Q)G.then(()=>Q(),(W)=>Q(W));return G}}function zz(Z){return function(J,Y){let X=Error().stack,Q=J&&J.limit;if(!Q)throw Error("You must pass a `limit` option to autoPagingToArray, e.g., `autoPagingToArray({limit: 1000});`.");if(Q>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.");let G=new Promise((W,z)=>{let V=[];Z((B)=>{if(V.push(B),V.length>=Q)return!1}).then(()=>{W(V)}).catch((B)=>{(0,h8.attachCallSiteToError)(B,X),z(B)})});if(Y)G.then((W)=>Y(null,W),(W)=>Y(W));return G}}function Kz(Z,$){return new Promise((J,Y)=>{function X(Q){if(Q.done){J();return}let G=Q.value;return new Promise((W)=>{$(G,W)}).then((W)=>{if(W===!1)return X({done:!0,value:void 0});else return Z().then(X)})}Z().then(X).catch(Y)})}});var F=O((Z1)=>{Object.defineProperty(Z1,"__esModule",{value:!0});Z1.StripeResource=void 0;var U0=R(),e$=p$(),Hz=s$();class y8{constructor(Z,$){if(this.resourcePath="",this.requestDataProcessor=null,this._stripe=Z,$)throw Error("Support for curried url params was dropped in stripe-node v7.0.0. Instead, pass two ids.");this.basePath=(0,U0.makeURLInterpolator)(this.basePath||Z.getApiField("basePath"));let J=this.path||"";this.resourcePath=J,this.path=(0,U0.makeURLInterpolator)(J),this.initialize(Z,$)}initialize(Z,$){}_makeRequest(Z,$,J,Y,X){let Q=Z.toUpperCase(),W=(X?.encode||((C)=>C))(J?{...J}:{}),z=(0,U0.processOptions)(Y),V=z.apiBase||X?.apiBase||null,B=V?this._stripe.resolveBaseAddress(V):null,K=z.streaming||!!X?.streaming,H=Object.assign(z.headers,X?.headers),w=X?.usage||[],U=Q==="GET"||Q==="DELETE",q=U?null:W,L=U?W:{};try{if(X?.validator)X.validator(W,{headers:H});if(X?.requestSchema&&q)q=(0,e$.coerceV2RequestData)(q,X.requestSchema)}catch(C){return Promise.reject(C)}let T=Error().stack,N=new Promise((C,x)=>{function f(h,Y0){if(h)(0,U0.attachCallSiteToError)(h,T),x(h);else try{if(X?.responseSchema)(0,e$.coerceV2ResponseData)(Y0,X.responseSchema);C(X?.transformResponseData?X.transformResponseData(Y0):Y0)}catch(nW){x(nW)}}let m=Object.keys(L).length===0,E0=[$,m?"":"?",(0,U0.queryStringifyRequestData)(L)].join("");this._stripe._requestSender._request(Q,B,E0,q,z.authenticator,{headers:H,settings:z.settings,streaming:K},w,f,this.requestDataProcessor?.bind(this))});if(X?.methodType)Object.assign(N,(0,Hz.makeAutoPaginationMethods)(this,J?{...J}:{},Y,Q,$,X,N));return N}}Z1.StripeResource=y8;y8.MAX_BUFFERED_REQUEST_METRICS=100});var X1=O((J1)=>{Object.defineProperty(J1,"__esModule",{value:!0});J1.StripeContext=void 0;class e{constructor(Z=[]){this._segments=[...Z]}get segments(){return[...this._segments]}push(Z){if(!Z)throw Error("Segment cannot be null or undefined");return new e([...this._segments,Z])}pop(){if(this._segments.length===0)throw Error("Cannot pop from an empty context");return new e(this._segments.slice(0,-1))}toString(){return this._segments.join("/")}static parse(Z){if(!Z)return new e([]);return new e(Z.split("/"))}}J1.StripeContext=e});var W1=O((Q1)=>{Object.defineProperty(Q1,"__esModule",{value:!0});Q1.createWebhooks=void 0;var u=K0(),Oz=V0();function wz(Z){let $={DEFAULT_TOLERANCE:300,signature:null,constructEvent(B,K,H,w,U,q){try{if(!this.signature)throw Error("ERR: missing signature helper, unable to verify");U=U||z(),this.signature.verifyHeader(B,K,H,w||$.DEFAULT_TOLERANCE,U,q)}catch(T){if(T instanceof Oz.CryptoProviderOnlySupportsAsyncError)T.message+="\nUse `await constructEventAsync(...)` instead of `constructEvent(...)`";throw T}let L=B instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(B)):JSON.parse(B);if(L&&L.object==="v2.core.event")throw Error("You passed an event notification to stripe.webhooks.constructEvent, which expects a webhook payload. Use stripe.parseEventNotification instead.");return L},async constructEventAsync(B,K,H,w,U,q){if(!this.signature)throw Error("ERR: missing signature helper, unable to verify");U=U||z(),await this.signature.verifyHeaderAsync(B,K,H,w||$.DEFAULT_TOLERANCE,U,q);let L=B instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(B)):JSON.parse(B);if(L&&L.object==="v2.core.event")throw Error("You passed an event notification to stripe.webhooks.constructEvent, which expects a webhook payload. Use stripe.parseEventNotificationAsync instead.");return L},generateTestHeaderString:function(B){let K=V(B),H=K.signature||K.cryptoProvider.computeHMACSignature(K.payloadString,K.secret);return K.generateHeaderString(H)},generateTestHeaderStringAsync:async function(B){let K=V(B),H=K.signature||await K.cryptoProvider.computeHMACSignatureAsync(K.payloadString,K.secret);return K.generateHeaderString(H)}},J={EXPECTED_SCHEME:"v1",verifyHeader(B,K,H,w,U,q){let{decodedHeader:L,decodedPayload:T,details:N,suspectPayloadType:C}=X(B,K,this.EXPECTED_SCHEME),x=/\s/.test(H);U=U||z();let f=U.computeHMACSignature(Y(T,N),H);return Q(T,L,N,f,w||0,C,x,q),!0},async verifyHeaderAsync(B,K,H,w,U,q){let{decodedHeader:L,decodedPayload:T,details:N,suspectPayloadType:C}=X(B,K,this.EXPECTED_SCHEME),x=/\s/.test(H);U=U||z();let f=await U.computeHMACSignatureAsync(Y(T,N),H);return Q(T,L,N,f,w||0,C,x,q)}};function Y(B,K){return`${K.timestamp}.${B}`}function X(B,K,H){if(Array.isArray(K))throw Error("Unexpected: An array was passed as a header, which should not be possible for the stripe-signature header.");if(!B)throw new u.StripeSignatureVerificationError(K,B,{message:"No webhook payload was provided."});let w=typeof B!="string"&&!(B instanceof Uint8Array),U=new TextDecoder("utf8"),q=B instanceof Uint8Array?U.decode(B):B;if(K==null||K=="")throw new u.StripeSignatureVerificationError(K,B,{message:"No stripe-signature header value was provided."});let L=K instanceof Uint8Array?U.decode(K):K,T=G(L,H);if(!T||T.timestamp===-1)throw new u.StripeSignatureVerificationError(L,q,{message:"Unable to extract timestamp and signatures from header"});if(!T.signatures.length)throw new u.StripeSignatureVerificationError(L,q,{message:"No signatures found with expected scheme"});return{decodedPayload:q,decodedHeader:L,details:T,suspectPayloadType:w}}function Q(B,K,H,w,U,q,L,T){let N=!!H.signatures.filter(Z.secureCompare.bind(Z,w)).length,C=`
6
+ Learn more about webhook signing and explore webhook integration examples for various frameworks at https://docs.stripe.com/webhooks/signature`,x=L?`
4
7
 
5
- Note: The provided signing secret contains whitespace. This often indicates an extra newline or space is in the value`:"";if(!k){if(D)throw new a.StripeSignatureVerificationError(z,B,{message:`Webhook payload must be provided as a string or a Buffer (https://nodejs.org/api/buffer.html) instance representing the _raw_ request body.Payload was provided as a parsed JavaScript object instead.
8
+ Note: The provided signing secret contains whitespace. This often indicates an extra newline or space is in the value`:"";if(!N){if(q)throw new u.StripeSignatureVerificationError(K,B,{message:`Webhook payload must be provided as a string or a Buffer (https://nodejs.org/api/buffer.html) instance representing the _raw_ request body.Payload was provided as a parsed JavaScript object instead.
6
9
  Signature verification is impossible without access to the original signed material.
7
- `+N+`
8
- `+R});throw new a.StripeSignatureVerificationError(z,B,{message:`No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe?
10
+ `+C+`
11
+ `+x});throw new u.StripeSignatureVerificationError(K,B,{message:`No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe?
9
12
  If a webhook request is being forwarded by a third-party tool, ensure that the exact request body, including JSON formatting and new line style, is preserved.
10
- `+N+`
11
- `+R})}let M=Math.floor((typeof O==="number"?O:Date.now())/1000)-L.timestamp;if(T>0&&M>T)throw new a.StripeSignatureVerificationError(z,B,{message:"Timestamp outside the tolerance zone"});return!0}function G(B,z){if(typeof B!=="string")return null;return B.split(",").reduce((L,H)=>{let T=H.split("=");if(T[0]==="t")L.timestamp=parseInt(T[1],10);if(T[0]===z)L.signatures.push(T[1]);return L},{timestamp:-1,signatures:[]})}let V=null;function U(){if(!V)V=Z.createDefaultCryptoProvider();return V}function W(B){if(!B)throw new a.StripeError({message:"Options are required"});let z=Math.floor(B.timestamp)||Math.floor(Date.now()/1000),L=B.scheme||J.EXPECTED_SCHEME,H=B.cryptoProvider||U(),T=`${z}.${B.payload}`;return{...B,timestamp:z,scheme:L,cryptoProvider:H,payloadString:T,generateHeaderString:(q)=>{return`t=${z},${L}=${q}`}}}return $.signature=J,$}Y1.createWebhooks=CU});var U1=K((B1)=>{Object.defineProperty(B1,"__esModule",{value:!0});B1.ApiMajorVersion=B1.ApiVersion=void 0;B1.ApiVersion="2026-03-25.dahlia";B1.ApiMajorVersion="dahlia"});var K1=K((z1)=>{Object.defineProperty(z1,"__esModule",{value:!0});z1.resourceNamespace=void 0;function AU(Z,$){for(let J in $){if(!Object.prototype.hasOwnProperty.call($,J))continue;let Q=J[0].toLowerCase()+J.substring(1),X=new $[J](Z);this[Q]=X}}function NU(Z,$){return function(J){return new AU(J,$)}}z1.resourceNamespace=NU});var D1=K((w1)=>{Object.defineProperty(w1,"__esModule",{value:!0});w1.AccountLinks=void 0;var H1=w(),xU=H1.StripeResource.method;w1.AccountLinks=H1.StripeResource.extend({create:xU({method:"POST",fullPath:"/v2/core/account_links"})})});var C1=K((E1)=>{Object.defineProperty(E1,"__esModule",{value:!0});E1.AccountTokens=void 0;var q1=w(),O1=q1.StripeResource.method;E1.AccountTokens=q1.StripeResource.extend({create:O1({method:"POST",fullPath:"/v2/core/account_tokens",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),retrieve:O1({method:"GET",fullPath:"/v2/core/account_tokens/{id}"})})});var x1=K((A1)=>{Object.defineProperty(A1,"__esModule",{value:!0});A1.Accounts=void 0;var k1=w(),J0=k1.StripeResource.method;A1.Accounts=k1.StripeResource.extend({retrieve:J0({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}"}),list:J0({method:"GET",fullPath:"/v1/financial_connections/accounts",methodType:"list"}),disconnect:J0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/disconnect"}),listOwners:J0({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}/owners",methodType:"list"}),refresh:J0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/refresh"}),subscribe:J0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/subscribe"}),unsubscribe:J0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/unsubscribe"})})});var R1=K((P1)=>{Object.defineProperty(P1,"__esModule",{value:!0});P1.Persons=void 0;var I1=w(),u0=I1.StripeResource.method;P1.Persons=I1.StripeResource.extend({create:u0({method:"POST",fullPath:"/v2/core/accounts/{account_id}/persons",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),retrieve:u0({method:"GET",fullPath:"/v2/core/accounts/{account_id}/persons/{id}",responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),update:u0({method:"POST",fullPath:"/v2/core/accounts/{account_id}/persons/{id}",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),list:u0({method:"GET",fullPath:"/v2/core/accounts/{account_id}/persons",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}),del:u0({method:"DELETE",fullPath:"/v2/core/accounts/{account_id}/persons/{id}"})})});var f1=K((j1)=>{Object.defineProperty(j1,"__esModule",{value:!0});j1.PersonTokens=void 0;var y1=w(),v1=y1.StripeResource.method;j1.PersonTokens=y1.StripeResource.extend({create:v1({method:"POST",fullPath:"/v2/core/accounts/{account_id}/person_tokens",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),retrieve:v1({method:"GET",fullPath:"/v2/core/accounts/{account_id}/person_tokens/{id}"})})});var g1=K((M1)=>{Object.defineProperty(M1,"__esModule",{value:!0});M1.Accounts=void 0;var d9=w(),IU=R1(),PU=f1(),c0=d9.StripeResource.method;M1.Accounts=d9.StripeResource.extend({constructor:function(...Z){d9.StripeResource.apply(this,Z),this.persons=new IU.Persons(...Z),this.personTokens=new PU.PersonTokens(...Z)},create:c0({method:"POST",fullPath:"/v2/core/accounts",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}},responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),retrieve:c0({method:"GET",fullPath:"/v2/core/accounts/{id}",responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),update:c0({method:"POST",fullPath:"/v2/core/accounts/{id}",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}},responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),list:c0({method:"GET",fullPath:"/v2/core/accounts",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}}}}),close:c0({method:"POST",fullPath:"/v2/core/accounts/{id}/close",responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}})})});var l1=K((u1)=>{Object.defineProperty(u1,"__esModule",{value:!0});u1.ActiveEntitlements=void 0;var m1=w(),h1=m1.StripeResource.method;u1.ActiveEntitlements=m1.StripeResource.extend({retrieve:h1({method:"GET",fullPath:"/v1/entitlements/active_entitlements/{id}"}),list:h1({method:"GET",fullPath:"/v1/entitlements/active_entitlements",methodType:"list"})})});var i1=K((p1)=>{Object.defineProperty(p1,"__esModule",{value:!0});p1.Alerts=void 0;var n1=w(),D0=n1.StripeResource.method;p1.Alerts=n1.StripeResource.extend({create:D0({method:"POST",fullPath:"/v1/billing/alerts"}),retrieve:D0({method:"GET",fullPath:"/v1/billing/alerts/{id}"}),list:D0({method:"GET",fullPath:"/v1/billing/alerts",methodType:"list"}),activate:D0({method:"POST",fullPath:"/v1/billing/alerts/{id}/activate"}),archive:D0({method:"POST",fullPath:"/v1/billing/alerts/{id}/archive"}),deactivate:D0({method:"POST",fullPath:"/v1/billing/alerts/{id}/deactivate"})})});var r1=K((o1)=>{Object.defineProperty(o1,"__esModule",{value:!0});o1.Associations=void 0;var a1=w(),SU=a1.StripeResource.method;o1.Associations=a1.StripeResource.extend({find:SU({method:"GET",fullPath:"/v1/tax/associations/find"})})});var $4=K((e1)=>{Object.defineProperty(e1,"__esModule",{value:!0});e1.Authorizations=void 0;var t1=w(),l0=t1.StripeResource.method;e1.Authorizations=t1.StripeResource.extend({retrieve:l0({method:"GET",fullPath:"/v1/issuing/authorizations/{authorization}",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),update:l0({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),list:l0({method:"GET",fullPath:"/v1/issuing/authorizations",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}),approve:l0({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/approve",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),decline:l0({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/decline",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})})});var Y4=K((Q4)=>{Object.defineProperty(Q4,"__esModule",{value:!0});Q4.Authorizations=void 0;var J4=w(),Q0=J4.StripeResource.method;Q4.Authorizations=J4.StripeResource.extend({create:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations",requestSchema:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),capture:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/capture",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),expire:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/expire",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),finalizeAmount:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount",requestSchema:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),increment:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/increment",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),respond:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),reverse:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/reverse",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})})});var W4=K((V4)=>{Object.defineProperty(V4,"__esModule",{value:!0});V4.Calculations=void 0;var G4=w(),i9=G4.StripeResource.method;V4.Calculations=G4.StripeResource.extend({create:i9({method:"POST",fullPath:"/v1/tax/calculations"}),retrieve:i9({method:"GET",fullPath:"/v1/tax/calculations/{calculation}"}),listLineItems:i9({method:"GET",fullPath:"/v1/tax/calculations/{calculation}/line_items",methodType:"list"})})});var K4=K((z4)=>{Object.defineProperty(z4,"__esModule",{value:!0});z4.Cardholders=void 0;var U4=w(),S8=U4.StripeResource.method;z4.Cardholders=U4.StripeResource.extend({create:S8({method:"POST",fullPath:"/v1/issuing/cardholders"}),retrieve:S8({method:"GET",fullPath:"/v1/issuing/cardholders/{cardholder}"}),update:S8({method:"POST",fullPath:"/v1/issuing/cardholders/{cardholder}"}),list:S8({method:"GET",fullPath:"/v1/issuing/cardholders",methodType:"list"})})});var D4=K((w4)=>{Object.defineProperty(w4,"__esModule",{value:!0});w4.Cards=void 0;var H4=w(),R8=H4.StripeResource.method;w4.Cards=H4.StripeResource.extend({create:R8({method:"POST",fullPath:"/v1/issuing/cards"}),retrieve:R8({method:"GET",fullPath:"/v1/issuing/cards/{card}"}),update:R8({method:"POST",fullPath:"/v1/issuing/cards/{card}"}),list:R8({method:"GET",fullPath:"/v1/issuing/cards",methodType:"list"})})});var F4=K((q4)=>{Object.defineProperty(q4,"__esModule",{value:!0});q4.Cards=void 0;var O4=w(),n0=O4.StripeResource.method;q4.Cards=O4.StripeResource.extend({deliverCard:n0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/deliver"}),failCard:n0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/fail"}),returnCard:n0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/return"}),shipCard:n0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/ship"}),submitCard:n0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/submit"})})});var N4=K((k4)=>{Object.defineProperty(k4,"__esModule",{value:!0});k4.Configurations=void 0;var C4=w(),v8=C4.StripeResource.method;k4.Configurations=C4.StripeResource.extend({create:v8({method:"POST",fullPath:"/v1/billing_portal/configurations"}),retrieve:v8({method:"GET",fullPath:"/v1/billing_portal/configurations/{configuration}"}),update:v8({method:"POST",fullPath:"/v1/billing_portal/configurations/{configuration}"}),list:v8({method:"GET",fullPath:"/v1/billing_portal/configurations",methodType:"list"})})});var S4=K((I4)=>{Object.defineProperty(I4,"__esModule",{value:!0});I4.Configurations=void 0;var x4=w(),p0=x4.StripeResource.method;I4.Configurations=x4.StripeResource.extend({create:p0({method:"POST",fullPath:"/v1/terminal/configurations"}),retrieve:p0({method:"GET",fullPath:"/v1/terminal/configurations/{configuration}"}),update:p0({method:"POST",fullPath:"/v1/terminal/configurations/{configuration}"}),list:p0({method:"GET",fullPath:"/v1/terminal/configurations",methodType:"list"}),del:p0({method:"DELETE",fullPath:"/v1/terminal/configurations/{configuration}"})})});var j4=K((v4)=>{Object.defineProperty(v4,"__esModule",{value:!0});v4.ConfirmationTokens=void 0;var R4=w(),RU=R4.StripeResource.method;v4.ConfirmationTokens=R4.StripeResource.extend({create:RU({method:"POST",fullPath:"/v1/test_helpers/confirmation_tokens"})})});var _4=K((f4)=>{Object.defineProperty(f4,"__esModule",{value:!0});f4.ConnectionTokens=void 0;var b4=w(),vU=b4.StripeResource.method;f4.ConnectionTokens=b4.StripeResource.extend({create:vU({method:"POST",fullPath:"/v1/terminal/connection_tokens"})})});var u4=K((h4)=>{Object.defineProperty(h4,"__esModule",{value:!0});h4.CreditBalanceSummary=void 0;var g4=w(),yU=g4.StripeResource.method;h4.CreditBalanceSummary=g4.StripeResource.extend({retrieve:yU({method:"GET",fullPath:"/v1/billing/credit_balance_summary"})})});var d4=K((n4)=>{Object.defineProperty(n4,"__esModule",{value:!0});n4.CreditBalanceTransactions=void 0;var l4=w(),c4=l4.StripeResource.method;n4.CreditBalanceTransactions=l4.StripeResource.extend({retrieve:c4({method:"GET",fullPath:"/v1/billing/credit_balance_transactions/{id}"}),list:c4({method:"GET",fullPath:"/v1/billing/credit_balance_transactions",methodType:"list"})})});var s4=K((a4)=>{Object.defineProperty(a4,"__esModule",{value:!0});a4.CreditGrants=void 0;var i4=w(),O0=i4.StripeResource.method;a4.CreditGrants=i4.StripeResource.extend({create:O0({method:"POST",fullPath:"/v1/billing/credit_grants"}),retrieve:O0({method:"GET",fullPath:"/v1/billing/credit_grants/{id}"}),update:O0({method:"POST",fullPath:"/v1/billing/credit_grants/{id}"}),list:O0({method:"GET",fullPath:"/v1/billing/credit_grants",methodType:"list"}),expire:O0({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/expire"}),voidGrant:O0({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/void"})})});var Z6=K((t4)=>{Object.defineProperty(t4,"__esModule",{value:!0});t4.CreditReversals=void 0;var r4=w(),a9=r4.StripeResource.method;t4.CreditReversals=r4.StripeResource.extend({create:a9({method:"POST",fullPath:"/v1/treasury/credit_reversals"}),retrieve:a9({method:"GET",fullPath:"/v1/treasury/credit_reversals/{credit_reversal}"}),list:a9({method:"GET",fullPath:"/v1/treasury/credit_reversals",methodType:"list"})})});var X6=K((J6)=>{Object.defineProperty(J6,"__esModule",{value:!0});J6.Customers=void 0;var $6=w(),jU=$6.StripeResource.method;J6.Customers=$6.StripeResource.extend({fundCashBalance:jU({method:"POST",fullPath:"/v1/test_helpers/customers/{customer}/fund_cash_balance"})})});var B6=K((G6)=>{Object.defineProperty(G6,"__esModule",{value:!0});G6.DebitReversals=void 0;var Y6=w(),o9=Y6.StripeResource.method;G6.DebitReversals=Y6.StripeResource.extend({create:o9({method:"POST",fullPath:"/v1/treasury/debit_reversals"}),retrieve:o9({method:"GET",fullPath:"/v1/treasury/debit_reversals/{debit_reversal}"}),list:o9({method:"GET",fullPath:"/v1/treasury/debit_reversals",methodType:"list"})})});var L6=K((U6)=>{Object.defineProperty(U6,"__esModule",{value:!0});U6.Disputes=void 0;var W6=w(),d0=W6.StripeResource.method;U6.Disputes=W6.StripeResource.extend({create:d0({method:"POST",fullPath:"/v1/issuing/disputes"}),retrieve:d0({method:"GET",fullPath:"/v1/issuing/disputes/{dispute}"}),update:d0({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}"}),list:d0({method:"GET",fullPath:"/v1/issuing/disputes",methodType:"list"}),submit:d0({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}/submit"})})});var D6=K((w6)=>{Object.defineProperty(w6,"__esModule",{value:!0});w6.EarlyFraudWarnings=void 0;var H6=w(),K6=H6.StripeResource.method;w6.EarlyFraudWarnings=H6.StripeResource.extend({retrieve:K6({method:"GET",fullPath:"/v1/radar/early_fraud_warnings/{early_fraud_warning}"}),list:K6({method:"GET",fullPath:"/v1/radar/early_fraud_warnings",methodType:"list"})})});var F6=K((q6)=>{Object.defineProperty(q6,"__esModule",{value:!0});q6.EventDestinations=void 0;var O6=w(),o=O6.StripeResource.method;q6.EventDestinations=O6.StripeResource.extend({create:o({method:"POST",fullPath:"/v2/core/event_destinations"}),retrieve:o({method:"GET",fullPath:"/v2/core/event_destinations/{id}"}),update:o({method:"POST",fullPath:"/v2/core/event_destinations/{id}"}),list:o({method:"GET",fullPath:"/v2/core/event_destinations",methodType:"list"}),del:o({method:"DELETE",fullPath:"/v2/core/event_destinations/{id}"}),disable:o({method:"POST",fullPath:"/v2/core/event_destinations/{id}/disable"}),enable:o({method:"POST",fullPath:"/v2/core/event_destinations/{id}/enable"}),ping:o({method:"POST",fullPath:"/v2/core/event_destinations/{id}/ping"})})});var N6=K((k6)=>{Object.defineProperty(k6,"__esModule",{value:!0});k6.Events=void 0;var C6=w(),s9=C6.StripeResource.method;k6.Events=C6.StripeResource.extend({retrieve(...Z){return s9({method:"GET",fullPath:"/v2/core/events/{id}",transformResponseData:(J)=>{return this.addFetchRelatedObjectIfNeeded(J)}}).apply(this,Z)},list(...Z){return s9({method:"GET",fullPath:"/v2/core/events",methodType:"list",transformResponseData:(J)=>{return{...J,data:J.data.map(this.addFetchRelatedObjectIfNeeded.bind(this))}}}).apply(this,Z)},addFetchRelatedObjectIfNeeded(Z){if(!Z.related_object||!Z.related_object.url)return Z;return{...Z,fetchRelatedObject:()=>s9({method:"GET",fullPath:Z.related_object.url}).apply(this,[{stripeContext:Z.context,headers:{"Stripe-Request-Trigger":`event=${Z.id}`}}])}}})});var S6=K((I6)=>{Object.defineProperty(I6,"__esModule",{value:!0});I6.Features=void 0;var x6=w(),y8=x6.StripeResource.method;I6.Features=x6.StripeResource.extend({create:y8({method:"POST",fullPath:"/v1/entitlements/features"}),retrieve:y8({method:"GET",fullPath:"/v1/entitlements/features/{id}"}),update:y8({method:"POST",fullPath:"/v1/entitlements/features/{id}"}),list:y8({method:"GET",fullPath:"/v1/entitlements/features",methodType:"list"})})});var j6=K((v6)=>{Object.defineProperty(v6,"__esModule",{value:!0});v6.FinancialAccounts=void 0;var R6=w(),X0=R6.StripeResource.method;v6.FinancialAccounts=R6.StripeResource.extend({create:X0({method:"POST",fullPath:"/v1/treasury/financial_accounts"}),retrieve:X0({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),update:X0({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),list:X0({method:"GET",fullPath:"/v1/treasury/financial_accounts",methodType:"list"}),close:X0({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/close"}),retrieveFeatures:X0({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"}),updateFeatures:X0({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"})})});var _6=K((f6)=>{Object.defineProperty(f6,"__esModule",{value:!0});f6.InboundTransfers=void 0;var b6=w(),r9=b6.StripeResource.method;f6.InboundTransfers=b6.StripeResource.extend({fail:r9({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/fail"}),returnInboundTransfer:r9({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/return"}),succeed:r9({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/succeed"})})});var u6=K((h6)=>{Object.defineProperty(h6,"__esModule",{value:!0});h6.InboundTransfers=void 0;var g6=w(),j8=g6.StripeResource.method;h6.InboundTransfers=g6.StripeResource.extend({create:j8({method:"POST",fullPath:"/v1/treasury/inbound_transfers"}),retrieve:j8({method:"GET",fullPath:"/v1/treasury/inbound_transfers/{id}"}),list:j8({method:"GET",fullPath:"/v1/treasury/inbound_transfers",methodType:"list"}),cancel:j8({method:"POST",fullPath:"/v1/treasury/inbound_transfers/{inbound_transfer}/cancel"})})});var p6=K((l6)=>{Object.defineProperty(l6,"__esModule",{value:!0});l6.Locations=void 0;var c6=w(),i0=c6.StripeResource.method;l6.Locations=c6.StripeResource.extend({create:i0({method:"POST",fullPath:"/v1/terminal/locations"}),retrieve:i0({method:"GET",fullPath:"/v1/terminal/locations/{location}"}),update:i0({method:"POST",fullPath:"/v1/terminal/locations/{location}"}),list:i0({method:"GET",fullPath:"/v1/terminal/locations",methodType:"list"}),del:i0({method:"DELETE",fullPath:"/v1/terminal/locations/{location}"})})});var o6=K((i6)=>{Object.defineProperty(i6,"__esModule",{value:!0});i6.MeterEventAdjustments=void 0;var d6=w(),bU=d6.StripeResource.method;i6.MeterEventAdjustments=d6.StripeResource.extend({create:bU({method:"POST",fullPath:"/v1/billing/meter_event_adjustments"})})});var e6=K((r6)=>{Object.defineProperty(r6,"__esModule",{value:!0});r6.MeterEventAdjustments=void 0;var s6=w(),fU=s6.StripeResource.method;r6.MeterEventAdjustments=s6.StripeResource.extend({create:fU({method:"POST",fullPath:"/v2/billing/meter_event_adjustments"})})});var Q7=K(($7)=>{Object.defineProperty($7,"__esModule",{value:!0});$7.MeterEventSession=void 0;var Z7=w(),MU=Z7.StripeResource.method;$7.MeterEventSession=Z7.StripeResource.extend({create:MU({method:"POST",fullPath:"/v2/billing/meter_event_session"})})});var V7=K((Y7)=>{Object.defineProperty(Y7,"__esModule",{value:!0});Y7.MeterEventStream=void 0;var X7=w(),_U=X7.StripeResource.method;Y7.MeterEventStream=X7.StripeResource.extend({create:_U({method:"POST",fullPath:"/v2/billing/meter_event_stream",host:"meter-events.stripe.com"})})});var z7=K((W7)=>{Object.defineProperty(W7,"__esModule",{value:!0});W7.MeterEvents=void 0;var B7=w(),gU=B7.StripeResource.method;W7.MeterEvents=B7.StripeResource.extend({create:gU({method:"POST",fullPath:"/v1/billing/meter_events"})})});var w7=K((K7)=>{Object.defineProperty(K7,"__esModule",{value:!0});K7.MeterEvents=void 0;var L7=w(),hU=L7.StripeResource.method;K7.MeterEvents=L7.StripeResource.extend({create:hU({method:"POST",fullPath:"/v2/billing/meter_events"})})});var q7=K((D7)=>{Object.defineProperty(D7,"__esModule",{value:!0});D7.Meters=void 0;var T7=w(),Y0=T7.StripeResource.method;D7.Meters=T7.StripeResource.extend({create:Y0({method:"POST",fullPath:"/v1/billing/meters"}),retrieve:Y0({method:"GET",fullPath:"/v1/billing/meters/{id}"}),update:Y0({method:"POST",fullPath:"/v1/billing/meters/{id}"}),list:Y0({method:"GET",fullPath:"/v1/billing/meters",methodType:"list"}),deactivate:Y0({method:"POST",fullPath:"/v1/billing/meters/{id}/deactivate"}),listEventSummaries:Y0({method:"GET",fullPath:"/v1/billing/meters/{id}/event_summaries",methodType:"list"}),reactivate:Y0({method:"POST",fullPath:"/v1/billing/meters/{id}/reactivate"})})});var k7=K((F7)=>{Object.defineProperty(F7,"__esModule",{value:!0});F7.OnboardingLinks=void 0;var E7=w(),mU=E7.StripeResource.method;F7.OnboardingLinks=E7.StripeResource.extend({create:mU({method:"POST",fullPath:"/v1/terminal/onboarding_links"})})});var I7=K((N7)=>{Object.defineProperty(N7,"__esModule",{value:!0});N7.Orders=void 0;var A7=w(),a0=A7.StripeResource.method;N7.Orders=A7.StripeResource.extend({create:a0({method:"POST",fullPath:"/v1/climate/orders",requestSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),retrieve:a0({method:"GET",fullPath:"/v1/climate/orders/{order}",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),update:a0({method:"POST",fullPath:"/v1/climate/orders/{order}",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),list:a0({method:"GET",fullPath:"/v1/climate/orders",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}}}}),cancel:a0({method:"POST",fullPath:"/v1/climate/orders/{order}/cancel",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}})})});var v7=K((S7)=>{Object.defineProperty(S7,"__esModule",{value:!0});S7.OutboundPayments=void 0;var P7=w(),b8=P7.StripeResource.method;S7.OutboundPayments=P7.StripeResource.extend({update:b8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}"}),fail:b8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/fail"}),post:b8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/post"}),returnOutboundPayment:b8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/return"})})});var f7=K((j7)=>{Object.defineProperty(j7,"__esModule",{value:!0});j7.OutboundPayments=void 0;var y7=w(),f8=y7.StripeResource.method;j7.OutboundPayments=y7.StripeResource.extend({create:f8({method:"POST",fullPath:"/v1/treasury/outbound_payments"}),retrieve:f8({method:"GET",fullPath:"/v1/treasury/outbound_payments/{id}"}),list:f8({method:"GET",fullPath:"/v1/treasury/outbound_payments",methodType:"list"}),cancel:f8({method:"POST",fullPath:"/v1/treasury/outbound_payments/{id}/cancel"})})});var h7=K((_7)=>{Object.defineProperty(_7,"__esModule",{value:!0});_7.OutboundTransfers=void 0;var M7=w(),M8=M7.StripeResource.method;_7.OutboundTransfers=M7.StripeResource.extend({update:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}"}),fail:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail"}),post:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post"}),returnOutboundTransfer:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return"})})});var l7=K((u7)=>{Object.defineProperty(u7,"__esModule",{value:!0});u7.OutboundTransfers=void 0;var m7=w(),_8=m7.StripeResource.method;u7.OutboundTransfers=m7.StripeResource.extend({create:_8({method:"POST",fullPath:"/v1/treasury/outbound_transfers"}),retrieve:_8({method:"GET",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}"}),list:_8({method:"GET",fullPath:"/v1/treasury/outbound_transfers",methodType:"list"}),cancel:_8({method:"POST",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}/cancel"})})});var i7=K((p7)=>{Object.defineProperty(p7,"__esModule",{value:!0});p7.PaymentEvaluations=void 0;var n7=w(),uU=n7.StripeResource.method;p7.PaymentEvaluations=n7.StripeResource.extend({create:uU({method:"POST",fullPath:"/v1/radar/payment_evaluations"})})});var r7=K((o7)=>{Object.defineProperty(o7,"__esModule",{value:!0});o7.PersonalizationDesigns=void 0;var a7=w(),g8=a7.StripeResource.method;o7.PersonalizationDesigns=a7.StripeResource.extend({create:g8({method:"POST",fullPath:"/v1/issuing/personalization_designs"}),retrieve:g8({method:"GET",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),update:g8({method:"POST",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),list:g8({method:"GET",fullPath:"/v1/issuing/personalization_designs",methodType:"list"})})});var $J=K((e7)=>{Object.defineProperty(e7,"__esModule",{value:!0});e7.PersonalizationDesigns=void 0;var t7=w(),t9=t7.StripeResource.method;e7.PersonalizationDesigns=t7.StripeResource.extend({activate:t9({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate"}),deactivate:t9({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate"}),reject:t9({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject"})})});var GJ=K((XJ)=>{Object.defineProperty(XJ,"__esModule",{value:!0});XJ.PhysicalBundles=void 0;var QJ=w(),JJ=QJ.StripeResource.method;XJ.PhysicalBundles=QJ.StripeResource.extend({retrieve:JJ({method:"GET",fullPath:"/v1/issuing/physical_bundles/{physical_bundle}"}),list:JJ({method:"GET",fullPath:"/v1/issuing/physical_bundles",methodType:"list"})})});var zJ=K((WJ)=>{Object.defineProperty(WJ,"__esModule",{value:!0});WJ.Products=void 0;var BJ=w(),VJ=BJ.StripeResource.method;WJ.Products=BJ.StripeResource.extend({retrieve:VJ({method:"GET",fullPath:"/v1/climate/products/{product}",responseSchema:{kind:"object",fields:{metric_tons_available:{kind:"decimal_string"}}}}),list:VJ({method:"GET",fullPath:"/v1/climate/products",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{metric_tons_available:{kind:"decimal_string"}}}}}}})})});var wJ=K((KJ)=>{Object.defineProperty(KJ,"__esModule",{value:!0});KJ.Readers=void 0;var LJ=w(),f=LJ.StripeResource.method;KJ.Readers=LJ.StripeResource.extend({create:f({method:"POST",fullPath:"/v1/terminal/readers"}),retrieve:f({method:"GET",fullPath:"/v1/terminal/readers/{reader}"}),update:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}"}),list:f({method:"GET",fullPath:"/v1/terminal/readers",methodType:"list"}),del:f({method:"DELETE",fullPath:"/v1/terminal/readers/{reader}"}),cancelAction:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/cancel_action"}),collectInputs:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/collect_inputs"}),collectPaymentMethod:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/collect_payment_method"}),confirmPaymentIntent:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/confirm_payment_intent"}),processPaymentIntent:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_payment_intent"}),processSetupIntent:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_setup_intent"}),refundPayment:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/refund_payment"}),setReaderDisplay:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/set_reader_display"})})});var qJ=K((DJ)=>{Object.defineProperty(DJ,"__esModule",{value:!0});DJ.Readers=void 0;var TJ=w(),e9=TJ.StripeResource.method;DJ.Readers=TJ.StripeResource.extend({presentPaymentMethod:e9({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/present_payment_method"}),succeedInputCollection:e9({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/succeed_input_collection"}),timeoutInputCollection:e9({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/timeout_input_collection"})})});var kJ=K((FJ)=>{Object.defineProperty(FJ,"__esModule",{value:!0});FJ.ReceivedCredits=void 0;var EJ=w(),cU=EJ.StripeResource.method;FJ.ReceivedCredits=EJ.StripeResource.extend({create:cU({method:"POST",fullPath:"/v1/test_helpers/treasury/received_credits"})})});var PJ=K((xJ)=>{Object.defineProperty(xJ,"__esModule",{value:!0});xJ.ReceivedCredits=void 0;var NJ=w(),AJ=NJ.StripeResource.method;xJ.ReceivedCredits=NJ.StripeResource.extend({retrieve:AJ({method:"GET",fullPath:"/v1/treasury/received_credits/{id}"}),list:AJ({method:"GET",fullPath:"/v1/treasury/received_credits",methodType:"list"})})});var yJ=K((RJ)=>{Object.defineProperty(RJ,"__esModule",{value:!0});RJ.ReceivedDebits=void 0;var SJ=w(),lU=SJ.StripeResource.method;RJ.ReceivedDebits=SJ.StripeResource.extend({create:lU({method:"POST",fullPath:"/v1/test_helpers/treasury/received_debits"})})});var _J=K((fJ)=>{Object.defineProperty(fJ,"__esModule",{value:!0});fJ.ReceivedDebits=void 0;var bJ=w(),jJ=bJ.StripeResource.method;fJ.ReceivedDebits=bJ.StripeResource.extend({retrieve:jJ({method:"GET",fullPath:"/v1/treasury/received_debits/{id}"}),list:jJ({method:"GET",fullPath:"/v1/treasury/received_debits",methodType:"list"})})});var uJ=K((hJ)=>{Object.defineProperty(hJ,"__esModule",{value:!0});hJ.Refunds=void 0;var gJ=w(),nU=gJ.StripeResource.method;hJ.Refunds=gJ.StripeResource.extend({expire:nU({method:"POST",fullPath:"/v1/test_helpers/refunds/{refund}/expire"})})});var pJ=K((lJ)=>{Object.defineProperty(lJ,"__esModule",{value:!0});lJ.Registrations=void 0;var cJ=w(),h8=cJ.StripeResource.method;lJ.Registrations=cJ.StripeResource.extend({create:h8({method:"POST",fullPath:"/v1/tax/registrations"}),retrieve:h8({method:"GET",fullPath:"/v1/tax/registrations/{id}"}),update:h8({method:"POST",fullPath:"/v1/tax/registrations/{id}"}),list:h8({method:"GET",fullPath:"/v1/tax/registrations",methodType:"list"})})});var oJ=K((iJ)=>{Object.defineProperty(iJ,"__esModule",{value:!0});iJ.ReportRuns=void 0;var dJ=w(),ZZ=dJ.StripeResource.method;iJ.ReportRuns=dJ.StripeResource.extend({create:ZZ({method:"POST",fullPath:"/v1/reporting/report_runs"}),retrieve:ZZ({method:"GET",fullPath:"/v1/reporting/report_runs/{report_run}"}),list:ZZ({method:"GET",fullPath:"/v1/reporting/report_runs",methodType:"list"})})});var Z5=K((tJ)=>{Object.defineProperty(tJ,"__esModule",{value:!0});tJ.ReportTypes=void 0;var rJ=w(),sJ=rJ.StripeResource.method;tJ.ReportTypes=rJ.StripeResource.extend({retrieve:sJ({method:"GET",fullPath:"/v1/reporting/report_types/{report_type}"}),list:sJ({method:"GET",fullPath:"/v1/reporting/report_types",methodType:"list"})})});var X5=K((J5)=>{Object.defineProperty(J5,"__esModule",{value:!0});J5.Requests=void 0;var $5=w(),$Z=$5.StripeResource.method;J5.Requests=$5.StripeResource.extend({create:$Z({method:"POST",fullPath:"/v1/forwarding/requests"}),retrieve:$Z({method:"GET",fullPath:"/v1/forwarding/requests/{id}"}),list:$Z({method:"GET",fullPath:"/v1/forwarding/requests",methodType:"list"})})});var W5=K((V5)=>{Object.defineProperty(V5,"__esModule",{value:!0});V5.ScheduledQueryRuns=void 0;var G5=w(),Y5=G5.StripeResource.method;V5.ScheduledQueryRuns=G5.StripeResource.extend({retrieve:Y5({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs/{scheduled_query_run}"}),list:Y5({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs",methodType:"list"})})});var K5=K((z5)=>{Object.defineProperty(z5,"__esModule",{value:!0});z5.Secrets=void 0;var U5=w(),m8=U5.StripeResource.method;z5.Secrets=U5.StripeResource.extend({create:m8({method:"POST",fullPath:"/v1/apps/secrets"}),list:m8({method:"GET",fullPath:"/v1/apps/secrets",methodType:"list"}),deleteWhere:m8({method:"POST",fullPath:"/v1/apps/secrets/delete"}),find:m8({method:"GET",fullPath:"/v1/apps/secrets/find"})})});var D5=K((w5)=>{Object.defineProperty(w5,"__esModule",{value:!0});w5.Sessions=void 0;var H5=w(),pU=H5.StripeResource.method;w5.Sessions=H5.StripeResource.extend({create:pU({method:"POST",fullPath:"/v1/billing_portal/sessions"})})});var F5=K((q5)=>{Object.defineProperty(q5,"__esModule",{value:!0});q5.Sessions=void 0;var O5=w(),q0=O5.StripeResource.method;q5.Sessions=O5.StripeResource.extend({create:q0({method:"POST",fullPath:"/v1/checkout/sessions",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),retrieve:q0({method:"GET",fullPath:"/v1/checkout/sessions/{session}",responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),update:q0({method:"POST",fullPath:"/v1/checkout/sessions/{session}",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),list:q0({method:"GET",fullPath:"/v1/checkout/sessions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}),expire:q0({method:"POST",fullPath:"/v1/checkout/sessions/{session}/expire",responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),listLineItems:q0({method:"GET",fullPath:"/v1/checkout/sessions/{session}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})})});var x5=K((A5)=>{Object.defineProperty(A5,"__esModule",{value:!0});A5.Sessions=void 0;var k5=w(),C5=k5.StripeResource.method;A5.Sessions=k5.StripeResource.extend({create:C5({method:"POST",fullPath:"/v1/financial_connections/sessions"}),retrieve:C5({method:"GET",fullPath:"/v1/financial_connections/sessions/{session}"})})});var v5=K((S5)=>{Object.defineProperty(S5,"__esModule",{value:!0});S5.Settings=void 0;var P5=w(),I5=P5.StripeResource.method;S5.Settings=P5.StripeResource.extend({retrieve:I5({method:"GET",fullPath:"/v1/tax/settings"}),update:I5({method:"POST",fullPath:"/v1/tax/settings"})})});var M5=K((b5)=>{Object.defineProperty(b5,"__esModule",{value:!0});b5.Suppliers=void 0;var j5=w(),y5=j5.StripeResource.method;b5.Suppliers=j5.StripeResource.extend({retrieve:y5({method:"GET",fullPath:"/v1/climate/suppliers/{supplier}"}),list:y5({method:"GET",fullPath:"/v1/climate/suppliers",methodType:"list"})})});var m5=K((g5)=>{Object.defineProperty(g5,"__esModule",{value:!0});g5.TestClocks=void 0;var _5=w(),o0=_5.StripeResource.method;g5.TestClocks=_5.StripeResource.extend({create:o0({method:"POST",fullPath:"/v1/test_helpers/test_clocks"}),retrieve:o0({method:"GET",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),list:o0({method:"GET",fullPath:"/v1/test_helpers/test_clocks",methodType:"list"}),del:o0({method:"DELETE",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),advance:o0({method:"POST",fullPath:"/v1/test_helpers/test_clocks/{test_clock}/advance"})})});var n5=K((c5)=>{Object.defineProperty(c5,"__esModule",{value:!0});c5.Tokens=void 0;var u5=w(),JZ=u5.StripeResource.method;c5.Tokens=u5.StripeResource.extend({retrieve:JZ({method:"GET",fullPath:"/v1/issuing/tokens/{token}"}),update:JZ({method:"POST",fullPath:"/v1/issuing/tokens/{token}"}),list:JZ({method:"GET",fullPath:"/v1/issuing/tokens",methodType:"list"})})});var o5=K((i5)=>{Object.defineProperty(i5,"__esModule",{value:!0});i5.TransactionEntries=void 0;var d5=w(),p5=d5.StripeResource.method;i5.TransactionEntries=d5.StripeResource.extend({retrieve:p5({method:"GET",fullPath:"/v1/treasury/transaction_entries/{id}",responseSchema:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}),list:p5({method:"GET",fullPath:"/v1/treasury/transaction_entries",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}})})});var ZQ=K((t5)=>{Object.defineProperty(t5,"__esModule",{value:!0});t5.Transactions=void 0;var r5=w(),s5=r5.StripeResource.method;t5.Transactions=r5.StripeResource.extend({retrieve:s5({method:"GET",fullPath:"/v1/financial_connections/transactions/{transaction}"}),list:s5({method:"GET",fullPath:"/v1/financial_connections/transactions",methodType:"list"})})});var XQ=K((JQ)=>{Object.defineProperty(JQ,"__esModule",{value:!0});JQ.Transactions=void 0;var $Q=w(),QZ=$Q.StripeResource.method;JQ.Transactions=$Q.StripeResource.extend({retrieve:QZ({method:"GET",fullPath:"/v1/issuing/transactions/{transaction}",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),update:QZ({method:"POST",fullPath:"/v1/issuing/transactions/{transaction}",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),list:QZ({method:"GET",fullPath:"/v1/issuing/transactions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})})});var BQ=K((GQ)=>{Object.defineProperty(GQ,"__esModule",{value:!0});GQ.Transactions=void 0;var YQ=w(),u8=YQ.StripeResource.method;GQ.Transactions=YQ.StripeResource.extend({retrieve:u8({method:"GET",fullPath:"/v1/tax/transactions/{transaction}"}),createFromCalculation:u8({method:"POST",fullPath:"/v1/tax/transactions/create_from_calculation"}),createReversal:u8({method:"POST",fullPath:"/v1/tax/transactions/create_reversal"}),listLineItems:u8({method:"GET",fullPath:"/v1/tax/transactions/{transaction}/line_items",methodType:"list"})})});var LQ=K((UQ)=>{Object.defineProperty(UQ,"__esModule",{value:!0});UQ.Transactions=void 0;var WQ=w(),XZ=WQ.StripeResource.method;UQ.Transactions=WQ.StripeResource.extend({createForceCapture:XZ({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_force_capture",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),createUnlinkedRefund:XZ({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_unlinked_refund",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),refund:XZ({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/{transaction}/refund",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}})})});var DQ=K((wQ)=>{Object.defineProperty(wQ,"__esModule",{value:!0});wQ.Transactions=void 0;var HQ=w(),KQ=HQ.StripeResource.method;wQ.Transactions=HQ.StripeResource.extend({retrieve:KQ({method:"GET",fullPath:"/v1/treasury/transactions/{id}",responseSchema:{kind:"object",fields:{entries:{kind:"nullable",inner:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}}}}}),list:KQ({method:"GET",fullPath:"/v1/treasury/transactions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{entries:{kind:"nullable",inner:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}}}}}}}})})});var FQ=K((qQ)=>{Object.defineProperty(qQ,"__esModule",{value:!0});qQ.ValueListItems=void 0;var OQ=w(),c8=OQ.StripeResource.method;qQ.ValueListItems=OQ.StripeResource.extend({create:c8({method:"POST",fullPath:"/v1/radar/value_list_items"}),retrieve:c8({method:"GET",fullPath:"/v1/radar/value_list_items/{item}"}),list:c8({method:"GET",fullPath:"/v1/radar/value_list_items",methodType:"list"}),del:c8({method:"DELETE",fullPath:"/v1/radar/value_list_items/{item}"})})});var NQ=K((kQ)=>{Object.defineProperty(kQ,"__esModule",{value:!0});kQ.ValueLists=void 0;var CQ=w(),s0=CQ.StripeResource.method;kQ.ValueLists=CQ.StripeResource.extend({create:s0({method:"POST",fullPath:"/v1/radar/value_lists"}),retrieve:s0({method:"GET",fullPath:"/v1/radar/value_lists/{value_list}"}),update:s0({method:"POST",fullPath:"/v1/radar/value_lists/{value_list}"}),list:s0({method:"GET",fullPath:"/v1/radar/value_lists",methodType:"list"}),del:s0({method:"DELETE",fullPath:"/v1/radar/value_lists/{value_list}"})})});var RQ=K((PQ)=>{Object.defineProperty(PQ,"__esModule",{value:!0});PQ.VerificationReports=void 0;var IQ=w(),xQ=IQ.StripeResource.method;PQ.VerificationReports=IQ.StripeResource.extend({retrieve:xQ({method:"GET",fullPath:"/v1/identity/verification_reports/{report}"}),list:xQ({method:"GET",fullPath:"/v1/identity/verification_reports",methodType:"list"})})});var bQ=K((yQ)=>{Object.defineProperty(yQ,"__esModule",{value:!0});yQ.VerificationSessions=void 0;var vQ=w(),E0=vQ.StripeResource.method;yQ.VerificationSessions=vQ.StripeResource.extend({create:E0({method:"POST",fullPath:"/v1/identity/verification_sessions"}),retrieve:E0({method:"GET",fullPath:"/v1/identity/verification_sessions/{session}"}),update:E0({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}"}),list:E0({method:"GET",fullPath:"/v1/identity/verification_sessions",methodType:"list"}),cancel:E0({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/cancel"}),redact:E0({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/redact"})})});var YZ=K((MQ)=>{Object.defineProperty(MQ,"__esModule",{value:!0});MQ.Accounts=void 0;var fQ=w(),I=fQ.StripeResource.method;MQ.Accounts=fQ.StripeResource.extend({create:I({method:"POST",fullPath:"/v1/accounts"}),retrieve(Z,...$){if(typeof Z==="string")return I({method:"GET",fullPath:"/v1/accounts/{id}"}).apply(this,[Z,...$]);else{if(Z===null||Z===void 0)[].shift.apply([Z,...$]);return I({method:"GET",fullPath:"/v1/account"}).apply(this,[Z,...$])}},update:I({method:"POST",fullPath:"/v1/accounts/{account}"}),list:I({method:"GET",fullPath:"/v1/accounts",methodType:"list"}),del:I({method:"DELETE",fullPath:"/v1/accounts/{account}"}),createExternalAccount:I({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts"}),createLoginLink:I({method:"POST",fullPath:"/v1/accounts/{account}/login_links"}),createPerson:I({method:"POST",fullPath:"/v1/accounts/{account}/persons"}),deleteExternalAccount:I({method:"DELETE",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),deletePerson:I({method:"DELETE",fullPath:"/v1/accounts/{account}/persons/{person}"}),listCapabilities:I({method:"GET",fullPath:"/v1/accounts/{account}/capabilities",methodType:"list"}),listExternalAccounts:I({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts",methodType:"list"}),listPersons:I({method:"GET",fullPath:"/v1/accounts/{account}/persons",methodType:"list"}),reject:I({method:"POST",fullPath:"/v1/accounts/{account}/reject"}),retrieveCurrent:I({method:"GET",fullPath:"/v1/account"}),retrieveCapability:I({method:"GET",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),retrieveExternalAccount:I({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),retrievePerson:I({method:"GET",fullPath:"/v1/accounts/{account}/persons/{person}"}),updateCapability:I({method:"POST",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),updateExternalAccount:I({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),updatePerson:I({method:"POST",fullPath:"/v1/accounts/{account}/persons/{person}"})})});var uQ=K((hQ)=>{Object.defineProperty(hQ,"__esModule",{value:!0});hQ.AccountLinks=void 0;var gQ=w(),dU=gQ.StripeResource.method;hQ.AccountLinks=gQ.StripeResource.extend({create:dU({method:"POST",fullPath:"/v1/account_links"})})});var pQ=K((lQ)=>{Object.defineProperty(lQ,"__esModule",{value:!0});lQ.AccountSessions=void 0;var cQ=w(),iU=cQ.StripeResource.method;lQ.AccountSessions=cQ.StripeResource.extend({create:iU({method:"POST",fullPath:"/v1/account_sessions"})})});var oQ=K((iQ)=>{Object.defineProperty(iQ,"__esModule",{value:!0});iQ.ApplePayDomains=void 0;var dQ=w(),l8=dQ.StripeResource.method;iQ.ApplePayDomains=dQ.StripeResource.extend({create:l8({method:"POST",fullPath:"/v1/apple_pay/domains"}),retrieve:l8({method:"GET",fullPath:"/v1/apple_pay/domains/{domain}"}),list:l8({method:"GET",fullPath:"/v1/apple_pay/domains",methodType:"list"}),del:l8({method:"DELETE",fullPath:"/v1/apple_pay/domains/{domain}"})})});var eQ=K((rQ)=>{Object.defineProperty(rQ,"__esModule",{value:!0});rQ.ApplicationFees=void 0;var sQ=w(),F0=sQ.StripeResource.method;rQ.ApplicationFees=sQ.StripeResource.extend({retrieve:F0({method:"GET",fullPath:"/v1/application_fees/{id}"}),list:F0({method:"GET",fullPath:"/v1/application_fees",methodType:"list"}),createRefund:F0({method:"POST",fullPath:"/v1/application_fees/{id}/refunds"}),listRefunds:F0({method:"GET",fullPath:"/v1/application_fees/{id}/refunds",methodType:"list"}),retrieveRefund:F0({method:"GET",fullPath:"/v1/application_fees/{fee}/refunds/{id}"}),updateRefund:F0({method:"POST",fullPath:"/v1/application_fees/{fee}/refunds/{id}"})})});var QX=K(($X)=>{Object.defineProperty($X,"__esModule",{value:!0});$X.Balance=void 0;var ZX=w(),aU=ZX.StripeResource.method;$X.Balance=ZX.StripeResource.extend({retrieve:aU({method:"GET",fullPath:"/v1/balance"})})});var BX=K((GX)=>{Object.defineProperty(GX,"__esModule",{value:!0});GX.BalanceSettings=void 0;var YX=w(),XX=YX.StripeResource.method;GX.BalanceSettings=YX.StripeResource.extend({retrieve:XX({method:"GET",fullPath:"/v1/balance_settings"}),update:XX({method:"POST",fullPath:"/v1/balance_settings"})})});var KX=K((zX)=>{Object.defineProperty(zX,"__esModule",{value:!0});zX.BalanceTransactions=void 0;var UX=w(),WX=UX.StripeResource.method;zX.BalanceTransactions=UX.StripeResource.extend({retrieve:WX({method:"GET",fullPath:"/v1/balance_transactions/{id}"}),list:WX({method:"GET",fullPath:"/v1/balance_transactions",methodType:"list"})})});var DX=K((wX)=>{Object.defineProperty(wX,"__esModule",{value:!0});wX.Charges=void 0;var HX=w(),C0=HX.StripeResource.method;wX.Charges=HX.StripeResource.extend({create:C0({method:"POST",fullPath:"/v1/charges"}),retrieve:C0({method:"GET",fullPath:"/v1/charges/{charge}"}),update:C0({method:"POST",fullPath:"/v1/charges/{charge}"}),list:C0({method:"GET",fullPath:"/v1/charges",methodType:"list"}),capture:C0({method:"POST",fullPath:"/v1/charges/{charge}/capture"}),search:C0({method:"GET",fullPath:"/v1/charges/search",methodType:"search"})})});var FX=K((qX)=>{Object.defineProperty(qX,"__esModule",{value:!0});qX.ConfirmationTokens=void 0;var OX=w(),oU=OX.StripeResource.method;qX.ConfirmationTokens=OX.StripeResource.extend({retrieve:oU({method:"GET",fullPath:"/v1/confirmation_tokens/{confirmation_token}"})})});var xX=K((AX)=>{Object.defineProperty(AX,"__esModule",{value:!0});AX.CountrySpecs=void 0;var kX=w(),CX=kX.StripeResource.method;AX.CountrySpecs=kX.StripeResource.extend({retrieve:CX({method:"GET",fullPath:"/v1/country_specs/{country}"}),list:CX({method:"GET",fullPath:"/v1/country_specs",methodType:"list"})})});var RX=K((PX)=>{Object.defineProperty(PX,"__esModule",{value:!0});PX.Coupons=void 0;var IX=w(),r0=IX.StripeResource.method;PX.Coupons=IX.StripeResource.extend({create:r0({method:"POST",fullPath:"/v1/coupons"}),retrieve:r0({method:"GET",fullPath:"/v1/coupons/{coupon}"}),update:r0({method:"POST",fullPath:"/v1/coupons/{coupon}"}),list:r0({method:"GET",fullPath:"/v1/coupons",methodType:"list"}),del:r0({method:"DELETE",fullPath:"/v1/coupons/{coupon}"})})});var bX=K((yX)=>{Object.defineProperty(yX,"__esModule",{value:!0});yX.CreditNotes=void 0;var vX=w(),s=vX.StripeResource.method;yX.CreditNotes=vX.StripeResource.extend({create:s({method:"POST",fullPath:"/v1/credit_notes",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),retrieve:s({method:"GET",fullPath:"/v1/credit_notes/{id}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),update:s({method:"POST",fullPath:"/v1/credit_notes/{id}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),list:s({method:"GET",fullPath:"/v1/credit_notes",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),listLineItems:s({method:"GET",fullPath:"/v1/credit_notes/{credit_note}/lines",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),listPreviewLineItems:s({method:"GET",fullPath:"/v1/credit_notes/preview/lines",methodType:"list",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),preview:s({method:"GET",fullPath:"/v1/credit_notes/preview",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),voidCreditNote:s({method:"POST",fullPath:"/v1/credit_notes/{id}/void",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})})});var gX=K((MX)=>{Object.defineProperty(MX,"__esModule",{value:!0});MX.CustomerSessions=void 0;var fX=w(),sU=fX.StripeResource.method;MX.CustomerSessions=fX.StripeResource.extend({create:sU({method:"POST",fullPath:"/v1/customer_sessions"})})});var cX=K((mX)=>{Object.defineProperty(mX,"__esModule",{value:!0});mX.Customers=void 0;var hX=w(),A=hX.StripeResource.method;mX.Customers=hX.StripeResource.extend({create:A({method:"POST",fullPath:"/v1/customers",responseSchema:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),retrieve:A({method:"GET",fullPath:"/v1/customers/{customer}"}),update:A({method:"POST",fullPath:"/v1/customers/{customer}",responseSchema:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),list:A({method:"GET",fullPath:"/v1/customers",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),del:A({method:"DELETE",fullPath:"/v1/customers/{customer}"}),createBalanceTransaction:A({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions"}),createFundingInstructions:A({method:"POST",fullPath:"/v1/customers/{customer}/funding_instructions"}),createSource:A({method:"POST",fullPath:"/v1/customers/{customer}/sources"}),createTaxId:A({method:"POST",fullPath:"/v1/customers/{customer}/tax_ids"}),deleteDiscount:A({method:"DELETE",fullPath:"/v1/customers/{customer}/discount"}),deleteSource:A({method:"DELETE",fullPath:"/v1/customers/{customer}/sources/{id}"}),deleteTaxId:A({method:"DELETE",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),listBalanceTransactions:A({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions",methodType:"list"}),listCashBalanceTransactions:A({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions",methodType:"list"}),listPaymentMethods:A({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods",methodType:"list"}),listSources:A({method:"GET",fullPath:"/v1/customers/{customer}/sources",methodType:"list"}),listTaxIds:A({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids",methodType:"list"}),retrieveBalanceTransaction:A({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),retrieveCashBalance:A({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance"}),retrieveCashBalanceTransaction:A({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions/{transaction}"}),retrievePaymentMethod:A({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods/{payment_method}"}),retrieveSource:A({method:"GET",fullPath:"/v1/customers/{customer}/sources/{id}"}),retrieveTaxId:A({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),search:A({method:"GET",fullPath:"/v1/customers/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),updateBalanceTransaction:A({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),updateCashBalance:A({method:"POST",fullPath:"/v1/customers/{customer}/cash_balance"}),updateSource:A({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}"}),verifySource:A({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}/verify"})})});var dX=K((nX)=>{Object.defineProperty(nX,"__esModule",{value:!0});nX.Disputes=void 0;var lX=w(),n8=lX.StripeResource.method;nX.Disputes=lX.StripeResource.extend({retrieve:n8({method:"GET",fullPath:"/v1/disputes/{dispute}"}),update:n8({method:"POST",fullPath:"/v1/disputes/{dispute}"}),list:n8({method:"GET",fullPath:"/v1/disputes",methodType:"list"}),close:n8({method:"POST",fullPath:"/v1/disputes/{dispute}/close"})})});var rX=K((oX)=>{Object.defineProperty(oX,"__esModule",{value:!0});oX.EphemeralKeys=void 0;var aX=w(),iX=aX.StripeResource.method;oX.EphemeralKeys=aX.StripeResource.extend({create:iX({method:"POST",fullPath:"/v1/ephemeral_keys",validator:(Z,$)=>{if(!$.headers||!$.headers["Stripe-Version"])throw Error("Passing apiVersion in a separate options hash is required to create an ephemeral key. See https://stripe.com/docs/api/versioning?lang=node")}}),del:iX({method:"DELETE",fullPath:"/v1/ephemeral_keys/{key}"})})});var JY=K((ZY)=>{Object.defineProperty(ZY,"__esModule",{value:!0});ZY.Events=void 0;var eX=w(),tX=eX.StripeResource.method;ZY.Events=eX.StripeResource.extend({retrieve:tX({method:"GET",fullPath:"/v1/events/{id}"}),list:tX({method:"GET",fullPath:"/v1/events",methodType:"list"})})});var VY=K((YY)=>{Object.defineProperty(YY,"__esModule",{value:!0});YY.ExchangeRates=void 0;var XY=w(),QY=XY.StripeResource.method;YY.ExchangeRates=XY.StripeResource.extend({retrieve:QY({method:"GET",fullPath:"/v1/exchange_rates/{rate_id}"}),list:QY({method:"GET",fullPath:"/v1/exchange_rates",methodType:"list"})})});var zY=K((WY)=>{Object.defineProperty(WY,"__esModule",{value:!0});WY.FileLinks=void 0;var BY=w(),p8=BY.StripeResource.method;WY.FileLinks=BY.StripeResource.extend({create:p8({method:"POST",fullPath:"/v1/file_links"}),retrieve:p8({method:"GET",fullPath:"/v1/file_links/{link}"}),update:p8({method:"POST",fullPath:"/v1/file_links/{link}"}),list:p8({method:"GET",fullPath:"/v1/file_links",methodType:"list"})})});var wY=K((KY)=>{Object.defineProperty(KY,"__esModule",{value:!0});KY.multipartRequestDataProcessor=void 0;var LY=c(),rU=(Z,$,J)=>{let Q=(Math.round(Math.random()*10000000000000000)+Math.round(Math.random()*10000000000000000)).toString();J["Content-Type"]=`multipart/form-data; boundary=${Q}`;let X=new TextEncoder,Y=new Uint8Array(0),G=X.encode(`\r
12
- `);function V(B){let z=Y,L=B instanceof Uint8Array?B:new Uint8Array(X.encode(B));Y=new Uint8Array(z.length+L.length+2),Y.set(z),Y.set(L,z.length),Y.set(G,Y.length-2)}function U(B){return`"${B.replace(/"|"/g,"%22").replace(/\r\n|\r|\n/g," ")}"`}let W=(0,LY.flattenAndStringify)($);for(let B in W){if(!Object.prototype.hasOwnProperty.call(W,B))continue;let z=W[B];if(V(`--${Q}`),Object.prototype.hasOwnProperty.call(z,"data")){let L=z;V(`Content-Disposition: form-data; name=${U(B)}; filename=${U(L.name||"blob")}`),V(`Content-Type: ${L.type||"application/octet-stream"}`),V(""),V(L.data)}else V(`Content-Disposition: form-data; name=${U(B)}`),V(""),V(z)}return V(`--${Q}--`),Y};function tU(Z,$,J,Q){if($=$||{},Z!=="POST")return Q(null,(0,LY.queryStringifyRequestData)($));this._stripe._platformFunctions.tryBufferData($).then((X)=>{let Y=rU(Z,X,J);return Q(null,Y)}).catch((X)=>Q(X,null))}KY.multipartRequestDataProcessor=tU});var qY=K((DY)=>{Object.defineProperty(DY,"__esModule",{value:!0});DY.Files=void 0;var eU=wY(),TY=w(),GZ=TY.StripeResource.method;DY.Files=TY.StripeResource.extend({create:GZ({method:"POST",fullPath:"/v1/files",headers:{"Content-Type":"multipart/form-data"},host:"files.stripe.com"}),retrieve:GZ({method:"GET",fullPath:"/v1/files/{file}"}),list:GZ({method:"GET",fullPath:"/v1/files",methodType:"list"}),requestDataProcessor:eU.multipartRequestDataProcessor})});var kY=K((FY)=>{Object.defineProperty(FY,"__esModule",{value:!0});FY.InvoiceItems=void 0;var EY=w(),t0=EY.StripeResource.method;FY.InvoiceItems=EY.StripeResource.extend({create:t0({method:"POST",fullPath:"/v1/invoiceitems",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),retrieve:t0({method:"GET",fullPath:"/v1/invoiceitems/{invoiceitem}",responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),update:t0({method:"POST",fullPath:"/v1/invoiceitems/{invoiceitem}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),list:t0({method:"GET",fullPath:"/v1/invoiceitems",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}}}}),del:t0({method:"DELETE",fullPath:"/v1/invoiceitems/{invoiceitem}"})})});var PY=K((xY)=>{Object.defineProperty(xY,"__esModule",{value:!0});xY.InvoicePayments=void 0;var NY=w(),AY=NY.StripeResource.method;xY.InvoicePayments=NY.StripeResource.extend({retrieve:AY({method:"GET",fullPath:"/v1/invoice_payments/{invoice_payment}"}),list:AY({method:"GET",fullPath:"/v1/invoice_payments",methodType:"list"})})});var yY=K((RY)=>{Object.defineProperty(RY,"__esModule",{value:!0});RY.InvoiceRenderingTemplates=void 0;var SY=w(),d8=SY.StripeResource.method;RY.InvoiceRenderingTemplates=SY.StripeResource.extend({retrieve:d8({method:"GET",fullPath:"/v1/invoice_rendering_templates/{template}"}),list:d8({method:"GET",fullPath:"/v1/invoice_rendering_templates",methodType:"list"}),archive:d8({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/archive"}),unarchive:d8({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/unarchive"})})});var MY=K((bY)=>{Object.defineProperty(bY,"__esModule",{value:!0});bY.Invoices=void 0;var jY=w(),S=jY.StripeResource.method;bY.Invoices=jY.StripeResource.extend({create:S({method:"POST",fullPath:"/v1/invoices",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),retrieve:S({method:"GET",fullPath:"/v1/invoices/{invoice}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),update:S({method:"POST",fullPath:"/v1/invoices/{invoice}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),list:S({method:"GET",fullPath:"/v1/invoices",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),del:S({method:"DELETE",fullPath:"/v1/invoices/{invoice}"}),addLines:S({method:"POST",fullPath:"/v1/invoices/{invoice}/add_lines",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),attachPayment:S({method:"POST",fullPath:"/v1/invoices/{invoice}/attach_payment",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),createPreview:S({method:"POST",fullPath:"/v1/invoices/create_preview",requestSchema:{kind:"object",fields:{invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},schedule_details:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}},subscription_details:{kind:"object",fields:{items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),finalizeInvoice:S({method:"POST",fullPath:"/v1/invoices/{invoice}/finalize",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),listLineItems:S({method:"GET",fullPath:"/v1/invoices/{invoice}/lines",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),markUncollectible:S({method:"POST",fullPath:"/v1/invoices/{invoice}/mark_uncollectible",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),pay:S({method:"POST",fullPath:"/v1/invoices/{invoice}/pay",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),removeLines:S({method:"POST",fullPath:"/v1/invoices/{invoice}/remove_lines",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),search:S({method:"GET",fullPath:"/v1/invoices/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),sendInvoice:S({method:"POST",fullPath:"/v1/invoices/{invoice}/send",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),updateLines:S({method:"POST",fullPath:"/v1/invoices/{invoice}/update_lines",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),updateLineItem:S({method:"POST",fullPath:"/v1/invoices/{invoice}/lines/{line_item_id}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),voidInvoice:S({method:"POST",fullPath:"/v1/invoices/{invoice}/void",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})})});var mY=K((gY)=>{Object.defineProperty(gY,"__esModule",{value:!0});gY.Mandates=void 0;var _Y=w(),Zz=_Y.StripeResource.method;gY.Mandates=_Y.StripeResource.extend({retrieve:Zz({method:"GET",fullPath:"/v1/mandates/{mandate}"})})});var pY=K((lY)=>{Object.defineProperty(lY,"__esModule",{value:!0});lY.OAuth=void 0;var cY=w(),$z=c(),uY=cY.StripeResource.method,VZ="connect.stripe.com";lY.OAuth=cY.StripeResource.extend({basePath:"/",authorizeUrl(Z,$){Z=Z||{},$=$||{};let J="oauth/authorize";if($.express)J=`express/${J}`;if(!Z.response_type)Z.response_type="code";if(!Z.client_id)Z.client_id=this._stripe.getClientId();if(!Z.scope)Z.scope="read_write";return`https://${VZ}/${J}?${(0,$z.queryStringifyRequestData)(Z)}`},token:uY({method:"POST",path:"oauth/token",host:VZ}),deauthorize(Z,...$){if(!Z.client_id)Z.client_id=this._stripe.getClientId();return uY({method:"POST",path:"oauth/deauthorize",host:VZ}).apply(this,[Z,...$])}})});var sY=K((aY)=>{Object.defineProperty(aY,"__esModule",{value:!0});aY.PaymentAttemptRecords=void 0;var iY=w(),dY=iY.StripeResource.method;aY.PaymentAttemptRecords=iY.StripeResource.extend({retrieve:dY({method:"GET",fullPath:"/v1/payment_attempt_records/{id}"}),list:dY({method:"GET",fullPath:"/v1/payment_attempt_records",methodType:"list"})})});var ZG=K((tY)=>{Object.defineProperty(tY,"__esModule",{value:!0});tY.PaymentIntents=void 0;var rY=w(),g=rY.StripeResource.method;tY.PaymentIntents=rY.StripeResource.extend({create:g({method:"POST",fullPath:"/v1/payment_intents"}),retrieve:g({method:"GET",fullPath:"/v1/payment_intents/{intent}"}),update:g({method:"POST",fullPath:"/v1/payment_intents/{intent}"}),list:g({method:"GET",fullPath:"/v1/payment_intents",methodType:"list"}),applyCustomerBalance:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/apply_customer_balance"}),cancel:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/cancel"}),capture:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/capture"}),confirm:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/confirm"}),incrementAuthorization:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/increment_authorization"}),listAmountDetailsLineItems:g({method:"GET",fullPath:"/v1/payment_intents/{intent}/amount_details_line_items",methodType:"list"}),search:g({method:"GET",fullPath:"/v1/payment_intents/search",methodType:"search"}),verifyMicrodeposits:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/verify_microdeposits"})})});var XG=K((JG)=>{Object.defineProperty(JG,"__esModule",{value:!0});JG.PaymentLinks=void 0;var $G=w(),e0=$G.StripeResource.method;JG.PaymentLinks=$G.StripeResource.extend({create:e0({method:"POST",fullPath:"/v1/payment_links",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),retrieve:e0({method:"GET",fullPath:"/v1/payment_links/{payment_link}",responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),update:e0({method:"POST",fullPath:"/v1/payment_links/{payment_link}",responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),list:e0({method:"GET",fullPath:"/v1/payment_links",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}),listLineItems:e0({method:"GET",fullPath:"/v1/payment_links/{payment_link}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})})});var BG=K((GG)=>{Object.defineProperty(GG,"__esModule",{value:!0});GG.PaymentMethodConfigurations=void 0;var YG=w(),i8=YG.StripeResource.method;GG.PaymentMethodConfigurations=YG.StripeResource.extend({create:i8({method:"POST",fullPath:"/v1/payment_method_configurations"}),retrieve:i8({method:"GET",fullPath:"/v1/payment_method_configurations/{configuration}"}),update:i8({method:"POST",fullPath:"/v1/payment_method_configurations/{configuration}"}),list:i8({method:"GET",fullPath:"/v1/payment_method_configurations",methodType:"list"})})});var LG=K((UG)=>{Object.defineProperty(UG,"__esModule",{value:!0});UG.PaymentMethodDomains=void 0;var WG=w(),Z8=WG.StripeResource.method;UG.PaymentMethodDomains=WG.StripeResource.extend({create:Z8({method:"POST",fullPath:"/v1/payment_method_domains"}),retrieve:Z8({method:"GET",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),update:Z8({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),list:Z8({method:"GET",fullPath:"/v1/payment_method_domains",methodType:"list"}),validate:Z8({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}/validate"})})});var TG=K((HG)=>{Object.defineProperty(HG,"__esModule",{value:!0});HG.PaymentMethods=void 0;var KG=w(),k0=KG.StripeResource.method;HG.PaymentMethods=KG.StripeResource.extend({create:k0({method:"POST",fullPath:"/v1/payment_methods"}),retrieve:k0({method:"GET",fullPath:"/v1/payment_methods/{payment_method}"}),update:k0({method:"POST",fullPath:"/v1/payment_methods/{payment_method}"}),list:k0({method:"GET",fullPath:"/v1/payment_methods",methodType:"list"}),attach:k0({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/attach"}),detach:k0({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/detach"})})});var EG=K((OG)=>{Object.defineProperty(OG,"__esModule",{value:!0});OG.PaymentRecords=void 0;var DG=w(),r=DG.StripeResource.method;OG.PaymentRecords=DG.StripeResource.extend({retrieve:r({method:"GET",fullPath:"/v1/payment_records/{id}"}),reportPayment:r({method:"POST",fullPath:"/v1/payment_records/report_payment"}),reportPaymentAttempt:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt"}),reportPaymentAttemptCanceled:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_canceled"}),reportPaymentAttemptFailed:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_failed"}),reportPaymentAttemptGuaranteed:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_guaranteed"}),reportPaymentAttemptInformational:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_informational"}),reportRefund:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_refund"})})});var AG=K((CG)=>{Object.defineProperty(CG,"__esModule",{value:!0});CG.Payouts=void 0;var FG=w(),A0=FG.StripeResource.method;CG.Payouts=FG.StripeResource.extend({create:A0({method:"POST",fullPath:"/v1/payouts"}),retrieve:A0({method:"GET",fullPath:"/v1/payouts/{payout}"}),update:A0({method:"POST",fullPath:"/v1/payouts/{payout}"}),list:A0({method:"GET",fullPath:"/v1/payouts",methodType:"list"}),cancel:A0({method:"POST",fullPath:"/v1/payouts/{payout}/cancel"}),reverse:A0({method:"POST",fullPath:"/v1/payouts/{payout}/reverse"})})});var PG=K((xG)=>{Object.defineProperty(xG,"__esModule",{value:!0});xG.Plans=void 0;var NG=w(),$8=NG.StripeResource.method;xG.Plans=NG.StripeResource.extend({create:$8({method:"POST",fullPath:"/v1/plans",requestSchema:{kind:"object",fields:{amount_decimal:{kind:"decimal_string"},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),retrieve:$8({method:"GET",fullPath:"/v1/plans/{plan}",responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),update:$8({method:"POST",fullPath:"/v1/plans/{plan}",responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),list:$8({method:"GET",fullPath:"/v1/plans",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),del:$8({method:"DELETE",fullPath:"/v1/plans/{plan}"})})});var yG=K((RG)=>{Object.defineProperty(RG,"__esModule",{value:!0});RG.Prices=void 0;var SG=w(),J8=SG.StripeResource.method;RG.Prices=SG.StripeResource.extend({create:J8({method:"POST",fullPath:"/v1/prices",requestSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),retrieve:J8({method:"GET",fullPath:"/v1/prices/{price}",responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),update:J8({method:"POST",fullPath:"/v1/prices/{price}",responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),list:J8({method:"GET",fullPath:"/v1/prices",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),search:J8({method:"GET",fullPath:"/v1/prices/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}})})});var MG=K((bG)=>{Object.defineProperty(bG,"__esModule",{value:!0});bG.Products=void 0;var jG=w(),l=jG.StripeResource.method;bG.Products=jG.StripeResource.extend({create:l({method:"POST",fullPath:"/v1/products",requestSchema:{kind:"object",fields:{default_price_data:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}}}}),retrieve:l({method:"GET",fullPath:"/v1/products/{id}"}),update:l({method:"POST",fullPath:"/v1/products/{id}"}),list:l({method:"GET",fullPath:"/v1/products",methodType:"list"}),del:l({method:"DELETE",fullPath:"/v1/products/{id}"}),createFeature:l({method:"POST",fullPath:"/v1/products/{product}/features"}),deleteFeature:l({method:"DELETE",fullPath:"/v1/products/{product}/features/{id}"}),listFeatures:l({method:"GET",fullPath:"/v1/products/{product}/features",methodType:"list"}),retrieveFeature:l({method:"GET",fullPath:"/v1/products/{product}/features/{id}"}),search:l({method:"GET",fullPath:"/v1/products/search",methodType:"search"})})});var mG=K((gG)=>{Object.defineProperty(gG,"__esModule",{value:!0});gG.PromotionCodes=void 0;var _G=w(),a8=_G.StripeResource.method;gG.PromotionCodes=_G.StripeResource.extend({create:a8({method:"POST",fullPath:"/v1/promotion_codes"}),retrieve:a8({method:"GET",fullPath:"/v1/promotion_codes/{promotion_code}"}),update:a8({method:"POST",fullPath:"/v1/promotion_codes/{promotion_code}"}),list:a8({method:"GET",fullPath:"/v1/promotion_codes",methodType:"list"})})});var nG=K((cG)=>{Object.defineProperty(cG,"__esModule",{value:!0});cG.Quotes=void 0;var uG=w(),n=uG.StripeResource.method;cG.Quotes=uG.StripeResource.extend({create:n({method:"POST",fullPath:"/v1/quotes",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),retrieve:n({method:"GET",fullPath:"/v1/quotes/{quote}",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),update:n({method:"POST",fullPath:"/v1/quotes/{quote}",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),list:n({method:"GET",fullPath:"/v1/quotes",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),accept:n({method:"POST",fullPath:"/v1/quotes/{quote}/accept",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),cancel:n({method:"POST",fullPath:"/v1/quotes/{quote}/cancel",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),finalizeQuote:n({method:"POST",fullPath:"/v1/quotes/{quote}/finalize",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),listComputedUpfrontLineItems:n({method:"GET",fullPath:"/v1/quotes/{quote}/computed_upfront_line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),listLineItems:n({method:"GET",fullPath:"/v1/quotes/{quote}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),pdf:n({method:"GET",fullPath:"/v1/quotes/{quote}/pdf",host:"files.stripe.com",streaming:!0})})});var aG=K((dG)=>{Object.defineProperty(dG,"__esModule",{value:!0});dG.Refunds=void 0;var pG=w(),Q8=pG.StripeResource.method;dG.Refunds=pG.StripeResource.extend({create:Q8({method:"POST",fullPath:"/v1/refunds"}),retrieve:Q8({method:"GET",fullPath:"/v1/refunds/{refund}"}),update:Q8({method:"POST",fullPath:"/v1/refunds/{refund}"}),list:Q8({method:"GET",fullPath:"/v1/refunds",methodType:"list"}),cancel:Q8({method:"POST",fullPath:"/v1/refunds/{refund}/cancel"})})});var tG=K((sG)=>{Object.defineProperty(sG,"__esModule",{value:!0});sG.Reviews=void 0;var oG=w(),BZ=oG.StripeResource.method;sG.Reviews=oG.StripeResource.extend({retrieve:BZ({method:"GET",fullPath:"/v1/reviews/{review}"}),list:BZ({method:"GET",fullPath:"/v1/reviews",methodType:"list"}),approve:BZ({method:"POST",fullPath:"/v1/reviews/{review}/approve"})})});var JV=K((ZV)=>{Object.defineProperty(ZV,"__esModule",{value:!0});ZV.SetupAttempts=void 0;var eG=w(),Jz=eG.StripeResource.method;ZV.SetupAttempts=eG.StripeResource.extend({list:Jz({method:"GET",fullPath:"/v1/setup_attempts",methodType:"list"})})});var GV=K((XV)=>{Object.defineProperty(XV,"__esModule",{value:!0});XV.SetupIntents=void 0;var QV=w(),G0=QV.StripeResource.method;XV.SetupIntents=QV.StripeResource.extend({create:G0({method:"POST",fullPath:"/v1/setup_intents"}),retrieve:G0({method:"GET",fullPath:"/v1/setup_intents/{intent}"}),update:G0({method:"POST",fullPath:"/v1/setup_intents/{intent}"}),list:G0({method:"GET",fullPath:"/v1/setup_intents",methodType:"list"}),cancel:G0({method:"POST",fullPath:"/v1/setup_intents/{intent}/cancel"}),confirm:G0({method:"POST",fullPath:"/v1/setup_intents/{intent}/confirm"}),verifyMicrodeposits:G0({method:"POST",fullPath:"/v1/setup_intents/{intent}/verify_microdeposits"})})});var UV=K((BV)=>{Object.defineProperty(BV,"__esModule",{value:!0});BV.ShippingRates=void 0;var VV=w(),o8=VV.StripeResource.method;BV.ShippingRates=VV.StripeResource.extend({create:o8({method:"POST",fullPath:"/v1/shipping_rates"}),retrieve:o8({method:"GET",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),update:o8({method:"POST",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),list:o8({method:"GET",fullPath:"/v1/shipping_rates",methodType:"list"})})});var HV=K((LV)=>{Object.defineProperty(LV,"__esModule",{value:!0});LV.Sources=void 0;var zV=w(),X8=zV.StripeResource.method;LV.Sources=zV.StripeResource.extend({create:X8({method:"POST",fullPath:"/v1/sources"}),retrieve:X8({method:"GET",fullPath:"/v1/sources/{source}"}),update:X8({method:"POST",fullPath:"/v1/sources/{source}"}),listSourceTransactions:X8({method:"GET",fullPath:"/v1/sources/{source}/source_transactions",methodType:"list"}),verify:X8({method:"POST",fullPath:"/v1/sources/{source}/verify"})})});var OV=K((TV)=>{Object.defineProperty(TV,"__esModule",{value:!0});TV.SubscriptionItems=void 0;var wV=w(),Y8=wV.StripeResource.method;TV.SubscriptionItems=wV.StripeResource.extend({create:Y8({method:"POST",fullPath:"/v1/subscription_items",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),retrieve:Y8({method:"GET",fullPath:"/v1/subscription_items/{item}",responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),update:Y8({method:"POST",fullPath:"/v1/subscription_items/{item}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),list:Y8({method:"GET",fullPath:"/v1/subscription_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),del:Y8({method:"DELETE",fullPath:"/v1/subscription_items/{item}"})})});var CV=K((EV)=>{Object.defineProperty(EV,"__esModule",{value:!0});EV.SubscriptionSchedules=void 0;var qV=w(),N0=qV.StripeResource.method;EV.SubscriptionSchedules=qV.StripeResource.extend({create:N0({method:"POST",fullPath:"/v1/subscription_schedules",requestSchema:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}}}),retrieve:N0({method:"GET",fullPath:"/v1/subscription_schedules/{schedule}"}),update:N0({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}",requestSchema:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}}}),list:N0({method:"GET",fullPath:"/v1/subscription_schedules",methodType:"list"}),cancel:N0({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/cancel"}),release:N0({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/release"})})});var xV=K((AV)=>{Object.defineProperty(AV,"__esModule",{value:!0});AV.Subscriptions=void 0;var kV=w(),i=kV.StripeResource.method;AV.Subscriptions=kV.StripeResource.extend({create:i({method:"POST",fullPath:"/v1/subscriptions",requestSchema:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),retrieve:i({method:"GET",fullPath:"/v1/subscriptions/{subscription_exposed_id}",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),update:i({method:"POST",fullPath:"/v1/subscriptions/{subscription_exposed_id}",requestSchema:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),list:i({method:"GET",fullPath:"/v1/subscriptions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}),cancel:i({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),deleteDiscount:i({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}/discount"}),migrate:i({method:"POST",fullPath:"/v1/subscriptions/{subscription}/migrate",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),resume:i({method:"POST",fullPath:"/v1/subscriptions/{subscription}/resume",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),search:i({method:"GET",fullPath:"/v1/subscriptions/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}})})});var vV=K((SV)=>{Object.defineProperty(SV,"__esModule",{value:!0});SV.TaxCodes=void 0;var PV=w(),IV=PV.StripeResource.method;SV.TaxCodes=PV.StripeResource.extend({retrieve:IV({method:"GET",fullPath:"/v1/tax_codes/{id}"}),list:IV({method:"GET",fullPath:"/v1/tax_codes",methodType:"list"})})});var fV=K((jV)=>{Object.defineProperty(jV,"__esModule",{value:!0});jV.TaxIds=void 0;var yV=w(),s8=yV.StripeResource.method;jV.TaxIds=yV.StripeResource.extend({create:s8({method:"POST",fullPath:"/v1/tax_ids"}),retrieve:s8({method:"GET",fullPath:"/v1/tax_ids/{id}"}),list:s8({method:"GET",fullPath:"/v1/tax_ids",methodType:"list"}),del:s8({method:"DELETE",fullPath:"/v1/tax_ids/{id}"})})});var hV=K((_V)=>{Object.defineProperty(_V,"__esModule",{value:!0});_V.TaxRates=void 0;var MV=w(),r8=MV.StripeResource.method;_V.TaxRates=MV.StripeResource.extend({create:r8({method:"POST",fullPath:"/v1/tax_rates"}),retrieve:r8({method:"GET",fullPath:"/v1/tax_rates/{tax_rate}"}),update:r8({method:"POST",fullPath:"/v1/tax_rates/{tax_rate}"}),list:r8({method:"GET",fullPath:"/v1/tax_rates",methodType:"list"})})});var nV=K((cV)=>{Object.defineProperty(cV,"__esModule",{value:!0});cV.Tokens=void 0;var uV=w(),mV=uV.StripeResource.method;cV.Tokens=uV.StripeResource.extend({create:mV({method:"POST",fullPath:"/v1/tokens"}),retrieve:mV({method:"GET",fullPath:"/v1/tokens/{token}"})})});var aV=K((dV)=>{Object.defineProperty(dV,"__esModule",{value:!0});dV.Topups=void 0;var pV=w(),G8=pV.StripeResource.method;dV.Topups=pV.StripeResource.extend({create:G8({method:"POST",fullPath:"/v1/topups"}),retrieve:G8({method:"GET",fullPath:"/v1/topups/{topup}"}),update:G8({method:"POST",fullPath:"/v1/topups/{topup}"}),list:G8({method:"GET",fullPath:"/v1/topups",methodType:"list"}),cancel:G8({method:"POST",fullPath:"/v1/topups/{topup}/cancel"})})});var tV=K((sV)=>{Object.defineProperty(sV,"__esModule",{value:!0});sV.Transfers=void 0;var oV=w(),t=oV.StripeResource.method;sV.Transfers=oV.StripeResource.extend({create:t({method:"POST",fullPath:"/v1/transfers"}),retrieve:t({method:"GET",fullPath:"/v1/transfers/{transfer}"}),update:t({method:"POST",fullPath:"/v1/transfers/{transfer}"}),list:t({method:"GET",fullPath:"/v1/transfers",methodType:"list"}),createReversal:t({method:"POST",fullPath:"/v1/transfers/{id}/reversals"}),listReversals:t({method:"GET",fullPath:"/v1/transfers/{id}/reversals",methodType:"list"}),retrieveReversal:t({method:"GET",fullPath:"/v1/transfers/{transfer}/reversals/{id}"}),updateReversal:t({method:"POST",fullPath:"/v1/transfers/{transfer}/reversals/{id}"})})});var J3=K((Z3)=>{Object.defineProperty(Z3,"__esModule",{value:!0});Z3.WebhookEndpoints=void 0;var eV=w(),V8=eV.StripeResource.method;Z3.WebhookEndpoints=eV.StripeResource.extend({create:V8({method:"POST",fullPath:"/v1/webhook_endpoints"}),retrieve:V8({method:"GET",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),update:V8({method:"POST",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),list:V8({method:"GET",fullPath:"/v1/webhook_endpoints",methodType:"list"}),del:V8({method:"DELETE",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"})})});var X3=K((E)=>{Object.defineProperty(E,"__esModule",{value:!0});E.Subscriptions=E.SubscriptionSchedules=E.SubscriptionItems=E.Sources=E.ShippingRates=E.SetupIntents=E.SetupAttempts=E.Reviews=E.Refunds=E.Quotes=E.PromotionCodes=E.Products=E.Prices=E.Plans=E.Payouts=E.PaymentRecords=E.PaymentMethods=E.PaymentMethodDomains=E.PaymentMethodConfigurations=E.PaymentLinks=E.PaymentIntents=E.PaymentAttemptRecords=E.OAuth=E.Mandates=E.Invoices=E.InvoiceRenderingTemplates=E.InvoicePayments=E.InvoiceItems=E.Files=E.FileLinks=E.ExchangeRates=E.Events=E.EphemeralKeys=E.Disputes=E.Customers=E.CustomerSessions=E.CreditNotes=E.Coupons=E.CountrySpecs=E.ConfirmationTokens=E.Charges=E.BalanceTransactions=E.BalanceSettings=E.Balance=E.ApplicationFees=E.ApplePayDomains=E.Accounts=E.AccountSessions=E.AccountLinks=E.Account=void 0;E.V2=E.Treasury=E.TestHelpers=E.Terminal=E.Tax=E.Sigma=E.Reporting=E.Radar=E.Issuing=E.Identity=E.Forwarding=E.FinancialConnections=E.Entitlements=E.Climate=E.Checkout=E.BillingPortal=E.Billing=E.Apps=E.WebhookEndpoints=E.Transfers=E.Topups=E.Tokens=E.TaxRates=E.TaxIds=E.TaxCodes=void 0;var x=K1(),Qz=D1(),Xz=C1(),Yz=x1(),Gz=g1(),Vz=l1(),Bz=i1(),Wz=r1(),Uz=$4(),zz=Y4(),Lz=W4(),Kz=K4(),Hz=D4(),wz=F4(),Tz=N4(),Dz=S4(),Oz=j4(),qz=_4(),Ez=u4(),Fz=d4(),Cz=s4(),kz=Z6(),Az=X6(),Nz=B6(),xz=L6(),Iz=D6(),Pz=F6(),Sz=N6(),Rz=S6(),vz=j6(),yz=_6(),jz=u6(),bz=p6(),fz=o6(),Mz=e6(),_z=Q7(),gz=V7(),hz=z7(),mz=w7(),uz=q7(),cz=k7(),lz=I7(),nz=v7(),pz=f7(),dz=h7(),iz=l7(),az=i7(),oz=r7(),sz=$J(),rz=GJ(),tz=zJ(),ez=wJ(),ZL=qJ(),$L=kJ(),JL=PJ(),QL=yJ(),XL=_J(),YL=uJ(),GL=pJ(),VL=oJ(),BL=Z5(),WL=X5(),UL=W5(),zL=K5(),LL=D5(),KL=F5(),HL=x5(),wL=v5(),TL=M5(),DL=m5(),OL=n5(),qL=o5(),EL=ZQ(),FL=XQ(),CL=BQ(),kL=LQ(),AL=DQ(),NL=FQ(),xL=NQ(),IL=RQ(),PL=bQ(),SL=YZ();Object.defineProperty(E,"Account",{enumerable:!0,get:function(){return SL.Accounts}});var RL=uQ();Object.defineProperty(E,"AccountLinks",{enumerable:!0,get:function(){return RL.AccountLinks}});var vL=pQ();Object.defineProperty(E,"AccountSessions",{enumerable:!0,get:function(){return vL.AccountSessions}});var yL=YZ();Object.defineProperty(E,"Accounts",{enumerable:!0,get:function(){return yL.Accounts}});var jL=oQ();Object.defineProperty(E,"ApplePayDomains",{enumerable:!0,get:function(){return jL.ApplePayDomains}});var bL=eQ();Object.defineProperty(E,"ApplicationFees",{enumerable:!0,get:function(){return bL.ApplicationFees}});var fL=QX();Object.defineProperty(E,"Balance",{enumerable:!0,get:function(){return fL.Balance}});var ML=BX();Object.defineProperty(E,"BalanceSettings",{enumerable:!0,get:function(){return ML.BalanceSettings}});var _L=KX();Object.defineProperty(E,"BalanceTransactions",{enumerable:!0,get:function(){return _L.BalanceTransactions}});var gL=DX();Object.defineProperty(E,"Charges",{enumerable:!0,get:function(){return gL.Charges}});var hL=FX();Object.defineProperty(E,"ConfirmationTokens",{enumerable:!0,get:function(){return hL.ConfirmationTokens}});var mL=xX();Object.defineProperty(E,"CountrySpecs",{enumerable:!0,get:function(){return mL.CountrySpecs}});var uL=RX();Object.defineProperty(E,"Coupons",{enumerable:!0,get:function(){return uL.Coupons}});var cL=bX();Object.defineProperty(E,"CreditNotes",{enumerable:!0,get:function(){return cL.CreditNotes}});var lL=gX();Object.defineProperty(E,"CustomerSessions",{enumerable:!0,get:function(){return lL.CustomerSessions}});var nL=cX();Object.defineProperty(E,"Customers",{enumerable:!0,get:function(){return nL.Customers}});var pL=dX();Object.defineProperty(E,"Disputes",{enumerable:!0,get:function(){return pL.Disputes}});var dL=rX();Object.defineProperty(E,"EphemeralKeys",{enumerable:!0,get:function(){return dL.EphemeralKeys}});var iL=JY();Object.defineProperty(E,"Events",{enumerable:!0,get:function(){return iL.Events}});var aL=VY();Object.defineProperty(E,"ExchangeRates",{enumerable:!0,get:function(){return aL.ExchangeRates}});var oL=zY();Object.defineProperty(E,"FileLinks",{enumerable:!0,get:function(){return oL.FileLinks}});var sL=qY();Object.defineProperty(E,"Files",{enumerable:!0,get:function(){return sL.Files}});var rL=kY();Object.defineProperty(E,"InvoiceItems",{enumerable:!0,get:function(){return rL.InvoiceItems}});var tL=PY();Object.defineProperty(E,"InvoicePayments",{enumerable:!0,get:function(){return tL.InvoicePayments}});var eL=yY();Object.defineProperty(E,"InvoiceRenderingTemplates",{enumerable:!0,get:function(){return eL.InvoiceRenderingTemplates}});var ZK=MY();Object.defineProperty(E,"Invoices",{enumerable:!0,get:function(){return ZK.Invoices}});var $K=mY();Object.defineProperty(E,"Mandates",{enumerable:!0,get:function(){return $K.Mandates}});var JK=pY();Object.defineProperty(E,"OAuth",{enumerable:!0,get:function(){return JK.OAuth}});var QK=sY();Object.defineProperty(E,"PaymentAttemptRecords",{enumerable:!0,get:function(){return QK.PaymentAttemptRecords}});var XK=ZG();Object.defineProperty(E,"PaymentIntents",{enumerable:!0,get:function(){return XK.PaymentIntents}});var YK=XG();Object.defineProperty(E,"PaymentLinks",{enumerable:!0,get:function(){return YK.PaymentLinks}});var GK=BG();Object.defineProperty(E,"PaymentMethodConfigurations",{enumerable:!0,get:function(){return GK.PaymentMethodConfigurations}});var VK=LG();Object.defineProperty(E,"PaymentMethodDomains",{enumerable:!0,get:function(){return VK.PaymentMethodDomains}});var BK=TG();Object.defineProperty(E,"PaymentMethods",{enumerable:!0,get:function(){return BK.PaymentMethods}});var WK=EG();Object.defineProperty(E,"PaymentRecords",{enumerable:!0,get:function(){return WK.PaymentRecords}});var UK=AG();Object.defineProperty(E,"Payouts",{enumerable:!0,get:function(){return UK.Payouts}});var zK=PG();Object.defineProperty(E,"Plans",{enumerable:!0,get:function(){return zK.Plans}});var LK=yG();Object.defineProperty(E,"Prices",{enumerable:!0,get:function(){return LK.Prices}});var KK=MG();Object.defineProperty(E,"Products",{enumerable:!0,get:function(){return KK.Products}});var HK=mG();Object.defineProperty(E,"PromotionCodes",{enumerable:!0,get:function(){return HK.PromotionCodes}});var wK=nG();Object.defineProperty(E,"Quotes",{enumerable:!0,get:function(){return wK.Quotes}});var TK=aG();Object.defineProperty(E,"Refunds",{enumerable:!0,get:function(){return TK.Refunds}});var DK=tG();Object.defineProperty(E,"Reviews",{enumerable:!0,get:function(){return DK.Reviews}});var OK=JV();Object.defineProperty(E,"SetupAttempts",{enumerable:!0,get:function(){return OK.SetupAttempts}});var qK=GV();Object.defineProperty(E,"SetupIntents",{enumerable:!0,get:function(){return qK.SetupIntents}});var EK=UV();Object.defineProperty(E,"ShippingRates",{enumerable:!0,get:function(){return EK.ShippingRates}});var FK=HV();Object.defineProperty(E,"Sources",{enumerable:!0,get:function(){return FK.Sources}});var CK=OV();Object.defineProperty(E,"SubscriptionItems",{enumerable:!0,get:function(){return CK.SubscriptionItems}});var kK=CV();Object.defineProperty(E,"SubscriptionSchedules",{enumerable:!0,get:function(){return kK.SubscriptionSchedules}});var AK=xV();Object.defineProperty(E,"Subscriptions",{enumerable:!0,get:function(){return AK.Subscriptions}});var NK=vV();Object.defineProperty(E,"TaxCodes",{enumerable:!0,get:function(){return NK.TaxCodes}});var xK=fV();Object.defineProperty(E,"TaxIds",{enumerable:!0,get:function(){return xK.TaxIds}});var IK=hV();Object.defineProperty(E,"TaxRates",{enumerable:!0,get:function(){return IK.TaxRates}});var PK=nV();Object.defineProperty(E,"Tokens",{enumerable:!0,get:function(){return PK.Tokens}});var SK=aV();Object.defineProperty(E,"Topups",{enumerable:!0,get:function(){return SK.Topups}});var RK=tV();Object.defineProperty(E,"Transfers",{enumerable:!0,get:function(){return RK.Transfers}});var vK=J3();Object.defineProperty(E,"WebhookEndpoints",{enumerable:!0,get:function(){return vK.WebhookEndpoints}});E.Apps=(0,x.resourceNamespace)("apps",{Secrets:zL.Secrets});E.Billing=(0,x.resourceNamespace)("billing",{Alerts:Bz.Alerts,CreditBalanceSummary:Ez.CreditBalanceSummary,CreditBalanceTransactions:Fz.CreditBalanceTransactions,CreditGrants:Cz.CreditGrants,MeterEventAdjustments:fz.MeterEventAdjustments,MeterEvents:hz.MeterEvents,Meters:uz.Meters});E.BillingPortal=(0,x.resourceNamespace)("billingPortal",{Configurations:Tz.Configurations,Sessions:LL.Sessions});E.Checkout=(0,x.resourceNamespace)("checkout",{Sessions:KL.Sessions});E.Climate=(0,x.resourceNamespace)("climate",{Orders:lz.Orders,Products:tz.Products,Suppliers:TL.Suppliers});E.Entitlements=(0,x.resourceNamespace)("entitlements",{ActiveEntitlements:Vz.ActiveEntitlements,Features:Rz.Features});E.FinancialConnections=(0,x.resourceNamespace)("financialConnections",{Accounts:Yz.Accounts,Sessions:HL.Sessions,Transactions:EL.Transactions});E.Forwarding=(0,x.resourceNamespace)("forwarding",{Requests:WL.Requests});E.Identity=(0,x.resourceNamespace)("identity",{VerificationReports:IL.VerificationReports,VerificationSessions:PL.VerificationSessions});E.Issuing=(0,x.resourceNamespace)("issuing",{Authorizations:Uz.Authorizations,Cardholders:Kz.Cardholders,Cards:Hz.Cards,Disputes:xz.Disputes,PersonalizationDesigns:oz.PersonalizationDesigns,PhysicalBundles:rz.PhysicalBundles,Tokens:OL.Tokens,Transactions:FL.Transactions});E.Radar=(0,x.resourceNamespace)("radar",{EarlyFraudWarnings:Iz.EarlyFraudWarnings,PaymentEvaluations:az.PaymentEvaluations,ValueListItems:NL.ValueListItems,ValueLists:xL.ValueLists});E.Reporting=(0,x.resourceNamespace)("reporting",{ReportRuns:VL.ReportRuns,ReportTypes:BL.ReportTypes});E.Sigma=(0,x.resourceNamespace)("sigma",{ScheduledQueryRuns:UL.ScheduledQueryRuns});E.Tax=(0,x.resourceNamespace)("tax",{Associations:Wz.Associations,Calculations:Lz.Calculations,Registrations:GL.Registrations,Settings:wL.Settings,Transactions:CL.Transactions});E.Terminal=(0,x.resourceNamespace)("terminal",{Configurations:Dz.Configurations,ConnectionTokens:qz.ConnectionTokens,Locations:bz.Locations,OnboardingLinks:cz.OnboardingLinks,Readers:ez.Readers});E.TestHelpers=(0,x.resourceNamespace)("testHelpers",{ConfirmationTokens:Oz.ConfirmationTokens,Customers:Az.Customers,Refunds:YL.Refunds,TestClocks:DL.TestClocks,Issuing:(0,x.resourceNamespace)("issuing",{Authorizations:zz.Authorizations,Cards:wz.Cards,PersonalizationDesigns:sz.PersonalizationDesigns,Transactions:kL.Transactions}),Terminal:(0,x.resourceNamespace)("terminal",{Readers:ZL.Readers}),Treasury:(0,x.resourceNamespace)("treasury",{InboundTransfers:yz.InboundTransfers,OutboundPayments:nz.OutboundPayments,OutboundTransfers:dz.OutboundTransfers,ReceivedCredits:$L.ReceivedCredits,ReceivedDebits:QL.ReceivedDebits})});E.Treasury=(0,x.resourceNamespace)("treasury",{CreditReversals:kz.CreditReversals,DebitReversals:Nz.DebitReversals,FinancialAccounts:vz.FinancialAccounts,InboundTransfers:jz.InboundTransfers,OutboundPayments:pz.OutboundPayments,OutboundTransfers:iz.OutboundTransfers,ReceivedCredits:JL.ReceivedCredits,ReceivedDebits:XL.ReceivedDebits,TransactionEntries:qL.TransactionEntries,Transactions:AL.Transactions});E.V2=(0,x.resourceNamespace)("v2",{Billing:(0,x.resourceNamespace)("billing",{MeterEventAdjustments:Mz.MeterEventAdjustments,MeterEventSession:_z.MeterEventSession,MeterEventStream:gz.MeterEventStream,MeterEvents:mz.MeterEvents}),Core:(0,x.resourceNamespace)("core",{AccountLinks:Qz.AccountLinks,AccountTokens:Xz.AccountTokens,Accounts:Gz.Accounts,EventDestinations:Pz.EventDestinations,Events:Sz.Events})})});var E3=K((O3)=>{Object.defineProperty(O3,"__esModule",{value:!0});O3.createStripe=void 0;var Y3=M0(),sK=_$(),T3=w(),G3=X1(),rK=V1(),D3=U1(),tK=j0(),eK=I8(),V3=b0(),t8=X3(),V0=c(),B3="api.stripe.com",W3="443",U3="/v1/",z3=D3.ApiVersion,L3=80000,K3=5,H3=0.5,ZH=["name","version","url","partner_id"],w3=["authenticator","apiVersion","typescript","maxNetworkRetries","httpAgent","httpClient","timeout","host","port","protocol","telemetry","appInfo","stripeAccount","stripeContext"],$H=(Z)=>new sK.RequestSender(Z,T3.StripeResource.MAX_BUFFERED_REQUEST_METRICS);function JH(Z,$=$H){Q.PACKAGE_VERSION="21.0.1",Q.API_VERSION=D3.ApiVersion;let J=typeof process<"u"&&process.env?(0,V0.detectAIAgent)(process.env):"";Q.AI_AGENT=J,Q.USER_AGENT={bindings_version:Q.PACKAGE_VERSION,lang:"node",typescript:!1,...(0,V0.determineProcessUserAgentProperties)(),...J?{ai_agent:J}:{}},Q.StripeResource=T3.StripeResource,Q.StripeContext=G3.StripeContext,Q.resources=t8,Q.HttpClient=V3.HttpClient,Q.HttpClientResponse=V3.HttpClientResponse,Q.CryptoProvider=tK.CryptoProvider,Q.webhooks=(0,rK.createWebhooks)(Z),Q.Decimal=eK.Decimal;function Q(X,Y={}){if(!(this instanceof Q))return new Q(X,Y);let G=this._getPropsFromConfig(Y);this._platformFunctions=Z,Object.defineProperty(this,"_emitter",{value:this._platformFunctions.createEmitter(),enumerable:!1,configurable:!1,writable:!1}),this.VERSION=Q.PACKAGE_VERSION,this.on=this._emitter.on.bind(this._emitter),this.once=this._emitter.once.bind(this._emitter),this.off=this._emitter.removeListener.bind(this._emitter);let V=G.httpAgent||null;this._api={host:G.host||B3,port:G.port||W3,protocol:G.protocol||"https",basePath:U3,version:G.apiVersion||z3,timeout:(0,V0.validateInteger)("timeout",G.timeout,L3),maxNetworkRetries:(0,V0.validateInteger)("maxNetworkRetries",G.maxNetworkRetries,2),agent:V,httpClient:G.httpClient||(V?this._platformFunctions.createNodeHttpClient(V):this._platformFunctions.createDefaultHttpClient()),dev:!1,stripeAccount:G.stripeAccount||null,stripeContext:G.stripeContext||null};let U=G.typescript||!1;if(U!==Q.USER_AGENT.typescript)Q.USER_AGENT.typescript=U;if(G.appInfo)this._setAppInfo(G.appInfo);this._prepResources(),this._setAuthenticator(X,G.authenticator),this.errors=Y3,this.webhooks=Q.webhooks,this._prevRequestMetrics=[],this._enableTelemetry=G.telemetry!==!1,this._requestSender=$(this),this.StripeResource=Q.StripeResource,this.Decimal=Q.Decimal}return Q.errors=Y3,Q.createNodeHttpClient=Z.createNodeHttpClient,Q.createFetchHttpClient=Z.createFetchHttpClient,Q.createNodeCryptoProvider=Z.createNodeCryptoProvider,Q.createSubtleCryptoProvider=Z.createSubtleCryptoProvider,Q.prototype={_appInfo:void 0,on:null,off:null,once:null,VERSION:null,StripeResource:null,webhooks:null,errors:null,_api:null,_prevRequestMetrics:null,_emitter:null,_enableTelemetry:null,_requestSender:null,_platformFunctions:null,rawRequest(X,Y,G,V){return this._requestSender._rawRequest(X,Y,G,V)},_setAuthenticator(X,Y){if(X&&Y)throw Error("Can't specify both apiKey and authenticator");if(!X&&!Y)throw Error("Neither apiKey nor config.authenticator provided");this._authenticator=X?(0,V0.createApiKeyAuthenticator)(X):Y},_setAppInfo(X){if(X&&typeof X!=="object")throw Error("AppInfo must be an object.");if(X&&!X.name)throw Error("AppInfo.name is required");X=X||{},this._appInfo=ZH.reduce((Y,G)=>{if(typeof X[G]=="string")Y=Y||{},Y[G]=X[G];return Y},{})},_setApiField(X,Y){this._api[X]=Y},getApiField(X){return this._api[X]},setClientId(X){this._clientId=X},getClientId(){return this._clientId},getConstant:(X)=>{switch(X){case"DEFAULT_HOST":return B3;case"DEFAULT_PORT":return W3;case"DEFAULT_BASE_PATH":return U3;case"DEFAULT_API_VERSION":return z3;case"DEFAULT_TIMEOUT":return L3;case"MAX_NETWORK_RETRY_DELAY_SEC":return K3;case"INITIAL_NETWORK_RETRY_DELAY_SEC":return H3}return Q[X]},getMaxNetworkRetries(){return this.getApiField("maxNetworkRetries")},_setApiNumberField(X,Y,G){let V=(0,V0.validateInteger)(X,Y,G);this._setApiField(X,V)},getMaxNetworkRetryDelay(){return K3},getInitialNetworkRetryDelay(){return H3},getClientUserAgent(X){return this.getClientUserAgentSeeded(Q.USER_AGENT,X)},getClientUserAgentSeeded(X,Y){let G={};for(let W in X){if(!Object.prototype.hasOwnProperty.call(X,W))continue;G[W]=encodeURIComponent(X[W]??"null")}let V=this._platformFunctions.getPlatformInfo();if(V&&this.getTelemetryEnabled())G.platform=encodeURIComponent(V);else delete G.platform;let U=this.getApiField("httpClient");if(U)G.httplib=encodeURIComponent(U.getClientName());if(this._appInfo)G.application=this._appInfo;Y(JSON.stringify(G))},getAppInfoAsString(){if(!this._appInfo)return"";let X=this._appInfo.name;if(this._appInfo.version)X+=`/${this._appInfo.version}`;if(this._appInfo.url)X+=` (${this._appInfo.url})`;return X},getTelemetryEnabled(){return this._enableTelemetry},_prepResources(){for(let X in t8){if(!Object.prototype.hasOwnProperty.call(t8,X))continue;this[(0,V0.pascalToCamelCase)(X)]=new t8[X](this)}},_getPropsFromConfig(X){if(!X)return{};let Y=typeof X==="string";if(!(X===Object(X)&&!Array.isArray(X))&&!Y)throw Error("Config must either be an object or a string");if(Y)return{apiVersion:X};if(Object.keys(X).filter((U)=>!w3.includes(U)).length>0)throw Error(`Config object may only contain the following: ${w3.join(", ")}`);return X},parseEventNotification(X,Y,G,V,U,W){this.webhooks.signature.verifyHeader(X,Y,G,V||this.webhooks.DEFAULT_TOLERANCE,U,W);let B=X instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(X)):JSON.parse(X);if(B&&B.object==="event")throw Error("You passed a webhook payload to stripe.parseEventNotification, which expects an event notification. Use stripe.webhooks.constructEvent instead.");if(B.context)B.context=G3.StripeContext.parse(B.context);return B.fetchEvent=()=>{return this._requestSender._rawRequest("GET",`/v2/core/events/${B.id}`,void 0,{stripeContext:B.context,headers:{"Stripe-Request-Trigger":`event=${B.id}`}},["fetch_event"])},B.fetchRelatedObject=()=>{if(!B.related_object)return Promise.resolve(null);return this._requestSender._rawRequest("GET",B.related_object.url,void 0,{stripeContext:B.context,headers:{"Stripe-Request-Trigger":`event=${B.id}`}},["fetch_related_object"])},B}},Q}O3.createStripe=JH});var C3=K((F3,B8)=>{Object.defineProperty(F3,"__esModule",{value:!0});var QH=j$(),XH=E3(),YH=I8(),WZ=(0,XH.createStripe)(new QH.NodePlatformFunctions);B8.exports=WZ;B8.exports.Stripe=WZ;B8.exports.default=WZ;B8.exports.Decimal=YH.Decimal});import"@stacksjs/validation";import{log as Q9}from"@stacksjs/cli";import{db as wZ}from"@stacksjs/database";async function $B(Z,$={}){let{olderThanDays:J=30,column:Q="created_at",query:X}=$;try{if(X){let W=wZ.deleteFrom(Z);W=X(W);let B=await W.execute(),z=Array.isArray(B)?B:[B],L=Number(z[0]?.numDeletedRows??z.length??0);return Q9.info(`Pruned ${L} records from ${Z}`),L}let Y=new Date;Y.setDate(Y.getDate()-J);let G=await wZ.deleteFrom(Z).where(Q,"<",Y.toISOString()).execute(),V=Array.isArray(G)?G:[G],U=Number(V[0]?.numDeletedRows??V.length??0);return Q9.info(`Pruned ${U} records from ${Z} older than ${J} days`),U}catch(Y){throw Q9.error(`Failed to prune ${Z}:`,Y),Y}}async function ZT(Z,$={}){return $B(Z,$)}function $T(Z){if(!Z?.prunable)return null;if(typeof Z.prunable==="boolean")return{olderThanDays:30,column:"created_at"};return Z.prunable}import{createCipheriv as JB,createDecipheriv as QB,createHash as XB,randomBytes as YB}from"crypto";import{log as H8}from"@stacksjs/logging";var TZ="enc:",DZ="aes-256-gcm",GB=12,K8=null;async function OZ(){if(K8)return K8;let Z=process.env.APP_KEY;if(!Z)try{Z=(await import("@stacksjs/config").catch(()=>null))?.config?.app?.key}catch{}if(!Z)return null;return K8=XB("sha256").update(Z).digest(),K8}function S0(Z){return typeof Z==="string"&&Z.startsWith(TZ)}async function X9(Z){if(Z==null)return Z;if(S0(Z))return Z;if(typeof Z!=="string")return Z;let $=await OZ();if(!$)return H8.warn("[orm] encrypted attribute: APP_KEY not set \u2014 storing value in plaintext"),Z;let J=YB(GB),Q=JB(DZ,$,J),X=Buffer.concat([Q.update(Z,"utf8"),Q.final()]),Y=Q.getAuthTag();return`${TZ}${J.toString("base64")}:${Y.toString("base64")}:${X.toString("base64")}`}async function Y9(Z){if(Z==null)return Z;if(typeof Z!=="string")return Z;if(!S0(Z))return Z;try{let $=await OZ();if(!$)return H8.warn("[orm] encrypted attribute: APP_KEY not set \u2014 cannot decrypt"),null;let[,J,Q,X]=Z.split(":");if(!J||!Q||!X)return H8.warn("[orm] encrypted attribute: malformed envelope, returning null"),null;let Y=Buffer.from(J,"base64"),G=Buffer.from(Q,"base64"),V=Buffer.from(X,"base64"),U=QB(DZ,$,Y);return U.setAuthTag(G),Buffer.concat([U.update(V),U.final()]).toString("utf8")}catch($){return H8.warn("[orm] encrypted attribute: decrypt failed (key rotation? corrupted ciphertext?)",{error:$}),null}}function G9(Z){let $=Z.attributes;if(!$||typeof $!=="object")return[];let J=[];for(let[Q,X]of Object.entries($))if(X&&typeof X==="object"&&X.encrypted===!0)J.push(Q);return J}import{log as v0}from"@stacksjs/logging";var VB=[/^password$/i,/^password_hash$/i,/^api_key$/i,/_token$/i,/_secret$/i,/^remember_token$/i],EZ="model_audits",W9=null;function BB(Z){W9=Z}async function V9(){if(W9!=null)return W9;try{let Z=await import("@stacksjs/router").catch(()=>null);if(!Z)return null;let $=Z.getCurrentRequest;if(typeof $!=="function")return null;let J=$();if(!J)return null;return(J.user??J._user)?.id??null}catch{return null}}function w8(Z){if(!Z||typeof Z!=="object")return null;let $={};for(let[J,Q]of Object.entries(Z)){if(VB.some((X)=>X.test(J)))continue;$[J]=Q}return $}function R0(Z){if(!Z||typeof Z!=="object")return null;let $=Z;if($._attributes&&typeof $._attributes==="object")return{...$._attributes};return{...Z}}function WB(Z,$){if(!Z||!$)return{old:Z,next:$};let J={},Q={},X=new Set([...Object.keys(Z),...Object.keys($)]);for(let Y of X)if(Z[Y]!==$[Y])J[Y]=Z[Y],Q[Y]=$[Y];return{old:J,next:Q}}async function B9(Z,$=!1){try{let{db:J}=await import("@stacksjs/database");await J.insertInto(EZ).values({auditable_type:Z.auditable_type,auditable_id:Z.auditable_id,event:Z.event,old_values:Z.old_values?JSON.stringify(Z.old_values):null,new_values:Z.new_values?JSON.stringify(Z.new_values):null,user_id:Z.user_id,created_at:new Date().toISOString()}).executeTakeFirst()}catch(J){if(v0.warn(`[orm] audit row write failed for ${Z.auditable_type}#${String(Z.auditable_id)} (${Z.event})`,{error:J}),$)throw J}}function FZ(Z){return{async audits($){try{let{db:J}=await import("@stacksjs/database");return(await J.selectFrom(EZ).selectAll().where("auditable_type","=",Z).where("auditable_id","=",$).orderBy("created_at","desc").execute()??[]).map((X)=>({...X,old_values:typeof X.old_values==="string"?qZ(X.old_values):X.old_values,new_values:typeof X.new_values==="string"?qZ(X.new_values):X.new_values}))}catch(J){return v0.warn(`[orm] audits() lookup failed for ${Z}#${String($)}`,{error:J}),[]}}}}function qZ(Z){try{return JSON.parse(Z)}catch{return Z}}function CZ(Z){if(Z&&typeof Z==="object"&&"transactional"in Z)return{transactional:Z.transactional===!0};return{transactional:!1}}function kZ(Z,$,J="id",Q={}){let X=Q.transactional===!0,Y=Z;if(typeof Z.audits!=="function")Z.audits=FZ($).audits;let G=async(B)=>{if(!X)return await B();let{db:z}=await import("@stacksjs/database");return await z.transaction(async()=>B())},V=Z.create;if(typeof V==="function")Z.create=async function(...B){return await G(async()=>{let z=await V.apply(this,B);try{let L=R0(z),H=L?.[J];if(H!=null){let T=await V9();await B9({auditable_type:$,auditable_id:H,event:"created",old_values:null,new_values:w8(L),user_id:T},X)}}catch(L){if(v0.warn(`[orm] audit(create) failed for ${$}`,{error:L}),X)throw L}return z})};let U=Z.update;if(typeof U==="function")Z.update=async function(B,z){return await G(async()=>{let L=Y.find,H=typeof L==="function"?R0(await L.call(Y,B)):null,T=await U.call(this,B,z);try{let D=R0(T)??(typeof L==="function"?R0(await L.call(Y,B)):null),{old:q,next:O}=WB(H,D);if(O&&Object.keys(O).length>0){let k=await V9();await B9({auditable_type:$,auditable_id:B,event:"updated",old_values:w8(q),new_values:w8(O),user_id:k},X)}}catch(D){if(v0.warn(`[orm] audit(update) failed for ${$}#${String(B)}`,{error:D}),X)throw D}return T})};let W=(B)=>{let z=Z[B];if(typeof z!=="function")return;Z[B]=async function(L){return await G(async()=>{let H=Y.find,T=typeof H==="function"?R0(await H.call(Y,L)):null,D=await z.call(this,L);try{if(D!==!1&&T){let q=await V9();await B9({auditable_type:$,auditable_id:L,event:"deleted",old_values:w8(T),new_values:null,user_id:q},X)}}catch(q){if(v0.warn(`[orm] audit(${B}) failed for ${$}#${String(L)}`,{error:q}),X)throw q}return D})}};W("delete"),W("softDelete")}function AZ(Z){let $=Z;return $?.code==="SQLITE_CONSTRAINT_UNIQUE"||$?.code==="SQLITE_CONSTRAINT"||$?.code==="23505"||$?.errno===1062||/unique|duplicate/i.test($?.message??"")}function UB(Z,$,J){let Q=Z;if(Z instanceof Error&&typeof Q.status==="number"&&Number.isInteger(Q.status)&&Q.status>=400&&Q.status<600){let X={error:Z.message};if(Q.details!==void 0)X.details=Q.details;return{status:Q.status,body:X}}if(AZ(Z))return{status:409,body:{error:`${$} already exists`}};return{status:500,body:{error:`Failed to ${J} ${$}`,detail:String(Z)}}}import{cacheRequestQuery as zB}from"@stacksjs/router";var T8=new WeakMap;function UT(Z,$){return zB(`batchLoad:${Z.name??"model"}:${String($)}`,async()=>{return new Promise((J,Q)=>{let X=T8.get(Z);if(!X)X={keys:[],resolvers:[],scheduled:!1},T8.set(Z,X);if(X.keys.push($),X.resolvers.push({key:$,resolve:J,reject:Q}),X.scheduled)return;X.scheduled=!0,Promise.resolve().then(async()=>{let Y=T8.get(Z);if(!Y)return;T8.delete(Z);let G=Array.from(new Set(Y.keys));try{let V=typeof Z.findMany==="function"?await Z.findMany(G):await Promise.all(G.map((W)=>Z.find?.(W))),U=new Map;for(let W of V??[]){let B=W?.id;if(B!==void 0)U.set(B,W)}for(let W of Y.resolvers)W.resolve(U.get(W.key))}catch(V){for(let U of Y.resolvers)U.reject(V)}})})})}import{db as HT}from"@stacksjs/database";class LB{conditions=[];where(Z,...$){let[J,Q]=$,X=Q===void 0?"=":J,Y=Q===void 0?J:Q;this.addCondition("and","where",Z,X,Y)}orWhere(Z,...$){let[J,Q]=$,X=Q===void 0?"=":J,Y=Q===void 0?J:Q;this.addCondition("or","where",Z,X,Y)}whereIn(Z,$){this.conditions.push({type:"and",method:"whereIn",column:Z,values:$})}whereNotIn(Z,$){this.conditions.push({type:"and",method:"whereIn",column:Z,values:$,operator:"not in"})}whereNull(Z){this.conditions.push({type:"and",method:"whereNull",column:Z})}whereNotNull(Z){this.conditions.push({type:"and",method:"whereNotNull",column:Z})}whereBetween(Z,$){this.conditions.push({type:"and",method:"whereBetween",column:Z,range:$})}whereExists(Z){this.conditions.push({type:"and",method:"whereExists",column:"",callback:Z})}addCondition(Z,$,J,Q,X){this.conditions.push({type:Z,method:$,column:J,operator:Q,value:X})}getConditions(){return this.conditions}}import{db as D8,runInTransactionScope as KB}from"@stacksjs/database";async function DT(Z,$){return await KB(async()=>{return await D8.transaction(Z,$)})}function OT(Z){return D8.transaction(async()=>{await Z()})}async function qT(Z){return await D8.savepoint(Z)}function ET(Z,$){return D8.transactional(Z,$)}import{path as p}from"@stacksjs/path";import{fs as L0,globSync as K9}from"@stacksjs/storage";import{plural as SZ,singular as NZ,snakeCase as j}from"@stacksjs/strings";import{isString as O8}from"@stacksjs/validation";async function xT(Z){if(typeof Z==="string")Z=(await import(Z)).default;return Z.table??j(SZ(Z?.name||""))}function y0(Z,$){if(Z.name)return Z.name;return p.basename($).replace(/\.ts$/,"")}function u(Z,$){if(Z.table)return Z.table;return j(SZ(y0(Z,$)))}function HB(Z,$){let J=[Z,$];return J.sort(),J.join("_")}function IT(Z,$){return $ in Z}async function wB(Z,$){let J=[];if(Z.hasOne)for(let Q of Z.hasOne)J.push(await U9(Q,Z,$,"hasOne"));if(Z.hasMany)for(let Q of Z.hasMany)J.push(await U9(Q,Z,$,"hasMany"));if(Z.belongsTo)for(let Q of Z.belongsTo)J.push(await U9(Q,Z,$,"belongsTo"));if(Z.hasOneThrough)for(let Q of Z.hasOneThrough)J.push(await IZ(Q,Z,$,"hasOneThrough"));if(Z.hasManyThrough)for(let Q of Z.hasManyThrough)J.push(await IZ(Q,Z,$,"hasManyThrough"));if(Z.belongsToMany)for(let Q of Z.belongsToMany)J.push(await DB(Q,Z,$,"belongsToMany"));if(Z.morphOne)J.push(await PZ(Z.morphOne,Z,$,"morphOne"));if(Z.morphMany){let Q=Array.isArray(Z.morphMany)?Z.morphMany:[Z.morphMany];for(let X of Q)J.push(await PZ(X,Z,$,"morphMany"))}if(Z.morphTo){let Q=Z.morphTo,X=Array.isArray(Q)?Q:typeof Q==="object"&&Q!==null?[Q]:[];for(let Y of X)J.push(TB(Y,Z,$))}if(Z.morphToMany){let Q=Array.isArray(Z.morphToMany)?Z.morphToMany:[Z.morphToMany];for(let X of Q)J.push(xZ(X,Z,$,"morphToMany"))}if(Z.morphedByMany){let Q=Array.isArray(Z.morphedByMany)?Z.morphedByMany:[Z.morphedByMany];for(let X of Q)J.push(xZ(X,Z,$,"morphedByMany"))}return J}function TB(Z,$,J){let Q=Z&&typeof Z==="object"&&Z.name?String(Z.name):`${j(J)}able`,X=Z?.type||`${Q}_type`;return{relationship:"morphTo",model:"",table:"",relationTable:"",foreignKey:Z?.id||`${Q}_id`,modelKey:X,relationName:Q,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:"",pivotKey:"",pivotTable:""}}function xZ(Z,$,J,Q){let X=typeof Z==="object"&&Z!==null,Y=X?String(Z.model||""):String(Z),G=X&&Z.morphName?String(Z.morphName):`${j(J)}able`,V=X&&Z.pivotTable?String(Z.pivotTable):G,U=X&&Z.id||`${G}_id`,W=X&&Z.type||`${G}_type`;return{relationship:Q,model:Y,table:"",relationTable:"",foreignKey:U,modelKey:W,relationName:G,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:U,pivotKey:W,pivotTable:V}}async function q8(Z,$){let J=L9(`${$}.ts`),Q=L9(`${Z}.ts`),X=z9(`${Z}.ts`),Y=z9(`${$}.ts`);if(!J&&!Y)throw Error(`Model not found: ${$}`);if(!Q&&!X)throw Error(`Model not found: ${Z}`);let G;try{if(L0.existsSync(J))G=(await import(J)).default;else G=(await import(Y)).default}catch(U){throw Error(`Failed to load model: ${$}. Error: ${U?.message||"Unknown error"}`)}let V=L0.existsSync(Q)?Q:X;return{modelRelation:G,modelPath:V,modelRelationPath:L0.existsSync(J)?J:Y}}async function IZ(Z,$,J,Q){let X="",Y="",G="",V="";if(O8(Z))X=Z;else X=Z.model,Y=Z.relationName||"",G=Z.through,V=Z.throughForeignKey||"";let{modelRelation:U,modelPath:W,modelRelationPath:B}=await q8(J,X),z=u(U,B),L=u($,W),H=j(y0(U,B)),T=j(J);return{relationship:Q,model:X,table:z,relationTable:L,foreignKey:`${T}_id`,modelKey:`${H}_id`,relationName:Y,relationModel:J,throughModel:G,throughForeignKey:V,pivotForeign:`${T}_id`,pivotKey:`${H}_id`,pivotTable:L}}async function DB(Z,$,J,Q){let X="",Y="",G="",V=j(J);if(O8(Z))X=Z;else X=Z.model,Y=Z.pivotTable||"",G=Z.firstForeignKey||`${V}_id`;let{modelRelation:U,modelPath:W,modelRelationPath:B}=await q8(J,X),z=u(U,B),L=u($,W),H=j(y0(U,B));return{relationship:Q,model:X,table:z,relationTable:L,foreignKey:typeof Z==="string"?`${V}_id`:Z.firstForeignKey||`${V}_id`,modelKey:typeof Z==="string"?`${H}_id`:Z.secondForeignKey||`${H}_id`,relationName:"",relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:G,pivotKey:`${H}_id`,pivotTable:Y}}async function PZ(Z,$,J,Q){let X="",Y="",G="",V="";if(O8(Z))X=Z,Y=`${j(J)}able`;else X=Z.model,Y=Z.morphName||`${j(J)}able`,G=Z.type||`${Y}_type`,V=Z.id||`${Y}_id`;let{modelRelation:U,modelPath:W,modelRelationPath:B}=await q8(J,X),z=u(U,B),L=u($,W);return{relationship:Q,model:X,table:z,relationTable:L,foreignKey:V||`${Y}_id`,modelKey:G||`${Y}_type`,relationName:Y,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:"",pivotKey:"",pivotTable:L}}async function U9(Z,$,J,Q){let X="",Y="";if(O8(Z))X=Z;else X=Z.model,Y=Z.relationName||"";let{modelRelation:G,modelPath:V,modelRelationPath:U}=await q8(J,X),W=u(G,U),B=u($,V),z=j(y0(G,U)),L=j(J),H={relationship:Q,model:X,table:W,relationTable:B,foreignKey:typeof Z==="string"?`${L}_id`:Z.foreignKey||`${L}_id`,modelKey:`${z}_id`,relationName:Y,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:`${L}_id`,pivotKey:`${z}_id`,pivotTable:B};if(Q==="belongsTo")H.foreignKey="";return H}function PT(Z){let $=/belongs/,J=/has/,Q=/Through/,X=/morph/;if(Q.test(Z))return"throughType";if($.test(Z))return"belongsType";if(J.test(Z))return"hasType";if(X.test(Z))return"morphType";return""}function ST(Z){let $=/One/;if(/Many/.test(Z))return"many";if($.test(Z))return"one";return""}async function RT(Z,$){let J=[];if("belongsToMany"in Z){let Q=Z.belongsToMany||[];for(let X of Q){let Y,G;if(typeof X==="string")G=X;else G=X.model;let V=L9(`${G}.ts`),U=z9(`${G}.ts`);if(L0.existsSync(V))Y=(await import(V)).default;else Y=(await import(U)).default;let W=u(Y,V),B=u(Z,$),z=typeof X==="object"&&"firstForeignKey"in X?X.firstForeignKey:`${NZ(B)}_${Z.primaryKey}`,L=typeof X==="object"&&"secondForeignKey"in X?X.secondForeignKey:`${NZ(W)}_${Z.primaryKey}`;J.push({table:(typeof X==="object"&&"pivotTable"in X?X.pivotTable:void 0)??HB(B,W),firstForeignKey:z,secondForeignKey:L})}return J}return[]}async function vT(Z){let $=K9([p.userModelsPath("*.ts"),p.storagePath("framework/defaults/app/Models/**/*.ts")],{absolute:!0}),J=[];for(let Q=0;Q<$.length;Q++){let X=$[Q],Y=await import(X);if(Z===Y.default.name)continue;let G=y0(Y,X),V=await wB(Y.default,G);if(!V.length)continue;let U=V.find((W)=>W.model===Z);if(U)J.push(U)}return J}function yT(Z){if(Z===void 0)return[];return Object.keys(Z).filter(($)=>{return Z[$]?.hidden===!0})}function jT(Z){let $=Z.attributes;if($===void 0)return[];return Object.keys($).filter((J)=>{return $[J]?.guarded===!0}).map((J)=>j(J))}function bT(Z,$){let J=Z.attributes,Q=[];if(J===void 0)return[];let X=typeof Z.traits?.billable==="object"||typeof Z.traits?.billable==="boolean",Y=typeof Z.traits?.useAuth==="object"?Z.traits?.useAuth.usePasskey:!1,G=Z.traits?.useUuid||!1;if(X)Q.push("stripe_id");if(G)Q.push("uuid");if(Y)Q.push(...["two_factor_secret","public_key"]);let V=$.map((U)=>U.foreignKey).filter((U)=>U);return[...Object.keys(J).filter((U)=>{if(J===void 0)return!1;return J[U]?.fillable===!0}).map((U)=>j(U)),...Q,...V]}async function fT(Z,$){let J=Z.attributes;if(!J)J={};let Q=Object.keys(J),X=[],Y=Bun.file($),G="";try{if(await Y.exists())G=await Y.text()}catch{G=""}let V=/rule:.*$/gm,U;U=V.exec(G);while(U!==null)X.push(U[0]),U=V.exec(G);return Q.map((B,z)=>{let L=J[B],H=null,T=!1,D=!1,q=!1,O=!1;if(L)H=L||null,T=L.unique||!1,D=L.hidden||!1,q=L.fillable||!1;let k=X[z]??"";return O=(L.validation?.rule).isRequired??!1,{field:B,default:H,unique:T,hidden:D,fillable:q,required:O,fieldArray:OB(k)}})}function OB(Z){let $=Z.split("rule: schema.");if($.length!==2)return null;if(!$[1])$[1]="";let J=$[1].replace(/,/g,"");if(!J)return null;let Q=J.split("."),X=/\(([^)]+)\)/;return Q.map((Y)=>{let G=X.exec(Y),V=G?G[1]:null;return{entity:Y.replace(X,"").replace(/\(|\)/g,""),charValue:V}})[0]||null}function MT(Z){let $=Z.fieldArray?.entity;switch($){case"enum":return"string | string[]";case"date":return"Date | string";case"timestamp":return"Date | string";case"datetime":return"Date | string";case"float":return"number";case"double":return"number";case"decimal":return"number";case"integer":return"number";case"bigint":return"number";default:return $}}function z9(Z){let $=p.join(p.storagePath("framework/defaults/app/Models"),"/"),J=p.join($,Z);if(L0.existsSync(J))return J;return K9(`${$}**/${Z}`,{absolute:!0})[0]??""}function L9(Z){let $=p.join(p.userModelsPath("/"),"/"),J=p.join($,Z);if(L0.existsSync(J))return J;return K9(`${$}**/${Z}`,{absolute:!0})[0]??""}function _T(Z){let $=typeof Z==="number"?new Date(Z):typeof Z==="string"?new Date(Z):Z;if(Number.isNaN($.getTime()))throw Error(`Invalid date value: ${String(Z)}`);return $.toISOString().replace("T"," ").split(".")[0]??""}function gT(Z){return Z.toISOString().split("T")[0]??""}function hT(Z){return Z.getTime()}import{createModel as UH,registerModel as zH}from"@stacksjs/query-builder";import{log as h}from"@stacksjs/logging";import{snakeCase as $9}from"@stacksjs/strings";import{AsyncLocalStorage as LH}from"async_hooks";function qB(Z){if(Z===null||typeof Z!=="object")return!1;let $=Z;return Array.isArray($.data)&&typeof $.current_page==="number"&&typeof $.per_page==="number"&&typeof $.total==="number"&&typeof $.last_page==="number"}function EB(Z){if(Z===null||typeof Z!=="object")return!1;let $=Z;return Array.isArray($.data)&&typeof $.current_page==="number"&&typeof $.per_page==="number"&&typeof $.has_more_pages==="boolean"&&!("total"in $)}function FB(Z){if(Z===null||typeof Z!=="object")return!1;let $=Z;return Array.isArray($.data)&&(typeof $.next_cursor==="string"||$.next_cursor===null)}function H9(Z){let{data:$}=Z,{perPage:J,page:Q,total:X,lastPage:Y}=Z.meta,G=$.length===0,V=G?null:(Q-1)*J+1,U=G?null:V+$.length-1;return{data:$,current_page:Q,per_page:J,total:X,last_page:Y,from:V,to:U,has_more_pages:Q<Y}}function w9(Z){return{data:Z.data,current_page:Z.meta.page,per_page:Z.meta.perPage,has_more_pages:Z.meta.hasMore}}function T9(Z){return{data:Z.data,per_page:Z.meta.perPage,next_cursor:RZ(Z.meta.nextCursor),prev_cursor:RZ(Z.meta.prevCursor),has_more_pages:Z.meta.nextCursor!==null&&Z.meta.nextCursor!==void 0}}function RZ(Z){if(Z===null||Z===void 0)return null;if(typeof Z==="string")return Z;return JSON.stringify(Z)}function O9(Z,$){let J=F9(),Q=J?D9(J,"per_page"):void 0,X=J?D9(J,"page"):void 0,Y=Z!==void 0?Math.max(1,Math.floor(Z)):Math.min(100,Math.max(1,Q??15)),G=Math.max(1,Math.floor($??X??1));return{perPage:Y,page:G}}function q9(Z,$){let J=F9(),Q=J?yZ(J,"cursor"):void 0,X=J?D9(J,"per_page"):void 0,Y=Z!==void 0?Math.max(1,Math.floor(Z)):Math.min(100,Math.max(1,X??15)),V=vZ($!==void 0?$:Q??null);return{perPage:Y,cursor:V}}function vZ(Z){if(Z===null||Z===void 0)return null;if(Array.isArray(Z))return Z;if(typeof Z==="string"&&Z.startsWith("["))try{let $=JSON.parse(Z);if(Array.isArray($))return $}catch{}return Z}function E9(Z){let $=F9();if(!$)return Z;let J=(()=>{try{return new URL($.url)}catch{return null}})();if(!J)return Z;let Q=J.pathname;if(Z.path=Q,"next_cursor"in Z)return Z.next_page_url=Z.next_cursor!==null?Z0(J,{cursor:Z.next_cursor}):null,Z.prev_page_url=Z.prev_cursor!==null?Z0(J,{cursor:Z.prev_cursor}):null,Z;let X=Z.current_page;if(Z.prev_page_url=X>1?Z0(J,{page:X-1}):null,"total"in Z){let Y=Z.last_page;Z.next_page_url=X<Y?Z0(J,{page:X+1}):null,Z.first_page_url=Z0(J,{page:1}),Z.last_page_url=Z0(J,{page:Y})}else Z.next_page_url=Z.has_more_pages?Z0(J,{page:X+1}):null;return Z}function Z0(Z,$){let J=new URL(Z.toString());for(let[Q,X]of Object.entries($))J.searchParams.set(Q,String(X));return`${J.pathname}${J.search}`}var K0;function F9(){if(K0===null)return;if(K0===void 0)try{let $=C("@stacksjs/router");if(typeof $.getCurrentRequest==="function")K0=$.getCurrentRequest;else{K0=null;return}}catch{K0=null;return}return K0()}function D9(Z,$){let J=yZ(Z,$);if(J===void 0)return;let Q=Number(J);return Number.isFinite(Q)?Q:void 0}function yZ(Z,$){let J=Z.query?.[$];if(J===void 0)return;return Array.isArray(J)?J[0]:J}import{db as CB,sql as kB}from"@stacksjs/database";function C9(Z,$){if(typeof Z!=="number"||!Number.isFinite(Z)||Z<=0)throw Error(`[orm/taggable] ${$} requires a positive numeric id (received ${String(Z)})`)}function jZ(Z){let $=CB;return{async tags(J){return C9(J,"tags"),await $.selectFrom("taggables").where("taggable_id","=",J).where("taggable_type","=",Z).selectAll().execute()},async tagCount(J){C9(J,"tagCount");let Q=await $.selectFrom("taggables").select(kB`count(*) as count`).where("taggable_id","=",J).where("taggable_type","=",Z).executeTakeFirst();return Number(Q?.count)||0},async addTag(J,Q){if(C9(J,"addTag"),!Q||typeof Q.name!=="string"||Q.name.trim().length===0)throw Error("[orm/taggable] addTag requires a non-empty tag.name");return await $.insertInto("taggables").values({...Q,taggable_id:J,taggable_type:Z,slug:Q.name.toLowerCase().replace(/[^a-z0-9]+/g,"-"),is_active:!0,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).execute(),await $.selectFrom("taggables").where("taggable_id","=",J).where("taggable_type","=",Z).where("name","=",Q.name).selectAll().executeTakeFirst()},async activeTags(J){return await $.selectFrom("taggables").where("taggable_id","=",J).where("taggable_type","=",Z).where("is_active","=",!0).selectAll().execute()},async inactiveTags(J){return await $.selectFrom("taggables").where("taggable_id","=",J).where("taggable_type","=",Z).where("is_active","=",!1).selectAll().execute()},async removeTag(J,Q){await $.deleteFrom("taggables").where("taggable_id","=",J).where("taggable_type","=",Z).where("id","=",Q).execute()}}}import{db as AB}from"@stacksjs/database";function bZ(Z){let $=AB;async function J(Q){return(await $.selectFrom("categorizable_models").where("categorizable_id","=",Q).where("categorizable_type","=",Z).selectAll().execute()).map((Y)=>Y.category_id)}return{async categories(Q){let X=await J(Q);if(X.length===0)return[];return await $.selectFrom("categorizables").where("id","in",X).selectAll().execute()},async categoryCount(Q){return(await J(Q)).length},async addCategory(Q,X){let Y=()=>$.selectFrom("categorizables").where("name","=",X.name).where("categorizable_type","=",Z).selectAll().executeTakeFirst(),G=await Y();if(!G)await $.insertInto("categorizables").values({name:X.name,description:X.description,slug:X.name.toLowerCase().replace(/[^a-z0-9]+/g,"-"),categorizable_type:Z,is_active:!0,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).execute(),G=await Y();return await $.insertInto("categorizable_models").values({categorizable_id:Q,categorizable_type:Z,category_id:G.id,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).execute(),G},async activeCategories(Q){let X=await J(Q);if(X.length===0)return[];return await $.selectFrom("categorizables").where("id","in",X).where("is_active","=",!0).selectAll().execute()},async inactiveCategories(Q){let X=await J(Q);if(X.length===0)return[];return await $.selectFrom("categorizables").where("id","in",X).where("is_active","=",!1).selectAll().execute()},async removeCategory(Q,X){await $.deleteFrom("categorizable_models").where("categorizable_id","=",Q).where("categorizable_type","=",Z).where("category_id","=",X).execute()}}}import{db as NB,sql as xB}from"@stacksjs/database";function fZ(Z,$){if(typeof Z!=="number"||!Number.isFinite(Z)||Z<=0)throw Error(`[orm/commentable] ${$} requires a positive numeric id (received ${String(Z)})`)}function MZ(Z){let $=NB;return{async comments(J){return fZ(J,"comments"),await $.selectFrom("commentables").where("commentables_id","=",J).where("commentables_type","=",Z).selectAll().execute()},async commentCount(J){let Q=await $.selectFrom("commentables").select(xB`count(*) as count`).where("commentables_id","=",J).where("commentables_type","=",Z).executeTakeFirst();return Number(Q?.count)||0},async addComment(J,Q){if(fZ(J,"addComment"),!Q||typeof Q.title!=="string"||Q.title.trim().length===0)throw Error("[orm/commentable] addComment requires a non-empty comment.title");if(typeof Q.body!=="string"||Q.body.trim().length===0)throw Error("[orm/commentable] addComment requires a non-empty comment.body");let X=await $.insertInto("commentables").values({...Q,commentables_id:J,commentables_type:Z,status:"pending",created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).returningAll().executeTakeFirst();if(X&&typeof X==="object"&&"id"in X)return X;let Y=X?.lastInsertRowid;if(Y==null)return X;return await $.selectFrom("commentables").where("id","=",Number(Y)).selectAll().executeTakeFirst()},async approvedComments(J){return await $.selectFrom("commentables").where("commentables_id","=",J).where("commentables_type","=",Z).where("status","=","approved").selectAll().execute()},async pendingComments(J){return await $.selectFrom("commentables").where("commentables_id","=",J).where("commentables_type","=",Z).where("status","=","pending").selectAll().execute()},async rejectedComments(J){return await $.selectFrom("commentables").where("commentables_id","=",J).where("commentables_type","=",Z).where("status","=","rejected").selectAll().execute()}}}import{db as GH}from"@stacksjs/database";function k3(Z){let $=GH;return{async createStripeUser(J,Q){let{manageCustomer:X}=await import("@stacksjs/payments");return await X.createStripeCustomer(J,Q)},async updateStripeUser(J,Q){let{manageCustomer:X}=await import("@stacksjs/payments");return await X.updateStripeCustomer(J,Q)},async deleteStripeUser(J){let{manageCustomer:Q}=await import("@stacksjs/payments");return await Q.deleteStripeUser(J)},async createOrGetStripeUser(J,Q){let{manageCustomer:X}=await import("@stacksjs/payments");return await X.createOrGetStripeUser(J,Q)},async retrieveStripeUser(J){let{manageCustomer:Q}=await import("@stacksjs/payments");return await Q.retrieveStripeUser(J)},async defaultPaymentMethod(J){let{managePaymentMethod:Q}=await import("@stacksjs/payments");return await Q.retrieveDefaultPaymentMethod(J)},async setDefaultPaymentMethod(J,Q){let{managePaymentMethod:X}=await import("@stacksjs/payments");return await X.setDefaultPaymentMethod(J,Q)},async addPaymentMethod(J,Q){let{managePaymentMethod:X}=await import("@stacksjs/payments");return await X.addPaymentMethod(J,Q)},async paymentMethods(J,Q){let{managePaymentMethod:X}=await import("@stacksjs/payments");return await X.listPaymentMethods(J,Q)},async newSubscription(J,Q,X,Y={}){let{manageSubscription:G}=await import("@stacksjs/payments"),V=await G.create(J,Q,X,Y),W=V.latest_invoice?.payment_intent;return{subscription:V,paymentIntent:W}},async updateSubscription(J,Q,X,Y={}){let{manageSubscription:G}=await import("@stacksjs/payments"),V=await G.update(J,Q,X,Y),W=V.latest_invoice?.payment_intent;return{subscription:V,paymentIntent:W}},async cancelSubscription(J,Q,X={}){let{manageSubscription:Y}=await import("@stacksjs/payments");return{subscription:await Y.cancel(Q,X)}},async activeSubscription(J){let{manageSubscription:Q}=await import("@stacksjs/payments"),X=await $.selectFrom("subscriptions").where("user_id","=",J.id).where("provider_status","=","active").selectAll().executeTakeFirst();if(X){let Y=await Q.retrieve(J,X.provider_id||"");return{subscription:X,providerSubscription:Y}}return},async checkout(J,Q,X={}){let{manageCheckout:Y,manageCustomer:G}=await import("@stacksjs/payments"),V={};if(X.enableTax)V.automatic_tax={enabled:!0},delete X.enableTax;if(X.allowPromotions)V.allow_promotion_codes=!0,delete X.allowPromotions;let B={...{mode:"payment",customer:(await G.createOrGetStripeUser(J,{})).id,line_items:Q.map((z)=>({price:z.priceId,quantity:z.quantity||1}))},...V,...X};return await Y.create(J,B)},async createSetupIntent(J,Q={}){let{manageSetupIntent:X}=await import("@stacksjs/payments");return await X.create(J,Q)},async subscriptionHistory(J){let{manageInvoice:Q}=await import("@stacksjs/payments");return await Q.list(J)},async transactionHistory(J){let{manageTransaction:Q}=await import("@stacksjs/payments");return await Q.list(J)},async connectAccount(J,Q={}){let X=Q.accountColumn||"stripe_account_id",Y=(J._attributes??J)[X];if(!Y)return null;let G=await W8();try{return await G.accounts.retrieve(Y)}catch{return null}},async createConnectAccount(J,Q={}){let X=Q.accountColumn||"stripe_account_id",Y=J._attributes??J,G=Y[X],V=await W8();if(!G){let{stacksIdempotencyKey:U}=await import("@stacksjs/payments"),W=Q.modelTable||Z,B=await V.accounts.create({type:Q.type??"express",email:Q.email??Y.email,country:Q.country??"US",capabilities:Q.capabilities??{card_payments:{requested:!0},transfers:{requested:!0}}},{idempotencyKey:U("connect.account.create",W,Y.id)});return G=B.id,await $.updateTable(W).set({[X]:G}).where("id","=",Number(Y.id)).execute(),B}return await V.accounts.retrieve(G)},async connectOnboardLink(J,Q){let X=Q.accountColumn||"stripe_account_id",G=(J._attributes??J)[X];if(!G)throw Error("connectOnboardLink: model has no Stripe Connect account; call createConnectAccount first");return{url:(await(await W8()).accountLinks.create({account:G,refresh_url:Q.refreshUrl,return_url:Q.returnUrl,type:Q.type??"account_onboarding"})).url,accountId:G}},async syncConnectStatus(J,Q={}){let X=Q.accountColumn||"stripe_account_id",Y=Q.chargesColumn||"charges_enabled",G=Q.payoutsColumn||"payouts_enabled",V=J._attributes??J,U=V[X];if(!U)return{chargesEnabled:!1,payoutsEnabled:!1};let B=await(await W8()).accounts.retrieve(U),z=!!B.charges_enabled,L=!!B.payouts_enabled,H=Q.modelTable||Z;return await $.updateTable(H).set({[Y]:z,[G]:L}).where("id","=",Number(V.id)).execute(),{chargesEnabled:z,payoutsEnabled:L}},async chargeWithSplit(J,Q){let X=await W8(),Y=Q.accountColumn||"stripe_account_id",G=J._attributes??J,V=Q.connectAccountId||G[Y],U={amount:Q.amountCents,currency:Q.currency||"usd",automatic_payment_methods:{enabled:!0},metadata:Q.metadata};if(V){if(U.transfer_data={destination:V},Q.platformFeeCents)U.application_fee_amount=Q.platformFeeCents}let{freshIdempotencyKey:W}=await import("@stacksjs/payments");return await X.paymentIntents.create(U,{idempotencyKey:W("payment_intent.create",G.id,Q.amountCents)})}}}async function W8(){let Z=globalThis.process?.env?.STRIPE_SECRET_KEY;if(!Z)throw Error("Stripe Connect: STRIPE_SECRET_KEY not configured");return new(await Promise.resolve().then(() => ZB(C3(),1))).default(Z,{apiVersion:"2026-03-25.dahlia"})}import{db as VH}from"@stacksjs/database";function A3(Z,$){let J=VH,Q=$?.table||`${Z}_likes`,X=$?.foreignKey||`${Z.replace(/s$/,"")}_id`;return{async likes(Y){return await J.selectFrom(Q).where(X,"=",Y).selectAll().execute()},async likeCount(Y){let G=await J.selectFrom(Q).select("count(*) as count").where(X,"=",Y).executeTakeFirst();return Number(G?.count)||0},async like(Y,G){if(typeof Y!=="number"||!Number.isFinite(Y)||Y<=0)throw Error(`[orm/likeable] like requires a positive numeric id (received ${String(Y)})`);if(typeof G!=="number"||!Number.isFinite(G)||G<=0)throw Error(`[orm/likeable] like requires a positive numeric userId (received ${String(G)})`);let V=new Date().toISOString();try{return await J.insertInto(Q).values({[X]:Y,user_id:G,created_at:V,updated_at:V}).returningAll().executeTakeFirst()}catch(U){let W=U;if(!(W.code==="SQLITE_CONSTRAINT_UNIQUE"||W.code==="SQLITE_CONSTRAINT"||W.code==="23505"||W.errno===1062||/unique|duplicate/i.test(W.message??"")))throw U;let z=await J.selectFrom(Q).where(X,"=",Y).where("user_id","=",G).selectAll().executeTakeFirst();if(z)return z;throw U}},async unlike(Y,G){await J.deleteFrom(Q).where(X,"=",Y).where("user_id","=",G).execute()},async isLiked(Y,G){return!!await J.selectFrom(Q).where(X,"=",Y).where("user_id","=",G).selectAll().executeTakeFirst()},async likedBy(Y){return(await J.selectFrom(Q).select([X]).where("user_id","=",Y).execute()).map((V)=>Number(V[X])).filter(Boolean)}}}function N3(){return{async generateTwoFactorForModel(Z){let{generateTwoFactorSecret:$}=await import("@stacksjs/auth"),J=$();await Z.update({two_factor_secret:J})},async verifyTwoFactorCode(Z,$){let J=Z.get("two_factor_secret");if(typeof J!=="string")return!1;let{verifyTwoFactorCode:Q,RateLimiter:X}=await import("@stacksjs/auth"),Y=String(Z.id??Z.get?.("id")??Z.get?.("email")??J),G=`2fa:${Y}`;if(await X.isRateLimited(G)){let{HttpError:U}=await import("@stacksjs/error-handling");throw new U(429,"Too many verification attempts. Please try again later.")}if(!await Q($,J))return await X.recordFailedAttempt(G),!1;try{let{cache:U}=await import("@stacksjs/cache"),W=`2fa:used:${Y}:${$}`;if(await U.has(W))return await X.recordFailedAttempt(G),!1;await U.set(W,"1",90)}catch{}return await X.resetAttempts(G),!0}}}import{log as x0}from"@stacksjs/logging";var e8="deleted_at";function x3(Z,$="id"){return{async softDelete(J){let Q=new Date().toISOString(),X=Z.where($,J);if(typeof X?.update==="function")return await X.update({[e8]:Q}),!0;return!1},async restore(J){let Q=Z.where($,J);if(typeof Q?.update==="function")return await Q.update({[e8]:null}),!0;return!1},async forceDelete(J){let Q=Z.where($,J);if(typeof Q?.delete==="function")return await Q.delete(),!0;return!1},withTrashed(){return typeof Z.query==="function"?Z.query():Z},onlyTrashed(){let J=typeof Z.query==="function"?Z.query():Z;if(typeof J?.whereNotNull==="function")return J.whereNotNull(e8);return J?.where?.(e8,"!=",null)??J}}}function I3(Z){if(Z===!0||Z==null)return{};if(typeof Z==="object"&&!Array.isArray(Z)){let $=Z;if(Array.isArray($.cascade)){let J=$.cascade.filter((Q)=>typeof Q==="string");return J.length?{cascade:J}:{}}return{}}return{}}function BH(Z,$){let J=Z.hasMany??[],Q=Z.hasOne??[],X=J.some((B)=>UZ(B,$,!0)),Y=Q.some((B)=>UZ(B,$,!1));if(!X&&!Y)return x0.warn(`[orm] soft-delete cascade: '${$}' is not a declared hasMany/hasOne relation \u2014 skipping`),null;let V=(X?J:Q).find((B)=>UZ(B,$,X))??null;if(!V)return null;let W=globalThis[V];if(!W)return x0.warn(`[orm] soft-delete cascade: model '${V}' is not yet on globalThis \u2014 skipping cascade for '${$}'`),null;return{className:V,model:W}}function UZ(Z,$,J){let Q=Z.toLowerCase();if($===Q)return!0;if(J&&$===`${Q}s`)return!0;if(J&&Q.endsWith("y")&&$===`${Q.slice(0,-1)}ies`)return!0;return!1}async function WH(Z,$,J,Q,X){try{let Y=J.where;if(typeof Y!=="function"){x0.warn(`[orm] cascade ${X}: child model has no .where()`);return}if(X==="softDelete"){let G=J.softDelete;if(typeof G==="function"){let U=Y.call(J,Q,$),W=typeof U?.get==="function"?await U.get():Array.isArray(U)?U:[],B=J.primaryKey||"id";for(let z of W){let L=z?.[B];if(L!=null)await G.call(J,L)}return}let V=Y.call(J,Q,$);if(typeof V?.delete==="function"){x0.debug(`[orm] cascade soft-delete: child has no softDeletes trait, hard-deleting from ${String(J.table??"?")}`),await V.delete();return}}else{let G=J.restore;if(typeof G!=="function"){x0.debug("[orm] cascade restore: child has no restore() \u2014 nothing to do");return}let V=J.withTrashed,W=(typeof V==="function"?V.call(J):J).where?.(Q,$),B=typeof W?.get==="function"?await W.get():[],z=J.primaryKey||"id";for(let L of B){let H=L?.[z];if(H!=null)await G.call(J,H)}}}catch(Y){if(x0.warn(`[orm] soft-delete cascade ${X} on ${Z}#${String($)} failed`,{error:Y}),process.env.STACKS_ORM_CASCADE_SWALLOW!=="true")throw Y}}async function U8(Z,$,J,Q){let X=$.cascade;if(!X||X.length===0)return;let Y=`${Z.name.toLowerCase()}_id`;for(let G of X){let V=BH(Z,G);if(!V)continue;await WH(V.className,J,V.model,Y,Q)}}var f3=new LH;function W0(){return f3.getStore()?.suppressed===!0}function B0(Z){return Promise.resolve(f3.run({suppressed:!0},Z))}var P3=new Set;function KH(Z,$){let J=typeof Z==="string"?Z.slice(0,80):String(Z),Q=`${typeof Z}:${J}`;if(P3.has(Q))return;P3.add(Q);let X=$ instanceof Error?$.message:String($);console.error(`[orm] JSON cast failed to parse value (returning null): ${X} \u2014 value preview: ${JSON.stringify(J)}`)}var HH={string:{get:(Z)=>Z!=null?String(Z):null,set:(Z)=>Z!=null?String(Z):null},number:{get:(Z)=>Z!=null?Number(Z):null,set:(Z)=>Z!=null?Number(Z):null},integer:{get:(Z)=>Z!=null?Math.trunc(Number(Z)):null,set:(Z)=>Z!=null?Math.trunc(Number(Z)):null},float:{get:(Z)=>Z!=null?Number.parseFloat(String(Z)):null,set:(Z)=>Z!=null?Number.parseFloat(String(Z)):null},boolean:{get:(Z)=>Z===1||Z==="1"||Z===!0||Z==="true",set:(Z)=>Z===!0||Z===1||Z==="1"||Z==="true"?1:0},json:{get:(Z)=>{if(Z==null)return null;if(typeof Z==="string")try{return JSON.parse(Z)}catch($){return KH(Z,$),null}return Z},set:(Z)=>{if(Z==null)return null;return typeof Z==="string"?Z:JSON.stringify(Z)}},datetime:{get:(Z)=>Z?new Date(Z):null,set:(Z)=>Z instanceof Date?Z.toISOString():Z},date:{get:(Z)=>Z?new Date(Z):null,set:(Z)=>Z instanceof Date?Z.toISOString().split("T")[0]:Z},array:{get:(Z)=>{if(Z==null)return[];if(Array.isArray(Z))return Z;if(typeof Z==="string")try{return JSON.parse(Z)}catch{return[]}return[]},set:(Z)=>{if(Z==null)return null;return Array.isArray(Z)?JSON.stringify(Z):Z}}};function M3(Z){return typeof Z==="string"?HH[Z]:Z}function S3(Z,$,J){if(!Z||typeof Z!=="object")return Z;let Q={...Z};for(let[X,Y]of Object.entries($))if(X in Q){let G=M3(Y);Q[X]=G[J](Q[X])}return Q}var Z9=new Set(["_attributes","_original","_definition","_hasSaved","_relations"]),R3=Symbol.for("stacks.modelInstanceProxy"),wH={tags:{bag:"_taggable",mode:"id"},tagCount:{bag:"_taggable",mode:"id"},addTag:{bag:"_taggable",mode:"id"},activeTags:{bag:"_taggable",mode:"id"},inactiveTags:{bag:"_taggable",mode:"id"},removeTag:{bag:"_taggable",mode:"id"},categories:{bag:"_categorizable",mode:"id"},categoryCount:{bag:"_categorizable",mode:"id"},addCategory:{bag:"_categorizable",mode:"id"},activeCategories:{bag:"_categorizable",mode:"id"},inactiveCategories:{bag:"_categorizable",mode:"id"},removeCategory:{bag:"_categorizable",mode:"id"},comments:{bag:"_commentable",mode:"id"},commentCount:{bag:"_commentable",mode:"id"},addComment:{bag:"_commentable",mode:"id"},approvedComments:{bag:"_commentable",mode:"id"},pendingComments:{bag:"_commentable",mode:"id"},rejectedComments:{bag:"_commentable",mode:"id"},likes:{bag:"_likeable",mode:"id"},likeCount:{bag:"_likeable",mode:"id"},like:{bag:"_likeable",mode:"id"},unlike:{bag:"_likeable",mode:"id"},isLiked:{bag:"_likeable",mode:"id"},createStripeUser:{bag:"_billable",mode:"model"},updateStripeUser:{bag:"_billable",mode:"model"},deleteStripeUser:{bag:"_billable",mode:"model"},createOrGetStripeUser:{bag:"_billable",mode:"model"},retrieveStripeUser:{bag:"_billable",mode:"model"},defaultPaymentMethod:{bag:"_billable",mode:"model"},setDefaultPaymentMethod:{bag:"_billable",mode:"model"},addPaymentMethod:{bag:"_billable",mode:"model"},paymentMethods:{bag:"_billable",mode:"model"},newSubscription:{bag:"_billable",mode:"model"},updateSubscription:{bag:"_billable",mode:"model"},cancelSubscription:{bag:"_billable",mode:"model"},activeSubscription:{bag:"_billable",mode:"model"},checkout:{bag:"_billable",mode:"model"},createSetupIntent:{bag:"_billable",mode:"model"},subscriptionHistory:{bag:"_billable",mode:"model"},transactionHistory:{bag:"_billable",mode:"model"},connectAccount:{bag:"_billable",mode:"model"},createConnectAccount:{bag:"_billable",mode:"model"},connectOnboardLink:{bag:"_billable",mode:"model"},syncConnectStatus:{bag:"_billable",mode:"model"},chargeWithSplit:{bag:"_billable",mode:"model"},generateTwoFactorForModel:{bag:"_twoFactor",mode:"model"},verifyTwoFactorCode:{bag:"_twoFactor",mode:"model"}};function TH(Z,$){if(!Z||!$)return null;let J=$.split("."),Q=Z;for(let X of J){if(Q==null||typeof Q!=="object")return null;let Y=Q;if("_attributes"in Y&&Y._attributes&&typeof Y._attributes==="object"){let G=Y._attributes;if(X in G){Q=G[X];continue}}if(X in Y){Q=Y[X];continue}return null}return Q??null}function m(Z,$){if(!Z||typeof Z!=="object")return Z;if(Z[R3])return Z;let J=Z._attributes;if(!J||typeof J!=="object")return Z;if($&&Object.keys($).length>0){for(let[Q,X]of Object.entries($))if(Object.prototype.hasOwnProperty.call(J,Q))J[Q]=M3(X).get(J[Q])}return new Proxy(Z,{get(Q,X,Y){if(X===R3)return!0;if(X==="saveAsync")return async function(){let V=Q._definition,U=V?.set;if(U&&typeof Q.isDirty==="function"){for(let[B,z]of Object.entries(U)){if(typeof z!=="function")continue;if(!Q.isDirty(B))continue;let L=z(Q._attributes),H=L&&typeof L.then==="function"?await L:L;Q._attributes[B]=H}let W=V.set;V.set={};try{return Q.save()}finally{V.set=W}}return Q.save()};if(X==="save")return function(){let V=Q._definition,U=V?.set;if(U&&Object.keys(U).length>0&&typeof Q.isDirty==="function"){for(let[B,z]of Object.entries(U)){if(typeof z!=="function")continue;if(!Q.isDirty(B))continue;let L=z(Q._attributes);if(L&&typeof L.then==="function")throw Error(`Setter for "${B}" returned a Promise \u2014 use \`saveAsync()\` instead of \`save()\` when a model has async setters.`);Q._attributes[B]=L}let W=V.set;V.set={};try{return Q.save()}finally{V.set=W}}return Q.save()};if(X==="updateAsync")return async function(V){if(V&&typeof V==="object"&&!Array.isArray(V))for(let[U,W]of Object.entries(V))Y[U]=W;return Y.saveAsync()};if(X==="saveQuietly")return function(){return B0(()=>Q.save())};if(X==="saveAsyncQuietly")return function(){return B0(()=>Y.saveAsync())};if(X==="updateQuietly")return function(V){return B0(()=>Q.update(V))};if(X==="updateAsyncQuietly")return function(V){return B0(()=>Y.updateAsync(V))};if(X==="deleteQuietly")return function(){return B0(()=>Q.delete())};if(X==="toSearchableObject")return function(){let W=Q._definition?.traits?.useSearch;if(!W)return null;let B=Q._attributes;if(!B)return null;if(W===!0){let D={...B};if(B.id!=null)D.id=String(B.id);return D}let z={},L=W.displayable?.length?W.displayable:[...W.searchable??[],...W.filterable??[],...W.sortable??[],"id"],H=W.denormalize??{},T=Q._relations;for(let D of L){let q=$9(D),O=B[q]??B[D];if(O!==void 0){z[q]=O;continue}let k=H[D]??H[q];if(k){z[q]=TH(T,k);continue}z[q]=void 0}if(B.id!=null)z.id=String(B.id);return z};if(typeof X==="string"&&!Z9.has(X)){let V=Q._attributes;if(V&&Object.prototype.hasOwnProperty.call(V,X))return V[X];let U=Q._relations;if(U&&Object.prototype.hasOwnProperty.call(U,X)){let B=U[X];if(Array.isArray(B))return B.map((z)=>m(z,$));return m(B,$)}let W=wH[X];if(W){let L=Q._definition?.__traitMethods?.[W.bag]?.[X];if(typeof L==="function")return W.mode==="model"?(...H)=>L(Y,...H):(...H)=>L(Q.id,...H)}}let G=Reflect.get(Q,X,Q);return typeof G==="function"?G.bind(Q):G},set(Q,X,Y,G){if(typeof X==="string"&&!Z9.has(X)){let{_attributes:V,set:U}=Q;if(V&&Object.prototype.hasOwnProperty.call(V,X)){if(typeof U==="function")U.call(Q,X,Y);else V[X]=Y;return!0}if(V&&!(X in Q)){if(typeof U==="function")U.call(Q,X,Y);else V[X]=Y;return!0}}return Reflect.set(Q,X,Y,G)},has(Q,X){if(typeof X==="string"&&!Z9.has(X)){let Y=Q._attributes;if(Y&&Object.prototype.hasOwnProperty.call(Y,X))return!0;let G=Q._relations;if(G&&Object.prototype.hasOwnProperty.call(G,X))return!0}return Reflect.has(Q,X)},deleteProperty(Q,X){if(typeof X==="string"&&!Z9.has(X)){let Y=Q._attributes;if(Y&&Object.prototype.hasOwnProperty.call(Y,X))return delete Y[X],!0}return Reflect.deleteProperty(Q,X)},ownKeys(Q){let X=Q._attributes;return X?Object.keys(X):[]},getOwnPropertyDescriptor(Q,X){if(typeof X==="string"){let Y=Q._attributes;if(Y&&Object.prototype.hasOwnProperty.call(Y,X))return{configurable:!0,enumerable:!0,value:Y[X],writable:!0}}return Object.getOwnPropertyDescriptor(Q,X)}})}var DH=new Set(["get","first","last","firstOrFail","find","findOrFail","all","paginate","simplePaginate","cursorPaginate"]),OH={paginate:H9,simplePaginate:w9,cursorPaginate:T9},v3=Symbol.for("stacks.queryBuilderProxy");function _3(Z,$){if(!Z||typeof Z!=="object")return Z;if(Z[v3])return Z;return new Proxy(Z,{get(J,Q,X){if(Q===v3)return!0;let Y=Reflect.get(J,Q,X);if(typeof Y!=="function")return Y;return function(...G){let V=G,U=String(Q);if(U==="paginate"||U==="simplePaginate"){let{perPage:z,page:L}=O9(G[0],G[1]);V=[z,L]}else if(U==="cursorPaginate"){let{perPage:z,cursor:L}=q9(G[0],G[1]);V=[z,L,G[2],G[3]]}let W=Y.apply(J,V),B=(z)=>{if(DH.has(U)){if(Array.isArray(z))return z.map((H)=>m(H,$));let L=OH[U];if(L&&z&&Array.isArray(z.data)){let H=z.data.map((D)=>m(D,$)),T=L({...z,data:H});return E9(T)}if(z&&Array.isArray(z.data))return{...z,data:z.data.map((H)=>m(H,$))};return m(z,$)}if(z&&typeof z==="object"&&typeof z.get==="function")return _3(z,$);return z};if(W&&typeof W.then==="function")return W.then(B);return B(W)}}})}function qH(Z,$){let J=["find","first","last","all","firstOrFail","findOrFail","findMany"];for(let Y of J){let G=Z[Y];if(typeof G!=="function")continue;Z[Y]=function(...V){let U=G.apply(this,V),W=(B)=>Array.isArray(B)?B.map((z)=>m(z,$)):m(B,$);if(U&&typeof U.then==="function")return U.then(W);return W(U)}}let Q=["create","firstOrCreate","updateOrCreate","make"];for(let Y of Q){let G=Z[Y];if(typeof G!=="function")continue;Z[Y]=function(...V){let U=G.apply(this,V),W=(B)=>Array.isArray(B)?B.map((z)=>m(z,$)):m(B,$);if(U&&typeof U.then==="function")return U.then(W);return W(U)}}let X=["query","where","orWhere","whereIn","whereNotIn","whereNull","whereNotNull","whereLike","whereBetween","whereNotBetween","orderBy","orderByDesc","select","with","limit","take","skip","latest","oldest"];for(let Y of X){let G=Z[Y];if(typeof G!=="function")continue;Z[Y]=function(...V){let U=G.apply(this,V);return _3(U,$)}}}class g3 extends Error{model;id;constructor(Z,$){super($!=null?`[ORM] ${Z} not found for id=${String($)}`:`[ORM] No matching ${Z} row`);this.name="ModelNotFoundError",this.model=Z,this.id=$}}class LZ extends Error{model;attribute;reason;constructor(Z,$,J){let Q=J==="guarded"?`'${$}' is marked guarded`:`'${$}' is not in the fillable allowlist`;super(`[ORM] Mass assignment to ${Z} forbidden: ${Q}. Use ${Z}.forceCreate(...) / .forceUpdate(...) to bypass.`);this.name="MassAssignmentException",this.model=Z,this.attribute=$,this.reason=J}}var EH=new Set(["id","created_at","updated_at","deleted_at","uuid"]);function z8(Z,$,J={}){if(J.force)return $;if(!$||typeof $!=="object"||Array.isArray($))return $;let Q=Z.attributes;if(!Q)return $;let X=new Set,Y=new Set,G=new Set;for(let[U,W]of Object.entries(Q)){let B=$9(U);if(X.add(B),W?.fillable===!0)Y.add(B);if(W?.guarded===!0)G.add(B)}let V=Y.size>0?Y:X;for(let U of Object.keys($)){if(EH.has(U))continue;if(G.has(U))throw new LZ(Z.name,U,"guarded");if(U.endsWith("_id"))continue;if(!V.has(U))throw new LZ(Z.name,U,"not-fillable")}return $}async function KZ(Z,$){let J=Z.set;if(!J||typeof J!=="object")return $;let Q={...$};for(let[X,Y]of Object.entries(J)){if(typeof Y!=="function"||!(X in Q))continue;try{Q[X]=await Y(Q)}catch(G){h.error(`[orm] ${Z.name}.set.${X} threw \u2014 skipping setter`,G)}}return Q}function FH(Z,$){let J=$.primaryKey||"id",Q=Z.create;function X(W){let B=Z.where;if(typeof B!=="function")throw Error(`[ORM] ${$.name}.${W} needs a working where(): the underlying query builder did not expose one`);return B}function Y(W){let B=Z.find;if(typeof B!=="function")throw Error(`[ORM] ${$.name}.${W} needs a working find(): the underlying query builder did not expose one`);return B}function G(W){let B=Z.create;if(typeof B!=="function")throw Error(`[ORM] ${$.name}.${W} cannot create: the underlying query builder did not expose create()`);return B}if(typeof Z.update!=="function")Z.update=async function(W,B){if(W==null)throw Error(`[ORM] ${$.name}.update requires an id as the first argument`);if(!B||typeof B!=="object"||Array.isArray(B))throw Error(`[ORM] ${$.name}.update requires a data object as the second argument`);if(Object.keys(B).length===0){h.debug(`[orm] ${$.name}.update called with empty data \u2014 short-circuiting and returning current row`);let H=Z.find;return typeof H==="function"?await H.call(Z,W):null}z8($,B);let z=await KZ($,B);await X("update").call(Z,J,W).update(z);let L=Z.find;return typeof L==="function"?await L.call(Z,W):null};if(typeof Z.forceUpdate!=="function")Z.forceUpdate=async function(W,B){if(W==null)throw Error(`[ORM] ${$.name}.forceUpdate requires an id as the first argument`);if(!B||typeof B!=="object"||Array.isArray(B))throw Error(`[ORM] ${$.name}.forceUpdate requires a data object as the second argument`);let z=await KZ($,B);await X("forceUpdate").call(Z,J,W).update(z);let L=Z.find;return typeof L==="function"?await L.call(Z,W):null};if(typeof Z.forceCreate!=="function")Z.forceCreate=async function(W){if(!W||typeof W!=="object"||Array.isArray(W))throw Error(`[ORM] ${$.name}.forceCreate requires a data object`);if(typeof Q!=="function")throw Error(`[ORM] ${$.name}.forceCreate cannot create: the underlying query builder did not expose create()`);return await Q.call(Z,W)};if(typeof Z.delete!=="function")Z.delete=async function(W){if(W==null)throw Error(`[ORM] ${$.name}.delete requires an id as the first argument`);if(!await Y("delete").call(Z,W))return!1;return await X("delete").call(Z,J,W).delete(),!0};if(typeof Z.findOrFail!=="function")Z.findOrFail=async function(W){let B=await Y("findOrFail").call(Z,W);if(B==null)throw new g3($.name,W);return B};if(typeof Z.exists!=="function")Z.exists=async function(W){if(W==null)return!1;let B=X("exists").call(Z,J,W);if(typeof B.count==="function"){let L=await B.count();return Number(L)>0}let z=Z.find;return typeof z==="function"?await z.call(Z,W)!=null:!1};if(typeof Z.firstOrCreate!=="function")Z.firstOrCreate=async function(W,B={}){if(!W||typeof W!=="object"||Array.isArray(W))throw Error(`[ORM] ${$.name}.firstOrCreate requires a where-attrs object`);let z=X("firstOrCreate").call(Z,W),L=typeof z.first==="function"?await z.first():await z;if(L)return L;let H={...W,...B};return z8($,H),await G("firstOrCreate").call(Z,H)};if(typeof Z.updateOrCreate!=="function")Z.updateOrCreate=async function(W,B){if(!W||typeof W!=="object"||Array.isArray(W))throw Error(`[ORM] ${$.name}.updateOrCreate requires a where-attrs object`);if(!B||typeof B!=="object"||Array.isArray(B))throw Error(`[ORM] ${$.name}.updateOrCreate requires a values object`);let z=X("updateOrCreate").call(Z,W),L=typeof z.first==="function"?await z.first():await z;if(L){z8($,B);let T=L[J];await X("updateOrCreate").call(Z,J,T).update(B);let D=Z.find;return typeof D==="function"?await D.call(Z,T):{...L,...B}}let H={...W,...B};return z8($,H),await G("updateOrCreate").call(Z,H)};if(typeof Z.count!=="function")Z.count=async function(){let W=Z;if(typeof W.query==="function"){let L=W.query();if(typeof L?.count==="function"){let H=await L.count();return Number(H)||0}}let{all:B,get:z}=Z;if(typeof B==="function")return(await B.call(Z)||[]).length;if(typeof z==="function")return(await z.call(Z)||[]).length;return 0};if(typeof Z.pluck!=="function")Z.pluck=async function(W){if(!W||typeof W!=="string")throw Error(`[ORM] ${$.name}.pluck requires a column name`);let B=Z.all;return((typeof B==="function"?await B.call(Z):[])||[]).map((L)=>L?.[W])};if(typeof Z.whereIn!=="function")Z.whereIn=async function(W,B){if(!W||typeof W!=="string")throw Error(`[ORM] ${$.name}.whereIn requires a column name`);if(!Array.isArray(B))throw Error(`[ORM] ${$.name}.whereIn requires an array of values`);if(B.length===0)return[];let z=Z.where;if(typeof z!=="function")return[];let L=z.call(Z,W,"in",B);if(L&&typeof L.get==="function")return await L.get();return await L};let V=[["latest","desc"],["oldest","asc"]];for(let[W,B]of V)if(typeof Z[W]!=="function")Z[W]=async function(z="created_at"){let L=Z,H=typeof L.query==="function"?L.query():L;if(typeof H?.orderBy==="function"){let O=H.orderBy(z,B);if(typeof O.first==="function")return await O.first();if(typeof O.get==="function")return(await O.get())?.[0]??null}let T=Z.all;if(typeof T!=="function")return null;return[...await T.call(Z)||[]].sort((O,k)=>{let N=O?.[z],R=k?.[z];if(N===R)return 0;return(N>R?1:-1)*(B==="desc"?-1:1)})[0]??null};let U=h3($.traits?.useSearch);if(U){let W=U.index??$.table??$9(`${$.name}s`);if(typeof Z.search!=="function")Z.search=function(B,z){return CH(Z,W,B,z)};if(typeof Z.makeAllSearchable!=="function")Z.makeAllSearchable=async function(B=500){let z=Z.all;if(typeof z!=="function")throw Error(`[ORM] ${$.name}.makeAllSearchable cannot run: the underlying query builder did not expose all()`);let{useSearchEngine:L}=await import("@stacksjs/search-engine"),H=L(),T=0,D=Z.query;if(typeof D==="function")try{let k=D.call(Z);if(k&&typeof k.chunk==="function")return await k.chunk(B,async(N)=>{let R=N.map((M)=>y3(M,U)).filter(Boolean);if(R.length>0)await H.addDocuments(W,R);T+=R.length}),T}catch{}let O=(await z.call(Z)||[]).map((k)=>y3(k,U)).filter(Boolean);if(O.length>0)await H.addDocuments(W,O);return O.length};if(typeof Z.removeAllFromSearch!=="function")Z.removeAllFromSearch=async function(){let{useSearchEngine:B}=await import("@stacksjs/search-engine"),z=B();if(typeof z.deleteAllDocuments==="function"){await z.deleteAllDocuments(W);return}let L=Z.all,H=typeof L==="function"?await L.call(Z)||[]:[],T=B();for(let D of H){let q=D?.id??D?._attributes?.id;if(q!=null)await T.deleteDocument(W,Number(q))}}}}function y3(Z,$){if(typeof $.shape==="function")try{return $.shape(Z)}catch{return}let J=Z?.toSearchableObject?.();if(J!==void 0)return J;return Z?._attributes??(typeof Z?.toJSON==="function"?Z.toJSON():null)}function CH(Z,$,J,Q){let X={q:J,...Q??{}},Y={with(G){return X={...X,...G},Y},where(G){return X={...X,filter:G},Y},async get(){let{useSearchEngine:G}=await import("@stacksjs/search-engine");return(await G().search($,X))?.hits??[]},async paginate(G,V=1){let{useSearchEngine:U}=await import("@stacksjs/search-engine"),B=await U().search($,{...X,limit:G,offset:(V-1)*G});return{hits:B.hits??[],total:Number(B.estimatedTotalHits??B.nbHits??B.total??0),page:V,perPage:G}},async raw(){let{useSearchEngine:G}=await import("@stacksjs/search-engine");return await G().search($,X)}};return Y}async function zZ(Z,$){if(!Z||typeof Z!=="object")return;let J=Z._attributes??Z;for(let Q of $){if(!(Q in J))continue;let X=J[Q];if(!S0(X))continue;J[Q]=await Y9(X)}}function kH(Z,$){if($.length===0)return;let J=async(G)=>{if(Array.isArray(G)){for(let V of G)await zZ(V,$);return G}if(G&&typeof G==="object"&&Array.isArray(G.data)){for(let V of G.data)await zZ(V,$);return G}if(G)await zZ(G,$);return G},Q=["find","first","last","all","firstOrFail","findOrFail","findMany"];for(let G of Q){let V=Z[G];if(typeof V!=="function")continue;Z[G]=async function(...U){let W=await V.apply(this,U);return await J(W)}}let X=["create","firstOrCreate","updateOrCreate","make"];for(let G of X){let V=Z[G];if(typeof V!=="function")continue;Z[G]=async function(...U){let W=await V.apply(this,U);return await J(W)}}let Y=Z.update;if(typeof Y==="function")Z.update=async function(G,V){let U=await Y.call(this,G,V);return await J(U)}}function AH(Z,$){if($.length===0)return;let J=async(Y)=>{if(!Y||typeof Y!=="object"||Array.isArray(Y))return Y;let G={...Y};for(let V of $)if(V in G)G[V]=await X9(G[V]);return G},Q=["create","firstOrCreate","updateOrCreate"];for(let Y of Q){let G=Z[Y];if(typeof G!=="function")continue;Z[Y]=async function(...V){if(V[0]=await J(V[0]),V[1])V[1]=await J(V[1]);return await G.apply(this,V)}}let X=Z.update;if(typeof X==="function")Z.update=async function(Y,G){let V=await J(G);return await X.call(this,Y,V)}}function NH(Z,$){let J=Z.create;if(typeof J==="function")Z.create=async function(Q,...X){z8($,Q);let Y=await KZ($,Q);return await J.call(this,Y,...X)};for(let Q of["firstOrCreate","updateOrCreate"]){let X=Z[Q];if(typeof X!=="function")continue}}function xH(Z,$){let J=["create","firstOrCreate","updateOrCreate"];for(let X of J){let Y=Z[X];if(typeof Y==="function")Z[X]=async function(...G){if(h.debug(`[orm] ${X.charAt(0).toUpperCase()+X.slice(1)} ${String(Z.name||"unknown")}`,G[0]),G[0]&&typeof G[0]==="object"&&!Array.isArray(G[0]))G[0]=S3(G[0],$,"set");return await Y.apply(this,G)}}let Q=Z.update;if(typeof Q==="function")Z.update=async function(X,Y){let G=Y&&typeof Y==="object"&&!Array.isArray(Y)?S3(Y,$,"set"):Y;return await Q.call(this,X,G)}}function OF(Z){h.debug(`[orm] Defining model: ${Z.name} (table: ${Z.table})`);let $=IH(Z),J=SH(Z),Q=PH($,J),X=RH(Z);Z.__traitMethods=X;let Y=Q?{...Z,hooks:{...Z.hooks,...Q}}:Z,G=UH(Y);if(qH(G,Z.casts),FH(G,Y),NH(G,Y),Z.casts&&Object.keys(Z.casts).length>0)xH(G,Z.casts);let V=G9(Z);if(V.length>0)AH(G,V),kH(G,V);let U=Z.traits?.useSoftDeletes;if(U)vH(G,Y,U);let W=Z.traits?.useAudit;if(W){let z=CZ(W);kZ(G,Z.name,Z.primaryKey||"id",z)}G.withoutEvents=function(z){return B0(z)};for(let z of["create","update","firstOrCreate","updateOrCreate","forceCreate","forceUpdate","delete","forceDelete","softDelete","restore"]){let L=G[z];if(typeof L!=="function")continue;let H=`${z}Quietly`;if(typeof G[H]==="function")continue;G[H]=function(...T){return B0(()=>L.apply(G,T))}}let B=Object.assign(G,X,{...Z,getDefinition:()=>Z,_isStacksModel:!0});return zH(Z.name,B),B}function IH(Z){let $=Z.traits?.observe;if(!$)return;let J=Z.name.toLowerCase(),Q=(L)=>{let H=L?.attributes;if(!H||typeof H!=="object")return L;let T=Z.primaryKey||"id",D={...H};if(D[T]===void 0&&L[T]!==void 0)D[T]=L[T];return D},X=async(L,H)=>{if(W0())return;try{let{dispatch:T}=await import("@stacksjs/events");await T(L,H)}catch(T){if(T&&typeof T==="object"&&"code"in T&&T.code==="MODULE_NOT_FOUND")return;if(console.error(`[ORM] Event '${L}' handler error:`,T),process.env.STACKS_ORM_EVENT_ERRORS!=="swallow")throw T}},Y=Z.traits?.broadcastOn,G=Z.traits?.broadcastWith,V=typeof Y==="function"&&typeof G==="function",U=async(L,H)=>{if(!V)return;if(W0())return;try{let T=Y(H),D=Array.isArray(T)?T:[T],q=G(H),k=(await import("@stacksjs/realtime").catch(()=>null))?.broadcast;if(typeof k!=="function")return;for(let N of D){if(typeof N!=="string"||N.length===0)continue;await k(N,L,q)}}catch(T){if(T&&typeof T==="object"&&"code"in T&&T.code==="MODULE_NOT_FOUND")return;if(console.error(`[ORM] Broadcast '${L}' handler error:`,T),process.env.STACKS_ORM_BROADCAST_ERRORS==="throw")throw T}},W=async(L,H)=>{if(W0())return!0;try{let{dispatchAsync:T}=await import("@stacksjs/events"),D=await T(L,H);if(Array.isArray(D)&&D.some((q)=>q===!1))return!1}catch(T){if(T&&typeof T==="object"&&"code"in T&&T.code==="MODULE_NOT_FOUND")return!0;if(console.error(`[ORM] Before-event '${L}' handler error:`,T),process.env.STACKS_ORM_EVENT_ERRORS!=="swallow")throw T}return!0},B=$===!0?["create","update","delete"]:Array.isArray($)?$:[],z={};if(B.includes("create"))z.beforeCreate=async(L)=>{if(h.debug(`[orm] Create ${J}`,L),!await W(`${J}:saving`,L))throw Error(`[ORM] ${J}:saving event cancelled the operation`);if(!await W(`${J}:creating`,L))throw Error(`[ORM] ${J}:creating event cancelled the operation`)},z.afterCreate=async(L)=>{let H=Q(L);await X(`${J}:created`,H),await X(`${J}:saved`,H),await U(`${J}:created`,L)};if(B.includes("update"))z.beforeUpdate=async(L)=>{if(h.debug(`[orm] Update ${J}#${L?.id??"unknown"}`,L),!await W(`${J}:saving`,L))throw Error(`[ORM] ${J}:saving event cancelled the operation`);if(!await W(`${J}:updating`,L))throw Error(`[ORM] ${J}:updating event cancelled the operation`)},z.afterUpdate=async(L)=>{let H=Q(L);await X(`${J}:updated`,H),await X(`${J}:saved`,H),await U(`${J}:updated`,L)};if(B.includes("delete"))z.beforeDelete=async(L)=>{if(h.debug(`[orm] Delete ${J}#${L?.id??"unknown"}`),!await W(`${J}:deleting`,L))throw Error(`[ORM] ${J}:deleting event cancelled the operation`)},z.afterDelete=async(L)=>{await X(`${J}:deleted`,Q(L)),await U(`${J}:deleted`,L)};return z}function PH(...Z){let $={},J=new Set;for(let Q of Z){if(!Q)continue;for(let X of Object.keys(Q))J.add(X)}for(let Q of J){let X=Z.map((Y)=>Y?.[Q]).filter((Y)=>typeof Y==="function");if(!X.length)continue;$[Q]=async(...Y)=>{for(let G of X)await G(...Y)}}return Object.keys($).length?$:void 0}function h3(Z){if(!Z)return null;if(Z===!0)return{};if(typeof Z==="object")return Z;return null}function SH(Z){let $=h3(Z.traits?.useSearch);if(!$)return;let J=$,Q=J.index??Z.table??$9(`${Z.name}s`);function X(V){if(typeof J.shape==="function")try{return J.shape(V)}catch(B){h.warn(`[orm/search] shape() threw for ${Z.name}: ${B.message}`);return}let W=m(V).toSearchableObject?.();if(W!==void 0)return W;return V?._attributes??(typeof V?.toJSON==="function"?V.toJSON():null)}let Y=async(V)=>{if(W0())return;let U=X(V);if(!U)return;if($.queueable){try{let{Jobs:W}=await import("@stacksjs/queue");await W.dispatch("SyncSearchIndex",{index:Q,op:"upsert",doc:U})}catch(W){h.warn(`[orm/search] queue dispatch failed for ${Z.name}; falling back to inline: ${W.message}`),await j3(Q,U,Z.name)}return}await j3(Q,U,Z.name)};return{afterCreate:Y,afterUpdate:Y,afterDelete:async(V)=>{if(W0())return;let U=V?.id??V?._attributes?.id;if(U==null)return;if($.queueable){try{let{Jobs:W}=await import("@stacksjs/queue");await W.dispatch("SyncSearchIndex",{index:Q,op:"delete",id:Number(U)})}catch(W){h.warn(`[orm/search] queue dispatch failed for ${Z.name}#${U}; falling back to inline: ${W.message}`),await b3(Q,Number(U),Z.name)}return}await b3(Q,Number(U),Z.name)}}}async function j3(Z,$,J){try{let{useSearchEngine:Q}=await import("@stacksjs/search-engine");await Q().addDocument(Z,$)}catch(Q){h.warn(`[orm/search] Failed to index ${J}: ${Q.message}`)}}async function b3(Z,$,J){try{let{useSearchEngine:Q}=await import("@stacksjs/search-engine");await Q().deleteDocument(Z,$)}catch(Q){h.warn(`[orm/search] Failed to remove ${J}#${$}: ${Q.message}`)}}function RH(Z){let $={},J=Z.table,Q=Z.traits;if(!Q)return $;if(Q.taggable)$._taggable=jZ(J);if(Q.categorizable)$._categorizable=bZ(J);if(Q.commentable)$._commentable=MZ(J);if(Q.billable)$._billable=k3(J);if(Q.likeable){let Y=typeof Q.likeable==="object"?Q.likeable:void 0;$._likeable=A3(J,Y)}let X=Q.useAuth||Q.authenticatable;if(typeof X==="object"&&X&&"useTwoFactor"in X&&X.useTwoFactor)$._twoFactor=N3();return $}function vH(Z,$,J){let Q=x3(Z,$.primaryKey||"id"),X=I3(J),Y=$,G=$.name.toLowerCase(),V=$.traits?.observe!=null&&$.traits?.observe!==!1,U=async(H)=>{if(!V||W0())return!0;try{let{dispatchAsync:T}=await import("@stacksjs/events"),D=await T(`${G}:restoring`,{id:H});if(Array.isArray(D)&&D.some((q)=>q===!1))return!1}catch(T){if(T?.code!=="MODULE_NOT_FOUND")console.error(`[ORM] Before-event '${G}:restoring' handler error:`,T)}return!0},W=async(H)=>{if(!V||W0())return;try{let{dispatch:T}=await import("@stacksjs/events");await T(`${G}:restored`,{id:H})}catch(T){if(T?.code!=="MODULE_NOT_FOUND")console.error(`[ORM] Event '${G}:restored' handler error:`,T)}},B=process.env.STACKS_ORM_CASCADE_SWALLOW!=="true",z=async(H)=>{if(!X.cascade?.length||!B){let D=await Q.softDelete(H);if(D&&X.cascade?.length)await U8(Y,X,H,"softDelete");return D}let{db:T}=await import("@stacksjs/database");return await T.transaction(async()=>{let D=await Q.softDelete(H);if(D)await U8(Y,X,H,"softDelete");return D})},L=async(H)=>{if(!await U(H))return!1;if(!X.cascade?.length||!B){let O=await Q.restore(H);if(O){if(X.cascade?.length)await U8(Y,X,H,"restore");await W(H)}return O}let{db:D}=await import("@stacksjs/database"),q=await D.transaction(async()=>{let O=await Q.restore(H);if(O)await U8(Y,X,H,"restore");return O});if(q)await W(H);return q};Z.softDelete=z,Z.restore=L,Z.forceDelete=Q.forceDelete,Z.withTrashed=Q.withTrashed,Z.onlyTrashed=Q.onlyTrashed,Z.delete=z}function yH(Z){if(Z==null)return Z;if(Array.isArray(Z))return Z.map(yH);if(typeof Z!=="object")return Z;if(typeof Z.toJSON==="function")return Z.toJSON();if(Z._attributes&&typeof Z._attributes==="object")return Z._attributes;return Z}import{log as jH}from"@stacksjs/logging";import{path as U0}from"@stacksjs/path";import{fs as L8}from"@stacksjs/storage";function z0(Z){return Z.replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/(\d)([A-Za-z])/g,"$1_$2").toLowerCase()}function bH(Z){let $=typeof Z.type==="string"?Z.type.toLowerCase():"",J=(()=>{switch($){case"string":case"text":case"longtext":case"mediumtext":case"tinytext":case"char":case"varchar":case"enum":case"uuid":case"date":case"datetime":case"timestamp":case"timestamptz":case"time":case"year":return"string";case"integer":case"int":case"tinyint":case"smallint":case"mediumint":case"float":case"double":case"decimal":case"numeric":return"number";case"bigint":return"number | bigint";case"boolean":case"bool":return"boolean";case"json":case"jsonb":return"unknown";case"binary":case"blob":case"bytea":return"Uint8Array";default:return"unknown"}})();return Z.nullable===!0?`${J} | null`:J}function fH(Z){let $={},J=Z.belongsTo;if(!J)return $;let Q=Array.isArray(J)?J:Object.keys(J);for(let X of Q)$[`${z0(X)}_id`]="number";return $}function MH(Z,$){let[J,Q]=[z0(Z),z0($)].sort();return`${J}_${Q}`}function _H(Z,$){let J=$.belongsToMany;if(!J)return[];let Q=[],X=Array.isArray(J)?J:[];for(let Y of X){let G,V,U,W;if(typeof Y==="string")G=Y;else if(Y&&typeof Y==="object"&&"model"in Y){let H=Y;G=H.model,V=H.pivotTable,U=H.firstForeignKey,W=H.secondForeignKey}else continue;let B=V??MH(Z,G),z=U??`${z0(Z)}_id`,L=W??`${z0(G)}_id`;Q.push({table:B,columns:{id:"number",[z]:"number",[L]:"number",created_at:"string",updated_at:"string | null"}})}return Q}function gH(Z){let $={id:"number"},J=Z.traits??{};if(J.useUuid)$.uuid="string";if((J.useTimestamps??J.timestampable)!==!1)$.created_at="string",$.updated_at="string | null";if(J.useSoftDeletes??J.softDeletable)$.deleted_at="string | null";return $}function hH(Z){let $={},J=Z.attributes??{};for(let[Q,X]of Object.entries(J))$[z0(Q)]=bH(X);return $}function m3(Z,$){let J=Object.entries($).map(([Q,X])=>` ${Q}: ${X}`).join(`
13
+ `+C+`
14
+ `+x})}let f=Math.floor((typeof T==="number"?T:Date.now())/1000)-H.timestamp;if(U>0&&f>U)throw new u.StripeSignatureVerificationError(K,B,{message:"Timestamp outside the tolerance zone"});return!0}function G(B,K){if(typeof B!=="string")return null;return K=K||J.EXPECTED_SCHEME,B.split(",").reduce((H,w)=>{let U=w.split("=");if(U[0]==="t")H.timestamp=parseInt(U[1],10);if(U[0]===K)H.signatures.push(U[1]);return H},{timestamp:-1,signatures:[]})}let W=null;function z(){if(!W)W=Z.createDefaultCryptoProvider();return W}function V(B){if(!B)throw new u.StripeError({message:"Options are required"});let K=B.timestamp&&Math.floor(B.timestamp)||Math.floor(Date.now()/1000),H=B.scheme||J.EXPECTED_SCHEME,w=B.cryptoProvider||z(),U=`${K}.${B.payload}`;return{...B,timestamp:K,scheme:H,cryptoProvider:w,payloadString:U,generateHeaderString:(L)=>{return`t=${K},${H}=${L}`}}}return $.signature=J,$}Q1.createWebhooks=wz});var z1=O((V1)=>{Object.defineProperty(V1,"__esModule",{value:!0});V1.ApiMajorVersion=V1.ApiVersion=void 0;V1.ApiVersion="2026-06-24.dahlia";V1.ApiMajorVersion="dahlia"});var O1=O((K1)=>{Object.defineProperty(K1,"__esModule",{value:!0});K1.resourceNamespace=void 0;function Uz(Z,$){for(let J in $){if(!Object.prototype.hasOwnProperty.call($,J))continue;let Y=J[0].toLowerCase()+J.substring(1),X=new $[J](Z);this[Y]=X}}function qz(Z,$){return function(J){return new Uz(J,$)}}K1.resourceNamespace=qz});var v8=O((F1)=>{Object.defineProperty(F1,"__esModule",{value:!0});F1.AccountLinkResource=void 0;var Dz=F();class w1 extends Dz.StripeResource{create(Z,$){return this._makeRequest("POST","/v2/core/account_links",Z,$)}}F1.AccountLinkResource=w1});var j8=O((D1)=>{Object.defineProperty(D1,"__esModule",{value:!0});D1.AccountTokenResource=void 0;var Lz=F();class q1 extends Lz.StripeResource{create(Z,$){return this._makeRequest("POST","/v2/core/account_tokens",Z,$,{requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}})}retrieve(Z,$,J){return this._makeRequest("GET",`/v2/core/account_tokens/${encodeURIComponent(Z)}`,$,J)}}D1.AccountTokenResource=q1});var _8=O((T1)=>{Object.defineProperty(T1,"__esModule",{value:!0});T1.AccountResource=void 0;var Az=F();class A1 extends Az.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/financial_connections/accounts",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/financial_connections/accounts/${encodeURIComponent(Z)}`,$,J)}disconnect(Z,$,J){return this._makeRequest("POST",`/v1/financial_connections/accounts/${encodeURIComponent(Z)}/disconnect`,$,J)}refresh(Z,$,J){return this._makeRequest("POST",`/v1/financial_connections/accounts/${encodeURIComponent(Z)}/refresh`,$,J)}subscribe(Z,$,J){return this._makeRequest("POST",`/v1/financial_connections/accounts/${encodeURIComponent(Z)}/subscribe`,$,J)}unsubscribe(Z,$,J){return this._makeRequest("POST",`/v1/financial_connections/accounts/${encodeURIComponent(Z)}/unsubscribe`,$,J)}listOwners(Z,$,J){return this._makeRequest("GET",`/v1/financial_connections/accounts/${encodeURIComponent(Z)}/owners`,$,J,{methodType:"list"})}}T1.AccountResource=A1});var P1=O((k1)=>{Object.defineProperty(k1,"__esModule",{value:!0});k1.PersonResource=void 0;var Tz=F();class N1 extends Tz.StripeResource{list(Z,$,J){return this._makeRequest("GET",`/v2/core/accounts/${encodeURIComponent(Z)}/persons`,$,J,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}})}create(Z,$,J){return this._makeRequest("POST",`/v2/core/accounts/${encodeURIComponent(Z)}/persons`,$,J,{requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}})}del(Z,$,J,Y){return this._makeRequest("DELETE",`/v2/core/accounts/${encodeURIComponent(Z)}/persons/${encodeURIComponent($)}`,J,Y)}retrieve(Z,$,J,Y){return this._makeRequest("GET",`/v2/core/accounts/${encodeURIComponent(Z)}/persons/${encodeURIComponent($)}`,J,Y,{responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}})}update(Z,$,J,Y){return this._makeRequest("POST",`/v2/core/accounts/${encodeURIComponent(Z)}/persons/${encodeURIComponent($)}`,J,Y,{requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}})}}k1.PersonResource=N1});var M1=O((x1)=>{Object.defineProperty(x1,"__esModule",{value:!0});x1.PersonTokenResource=void 0;var Ez=F();class I1 extends Ez.StripeResource{create(Z,$,J){return this._makeRequest("POST",`/v2/core/accounts/${encodeURIComponent(Z)}/person_tokens`,$,J,{requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}})}retrieve(Z,$,J,Y){return this._makeRequest("GET",`/v2/core/accounts/${encodeURIComponent(Z)}/person_tokens/${encodeURIComponent($)}`,J,Y)}}x1.PersonTokenResource=I1});var R8=O((h1)=>{Object.defineProperty(h1,"__esModule",{value:!0});h1.AccountResource=void 0;var Nz=F(),kz=P1(),Cz=M1();class f1 extends Nz.StripeResource{constructor(Z){super(Z);this.stripe=Z,this.persons=new kz.PersonResource(Z),this.personTokens=new Cz.PersonTokenResource(Z)}list(Z,$){return this._makeRequest("GET","/v2/core/accounts",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}}}})}create(Z,$){return this._makeRequest("POST","/v2/core/accounts",Z,$,{requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}},responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}})}retrieve(Z,$,J){return this._makeRequest("GET",`/v2/core/accounts/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}})}update(Z,$,J){return this._makeRequest("POST",`/v2/core/accounts/${encodeURIComponent(Z)}`,$,J,{requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}},responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}})}close(Z,$,J){return this._makeRequest("POST",`/v2/core/accounts/${encodeURIComponent(Z)}/close`,$,J,{responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}})}}h1.AccountResource=f1});var g8=O((v1)=>{Object.defineProperty(v1,"__esModule",{value:!0});v1.ActiveEntitlementResource=void 0;var Pz=F();class y1 extends Pz.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/entitlements/active_entitlements",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/entitlements/active_entitlements/${encodeURIComponent(Z)}`,$,J)}}v1.ActiveEntitlementResource=y1});var u8=O((R1)=>{Object.defineProperty(R1,"__esModule",{value:!0});R1.AlertResource=void 0;var Iz=F();class _1 extends Iz.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/billing/alerts",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/billing/alerts",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/billing/alerts/${encodeURIComponent(Z)}`,$,J)}activate(Z,$,J){return this._makeRequest("POST",`/v1/billing/alerts/${encodeURIComponent(Z)}/activate`,$,J)}archive(Z,$,J){return this._makeRequest("POST",`/v1/billing/alerts/${encodeURIComponent(Z)}/archive`,$,J)}deactivate(Z,$,J){return this._makeRequest("POST",`/v1/billing/alerts/${encodeURIComponent(Z)}/deactivate`,$,J)}}R1.AlertResource=_1});var c8=O((c1)=>{Object.defineProperty(c1,"__esModule",{value:!0});c1.AssociationResource=void 0;var xz=F();class u1 extends xz.StripeResource{find(Z,$){return this._makeRequest("GET","/v1/tax/associations/find",Z,$)}}c1.AssociationResource=u1});var m8=O((d1)=>{Object.defineProperty(d1,"__esModule",{value:!0});d1.AuthorizationResource=void 0;var Sz=F();class l1 extends Sz.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/issuing/authorizations",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/issuing/authorizations/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})}update(Z,$,J){return this._makeRequest("POST",`/v1/issuing/authorizations/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})}approve(Z,$,J){return this._makeRequest("POST",`/v1/issuing/authorizations/${encodeURIComponent(Z)}/approve`,$,J,{responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})}decline(Z,$,J){return this._makeRequest("POST",`/v1/issuing/authorizations/${encodeURIComponent(Z)}/decline`,$,J,{responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})}}d1.AuthorizationResource=l1});var l8=O((i1)=>{Object.defineProperty(i1,"__esModule",{value:!0});i1.AuthorizationResource=void 0;var Mz=F();class p1 extends Mz.StripeResource{create(Z,$){return this._makeRequest("POST","/v1/test_helpers/issuing/authorizations",Z,$,{requestSchema:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})}capture(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/issuing/authorizations/${encodeURIComponent(Z)}/capture`,$,J,{requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})}expire(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/issuing/authorizations/${encodeURIComponent(Z)}/expire`,$,J,{responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})}finalizeAmount(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/issuing/authorizations/${encodeURIComponent(Z)}/finalize_amount`,$,J,{requestSchema:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})}respond(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/issuing/authorizations/${encodeURIComponent(Z)}/fraud_challenges/respond`,$,J,{responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})}increment(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/issuing/authorizations/${encodeURIComponent(Z)}/increment`,$,J,{responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})}reverse(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/issuing/authorizations/${encodeURIComponent(Z)}/reverse`,$,J,{responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})}}i1.AuthorizationResource=p1});var d8=O((a1)=>{Object.defineProperty(a1,"__esModule",{value:!0});a1.CalculationResource=void 0;var fz=F();class t1 extends fz.StripeResource{retrieve(Z,$,J){return this._makeRequest("GET",`/v1/tax/calculations/${encodeURIComponent(Z)}`,$,J)}create(Z,$){return this._makeRequest("POST","/v1/tax/calculations",Z,$)}listLineItems(Z,$,J){return this._makeRequest("GET",`/v1/tax/calculations/${encodeURIComponent(Z)}/line_items`,$,J,{methodType:"list"})}}a1.CalculationResource=t1});var n8=O((e1)=>{Object.defineProperty(e1,"__esModule",{value:!0});e1.CardholderResource=void 0;var hz=F();class s1 extends hz.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/issuing/cardholders",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/issuing/cardholders",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/issuing/cardholders/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/issuing/cardholders/${encodeURIComponent(Z)}`,$,J)}}e1.CardholderResource=s1});var p8=O((J4)=>{Object.defineProperty(J4,"__esModule",{value:!0});J4.CardResource=void 0;var bz=F();class $4 extends bz.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/issuing/cards",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/issuing/cards",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/issuing/cards/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/issuing/cards/${encodeURIComponent(Z)}`,$,J)}}J4.CardResource=$4});var i8=O((Q4)=>{Object.defineProperty(Q4,"__esModule",{value:!0});Q4.CardResource=void 0;var yz=F();class X4 extends yz.StripeResource{deliverCard(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/issuing/cards/${encodeURIComponent(Z)}/shipping/deliver`,$,J)}failCard(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/issuing/cards/${encodeURIComponent(Z)}/shipping/fail`,$,J)}returnCard(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/issuing/cards/${encodeURIComponent(Z)}/shipping/return`,$,J)}shipCard(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/issuing/cards/${encodeURIComponent(Z)}/shipping/ship`,$,J)}submitCard(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/issuing/cards/${encodeURIComponent(Z)}/shipping/submit`,$,J)}}Q4.CardResource=X4});var r8=O((V4)=>{Object.defineProperty(V4,"__esModule",{value:!0});V4.ConfigurationResource=void 0;var vz=F();class W4 extends vz.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/billing_portal/configurations",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/billing_portal/configurations",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/billing_portal/configurations/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/billing_portal/configurations/${encodeURIComponent(Z)}`,$,J)}}V4.ConfigurationResource=W4});var t8=O((K4)=>{Object.defineProperty(K4,"__esModule",{value:!0});K4.ConfigurationResource=void 0;var jz=F();class z4 extends jz.StripeResource{del(Z,$,J){return this._makeRequest("DELETE",`/v1/terminal/configurations/${encodeURIComponent(Z)}`,$,J)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/terminal/configurations/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/terminal/configurations/${encodeURIComponent(Z)}`,$,J)}list(Z,$){return this._makeRequest("GET","/v1/terminal/configurations",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/terminal/configurations",Z,$)}}K4.ConfigurationResource=z4});var a8=O((w4)=>{Object.defineProperty(w4,"__esModule",{value:!0});w4.ConfirmationTokenResource=void 0;var _z=F();class O4 extends _z.StripeResource{create(Z,$){return this._makeRequest("POST","/v1/test_helpers/confirmation_tokens",Z,$)}}w4.ConfirmationTokenResource=O4});var o8=O((q4)=>{Object.defineProperty(q4,"__esModule",{value:!0});q4.ConnectionTokenResource=void 0;var Rz=F();class U4 extends Rz.StripeResource{create(Z,$){return this._makeRequest("POST","/v1/terminal/connection_tokens",Z,$)}}q4.ConnectionTokenResource=U4});var s8=O((A4)=>{Object.defineProperty(A4,"__esModule",{value:!0});A4.CreditBalanceSummaryResource=void 0;var gz=F();class L4 extends gz.StripeResource{retrieve(Z,$){return this._makeRequest("GET","/v1/billing/credit_balance_summary",Z,$)}}A4.CreditBalanceSummaryResource=L4});var e8=O((N4)=>{Object.defineProperty(N4,"__esModule",{value:!0});N4.CreditBalanceTransactionResource=void 0;var uz=F();class E4 extends uz.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/billing/credit_balance_transactions",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/billing/credit_balance_transactions/${encodeURIComponent(Z)}`,$,J)}}N4.CreditBalanceTransactionResource=E4});var Z6=O((P4)=>{Object.defineProperty(P4,"__esModule",{value:!0});P4.CreditGrantResource=void 0;var cz=F();class C4 extends cz.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/billing/credit_grants",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/billing/credit_grants",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/billing/credit_grants/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/billing/credit_grants/${encodeURIComponent(Z)}`,$,J)}expire(Z,$,J){return this._makeRequest("POST",`/v1/billing/credit_grants/${encodeURIComponent(Z)}/expire`,$,J)}voidGrant(Z,$,J){return this._makeRequest("POST",`/v1/billing/credit_grants/${encodeURIComponent(Z)}/void`,$,J)}}P4.CreditGrantResource=C4});var $6=O((S4)=>{Object.defineProperty(S4,"__esModule",{value:!0});S4.CreditReversalResource=void 0;var mz=F();class x4 extends mz.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/treasury/credit_reversals",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/treasury/credit_reversals",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/treasury/credit_reversals/${encodeURIComponent(Z)}`,$,J)}}S4.CreditReversalResource=x4});var J6=O((h4)=>{Object.defineProperty(h4,"__esModule",{value:!0});h4.CustomerResource=void 0;var lz=F();class f4 extends lz.StripeResource{fundCashBalance(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/customers/${encodeURIComponent(Z)}/fund_cash_balance`,$,J)}}h4.CustomerResource=f4});var Y6=O((v4)=>{Object.defineProperty(v4,"__esModule",{value:!0});v4.DebitReversalResource=void 0;var dz=F();class y4 extends dz.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/treasury/debit_reversals",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/treasury/debit_reversals",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/treasury/debit_reversals/${encodeURIComponent(Z)}`,$,J)}}v4.DebitReversalResource=y4});var X6=O((R4)=>{Object.defineProperty(R4,"__esModule",{value:!0});R4.DisputeResource=void 0;var nz=F();class _4 extends nz.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/issuing/disputes",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/issuing/disputes",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/issuing/disputes/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/issuing/disputes/${encodeURIComponent(Z)}`,$,J)}submit(Z,$,J){return this._makeRequest("POST",`/v1/issuing/disputes/${encodeURIComponent(Z)}/submit`,$,J)}}R4.DisputeResource=_4});var Q6=O((c4)=>{Object.defineProperty(c4,"__esModule",{value:!0});c4.EarlyFraudWarningResource=void 0;var pz=F();class u4 extends pz.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/radar/early_fraud_warnings",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/radar/early_fraud_warnings/${encodeURIComponent(Z)}`,$,J)}}c4.EarlyFraudWarningResource=u4});var G6=O((d4)=>{Object.defineProperty(d4,"__esModule",{value:!0});d4.EventDestinationResource=void 0;var iz=F();class l4 extends iz.StripeResource{list(Z,$){return this._makeRequest("GET","/v2/core/event_destinations",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v2/core/event_destinations",Z,$)}del(Z,$,J){return this._makeRequest("DELETE",`/v2/core/event_destinations/${encodeURIComponent(Z)}`,$,J)}retrieve(Z,$,J){return this._makeRequest("GET",`/v2/core/event_destinations/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v2/core/event_destinations/${encodeURIComponent(Z)}`,$,J)}disable(Z,$,J){return this._makeRequest("POST",`/v2/core/event_destinations/${encodeURIComponent(Z)}/disable`,$,J)}enable(Z,$,J){return this._makeRequest("POST",`/v2/core/event_destinations/${encodeURIComponent(Z)}/enable`,$,J)}ping(Z,$,J){return this._makeRequest("POST",`/v2/core/event_destinations/${encodeURIComponent(Z)}/ping`,$,J)}}d4.EventDestinationResource=l4});var W6=O((i4)=>{Object.defineProperty(i4,"__esModule",{value:!0});i4.EventResource=void 0;var rz=F();class p4 extends rz.StripeResource{list(Z,$){let J=(Y)=>{return{...Y,data:Y.data.map(this.addFetchRelatedObjectIfNeeded.bind(this))}};return this._makeRequest("GET","/v2/core/events",Z,$,{methodType:"list",transformResponseData:J})}retrieve(Z,$,J){let Y=(X)=>{return this.addFetchRelatedObjectIfNeeded(X)};return this._makeRequest("GET",`/v2/core/events/${encodeURIComponent(Z)}`,$,J,{transformResponseData:Y})}addFetchRelatedObjectIfNeeded(Z){if(!Z.related_object||!Z.related_object.url)return Z;return{...Z,fetchRelatedObject:()=>this._makeRequest("GET",Z.related_object.url,void 0,{stripeContext:Z.context,headers:{"Stripe-Request-Trigger":`event=${Z.id}`}})}}}i4.EventResource=p4});var V6=O((a4)=>{Object.defineProperty(a4,"__esModule",{value:!0});a4.FeatureResource=void 0;var tz=F();class t4 extends tz.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/entitlements/features",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/entitlements/features",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/entitlements/features/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/entitlements/features/${encodeURIComponent(Z)}`,$,J)}}a4.FeatureResource=t4});var B6=O((e4)=>{Object.defineProperty(e4,"__esModule",{value:!0});e4.FinancialAccountResource=void 0;var az=F();class s4 extends az.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/treasury/financial_accounts",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/treasury/financial_accounts",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/treasury/financial_accounts/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/treasury/financial_accounts/${encodeURIComponent(Z)}`,$,J)}close(Z,$,J){return this._makeRequest("POST",`/v1/treasury/financial_accounts/${encodeURIComponent(Z)}/close`,$,J)}updateFeatures(Z,$,J){return this._makeRequest("POST",`/v1/treasury/financial_accounts/${encodeURIComponent(Z)}/features`,$,J)}retrieveFeatures(Z,$,J){return this._makeRequest("GET",`/v1/treasury/financial_accounts/${encodeURIComponent(Z)}/features`,$,J)}}e4.FinancialAccountResource=s4});var z6=O((J7)=>{Object.defineProperty(J7,"__esModule",{value:!0});J7.ImportResource=void 0;var oz=F();class $7 extends oz.StripeResource{list(Z,$){return this._makeRequest("GET","/v2/commerce/product_catalog/imports",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{status_details:{kind:"object",fields:{processing:{kind:"object",fields:{error_count:{kind:"int64_string"},success_count:{kind:"int64_string"}}},succeeded:{kind:"object",fields:{success_count:{kind:"int64_string"}}},succeeded_with_errors:{kind:"object",fields:{error_count:{kind:"int64_string"},error_file:{kind:"object",fields:{size:{kind:"int64_string"}}},samples:{kind:"array",element:{kind:"object",fields:{row:{kind:"int64_string"}}}},success_count:{kind:"int64_string"}}}}}}}}}}})}create(Z,$){return this._makeRequest("POST","/v2/commerce/product_catalog/imports",Z,$,{responseSchema:{kind:"object",fields:{status_details:{kind:"object",fields:{processing:{kind:"object",fields:{error_count:{kind:"int64_string"},success_count:{kind:"int64_string"}}},succeeded:{kind:"object",fields:{success_count:{kind:"int64_string"}}},succeeded_with_errors:{kind:"object",fields:{error_count:{kind:"int64_string"},error_file:{kind:"object",fields:{size:{kind:"int64_string"}}},samples:{kind:"array",element:{kind:"object",fields:{row:{kind:"int64_string"}}}},success_count:{kind:"int64_string"}}}}}}}})}retrieve(Z,$,J){return this._makeRequest("GET",`/v2/commerce/product_catalog/imports/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{status_details:{kind:"object",fields:{processing:{kind:"object",fields:{error_count:{kind:"int64_string"},success_count:{kind:"int64_string"}}},succeeded:{kind:"object",fields:{success_count:{kind:"int64_string"}}},succeeded_with_errors:{kind:"object",fields:{error_count:{kind:"int64_string"},error_file:{kind:"object",fields:{size:{kind:"int64_string"}}},samples:{kind:"array",element:{kind:"object",fields:{row:{kind:"int64_string"}}}},success_count:{kind:"int64_string"}}}}}}}})}}J7.ImportResource=$7});var K6=O((Q7)=>{Object.defineProperty(Q7,"__esModule",{value:!0});Q7.InboundTransferResource=void 0;var sz=F();class X7 extends sz.StripeResource{fail(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/treasury/inbound_transfers/${encodeURIComponent(Z)}/fail`,$,J)}returnInboundTransfer(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/treasury/inbound_transfers/${encodeURIComponent(Z)}/return`,$,J)}succeed(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/treasury/inbound_transfers/${encodeURIComponent(Z)}/succeed`,$,J)}}Q7.InboundTransferResource=X7});var H6=O((V7)=>{Object.defineProperty(V7,"__esModule",{value:!0});V7.InboundTransferResource=void 0;var ez=F();class W7 extends ez.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/treasury/inbound_transfers",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/treasury/inbound_transfers",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/treasury/inbound_transfers/${encodeURIComponent(Z)}`,$,J)}cancel(Z,$,J){return this._makeRequest("POST",`/v1/treasury/inbound_transfers/${encodeURIComponent(Z)}/cancel`,$,J)}}V7.InboundTransferResource=W7});var O6=O((K7)=>{Object.defineProperty(K7,"__esModule",{value:!0});K7.LocationResource=void 0;var ZK=F();class z7 extends ZK.StripeResource{del(Z,$,J){return this._makeRequest("DELETE",`/v1/terminal/locations/${encodeURIComponent(Z)}`,$,J)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/terminal/locations/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/terminal/locations/${encodeURIComponent(Z)}`,$,J)}list(Z,$){return this._makeRequest("GET","/v1/terminal/locations",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/terminal/locations",Z,$)}}K7.LocationResource=z7});var w6=O((w7)=>{Object.defineProperty(w7,"__esModule",{value:!0});w7.MeterEventAdjustmentResource=void 0;var $K=F();class O7 extends $K.StripeResource{create(Z,$){return this._makeRequest("POST","/v1/billing/meter_event_adjustments",Z,$)}}w7.MeterEventAdjustmentResource=O7});var F6=O((q7)=>{Object.defineProperty(q7,"__esModule",{value:!0});q7.MeterEventAdjustmentResource=void 0;var JK=F();class U7 extends JK.StripeResource{create(Z,$){return this._makeRequest("POST","/v2/billing/meter_event_adjustments",Z,$)}}q7.MeterEventAdjustmentResource=U7});var U6=O((A7)=>{Object.defineProperty(A7,"__esModule",{value:!0});A7.MeterEventSessionResource=void 0;var YK=F();class L7 extends YK.StripeResource{create(Z,$){return this._makeRequest("POST","/v2/billing/meter_event_session",Z,$)}}A7.MeterEventSessionResource=L7});var q6=O((N7)=>{Object.defineProperty(N7,"__esModule",{value:!0});N7.MeterEventStreamResource=void 0;var XK=F();class E7 extends XK.StripeResource{create(Z,$){return this._makeRequest("POST","/v2/billing/meter_event_stream",Z,$,{apiBase:"meter_events"})}}N7.MeterEventStreamResource=E7});var D6=O((P7)=>{Object.defineProperty(P7,"__esModule",{value:!0});P7.MeterEventResource=void 0;var QK=F();class C7 extends QK.StripeResource{create(Z,$){return this._makeRequest("POST","/v1/billing/meter_events",Z,$)}}P7.MeterEventResource=C7});var L6=O((S7)=>{Object.defineProperty(S7,"__esModule",{value:!0});S7.MeterEventResource=void 0;var GK=F();class x7 extends GK.StripeResource{create(Z,$){return this._makeRequest("POST","/v2/billing/meter_events",Z,$)}}S7.MeterEventResource=x7});var A6=O((h7)=>{Object.defineProperty(h7,"__esModule",{value:!0});h7.MeterResource=void 0;var WK=F();class f7 extends WK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/billing/meters",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/billing/meters",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/billing/meters/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/billing/meters/${encodeURIComponent(Z)}`,$,J)}deactivate(Z,$,J){return this._makeRequest("POST",`/v1/billing/meters/${encodeURIComponent(Z)}/deactivate`,$,J)}reactivate(Z,$,J){return this._makeRequest("POST",`/v1/billing/meters/${encodeURIComponent(Z)}/reactivate`,$,J)}listEventSummaries(Z,$,J){return this._makeRequest("GET",`/v1/billing/meters/${encodeURIComponent(Z)}/event_summaries`,$,J,{methodType:"list"})}}h7.MeterResource=f7});var T6=O((v7)=>{Object.defineProperty(v7,"__esModule",{value:!0});v7.OnboardingLinkResource=void 0;var VK=F();class y7 extends VK.StripeResource{create(Z,$){return this._makeRequest("POST","/v1/terminal/onboarding_links",Z,$)}}v7.OnboardingLinkResource=y7});var E6=O((R7)=>{Object.defineProperty(R7,"__esModule",{value:!0});R7.OrderResource=void 0;var BK=F();class _7 extends BK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/climate/orders",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}}}})}create(Z,$){return this._makeRequest("POST","/v1/climate/orders",Z,$,{requestSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/climate/orders/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}})}update(Z,$,J){return this._makeRequest("POST",`/v1/climate/orders/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}})}cancel(Z,$,J){return this._makeRequest("POST",`/v1/climate/orders/${encodeURIComponent(Z)}/cancel`,$,J,{responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}})}}R7.OrderResource=_7});var N6=O((c7)=>{Object.defineProperty(c7,"__esModule",{value:!0});c7.OutboundPaymentResource=void 0;var zK=F();class u7 extends zK.StripeResource{update(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/treasury/outbound_payments/${encodeURIComponent(Z)}`,$,J)}fail(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/treasury/outbound_payments/${encodeURIComponent(Z)}/fail`,$,J)}post(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/treasury/outbound_payments/${encodeURIComponent(Z)}/post`,$,J)}returnOutboundPayment(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/treasury/outbound_payments/${encodeURIComponent(Z)}/return`,$,J)}}c7.OutboundPaymentResource=u7});var k6=O((d7)=>{Object.defineProperty(d7,"__esModule",{value:!0});d7.OutboundPaymentResource=void 0;var KK=F();class l7 extends KK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/treasury/outbound_payments",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/treasury/outbound_payments",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/treasury/outbound_payments/${encodeURIComponent(Z)}`,$,J)}cancel(Z,$,J){return this._makeRequest("POST",`/v1/treasury/outbound_payments/${encodeURIComponent(Z)}/cancel`,$,J)}}d7.OutboundPaymentResource=l7});var C6=O((i7)=>{Object.defineProperty(i7,"__esModule",{value:!0});i7.OutboundTransferResource=void 0;var HK=F();class p7 extends HK.StripeResource{update(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/treasury/outbound_transfers/${encodeURIComponent(Z)}`,$,J)}fail(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/treasury/outbound_transfers/${encodeURIComponent(Z)}/fail`,$,J)}post(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/treasury/outbound_transfers/${encodeURIComponent(Z)}/post`,$,J)}returnOutboundTransfer(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/treasury/outbound_transfers/${encodeURIComponent(Z)}/return`,$,J)}}i7.OutboundTransferResource=p7});var P6=O((a7)=>{Object.defineProperty(a7,"__esModule",{value:!0});a7.OutboundTransferResource=void 0;var OK=F();class t7 extends OK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/treasury/outbound_transfers",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/treasury/outbound_transfers",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/treasury/outbound_transfers/${encodeURIComponent(Z)}`,$,J)}cancel(Z,$,J){return this._makeRequest("POST",`/v1/treasury/outbound_transfers/${encodeURIComponent(Z)}/cancel`,$,J)}}a7.OutboundTransferResource=t7});var I6=O((e7)=>{Object.defineProperty(e7,"__esModule",{value:!0});e7.PaymentEvaluationResource=void 0;var wK=F();class s7 extends wK.StripeResource{create(Z,$){return this._makeRequest("POST","/v1/radar/payment_evaluations",Z,$)}}e7.PaymentEvaluationResource=s7});var x6=O((J5)=>{Object.defineProperty(J5,"__esModule",{value:!0});J5.PersonalizationDesignResource=void 0;var FK=F();class $5 extends FK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/issuing/personalization_designs",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/issuing/personalization_designs",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/issuing/personalization_designs/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/issuing/personalization_designs/${encodeURIComponent(Z)}`,$,J)}}J5.PersonalizationDesignResource=$5});var S6=O((Q5)=>{Object.defineProperty(Q5,"__esModule",{value:!0});Q5.PersonalizationDesignResource=void 0;var UK=F();class X5 extends UK.StripeResource{activate(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/issuing/personalization_designs/${encodeURIComponent(Z)}/activate`,$,J)}deactivate(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/issuing/personalization_designs/${encodeURIComponent(Z)}/deactivate`,$,J)}reject(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/issuing/personalization_designs/${encodeURIComponent(Z)}/reject`,$,J)}}Q5.PersonalizationDesignResource=X5});var M6=O((V5)=>{Object.defineProperty(V5,"__esModule",{value:!0});V5.PhysicalBundleResource=void 0;var qK=F();class W5 extends qK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/issuing/physical_bundles",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/issuing/physical_bundles/${encodeURIComponent(Z)}`,$,J)}}V5.PhysicalBundleResource=W5});var f6=O((K5)=>{Object.defineProperty(K5,"__esModule",{value:!0});K5.ProductResource=void 0;var DK=F();class z5 extends DK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/climate/products",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{metric_tons_available:{kind:"decimal_string"}}}}}}})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/climate/products/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{metric_tons_available:{kind:"decimal_string"}}}})}}K5.ProductResource=z5});var h6=O((w5)=>{Object.defineProperty(w5,"__esModule",{value:!0});w5.ReaderResource=void 0;var LK=F();class O5 extends LK.StripeResource{del(Z,$,J){return this._makeRequest("DELETE",`/v1/terminal/readers/${encodeURIComponent(Z)}`,$,J)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/terminal/readers/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/terminal/readers/${encodeURIComponent(Z)}`,$,J)}list(Z,$){return this._makeRequest("GET","/v1/terminal/readers",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/terminal/readers",Z,$)}cancelAction(Z,$,J){return this._makeRequest("POST",`/v1/terminal/readers/${encodeURIComponent(Z)}/cancel_action`,$,J)}collectInputs(Z,$,J){return this._makeRequest("POST",`/v1/terminal/readers/${encodeURIComponent(Z)}/collect_inputs`,$,J)}collectPaymentMethod(Z,$,J){return this._makeRequest("POST",`/v1/terminal/readers/${encodeURIComponent(Z)}/collect_payment_method`,$,J)}confirmPaymentIntent(Z,$,J){return this._makeRequest("POST",`/v1/terminal/readers/${encodeURIComponent(Z)}/confirm_payment_intent`,$,J)}processPaymentIntent(Z,$,J){return this._makeRequest("POST",`/v1/terminal/readers/${encodeURIComponent(Z)}/process_payment_intent`,$,J)}processSetupIntent(Z,$,J){return this._makeRequest("POST",`/v1/terminal/readers/${encodeURIComponent(Z)}/process_setup_intent`,$,J)}refundPayment(Z,$,J){return this._makeRequest("POST",`/v1/terminal/readers/${encodeURIComponent(Z)}/refund_payment`,$,J)}setReaderDisplay(Z,$,J){return this._makeRequest("POST",`/v1/terminal/readers/${encodeURIComponent(Z)}/set_reader_display`,$,J)}}w5.ReaderResource=O5});var b6=O((q5)=>{Object.defineProperty(q5,"__esModule",{value:!0});q5.ReaderResource=void 0;var AK=F();class U5 extends AK.StripeResource{presentPaymentMethod(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/terminal/readers/${encodeURIComponent(Z)}/present_payment_method`,$,J)}succeedInputCollection(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/terminal/readers/${encodeURIComponent(Z)}/succeed_input_collection`,$,J)}timeoutInputCollection(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/terminal/readers/${encodeURIComponent(Z)}/timeout_input_collection`,$,J)}}q5.ReaderResource=U5});var y6=O((A5)=>{Object.defineProperty(A5,"__esModule",{value:!0});A5.ReceivedCreditResource=void 0;var TK=F();class L5 extends TK.StripeResource{create(Z,$){return this._makeRequest("POST","/v1/test_helpers/treasury/received_credits",Z,$)}}A5.ReceivedCreditResource=L5});var v6=O((N5)=>{Object.defineProperty(N5,"__esModule",{value:!0});N5.ReceivedCreditResource=void 0;var EK=F();class E5 extends EK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/treasury/received_credits",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/treasury/received_credits/${encodeURIComponent(Z)}`,$,J)}}N5.ReceivedCreditResource=E5});var j6=O((P5)=>{Object.defineProperty(P5,"__esModule",{value:!0});P5.ReceivedDebitResource=void 0;var NK=F();class C5 extends NK.StripeResource{create(Z,$){return this._makeRequest("POST","/v1/test_helpers/treasury/received_debits",Z,$)}}P5.ReceivedDebitResource=C5});var _6=O((S5)=>{Object.defineProperty(S5,"__esModule",{value:!0});S5.ReceivedDebitResource=void 0;var kK=F();class x5 extends kK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/treasury/received_debits",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/treasury/received_debits/${encodeURIComponent(Z)}`,$,J)}}S5.ReceivedDebitResource=x5});var R6=O((h5)=>{Object.defineProperty(h5,"__esModule",{value:!0});h5.RefundResource=void 0;var CK=F();class f5 extends CK.StripeResource{expire(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/refunds/${encodeURIComponent(Z)}/expire`,$,J)}}h5.RefundResource=f5});var g6=O((v5)=>{Object.defineProperty(v5,"__esModule",{value:!0});v5.RegistrationResource=void 0;var PK=F();class y5 extends PK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/tax/registrations",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/tax/registrations",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/tax/registrations/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/tax/registrations/${encodeURIComponent(Z)}`,$,J)}}v5.RegistrationResource=y5});var u6=O((R5)=>{Object.defineProperty(R5,"__esModule",{value:!0});R5.ReportRunResource=void 0;var IK=F();class _5 extends IK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/reporting/report_runs",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/reporting/report_runs",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/reporting/report_runs/${encodeURIComponent(Z)}`,$,J)}}R5.ReportRunResource=_5});var c6=O((c5)=>{Object.defineProperty(c5,"__esModule",{value:!0});c5.ReportTypeResource=void 0;var xK=F();class u5 extends xK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/reporting/report_types",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/reporting/report_types/${encodeURIComponent(Z)}`,$,J)}}c5.ReportTypeResource=u5});var m6=O((d5)=>{Object.defineProperty(d5,"__esModule",{value:!0});d5.RequestResource=void 0;var SK=F();class l5 extends SK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/forwarding/requests",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/forwarding/requests",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/forwarding/requests/${encodeURIComponent(Z)}`,$,J)}}d5.RequestResource=l5});var l6=O((i5)=>{Object.defineProperty(i5,"__esModule",{value:!0});i5.ScheduledQueryRunResource=void 0;var MK=F();class p5 extends MK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/sigma/scheduled_query_runs",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/sigma/scheduled_query_runs/${encodeURIComponent(Z)}`,$,J)}}i5.ScheduledQueryRunResource=p5});var d6=O((a5)=>{Object.defineProperty(a5,"__esModule",{value:!0});a5.SecretResource=void 0;var fK=F();class t5 extends fK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/apps/secrets",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/apps/secrets",Z,$)}find(Z,$){return this._makeRequest("GET","/v1/apps/secrets/find",Z,$)}deleteWhere(Z,$){return this._makeRequest("POST","/v1/apps/secrets/delete",Z,$)}}a5.SecretResource=t5});var n6=O((e5)=>{Object.defineProperty(e5,"__esModule",{value:!0});e5.SessionResource=void 0;var hK=F();class s5 extends hK.StripeResource{create(Z,$){return this._makeRequest("POST","/v1/billing_portal/sessions",Z,$)}}e5.SessionResource=s5});var p6=O((JJ)=>{Object.defineProperty(JJ,"__esModule",{value:!0});JJ.SessionResource=void 0;var bK=F();class $J extends bK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/checkout/sessions",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}})}create(Z,$){return this._makeRequest("POST","/v1/checkout/sessions",Z,$,{requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/checkout/sessions/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}})}update(Z,$,J){return this._makeRequest("POST",`/v1/checkout/sessions/${encodeURIComponent(Z)}`,$,J,{requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}})}expire(Z,$,J){return this._makeRequest("POST",`/v1/checkout/sessions/${encodeURIComponent(Z)}/expire`,$,J,{responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}})}listLineItems(Z,$,J){return this._makeRequest("GET",`/v1/checkout/sessions/${encodeURIComponent(Z)}/line_items`,$,J,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})}}JJ.SessionResource=$J});var i6=O((QJ)=>{Object.defineProperty(QJ,"__esModule",{value:!0});QJ.SessionResource=void 0;var yK=F();class XJ extends yK.StripeResource{retrieve(Z,$,J){return this._makeRequest("GET",`/v1/financial_connections/sessions/${encodeURIComponent(Z)}`,$,J)}create(Z,$){return this._makeRequest("POST","/v1/financial_connections/sessions",Z,$)}}QJ.SessionResource=XJ});var r6=O((VJ)=>{Object.defineProperty(VJ,"__esModule",{value:!0});VJ.SettingResource=void 0;var vK=F();class WJ extends vK.StripeResource{retrieve(Z,$){return this._makeRequest("GET","/v1/tax/settings",Z,$)}update(Z,$){return this._makeRequest("POST","/v1/tax/settings",Z,$)}}VJ.SettingResource=WJ});var t6=O((KJ)=>{Object.defineProperty(KJ,"__esModule",{value:!0});KJ.SupplierResource=void 0;var jK=F();class zJ extends jK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/climate/suppliers",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/climate/suppliers/${encodeURIComponent(Z)}`,$,J)}}KJ.SupplierResource=zJ});var a6=O((wJ)=>{Object.defineProperty(wJ,"__esModule",{value:!0});wJ.TestClockResource=void 0;var _K=F();class OJ extends _K.StripeResource{del(Z,$,J){return this._makeRequest("DELETE",`/v1/test_helpers/test_clocks/${encodeURIComponent(Z)}`,$,J)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/test_helpers/test_clocks/${encodeURIComponent(Z)}`,$,J)}list(Z,$){return this._makeRequest("GET","/v1/test_helpers/test_clocks",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/test_helpers/test_clocks",Z,$)}advance(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/test_clocks/${encodeURIComponent(Z)}/advance`,$,J)}}wJ.TestClockResource=OJ});var o6=O((qJ)=>{Object.defineProperty(qJ,"__esModule",{value:!0});qJ.TokenResource=void 0;var RK=F();class UJ extends RK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/issuing/tokens",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/issuing/tokens/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/issuing/tokens/${encodeURIComponent(Z)}`,$,J)}}qJ.TokenResource=UJ});var s6=O((AJ)=>{Object.defineProperty(AJ,"__esModule",{value:!0});AJ.TransactionEntryResource=void 0;var gK=F();class LJ extends gK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/treasury/transaction_entries",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/treasury/transaction_entries/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}})}}AJ.TransactionEntryResource=LJ});var e6=O((NJ)=>{Object.defineProperty(NJ,"__esModule",{value:!0});NJ.TransactionResource=void 0;var uK=F();class EJ extends uK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/financial_connections/transactions",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/financial_connections/transactions/${encodeURIComponent(Z)}`,$,J)}}NJ.TransactionResource=EJ});var Z9=O((PJ)=>{Object.defineProperty(PJ,"__esModule",{value:!0});PJ.TransactionResource=void 0;var cK=F();class CJ extends cK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/issuing/transactions",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/issuing/transactions/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}})}update(Z,$,J){return this._makeRequest("POST",`/v1/issuing/transactions/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}})}}PJ.TransactionResource=CJ});var $9=O((SJ)=>{Object.defineProperty(SJ,"__esModule",{value:!0});SJ.TransactionResource=void 0;var mK=F();class xJ extends mK.StripeResource{retrieve(Z,$,J){return this._makeRequest("GET",`/v1/tax/transactions/${encodeURIComponent(Z)}`,$,J)}createFromCalculation(Z,$){return this._makeRequest("POST","/v1/tax/transactions/create_from_calculation",Z,$)}createReversal(Z,$){return this._makeRequest("POST","/v1/tax/transactions/create_reversal",Z,$)}listLineItems(Z,$,J){return this._makeRequest("GET",`/v1/tax/transactions/${encodeURIComponent(Z)}/line_items`,$,J,{methodType:"list"})}}SJ.TransactionResource=xJ});var J9=O((hJ)=>{Object.defineProperty(hJ,"__esModule",{value:!0});hJ.TransactionResource=void 0;var lK=F();class fJ extends lK.StripeResource{refund(Z,$,J){return this._makeRequest("POST",`/v1/test_helpers/issuing/transactions/${encodeURIComponent(Z)}/refund`,$,J,{responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}})}createForceCapture(Z,$){return this._makeRequest("POST","/v1/test_helpers/issuing/transactions/create_force_capture",Z,$,{requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}})}createUnlinkedRefund(Z,$){return this._makeRequest("POST","/v1/test_helpers/issuing/transactions/create_unlinked_refund",Z,$,{requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}})}}hJ.TransactionResource=fJ});var Y9=O((vJ)=>{Object.defineProperty(vJ,"__esModule",{value:!0});vJ.TransactionResource=void 0;var dK=F();class yJ extends dK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/treasury/transactions",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{entries:{kind:"nullable",inner:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}}}}}}}})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/treasury/transactions/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{entries:{kind:"nullable",inner:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}}}}})}}vJ.TransactionResource=yJ});var X9=O((RJ)=>{Object.defineProperty(RJ,"__esModule",{value:!0});RJ.ValueListItemResource=void 0;var nK=F();class _J extends nK.StripeResource{del(Z,$,J){return this._makeRequest("DELETE",`/v1/radar/value_list_items/${encodeURIComponent(Z)}`,$,J)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/radar/value_list_items/${encodeURIComponent(Z)}`,$,J)}list(Z,$){return this._makeRequest("GET","/v1/radar/value_list_items",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/radar/value_list_items",Z,$)}}RJ.ValueListItemResource=_J});var Q9=O((cJ)=>{Object.defineProperty(cJ,"__esModule",{value:!0});cJ.ValueListResource=void 0;var pK=F();class uJ extends pK.StripeResource{del(Z,$,J){return this._makeRequest("DELETE",`/v1/radar/value_lists/${encodeURIComponent(Z)}`,$,J)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/radar/value_lists/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/radar/value_lists/${encodeURIComponent(Z)}`,$,J)}list(Z,$){return this._makeRequest("GET","/v1/radar/value_lists",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/radar/value_lists",Z,$)}}cJ.ValueListResource=uJ});var G9=O((dJ)=>{Object.defineProperty(dJ,"__esModule",{value:!0});dJ.VerificationReportResource=void 0;var iK=F();class lJ extends iK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/identity/verification_reports",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/identity/verification_reports/${encodeURIComponent(Z)}`,$,J)}}dJ.VerificationReportResource=lJ});var W9=O((iJ)=>{Object.defineProperty(iJ,"__esModule",{value:!0});iJ.VerificationSessionResource=void 0;var rK=F();class pJ extends rK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/identity/verification_sessions",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/identity/verification_sessions",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/identity/verification_sessions/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/identity/verification_sessions/${encodeURIComponent(Z)}`,$,J)}cancel(Z,$,J){return this._makeRequest("POST",`/v1/identity/verification_sessions/${encodeURIComponent(Z)}/cancel`,$,J)}redact(Z,$,J){return this._makeRequest("POST",`/v1/identity/verification_sessions/${encodeURIComponent(Z)}/redact`,$,J)}}iJ.VerificationSessionResource=pJ});var _0=O((aJ)=>{Object.defineProperty(aJ,"__esModule",{value:!0});aJ.AccountResource=void 0;var tK=F();class tJ extends tK.StripeResource{del(Z,$,J){return this._makeRequest("DELETE",`/v1/accounts/${encodeURIComponent(Z)}`,$,J)}retrieve(Z,$,J){if(typeof Z==="string")return this._makeRequest("GET",`/v1/accounts/${encodeURIComponent(Z)}`,$,J);else return this._makeRequest("GET","/v1/account",$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/accounts/${encodeURIComponent(Z)}`,$,J)}retrieveCurrent(Z,$){return this._makeRequest("GET","/v1/account",Z,$)}list(Z,$){return this._makeRequest("GET","/v1/accounts",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/accounts",Z,$)}reject(Z,$,J){return this._makeRequest("POST",`/v1/accounts/${encodeURIComponent(Z)}/reject`,$,J)}listCapabilities(Z,$,J){return this._makeRequest("GET",`/v1/accounts/${encodeURIComponent(Z)}/capabilities`,$,J,{methodType:"list"})}retrieveCapability(Z,$,J,Y){return this._makeRequest("GET",`/v1/accounts/${encodeURIComponent(Z)}/capabilities/${encodeURIComponent($)}`,J,Y)}updateCapability(Z,$,J,Y){return this._makeRequest("POST",`/v1/accounts/${encodeURIComponent(Z)}/capabilities/${encodeURIComponent($)}`,J,Y)}deleteExternalAccount(Z,$,J,Y){return this._makeRequest("DELETE",`/v1/accounts/${encodeURIComponent(Z)}/external_accounts/${encodeURIComponent($)}`,J,Y)}retrieveExternalAccount(Z,$,J,Y){return this._makeRequest("GET",`/v1/accounts/${encodeURIComponent(Z)}/external_accounts/${encodeURIComponent($)}`,J,Y)}updateExternalAccount(Z,$,J,Y){return this._makeRequest("POST",`/v1/accounts/${encodeURIComponent(Z)}/external_accounts/${encodeURIComponent($)}`,J,Y)}listExternalAccounts(Z,$,J){return this._makeRequest("GET",`/v1/accounts/${encodeURIComponent(Z)}/external_accounts`,$,J,{methodType:"list"})}createExternalAccount(Z,$,J){return this._makeRequest("POST",`/v1/accounts/${encodeURIComponent(Z)}/external_accounts`,$,J)}createLoginLink(Z,$,J){return this._makeRequest("POST",`/v1/accounts/${encodeURIComponent(Z)}/login_links`,$,J)}deletePerson(Z,$,J,Y){return this._makeRequest("DELETE",`/v1/accounts/${encodeURIComponent(Z)}/persons/${encodeURIComponent($)}`,J,Y)}retrievePerson(Z,$,J,Y){return this._makeRequest("GET",`/v1/accounts/${encodeURIComponent(Z)}/persons/${encodeURIComponent($)}`,J,Y)}updatePerson(Z,$,J,Y){return this._makeRequest("POST",`/v1/accounts/${encodeURIComponent(Z)}/persons/${encodeURIComponent($)}`,J,Y)}listPersons(Z,$,J){return this._makeRequest("GET",`/v1/accounts/${encodeURIComponent(Z)}/persons`,$,J,{methodType:"list"})}createPerson(Z,$,J){return this._makeRequest("POST",`/v1/accounts/${encodeURIComponent(Z)}/persons`,$,J)}}aJ.AccountResource=tJ});var V9=O((eJ)=>{Object.defineProperty(eJ,"__esModule",{value:!0});eJ.AccountLinkResource=void 0;var aK=F();class sJ extends aK.StripeResource{create(Z,$){return this._makeRequest("POST","/v1/account_links",Z,$)}}eJ.AccountLinkResource=sJ});var B9=O((JY)=>{Object.defineProperty(JY,"__esModule",{value:!0});JY.AccountSessionResource=void 0;var oK=F();class $Y extends oK.StripeResource{create(Z,$){return this._makeRequest("POST","/v1/account_sessions",Z,$)}}JY.AccountSessionResource=$Y});var z9=O((QY)=>{Object.defineProperty(QY,"__esModule",{value:!0});QY.ApplePayDomainResource=void 0;var sK=F();class XY extends sK.StripeResource{del(Z,$,J){return this._makeRequest("DELETE",`/v1/apple_pay/domains/${encodeURIComponent(Z)}`,$,J)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/apple_pay/domains/${encodeURIComponent(Z)}`,$,J)}list(Z,$){return this._makeRequest("GET","/v1/apple_pay/domains",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/apple_pay/domains",Z,$)}}QY.ApplePayDomainResource=XY});var K9=O((VY)=>{Object.defineProperty(VY,"__esModule",{value:!0});VY.ApplicationFeeResource=void 0;var eK=F();class WY extends eK.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/application_fees",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/application_fees/${encodeURIComponent(Z)}`,$,J)}retrieveRefund(Z,$,J,Y){return this._makeRequest("GET",`/v1/application_fees/${encodeURIComponent(Z)}/refunds/${encodeURIComponent($)}`,J,Y)}updateRefund(Z,$,J,Y){return this._makeRequest("POST",`/v1/application_fees/${encodeURIComponent(Z)}/refunds/${encodeURIComponent($)}`,J,Y)}listRefunds(Z,$,J){return this._makeRequest("GET",`/v1/application_fees/${encodeURIComponent(Z)}/refunds`,$,J,{methodType:"list"})}createRefund(Z,$,J){return this._makeRequest("POST",`/v1/application_fees/${encodeURIComponent(Z)}/refunds`,$,J)}}VY.ApplicationFeeResource=WY});var R0=O((KY)=>{Object.defineProperty(KY,"__esModule",{value:!0});KY.BalanceResource=void 0;var ZH=F();class zY extends ZH.StripeResource{retrieve(Z,$){return this._makeRequest("GET","/v1/balance",Z,$)}}KY.BalanceResource=zY});var H9=O((wY)=>{Object.defineProperty(wY,"__esModule",{value:!0});wY.BalanceSettingResource=void 0;var $H=F();class OY extends $H.StripeResource{retrieve(Z,$){return this._makeRequest("GET","/v1/balance_settings",Z,$)}update(Z,$){return this._makeRequest("POST","/v1/balance_settings",Z,$)}}wY.BalanceSettingResource=OY});var O9=O((qY)=>{Object.defineProperty(qY,"__esModule",{value:!0});qY.BalanceTransactionResource=void 0;var JH=F();class UY extends JH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/balance_transactions",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/balance_transactions/${encodeURIComponent(Z)}`,$,J)}}qY.BalanceTransactionResource=UY});var w9=O((AY)=>{Object.defineProperty(AY,"__esModule",{value:!0});AY.ChargeResource=void 0;var YH=F();class LY extends YH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/charges",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/charges",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/charges/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/charges/${encodeURIComponent(Z)}`,$,J)}search(Z,$){return this._makeRequest("GET","/v1/charges/search",Z,$,{methodType:"search"})}capture(Z,$,J){return this._makeRequest("POST",`/v1/charges/${encodeURIComponent(Z)}/capture`,$,J)}}AY.ChargeResource=LY});var F9=O((NY)=>{Object.defineProperty(NY,"__esModule",{value:!0});NY.ConfirmationTokenResource=void 0;var XH=F();class EY extends XH.StripeResource{retrieve(Z,$,J){return this._makeRequest("GET",`/v1/confirmation_tokens/${encodeURIComponent(Z)}`,$,J)}}NY.ConfirmationTokenResource=EY});var U9=O((PY)=>{Object.defineProperty(PY,"__esModule",{value:!0});PY.CountrySpecResource=void 0;var QH=F();class CY extends QH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/country_specs",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/country_specs/${encodeURIComponent(Z)}`,$,J)}}PY.CountrySpecResource=CY});var q9=O((SY)=>{Object.defineProperty(SY,"__esModule",{value:!0});SY.CouponResource=void 0;var GH=F();class xY extends GH.StripeResource{del(Z,$,J){return this._makeRequest("DELETE",`/v1/coupons/${encodeURIComponent(Z)}`,$,J)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/coupons/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/coupons/${encodeURIComponent(Z)}`,$,J)}list(Z,$){return this._makeRequest("GET","/v1/coupons",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/coupons",Z,$)}}SY.CouponResource=xY});var D9=O((hY)=>{Object.defineProperty(hY,"__esModule",{value:!0});hY.CreditNoteResource=void 0;var WH=F();class fY extends WH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/credit_notes",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}})}create(Z,$){return this._makeRequest("POST","/v1/credit_notes",Z,$,{requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/credit_notes/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}update(Z,$,J){return this._makeRequest("POST",`/v1/credit_notes/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}preview(Z,$){return this._makeRequest("GET","/v1/credit_notes/preview",Z,$,{requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}voidCreditNote(Z,$,J){return this._makeRequest("POST",`/v1/credit_notes/${encodeURIComponent(Z)}/void`,$,J,{responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}listPreviewLineItems(Z,$){return this._makeRequest("GET","/v1/credit_notes/preview/lines",Z,$,{methodType:"list",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}})}listLineItems(Z,$,J){return this._makeRequest("GET",`/v1/credit_notes/${encodeURIComponent(Z)}/lines`,$,J,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}})}}hY.CreditNoteResource=fY});var L9=O((vY)=>{Object.defineProperty(vY,"__esModule",{value:!0});vY.CustomerResource=void 0;var VH=F();class yY extends VH.StripeResource{del(Z,$,J){return this._makeRequest("DELETE",`/v1/customers/${encodeURIComponent(Z)}`,$,J)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/customers/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/customers/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}})}deleteDiscount(Z,$,J){return this._makeRequest("DELETE",`/v1/customers/${encodeURIComponent(Z)}/discount`,$,J)}list(Z,$){return this._makeRequest("GET","/v1/customers",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}})}create(Z,$){return this._makeRequest("POST","/v1/customers",Z,$,{responseSchema:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}})}search(Z,$){return this._makeRequest("GET","/v1/customers/search",Z,$,{methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}})}listBalanceTransactions(Z,$,J){return this._makeRequest("GET",`/v1/customers/${encodeURIComponent(Z)}/balance_transactions`,$,J,{methodType:"list"})}createBalanceTransaction(Z,$,J){return this._makeRequest("POST",`/v1/customers/${encodeURIComponent(Z)}/balance_transactions`,$,J)}retrieveBalanceTransaction(Z,$,J,Y){return this._makeRequest("GET",`/v1/customers/${encodeURIComponent(Z)}/balance_transactions/${encodeURIComponent($)}`,J,Y)}updateBalanceTransaction(Z,$,J,Y){return this._makeRequest("POST",`/v1/customers/${encodeURIComponent(Z)}/balance_transactions/${encodeURIComponent($)}`,J,Y)}retrieveCashBalance(Z,$,J){return this._makeRequest("GET",`/v1/customers/${encodeURIComponent(Z)}/cash_balance`,$,J)}updateCashBalance(Z,$,J){return this._makeRequest("POST",`/v1/customers/${encodeURIComponent(Z)}/cash_balance`,$,J)}listCashBalanceTransactions(Z,$,J){return this._makeRequest("GET",`/v1/customers/${encodeURIComponent(Z)}/cash_balance_transactions`,$,J,{methodType:"list"})}retrieveCashBalanceTransaction(Z,$,J,Y){return this._makeRequest("GET",`/v1/customers/${encodeURIComponent(Z)}/cash_balance_transactions/${encodeURIComponent($)}`,J,Y)}createFundingInstructions(Z,$,J){return this._makeRequest("POST",`/v1/customers/${encodeURIComponent(Z)}/funding_instructions`,$,J)}listPaymentMethods(Z,$,J){return this._makeRequest("GET",`/v1/customers/${encodeURIComponent(Z)}/payment_methods`,$,J,{methodType:"list"})}retrievePaymentMethod(Z,$,J,Y){return this._makeRequest("GET",`/v1/customers/${encodeURIComponent(Z)}/payment_methods/${encodeURIComponent($)}`,J,Y)}listSources(Z,$,J){return this._makeRequest("GET",`/v1/customers/${encodeURIComponent(Z)}/sources`,$,J,{methodType:"list"})}createSource(Z,$,J){return this._makeRequest("POST",`/v1/customers/${encodeURIComponent(Z)}/sources`,$,J)}retrieveSource(Z,$,J,Y){return this._makeRequest("GET",`/v1/customers/${encodeURIComponent(Z)}/sources/${encodeURIComponent($)}`,J,Y)}updateSource(Z,$,J,Y){return this._makeRequest("POST",`/v1/customers/${encodeURIComponent(Z)}/sources/${encodeURIComponent($)}`,J,Y)}deleteSource(Z,$,J,Y){return this._makeRequest("DELETE",`/v1/customers/${encodeURIComponent(Z)}/sources/${encodeURIComponent($)}`,J,Y)}verifySource(Z,$,J,Y){return this._makeRequest("POST",`/v1/customers/${encodeURIComponent(Z)}/sources/${encodeURIComponent($)}/verify`,J,Y)}deleteTaxId(Z,$,J,Y){return this._makeRequest("DELETE",`/v1/customers/${encodeURIComponent(Z)}/tax_ids/${encodeURIComponent($)}`,J,Y)}retrieveTaxId(Z,$,J,Y){return this._makeRequest("GET",`/v1/customers/${encodeURIComponent(Z)}/tax_ids/${encodeURIComponent($)}`,J,Y)}listTaxIds(Z,$,J){return this._makeRequest("GET",`/v1/customers/${encodeURIComponent(Z)}/tax_ids`,$,J,{methodType:"list"})}createTaxId(Z,$,J){return this._makeRequest("POST",`/v1/customers/${encodeURIComponent(Z)}/tax_ids`,$,J)}}vY.CustomerResource=yY});var A9=O((RY)=>{Object.defineProperty(RY,"__esModule",{value:!0});RY.CustomerSessionResource=void 0;var BH=F();class _Y extends BH.StripeResource{create(Z,$){return this._makeRequest("POST","/v1/customer_sessions",Z,$)}}RY.CustomerSessionResource=_Y});var T9=O((cY)=>{Object.defineProperty(cY,"__esModule",{value:!0});cY.DisputeResource=void 0;var zH=F();class uY extends zH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/disputes",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/disputes/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/disputes/${encodeURIComponent(Z)}`,$,J)}close(Z,$,J){return this._makeRequest("POST",`/v1/disputes/${encodeURIComponent(Z)}/close`,$,J)}}cY.DisputeResource=uY});var E9=O((dY)=>{Object.defineProperty(dY,"__esModule",{value:!0});dY.EphemeralKeyResource=void 0;var KH=F();class lY extends KH.StripeResource{del(Z,$,J){return this._makeRequest("DELETE",`/v1/ephemeral_keys/${encodeURIComponent(Z)}`,$,J)}create(Z,$){return this._makeRequest("POST","/v1/ephemeral_keys",Z,$,{validator:(J,Y)=>{if(!Y.headers||!Y.headers["Stripe-Version"])throw Error("Passing apiVersion in a separate options hash is required to create an ephemeral key. See https://stripe.com/docs/api/versioning?lang=node")}})}}dY.EphemeralKeyResource=lY});var N9=O((iY)=>{Object.defineProperty(iY,"__esModule",{value:!0});iY.EventResource=void 0;var HH=F();class pY extends HH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/events",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/events/${encodeURIComponent(Z)}`,$,J)}}iY.EventResource=pY});var k9=O((aY)=>{Object.defineProperty(aY,"__esModule",{value:!0});aY.ExchangeRateResource=void 0;var OH=F();class tY extends OH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/exchange_rates",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/exchange_rates/${encodeURIComponent(Z)}`,$,J)}}aY.ExchangeRateResource=tY});var $X=O((eY)=>{Object.defineProperty(eY,"__esModule",{value:!0});eY.multipartRequestDataProcessor=void 0;var sY=R(),wH=(Z,$,J)=>{let Y=(Math.round(Math.random()*10000000000000000)+Math.round(Math.random()*10000000000000000)).toString();J["Content-Type"]=`multipart/form-data; boundary=${Y}`;let X=new TextEncoder,Q=new Uint8Array(0),G=X.encode(`\r
15
+ `);function W(B){let K=Q,H=B instanceof Uint8Array?B:new Uint8Array(X.encode(B));Q=new Uint8Array(K.length+H.length+2),Q.set(K),Q.set(H,K.length),Q.set(G,Q.length-2)}function z(B){return`"${B.replace(/"|"/g,"%22").replace(/\r\n|\r|\n/g," ")}"`}let V=(0,sY.flattenAndStringify)($);for(let B in V){if(!Object.prototype.hasOwnProperty.call(V,B))continue;let K=V[B];if(W(`--${Y}`),Object.prototype.hasOwnProperty.call(K,"data")){let H=K;W(`Content-Disposition: form-data; name=${z(B)}; filename=${z(H.name||"blob")}`),W(`Content-Type: ${H.type||"application/octet-stream"}`),W(""),W(H.data)}else W(`Content-Disposition: form-data; name=${z(B)}`),W(""),W(K)}return W(`--${Y}--`),Q};function FH(Z,$,J,Y){if($=$||{},Z!=="POST")return Y(null,(0,sY.queryStringifyRequestData)($));this._stripe._platformFunctions.tryBufferData($).then((X)=>{let Q=wH(Z,X,J);return Y(null,Q)}).catch((X)=>Y(X,null))}eY.multipartRequestDataProcessor=FH});var C9=O((YX)=>{Object.defineProperty(YX,"__esModule",{value:!0});YX.FileResource=void 0;var UH=$X(),qH=F();class JX extends qH.StripeResource{constructor(){super(...arguments);this.requestDataProcessor=UH.multipartRequestDataProcessor}list(Z,$){return this._makeRequest("GET","/v1/files",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/files",Z,$,{headers:{"Content-Type":"multipart/form-data"},apiBase:"files"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/files/${encodeURIComponent(Z)}`,$,J)}}YX.FileResource=JX});var P9=O((GX)=>{Object.defineProperty(GX,"__esModule",{value:!0});GX.FileLinkResource=void 0;var DH=F();class QX extends DH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/file_links",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/file_links",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/file_links/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/file_links/${encodeURIComponent(Z)}`,$,J)}}GX.FileLinkResource=QX});var I9=O((BX)=>{Object.defineProperty(BX,"__esModule",{value:!0});BX.InvoiceResource=void 0;var LH=F();class VX extends LH.StripeResource{del(Z,$,J){return this._makeRequest("DELETE",`/v1/invoices/${encodeURIComponent(Z)}`,$,J)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/invoices/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}update(Z,$,J){return this._makeRequest("POST",`/v1/invoices/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}list(Z,$){return this._makeRequest("GET","/v1/invoices",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}})}create(Z,$){return this._makeRequest("POST","/v1/invoices",Z,$,{responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}search(Z,$){return this._makeRequest("GET","/v1/invoices/search",Z,$,{methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}})}addLines(Z,$,J){return this._makeRequest("POST",`/v1/invoices/${encodeURIComponent(Z)}/add_lines`,$,J,{requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}attachPayment(Z,$,J){return this._makeRequest("POST",`/v1/invoices/${encodeURIComponent(Z)}/attach_payment`,$,J,{responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}finalizeInvoice(Z,$,J){return this._makeRequest("POST",`/v1/invoices/${encodeURIComponent(Z)}/finalize`,$,J,{responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}markUncollectible(Z,$,J){return this._makeRequest("POST",`/v1/invoices/${encodeURIComponent(Z)}/mark_uncollectible`,$,J,{responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}pay(Z,$,J){return this._makeRequest("POST",`/v1/invoices/${encodeURIComponent(Z)}/pay`,$,J,{responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}removeLines(Z,$,J){return this._makeRequest("POST",`/v1/invoices/${encodeURIComponent(Z)}/remove_lines`,$,J,{responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}sendInvoice(Z,$,J){return this._makeRequest("POST",`/v1/invoices/${encodeURIComponent(Z)}/send`,$,J,{responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}updateLines(Z,$,J){return this._makeRequest("POST",`/v1/invoices/${encodeURIComponent(Z)}/update_lines`,$,J,{requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}voidInvoice(Z,$,J){return this._makeRequest("POST",`/v1/invoices/${encodeURIComponent(Z)}/void`,$,J,{responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}createPreview(Z,$){return this._makeRequest("POST","/v1/invoices/create_preview",Z,$,{requestSchema:{kind:"object",fields:{invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},schedule_details:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}},subscription_details:{kind:"object",fields:{items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}listLineItems(Z,$,J){return this._makeRequest("GET",`/v1/invoices/${encodeURIComponent(Z)}/lines`,$,J,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}})}updateLineItem(Z,$,J,Y){return this._makeRequest("POST",`/v1/invoices/${encodeURIComponent(Z)}/lines/${encodeURIComponent($)}`,J,Y,{requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}})}}BX.InvoiceResource=VX});var x9=O((HX)=>{Object.defineProperty(HX,"__esModule",{value:!0});HX.InvoiceItemResource=void 0;var AH=F();class KX extends AH.StripeResource{del(Z,$,J){return this._makeRequest("DELETE",`/v1/invoiceitems/${encodeURIComponent(Z)}`,$,J)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/invoiceitems/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}})}update(Z,$,J){return this._makeRequest("POST",`/v1/invoiceitems/${encodeURIComponent(Z)}`,$,J,{requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}})}list(Z,$){return this._makeRequest("GET","/v1/invoiceitems",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}}}})}create(Z,$){return this._makeRequest("POST","/v1/invoiceitems",Z,$,{requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}})}}HX.InvoiceItemResource=KX});var S9=O((FX)=>{Object.defineProperty(FX,"__esModule",{value:!0});FX.InvoicePaymentResource=void 0;var TH=F();class wX extends TH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/invoice_payments",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/invoice_payments/${encodeURIComponent(Z)}`,$,J)}}FX.InvoicePaymentResource=wX});var M9=O((DX)=>{Object.defineProperty(DX,"__esModule",{value:!0});DX.InvoiceRenderingTemplateResource=void 0;var EH=F();class qX extends EH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/invoice_rendering_templates",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/invoice_rendering_templates/${encodeURIComponent(Z)}`,$,J)}archive(Z,$,J){return this._makeRequest("POST",`/v1/invoice_rendering_templates/${encodeURIComponent(Z)}/archive`,$,J)}unarchive(Z,$,J){return this._makeRequest("POST",`/v1/invoice_rendering_templates/${encodeURIComponent(Z)}/unarchive`,$,J)}}DX.InvoiceRenderingTemplateResource=qX});var f9=O((TX)=>{Object.defineProperty(TX,"__esModule",{value:!0});TX.MandateResource=void 0;var NH=F();class AX extends NH.StripeResource{retrieve(Z,$,J){return this._makeRequest("GET",`/v1/mandates/${encodeURIComponent(Z)}`,$,J)}}TX.MandateResource=AX});var IX=O((CX)=>{Object.defineProperty(CX,"__esModule",{value:!0});CX.OAuthResource=void 0;var kH=F(),NX=R();class kX extends kH.StripeResource{constructor(){super(...arguments);this.basePath=(0,NX.makeURLInterpolator)("/")}authorizeUrl(Z,$){Z=Z||{},$=$||{};let J="oauth/authorize";if($.express)J=`express/${J}`;if(!Z.response_type)Z.response_type="code";if(!Z.client_id)Z.client_id=this._stripe.getClientId();if(!Z.scope)Z.scope="read_write";return`https://${this._stripe.resolveBaseAddress("connect")}/${J}?${(0,NX.queryStringifyRequestData)(Z)}`}token(Z,$){return this._makeRequest("POST","/oauth/token",Z,$,{apiBase:"connect"})}deauthorize(Z,$){if(!Z.client_id)Z.client_id=this._stripe.getClientId();return this._makeRequest("POST","/oauth/deauthorize",Z,$,{apiBase:"connect"})}}CX.OAuthResource=kX});var h9=O((SX)=>{Object.defineProperty(SX,"__esModule",{value:!0});SX.PaymentAttemptRecordResource=void 0;var CH=F();class xX extends CH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/payment_attempt_records",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/payment_attempt_records/${encodeURIComponent(Z)}`,$,J)}}SX.PaymentAttemptRecordResource=xX});var b9=O((hX)=>{Object.defineProperty(hX,"__esModule",{value:!0});hX.PaymentIntentResource=void 0;var PH=F();class fX extends PH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/payment_intents",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/payment_intents",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/payment_intents/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/payment_intents/${encodeURIComponent(Z)}`,$,J)}search(Z,$){return this._makeRequest("GET","/v1/payment_intents/search",Z,$,{methodType:"search"})}applyCustomerBalance(Z,$,J){return this._makeRequest("POST",`/v1/payment_intents/${encodeURIComponent(Z)}/apply_customer_balance`,$,J)}cancel(Z,$,J){return this._makeRequest("POST",`/v1/payment_intents/${encodeURIComponent(Z)}/cancel`,$,J)}capture(Z,$,J){return this._makeRequest("POST",`/v1/payment_intents/${encodeURIComponent(Z)}/capture`,$,J)}confirm(Z,$,J){return this._makeRequest("POST",`/v1/payment_intents/${encodeURIComponent(Z)}/confirm`,$,J)}incrementAuthorization(Z,$,J){return this._makeRequest("POST",`/v1/payment_intents/${encodeURIComponent(Z)}/increment_authorization`,$,J)}verifyMicrodeposits(Z,$,J){return this._makeRequest("POST",`/v1/payment_intents/${encodeURIComponent(Z)}/verify_microdeposits`,$,J)}listAmountDetailsLineItems(Z,$,J){return this._makeRequest("GET",`/v1/payment_intents/${encodeURIComponent(Z)}/amount_details_line_items`,$,J,{methodType:"list"})}}hX.PaymentIntentResource=fX});var y9=O((vX)=>{Object.defineProperty(vX,"__esModule",{value:!0});vX.PaymentLinkResource=void 0;var IH=F();class yX extends IH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/payment_links",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}})}create(Z,$){return this._makeRequest("POST","/v1/payment_links",Z,$,{requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/payment_links/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}})}update(Z,$,J){return this._makeRequest("POST",`/v1/payment_links/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}})}listLineItems(Z,$,J){return this._makeRequest("GET",`/v1/payment_links/${encodeURIComponent(Z)}/line_items`,$,J,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})}}vX.PaymentLinkResource=yX});var v9=O((RX)=>{Object.defineProperty(RX,"__esModule",{value:!0});RX.PaymentMethodResource=void 0;var xH=F();class _X extends xH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/payment_methods",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/payment_methods",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/payment_methods/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/payment_methods/${encodeURIComponent(Z)}`,$,J)}attach(Z,$,J){return this._makeRequest("POST",`/v1/payment_methods/${encodeURIComponent(Z)}/attach`,$,J)}detach(Z,$,J){return this._makeRequest("POST",`/v1/payment_methods/${encodeURIComponent(Z)}/detach`,$,J)}}RX.PaymentMethodResource=_X});var j9=O((cX)=>{Object.defineProperty(cX,"__esModule",{value:!0});cX.PaymentMethodConfigurationResource=void 0;var SH=F();class uX extends SH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/payment_method_configurations",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/payment_method_configurations",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/payment_method_configurations/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/payment_method_configurations/${encodeURIComponent(Z)}`,$,J)}}cX.PaymentMethodConfigurationResource=uX});var _9=O((dX)=>{Object.defineProperty(dX,"__esModule",{value:!0});dX.PaymentMethodDomainResource=void 0;var MH=F();class lX extends MH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/payment_method_domains",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/payment_method_domains",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/payment_method_domains/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/payment_method_domains/${encodeURIComponent(Z)}`,$,J)}validate(Z,$,J){return this._makeRequest("POST",`/v1/payment_method_domains/${encodeURIComponent(Z)}/validate`,$,J)}}dX.PaymentMethodDomainResource=lX});var R9=O((iX)=>{Object.defineProperty(iX,"__esModule",{value:!0});iX.PaymentRecordResource=void 0;var fH=F();class pX extends fH.StripeResource{retrieve(Z,$,J){return this._makeRequest("GET",`/v1/payment_records/${encodeURIComponent(Z)}`,$,J)}reportPaymentAttempt(Z,$,J){return this._makeRequest("POST",`/v1/payment_records/${encodeURIComponent(Z)}/report_payment_attempt`,$,J)}reportPaymentAttemptCanceled(Z,$,J){return this._makeRequest("POST",`/v1/payment_records/${encodeURIComponent(Z)}/report_payment_attempt_canceled`,$,J)}reportPaymentAttemptFailed(Z,$,J){return this._makeRequest("POST",`/v1/payment_records/${encodeURIComponent(Z)}/report_payment_attempt_failed`,$,J)}reportPaymentAttemptGuaranteed(Z,$,J){return this._makeRequest("POST",`/v1/payment_records/${encodeURIComponent(Z)}/report_payment_attempt_guaranteed`,$,J)}reportPaymentAttemptInformational(Z,$,J){return this._makeRequest("POST",`/v1/payment_records/${encodeURIComponent(Z)}/report_payment_attempt_informational`,$,J)}reportRefund(Z,$,J){return this._makeRequest("POST",`/v1/payment_records/${encodeURIComponent(Z)}/report_refund`,$,J)}reportPayment(Z,$){return this._makeRequest("POST","/v1/payment_records/report_payment",Z,$)}}iX.PaymentRecordResource=pX});var g9=O((aX)=>{Object.defineProperty(aX,"__esModule",{value:!0});aX.PayoutResource=void 0;var hH=F();class tX extends hH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/payouts",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/payouts",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/payouts/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/payouts/${encodeURIComponent(Z)}`,$,J)}cancel(Z,$,J){return this._makeRequest("POST",`/v1/payouts/${encodeURIComponent(Z)}/cancel`,$,J)}reverse(Z,$,J){return this._makeRequest("POST",`/v1/payouts/${encodeURIComponent(Z)}/reverse`,$,J)}}aX.PayoutResource=tX});var u9=O((eX)=>{Object.defineProperty(eX,"__esModule",{value:!0});eX.PlanResource=void 0;var bH=F();class sX extends bH.StripeResource{del(Z,$,J){return this._makeRequest("DELETE",`/v1/plans/${encodeURIComponent(Z)}`,$,J)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/plans/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}})}update(Z,$,J){return this._makeRequest("POST",`/v1/plans/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}})}list(Z,$){return this._makeRequest("GET","/v1/plans",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})}create(Z,$){return this._makeRequest("POST","/v1/plans",Z,$,{requestSchema:{kind:"object",fields:{amount_decimal:{kind:"decimal_string"},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}})}}eX.PlanResource=sX});var c9=O((JQ)=>{Object.defineProperty(JQ,"__esModule",{value:!0});JQ.PriceResource=void 0;var yH=F();class $Q extends yH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/prices",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}})}create(Z,$){return this._makeRequest("POST","/v1/prices",Z,$,{requestSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/prices/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}})}update(Z,$,J){return this._makeRequest("POST",`/v1/prices/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}})}search(Z,$){return this._makeRequest("GET","/v1/prices/search",Z,$,{methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}})}}JQ.PriceResource=$Q});var m9=O((QQ)=>{Object.defineProperty(QQ,"__esModule",{value:!0});QQ.ProductResource=void 0;var vH=F();class XQ extends vH.StripeResource{del(Z,$,J){return this._makeRequest("DELETE",`/v1/products/${encodeURIComponent(Z)}`,$,J)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/products/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/products/${encodeURIComponent(Z)}`,$,J)}list(Z,$){return this._makeRequest("GET","/v1/products",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/products",Z,$,{requestSchema:{kind:"object",fields:{default_price_data:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}}}})}search(Z,$){return this._makeRequest("GET","/v1/products/search",Z,$,{methodType:"search"})}deleteFeature(Z,$,J,Y){return this._makeRequest("DELETE",`/v1/products/${encodeURIComponent(Z)}/features/${encodeURIComponent($)}`,J,Y)}retrieveFeature(Z,$,J,Y){return this._makeRequest("GET",`/v1/products/${encodeURIComponent(Z)}/features/${encodeURIComponent($)}`,J,Y)}listFeatures(Z,$,J){return this._makeRequest("GET",`/v1/products/${encodeURIComponent(Z)}/features`,$,J,{methodType:"list"})}createFeature(Z,$,J){return this._makeRequest("POST",`/v1/products/${encodeURIComponent(Z)}/features`,$,J)}}QQ.ProductResource=XQ});var l9=O((VQ)=>{Object.defineProperty(VQ,"__esModule",{value:!0});VQ.PromotionCodeResource=void 0;var jH=F();class WQ extends jH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/promotion_codes",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/promotion_codes",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/promotion_codes/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/promotion_codes/${encodeURIComponent(Z)}`,$,J)}}VQ.PromotionCodeResource=WQ});var d9=O((KQ)=>{Object.defineProperty(KQ,"__esModule",{value:!0});KQ.QuoteResource=void 0;var _H=F();class zQ extends _H.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/quotes",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}})}create(Z,$){return this._makeRequest("POST","/v1/quotes",Z,$,{requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/quotes/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}})}update(Z,$,J){return this._makeRequest("POST",`/v1/quotes/${encodeURIComponent(Z)}`,$,J,{requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}})}accept(Z,$,J){return this._makeRequest("POST",`/v1/quotes/${encodeURIComponent(Z)}/accept`,$,J,{responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}})}cancel(Z,$,J){return this._makeRequest("POST",`/v1/quotes/${encodeURIComponent(Z)}/cancel`,$,J,{responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}})}finalizeQuote(Z,$,J){return this._makeRequest("POST",`/v1/quotes/${encodeURIComponent(Z)}/finalize`,$,J,{responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}})}pdf(Z,$,J){return this._makeRequest("GET",`/v1/quotes/${encodeURIComponent(Z)}/pdf`,$,J,{apiBase:"files",streaming:!0})}listComputedUpfrontLineItems(Z,$,J){return this._makeRequest("GET",`/v1/quotes/${encodeURIComponent(Z)}/computed_upfront_line_items`,$,J,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})}listLineItems(Z,$,J){return this._makeRequest("GET",`/v1/quotes/${encodeURIComponent(Z)}/line_items`,$,J,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})}}KQ.QuoteResource=zQ});var n9=O((wQ)=>{Object.defineProperty(wQ,"__esModule",{value:!0});wQ.RefundResource=void 0;var RH=F();class OQ extends RH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/refunds",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/refunds",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/refunds/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/refunds/${encodeURIComponent(Z)}`,$,J)}cancel(Z,$,J){return this._makeRequest("POST",`/v1/refunds/${encodeURIComponent(Z)}/cancel`,$,J)}}wQ.RefundResource=OQ});var p9=O((qQ)=>{Object.defineProperty(qQ,"__esModule",{value:!0});qQ.ReviewResource=void 0;var gH=F();class UQ extends gH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/reviews",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/reviews/${encodeURIComponent(Z)}`,$,J)}approve(Z,$,J){return this._makeRequest("POST",`/v1/reviews/${encodeURIComponent(Z)}/approve`,$,J)}}qQ.ReviewResource=UQ});var i9=O((AQ)=>{Object.defineProperty(AQ,"__esModule",{value:!0});AQ.SetupAttemptResource=void 0;var uH=F();class LQ extends uH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/setup_attempts",Z,$,{methodType:"list"})}}AQ.SetupAttemptResource=LQ});var r9=O((NQ)=>{Object.defineProperty(NQ,"__esModule",{value:!0});NQ.SetupIntentResource=void 0;var cH=F();class EQ extends cH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/setup_intents",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/setup_intents",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/setup_intents/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/setup_intents/${encodeURIComponent(Z)}`,$,J)}cancel(Z,$,J){return this._makeRequest("POST",`/v1/setup_intents/${encodeURIComponent(Z)}/cancel`,$,J)}confirm(Z,$,J){return this._makeRequest("POST",`/v1/setup_intents/${encodeURIComponent(Z)}/confirm`,$,J)}verifyMicrodeposits(Z,$,J){return this._makeRequest("POST",`/v1/setup_intents/${encodeURIComponent(Z)}/verify_microdeposits`,$,J)}}NQ.SetupIntentResource=EQ});var t9=O((PQ)=>{Object.defineProperty(PQ,"__esModule",{value:!0});PQ.ShippingRateResource=void 0;var mH=F();class CQ extends mH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/shipping_rates",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/shipping_rates",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/shipping_rates/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/shipping_rates/${encodeURIComponent(Z)}`,$,J)}}PQ.ShippingRateResource=CQ});var a9=O((SQ)=>{Object.defineProperty(SQ,"__esModule",{value:!0});SQ.SourceResource=void 0;var lH=F();class xQ extends lH.StripeResource{retrieve(Z,$,J){return this._makeRequest("GET",`/v1/sources/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/sources/${encodeURIComponent(Z)}`,$,J)}create(Z,$){return this._makeRequest("POST","/v1/sources",Z,$)}verify(Z,$,J){return this._makeRequest("POST",`/v1/sources/${encodeURIComponent(Z)}/verify`,$,J)}listSourceTransactions(Z,$,J){return this._makeRequest("GET",`/v1/sources/${encodeURIComponent(Z)}/source_transactions`,$,J,{methodType:"list"})}}SQ.SourceResource=xQ});var o9=O((hQ)=>{Object.defineProperty(hQ,"__esModule",{value:!0});hQ.SubscriptionResource=void 0;var dH=F();class fQ extends dH.StripeResource{cancel(Z,$,J){return this._makeRequest("DELETE",`/v1/subscriptions/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/subscriptions/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}})}update(Z,$,J){return this._makeRequest("POST",`/v1/subscriptions/${encodeURIComponent(Z)}`,$,J,{requestSchema:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}})}deleteDiscount(Z,$,J){return this._makeRequest("DELETE",`/v1/subscriptions/${encodeURIComponent(Z)}/discount`,$,J)}list(Z,$){return this._makeRequest("GET","/v1/subscriptions",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}})}create(Z,$){return this._makeRequest("POST","/v1/subscriptions",Z,$,{requestSchema:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}})}search(Z,$){return this._makeRequest("GET","/v1/subscriptions/search",Z,$,{methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}})}migrate(Z,$,J){return this._makeRequest("POST",`/v1/subscriptions/${encodeURIComponent(Z)}/migrate`,$,J,{responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}})}resume(Z,$,J){return this._makeRequest("POST",`/v1/subscriptions/${encodeURIComponent(Z)}/resume`,$,J,{responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}})}}hQ.SubscriptionResource=fQ});var s9=O((vQ)=>{Object.defineProperty(vQ,"__esModule",{value:!0});vQ.SubscriptionItemResource=void 0;var nH=F();class yQ extends nH.StripeResource{del(Z,$,J){return this._makeRequest("DELETE",`/v1/subscription_items/${encodeURIComponent(Z)}`,$,J)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/subscription_items/${encodeURIComponent(Z)}`,$,J,{responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}})}update(Z,$,J){return this._makeRequest("POST",`/v1/subscription_items/${encodeURIComponent(Z)}`,$,J,{requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}})}list(Z,$){return this._makeRequest("GET","/v1/subscription_items",Z,$,{methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})}create(Z,$){return this._makeRequest("POST","/v1/subscription_items",Z,$,{requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}})}}vQ.SubscriptionItemResource=yQ});var e9=O((RQ)=>{Object.defineProperty(RQ,"__esModule",{value:!0});RQ.SubscriptionScheduleResource=void 0;var pH=F();class _Q extends pH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/subscription_schedules",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/subscription_schedules",Z,$,{requestSchema:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}}})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/subscription_schedules/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/subscription_schedules/${encodeURIComponent(Z)}`,$,J,{requestSchema:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}}})}cancel(Z,$,J){return this._makeRequest("POST",`/v1/subscription_schedules/${encodeURIComponent(Z)}/cancel`,$,J)}release(Z,$,J){return this._makeRequest("POST",`/v1/subscription_schedules/${encodeURIComponent(Z)}/release`,$,J)}}RQ.SubscriptionScheduleResource=_Q});var ZZ=O((cQ)=>{Object.defineProperty(cQ,"__esModule",{value:!0});cQ.TaxCodeResource=void 0;var iH=F();class uQ extends iH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/tax_codes",Z,$,{methodType:"list"})}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/tax_codes/${encodeURIComponent(Z)}`,$,J)}}cQ.TaxCodeResource=uQ});var $Z=O((dQ)=>{Object.defineProperty(dQ,"__esModule",{value:!0});dQ.TaxIdResource=void 0;var rH=F();class lQ extends rH.StripeResource{del(Z,$,J){return this._makeRequest("DELETE",`/v1/tax_ids/${encodeURIComponent(Z)}`,$,J)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/tax_ids/${encodeURIComponent(Z)}`,$,J)}list(Z,$){return this._makeRequest("GET","/v1/tax_ids",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/tax_ids",Z,$)}}dQ.TaxIdResource=lQ});var JZ=O((iQ)=>{Object.defineProperty(iQ,"__esModule",{value:!0});iQ.TaxRateResource=void 0;var tH=F();class pQ extends tH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/tax_rates",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/tax_rates",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/tax_rates/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/tax_rates/${encodeURIComponent(Z)}`,$,J)}}iQ.TaxRateResource=pQ});var YZ=O((aQ)=>{Object.defineProperty(aQ,"__esModule",{value:!0});aQ.TokenResource=void 0;var aH=F();class tQ extends aH.StripeResource{retrieve(Z,$,J){return this._makeRequest("GET",`/v1/tokens/${encodeURIComponent(Z)}`,$,J)}create(Z,$){return this._makeRequest("POST","/v1/tokens",Z,$)}}aQ.TokenResource=tQ});var XZ=O((eQ)=>{Object.defineProperty(eQ,"__esModule",{value:!0});eQ.TopupResource=void 0;var oH=F();class sQ extends oH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/topups",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/topups",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/topups/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/topups/${encodeURIComponent(Z)}`,$,J)}cancel(Z,$,J){return this._makeRequest("POST",`/v1/topups/${encodeURIComponent(Z)}/cancel`,$,J)}}eQ.TopupResource=sQ});var QZ=O((JG)=>{Object.defineProperty(JG,"__esModule",{value:!0});JG.TransferResource=void 0;var sH=F();class $G extends sH.StripeResource{list(Z,$){return this._makeRequest("GET","/v1/transfers",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/transfers",Z,$)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/transfers/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/transfers/${encodeURIComponent(Z)}`,$,J)}listReversals(Z,$,J){return this._makeRequest("GET",`/v1/transfers/${encodeURIComponent(Z)}/reversals`,$,J,{methodType:"list"})}createReversal(Z,$,J){return this._makeRequest("POST",`/v1/transfers/${encodeURIComponent(Z)}/reversals`,$,J)}retrieveReversal(Z,$,J,Y){return this._makeRequest("GET",`/v1/transfers/${encodeURIComponent(Z)}/reversals/${encodeURIComponent($)}`,J,Y)}updateReversal(Z,$,J,Y){return this._makeRequest("POST",`/v1/transfers/${encodeURIComponent(Z)}/reversals/${encodeURIComponent($)}`,J,Y)}}JG.TransferResource=$G});var GZ=O((QG)=>{Object.defineProperty(QG,"__esModule",{value:!0});QG.WebhookEndpointResource=void 0;var eH=F();class XG extends eH.StripeResource{del(Z,$,J){return this._makeRequest("DELETE",`/v1/webhook_endpoints/${encodeURIComponent(Z)}`,$,J)}retrieve(Z,$,J){return this._makeRequest("GET",`/v1/webhook_endpoints/${encodeURIComponent(Z)}`,$,J)}update(Z,$,J){return this._makeRequest("POST",`/v1/webhook_endpoints/${encodeURIComponent(Z)}`,$,J)}list(Z,$){return this._makeRequest("GET","/v1/webhook_endpoints",Z,$,{methodType:"list"})}create(Z,$){return this._makeRequest("POST","/v1/webhook_endpoints",Z,$)}}QG.WebhookEndpointResource=XG});var WZ=O((D)=>{Object.defineProperty(D,"__esModule",{value:!0});D.SubscriptionItems=D.Subscriptions=D.Sources=D.ShippingRates=D.SetupIntents=D.SetupAttempts=D.Reviews=D.Refunds=D.Quotes=D.PromotionCodes=D.Products=D.Prices=D.Plans=D.Payouts=D.PaymentRecords=D.PaymentMethodDomains=D.PaymentMethodConfigurations=D.PaymentMethods=D.PaymentLinks=D.PaymentIntents=D.PaymentAttemptRecords=D.OAuthResource=D.Mandates=D.InvoiceRenderingTemplates=D.InvoicePayments=D.InvoiceItems=D.Invoices=D.FileLinks=D.Files=D.ExchangeRates=D.Events=D.EphemeralKeys=D.Disputes=D.CustomerSessions=D.Customers=D.CreditNotes=D.Coupons=D.CountrySpecs=D.ConfirmationTokens=D.Charges=D.BalanceTransactions=D.BalanceSettings=D.Balances=D.Balance=D.ApplicationFees=D.ApplePayDomains=D.AccountSessions=D.AccountLinks=D.Accounts=D.Account=void 0;D.V2=D.Treasury=D.TestHelpers=D.Terminal=D.Tax=D.Sigma=D.Reporting=D.Radar=D.Issuing=D.Identity=D.Forwarding=D.FinancialConnections=D.Entitlements=D.Climate=D.Checkout=D.BillingPortal=D.Billing=D.Apps=D.WebhookEndpoints=D.Transfers=D.Topups=D.Tokens=D.TaxRates=D.TaxIds=D.TaxCodes=D.SubscriptionSchedules=void 0;var P=O1(),ZO=v8(),$O=j8(),JO=_8(),YO=R8(),XO=g8(),QO=u8(),GO=c8(),WO=m8(),VO=l8(),BO=d8(),zO=n8(),KO=p8(),HO=i8(),OO=r8(),wO=t8(),FO=a8(),UO=o8(),qO=s8(),DO=e8(),LO=Z6(),AO=$6(),TO=J6(),EO=Y6(),NO=X6(),kO=Q6(),CO=G6(),PO=W6(),IO=V6(),xO=B6(),SO=z6(),MO=K6(),fO=H6(),hO=O6(),bO=w6(),yO=F6(),vO=U6(),jO=q6(),_O=D6(),RO=L6(),gO=A6(),uO=T6(),cO=E6(),mO=N6(),lO=k6(),dO=C6(),nO=P6(),pO=I6(),iO=x6(),rO=S6(),tO=M6(),aO=f6(),oO=h6(),sO=b6(),eO=y6(),Zw=v6(),$w=j6(),Jw=_6(),Yw=R6(),Xw=g6(),Qw=u6(),Gw=c6(),Ww=m6(),Vw=l6(),Bw=d6(),zw=n6(),Kw=p6(),Hw=i6(),Ow=r6(),ww=t6(),Fw=a6(),Uw=o6(),qw=s6(),Dw=e6(),Lw=Z9(),Aw=$9(),Tw=J9(),Ew=Y9(),Nw=X9(),kw=Q9(),Cw=G9(),Pw=W9(),Iw=_0();Object.defineProperty(D,"Account",{enumerable:!0,get:function(){return Iw.AccountResource}});var xw=_0();Object.defineProperty(D,"Accounts",{enumerable:!0,get:function(){return xw.AccountResource}});var Sw=V9();Object.defineProperty(D,"AccountLinks",{enumerable:!0,get:function(){return Sw.AccountLinkResource}});var Mw=B9();Object.defineProperty(D,"AccountSessions",{enumerable:!0,get:function(){return Mw.AccountSessionResource}});var fw=z9();Object.defineProperty(D,"ApplePayDomains",{enumerable:!0,get:function(){return fw.ApplePayDomainResource}});var hw=K9();Object.defineProperty(D,"ApplicationFees",{enumerable:!0,get:function(){return hw.ApplicationFeeResource}});var bw=R0();Object.defineProperty(D,"Balance",{enumerable:!0,get:function(){return bw.BalanceResource}});var yw=R0();Object.defineProperty(D,"Balances",{enumerable:!0,get:function(){return yw.BalanceResource}});var vw=H9();Object.defineProperty(D,"BalanceSettings",{enumerable:!0,get:function(){return vw.BalanceSettingResource}});var jw=O9();Object.defineProperty(D,"BalanceTransactions",{enumerable:!0,get:function(){return jw.BalanceTransactionResource}});var _w=w9();Object.defineProperty(D,"Charges",{enumerable:!0,get:function(){return _w.ChargeResource}});var Rw=F9();Object.defineProperty(D,"ConfirmationTokens",{enumerable:!0,get:function(){return Rw.ConfirmationTokenResource}});var gw=U9();Object.defineProperty(D,"CountrySpecs",{enumerable:!0,get:function(){return gw.CountrySpecResource}});var uw=q9();Object.defineProperty(D,"Coupons",{enumerable:!0,get:function(){return uw.CouponResource}});var cw=D9();Object.defineProperty(D,"CreditNotes",{enumerable:!0,get:function(){return cw.CreditNoteResource}});var mw=L9();Object.defineProperty(D,"Customers",{enumerable:!0,get:function(){return mw.CustomerResource}});var lw=A9();Object.defineProperty(D,"CustomerSessions",{enumerable:!0,get:function(){return lw.CustomerSessionResource}});var dw=T9();Object.defineProperty(D,"Disputes",{enumerable:!0,get:function(){return dw.DisputeResource}});var nw=E9();Object.defineProperty(D,"EphemeralKeys",{enumerable:!0,get:function(){return nw.EphemeralKeyResource}});var pw=N9();Object.defineProperty(D,"Events",{enumerable:!0,get:function(){return pw.EventResource}});var iw=k9();Object.defineProperty(D,"ExchangeRates",{enumerable:!0,get:function(){return iw.ExchangeRateResource}});var rw=C9();Object.defineProperty(D,"Files",{enumerable:!0,get:function(){return rw.FileResource}});var tw=P9();Object.defineProperty(D,"FileLinks",{enumerable:!0,get:function(){return tw.FileLinkResource}});var aw=I9();Object.defineProperty(D,"Invoices",{enumerable:!0,get:function(){return aw.InvoiceResource}});var ow=x9();Object.defineProperty(D,"InvoiceItems",{enumerable:!0,get:function(){return ow.InvoiceItemResource}});var sw=S9();Object.defineProperty(D,"InvoicePayments",{enumerable:!0,get:function(){return sw.InvoicePaymentResource}});var ew=M9();Object.defineProperty(D,"InvoiceRenderingTemplates",{enumerable:!0,get:function(){return ew.InvoiceRenderingTemplateResource}});var ZF=f9();Object.defineProperty(D,"Mandates",{enumerable:!0,get:function(){return ZF.MandateResource}});var $F=IX();Object.defineProperty(D,"OAuthResource",{enumerable:!0,get:function(){return $F.OAuthResource}});var JF=h9();Object.defineProperty(D,"PaymentAttemptRecords",{enumerable:!0,get:function(){return JF.PaymentAttemptRecordResource}});var YF=b9();Object.defineProperty(D,"PaymentIntents",{enumerable:!0,get:function(){return YF.PaymentIntentResource}});var XF=y9();Object.defineProperty(D,"PaymentLinks",{enumerable:!0,get:function(){return XF.PaymentLinkResource}});var QF=v9();Object.defineProperty(D,"PaymentMethods",{enumerable:!0,get:function(){return QF.PaymentMethodResource}});var GF=j9();Object.defineProperty(D,"PaymentMethodConfigurations",{enumerable:!0,get:function(){return GF.PaymentMethodConfigurationResource}});var WF=_9();Object.defineProperty(D,"PaymentMethodDomains",{enumerable:!0,get:function(){return WF.PaymentMethodDomainResource}});var VF=R9();Object.defineProperty(D,"PaymentRecords",{enumerable:!0,get:function(){return VF.PaymentRecordResource}});var BF=g9();Object.defineProperty(D,"Payouts",{enumerable:!0,get:function(){return BF.PayoutResource}});var zF=u9();Object.defineProperty(D,"Plans",{enumerable:!0,get:function(){return zF.PlanResource}});var KF=c9();Object.defineProperty(D,"Prices",{enumerable:!0,get:function(){return KF.PriceResource}});var HF=m9();Object.defineProperty(D,"Products",{enumerable:!0,get:function(){return HF.ProductResource}});var OF=l9();Object.defineProperty(D,"PromotionCodes",{enumerable:!0,get:function(){return OF.PromotionCodeResource}});var wF=d9();Object.defineProperty(D,"Quotes",{enumerable:!0,get:function(){return wF.QuoteResource}});var FF=n9();Object.defineProperty(D,"Refunds",{enumerable:!0,get:function(){return FF.RefundResource}});var UF=p9();Object.defineProperty(D,"Reviews",{enumerable:!0,get:function(){return UF.ReviewResource}});var qF=i9();Object.defineProperty(D,"SetupAttempts",{enumerable:!0,get:function(){return qF.SetupAttemptResource}});var DF=r9();Object.defineProperty(D,"SetupIntents",{enumerable:!0,get:function(){return DF.SetupIntentResource}});var LF=t9();Object.defineProperty(D,"ShippingRates",{enumerable:!0,get:function(){return LF.ShippingRateResource}});var AF=a9();Object.defineProperty(D,"Sources",{enumerable:!0,get:function(){return AF.SourceResource}});var TF=o9();Object.defineProperty(D,"Subscriptions",{enumerable:!0,get:function(){return TF.SubscriptionResource}});var EF=s9();Object.defineProperty(D,"SubscriptionItems",{enumerable:!0,get:function(){return EF.SubscriptionItemResource}});var NF=e9();Object.defineProperty(D,"SubscriptionSchedules",{enumerable:!0,get:function(){return NF.SubscriptionScheduleResource}});var kF=ZZ();Object.defineProperty(D,"TaxCodes",{enumerable:!0,get:function(){return kF.TaxCodeResource}});var CF=$Z();Object.defineProperty(D,"TaxIds",{enumerable:!0,get:function(){return CF.TaxIdResource}});var PF=JZ();Object.defineProperty(D,"TaxRates",{enumerable:!0,get:function(){return PF.TaxRateResource}});var IF=YZ();Object.defineProperty(D,"Tokens",{enumerable:!0,get:function(){return IF.TokenResource}});var xF=XZ();Object.defineProperty(D,"Topups",{enumerable:!0,get:function(){return xF.TopupResource}});var SF=QZ();Object.defineProperty(D,"Transfers",{enumerable:!0,get:function(){return SF.TransferResource}});var MF=GZ();Object.defineProperty(D,"WebhookEndpoints",{enumerable:!0,get:function(){return MF.WebhookEndpointResource}});D.Apps=(0,P.resourceNamespace)("apps",{Secrets:Bw.SecretResource});D.Billing=(0,P.resourceNamespace)("billing",{Alerts:QO.AlertResource,CreditBalanceSummary:qO.CreditBalanceSummaryResource,CreditBalanceTransactions:DO.CreditBalanceTransactionResource,CreditGrants:LO.CreditGrantResource,MeterEventAdjustments:bO.MeterEventAdjustmentResource,MeterEvents:_O.MeterEventResource,Meters:gO.MeterResource});D.BillingPortal=(0,P.resourceNamespace)("billingPortal",{Configurations:OO.ConfigurationResource,Sessions:zw.SessionResource});D.Checkout=(0,P.resourceNamespace)("checkout",{Sessions:Kw.SessionResource});D.Climate=(0,P.resourceNamespace)("climate",{Orders:cO.OrderResource,Products:aO.ProductResource,Suppliers:ww.SupplierResource});D.Entitlements=(0,P.resourceNamespace)("entitlements",{ActiveEntitlements:XO.ActiveEntitlementResource,Features:IO.FeatureResource});D.FinancialConnections=(0,P.resourceNamespace)("financialConnections",{Accounts:JO.AccountResource,Sessions:Hw.SessionResource,Transactions:Dw.TransactionResource});D.Forwarding=(0,P.resourceNamespace)("forwarding",{Requests:Ww.RequestResource});D.Identity=(0,P.resourceNamespace)("identity",{VerificationReports:Cw.VerificationReportResource,VerificationSessions:Pw.VerificationSessionResource});D.Issuing=(0,P.resourceNamespace)("issuing",{Authorizations:WO.AuthorizationResource,Cardholders:zO.CardholderResource,Cards:KO.CardResource,Disputes:NO.DisputeResource,PersonalizationDesigns:iO.PersonalizationDesignResource,PhysicalBundles:tO.PhysicalBundleResource,Tokens:Uw.TokenResource,Transactions:Lw.TransactionResource});D.Radar=(0,P.resourceNamespace)("radar",{EarlyFraudWarnings:kO.EarlyFraudWarningResource,PaymentEvaluations:pO.PaymentEvaluationResource,ValueListItems:Nw.ValueListItemResource,ValueLists:kw.ValueListResource});D.Reporting=(0,P.resourceNamespace)("reporting",{ReportRuns:Qw.ReportRunResource,ReportTypes:Gw.ReportTypeResource});D.Sigma=(0,P.resourceNamespace)("sigma",{ScheduledQueryRuns:Vw.ScheduledQueryRunResource});D.Tax=(0,P.resourceNamespace)("tax",{Associations:GO.AssociationResource,Calculations:BO.CalculationResource,Registrations:Xw.RegistrationResource,Settings:Ow.SettingResource,Transactions:Aw.TransactionResource});D.Terminal=(0,P.resourceNamespace)("terminal",{Configurations:wO.ConfigurationResource,ConnectionTokens:UO.ConnectionTokenResource,Locations:hO.LocationResource,OnboardingLinks:uO.OnboardingLinkResource,Readers:oO.ReaderResource});D.TestHelpers=(0,P.resourceNamespace)("testHelpers",{ConfirmationTokens:FO.ConfirmationTokenResource,Customers:TO.CustomerResource,Refunds:Yw.RefundResource,TestClocks:Fw.TestClockResource,Issuing:(0,P.resourceNamespace)("issuing",{Authorizations:VO.AuthorizationResource,Cards:HO.CardResource,PersonalizationDesigns:rO.PersonalizationDesignResource,Transactions:Tw.TransactionResource}),Terminal:(0,P.resourceNamespace)("terminal",{Readers:sO.ReaderResource}),Treasury:(0,P.resourceNamespace)("treasury",{InboundTransfers:MO.InboundTransferResource,OutboundPayments:mO.OutboundPaymentResource,OutboundTransfers:dO.OutboundTransferResource,ReceivedCredits:eO.ReceivedCreditResource,ReceivedDebits:$w.ReceivedDebitResource})});D.Treasury=(0,P.resourceNamespace)("treasury",{CreditReversals:AO.CreditReversalResource,DebitReversals:EO.DebitReversalResource,FinancialAccounts:xO.FinancialAccountResource,InboundTransfers:fO.InboundTransferResource,OutboundPayments:lO.OutboundPaymentResource,OutboundTransfers:nO.OutboundTransferResource,ReceivedCredits:Zw.ReceivedCreditResource,ReceivedDebits:Jw.ReceivedDebitResource,TransactionEntries:qw.TransactionEntryResource,Transactions:Ew.TransactionResource});D.V2=(0,P.resourceNamespace)("v2",{Billing:(0,P.resourceNamespace)("billing",{MeterEventAdjustments:yO.MeterEventAdjustmentResource,MeterEventSession:vO.MeterEventSessionResource,MeterEventStream:jO.MeterEventStreamResource,MeterEvents:RO.MeterEventResource}),Commerce:(0,P.resourceNamespace)("commerce",{ProductCatalog:(0,P.resourceNamespace)("productCatalog",{Imports:SO.ImportResource})}),Core:(0,P.resourceNamespace)("core",{AccountLinks:ZO.AccountLinkResource,AccountTokens:$O.AccountTokenResource,Accounts:YO.AccountResource,EventDestinations:CO.EventDestinationResource,Events:PO.EventResource})})});var VG=O((VZ)=>{Object.defineProperty(VZ,"__esModule",{value:!0});VZ.Decimal=void 0;var tF=M8();Object.defineProperty(VZ,"Decimal",{enumerable:!0,get:function(){return tF.Decimal}})});var HG=O((zG)=>{Object.defineProperty(zG,"__esModule",{value:!0});zG.Apps=void 0;var oF=d6();class BG{constructor(Z){this.stripe=Z,this.secrets=new oF.SecretResource(Z)}}zG.Apps=BG});var UG=O((wG)=>{Object.defineProperty(wG,"__esModule",{value:!0});wG.Billing=void 0;var sF=u8(),eF=s8(),ZU=e8(),$U=Z6(),JU=A6(),YU=D6(),XU=w6();class OG{constructor(Z){this.stripe=Z,this.alerts=new sF.AlertResource(Z),this.creditBalanceSummaries=new eF.CreditBalanceSummaryResource(Z),this.creditBalanceTransactions=new ZU.CreditBalanceTransactionResource(Z),this.creditGrants=new $U.CreditGrantResource(Z),this.meters=new JU.MeterResource(Z),this.meterEvents=new YU.MeterEventResource(Z),this.meterEventAdjustments=new XU.MeterEventAdjustmentResource(Z)}}wG.Billing=OG});var AG=O((DG)=>{Object.defineProperty(DG,"__esModule",{value:!0});DG.BillingPortal=void 0;var QU=r8(),GU=n6();class qG{constructor(Z){this.stripe=Z,this.configurations=new QU.ConfigurationResource(Z),this.sessions=new GU.SessionResource(Z)}}DG.BillingPortal=qG});var kG=O((EG)=>{Object.defineProperty(EG,"__esModule",{value:!0});EG.Checkout=void 0;var WU=p6();class TG{constructor(Z){this.stripe=Z,this.sessions=new WU.SessionResource(Z)}}EG.Checkout=TG});var xG=O((PG)=>{Object.defineProperty(PG,"__esModule",{value:!0});PG.Climate=void 0;var VU=E6(),BU=f6(),zU=t6();class CG{constructor(Z){this.stripe=Z,this.orders=new VU.OrderResource(Z),this.products=new BU.ProductResource(Z),this.suppliers=new zU.SupplierResource(Z)}}PG.Climate=CG});var hG=O((MG)=>{Object.defineProperty(MG,"__esModule",{value:!0});MG.Entitlements=void 0;var KU=g8(),HU=V6();class SG{constructor(Z){this.stripe=Z,this.activeEntitlements=new KU.ActiveEntitlementResource(Z),this.features=new HU.FeatureResource(Z)}}MG.Entitlements=SG});var jG=O((yG)=>{Object.defineProperty(yG,"__esModule",{value:!0});yG.FinancialConnections=void 0;var OU=_8(),wU=i6(),FU=e6();class bG{constructor(Z){this.stripe=Z,this.accounts=new OU.AccountResource(Z),this.sessions=new wU.SessionResource(Z),this.transactions=new FU.TransactionResource(Z)}}yG.FinancialConnections=bG});var uG=O((RG)=>{Object.defineProperty(RG,"__esModule",{value:!0});RG.Forwarding=void 0;var UU=m6();class _G{constructor(Z){this.stripe=Z,this.requests=new UU.RequestResource(Z)}}RG.Forwarding=_G});var dG=O((mG)=>{Object.defineProperty(mG,"__esModule",{value:!0});mG.Identity=void 0;var qU=G9(),DU=W9();class cG{constructor(Z){this.stripe=Z,this.verificationReports=new qU.VerificationReportResource(Z),this.verificationSessions=new DU.VerificationSessionResource(Z)}}mG.Identity=cG});var rG=O((pG)=>{Object.defineProperty(pG,"__esModule",{value:!0});pG.Issuing=void 0;var LU=m8(),AU=p8(),TU=n8(),EU=X6(),NU=x6(),kU=M6(),CU=o6(),PU=Z9();class nG{constructor(Z){this.stripe=Z,this.authorizations=new LU.AuthorizationResource(Z),this.cards=new AU.CardResource(Z),this.cardholders=new TU.CardholderResource(Z),this.disputes=new EU.DisputeResource(Z),this.personalizationDesigns=new NU.PersonalizationDesignResource(Z),this.physicalBundles=new kU.PhysicalBundleResource(Z),this.tokens=new CU.TokenResource(Z),this.transactions=new PU.TransactionResource(Z)}}pG.Issuing=nG});var sG=O((aG)=>{Object.defineProperty(aG,"__esModule",{value:!0});aG.Radar=void 0;var IU=Q6(),xU=I6(),SU=Q9(),MU=X9();class tG{constructor(Z){this.stripe=Z,this.earlyFraudWarnings=new IU.EarlyFraudWarningResource(Z),this.paymentEvaluations=new xU.PaymentEvaluationResource(Z),this.valueLists=new SU.ValueListResource(Z),this.valueListItems=new MU.ValueListItemResource(Z)}}aG.Radar=tG});var J3=O((Z3)=>{Object.defineProperty(Z3,"__esModule",{value:!0});Z3.Reporting=void 0;var fU=u6(),hU=c6();class eG{constructor(Z){this.stripe=Z,this.reportRuns=new fU.ReportRunResource(Z),this.reportTypes=new hU.ReportTypeResource(Z)}}Z3.Reporting=eG});var G3=O((X3)=>{Object.defineProperty(X3,"__esModule",{value:!0});X3.Sigma=void 0;var bU=l6();class Y3{constructor(Z){this.stripe=Z,this.scheduledQueryRuns=new bU.ScheduledQueryRunResource(Z)}}X3.Sigma=Y3});var z3=O((V3)=>{Object.defineProperty(V3,"__esModule",{value:!0});V3.Tax=void 0;var yU=c8(),vU=d8(),jU=g6(),_U=r6(),RU=$9();class W3{constructor(Z){this.stripe=Z,this.associations=new yU.AssociationResource(Z),this.calculations=new vU.CalculationResource(Z),this.registrations=new jU.RegistrationResource(Z),this.settings=new _U.SettingResource(Z),this.transactions=new RU.TransactionResource(Z)}}V3.Tax=W3});var w3=O((H3)=>{Object.defineProperty(H3,"__esModule",{value:!0});H3.Terminal=void 0;var gU=t8(),uU=o8(),cU=O6(),mU=T6(),lU=h6();class K3{constructor(Z){this.stripe=Z,this.configurations=new gU.ConfigurationResource(Z),this.connectionTokens=new uU.ConnectionTokenResource(Z),this.locations=new cU.LocationResource(Z),this.onboardingLinks=new mU.OnboardingLinkResource(Z),this.readers=new lU.ReaderResource(Z)}}H3.Terminal=K3});var D3=O((U3)=>{Object.defineProperty(U3,"__esModule",{value:!0});U3.Issuing=void 0;var dU=l8(),nU=i8(),pU=S6(),iU=J9();class F3{constructor(Z){this.stripe=Z,this.authorizations=new dU.AuthorizationResource(Z),this.cards=new nU.CardResource(Z),this.personalizationDesigns=new pU.PersonalizationDesignResource(Z),this.transactions=new iU.TransactionResource(Z)}}U3.Issuing=F3});var E3=O((A3)=>{Object.defineProperty(A3,"__esModule",{value:!0});A3.Terminal=void 0;var rU=b6();class L3{constructor(Z){this.stripe=Z,this.readers=new rU.ReaderResource(Z)}}A3.Terminal=L3});var P3=O((k3)=>{Object.defineProperty(k3,"__esModule",{value:!0});k3.Treasury=void 0;var tU=K6(),aU=N6(),oU=C6(),sU=y6(),eU=j6();class N3{constructor(Z){this.stripe=Z,this.inboundTransfers=new tU.InboundTransferResource(Z),this.outboundPayments=new aU.OutboundPaymentResource(Z),this.outboundTransfers=new oU.OutboundTransferResource(Z),this.receivedCredits=new sU.ReceivedCreditResource(Z),this.receivedDebits=new eU.ReceivedDebitResource(Z)}}k3.Treasury=N3});var M3=O((x3)=>{Object.defineProperty(x3,"__esModule",{value:!0});x3.TestHelpers=void 0;var Zq=a8(),$q=J6(),Jq=R6(),Yq=a6(),Xq=D3(),Qq=E3(),Gq=P3();class I3{constructor(Z){this.stripe=Z,this.confirmationTokens=new Zq.ConfirmationTokenResource(Z),this.customers=new $q.CustomerResource(Z),this.refunds=new Jq.RefundResource(Z),this.testClocks=new Yq.TestClockResource(Z),this.issuing=new Xq.Issuing(Z),this.terminal=new Qq.Terminal(Z),this.treasury=new Gq.Treasury(Z)}}x3.TestHelpers=I3});var y3=O((h3)=>{Object.defineProperty(h3,"__esModule",{value:!0});h3.Treasury=void 0;var Wq=$6(),Vq=Y6(),Bq=B6(),zq=H6(),Kq=k6(),Hq=P6(),Oq=v6(),wq=_6(),Fq=Y9(),Uq=s6();class f3{constructor(Z){this.stripe=Z,this.creditReversals=new Wq.CreditReversalResource(Z),this.debitReversals=new Vq.DebitReversalResource(Z),this.financialAccounts=new Bq.FinancialAccountResource(Z),this.inboundTransfers=new zq.InboundTransferResource(Z),this.outboundPayments=new Kq.OutboundPaymentResource(Z),this.outboundTransfers=new Hq.OutboundTransferResource(Z),this.receivedCredits=new Oq.ReceivedCreditResource(Z),this.receivedDebits=new wq.ReceivedDebitResource(Z),this.transactions=new Fq.TransactionResource(Z),this.transactionEntries=new Uq.TransactionEntryResource(Z)}}h3.Treasury=f3});var R3=O((j3)=>{Object.defineProperty(j3,"__esModule",{value:!0});j3.Billing=void 0;var qq=L6(),Dq=F6(),Lq=U6(),Aq=q6();class v3{constructor(Z){this.stripe=Z,this.meterEvents=new qq.MeterEventResource(Z),this.meterEventAdjustments=new Dq.MeterEventAdjustmentResource(Z),this.meterEventSession=new Lq.MeterEventSessionResource(Z),this.meterEventStream=new Aq.MeterEventStreamResource(Z)}}j3.Billing=v3});var m3=O((u3)=>{Object.defineProperty(u3,"__esModule",{value:!0});u3.ProductCatalog=void 0;var Tq=z6();class g3{constructor(Z){this.stripe=Z,this.imports=new Tq.ImportResource(Z)}}u3.ProductCatalog=g3});var p3=O((d3)=>{Object.defineProperty(d3,"__esModule",{value:!0});d3.Commerce=void 0;var Eq=m3();class l3{constructor(Z){this.stripe=Z,this.productCatalog=new Eq.ProductCatalog(Z)}}d3.Commerce=l3});var a3=O((r3)=>{Object.defineProperty(r3,"__esModule",{value:!0});r3.Core=void 0;var Nq=R8(),kq=v8(),Cq=j8(),Pq=W6(),Iq=G6();class i3{constructor(Z){this.stripe=Z,this.accounts=new Nq.AccountResource(Z),this.accountLinks=new kq.AccountLinkResource(Z),this.accountTokens=new Cq.AccountTokenResource(Z),this.events=new Pq.EventResource(Z),this.eventDestinations=new Iq.EventDestinationResource(Z)}}r3.Core=i3});var ZW=O((s3)=>{Object.defineProperty(s3,"__esModule",{value:!0});s3.V2=void 0;var xq=R3(),Sq=p3(),Mq=a3();class o3{constructor(Z){this.stripe=Z,this.billing=new xq.Billing(Z),this.commerce=new Sq.Commerce(Z),this.core=new Mq.Core(Z)}}s3.V2=o3});var XW=O((JW)=>{Object.defineProperty(JW,"__esModule",{value:!0});JW.Reserve=void 0;class $W{}JW.Reserve=$W});var LW=O((qW)=>{Object.defineProperty(qW,"__esModule",{value:!0});qW.createStripe=qW.Stripe=void 0;var HW=K0(),fq=m$(),OW=F(),zZ=X1(),hq=H8(),bq=W1(),wW=z1(),yq=V0(),FW=B0(),g0=WZ(),Z0=R(),UW=VG(),vq=_0(),jq=V9(),_q=B9(),Rq=z9(),gq=K9(),uq=R0(),cq=H9(),mq=O9(),lq=w9(),dq=F9(),nq=U9(),pq=q9(),iq=D9(),rq=L9(),tq=A9(),aq=T9(),oq=E9(),sq=k9(),eq=C9(),ZD=P9(),$D=I9(),JD=x9(),YD=S9(),XD=M9(),QD=f9(),GD=h9(),WD=b9(),VD=y9(),BD=v9(),zD=j9(),KD=_9(),HD=R9(),OD=g9(),wD=u9(),FD=c9(),UD=m9(),qD=l9(),DD=d9(),LD=n9(),AD=p9(),TD=i9(),ED=r9(),ND=t9(),kD=a9(),CD=o9(),PD=s9(),ID=e9(),xD=ZZ(),SD=$Z(),MD=JZ(),fD=YZ(),hD=XZ(),bD=QZ(),yD=GZ(),vD=HG(),jD=UG(),_D=AG(),RD=kG(),gD=xG(),uD=hG(),cD=jG(),mD=uG(),lD=dG(),dD=rG(),nD=sG(),pD=J3(),iD=G3(),rD=z3(),tD=w3(),aD=M3(),oD=y3(),sD=ZW(),N2=XW(),eD=N9(),ZL=WZ(),BZ="api.stripe.com",QW="443",GW="/v1/",WW=wW.ApiVersion,VW=80000,BW=5,zW=0.5,$L=["name","version","url","partner_id"],KW=["authenticator","apiVersion","typescript","maxNetworkRetries","httpAgent","httpClient","timeout","host","port","protocol","telemetry","emitEventBodies","appInfo","stripeAccount","stripeContext"],KZ=(Z)=>new fq.RequestSender(Z,OW.StripeResource.MAX_BUFFERED_REQUEST_METRICS);class k{static initialize(Z,$=KZ){k._platformFunctions=Z,k._requestSenderFactory=$,k.webhooks=(0,bq.createWebhooks)(Z),k.createNodeHttpClient=Z.createNodeHttpClient,k.createFetchHttpClient=Z.createFetchHttpClient,k.createNodeCryptoProvider=Z.createNodeCryptoProvider,k.createSubtleCryptoProvider=Z.createSubtleCryptoProvider;let J=Z.getEnv(),Y=Z.getRuntimeVersion();k.aiAgent=J?(0,Z0.detectAIAgent)(J):"",k.AI_AGENT=k.aiAgent,k.USER_AGENT={bindings_version:k.PACKAGE_VERSION,lang:"node",typescript:!1,...Y?{lang_version:Y}:{},...k.aiAgent?{ai_agent:k.aiAgent}:{}}}constructor(Z,$={}){this._authenticator=null;let J=this._getPropsFromConfig($);this._platformFunctions=k._platformFunctions,Object.defineProperty(this,"_emitter",{value:this._platformFunctions.createEmitter(),enumerable:!1,configurable:!1,writable:!1}),this.VERSION=k.PACKAGE_VERSION,this.on=this._emitter.on.bind(this._emitter),this.once=this._emitter.once.bind(this._emitter),this.off=this._emitter.removeListener.bind(this._emitter);let Y=J.httpAgent||null;this._api={host:J.host||BZ,port:J.port||QW,protocol:J.protocol||"https",basePath:GW,version:J.apiVersion||WW,timeout:(0,Z0.validateInteger)("timeout",J.timeout,VW),maxNetworkRetries:(0,Z0.validateInteger)("maxNetworkRetries",J.maxNetworkRetries,2),agent:Y,httpClient:J.httpClient||(Y?this._platformFunctions.createNodeHttpClient(Y):this._platformFunctions.createDefaultHttpClient()),dev:!1,stripeAccount:J.stripeAccount||null,stripeContext:J.stripeContext||null};let X=J.typescript||!1;if(X!==k.USER_AGENT.typescript)k.USER_AGENT.typescript=X;if(J.appInfo)this._setAppInfo(J.appInfo);this._setAuthenticator(Z,J.authenticator||null),this.errors=HW,this.Decimal=UW.Decimal,this.webhooks=k.webhooks,this._prevRequestMetrics=[],this._enableTelemetry=J.telemetry!==!1,this._emitEventBodies=J.emitEventBodies===!0,this._requestSender=k._requestSenderFactory(this),this.accountLinks=new jq.AccountLinkResource(this),this.accountSessions=new _q.AccountSessionResource(this),this.accounts=new vq.AccountResource(this),this.applePayDomains=new Rq.ApplePayDomainResource(this),this.applicationFees=new gq.ApplicationFeeResource(this),this.balance=new uq.BalanceResource(this),this.balanceSettings=new cq.BalanceSettingResource(this),this.balanceTransactions=new mq.BalanceTransactionResource(this),this.charges=new lq.ChargeResource(this),this.confirmationTokens=new dq.ConfirmationTokenResource(this),this.countrySpecs=new nq.CountrySpecResource(this),this.coupons=new pq.CouponResource(this),this.creditNotes=new iq.CreditNoteResource(this),this.customerSessions=new tq.CustomerSessionResource(this),this.customers=new rq.CustomerResource(this),this.disputes=new aq.DisputeResource(this),this.ephemeralKeys=new oq.EphemeralKeyResource(this),this.events=new eD.EventResource(this),this.exchangeRates=new sq.ExchangeRateResource(this),this.fileLinks=new ZD.FileLinkResource(this),this.files=new eq.FileResource(this),this.invoiceItems=new JD.InvoiceItemResource(this),this.invoicePayments=new YD.InvoicePaymentResource(this),this.invoiceRenderingTemplates=new XD.InvoiceRenderingTemplateResource(this),this.invoices=new $D.InvoiceResource(this),this.mandates=new QD.MandateResource(this),this.paymentAttemptRecords=new GD.PaymentAttemptRecordResource(this),this.paymentIntents=new WD.PaymentIntentResource(this),this.paymentLinks=new VD.PaymentLinkResource(this),this.paymentMethodConfigurations=new zD.PaymentMethodConfigurationResource(this),this.paymentMethodDomains=new KD.PaymentMethodDomainResource(this),this.paymentMethods=new BD.PaymentMethodResource(this),this.paymentRecords=new HD.PaymentRecordResource(this),this.payouts=new OD.PayoutResource(this),this.plans=new wD.PlanResource(this),this.prices=new FD.PriceResource(this),this.products=new UD.ProductResource(this),this.promotionCodes=new qD.PromotionCodeResource(this),this.quotes=new DD.QuoteResource(this),this.refunds=new LD.RefundResource(this),this.reviews=new AD.ReviewResource(this),this.setupAttempts=new TD.SetupAttemptResource(this),this.setupIntents=new ED.SetupIntentResource(this),this.shippingRates=new ND.ShippingRateResource(this),this.sources=new kD.SourceResource(this),this.subscriptionItems=new PD.SubscriptionItemResource(this),this.subscriptionSchedules=new ID.SubscriptionScheduleResource(this),this.subscriptions=new CD.SubscriptionResource(this),this.taxCodes=new xD.TaxCodeResource(this),this.taxIds=new SD.TaxIdResource(this),this.taxRates=new MD.TaxRateResource(this),this.tokens=new fD.TokenResource(this),this.topups=new hD.TopupResource(this),this.transfers=new bD.TransferResource(this),this.webhookEndpoints=new yD.WebhookEndpointResource(this),this.apps=new vD.Apps(this),this.billing=new jD.Billing(this),this.billingPortal=new _D.BillingPortal(this),this.checkout=new RD.Checkout(this),this.climate=new gD.Climate(this),this.entitlements=new uD.Entitlements(this),this.financialConnections=new cD.FinancialConnections(this),this.forwarding=new mD.Forwarding(this),this.identity=new lD.Identity(this),this.issuing=new dD.Issuing(this),this.radar=new nD.Radar(this),this.reporting=new pD.Reporting(this),this.sigma=new iD.Sigma(this),this.tax=new rD.Tax(this),this.terminal=new tD.Terminal(this),this.testHelpers=new aD.TestHelpers(this),this.treasury=new oD.Treasury(this),this.v2=new sD.V2(this),this.account=this.accounts,this.oauth=new ZL.OAuthResource(this)}rawRequest(Z,$,J,Y){return this._requestSender._rawRequest(Z,$,J,Y)}_setAuthenticator(Z,$){if(Z&&$)throw Error("Can't specify both apiKey and authenticator");if(!Z&&!$)throw Error("Neither apiKey nor config.authenticator provided");this._authenticator=Z?(0,Z0.createApiKeyAuthenticator)(Z):$}_setAppInfo(Z){if(Z&&typeof Z!=="object")throw Error("AppInfo must be an object.");if(Z&&!Z.name)throw Error("AppInfo.name is required");Z=Z||{},this._appInfo=$L.reduce(($,J)=>{if(typeof Z[J]=="string")$=$||{},$[J]=Z[J];return $},{})}setClientId(Z){this._clientId=Z}getClientId(){return this._clientId}getConstant(Z){switch(Z){case"DEFAULT_HOST":return BZ;case"DEFAULT_PORT":return QW;case"DEFAULT_BASE_PATH":return GW;case"DEFAULT_API_VERSION":return WW;case"DEFAULT_TIMEOUT":return VW;case"MAX_NETWORK_RETRY_DELAY_SEC":return BW;case"INITIAL_NETWORK_RETRY_DELAY_SEC":return zW}return k[Z]}resolveBaseAddress(Z){let $=this.getApiField("host");if($!==BZ)return $;return hq.DEFAULT_BASE_ADDRESSES[Z]}getMaxNetworkRetries(){return this.getApiField("maxNetworkRetries")}_setApiNumberField(Z,$,J){let Y=(0,Z0.validateInteger)(Z,$,J);this._setApiField(Z,Y)}getMaxNetworkRetryDelay(){return BW}getInitialNetworkRetryDelay(){return zW}getClientUserAgent(Z){return this.getClientUserAgentSeeded(k.USER_AGENT,Z)}getClientUserAgentSeeded(Z,$){let J={};for(let Q in Z){if(!Object.prototype.hasOwnProperty.call(Z,Q))continue;J[Q]=encodeURIComponent(Z[Q]??"null")}let Y=this._platformFunctions.getPlatformInfo();if(Y&&this.getTelemetryEnabled())J.platform=encodeURIComponent(Y);else delete J.platform;let X=this.getApiField("httpClient");if(X)J.httplib=encodeURIComponent(X.getClientName());if(this._appInfo)J.application=this._appInfo;if(this.getTelemetryEnabled()){let Q=this._platformFunctions.getTelemetryId();if(Q)J.telemetry_id=Q}$(JSON.stringify(J))}getAppInfoAsString(){if(!this._appInfo)return"";let Z=this._appInfo.name;if(this._appInfo.version)Z+=`/${this._appInfo.version}`;if(this._appInfo.url)Z+=` (${this._appInfo.url})`;return Z}getTelemetryEnabled(){return this._enableTelemetry}getEmitEventBodiesEnabled(){return this._emitEventBodies}_prepResources(){for(let Z in g0){if(!Object.prototype.hasOwnProperty.call(g0,Z))continue;this[(0,Z0.pascalToCamelCase)(Z.replace("Resource",""))]=new g0[Z](this)}}_getPropsFromConfig(Z){if(!Z)return{};let $=typeof Z==="string";if(!(Z===Object(Z)&&!Array.isArray(Z))&&!$)throw Error("Config must either be an object or a string");if($)return{apiVersion:Z};if(Object.keys(Z).filter((X)=>!KW.includes(X)).length>0)throw Error(`Config object may only contain the following: ${KW.join(", ")}`);return Z}_setApiField(Z,$){this._api[Z]=$}getApiField(Z){return this._api[Z]}parseEventNotification(Z,$,J,Y,X,Q){if(!this.webhooks.signature)throw Error("ERR: missing signature helper, unable to verify");this.webhooks.signature.verifyHeader(Z,$,J,Y||this.webhooks.DEFAULT_TOLERANCE,X||this._platformFunctions.createDefaultCryptoProvider(),Q);let G=Z instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(Z)):JSON.parse(Z);if(G&&G.object==="event")throw Error("You passed a webhook payload to stripe.parseEventNotification, which expects an event notification. Use stripe.webhooks.constructEvent instead.");if(G.context)G.context=zZ.StripeContext.parse(G.context);return G.fetchEvent=()=>{return this._requestSender._rawRequest("GET",`/v2/core/events/${G.id}`,void 0,{stripeContext:G.context,headers:{"Stripe-Request-Trigger":`event=${G.id}`}},["fetch_event"])},G.fetchRelatedObject=()=>{if(!G.related_object)return Promise.resolve(null);return this._requestSender._rawRequest("GET",G.related_object.url,void 0,{stripeContext:G.context,headers:{"Stripe-Request-Trigger":`event=${G.id}`}},["fetch_related_object"])},G}async parseEventNotificationAsync(Z,$,J,Y,X,Q){if(!this.webhooks.signature)throw Error("ERR: missing signature helper, unable to verify");await this.webhooks.signature.verifyHeaderAsync(Z,$,J,Y||this.webhooks.DEFAULT_TOLERANCE,X||this._platformFunctions.createDefaultCryptoProvider(),Q);let G=Z instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(Z)):JSON.parse(Z);if(G&&G.object==="event")throw Error("You passed a webhook payload to stripe.parseEventNotificationAsync, which expects an event notification. Use stripe.webhooks.constructEventAsync instead.");if(G.context)G.context=zZ.StripeContext.parse(G.context);return G.fetchEvent=()=>{return this._requestSender._rawRequest("GET",`/v2/core/events/${G.id}`,void 0,{stripeContext:G.context,headers:{"Stripe-Request-Trigger":`event=${G.id}`}},["fetch_event"])},G.fetchRelatedObject=()=>{if(!G.related_object)return Promise.resolve(null);return this._requestSender._rawRequest("GET",G.related_object.url,void 0,{stripeContext:G.context,headers:{"Stripe-Request-Trigger":`event=${G.id}`}},["fetch_related_object"])},G}}qW.Stripe=k;k.PACKAGE_VERSION="22.3.2";k.API_VERSION=wW.ApiVersion;k.aiAgent="";k.AI_AGENT="";k.USER_AGENT={bindings_version:k.PACKAGE_VERSION,lang:"node",typescript:!1};k.StripeResource=OW.StripeResource;k.resources=g0;k.HttpClient=FW.HttpClient;k.HttpClientResponse=FW.HttpClientResponse;k.CryptoProvider=yq.CryptoProvider;k.StripeContext=zZ.StripeContext;k.errors=HW;k.Decimal=UW.Decimal;k._requestSenderFactory=KZ;function JL(Z,$=KZ){return k.initialize(Z,$),k}qW.createStripe=JL});var TW=O((C2,AW)=>{var XL=R$(),d=LW();d.Stripe.initialize(new XL.NodePlatformFunctions);var q0=function(Z,$){if(!(this instanceof q0))return new d.Stripe(Z,$);return new d.Stripe(Z,$)};Object.setPrototypeOf(q0,d.Stripe);Object.setPrototypeOf(q0.prototype,d.Stripe.prototype);for(let Z of Object.getOwnPropertyNames(d.Stripe))if(Z!=="length"&&Z!=="prototype"&&Z!=="name")Object.defineProperty(q0,Z,{value:d.Stripe[Z],writable:!0,enumerable:!0,configurable:!0});AW.exports=q0});import"@stacksjs/validation";import{log as d0}from"@stacksjs/cli";import{db as qZ}from"@stacksjs/database";async function ZV(Z,$={}){let{olderThanDays:J=30,column:Y="created_at",query:X}=$;try{if(X){let V=qZ.deleteFrom(Z);V=X(V);let B=await V.execute(),K=Array.isArray(B)?B:[B],H=Number(K[0]?.numDeletedRows??K.length??0);return d0.info(`Pruned ${H} records from ${Z}`),H}let Q=new Date;Q.setDate(Q.getDate()-J);let G=await qZ.deleteFrom(Z).where(Y,"<",Q.toISOString()).execute(),W=Array.isArray(G)?G:[G],z=Number(W[0]?.numDeletedRows??W.length??0);return d0.info(`Pruned ${z} records from ${Z} older than ${J} days`),z}catch(Q){throw d0.error(`Failed to prune ${Z}:`,Q),Q}}async function eA(Z,$={}){return ZV(Z,$)}function ZT(Z){if(!Z?.prunable)return null;if(typeof Z.prunable==="boolean")return{olderThanDays:30,column:"created_at"};return Z.prunable}import{createCipheriv as $V,createDecipheriv as JV,createHash as YV,randomBytes as XV}from"crypto";import{log as k0}from"@stacksjs/logging";var DZ="enc:",LZ="aes-256-gcm",QV=12,N0=null;async function AZ(){if(N0)return N0;let Z=process.env.APP_KEY;if(!Z)try{Z=(await import("@stacksjs/config").catch(()=>null))?.config?.app?.key}catch{}if(!Z)return null;return N0=YV("sha256").update(Z).digest(),N0}function X0(Z){return typeof Z==="string"&&Z.startsWith(DZ)}async function n0(Z){if(Z==null)return Z;if(X0(Z))return Z;if(typeof Z!=="string")return Z;let $=await AZ();if(!$)return k0.warn("[orm] encrypted attribute: APP_KEY not set \u2014 storing value in plaintext"),Z;let J=XV(QV),Y=$V(LZ,$,J),X=Buffer.concat([Y.update(Z,"utf8"),Y.final()]),Q=Y.getAuthTag();return`${DZ}${J.toString("base64")}:${Q.toString("base64")}:${X.toString("base64")}`}async function p0(Z){if(Z==null)return Z;if(typeof Z!=="string")return Z;if(!X0(Z))return Z;try{let $=await AZ();if(!$)return k0.warn("[orm] encrypted attribute: APP_KEY not set \u2014 cannot decrypt"),null;let[,J,Y,X]=Z.split(":");if(!J||!Y||!X)return k0.warn("[orm] encrypted attribute: malformed envelope, returning null"),null;let Q=Buffer.from(J,"base64"),G=Buffer.from(Y,"base64"),W=Buffer.from(X,"base64"),z=JV(LZ,$,Q);return z.setAuthTag(G),Buffer.concat([z.update(W),z.final()]).toString("utf8")}catch($){return k0.warn("[orm] encrypted attribute: decrypt failed (key rotation? corrupted ciphertext?)",{error:$}),null}}function i0(Z){let $=Z.attributes;if(!$||typeof $!=="object")return[];let J=[];for(let[Y,X]of Object.entries($))if(X&&typeof X==="object"&&X.encrypted===!0)J.push(Y);return J}import{log as G0}from"@stacksjs/logging";var GV=[/^password$/i,/^password_hash$/i,/^api_key$/i,/_token$/i,/_secret$/i,/^remember_token$/i],EZ="model_audits",a0=null;function WV(Z){a0=Z}async function r0(){if(a0!=null)return a0;try{let Z=await import("@stacksjs/router").catch(()=>null);if(!Z)return null;let $=Z.getCurrentRequest;if(typeof $!=="function")return null;let J=$();if(!J)return null;return(J.user??J._user)?.id??null}catch{return null}}function C0(Z){if(!Z||typeof Z!=="object")return null;let $={};for(let[J,Y]of Object.entries(Z)){if(GV.some((X)=>X.test(J)))continue;$[J]=Y}return $}function Q0(Z){if(!Z||typeof Z!=="object")return null;let $=Z;if($._attributes&&typeof $._attributes==="object")return{...$._attributes};return{...Z}}function VV(Z,$){if(!Z||!$)return{old:Z,next:$};let J={},Y={},X=new Set([...Object.keys(Z),...Object.keys($)]);for(let Q of X)if(Z[Q]!==$[Q])J[Q]=Z[Q],Y[Q]=$[Q];return{old:J,next:Y}}async function t0(Z,$=!1){try{let{db:J}=await import("@stacksjs/database");await J.insertInto(EZ).values({auditable_type:Z.auditable_type,auditable_id:Z.auditable_id,event:Z.event,old_values:Z.old_values?JSON.stringify(Z.old_values):null,new_values:Z.new_values?JSON.stringify(Z.new_values):null,user_id:Z.user_id,created_at:new Date().toISOString()}).executeTakeFirst()}catch(J){if(G0.warn(`[orm] audit row write failed for ${Z.auditable_type}#${String(Z.auditable_id)} (${Z.event})`,{error:J}),$)throw J}}function NZ(Z){return{async audits($){try{let{db:J}=await import("@stacksjs/database");return(await J.selectFrom(EZ).selectAll().where("auditable_type","=",Z).where("auditable_id","=",$).orderBy("created_at","desc").execute()??[]).map((X)=>({...X,old_values:typeof X.old_values==="string"?TZ(X.old_values):X.old_values,new_values:typeof X.new_values==="string"?TZ(X.new_values):X.new_values}))}catch(J){return G0.warn(`[orm] audits() lookup failed for ${Z}#${String($)}`,{error:J}),[]}}}}function TZ(Z){try{return JSON.parse(Z)}catch{return Z}}function kZ(Z){if(Z&&typeof Z==="object"&&"transactional"in Z)return{transactional:Z.transactional===!0};return{transactional:!1}}function CZ(Z,$,J="id",Y={}){let X=Y.transactional===!0,Q=Z;if(typeof Z.audits!=="function")Z.audits=NZ($).audits;let G=async(B)=>{if(!X)return await B();let{db:K}=await import("@stacksjs/database");return await K.transaction(async()=>B())},W=Z.create;if(typeof W==="function")Z.create=async function(...B){return await G(async()=>{let K=await W.apply(this,B);try{let H=Q0(K),w=H?.[J];if(w!=null){let U=await r0();await t0({auditable_type:$,auditable_id:w,event:"created",old_values:null,new_values:C0(H),user_id:U},X)}}catch(H){if(G0.warn(`[orm] audit(create) failed for ${$}`,{error:H}),X)throw H}return K})};let z=Z.update;if(typeof z==="function")Z.update=async function(B,K){return await G(async()=>{let H=Q.find,w=typeof H==="function"?Q0(await H.call(Q,B)):null,U=await z.call(this,B,K);try{let q=Q0(U)??(typeof H==="function"?Q0(await H.call(Q,B)):null),{old:L,next:T}=VV(w,q);if(T&&Object.keys(T).length>0){let N=await r0();await t0({auditable_type:$,auditable_id:B,event:"updated",old_values:C0(L),new_values:C0(T),user_id:N},X)}}catch(q){if(G0.warn(`[orm] audit(update) failed for ${$}#${String(B)}`,{error:q}),X)throw q}return U})};let V=(B)=>{let K=Z[B];if(typeof K!=="function")return;Z[B]=async function(H){return await G(async()=>{let w=Q.find,U=typeof w==="function"?Q0(await w.call(Q,H)):null,q=await K.call(this,H);try{if(q!==!1&&U){let L=await r0();await t0({auditable_type:$,auditable_id:H,event:"deleted",old_values:C0(U),new_values:null,user_id:L},X)}}catch(L){if(G0.warn(`[orm] audit(${B}) failed for ${$}#${String(H)}`,{error:L}),X)throw L}return q})}};V("delete"),V("softDelete")}function PZ(Z){let $=Z;return $?.code==="SQLITE_CONSTRAINT_UNIQUE"||$?.code==="SQLITE_CONSTRAINT"||$?.code==="23505"||$?.errno===1062||/unique|duplicate/i.test($?.message??"")}function BV(Z,$,J){let Y=Z;if(Z instanceof Error&&typeof Y.status==="number"&&Number.isInteger(Y.status)&&Y.status>=400&&Y.status<600){let X={error:Z.message};if(Y.details!==void 0)X.details=Y.details;return{status:Y.status,body:X}}if(PZ(Z))return{status:409,body:{error:`${$} already exists`}};return{status:500,body:{error:`Failed to ${J} ${$}`,detail:String(Z)}}}import{cacheRequestQuery as zV}from"@stacksjs/router";var P0=new WeakMap;function BT(Z,$){return zV(`batchLoad:${Z.name??"model"}:${String($)}`,async()=>{return new Promise((J,Y)=>{let X=P0.get(Z);if(!X)X={keys:[],resolvers:[],scheduled:!1},P0.set(Z,X);if(X.keys.push($),X.resolvers.push({key:$,resolve:J,reject:Y}),X.scheduled)return;X.scheduled=!0,Promise.resolve().then(async()=>{let Q=P0.get(Z);if(!Q)return;P0.delete(Z);let G=Array.from(new Set(Q.keys));try{let W=typeof Z.findMany==="function"?await Z.findMany(G):await Promise.all(G.map((V)=>Z.find?.(V))),z=new Map;for(let V of W??[]){let B=V?.id;if(B!==void 0)z.set(B,V)}for(let V of Q.resolvers)V.resolve(z.get(V.key))}catch(W){for(let z of Q.resolvers)z.reject(W)}})})})}import{db as OT}from"@stacksjs/database";class KV{conditions=[];where(Z,...$){let[J,Y]=$,X=Y===void 0?"=":J,Q=Y===void 0?J:Y;this.addCondition("and","where",Z,X,Q)}orWhere(Z,...$){let[J,Y]=$,X=Y===void 0?"=":J,Q=Y===void 0?J:Y;this.addCondition("or","where",Z,X,Q)}whereIn(Z,$){this.conditions.push({type:"and",method:"whereIn",column:Z,values:$})}whereNotIn(Z,$){this.conditions.push({type:"and",method:"whereIn",column:Z,values:$,operator:"not in"})}whereNull(Z){this.conditions.push({type:"and",method:"whereNull",column:Z})}whereNotNull(Z){this.conditions.push({type:"and",method:"whereNotNull",column:Z})}whereBetween(Z,$){this.conditions.push({type:"and",method:"whereBetween",column:Z,range:$})}whereExists(Z){this.conditions.push({type:"and",method:"whereExists",column:"",callback:Z})}addCondition(Z,$,J,Y,X){this.conditions.push({type:Z,method:$,column:J,operator:Y,value:X})}getConditions(){return this.conditions}}import{db as I0,runInTransactionScope as HV}from"@stacksjs/database";async function UT(Z,$){return await HV(async()=>{return await I0.transaction(Z,$)})}function qT(Z){return I0.transaction(async()=>{await Z()})}async function DT(Z){return await I0.savepoint(Z)}function LT(Z,$){return I0.transactional(Z,$)}import{path as _}from"@stacksjs/path";import{fs as t,globSync as Z8}from"@stacksjs/storage";import{plural as fZ,singular as IZ,snakeCase as M}from"@stacksjs/strings";import{isString as x0}from"@stacksjs/validation";async function CT(Z){if(typeof Z==="string")Z=(await import(Z)).default;return Z.table??M(fZ(Z?.name||""))}function W0(Z,$){if(Z.name)return Z.name;return _.basename($).replace(/\.ts$/,"")}function v(Z,$){if(Z.table)return Z.table;return M(fZ(W0(Z,$)))}function OV(Z,$){let J=[Z,$];return J.sort(),J.join("_")}function PT(Z,$){return $ in Z}async function wV(Z,$){let J=[];if(Z.hasOne)for(let Y of Z.hasOne)J.push(await o0(Y,Z,$,"hasOne"));if(Z.hasMany)for(let Y of Z.hasMany)J.push(await o0(Y,Z,$,"hasMany"));if(Z.belongsTo)for(let Y of Z.belongsTo)J.push(await o0(Y,Z,$,"belongsTo"));if(Z.hasOneThrough)for(let Y of Z.hasOneThrough)J.push(await SZ(Y,Z,$,"hasOneThrough"));if(Z.hasManyThrough)for(let Y of Z.hasManyThrough)J.push(await SZ(Y,Z,$,"hasManyThrough"));if(Z.belongsToMany)for(let Y of Z.belongsToMany)J.push(await UV(Y,Z,$,"belongsToMany"));if(Z.morphOne)J.push(await MZ(Z.morphOne,Z,$,"morphOne"));if(Z.morphMany){let Y=Array.isArray(Z.morphMany)?Z.morphMany:[Z.morphMany];for(let X of Y)J.push(await MZ(X,Z,$,"morphMany"))}if(Z.morphTo){let Y=Z.morphTo,X=Array.isArray(Y)?Y:typeof Y==="object"&&Y!==null?[Y]:[];for(let Q of X)J.push(FV(Q,Z,$))}if(Z.morphToMany){let Y=Array.isArray(Z.morphToMany)?Z.morphToMany:[Z.morphToMany];for(let X of Y)J.push(xZ(X,Z,$,"morphToMany"))}if(Z.morphedByMany){let Y=Array.isArray(Z.morphedByMany)?Z.morphedByMany:[Z.morphedByMany];for(let X of Y)J.push(xZ(X,Z,$,"morphedByMany"))}return J}function FV(Z,$,J){let Y=Z&&typeof Z==="object"&&Z.name?String(Z.name):`${M(J)}able`,X=Z?.type||`${Y}_type`;return{relationship:"morphTo",model:"",table:"",relationTable:"",foreignKey:Z?.id||`${Y}_id`,modelKey:X,relationName:Y,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:"",pivotKey:"",pivotTable:""}}function xZ(Z,$,J,Y){let X=typeof Z==="object"&&Z!==null,Q=X?String(Z.model||""):String(Z),G=X&&Z.morphName?String(Z.morphName):`${M(J)}able`,W=X&&Z.pivotTable?String(Z.pivotTable):G,z=X&&Z.id||`${G}_id`,V=X&&Z.type||`${G}_type`;return{relationship:Y,model:Q,table:"",relationTable:"",foreignKey:z,modelKey:V,relationName:G,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:z,pivotKey:V,pivotTable:W}}async function S0(Z,$){let J=e0(`${$}.ts`),Y=e0(`${Z}.ts`),X=s0(`${Z}.ts`),Q=s0(`${$}.ts`);if(!J&&!Q)throw Error(`Model not found: ${$}`);if(!Y&&!X)throw Error(`Model not found: ${Z}`);let G;try{if(t.existsSync(J))G=(await import(J)).default;else G=(await import(Q)).default}catch(z){throw Error(`Failed to load model: ${$}. Error: ${z?.message||"Unknown error"}`)}let W=t.existsSync(Y)?Y:X;return{modelRelation:G,modelPath:W,modelRelationPath:t.existsSync(J)?J:Q}}async function SZ(Z,$,J,Y){let X="",Q="",G="",W="";if(x0(Z))X=Z;else X=Z.model,Q=Z.relationName||"",G=Z.through,W=Z.throughForeignKey||"";let{modelRelation:z,modelPath:V,modelRelationPath:B}=await S0(J,X),K=v(z,B),H=v($,V),w=M(W0(z,B)),U=M(J);return{relationship:Y,model:X,table:K,relationTable:H,foreignKey:`${U}_id`,modelKey:`${w}_id`,relationName:Q,relationModel:J,throughModel:G,throughForeignKey:W,pivotForeign:`${U}_id`,pivotKey:`${w}_id`,pivotTable:H}}async function UV(Z,$,J,Y){let X="",Q="",G="",W=M(J);if(x0(Z))X=Z;else X=Z.model,Q=Z.pivotTable||"",G=Z.firstForeignKey||`${W}_id`;let{modelRelation:z,modelPath:V,modelRelationPath:B}=await S0(J,X),K=v(z,B),H=v($,V),w=M(W0(z,B));return{relationship:Y,model:X,table:K,relationTable:H,foreignKey:typeof Z==="string"?`${W}_id`:Z.firstForeignKey||`${W}_id`,modelKey:typeof Z==="string"?`${w}_id`:Z.secondForeignKey||`${w}_id`,relationName:"",relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:G,pivotKey:`${w}_id`,pivotTable:Q}}async function MZ(Z,$,J,Y){let X="",Q="",G="",W="";if(x0(Z))X=Z,Q=`${M(J)}able`;else X=Z.model,Q=Z.morphName||`${M(J)}able`,G=Z.type||`${Q}_type`,W=Z.id||`${Q}_id`;let{modelRelation:z,modelPath:V,modelRelationPath:B}=await S0(J,X),K=v(z,B),H=v($,V);return{relationship:Y,model:X,table:K,relationTable:H,foreignKey:W||`${Q}_id`,modelKey:G||`${Q}_type`,relationName:Q,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:"",pivotKey:"",pivotTable:H}}async function o0(Z,$,J,Y){let X="",Q="";if(x0(Z))X=Z;else X=Z.model,Q=Z.relationName||"";let{modelRelation:G,modelPath:W,modelRelationPath:z}=await S0(J,X),V=v(G,z),B=v($,W),K=M(W0(G,z)),H=M(J),w={relationship:Y,model:X,table:V,relationTable:B,foreignKey:typeof Z==="string"?`${H}_id`:Z.foreignKey||`${H}_id`,modelKey:`${K}_id`,relationName:Q,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:`${H}_id`,pivotKey:`${K}_id`,pivotTable:B};if(Y==="belongsTo")w.foreignKey="";return w}function IT(Z){let $=/belongs/,J=/has/,Y=/Through/,X=/morph/;if(Y.test(Z))return"throughType";if($.test(Z))return"belongsType";if(J.test(Z))return"hasType";if(X.test(Z))return"morphType";return""}function xT(Z){let $=/One/;if(/Many/.test(Z))return"many";if($.test(Z))return"one";return""}async function ST(Z,$){let J=[];if("belongsToMany"in Z){let Y=Z.belongsToMany||[];for(let X of Y){let Q,G;if(typeof X==="string")G=X;else G=X.model;let W=e0(`${G}.ts`),z=s0(`${G}.ts`);if(t.existsSync(W))Q=(await import(W)).default;else Q=(await import(z)).default;let V=v(Q,W),B=v(Z,$),K=typeof X==="object"&&"firstForeignKey"in X?X.firstForeignKey:`${IZ(B)}_${Z.primaryKey}`,H=typeof X==="object"&&"secondForeignKey"in X?X.secondForeignKey:`${IZ(V)}_${Z.primaryKey}`;J.push({table:(typeof X==="object"&&"pivotTable"in X?X.pivotTable:void 0)??OV(B,V),firstForeignKey:K,secondForeignKey:H})}return J}return[]}async function MT(Z){let $=Z8([_.userModelsPath("*.ts"),_.storagePath("framework/defaults/app/Models/**/*.ts")],{absolute:!0}),J=[];for(let Y=0;Y<$.length;Y++){let X=$[Y],Q=await import(X);if(Z===Q.default.name)continue;let G=W0(Q,X),W=await wV(Q.default,G);if(!W.length)continue;let z=W.find((V)=>V.model===Z);if(z)J.push(z)}return J}function fT(Z){if(Z===void 0)return[];return Object.keys(Z).filter(($)=>{return Z[$]?.hidden===!0})}function hT(Z){let $=Z.attributes;if($===void 0)return[];return Object.keys($).filter((J)=>{return $[J]?.guarded===!0}).map((J)=>M(J))}function bT(Z,$){let J=Z.attributes,Y=[];if(J===void 0)return[];let X=typeof Z.traits?.billable==="object"||typeof Z.traits?.billable==="boolean",Q=typeof Z.traits?.useAuth==="object"?Z.traits?.useAuth.usePasskey:!1,G=Z.traits?.useUuid||!1;if(X)Y.push("stripe_id");if(G)Y.push("uuid");if(Q)Y.push(...["two_factor_secret","public_key"]);let W=$.map((z)=>z.foreignKey).filter((z)=>z);return[...Object.keys(J).filter((z)=>{if(J===void 0)return!1;return J[z]?.fillable===!0}).map((z)=>M(z)),...Y,...W]}async function yT(Z,$){let J=Z.attributes;if(!J)J={};let Y=Object.keys(J),X=[],Q=Bun.file($),G="";try{if(await Q.exists())G=await Q.text()}catch{G=""}let W=/rule:.*$/gm,z;z=W.exec(G);while(z!==null)X.push(z[0]),z=W.exec(G);return Y.map((B,K)=>{let H=J[B],w=null,U=!1,q=!1,L=!1,T=!1;if(H)w=H||null,U=H.unique||!1,q=H.hidden||!1,L=H.fillable||!1;let N=X[K]??"";return T=(H.validation?.rule).isRequired??!1,{field:B,default:w,unique:U,hidden:q,fillable:L,required:T,fieldArray:qV(N)}})}function qV(Z){let $=Z.split("rule: schema.");if($.length!==2)return null;if(!$[1])$[1]="";let J=$[1].replace(/,/g,"");if(!J)return null;let Y=J.split("."),X=/\(([^)]+)\)/;return Y.map((Q)=>{let G=X.exec(Q),W=G?G[1]:null;return{entity:Q.replace(X,"").replace(/\(|\)/g,""),charValue:W}})[0]||null}function vT(Z){let $=Z.fieldArray?.entity;switch($){case"enum":return"string | string[]";case"date":return"Date | string";case"timestamp":return"Date | string";case"datetime":return"Date | string";case"float":return"number";case"double":return"number";case"decimal":return"number";case"integer":return"number";case"bigint":return"number";default:return $}}function s0(Z){let $=_.join(_.storagePath("framework/defaults/app/Models"),"/"),J=_.join($,Z);if(t.existsSync(J))return J;return Z8(`${$}**/${Z}`,{absolute:!0})[0]??""}function e0(Z){let $=_.join(_.userModelsPath("/"),"/"),J=_.join($,Z);if(t.existsSync(J))return J;return Z8(`${$}**/${Z}`,{absolute:!0})[0]??""}function jT(Z){let $=typeof Z==="number"?new Date(Z):typeof Z==="string"?new Date(Z):Z;if(Number.isNaN($.getTime()))throw Error(`Invalid date value: ${String(Z)}`);return $.toISOString().replace("T"," ").split(".")[0]??""}function _T(Z){return Z.toISOString().split("T")[0]??""}function RT(Z){return Z.getTime()}import{createModel as BL,registerModel as zL}from"@stacksjs/query-builder";import{log as b}from"@stacksjs/logging";import{snakeCase as m0}from"@stacksjs/strings";import{AsyncLocalStorage as KL}from"async_hooks";function DV(Z){if(Z===null||typeof Z!=="object")return!1;let $=Z;return Array.isArray($.data)&&typeof $.current_page==="number"&&typeof $.per_page==="number"&&typeof $.total==="number"&&typeof $.last_page==="number"}function LV(Z){if(Z===null||typeof Z!=="object")return!1;let $=Z;return Array.isArray($.data)&&typeof $.current_page==="number"&&typeof $.per_page==="number"&&typeof $.has_more_pages==="boolean"&&!("total"in $)}function AV(Z){if(Z===null||typeof Z!=="object")return!1;let $=Z;return Array.isArray($.data)&&(typeof $.next_cursor==="string"||$.next_cursor===null)}function $8(Z){let{data:$}=Z,{perPage:J,page:Y,total:X,lastPage:Q}=Z.meta,G=$.length===0,W=G?null:(Y-1)*J+1,z=G?null:W+$.length-1;return{data:$,current_page:Y,per_page:J,total:X,last_page:Q,from:W,to:z,has_more_pages:Y<Q}}function J8(Z){return{data:Z.data,current_page:Z.meta.page,per_page:Z.meta.perPage,has_more_pages:Z.meta.hasMore}}function Y8(Z){return{data:Z.data,per_page:Z.meta.perPage,next_cursor:hZ(Z.meta.nextCursor),prev_cursor:hZ(Z.meta.prevCursor),has_more_pages:Z.meta.nextCursor!==null&&Z.meta.nextCursor!==void 0}}function hZ(Z){if(Z===null||Z===void 0)return null;if(typeof Z==="string")return Z;return JSON.stringify(Z)}function Q8(Z,$){let J=V8(),Y=J?X8(J,"per_page"):void 0,X=J?X8(J,"page"):void 0,Q=Z!==void 0?Math.max(1,Math.floor(Z)):Math.min(100,Math.max(1,Y??15)),G=Math.max(1,Math.floor($??X??1));return{perPage:Q,page:G}}function G8(Z,$){let J=V8(),Y=J?yZ(J,"cursor"):void 0,X=J?X8(J,"per_page"):void 0,Q=Z!==void 0?Math.max(1,Math.floor(Z)):Math.min(100,Math.max(1,X??15)),W=bZ($!==void 0?$:Y??null);return{perPage:Q,cursor:W}}function bZ(Z){if(Z===null||Z===void 0)return null;if(Array.isArray(Z))return Z;if(typeof Z==="string"&&Z.startsWith("["))try{let $=JSON.parse(Z);if(Array.isArray($))return $}catch{}return Z}function W8(Z){let $=V8();if(!$)return Z;let J=(()=>{try{return new URL($.url)}catch{return null}})();if(!J)return Z;let Y=J.pathname;if(Z.path=Y,"next_cursor"in Z)return Z.next_page_url=Z.next_cursor!==null?l(J,{cursor:Z.next_cursor}):null,Z.prev_page_url=Z.prev_cursor!==null?l(J,{cursor:Z.prev_cursor}):null,Z;let X=Z.current_page;if(Z.prev_page_url=X>1?l(J,{page:X-1}):null,"total"in Z){let Q=Z.last_page;Z.next_page_url=X<Q?l(J,{page:X+1}):null,Z.first_page_url=l(J,{page:1}),Z.last_page_url=l(J,{page:Q})}else Z.next_page_url=Z.has_more_pages?l(J,{page:X+1}):null;return Z}function l(Z,$){let J=new URL(Z.toString());for(let[Y,X]of Object.entries($))J.searchParams.set(Y,String(X));return`${J.pathname}${J.search}`}var a;function V8(){if(a===null)return;if(a===void 0)try{let $=E("@stacksjs/router");if(typeof $.getCurrentRequest==="function")a=$.getCurrentRequest;else{a=null;return}}catch{a=null;return}return a()}function X8(Z,$){let J=yZ(Z,$);if(J===void 0)return;let Y=Number(J);return Number.isFinite(Y)?Y:void 0}function yZ(Z,$){let J=Z.query?.[$];if(J===void 0)return;return Array.isArray(J)?J[0]:J}import{db as TV,sql as EV}from"@stacksjs/database";function B8(Z,$){if(typeof Z!=="number"||!Number.isFinite(Z)||Z<=0)throw Error(`[orm/taggable] ${$} requires a positive numeric id (received ${String(Z)})`)}function vZ(Z){let $=TV;return{async tags(J){return B8(J,"tags"),await $.selectFrom("taggables").where("taggable_id","=",J).where("taggable_type","=",Z).selectAll().execute()},async tagCount(J){B8(J,"tagCount");let Y=await $.selectFrom("taggables").select(EV`count(*) as count`).where("taggable_id","=",J).where("taggable_type","=",Z).executeTakeFirst();return Number(Y?.count)||0},async addTag(J,Y){if(B8(J,"addTag"),!Y||typeof Y.name!=="string"||Y.name.trim().length===0)throw Error("[orm/taggable] addTag requires a non-empty tag.name");return await $.insertInto("taggables").values({...Y,taggable_id:J,taggable_type:Z,slug:Y.name.toLowerCase().replace(/[^a-z0-9]+/g,"-"),is_active:!0,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).execute(),await $.selectFrom("taggables").where("taggable_id","=",J).where("taggable_type","=",Z).where("name","=",Y.name).selectAll().executeTakeFirst()},async activeTags(J){return await $.selectFrom("taggables").where("taggable_id","=",J).where("taggable_type","=",Z).where("is_active","=",!0).selectAll().execute()},async inactiveTags(J){return await $.selectFrom("taggables").where("taggable_id","=",J).where("taggable_type","=",Z).where("is_active","=",!1).selectAll().execute()},async removeTag(J,Y){await $.deleteFrom("taggables").where("taggable_id","=",J).where("taggable_type","=",Z).where("id","=",Y).execute()}}}import{db as NV}from"@stacksjs/database";function jZ(Z){let $=NV;async function J(Y){return(await $.selectFrom("categorizable_models").where("categorizable_id","=",Y).where("categorizable_type","=",Z).selectAll().execute()).map((Q)=>Q.category_id)}return{async categories(Y){let X=await J(Y);if(X.length===0)return[];return await $.selectFrom("categorizables").where("id","in",X).selectAll().execute()},async categoryCount(Y){return(await J(Y)).length},async addCategory(Y,X){let Q=()=>$.selectFrom("categorizables").where("name","=",X.name).where("categorizable_type","=",Z).selectAll().executeTakeFirst(),G=await Q();if(!G)await $.insertInto("categorizables").values({name:X.name,description:X.description,slug:X.name.toLowerCase().replace(/[^a-z0-9]+/g,"-"),categorizable_type:Z,is_active:!0,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).execute(),G=await Q();return await $.insertInto("categorizable_models").values({categorizable_id:Y,categorizable_type:Z,category_id:G.id,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).execute(),G},async activeCategories(Y){let X=await J(Y);if(X.length===0)return[];return await $.selectFrom("categorizables").where("id","in",X).where("is_active","=",!0).selectAll().execute()},async inactiveCategories(Y){let X=await J(Y);if(X.length===0)return[];return await $.selectFrom("categorizables").where("id","in",X).where("is_active","=",!1).selectAll().execute()},async removeCategory(Y,X){await $.deleteFrom("categorizable_models").where("categorizable_id","=",Y).where("categorizable_type","=",Z).where("category_id","=",X).execute()}}}import{db as kV,sql as CV}from"@stacksjs/database";function _Z(Z,$){if(typeof Z!=="number"||!Number.isFinite(Z)||Z<=0)throw Error(`[orm/commentable] ${$} requires a positive numeric id (received ${String(Z)})`)}function RZ(Z){let $=kV;return{async comments(J){return _Z(J,"comments"),await $.selectFrom("commentables").where("commentables_id","=",J).where("commentables_type","=",Z).selectAll().execute()},async commentCount(J){let Y=await $.selectFrom("commentables").select(CV`count(*) as count`).where("commentables_id","=",J).where("commentables_type","=",Z).executeTakeFirst();return Number(Y?.count)||0},async addComment(J,Y){if(_Z(J,"addComment"),!Y||typeof Y.title!=="string"||Y.title.trim().length===0)throw Error("[orm/commentable] addComment requires a non-empty comment.title");if(typeof Y.body!=="string"||Y.body.trim().length===0)throw Error("[orm/commentable] addComment requires a non-empty comment.body");let X=await $.insertInto("commentables").values({...Y,commentables_id:J,commentables_type:Z,status:"pending",created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).returningAll().executeTakeFirst();if(X&&typeof X==="object"&&"id"in X)return X;let Q=X?.lastInsertRowid;if(Q==null)return X;return await $.selectFrom("commentables").where("id","=",Number(Q)).selectAll().executeTakeFirst()},async approvedComments(J){return await $.selectFrom("commentables").where("commentables_id","=",J).where("commentables_type","=",Z).where("status","=","approved").selectAll().execute()},async pendingComments(J){return await $.selectFrom("commentables").where("commentables_id","=",J).where("commentables_type","=",Z).where("status","=","pending").selectAll().execute()},async rejectedComments(J){return await $.selectFrom("commentables").where("commentables_id","=",J).where("commentables_type","=",Z).where("status","=","rejected").selectAll().execute()}}}import{db as QL}from"@stacksjs/database";function EW(Z){let $=QL;return{async createStripeUser(J,Y){let{manageCustomer:X}=await import("@stacksjs/payments");return await X.createStripeCustomer(J,Y)},async updateStripeUser(J,Y){let{manageCustomer:X}=await import("@stacksjs/payments");return await X.updateStripeCustomer(J,Y)},async deleteStripeUser(J){let{manageCustomer:Y}=await import("@stacksjs/payments");return await Y.deleteStripeUser(J)},async createOrGetStripeUser(J,Y){let{manageCustomer:X}=await import("@stacksjs/payments");return await X.createOrGetStripeUser(J,Y)},async retrieveStripeUser(J){let{manageCustomer:Y}=await import("@stacksjs/payments");return await Y.retrieveStripeUser(J)},async defaultPaymentMethod(J){let{managePaymentMethod:Y}=await import("@stacksjs/payments");return await Y.retrieveDefaultPaymentMethod(J)},async setDefaultPaymentMethod(J,Y){let{managePaymentMethod:X}=await import("@stacksjs/payments");return await X.setDefaultPaymentMethod(J,Y)},async addPaymentMethod(J,Y){let{managePaymentMethod:X}=await import("@stacksjs/payments");return await X.addPaymentMethod(J,Y)},async paymentMethods(J,Y){let{managePaymentMethod:X}=await import("@stacksjs/payments");return await X.listPaymentMethods(J,Y)},async newSubscription(J,Y,X,Q={}){let{manageSubscription:G}=await import("@stacksjs/payments"),W=await G.create(J,Y,X,Q),V=W.latest_invoice?.payment_intent;return{subscription:W,paymentIntent:V}},async updateSubscription(J,Y,X,Q={}){let{manageSubscription:G}=await import("@stacksjs/payments"),W=await G.update(J,Y,X,Q),V=W.latest_invoice?.payment_intent;return{subscription:W,paymentIntent:V}},async cancelSubscription(J,Y,X={}){let{manageSubscription:Q}=await import("@stacksjs/payments");return{subscription:await Q.cancel(Y,X)}},async activeSubscription(J){let{manageSubscription:Y}=await import("@stacksjs/payments"),X=await $.selectFrom("subscriptions").where("user_id","=",J.id).where("provider_status","=","active").selectAll().executeTakeFirst();if(X){let Q=await Y.retrieve(J,X.provider_id||"");return{subscription:X,providerSubscription:Q}}return},async checkout(J,Y,X={}){let{manageCheckout:Q,manageCustomer:G}=await import("@stacksjs/payments"),W={};if(X.enableTax)W.automatic_tax={enabled:!0},delete X.enableTax;if(X.allowPromotions)W.allow_promotion_codes=!0,delete X.allowPromotions;let B={...{mode:"payment",customer:(await G.createOrGetStripeUser(J,{})).id,line_items:Y.map((K)=>({price:K.priceId,quantity:K.quantity||1}))},...W,...X};return await Q.create(J,B)},async createSetupIntent(J,Y={}){let{manageSetupIntent:X}=await import("@stacksjs/payments");return await X.create(J,Y)},async subscriptionHistory(J){let{manageInvoice:Y}=await import("@stacksjs/payments");return await Y.list(J)},async transactionHistory(J){let{manageTransaction:Y}=await import("@stacksjs/payments");return await Y.list(J)},async connectAccount(J,Y={}){let X=Y.accountColumn||"stripe_account_id",Q=(J._attributes??J)[X];if(!Q)return null;let G=await D0();try{return await G.accounts.retrieve(Q)}catch{return null}},async createConnectAccount(J,Y={}){let X=Y.accountColumn||"stripe_account_id",Q=J._attributes??J,G=Q[X],W=await D0();if(!G){let{stacksIdempotencyKey:z}=await import("@stacksjs/payments"),V=Y.modelTable||Z,B=await W.accounts.create({type:Y.type??"express",email:Y.email??Q.email,country:Y.country??"US",capabilities:Y.capabilities??{card_payments:{requested:!0},transfers:{requested:!0}}},{idempotencyKey:z("connect.account.create",V,Q.id)});return G=B.id,await $.updateTable(V).set({[X]:G}).where("id","=",Number(Q.id)).execute(),B}return await W.accounts.retrieve(G)},async connectOnboardLink(J,Y){let X=Y.accountColumn||"stripe_account_id",G=(J._attributes??J)[X];if(!G)throw Error("connectOnboardLink: model has no Stripe Connect account; call createConnectAccount first");return{url:(await(await D0()).accountLinks.create({account:G,refresh_url:Y.refreshUrl,return_url:Y.returnUrl,type:Y.type??"account_onboarding"})).url,accountId:G}},async syncConnectStatus(J,Y={}){let X=Y.accountColumn||"stripe_account_id",Q=Y.chargesColumn||"charges_enabled",G=Y.payoutsColumn||"payouts_enabled",W=J._attributes??J,z=W[X];if(!z)return{chargesEnabled:!1,payoutsEnabled:!1};let B=await(await D0()).accounts.retrieve(z),K=!!B.charges_enabled,H=!!B.payouts_enabled,w=Y.modelTable||Z;return await $.updateTable(w).set({[Q]:K,[G]:H}).where("id","=",Number(W.id)).execute(),{chargesEnabled:K,payoutsEnabled:H}},async chargeWithSplit(J,Y){let X=await D0(),Q=Y.accountColumn||"stripe_account_id",G=J._attributes??J,W=Y.connectAccountId||G[Q],z={amount:Y.amountCents,currency:Y.currency||"usd",automatic_payment_methods:{enabled:!0},metadata:Y.metadata};if(W){if(z.transfer_data={destination:W},Y.platformFeeCents)z.application_fee_amount=Y.platformFeeCents}let{freshIdempotencyKey:V}=await import("@stacksjs/payments");return await X.paymentIntents.create(z,{idempotencyKey:V("payment_intent.create",G.id,Y.amountCents)})}}}async function D0(){let Z=globalThis.process?.env?.STRIPE_SECRET_KEY;if(!Z)throw Error("Stripe Connect: STRIPE_SECRET_KEY not configured");return new(await Promise.resolve().then(() => eW(TW(),1))).default(Z,{apiVersion:"2026-06-24.dahlia"})}import{db as GL}from"@stacksjs/database";function NW(Z,$){let J=GL,Y=$?.table||`${Z}_likes`,X=$?.foreignKey||`${Z.replace(/s$/,"")}_id`;return{async likes(Q){return await J.selectFrom(Y).where(X,"=",Q).selectAll().execute()},async likeCount(Q){let G=await J.selectFrom(Y).select("count(*) as count").where(X,"=",Q).executeTakeFirst();return Number(G?.count)||0},async like(Q,G){if(typeof Q!=="number"||!Number.isFinite(Q)||Q<=0)throw Error(`[orm/likeable] like requires a positive numeric id (received ${String(Q)})`);if(typeof G!=="number"||!Number.isFinite(G)||G<=0)throw Error(`[orm/likeable] like requires a positive numeric userId (received ${String(G)})`);let W=new Date().toISOString();try{return await J.insertInto(Y).values({[X]:Q,user_id:G,created_at:W,updated_at:W}).returningAll().executeTakeFirst()}catch(z){let V=z;if(!(V.code==="SQLITE_CONSTRAINT_UNIQUE"||V.code==="SQLITE_CONSTRAINT"||V.code==="23505"||V.errno===1062||/unique|duplicate/i.test(V.message??"")))throw z;let K=await J.selectFrom(Y).where(X,"=",Q).where("user_id","=",G).selectAll().executeTakeFirst();if(K)return K;throw z}},async unlike(Q,G){await J.deleteFrom(Y).where(X,"=",Q).where("user_id","=",G).execute()},async isLiked(Q,G){return!!await J.selectFrom(Y).where(X,"=",Q).where("user_id","=",G).selectAll().executeTakeFirst()},async likedBy(Q){return(await J.selectFrom(Y).select([X]).where("user_id","=",Q).execute()).map((W)=>Number(W[X])).filter(Boolean)}}}function kW(){return{async generateTwoFactorForModel(Z){let{generateTwoFactorSecret:$}=await import("@stacksjs/auth"),J=$();await Z.update({two_factor_secret:J})},async verifyTwoFactorCode(Z,$){let J=Z.get("two_factor_secret");if(typeof J!=="string")return!1;let{verifyTwoFactorCode:Y,RateLimiter:X}=await import("@stacksjs/auth"),Q=String(Z.id??Z.get?.("id")??Z.get?.("email")??J),G=`2fa:${Q}`;if(await X.isRateLimited(G)){let{HttpError:z}=await import("@stacksjs/error-handling");throw new z(429,"Too many verification attempts. Please try again later.")}if(!await Y($,J))return await X.recordFailedAttempt(G),!1;try{let{cache:z}=await import("@stacksjs/cache"),V=`2fa:used:${Q}:${$}`;if(await z.has(V))return await X.recordFailedAttempt(G),!1;await z.set(V,"1",90)}catch{}return await X.resetAttempts(G),!0}}}import{log as $0}from"@stacksjs/logging";var u0="deleted_at";function CW(Z,$="id"){return{async softDelete(J){let Y=new Date().toISOString(),X=Z.where($,J);if(typeof X?.update==="function")return await X.update({[u0]:Y}),!0;return!1},async restore(J){let Y=Z.where($,J);if(typeof Y?.update==="function")return await Y.update({[u0]:null}),!0;return!1},async forceDelete(J){let Y=Z.where($,J);if(typeof Y?.delete==="function")return await Y.delete(),!0;return!1},withTrashed(){return typeof Z.query==="function"?Z.query():Z},onlyTrashed(){let J=typeof Z.query==="function"?Z.query():Z;if(typeof J?.whereNotNull==="function")return J.whereNotNull(u0);return J?.where?.(u0,"!=",null)??J}}}function PW(Z){if(Z===!0||Z==null)return{};if(typeof Z==="object"&&!Array.isArray(Z)){let $=Z;if(Array.isArray($.cascade)){let J=$.cascade.filter((Y)=>typeof Y==="string");return J.length?{cascade:J}:{}}return{}}return{}}function WL(Z,$){let J=Z.hasMany??[],Y=Z.hasOne??[],X=J.some((B)=>HZ(B,$,!0)),Q=Y.some((B)=>HZ(B,$,!1));if(!X&&!Q)return $0.warn(`[orm] soft-delete cascade: '${$}' is not a declared hasMany/hasOne relation \u2014 skipping`),null;let W=(X?J:Y).find((B)=>HZ(B,$,X))??null;if(!W)return null;let V=globalThis[W];if(!V)return $0.warn(`[orm] soft-delete cascade: model '${W}' is not yet on globalThis \u2014 skipping cascade for '${$}'`),null;return{className:W,model:V}}function HZ(Z,$,J){let Y=Z.toLowerCase();if($===Y)return!0;if(J&&$===`${Y}s`)return!0;if(J&&Y.endsWith("y")&&$===`${Y.slice(0,-1)}ies`)return!0;return!1}async function VL(Z,$,J,Y,X){try{let Q=J.where;if(typeof Q!=="function"){$0.warn(`[orm] cascade ${X}: child model has no .where()`);return}if(X==="softDelete"){let G=J.softDelete;if(typeof G==="function"){let z=Q.call(J,Y,$),V=typeof z?.get==="function"?await z.get():Array.isArray(z)?z:[],B=J.primaryKey||"id";for(let K of V){let H=K?.[B];if(H!=null)await G.call(J,H)}return}let W=Q.call(J,Y,$);if(typeof W?.delete==="function"){$0.debug(`[orm] cascade soft-delete: child has no softDeletes trait, hard-deleting from ${String(J.table??"?")}`),await W.delete();return}}else{let G=J.restore;if(typeof G!=="function"){$0.debug("[orm] cascade restore: child has no restore() \u2014 nothing to do");return}let W=J.withTrashed,V=(typeof W==="function"?W.call(J):J).where?.(Y,$),B=typeof V?.get==="function"?await V.get():[],K=J.primaryKey||"id";for(let H of B){let w=H?.[K];if(w!=null)await G.call(J,w)}}}catch(Q){if($0.warn(`[orm] soft-delete cascade ${X} on ${Z}#${String($)} failed`,{error:Q}),process.env.STACKS_ORM_CASCADE_SWALLOW!=="true")throw Q}}async function L0(Z,$,J,Y){let X=$.cascade;if(!X||X.length===0)return;let Q=`${Z.name.toLowerCase()}_id`;for(let G of X){let W=WL(Z,G);if(!W)continue;await VL(W.className,J,W.model,Q,Y)}}var yW=new KL;function p(){return yW.getStore()?.suppressed===!0}function n(Z){return Promise.resolve(yW.run({suppressed:!0},Z))}var IW=new Set;function HL(Z,$){let J=typeof Z==="string"?Z.slice(0,80):String(Z),Y=`${typeof Z}:${J}`;if(IW.has(Y))return;IW.add(Y);let X=$ instanceof Error?$.message:String($);console.error(`[orm] JSON cast failed to parse value (returning null): ${X} \u2014 value preview: ${JSON.stringify(J)}`)}var OL={string:{get:(Z)=>Z!=null?String(Z):null,set:(Z)=>Z!=null?String(Z):null},number:{get:(Z)=>Z!=null?Number(Z):null,set:(Z)=>Z!=null?Number(Z):null},integer:{get:(Z)=>Z!=null?Math.trunc(Number(Z)):null,set:(Z)=>Z!=null?Math.trunc(Number(Z)):null},float:{get:(Z)=>Z!=null?Number.parseFloat(String(Z)):null,set:(Z)=>Z!=null?Number.parseFloat(String(Z)):null},boolean:{get:(Z)=>Z===1||Z==="1"||Z===!0||Z==="true",set:(Z)=>Z===!0||Z===1||Z==="1"||Z==="true"?1:0},json:{get:(Z)=>{if(Z==null)return null;if(typeof Z==="string")try{return JSON.parse(Z)}catch($){return HL(Z,$),null}return Z},set:(Z)=>{if(Z==null)return null;return typeof Z==="string"?Z:JSON.stringify(Z)}},datetime:{get:(Z)=>Z?new Date(Z):null,set:(Z)=>Z instanceof Date?Z.toISOString():Z},date:{get:(Z)=>Z?new Date(Z):null,set:(Z)=>Z instanceof Date?Z.toISOString().split("T")[0]:Z},array:{get:(Z)=>{if(Z==null)return[];if(Array.isArray(Z))return Z;if(typeof Z==="string")try{return JSON.parse(Z)}catch{return[]}return[]},set:(Z)=>{if(Z==null)return null;return Array.isArray(Z)?JSON.stringify(Z):Z}}};function vW(Z){return typeof Z==="string"?OL[Z]:Z}function xW(Z,$,J){if(!Z||typeof Z!=="object")return Z;let Y={...Z};for(let[X,Q]of Object.entries($))if(X in Y){let G=vW(Q);Y[X]=G[J](Y[X])}return Y}var c0=new Set(["_attributes","_original","_definition","_hasSaved","_relations"]),SW=Symbol.for("stacks.modelInstanceProxy"),wL={tags:{bag:"_taggable",mode:"id"},tagCount:{bag:"_taggable",mode:"id"},addTag:{bag:"_taggable",mode:"id"},activeTags:{bag:"_taggable",mode:"id"},inactiveTags:{bag:"_taggable",mode:"id"},removeTag:{bag:"_taggable",mode:"id"},categories:{bag:"_categorizable",mode:"id"},categoryCount:{bag:"_categorizable",mode:"id"},addCategory:{bag:"_categorizable",mode:"id"},activeCategories:{bag:"_categorizable",mode:"id"},inactiveCategories:{bag:"_categorizable",mode:"id"},removeCategory:{bag:"_categorizable",mode:"id"},comments:{bag:"_commentable",mode:"id"},commentCount:{bag:"_commentable",mode:"id"},addComment:{bag:"_commentable",mode:"id"},approvedComments:{bag:"_commentable",mode:"id"},pendingComments:{bag:"_commentable",mode:"id"},rejectedComments:{bag:"_commentable",mode:"id"},likes:{bag:"_likeable",mode:"id"},likeCount:{bag:"_likeable",mode:"id"},like:{bag:"_likeable",mode:"id"},unlike:{bag:"_likeable",mode:"id"},isLiked:{bag:"_likeable",mode:"id"},createStripeUser:{bag:"_billable",mode:"model"},updateStripeUser:{bag:"_billable",mode:"model"},deleteStripeUser:{bag:"_billable",mode:"model"},createOrGetStripeUser:{bag:"_billable",mode:"model"},retrieveStripeUser:{bag:"_billable",mode:"model"},defaultPaymentMethod:{bag:"_billable",mode:"model"},setDefaultPaymentMethod:{bag:"_billable",mode:"model"},addPaymentMethod:{bag:"_billable",mode:"model"},paymentMethods:{bag:"_billable",mode:"model"},newSubscription:{bag:"_billable",mode:"model"},updateSubscription:{bag:"_billable",mode:"model"},cancelSubscription:{bag:"_billable",mode:"model"},activeSubscription:{bag:"_billable",mode:"model"},checkout:{bag:"_billable",mode:"model"},createSetupIntent:{bag:"_billable",mode:"model"},subscriptionHistory:{bag:"_billable",mode:"model"},transactionHistory:{bag:"_billable",mode:"model"},connectAccount:{bag:"_billable",mode:"model"},createConnectAccount:{bag:"_billable",mode:"model"},connectOnboardLink:{bag:"_billable",mode:"model"},syncConnectStatus:{bag:"_billable",mode:"model"},chargeWithSplit:{bag:"_billable",mode:"model"},generateTwoFactorForModel:{bag:"_twoFactor",mode:"model"},verifyTwoFactorCode:{bag:"_twoFactor",mode:"model"}};function FL(Z,$){if(!Z||!$)return null;let J=$.split("."),Y=Z;for(let X of J){if(Y==null||typeof Y!=="object")return null;let Q=Y;if("_attributes"in Q&&Q._attributes&&typeof Q._attributes==="object"){let G=Q._attributes;if(X in G){Y=G[X];continue}}if(X in Q){Y=Q[X];continue}return null}return Y??null}function y(Z,$){if(!Z||typeof Z!=="object")return Z;if(Z[SW])return Z;let J=Z._attributes;if(!J||typeof J!=="object")return Z;if($&&Object.keys($).length>0){for(let[Y,X]of Object.entries($))if(Object.prototype.hasOwnProperty.call(J,Y))J[Y]=vW(X).get(J[Y])}return new Proxy(Z,{get(Y,X,Q){if(X===SW)return!0;if(X==="saveAsync")return async function(){let W=Y._definition,z=W?.set;if(z&&typeof Y.isDirty==="function"){for(let[B,K]of Object.entries(z)){if(typeof K!=="function")continue;if(!Y.isDirty(B))continue;let H=K(Y._attributes),w=H&&typeof H.then==="function"?await H:H;Y._attributes[B]=w}let V=W.set;W.set={};try{return Y.save()}finally{W.set=V}}return Y.save()};if(X==="save")return function(){let W=Y._definition,z=W?.set;if(z&&Object.keys(z).length>0&&typeof Y.isDirty==="function"){for(let[B,K]of Object.entries(z)){if(typeof K!=="function")continue;if(!Y.isDirty(B))continue;let H=K(Y._attributes);if(H&&typeof H.then==="function")throw Error(`Setter for "${B}" returned a Promise \u2014 use \`saveAsync()\` instead of \`save()\` when a model has async setters.`);Y._attributes[B]=H}let V=W.set;W.set={};try{return Y.save()}finally{W.set=V}}return Y.save()};if(X==="updateAsync")return async function(W){if(W&&typeof W==="object"&&!Array.isArray(W))for(let[z,V]of Object.entries(W))Q[z]=V;return Q.saveAsync()};if(X==="saveQuietly")return function(){return n(()=>Y.save())};if(X==="saveAsyncQuietly")return function(){return n(()=>Q.saveAsync())};if(X==="updateQuietly")return function(W){return n(()=>Y.update(W))};if(X==="updateAsyncQuietly")return function(W){return n(()=>Q.updateAsync(W))};if(X==="deleteQuietly")return function(){return n(()=>Y.delete())};if(X==="toSearchableObject")return function(){let V=Y._definition?.traits?.useSearch;if(!V)return null;let B=Y._attributes;if(!B)return null;if(V===!0){let q={...B};if(B.id!=null)q.id=String(B.id);return q}let K={},H=V.displayable?.length?V.displayable:[...V.searchable??[],...V.filterable??[],...V.sortable??[],"id"],w=V.denormalize??{},U=Y._relations;for(let q of H){let L=m0(q),T=B[L]??B[q];if(T!==void 0){K[L]=T;continue}let N=w[q]??w[L];if(N){K[L]=FL(U,N);continue}K[L]=void 0}if(B.id!=null)K.id=String(B.id);return K};if(typeof X==="string"&&!c0.has(X)){let W=Y._attributes;if(W&&Object.prototype.hasOwnProperty.call(W,X))return W[X];let z=Y._relations;if(z&&Object.prototype.hasOwnProperty.call(z,X)){let B=z[X];if(Array.isArray(B))return B.map((K)=>y(K,$));return y(B,$)}let V=wL[X];if(V){let H=Y._definition?.__traitMethods?.[V.bag]?.[X];if(typeof H==="function")return V.mode==="model"?(...w)=>H(Q,...w):(...w)=>H(Y.id,...w)}}let G=Reflect.get(Y,X,Y);return typeof G==="function"?G.bind(Y):G},set(Y,X,Q,G){if(typeof X==="string"&&!c0.has(X)){let{_attributes:W,set:z}=Y;if(W&&Object.prototype.hasOwnProperty.call(W,X)){if(typeof z==="function")z.call(Y,X,Q);else W[X]=Q;return!0}if(W&&!(X in Y)){if(typeof z==="function")z.call(Y,X,Q);else W[X]=Q;return!0}}return Reflect.set(Y,X,Q,G)},has(Y,X){if(typeof X==="string"&&!c0.has(X)){let Q=Y._attributes;if(Q&&Object.prototype.hasOwnProperty.call(Q,X))return!0;let G=Y._relations;if(G&&Object.prototype.hasOwnProperty.call(G,X))return!0}return Reflect.has(Y,X)},deleteProperty(Y,X){if(typeof X==="string"&&!c0.has(X)){let Q=Y._attributes;if(Q&&Object.prototype.hasOwnProperty.call(Q,X))return delete Q[X],!0}return Reflect.deleteProperty(Y,X)},ownKeys(Y){let X=Y._attributes;return X?Object.keys(X):[]},getOwnPropertyDescriptor(Y,X){if(typeof X==="string"){let Q=Y._attributes;if(Q&&Object.prototype.hasOwnProperty.call(Q,X))return{configurable:!0,enumerable:!0,value:Q[X],writable:!0}}return Object.getOwnPropertyDescriptor(Y,X)}})}var UL=new Set(["get","first","last","firstOrFail","find","findOrFail","all","paginate","simplePaginate","cursorPaginate"]),qL={paginate:$8,simplePaginate:J8,cursorPaginate:Y8},MW=Symbol.for("stacks.queryBuilderProxy");function jW(Z,$){if(!Z||typeof Z!=="object")return Z;if(Z[MW])return Z;return new Proxy(Z,{get(J,Y,X){if(Y===MW)return!0;let Q=Reflect.get(J,Y,X);if(typeof Q!=="function")return Q;return function(...G){let W=G,z=String(Y);if(z==="paginate"||z==="simplePaginate"){let{perPage:K,page:H}=Q8(G[0],G[1]);W=[K,H]}else if(z==="cursorPaginate"){let{perPage:K,cursor:H}=G8(G[0],G[1]);W=[K,H,G[2],G[3]]}let V=Q.apply(J,W),B=(K)=>{if(UL.has(z)){if(Array.isArray(K))return K.map((w)=>y(w,$));let H=qL[z];if(H&&K&&Array.isArray(K.data)){let w=K.data.map((q)=>y(q,$)),U=H({...K,data:w});return W8(U)}if(K&&Array.isArray(K.data))return{...K,data:K.data.map((w)=>y(w,$))};return y(K,$)}if(K&&typeof K==="object"&&typeof K.get==="function")return jW(K,$);return K};if(V&&typeof V.then==="function")return V.then(B);return B(V)}}})}function DL(Z,$){let J=["find","first","last","all","firstOrFail","findOrFail","findMany"];for(let Q of J){let G=Z[Q];if(typeof G!=="function")continue;Z[Q]=function(...W){let z=G.apply(this,W),V=(B)=>Array.isArray(B)?B.map((K)=>y(K,$)):y(B,$);if(z&&typeof z.then==="function")return z.then(V);return V(z)}}let Y=["create","firstOrCreate","updateOrCreate","make"];for(let Q of Y){let G=Z[Q];if(typeof G!=="function")continue;Z[Q]=function(...W){let z=G.apply(this,W),V=(B)=>Array.isArray(B)?B.map((K)=>y(K,$)):y(B,$);if(z&&typeof z.then==="function")return z.then(V);return V(z)}}let X=["query","where","orWhere","whereIn","whereNotIn","whereNull","whereNotNull","whereLike","whereBetween","whereNotBetween","orderBy","orderByDesc","select","with","limit","take","skip","latest","oldest"];for(let Q of X){let G=Z[Q];if(typeof G!=="function")continue;Z[Q]=function(...W){let z=G.apply(this,W);return jW(z,$)}}}class _W extends Error{model;id;constructor(Z,$){super($!=null?`[ORM] ${Z} not found for id=${String($)}`:`[ORM] No matching ${Z} row`);this.name="ModelNotFoundError",this.model=Z,this.id=$}}class wZ extends Error{model;attribute;reason;constructor(Z,$,J){let Y=J==="guarded"?`'${$}' is marked guarded`:`'${$}' is not in the fillable allowlist`;super(`[ORM] Mass assignment to ${Z} forbidden: ${Y}. Use ${Z}.forceCreate(...) / .forceUpdate(...) to bypass.`);this.name="MassAssignmentException",this.model=Z,this.attribute=$,this.reason=J}}var LL=new Set(["id","created_at","updated_at","deleted_at","uuid"]);function A0(Z,$,J={}){if(J.force)return $;if(!$||typeof $!=="object"||Array.isArray($))return $;let Y=Z.attributes;if(!Y)return $;let X=new Set,Q=new Set,G=new Set;for(let[z,V]of Object.entries(Y)){let B=m0(z);if(X.add(B),V?.fillable===!0)Q.add(B);if(V?.guarded===!0)G.add(B)}let W=Q.size>0?Q:X;for(let z of Object.keys($)){if(LL.has(z))continue;if(G.has(z))throw new wZ(Z.name,z,"guarded");if(z.endsWith("_id"))continue;if(!W.has(z))throw new wZ(Z.name,z,"not-fillable")}return $}async function FZ(Z,$){let J=Z.set;if(!J||typeof J!=="object")return $;let Y={...$};for(let[X,Q]of Object.entries(J)){if(typeof Q!=="function"||!(X in Y))continue;try{Y[X]=await Q(Y)}catch(G){b.error(`[orm] ${Z.name}.set.${X} threw \u2014 skipping setter`,G)}}return Y}function AL(Z,$){let J=$.primaryKey||"id",Y=Z.create;function X(V){let B=Z.where;if(typeof B!=="function")throw Error(`[ORM] ${$.name}.${V} needs a working where(): the underlying query builder did not expose one`);return B}function Q(V){let B=Z.find;if(typeof B!=="function")throw Error(`[ORM] ${$.name}.${V} needs a working find(): the underlying query builder did not expose one`);return B}function G(V){let B=Z.create;if(typeof B!=="function")throw Error(`[ORM] ${$.name}.${V} cannot create: the underlying query builder did not expose create()`);return B}if(typeof Z.update!=="function")Z.update=async function(V,B){if(V==null)throw Error(`[ORM] ${$.name}.update requires an id as the first argument`);if(!B||typeof B!=="object"||Array.isArray(B))throw Error(`[ORM] ${$.name}.update requires a data object as the second argument`);if(Object.keys(B).length===0){b.debug(`[orm] ${$.name}.update called with empty data \u2014 short-circuiting and returning current row`);let w=Z.find;return typeof w==="function"?await w.call(Z,V):null}A0($,B);let K=await FZ($,B);await X("update").call(Z,J,V).update(K);let H=Z.find;return typeof H==="function"?await H.call(Z,V):null};if(typeof Z.forceUpdate!=="function")Z.forceUpdate=async function(V,B){if(V==null)throw Error(`[ORM] ${$.name}.forceUpdate requires an id as the first argument`);if(!B||typeof B!=="object"||Array.isArray(B))throw Error(`[ORM] ${$.name}.forceUpdate requires a data object as the second argument`);let K=await FZ($,B);await X("forceUpdate").call(Z,J,V).update(K);let H=Z.find;return typeof H==="function"?await H.call(Z,V):null};if(typeof Z.forceCreate!=="function")Z.forceCreate=async function(V){if(!V||typeof V!=="object"||Array.isArray(V))throw Error(`[ORM] ${$.name}.forceCreate requires a data object`);if(typeof Y!=="function")throw Error(`[ORM] ${$.name}.forceCreate cannot create: the underlying query builder did not expose create()`);return await Y.call(Z,V)};if(typeof Z.delete!=="function")Z.delete=async function(V){if(V==null)throw Error(`[ORM] ${$.name}.delete requires an id as the first argument`);if(!await Q("delete").call(Z,V))return!1;return await X("delete").call(Z,J,V).delete(),!0};if(typeof Z.findOrFail!=="function")Z.findOrFail=async function(V){let B=await Q("findOrFail").call(Z,V);if(B==null)throw new _W($.name,V);return B};if(typeof Z.exists!=="function")Z.exists=async function(V){if(V==null)return!1;let B=X("exists").call(Z,J,V);if(typeof B.count==="function"){let H=await B.count();return Number(H)>0}let K=Z.find;return typeof K==="function"?await K.call(Z,V)!=null:!1};if(typeof Z.firstOrCreate!=="function")Z.firstOrCreate=async function(V,B={}){if(!V||typeof V!=="object"||Array.isArray(V))throw Error(`[ORM] ${$.name}.firstOrCreate requires a where-attrs object`);let K=X("firstOrCreate").call(Z,V),H=typeof K.first==="function"?await K.first():await K;if(H)return H;let w={...V,...B};return A0($,w),await G("firstOrCreate").call(Z,w)};if(typeof Z.updateOrCreate!=="function")Z.updateOrCreate=async function(V,B){if(!V||typeof V!=="object"||Array.isArray(V))throw Error(`[ORM] ${$.name}.updateOrCreate requires a where-attrs object`);if(!B||typeof B!=="object"||Array.isArray(B))throw Error(`[ORM] ${$.name}.updateOrCreate requires a values object`);let K=X("updateOrCreate").call(Z,V),H=typeof K.first==="function"?await K.first():await K;if(H){A0($,B);let U=H[J];await X("updateOrCreate").call(Z,J,U).update(B);let q=Z.find;return typeof q==="function"?await q.call(Z,U):{...H,...B}}let w={...V,...B};return A0($,w),await G("updateOrCreate").call(Z,w)};if(typeof Z.count!=="function")Z.count=async function(){let V=Z;if(typeof V.query==="function"){let H=V.query();if(typeof H?.count==="function"){let w=await H.count();return Number(w)||0}}let{all:B,get:K}=Z;if(typeof B==="function")return(await B.call(Z)||[]).length;if(typeof K==="function")return(await K.call(Z)||[]).length;return 0};if(typeof Z.pluck!=="function")Z.pluck=async function(V){if(!V||typeof V!=="string")throw Error(`[ORM] ${$.name}.pluck requires a column name`);let B=Z.all;return((typeof B==="function"?await B.call(Z):[])||[]).map((H)=>H?.[V])};if(typeof Z.whereIn!=="function")Z.whereIn=async function(V,B){if(!V||typeof V!=="string")throw Error(`[ORM] ${$.name}.whereIn requires a column name`);if(!Array.isArray(B))throw Error(`[ORM] ${$.name}.whereIn requires an array of values`);if(B.length===0)return[];let K=Z.where;if(typeof K!=="function")return[];let H=K.call(Z,V,"in",B);if(H&&typeof H.get==="function")return await H.get();return await H};let W=[["latest","desc"],["oldest","asc"]];for(let[V,B]of W)if(typeof Z[V]!=="function")Z[V]=async function(K="created_at"){let H=Z,w=typeof H.query==="function"?H.query():H;if(typeof w?.orderBy==="function"){let T=w.orderBy(K,B);if(typeof T.first==="function")return await T.first();if(typeof T.get==="function")return(await T.get())?.[0]??null}let U=Z.all;if(typeof U!=="function")return null;return[...await U.call(Z)||[]].sort((T,N)=>{let C=T?.[K],x=N?.[K];if(C===x)return 0;return(C>x?1:-1)*(B==="desc"?-1:1)})[0]??null};let z=RW($.traits?.useSearch);if(z){let V=z.index??$.table??m0(`${$.name}s`);if(typeof Z.search!=="function")Z.search=function(B,K){return TL(Z,V,B,K)};if(typeof Z.makeAllSearchable!=="function")Z.makeAllSearchable=async function(B=500){let K=Z.all;if(typeof K!=="function")throw Error(`[ORM] ${$.name}.makeAllSearchable cannot run: the underlying query builder did not expose all()`);let{useSearchEngine:H}=await import("@stacksjs/search-engine"),w=H(),U=0,q=Z.query;if(typeof q==="function")try{let N=q.call(Z);if(N&&typeof N.chunk==="function")return await N.chunk(B,async(C)=>{let x=C.map((f)=>fW(f,z)).filter(Boolean);if(x.length>0)await w.addDocuments(V,x);U+=x.length}),U}catch{}let T=(await K.call(Z)||[]).map((N)=>fW(N,z)).filter(Boolean);if(T.length>0)await w.addDocuments(V,T);return T.length};if(typeof Z.removeAllFromSearch!=="function")Z.removeAllFromSearch=async function(){let{useSearchEngine:B}=await import("@stacksjs/search-engine"),K=B();if(typeof K.deleteAllDocuments==="function"){await K.deleteAllDocuments(V);return}let H=Z.all,w=typeof H==="function"?await H.call(Z)||[]:[],U=B();for(let q of w){let L=q?.id??q?._attributes?.id;if(L!=null)await U.deleteDocument(V,Number(L))}}}}function fW(Z,$){if(typeof $.shape==="function")try{return $.shape(Z)}catch{return}let J=Z?.toSearchableObject?.();if(J!==void 0)return J;return Z?._attributes??(typeof Z?.toJSON==="function"?Z.toJSON():null)}function TL(Z,$,J,Y){let X={q:J,...Y??{}},Q={with(G){return X={...X,...G},Q},where(G){return X={...X,filter:G},Q},async get(){let{useSearchEngine:G}=await import("@stacksjs/search-engine");return(await G().search($,X))?.hits??[]},async paginate(G,W=1){let{useSearchEngine:z}=await import("@stacksjs/search-engine"),B=await z().search($,{...X,limit:G,offset:(W-1)*G});return{hits:B.hits??[],total:Number(B.estimatedTotalHits??B.nbHits??B.total??0),page:W,perPage:G}},async raw(){let{useSearchEngine:G}=await import("@stacksjs/search-engine");return await G().search($,X)}};return Q}async function OZ(Z,$){if(!Z||typeof Z!=="object")return;let J=Z._attributes??Z;for(let Y of $){if(!(Y in J))continue;let X=J[Y];if(!X0(X))continue;J[Y]=await p0(X)}}function EL(Z,$){if($.length===0)return;let J=async(G)=>{if(Array.isArray(G)){for(let W of G)await OZ(W,$);return G}if(G&&typeof G==="object"&&Array.isArray(G.data)){for(let W of G.data)await OZ(W,$);return G}if(G)await OZ(G,$);return G},Y=["find","first","last","all","firstOrFail","findOrFail","findMany"];for(let G of Y){let W=Z[G];if(typeof W!=="function")continue;Z[G]=async function(...z){let V=await W.apply(this,z);return await J(V)}}let X=["create","firstOrCreate","updateOrCreate","make"];for(let G of X){let W=Z[G];if(typeof W!=="function")continue;Z[G]=async function(...z){let V=await W.apply(this,z);return await J(V)}}let Q=Z.update;if(typeof Q==="function")Z.update=async function(G,W){let z=await Q.call(this,G,W);return await J(z)}}function NL(Z,$){if($.length===0)return;let J=async(Q)=>{if(!Q||typeof Q!=="object"||Array.isArray(Q))return Q;let G={...Q};for(let W of $)if(W in G)G[W]=await n0(G[W]);return G},Y=["create","firstOrCreate","updateOrCreate"];for(let Q of Y){let G=Z[Q];if(typeof G!=="function")continue;Z[Q]=async function(...W){if(W[0]=await J(W[0]),W[1])W[1]=await J(W[1]);return await G.apply(this,W)}}let X=Z.update;if(typeof X==="function")Z.update=async function(Q,G){let W=await J(G);return await X.call(this,Q,W)}}function kL(Z,$){let J=Z.create;if(typeof J==="function")Z.create=async function(Y,...X){A0($,Y);let Q=await FZ($,Y);return await J.call(this,Q,...X)};for(let Y of["firstOrCreate","updateOrCreate"]){let X=Z[Y];if(typeof X!=="function")continue}}function CL(Z,$){let J=["create","firstOrCreate","updateOrCreate"];for(let X of J){let Q=Z[X];if(typeof Q==="function")Z[X]=async function(...G){if(b.debug(`[orm] ${X.charAt(0).toUpperCase()+X.slice(1)} ${String(Z.name||"unknown")}`,G[0]),G[0]&&typeof G[0]==="object"&&!Array.isArray(G[0]))G[0]=xW(G[0],$,"set");return await Q.apply(this,G)}}let Y=Z.update;if(typeof Y==="function")Z.update=async function(X,Q){let G=Q&&typeof Q==="object"&&!Array.isArray(Q)?xW(Q,$,"set"):Q;return await Y.call(this,X,G)}}function r2(Z){b.debug(`[orm] Defining model: ${Z.name} (table: ${Z.table})`);let $=PL(Z),J=xL(Z),Y=IL($,J),X=SL(Z);Z.__traitMethods=X;let Q=Y?{...Z,hooks:{...Z.hooks,...Y}}:Z,G=BL(Q);if(DL(G,Z.casts),AL(G,Q),kL(G,Q),Z.casts&&Object.keys(Z.casts).length>0)CL(G,Z.casts);let W=i0(Z);if(W.length>0)NL(G,W),EL(G,W);let z=Z.traits?.useSoftDeletes;if(z)ML(G,Q,z);let V=Z.traits?.useAudit;if(V){let K=kZ(V);CZ(G,Z.name,Z.primaryKey||"id",K)}G.withoutEvents=function(K){return n(K)};for(let K of["create","update","firstOrCreate","updateOrCreate","forceCreate","forceUpdate","delete","forceDelete","softDelete","restore"]){let H=G[K];if(typeof H!=="function")continue;let w=`${K}Quietly`;if(typeof G[w]==="function")continue;G[w]=function(...U){return n(()=>H.apply(G,U))}}let B=Object.assign(G,X,{...Z,getDefinition:()=>Z,_isStacksModel:!0});return zL(Z.name,B),B}function PL(Z){let $=Z.traits?.observe;if(!$)return;let J=Z.name.toLowerCase(),Y=(H)=>{let w=H?.attributes;if(!w||typeof w!=="object")return H;let U=Z.primaryKey||"id",q={...w};if(q[U]===void 0&&H[U]!==void 0)q[U]=H[U];return q},X=async(H,w)=>{if(p())return;try{let{dispatch:U}=await import("@stacksjs/events");await U(H,w)}catch(U){if(U&&typeof U==="object"&&"code"in U&&U.code==="MODULE_NOT_FOUND")return;if(console.error(`[ORM] Event '${H}' handler error:`,U),process.env.STACKS_ORM_EVENT_ERRORS!=="swallow")throw U}},Q=Z.traits?.broadcastOn,G=Z.traits?.broadcastWith,W=typeof Q==="function"&&typeof G==="function",z=async(H,w)=>{if(!W)return;if(p())return;try{let U=Q(w),q=Array.isArray(U)?U:[U],L=G(w),N=(await import("@stacksjs/realtime").catch(()=>null))?.broadcast;if(typeof N!=="function")return;for(let C of q){if(typeof C!=="string"||C.length===0)continue;await N(C,H,L)}}catch(U){if(U&&typeof U==="object"&&"code"in U&&U.code==="MODULE_NOT_FOUND")return;if(console.error(`[ORM] Broadcast '${H}' handler error:`,U),process.env.STACKS_ORM_BROADCAST_ERRORS==="throw")throw U}},V=async(H,w)=>{if(p())return!0;try{let{dispatchAsync:U}=await import("@stacksjs/events"),q=await U(H,w);if(Array.isArray(q)&&q.some((L)=>L===!1))return!1}catch(U){if(U&&typeof U==="object"&&"code"in U&&U.code==="MODULE_NOT_FOUND")return!0;if(console.error(`[ORM] Before-event '${H}' handler error:`,U),process.env.STACKS_ORM_EVENT_ERRORS!=="swallow")throw U}return!0},B=$===!0?["create","update","delete"]:Array.isArray($)?$:[],K={};if(B.includes("create"))K.beforeCreate=async(H)=>{if(b.debug(`[orm] Create ${J}`,H),!await V(`${J}:saving`,H))throw Error(`[ORM] ${J}:saving event cancelled the operation`);if(!await V(`${J}:creating`,H))throw Error(`[ORM] ${J}:creating event cancelled the operation`)},K.afterCreate=async(H)=>{let w=Y(H);await X(`${J}:created`,w),await X(`${J}:saved`,w),await z(`${J}:created`,H)};if(B.includes("update"))K.beforeUpdate=async(H)=>{if(b.debug(`[orm] Update ${J}#${H?.id??"unknown"}`,H),!await V(`${J}:saving`,H))throw Error(`[ORM] ${J}:saving event cancelled the operation`);if(!await V(`${J}:updating`,H))throw Error(`[ORM] ${J}:updating event cancelled the operation`)},K.afterUpdate=async(H)=>{let w=Y(H);await X(`${J}:updated`,w),await X(`${J}:saved`,w),await z(`${J}:updated`,H)};if(B.includes("delete"))K.beforeDelete=async(H)=>{if(b.debug(`[orm] Delete ${J}#${H?.id??"unknown"}`),!await V(`${J}:deleting`,H))throw Error(`[ORM] ${J}:deleting event cancelled the operation`)},K.afterDelete=async(H)=>{await X(`${J}:deleted`,Y(H)),await z(`${J}:deleted`,H)};return K}function IL(...Z){let $={},J=new Set;for(let Y of Z){if(!Y)continue;for(let X of Object.keys(Y))J.add(X)}for(let Y of J){let X=Z.map((Q)=>Q?.[Y]).filter((Q)=>typeof Q==="function");if(!X.length)continue;$[Y]=async(...Q)=>{for(let G of X)await G(...Q)}}return Object.keys($).length?$:void 0}function RW(Z){if(!Z)return null;if(Z===!0)return{};if(typeof Z==="object")return Z;return null}function xL(Z){let $=RW(Z.traits?.useSearch);if(!$)return;let J=$,Y=J.index??Z.table??m0(`${Z.name}s`);function X(W){if(typeof J.shape==="function")try{return J.shape(W)}catch(B){b.warn(`[orm/search] shape() threw for ${Z.name}: ${B.message}`);return}let V=y(W).toSearchableObject?.();if(V!==void 0)return V;return W?._attributes??(typeof W?.toJSON==="function"?W.toJSON():null)}let Q=async(W)=>{if(p())return;let z=X(W);if(!z)return;if($.queueable){try{let{Jobs:V}=await import("@stacksjs/queue");await V.dispatch("SyncSearchIndex",{index:Y,op:"upsert",doc:z})}catch(V){b.warn(`[orm/search] queue dispatch failed for ${Z.name}; falling back to inline: ${V.message}`),await hW(Y,z,Z.name)}return}await hW(Y,z,Z.name)};return{afterCreate:Q,afterUpdate:Q,afterDelete:async(W)=>{if(p())return;let z=W?.id??W?._attributes?.id;if(z==null)return;if($.queueable){try{let{Jobs:V}=await import("@stacksjs/queue");await V.dispatch("SyncSearchIndex",{index:Y,op:"delete",id:Number(z)})}catch(V){b.warn(`[orm/search] queue dispatch failed for ${Z.name}#${z}; falling back to inline: ${V.message}`),await bW(Y,Number(z),Z.name)}return}await bW(Y,Number(z),Z.name)}}}async function hW(Z,$,J){try{let{useSearchEngine:Y}=await import("@stacksjs/search-engine");await Y().addDocument(Z,$)}catch(Y){b.warn(`[orm/search] Failed to index ${J}: ${Y.message}`)}}async function bW(Z,$,J){try{let{useSearchEngine:Y}=await import("@stacksjs/search-engine");await Y().deleteDocument(Z,$)}catch(Y){b.warn(`[orm/search] Failed to remove ${J}#${$}: ${Y.message}`)}}function SL(Z){let $={},J=Z.table,Y=Z.traits;if(!Y)return $;if(Y.taggable)$._taggable=vZ(J);if(Y.categorizable)$._categorizable=jZ(J);if(Y.commentable)$._commentable=RZ(J);if(Y.billable)$._billable=EW(J);if(Y.likeable){let Q=typeof Y.likeable==="object"?Y.likeable:void 0;$._likeable=NW(J,Q)}let X=Y.useAuth||Y.authenticatable;if(typeof X==="object"&&X&&"useTwoFactor"in X&&X.useTwoFactor)$._twoFactor=kW();return $}function ML(Z,$,J){let Y=CW(Z,$.primaryKey||"id"),X=PW(J),Q=$,G=$.name.toLowerCase(),W=$.traits?.observe!=null&&$.traits?.observe!==!1,z=async(w)=>{if(!W||p())return!0;try{let{dispatchAsync:U}=await import("@stacksjs/events"),q=await U(`${G}:restoring`,{id:w});if(Array.isArray(q)&&q.some((L)=>L===!1))return!1}catch(U){if(U?.code!=="MODULE_NOT_FOUND")console.error(`[ORM] Before-event '${G}:restoring' handler error:`,U)}return!0},V=async(w)=>{if(!W||p())return;try{let{dispatch:U}=await import("@stacksjs/events");await U(`${G}:restored`,{id:w})}catch(U){if(U?.code!=="MODULE_NOT_FOUND")console.error(`[ORM] Event '${G}:restored' handler error:`,U)}},B=process.env.STACKS_ORM_CASCADE_SWALLOW!=="true",K=async(w)=>{if(!X.cascade?.length||!B){let q=await Y.softDelete(w);if(q&&X.cascade?.length)await L0(Q,X,w,"softDelete");return q}let{db:U}=await import("@stacksjs/database");return await U.transaction(async()=>{let q=await Y.softDelete(w);if(q)await L0(Q,X,w,"softDelete");return q})},H=async(w)=>{if(!await z(w))return!1;if(!X.cascade?.length||!B){let T=await Y.restore(w);if(T){if(X.cascade?.length)await L0(Q,X,w,"restore");await V(w)}return T}let{db:q}=await import("@stacksjs/database"),L=await q.transaction(async()=>{let T=await Y.restore(w);if(T)await L0(Q,X,w,"restore");return T});if(L)await V(w);return L};Z.softDelete=K,Z.restore=H,Z.forceDelete=Y.forceDelete,Z.withTrashed=Y.withTrashed,Z.onlyTrashed=Y.onlyTrashed,Z.delete=K}function fL(Z){if(Z==null)return Z;if(Array.isArray(Z))return Z.map(fL);if(typeof Z!=="object")return Z;if(typeof Z.toJSON==="function")return Z.toJSON();if(Z._attributes&&typeof Z._attributes==="object")return Z._attributes;return Z}import{log as hL}from"@stacksjs/logging";import{path as i}from"@stacksjs/path";import{fs as T0}from"@stacksjs/storage";function r(Z){return Z.replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/(\d)([A-Za-z])/g,"$1_$2").toLowerCase()}function bL(Z){let $=typeof Z.type==="string"?Z.type.toLowerCase():"",J=(()=>{switch($){case"string":case"text":case"longtext":case"mediumtext":case"tinytext":case"char":case"varchar":case"enum":case"uuid":case"date":case"datetime":case"timestamp":case"timestamptz":case"time":case"year":return"string";case"integer":case"int":case"tinyint":case"smallint":case"mediumint":case"float":case"double":case"decimal":case"numeric":return"number";case"bigint":return"number | bigint";case"boolean":case"bool":return"boolean";case"json":case"jsonb":return"unknown";case"binary":case"blob":case"bytea":return"Uint8Array";default:return"unknown"}})();return Z.nullable===!0?`${J} | null`:J}function yL(Z){let $={},J=Z.belongsTo;if(!J)return $;let Y=Array.isArray(J)?J:Object.keys(J);for(let X of Y)$[`${r(X)}_id`]="number";return $}function vL(Z,$){let[J,Y]=[r(Z),r($)].sort();return`${J}_${Y}`}function jL(Z,$){let J=$.belongsToMany;if(!J)return[];let Y=[],X=Array.isArray(J)?J:[];for(let Q of X){let G,W,z,V;if(typeof Q==="string")G=Q;else if(Q&&typeof Q==="object"&&"model"in Q){let w=Q;G=w.model,W=w.pivotTable,z=w.firstForeignKey,V=w.secondForeignKey}else continue;let B=W??vL(Z,G),K=z??`${r(Z)}_id`,H=V??`${r(G)}_id`;Y.push({table:B,columns:{id:"number",[K]:"number",[H]:"number",created_at:"string",updated_at:"string | null"}})}return Y}function _L(Z){let $={id:"number"},J=Z.traits??{};if(J.useUuid)$.uuid="string";if((J.useTimestamps??J.timestampable)!==!1)$.created_at="string",$.updated_at="string | null";if(J.useSoftDeletes??J.softDeletable)$.deleted_at="string | null";return $}function RL(Z){let $={},J=Z.attributes??{};for(let[Y,X]of Object.entries(J))$[r(Y)]=bL(X);return $}function gW(Z,$){let J=Object.entries($).map(([Y,X])=>` ${Y}: ${X}`).join(`
13
16
  `);return` ${Z}: {
14
17
  // columns
15
18
  ${J}
16
- }`}var u3=`/* eslint-disable */
19
+ }`}var uW=`/* eslint-disable */
17
20
  // AUTO-GENERATED by \`buddy generate:db-types\` \u2014 do not edit.
18
21
  // Regenerate after adding/removing a model or changing its attributes.
19
22
  // See stacksjs/stacks#1923.
20
23
 
21
24
  declare module '@stacksjs/database' {
22
25
  interface DatabaseSchema {
23
- `,c3=` }
26
+ `,cW=` }
24
27
  }
25
28
 
26
29
  export {}
27
- `;async function l3(Z,$){let J=[];if(!L8.existsSync(Z))return J;let Q=L8.readdirSync(Z,{withFileTypes:!0});for(let X of Q){let Y=U0.join(Z,X.name);if(X.isDirectory()){if($){let G=await l3(Y,!0);J.push(...G)}continue}if(!X.name.endsWith(".ts"))continue;if(X.name.startsWith("_")||X.name.startsWith("index"))continue;try{let G=await import(Y),V=G.default||G;if(V?.name&&(V.attributes||V.table))J.push({filePath:Y,model:V})}catch{}}return J}async function mH(Z={}){let $=Z.modelsDir??U0.userModelsPath(),J=Z.defaultsDir??U0.frameworkPath("defaults/app/Models"),Q=Z.outFile??U0.projectPath("database/types.d.ts"),X=[],Y=[];for(let[z,L]of[[$,!1],[J,!0]])try{let H=await l3(z,L);Y.push(...H)}catch(H){X.push({file:z,error:H.message})}let G=new Map;for(let z of Y)G.set(z.model.name??U0.basename(z.filePath).replace(/\.ts$/,""),z);for(let z of Y)if(z.filePath.startsWith($))G.set(z.model.name??U0.basename(z.filePath).replace(/\.ts$/,""),z);let V=[];for(let[z,{model:L}]of G){let H=L.table??`${z0(z)}s`,T={...gH(L),...hH(L),...fH(L)};V.push({table:H,model:z,columns:T})}let U=new Map;for(let[z,{model:L}]of G)for(let H of _H(z,L)){if(U.has(H.table))continue;U.set(H.table,{table:H.table,model:`(${H.table} pivot)`,columns:H.columns})}V.push(...U.values()),V.sort((z,L)=>z.table.localeCompare(L.table));let W=V.map((z)=>m3(z.table,z.columns)).join(`
28
- `),B=`${u3}${W}
29
- ${c3}`;if(!Z.dryRun){let z=U0.dirname(Q);if(!L8.existsSync(z))L8.mkdirSync(z,{recursive:!0});L8.writeFileSync(Q,B,"utf-8"),jH.success(`[generate:db-types] wrote ${V.length} table(s) to ${Q}`)}return{outFile:Q,tables:V,errors:X,content:B}}function uH(Z){let $=[...Z].sort((J,Q)=>J.table.localeCompare(Q.table)).map((J)=>m3(J.table,J.columns)).join(`
30
- `);return`${u3}${$}
31
- ${c3}`}import{configureOrm as cH}from"@stacksjs/query-builder";function lH(){try{let Z=process.env.DB_DATABASE_PATH||"database/stacks.sqlite";if((process.env.DB_CONNECTION||"sqlite")==="sqlite")cH({database:Z})}catch{}}lH();async function n3(Z){for(let $=0;;$++){let J=await import(Z);try{return J.default}catch(Q){if($<5&&Q instanceof ReferenceError&&/before initialization/.test(Q.message)){await new Promise((X)=>setTimeout(X,0));continue}throw Q}}}async function J9(Z,$=[""]){let{path:J}=await import("@stacksjs/path"),Q=J.userModelsPath(`${Z}.ts`);try{if(await Bun.file(Q).exists())return await n3(Q)}catch(X){console.error(`[orm] Failed to import userland model ${Z} from ${Q} \u2014 falling back to framework default. Reason:`,X)}for(let X of $){let Y=X?`${X}/`:"",G=J.frameworkPath(`defaults/app/Models/${Y}${Z}.ts`);try{if(await Bun.file(G).exists())return await n3(G)}catch(V){console.error(`[orm] Failed to import framework default model ${Z} from ${G} \u2014 trying next subdir. Reason:`,V)}}return null}var e={},p3=()=>{},xF=new Promise((Z)=>{p3=Z});function F(Z){return new Proxy(function(){},{get($,J){if(J==="then")return;let Q=e[Z];if(Q==null)return;let X=Q[J];return typeof X==="function"?X.bind(Q):X},set($,J,Q){let X=e[Z];if(X==null)return!1;return X[J]=Q,!0},has($,J){let Q=e[Z];return Q==null?!1:(J in Q)},apply($,J,Q){let X=e[Z];if(X==null||typeof X!=="function")return;return X.apply(J,Q)}})}var nH=F("User"),pH=F("Job"),dH=F("FailedJob"),iH=[["Team",[""],"auth"],["Subscriber",[""],"auth"],["SubscriberEmail",[""],"auth"],["Subscription",[""],"auth"],["Post",["Content"],"cms"],["Page",["Content"],"cms"],["Author",["Content"],"cms"],["Comment",[""],"cms"],["Tag",[""],"cms"],["Activity",[""],"dashboard"],["Deployment",[""],"dashboard"],["Release",[""],"dashboard"],["Notification",[""],"dashboard"],["Log",[""],"dashboard"],["Request",[""],"dashboard"],["Error",[""],"monitoring"],["Websocket",["realtime"],"realtime"],["Campaign",[""],"marketing"],["CampaignSend",[""],"marketing"],["EmailList",[""],"marketing"],["EmailListSubscriber",[""],"marketing"],["SocialPost",[""],"marketing"],["PaymentMethod",[""],"commerce"],["PaymentProduct",[""],"commerce"],["PaymentTransaction",[""],"commerce"],["Order",["commerce"],"commerce"],["OrderItem",["commerce"],"commerce"],["Cart",["commerce"],"commerce"],["CartItem",["commerce"],"commerce"],["Customer",["commerce"],"commerce"],["Product",["commerce"],"commerce"],["ProductVariant",["commerce"],"commerce"],["ProductUnit",["commerce"],"commerce"],["Manufacturer",["commerce"],"commerce"],["Category",["commerce"],"commerce"],["Coupon",["commerce"],"commerce"],["GiftCard",["commerce"],"commerce"],["LicenseKey",["commerce"],"commerce"],["Review",["commerce"],"commerce"],["Receipt",["commerce"],"commerce"],["PrintDevice",["commerce"],"commerce"],["ShippingMethod",["commerce"],"commerce"],["ShippingRate",["commerce"],"commerce"],["ShippingZone",["commerce"],"commerce"],["DeliveryRoute",["commerce"],"commerce"],["DigitalDelivery",["commerce"],"commerce"],["Driver",["commerce"],"commerce"],["TaxRate",["commerce"],"commerce"],["WaitlistProduct",["commerce"],"commerce"],["WaitlistRestaurant",["commerce"],"commerce"],["LoyaltyPoint",["commerce"],"commerce"],["LoyaltyReward",["commerce"],"commerce"],["Payment",["commerce"],"commerce"],["Transaction",["commerce"],"commerce"]];queueMicrotask(async()=>{try{let{feature:Z}=await import("@stacksjs/config"),$=await J9("User");if($)e.User=$;if(Z("queue")){let J=await J9("Job");if(J)e.Job=J;let Q=await J9("FailedJob");if(Q)e.FailedJob=Q}for(let[J,Q,X]of iH){if(!Z(X))continue;let Y=await J9(J,Q);if(Y)e[J]=Y}}catch(Z){console.error("[orm] deferred model load failed:",Z)}finally{p3()}});var aH=F("Activity"),oH=F("Author"),sH=F("Campaign"),rH=F("Cart"),tH=F("CartItem"),eH=F("Category"),Zw=F("Comment"),$w=F("Coupon"),Jw=F("Customer"),Qw=F("DeliveryRoute"),Xw=F("Deployment"),Yw=F("DigitalDelivery"),Gw=F("Driver"),Vw=F("CampaignSend"),Bw=F("EmailList"),Ww=F("EmailListSubscriber"),Uw=F("Error"),zw=F("GiftCard"),Lw=F("LicenseKey"),Kw=F("Log"),Hw=F("LoyaltyPoint"),ww=F("LoyaltyReward"),Tw=F("Manufacturer"),Dw=F("Notification"),Ow=F("Order"),qw=F("OrderItem"),Ew=F("Page"),Fw=F("Payment"),Cw=F("PaymentMethod"),kw=F("PaymentProduct"),Aw=F("PaymentTransaction"),Nw=F("Post"),xw=F("PrintDevice"),Iw=F("Product"),Pw=F("ProductUnit"),Sw=F("ProductVariant"),Rw=F("Receipt"),vw=F("Release"),yw=F("Request"),jw=F("Review"),bw=F("ShippingMethod"),fw=F("ShippingRate"),Mw=F("ShippingZone"),_w=F("SocialPost"),gw=F("Subscriber"),hw=F("SubscriberEmail"),mw=F("Subscription"),uw=F("Tag"),cw=F("TaxRate"),lw=F("Team"),nw=F("Transaction"),pw=F("WaitlistProduct"),dw=F("WaitlistRestaurant"),iw=F("Websocket"),aw={User:nH,Job:pH,FailedJob:dH,Activity:aH,Author:oH,Campaign:sH,CampaignSend:Vw,Cart:rH,CartItem:tH,Category:eH,Comment:Zw,Coupon:$w,Customer:Jw,DeliveryRoute:Qw,Deployment:Xw,DigitalDelivery:Yw,Driver:Gw,EmailList:Bw,EmailListSubscriber:Ww,ErrorModel:Uw,GiftCard:zw,LicenseKey:Lw,Log:Kw,LoyaltyPoint:Hw,LoyaltyReward:ww,Manufacturer:Tw,Notification:Dw,Order:Ow,OrderItem:qw,Page:Ew,Payment:Fw,PaymentMethod:Cw,PaymentProduct:kw,PaymentTransaction:Aw,Post:Nw,PrintDevice:xw,Product:Iw,ProductUnit:Pw,ProductVariant:Sw,Receipt:Rw,Release:vw,Request:yw,Review:jw,ShippingMethod:bw,ShippingRate:fw,ShippingZone:Mw,SocialPost:_w,Subscriber:gw,SubscriberEmail:hw,Subscription:mw,Tag:uw,TaxRate:cw,Team:lw,Transaction:nw,WaitlistProduct:pw,WaitlistRestaurant:dw,Websocket:iw},I0=globalThis;for(let[Z,$]of Object.entries(aw))if($&&I0[Z]===void 0)I0[Z]=$;async function ow(Z){if(!Z)return[];try{if(typeof Z.all==="function"){let $=await Z.all();return Array.isArray($)?$:[]}if(typeof Z.get==="function"){let $=await Z.get();return Array.isArray($)?$:[]}}catch{}return[]}function sw(Z,$,J=""){if(!Z)return J;try{if(typeof Z.get==="function"){let X=Z.get($);if(X!==void 0&&X!==null)return X}}catch{}let Q=Z?.[$];return Q!==void 0&&Q!==null?Q:J}if(I0.safeAll===void 0)I0.safeAll=ow;if(I0.safeGet===void 0)I0.safeGet=sw;export{B0 as withoutEvents,ET as transactional,OT as transactionBuilder,DT as transaction,hT as toTimestamp,w9 as toSimplePaginator,H9 as toPaginator,T9 as toCursorPaginator,yH as toAttrs,BB as setAuditUser,qT as savepoint,O9 as resolvePageArgs,q9 as resolveCursorArgs,uH as renderDatabaseTypeFile,$B as prunable,vZ as parseCursor,xF as ormReady,xT as modelTableName,ZT as massPrunable,UB as mapWriteError,MT as mapEntity,AZ as isUniqueViolation,EB as isSimplePaginator,qB as isPaginator,S0 as isEncrypted,FB as isCursorPaginator,IT as hasRelations,u as getTableName,wB as getRelations,PT as getRelationType,ST as getRelationCount,$T as getPrunableConfig,RT as getPivotTables,HB as getPivotTableName,y0 as getModelName,yT as getHiddenAttributes,jT as getGuardedAttributes,bT as getFillableAttributes,_T as formatDate,L9 as findUserModel,z9 as findCoreModel,vT as fetchOtherModelRelations,fT as extractFields,gT as extractDate,E9 as enrichPaginatorUrls,X9 as encryptValue,OF as defineModel,Y9 as decryptValue,HT as db,FZ as createAuditMethods,G9 as collectEncryptedAttributes,mH as buildDatabaseSchema,UT as batchLoad,iw as Websocket,dw as WaitlistRestaurant,pw as WaitlistProduct,nH as User,nw as Transaction,lw as Team,cw as TaxRate,uw as Tag,mw as Subscription,hw as SubscriberEmail,gw as Subscriber,LB as SubqueryBuilder,_w as SocialPost,Mw as ShippingZone,fw as ShippingRate,bw as ShippingMethod,jw as Review,yw as Request,vw as Release,Rw as Receipt,Sw as ProductVariant,Pw as ProductUnit,Iw as Product,xw as PrintDevice,Nw as Post,Aw as PaymentTransaction,kw as PaymentProduct,Cw as PaymentMethod,Fw as Payment,Ew as Page,qw as OrderItem,Ow as Order,Dw as Notification,g3 as ModelNotFoundError,LZ as MassAssignmentException,Tw as Manufacturer,ww as LoyaltyReward,Hw as LoyaltyPoint,Kw as Log,Lw as LicenseKey,pH as Job,zw as GiftCard,dH as FailedJob,Uw as ErrorModel,Ww as EmailListSubscriber,Bw as EmailList,Gw as Driver,Yw as DigitalDelivery,Xw as Deployment,Qw as DeliveryRoute,Jw as Customer,$w as Coupon,Zw as Comment,eH as Category,tH as CartItem,rH as Cart,Vw as CampaignSend,sH as Campaign,oH as Author,aH as Activity};
30
+ `;async function mW(Z,$){let J=[];if(!T0.existsSync(Z))return J;let Y=T0.readdirSync(Z,{withFileTypes:!0});for(let X of Y){let Q=i.join(Z,X.name);if(X.isDirectory()){if($){let G=await mW(Q,!0);J.push(...G)}continue}if(!X.name.endsWith(".ts"))continue;if(X.name.startsWith("_")||X.name.startsWith("index"))continue;try{let G=await import(Q),W=G.default||G;if(W?.name&&(W.attributes||W.table))J.push({filePath:Q,model:W})}catch{}}return J}async function gL(Z={}){let $=Z.modelsDir??i.userModelsPath(),J=Z.defaultsDir??i.frameworkPath("defaults/app/Models"),Y=Z.outFile??i.projectPath("database/types.d.ts"),X=[],Q=[];for(let[K,H]of[[$,!1],[J,!0]])try{let w=await mW(K,H);Q.push(...w)}catch(w){X.push({file:K,error:w.message})}let G=new Map;for(let K of Q)G.set(K.model.name??i.basename(K.filePath).replace(/\.ts$/,""),K);for(let K of Q)if(K.filePath.startsWith($))G.set(K.model.name??i.basename(K.filePath).replace(/\.ts$/,""),K);let W=[];for(let[K,{model:H}]of G){let w=H.table??`${r(K)}s`,U={..._L(H),...RL(H),...yL(H)};W.push({table:w,model:K,columns:U})}let z=new Map;for(let[K,{model:H}]of G)for(let w of jL(K,H)){if(z.has(w.table))continue;z.set(w.table,{table:w.table,model:`(${w.table} pivot)`,columns:w.columns})}W.push(...z.values()),W.sort((K,H)=>K.table.localeCompare(H.table));let V=W.map((K)=>gW(K.table,K.columns)).join(`
31
+ `),B=`${uW}${V}
32
+ ${cW}`;if(!Z.dryRun){let K=i.dirname(Y);if(!T0.existsSync(K))T0.mkdirSync(K,{recursive:!0});T0.writeFileSync(Y,B,"utf-8"),hL.success(`[generate:db-types] wrote ${W.length} table(s) to ${Y}`)}return{outFile:Y,tables:W,errors:X,content:B}}function uL(Z){let $=[...Z].sort((J,Y)=>J.table.localeCompare(Y.table)).map((J)=>gW(J.table,J.columns)).join(`
33
+ `);return`${uW}${$}
34
+ ${cW}`}import{configureOrm as cL}from"@stacksjs/query-builder";function mL(){try{let Z=process.env.DB_DATABASE_PATH||"database/stacks.sqlite";if((process.env.DB_CONNECTION||"sqlite")==="sqlite")cL({database:Z})}catch{}}mL();async function lW(Z){for(let $=0;;$++){let J=await import(Z);try{return J.default}catch(Y){if($<5&&Y instanceof ReferenceError&&/before initialization/.test(Y.message)){await new Promise((X)=>setTimeout(X,0));continue}throw Y}}}async function l0(Z,$=[""]){let{path:J}=await import("@stacksjs/path"),Y=J.userModelsPath(`${Z}.ts`);try{if(await Bun.file(Y).exists())return await lW(Y)}catch(X){console.error(`[orm] Failed to import userland model ${Z} from ${Y} \u2014 falling back to framework default. Reason:`,X)}for(let X of $){let Q=X?`${X}/`:"",G=J.frameworkPath(`defaults/app/Models/${Q}${Z}.ts`);try{if(await Bun.file(G).exists())return await lW(G)}catch(W){console.error(`[orm] Failed to import framework default model ${Z} from ${G} \u2014 trying next subdir. Reason:`,W)}}return null}var c={},dW=()=>{},JP=new Promise((Z)=>{dW=Z});function A(Z){return new Proxy(function(){},{get($,J){if(J==="then")return;let Y=c[Z];if(Y==null)return;let X=Y[J];return typeof X==="function"?X.bind(Y):X},set($,J,Y){let X=c[Z];if(X==null)return!1;return X[J]=Y,!0},has($,J){let Y=c[Z];return Y==null?!1:(J in Y)},apply($,J,Y){let X=c[Z];if(X==null||typeof X!=="function")return;return X.apply(J,Y)}})}var lL=A("User"),dL=A("Job"),nL=A("FailedJob"),pL=[["Team",[""],"auth"],["Subscriber",[""],"auth"],["SubscriberEmail",[""],"auth"],["Subscription",[""],"auth"],["Post",["Content"],"cms"],["Page",["Content"],"cms"],["Author",["Content"],"cms"],["Comment",[""],"cms"],["Tag",[""],"cms"],["Activity",[""],"dashboard"],["Deployment",[""],"dashboard"],["Release",[""],"dashboard"],["Notification",[""],"dashboard"],["Log",[""],"dashboard"],["Request",[""],"dashboard"],["Error",[""],"monitoring"],["Websocket",["realtime"],"realtime"],["Campaign",[""],"marketing"],["CampaignSend",[""],"marketing"],["EmailList",[""],"marketing"],["EmailListSubscriber",[""],"marketing"],["SocialPost",[""],"marketing"],["PaymentMethod",[""],"commerce"],["PaymentProduct",[""],"commerce"],["PaymentTransaction",[""],"commerce"],["Order",["commerce"],"commerce"],["OrderItem",["commerce"],"commerce"],["Cart",["commerce"],"commerce"],["CartItem",["commerce"],"commerce"],["Customer",["commerce"],"commerce"],["Product",["commerce"],"commerce"],["ProductVariant",["commerce"],"commerce"],["ProductUnit",["commerce"],"commerce"],["Manufacturer",["commerce"],"commerce"],["Category",["commerce"],"commerce"],["Coupon",["commerce"],"commerce"],["GiftCard",["commerce"],"commerce"],["LicenseKey",["commerce"],"commerce"],["Review",["commerce"],"commerce"],["Receipt",["commerce"],"commerce"],["PrintDevice",["commerce"],"commerce"],["ShippingMethod",["commerce"],"commerce"],["ShippingRate",["commerce"],"commerce"],["ShippingZone",["commerce"],"commerce"],["DeliveryRoute",["commerce"],"commerce"],["DigitalDelivery",["commerce"],"commerce"],["Driver",["commerce"],"commerce"],["TaxRate",["commerce"],"commerce"],["WaitlistProduct",["commerce"],"commerce"],["WaitlistRestaurant",["commerce"],"commerce"],["LoyaltyPoint",["commerce"],"commerce"],["LoyaltyReward",["commerce"],"commerce"],["Payment",["commerce"],"commerce"],["Transaction",["commerce"],"commerce"]];queueMicrotask(async()=>{try{let{feature:Z}=await import("@stacksjs/config"),$=await l0("User");if($)c.User=$;if(Z("queue")){let J=await l0("Job");if(J)c.Job=J;let Y=await l0("FailedJob");if(Y)c.FailedJob=Y}for(let[J,Y,X]of pL){if(!Z(X))continue;let Q=await l0(J,Y);if(Q)c[J]=Q}}catch(Z){console.error("[orm] deferred model load failed:",Z)}finally{dW()}});var iL=A("Activity"),rL=A("Author"),tL=A("Campaign"),aL=A("Cart"),oL=A("CartItem"),sL=A("Category"),eL=A("Comment"),ZA=A("Coupon"),$A=A("Customer"),JA=A("DeliveryRoute"),YA=A("Deployment"),XA=A("DigitalDelivery"),QA=A("Driver"),GA=A("CampaignSend"),WA=A("EmailList"),VA=A("EmailListSubscriber"),BA=A("Error"),zA=A("GiftCard"),KA=A("LicenseKey"),HA=A("Log"),OA=A("LoyaltyPoint"),wA=A("LoyaltyReward"),FA=A("Manufacturer"),UA=A("Notification"),qA=A("Order"),DA=A("OrderItem"),LA=A("Page"),AA=A("Payment"),TA=A("PaymentMethod"),EA=A("PaymentProduct"),NA=A("PaymentTransaction"),kA=A("Post"),CA=A("PrintDevice"),PA=A("Product"),IA=A("ProductUnit"),xA=A("ProductVariant"),SA=A("Receipt"),MA=A("Release"),fA=A("Request"),hA=A("Review"),bA=A("ShippingMethod"),yA=A("ShippingRate"),vA=A("ShippingZone"),jA=A("SocialPost"),_A=A("Subscriber"),RA=A("SubscriberEmail"),gA=A("Subscription"),uA=A("Tag"),cA=A("TaxRate"),mA=A("Team"),lA=A("Transaction"),dA=A("WaitlistProduct"),nA=A("WaitlistRestaurant"),pA=A("Websocket"),iA={User:lL,Job:dL,FailedJob:nL,Activity:iL,Author:rL,Campaign:tL,CampaignSend:GA,Cart:aL,CartItem:oL,Category:sL,Comment:eL,Coupon:ZA,Customer:$A,DeliveryRoute:JA,Deployment:YA,DigitalDelivery:XA,Driver:QA,EmailList:WA,EmailListSubscriber:VA,ErrorModel:BA,GiftCard:zA,LicenseKey:KA,Log:HA,LoyaltyPoint:OA,LoyaltyReward:wA,Manufacturer:FA,Notification:UA,Order:qA,OrderItem:DA,Page:LA,Payment:AA,PaymentMethod:TA,PaymentProduct:EA,PaymentTransaction:NA,Post:kA,PrintDevice:CA,Product:PA,ProductUnit:IA,ProductVariant:xA,Receipt:SA,Release:MA,Request:fA,Review:hA,ShippingMethod:bA,ShippingRate:yA,ShippingZone:vA,SocialPost:jA,Subscriber:_A,SubscriberEmail:RA,Subscription:gA,Tag:uA,TaxRate:cA,Team:mA,Transaction:lA,WaitlistProduct:dA,WaitlistRestaurant:nA,Websocket:pA},J0=globalThis;for(let[Z,$]of Object.entries(iA))if($&&J0[Z]===void 0)J0[Z]=$;async function rA(Z){if(!Z)return[];try{if(typeof Z.all==="function"){let $=await Z.all();return Array.isArray($)?$:[]}if(typeof Z.get==="function"){let $=await Z.get();return Array.isArray($)?$:[]}}catch{}return[]}function tA(Z,$,J=""){if(!Z)return J;try{if(typeof Z.get==="function"){let X=Z.get($);if(X!==void 0&&X!==null)return X}}catch{}let Y=Z?.[$];return Y!==void 0&&Y!==null?Y:J}if(J0.safeAll===void 0)J0.safeAll=rA;if(J0.safeGet===void 0)J0.safeGet=tA;export{n as withoutEvents,LT as transactional,qT as transactionBuilder,UT as transaction,RT as toTimestamp,J8 as toSimplePaginator,$8 as toPaginator,Y8 as toCursorPaginator,fL as toAttrs,WV as setAuditUser,DT as savepoint,Q8 as resolvePageArgs,G8 as resolveCursorArgs,uL as renderDatabaseTypeFile,ZV as prunable,bZ as parseCursor,JP as ormReady,CT as modelTableName,eA as massPrunable,BV as mapWriteError,vT as mapEntity,PZ as isUniqueViolation,LV as isSimplePaginator,DV as isPaginator,X0 as isEncrypted,AV as isCursorPaginator,PT as hasRelations,v as getTableName,wV as getRelations,IT as getRelationType,xT as getRelationCount,ZT as getPrunableConfig,ST as getPivotTables,OV as getPivotTableName,W0 as getModelName,fT as getHiddenAttributes,hT as getGuardedAttributes,bT as getFillableAttributes,jT as formatDate,e0 as findUserModel,s0 as findCoreModel,MT as fetchOtherModelRelations,yT as extractFields,_T as extractDate,W8 as enrichPaginatorUrls,n0 as encryptValue,r2 as defineModel,p0 as decryptValue,OT as db,NZ as createAuditMethods,i0 as collectEncryptedAttributes,gL as buildDatabaseSchema,BT as batchLoad,pA as Websocket,nA as WaitlistRestaurant,dA as WaitlistProduct,lL as User,lA as Transaction,mA as Team,cA as TaxRate,uA as Tag,gA as Subscription,RA as SubscriberEmail,_A as Subscriber,KV as SubqueryBuilder,jA as SocialPost,vA as ShippingZone,yA as ShippingRate,bA as ShippingMethod,hA as Review,fA as Request,MA as Release,SA as Receipt,xA as ProductVariant,IA as ProductUnit,PA as Product,CA as PrintDevice,kA as Post,NA as PaymentTransaction,EA as PaymentProduct,TA as PaymentMethod,AA as Payment,LA as Page,DA as OrderItem,qA as Order,UA as Notification,_W as ModelNotFoundError,wZ as MassAssignmentException,FA as Manufacturer,wA as LoyaltyReward,OA as LoyaltyPoint,HA as Log,KA as LicenseKey,dL as Job,zA as GiftCard,nL as FailedJob,BA as ErrorModel,VA as EmailListSubscriber,WA as EmailList,QA as Driver,XA as DigitalDelivery,YA as Deployment,JA as DeliveryRoute,$A as Customer,ZA as Coupon,eL as Comment,sL as Category,oL as CartItem,aL as Cart,GA as CampaignSend,tL as Campaign,rL as Author,iL as Activity};