uptide 0.3.0 → 0.4.0

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.
@@ -0,0 +1,329 @@
1
+ import { createRequire as __uptideCreateRequire } from 'node:module';
2
+ import { fileURLToPath as __uptideFileURLToPath } from 'node:url';
3
+ const require = __uptideCreateRequire(import.meta.url);
4
+ const __filename = __uptideFileURLToPath(import.meta.url);
5
+ const __dirname = __uptideFileURLToPath(new URL('.', import.meta.url));
6
+ import{parseSource,require_ts_morph,sourceCandidate}from"./chunk-GHXBU767.js";import{AdapterCapabilityError,IntegrityError,NoTypesError,PackageNotFoundError,RegistryAuthError,UPTIDE_COMMAND,UptideError,VersionNotFoundError,command,errorCode}from"./chunk-W74OVIU4.js";import{__export}from"./chunk-JHZ22Y6X.js";import{__commonJS,__require,__toESM}from"./chunk-Z5YHBDVG.js";var require_constants=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js"(exports,module){"use strict";var SEMVER_SPEC_VERSION="2.0.0",MAX_SAFE_INTEGER=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=250,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];module.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH,MAX_SAFE_BUILD_LENGTH,MAX_SAFE_INTEGER,RELEASE_TYPES,SEMVER_SPEC_VERSION,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}});var require_debug=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js"(exports,module){"use strict";var debug=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...args)=>console.error("SEMVER",...args):()=>{};module.exports=debug}});var require_re=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js"(exports,module){"use strict";var{MAX_SAFE_COMPONENT_LENGTH,MAX_SAFE_BUILD_LENGTH,MAX_LENGTH}=require_constants(),debug=require_debug();exports=module.exports={};var re=exports.re=[],safeRe=exports.safeRe=[],src=exports.src=[],safeSrc=exports.safeSrc=[],t=exports.t={},R=0,LETTERDASHNUMBER="[a-zA-Z0-9-]",safeRegexReplacements=[["\\s",1],["\\d",MAX_LENGTH],[LETTERDASHNUMBER,MAX_SAFE_BUILD_LENGTH]],makeSafeRegex=value=>{for(let[token,max]of safeRegexReplacements)value=value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);return value},createToken=(name,value,isGlobal)=>{let safe=makeSafeRegex(value),index=R++;debug(name,index,value),t[name]=index,src[index]=value,safeSrc[index]=safe,re[index]=new RegExp(value,isGlobal?"g":void 0),safeRe[index]=new RegExp(safe,isGlobal?"g":void 0)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","\\d+");createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);createToken("MAINVERSION",`(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASE",`(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER",`${LETTERDASHNUMBER}+`);createToken("BUILD",`(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);createToken("FULL",`^${src[t.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);createToken("LOOSE",`^${src[t.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);createToken("XRANGE",`^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);createToken("COERCEPLAIN",`(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);createToken("COERCE",`${src[t.COERCEPLAIN]}(?:$|[^\\d])`);createToken("COERCEFULL",src[t.COERCEPLAIN]+`(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);createToken("COERCERTL",src[t.COERCE],!0);createToken("COERCERTLFULL",src[t.COERCEFULL],!0);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${src[t.LONETILDE]}\\s+`,!0);exports.tildeTrimReplace="$1~";createToken("TILDE",`^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${src[t.LONECARET]}\\s+`,!0);exports.caretTrimReplace="$1^";createToken("CARET",`^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`,!0);exports.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}});var require_parse_options=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js"(exports,module){"use strict";var looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions=options=>options?typeof options!="object"?looseOption:options:emptyOpts;module.exports=parseOptions}});var require_identifiers=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js"(exports,module){"use strict";var numeric=/^[0-9]+$/,compareIdentifiers=(a,b)=>{if(typeof a=="number"&&typeof b=="number")return a===b?0:a<b?-1:1;let anum=numeric.test(a),bnum=numeric.test(b);return anum&&bnum&&(a=+a,b=+b),a===b?0:anum&&!bnum?-1:bnum&&!anum?1:a<b?-1:1},rcompareIdentifiers=(a,b)=>compareIdentifiers(b,a);module.exports={compareIdentifiers,rcompareIdentifiers}}});var require_semver=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js"(exports,module){"use strict";var debug=require_debug(),{MAX_LENGTH,MAX_SAFE_INTEGER}=require_constants(),{safeRe:re,t}=require_re(),parseOptions=require_parse_options(),{compareIdentifiers}=require_identifiers(),isPrereleaseIdentifier=(prerelease,identifier)=>{let identifiers=identifier.split(".");if(identifiers.length>prerelease.length)return!1;for(let i=0;i<identifiers.length;i++)if(compareIdentifiers(prerelease[i],identifiers[i])!==0)return!1;return!0},SemVer=class _SemVer{constructor(version,options){if(options=parseOptions(options),version instanceof _SemVer){if(version.loose===!!options.loose&&version.includePrerelease===!!options.includePrerelease)return version;version=version.version}else if(typeof version!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);if(version.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug("SemVer",version,options),this.options=options,this.loose=!!options.loose,this.includePrerelease=!!options.includePrerelease;let m=version.trim().match(options.loose?re[t.LOOSE]:re[t.FULL]);if(!m)throw new TypeError(`Invalid Version: ${version}`);if(this.raw=version,this.major=+m[1],this.minor=+m[2],this.patch=+m[3],this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");m[4]?this.prerelease=m[4].split(".").map(id=>{if(/^[0-9]+$/.test(id)){let num=+id;if(num>=0&&num<MAX_SAFE_INTEGER)return num}return id}):this.prerelease=[],this.build=m[5]?m[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(other){if(debug("SemVer.compare",this.version,this.options,other),!(other instanceof _SemVer)){if(typeof other=="string"&&other===this.version)return 0;other=new _SemVer(other,this.options)}return other.version===this.version?0:this.compareMain(other)||this.comparePre(other)}compareMain(other){return other instanceof _SemVer||(other=new _SemVer(other,this.options)),this.major<other.major?-1:this.major>other.major?1:this.minor<other.minor?-1:this.minor>other.minor?1:this.patch<other.patch?-1:this.patch>other.patch?1:0}comparePre(other){if(other instanceof _SemVer||(other=new _SemVer(other,this.options)),this.prerelease.length&&!other.prerelease.length)return-1;if(!this.prerelease.length&&other.prerelease.length)return 1;if(!this.prerelease.length&&!other.prerelease.length)return 0;let i=0;do{let a=this.prerelease[i],b=other.prerelease[i];if(debug("prerelease compare",i,a,b),a===void 0&&b===void 0)return 0;if(b===void 0)return 1;if(a===void 0)return-1;if(a===b)continue;return compareIdentifiers(a,b)}while(++i)}compareBuild(other){other instanceof _SemVer||(other=new _SemVer(other,this.options));let i=0;do{let a=this.build[i],b=other.build[i];if(debug("build compare",i,a,b),a===void 0&&b===void 0)return 0;if(b===void 0)return 1;if(a===void 0)return-1;if(a===b)continue;return compareIdentifiers(a,b)}while(++i)}inc(release,identifier,identifierBase){if(release.startsWith("pre")){if(!identifier&&identifierBase===!1)throw new Error("invalid increment argument: identifier is empty");if(identifier){let match2=`-${identifier}`.match(this.options.loose?re[t.PRERELEASELOOSE]:re[t.PRERELEASE]);if(!match2||match2[1]!==identifier)throw new Error(`invalid identifier: ${identifier}`)}}switch(release){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",identifier,identifierBase);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",identifier,identifierBase);break;case"prepatch":this.prerelease.length=0,this.inc("patch",identifier,identifierBase),this.inc("pre",identifier,identifierBase);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",identifier,identifierBase),this.inc("pre",identifier,identifierBase);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let base=Number(identifierBase)?1:0;if(this.prerelease.length===0)this.prerelease=[base];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(identifier===this.prerelease.join(".")&&identifierBase===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(base)}}if(identifier){let prerelease=[identifier,base];if(identifierBase===!1&&(prerelease=[identifier]),isPrereleaseIdentifier(this.prerelease,identifier)){let prereleaseBase=this.prerelease[identifier.split(".").length];isNaN(prereleaseBase)&&(this.prerelease=prerelease)}else this.prerelease=prerelease}break}default:throw new Error(`invalid increment argument: ${release}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};module.exports=SemVer}});var require_parse=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js"(exports,module){"use strict";var SemVer=require_semver(),parse4=(version,options,throwErrors=!1)=>{if(version instanceof SemVer)return version;try{return new SemVer(version,options)}catch(er){if(!throwErrors)return null;throw er}};module.exports=parse4}});var require_valid=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js"(exports,module){"use strict";var parse4=require_parse(),valid=(version,options)=>{let v=parse4(version,options);return v?v.version:null};module.exports=valid}});var require_clean=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js"(exports,module){"use strict";var parse4=require_parse(),clean=(version,options)=>{let s=parse4(version.trim().replace(/^[=v]+/,""),options);return s?s.version:null};module.exports=clean}});var require_inc=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js"(exports,module){"use strict";var SemVer=require_semver(),inc=(version,release,options,identifier,identifierBase)=>{typeof options=="string"&&(identifierBase=identifier,identifier=options,options=void 0);try{return new SemVer(version instanceof SemVer?version.version:version,options).inc(release,identifier,identifierBase).version}catch{return null}};module.exports=inc}});var require_diff=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js"(exports,module){"use strict";var parse4=require_parse(),diff=(version1,version2)=>{let v1=parse4(version1,null,!0),v2=parse4(version2,null,!0),comparison=v1.compare(v2);if(comparison===0)return null;let v1Higher=comparison>0,highVersion=v1Higher?v1:v2,lowVersion=v1Higher?v2:v1,highHasPre=!!highVersion.prerelease.length;if(!!lowVersion.prerelease.length&&!highHasPre){if(!lowVersion.patch&&!lowVersion.minor)return"major";if(lowVersion.compareMain(highVersion)===0)return lowVersion.minor&&!lowVersion.patch?"minor":"patch"}let prefix=highHasPre?"pre":"";return v1.major!==v2.major?prefix+"major":v1.minor!==v2.minor?prefix+"minor":v1.patch!==v2.patch?prefix+"patch":"prerelease"};module.exports=diff}});var require_major=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js"(exports,module){"use strict";var SemVer=require_semver(),major=(a,loose)=>new SemVer(a,loose).major;module.exports=major}});var require_minor=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js"(exports,module){"use strict";var SemVer=require_semver(),minor=(a,loose)=>new SemVer(a,loose).minor;module.exports=minor}});var require_patch=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js"(exports,module){"use strict";var SemVer=require_semver(),patch=(a,loose)=>new SemVer(a,loose).patch;module.exports=patch}});var require_prerelease=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js"(exports,module){"use strict";var parse4=require_parse(),prerelease=(version,options)=>{let parsed2=parse4(version,options);return parsed2&&parsed2.prerelease.length?parsed2.prerelease:null};module.exports=prerelease}});var require_compare=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js"(exports,module){"use strict";var SemVer=require_semver(),compare4=(a,b,loose)=>new SemVer(a,loose).compare(new SemVer(b,loose));module.exports=compare4}});var require_rcompare=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js"(exports,module){"use strict";var compare4=require_compare(),rcompare=(a,b,loose)=>compare4(b,a,loose);module.exports=rcompare}});var require_compare_loose=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js"(exports,module){"use strict";var compare4=require_compare(),compareLoose=(a,b)=>compare4(a,b,!0);module.exports=compareLoose}});var require_compare_build=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js"(exports,module){"use strict";var SemVer=require_semver(),compareBuild=(a,b,loose)=>{let versionA=new SemVer(a,loose),versionB=new SemVer(b,loose);return versionA.compare(versionB)||versionA.compareBuild(versionB)};module.exports=compareBuild}});var require_sort=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js"(exports,module){"use strict";var compareBuild=require_compare_build(),sort=(list,loose)=>list.sort((a,b)=>compareBuild(a,b,loose));module.exports=sort}});var require_rsort=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js"(exports,module){"use strict";var compareBuild=require_compare_build(),rsort=(list,loose)=>list.sort((a,b)=>compareBuild(b,a,loose));module.exports=rsort}});var require_gt=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js"(exports,module){"use strict";var compare4=require_compare(),gt=(a,b,loose)=>compare4(a,b,loose)>0;module.exports=gt}});var require_lt=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js"(exports,module){"use strict";var compare4=require_compare(),lt=(a,b,loose)=>compare4(a,b,loose)<0;module.exports=lt}});var require_eq=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js"(exports,module){"use strict";var compare4=require_compare(),eq=(a,b,loose)=>compare4(a,b,loose)===0;module.exports=eq}});var require_neq=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js"(exports,module){"use strict";var compare4=require_compare(),neq=(a,b,loose)=>compare4(a,b,loose)!==0;module.exports=neq}});var require_gte=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js"(exports,module){"use strict";var compare4=require_compare(),gte=(a,b,loose)=>compare4(a,b,loose)>=0;module.exports=gte}});var require_lte=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js"(exports,module){"use strict";var compare4=require_compare(),lte=(a,b,loose)=>compare4(a,b,loose)<=0;module.exports=lte}});var require_cmp=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js"(exports,module){"use strict";var eq=require_eq(),neq=require_neq(),gt=require_gt(),gte=require_gte(),lt=require_lt(),lte=require_lte(),cmp=(a,op,b,loose)=>{switch(op){case"===":return typeof a=="object"&&(a=a.version),typeof b=="object"&&(b=b.version),a===b;case"!==":return typeof a=="object"&&(a=a.version),typeof b=="object"&&(b=b.version),a!==b;case"":case"=":case"==":return eq(a,b,loose);case"!=":return neq(a,b,loose);case">":return gt(a,b,loose);case">=":return gte(a,b,loose);case"<":return lt(a,b,loose);case"<=":return lte(a,b,loose);default:throw new TypeError(`Invalid operator: ${op}`)}};module.exports=cmp}});var require_coerce=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js"(exports,module){"use strict";var SemVer=require_semver(),parse4=require_parse(),{safeRe:re,t}=require_re(),coerce=(version,options)=>{if(version instanceof SemVer)return version;if(typeof version=="number"&&(version=String(version)),typeof version!="string")return null;options=options||{};let match2=null;if(!options.rtl)match2=version.match(options.includePrerelease?re[t.COERCEFULL]:re[t.COERCE]);else{let coerceRtlRegex=options.includePrerelease?re[t.COERCERTLFULL]:re[t.COERCERTL],next;for(;(next=coerceRtlRegex.exec(version))&&(!match2||match2.index+match2[0].length!==version.length);)(!match2||next.index+next[0].length!==match2.index+match2[0].length)&&(match2=next),coerceRtlRegex.lastIndex=next.index+next[1].length+next[2].length;coerceRtlRegex.lastIndex=-1}if(match2===null)return null;let major=match2[2],minor=match2[3]||"0",patch=match2[4]||"0",prerelease=options.includePrerelease&&match2[5]?`-${match2[5]}`:"",build=options.includePrerelease&&match2[6]?`+${match2[6]}`:"";return parse4(`${major}.${minor}.${patch}${prerelease}${build}`,options)};module.exports=coerce}});var require_truncate=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js"(exports,module){"use strict";var parse4=require_parse(),constants=require_constants(),SemVer=require_semver(),truncate=(version,truncation,options)=>{if(!constants.RELEASE_TYPES.includes(truncation))return null;let clonedVersion=cloneInputVersion(version,options);return clonedVersion&&doTruncation(clonedVersion,truncation)},cloneInputVersion=(version,options)=>{let versionStringToParse=version instanceof SemVer?version.version:version;return parse4(versionStringToParse,options)},doTruncation=(version,truncation)=>{if(isPrerelease(truncation))return version.version;switch(version.prerelease=[],truncation){case"major":version.minor=0,version.patch=0;break;case"minor":version.patch=0;break}return version.format()},isPrerelease=type=>type.startsWith("pre");module.exports=truncate}});var require_lrucache=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js"(exports,module){"use strict";var LRUCache=class{constructor(){this.max=1e3,this.map=new Map}get(key2){let value=this.map.get(key2);if(value!==void 0)return this.map.delete(key2),this.map.set(key2,value),value}delete(key2){return this.map.delete(key2)}set(key2,value){if(!this.delete(key2)&&value!==void 0){if(this.map.size>=this.max){let firstKey=this.map.keys().next().value;this.delete(firstKey)}this.map.set(key2,value)}return this}};module.exports=LRUCache}});var require_range=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js"(exports,module){"use strict";var SPACE_CHARACTERS=/\s+/g,Range=class _Range{constructor(range,options){if(options=parseOptions(options),range instanceof _Range)return range.loose===!!options.loose&&range.includePrerelease===!!options.includePrerelease?range:new _Range(range.raw,options);if(range instanceof Comparator)return this.raw=range.value,this.set=[[range]],this.formatted=void 0,this;if(this.options=options,this.loose=!!options.loose,this.includePrerelease=!!options.includePrerelease,this.raw=range.trim().replace(SPACE_CHARACTERS," "),this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(c=>c.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let first=this.set[0];if(this.set=this.set.filter(c=>!isNullSet(c[0])),this.set.length===0)this.set=[first];else if(this.set.length>1){for(let c of this.set)if(c.length===1&&isAny(c[0])){this.set=[c];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let i=0;i<this.set.length;i++){i>0&&(this.formatted+="||");let comps=this.set[i];for(let k=0;k<comps.length;k++)k>0&&(this.formatted+=" "),this.formatted+=comps[k].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(range){range=range.replace(BUILDSTRIPRE,"");let memoKey=((this.options.includePrerelease&&FLAG_INCLUDE_PRERELEASE)|(this.options.loose&&FLAG_LOOSE))+":"+range,cached=cache.get(memoKey);if(cached)return cached;let loose=this.options.loose,hr=loose?re[t.HYPHENRANGELOOSE]:re[t.HYPHENRANGE];range=range.replace(hr,hyphenReplace(this.options.includePrerelease)),debug("hyphen replace",range),range=range.replace(re[t.COMPARATORTRIM],comparatorTrimReplace),debug("comparator trim",range),range=range.replace(re[t.TILDETRIM],tildeTrimReplace),debug("tilde trim",range),range=range.replace(re[t.CARETTRIM],caretTrimReplace),debug("caret trim",range);let rangeList=range.split(" ").map(comp=>parseComparator(comp,this.options)).join(" ").split(/\s+/).map(comp=>replaceGTE0(comp,this.options));loose&&(rangeList=rangeList.filter(comp=>(debug("loose invalid filter",comp,this.options),!!comp.match(re[t.COMPARATORLOOSE])))),debug("range list",rangeList);let rangeMap=new Map,comparators=rangeList.map(comp=>new Comparator(comp,this.options));for(let comp of comparators){if(isNullSet(comp))return[comp];rangeMap.set(comp.value,comp)}rangeMap.size>1&&rangeMap.has("")&&rangeMap.delete("");let result=[...rangeMap.values()];return cache.set(memoKey,result),result}intersects(range,options){if(!(range instanceof _Range))throw new TypeError("a Range is required");return this.set.some(thisComparators=>isSatisfiable(thisComparators,options)&&range.set.some(rangeComparators=>isSatisfiable(rangeComparators,options)&&thisComparators.every(thisComparator=>rangeComparators.every(rangeComparator=>thisComparator.intersects(rangeComparator,options)))))}test(version){if(!version)return!1;if(typeof version=="string")try{version=new SemVer(version,this.options)}catch{return!1}for(let i=0;i<this.set.length;i++)if(testSet(this.set[i],version,this.options))return!0;return!1}};module.exports=Range;var LRU=require_lrucache(),cache=new LRU,parseOptions=require_parse_options(),Comparator=require_comparator(),debug=require_debug(),SemVer=require_semver(),{safeRe:re,src,t,comparatorTrimReplace,tildeTrimReplace,caretTrimReplace}=require_re(),{FLAG_INCLUDE_PRERELEASE,FLAG_LOOSE}=require_constants(),BUILDSTRIPRE=new RegExp(src[t.BUILD],"g"),isNullSet=c=>c.value==="<0.0.0-0",isAny=c=>c.value==="",isSatisfiable=(comparators,options)=>{let result=!0,remainingComparators=comparators.slice(),testComparator=remainingComparators.pop();for(;result&&remainingComparators.length;)result=remainingComparators.every(otherComparator=>testComparator.intersects(otherComparator,options)),testComparator=remainingComparators.pop();return result},parseComparator=(comp,options)=>(comp=comp.replace(re[t.BUILD],""),debug("comp",comp,options),comp=replaceCarets(comp,options),debug("caret",comp),comp=replaceTildes(comp,options),debug("tildes",comp),comp=replaceXRanges(comp,options),debug("xrange",comp),comp=replaceStars(comp,options),debug("stars",comp),comp),isX=id=>!id||id.toLowerCase()==="x"||id==="*",invalidXRangeOrder=(M,m,p)=>isX(M)&&!isX(m)||isX(m)&&p&&!isX(p),replaceTildes=(comp,options)=>comp.trim().split(/\s+/).map(c=>replaceTilde(c,options)).join(" "),replaceTilde=(comp,options)=>{let r=options.loose?re[t.TILDELOOSE]:re[t.TILDE],z=options.includePrerelease?"-0":"";return comp.replace(r,(_,M,m,p,pr)=>{debug("tilde",comp,_,M,m,p,pr);let ret;return isX(M)?ret="":isX(m)?ret=`>=${M}.0.0${z} <${+M+1}.0.0-0`:isX(p)?ret=`>=${M}.${m}.0${z} <${M}.${+m+1}.0-0`:pr?(debug("replaceTilde pr",pr),ret=`>=${M}.${m}.${p}-${pr} <${M}.${+m+1}.0-0`):ret=`>=${M}.${m}.${p} <${M}.${+m+1}.0-0`,debug("tilde return",ret),ret})},replaceCarets=(comp,options)=>comp.trim().split(/\s+/).map(c=>replaceCaret(c,options)).join(" "),replaceCaret=(comp,options)=>{debug("caret",comp,options);let r=options.loose?re[t.CARETLOOSE]:re[t.CARET],z=options.includePrerelease?"-0":"";return comp.replace(r,(_,M,m,p,pr)=>{debug("caret",comp,_,M,m,p,pr);let ret;return isX(M)?ret="":isX(m)?ret=`>=${M}.0.0${z} <${+M+1}.0.0-0`:isX(p)?M==="0"?ret=`>=${M}.${m}.0${z} <${M}.${+m+1}.0-0`:ret=`>=${M}.${m}.0${z} <${+M+1}.0.0-0`:pr?(debug("replaceCaret pr",pr),M==="0"?m==="0"?ret=`>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p+1}-0`:ret=`>=${M}.${m}.${p}-${pr} <${M}.${+m+1}.0-0`:ret=`>=${M}.${m}.${p}-${pr} <${+M+1}.0.0-0`):(debug("no pr"),M==="0"?m==="0"?ret=`>=${M}.${m}.${p} <${M}.${m}.${+p+1}-0`:ret=`>=${M}.${m}.${p} <${M}.${+m+1}.0-0`:ret=`>=${M}.${m}.${p} <${+M+1}.0.0-0`),debug("caret return",ret),ret})},replaceXRanges=(comp,options)=>(debug("replaceXRanges",comp,options),comp.split(/\s+/).map(c=>replaceXRange(c,options)).join(" ")),replaceXRange=(comp,options)=>{comp=comp.trim();let r=options.loose?re[t.XRANGELOOSE]:re[t.XRANGE];return comp.replace(r,(ret,gtlt,M,m,p,pr)=>{if(debug("xRange",comp,ret,gtlt,M,m,p,pr),invalidXRangeOrder(M,m,p))return comp;let xM=isX(M),xm=xM||isX(m),xp=xm||isX(p),anyX=xp;return gtlt==="="&&anyX&&(gtlt=""),pr=options.includePrerelease?"-0":"",xM?gtlt===">"||gtlt==="<"?ret="<0.0.0-0":ret="*":gtlt&&anyX?(xm&&(m=0),p=0,gtlt===">"?(gtlt=">=",xm?(M=+M+1,m=0,p=0):(m=+m+1,p=0)):gtlt==="<="&&(gtlt="<",xm?M=+M+1:m=+m+1),gtlt==="<"&&(pr="-0"),ret=`${gtlt+M}.${m}.${p}${pr}`):xm?ret=`>=${M}.0.0${pr} <${+M+1}.0.0-0`:xp&&(ret=`>=${M}.${m}.0${pr} <${M}.${+m+1}.0-0`),debug("xRange return",ret),ret})},replaceStars=(comp,options)=>(debug("replaceStars",comp,options),comp.trim().replace(re[t.STAR],"")),replaceGTE0=(comp,options)=>(debug("replaceGTE0",comp,options),comp.trim().replace(re[options.includePrerelease?t.GTE0PRE:t.GTE0],"")),hyphenReplace=incPr=>($0,from,fM,fm,fp,fpr,fb,to,tM,tm,tp,tpr)=>(isX(fM)?from="":isX(fm)?from=`>=${fM}.0.0${incPr?"-0":""}`:isX(fp)?from=`>=${fM}.${fm}.0${incPr?"-0":""}`:fpr?from=`>=${from}`:from=`>=${from}${incPr?"-0":""}`,isX(tM)?to="":isX(tm)?to=`<${+tM+1}.0.0-0`:isX(tp)?to=`<${tM}.${+tm+1}.0-0`:tpr?to=`<=${tM}.${tm}.${tp}-${tpr}`:incPr?to=`<${tM}.${tm}.${+tp+1}-0`:to=`<=${to}`,`${from} ${to}`.trim()),testSet=(set,version,options)=>{for(let i=0;i<set.length;i++)if(!set[i].test(version))return!1;if(version.prerelease.length&&!options.includePrerelease){for(let i=0;i<set.length;i++)if(debug(set[i].semver),set[i].semver!==Comparator.ANY&&set[i].semver.prerelease.length>0){let allowed=set[i].semver;if(allowed.major===version.major&&allowed.minor===version.minor&&allowed.patch===version.patch)return!0}return!1}return!0}}});var require_comparator=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js"(exports,module){"use strict";var ANY=Symbol("SemVer ANY"),Comparator=class _Comparator{static get ANY(){return ANY}constructor(comp,options){if(options=parseOptions(options),comp instanceof _Comparator){if(comp.loose===!!options.loose)return comp;comp=comp.value}comp=comp.trim().split(/\s+/).join(" "),debug("comparator",comp,options),this.options=options,this.loose=!!options.loose,this.parse(comp),this.semver===ANY?this.value="":this.value=this.operator+this.semver.version,debug("comp",this)}parse(comp){let r=this.options.loose?re[t.COMPARATORLOOSE]:re[t.COMPARATOR],m=comp.match(r);if(!m)throw new TypeError(`Invalid comparator: ${comp}`);this.operator=m[1]!==void 0?m[1]:"",this.operator==="="&&(this.operator=""),m[2]?this.semver=new SemVer(m[2],this.options.loose):this.semver=ANY}toString(){return this.value}test(version){if(debug("Comparator.test",version,this.options.loose),this.semver===ANY||version===ANY)return!0;if(typeof version=="string")try{version=new SemVer(version,this.options)}catch{return!1}return cmp(version,this.operator,this.semver,this.options)}intersects(comp,options){if(!(comp instanceof _Comparator))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Range(comp.value,options).test(this.value):comp.operator===""?comp.value===""?!0:new Range(this.value,options).test(comp.semver):(options=parseOptions(options),options.includePrerelease&&(this.value==="<0.0.0-0"||comp.value==="<0.0.0-0")||!options.includePrerelease&&(this.value.startsWith("<0.0.0")||comp.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&comp.operator.startsWith(">")||this.operator.startsWith("<")&&comp.operator.startsWith("<")||this.semver.version===comp.semver.version&&this.operator.includes("=")&&comp.operator.includes("=")||cmp(this.semver,"<",comp.semver,options)&&this.operator.startsWith(">")&&comp.operator.startsWith("<")||cmp(this.semver,">",comp.semver,options)&&this.operator.startsWith("<")&&comp.operator.startsWith(">")))}};module.exports=Comparator;var parseOptions=require_parse_options(),{safeRe:re,t}=require_re(),cmp=require_cmp(),debug=require_debug(),SemVer=require_semver(),Range=require_range()}});var require_satisfies=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js"(exports,module){"use strict";var Range=require_range(),satisfies2=(version,range,options)=>{try{range=new Range(range,options)}catch{return!1}return range.test(version)};module.exports=satisfies2}});var require_to_comparators=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js"(exports,module){"use strict";var Range=require_range(),toComparators=(range,options)=>new Range(range,options).set.map(comp=>comp.map(c=>c.value).join(" ").trim().split(" "));module.exports=toComparators}});var require_max_satisfying=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js"(exports,module){"use strict";var SemVer=require_semver(),Range=require_range(),maxSatisfying2=(versions,range,options)=>{let max=null,maxSV=null,rangeObj=null;try{rangeObj=new Range(range,options)}catch{return null}return versions.forEach(v=>{rangeObj.test(v)&&(!max||maxSV.compare(v)===-1)&&(max=v,maxSV=new SemVer(max,options))}),max};module.exports=maxSatisfying2}});var require_min_satisfying=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js"(exports,module){"use strict";var SemVer=require_semver(),Range=require_range(),minSatisfying=(versions,range,options)=>{let min=null,minSV=null,rangeObj=null;try{rangeObj=new Range(range,options)}catch{return null}return versions.forEach(v=>{rangeObj.test(v)&&(!min||minSV.compare(v)===1)&&(min=v,minSV=new SemVer(min,options))}),min};module.exports=minSatisfying}});var require_min_version=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js"(exports,module){"use strict";var SemVer=require_semver(),Range=require_range(),gt=require_gt(),minVersion=(range,loose)=>{range=new Range(range,loose);let minver=new SemVer("0.0.0");if(range.test(minver)||(minver=new SemVer("0.0.0-0"),range.test(minver)))return minver;minver=null;for(let i=0;i<range.set.length;++i){let comparators=range.set[i],setMin=null;comparators.forEach(comparator=>{let compver=new SemVer(comparator.semver.version);switch(comparator.operator){case">":compver.prerelease.length===0?compver.patch++:compver.prerelease.push(0),compver.raw=compver.format();case"":case">=":(!setMin||gt(compver,setMin))&&(setMin=compver);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${comparator.operator}`)}}),setMin&&(!minver||gt(minver,setMin))&&(minver=setMin)}return minver&&range.test(minver)?minver:null};module.exports=minVersion}});var require_valid2=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js"(exports,module){"use strict";var Range=require_range(),validRange=(range,options)=>{try{return new Range(range,options).range||"*"}catch{return null}};module.exports=validRange}});var require_outside=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js"(exports,module){"use strict";var SemVer=require_semver(),Comparator=require_comparator(),{ANY}=Comparator,Range=require_range(),satisfies2=require_satisfies(),gt=require_gt(),lt=require_lt(),lte=require_lte(),gte=require_gte(),outside=(version,range,hilo,options)=>{version=new SemVer(version,options),range=new Range(range,options);let gtfn,ltefn,ltfn,comp,ecomp;switch(hilo){case">":gtfn=gt,ltefn=lte,ltfn=lt,comp=">",ecomp=">=";break;case"<":gtfn=lt,ltefn=gte,ltfn=gt,comp="<",ecomp="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies2(version,range,options))return!1;for(let i=0;i<range.set.length;++i){let comparators=range.set[i],high=null,low=null;if(comparators.forEach(comparator=>{comparator.semver===ANY&&(comparator=new Comparator(">=0.0.0")),high=high||comparator,low=low||comparator,gtfn(comparator.semver,high.semver,options)?high=comparator:ltfn(comparator.semver,low.semver,options)&&(low=comparator)}),high.operator===comp||high.operator===ecomp||(!low.operator||low.operator===comp)&&ltefn(version,low.semver))return!1;if(low.operator===ecomp&&ltfn(version,low.semver))return!1}return!0};module.exports=outside}});var require_gtr=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js"(exports,module){"use strict";var outside=require_outside(),gtr=(version,range,options)=>outside(version,range,">",options);module.exports=gtr}});var require_ltr=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js"(exports,module){"use strict";var outside=require_outside(),ltr=(version,range,options)=>outside(version,range,"<",options);module.exports=ltr}});var require_intersects=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js"(exports,module){"use strict";var Range=require_range(),intersects=(r1,r2,options)=>(r1=new Range(r1,options),r2=new Range(r2,options),r1.intersects(r2,options));module.exports=intersects}});var require_simplify=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js"(exports,module){"use strict";var satisfies2=require_satisfies(),compare4=require_compare();module.exports=(versions,range,options)=>{let set=[],first=null,prev=null,v=versions.sort((a,b)=>compare4(a,b,options));for(let version of v)satisfies2(version,range,options)?(prev=version,first||(first=version)):(prev&&set.push([first,prev]),prev=null,first=null);first&&set.push([first,null]);let ranges=[];for(let[min,max]of set)min===max?ranges.push(min):!max&&min===v[0]?ranges.push("*"):max?min===v[0]?ranges.push(`<=${max}`):ranges.push(`${min} - ${max}`):ranges.push(`>=${min}`);let simplified=ranges.join(" || "),original=typeof range.raw=="string"?range.raw:String(range);return simplified.length<original.length?simplified:range}}});var require_subset=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js"(exports,module){"use strict";var Range=require_range(),Comparator=require_comparator(),{ANY}=Comparator,satisfies2=require_satisfies(),compare4=require_compare(),subset=(sub,dom,options={})=>{if(sub===dom)return!0;sub=new Range(sub,options),dom=new Range(dom,options);let sawNonNull=!1;OUTER:for(let simpleSub of sub.set){for(let simpleDom of dom.set){let isSub=simpleSubset(simpleSub,simpleDom,options);if(sawNonNull=sawNonNull||isSub!==null,isSub)continue OUTER}if(sawNonNull)return!1}return!0},minimumVersionWithPreRelease=[new Comparator(">=0.0.0-0")],minimumVersion2=[new Comparator(">=0.0.0")],simpleSubset=(sub,dom,options)=>{if(sub===dom)return!0;if(sub.length===1&&sub[0].semver===ANY){if(dom.length===1&&dom[0].semver===ANY)return!0;options.includePrerelease?sub=minimumVersionWithPreRelease:sub=minimumVersion2}if(dom.length===1&&dom[0].semver===ANY){if(options.includePrerelease)return!0;dom=minimumVersion2}let eqSet=new Set,gt,lt;for(let c of sub)c.operator===">"||c.operator===">="?gt=higherGT(gt,c,options):c.operator==="<"||c.operator==="<="?lt=lowerLT(lt,c,options):eqSet.add(c.semver);if(eqSet.size>1)return null;let gtltComp;if(gt&&lt){if(gtltComp=compare4(gt.semver,lt.semver,options),gtltComp>0)return null;if(gtltComp===0&&(gt.operator!==">="||lt.operator!=="<="))return null}for(let eq of eqSet){if(gt&&!satisfies2(eq,String(gt),options)||lt&&!satisfies2(eq,String(lt),options))return null;for(let c of dom)if(!satisfies2(eq,String(c),options))return!1;return!0}let higher,lower,hasDomLT,hasDomGT,needDomLTPre=lt&&!options.includePrerelease&&lt.semver.prerelease.length?lt.semver:!1,needDomGTPre=gt&&!options.includePrerelease&&gt.semver.prerelease.length?gt.semver:!1;needDomLTPre&&needDomLTPre.prerelease.length===1&&lt.operator==="<"&&needDomLTPre.prerelease[0]===0&&(needDomLTPre=!1);for(let c of dom){if(hasDomGT=hasDomGT||c.operator===">"||c.operator===">=",hasDomLT=hasDomLT||c.operator==="<"||c.operator==="<=",gt){if(needDomGTPre&&c.semver.prerelease&&c.semver.prerelease.length&&c.semver.major===needDomGTPre.major&&c.semver.minor===needDomGTPre.minor&&c.semver.patch===needDomGTPre.patch&&(needDomGTPre=!1),c.operator===">"||c.operator===">="){if(higher=higherGT(gt,c,options),higher===c&&higher!==gt)return!1}else if(gt.operator===">="&&!c.test(gt.semver))return!1}if(lt){if(needDomLTPre&&c.semver.prerelease&&c.semver.prerelease.length&&c.semver.major===needDomLTPre.major&&c.semver.minor===needDomLTPre.minor&&c.semver.patch===needDomLTPre.patch&&(needDomLTPre=!1),c.operator==="<"||c.operator==="<="){if(lower=lowerLT(lt,c,options),lower===c&&lower!==lt)return!1}else if(lt.operator==="<="&&!c.test(lt.semver))return!1}if(!c.operator&&(lt||gt)&&gtltComp!==0)return!1}return!(gt&&hasDomLT&&!lt&&gtltComp!==0||lt&&hasDomGT&&!gt&&gtltComp!==0||needDomGTPre||needDomLTPre)},higherGT=(a,b,options)=>{if(!a)return b;let comp=compare4(a.semver,b.semver,options);return comp>0?a:comp<0||b.operator===">"&&a.operator===">="?b:a},lowerLT=(a,b,options)=>{if(!a)return b;let comp=compare4(a.semver,b.semver,options);return comp<0?a:comp>0||b.operator==="<"&&a.operator==="<="?b:a};module.exports=subset}});var require_semver2=__commonJS({"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js"(exports,module){"use strict";var internalRe=require_re(),constants=require_constants(),SemVer=require_semver(),identifiers=require_identifiers(),parse4=require_parse(),valid=require_valid(),clean=require_clean(),inc=require_inc(),diff=require_diff(),major=require_major(),minor=require_minor(),patch=require_patch(),prerelease=require_prerelease(),compare4=require_compare(),rcompare=require_rcompare(),compareLoose=require_compare_loose(),compareBuild=require_compare_build(),sort=require_sort(),rsort=require_rsort(),gt=require_gt(),lt=require_lt(),eq=require_eq(),neq=require_neq(),gte=require_gte(),lte=require_lte(),cmp=require_cmp(),coerce=require_coerce(),truncate=require_truncate(),Comparator=require_comparator(),Range=require_range(),satisfies2=require_satisfies(),toComparators=require_to_comparators(),maxSatisfying2=require_max_satisfying(),minSatisfying=require_min_satisfying(),minVersion=require_min_version(),validRange=require_valid2(),outside=require_outside(),gtr=require_gtr(),ltr=require_ltr(),intersects=require_intersects(),simplifyRange=require_simplify(),subset=require_subset();module.exports={parse:parse4,valid,clean,inc,diff,major,minor,patch,prerelease,compare:compare4,rcompare,compareLoose,compareBuild,sort,rsort,gt,lt,eq,neq,gte,lte,cmp,coerce,truncate,Comparator,Range,satisfies:satisfies2,toComparators,maxSatisfying:maxSatisfying2,minSatisfying,minVersion,validRange,outside,gtr,ltr,intersects,simplifyRange,subset,SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers}}});var require_identity=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/identity.js"(exports){"use strict";var ALIAS=Symbol.for("yaml.alias"),DOC=Symbol.for("yaml.document"),MAP=Symbol.for("yaml.map"),PAIR=Symbol.for("yaml.pair"),SCALAR=Symbol.for("yaml.scalar"),SEQ=Symbol.for("yaml.seq"),NODE_TYPE=Symbol.for("yaml.node.type"),isAlias=node=>!!node&&typeof node=="object"&&node[NODE_TYPE]===ALIAS,isDocument=node=>!!node&&typeof node=="object"&&node[NODE_TYPE]===DOC,isMap=node=>!!node&&typeof node=="object"&&node[NODE_TYPE]===MAP,isPair=node=>!!node&&typeof node=="object"&&node[NODE_TYPE]===PAIR,isScalar=node=>!!node&&typeof node=="object"&&node[NODE_TYPE]===SCALAR,isSeq=node=>!!node&&typeof node=="object"&&node[NODE_TYPE]===SEQ;function isCollection(node){if(node&&typeof node=="object")switch(node[NODE_TYPE]){case MAP:case SEQ:return!0}return!1}function isNode(node){if(node&&typeof node=="object")switch(node[NODE_TYPE]){case ALIAS:case MAP:case SCALAR:case SEQ:return!0}return!1}var hasAnchor=node=>(isScalar(node)||isCollection(node))&&!!node.anchor;exports.ALIAS=ALIAS;exports.DOC=DOC;exports.MAP=MAP;exports.NODE_TYPE=NODE_TYPE;exports.PAIR=PAIR;exports.SCALAR=SCALAR;exports.SEQ=SEQ;exports.hasAnchor=hasAnchor;exports.isAlias=isAlias;exports.isCollection=isCollection;exports.isDocument=isDocument;exports.isMap=isMap;exports.isNode=isNode;exports.isPair=isPair;exports.isScalar=isScalar;exports.isSeq=isSeq}});var require_visit=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/visit.js"(exports){"use strict";var identity=require_identity(),BREAK=Symbol("break visit"),SKIP=Symbol("skip children"),REMOVE=Symbol("remove node");function visit(node,visitor){let visitor_=initVisitor(visitor);identity.isDocument(node)?visit_(null,node.contents,visitor_,Object.freeze([node]))===REMOVE&&(node.contents=null):visit_(null,node,visitor_,Object.freeze([]))}visit.BREAK=BREAK;visit.SKIP=SKIP;visit.REMOVE=REMOVE;function visit_(key2,node,visitor,path){let ctrl=callVisitor(key2,node,visitor,path);if(identity.isNode(ctrl)||identity.isPair(ctrl))return replaceNode(key2,path,ctrl),visit_(key2,ctrl,visitor,path);if(typeof ctrl!="symbol"){if(identity.isCollection(node)){path=Object.freeze(path.concat(node));for(let i=0;i<node.items.length;++i){let ci=visit_(i,node.items[i],visitor,path);if(typeof ci=="number")i=ci-1;else{if(ci===BREAK)return BREAK;ci===REMOVE&&(node.items.splice(i,1),i-=1)}}}else if(identity.isPair(node)){path=Object.freeze(path.concat(node));let ck=visit_("key",node.key,visitor,path);if(ck===BREAK)return BREAK;ck===REMOVE&&(node.key=null);let cv=visit_("value",node.value,visitor,path);if(cv===BREAK)return BREAK;cv===REMOVE&&(node.value=null)}}return ctrl}async function visitAsync(node,visitor){let visitor_=initVisitor(visitor);identity.isDocument(node)?await visitAsync_(null,node.contents,visitor_,Object.freeze([node]))===REMOVE&&(node.contents=null):await visitAsync_(null,node,visitor_,Object.freeze([]))}visitAsync.BREAK=BREAK;visitAsync.SKIP=SKIP;visitAsync.REMOVE=REMOVE;async function visitAsync_(key2,node,visitor,path){let ctrl=await callVisitor(key2,node,visitor,path);if(identity.isNode(ctrl)||identity.isPair(ctrl))return replaceNode(key2,path,ctrl),visitAsync_(key2,ctrl,visitor,path);if(typeof ctrl!="symbol"){if(identity.isCollection(node)){path=Object.freeze(path.concat(node));for(let i=0;i<node.items.length;++i){let ci=await visitAsync_(i,node.items[i],visitor,path);if(typeof ci=="number")i=ci-1;else{if(ci===BREAK)return BREAK;ci===REMOVE&&(node.items.splice(i,1),i-=1)}}}else if(identity.isPair(node)){path=Object.freeze(path.concat(node));let ck=await visitAsync_("key",node.key,visitor,path);if(ck===BREAK)return BREAK;ck===REMOVE&&(node.key=null);let cv=await visitAsync_("value",node.value,visitor,path);if(cv===BREAK)return BREAK;cv===REMOVE&&(node.value=null)}}return ctrl}function initVisitor(visitor){return typeof visitor=="object"&&(visitor.Collection||visitor.Node||visitor.Value)?Object.assign({Alias:visitor.Node,Map:visitor.Node,Scalar:visitor.Node,Seq:visitor.Node},visitor.Value&&{Map:visitor.Value,Scalar:visitor.Value,Seq:visitor.Value},visitor.Collection&&{Map:visitor.Collection,Seq:visitor.Collection},visitor):visitor}function callVisitor(key2,node,visitor,path){if(typeof visitor=="function")return visitor(key2,node,path);if(identity.isMap(node))return visitor.Map?.(key2,node,path);if(identity.isSeq(node))return visitor.Seq?.(key2,node,path);if(identity.isPair(node))return visitor.Pair?.(key2,node,path);if(identity.isScalar(node))return visitor.Scalar?.(key2,node,path);if(identity.isAlias(node))return visitor.Alias?.(key2,node,path)}function replaceNode(key2,path,node){let parent=path[path.length-1];if(identity.isCollection(parent))parent.items[key2]=node;else if(identity.isPair(parent))key2==="key"?parent.key=node:parent.value=node;else if(identity.isDocument(parent))parent.contents=node;else{let pt=identity.isAlias(parent)?"alias":"scalar";throw new Error(`Cannot replace node with ${pt} parent`)}}exports.visit=visit;exports.visitAsync=visitAsync}});var require_directives=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/directives.js"(exports){"use strict";var identity=require_identity(),visit=require_visit(),escapeChars={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},escapeTagName=tn=>tn.replace(/[!,[\]{}]/g,ch=>escapeChars[ch]),Directives=class _Directives{constructor(yaml,tags){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},_Directives.defaultYaml,yaml),this.tags=Object.assign({},_Directives.defaultTags,tags)}clone(){let copy=new _Directives(this.yaml,this.tags);return copy.docStart=this.docStart,copy}atDocument(){let res=new _Directives(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:_Directives.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},_Directives.defaultTags);break}return res}add(line,onError){this.atNextDocument&&(this.yaml={explicit:_Directives.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},_Directives.defaultTags),this.atNextDocument=!1);let parts=line.trim().split(/[ \t]+/),name=parts.shift();switch(name){case"%TAG":{if(parts.length!==2&&(onError(0,"%TAG directive should contain exactly two parts"),parts.length<2))return!1;let[handle,prefix]=parts;return this.tags[handle]=prefix,!0}case"%YAML":{if(this.yaml.explicit=!0,parts.length!==1)return onError(0,"%YAML directive should contain exactly one part"),!1;let[version]=parts;if(version==="1.1"||version==="1.2")return this.yaml.version=version,!0;{let isValid=/^\d+\.\d+$/.test(version);return onError(6,`Unsupported YAML version ${version}`,isValid),!1}}default:return onError(0,`Unknown directive ${name}`,!0),!1}}tagName(source,onError){if(source==="!")return"!";if(source[0]!=="!")return onError(`Not a valid tag: ${source}`),null;if(source[1]==="<"){let verbatim=source.slice(2,-1);return verbatim==="!"||verbatim==="!!"?(onError(`Verbatim tags aren't resolved, so ${source} is invalid.`),null):(source[source.length-1]!==">"&&onError("Verbatim tags must end with a >"),verbatim)}let[,handle,suffix]=source.match(/^(.*!)([^!]*)$/s);suffix||onError(`The ${source} tag has no suffix`);let prefix=this.tags[handle];if(prefix)try{return prefix+decodeURIComponent(suffix)}catch(error){return onError(String(error)),null}return handle==="!"?source:(onError(`Could not resolve tag: ${source}`),null)}tagString(tag){for(let[handle,prefix]of Object.entries(this.tags))if(tag.startsWith(prefix))return handle+escapeTagName(tag.substring(prefix.length));return tag[0]==="!"?tag:`!<${tag}>`}toString(doc){let lines=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],tagEntries=Object.entries(this.tags),tagNames;if(doc&&tagEntries.length>0&&identity.isNode(doc.contents)){let tags={};visit.visit(doc.contents,(_key,node)=>{identity.isNode(node)&&node.tag&&(tags[node.tag]=!0)}),tagNames=Object.keys(tags)}else tagNames=[];for(let[handle,prefix]of tagEntries)handle==="!!"&&prefix==="tag:yaml.org,2002:"||(!doc||tagNames.some(tn=>tn.startsWith(prefix)))&&lines.push(`%TAG ${handle} ${prefix}`);return lines.join(`
7
+ `)}};Directives.defaultYaml={explicit:!1,version:"1.2"};Directives.defaultTags={"!!":"tag:yaml.org,2002:"};exports.Directives=Directives}});var require_anchors=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/anchors.js"(exports){"use strict";var identity=require_identity(),visit=require_visit();function anchorIsValid(anchor){if(/[\x00-\x19\s,[\]{}]/.test(anchor)){let msg=`Anchor must not contain whitespace or control characters: ${JSON.stringify(anchor)}`;throw new Error(msg)}return!0}function anchorNames(root){let anchors=new Set;return visit.visit(root,{Value(_key,node){node.anchor&&anchors.add(node.anchor)}}),anchors}function findNewAnchor(prefix,exclude){for(let i=1;;++i){let name=`${prefix}${i}`;if(!exclude.has(name))return name}}function createNodeAnchors(doc,prefix){let aliasObjects=[],sourceObjects=new Map,prevAnchors=null;return{onAnchor:source=>{aliasObjects.push(source),prevAnchors??(prevAnchors=anchorNames(doc));let anchor=findNewAnchor(prefix,prevAnchors);return prevAnchors.add(anchor),anchor},setAnchors:()=>{for(let source of aliasObjects){let ref=sourceObjects.get(source);if(typeof ref=="object"&&ref.anchor&&(identity.isScalar(ref.node)||identity.isCollection(ref.node)))ref.node.anchor=ref.anchor;else{let error=new Error("Failed to resolve repeated object (this should not happen)");throw error.source=source,error}}},sourceObjects}}exports.anchorIsValid=anchorIsValid;exports.anchorNames=anchorNames;exports.createNodeAnchors=createNodeAnchors;exports.findNewAnchor=findNewAnchor}});var require_applyReviver=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/applyReviver.js"(exports){"use strict";function applyReviver(reviver,obj,key2,val){if(val&&typeof val=="object")if(Array.isArray(val))for(let i=0,len=val.length;i<len;++i){let v0=val[i],v1=applyReviver(reviver,val,String(i),v0);v1===void 0?delete val[i]:v1!==v0&&(val[i]=v1)}else if(val instanceof Map)for(let k of Array.from(val.keys())){let v0=val.get(k),v1=applyReviver(reviver,val,k,v0);v1===void 0?val.delete(k):v1!==v0&&val.set(k,v1)}else if(val instanceof Set)for(let v0 of Array.from(val)){let v1=applyReviver(reviver,val,v0,v0);v1===void 0?val.delete(v0):v1!==v0&&(val.delete(v0),val.add(v1))}else for(let[k,v0]of Object.entries(val)){let v1=applyReviver(reviver,val,k,v0);v1===void 0?delete val[k]:v1!==v0&&(val[k]=v1)}return reviver.call(obj,key2,val)}exports.applyReviver=applyReviver}});var require_toJS=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/toJS.js"(exports){"use strict";var identity=require_identity();function toJS(value,arg,ctx){if(Array.isArray(value))return value.map((v,i)=>toJS(v,String(i),ctx));if(value&&typeof value.toJSON=="function"){if(!ctx||!identity.hasAnchor(value))return value.toJSON(arg,ctx);let data={aliasCount:0,count:1,res:void 0};ctx.anchors.set(value,data),ctx.onCreate=res2=>{data.res=res2,delete ctx.onCreate};let res=value.toJSON(arg,ctx);return ctx.onCreate&&ctx.onCreate(res),res}return typeof value=="bigint"&&!ctx?.keep?Number(value):value}exports.toJS=toJS}});var require_Node=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Node.js"(exports){"use strict";var applyReviver=require_applyReviver(),identity=require_identity(),toJS=require_toJS(),NodeBase=class{constructor(type){Object.defineProperty(this,identity.NODE_TYPE,{value:type})}clone(){let copy=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(copy.range=this.range.slice()),copy}toJS(doc,{mapAsMap,maxAliasCount,onAnchor,reviver}={}){if(!identity.isDocument(doc))throw new TypeError("A document argument is required");let ctx={anchors:new Map,doc,keep:!0,mapAsMap:mapAsMap===!0,mapKeyWarned:!1,maxAliasCount:typeof maxAliasCount=="number"?maxAliasCount:100},res=toJS.toJS(this,"",ctx);if(typeof onAnchor=="function")for(let{count:count3,res:res2}of ctx.anchors.values())onAnchor(res2,count3);return typeof reviver=="function"?applyReviver.applyReviver(reviver,{"":res},"",res):res}};exports.NodeBase=NodeBase}});var require_Alias=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Alias.js"(exports){"use strict";var anchors=require_anchors(),visit=require_visit(),identity=require_identity(),Node8=require_Node(),toJS=require_toJS(),Alias=class extends Node8.NodeBase{constructor(source){super(identity.ALIAS),this.source=source,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(doc,ctx){if(ctx?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let nodes;ctx?.aliasResolveCache?nodes=ctx.aliasResolveCache:(nodes=[],visit.visit(doc,{Node:(_key,node)=>{(identity.isAlias(node)||identity.hasAnchor(node))&&nodes.push(node)}}),ctx&&(ctx.aliasResolveCache=nodes));let found;for(let node of nodes){if(node===this)break;node.anchor===this.source&&(found=node)}if(found&&ctx){let{anchors:anchors2,doc:doc2,maxAliasCount}=ctx,data=anchors2.get(found);if(data||(toJS.toJS(found,null,ctx),data=anchors2.get(found)),data?.res===void 0){let msg="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(msg)}if(maxAliasCount>=0&&(data.count+=1,data.aliasCount===0&&(data.aliasCount=getAliasCount(doc2,found,anchors2)),data.count*data.aliasCount>maxAliasCount)){let msg="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(msg)}}return found}toJSON(_arg,ctx){if(!ctx)return{source:this.source};let source=this.resolve(ctx.doc,ctx);if(!source){let msg=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(msg)}return ctx.anchors.get(source).res}toString(ctx,_onComment,_onChompKeep){let src=`*${this.source}`;if(ctx){if(anchors.anchorIsValid(this.source),ctx.options.verifyAliasOrder&&!ctx.anchors.has(this.source)){let msg=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(msg)}if(ctx.implicitKey)return`${src} `}return src}};function getAliasCount(doc,node,anchors2){if(identity.isAlias(node)){let source=node.resolve(doc),anchor=anchors2&&source&&anchors2.get(source);return anchor?anchor.count*anchor.aliasCount:0}else if(identity.isCollection(node)){let count3=0;for(let item of node.items){let c=getAliasCount(doc,item,anchors2);c>count3&&(count3=c)}return count3}else if(identity.isPair(node)){let kc=getAliasCount(doc,node.key,anchors2),vc=getAliasCount(doc,node.value,anchors2);return Math.max(kc,vc)}return 1}exports.Alias=Alias}});var require_Scalar=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Scalar.js"(exports){"use strict";var identity=require_identity(),Node8=require_Node(),toJS=require_toJS(),isScalarValue=value=>!value||typeof value!="function"&&typeof value!="object",Scalar=class extends Node8.NodeBase{constructor(value){super(identity.SCALAR),this.value=value}toJSON(arg,ctx){return ctx?.keep?this.value:toJS.toJS(this.value,arg,ctx)}toString(){return String(this.value)}};Scalar.BLOCK_FOLDED="BLOCK_FOLDED";Scalar.BLOCK_LITERAL="BLOCK_LITERAL";Scalar.PLAIN="PLAIN";Scalar.QUOTE_DOUBLE="QUOTE_DOUBLE";Scalar.QUOTE_SINGLE="QUOTE_SINGLE";exports.Scalar=Scalar;exports.isScalarValue=isScalarValue}});var require_createNode=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/createNode.js"(exports){"use strict";var Alias=require_Alias(),identity=require_identity(),Scalar=require_Scalar(),defaultTagPrefix="tag:yaml.org,2002:";function findTagObject(value,tagName,tags){if(tagName){let match2=tags.filter(t=>t.tag===tagName),tagObj=match2.find(t=>!t.format)??match2[0];if(!tagObj)throw new Error(`Tag ${tagName} not found`);return tagObj}return tags.find(t=>t.identify?.(value)&&!t.format)}function createNode(value,tagName,ctx){if(identity.isDocument(value)&&(value=value.contents),identity.isNode(value))return value;if(identity.isPair(value)){let map=ctx.schema[identity.MAP].createNode?.(ctx.schema,null,ctx);return map.items.push(value),map}(value instanceof String||value instanceof Number||value instanceof Boolean||typeof BigInt<"u"&&value instanceof BigInt)&&(value=value.valueOf());let{aliasDuplicateObjects,onAnchor,onTagObj,schema,sourceObjects}=ctx,ref;if(aliasDuplicateObjects&&value&&typeof value=="object"){if(ref=sourceObjects.get(value),ref)return ref.anchor??(ref.anchor=onAnchor(value)),new Alias.Alias(ref.anchor);ref={anchor:null,node:null},sourceObjects.set(value,ref)}tagName?.startsWith("!!")&&(tagName=defaultTagPrefix+tagName.slice(2));let tagObj=findTagObject(value,tagName,schema.tags);if(!tagObj){if(value&&typeof value.toJSON=="function"&&(value=value.toJSON()),!value||typeof value!="object"){let node2=new Scalar.Scalar(value);return ref&&(ref.node=node2),node2}tagObj=value instanceof Map?schema[identity.MAP]:Symbol.iterator in Object(value)?schema[identity.SEQ]:schema[identity.MAP]}onTagObj&&(onTagObj(tagObj),delete ctx.onTagObj);let node=tagObj?.createNode?tagObj.createNode(ctx.schema,value,ctx):typeof tagObj?.nodeClass?.from=="function"?tagObj.nodeClass.from(ctx.schema,value,ctx):new Scalar.Scalar(value);return tagName?node.tag=tagName:tagObj.default||(node.tag=tagObj.tag),ref&&(ref.node=node),node}exports.createNode=createNode}});var require_Collection=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Collection.js"(exports){"use strict";var createNode=require_createNode(),identity=require_identity(),Node8=require_Node();function collectionFromPath(schema,path,value){let v=value;for(let i=path.length-1;i>=0;--i){let k=path[i];if(typeof k=="number"&&Number.isInteger(k)&&k>=0){let a=[];a[k]=v,v=a}else v=new Map([[k,v]])}return createNode.createNode(v,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema,sourceObjects:new Map})}var isEmptyPath=path=>path==null||typeof path=="object"&&!!path[Symbol.iterator]().next().done,Collection=class extends Node8.NodeBase{constructor(type,schema){super(type),Object.defineProperty(this,"schema",{value:schema,configurable:!0,enumerable:!1,writable:!0})}clone(schema){let copy=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return schema&&(copy.schema=schema),copy.items=copy.items.map(it=>identity.isNode(it)||identity.isPair(it)?it.clone(schema):it),this.range&&(copy.range=this.range.slice()),copy}addIn(path,value){if(isEmptyPath(path))this.add(value);else{let[key2,...rest]=path,node=this.get(key2,!0);if(identity.isCollection(node))node.addIn(rest,value);else if(node===void 0&&this.schema)this.set(key2,collectionFromPath(this.schema,rest,value));else throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`)}}deleteIn(path){let[key2,...rest]=path;if(rest.length===0)return this.delete(key2);let node=this.get(key2,!0);if(identity.isCollection(node))return node.deleteIn(rest);throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`)}getIn(path,keepScalar){let[key2,...rest]=path,node=this.get(key2,!0);return rest.length===0?!keepScalar&&identity.isScalar(node)?node.value:node:identity.isCollection(node)?node.getIn(rest,keepScalar):void 0}hasAllNullValues(allowScalar){return this.items.every(node=>{if(!identity.isPair(node))return!1;let n=node.value;return n==null||allowScalar&&identity.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(path){let[key2,...rest]=path;if(rest.length===0)return this.has(key2);let node=this.get(key2,!0);return identity.isCollection(node)?node.hasIn(rest):!1}setIn(path,value){let[key2,...rest]=path;if(rest.length===0)this.set(key2,value);else{let node=this.get(key2,!0);if(identity.isCollection(node))node.setIn(rest,value);else if(node===void 0&&this.schema)this.set(key2,collectionFromPath(this.schema,rest,value));else throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`)}}};exports.Collection=Collection;exports.collectionFromPath=collectionFromPath;exports.isEmptyPath=isEmptyPath}});var require_stringifyComment=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyComment.js"(exports){"use strict";var stringifyComment=str=>str.replace(/^(?!$)(?: $)?/gm,"#");function indentComment(comment,indent){return/^\n+$/.test(comment)?comment.substring(1):indent?comment.replace(/^(?! *$)/gm,indent):comment}var lineComment=(str,indent,comment)=>str.endsWith(`
8
+ `)?indentComment(comment,indent):comment.includes(`
9
+ `)?`
10
+ `+indentComment(comment,indent):(str.endsWith(" ")?"":" ")+comment;exports.indentComment=indentComment;exports.lineComment=lineComment;exports.stringifyComment=stringifyComment}});var require_foldFlowLines=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/foldFlowLines.js"(exports){"use strict";var FOLD_FLOW="flow",FOLD_BLOCK="block",FOLD_QUOTED="quoted";function foldFlowLines(text,indent,mode="flow",{indentAtStart,lineWidth=80,minContentWidth=20,onFold,onOverflow}={}){if(!lineWidth||lineWidth<0)return text;lineWidth<minContentWidth&&(minContentWidth=0);let endStep=Math.max(1+minContentWidth,1+lineWidth-indent.length);if(text.length<=endStep)return text;let folds=[],escapedFolds={},end=lineWidth-indent.length;typeof indentAtStart=="number"&&(indentAtStart>lineWidth-Math.max(2,minContentWidth)?folds.push(0):end=lineWidth-indentAtStart);let split2,prev,overflow=!1,i=-1,escStart=-1,escEnd=-1;mode===FOLD_BLOCK&&(i=consumeMoreIndentedLines(text,i,indent.length),i!==-1&&(end=i+endStep));for(let ch;ch=text[i+=1];){if(mode===FOLD_QUOTED&&ch==="\\"){switch(escStart=i,text[i+1]){case"x":i+=3;break;case"u":i+=5;break;case"U":i+=9;break;default:i+=1}escEnd=i}if(ch===`
11
+ `)mode===FOLD_BLOCK&&(i=consumeMoreIndentedLines(text,i,indent.length)),end=i+indent.length+endStep,split2=void 0;else{if(ch===" "&&prev&&prev!==" "&&prev!==`
12
+ `&&prev!==" "){let next=text[i+1];next&&next!==" "&&next!==`
13
+ `&&next!==" "&&(split2=i)}if(i>=end)if(split2)folds.push(split2),end=split2+endStep,split2=void 0;else if(mode===FOLD_QUOTED){for(;prev===" "||prev===" ";)prev=ch,ch=text[i+=1],overflow=!0;let j=i>escEnd+1?i-2:escStart-1;if(escapedFolds[j])return text;folds.push(j),escapedFolds[j]=!0,end=j+endStep,split2=void 0}else overflow=!0}prev=ch}if(overflow&&onOverflow&&onOverflow(),folds.length===0)return text;onFold&&onFold();let res=text.slice(0,folds[0]);for(let i2=0;i2<folds.length;++i2){let fold=folds[i2],end2=folds[i2+1]||text.length;fold===0?res=`
14
+ ${indent}${text.slice(0,end2)}`:(mode===FOLD_QUOTED&&escapedFolds[fold]&&(res+=`${text[fold]}\\`),res+=`
15
+ ${indent}${text.slice(fold+1,end2)}`)}return res}function consumeMoreIndentedLines(text,i,indent){let end=i,start=i+1,ch=text[start];for(;ch===" "||ch===" ";)if(i<start+indent)ch=text[++i];else{do ch=text[++i];while(ch&&ch!==`
16
+ `);end=i,start=i+1,ch=text[start]}return end}exports.FOLD_BLOCK=FOLD_BLOCK;exports.FOLD_FLOW=FOLD_FLOW;exports.FOLD_QUOTED=FOLD_QUOTED;exports.foldFlowLines=foldFlowLines}});var require_stringifyString=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyString.js"(exports){"use strict";var Scalar=require_Scalar(),foldFlowLines=require_foldFlowLines(),getFoldOptions=(ctx,isBlock)=>({indentAtStart:isBlock?ctx.indent.length:ctx.indentAtStart,lineWidth:ctx.options.lineWidth,minContentWidth:ctx.options.minContentWidth}),containsDocumentMarker=str=>/^(%|---|\.\.\.)/m.test(str);function lineLengthOverLimit(str,lineWidth,indentLength){if(!lineWidth||lineWidth<0)return!1;let limit=lineWidth-indentLength,strLen=str.length;if(strLen<=limit)return!1;for(let i=0,start=0;i<strLen;++i)if(str[i]===`
17
+ `){if(i-start>limit)return!0;if(start=i+1,strLen-start<=limit)return!1}return!0}function doubleQuotedString(value,ctx){let json=JSON.stringify(value);if(ctx.options.doubleQuotedAsJSON)return json;let{implicitKey}=ctx,minMultiLineLength=ctx.options.doubleQuotedMinMultiLineLength,indent=ctx.indent||(containsDocumentMarker(value)?" ":""),str="",start=0;for(let i=0,ch=json[i];ch;ch=json[++i])if(ch===" "&&json[i+1]==="\\"&&json[i+2]==="n"&&(str+=json.slice(start,i)+"\\ ",i+=1,start=i,ch="\\"),ch==="\\")switch(json[i+1]){case"u":{str+=json.slice(start,i);let code=json.substr(i+2,4);switch(code){case"0000":str+="\\0";break;case"0007":str+="\\a";break;case"000b":str+="\\v";break;case"001b":str+="\\e";break;case"0085":str+="\\N";break;case"00a0":str+="\\_";break;case"2028":str+="\\L";break;case"2029":str+="\\P";break;default:code.substr(0,2)==="00"?str+="\\x"+code.substr(2):str+=json.substr(i,6)}i+=5,start=i+1}break;case"n":if(implicitKey||json[i+2]==='"'||json.length<minMultiLineLength)i+=1;else{for(str+=json.slice(start,i)+`
18
+
19
+ `;json[i+2]==="\\"&&json[i+3]==="n"&&json[i+4]!=='"';)str+=`
20
+ `,i+=2;str+=indent,json[i+2]===" "&&(str+="\\"),i+=1,start=i+1}break;default:i+=1}return str=start?str+json.slice(start):json,implicitKey?str:foldFlowLines.foldFlowLines(str,indent,foldFlowLines.FOLD_QUOTED,getFoldOptions(ctx,!1))}function singleQuotedString(value,ctx){if(ctx.options.singleQuote===!1||ctx.implicitKey&&value.includes(`
21
+ `)||/[ \t]\n|\n[ \t]/.test(value))return doubleQuotedString(value,ctx);let indent=ctx.indent||(containsDocumentMarker(value)?" ":""),res="'"+value.replace(/'/g,"''").replace(/\n+/g,`$&
22
+ ${indent}`)+"'";return ctx.implicitKey?res:foldFlowLines.foldFlowLines(res,indent,foldFlowLines.FOLD_FLOW,getFoldOptions(ctx,!1))}function quotedString(value,ctx){let{singleQuote}=ctx.options,qs;if(singleQuote===!1)qs=doubleQuotedString;else{let hasDouble=value.includes('"'),hasSingle=value.includes("'");hasDouble&&!hasSingle?qs=singleQuotedString:hasSingle&&!hasDouble?qs=doubleQuotedString:qs=singleQuote?singleQuotedString:doubleQuotedString}return qs(value,ctx)}var blockEndNewlines;try{blockEndNewlines=new RegExp(`(^|(?<!
23
+ ))
24
+ +(?!
25
+ |$)`,"g")}catch{blockEndNewlines=/\n+(?!\n|$)/g}function blockString({comment,type,value},ctx,onComment,onChompKeep){let{blockQuote,commentString,lineWidth}=ctx.options;if(!blockQuote||/\n[\t ]+$/.test(value))return quotedString(value,ctx);let indent=ctx.indent||(ctx.forceBlockIndent||containsDocumentMarker(value)?" ":""),literal=blockQuote==="literal"?!0:blockQuote==="folded"||type===Scalar.Scalar.BLOCK_FOLDED?!1:type===Scalar.Scalar.BLOCK_LITERAL?!0:!lineLengthOverLimit(value,lineWidth,indent.length);if(!value)return literal?`|
26
+ `:`>
27
+ `;let chomp,endStart;for(endStart=value.length;endStart>0;--endStart){let ch=value[endStart-1];if(ch!==`
28
+ `&&ch!==" "&&ch!==" ")break}let end=value.substring(endStart),endNlPos=end.indexOf(`
29
+ `);endNlPos===-1?chomp="-":value===end||endNlPos!==end.length-1?(chomp="+",onChompKeep&&onChompKeep()):chomp="",end&&(value=value.slice(0,-end.length),end[end.length-1]===`
30
+ `&&(end=end.slice(0,-1)),end=end.replace(blockEndNewlines,`$&${indent}`));let startWithSpace=!1,startEnd,startNlPos=-1;for(startEnd=0;startEnd<value.length;++startEnd){let ch=value[startEnd];if(ch===" ")startWithSpace=!0;else if(ch===`
31
+ `)startNlPos=startEnd;else break}let start=value.substring(0,startNlPos<startEnd?startNlPos+1:startEnd);start&&(value=value.substring(start.length),start=start.replace(/\n+/g,`$&${indent}`));let header=(startWithSpace?indent?"2":"1":"")+chomp;if(comment&&(header+=" "+commentString(comment.replace(/ ?[\r\n]+/g," ")),onComment&&onComment()),!literal){let foldedValue=value.replace(/\n+/g,`
32
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${indent}`),literalFallback=!1,foldOptions=getFoldOptions(ctx,!0);blockQuote!=="folded"&&type!==Scalar.Scalar.BLOCK_FOLDED&&(foldOptions.onOverflow=()=>{literalFallback=!0});let body=foldFlowLines.foldFlowLines(`${start}${foldedValue}${end}`,indent,foldFlowLines.FOLD_BLOCK,foldOptions);if(!literalFallback)return`>${header}
33
+ ${indent}${body}`}return value=value.replace(/\n+/g,`$&${indent}`),`|${header}
34
+ ${indent}${start}${value}${end}`}function plainString(item,ctx,onComment,onChompKeep){let{type,value}=item,{actualString,implicitKey,indent,indentStep,inFlow}=ctx;if(implicitKey&&value.includes(`
35
+ `)||inFlow&&/[[\]{},]/.test(value))return quotedString(value,ctx);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value))return implicitKey||inFlow||!value.includes(`
36
+ `)?quotedString(value,ctx):blockString(item,ctx,onComment,onChompKeep);if(!implicitKey&&!inFlow&&type!==Scalar.Scalar.PLAIN&&value.includes(`
37
+ `))return blockString(item,ctx,onComment,onChompKeep);if(containsDocumentMarker(value)){if(indent==="")return ctx.forceBlockIndent=!0,blockString(item,ctx,onComment,onChompKeep);if(implicitKey&&indent===indentStep)return quotedString(value,ctx)}let str=value.replace(/\n+/g,`$&
38
+ ${indent}`);if(actualString){let test=tag=>tag.default&&tag.tag!=="tag:yaml.org,2002:str"&&tag.test?.test(str),{compat,tags}=ctx.doc.schema;if(tags.some(test)||compat?.some(test))return quotedString(value,ctx)}return implicitKey?str:foldFlowLines.foldFlowLines(str,indent,foldFlowLines.FOLD_FLOW,getFoldOptions(ctx,!1))}function stringifyString(item,ctx,onComment,onChompKeep){let{implicitKey,inFlow}=ctx,ss=typeof item.value=="string"?item:Object.assign({},item,{value:String(item.value)}),{type}=item;type!==Scalar.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value)&&(type=Scalar.Scalar.QUOTE_DOUBLE);let _stringify=_type=>{switch(_type){case Scalar.Scalar.BLOCK_FOLDED:case Scalar.Scalar.BLOCK_LITERAL:return implicitKey||inFlow?quotedString(ss.value,ctx):blockString(ss,ctx,onComment,onChompKeep);case Scalar.Scalar.QUOTE_DOUBLE:return doubleQuotedString(ss.value,ctx);case Scalar.Scalar.QUOTE_SINGLE:return singleQuotedString(ss.value,ctx);case Scalar.Scalar.PLAIN:return plainString(ss,ctx,onComment,onChompKeep);default:return null}},res=_stringify(type);if(res===null){let{defaultKeyType,defaultStringType}=ctx.options,t=implicitKey&&defaultKeyType||defaultStringType;if(res=_stringify(t),res===null)throw new Error(`Unsupported default string type ${t}`)}return res}exports.stringifyString=stringifyString}});var require_stringify=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringify.js"(exports){"use strict";var anchors=require_anchors(),identity=require_identity(),stringifyComment=require_stringifyComment(),stringifyString=require_stringifyString();function createStringifyContext(doc,options){let opt=Object.assign({blockQuote:!0,commentString:stringifyComment.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},doc.schema.toStringOptions,options),inFlow;switch(opt.collectionStyle){case"block":inFlow=!1;break;case"flow":inFlow=!0;break;default:inFlow=null}return{anchors:new Set,doc,flowCollectionPadding:opt.flowCollectionPadding?" ":"",indent:"",indentStep:typeof opt.indent=="number"?" ".repeat(opt.indent):" ",inFlow,options:opt}}function getTagObject(tags,item){if(item.tag){let match2=tags.filter(t=>t.tag===item.tag);if(match2.length>0)return match2.find(t=>t.format===item.format)??match2[0]}let tagObj,obj;if(identity.isScalar(item)){obj=item.value;let match2=tags.filter(t=>t.identify?.(obj));if(match2.length>1){let testMatch=match2.filter(t=>t.test);testMatch.length>0&&(match2=testMatch)}tagObj=match2.find(t=>t.format===item.format)??match2.find(t=>!t.format)}else obj=item,tagObj=tags.find(t=>t.nodeClass&&obj instanceof t.nodeClass);if(!tagObj){let name=obj?.constructor?.name??(obj===null?"null":typeof obj);throw new Error(`Tag not resolved for ${name} value`)}return tagObj}function stringifyProps(node,tagObj,{anchors:anchors$1,doc}){if(!doc.directives)return"";let props=[],anchor=(identity.isScalar(node)||identity.isCollection(node))&&node.anchor;anchor&&anchors.anchorIsValid(anchor)&&(anchors$1.add(anchor),props.push(`&${anchor}`));let tag=node.tag??(tagObj.default?null:tagObj.tag);return tag&&props.push(doc.directives.tagString(tag)),props.join(" ")}function stringify(item,ctx,onComment,onChompKeep){if(identity.isPair(item))return item.toString(ctx,onComment,onChompKeep);if(identity.isAlias(item)){if(ctx.doc.directives)return item.toString(ctx);if(ctx.resolvedAliases?.has(item))throw new TypeError("Cannot stringify circular structure without alias nodes");ctx.resolvedAliases?ctx.resolvedAliases.add(item):ctx.resolvedAliases=new Set([item]),item=item.resolve(ctx.doc)}let tagObj,node=identity.isNode(item)?item:ctx.doc.createNode(item,{onTagObj:o=>tagObj=o});tagObj??(tagObj=getTagObject(ctx.doc.schema.tags,node));let props=stringifyProps(node,tagObj,ctx);props.length>0&&(ctx.indentAtStart=(ctx.indentAtStart??0)+props.length+1);let str=typeof tagObj.stringify=="function"?tagObj.stringify(node,ctx,onComment,onChompKeep):identity.isScalar(node)?stringifyString.stringifyString(node,ctx,onComment,onChompKeep):node.toString(ctx,onComment,onChompKeep);return props?identity.isScalar(node)||str[0]==="{"||str[0]==="["?`${props} ${str}`:`${props}
39
+ ${ctx.indent}${str}`:str}exports.createStringifyContext=createStringifyContext;exports.stringify=stringify}});var require_stringifyPair=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyPair.js"(exports){"use strict";var identity=require_identity(),Scalar=require_Scalar(),stringify=require_stringify(),stringifyComment=require_stringifyComment();function stringifyPair({key:key2,value},ctx,onComment,onChompKeep){let{allNullValues,doc,indent,indentStep,options:{commentString,indentSeq,simpleKeys}}=ctx,keyComment=identity.isNode(key2)&&key2.comment||null;if(simpleKeys){if(keyComment)throw new Error("With simple keys, key nodes cannot have comments");if(identity.isCollection(key2)||!identity.isNode(key2)&&typeof key2=="object"){let msg="With simple keys, collection cannot be used as a key value";throw new Error(msg)}}let explicitKey=!simpleKeys&&(!key2||keyComment&&value==null&&!ctx.inFlow||identity.isCollection(key2)||(identity.isScalar(key2)?key2.type===Scalar.Scalar.BLOCK_FOLDED||key2.type===Scalar.Scalar.BLOCK_LITERAL:typeof key2=="object"));ctx=Object.assign({},ctx,{allNullValues:!1,implicitKey:!explicitKey&&(simpleKeys||!allNullValues),indent:indent+indentStep});let keyCommentDone=!1,chompKeep=!1,str=stringify.stringify(key2,ctx,()=>keyCommentDone=!0,()=>chompKeep=!0);if(!explicitKey&&!ctx.inFlow&&str.length>1024){if(simpleKeys)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");explicitKey=!0}if(ctx.inFlow){if(allNullValues||value==null)return keyCommentDone&&onComment&&onComment(),str===""?"?":explicitKey?`? ${str}`:str}else if(allNullValues&&!simpleKeys||value==null&&explicitKey)return str=`? ${str}`,keyComment&&!keyCommentDone?str+=stringifyComment.lineComment(str,ctx.indent,commentString(keyComment)):chompKeep&&onChompKeep&&onChompKeep(),str;keyCommentDone&&(keyComment=null),explicitKey?(keyComment&&(str+=stringifyComment.lineComment(str,ctx.indent,commentString(keyComment))),str=`? ${str}
40
+ ${indent}:`):(str=`${str}:`,keyComment&&(str+=stringifyComment.lineComment(str,ctx.indent,commentString(keyComment))));let vsb,vcb,valueComment;identity.isNode(value)?(vsb=!!value.spaceBefore,vcb=value.commentBefore,valueComment=value.comment):(vsb=!1,vcb=null,valueComment=null,value&&typeof value=="object"&&(value=doc.createNode(value))),ctx.implicitKey=!1,!explicitKey&&!keyComment&&identity.isScalar(value)&&(ctx.indentAtStart=str.length+1),chompKeep=!1,!indentSeq&&indentStep.length>=2&&!ctx.inFlow&&!explicitKey&&identity.isSeq(value)&&!value.flow&&!value.tag&&!value.anchor&&(ctx.indent=ctx.indent.substring(2));let valueCommentDone=!1,valueStr=stringify.stringify(value,ctx,()=>valueCommentDone=!0,()=>chompKeep=!0),ws=" ";if(keyComment||vsb||vcb){if(ws=vsb?`
41
+ `:"",vcb){let cs=commentString(vcb);ws+=`
42
+ ${stringifyComment.indentComment(cs,ctx.indent)}`}valueStr===""&&!ctx.inFlow?ws===`
43
+ `&&valueComment&&(ws=`
44
+
45
+ `):ws+=`
46
+ ${ctx.indent}`}else if(!explicitKey&&identity.isCollection(value)){let vs0=valueStr[0],nl0=valueStr.indexOf(`
47
+ `),hasNewline=nl0!==-1,flow=ctx.inFlow??value.flow??value.items.length===0;if(hasNewline||!flow){let hasPropsLine=!1;if(hasNewline&&(vs0==="&"||vs0==="!")){let sp0=valueStr.indexOf(" ");vs0==="&"&&sp0!==-1&&sp0<nl0&&valueStr[sp0+1]==="!"&&(sp0=valueStr.indexOf(" ",sp0+1)),(sp0===-1||nl0<sp0)&&(hasPropsLine=!0)}hasPropsLine||(ws=`
48
+ ${ctx.indent}`)}}else(valueStr===""||valueStr[0]===`
49
+ `)&&(ws="");return str+=ws+valueStr,ctx.inFlow?valueCommentDone&&onComment&&onComment():valueComment&&!valueCommentDone?str+=stringifyComment.lineComment(str,ctx.indent,commentString(valueComment)):chompKeep&&onChompKeep&&onChompKeep(),str}exports.stringifyPair=stringifyPair}});var require_log=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/log.js"(exports){"use strict";var node_process=__require("process");function debug(logLevel,...messages){logLevel==="debug"&&console.log(...messages)}function warn(logLevel,warning){(logLevel==="debug"||logLevel==="warn")&&(typeof node_process.emitWarning=="function"?node_process.emitWarning(warning):console.warn(warning))}exports.debug=debug;exports.warn=warn}});var require_merge=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/merge.js"(exports){"use strict";var identity=require_identity(),Scalar=require_Scalar(),MERGE_KEY="<<",merge2={identify:value=>value===MERGE_KEY||typeof value=="symbol"&&value.description===MERGE_KEY,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Scalar.Scalar(Symbol(MERGE_KEY)),{addToJSMap:addMergeToJSMap}),stringify:()=>MERGE_KEY},isMergeKey=(ctx,key2)=>(merge2.identify(key2)||identity.isScalar(key2)&&(!key2.type||key2.type===Scalar.Scalar.PLAIN)&&merge2.identify(key2.value))&&ctx?.doc.schema.tags.some(tag=>tag.tag===merge2.tag&&tag.default);function addMergeToJSMap(ctx,map,value){let source=resolveAliasValue(ctx,value);if(identity.isSeq(source))for(let it of source.items)mergeValue(ctx,map,it);else if(Array.isArray(source))for(let it of source)mergeValue(ctx,map,it);else mergeValue(ctx,map,source)}function mergeValue(ctx,map,value){let source=resolveAliasValue(ctx,value);if(!identity.isMap(source))throw new Error("Merge sources must be maps or map aliases");let srcMap=source.toJSON(null,ctx,Map);for(let[key2,value2]of srcMap)map instanceof Map?map.has(key2)||map.set(key2,value2):map instanceof Set?map.add(key2):Object.prototype.hasOwnProperty.call(map,key2)||Object.defineProperty(map,key2,{value:value2,writable:!0,enumerable:!0,configurable:!0});return map}function resolveAliasValue(ctx,value){return ctx&&identity.isAlias(value)?value.resolve(ctx.doc,ctx):value}exports.addMergeToJSMap=addMergeToJSMap;exports.isMergeKey=isMergeKey;exports.merge=merge2}});var require_addPairToJSMap=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports){"use strict";var log=require_log(),merge2=require_merge(),stringify=require_stringify(),identity=require_identity(),toJS=require_toJS();function addPairToJSMap(ctx,map,{key:key2,value}){if(identity.isNode(key2)&&key2.addToJSMap)key2.addToJSMap(ctx,map,value);else if(merge2.isMergeKey(ctx,key2))merge2.addMergeToJSMap(ctx,map,value);else{let jsKey=toJS.toJS(key2,"",ctx);if(map instanceof Map)map.set(jsKey,toJS.toJS(value,jsKey,ctx));else if(map instanceof Set)map.add(jsKey);else{let stringKey=stringifyKey(key2,jsKey,ctx),jsValue=toJS.toJS(value,stringKey,ctx);stringKey in map?Object.defineProperty(map,stringKey,{value:jsValue,writable:!0,enumerable:!0,configurable:!0}):map[stringKey]=jsValue}}return map}function stringifyKey(key2,jsKey,ctx){if(jsKey===null)return"";if(typeof jsKey!="object")return String(jsKey);if(identity.isNode(key2)&&ctx?.doc){let strCtx=stringify.createStringifyContext(ctx.doc,{});strCtx.anchors=new Set;for(let node of ctx.anchors.keys())strCtx.anchors.add(node.anchor);strCtx.inFlow=!0,strCtx.inStringifyKey=!0;let strKey=key2.toString(strCtx);if(!ctx.mapKeyWarned){let jsonStr=JSON.stringify(strKey);jsonStr.length>40&&(jsonStr=jsonStr.substring(0,36)+'..."'),log.warn(ctx.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`),ctx.mapKeyWarned=!0}return strKey}return JSON.stringify(jsKey)}exports.addPairToJSMap=addPairToJSMap}});var require_Pair=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Pair.js"(exports){"use strict";var createNode=require_createNode(),stringifyPair=require_stringifyPair(),addPairToJSMap=require_addPairToJSMap(),identity=require_identity();function createPair(key2,value,ctx){let k=createNode.createNode(key2,void 0,ctx),v=createNode.createNode(value,void 0,ctx);return new Pair(k,v)}var Pair=class _Pair{constructor(key2,value=null){Object.defineProperty(this,identity.NODE_TYPE,{value:identity.PAIR}),this.key=key2,this.value=value}clone(schema){let{key:key2,value}=this;return identity.isNode(key2)&&(key2=key2.clone(schema)),identity.isNode(value)&&(value=value.clone(schema)),new _Pair(key2,value)}toJSON(_,ctx){let pair=ctx?.mapAsMap?new Map:{};return addPairToJSMap.addPairToJSMap(ctx,pair,this)}toString(ctx,onComment,onChompKeep){return ctx?.doc?stringifyPair.stringifyPair(this,ctx,onComment,onChompKeep):JSON.stringify(this)}};exports.Pair=Pair;exports.createPair=createPair}});var require_stringifyCollection=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyCollection.js"(exports){"use strict";var identity=require_identity(),stringify=require_stringify(),stringifyComment=require_stringifyComment();function stringifyCollection(collection,ctx,options){return(ctx.inFlow??collection.flow?stringifyFlowCollection:stringifyBlockCollection)(collection,ctx,options)}function stringifyBlockCollection({comment,items},ctx,{blockItemPrefix,flowChars,itemIndent,onChompKeep,onComment}){let{indent,options:{commentString}}=ctx,itemCtx=Object.assign({},ctx,{indent:itemIndent,type:null}),chompKeep=!1,lines=[];for(let i=0;i<items.length;++i){let item=items[i],comment2=null;if(identity.isNode(item))!chompKeep&&item.spaceBefore&&lines.push(""),addCommentBefore(ctx,lines,item.commentBefore,chompKeep),item.comment&&(comment2=item.comment);else if(identity.isPair(item)){let ik=identity.isNode(item.key)?item.key:null;ik&&(!chompKeep&&ik.spaceBefore&&lines.push(""),addCommentBefore(ctx,lines,ik.commentBefore,chompKeep))}chompKeep=!1;let str2=stringify.stringify(item,itemCtx,()=>comment2=null,()=>chompKeep=!0);comment2&&(str2+=stringifyComment.lineComment(str2,itemIndent,commentString(comment2))),chompKeep&&comment2&&(chompKeep=!1),lines.push(blockItemPrefix+str2)}let str;if(lines.length===0)str=flowChars.start+flowChars.end;else{str=lines[0];for(let i=1;i<lines.length;++i){let line=lines[i];str+=line?`
50
+ ${indent}${line}`:`
51
+ `}}return comment?(str+=`
52
+ `+stringifyComment.indentComment(commentString(comment),indent),onComment&&onComment()):chompKeep&&onChompKeep&&onChompKeep(),str}function stringifyFlowCollection({items},ctx,{flowChars,itemIndent}){let{indent,indentStep,flowCollectionPadding:fcPadding,options:{commentString}}=ctx;itemIndent+=indentStep;let itemCtx=Object.assign({},ctx,{indent:itemIndent,inFlow:!0,type:null}),reqNewline=!1,linesAtValue=0,lines=[];for(let i=0;i<items.length;++i){let item=items[i],comment=null;if(identity.isNode(item))item.spaceBefore&&lines.push(""),addCommentBefore(ctx,lines,item.commentBefore,!1),item.comment&&(comment=item.comment);else if(identity.isPair(item)){let ik=identity.isNode(item.key)?item.key:null;ik&&(ik.spaceBefore&&lines.push(""),addCommentBefore(ctx,lines,ik.commentBefore,!1),ik.comment&&(reqNewline=!0));let iv=identity.isNode(item.value)?item.value:null;iv?(iv.comment&&(comment=iv.comment),iv.commentBefore&&(reqNewline=!0)):item.value==null&&ik?.comment&&(comment=ik.comment)}comment&&(reqNewline=!0);let str=stringify.stringify(item,itemCtx,()=>comment=null);reqNewline||(reqNewline=lines.length>linesAtValue||str.includes(`
53
+ `)),i<items.length-1?str+=",":ctx.options.trailingComma&&(ctx.options.lineWidth>0&&(reqNewline||(reqNewline=lines.reduce((sum,line)=>sum+line.length+2,2)+(str.length+2)>ctx.options.lineWidth)),reqNewline&&(str+=",")),comment&&(str+=stringifyComment.lineComment(str,itemIndent,commentString(comment))),lines.push(str),linesAtValue=lines.length}let{start,end}=flowChars;if(lines.length===0)return start+end;if(!reqNewline){let len=lines.reduce((sum,line)=>sum+line.length+2,2);reqNewline=ctx.options.lineWidth>0&&len>ctx.options.lineWidth}if(reqNewline){let str=start;for(let line of lines)str+=line?`
54
+ ${indentStep}${indent}${line}`:`
55
+ `;return`${str}
56
+ ${indent}${end}`}else return`${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`}function addCommentBefore({indent,options:{commentString}},lines,comment,chompKeep){if(comment&&chompKeep&&(comment=comment.replace(/^\n+/,"")),comment){let ic=stringifyComment.indentComment(commentString(comment),indent);lines.push(ic.trimStart())}}exports.stringifyCollection=stringifyCollection}});var require_YAMLMap=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/YAMLMap.js"(exports){"use strict";var stringifyCollection=require_stringifyCollection(),addPairToJSMap=require_addPairToJSMap(),Collection=require_Collection(),identity=require_identity(),Pair=require_Pair(),Scalar=require_Scalar();function findPair(items,key2){let k=identity.isScalar(key2)?key2.value:key2;for(let it of items)if(identity.isPair(it)&&(it.key===key2||it.key===k||identity.isScalar(it.key)&&it.key.value===k))return it}var YAMLMap=class extends Collection.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(schema){super(identity.MAP,schema),this.items=[]}static from(schema,obj,ctx){let{keepUndefined,replacer}=ctx,map=new this(schema),add=(key2,value)=>{if(typeof replacer=="function")value=replacer.call(obj,key2,value);else if(Array.isArray(replacer)&&!replacer.includes(key2))return;(value!==void 0||keepUndefined)&&map.items.push(Pair.createPair(key2,value,ctx))};if(obj instanceof Map)for(let[key2,value]of obj)add(key2,value);else if(obj&&typeof obj=="object")for(let key2 of Object.keys(obj))add(key2,obj[key2]);return typeof schema.sortMapEntries=="function"&&map.items.sort(schema.sortMapEntries),map}add(pair,overwrite){let _pair;identity.isPair(pair)?_pair=pair:!pair||typeof pair!="object"||!("key"in pair)?_pair=new Pair.Pair(pair,pair?.value):_pair=new Pair.Pair(pair.key,pair.value);let prev=findPair(this.items,_pair.key),sortEntries=this.schema?.sortMapEntries;if(prev){if(!overwrite)throw new Error(`Key ${_pair.key} already set`);identity.isScalar(prev.value)&&Scalar.isScalarValue(_pair.value)?prev.value.value=_pair.value:prev.value=_pair.value}else if(sortEntries){let i=this.items.findIndex(item=>sortEntries(_pair,item)<0);i===-1?this.items.push(_pair):this.items.splice(i,0,_pair)}else this.items.push(_pair)}delete(key2){let it=findPair(this.items,key2);return it?this.items.splice(this.items.indexOf(it),1).length>0:!1}get(key2,keepScalar){let node=findPair(this.items,key2)?.value;return(!keepScalar&&identity.isScalar(node)?node.value:node)??void 0}has(key2){return!!findPair(this.items,key2)}set(key2,value){this.add(new Pair.Pair(key2,value),!0)}toJSON(_,ctx,Type){let map=Type?new Type:ctx?.mapAsMap?new Map:{};ctx?.onCreate&&ctx.onCreate(map);for(let item of this.items)addPairToJSMap.addPairToJSMap(ctx,map,item);return map}toString(ctx,onComment,onChompKeep){if(!ctx)return JSON.stringify(this);for(let item of this.items)if(!identity.isPair(item))throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);return!ctx.allNullValues&&this.hasAllNullValues(!1)&&(ctx=Object.assign({},ctx,{allNullValues:!0})),stringifyCollection.stringifyCollection(this,ctx,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:ctx.indent||"",onChompKeep,onComment})}};exports.YAMLMap=YAMLMap;exports.findPair=findPair}});var require_map=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/map.js"(exports){"use strict";var identity=require_identity(),YAMLMap=require_YAMLMap(),map={collection:"map",default:!0,nodeClass:YAMLMap.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(map2,onError){return identity.isMap(map2)||onError("Expected a mapping for this tag"),map2},createNode:(schema,obj,ctx)=>YAMLMap.YAMLMap.from(schema,obj,ctx)};exports.map=map}});var require_YAMLSeq=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/YAMLSeq.js"(exports){"use strict";var createNode=require_createNode(),stringifyCollection=require_stringifyCollection(),Collection=require_Collection(),identity=require_identity(),Scalar=require_Scalar(),toJS=require_toJS(),YAMLSeq=class extends Collection.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(schema){super(identity.SEQ,schema),this.items=[]}add(value){this.items.push(value)}delete(key2){let idx=asItemIndex(key2);return typeof idx!="number"?!1:this.items.splice(idx,1).length>0}get(key2,keepScalar){let idx=asItemIndex(key2);if(typeof idx!="number")return;let it=this.items[idx];return!keepScalar&&identity.isScalar(it)?it.value:it}has(key2){let idx=asItemIndex(key2);return typeof idx=="number"&&idx<this.items.length}set(key2,value){let idx=asItemIndex(key2);if(typeof idx!="number")throw new Error(`Expected a valid index, not ${key2}.`);let prev=this.items[idx];identity.isScalar(prev)&&Scalar.isScalarValue(value)?prev.value=value:this.items[idx]=value}toJSON(_,ctx){let seq=[];ctx?.onCreate&&ctx.onCreate(seq);let i=0;for(let item of this.items)seq.push(toJS.toJS(item,String(i++),ctx));return seq}toString(ctx,onComment,onChompKeep){return ctx?stringifyCollection.stringifyCollection(this,ctx,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(ctx.indent||"")+" ",onChompKeep,onComment}):JSON.stringify(this)}static from(schema,obj,ctx){let{replacer}=ctx,seq=new this(schema);if(obj&&Symbol.iterator in Object(obj)){let i=0;for(let it of obj){if(typeof replacer=="function"){let key2=obj instanceof Set?it:String(i++);it=replacer.call(obj,key2,it)}seq.items.push(createNode.createNode(it,void 0,ctx))}}return seq}};function asItemIndex(key2){let idx=identity.isScalar(key2)?key2.value:key2;return idx&&typeof idx=="string"&&(idx=Number(idx)),typeof idx=="number"&&Number.isInteger(idx)&&idx>=0?idx:null}exports.YAMLSeq=YAMLSeq}});var require_seq=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/seq.js"(exports){"use strict";var identity=require_identity(),YAMLSeq=require_YAMLSeq(),seq={collection:"seq",default:!0,nodeClass:YAMLSeq.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(seq2,onError){return identity.isSeq(seq2)||onError("Expected a sequence for this tag"),seq2},createNode:(schema,obj,ctx)=>YAMLSeq.YAMLSeq.from(schema,obj,ctx)};exports.seq=seq}});var require_string=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/string.js"(exports){"use strict";var stringifyString=require_stringifyString(),string={identify:value=>typeof value=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:str=>str,stringify(item,ctx,onComment,onChompKeep){return ctx=Object.assign({actualString:!0},ctx),stringifyString.stringifyString(item,ctx,onComment,onChompKeep)}};exports.string=string}});var require_null=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/null.js"(exports){"use strict";var Scalar=require_Scalar(),nullTag={identify:value=>value==null,createNode:()=>new Scalar.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Scalar.Scalar(null),stringify:({source},ctx)=>typeof source=="string"&&nullTag.test.test(source)?source:ctx.options.nullStr};exports.nullTag=nullTag}});var require_bool=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/bool.js"(exports){"use strict";var Scalar=require_Scalar(),boolTag={identify:value=>typeof value=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:str=>new Scalar.Scalar(str[0]==="t"||str[0]==="T"),stringify({source,value},ctx){if(source&&boolTag.test.test(source)){let sv=source[0]==="t"||source[0]==="T";if(value===sv)return source}return value?ctx.options.trueStr:ctx.options.falseStr}};exports.boolTag=boolTag}});var require_stringifyNumber=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyNumber.js"(exports){"use strict";function stringifyNumber({format,minFractionDigits,tag,value}){if(typeof value=="bigint")return String(value);let num=typeof value=="number"?value:Number(value);if(!isFinite(num))return isNaN(num)?".nan":num<0?"-.inf":".inf";let n=Object.is(value,-0)?"-0":JSON.stringify(value);if(!format&&minFractionDigits&&(!tag||tag==="tag:yaml.org,2002:float")&&/^-?\d/.test(n)&&!n.includes("e")){let i=n.indexOf(".");i<0&&(i=n.length,n+=".");let d=minFractionDigits-(n.length-i-1);for(;d-- >0;)n+="0"}return n}exports.stringifyNumber=stringifyNumber}});var require_float=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/float.js"(exports){"use strict";var Scalar=require_Scalar(),stringifyNumber=require_stringifyNumber(),floatNaN={identify:value=>typeof value=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:str=>str.slice(-3).toLowerCase()==="nan"?NaN:str[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:stringifyNumber.stringifyNumber},floatExp={identify:value=>typeof value=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:str=>parseFloat(str),stringify(node){let num=Number(node.value);return isFinite(num)?num.toExponential():stringifyNumber.stringifyNumber(node)}},float={identify:value=>typeof value=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(str){let node=new Scalar.Scalar(parseFloat(str)),dot=str.indexOf(".");return dot!==-1&&str[str.length-1]==="0"&&(node.minFractionDigits=str.length-dot-1),node},stringify:stringifyNumber.stringifyNumber};exports.float=float;exports.floatExp=floatExp;exports.floatNaN=floatNaN}});var require_int=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/int.js"(exports){"use strict";var stringifyNumber=require_stringifyNumber(),intIdentify=value=>typeof value=="bigint"||Number.isInteger(value),intResolve=(str,offset,radix,{intAsBigInt})=>intAsBigInt?BigInt(str):parseInt(str.substring(offset),radix);function intStringify(node,radix,prefix){let{value}=node;return intIdentify(value)&&value>=0?prefix+value.toString(radix):stringifyNumber.stringifyNumber(node)}var intOct={identify:value=>intIdentify(value)&&value>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(str,_onError,opt)=>intResolve(str,2,8,opt),stringify:node=>intStringify(node,8,"0o")},int={identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(str,_onError,opt)=>intResolve(str,0,10,opt),stringify:stringifyNumber.stringifyNumber},intHex={identify:value=>intIdentify(value)&&value>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(str,_onError,opt)=>intResolve(str,2,16,opt),stringify:node=>intStringify(node,16,"0x")};exports.int=int;exports.intHex=intHex;exports.intOct=intOct}});var require_schema=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/schema.js"(exports){"use strict";var map=require_map(),_null=require_null(),seq=require_seq(),string=require_string(),bool=require_bool(),float=require_float(),int=require_int(),schema=[map.map,seq.seq,string.string,_null.nullTag,bool.boolTag,int.intOct,int.int,int.intHex,float.floatNaN,float.floatExp,float.float];exports.schema=schema}});var require_schema2=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/json/schema.js"(exports){"use strict";var Scalar=require_Scalar(),map=require_map(),seq=require_seq();function intIdentify(value){return typeof value=="bigint"||Number.isInteger(value)}var stringifyJSON=({value})=>JSON.stringify(value),jsonScalars=[{identify:value=>typeof value=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:str=>str,stringify:stringifyJSON},{identify:value=>value==null,createNode:()=>new Scalar.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:stringifyJSON},{identify:value=>typeof value=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:str=>str==="true",stringify:stringifyJSON},{identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(str,_onError,{intAsBigInt})=>intAsBigInt?BigInt(str):parseInt(str,10),stringify:({value})=>intIdentify(value)?value.toString():JSON.stringify(value)},{identify:value=>typeof value=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:str=>parseFloat(str),stringify:stringifyJSON}],jsonError={default:!0,tag:"",test:/^/,resolve(str,onError){return onError(`Unresolved plain scalar ${JSON.stringify(str)}`),str}},schema=[map.map,seq.seq].concat(jsonScalars,jsonError);exports.schema=schema}});var require_binary=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/binary.js"(exports){"use strict";var node_buffer=__require("buffer"),Scalar=require_Scalar(),stringifyString=require_stringifyString(),binary={identify:value=>value instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(src,onError){if(typeof node_buffer.Buffer=="function")return node_buffer.Buffer.from(src,"base64");if(typeof atob=="function"){let str=atob(src.replace(/[\n\r]/g,"")),buffer=new Uint8Array(str.length);for(let i=0;i<str.length;++i)buffer[i]=str.charCodeAt(i);return buffer}else return onError("This environment does not support reading binary tags; either Buffer or atob is required"),src},stringify({comment,type,value},ctx,onComment,onChompKeep){if(!value)return"";let buf=value,str;if(typeof node_buffer.Buffer=="function")str=buf instanceof node_buffer.Buffer?buf.toString("base64"):node_buffer.Buffer.from(buf.buffer).toString("base64");else if(typeof btoa=="function"){let s="";for(let i=0;i<buf.length;++i)s+=String.fromCharCode(buf[i]);str=btoa(s)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(type??(type=Scalar.Scalar.BLOCK_LITERAL),type!==Scalar.Scalar.QUOTE_DOUBLE){let lineWidth=Math.max(ctx.options.lineWidth-ctx.indent.length,ctx.options.minContentWidth),n=Math.ceil(str.length/lineWidth),lines=new Array(n);for(let i=0,o=0;i<n;++i,o+=lineWidth)lines[i]=str.substr(o,lineWidth);str=lines.join(type===Scalar.Scalar.BLOCK_LITERAL?`
57
+ `:" ")}return stringifyString.stringifyString({comment,type,value:str},ctx,onComment,onChompKeep)}};exports.binary=binary}});var require_pairs=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/pairs.js"(exports){"use strict";var identity=require_identity(),Pair=require_Pair(),Scalar=require_Scalar(),YAMLSeq=require_YAMLSeq();function resolvePairs(seq,onError){if(identity.isSeq(seq))for(let i=0;i<seq.items.length;++i){let item=seq.items[i];if(!identity.isPair(item)){if(identity.isMap(item)){item.items.length>1&&onError("Each pair must have its own sequence indicator");let pair=item.items[0]||new Pair.Pair(new Scalar.Scalar(null));if(item.commentBefore&&(pair.key.commentBefore=pair.key.commentBefore?`${item.commentBefore}
58
+ ${pair.key.commentBefore}`:item.commentBefore),item.comment){let cn=pair.value??pair.key;cn.comment=cn.comment?`${item.comment}
59
+ ${cn.comment}`:item.comment}item=pair}seq.items[i]=identity.isPair(item)?item:new Pair.Pair(item)}}else onError("Expected a sequence for this tag");return seq}function createPairs(schema,iterable,ctx){let{replacer}=ctx,pairs2=new YAMLSeq.YAMLSeq(schema);pairs2.tag="tag:yaml.org,2002:pairs";let i=0;if(iterable&&Symbol.iterator in Object(iterable))for(let it of iterable){typeof replacer=="function"&&(it=replacer.call(iterable,String(i++),it));let key2,value;if(Array.isArray(it))if(it.length===2)key2=it[0],value=it[1];else throw new TypeError(`Expected [key, value] tuple: ${it}`);else if(it&&it instanceof Object){let keys=Object.keys(it);if(keys.length===1)key2=keys[0],value=it[key2];else throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`)}else key2=it;pairs2.items.push(Pair.createPair(key2,value,ctx))}return pairs2}var pairs={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:resolvePairs,createNode:createPairs};exports.createPairs=createPairs;exports.pairs=pairs;exports.resolvePairs=resolvePairs}});var require_omap=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/omap.js"(exports){"use strict";var identity=require_identity(),toJS=require_toJS(),YAMLMap=require_YAMLMap(),YAMLSeq=require_YAMLSeq(),pairs=require_pairs(),YAMLOMap=class _YAMLOMap extends YAMLSeq.YAMLSeq{constructor(){super(),this.add=YAMLMap.YAMLMap.prototype.add.bind(this),this.delete=YAMLMap.YAMLMap.prototype.delete.bind(this),this.get=YAMLMap.YAMLMap.prototype.get.bind(this),this.has=YAMLMap.YAMLMap.prototype.has.bind(this),this.set=YAMLMap.YAMLMap.prototype.set.bind(this),this.tag=_YAMLOMap.tag}toJSON(_,ctx){if(!ctx)return super.toJSON(_);let map=new Map;ctx?.onCreate&&ctx.onCreate(map);for(let pair of this.items){let key2,value;if(identity.isPair(pair)?(key2=toJS.toJS(pair.key,"",ctx),value=toJS.toJS(pair.value,key2,ctx)):key2=toJS.toJS(pair,"",ctx),map.has(key2))throw new Error("Ordered maps must not include duplicate keys");map.set(key2,value)}return map}static from(schema,iterable,ctx){let pairs$1=pairs.createPairs(schema,iterable,ctx),omap2=new this;return omap2.items=pairs$1.items,omap2}};YAMLOMap.tag="tag:yaml.org,2002:omap";var omap={collection:"seq",identify:value=>value instanceof Map,nodeClass:YAMLOMap,default:!1,tag:"tag:yaml.org,2002:omap",resolve(seq,onError){let pairs$1=pairs.resolvePairs(seq,onError),seenKeys=[];for(let{key:key2}of pairs$1.items)identity.isScalar(key2)&&(seenKeys.includes(key2.value)?onError(`Ordered maps must not include duplicate keys: ${key2.value}`):seenKeys.push(key2.value));return Object.assign(new YAMLOMap,pairs$1)},createNode:(schema,iterable,ctx)=>YAMLOMap.from(schema,iterable,ctx)};exports.YAMLOMap=YAMLOMap;exports.omap=omap}});var require_bool2=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/bool.js"(exports){"use strict";var Scalar=require_Scalar();function boolStringify({value,source},ctx){return source&&(value?trueTag:falseTag).test.test(source)?source:value?ctx.options.trueStr:ctx.options.falseStr}var trueTag={identify:value=>value===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Scalar.Scalar(!0),stringify:boolStringify},falseTag={identify:value=>value===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Scalar.Scalar(!1),stringify:boolStringify};exports.falseTag=falseTag;exports.trueTag=trueTag}});var require_float2=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/float.js"(exports){"use strict";var Scalar=require_Scalar(),stringifyNumber=require_stringifyNumber(),floatNaN={identify:value=>typeof value=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:str=>str.slice(-3).toLowerCase()==="nan"?NaN:str[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:stringifyNumber.stringifyNumber},floatExp={identify:value=>typeof value=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:str=>parseFloat(str.replace(/_/g,"")),stringify(node){let num=Number(node.value);return isFinite(num)?num.toExponential():stringifyNumber.stringifyNumber(node)}},float={identify:value=>typeof value=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(str){let node=new Scalar.Scalar(parseFloat(str.replace(/_/g,""))),dot=str.indexOf(".");if(dot!==-1){let f=str.substring(dot+1).replace(/_/g,"");f[f.length-1]==="0"&&(node.minFractionDigits=f.length)}return node},stringify:stringifyNumber.stringifyNumber};exports.float=float;exports.floatExp=floatExp;exports.floatNaN=floatNaN}});var require_int2=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/int.js"(exports){"use strict";var stringifyNumber=require_stringifyNumber(),intIdentify=value=>typeof value=="bigint"||Number.isInteger(value);function intResolve(str,offset,radix,{intAsBigInt}){let sign=str[0];if((sign==="-"||sign==="+")&&(offset+=1),str=str.substring(offset).replace(/_/g,""),intAsBigInt){switch(radix){case 2:str=`0b${str}`;break;case 8:str=`0o${str}`;break;case 16:str=`0x${str}`;break}let n2=BigInt(str);return sign==="-"?BigInt(-1)*n2:n2}let n=parseInt(str,radix);return sign==="-"?-1*n:n}function intStringify(node,radix,prefix){let{value}=node;if(intIdentify(value)){let str=value.toString(radix);return value<0?"-"+prefix+str.substr(1):prefix+str}return stringifyNumber.stringifyNumber(node)}var intBin={identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(str,_onError,opt)=>intResolve(str,2,2,opt),stringify:node=>intStringify(node,2,"0b")},intOct={identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(str,_onError,opt)=>intResolve(str,1,8,opt),stringify:node=>intStringify(node,8,"0")},int={identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(str,_onError,opt)=>intResolve(str,0,10,opt),stringify:stringifyNumber.stringifyNumber},intHex={identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(str,_onError,opt)=>intResolve(str,2,16,opt),stringify:node=>intStringify(node,16,"0x")};exports.int=int;exports.intBin=intBin;exports.intHex=intHex;exports.intOct=intOct}});var require_set=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/set.js"(exports){"use strict";var identity=require_identity(),Pair=require_Pair(),YAMLMap=require_YAMLMap(),YAMLSet=class _YAMLSet extends YAMLMap.YAMLMap{constructor(schema){super(schema),this.tag=_YAMLSet.tag}add(key2){let pair;identity.isPair(key2)?pair=key2:key2&&typeof key2=="object"&&"key"in key2&&"value"in key2&&key2.value===null?pair=new Pair.Pair(key2.key,null):pair=new Pair.Pair(key2,null),YAMLMap.findPair(this.items,pair.key)||this.items.push(pair)}get(key2,keepPair){let pair=YAMLMap.findPair(this.items,key2);return!keepPair&&identity.isPair(pair)?identity.isScalar(pair.key)?pair.key.value:pair.key:pair}set(key2,value){if(typeof value!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);let prev=YAMLMap.findPair(this.items,key2);prev&&!value?this.items.splice(this.items.indexOf(prev),1):!prev&&value&&this.items.push(new Pair.Pair(key2))}toJSON(_,ctx){return super.toJSON(_,ctx,Set)}toString(ctx,onComment,onChompKeep){if(!ctx)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},ctx,{allNullValues:!0}),onComment,onChompKeep);throw new Error("Set items must all have null values")}static from(schema,iterable,ctx){let{replacer}=ctx,set2=new this(schema);if(iterable&&Symbol.iterator in Object(iterable))for(let value of iterable)typeof replacer=="function"&&(value=replacer.call(iterable,value,value)),set2.items.push(Pair.createPair(value,null,ctx));return set2}};YAMLSet.tag="tag:yaml.org,2002:set";var set={collection:"map",identify:value=>value instanceof Set,nodeClass:YAMLSet,default:!1,tag:"tag:yaml.org,2002:set",createNode:(schema,iterable,ctx)=>YAMLSet.from(schema,iterable,ctx),resolve(map,onError){if(identity.isMap(map)){if(map.hasAllNullValues(!0))return Object.assign(new YAMLSet,map);onError("Set items must all have null values")}else onError("Expected a mapping for this tag");return map}};exports.YAMLSet=YAMLSet;exports.set=set}});var require_timestamp=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports){"use strict";var stringifyNumber=require_stringifyNumber();function parseSexagesimal(str,asBigInt){let sign=str[0],parts=sign==="-"||sign==="+"?str.substring(1):str,num=n=>asBigInt?BigInt(n):Number(n),res=parts.replace(/_/g,"").split(":").reduce((res2,p)=>res2*num(60)+num(p),num(0));return sign==="-"?num(-1)*res:res}function stringifySexagesimal(node){let{value}=node,num=n=>n;if(typeof value=="bigint")num=n=>BigInt(n);else if(isNaN(value)||!isFinite(value))return stringifyNumber.stringifyNumber(node);let sign="";value<0&&(sign="-",value*=num(-1));let _60=num(60),parts=[value%_60];return value<60?parts.unshift(0):(value=(value-parts[0])/_60,parts.unshift(value%_60),value>=60&&(value=(value-parts[0])/_60,parts.unshift(value))),sign+parts.map(n=>String(n).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var intTime={identify:value=>typeof value=="bigint"||Number.isInteger(value),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(str,_onError,{intAsBigInt})=>parseSexagesimal(str,intAsBigInt),stringify:stringifySexagesimal},floatTime={identify:value=>typeof value=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:str=>parseSexagesimal(str,!1),stringify:stringifySexagesimal},timestamp={identify:value=>value instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(str){let match2=str.match(timestamp.test);if(!match2)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,year,month,day,hour,minute,second]=match2.map(Number),millisec=match2[7]?Number((match2[7]+"00").substr(1,3)):0,date=Date.UTC(year,month-1,day,hour||0,minute||0,second||0,millisec),tz=match2[8];if(tz&&tz!=="Z"){let d=parseSexagesimal(tz,!1);Math.abs(d)<30&&(d*=60),date-=6e4*d}return new Date(date)},stringify:({value})=>value?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};exports.floatTime=floatTime;exports.intTime=intTime;exports.timestamp=timestamp}});var require_schema3=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/schema.js"(exports){"use strict";var map=require_map(),_null=require_null(),seq=require_seq(),string=require_string(),binary=require_binary(),bool=require_bool2(),float=require_float2(),int=require_int2(),merge2=require_merge(),omap=require_omap(),pairs=require_pairs(),set=require_set(),timestamp=require_timestamp(),schema=[map.map,seq.seq,string.string,_null.nullTag,bool.trueTag,bool.falseTag,int.intBin,int.intOct,int.int,int.intHex,float.floatNaN,float.floatExp,float.float,binary.binary,merge2.merge,omap.omap,pairs.pairs,set.set,timestamp.intTime,timestamp.floatTime,timestamp.timestamp];exports.schema=schema}});var require_tags=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/tags.js"(exports){"use strict";var map=require_map(),_null=require_null(),seq=require_seq(),string=require_string(),bool=require_bool(),float=require_float(),int=require_int(),schema=require_schema(),schema$1=require_schema2(),binary=require_binary(),merge2=require_merge(),omap=require_omap(),pairs=require_pairs(),schema$2=require_schema3(),set=require_set(),timestamp=require_timestamp(),schemas2=new Map([["core",schema.schema],["failsafe",[map.map,seq.seq,string.string]],["json",schema$1.schema],["yaml11",schema$2.schema],["yaml-1.1",schema$2.schema]]),tagsByName={binary:binary.binary,bool:bool.boolTag,float:float.float,floatExp:float.floatExp,floatNaN:float.floatNaN,floatTime:timestamp.floatTime,int:int.int,intHex:int.intHex,intOct:int.intOct,intTime:timestamp.intTime,map:map.map,merge:merge2.merge,null:_null.nullTag,omap:omap.omap,pairs:pairs.pairs,seq:seq.seq,set:set.set,timestamp:timestamp.timestamp},coreKnownTags={"tag:yaml.org,2002:binary":binary.binary,"tag:yaml.org,2002:merge":merge2.merge,"tag:yaml.org,2002:omap":omap.omap,"tag:yaml.org,2002:pairs":pairs.pairs,"tag:yaml.org,2002:set":set.set,"tag:yaml.org,2002:timestamp":timestamp.timestamp};function getTags(customTags,schemaName,addMergeTag){let schemaTags=schemas2.get(schemaName);if(schemaTags&&!customTags)return addMergeTag&&!schemaTags.includes(merge2.merge)?schemaTags.concat(merge2.merge):schemaTags.slice();let tags=schemaTags;if(!tags)if(Array.isArray(customTags))tags=[];else{let keys=Array.from(schemas2.keys()).filter(key2=>key2!=="yaml11").map(key2=>JSON.stringify(key2)).join(", ");throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`)}if(Array.isArray(customTags))for(let tag of customTags)tags=tags.concat(tag);else typeof customTags=="function"&&(tags=customTags(tags.slice()));return addMergeTag&&(tags=tags.concat(merge2.merge)),tags.reduce((tags2,tag)=>{let tagObj=typeof tag=="string"?tagsByName[tag]:tag;if(!tagObj){let tagName=JSON.stringify(tag),keys=Object.keys(tagsByName).map(key2=>JSON.stringify(key2)).join(", ");throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`)}return tags2.includes(tagObj)||tags2.push(tagObj),tags2},[])}exports.coreKnownTags=coreKnownTags;exports.getTags=getTags}});var require_Schema=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/Schema.js"(exports){"use strict";var identity=require_identity(),map=require_map(),seq=require_seq(),string=require_string(),tags=require_tags(),sortMapEntriesByKey=(a,b)=>a.key<b.key?-1:a.key>b.key?1:0,Schema=class _Schema{constructor({compat,customTags,merge:merge2,resolveKnownTags,schema,sortMapEntries,toStringDefaults}){this.compat=Array.isArray(compat)?tags.getTags(compat,"compat"):compat?tags.getTags(null,compat):null,this.name=typeof schema=="string"&&schema||"core",this.knownTags=resolveKnownTags?tags.coreKnownTags:{},this.tags=tags.getTags(customTags,this.name,merge2),this.toStringOptions=toStringDefaults??null,Object.defineProperty(this,identity.MAP,{value:map.map}),Object.defineProperty(this,identity.SCALAR,{value:string.string}),Object.defineProperty(this,identity.SEQ,{value:seq.seq}),this.sortMapEntries=typeof sortMapEntries=="function"?sortMapEntries:sortMapEntries===!0?sortMapEntriesByKey:null}clone(){let copy=Object.create(_Schema.prototype,Object.getOwnPropertyDescriptors(this));return copy.tags=this.tags.slice(),copy}};exports.Schema=Schema}});var require_stringifyDocument=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyDocument.js"(exports){"use strict";var identity=require_identity(),stringify=require_stringify(),stringifyComment=require_stringifyComment();function stringifyDocument(doc,options){let lines=[],hasDirectives=options.directives===!0;if(options.directives!==!1&&doc.directives){let dir=doc.directives.toString(doc);dir?(lines.push(dir),hasDirectives=!0):doc.directives.docStart&&(hasDirectives=!0)}hasDirectives&&lines.push("---");let ctx=stringify.createStringifyContext(doc,options),{commentString}=ctx.options;if(doc.commentBefore){lines.length!==1&&lines.unshift("");let cs=commentString(doc.commentBefore);lines.unshift(stringifyComment.indentComment(cs,""))}let chompKeep=!1,contentComment=null;if(doc.contents){if(identity.isNode(doc.contents)){if(doc.contents.spaceBefore&&hasDirectives&&lines.push(""),doc.contents.commentBefore){let cs=commentString(doc.contents.commentBefore);lines.push(stringifyComment.indentComment(cs,""))}ctx.forceBlockIndent=!!doc.comment,contentComment=doc.contents.comment}let onChompKeep=contentComment?void 0:()=>chompKeep=!0,body=stringify.stringify(doc.contents,ctx,()=>contentComment=null,onChompKeep);contentComment&&(body+=stringifyComment.lineComment(body,"",commentString(contentComment))),(body[0]==="|"||body[0]===">")&&lines[lines.length-1]==="---"?lines[lines.length-1]=`--- ${body}`:lines.push(body)}else lines.push(stringify.stringify(doc.contents,ctx));if(doc.directives?.docEnd)if(doc.comment){let cs=commentString(doc.comment);cs.includes(`
60
+ `)?(lines.push("..."),lines.push(stringifyComment.indentComment(cs,""))):lines.push(`... ${cs}`)}else lines.push("...");else{let dc=doc.comment;dc&&chompKeep&&(dc=dc.replace(/^\n+/,"")),dc&&((!chompKeep||contentComment)&&lines[lines.length-1]!==""&&lines.push(""),lines.push(stringifyComment.indentComment(commentString(dc),"")))}return lines.join(`
61
+ `)+`
62
+ `}exports.stringifyDocument=stringifyDocument}});var require_Document=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/Document.js"(exports){"use strict";var Alias=require_Alias(),Collection=require_Collection(),identity=require_identity(),Pair=require_Pair(),toJS=require_toJS(),Schema=require_Schema(),stringifyDocument=require_stringifyDocument(),anchors=require_anchors(),applyReviver=require_applyReviver(),createNode=require_createNode(),directives=require_directives(),Document=class _Document{constructor(value,replacer,options){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,identity.NODE_TYPE,{value:identity.DOC});let _replacer=null;typeof replacer=="function"||Array.isArray(replacer)?_replacer=replacer:options===void 0&&replacer&&(options=replacer,replacer=void 0);let opt=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},options);this.options=opt;let{version}=opt;options?._directives?(this.directives=options._directives.atDocument(),this.directives.yaml.explicit&&(version=this.directives.yaml.version)):this.directives=new directives.Directives({version}),this.setSchema(version,options),this.contents=value===void 0?null:this.createNode(value,_replacer,options)}clone(){let copy=Object.create(_Document.prototype,{[identity.NODE_TYPE]:{value:identity.DOC}});return copy.commentBefore=this.commentBefore,copy.comment=this.comment,copy.errors=this.errors.slice(),copy.warnings=this.warnings.slice(),copy.options=Object.assign({},this.options),this.directives&&(copy.directives=this.directives.clone()),copy.schema=this.schema.clone(),copy.contents=identity.isNode(this.contents)?this.contents.clone(copy.schema):this.contents,this.range&&(copy.range=this.range.slice()),copy}add(value){assertCollection(this.contents)&&this.contents.add(value)}addIn(path,value){assertCollection(this.contents)&&this.contents.addIn(path,value)}createAlias(node,name){if(!node.anchor){let prev=anchors.anchorNames(this);node.anchor=!name||prev.has(name)?anchors.findNewAnchor(name||"a",prev):name}return new Alias.Alias(node.anchor)}createNode(value,replacer,options){let _replacer;if(typeof replacer=="function")value=replacer.call({"":value},"",value),_replacer=replacer;else if(Array.isArray(replacer)){let keyToStr=v=>typeof v=="number"||v instanceof String||v instanceof Number,asStr=replacer.filter(keyToStr).map(String);asStr.length>0&&(replacer=replacer.concat(asStr)),_replacer=replacer}else options===void 0&&replacer&&(options=replacer,replacer=void 0);let{aliasDuplicateObjects,anchorPrefix,flow,keepUndefined,onTagObj,tag}=options??{},{onAnchor,setAnchors,sourceObjects}=anchors.createNodeAnchors(this,anchorPrefix||"a"),ctx={aliasDuplicateObjects:aliasDuplicateObjects??!0,keepUndefined:keepUndefined??!1,onAnchor,onTagObj,replacer:_replacer,schema:this.schema,sourceObjects},node=createNode.createNode(value,tag,ctx);return flow&&identity.isCollection(node)&&(node.flow=!0),setAnchors(),node}createPair(key2,value,options={}){let k=this.createNode(key2,null,options),v=this.createNode(value,null,options);return new Pair.Pair(k,v)}delete(key2){return assertCollection(this.contents)?this.contents.delete(key2):!1}deleteIn(path){return Collection.isEmptyPath(path)?this.contents==null?!1:(this.contents=null,!0):assertCollection(this.contents)?this.contents.deleteIn(path):!1}get(key2,keepScalar){return identity.isCollection(this.contents)?this.contents.get(key2,keepScalar):void 0}getIn(path,keepScalar){return Collection.isEmptyPath(path)?!keepScalar&&identity.isScalar(this.contents)?this.contents.value:this.contents:identity.isCollection(this.contents)?this.contents.getIn(path,keepScalar):void 0}has(key2){return identity.isCollection(this.contents)?this.contents.has(key2):!1}hasIn(path){return Collection.isEmptyPath(path)?this.contents!==void 0:identity.isCollection(this.contents)?this.contents.hasIn(path):!1}set(key2,value){this.contents==null?this.contents=Collection.collectionFromPath(this.schema,[key2],value):assertCollection(this.contents)&&this.contents.set(key2,value)}setIn(path,value){Collection.isEmptyPath(path)?this.contents=value:this.contents==null?this.contents=Collection.collectionFromPath(this.schema,Array.from(path),value):assertCollection(this.contents)&&this.contents.setIn(path,value)}setSchema(version,options={}){typeof version=="number"&&(version=String(version));let opt;switch(version){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new directives.Directives({version:"1.1"}),opt={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=version:this.directives=new directives.Directives({version}),opt={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,opt=null;break;default:{let sv=JSON.stringify(version);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`)}}if(options.schema instanceof Object)this.schema=options.schema;else if(opt)this.schema=new Schema.Schema(Object.assign(opt,options));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json,jsonArg,mapAsMap,maxAliasCount,onAnchor,reviver}={}){let ctx={anchors:new Map,doc:this,keep:!json,mapAsMap:mapAsMap===!0,mapKeyWarned:!1,maxAliasCount:typeof maxAliasCount=="number"?maxAliasCount:100},res=toJS.toJS(this.contents,jsonArg??"",ctx);if(typeof onAnchor=="function")for(let{count:count3,res:res2}of ctx.anchors.values())onAnchor(res2,count3);return typeof reviver=="function"?applyReviver.applyReviver(reviver,{"":res},"",res):res}toJSON(jsonArg,onAnchor){return this.toJS({json:!0,jsonArg,mapAsMap:!1,onAnchor})}toString(options={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in options&&(!Number.isInteger(options.indent)||Number(options.indent)<=0)){let s=JSON.stringify(options.indent);throw new Error(`"indent" option must be a positive integer, not ${s}`)}return stringifyDocument.stringifyDocument(this,options)}};function assertCollection(contents){if(identity.isCollection(contents))return!0;throw new Error("Expected a YAML collection as document contents")}exports.Document=Document}});var require_errors=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/errors.js"(exports){"use strict";var YAMLError=class extends Error{constructor(name,pos,code,message){super(),this.name=name,this.code=code,this.message=message,this.pos=pos}},YAMLParseError=class extends YAMLError{constructor(pos,code,message){super("YAMLParseError",pos,code,message)}},YAMLWarning=class extends YAMLError{constructor(pos,code,message){super("YAMLWarning",pos,code,message)}},prettifyError=(src,lc)=>error=>{if(error.pos[0]===-1)return;error.linePos=error.pos.map(pos=>lc.linePos(pos));let{line,col}=error.linePos[0];error.message+=` at line ${line}, column ${col}`;let ci=col-1,lineStr=src.substring(lc.lineStarts[line-1],lc.lineStarts[line]).replace(/[\n\r]+$/,"");if(ci>=60&&lineStr.length>80){let trimStart=Math.min(ci-39,lineStr.length-79);lineStr="\u2026"+lineStr.substring(trimStart),ci-=trimStart-1}if(lineStr.length>80&&(lineStr=lineStr.substring(0,79)+"\u2026"),line>1&&/^ *$/.test(lineStr.substring(0,ci))){let prev=src.substring(lc.lineStarts[line-2],lc.lineStarts[line-1]);prev.length>80&&(prev=prev.substring(0,79)+`\u2026
63
+ `),lineStr=prev+lineStr}if(/[^ ]/.test(lineStr)){let count3=1,end=error.linePos[1];end?.line===line&&end.col>col&&(count3=Math.max(1,Math.min(end.col-col,80-ci)));let pointer=" ".repeat(ci)+"^".repeat(count3);error.message+=`:
64
+
65
+ ${lineStr}
66
+ ${pointer}
67
+ `}};exports.YAMLError=YAMLError;exports.YAMLParseError=YAMLParseError;exports.YAMLWarning=YAMLWarning;exports.prettifyError=prettifyError}});var require_resolve_props=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-props.js"(exports){"use strict";function resolveProps(tokens,{flow,indicator,next,offset,onError,parentIndent,startOnNewline}){let spaceBefore=!1,atNewline=startOnNewline,hasSpace=startOnNewline,comment="",commentSep="",hasNewline=!1,reqSpace=!1,tab=null,anchor=null,tag=null,newlineAfterProp=null,comma=null,found=null,start=null;for(let token of tokens)switch(reqSpace&&(token.type!=="space"&&token.type!=="newline"&&token.type!=="comma"&&onError(token.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),reqSpace=!1),tab&&(atNewline&&token.type!=="comment"&&token.type!=="newline"&&onError(tab,"TAB_AS_INDENT","Tabs are not allowed as indentation"),tab=null),token.type){case"space":!flow&&(indicator!=="doc-start"||next?.type!=="flow-collection")&&token.source.includes(" ")&&(tab=token),hasSpace=!0;break;case"comment":{hasSpace||onError(token,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let cb=token.source.substring(1)||" ";comment?comment+=commentSep+cb:comment=cb,commentSep="",atNewline=!1;break}case"newline":atNewline?comment?comment+=token.source:(!found||indicator!=="seq-item-ind")&&(spaceBefore=!0):commentSep+=token.source,atNewline=!0,hasNewline=!0,(anchor||tag)&&(newlineAfterProp=token),hasSpace=!0;break;case"anchor":anchor&&onError(token,"MULTIPLE_ANCHORS","A node can have at most one anchor"),token.source.endsWith(":")&&onError(token.offset+token.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),anchor=token,start??(start=token.offset),atNewline=!1,hasSpace=!1,reqSpace=!0;break;case"tag":{tag&&onError(token,"MULTIPLE_TAGS","A node can have at most one tag"),tag=token,start??(start=token.offset),atNewline=!1,hasSpace=!1,reqSpace=!0;break}case indicator:(anchor||tag)&&onError(token,"BAD_PROP_ORDER",`Anchors and tags must be after the ${token.source} indicator`),found&&onError(token,"UNEXPECTED_TOKEN",`Unexpected ${token.source} in ${flow??"collection"}`),found=token,atNewline=indicator==="seq-item-ind"||indicator==="explicit-key-ind",hasSpace=!1;break;case"comma":if(flow){comma&&onError(token,"UNEXPECTED_TOKEN",`Unexpected , in ${flow}`),comma=token,atNewline=!1,hasSpace=!1;break}default:onError(token,"UNEXPECTED_TOKEN",`Unexpected ${token.type} token`),atNewline=!1,hasSpace=!1}let last=tokens[tokens.length-1],end=last?last.offset+last.source.length:offset;return reqSpace&&next&&next.type!=="space"&&next.type!=="newline"&&next.type!=="comma"&&(next.type!=="scalar"||next.source!=="")&&onError(next.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),tab&&(atNewline&&tab.indent<=parentIndent||next?.type==="block-map"||next?.type==="block-seq")&&onError(tab,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma,found,spaceBefore,comment,hasNewline,anchor,tag,newlineAfterProp,end,start:start??end}}exports.resolveProps=resolveProps}});var require_util_contains_newline=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-contains-newline.js"(exports){"use strict";function containsNewline(key2){if(!key2)return null;switch(key2.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(key2.source.includes(`
68
+ `))return!0;if(key2.end){for(let st of key2.end)if(st.type==="newline")return!0}return!1;case"flow-collection":for(let it of key2.items){for(let st of it.start)if(st.type==="newline")return!0;if(it.sep){for(let st of it.sep)if(st.type==="newline")return!0}if(containsNewline(it.key)||containsNewline(it.value))return!0}return!1;default:return!0}}exports.containsNewline=containsNewline}});var require_util_flow_indent_check=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-flow-indent-check.js"(exports){"use strict";var utilContainsNewline=require_util_contains_newline();function flowIndentCheck(indent,fc,onError){if(fc?.type==="flow-collection"){let end=fc.end[0];end.indent===indent&&(end.source==="]"||end.source==="}")&&utilContainsNewline.containsNewline(fc)&&onError(end,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}exports.flowIndentCheck=flowIndentCheck}});var require_util_map_includes=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-map-includes.js"(exports){"use strict";var identity=require_identity();function mapIncludes(ctx,items,search){let{uniqueKeys}=ctx.options;if(uniqueKeys===!1)return!1;let isEqual=typeof uniqueKeys=="function"?uniqueKeys:(a,b)=>a===b||identity.isScalar(a)&&identity.isScalar(b)&&a.value===b.value;return items.some(pair=>isEqual(pair.key,search))}exports.mapIncludes=mapIncludes}});var require_resolve_block_map=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-map.js"(exports){"use strict";var Pair=require_Pair(),YAMLMap=require_YAMLMap(),resolveProps=require_resolve_props(),utilContainsNewline=require_util_contains_newline(),utilFlowIndentCheck=require_util_flow_indent_check(),utilMapIncludes=require_util_map_includes(),startColMsg="All mapping items must start at the same column";function resolveBlockMap({composeNode,composeEmptyNode},ctx,bm,onError,tag){let NodeClass=tag?.nodeClass??YAMLMap.YAMLMap,map=new NodeClass(ctx.schema);ctx.atRoot&&(ctx.atRoot=!1);let offset=bm.offset,commentEnd=null;for(let collItem of bm.items){let{start,key:key2,sep:sep4,value}=collItem,keyProps=resolveProps.resolveProps(start,{indicator:"explicit-key-ind",next:key2??sep4?.[0],offset,onError,parentIndent:bm.indent,startOnNewline:!0}),implicitKey=!keyProps.found;if(implicitKey){if(key2&&(key2.type==="block-seq"?onError(offset,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in key2&&key2.indent!==bm.indent&&onError(offset,"BAD_INDENT",startColMsg)),!keyProps.anchor&&!keyProps.tag&&!sep4){commentEnd=keyProps.end,keyProps.comment&&(map.comment?map.comment+=`
69
+ `+keyProps.comment:map.comment=keyProps.comment);continue}(keyProps.newlineAfterProp||utilContainsNewline.containsNewline(key2))&&onError(key2??start[start.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else keyProps.found?.indent!==bm.indent&&onError(offset,"BAD_INDENT",startColMsg);ctx.atKey=!0;let keyStart=keyProps.end,keyNode=key2?composeNode(ctx,key2,keyProps,onError):composeEmptyNode(ctx,keyStart,start,null,keyProps,onError);ctx.schema.compat&&utilFlowIndentCheck.flowIndentCheck(bm.indent,key2,onError),ctx.atKey=!1,utilMapIncludes.mapIncludes(ctx,map.items,keyNode)&&onError(keyStart,"DUPLICATE_KEY","Map keys must be unique");let valueProps=resolveProps.resolveProps(sep4??[],{indicator:"map-value-ind",next:value,offset:keyNode.range[2],onError,parentIndent:bm.indent,startOnNewline:!key2||key2.type==="block-scalar"});if(offset=valueProps.end,valueProps.found){implicitKey&&(value?.type==="block-map"&&!valueProps.hasNewline&&onError(offset,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),ctx.options.strict&&keyProps.start<valueProps.found.offset-1024&&onError(keyNode.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let valueNode=value?composeNode(ctx,value,valueProps,onError):composeEmptyNode(ctx,offset,sep4,null,valueProps,onError);ctx.schema.compat&&utilFlowIndentCheck.flowIndentCheck(bm.indent,value,onError),offset=valueNode.range[2];let pair=new Pair.Pair(keyNode,valueNode);ctx.options.keepSourceTokens&&(pair.srcToken=collItem),map.items.push(pair)}else{implicitKey&&onError(keyNode.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),valueProps.comment&&(keyNode.comment?keyNode.comment+=`
70
+ `+valueProps.comment:keyNode.comment=valueProps.comment);let pair=new Pair.Pair(keyNode);ctx.options.keepSourceTokens&&(pair.srcToken=collItem),map.items.push(pair)}}return commentEnd&&commentEnd<offset&&onError(commentEnd,"IMPOSSIBLE","Map comment with trailing content"),map.range=[bm.offset,offset,commentEnd??offset],map}exports.resolveBlockMap=resolveBlockMap}});var require_resolve_block_seq=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-seq.js"(exports){"use strict";var YAMLSeq=require_YAMLSeq(),resolveProps=require_resolve_props(),utilFlowIndentCheck=require_util_flow_indent_check();function resolveBlockSeq({composeNode,composeEmptyNode},ctx,bs,onError,tag){let NodeClass=tag?.nodeClass??YAMLSeq.YAMLSeq,seq=new NodeClass(ctx.schema);ctx.atRoot&&(ctx.atRoot=!1),ctx.atKey&&(ctx.atKey=!1);let offset=bs.offset,commentEnd=null;for(let{start,value}of bs.items){let props=resolveProps.resolveProps(start,{indicator:"seq-item-ind",next:value,offset,onError,parentIndent:bs.indent,startOnNewline:!0});if(!props.found)if(props.anchor||props.tag||value)value?.type==="block-seq"?onError(props.end,"BAD_INDENT","All sequence items must start at the same column"):onError(offset,"MISSING_CHAR","Sequence item without - indicator");else{commentEnd=props.end,props.comment&&(seq.comment=props.comment);continue}let node=value?composeNode(ctx,value,props,onError):composeEmptyNode(ctx,props.end,start,null,props,onError);ctx.schema.compat&&utilFlowIndentCheck.flowIndentCheck(bs.indent,value,onError),offset=node.range[2],seq.items.push(node)}return seq.range=[bs.offset,offset,commentEnd??offset],seq}exports.resolveBlockSeq=resolveBlockSeq}});var require_resolve_end=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-end.js"(exports){"use strict";function resolveEnd(end,offset,reqSpace,onError){let comment="";if(end){let hasSpace=!1,sep4="";for(let token of end){let{source,type}=token;switch(type){case"space":hasSpace=!0;break;case"comment":{reqSpace&&!hasSpace&&onError(token,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let cb=source.substring(1)||" ";comment?comment+=sep4+cb:comment=cb,sep4="";break}case"newline":comment&&(sep4+=source),hasSpace=!0;break;default:onError(token,"UNEXPECTED_TOKEN",`Unexpected ${type} at node end`)}offset+=source.length}}return{comment,offset}}exports.resolveEnd=resolveEnd}});var require_resolve_flow_collection=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-flow-collection.js"(exports){"use strict";var identity=require_identity(),Pair=require_Pair(),YAMLMap=require_YAMLMap(),YAMLSeq=require_YAMLSeq(),resolveEnd=require_resolve_end(),resolveProps=require_resolve_props(),utilContainsNewline=require_util_contains_newline(),utilMapIncludes=require_util_map_includes(),blockMsg="Block collections are not allowed within flow collections",isBlock=token=>token&&(token.type==="block-map"||token.type==="block-seq");function resolveFlowCollection({composeNode,composeEmptyNode},ctx,fc,onError,tag){let isMap=fc.start.source==="{",fcName=isMap?"flow map":"flow sequence",NodeClass=tag?.nodeClass??(isMap?YAMLMap.YAMLMap:YAMLSeq.YAMLSeq),coll=new NodeClass(ctx.schema);coll.flow=!0;let atRoot=ctx.atRoot;atRoot&&(ctx.atRoot=!1),ctx.atKey&&(ctx.atKey=!1);let offset=fc.offset+fc.start.source.length;for(let i=0;i<fc.items.length;++i){let collItem=fc.items[i],{start,key:key2,sep:sep4,value}=collItem,props=resolveProps.resolveProps(start,{flow:fcName,indicator:"explicit-key-ind",next:key2??sep4?.[0],offset,onError,parentIndent:fc.indent,startOnNewline:!1});if(!props.found){if(!props.anchor&&!props.tag&&!sep4&&!value){i===0&&props.comma?onError(props.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${fcName}`):i<fc.items.length-1&&onError(props.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${fcName}`),props.comment&&(coll.comment?coll.comment+=`
71
+ `+props.comment:coll.comment=props.comment),offset=props.end;continue}!isMap&&ctx.options.strict&&utilContainsNewline.containsNewline(key2)&&onError(key2,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(i===0)props.comma&&onError(props.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${fcName}`);else if(props.comma||onError(props.start,"MISSING_CHAR",`Missing , between ${fcName} items`),props.comment){let prevItemComment="";loop:for(let st of start)switch(st.type){case"comma":case"space":break;case"comment":prevItemComment=st.source.substring(1);break loop;default:break loop}if(prevItemComment){let prev=coll.items[coll.items.length-1];identity.isPair(prev)&&(prev=prev.value??prev.key),prev.comment?prev.comment+=`
72
+ `+prevItemComment:prev.comment=prevItemComment,props.comment=props.comment.substring(prevItemComment.length+1)}}if(!isMap&&!sep4&&!props.found){let valueNode=value?composeNode(ctx,value,props,onError):composeEmptyNode(ctx,props.end,sep4,null,props,onError);coll.items.push(valueNode),offset=valueNode.range[2],isBlock(value)&&onError(valueNode.range,"BLOCK_IN_FLOW",blockMsg)}else{ctx.atKey=!0;let keyStart=props.end,keyNode=key2?composeNode(ctx,key2,props,onError):composeEmptyNode(ctx,keyStart,start,null,props,onError);isBlock(key2)&&onError(keyNode.range,"BLOCK_IN_FLOW",blockMsg),ctx.atKey=!1;let valueProps=resolveProps.resolveProps(sep4??[],{flow:fcName,indicator:"map-value-ind",next:value,offset:keyNode.range[2],onError,parentIndent:fc.indent,startOnNewline:!1});if(valueProps.found){if(!isMap&&!props.found&&ctx.options.strict){if(sep4)for(let st of sep4){if(st===valueProps.found)break;if(st.type==="newline"){onError(st,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}props.start<valueProps.found.offset-1024&&onError(valueProps.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else value&&("source"in value&&value.source?.[0]===":"?onError(value,"MISSING_CHAR",`Missing space after : in ${fcName}`):onError(valueProps.start,"MISSING_CHAR",`Missing , or : between ${fcName} items`));let valueNode=value?composeNode(ctx,value,valueProps,onError):valueProps.found?composeEmptyNode(ctx,valueProps.end,sep4,null,valueProps,onError):null;valueNode?isBlock(value)&&onError(valueNode.range,"BLOCK_IN_FLOW",blockMsg):valueProps.comment&&(keyNode.comment?keyNode.comment+=`
73
+ `+valueProps.comment:keyNode.comment=valueProps.comment);let pair=new Pair.Pair(keyNode,valueNode);if(ctx.options.keepSourceTokens&&(pair.srcToken=collItem),isMap){let map=coll;utilMapIncludes.mapIncludes(ctx,map.items,keyNode)&&onError(keyStart,"DUPLICATE_KEY","Map keys must be unique"),map.items.push(pair)}else{let map=new YAMLMap.YAMLMap(ctx.schema);map.flow=!0,map.items.push(pair);let endRange=(valueNode??keyNode).range;map.range=[keyNode.range[0],endRange[1],endRange[2]],coll.items.push(map)}offset=valueNode?valueNode.range[2]:valueProps.end}}let expectedEnd=isMap?"}":"]",[ce,...ee]=fc.end,cePos=offset;if(ce?.source===expectedEnd)cePos=ce.offset+ce.source.length;else{let name=fcName[0].toUpperCase()+fcName.substring(1),msg=atRoot?`${name} must end with a ${expectedEnd}`:`${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`;onError(offset,atRoot?"MISSING_CHAR":"BAD_INDENT",msg),ce&&ce.source.length!==1&&ee.unshift(ce)}if(ee.length>0){let end=resolveEnd.resolveEnd(ee,cePos,ctx.options.strict,onError);end.comment&&(coll.comment?coll.comment+=`
74
+ `+end.comment:coll.comment=end.comment),coll.range=[fc.offset,cePos,end.offset]}else coll.range=[fc.offset,cePos,cePos];return coll}exports.resolveFlowCollection=resolveFlowCollection}});var require_compose_collection=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-collection.js"(exports){"use strict";var identity=require_identity(),Scalar=require_Scalar(),YAMLMap=require_YAMLMap(),YAMLSeq=require_YAMLSeq(),resolveBlockMap=require_resolve_block_map(),resolveBlockSeq=require_resolve_block_seq(),resolveFlowCollection=require_resolve_flow_collection();function resolveCollection(CN,ctx,token,onError,tagName,tag){let coll=token.type==="block-map"?resolveBlockMap.resolveBlockMap(CN,ctx,token,onError,tag):token.type==="block-seq"?resolveBlockSeq.resolveBlockSeq(CN,ctx,token,onError,tag):resolveFlowCollection.resolveFlowCollection(CN,ctx,token,onError,tag),Coll=coll.constructor;return tagName==="!"||tagName===Coll.tagName?(coll.tag=Coll.tagName,coll):(tagName&&(coll.tag=tagName),coll)}function composeCollection(CN,ctx,token,props,onError){let tagToken=props.tag,tagName=tagToken?ctx.directives.tagName(tagToken.source,msg=>onError(tagToken,"TAG_RESOLVE_FAILED",msg)):null;if(token.type==="block-seq"){let{anchor,newlineAfterProp:nl}=props,lastProp=anchor&&tagToken?anchor.offset>tagToken.offset?anchor:tagToken:anchor??tagToken;lastProp&&(!nl||nl.offset<lastProp.offset)&&onError(lastProp,"MISSING_CHAR","Missing newline after block sequence props")}let expType=token.type==="block-map"?"map":token.type==="block-seq"?"seq":token.start.source==="{"?"map":"seq";if(!tagToken||!tagName||tagName==="!"||tagName===YAMLMap.YAMLMap.tagName&&expType==="map"||tagName===YAMLSeq.YAMLSeq.tagName&&expType==="seq")return resolveCollection(CN,ctx,token,onError,tagName);let tag=ctx.schema.tags.find(t=>t.tag===tagName&&t.collection===expType);if(!tag){let kt=ctx.schema.knownTags[tagName];if(kt?.collection===expType)ctx.schema.tags.push(Object.assign({},kt,{default:!1})),tag=kt;else return kt?onError(tagToken,"BAD_COLLECTION_TYPE",`${kt.tag} used for ${expType} collection, but expects ${kt.collection??"scalar"}`,!0):onError(tagToken,"TAG_RESOLVE_FAILED",`Unresolved tag: ${tagName}`,!0),resolveCollection(CN,ctx,token,onError,tagName)}let coll=resolveCollection(CN,ctx,token,onError,tagName,tag),res=tag.resolve?.(coll,msg=>onError(tagToken,"TAG_RESOLVE_FAILED",msg),ctx.options)??coll,node=identity.isNode(res)?res:new Scalar.Scalar(res);return node.range=coll.range,node.tag=tagName,tag?.format&&(node.format=tag.format),node}exports.composeCollection=composeCollection}});var require_resolve_block_scalar=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-scalar.js"(exports){"use strict";var Scalar=require_Scalar();function resolveBlockScalar(ctx,scalar,onError){let start=scalar.offset,header=parseBlockScalarHeader(scalar,ctx.options.strict,onError);if(!header)return{value:"",type:null,comment:"",range:[start,start,start]};let type=header.mode===">"?Scalar.Scalar.BLOCK_FOLDED:Scalar.Scalar.BLOCK_LITERAL,lines=scalar.source?splitLines(scalar.source):[],chompStart=lines.length;for(let i=lines.length-1;i>=0;--i){let content=lines[i][1];if(content===""||content==="\r")chompStart=i;else break}if(chompStart===0){let value2=header.chomp==="+"&&lines.length>0?`
75
+ `.repeat(Math.max(1,lines.length-1)):"",end2=start+header.length;return scalar.source&&(end2+=scalar.source.length),{value:value2,type,comment:header.comment,range:[start,end2,end2]}}let trimIndent=scalar.indent+header.indent,offset=scalar.offset+header.length,contentStart=0;for(let i=0;i<chompStart;++i){let[indent,content]=lines[i];if(content===""||content==="\r")header.indent===0&&indent.length>trimIndent&&(trimIndent=indent.length);else{indent.length<trimIndent&&onError(offset+indent.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),header.indent===0&&(trimIndent=indent.length),contentStart=i,trimIndent===0&&!ctx.atRoot&&onError(offset,"BAD_INDENT","Block scalar values in collections must be indented");break}offset+=indent.length+content.length+1}for(let i=lines.length-1;i>=chompStart;--i)lines[i][0].length>trimIndent&&(chompStart=i+1);let value="",sep4="",prevMoreIndented=!1;for(let i=0;i<contentStart;++i)value+=lines[i][0].slice(trimIndent)+`
76
+ `;for(let i=contentStart;i<chompStart;++i){let[indent,content]=lines[i];offset+=indent.length+content.length+1;let crlf=content[content.length-1]==="\r";if(crlf&&(content=content.slice(0,-1)),content&&indent.length<trimIndent){let message=`Block scalar lines must not be less indented than their ${header.indent?"explicit indentation indicator":"first line"}`;onError(offset-content.length-(crlf?2:1),"BAD_INDENT",message),indent=""}type===Scalar.Scalar.BLOCK_LITERAL?(value+=sep4+indent.slice(trimIndent)+content,sep4=`
77
+ `):indent.length>trimIndent||content[0]===" "?(sep4===" "?sep4=`
78
+ `:!prevMoreIndented&&sep4===`
79
+ `&&(sep4=`
80
+
81
+ `),value+=sep4+indent.slice(trimIndent)+content,sep4=`
82
+ `,prevMoreIndented=!0):content===""?sep4===`
83
+ `?value+=`
84
+ `:sep4=`
85
+ `:(value+=sep4+content,sep4=" ",prevMoreIndented=!1)}switch(header.chomp){case"-":break;case"+":for(let i=chompStart;i<lines.length;++i)value+=`
86
+ `+lines[i][0].slice(trimIndent);value[value.length-1]!==`
87
+ `&&(value+=`
88
+ `);break;default:value+=`
89
+ `}let end=start+header.length+scalar.source.length;return{value,type,comment:header.comment,range:[start,end,end]}}function parseBlockScalarHeader({offset,props},strict,onError){if(props[0].type!=="block-scalar-header")return onError(props[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source}=props[0],mode=source[0],indent=0,chomp="",error=-1;for(let i=1;i<source.length;++i){let ch=source[i];if(!chomp&&(ch==="-"||ch==="+"))chomp=ch;else{let n=Number(ch);!indent&&n?indent=n:error===-1&&(error=offset+i)}}error!==-1&&onError(error,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${source}`);let hasSpace=!1,comment="",length=source.length;for(let i=1;i<props.length;++i){let token=props[i];switch(token.type){case"space":hasSpace=!0;case"newline":length+=token.source.length;break;case"comment":strict&&!hasSpace&&onError(token,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),length+=token.source.length,comment=token.source.substring(1);break;case"error":onError(token,"UNEXPECTED_TOKEN",token.message),length+=token.source.length;break;default:{let message=`Unexpected token in block scalar header: ${token.type}`;onError(token,"UNEXPECTED_TOKEN",message);let ts15=token.source;ts15&&typeof ts15=="string"&&(length+=ts15.length)}}}return{mode,indent,chomp,comment,length}}function splitLines(source){let split2=source.split(/\n( *)/),first=split2[0],m=first.match(/^( *)/),lines=[m?.[1]?[m[1],first.slice(m[1].length)]:["",first]];for(let i=1;i<split2.length;i+=2)lines.push([split2[i],split2[i+1]]);return lines}exports.resolveBlockScalar=resolveBlockScalar}});var require_resolve_flow_scalar=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-flow-scalar.js"(exports){"use strict";var Scalar=require_Scalar(),resolveEnd=require_resolve_end();function resolveFlowScalar(scalar,strict,onError){let{offset,type,source,end}=scalar,_type,value,_onError=(rel,code,msg)=>onError(offset+rel,code,msg);switch(type){case"scalar":_type=Scalar.Scalar.PLAIN,value=plainValue(source,_onError);break;case"single-quoted-scalar":_type=Scalar.Scalar.QUOTE_SINGLE,value=singleQuotedValue(source,_onError);break;case"double-quoted-scalar":_type=Scalar.Scalar.QUOTE_DOUBLE,value=doubleQuotedValue(source,_onError);break;default:return onError(scalar,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${type}`),{value:"",type:null,comment:"",range:[offset,offset+source.length,offset+source.length]}}let valueEnd=offset+source.length,re=resolveEnd.resolveEnd(end,valueEnd,strict,onError);return{value,type:_type,comment:re.comment,range:[offset,valueEnd,re.offset]}}function plainValue(source,onError){let badChar="";switch(source[0]){case" ":badChar="a tab character";break;case",":badChar="flow indicator character ,";break;case"%":badChar="directive indicator character %";break;case"|":case">":{badChar=`block scalar indicator ${source[0]}`;break}case"@":case"`":{badChar=`reserved character ${source[0]}`;break}}return badChar&&onError(0,"BAD_SCALAR_START",`Plain value cannot start with ${badChar}`),unfoldLines(source)}function singleQuotedValue(source,onError){return(source[source.length-1]!=="'"||source.length===1)&&onError(source.length,"MISSING_CHAR","Missing closing 'quote"),unfoldLines(source.slice(1,-1)).replace(/''/g,"'")}function unfoldLines(source){let line=/(.*?)\r?\n/sy,match2=line.exec(source);if(!match2)return source;let trimEnd,trimBoth;try{trimEnd=new RegExp("(?<![ ])[ ]+$"),trimBoth=new RegExp("^[ ]+|(?<![ ])[ ]+$","g")}catch{trimEnd=/[ \t]+$/,trimBoth=/^[ \t]+|[ \t]+$/g}let res=match2[1].replace(trimEnd,""),sep4=" ",pos=line.lastIndex;for(;match2=line.exec(source);){let lm=match2[1].replace(trimBoth,"");lm===""?sep4===`
90
+ `?res+=sep4:sep4=`
91
+ `:(res+=sep4+lm,sep4=" "),pos=line.lastIndex}let last=/[ \t]*(.*)/sy;return last.lastIndex=pos,match2=last.exec(source),res+sep4+(match2?.[1]??"")}function doubleQuotedValue(source,onError){let res="";for(let i=1;i<source.length-1;++i){let ch=source[i];if(!(ch==="\r"&&source[i+1]===`
92
+ `))if(ch===`
93
+ `){let{fold,offset}=foldNewline(source,i);res+=fold,i=offset}else if(ch==="\\"){let next=source[++i],cc=escapeCodes[next];if(cc)res+=cc;else if(next===`
94
+ `)for(next=source[i+1];next===" "||next===" ";)next=source[++i+1];else if(next==="\r"&&source[i+1]===`
95
+ `)for(next=source[++i+1];next===" "||next===" ";)next=source[++i+1];else if(next==="x"||next==="u"||next==="U"){let length=next==="x"?2:next==="u"?4:8;res+=parseCharCode(source,i+1,length,onError),i+=length}else{let raw=source.substr(i-1,2);onError(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${raw}`),res+=raw}}else if(ch===" "||ch===" "){let wsStart=i,next=source[i+1];for(;next===" "||next===" ";)next=source[++i+1];next!==`
96
+ `&&!(next==="\r"&&source[i+2]===`
97
+ `)&&(res+=i>wsStart?source.slice(wsStart,i+1):ch)}else res+=ch}return(source[source.length-1]!=='"'||source.length===1)&&onError(source.length,"MISSING_CHAR",'Missing closing "quote'),res}function foldNewline(source,offset){let fold="",ch=source[offset+1];for(;(ch===" "||ch===" "||ch===`
98
+ `||ch==="\r")&&!(ch==="\r"&&source[offset+2]!==`
99
+ `);)ch===`
100
+ `&&(fold+=`
101
+ `),offset+=1,ch=source[offset+1];return fold||(fold=" "),{fold,offset}}var escapeCodes={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
102
+ `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function parseCharCode(source,offset,length,onError){let cc=source.substr(offset,length),code=cc.length===length&&/^[0-9a-fA-F]+$/.test(cc)?parseInt(cc,16):NaN;try{return String.fromCodePoint(code)}catch{let raw=source.substr(offset-2,length+2);return onError(offset-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${raw}`),raw}}exports.resolveFlowScalar=resolveFlowScalar}});var require_compose_scalar=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-scalar.js"(exports){"use strict";var identity=require_identity(),Scalar=require_Scalar(),resolveBlockScalar=require_resolve_block_scalar(),resolveFlowScalar=require_resolve_flow_scalar();function composeScalar(ctx,token,tagToken,onError){let{value,type,comment,range}=token.type==="block-scalar"?resolveBlockScalar.resolveBlockScalar(ctx,token,onError):resolveFlowScalar.resolveFlowScalar(token,ctx.options.strict,onError),tagName=tagToken?ctx.directives.tagName(tagToken.source,msg=>onError(tagToken,"TAG_RESOLVE_FAILED",msg)):null,tag;ctx.options.stringKeys&&ctx.atKey?tag=ctx.schema[identity.SCALAR]:tagName?tag=findScalarTagByName(ctx.schema,value,tagName,tagToken,onError):token.type==="scalar"?tag=findScalarTagByTest(ctx,value,token,onError):tag=ctx.schema[identity.SCALAR];let scalar;try{let res=tag.resolve(value,msg=>onError(tagToken??token,"TAG_RESOLVE_FAILED",msg),ctx.options);scalar=identity.isScalar(res)?res:new Scalar.Scalar(res)}catch(error){let msg=error instanceof Error?error.message:String(error);onError(tagToken??token,"TAG_RESOLVE_FAILED",msg),scalar=new Scalar.Scalar(value)}return scalar.range=range,scalar.source=value,type&&(scalar.type=type),tagName&&(scalar.tag=tagName),tag.format&&(scalar.format=tag.format),comment&&(scalar.comment=comment),scalar}function findScalarTagByName(schema,value,tagName,tagToken,onError){if(tagName==="!")return schema[identity.SCALAR];let matchWithTest=[];for(let tag of schema.tags)if(!tag.collection&&tag.tag===tagName)if(tag.default&&tag.test)matchWithTest.push(tag);else return tag;for(let tag of matchWithTest)if(tag.test?.test(value))return tag;let kt=schema.knownTags[tagName];return kt&&!kt.collection?(schema.tags.push(Object.assign({},kt,{default:!1,test:void 0})),kt):(onError(tagToken,"TAG_RESOLVE_FAILED",`Unresolved tag: ${tagName}`,tagName!=="tag:yaml.org,2002:str"),schema[identity.SCALAR])}function findScalarTagByTest({atKey,directives,schema},value,token,onError){let tag=schema.tags.find(tag2=>(tag2.default===!0||atKey&&tag2.default==="key")&&tag2.test?.test(value))||schema[identity.SCALAR];if(schema.compat){let compat=schema.compat.find(tag2=>tag2.default&&tag2.test?.test(value))??schema[identity.SCALAR];if(tag.tag!==compat.tag){let ts15=directives.tagString(tag.tag),cs=directives.tagString(compat.tag),msg=`Value may be parsed as either ${ts15} or ${cs}`;onError(token,"TAG_RESOLVE_FAILED",msg,!0)}}return tag}exports.composeScalar=composeScalar}});var require_util_empty_scalar_position=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-empty-scalar-position.js"(exports){"use strict";function emptyScalarPosition(offset,before,pos){if(before){pos??(pos=before.length);for(let i=pos-1;i>=0;--i){let st=before[i];switch(st.type){case"space":case"comment":case"newline":offset-=st.source.length;continue}for(st=before[++i];st?.type==="space";)offset+=st.source.length,st=before[++i];break}}return offset}exports.emptyScalarPosition=emptyScalarPosition}});var require_compose_node=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-node.js"(exports){"use strict";var Alias=require_Alias(),identity=require_identity(),composeCollection=require_compose_collection(),composeScalar=require_compose_scalar(),resolveEnd=require_resolve_end(),utilEmptyScalarPosition=require_util_empty_scalar_position(),CN={composeNode,composeEmptyNode};function composeNode(ctx,token,props,onError){let atKey=ctx.atKey,{spaceBefore,comment,anchor,tag}=props,node,isSrcToken=!0;switch(token.type){case"alias":node=composeAlias(ctx,token,onError),(anchor||tag)&&onError(token,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":node=composeScalar.composeScalar(ctx,token,tag,onError),anchor&&(node.anchor=anchor.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{node=composeCollection.composeCollection(CN,ctx,token,props,onError),anchor&&(node.anchor=anchor.source.substring(1))}catch(error){let message=error instanceof Error?error.message:String(error);onError(token,"RESOURCE_EXHAUSTION",message)}break;default:{let message=token.type==="error"?token.message:`Unsupported token (type: ${token.type})`;onError(token,"UNEXPECTED_TOKEN",message),isSrcToken=!1}}return node??(node=composeEmptyNode(ctx,token.offset,void 0,null,props,onError)),anchor&&node.anchor===""&&onError(anchor,"BAD_ALIAS","Anchor cannot be an empty string"),atKey&&ctx.options.stringKeys&&(!identity.isScalar(node)||typeof node.value!="string"||node.tag&&node.tag!=="tag:yaml.org,2002:str")&&onError(tag??token,"NON_STRING_KEY","With stringKeys, all keys must be strings"),spaceBefore&&(node.spaceBefore=!0),comment&&(token.type==="scalar"&&token.source===""?node.comment=comment:node.commentBefore=comment),ctx.options.keepSourceTokens&&isSrcToken&&(node.srcToken=token),node}function composeEmptyNode(ctx,offset,before,pos,{spaceBefore,comment,anchor,tag,end},onError){let token={type:"scalar",offset:utilEmptyScalarPosition.emptyScalarPosition(offset,before,pos),indent:-1,source:""},node=composeScalar.composeScalar(ctx,token,tag,onError);return anchor&&(node.anchor=anchor.source.substring(1),node.anchor===""&&onError(anchor,"BAD_ALIAS","Anchor cannot be an empty string")),spaceBefore&&(node.spaceBefore=!0),comment&&(node.comment=comment,node.range[2]=end),node}function composeAlias({options},{offset,source,end},onError){let alias=new Alias.Alias(source.substring(1));alias.source===""&&onError(offset,"BAD_ALIAS","Alias cannot be an empty string"),alias.source.endsWith(":")&&onError(offset+source.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let valueEnd=offset+source.length,re=resolveEnd.resolveEnd(end,valueEnd,options.strict,onError);return alias.range=[offset,valueEnd,re.offset],re.comment&&(alias.comment=re.comment),alias}exports.composeEmptyNode=composeEmptyNode;exports.composeNode=composeNode}});var require_compose_doc=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-doc.js"(exports){"use strict";var Document=require_Document(),composeNode=require_compose_node(),resolveEnd=require_resolve_end(),resolveProps=require_resolve_props();function composeDoc(options,directives,{offset,start,value,end},onError){let opts=Object.assign({_directives:directives},options),doc=new Document.Document(void 0,opts),ctx={atKey:!1,atRoot:!0,directives:doc.directives,options:doc.options,schema:doc.schema},props=resolveProps.resolveProps(start,{indicator:"doc-start",next:value??end?.[0],offset,onError,parentIndent:0,startOnNewline:!0});props.found&&(doc.directives.docStart=!0,value&&(value.type==="block-map"||value.type==="block-seq")&&!props.hasNewline&&onError(props.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),doc.contents=value?composeNode.composeNode(ctx,value,props,onError):composeNode.composeEmptyNode(ctx,props.end,start,null,props,onError);let contentEnd=doc.contents.range[2],re=resolveEnd.resolveEnd(end,contentEnd,!1,onError);return re.comment&&(doc.comment=re.comment),doc.range=[offset,contentEnd,re.offset],doc}exports.composeDoc=composeDoc}});var require_composer=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/composer.js"(exports){"use strict";var node_process=__require("process"),directives=require_directives(),Document=require_Document(),errors=require_errors(),identity=require_identity(),composeDoc=require_compose_doc(),resolveEnd=require_resolve_end();function getErrorPos(src){if(typeof src=="number")return[src,src+1];if(Array.isArray(src))return src.length===2?src:[src[0],src[1]];let{offset,source}=src;return[offset,offset+(typeof source=="string"?source.length:1)]}function parsePrelude(prelude){let comment="",atComment=!1,afterEmptyLine=!1;for(let i=0;i<prelude.length;++i){let source=prelude[i];switch(source[0]){case"#":comment+=(comment===""?"":afterEmptyLine?`
103
+
104
+ `:`
105
+ `)+(source.substring(1)||" "),atComment=!0,afterEmptyLine=!1;break;case"%":prelude[i+1]?.[0]!=="#"&&(i+=1),atComment=!1;break;default:atComment||(afterEmptyLine=!0),atComment=!1}}return{comment,afterEmptyLine}}var Composer=class{constructor(options={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(source,code,message,warning)=>{let pos=getErrorPos(source);warning?this.warnings.push(new errors.YAMLWarning(pos,code,message)):this.errors.push(new errors.YAMLParseError(pos,code,message))},this.directives=new directives.Directives({version:options.version||"1.2"}),this.options=options}decorate(doc,afterDoc){let{comment,afterEmptyLine}=parsePrelude(this.prelude);if(comment){let dc=doc.contents;if(afterDoc)doc.comment=doc.comment?`${doc.comment}
106
+ ${comment}`:comment;else if(afterEmptyLine||doc.directives.docStart||!dc)doc.commentBefore=comment;else if(identity.isCollection(dc)&&!dc.flow&&dc.items.length>0){let it=dc.items[0];identity.isPair(it)&&(it=it.key);let cb=it.commentBefore;it.commentBefore=cb?`${comment}
107
+ ${cb}`:comment}else{let cb=dc.commentBefore;dc.commentBefore=cb?`${comment}
108
+ ${cb}`:comment}}if(afterDoc){for(let i=0;i<this.errors.length;++i)doc.errors.push(this.errors[i]);for(let i=0;i<this.warnings.length;++i)doc.warnings.push(this.warnings[i])}else doc.errors=this.errors,doc.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:parsePrelude(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(tokens,forceDoc=!1,endOffset=-1){for(let token of tokens)yield*this.next(token);yield*this.end(forceDoc,endOffset)}*next(token){switch(node_process.env.LOG_STREAM&&console.dir(token,{depth:null}),token.type){case"directive":this.directives.add(token.source,(offset,message,warning)=>{let pos=getErrorPos(token);pos[0]+=offset,this.onError(pos,"BAD_DIRECTIVE",message,warning)}),this.prelude.push(token.source),this.atDirectives=!0;break;case"document":{let doc=composeDoc.composeDoc(this.options,this.directives,token,this.onError);this.atDirectives&&!doc.directives.docStart&&this.onError(token,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(doc,!1),this.doc&&(yield this.doc),this.doc=doc,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(token.source);break;case"error":{let msg=token.source?`${token.message}: ${JSON.stringify(token.source)}`:token.message,error=new errors.YAMLParseError(getErrorPos(token),"UNEXPECTED_TOKEN",msg);this.atDirectives||!this.doc?this.errors.push(error):this.doc.errors.push(error);break}case"doc-end":{if(!this.doc){let msg="Unexpected doc-end without preceding document";this.errors.push(new errors.YAMLParseError(getErrorPos(token),"UNEXPECTED_TOKEN",msg));break}this.doc.directives.docEnd=!0;let end=resolveEnd.resolveEnd(token.end,token.offset+token.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),end.comment){let dc=this.doc.comment;this.doc.comment=dc?`${dc}
109
+ ${end.comment}`:end.comment}this.doc.range[2]=end.offset;break}default:this.errors.push(new errors.YAMLParseError(getErrorPos(token),"UNEXPECTED_TOKEN",`Unsupported token ${token.type}`))}}*end(forceDoc=!1,endOffset=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(forceDoc){let opts=Object.assign({_directives:this.directives},this.options),doc=new Document.Document(void 0,opts);this.atDirectives&&this.onError(endOffset,"MISSING_CHAR","Missing directives-end indicator line"),doc.range=[0,endOffset,endOffset],this.decorate(doc,!1),yield doc}}};exports.Composer=Composer}});var require_cst_scalar=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-scalar.js"(exports){"use strict";var resolveBlockScalar=require_resolve_block_scalar(),resolveFlowScalar=require_resolve_flow_scalar(),errors=require_errors(),stringifyString=require_stringifyString();function resolveAsScalar(token,strict=!0,onError){if(token){let _onError=(pos,code,message)=>{let offset=typeof pos=="number"?pos:Array.isArray(pos)?pos[0]:pos.offset;if(onError)onError(offset,code,message);else throw new errors.YAMLParseError([offset,offset+1],code,message)};switch(token.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return resolveFlowScalar.resolveFlowScalar(token,strict,_onError);case"block-scalar":return resolveBlockScalar.resolveBlockScalar({options:{strict}},token,_onError)}}return null}function createScalarToken(value,context){let{implicitKey=!1,indent,inFlow=!1,offset=-1,type="PLAIN"}=context,source=stringifyString.stringifyString({type,value},{implicitKey,indent:indent>0?" ".repeat(indent):"",inFlow,options:{blockQuote:!0,lineWidth:-1}}),end=context.end??[{type:"newline",offset:-1,indent,source:`
110
+ `}];switch(source[0]){case"|":case">":{let he=source.indexOf(`
111
+ `),head=source.substring(0,he),body=source.substring(he+1)+`
112
+ `,props=[{type:"block-scalar-header",offset,indent,source:head}];return addEndtoBlockProps(props,end)||props.push({type:"newline",offset:-1,indent,source:`
113
+ `}),{type:"block-scalar",offset,indent,props,source:body}}case'"':return{type:"double-quoted-scalar",offset,indent,source,end};case"'":return{type:"single-quoted-scalar",offset,indent,source,end};default:return{type:"scalar",offset,indent,source,end}}}function setScalarValue(token,value,context={}){let{afterKey=!1,implicitKey=!1,inFlow=!1,type}=context,indent="indent"in token?token.indent:null;if(afterKey&&typeof indent=="number"&&(indent+=2),!type)switch(token.type){case"single-quoted-scalar":type="QUOTE_SINGLE";break;case"double-quoted-scalar":type="QUOTE_DOUBLE";break;case"block-scalar":{let header=token.props[0];if(header.type!=="block-scalar-header")throw new Error("Invalid block scalar header");type=header.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:type="PLAIN"}let source=stringifyString.stringifyString({type,value},{implicitKey:implicitKey||indent===null,indent:indent!==null&&indent>0?" ".repeat(indent):"",inFlow,options:{blockQuote:!0,lineWidth:-1}});switch(source[0]){case"|":case">":setBlockScalarValue(token,source);break;case'"':setFlowScalarValue(token,source,"double-quoted-scalar");break;case"'":setFlowScalarValue(token,source,"single-quoted-scalar");break;default:setFlowScalarValue(token,source,"scalar")}}function setBlockScalarValue(token,source){let he=source.indexOf(`
114
+ `),head=source.substring(0,he),body=source.substring(he+1)+`
115
+ `;if(token.type==="block-scalar"){let header=token.props[0];if(header.type!=="block-scalar-header")throw new Error("Invalid block scalar header");header.source=head,token.source=body}else{let{offset}=token,indent="indent"in token?token.indent:-1,props=[{type:"block-scalar-header",offset,indent,source:head}];addEndtoBlockProps(props,"end"in token?token.end:void 0)||props.push({type:"newline",offset:-1,indent,source:`
116
+ `});for(let key2 of Object.keys(token))key2!=="type"&&key2!=="offset"&&delete token[key2];Object.assign(token,{type:"block-scalar",indent,props,source:body})}}function addEndtoBlockProps(props,end){if(end)for(let st of end)switch(st.type){case"space":case"comment":props.push(st);break;case"newline":return props.push(st),!0}return!1}function setFlowScalarValue(token,source,type){switch(token.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":token.type=type,token.source=source;break;case"block-scalar":{let end=token.props.slice(1),oa=source.length;token.props[0].type==="block-scalar-header"&&(oa-=token.props[0].source.length);for(let tok of end)tok.offset+=oa;delete token.props,Object.assign(token,{type,source,end});break}case"block-map":case"block-seq":{let nl={type:"newline",offset:token.offset+source.length,indent:token.indent,source:`
117
+ `};delete token.items,Object.assign(token,{type,source,end:[nl]});break}default:{let indent="indent"in token?token.indent:-1,end="end"in token&&Array.isArray(token.end)?token.end.filter(st=>st.type==="space"||st.type==="comment"||st.type==="newline"):[];for(let key2 of Object.keys(token))key2!=="type"&&key2!=="offset"&&delete token[key2];Object.assign(token,{type,indent,source,end})}}}exports.createScalarToken=createScalarToken;exports.resolveAsScalar=resolveAsScalar;exports.setScalarValue=setScalarValue}});var require_cst_stringify=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-stringify.js"(exports){"use strict";var stringify=cst=>"type"in cst?stringifyToken(cst):stringifyItem(cst);function stringifyToken(token){switch(token.type){case"block-scalar":{let res="";for(let tok of token.props)res+=stringifyToken(tok);return res+token.source}case"block-map":case"block-seq":{let res="";for(let item of token.items)res+=stringifyItem(item);return res}case"flow-collection":{let res=token.start.source;for(let item of token.items)res+=stringifyItem(item);for(let st of token.end)res+=st.source;return res}case"document":{let res=stringifyItem(token);if(token.end)for(let st of token.end)res+=st.source;return res}default:{let res=token.source;if("end"in token&&token.end)for(let st of token.end)res+=st.source;return res}}}function stringifyItem({start,key:key2,sep:sep4,value}){let res="";for(let st of start)res+=st.source;if(key2&&(res+=stringifyToken(key2)),sep4)for(let st of sep4)res+=st.source;return value&&(res+=stringifyToken(value)),res}exports.stringify=stringify}});var require_cst_visit=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-visit.js"(exports){"use strict";var BREAK=Symbol("break visit"),SKIP=Symbol("skip children"),REMOVE=Symbol("remove item");function visit(cst,visitor){"type"in cst&&cst.type==="document"&&(cst={start:cst.start,value:cst.value}),_visit(Object.freeze([]),cst,visitor)}visit.BREAK=BREAK;visit.SKIP=SKIP;visit.REMOVE=REMOVE;visit.itemAtPath=(cst,path)=>{let item=cst;for(let[field,index]of path){let tok=item?.[field];if(tok&&"items"in tok)item=tok.items[index];else return}return item};visit.parentCollection=(cst,path)=>{let parent=visit.itemAtPath(cst,path.slice(0,-1)),field=path[path.length-1][0],coll=parent?.[field];if(coll&&"items"in coll)return coll;throw new Error("Parent collection not found")};function _visit(path,item,visitor){let ctrl=visitor(item,path);if(typeof ctrl=="symbol")return ctrl;for(let field of["key","value"]){let token=item[field];if(token&&"items"in token){for(let i=0;i<token.items.length;++i){let ci=_visit(Object.freeze(path.concat([[field,i]])),token.items[i],visitor);if(typeof ci=="number")i=ci-1;else{if(ci===BREAK)return BREAK;ci===REMOVE&&(token.items.splice(i,1),i-=1)}}typeof ctrl=="function"&&field==="key"&&(ctrl=ctrl(item,path))}}return typeof ctrl=="function"?ctrl(item,path):ctrl}exports.visit=visit}});var require_cst=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst.js"(exports){"use strict";var cstScalar=require_cst_scalar(),cstStringify=require_cst_stringify(),cstVisit=require_cst_visit(),BOM="\uFEFF",DOCUMENT="",FLOW_END="",SCALAR="",isCollection=token=>!!token&&"items"in token,isScalar=token=>!!token&&(token.type==="scalar"||token.type==="single-quoted-scalar"||token.type==="double-quoted-scalar"||token.type==="block-scalar");function prettyToken(token){switch(token){case BOM:return"<BOM>";case DOCUMENT:return"<DOC>";case FLOW_END:return"<FLOW_END>";case SCALAR:return"<SCALAR>";default:return JSON.stringify(token)}}function tokenType(source){switch(source){case BOM:return"byte-order-mark";case DOCUMENT:return"doc-mode";case FLOW_END:return"flow-error-end";case SCALAR:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
118
+ `:case`\r
119
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(source[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}exports.createScalarToken=cstScalar.createScalarToken;exports.resolveAsScalar=cstScalar.resolveAsScalar;exports.setScalarValue=cstScalar.setScalarValue;exports.stringify=cstStringify.stringify;exports.visit=cstVisit.visit;exports.BOM=BOM;exports.DOCUMENT=DOCUMENT;exports.FLOW_END=FLOW_END;exports.SCALAR=SCALAR;exports.isCollection=isCollection;exports.isScalar=isScalar;exports.prettyToken=prettyToken;exports.tokenType=tokenType}});var require_lexer=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/lexer.js"(exports){"use strict";var cst=require_cst();function isEmpty(ch){switch(ch){case void 0:case" ":case`
120
+ `:case"\r":case" ":return!0;default:return!1}}var hexDigits=new Set("0123456789ABCDEFabcdef"),tagChars=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),flowIndicatorChars=new Set(",[]{}"),invalidAnchorChars=new Set(` ,[]{}
121
+ \r `),isNotAnchorChar=ch=>!ch||invalidAnchorChars.has(ch),Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(source,incomplete=!1){if(source){if(typeof source!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+source:source,this.lineEndPos=null}this.atEnd=!incomplete;let next=this.next??"stream";for(;next&&(incomplete||this.hasChars(1));)next=yield*this.parseNext(next)}atLineEnd(){let i=this.pos,ch=this.buffer[i];for(;ch===" "||ch===" ";)ch=this.buffer[++i];return!ch||ch==="#"||ch===`
122
+ `?!0:ch==="\r"?this.buffer[i+1]===`
123
+ `:!1}charAt(n){return this.buffer[this.pos+n]}continueScalar(offset){let ch=this.buffer[offset];if(this.indentNext>0){let indent=0;for(;ch===" ";)ch=this.buffer[++indent+offset];if(ch==="\r"){let next=this.buffer[indent+offset+1];if(next===`
124
+ `||!next&&!this.atEnd)return offset+indent+1}return ch===`
125
+ `||indent>=this.indentNext||!ch&&!this.atEnd?offset+indent:-1}if(ch==="-"||ch==="."){let dt=this.buffer.substr(offset,3);if((dt==="---"||dt==="...")&&isEmpty(this.buffer[offset+3]))return-1}return offset}getLine(){let end=this.lineEndPos;return(typeof end!="number"||end!==-1&&end<this.pos)&&(end=this.buffer.indexOf(`
126
+ `,this.pos),this.lineEndPos=end),end===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[end-1]==="\r"&&(end-=1),this.buffer.substring(this.pos,end))}hasChars(n){return this.pos+n<=this.buffer.length}setNext(state){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=state,null}peek(n){return this.buffer.substr(this.pos,n)}*parseNext(next){switch(next){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let line=this.getLine();if(line===null)return this.setNext("stream");if(line[0]===cst.BOM&&(yield*this.pushCount(1),line=line.substring(1)),line[0]==="%"){let dirEnd=line.length,cs=line.indexOf("#");for(;cs!==-1;){let ch=line[cs-1];if(ch===" "||ch===" "){dirEnd=cs-1;break}else cs=line.indexOf("#",cs+1)}for(;;){let ch=line[dirEnd-1];if(ch===" "||ch===" ")dirEnd-=1;else break}let n=(yield*this.pushCount(dirEnd))+(yield*this.pushSpaces(!0));return yield*this.pushCount(line.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let sp=yield*this.pushSpaces(!0);return yield*this.pushCount(line.length-sp),yield*this.pushNewline(),"stream"}return yield cst.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let ch=this.charAt(0);if(!ch&&!this.atEnd)return this.setNext("line-start");if(ch==="-"||ch==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let s=this.peek(3);if((s==="---"||s==="...")&&isEmpty(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,s==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!isEmpty(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[ch0,ch1]=this.peek(2);if(!ch1&&!this.atEnd)return this.setNext("block-start");if((ch0==="-"||ch0==="?"||ch0===":")&&isEmpty(ch1)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let line=this.getLine();if(line===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(line[n]){case"#":yield*this.pushCount(line.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(isNotAnchorChar),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(line.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let nl,sp,indent=-1;do nl=yield*this.pushNewline(),nl>0?(sp=yield*this.pushSpaces(!1),this.indentValue=indent=sp):sp=0,sp+=yield*this.pushSpaces(!0);while(nl+sp>0);let line=this.getLine();if(line===null)return this.setNext("flow");if((indent!==-1&&indent<this.indentNext&&line[0]!=="#"||indent===0&&(line.startsWith("---")||line.startsWith("..."))&&isEmpty(line[3]))&&!(indent===this.indentNext-1&&this.flowLevel===1&&(line[0]==="]"||line[0]==="}")))return this.flowLevel=0,yield cst.FLOW_END,yield*this.parseLineStart();let n=0;for(;line[n]===",";)n+=yield*this.pushCount(1),n+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(n+=yield*this.pushIndicators(),line[n]){case void 0:return"flow";case"#":return yield*this.pushCount(line.length-n),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(isNotAnchorChar),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let next=this.charAt(1);if(this.flowKey||isEmpty(next)||next===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let quote2=this.charAt(0),end=this.buffer.indexOf(quote2,this.pos+1);if(quote2==="'")for(;end!==-1&&this.buffer[end+1]==="'";)end=this.buffer.indexOf("'",end+2);else for(;end!==-1;){let n=0;for(;this.buffer[end-1-n]==="\\";)n+=1;if(n%2===0)break;end=this.buffer.indexOf('"',end+1)}let qb=this.buffer.substring(0,end),nl=qb.indexOf(`
127
+ `,this.pos);if(nl!==-1){for(;nl!==-1;){let cs=this.continueScalar(nl+1);if(cs===-1)break;nl=qb.indexOf(`
128
+ `,cs)}nl!==-1&&(end=nl-(qb[nl-1]==="\r"?2:1))}if(end===-1){if(!this.atEnd)return this.setNext("quoted-scalar");end=this.buffer.length}return yield*this.pushToIndex(end+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let i=this.pos;for(;;){let ch=this.buffer[++i];if(ch==="+")this.blockScalarKeep=!0;else if(ch>"0"&&ch<="9")this.blockScalarIndent=Number(ch)-1;else if(ch!=="-")break}return yield*this.pushUntil(ch=>isEmpty(ch)||ch==="#")}*parseBlockScalar(){let nl=this.pos-1,indent=0,ch;loop:for(let i2=this.pos;ch=this.buffer[i2];++i2)switch(ch){case" ":indent+=1;break;case`
129
+ `:nl=i2,indent=0;break;case"\r":{let next=this.buffer[i2+1];if(!next&&!this.atEnd)return this.setNext("block-scalar");if(next===`
130
+ `)break}default:break loop}if(!ch&&!this.atEnd)return this.setNext("block-scalar");if(indent>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=indent:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let cs=this.continueScalar(nl+1);if(cs===-1)break;nl=this.buffer.indexOf(`
131
+ `,cs)}while(nl!==-1);if(nl===-1){if(!this.atEnd)return this.setNext("block-scalar");nl=this.buffer.length}}let i=nl+1;for(ch=this.buffer[i];ch===" ";)ch=this.buffer[++i];if(ch===" "){for(;ch===" "||ch===" "||ch==="\r"||ch===`
132
+ `;)ch=this.buffer[++i];nl=i-1}else if(!this.blockScalarKeep)do{let i2=nl-1,ch2=this.buffer[i2];ch2==="\r"&&(ch2=this.buffer[--i2]);let lastChar=i2;for(;ch2===" ";)ch2=this.buffer[--i2];if(ch2===`
133
+ `&&i2>=this.pos&&i2+1+indent>lastChar)nl=i2;else break}while(!0);return yield cst.SCALAR,yield*this.pushToIndex(nl+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let inFlow=this.flowLevel>0,end=this.pos-1,i=this.pos-1,ch;for(;ch=this.buffer[++i];)if(ch===":"){let next=this.buffer[i+1];if(isEmpty(next)||inFlow&&flowIndicatorChars.has(next))break;end=i}else if(isEmpty(ch)){let next=this.buffer[i+1];if(ch==="\r"&&(next===`
134
+ `?(i+=1,ch=`
135
+ `,next=this.buffer[i+1]):end=i),next==="#"||inFlow&&flowIndicatorChars.has(next))break;if(ch===`
136
+ `){let cs=this.continueScalar(i+1);if(cs===-1)break;i=Math.max(i,cs-2)}}else{if(inFlow&&flowIndicatorChars.has(ch))break;end=i}return!ch&&!this.atEnd?this.setNext("plain-scalar"):(yield cst.SCALAR,yield*this.pushToIndex(end+1,!0),inFlow?"flow":"doc")}*pushCount(n){return n>0?(yield this.buffer.substr(this.pos,n),this.pos+=n,n):0}*pushToIndex(i,allowEmpty){let s=this.buffer.slice(this.pos,i);return s?(yield s,this.pos+=s.length,s.length):(allowEmpty&&(yield""),0)}*pushIndicators(){let n=0;loop:for(;;){switch(this.charAt(0)){case"!":n+=yield*this.pushTag(),n+=yield*this.pushSpaces(!0);continue loop;case"&":n+=yield*this.pushUntil(isNotAnchorChar),n+=yield*this.pushSpaces(!0);continue loop;case"-":case"?":case":":{let inFlow=this.flowLevel>0,ch1=this.charAt(1);if(isEmpty(ch1)||inFlow&&flowIndicatorChars.has(ch1)){inFlow?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,n+=yield*this.pushCount(1),n+=yield*this.pushSpaces(!0);continue loop}}}break loop}return n}*pushTag(){if(this.charAt(1)==="<"){let i=this.pos+2,ch=this.buffer[i];for(;!isEmpty(ch)&&ch!==">";)ch=this.buffer[++i];return yield*this.pushToIndex(ch===">"?i+1:i,!1)}else{let i=this.pos+1,ch=this.buffer[i];for(;ch;)if(tagChars.has(ch))ch=this.buffer[++i];else if(ch==="%"&&hexDigits.has(this.buffer[i+1])&&hexDigits.has(this.buffer[i+2]))ch=this.buffer[i+=3];else break;return yield*this.pushToIndex(i,!1)}}*pushNewline(){let ch=this.buffer[this.pos];return ch===`
137
+ `?yield*this.pushCount(1):ch==="\r"&&this.charAt(1)===`
138
+ `?yield*this.pushCount(2):0}*pushSpaces(allowTabs){let i=this.pos-1,ch;do ch=this.buffer[++i];while(ch===" "||allowTabs&&ch===" ");let n=i-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=i),n}*pushUntil(test){let i=this.pos,ch=this.buffer[i];for(;!test(ch);)ch=this.buffer[++i];return yield*this.pushToIndex(i,!1)}};exports.Lexer=Lexer}});var require_line_counter=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/line-counter.js"(exports){"use strict";var LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=offset=>this.lineStarts.push(offset),this.linePos=offset=>{let low=0,high=this.lineStarts.length;for(;low<high;){let mid=low+high>>1;this.lineStarts[mid]<offset?low=mid+1:high=mid}if(this.lineStarts[low]===offset)return{line:low+1,col:1};if(low===0)return{line:0,col:offset};let start=this.lineStarts[low-1];return{line:low,col:offset-start+1}}}};exports.LineCounter=LineCounter}});var require_parser=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/parser.js"(exports){"use strict";var node_process=__require("process"),cst=require_cst(),lexer=require_lexer();function includesToken(list,type){for(let i=0;i<list.length;++i)if(list[i].type===type)return!0;return!1}function findNonEmptyIndex(list){for(let i=0;i<list.length;++i)switch(list[i].type){case"space":case"comment":case"newline":break;default:return i}return-1}function isFlowToken(token){switch(token?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function getPrevProps(parent){switch(parent.type){case"document":return parent.start;case"block-map":{let it=parent.items[parent.items.length-1];return it.sep??it.start}case"block-seq":return parent.items[parent.items.length-1].start;default:return[]}}function getFirstKeyStartProps(prev){if(prev.length===0)return[];let i=prev.length;loop:for(;--i>=0;)switch(prev[i].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break loop}for(;prev[++i]?.type==="space";);return prev.splice(i,prev.length)}function arrayPushArray(target,source){if(source.length<1e5)Array.prototype.push.apply(target,source);else for(let i=0;i<source.length;++i)target.push(source[i])}function fixFlowSeqItems(fc){if(fc.start.type==="flow-seq-start")for(let it of fc.items)it.sep&&!it.value&&!includesToken(it.start,"explicit-key-ind")&&!includesToken(it.sep,"map-value-ind")&&(it.key&&(it.value=it.key),delete it.key,isFlowToken(it.value)?it.value.end?arrayPushArray(it.value.end,it.sep):it.value.end=it.sep:arrayPushArray(it.start,it.sep),delete it.sep)}var Parser=class{constructor(onNewLine){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new lexer.Lexer,this.onNewLine=onNewLine}*parse(source,incomplete=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let lexeme of this.lexer.lex(source,incomplete))yield*this.next(lexeme);incomplete||(yield*this.end())}*next(source){if(this.source=source,node_process.env.LOG_TOKENS&&console.log("|",cst.prettyToken(source)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=source.length;return}let type=cst.tokenType(source);if(type)if(type==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=type,yield*this.step(),type){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+source.length);break;case"space":this.atNewLine&&source[0]===" "&&(this.indent+=source.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=source.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=source.length}else{let message=`Not a YAML token: ${source}`;yield*this.pop({type:"error",offset:this.offset,message,source}),this.offset+=source.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let top=this.peek(1);if(this.type==="doc-end"&&top?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!top)return yield*this.stream();switch(top.type){case"document":return yield*this.document(top);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(top);case"block-scalar":return yield*this.blockScalar(top);case"block-map":return yield*this.blockMap(top);case"block-seq":return yield*this.blockSequence(top);case"flow-collection":return yield*this.flowCollection(top);case"doc-end":return yield*this.documentEnd(top)}yield*this.pop()}peek(n){return this.stack[this.stack.length-n]}*pop(error){let token=error??this.stack.pop();if(!token)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield token;else{let top=this.peek(1);switch(token.type==="block-scalar"?token.indent="indent"in top?top.indent:0:token.type==="flow-collection"&&top.type==="document"&&(token.indent=0),token.type==="flow-collection"&&fixFlowSeqItems(token),top.type){case"document":top.value=token;break;case"block-scalar":top.props.push(token);break;case"block-map":{let it=top.items[top.items.length-1];if(it.value){top.items.push({start:[],key:token,sep:[]}),this.onKeyLine=!0;return}else if(it.sep)it.value=token;else{Object.assign(it,{key:token,sep:[]}),this.onKeyLine=!it.explicitKey;return}break}case"block-seq":{let it=top.items[top.items.length-1];it.value?top.items.push({start:[],value:token}):it.value=token;break}case"flow-collection":{let it=top.items[top.items.length-1];!it||it.value?top.items.push({start:[],key:token,sep:[]}):it.sep?it.value=token:Object.assign(it,{key:token,sep:[]});return}default:yield*this.pop(),yield*this.pop(token)}if((top.type==="document"||top.type==="block-map"||top.type==="block-seq")&&(token.type==="block-map"||token.type==="block-seq")){let last=token.items[token.items.length-1];last&&!last.sep&&!last.value&&last.start.length>0&&findNonEmptyIndex(last.start)===-1&&(token.indent===0||last.start.every(st=>st.type!=="comment"||st.indent<token.indent))&&(top.type==="document"?top.end=last.start:top.items.push({start:last.start}),token.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let doc={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&doc.start.push(this.sourceToken),this.stack.push(doc);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(doc){if(doc.value)return yield*this.lineEnd(doc);switch(this.type){case"doc-start":{findNonEmptyIndex(doc.start)!==-1?(yield*this.pop(),yield*this.step()):doc.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":doc.start.push(this.sourceToken);return}let bv=this.startBlockValue(doc);bv?this.stack.push(bv):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(scalar){if(this.type==="map-value-ind"){let prev=getPrevProps(this.peek(2)),start=getFirstKeyStartProps(prev),sep4;scalar.end?(sep4=scalar.end,sep4.push(this.sourceToken),delete scalar.end):sep4=[this.sourceToken];let map={type:"block-map",offset:scalar.offset,indent:scalar.indent,items:[{start,key:scalar,sep:sep4}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=map}else yield*this.lineEnd(scalar)}*blockScalar(scalar){switch(this.type){case"space":case"comment":case"newline":scalar.props.push(this.sourceToken);return;case"scalar":if(scalar.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let nl=this.source.indexOf(`
139
+ `)+1;for(;nl!==0;)this.onNewLine(this.offset+nl),nl=this.source.indexOf(`
140
+ `,nl)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(map){let it=map.items[map.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,it.value){let end="end"in it.value?it.value.end:void 0;(Array.isArray(end)?end[end.length-1]:void 0)?.type==="comment"?end?.push(this.sourceToken):map.items.push({start:[this.sourceToken]})}else it.sep?it.sep.push(this.sourceToken):it.start.push(this.sourceToken);return;case"space":case"comment":if(it.value)map.items.push({start:[this.sourceToken]});else if(it.sep)it.sep.push(this.sourceToken);else{if(this.atIndentedComment(it.start,map.indent)){let end=map.items[map.items.length-2]?.value?.end;if(Array.isArray(end)){arrayPushArray(end,it.start),end.push(this.sourceToken),map.items.pop();return}}it.start.push(this.sourceToken)}return}if(this.indent>=map.indent){let atMapIndent=!this.onKeyLine&&this.indent===map.indent,atNextItem=atMapIndent&&(it.sep||it.explicitKey)&&this.type!=="seq-item-ind",start=[];if(atNextItem&&it.sep&&!it.value){let nl=[];for(let i=0;i<it.sep.length;++i){let st=it.sep[i];switch(st.type){case"newline":nl.push(i);break;case"space":break;case"comment":st.indent>map.indent&&(nl.length=0);break;default:nl.length=0}}nl.length>=2&&(start=it.sep.splice(nl[1]))}switch(this.type){case"anchor":case"tag":atNextItem||it.value?(start.push(this.sourceToken),map.items.push({start}),this.onKeyLine=!0):it.sep?it.sep.push(this.sourceToken):it.start.push(this.sourceToken);return;case"explicit-key-ind":!it.sep&&!it.explicitKey?(it.start.push(this.sourceToken),it.explicitKey=!0):atNextItem||it.value?(start.push(this.sourceToken),map.items.push({start,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(it.explicitKey)if(it.sep)if(it.value)map.items.push({start:[],key:null,sep:[this.sourceToken]});else if(includesToken(it.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start,key:null,sep:[this.sourceToken]}]});else if(isFlowToken(it.key)&&!includesToken(it.sep,"newline")){let start2=getFirstKeyStartProps(it.start),key2=it.key,sep4=it.sep;sep4.push(this.sourceToken),delete it.key,delete it.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:start2,key:key2,sep:sep4}]})}else start.length>0?it.sep=it.sep.concat(start,this.sourceToken):it.sep.push(this.sourceToken);else if(includesToken(it.start,"newline"))Object.assign(it,{key:null,sep:[this.sourceToken]});else{let start2=getFirstKeyStartProps(it.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:start2,key:null,sep:[this.sourceToken]}]})}else it.sep?it.value||atNextItem?map.items.push({start,key:null,sep:[this.sourceToken]}):includesToken(it.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):it.sep.push(this.sourceToken):Object.assign(it,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let fs=this.flowScalar(this.type);atNextItem||it.value?(map.items.push({start,key:fs,sep:[]}),this.onKeyLine=!0):it.sep?this.stack.push(fs):(Object.assign(it,{key:fs,sep:[]}),this.onKeyLine=!0);return}default:{let bv=this.startBlockValue(map);if(bv){if(bv.type==="block-seq"){if(!it.explicitKey&&it.sep&&!includesToken(it.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else atMapIndent&&map.items.push({start});this.stack.push(bv);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(seq){let it=seq.items[seq.items.length-1];switch(this.type){case"newline":if(it.value){let end="end"in it.value?it.value.end:void 0;(Array.isArray(end)?end[end.length-1]:void 0)?.type==="comment"?end?.push(this.sourceToken):seq.items.push({start:[this.sourceToken]})}else it.start.push(this.sourceToken);return;case"space":case"comment":if(it.value)seq.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(it.start,seq.indent)){let end=seq.items[seq.items.length-2]?.value?.end;if(Array.isArray(end)){arrayPushArray(end,it.start),end.push(this.sourceToken),seq.items.pop();return}}it.start.push(this.sourceToken)}return;case"anchor":case"tag":if(it.value||this.indent<=seq.indent)break;it.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==seq.indent)break;it.value||includesToken(it.start,"seq-item-ind")?seq.items.push({start:[this.sourceToken]}):it.start.push(this.sourceToken);return}if(this.indent>seq.indent){let bv=this.startBlockValue(seq);if(bv){this.stack.push(bv);return}}yield*this.pop(),yield*this.step()}*flowCollection(fc){let it=fc.items[fc.items.length-1];if(this.type==="flow-error-end"){let top;do yield*this.pop(),top=this.peek(1);while(top?.type==="flow-collection")}else if(fc.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!it||it.sep?fc.items.push({start:[this.sourceToken]}):it.start.push(this.sourceToken);return;case"map-value-ind":!it||it.value?fc.items.push({start:[],key:null,sep:[this.sourceToken]}):it.sep?it.sep.push(this.sourceToken):Object.assign(it,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!it||it.value?fc.items.push({start:[this.sourceToken]}):it.sep?it.sep.push(this.sourceToken):it.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let fs=this.flowScalar(this.type);!it||it.value?fc.items.push({start:[],key:fs,sep:[]}):it.sep?this.stack.push(fs):Object.assign(it,{key:fs,sep:[]});return}case"flow-map-end":case"flow-seq-end":fc.end.push(this.sourceToken);return}let bv=this.startBlockValue(fc);bv?this.stack.push(bv):(yield*this.pop(),yield*this.step())}else{let parent=this.peek(2);if(parent.type==="block-map"&&(this.type==="map-value-ind"&&parent.indent===fc.indent||this.type==="newline"&&!parent.items[parent.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&parent.type!=="flow-collection"){let prev=getPrevProps(parent),start=getFirstKeyStartProps(prev);fixFlowSeqItems(fc);let sep4=fc.end.splice(1,fc.end.length);sep4.push(this.sourceToken);let map={type:"block-map",offset:fc.offset,indent:fc.indent,items:[{start,key:fc,sep:sep4}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=map}else yield*this.lineEnd(fc)}}flowScalar(type){if(this.onNewLine){let nl=this.source.indexOf(`
141
+ `)+1;for(;nl!==0;)this.onNewLine(this.offset+nl),nl=this.source.indexOf(`
142
+ `,nl)+1}return{type,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(parent){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let prev=getPrevProps(parent),start=getFirstKeyStartProps(prev);return start.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let prev=getPrevProps(parent),start=getFirstKeyStartProps(prev);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(start,indent){return this.type!=="comment"||this.indent<=indent?!1:start.every(st=>st.type==="newline"||st.type==="space")}*documentEnd(docEnd){this.type!=="doc-mode"&&(docEnd.end?docEnd.end.push(this.sourceToken):docEnd.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(token){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:token.end?token.end.push(this.sourceToken):token.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};exports.Parser=Parser}});var require_public_api=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/public-api.js"(exports){"use strict";var composer=require_composer(),Document=require_Document(),errors=require_errors(),log=require_log(),identity=require_identity(),lineCounter=require_line_counter(),parser=require_parser();function parseOptions(options){let prettyErrors=options.prettyErrors!==!1;return{lineCounter:options.lineCounter||prettyErrors&&new lineCounter.LineCounter||null,prettyErrors}}function parseAllDocuments(source,options={}){let{lineCounter:lineCounter2,prettyErrors}=parseOptions(options),parser$1=new parser.Parser(lineCounter2?.addNewLine),composer$1=new composer.Composer(options),docs=Array.from(composer$1.compose(parser$1.parse(source)));if(prettyErrors&&lineCounter2)for(let doc of docs)doc.errors.forEach(errors.prettifyError(source,lineCounter2)),doc.warnings.forEach(errors.prettifyError(source,lineCounter2));return docs.length>0?docs:Object.assign([],{empty:!0},composer$1.streamInfo())}function parseDocument2(source,options={}){let{lineCounter:lineCounter2,prettyErrors}=parseOptions(options),parser$1=new parser.Parser(lineCounter2?.addNewLine),composer$1=new composer.Composer(options),doc=null;for(let _doc of composer$1.compose(parser$1.parse(source),!0,source.length))if(!doc)doc=_doc;else if(doc.options.logLevel!=="silent"){doc.errors.push(new errors.YAMLParseError(_doc.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return prettyErrors&&lineCounter2&&(doc.errors.forEach(errors.prettifyError(source,lineCounter2)),doc.warnings.forEach(errors.prettifyError(source,lineCounter2))),doc}function parse4(src,reviver,options){let _reviver;typeof reviver=="function"?_reviver=reviver:options===void 0&&reviver&&typeof reviver=="object"&&(options=reviver);let doc=parseDocument2(src,options);if(!doc)return null;if(doc.warnings.forEach(warning=>log.warn(doc.options.logLevel,warning)),doc.errors.length>0){if(doc.options.logLevel!=="silent")throw doc.errors[0];doc.errors=[]}return doc.toJS(Object.assign({reviver:_reviver},options))}function stringify(value,replacer,options){let _replacer=null;if(typeof replacer=="function"||Array.isArray(replacer)?_replacer=replacer:options===void 0&&replacer&&(options=replacer),typeof options=="string"&&(options=options.length),typeof options=="number"){let indent=Math.round(options);options=indent<1?void 0:indent>8?{indent:8}:{indent}}if(value===void 0){let{keepUndefined}=options??replacer??{};if(!keepUndefined)return}return identity.isDocument(value)&&!_replacer?value.toString(options):new Document.Document(value,_replacer,options).toString(options)}exports.parse=parse4;exports.parseAllDocuments=parseAllDocuments;exports.parseDocument=parseDocument2;exports.stringify=stringify}});var require_dist=__commonJS({"../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/index.js"(exports){"use strict";var composer=require_composer(),Document=require_Document(),Schema=require_Schema(),errors=require_errors(),Alias=require_Alias(),identity=require_identity(),Pair=require_Pair(),Scalar=require_Scalar(),YAMLMap=require_YAMLMap(),YAMLSeq=require_YAMLSeq(),cst=require_cst(),lexer=require_lexer(),lineCounter=require_line_counter(),parser=require_parser(),publicApi=require_public_api(),visit=require_visit();exports.Composer=composer.Composer;exports.Document=Document.Document;exports.Schema=Schema.Schema;exports.YAMLError=errors.YAMLError;exports.YAMLParseError=errors.YAMLParseError;exports.YAMLWarning=errors.YAMLWarning;exports.Alias=Alias.Alias;exports.isAlias=identity.isAlias;exports.isCollection=identity.isCollection;exports.isDocument=identity.isDocument;exports.isMap=identity.isMap;exports.isNode=identity.isNode;exports.isPair=identity.isPair;exports.isScalar=identity.isScalar;exports.isSeq=identity.isSeq;exports.Pair=Pair.Pair;exports.Scalar=Scalar.Scalar;exports.YAMLMap=YAMLMap.YAMLMap;exports.YAMLSeq=YAMLSeq.YAMLSeq;exports.CST=cst;exports.Lexer=lexer.Lexer;exports.LineCounter=lineCounter.LineCounter;exports.Parser=parser.Parser;exports.parse=publicApi.parse;exports.parseAllDocuments=publicApi.parseAllDocuments;exports.parseDocument=publicApi.parseDocument;exports.stringify=publicApi.stringify;exports.visit=visit.visit;exports.visitAsync=visit.visitAsync}});var require_ini=__commonJS({"../../node_modules/.pnpm/ini@5.0.0/node_modules/ini/lib/ini.js"(exports,module){"use strict";var{hasOwnProperty}=Object.prototype,encode=(obj,opt={})=>{typeof opt=="string"&&(opt={section:opt}),opt.align=opt.align===!0,opt.newline=opt.newline===!0,opt.sort=opt.sort===!0,opt.whitespace=opt.whitespace===!0||opt.align===!0,opt.platform=opt.platform||typeof process<"u"&&process.platform,opt.bracketedArray=opt.bracketedArray!==!1;let eol=opt.platform==="win32"?`\r
143
+ `:`
144
+ `,separator=opt.whitespace?" = ":"=",children=[],keys=opt.sort?Object.keys(obj).sort():Object.keys(obj),padToChars=0;opt.align&&(padToChars=safe(keys.filter(k=>obj[k]===null||Array.isArray(obj[k])||typeof obj[k]!="object").map(k=>Array.isArray(obj[k])?`${k}[]`:k).concat([""]).reduce((a,b)=>safe(a).length>=safe(b).length?a:b)).length);let out="",arraySuffix=opt.bracketedArray?"[]":"";for(let k of keys){let val=obj[k];if(val&&Array.isArray(val))for(let item of val)out+=safe(`${k}${arraySuffix}`).padEnd(padToChars," ")+separator+safe(item)+eol;else val&&typeof val=="object"?children.push(k):out+=safe(k).padEnd(padToChars," ")+separator+safe(val)+eol}opt.section&&out.length&&(out="["+safe(opt.section)+"]"+(opt.newline?eol+eol:eol)+out);for(let k of children){let nk=splitSections(k,".").join("\\."),section=(opt.section?opt.section+".":"")+nk,child=encode(obj[k],{...opt,section});out.length&&child.length&&(out+=eol),out+=child}return out};function splitSections(str,separator){var lastMatchIndex=0,lastSeparatorIndex=0,nextIndex=0,sections=[];do if(nextIndex=str.indexOf(separator,lastMatchIndex),nextIndex!==-1){if(lastMatchIndex=nextIndex+separator.length,nextIndex>0&&str[nextIndex-1]==="\\")continue;sections.push(str.slice(lastSeparatorIndex,nextIndex)),lastSeparatorIndex=nextIndex+separator.length}while(nextIndex!==-1);return sections.push(str.slice(lastSeparatorIndex)),sections}var decode=(str,opt={})=>{opt.bracketedArray=opt.bracketedArray!==!1;let out=Object.create(null),p=out,section=null,re=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,lines=str.split(/[\r\n]+/g),duplicates={};for(let line of lines){if(!line||line.match(/^\s*[;#]/)||line.match(/^\s*$/))continue;let match2=line.match(re);if(!match2)continue;if(match2[1]!==void 0){if(section=unsafe(match2[1]),section==="__proto__"){p=Object.create(null);continue}p=out[section]=out[section]||Object.create(null);continue}let keyRaw=unsafe(match2[2]),isArray;opt.bracketedArray?isArray=keyRaw.length>2&&keyRaw.slice(-2)==="[]":(duplicates[keyRaw]=(duplicates?.[keyRaw]||0)+1,isArray=duplicates[keyRaw]>1);let key2=isArray&&keyRaw.endsWith("[]")?keyRaw.slice(0,-2):keyRaw;if(key2==="__proto__")continue;let valueRaw=match2[3]?unsafe(match2[4]):!0,value=valueRaw==="true"||valueRaw==="false"||valueRaw==="null"?JSON.parse(valueRaw):valueRaw;isArray&&(hasOwnProperty.call(p,key2)?Array.isArray(p[key2])||(p[key2]=[p[key2]]):p[key2]=[]),Array.isArray(p[key2])?p[key2].push(value):p[key2]=value}let remove=[];for(let k of Object.keys(out)){if(!hasOwnProperty.call(out,k)||typeof out[k]!="object"||Array.isArray(out[k]))continue;let parts=splitSections(k,".");p=out;let l=parts.pop(),nl=l.replace(/\\\./g,".");for(let part of parts)part!=="__proto__"&&((!hasOwnProperty.call(p,part)||typeof p[part]!="object")&&(p[part]=Object.create(null)),p=p[part]);p===out&&nl===l||(p[nl]=out[k],remove.push(k))}for(let del of remove)delete out[del];return out},isQuoted=val=>val.startsWith('"')&&val.endsWith('"')||val.startsWith("'")&&val.endsWith("'"),safe=val=>typeof val!="string"||val.match(/[=\r\n]/)||val.match(/^\[/)||val.length>1&&isQuoted(val)||val!==val.trim()?JSON.stringify(val):val.split(";").join("\\;").split("#").join("\\#"),unsafe=val=>{if(val=(val||"").trim(),isQuoted(val)){val.charAt(0)==="'"&&(val=val.slice(1,-1));try{val=JSON.parse(val)}catch{}}else{let esc=!1,unesc="";for(let i=0,l=val.length;i<l;i++){let c=val.charAt(i);if(esc)"\\;#".indexOf(c)!==-1?unesc+=c:unesc+="\\"+c,esc=!1;else{if(";#".indexOf(c)!==-1)break;c==="\\"?esc=!0:unesc+=c}}return esc&&(unesc+="\\"),unesc.trim()}return val};module.exports={parse:decode,decode,stringify:encode,encode,safe,unsafe}}});var require_ignore=__commonJS({"../../node_modules/.pnpm/ignore@7.0.12/node_modules/ignore/index.js"(exports,module){"use strict";function makeArray(subject){return Array.isArray(subject)?subject:[subject]}var UNDEFINED=void 0,EMPTY="",SPACE=" ",ESCAPE="\\",REGEX_LITERAL_SPECIAL=/[.*+?()[\]{}^$|\\/]/,BOM="\uFEFF",REGEX_INVALID_TRAILING_BACKSLASH=/(?:[^\\]|^)\\$/,REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION=/^\\!/,REGEX_REPLACE_LEADING_EXCAPED_HASH=/^\\#/,REGEX_SPLITALL_CRLF=/\r?\n/g,DOUBLE_SLASH="//",SLASH_CODE=47,DOT_CODE=46,SLASH="/",TMP_KEY_IGNORE="node-ignore";typeof Symbol<"u"&&(TMP_KEY_IGNORE=Symbol.for("node-ignore"));var KEY_IGNORE=TMP_KEY_IGNORE,define=(object,key2,value)=>(Object.defineProperty(object,key2,{value}),value),RETURN_FALSE=()=>!1,cleanRangeBackSlash=slashes=>{let{length}=slashes;return slashes.slice(0,length-length%2)},POSIX_CLASSES={alnum:"0-9A-Za-z",alpha:"A-Za-z",blank:" \\t",cntrl:"\\x00-\\x1f\\x7f",digit:"0-9",graph:"!-.0-~",lower:"a-z",print:" -.0-~",punct:"!-.:-@\\[-`{-~",space:" \\t\\n\\r",upper:"A-Z",xdigit:"0-9A-Fa-f"},CLASS_MEMBERS_TO_ESCAPE="\\]^-[",escapeMember=char=>CLASS_MEMBERS_TO_ESCAPE.indexOf(char)<0?char:ESCAPE+char,NON_SLASH="(?!\\/)",classSource=(negated,body)=>{if(negated)return`[^\\/${body}]`;let source=`[${body}]`;return new RegExp(source).test("/")?NON_SLASH+source:source},scanBracket=(pattern,start)=>{let{length}=pattern,index=start+1,negated=EMPTY,lead=pattern[index];(lead==="!"||lead==="^")&&(negated="^",index++);let body=EMPTY,prev=EMPTY;for(;;){let char=pattern[index];if(char===UNDEFINED)return null;if(char===ESCAPE){let escaped=pattern[index+1];if(escaped===UNDEFINED)return null;body+=escapeMember(escaped),prev=escaped,index++}else if(char==="-"&&prev&&index+1<length&&pattern[index+1]!=="]"){index++;let to=pattern[index];to===ESCAPE&&(to=pattern[index+=1]),prev<=to&&(body+=`-${escapeMember(to)}`),prev=EMPTY}else if(char==="["&&pattern[index+1]===":"){let nameStart=index+2,end=nameStart;for(;end<length&&pattern[end]!=="]";)end++;if(end===length)return null;if(end>nameStart&&pattern[end-1]===":"){let expanded=POSIX_CLASSES[pattern.slice(nameStart,end-1)];if(expanded===UNDEFINED)return null;body+=expanded,prev=EMPTY,index=end}else body+=escapeMember("["),prev="[",index=nameStart-2}else body+=escapeMember(char),prev=char;if(index++,pattern[index]==="]")return{end:index,source:classSource(negated,body)}}},NEVER_MATCH="[]",PLACEHOLDER="\0",REGEX_RESTORE_PLACEHOLDER=new RegExp(`${PLACEHOLDER}(\\d+)${PLACEHOLDER}`,"g"),TRAILING_WILDCARD="\uE000",TRAILING_DOUBLESTAR="\uE001",extractBrackets=pattern=>{let sources=[],hold=source=>`${PLACEHOLDER}${sources.push(source)-1}${PLACEHOLDER}`,{length}=pattern,out=EMPTY,index=0;for(;index<length;){let char=pattern[index];if(char===ESCAPE){let escaped=pattern[index+1];escaped===UNDEFINED||escaped===SLASH&&index+2===length?out+=hold(NEVER_MATCH):escaped==="*"||escaped==="["||escaped===SPACE||escaped===ESCAPE?out+=pattern.slice(index,index+2):out+=hold(REGEX_LITERAL_SPECIAL.test(escaped)?ESCAPE+escaped:escaped),index+=2}else if(char===PLACEHOLDER)out+=hold(`[${PLACEHOLDER}]`),index++;else if(char==="["){let scanned=scanBracket(pattern,index);scanned===null?(out+=hold(NEVER_MATCH),index=length):(out+=hold(scanned.source),index=scanned.end+1)}else out+=char,index++}return{source:out,sources}},DIRECT=null,REGEX_INNER_SLASH=/\/(?!$)/,REPLACERS=[[/(\\+)( ?)/g,(_,run,space)=>space?run.slice(0,run.length-run.length%2)+SPACE:run,ESCAPE+SPACE],[/[\\$.|*+(){^]/g,match2=>`\\${match2}`],[/(?!\\)\?/g,()=>"[^/]","?"],[/^\//,()=>"^",SLASH],[/\//g,()=>"\\/",SLASH],[/^\^*(?:\\\*\\\*\\\/)+/,()=>"^(?:.*\\/)?","*"],[DIRECT,(source,pattern)=>!source||source[0]==="^"?source:(REGEX_INNER_SLASH.test(pattern)?"^":"(?:^|\\/)")+source],[/\\\/\\\*\\\*(?=\\\/|$)/g,(_,index,str)=>index+6<str.length?str.slice(index+6)==="\\/"?"(?:\\/[^\\/]+)+":"(?:\\/[^\\/]+)*":`\\/${TRAILING_DOUBLESTAR}`,"*"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(_,p1,p2)=>{let unescaped=p2.replace(/\\\*/g,"[^\\/]*");return p1+unescaped},"*"],[/(^|[^\\])((?:\\\\)*)\\\*$/,(match2,p1,p2)=>p2.length/2%2===0?p1+p2+TRAILING_WILDCARD:match2,"*"],[/\\\\\\(?=[$.|*+(){^])/g,()=>ESCAPE,ESCAPE+ESCAPE],[/\\\\/g,()=>ESCAPE,ESCAPE+ESCAPE],[/\\\[([^\]/]*?)(\\*)($|\])/g,(match2,range,endEscape,close)=>`\\[${range}${cleanRangeBackSlash(endEscape)}${close}`,"["],[DIRECT,source=>{let last=source[source.length-1];return!last||last===TRAILING_WILDCARD||last===TRAILING_DOUBLESTAR?source:last===SLASH?`${source}$`:`${source}(?=$|\\/$)`}]],REGEX_REPLACE_TRAILING_WILDCARD=/(^|\\\/)?\uE000$/,MODE_IGNORE="regex",MODE_CHECK_IGNORE="checkRegex",UNDERSCORE="_",replaceTrailingWildcard=(_,p1)=>`${p1?`${p1}[^/]+`:"[^/]*"}(?=$|\\/$)`,REGEX_REPLACE_TRAILING_DOUBLESTAR=/\uE001$/,replaceTrailingDoublestar=()=>".+(?=$|\\/$)",WILDCARD="[^\\/]*",separatorAfter=(run,at)=>{let separator=EMPTY;for(let index=at+1;index<run.length&&!run[index].wildcard;index++)separator+=run[index].single;return separator},pinWildcards=source=>{if(source.indexOf(WILDCARD)<0)return source;let tokens=[],{length}=source,index=0;for(;index<length;){let char=source[index];if(source.startsWith(WILDCARD,index))tokens.push({wildcard:!0}),index+=WILDCARD.length;else if(char==="["){let end=index+1;for(source[end]==="^"&&end++,source[end]==="]"&&end++;end<length&&source[end]!=="]";)end+=source[end]===ESCAPE?2:1;end++,tokens.push({single:source.slice(index,end)}),index=end}else if(char===ESCAPE)tokens.push({single:source.slice(index,index+2)}),index+=2;else if(char==="("){let depth2=0,end=index;do source[end]===ESCAPE?end++:source[end]==="("?depth2++:source[end]===")"&&depth2--,end++;while(end<length&&depth2>0);"*+?".indexOf(source[end])>=0&&end++,tokens.push({boundary:source.slice(index,end)}),index=end}else char==="^"||char==="$"?(tokens.push({boundary:char}),index++):(tokens.push({single:char}),index++)}let out=EMPTY,run=[],flush=()=>{let lastWildcard;run.forEach((token,at)=>{token.wildcard&&(lastWildcard=at)}),run.forEach((token,at)=>{if(!token.wildcard){out+=token.single;return}out+=at===lastWildcard?WILDCARD:`(?:(?!${separatorAfter(run,at)})[^\\/])*`}),run=[]};return tokens.forEach(token=>{if(token.boundary===void 0){run.push(token);return}flush(),out+=token.boundary}),flush(),out},makeRegexPrefix=pattern=>{let{source,sources}=extractBrackets(pattern),replaced=REPLACERS.reduce((prev,[matcher,replacer,required])=>matcher===DIRECT?replacer(prev,pattern):required!==UNDEFINED&&prev.indexOf(required)<0?prev:matcher.test(prev)?prev.replace(matcher,replacer.bind(pattern)):prev,source);return sources.length?replaced.replace(REGEX_RESTORE_PLACEHOLDER,(match2,index)=>sources[index]):replaced},checkSourceOf=(body,prefix)=>{body[body.length-1]===SLASH&&(prefix=makeRegexPrefix(body.slice(0,-1)));let head=prefix.slice(0,-1),last=prefix[prefix.length-1];return last===TRAILING_WILDCARD?`${head}$`:last===TRAILING_DOUBLESTAR?`${head}.*$`:NEVER_MATCH},matchesBasename=body=>{let index=body.indexOf(SLASH);return index<0||index===body.length-1},basenameOf=path=>{let end=path.length-1,index=path.lastIndexOf(SLASH,path[end]===SLASH?end-1:end);return index<0?path:path.slice(index+1)},parentOf2=path=>{if(path.charCodeAt(0)===SLASH_CODE||path.indexOf(DOUBLE_SLASH)>=0){let slices=path.split(SLASH).filter(Boolean);return slices.pop(),slices.length?slices.join(SLASH)+SLASH:EMPTY}let end=path.length-1,cut=path.lastIndexOf(SLASH,path.charCodeAt(end)===SLASH_CODE?end-1:end);return cut<0?EMPTY:path.slice(0,cut+1)},isString=subject=>typeof subject=="string",checkPattern=pattern=>pattern&&isString(pattern)&&!REGEX_INVALID_TRAILING_BACKSLASH.test(pattern),splitPattern=pattern=>pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean),IgnoreRule=class{constructor(pattern,mark,body,ignoreCase,negative,prefix){this.pattern=pattern,this.mark=mark,this.negative=negative,define(this,"body",body),define(this,"ignoreCase",ignoreCase),define(this,"regexPrefix",prefix)}get _basenameOnly(){return define(this,"_basenameOnly",matchesBasename(this.body))}get regex(){let key2=UNDERSCORE+MODE_IGNORE;return this[key2]?this[key2]:this._make(MODE_IGNORE,key2)}get checkRegex(){let key2=UNDERSCORE+MODE_CHECK_IGNORE;return this[key2]?this[key2]:this._make(MODE_CHECK_IGNORE,key2)}_make(mode,key2){let str=pinWildcards(mode===MODE_IGNORE?this.regexPrefix.replace(REGEX_REPLACE_TRAILING_WILDCARD,replaceTrailingWildcard).replace(REGEX_REPLACE_TRAILING_DOUBLESTAR,replaceTrailingDoublestar):checkSourceOf(this.body,this.regexPrefix)),regex=this.ignoreCase?new RegExp(str,"i"):new RegExp(str);return define(this,key2,regex)}},isLineEnd=char=>char==="\r"||char===`
145
+ `,trimEnd=body=>{let end=body.length;for(;end&&isLineEnd(body[end-1]);)end--;let lineEnd=end;for(;end&&body[end-1]===SPACE;)end--;if(end===lineEnd)return body.slice(0,end);let backslashes=0;for(;backslashes<end&&body[end-backslashes-1]===ESCAPE;)backslashes++;return backslashes%2?body.slice(0,end-1)+SPACE:body.slice(0,end)},createRule=({pattern,mark},ignoreCase)=>{let body=pattern[0]===BOM?pattern.slice(1):pattern;if(body[0]==="#")return;let negative=!1;body[0]==="!"&&(negative=!0,body=body.slice(1));let last=body[body.length-1];if((last===SPACE||last==="\r"||last===`
146
+ `)&&(body=trimEnd(body)),!body)return;body=body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION,"!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH,"#");let regexPrefix=makeRegexPrefix(body);return new IgnoreRule(pattern,mark,body,ignoreCase,negative,regexPrefix)},RuleManager=class{constructor(ignoreCase){this._ignoreCase=ignoreCase,this._rules=[],this._basenameCount=0}_add(pattern){if(pattern&&pattern[KEY_IGNORE]){this._rules=this._rules.concat(pattern._rules._rules),this._basenameCount+=pattern._rules._basenameCount,this._added=!0;return}isString(pattern)&&(pattern={pattern});let rule=checkPattern(pattern.pattern)&&createRule(pattern,this._ignoreCase);rule&&(this._added=!0,this._rules.push(rule),matchesBasename(rule.body)&&this._basenameCount++)}add(pattern){return this._added=!1,makeArray(isString(pattern)?splitPattern(pattern):pattern).forEach(this._add,this),this._added&&(this._literalRules=UNDEFINED),this._added}testLiteral(path){let rules=this._literalRules||(this._literalRules=this._rules.filter(({body})=>body[body.length-(body[body.length-1]===SLASH?2:1)]==="*")),ignored=!1,unignored=!1,matchedRule;for(let index=rules.length-1;index>=0;index--){let rule=rules[index];if(rule.checkRegex.test(path)){ignored=!rule.negative,unignored=rule.negative,matchedRule=rule.negative?UNDEFINED:rule;break}}let ret={ignored,unignored};return matchedRule&&(ret.rule=matchedRule),ret}test(path,checkUnignored,mode){let ignored=!1,unignored=!1,matchedRule,rules=this._rules,{length}=rules,shortcut=this._basenameCount*2>=length,basename5=shortcut?basenameOf(path):path;for(let index=0;index<length;index++){let rule=rules[index],{negative}=rule;!(unignored===negative&&ignored!==unignored||negative&&!ignored&&!unignored&&!checkUnignored)&&rule[mode].test(shortcut&&rule._basenameOnly?basename5:path)&&(ignored=!negative,unignored=negative,matchedRule=negative?UNDEFINED:rule)}let ret={ignored,unignored};return matchedRule&&(ret.rule=matchedRule),ret}},throwError=(message,Ctor)=>{throw new Ctor(message)},checkPath=(path,originalPath,doThrow)=>isString(path)?path?checkPath.isNotRelative(path)?doThrow(`path should be a \`path.relative()\`d string, but got "${originalPath}"`,RangeError):!0:doThrow("path must not be empty",TypeError):doThrow(`path must be a string, but got \`${originalPath}\``,TypeError),isNotRelative=path=>{let first=path.charCodeAt(0);if(first===SLASH_CODE)return!0;if(first!==DOT_CODE)return!1;if(path.length===1)return!0;let second=path.charCodeAt(1);return second===SLASH_CODE?!0:second!==DOT_CODE?!1:path.length===2||path.charCodeAt(2)===SLASH_CODE};checkPath.isNotRelative=isNotRelative;checkPath.convert=p=>p;var Ignore=class{constructor({ignorecase=!0,ignoreCase=ignorecase,allowRelativePaths=!1}={}){define(this,KEY_IGNORE,!0),this._rules=new RuleManager(ignoreCase),this._strictPathCheck=!allowRelativePaths,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(pattern){return this._rules.add(pattern)&&this._initCache(),this}addPattern(pattern){return this.add(pattern)}_test(originalPath,cache,checkUnignored){let path=originalPath&&checkPath.convert(originalPath);return checkPath(path,originalPath,this._strictPathCheck?throwError:RETURN_FALSE),this._t(path,cache,checkUnignored)}checkIgnore(path){if(path.charCodeAt(path.length-1)!==SLASH_CODE)return this.test(path);let dir=this._t(path,this._testCache,!0);if(dir.ignored)return dir;let literal=this._rules.testLiteral(path);return literal.ignored||literal.unignored?literal:dir}_t(path,cache,checkUnignored){if(path in cache)return cache[path];let parentPath=parentOf2(path),parent=parentPath?this._t(parentPath,cache,checkUnignored):UNDEFINED;return cache[path]=parent&&parent.ignored?parent:this._rules.test(path,checkUnignored,MODE_IGNORE)}ignores(path){return this._test(path,this._ignoreCache,!1).ignored}createFilter(){return path=>!this.ignores(path)}filter(paths){return makeArray(paths).filter(this.createFilter())}test(path){return this._test(path,this._testCache,!0)}},factory2=options=>new Ignore(options),isPathValid=path=>checkPath(path&&checkPath.convert(path),path,RETURN_FALSE),setupWindows=()=>{let makePosix=str=>/^\\\\\?\\/.test(str)||/["<>|\u0000-\u001F]+/u.test(str)?str:str.replace(/\\/g,"/");checkPath.convert=makePosix;let REGEX_TEST_WINDOWS_PATH_ABSOLUTE=/^[a-z]:\//i;checkPath.isNotRelative=path=>REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path)||isNotRelative(path)};typeof process<"u"&&process.platform==="win32"&&setupWindows();module.exports=factory2;factory2.default=factory2;module.exports.isPathValid=isPathValid;define(module.exports,Symbol.for("setupWindows"),setupWindows)}});var import_ts_morph=__toESM(require_ts_morph(),1),import_ts_morph2=__toESM(require_ts_morph(),1),import_ts_morph3=__toESM(require_ts_morph(),1),import_ts_morph4=__toESM(require_ts_morph(),1),import_ts_morph5=__toESM(require_ts_morph(),1),import_semver=__toESM(require_semver2(),1),import_ts_morph6=__toESM(require_ts_morph(),1),import_ts_morph7=__toESM(require_ts_morph(),1),import_ts_morph8=__toESM(require_ts_morph(),1),import_yaml=__toESM(require_dist(),1),import_ts_morph9=__toESM(require_ts_morph(),1),import_ini=__toESM(require_ini(),1),import_ts_morph10=__toESM(require_ts_morph(),1),import_ts_morph11=__toESM(require_ts_morph(),1),import_yaml2=__toESM(require_dist(),1),import_ts_morph12=__toESM(require_ts_morph(),1),import_ts_morph13=__toESM(require_ts_morph(),1),import_ts_morph14=__toESM(require_ts_morph(),1),import_ignore=__toESM(require_ignore(),1),import_ts_morph15=__toESM(require_ts_morph(),1),import_ts_morph16=__toESM(require_ts_morph(),1);import{existsSync as existsSync8,realpathSync as realpathSync5}from"fs";import{join as join10}from"path";import{mkdtempSync,rmSync,writeFileSync}from"fs";import{tmpdir}from"os";import{join as join2}from"path";import{existsSync,readdirSync,readFileSync,statSync}from"fs";import{dirname,join,resolve}from"path";import{relative}from"path";import{mkdirSync,mkdtempSync as mkdtempSync2,realpathSync as realpathSync4,rmSync as rmSync2,symlinkSync}from"fs";import{builtinModules}from"module";import{tmpdir as tmpdir2}from"os";import{dirname as dirname6,join as join9,relative as relative6}from"path";import{relative as relative2}from"path";import{existsSync as existsSync5,readFileSync as readFileSync5,realpathSync as realpathSync2}from"fs";import{dirname as dirname4,join as join6,resolve as resolve3}from"path";import{existsSync as existsSync2,readFileSync as readFileSync2}from"fs";import{dirname as dirname2,join as join3,relative as relative3}from"path";import{existsSync as existsSync3,readdirSync as readdirSync2,readFileSync as readFileSync3,realpathSync,statSync as statSync2}from"fs";import{dirname as dirname3,join as join4,relative as relative4,resolve as resolve2}from"path";import{existsSync as existsSync4,readdirSync as readdirSync3,readFileSync as readFileSync4}from"fs";import{join as join5}from"path";import{existsSync as existsSync7,readFileSync as readFileSync7}from"fs";import{join as join8}from"path";import{existsSync as existsSync6,readFileSync as readFileSync6,realpathSync as realpathSync3}from"fs";import{dirname as dirname5,join as join7,relative as relative5}from"path";import{homedir}from"os";import{join as join11}from"path";import{randomUUID}from"crypto";import{mkdir,readFile,rename,writeFile}from"fs/promises";import{dirname as dirname7,join as join12}from"path";import{existsSync as existsSync9,readFileSync as readFileSync8}from"fs";import{homedir as homedir2}from"os";import{dirname as dirname8,join as join13,relative as relative7,resolve as resolve4}from"path";import{createHash}from"crypto";import{existsSync as existsSync10}from"fs";import{mkdir as mkdir2,readFile as readFile2,rename as rename2,rm,writeFile as writeFile2}from"fs/promises";import{tmpdir as tmpdir3}from"os";import{dirname as dirname10,join as join15,resolve as resolve5}from"path";import{mkdirSync as mkdirSync2,writeFileSync as writeFileSync2}from"fs";import{dirname as dirname9,join as join14,normalize,sep}from"path";import{gunzipSync}from"zlib";import{basename as basename2}from"path";import{existsSync as existsSync12,readFileSync as readFileSync10,realpathSync as realpathSync6,rmSync as rmSync3,writeFileSync as writeFileSync3}from"fs";import{builtinModules as builtinModules2,createRequire}from"module";import{basename,dirname as dirname11,join as join17,relative as relative9}from"path";import{existsSync as existsSync11,readdirSync as readdirSync4,readFileSync as readFileSync9}from"fs";import{join as join16,relative as relative8,resolve as resolve6}from"path";import{join as join18}from"path";import{readFileSync as readFileSync11}from"fs";import{basename as basename4,dirname as dirname12,join as join19,resolve as resolve7}from"path";import{basename as basename3}from"path";import{existsSync as existsSync14,readFileSync as readFileSync13}from"fs";import{dirname as dirname14,join as join21,relative as relative11}from"path";import{existsSync as existsSync13,readdirSync as readdirSync5,readFileSync as readFileSync12}from"fs";import{dirname as dirname13,join as join20,relative as relative10}from"path";import{readFileSync as readFileSync15}from"fs";import{join as join23}from"path";import{readdirSync as readdirSync6,readFileSync as readFileSync14}from"fs";import{join as join22,relative as relative12}from"path";import{execFileSync}from"child_process";import{cpSync,existsSync as existsSync15,mkdirSync as mkdirSync3,mkdtempSync as mkdtempSync3,readdirSync as readdirSync7,readFileSync as readFileSync16,realpathSync as realpathSync7,renameSync,rmSync as rmSync4,symlinkSync as symlinkSync2,writeFileSync as writeFileSync4}from"fs";import{homedir as homedir3,tmpdir as tmpdir4}from"os";import{dirname as dirname15,join as join24,resolve as resolve8,sep as sep2}from"path";import{readFileSync as readFileSync22,realpathSync as realpathSync8}from"fs";import{join as join30,relative as relative15,resolve as resolve12,sep as sep3}from"path";import{readdirSync as readdirSync8,readFileSync as readFileSync18}from"fs";import{availableParallelism}from"os";import{join as join26,relative as relative14,resolve as resolve9}from"path";import{Worker}from"worker_threads";import{readFileSync as readFileSync17}from"fs";import{join as join25,relative as relative13}from"path";import{readdirSync as readdirSync9,readFileSync as readFileSync19,statSync as statSync3}from"fs";import{join as join27,resolve as resolve10}from"path";import{execFileSync as execFileSync2}from"child_process";import{existsSync as existsSync16,readFileSync as readFileSync20}from"fs";import{availableParallelism as availableParallelism2,freemem,platform,totalmem}from"os";import{dirname as dirname16,join as join28,resolve as resolve11}from"path";import{existsSync as existsSync17,readdirSync as readdirSync10,readFileSync as readFileSync21,statSync as statSync4}from"fs";import{join as join29}from"path";var path_exports={};__export(path_exports,{callSignature:()=>callSignature,constructSignature:()=>constructSignature,element:()=>element,indexSignature:()=>indexSignature,instanceMember:()=>instanceMember,joinPath:()=>joinPath,leafOf:()=>leafOf,parentOf:()=>parentOf,scoped:()=>scoped,splitPath:()=>splitPath,staticMember:()=>staticMember,topLevel:()=>topLevel});var IDENTIFIER=/^[A-Za-z_$][\w$]*$/;function segment(name){return IDENTIFIER.test(name)?name:JSON.stringify(name)}function staticMember(parent,name){return`${parent}.${segment(name)}`}function instanceMember(parent,name){return`${parent}#${segment(name)}`}function element(parent){return`${parent}[]`}function indexSignature(parent,keyType){return`${parent}#[${keyType}]`}function callSignature(parent){return`${parent}#()`}function constructSignature(parent){return`${parent}.new()`}function scoped(specifier,path){return`${JSON.stringify(specifier)}:${path}`}function topLevel(name){return segment(name)}function splitPath(path){let i=0,scope,readQuoted=()=>{let j=i+1;for(;j<path.length;)if(path[j]==="\\")j+=2;else{if(path[j]==='"')break;j++}let raw=path.slice(i,j+1);return i=j+1,raw};if(path[0]==='"'){let quoted=readQuoted();path[i]===":"?(scope=JSON.parse(quoted),i++):i=0}let segments=[],current="";for(;i<path.length;){let ch=path[i];if(ch==='"'){current+=readQuoted();continue}if((ch==="."||ch==="#")&&current!==""){segments.push(current),current=ch,i++;continue}if(ch==="["&&path[i+1]==="]"&&current!==""){segments.push(current),current="[]",i+=2;continue}current+=ch,i++}return current!==""&&segments.push(current),scope===void 0?{segments}:{scope,segments}}function joinPath(parts){let body=parts.segments.join("");return parts.scope===void 0?body:`${JSON.stringify(parts.scope)}:${body}`}function parentOf(path){let parts=splitPath(path);if(!(parts.segments.length<=1))return joinPath({...parts,segments:parts.segments.slice(0,-1)})}function leafOf(path){let{segments}=splitPath(path),last=segments[segments.length-1]??"",raw=last.startsWith(".")||last.startsWith("#")?last.slice(1):last;return raw.startsWith('"')?JSON.parse(raw):raw}var USAGE_CERTAINTY={direct:1,alias:.95,reexport:.95,destructure:.9,inferred:.8,require:.85};function usagePaths(usage){return usage.canonicalPath!==void 0&&usage.canonicalPath!==usage.symbolPath?[usage.symbolPath,usage.canonicalPath]:[usage.symbolPath]}function repoTypeChecks(file,head,checkJs){return/@ts-nocheck/.test(head)?!1:/\.(js|jsx|cjs|mjs)$/i.test(file)?checkJs||/@ts-check/.test(head):!0}var OPEN=new Set(["(","[","{","<"]),CLOSE=new Set([")","]","}",">"]);function splitTopLevel(text,sep4){let parts=[],depth2=0,quote2,start=0;for(let i=0;i<text.length;i++){let ch=text[i];if(quote2){ch==="\\"?i++:ch===quote2&&(quote2=void 0);continue}ch==="'"||ch==='"'||ch==="`"?quote2=ch:OPEN.has(ch)?depth2++:CLOSE.has(ch)?depth2--:ch===sep4[0]&&depth2===0&&text.startsWith(sep4,i)&&(parts.push(text.slice(start,i).trim()),start=i+sep4.length,i=start-1)}return parts.push(text.slice(start).trim()),parts.filter(p=>p!=="")}function unionMembers(type){let stripped=type.startsWith("| ")?type.slice(2):type;return splitTopLevel(stripped,"|").map(m=>m.trim())}function parseParam(text){let m=/^(\.\.\.)?([A-Za-z_$][\w$]*|\{[\s\S]*\}|\[[\s\S]*\])(\?)?\s*:\s*([\s\S]+)$/.exec(text);if(!m){let bare=/^(\.\.\.)?([A-Za-z_$][\w$]*)(\?)?$/.exec(text);return bare?{name:bare[2],optional:bare[3]==="?",rest:bare[1]==="...",type:"any"}:void 0}return{name:m[2],optional:m[3]==="?",rest:m[1]==="...",type:m[4].trim()}}function parseOverload(text){let rest=text.replace(/^(protected|abstract|readonly|static)\s+/g,"").trim(),typeParams2=[];if(rest.startsWith("<")){let end=matchingClose(rest,0);if(end===-1)return;typeParams2.push(...splitTopLevel(rest.slice(1,end),",")),rest=rest.slice(end+1).trim()}if(!rest.startsWith("("))return;let close=matchingClose(rest,0);if(close===-1)return;let paramText=rest.slice(1,close),after=rest.slice(close+1).trim();if(after!==""&&!after.startsWith(":")&&!after.startsWith("=>"))return;let returnType=after.startsWith(":")?after.slice(1).trim():after.startsWith("=>")?after.slice(2).trim():"void",params2=[],thisType;for(let p of splitTopLevel(paramText,",")){let parsed2=parseParam(p);if(!parsed2)return;if(parsed2.name==="this"&&params2.length===0&&thisType===void 0){thisType=parsed2.type;continue}params2.push(parsed2)}let overload={typeParams:typeParams2,params:params2,returnType};return thisType!==void 0&&(overload.thisType=thisType),overload}function matchingClose(text,openIndex){let open=text[openIndex],close=open==="("?")":open==="<"?">":open==="["?"]":"}",depth2=0,quote2;for(let i=openIndex;i<text.length;i++){let ch=text[i];if(quote2){ch==="\\"?i++:ch===quote2&&(quote2=void 0);continue}if(ch==="'"||ch==='"'||ch==="`")quote2=ch;else if(ch===open)depth2++;else if(ch===close&&--depth2===0)return i}return-1}function parseCallable(signature){let overloads=[];for(let text of splitTopLevel(signature,";")){let parsed2=parseOverload(text);if(!parsed2)return;overloads.push(parsed2)}return overloads.length>0?overloads:void 0}function looksCallable(signature){return/^(protected |abstract |static )*(<|\()/.test(signature)?parseCallable(signature.replace(/^(protected |abstract |static )+/,""))!==void 0:!1}var LEADING_KEYWORDS=/^(readonly |protected |abstract |static |const |let |var )+/;function asCallable(signature){let text=signature.replace(LEADING_KEYWORDS,"").trim(),inner=/^\{ (.*) \}$/.exec(text)?.[1]??text;return looksCallable(inner)?inner:void 0}function typeParamName(declaration){return/^(?:const\s+)?([A-Za-z_$][\w$]*)/.exec(declaration.trim())?.[1]}function renamePositional(o){let names=o.typeParams.map(tp=>typeParamName(tp)).filter(n=>n!==void 0),rename3=text=>names.reduce((acc,name,i)=>acc.replace(new RegExp(`\\b${name.replace(/\$/g,"\\$")}\\b`,"g"),`T${i}`),text);return{typeParams:o.typeParams.map(rename3),params:o.params.map(p=>({...p,type:rename3(p.type)})),returnType:rename3(o.returnType),...o.thisType!==void 0?{thisType:rename3(o.thisType)}:{}}}function callableShape(signature){let text=asCallable(signature),overloads=text?parseCallable(text):void 0;if(overloads)return overloads.map(renamePositional).map(o=>{let tp=o.typeParams.length>0?`<${o.typeParams.join(", ")}>`:"",params2=[...o.thisType!==void 0?[`this: ${o.thisType}`]:[],...o.params.map(p=>`${p.rest?"...":""}${p.type}${p.optional?"?":""}`)].join(", ");return`${tp}(${params2}): ${o.returnType}`}).join("; ")}var DECLARATION=/\.d\.(c|m)?ts$/;function siblingDeclaration(file){if(DECLARATION.test(file))return file;let m=/\.(m|c)?(j|t)sx?$/.exec(file);if(m)return`${file.slice(0,m.index)}.d.${m[1]??""}ts`}function resolveTypesFile(dir,target){let candidate=siblingDeclaration(target);if(!candidate)return;let abs=resolve(dir,candidate);return existsSync(abs)?abs:void 0}var PREFERRED_CONDITIONS=["types","import","default"];function resolveFromExports(dir,value){if(value===null)return;if(typeof value=="string")return resolveTypesFile(dir,value);if(Array.isArray(value)){for(let item of value){let found=resolveFromExports(dir,item);if(found)return found}return}let keys=Object.keys(value),ordered=[...PREFERRED_CONDITIONS.filter(k=>keys.includes(k)),...keys.filter(k=>!PREFERRED_CONDITIONS.includes(k))];for(let key2 of ordered){let found=resolveFromExports(dir,value[key2]);if(found)return found}}function implicitSubpaths(dir,rootFile){let out=new Map,names;try{names=readdirSync(dir)}catch{return out}for(let entry of names){if(entry.startsWith(".")||entry==="node_modules")continue;let full2=join(dir,entry),isDir;try{isDir=statSync(full2).isDirectory()}catch{continue}if(isDir){let nested=join(full2,"package.json");if(!existsSync(nested))continue;let pkg;try{pkg=JSON.parse(readFileSync(nested,"utf8"))}catch{continue}for(let c of[pkg.types,pkg.typings,pkg.main]){let file=typeof c=="string"?resolveTypesFile(full2,c):void 0;if(file){out.set(`./${entry}`,file);break}}continue}let m=/^(.+?)\.d\.(c|m)?ts$/.exec(entry);!m||m[1]==="index"||rootFile!==void 0&&resolve(full2)===rootFile||out.set(`./${m[1]}`,resolve(full2))}return out}function resolveEntryPoints(dir,name,version){let pkg=JSON.parse(readFileSync(join(dir,"package.json"),"utf8")),found=new Map,exportsField=pkg.exports;if(exportsField!==void 0){let map=typeof exportsField=="object"&&exportsField!==null&&!Array.isArray(exportsField)&&Object.keys(exportsField).every(k=>k.startsWith("."))?exportsField:{".":exportsField};for(let[subpath,value]of Object.entries(map)){if(subpath.includes("*"))continue;let file=resolveFromExports(dir,value);file&&found.set(subpath,file)}}if(!found.has(".")){let mainDir=typeof pkg.main=="string"?join(dirname(pkg.main),"index.d.ts"):void 0,candidates=[pkg.types,pkg.typings,pkg.main,mainDir,"index.d.ts"].filter(c=>typeof c=="string");for(let c of candidates){let file=resolveTypesFile(dir,c);if(file){found.set(".",file);break}}}if(exportsField===void 0)for(let[subpath,file]of implicitSubpaths(dir,found.get(".")))found.has(subpath)||found.set(subpath,file);if(found.size===0)throw new NoTypesError(name,version);return[...found.entries()].map(([entry,file])=>({entry,file})).sort((a,b)=>a.entry==="."?-1:b.entry==="."?1:a.entry.localeCompare(b.entry))}var resets=[];function onReset(reset){resets.push(reset)}function resetSharedState(){for(let reset of resets)reset()}var newPrinter=()=>import_ts_morph4.ts.createPrinter({removeComments:!0,omitTrailingSemicolon:!0}),printer=newPrinter();onReset(()=>{printer=newPrinter()});function normalizeText(text){return text.replace(/\s+/g," ").replace(/; }/g," }").replace(/;\s*$/,"").trim()}function transformer(opts){return context=>{let{factory:factory2}=context,visit=node=>{if(opts.collapse!==void 0&&node===opts.collapse)return factory2.createTypeReferenceNode("{\u2026}");let visited=import_ts_morph4.ts.visitEachChild(node,visit,context);if(import_ts_morph4.ts.isUnionTypeNode(visited)){let sorted=[...visited.types].map(t=>({t,key:printer.printNode(import_ts_morph4.ts.EmitHint.Unspecified,t,t.getSourceFile())})).sort((a,b)=>a.key<b.key?-1:a.key>b.key?1:0).map(x=>x.t);return factory2.updateUnionTypeNode(visited,factory2.createNodeArray(sorted))}return import_ts_morph4.ts.isImportTypeNode(visited)&&visited.qualifier?factory2.createTypeReferenceNode(visited.qualifier,visited.typeArguments):visited};return root=>visit(root)}}function printCompilerNode(node,opts={}){let result;try{result=import_ts_morph4.ts.transform(node,[transformer(opts)]);let transformed=result.transformed[0]??node;return normalizeText(printer.printNode(import_ts_morph4.ts.EmitHint.Unspecified,transformed,node.getSourceFile()))}catch(err){throw printer=newPrinter(),err}finally{result?.dispose()}}function printNode(node,opts={}){return printCompilerNode(node.compilerNode,opts)}function printCallable(node,opts={}){let cn=node.compilerNode,sig=import_ts_morph4.ts.factory.createCallSignature(cn.typeParameters,cn.parameters,cn.type);import_ts_morph4.ts.setSourceMapRange(sig,cn);let result=import_ts_morph4.ts.transform(sig,[transformer(opts)]),text=printer.printNode(import_ts_morph4.ts.EmitHint.Unspecified,result.transformed[0]??sig,cn.getSourceFile());return result.dispose(),normalizeText(text)}function printTypeNode(typeNode,opts={}){if(import_ts_morph4.Node.isTypeQuery(typeNode)){let text=typeNode.getType().getText(void 0,import_ts_morph4.ts.TypeFormatFlags.NoTruncation);if(!text.startsWith("typeof ")&&!text.startsWith("import("))return normalizeText(text)}if(import_ts_morph4.Node.isImportTypeNode(typeNode)){let text=typeNode.getType().getText(void 0,import_ts_morph4.ts.TypeFormatFlags.NoTruncation);if(isLiteralUnion(text))return normalizeText(text)}return printNode(typeNode,opts)}function isLiteralUnion(text){return text.split("|").map(part=>part.trim()).every(part=>/^("([^"\\]|\\.)*"|'([^'\\]|\\.)*'|-?\d+(\.\d+)?|true|false|null|undefined)$/.test(part))}var STRENGTH=["class","function","variable","interface","enum","type","namespace","module"];function kindOf(node){if(import_ts_morph3.Node.isClassDeclaration(node))return"class";if(import_ts_morph3.Node.isFunctionDeclaration(node))return"function";if(import_ts_morph3.Node.isVariableDeclaration(node))return"variable";if(import_ts_morph3.Node.isInterfaceDeclaration(node))return"interface";if(import_ts_morph3.Node.isEnumDeclaration(node))return"enum";if(import_ts_morph3.Node.isModuleDeclaration(node)||import_ts_morph3.Node.isSourceFile(node))return"namespace";if(import_ts_morph3.Node.isTypeAliasDeclaration(node))return"type"}function strongest(kinds){return[...kinds].sort((a,b)=>STRENGTH.indexOf(a)-STRENGTH.indexOf(b))[0]??"type"}function jsDocTag(nodes,name){for(let declared of nodes){let node=import_ts_morph3.Node.isVariableDeclaration(declared)?declared.getVariableStatement()??declared:declared;if(import_ts_morph3.Node.isJSDocable(node)){for(let doc of node.getJsDocs())for(let tag of doc.getTags())if(tag.getTagName()===name){let text=tag.getCommentText()?.trim();return text||!0}}}}function deprecatedOf(nodes){return jsDocTag(nodes,"deprecated")}function isInternal(nodes){return jsDocTag(nodes,"internal")!==void 0}function isProtected(nodes){return nodes.some(n=>import_ts_morph3.Node.isScoped(n)&&n.getScope()==="protected")}function memberName(node){let raw=node.getName();if(/^['"]/.test(raw))try{return JSON.parse(raw.replace(/^'(.*)'$/s,(_,s)=>JSON.stringify(s)))}catch{return raw}return raw}function typeParams(node){if(!import_ts_morph3.Node.isTypeParametered(node))return"";let params2=node.getTypeParameters();return params2.length===0?"":`<${params2.map(p=>printNode(p)).join(", ")}>`}function expandable(typeNode){if(typeNode){if(import_ts_morph3.Node.isTypeLiteral(typeNode))return{literal:typeNode,array:!1};if(import_ts_morph3.Node.isArrayTypeNode(typeNode)){let el=typeNode.getElementTypeNode();if(import_ts_morph3.Node.isTypeLiteral(el))return{literal:el,array:!0}}if(import_ts_morph3.Node.isTypeReference(typeNode)){let name=typeNode.getTypeName().getText(),args=typeNode.getTypeArguments(),first=args[0];if((name==="Array"||name==="ReadonlyArray")&&args.length===1&&first&&import_ts_morph3.Node.isTypeLiteral(first))return{literal:first,array:!0}}}}function modifiers(node){let parts=[];return import_ts_morph3.Node.isScoped(node)&&node.getScope()==="protected"&&parts.push("protected"),import_ts_morph3.Node.isAbstractable(node)&&node.isAbstract()&&parts.push("abstract"),import_ts_morph3.Node.isReadonlyable(node)&&node.isReadonly()&&parts.push("readonly"),parts.length===0?"":`${parts.join(" ")} `}function isHidden(node){return import_ts_morph3.Node.isScoped(node)&&node.getScope()==="private"?!0:(import_ts_morph3.Node.hasName(node)?node.getName():"").startsWith("#")}var MAX_NESTING=32;function emit(ctx,symbol,nodes){let full2={...symbol,exportedFrom:[ctx.sink.entry]};full2.optional===void 0&&delete full2.optional,full2.deprecated===void 0&&delete full2.deprecated;let visibility=ctx.visibility??(isInternal(nodes)?"internal":isProtected(nodes)?"protected":void 0);visibility&&(full2.visibility=visibility),ctx.exportEquals&&symbol.path===ctx.root&&(full2.exportEquals=!0);let first=nodes[0];if(first&&(full2.file=relative(ctx.sink.packageDir,first.getSourceFile().getFilePath()).split("\\").join("/")),first&&!ctx.inherited){let cls=ctx.sink.byDeclaration.get(first.compilerNode)??{symbols:[]};cls.declaredName===void 0&&import_ts_morph3.Node.hasName(first)&&(cls.declaredName=first.getName()),cls.symbols.push(full2);for(let node of nodes)ctx.sink.byDeclaration.set(node.compilerNode,cls)}return ctx.sink.emit(ctx.root,full2),visibility==="internal"?{...ctx,visibility}:ctx}function assignAliases(byDeclaration){for(let{declaredName,symbols}of byDeclaration.values()){let distinct=new Map;for(let s of symbols){let list=distinct.get(s.path)??[];list.push(s),distinct.set(s.path,list)}if(distinct.size<2)continue;let rank=path=>[splitPath(path).segments.length,leafOf(path)===declaredName?0:1],canonical;for(let path of distinct.keys()){if(canonical===void 0){canonical=path;continue}let[a,b]=[rank(path),rank(canonical)];(a[0]<b[0]||a[0]===b[0]&&a[1]<b[1])&&(canonical=path)}for(let[path,list]of distinct)if(path!==canonical)for(let s of list)s.aliasOf=canonical}}function walkProperty(ctx,path,node){let typeNode=node.getTypeNode(),expansion=expandable(typeNode),type=typeNode?printTypeNode(typeNode,expansion?{collapse:expansion.literal.compilerNode}:{}):"any",symbol={path,kind:"property",signature:`${modifiers(node)}${type}`,deprecated:deprecatedOf([node])};node.hasQuestionToken()&&(symbol.optional=!0);let inner=emit(ctx,symbol,[node]);expansion&&walkTypeMembers(inner,expansion.array?element(path):path,[expansion.literal])}function walkAccessors(ctx,path,getters,setters){let getter=getters[0],setter=setters[0],typeNode=getter?.getReturnTypeNode()??setter?.getParameters()[0]?.getTypeNode(),type=typeNode?printTypeNode(typeNode):"any",readonly=setter===void 0?"readonly ":"",scope=getter??setter,prot=import_ts_morph3.Node.isScoped(scope)&&scope.getScope()==="protected"?"protected ":"";emit(ctx,{path,kind:"property",signature:`${prot}${readonly}${type}`,deprecated:deprecatedOf([...getters,...setters])},[...getters,...setters])}function walkCallableGroup(ctx,path,nodes,optional=!1){let symbol={path,kind:"method",signature:nodes.map(n=>`${modifiers(n)}${printCallable(n)}`).join("; "),deprecated:deprecatedOf(nodes)};optional&&(symbol.optional=!0),emit(ctx,symbol,nodes)}function groupBy(items,key2){let out=new Map;for(let item of items){let k=key2(item),list=out.get(k);list?list.push(item):out.set(k,[item])}return out}function walkTypeMembers(ctx,path,containers){let props=containers.flatMap(c=>c.getProperties());for(let prop of props)walkProperty(ctx,instanceMember(path,memberName(prop)),prop);let methods=groupBy(containers.flatMap(c=>c.getMethods()),m=>memberName(m));for(let[name,overloads]of methods)walkCallableGroup(ctx,instanceMember(path,name),overloads,overloads.some(m=>m.hasQuestionToken()));let getters=groupBy(containers.flatMap(c=>c.getGetAccessors()),g=>memberName(g)),setters=groupBy(containers.flatMap(c=>c.getSetAccessors()),s=>memberName(s));for(let name of new Set([...getters.keys(),...setters.keys()]))walkAccessors(ctx,instanceMember(path,name),getters.get(name)??[],setters.get(name)??[]);let calls=containers.flatMap(c=>c.getCallSignatures());calls.length>0&&walkCallableGroup(ctx,callSignature(path),calls);let constructs=containers.flatMap(c=>c.getConstructSignatures());constructs.length>0&&walkCallableGroup(ctx,constructSignature(path),constructs);for(let index of containers.flatMap(c=>c.getIndexSignatures())){let keyType=printNode(index.getKeyTypeNode()),valueType=index.getReturnTypeNode();emit(ctx,{path:indexSignature(path,keyType),kind:"property",signature:`${index.isReadonly()?"readonly ":""}${valueType?printNode(valueType):"any"}`,deprecated:deprecatedOf([index])},[index])}}function walkClassMembers(ctx,path,classes){let ctors=classes.flatMap(c=>c.getConstructors());ctors.length>0&&walkCallableGroup(ctx,constructSignature(path),ctors);let member=(node,name)=>node.isStatic()?staticMember(path,name):instanceMember(path,name);for(let prop of classes.flatMap(c=>c.getProperties()))isHidden(prop)||walkProperty(ctx,member(prop,memberName(prop)),prop);let methods=groupBy(classes.flatMap(c=>c.getMethods()).filter(m=>!isHidden(m)),m=>`${m.isStatic()?"s":"i"}:${memberName(m)}`);for(let overloads of methods.values()){let first=overloads[0];walkCallableGroup(ctx,member(first,memberName(first)),overloads,overloads.some(m=>m.hasQuestionToken()))}let getters=groupBy(classes.flatMap(c=>c.getGetAccessors()).filter(g=>!isHidden(g)),g=>`${g.isStatic()?"s":"i"}:${memberName(g)}`),setters=groupBy(classes.flatMap(c=>c.getSetAccessors()).filter(s=>!isHidden(s)),s=>`${s.isStatic()?"s":"i"}:${memberName(s)}`);for(let key2 of new Set([...getters.keys(),...setters.keys()])){let any=(getters.get(key2)??setters.get(key2))?.[0];walkAccessors(ctx,member(any,memberName(any)),getters.get(key2)??[],setters.get(key2)??[])}}function walkInheritedMembers(ctx,path,decls,own){let first=decls[0];if(!first)return;let inner={...ctx,inherited:!0},inPackage=node=>node.getSourceFile().getFilePath().startsWith(`${ctx.sink.packageDir}/`),emitMember=(memberPath,nodes)=>{let usable=nodes.filter(inPackage).filter(n=>!isHidden(n));if(usable.length===0)return;let props=usable.filter(n=>import_ts_morph3.Node.isPropertyDeclaration(n)||import_ts_morph3.Node.isPropertySignature(n)),methods=usable.filter(n=>import_ts_morph3.Node.isMethodDeclaration(n)||import_ts_morph3.Node.isMethodSignature(n)),getters=usable.filter(import_ts_morph3.Node.isGetAccessorDeclaration),setters=usable.filter(import_ts_morph3.Node.isSetAccessorDeclaration);methods.length>0?walkCallableGroup(inner,memberPath,methods,methods.some(m=>import_ts_morph3.Node.isQuestionTokenable(m)&&m.hasQuestionToken())):props[0]?walkProperty(inner,memberPath,props[0]):(getters.length>0||setters.length>0)&&walkAccessors(inner,memberPath,getters,setters)},instance=first.getType();for(let prop of instance.getProperties()){let name=prop.getName();own.has(`i:${name}`)||emitMember(instanceMember(path,name),prop.getDeclarations())}let cls=decls.find(import_ts_morph3.Node.isClassDeclaration);if(cls){let symbol=cls.getSymbol();if(!symbol)return;let statics=ctx.sink.checker.getTypeOfSymbolAtLocation(symbol,cls);for(let prop of statics.getProperties()){let name=prop.getName();name==="prototype"||own.has(`s:${name}`)||emitMember(staticMember(path,name),prop.getDeclarations())}}}function ownMemberKeys(decls){let keys=new Set;for(let d of decls){for(let m of[...d.getProperties(),...d.getMethods()])keys.add(`${import_ts_morph3.Node.isStaticable(m)&&m.isStatic()?"s":"i"}:${memberName(m)}`);for(let m of[...d.getGetAccessors(),...d.getSetAccessors()])keys.add(`${import_ts_morph3.Node.isStaticable(m)&&m.isStatic()?"s":"i"}:${memberName(m)}`)}return keys}function classHeader(cls){let parts=[cls.isAbstract()?"abstract class":"class"];parts[0]+=typeParams(cls);let ext=cls.getExtends();ext&&parts.push(`extends ${printNode(ext)}`);let impl=cls.getImplements();return impl.length>0&&parts.push(`implements ${impl.map(i=>printNode(i)).join(", ")}`),parts.join(" ")}function interfaceHeader(decls){let first=decls[0],ext=decls.flatMap(d=>d.getExtends()).map(e=>printNode(e));return`interface${typeParams(first)}${ext.length>0?` extends ${[...new Set(ext)].sort().join(", ")}`:""}`}function enumHeader(decl){return decl.isConstEnum()?"const enum":"enum"}function walkEnumMembers(ctx,path,decls){for(let member of decls.flatMap(d=>d.getMembers())){let value=member.getValue();emit(ctx,{path:staticMember(path,memberName(member)),kind:"enumMember",signature:value===void 0?"":JSON.stringify(value),deprecated:deprecatedOf([member])},[member])}}function variableKeyword(decl){return decl.getVariableStatement()?.getDeclarationKind()??"const"}function resolveAlias(symbol){return(symbol.getFlags()&import_ts_morph3.ts.SymbolFlags.Alias)!==0?symbol.getAliasedSymbol()??symbol:symbol}function namedExports(symbols){let out=new Map;for(let exp of symbols){let name=exp.getName();if(name==="prototype"||name===import_ts_morph3.ts.InternalSymbolName.ExportEquals)continue;let decls=resolveAlias(exp).getDeclarations().filter(d=>!import_ts_morph3.Node.isClassDeclaration(d.getParent()));decls.length>0&&out.set(name,decls)}return out}function mergedSymbol(ctx,node){return import_ts_morph3.Node.isSourceFile(node)?node.getSymbol():ctx.sink.checker.getSymbolAtLocation(node.getNameNode())}function namespaceExports(ctx,modules){let first=modules[0],symbol=first?mergedSymbol(ctx,first):void 0;return symbol?namedExports(symbol.getExports()):new Map}function walkNamed(parent,path,decls){let kinds=decls.map(kindOf).filter(k=>k!==void 0);if(kinds.length===0)return;let kind=strongest(kinds),cycle=decls.map(d=>parent.ancestors?.get(d.compilerNode)).find(p=>p!==void 0),depth2=(parent.depth??0)+1;if(cycle!==void 0||depth2>MAX_NESTING){emit(parent,{path,kind,signature:cycle!==void 0?`recursive type ${cycle} (compared by name)`:`nested deeper than ${MAX_NESTING} levels (compared by name)`,deprecated:deprecatedOf(decls)},decls);return}let ancestors=new Map(parent.ancestors);for(let d of decls)ancestors.set(d.compilerNode,path);let ctx={...parent,ancestors,depth:depth2},classes=decls.filter(import_ts_morph3.Node.isClassDeclaration),functions=decls.filter(import_ts_morph3.Node.isFunctionDeclaration),variables=decls.filter(import_ts_morph3.Node.isVariableDeclaration),interfaces=decls.filter(import_ts_morph3.Node.isInterfaceDeclaration),enums=decls.filter(import_ts_morph3.Node.isEnumDeclaration),modules=decls.filter(import_ts_morph3.Node.isModuleDeclaration),sourceFiles=decls.filter(import_ts_morph3.Node.isSourceFile),aliases=decls.filter(import_ts_morph3.Node.isTypeAliasDeclaration),signature="",expandLiteral;switch(kind){case"class":signature=classHeader(classes[0]);break;case"function":signature=functions.map(f=>printCallable(f)).join("; ");break;case"variable":{let v=variables[0],typeNode=v.getTypeNode(),expansion=expandable(typeNode);expansion&&!expansion.array&&(expandLiteral=expansion.literal);let type=typeNode?printTypeNode(typeNode,expandLiteral?{collapse:expandLiteral.compilerNode}:{}):"any";signature=`${variableKeyword(v)} ${type}`;break}case"interface":signature=interfaceHeader(interfaces);break;case"enum":signature=enumHeader(enums[0]);break;case"namespace":signature="namespace";break;case"type":{let alias=aliases[0],typeNode=alias.getTypeNode();typeNode&&import_ts_morph3.Node.isTypeLiteral(typeNode)?(expandLiteral=typeNode,signature=`type${typeParams(alias)}`):signature=`type${typeParams(alias)} = ${typeNode?printTypeNode(typeNode):"any"}`;break}case"module":signature="module";break;default:return}let inner=emit(ctx,{path,kind,signature,deprecated:deprecatedOf(decls)},decls);if(classes.length>0&&walkClassMembers(inner,path,classes),interfaces.length>0&&walkTypeMembers(inner,path,interfaces),classes.length>0||interfaces.length>0){let containers=[...classes,...interfaces];walkInheritedMembers(inner,path,containers,ownMemberKeys(containers))}if(expandLiteral&&walkTypeMembers(inner,path,[expandLiteral]),enums.length>0&&walkEnumMembers(inner,path,enums),modules.length>0)for(let[name,decl]of namespaceExports(inner,modules))walkNamed(inner,staticMember(path,name),decl);for(let sf of sourceFiles)for(let[name,decl]of moduleExports(inner,sf))walkNamed(inner,staticMember(path,name),decl)}function defaultExportPath(decls){for(let d of decls)if((import_ts_morph3.Node.isClassDeclaration(d)||import_ts_morph3.Node.isFunctionDeclaration(d)||import_ts_morph3.Node.isEnumDeclaration(d)||import_ts_morph3.Node.isInterfaceDeclaration(d)||import_ts_morph3.Node.isModuleDeclaration(d))&&d.getName())return topLevel(d.getName());return topLevel("default")}function moduleExports(ctx,container){let symbol=mergedSymbol(ctx,container);if(!symbol)return new Map;let equals=symbol.getExports().find(e=>e.getName()===import_ts_morph3.ts.InternalSymbolName.ExportEquals);if(equals){let decls=resolveAlias(equals).getDeclarations();return new Map(decls.length>0?[[import_ts_morph3.ts.InternalSymbolName.ExportEquals,decls]]:[])}return namedExports(ctx.sink.checker.getExportsOfModule(symbol))}function walkModule(sink,container,scope){let ctx={sink,root:""};for(let[name,decls]of moduleExports(ctx,container)){let bare=name==="default"||name===import_ts_morph3.ts.InternalSymbolName.ExportEquals?defaultExportPath(decls):topLevel(name),root=scope===void 0?bare:scoped(scope,bare),set=sink.rootDecls.get(root)??new Set;for(let d of decls)set.add(d.compilerNode);sink.rootDecls.set(root,set);let ctxRoot={sink,root};name===import_ts_morph3.ts.InternalSymbolName.ExportEquals&&(ctxRoot.exportEquals=!0),walkNamed(ctxRoot,root,decls)}}function ownEntryOf(moduleName,packageName){if(moduleName===packageName)return".";if(moduleName.startsWith(`${packageName}/`))return`./${moduleName.slice(packageName.length+1)}`}function ambientModuleName(mod){if(mod.getDeclarationKind()!=="module")return;let name=mod.getName();return/^['"]/.test(name)?name.slice(1,-1):void 0}var MODIFIERS=/^(readonly |protected |abstract |static |const |let |var )+/,IDENTIFIER2=/^[A-Za-z_$][\w$]*$/;function headerTypeParams(symbol){if(!symbol)return;let m=/^(?:abstract )?(?:class|interface|type)</.exec(symbol.signature);if(!m)return;let depth2=0,start=m[0].length;for(let i=start-1;i<symbol.signature.length;i++){let ch=symbol.signature[i];if(ch==="<")depth2++;else if(ch===">"&&--depth2===0)return symbol.signature.slice(start,i)}}function countParams(list){let depth2=0,n=1;for(let ch of list)ch==="<"||ch==="("||ch==="["||ch==="{"?depth2++:ch===">"||ch===")"||ch==="]"||ch==="}"?depth2--:ch===","&&depth2===0&&n++;return n}function overloadMembers(signature,prefix){let overloads=parseCallable(signature.replace(MODIFIERS,""));if(overloads)return overloads.map(o=>{let params2=[...o.thisType!==void 0?[`this: ${o.thisType}`]:[],...o.params.map(p=>`${p.rest?"...":""}${p.name}${p.optional?"?":""}: ${p.type}`)].join(", "),tp=o.typeParams.length>0?`<${o.typeParams.join(", ")}>`:"";return`${prefix}${tp}(${params2}): ${o.returnType}`})}function expandCollapsed(text,path,symbols){if(!text.includes("{\u2026}"))return text;let container=text==="{\u2026}"?path:`${path}[]`,members=[];for(let s of symbols.values()){if(parentOf(s.path)!==container)continue;let leaf=leafOf(s.path),sep4=s.path[container.length];if(leaf==="()"){members.push(...overloadMembers(s.signature,"")??[]);continue}if(leaf==="new()"){members.push(...overloadMembers(s.signature,"new ")??[]);continue}if(leaf.startsWith("[")&&sep4==="#"){members.push(`[key: ${leaf.slice(1,-1)}]: ${s.signature.replace(MODIFIERS,"")}`);continue}let name=IDENTIFIER2.test(leaf)?leaf:JSON.stringify(leaf),optional=s.optional?"?":"";if(s.kind==="method"){let overloads=overloadMembers(s.signature,`${name}${optional}`);if(!overloads)return;members.push(...overloads)}else{let inner=expandCollapsed(s.signature.replace(MODIFIERS,""),s.path,symbols);if(inner===void 0)return;members.push(`${s.signature.startsWith("readonly ")?"readonly ":""}${name}${optional}: ${inner}`)}}let literal=`{ ${members.join("; ")} }`;return text.replace("{\u2026}",literal)}function bodyFor(symbol,path,symbols,container){let sig=symbol.signature.replace(/\bthis\b(?!\s*:)/g,container??"this");if(sig!=="")switch(symbol.kind){case"property":case"variable":return expandCollapsed(sig.replace(MODIFIERS,""),path,symbols);case"enumMember":return sig;case"function":case"method":{let members=overloadMembers(sig,leafOf(path)==="new()"?"new ":"");return members?`{ ${members.join("; ")} }`:void 0}case"type":{let eq=sig.indexOf(" = ");return eq===-1?void 0:sig.slice(eq+3)}default:return}}function aliasFor(name,path,symbols){let symbol=symbols.get(path);if(!symbol)return;let params2=[],own=symbol.kind==="type"?headerTypeParams(symbol):void 0,containerRef;for(let p=parentOf(path);p!==void 0;p=parentOf(p)){let parent=symbols.get(p),tp=headerTypeParams(parent);if(tp&&params2.unshift(tp),containerRef===void 0&&parent&&(parent.kind==="class"||parent.kind==="interface")){let{scope,segments}=splitPath(p);if(scope===void 0&&segments.every((seg,i)=>i===0||seg.startsWith("."))){let anys2=tp?`<${Array.from({length:countParams(tp)},()=>"any").join(", ")}>`:"";containerRef=`${segments.join("")}${anys2}`}}}let body=bodyFor(symbol,path,symbols,containerRef);if(body===void 0)return;own&&params2.push(own);let list=params2.join(", "),anys=params2.map(p=>Array.from({length:countParams(p)},()=>"any").join(", ")).join(", ");return{statements:[`type ${name}${list?`<${list}>`:""} = ${body};`,`type ${name}$ = ${name}${list?`<${anys}>`:""};`]}}function isAnyLike(type){return(type.getFlags()&(import_ts_morph2.ts.TypeFlags.Any|import_ts_morph2.ts.TypeFlags.Unknown))!==0}function isErrorType(type){return type.compilerType.intrinsicName==="error"}function relate(checker,before,after){let anyBefore=isAnyLike(before),anyAfter=isAnyLike(after);if(anyBefore&&anyAfter)return"equivalent";if(anyBefore)return"narrowed";if(anyAfter)return"widened";let oldToNew=checker.isTypeAssignableTo(before.compilerType,after.compilerType),newToOld=checker.isTypeAssignableTo(after.compilerType,before.compilerType);return oldToNew&&newToOld?"equivalent":oldToNew?"widened":newToOld?"narrowed":"incompatible"}function parameterInfo(sig){return sig.getParameters().map(p=>{let decl=p.getDeclarations()[0],node=decl?.compilerNode,optional=node!==void 0&&import_ts_morph2.ts.isParameter(node)?node.questionToken!==void 0||node.dotDotDotToken!==void 0||node.initializer!==void 0:!1,declared=decl?p.getTypeAtLocation(decl):sig.getReturnType(),type=optional?declared.getNonNullableType():declared;return{name:p.getName(),type,optional}})}function compareSignatures(checker,before,after){let pa=parameterInfo(before),pb=parameterInfo(after),parameters=[];for(let i=0;i<Math.max(pa.length,pb.length);i++){let a=pa[i],b=pb[i];a&&!b?parameters.push({name:a.name,relation:"removed",optionalBefore:a.optional,optionalAfter:!1}):!a&&b?parameters.push({name:b.name,relation:"added",optionalBefore:!1,optionalAfter:b.optional}):a&&b&&parameters.push({name:a.name,relation:relate(checker,a.type,b.type),optionalBefore:a.optional,optionalAfter:b.optional})}let result={parameters,returnType:relate(checker,before.getReturnType(),after.getReturnType())},thisA=thisParameter(before),thisB=thisParameter(after);return thisA&&!thisB?result.thisParameter={relation:"removed",before:thisA.text}:!thisA&&thisB?result.thisParameter={relation:"added",after:thisB.text}:thisA&&thisB&&(result.thisParameter={relation:relate(checker,thisA.type,thisB.type),before:thisA.text,after:thisB.text}),result}function thisParameter(sig){let decl=sig.getDeclaration();if(!import_ts_morph2.Node.isParametered(decl))return;let param=decl.getParameters().find(p=>p.getName()==="this");if(!param)return;let type=param.getType();return{type,text:type.getText(param,import_ts_morph2.ts.TypeFormatFlags.NoTruncation)}}function compare(checker,before,after,construct){let sigsA=construct?before.getConstructSignatures():before.getCallSignatures(),sigsB=construct?after.getConstructSignatures():after.getCallSignatures(),callable=sigsA.length>0&&sigsB.length>0,result={relation:relate(checker,before,after),callable};callable&&(result.typeParameterCounts={before:sigsA.map(s=>s.getTypeParameters().length),after:sigsB.map(s=>s.getTypeParameters().length)});let generic=[...sigsA,...sigsB].some(s=>s.getTypeParameters().length>0);return callable&&sigsA.length===sigsB.length&&!generic&&(result.signatures=sigsA.map((s,i)=>compareSignatures(checker,s,sigsB[i]))),result}function hasErrorInside(file,name){let generic=file.getTypeAlias(name);return generic?generic.getTypeNode()?.getDescendants().some(d=>import_ts_morph2.Node.isTypeReference(d)&&isErrorType(d.getType()))??!1:!0}function scopeForEntry(project,file,entry,packageName){if(file.getSymbol()!==void 0)return file;let wanted=entry==="."?packageName:`${packageName}/${entry.slice(2)}`;for(let sf of project.getSourceFiles())for(let mod of sf.getModules())if(ambientModuleName(mod)===wanted&&ownEntryOf(wanted,packageName)===entry)return mod}function namespaceScope(project,scope,path){let checker=project.getTypeChecker(),moduleSymbol=import_ts_morph2.Node.isSourceFile(scope)?scope.getSymbol():checker.getSymbolAtLocation(scope.getNameNode());if(!moduleSymbol)return scope;let exports=checker.getExportsOfModule(moduleSymbol),current=scope;for(let seg of splitPath(path).segments){if(!/^\.?[A-Za-z_$"]/.test(seg)||seg===".new()")break;let name=seg.startsWith(".")?seg.slice(1):seg,found=exports.find(e=>e.getName()===name);if(!found)break;let symbol=(found.getFlags()&import_ts_morph2.ts.SymbolFlags.Alias)!==0?found.getAliasedSymbol()??found:found,block=symbol.getDeclarations().find(d=>import_ts_morph2.Node.isModuleDeclaration(d)&&d.getBody()!==void 0);if(!block)break;current=block,exports=symbol.getExports()}return current}async function compareTypesWithChecker(input){let entries=resolveEntryPoints(input.b.dir,input.b.name,input.b.version),dir=mkdtempSync(join2(tmpdir(),"uptide-compat-")),out=new Map;try{let paths={};for(let{entry,file}of entries)paths[entry==="."?"__b":`__b/${entry.slice(2)}`]=[file];let project=new import_ts_morph2.Project({skipAddingFilesFromTsConfig:!0,skipFileDependencyResolution:!0,compilerOptions:{strict:!0,module:import_ts_morph2.ts.ModuleKind.Preserve,moduleResolution:import_ts_morph2.ts.ModuleResolutionKind.Bundler,target:import_ts_morph2.ts.ScriptTarget.ESNext,esModuleInterop:!0,skipLibCheck:!0,noEmit:!0,types:[],baseUrl:dir,paths}}),entryFiles=new Map(entries.map(e=>[e.entry,project.addSourceFileAtPath(e.file)]));project.resolveSourceFileDependencies();let symbolsA=new Map(input.surfaceA.symbols.map(s=>[s.path,s])),symbolsB=new Map(input.surfaceB.symbols.map(s=>[s.path,s])),byEntry=new Map;for(let path of input.paths){let entry=splitPath(path).scope??".";if(!entryFiles.has(entry))continue;let list=byEntry.get(entry)??[];list.push(path),byEntry.set(entry,list)}let planned=[],index=0;for(let[entry,pathsHere]of byEntry){let file=entryFiles.get(entry),scope=scopeForEntry(project,file,entry,input.b.name);if(!scope)continue;if(import_ts_morph2.Node.isSourceFile(scope)){let moduleSymbol=scope.getSymbol(),locals=new Set(scope.getLocals().map(l=>l.getName())),names=moduleSymbol?project.getTypeChecker().getExportsOfModule(moduleSymbol).map(e=>e.getName()).filter(n=>IDENTIFIER2.test(n)&&n!=="default"&&!locals.has(n)):[];names.length>0&&scope.addStatements(`import { ${names.join(", ")} } from ${JSON.stringify(entry==="."?"__b":`__b/${entry.slice(2)}`)};`)}let perScope=new Map;for(let path of pathsHere){let a=aliasFor(`__a_${index}`,path,symbolsA),b=aliasFor(`__b_${index}`,path,symbolsB);if(!a||!b)continue;let target=namespaceScope(project,scope,path),lines=perScope.get(target)??[];lines.push(...a.statements,...b.statements),perScope.set(target,lines),planned.push({path,scope:target,index,construct:leafOf(path)==="new()"}),index++}for(let[target,lines]of perScope)target.addStatements(lines)}if(process.env.UPTIDE_COMPAT_KEEP)for(let f of new Set(planned.map(p=>p.scope.getSourceFile())))writeFileSync(join2(dir,f.getBaseName()),f.getFullText());let checker=project.getTypeChecker().compilerObject;for(let{path,scope,index:i,construct}of planned){let a=scope.getTypeAlias(`__a_${i}$`),b=scope.getTypeAlias(`__b_${i}$`);if(!a||!b)continue;let typeA=a.getType(),typeB=b.getType();isErrorType(typeA)||isErrorType(typeB)||hasErrorInside(scope,`__a_${i}`)||hasErrorInside(scope,`__b_${i}`)||isAnyLike(typeA)&&isAnyLike(typeB)||out.set(path,compare(checker,typeA,typeB,construct))}return out}finally{process.env.UPTIDE_COMPAT_KEEP?console.error(`compat program kept at ${dir}`):rmSync(dir,{recursive:!0,force:!0})}}function satisfies(version,range){return import_semver.default.satisfies(version,range)}function maxSatisfying(versions,range){return import_semver.default.maxSatisfying([...versions],range)??void 0}var MAX_HOPS=8;function deepestAt(root,position){let node=root;for(;;){let next;if(import_ts_morph6.ts.forEachChild(node,child=>{!next&&child.getStart()<=position&&position<child.getEnd()&&(next=child)}),!next)return node;node=next}}function offendingExpression(node){let n=node;for(;n&&!import_ts_morph6.ts.isExpression(n);)n=n.parent;if(n){for(;import_ts_morph6.ts.isPropertyAccessExpression(n.parent)&&n.parent.name===n;)n=n.parent;return n}}function counterpart(decl,program){let file=program.getSourceFile(decl.getSourceFile().fileName);if(!file)return;let node=deepestAt(file,decl.getStart());for(;node&&node.kind!==decl.kind;)node=node.parent;return node}function typeText(decl,program){let at=import_ts_morph6.ts.getNameOfDeclaration(decl)??decl,checker=program.getTypeChecker();try{return checker.typeToString(checker.getTypeAtLocation(at),void 0,import_ts_morph6.ts.TypeFormatFlags.NoTruncation).replace(/import\("[^"]*"\)\./g,"").replace(/\b[A-Za-z_$][\w$]*\.(?=[A-Z])/g,"")}catch{return}}function findCause(programs,diagnostic,file,repoDir,erroredLines){if(diagnostic.start===void 0||!/\b(unknown|any)\b/.test(import_ts_morph6.ts.flattenDiagnosticMessageText(diagnostic.messageText," ")))return;let checker=programs.overlay.getTypeChecker(),inRepo=n=>{let f=n.getSourceFile().fileName;return f.startsWith(`${repoDir}/`)&&!f.includes("/node_modules/")},declarationOf=expr2=>{let symbol=checker.getSymbolAtLocation(expr2);return(symbol&&symbol.flags&import_ts_morph6.ts.SymbolFlags.Alias?checker.getAliasedSymbol(symbol):symbol)?.declarations?.[0]},lineOf=n=>{let f=n.getSourceFile(),named=import_ts_morph6.ts.getNameOfDeclaration(n);return`${relative2(repoDir,f.fileName)}:${f.getLineAndCharacterOfPosition((named??n).getStart()).line+1}`},site=`${relative2(repoDir,file.fileName)}:${file.getLineAndCharacterOfPosition(diagnostic.start).line+1}`,judge=decl=>{let at=lineOf(decl);if(at===site)return;if(erroredLines.has(at))return causeAt(decl,"which itself fails to compile against the target",repoDir);let before=counterpart(decl,programs.base),after=typeText(decl,programs.overlay),earlier=before?typeText(before,programs.base):void 0;if(after!==void 0&&earlier!==void 0&&after!==earlier)return causeAt(decl,`whose type changed from \`${clip(earlier)}\` to \`${clip(after)}\``,repoDir)},isAny=n=>(checker.getTypeAtLocation(n).flags&import_ts_morph6.ts.TypeFlags.Any)!==0,origin=start=>{let n=start;for(let hop=0;n&&hop<MAX_HOPS;hop++){if(import_ts_morph6.ts.isParenthesizedExpression(n)||import_ts_morph6.ts.isAwaitExpression(n)||import_ts_morph6.ts.isAsExpression(n)){n=n.expression;continue}if(import_ts_morph6.ts.isCallExpression(n)||import_ts_morph6.ts.isNewExpression(n)){n=import_ts_morph6.ts.isPropertyAccessExpression(n.expression)?n.expression.expression:n.expression;continue}if(import_ts_morph6.ts.isPropertyAccessExpression(n)){n=n.expression;continue}if(!import_ts_morph6.ts.isIdentifier(n))return;let decl=checker.getSymbolAtLocation(n)?.declarations?.[0];if(!decl||!inRepo(decl))return;if(import_ts_morph6.ts.isImportSpecifier(decl)||import_ts_morph6.ts.isImportClause(decl)||import_ts_morph6.ts.isNamespaceImport(decl)){let importDecl=decl.getSourceFile()&&findImportDeclaration(decl),from=importDecl?importDecl.moduleSpecifier.getText().replace(/['"]/g,""):"an import";return causeAt(decl,`imported from \`${from}\`, which is typed \`any\` against the target`,repoDir)}let judged=judge(decl);if(judged)return judged;if(import_ts_morph6.ts.isVariableDeclaration(decl)&&decl.initializer){n=decl.initializer;continue}return}},expr=offendingExpression(deepestAt(file,diagnostic.start));for(let hop=0;expr&&hop<MAX_HOPS;hop++){if(import_ts_morph6.ts.isParenthesizedExpression(expr)||import_ts_morph6.ts.isAwaitExpression(expr)||import_ts_morph6.ts.isAsExpression(expr)){expr=expr.expression;continue}if(import_ts_morph6.ts.isCallExpression(expr)||import_ts_morph6.ts.isNewExpression(expr)){let call=expr,callee=call.expression,target=import_ts_morph6.ts.isPropertyAccessExpression(callee)?callee.name:callee,decl=declarationOf(target);if(decl&&inRepo(decl)){let judged=judge(decl);if(judged)return judged;let anyArg=(call.arguments??[]).find(a=>isAny(a));if(anyArg)return origin(anyArg);expr=returnedExpression(decl);continue}expr=import_ts_morph6.ts.isPropertyAccessExpression(callee)?callee.expression:void 0;continue}if(import_ts_morph6.ts.isIdentifier(expr)||import_ts_morph6.ts.isPropertyAccessExpression(expr)){let target=import_ts_morph6.ts.isPropertyAccessExpression(expr)?expr.name:expr,decl=declarationOf(target);if(!decl||!inRepo(decl)){if(import_ts_morph6.ts.isPropertyAccessExpression(expr)){expr=expr.expression;continue}return import_ts_morph6.ts.isIdentifier(expr)&&isAny(expr)?origin(expr):void 0}if(import_ts_morph6.ts.isImportSpecifier(decl)||import_ts_morph6.ts.isImportClause(decl)||import_ts_morph6.ts.isNamespaceImport(decl))return isAny(expr)?origin(expr):void 0;let judged=judge(decl);if(judged)return judged;if(import_ts_morph6.ts.isVariableDeclaration(decl)||import_ts_morph6.ts.isPropertyDeclaration(decl)){expr=decl.initializer;continue}if(import_ts_morph6.ts.isParameter(decl)){let fn=decl.parent;if(import_ts_morph6.ts.isCallExpression(fn.parent)){expr=fn.parent;continue}return judge(fn)}if((import_ts_morph6.ts.isPropertySignature(decl)||import_ts_morph6.ts.isPropertyAssignment(decl))&&import_ts_morph6.ts.isPropertyAccessExpression(expr)){expr=expr.expression;continue}return}return}}function findImportDeclaration(node){let n=node;for(;n&&!import_ts_morph6.ts.isImportDeclaration(n);)n=n.parent;return n}function returnedExpression(decl){let body;if(import_ts_morph6.ts.isVariableDeclaration(decl)&&decl.initializer?body=decl.initializer:import_ts_morph6.ts.isFunctionLike(decl)&&"body"in decl&&(body=decl.body),!body)return;if((import_ts_morph6.ts.isArrowFunction(body)||import_ts_morph6.ts.isFunctionExpression(body))&&(body=body.body),body&&import_ts_morph6.ts.isExpression(body))return body;let returned,visit=n=>{returned||(import_ts_morph6.ts.isReturnStatement(n)&&n.expression?returned=n.expression:import_ts_morph6.ts.isFunctionLike(n)||import_ts_morph6.ts.forEachChild(n,visit))};return body&&import_ts_morph6.ts.forEachChild(body,visit),returned}function clip(text){let one=text.replace(/\s+/g," ");return one.length>80?`${one.slice(0,77)}...`:one}function causeAt(decl,reason,repoDir){let file=decl.getSourceFile(),holder=decl,named=import_ts_morph6.ts.getNameOfDeclaration(decl);for(;!named&&holder.parent&&!import_ts_morph6.ts.isSourceFile(holder.parent)&&(holder=holder.parent,!(import_ts_morph6.ts.isBlock(holder)||import_ts_morph6.ts.isCallExpression(holder)));)named=import_ts_morph6.ts.getNameOfDeclaration(holder);let{line}=file.getLineAndCharacterOfPosition((named??decl).getStart());return{name:named?named.getText():"(anonymous)",file:relative2(repoDir,file.fileName).split("\\").join("/"),line:line+1,reason}}var CANDIDATES=[["pnpm-lock.yaml","pnpm"],["package-lock.json","npm"],["npm-shrinkwrap.json","npm"],["yarn.lock","yarn"],["bun.lock","bun"]];function findLockfile(dir){let current=dir;for(;;){for(let[name,kind]of CANDIDATES){let file=join3(current,name);if(existsSync2(file))return{file,kind,dir:current}}let parent=dirname2(current);if(parent===current)return;current=parent}}function readLockfile(packageDir,declared){let found=findLockfile(packageDir);if(!found)return;let importer=relative3(found.dir,packageDir).split("\\").join("/")||".",text=readFileSync2(found.file,"utf8"),query={importer,declared},installed=found.kind==="pnpm"?parsePnpm(text,query):found.kind==="npm"?parseNpm(text,query):found.kind==="yarn"?parseYarn(text,query):parseBun(text,query);return{kind:found.kind,file:found.file,importer,installed}}function parseNpm(text,query){let out=new Map,lock=JSON.parse(text);for(let name of query.declared.keys()){let v=(query.importer==="."?void 0:lock.packages?.[`${query.importer}/node_modules/${name}`]?.version)??lock.packages?.[`node_modules/${name}`]?.version??lock.dependencies?.[name]?.version;v&&out.set(name,v)}return out}function parsePnpm(text,query){let out=new Map,names=new Set(query.declared.keys()),section="none",inWanted=!1,inDeps=!1,pendingDep,isWantedImporter=key2=>key2.replace(/^['"]|['"]$/g,"")===query.importer;for(let line of text.split(`
147
+ `)){let indent=line.length-line.trimStart().length,trimmed=line.trim();if(!(trimmed===""||trimmed.startsWith("#"))){if(indent===0){section=trimmed==="importers:"?"importers":trimmed==="dependencies:"||trimmed==="devDependencies:"?"top-deps":"none",inWanted=!1,inDeps=!1,pendingDep=void 0;continue}if(section==="importers"){if(indent===2){inWanted=isWantedImporter(trimmed.replace(/:$/,"")),inDeps=!1;continue}if(!inWanted)continue;if(indent===4){inDeps=trimmed==="dependencies:"||trimmed==="devDependencies:"||trimmed==="optionalDependencies:",pendingDep=void 0;continue}if(!inDeps)continue;if(indent===6){let m=/^['"]?(@?[^'":]+)['"]?:\s*(.*)$/.exec(trimmed);if(!m)continue;let name=m[1],inline=(m[2]??"").trim();pendingDep=names.has(name)?name:void 0,pendingDep&&inline&&out.set(name,cleanPnpmVersion(inline))}else if(indent===8&&pendingDep){let m=/^version:\s*(.+)$/.exec(trimmed);m&&out.set(pendingDep,cleanPnpmVersion(m[1]))}continue}if(section==="top-deps"&&query.importer==="."){if(indent===2){let m=/^['"]?(@?[^'":]+)['"]?:\s*(.*)$/.exec(trimmed);if(!m)continue;let name=m[1],inline=(m[2]??"").trim();pendingDep=names.has(name)?name:void 0,pendingDep&&inline&&out.set(name,cleanPnpmVersion(inline))}else if(indent===4&&pendingDep){let m=/^version:\s*(.+)$/.exec(trimmed);m&&out.set(pendingDep,cleanPnpmVersion(m[1]))}}}}return out}function cleanPnpmVersion(v){return v.replace(/^['"]|['"]$/g,"").replace(/[(_].*$/,"")}function parseYarn(text,query){let byRange=new Map,first=new Map,currentSpecs=[];for(let line of text.split(`
148
+ `)){if(line.trim()===""||line.startsWith("#"))continue;if(!line.startsWith(" ")){currentSpecs=line.replace(/:\s*$/,"").split(",").map(part=>{let spec=part.trim().replace(/^"|"$/g,""),at=spec.startsWith("@")?spec.indexOf("@",1):spec.indexOf("@"),name=at===-1?spec:spec.slice(0,at),range=at===-1?"":spec.slice(at+1).replace(/^npm:/,"");return{name,range}});continue}let m=/^\s+version:?\s+"?([^"\s]+)"?/.exec(line);if(m)for(let{name,range}of currentSpecs)byRange.set(`${name}@${range}`,m[1]),first.has(name)||first.set(name,m[1])}let out=new Map;for(let[name,range]of query.declared){let v=byRange.get(`${name}@${range.replace(/^npm:/,"")}`)??first.get(name);v&&out.set(name,v)}return out}function parseBun(text,query){let out=new Map,jsonish=text.replace(/,\s*([}\]])/g,"$1"),lock;try{lock=JSON.parse(jsonish)}catch{return out}let workspaceName=query.importer==="."?void 0:lock.workspaces?.[query.importer]?.name;for(let name of query.declared.keys()){let entry=(workspaceName?lock.packages?.[`${workspaceName}/${name}`]?.[0]:void 0)??lock.packages?.[name]?.[0];if(typeof entry!="string")continue;let at=entry.startsWith("@")?entry.indexOf("@",1):entry.indexOf("@");at!==-1&&out.set(name,entry.slice(at+1))}return out}var LINK=/^(link|workspace|file):/;function typesTargets(manifest2){let out=new Map,main=manifest2.types??manifest2.typings;main&&out.set(".",main);let visit=(key2,value)=>{if(typeof value=="string"){(value.endsWith(".d.ts")||value.endsWith(".d.mts")||value.endsWith(".d.cts"))&&(out.has(key2)||out.set(key2,value));return}if(!(!value||typeof value!="object"))for(let[k,v]of Object.entries(value))k.startsWith(".")?visit(k,v):(k==="types"||k==="import"||k==="default"||k==="require")&&visit(key2,v)};return manifest2.exports&&visit(".",manifest2.exports),out}function buildDirs(depDir){let tsconfig=join4(depDir,"tsconfig.json");if(!existsSync3(tsconfig))return;let parsed2=import_ts_morph8.ts.readConfigFile(tsconfig,p=>readFileSync3(p,"utf8"));if(!parsed2.config)return;let options=import_ts_morph8.ts.parseJsonConfigFileContent(parsed2.config,import_ts_morph8.ts.sys,depDir).options;if(!(!options.outDir||!options.rootDir))return{rootDir:resolve2(depDir,options.rootDir),outDir:resolve2(depDir,options.outDir)}}function sourceFor(depDir,distFile){let abs=resolve2(depDir,distFile),dirs=buildDirs(depDir),candidates=[];dirs&&abs.startsWith(`${dirs.outDir}/`)&&candidates.push(join4(dirs.rootDir,relative4(dirs.outDir,abs))),abs.includes("/dist/")&&candidates.push(abs.replace("/dist/","/src/"));for(let c of candidates){let base=c.replace(/\.d\.(m|c)?ts$/,"");for(let ext of[".ts",".tsx",".mts",".cts"])if(existsSync3(base+ext))return base+ext}}function newestMtime(dir,depth2=0){let newest=0;try{for(let entry of readdirSafe(dir)){let p=join4(dir,entry),st=statSync2(p);st.isDirectory()?entry!=="node_modules"&&depth2<6&&(newest=Math.max(newest,newestMtime(p,depth2+1))):/\.(ts|tsx|mts|cts)$/.test(entry)&&!entry.endsWith(".d.ts")&&(newest=Math.max(newest,st.mtimeMs))}}catch{}return newest}function readdirSafe(dir){try{return readdirSync2(dir)}catch{return[]}}function linkedDir(repoDir,name,specifier){let viaNodeModules=join4(repoDir,"node_modules",name);if(existsSync3(viaNodeModules))try{return realpathSync(viaNodeModules)}catch{}let m=/^(?:link|file):(.+)$/.exec(specifier);if(m){let target=resolve2(repoDir,m[1]);if(existsSync3(target))return realpathSync(target)}}function workspaceSourceMap(repoDir,installed){let paths={},warnings=[];for(let[name,specifier]of installed){if(!LINK.test(specifier))continue;let depDir=linkedDir(repoDir,name,specifier);if(!depDir)continue;let manifest2;try{manifest2=JSON.parse(readFileSync3(join4(depDir,"package.json"),"utf8"))}catch{continue}let mapped=0,unmapped;for(let[subpath,distFile]of typesTargets(manifest2)){if(subpath.includes("*"))continue;let source=sourceFor(depDir,distFile),specifierKey=subpath==="."?name:`${name}/${subpath.slice(2)}`;source?(paths[specifierKey]=[source],mapped++):unmapped??=distFile}if(mapped===0&&unmapped!==void 0){let distPath=resolve2(depDir,unmapped),srcDir=buildDirs(depDir)?.rootDir??join4(depDir,"src");try{let distTime=statSync2(distPath).mtimeMs;newestMtime(srcDir)>distTime&&warnings.push(`${name}: compiled against its built ${relative4(depDir,distPath)}, which is older than its source; rebuild it or the results may be stale`)}catch{}}}return{paths,warnings}}function declaredPaths(tsconfig){let parsed2=import_ts_morph8.ts.readConfigFile(tsconfig,p=>readFileSync3(p,"utf8"));if(!parsed2.config)return{paths:{}};let options=import_ts_morph8.ts.parseJsonConfigFileContent(parsed2.config,import_ts_morph8.ts.sys,dirname3(tsconfig)).options;return{paths:options.paths??{},...options.baseUrl?{baseUrl:options.baseUrl}:{}}}function declaredPatterns(root){let strings=list=>Array.isArray(list)?list.filter(p=>typeof p=="string"):[],yaml=join5(root,"pnpm-workspace.yaml");if(existsSync4(yaml)){let doc;try{doc=(0,import_yaml.parse)(readFileSync4(yaml,"utf8"))}catch(err){throw new UptideError("INVALID_WORKSPACE",`pnpm-workspace.yaml is not valid YAML: ${(err instanceof Error?err.message:String(err)).split(`
149
+ `)[0]}`)}return{file:"pnpm-workspace.yaml",patterns:strings(doc?.packages)}}let pkg;try{pkg=JSON.parse(readFileSync4(join5(root,"package.json"),"utf8"))}catch{return}let workspaces=pkg.workspaces;if(workspaces!==void 0)return{file:'package.json "workspaces"',patterns:strings(Array.isArray(workspaces)?workspaces:workspaces?.packages)}}function globRegExp(glob){let re="";for(let i=0;i<glob.length;i++){let c=glob[i];c==="*"&&glob[i+1]==="*"?(i++,glob[i+1]==="/"?(i++,re+="(?:.*/)?"):re+=".*"):c==="*"?re+="[^/]*":c==="?"?re+="[^/]":re+=c.replace(/[.+^${}()|[\]\\]/g,"\\$&")}return new RegExp(`^${re}$`)}var INSTALLED=new Set(["node_modules","bower_components"]),NOT_WALKED=new Set(["dist","build","coverage","out"]);function matchingDirs(root,pattern){let segments=pattern.split("/"),firstGlob=segments.findIndex(s=>/[*?]/.test(s));if(firstGlob===-1)return existsSync4(join5(root,pattern,"package.json"))?[pattern]:[];let rest=segments.slice(firstGlob),re=globRegExp(pattern),found=[],walk=(rel,depth2)=>{if(depth2===0)return;let entries;try{entries=readdirSync3(join5(root,rel),{withFileTypes:!0})}catch{return}for(let entry of entries){if(!entry.isDirectory()||INSTALLED.has(entry.name)||entry.name.startsWith("."))continue;let dir=rel?`${rel}/${entry.name}`:entry.name;re.test(dir)&&existsSync4(join5(root,dir,"package.json"))&&found.push(dir),NOT_WALKED.has(entry.name)||walk(dir,depth2-1)}};return walk(segments.slice(0,firstGlob).join("/"),rest.some(s=>s.includes("**"))?1/0:rest.length),found}function resolveWorkspaces(root){let declared=declaredPatterns(root);if(!declared)return["."];let clean=p=>p.replace(/^\.\//,"").replace(/\/+$/,"")||".",include=declared.patterns.filter(p=>!p.startsWith("!")).map(clean),exclude=declared.patterns.filter(p=>p.startsWith("!")).map(p=>globRegExp(clean(p.slice(1))));if(include.length===0)return["."];let found=new Set([".",...include.filter(pattern=>pattern!==".").flatMap(pattern=>matchingDirs(root,pattern)).filter(dir=>!exclude.some(re=>re.test(dir)))]);if(found.size===1&&!include.includes("."))throw new UptideError("INVALID_WORKSPACE",`${declared.file} declares packages (${declared.patterns.join(", ")}) but none of them matches a directory with a package.json; fix the patterns, or Uptide would check only the root`);return[...found].sort()}var resolved=new Map;function workspacePackagesOf(root){let result=resolved.get(root);if(!result){try{result=resolveWorkspaces(root)}catch(err){if(!(err instanceof UptideError))throw err;result=err}resolved.set(root,result)}if(result instanceof UptideError)throw result;return[...result]}function workspacePackagesOrRoot(root){try{return workspacePackagesOf(root)}catch(err){if(err instanceof UptideError&&err.code==="INVALID_WORKSPACE")return["."];throw err}}function findRepoRoot(cwd){let dir=resolve3(cwd);for(;;){if(existsSync5(join6(dir,"package.json")))return dir;let parent=dirname4(dir);if(parent===dir)return;dir=parent}}var SYNTHETIC_EXCLUDES=["**/node_modules/**","**/dist/**","**/build/**"],repos=new Map;onReset(()=>repos.clear());function loadedRepo(dir,rootFiles){dir=realpathSync2(dir),rootFiles=rootFiles?.map(file=>realpathSync2(file));let key2=JSON.stringify([dir,rootFiles?.slice().sort()]),repo=repos.get(key2);return repo||(repo=loadRepo(dir,rootFiles),repos.set(key2,repo)),repo}function forgetRepo(dir){for(let key2 of repos.keys())JSON.parse(key2)[0]===dir&&repos.delete(key2)}function ownsFile(repoRef,path){return!(repoRef.exclude??[]).some(d=>path.startsWith(`${d}/`)||path.startsWith(`${realDir(d)}/`))}var realDirs=new Map;function realDir(dir){let real=realDirs.get(dir);if(real===void 0){try{real=realpathSync2(dir)}catch{real=dir}realDirs.set(dir,real)}return real}function readInstalled(cwd){let dir=findRepoRoot(cwd);if(!dir)throw new UptideError("NO_PROJECT",`${cwd}: no package.json found here or in any parent directory`);let packageJson=JSON.parse(readFileSync5(join6(dir,"package.json"),"utf8")),declared=new Map(Object.entries({...packageJson.dependencies,...packageJson.devDependencies,...packageJson.optionalDependencies})),lockfile=readLockfile(dir,declared);return{dir,packageJson,lockfile,installed:new Map(lockfile?.installed??[])}}var formatAwareResolution=(host,getOptions)=>{let formats2=new Map;return{resolveModuleNames(names,containingFile,_reused,redirected,options){let opts=options??getOptions(),nodeish=opts.moduleResolution===import_ts_morph7.ts.ModuleResolutionKind.Node16||opts.moduleResolution===import_ts_morph7.ts.ModuleResolutionKind.NodeNext,mode;return nodeish&&(formats2.has(containingFile)||formats2.set(containingFile,import_ts_morph7.ts.getImpliedNodeFormatForFile(containingFile,void 0,host,opts)),mode=formats2.get(containingFile)),names.map(name=>import_ts_morph7.ts.resolveModuleName(name,containingFile,opts,host,void 0,redirected,mode).resolvedModule)}}};function loadRepo(cwd,rootFiles){let{dir,packageJson,lockfile,installed}=readInstalled(cwd),tsconfig=join6(dir,"tsconfig.json"),sources=workspaceSourceMap(dir,installed),sourcePaths=Object.keys(sources.paths).length>0?sources.paths:void 0,project;if(existsSync5(tsconfig)){let declared=sourcePaths?declaredPaths(tsconfig):{paths:{}};project=new import_ts_morph7.Project({tsConfigFilePath:tsconfig,skipAddingFilesFromTsConfig:rootFiles!==void 0,skipFileDependencyResolution:!0,resolutionHost:formatAwareResolution,compilerOptions:{noEmit:!0,skipLibCheck:!0,...sourcePaths?{paths:{...declared.paths,...sourcePaths}}:{}}});for(let ref of rootFiles===void 0?readReferences(tsconfig):[])try{project.addSourceFilesFromTsConfig(ref)}catch{}}else project=new import_ts_morph7.Project({skipAddingFilesFromTsConfig:!0,skipFileDependencyResolution:!0,compilerOptions:{target:import_ts_morph7.ts.ScriptTarget.ES2022,module:import_ts_morph7.ts.ModuleKind.ESNext,moduleResolution:import_ts_morph7.ts.ModuleResolutionKind.Bundler,strict:!0,noEmit:!0,skipLibCheck:!0,allowJs:!1,...sourcePaths?{paths:sourcePaths}:{}}}),rootFiles===void 0&&project.addSourceFilesAtPaths([join6(dir,"**/*.ts"),join6(dir,"**/*.tsx"),...SYNTHETIC_EXCLUDES.map(e=>`!${join6(dir,e)}`)]);return rootFiles!==void 0&&project.addSourceFilesAtPaths(rootFiles),project.resolveSourceFileDependencies(),{dir,packageJson,lockfile,installed,project,tsconfig:existsSync5(tsconfig)?tsconfig:void 0,includesJs:project.getCompilerOptions().allowJs===!0,warnings:sources.warnings}}function readReferences(tsconfig){try{return(import_ts_morph7.ts.readConfigFile(tsconfig,p=>readFileSync5(p,"utf8")).config?.references??[]).map(r=>{let p=resolve3(dirname4(tsconfig),r.path);return p.endsWith(".json")?p:join6(p,"tsconfig.json")})}catch{return[]}}var repoIndexes=new WeakMap;function packageNameOf(specifier){if(specifier.startsWith(".")||specifier.startsWith("/")||specifier.startsWith("node:"))return;let parts=specifier.split("/");return specifier.startsWith("@")?parts.slice(0,2).join("/"):parts[0]}function indexFile(sf){let index={loads:new Set,reexportsFrom:[],importsFrom:[],memberNames:new Map,computedLoads:[]},load=specifier=>{let name=packageNameOf(specifier);name&&index.loads.add(name)},member=id=>{if(!import_ts_morph9.ts.isIdentifier(id))return;let list=index.memberNames.get(id.text)??[];list.push(id.getStart(sf)),index.memberNames.set(id.text,list)},visit=n=>{if(import_ts_morph9.ts.isImportDeclaration(n)&&import_ts_morph9.ts.isStringLiteral(n.moduleSpecifier))load(n.moduleSpecifier.text),n.moduleSpecifier.text.startsWith(".")&&index.importsFrom.push(n.moduleSpecifier.text);else if(import_ts_morph9.ts.isExportDeclaration(n)&&n.moduleSpecifier&&import_ts_morph9.ts.isStringLiteral(n.moduleSpecifier))load(n.moduleSpecifier.text),n.moduleSpecifier.text.startsWith(".")&&index.reexportsFrom.push(n.moduleSpecifier.text);else if(import_ts_morph9.ts.isImportEqualsDeclaration(n)&&import_ts_morph9.ts.isExternalModuleReference(n.moduleReference)){let e=n.moduleReference.expression;import_ts_morph9.ts.isStringLiteral(e)&&load(e.text)}else if(import_ts_morph9.ts.isCallExpression(n)){let isLoad=import_ts_morph9.ts.isIdentifier(n.expression)&&n.expression.text==="require"||n.expression.kind===import_ts_morph9.ts.SyntaxKind.ImportKeyword,arg=n.arguments[0];isLoad&&arg&&(import_ts_morph9.ts.isStringLiteral(arg)?load(arg.text):index.computedLoads.push(arg.getText(sf)))}else import_ts_morph9.ts.isPropertyAccessExpression(n)?member(n.name):import_ts_morph9.ts.isQualifiedName(n)?member(n.right):(import_ts_morph9.ts.isPropertyAssignment(n)||import_ts_morph9.ts.isShorthandPropertyAssignment(n)||import_ts_morph9.ts.isMethodDeclaration(n)&&import_ts_morph9.ts.isObjectLiteralExpression(n.parent))&&member(n.name);import_ts_morph9.ts.forEachChild(n,visit)};return visit(sf),index}function repoIndex(repo){let index=repoIndexes.get(repo);if(index)return index;index=new Map;for(let file of repo.project.getSourceFiles())file.isDeclarationFile()||file.getFilePath().includes("/node_modules/")||index.set(file.getFilePath(),indexFile(file.compilerNode));return repoIndexes.set(repo,index),index}var detailed=new Map;onReset(()=>{detailed.clear(),repoIndexes=new WeakMap});function detailedSurfaceOf(adapter,name,version,dir){let key2=`${adapter.id}|${dir}`,p=detailed.get(key2);return p||(p=adapter.extractSurfaceDetailed({name,version,dir}),detailed.set(key2,p),p.catch(()=>detailed.delete(key2))),p}function isPackageSpecifier(specifier,pkg){return specifier===pkg||specifier.startsWith(`${pkg}/`)}function resolvePackageDir(repo,pkg){let from=repo.project.getSourceFiles()[0];if(!from)return;let resolved2=import_ts_morph9.ts.resolveModuleName(pkg,from.getFilePath(),repo.project.getCompilerOptions(),repo.project.getModuleResolutionHost()).resolvedModule,fallback=join7(repo.dir,"node_modules",pkg);if(!resolved2&&!existsSync6(join7(fallback,"package.json")))return;let dir=resolved2?dirname5(resolved2.resolvedFileName):fallback;for(;;){let pj=join7(dir,"package.json");if(existsSync6(pj))try{if(JSON.parse(readFileSync6(pj,"utf8")).name===pkg||!resolved2?.packageId)return realpathSync3(dir)}catch{}let parent=dirname5(dir);if(parent===dir)return existsSync6(join7(fallback,"package.json"))?realpathSync3(fallback):void 0;dir=parent}}function makeResolver(locations,pkgDir,surface){let inPackage=file=>file.startsWith(`${pkgDir}/`),known=new Map(surface.symbols.map(s=>[s.path,s])),canonicalOf=symbol=>{for(let decl of symbol.getDeclarations()){let file=decl.getSourceFile().getFilePath();if(!inPackage(file))continue;let path=locations.get(locationKey(file,decl.getStart()));if(path)return path}};return{inPackage,constructorOf(classPath){let ctor=`${classPath}.new()`;return known.has(ctor)?ctor:classPath},pathOf(symbol,written2){if(!symbol)return;let isAlias=(symbol.getFlags()&import_ts_morph9.ts.SymbolFlags.Alias)!==0,target=isAlias?symbol.getAliasedSymbol()??symbol:symbol,canonical=canonicalOf(target);if(canonical){if(written2!==void 0&&written2!==canonical){let named=known.get(written2);if(named&&named.aliasOf===canonical)return{path:named.path,canonical}}if(isAlias){let decl=symbol.getDeclarations()[0],imported=decl&&(import_ts_morph9.Node.isImportSpecifier(decl)||import_ts_morph9.Node.isExportSpecifier(decl))?decl.getNameNode().getText():void 0,named=imported?known.get(imported):void 0;if(named&&(named.aliasOf===canonical||named.path===canonical))return{path:named.path,canonical}}return{path:canonical,canonical}}}}}function isUntyped(expression){try{let type=expression.getType();return type.isAny()||type.isUnknown()}catch{return!1}}function rootedAtImport(access,extraRoots=new Set){let node=access;for(;;)if(import_ts_morph9.Node.isPropertyAccessExpression(node)||import_ts_morph9.Node.isElementAccessExpression(node))node=node.getExpression();else if(import_ts_morph9.Node.isCallExpression(node)||import_ts_morph9.Node.isNewExpression(node))node=node.getExpression();else if(import_ts_morph9.Node.isNonNullExpression(node)||import_ts_morph9.Node.isParenthesizedExpression(node))node=node.getExpression();else if(import_ts_morph9.Node.isQualifiedName(node))node=node.getLeft();else if(import_ts_morph9.Node.isAwaitExpression(node))node=node.getExpression();else break;if(!import_ts_morph9.Node.isIdentifier(node))return!1;let symbol=node.getSymbol();return symbol?(symbol.getFlags()&import_ts_morph9.ts.SymbolFlags.Alias)!==0||extraRoots.has(symbol):!1}function rootNode(access){let node=access;for(;;)if(import_ts_morph9.Node.isPropertyAccessExpression(node)||import_ts_morph9.Node.isElementAccessExpression(node)||import_ts_morph9.Node.isNonNullExpression(node)||import_ts_morph9.Node.isParenthesizedExpression(node)||import_ts_morph9.Node.isAwaitExpression(node))node=node.getExpression();else if(import_ts_morph9.Node.isQualifiedName(node))node=node.getLeft();else return node}function rootIdentifier(access){let node=access;for(;;)if(import_ts_morph9.Node.isPropertyAccessExpression(node)||import_ts_morph9.Node.isElementAccessExpression(node)||import_ts_morph9.Node.isCallExpression(node)||import_ts_morph9.Node.isNewExpression(node)||import_ts_morph9.Node.isNonNullExpression(node)||import_ts_morph9.Node.isParenthesizedExpression(node)||import_ts_morph9.Node.isAwaitExpression(node))node=node.getExpression();else if(import_ts_morph9.Node.isQualifiedName(node))node=node.getLeft();else break;return import_ts_morph9.Node.isIdentifier(node)?node:void 0}function packageLoadCall(node,pkg){if(!import_ts_morph9.Node.isCallExpression(node))return;let arg=node.getArguments()[0],specifier=arg&&import_ts_morph9.Node.isStringLiteral(arg)?arg.getLiteralValue():void 0;if(specifier===void 0||!isPackageSpecifier(specifier,pkg))return;let callee=node.getExpression();if(import_ts_morph9.Node.isIdentifier(callee)&&callee.getText()==="require")return"require";if(callee.getKind()===import_ts_morph9.ts.SyntaxKind.ImportKeyword)return"dynamic-import"}function unwrapAwait(node){return import_ts_morph9.Node.isAwaitExpression(node)?node.getExpression():node}function loadIsFollowed(call){let node=call;import_ts_morph9.Node.isAwaitExpression(node.getParent())&&(node=node.getParent());let parent=node.getParent();return parent?!!(import_ts_morph9.Node.isVariableDeclaration(parent)||import_ts_morph9.Node.isPropertyAccessExpression(parent)&&parent.getExpression()===node||import_ts_morph9.Node.isExpressionStatement(parent)||import_ts_morph9.Node.isImportEqualsDeclaration(parent)):!1}function literalFlowsInto(literal,resolver){let node=literal;for(;;){let parent=node.getParent();if(!parent)return!1;if(import_ts_morph9.Node.isObjectLiteralExpression(parent)||import_ts_morph9.Node.isArrayLiteralExpression(parent)||import_ts_morph9.Node.isPropertyAssignment(parent)||import_ts_morph9.Node.isParenthesizedExpression(parent)){node=parent;continue}if(import_ts_morph9.Node.isCallExpression(parent)||import_ts_morph9.Node.isNewExpression(parent)){let callee=parent.getExpression(),symbol=import_ts_morph9.Node.isPropertyAccessExpression(callee)?callee.getNameNode().getSymbol():callee.getSymbol();return resolver.pathOf(symbol)!==void 0}if(import_ts_morph9.Node.isVariableDeclaration(parent)||import_ts_morph9.Node.isSatisfiesExpression(parent)||import_ts_morph9.Node.isAsExpression(parent)){let typeNode=parent.getTypeNode(),name=typeNode&&import_ts_morph9.Node.isTypeReference(typeNode)?typeNode.getTypeName():void 0,symbol=name&&import_ts_morph9.Node.isQualifiedName(name)?name.getRight().getSymbol():name?.getSymbol();return resolver.pathOf(symbol)!==void 0}return!1}}function contextualProperty(literal,name){if(!import_ts_morph9.Node.isObjectLiteralExpression(literal))return;let contextual=literal.getContextualType();if(!contextual)return;let candidates=contextual.isUnion()?contextual.getUnionTypes():[contextual];for(let t of candidates){let prop=t.getProperty(name);if(prop)return prop}}function isAssignmentTarget(expr){let parent=expr.getParent();if(!parent)return!1;if(import_ts_morph9.Node.isBinaryExpression(parent)&&parent.getLeft()===expr){let op=parent.getOperatorToken().getKind();return op>=import_ts_morph9.ts.SyntaxKind.FirstAssignment&&op<=import_ts_morph9.ts.SyntaxKind.LastAssignment}if(import_ts_morph9.Node.isPrefixUnaryExpression(parent)||import_ts_morph9.Node.isPostfixUnaryExpression(parent)){let op=parent.getOperatorToken();return op===import_ts_morph9.ts.SyntaxKind.PlusPlusToken||op===import_ts_morph9.ts.SyntaxKind.MinusMinusToken}return import_ts_morph9.Node.isDeleteExpression(parent)}function referenceExpression(id){let parent=id.getParent();return parent&&import_ts_morph9.Node.isPropertyAccessExpression(parent)&&parent.getNameNode()===id||parent&&import_ts_morph9.Node.isQualifiedName(parent)&&parent.getRight()===id?parent:id}function classifyAccess(id){if(id.getFirstAncestor(a=>import_ts_morph9.Node.isExpressionWithTypeArguments(a)&&import_ts_morph9.Node.isHeritageClause(a.getParent())))return"implement";if(id.getFirstAncestor(a=>import_ts_morph9.Node.isTypeNode(a)||import_ts_morph9.Node.isTypeQuery(a)||import_ts_morph9.Node.isTypeReference(a)))return"typeRef";let expr=referenceExpression(id),parent=expr.getParent();return parent&&import_ts_morph9.Node.isCallExpression(parent)&&parent.getExpression()===expr?"call":parent&&import_ts_morph9.Node.isNewExpression(parent)&&parent.getExpression()===expr?"construct":isAssignmentTarget(expr)?"write":"read"}function viaOfImport(symbol,repoDir,resolver){let decl=symbol.getDeclarations()[0];if(decl&&import_ts_morph9.Node.isImportSpecifier(decl)&&decl.getAliasNode()!==void 0)return"alias";let current=symbol;for(let hops=0;hops<10&&current&&(current.getFlags()&import_ts_morph9.ts.SymbolFlags.Alias)!==0;hops++){let next=current.getImmediatelyAliasedSymbol(),nextDecl=next?.getDeclarations()[0];if(nextDecl){let file=nextDecl.getSourceFile().getFilePath();if(!resolver.inPackage(file)&&file.startsWith(`${repoDir}/`)&&(import_ts_morph9.Node.isExportSpecifier(nextDecl)||import_ts_morph9.Node.isExportAssignment(nextDecl)))return"reexport"}current=next}return"direct"}function scanUnanalyzed(file,pkg,repoDir){let out=[],rel=relative5(repoDir,file.getFilePath()).split("\\").join("/"),note=(node,kind)=>{out.push({file:rel,line:file.getLineAndColumnAtPos(node.getStart()).line,kind})};return file.forEachDescendant(node=>{if(!import_ts_morph9.Node.isCallExpression(node))return;let callee=node.getExpression(),isRequire=import_ts_morph9.Node.isIdentifier(callee)&&callee.getText()==="require",isImport=callee.getKind()===import_ts_morph9.ts.SyntaxKind.ImportKeyword;if(!isRequire&&!isImport)return;let arg=node.getArguments()[0];if(arg&&import_ts_morph9.Node.isStringLiteral(arg)){if(!isPackageSpecifier(arg.getLiteralValue(),pkg))return;loadIsFollowed(node)||note(node,isRequire?"require":"dynamic-import");return}let text=arg?.getText()??"";arg&&!import_ts_morph9.Node.isStringLiteral(arg)&&text.includes(pkg)&&note(node,isRequire?"require":"dynamic-import")}),out}async function findUsagesInRepo(adapter,repoRef,pkg,surface){let repo=loadedRepo(realpathSync3(repoRef.dir),repoRef.rootFiles),declarationsPkg=surface.package.startsWith("@types/")&&surface.package!==pkg?surface.package:pkg,pkgDir=resolvePackageDir(repo,declarationsPkg);if(!pkgDir){let files2=repo.project.getSourceFiles().filter(f=>!f.isDeclarationFile()&&ownsFile(repoRef,f.getFilePath())),unanalyzed2=files2.flatMap(f=>scanUnanalyzed(f,pkg,repo.dir));return{usages:[],unanalyzed:unanalyzed2,checksJs:repo.project.getCompilerOptions().checkJs===!0,filesScanned:files2.length,includesJs:repo.includesJs}}let{locations}=surface.symbols.length===0?{locations:new Map}:await detailedSurfaceOf(adapter,pkg,surface.version,pkgDir).catch(()=>({locations:new Map})),resolver=makeResolver(locations,pkgDir,surface),usages=[],seen=new Set,fileChecked=!0,emit2=(file,node,resolved2,access,via,loader)=>{let symbolPath=resolved2.path,start=file.getLineAndColumnAtPos(node.getStart()),end=file.getLineAndColumnAtPos(node.getEnd()),key2=`${file.getFilePath()}:${start.line}:${start.column}:${symbolPath}:${access}`;if(seen.has(key2))return;seen.add(key2);let lineText=file.getFullText().split(`
150
+ `)[start.line-1]??"",usage={file:relative5(repo.dir,file.getFilePath()).split("\\").join("/"),line:start.line,column:start.column,endLine:end.line,endColumn:end.column,symbolPath,access,snippet:lineText.trim(),via};resolved2.canonical!==symbolPath&&(usage.canonicalPath=resolved2.canonical),loader&&(usage.loader=loader),fileChecked||(usage.checked=!1),usages.push(usage)},files=repo.project.getSourceFiles().filter(f=>!f.isDeclarationFile()&&!f.getFilePath().includes("/node_modules/")&&!resolver.inPackage(f.getFilePath())&&ownsFile(repoRef,f.getFilePath())),index=repoIndex(repo),loadsPkg=path=>index.get(path)?.loads.has(pkg)===!0,barrels=new Set(files.filter(f=>{let entry=index.get(f.getFilePath());return entry?.loads.has(pkg)&&entry.reexportsFrom.length===0?f.getExportDeclarations().some(d=>isPackageSpecifier(d.getModuleSpecifierValue()??"",pkg)):!1}).map(f=>f.getFilePath())),importsPackage=file=>{let path=file.getFilePath();return loadsPkg(path)?!0:barrels.size===0||(index.get(path)?.importsFrom.length??0)===0?!1:file.getImportDeclarations().some(d=>{let specifier=d.getModuleSpecifierValue();if(specifier===void 0||!specifier.startsWith("."))return!1;let target=d.getModuleSpecifierSourceFile()?.getFilePath();return target!==void 0&&barrels.has(target)})},rootPath=surface.symbols.find(sym=>sym.exportEquals)?.path??"default",known=new Map(surface.symbols.map(sym=>[sym.path,sym])),byName=member=>{for(let candidatePath of[member,`${rootPath}.${member}`,`${rootPath}#${member}`]){let sym=known.get(candidatePath);if(sym)return{path:candidatePath,canonical:sym.aliasOf??candidatePath}}},leafCounts=new Map;for(let sym of surface.symbols){let name=leafOf(sym.path);/^[A-Za-z_$][\w$]*$/.test(name)&&leafCounts.set(name,[...leafCounts.get(name)??[],sym.path])}let leafNames=new Set(leafCounts.keys()),distinctive=name=>(leafCounts.get(name)?.length??0)<=8,onlyMeaning=name=>{let paths=leafCounts.get(name)??[],path=paths.length===1?paths[0]:void 0;return path===void 0?void 0:{path,canonical:known.get(path)?.aliasOf??path}},unanalyzed=[];for(let file of files){let entry=index.get(file.getFilePath()),full2=importsPackage(file),memberHits=entry?[...entry.memberNames.entries()].filter(([name])=>leafNames.has(name)).flatMap(([,p])=>p):[],computed=entry?.computedLoads.some(text=>text.includes(pkg))===!0;if(!full2&&memberHits.length===0&&!computed)continue;(full2||computed)&&unanalyzed.push(...scanUnanalyzed(file,pkg,repo.dir));let localAliases=new Map,candidate=name=>full2||leafNames.has(name);fileChecked=repoTypeChecks(file.getFilePath(),file.getFullText().slice(0,2e3),repo.project.getCompilerOptions().checkJs===!0);let requireLocals=new Set,requirePaths=new Map;for(let v of file.getDescendantsOfKind(import_ts_morph9.ts.SyntaxKind.VariableDeclaration)){let init=v.getInitializer();if(!init)continue;let load=unwrapAwait(init),nameNode=v.getNameNode();if(packageLoadCall(load,pkg)!==void 0){if(import_ts_morph9.Node.isIdentifier(nameNode)){let local=nameNode.getSymbol();local&&requireLocals.add(local),emit2(file,nameNode,{path:".",canonical:"."},"import","require","require")}else if(import_ts_morph9.Node.isObjectBindingPattern(nameNode)){emit2(file,nameNode,{path:".",canonical:"."},"import","require","require");for(let element2 of nameNode.getElements()){let propName=(element2.getPropertyNameNode()??element2.getNameNode()).getText(),local=element2.getNameNode().getSymbol(),viaChecker=resolver.pathOf(load.getType().getProperty(propName)),resolved2=viaChecker??byName(propName);local&&resolved2&&(localAliases.set(local,{resolved:resolved2,via:viaChecker?"destructure":"require"}),requireLocals.add(local),emit2(file,element2,resolved2,"read",viaChecker?"destructure":"require","require"))}}}else if(import_ts_morph9.Node.isPropertyAccessExpression(load)&&packageLoadCall(load.getExpression(),pkg)!==void 0&&import_ts_morph9.Node.isIdentifier(nameNode)){let local=nameNode.getSymbol(),resolved2=resolver.pathOf(load.getNameNode().getSymbol())??byName(load.getName());local&&resolved2&&(requirePaths.set(local,resolved2),requireLocals.add(local))}}for(let d of file.getStatements().filter(import_ts_morph9.Node.isImportEqualsDeclaration)){let spec=d.getModuleReference().getFirstDescendantByKind(import_ts_morph9.ts.SyntaxKind.StringLiteral)?.getLiteralValue();if(spec===void 0||!isPackageSpecifier(spec,pkg))continue;let local=d.getNameNode().getSymbol();local&&requireLocals.add(local)}let loaderOf=node=>{let chain=node.getParent()??node,start=rootNode(chain);if(start!==void 0&&packageLoadCall(start,pkg)!==void 0)return"require";let symbol=(rootIdentifier(chain)??(import_ts_morph9.Node.isIdentifier(node)?node:void 0))?.getSymbol();return symbol&&requireLocals.has(symbol)?"require":void 0};for(let decl of[...file.getImportDeclarations(),...file.getExportDeclarations()]){let specifier=decl.getModuleSpecifierValue();if(specifier===void 0||!isPackageSpecifier(specifier,pkg))continue;let named=import_ts_morph9.Node.isImportDeclaration(decl)?decl.getNamedImports():decl.getNamedExports();for(let spec of named){let resolved2=resolver.pathOf(spec.getSymbol());resolved2&&emit2(file,spec,resolved2,"import",spec.getAliasNode()!==void 0?"alias":"direct")}if(import_ts_morph9.Node.isImportDeclaration(decl)){let def=decl.getDefaultImport(),defResolved=def?resolver.pathOf(def.getSymbol()):void 0;def&&defResolved&&emit2(file,def,defResolved,"import","direct")}}for(let v of file.getDescendantsOfKind(import_ts_morph9.ts.SyntaxKind.VariableDeclaration)){let init=v.getInitializer();if(!init)continue;let nameNode=v.getNameNode();if(import_ts_morph9.Node.isObjectBindingPattern(nameNode)){let elements=nameNode.getElements().filter(e=>candidate((e.getPropertyNameNode()??e.getNameNode()).getText()));if(elements.length===0)continue;let type=init.getType();for(let element2 of elements){let propName=(element2.getPropertyNameNode()??element2.getNameNode()).getText(),resolved2=resolver.pathOf(type.getProperty(propName)),local=element2.getNameNode().getSymbol();resolved2&&local&&(localAliases.set(local,{resolved:resolved2,via:"destructure"}),emit2(file,element2,resolved2,"read","destructure"))}}else if(import_ts_morph9.Node.isIdentifier(nameNode)){let initSymbol=import_ts_morph9.Node.isPropertyAccessExpression(init)&&candidate(init.getName())||import_ts_morph9.Node.isIdentifier(init)&&full2?init.getSymbol():void 0,resolved2=resolver.pathOf(initSymbol),local=nameNode.getSymbol(),callable=(initSymbol?.getFlags()??0)&(import_ts_morph9.ts.SymbolFlags.Function|import_ts_morph9.ts.SymbolFlags.Method|import_ts_morph9.ts.SymbolFlags.Class);resolved2&&local&&callable!==0&&localAliases.set(local,{resolved:resolved2,via:"alias"})}}let visit=node=>{if(!import_ts_morph9.Node.isIdentifier(node))return;let parent=node.getParent();if(!parent||import_ts_morph9.Node.isImportSpecifier(parent)||import_ts_morph9.Node.isExportSpecifier(parent)||import_ts_morph9.Node.isNamespaceImport(parent)||import_ts_morph9.Node.isImportClause(parent))return;if((import_ts_morph9.Node.isPropertyAssignment(parent)||import_ts_morph9.Node.isShorthandPropertyAssignment(parent)||import_ts_morph9.Node.isMethodDeclaration(parent))&&parent.getNameNode()===node){let literal=parent.getParent();if(!import_ts_morph9.Node.isObjectLiteralExpression(literal)||!candidate(node.getText())||!full2&&!literalFlowsInto(literal,resolver))return;let resolved3=resolver.pathOf(contextualProperty(literal,node.getText()));if(!resolved3)return;let value=import_ts_morph9.Node.isPropertyAssignment(parent)?parent.getInitializer():parent,implementing=value!==void 0&&(import_ts_morph9.Node.isArrowFunction(value)||import_ts_morph9.Node.isFunctionExpression(value)||import_ts_morph9.Node.isMethodDeclaration(value));emit2(file,node,resolved3,implementing?"implement":"write","direct");return}if(import_ts_morph9.Node.isBindingElement(parent)||!full2&&(!(import_ts_morph9.Node.isPropertyAccessExpression(parent)&&parent.getNameNode()===node||import_ts_morph9.Node.isQualifiedName(parent)&&parent.getRight()===node)||!leafNames.has(node.getText())||!rootedAtImport(parent,requireLocals)&&!distinctive(node.getText()))||import_ts_morph9.Node.isPropertyAccessExpression(parent)&&parent.getExpression()===node&&candidate(parent.getName())&&resolver.pathOf(parent.getNameNode().getSymbol())||import_ts_morph9.Node.isQualifiedName(parent)&&parent.getLeft()===node&&resolver.pathOf(parent.getRight().getSymbol())||import_ts_morph9.Node.hasName(parent)&&parent.getNameNode()===node&&!import_ts_morph9.Node.isPropertyAccessExpression(parent))return;if(import_ts_morph9.Node.isPropertyAccessExpression(parent)&&parent.getNameNode()===node&&packageLoadCall(unwrapAwait(parent.getExpression()),pkg)!==void 0){let viaChecker=resolver.pathOf(node.getSymbol(),node.getText()),resolved3=viaChecker??byName(node.getText());resolved3&&emit2(file,node,resolved3,classifyAccess(node),viaChecker?"direct":"require","require");return}let symbol=node.getSymbol();if(!symbol){if(full2&&import_ts_morph9.Node.isPropertyAccessExpression(parent)&&parent.getNameNode()===node&&isUntyped(parent.getExpression())){let meaning=onlyMeaning(node.getText());meaning&&emit2(file,node,meaning,classifyAccess(node),"inferred",loaderOf(node))}return}let local=localAliases.get(symbol);if(local){emit2(file,node,local.resolved,classifyAccess(node),local.via,loaderOf(node));return}let bound=requirePaths.get(symbol);if(bound){emit2(file,node,bound,classifyAccess(node),"require","require");return}let resolved2=resolver.pathOf(symbol,node.getText()),syntactic=!1;if(!resolved2&&requireLocals.has(symbol)){if(import_ts_morph9.Node.isPropertyAccessExpression(parent)&&parent.getExpression()===node){let member=byName(parent.getName());member&&emit2(file,parent.getNameNode(),member,classifyAccess(parent.getNameNode()),"require","require");return}if(import_ts_morph9.Node.isCallExpression(parent)&&parent.getExpression()===node&&known.has(rootPath))resolved2={path:rootPath,canonical:rootPath},syntactic=!0;else return}if(!resolved2)return;let via=syntactic?"require":(symbol.getFlags()&import_ts_morph9.ts.SymbolFlags.Alias)!==0?viaOfImport(symbol,repo.dir,resolver):"direct",access=classifyAccess(node),target=access==="construct"?{path:resolver.constructorOf(resolved2.path),canonical:resolver.constructorOf(resolved2.canonical)}:resolved2;emit2(file,node,target,access,via,loaderOf(node))};if(full2)file.forEachDescendant(visit);else for(let pos of memberHits){let node=file.getDescendantAtPos(pos);node&&visit(node)}}return{usages:usages.sort((a,b)=>a.file.localeCompare(b.file)||a.line-b.line||a.column-b.column),unanalyzed:unanalyzed.sort((a,b)=>a.file.localeCompare(b.file)||a.line-b.line),checksJs:repo.project.getCompilerOptions().checkJs===!0,filesScanned:files.length,includesJs:repo.includesJs}}function installedPackageDir(repoRef,pkg){return resolvePackageDir(loadedRepo(realpathSync3(repoRef.dir),repoRef.rootFiles),pkg)}function installedDependenciesOf(repoRef){let repo=readInstalled(realpathSync3(repoRef.dir));if(!repo.lockfile)throw new UptideError("NO_LOCKFILE",`${repoRef.dir}: no lockfile found`);return new Map(repo.installed)}function importedPackagesOf(repoRef){let repo=loadedRepo(realpathSync3(repoRef.dir),repoRef.rootFiles),out=new Set,packageOf=specifier=>{if(specifier.startsWith(".")||specifier.startsWith("/")||specifier.startsWith("node:"))return;let parts=specifier.split("/");return specifier.startsWith("@")?parts.slice(0,2).join("/"):parts[0]};for(let file of repo.project.getSourceFiles())if(!(file.isDeclarationFile()||file.getFilePath().includes("/node_modules/"))){for(let decl of[...file.getImportDeclarations(),...file.getExportDeclarations()]){let spec=decl.getModuleSpecifierValue(),name=spec===void 0?void 0:packageOf(spec);name&&out.add(name)}file.forEachDescendant(node=>{let spec;if(import_ts_morph9.Node.isCallExpression(node)){let callee=node.getExpression(),arg=node.getArguments()[0],isRequire=import_ts_morph9.Node.isIdentifier(callee)&&callee.getText()==="require",isImport=callee.getKind()===import_ts_morph9.ts.SyntaxKind.ImportKeyword;(isRequire||isImport)&&arg&&import_ts_morph9.Node.isStringLiteral(arg)&&(spec=arg.getLiteralValue())}else import_ts_morph9.Node.isImportEqualsDeclaration(node)&&(spec=node.getModuleReference().getFirstDescendantByKind(import_ts_morph9.ts.SyntaxKind.StringLiteral)?.getLiteralValue());let name=spec===void 0?void 0:packageOf(spec);name&&out.add(name)})}return out}function newLinks(){return{links:new Map,fetched:[],linked:[],unsatisfied:[],decided:new Set}}function scopeOf(pkg){return pkg.startsWith("@")?pkg.split("/")[0]:`@${pkg}`}function consumerCopySatisfies(pkg,dep,range,consumerVersion){return consumerVersion===void 0||dep.startsWith(`${scopeOf(pkg)}/`)?!1:satisfies(consumerVersion,range)}var manifests=new Map;function readManifest(dir){if(manifests.has(dir))return manifests.get(dir);let manifest2;try{manifest2=JSON.parse(readFileSync7(join8(dir,"package.json"),"utf8"))}catch{manifest2=void 0}return manifests.set(dir,manifest2),manifest2}function declaredRange(dir,dep){let m=readManifest(dir);return m?.dependencies?.[dep]??m?.peerDependencies?.[dep]}function isPeerOnly(dir,dep){let m=readManifest(dir);return m?.peerDependencies?.[dep]!==void 0&&m.dependencies?.[dep]===void 0}function installedVersion(repo,dep){let dir=resolvePackageDir(repo,dep);if(!dir||!existsSync7(join8(dir,"package.json")))return;let version=readManifest(dir)?.version;return version?{dir,version}:void 0}var EXACT=/^v?\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;async function satisfyWanted(repo,links,wanted,fetcher){let added=0;for(let[dep,{range,from}]of wanted){if(links.decided.has(dep))continue;links.decided.add(dep);let consumer=installedVersion(repo,dep);if(consumerCopySatisfies(from,dep,range,consumer?.version)||/^[a-z]+:/i.test(range))continue;let exact=EXACT.test(range.trim())?range.trim():void 0,versions=exact?[exact]:fetcher?.versions?await fetcher.versions(dep).catch(()=>[]):[],best=maxSatisfying(versions,range);if(best===void 0){consumer?links.unsatisfied.push(`${dep}@${consumer.version} does not satisfy ${range}`):fetcher?.versions||links.unsatisfied.push(`${dep}@${range} not installed`);continue}if(consumer&&consumer.version===best){links.links.set(dep,consumer.dir),links.linked.push(`${dep}@${best} (consumer)`),added++;continue}try{let fetchedDir=await fetcher?.fetch(dep,best);if(!fetchedDir)continue;links.fetched.push(fetchedDir),links.links.set(dep,fetchedDir.dir),links.linked.push(`${dep}@${best} (fetched)`),added++}catch(err){links.unsatisfied.push(`${dep}@${best}: ${err.message}`)}}return links.linked.sort(),links.unsatisfied.sort(),added}var CANNOT_FIND_MODULE=2307,CANNOT_FIND_MODULE_JSX=2792;function isPackageSpecifier2(specifier,pkg){return specifier===pkg||specifier.startsWith(`${pkg}/`)}function isBare(specifier){return!specifier.startsWith(".")&&!specifier.startsWith("/")}function messageOf(d){return import_ts_morph5.ts.flattenDiagnosticMessageText(d.messageText,`
151
+ `)}function readableMessage(message){return message.replace(/(?:[A-Za-z]:)?[\\/][^\s"'()]*[\\/]extracted[\\/]((?:@[^\\/"'\s]+[\\/])?[^\\/"'\s]+)[\\/](\d+\.\d+\.\d+[^\\/"'\s]*)[\\/]/g,(_all,name,version)=>`${name.replace("\\","/")}@${version}/`).replace(/(?:[A-Za-z]:)?[\\/][^\s"'()]*[\\/]node_modules[\\/]((?:@[^\\/"'\s]+[\\/])?[^\\/"'\s]+)[\\/]/g,(_all,name)=>`${name.replace("\\","/")}/`)}function keyOf(d,repoDir){return`${relative6(repoDir,d.file?.fileName??"")}|${d.code}|${messageOf(d).replace(/\s+/g," ").trim()}`}function toDiagnostic(d,file,repoDir){let start=d.start??0,from=file.getLineAndCharacterOfPosition(start),to=file.getLineAndCharacterOfPosition(start+(d.length??0));return{file:relative6(repoDir,file.fileName).split("\\").join("/"),line:from.line+1,column:from.character+1,endLine:to.line+1,endColumn:to.character+1,code:d.code,message:readableMessage(messageOf(d)),snippet:(file.text.split(`
152
+ `)[from.line]??"").trim()}}function isRepoError(d,repoDir){if(d.category!==import_ts_morph5.ts.DiagnosticCategory.Error||!d.file||d.file.isDeclarationFile)return!1;let path=d.file.fileName;return path.startsWith(`${repoDir}/`)&&!path.includes("/node_modules/")}var baselines=new WeakMap;function baselineErrorsOf(repo,program,file){let perFile=baselines.get(repo);perFile||(perFile=new Map,baselines.set(repo,perFile));let errors=perFile.get(file.fileName);return errors||(errors=program.getSemanticDiagnostics(file).filter(d=>isRepoError(d,repo.dir)),perFile.set(file.fileName,errors)),errors}var importers=new WeakMap;function importersOf(repo){let map=importers.get(repo);if(map)return map;map=new Map;for(let file of repo.project.getSourceFiles()){if(file.isDeclarationFile())continue;let from=file.getFilePath();for(let decl of[...file.getImportDeclarations(),...file.getExportDeclarations()]){let to=decl.getModuleSpecifierSourceFile()?.getFilePath();if(!to||to.includes("/node_modules/"))continue;let set=map.get(to);set||(set=new Set,map.set(to,set)),set.add(from)}}return importers.set(repo,map),map}function filesToCheck(repo,repoRef,program,requested){let own=f=>!f.isDeclarationFile&&isRepoError({category:import_ts_morph5.ts.DiagnosticCategory.Error,file:f},repo.dir)&&ownsFile(repoRef,f.fileName);if(!requested)return program.getSourceFiles().filter(own);let wanted=new Set,reverse=importersOf(repo);for(let rel of requested){let abs=join9(repo.dir,rel);wanted.add(abs);for(let importer of reverse.get(abs)??[])wanted.add(importer)}return[...wanted].map(p=>program.getSourceFile(p)).filter(f=>f!==void 0&&own(f))}function structuralFailure(program,files,baseline){let config=program.getConfigFileParsingDiagnostics();if(config.length>0)return`invalid tsconfig: ${messageOf(config[0]).split(`
153
+ `)[0]}`;let unresolvable=new Set(baseline.filter(d=>d.code===CANNOT_FIND_MODULE||d.code===CANNOT_FIND_MODULE_JSX).map(d=>d.file?.fileName)).size;if(files.length>0&&unresolvable/files.length>.5)return`${unresolvable} of ${files.length} files cannot resolve their imports at the installed version; compile signal skipped`}function packageNameOf2(specifier){return specifier.split("/").slice(0,specifier.startsWith("@")?2:1).join("/")}function checkedOptions(base){return{...base.getCompilerOptions(),noEmit:!0,skipLibCheck:!0,checkJs:!0}}function sharedHost(base,insideOverlay,parsed2){let options=checkedOptions(base),host=import_ts_morph5.ts.createCompilerHost(options,!0);host.useCaseSensitiveFileNames=()=>!0,host.getCanonicalFileName=fileName=>fileName,host.getCurrentDirectory=()=>base.getCurrentDirectory();let noPaths={...options,paths:void 0,baseUrl:void 0},anyLib=base.getSourceFiles().find(f=>/\/lib\.[^/]*\.d\.ts$/.test(f.fileName));if(anyLib){let libDir=dirname6(anyLib.fileName);host.getDefaultLibLocation=()=>libDir,host.getDefaultLibFileName=o=>join9(libDir,import_ts_morph5.ts.getDefaultLibFileName(o))}let defaultFileExists=host.fileExists;host.fileExists=fileName=>base.getSourceFile(fileName)!==void 0||defaultFileExists(fileName);let defaultGetSourceFile=host.getSourceFile;host.getSourceFile=(fileName,languageVersion,onError,shouldCreate)=>{if(!insideOverlay(fileName)){let shared=base.getSourceFile(fileName);if(shared)return shared}let file=parsed2.get(fileName);return file||(file=defaultGetSourceFile(fileName,languageVersion,onError,shouldCreate),file&&parsed2.set(fileName,file)),file};let resolvedByBaseline=base.getResolvedModule?.bind(base);return{options,host,noPaths,resolvedByBaseline}}function usageModes(options,host){let nodeish=options.moduleResolution===import_ts_morph5.ts.ModuleResolutionKind.Node16||options.moduleResolution===import_ts_morph5.ts.ModuleResolutionKind.NodeNext,formats2=new Map;return(file,usage)=>{if(file.impliedNodeFormat!==void 0||!nodeish)return import_ts_morph5.ts.getModeForUsageLocation(file,usage,options);let format=formats2.get(file.fileName);format===void 0&&!formats2.has(file.fileName)&&(format=import_ts_morph5.ts.getImpliedNodeFormatForFile(file.fileName,void 0,host,options),formats2.set(file.fileName,format));let withFormat=Object.create(file,{impliedNodeFormat:{value:format}});return import_ts_morph5.ts.getModeForUsageLocation(withFormat,usage,options)}}var checkedBaselines=new WeakMap;onReset(()=>{baselines=new WeakMap,importers=new WeakMap,checkedBaselines=new WeakMap});function checkedBaseline(repo,base){let program=checkedBaselines.get(repo);if(program)return program;let{options,host,resolvedByBaseline}=sharedHost(base,()=>!1,new Map);return host.resolveModuleNameLiterals=(literals,containingFile,_r,_o,containingSourceFile)=>literals.map(literal=>resolvedByBaseline?.(containingSourceFile,literal.text,import_ts_morph5.ts.getModeForUsageLocation(containingSourceFile,literal,options))??import_ts_morph5.ts.resolveModuleName(literal.text,containingFile,options,host)),program=import_ts_morph5.ts.createProgram({rootNames:[...base.getRootFileNames()],options,host}),checkedBaselines.set(repo,program),program}function overlayProgram(repo,base,targets,overlay,deps,parsed2){let link=(name,dir)=>{let linkDir=join9(overlay,"node_modules",...name.split("/"));mkdirSync(dirname6(linkDir),{recursive:!0}),symlinkSync(realpathSync4(dir),linkDir,"dir")};for(let t of targets)link(t.name,t.dir);for(let[name,dir]of deps.links)link(name,dir);let overlayDirs=new Map(targets.map(t=>[realpathSync4(t.dir),t.name]));for(let[name,dir]of deps.links)overlayDirs.set(realpathSync4(dir),name);let overlayDirOf=file=>[...overlayDirs.keys()].find(d=>file.startsWith(`${d}/`)),insideOverlay=file=>overlayDirOf(file)!==void 0,wanted=new Map,probe=join9(overlay,"probe.ts"),repoProbe=join9(repo.dir,"__uptide_probe__.ts"),unresolvedInTarget=new Set,unresolvedFiles=new Set,{options,host,noPaths,resolvedByBaseline}=sharedHost(base,insideOverlay,parsed2),modeOf=usageModes(options,host);host.resolveModuleNameLiterals=(literals,containingFile,_redirect,_opts,containingSourceFile)=>literals.map(literal=>{let name=literal.text,mode=containingSourceFile?modeOf(containingSourceFile,literal):void 0;if(targets.some(t=>isPackageSpecifier2(name,t.specifier??t.name)))return import_ts_morph5.ts.resolveModuleName(name,probe,noPaths,host,void 0,void 0,mode);if(!insideOverlay(containingFile)){let known=resolvedByBaseline?.(containingSourceFile,name,mode);if(known)return known}if(insideOverlay(containingFile)&&isBare(name)){let linked=import_ts_morph5.ts.resolveModuleName(name,probe,noPaths,host,void 0,void 0,mode);if(linked.resolvedModule)return linked}let from=overlayDirOf(containingFile),dep=packageNameOf2(name);if(from!==void 0&&isBare(name)){let range=declaredRange(from,dep);if(range!==void 0&&!deps.decided.has(dep)&&!deps.links.has(dep)){let importer=overlayDirs.get(from),consumer=installedVersion(repo,dep);consumer&&isPeerOnly(from,dep)?(deps.decided.add(dep),satisfies(consumer.version,range)||deps.unsatisfied.push(`${dep}@${consumer.version} is outside the peer range ${range} of ${importer}; compiled against the installed ${dep}`)):consumerCopySatisfies(importer,dep,range,consumer?.version)||wanted.set(dep,{range,from:importer})}let typesDep=`@types/${dep.startsWith("@")?dep.slice(1).replace("/","__"):dep}`,typesRange=declaredRange(from,typesDep);if(typesRange!==void 0&&!deps.decided.has(typesDep)&&!deps.links.has(typesDep)){let importer=overlayDirs.get(from),consumer=installedVersion(repo,typesDep);consumerCopySatisfies(importer,typesDep,typesRange,consumer?.version)||wanted.set(typesDep,{range:typesRange,from:importer})}}let direct=import_ts_morph5.ts.resolveModuleName(name,containingFile,options,host,void 0,void 0,mode);if(direct.resolvedModule||from===void 0||!isBare(name))return direct;let fromRepo=import_ts_morph5.ts.resolveModuleName(name,repoProbe,options,host,void 0,void 0,mode),builtin=name.startsWith("node:")||builtinModules.includes(dep);if(!fromRepo.resolvedModule&&!wanted.has(dep)&&!builtin){unresolvedInTarget.add(dep);let owner=overlayDirs.get(from);owner!==void 0&&targets.some(t=>t.name===owner)&&unresolvedFiles.add(relative6(from,containingFile))}return fromRepo});let program=import_ts_morph5.ts.createProgram({rootNames:[...base.getRootFileNames()],options,host});for(let file of program.getSourceFiles())insideOverlay(file.fileName)&&import_ts_morph5.ts.forEachChild(file,node=>{import_ts_morph5.ts.isModuleDeclaration(node)&&import_ts_morph5.ts.isStringLiteral(node.name)&&(unresolvedInTarget.delete(node.name.text),unresolvedInTarget.size===0&&unresolvedFiles.clear())});return{program,overlayDirs:[...overlayDirs.keys()],unresolvedInTarget,unresolvedFiles,wanted}}async function convergedOverlay(repo,base,targets,overlay,deps,fetcher){let parsed2=new Map;for(let round2=0;;round2++){let result=overlayProgram(repo,base,targets,overlay,deps,parsed2);if(result.wanted.size===0||round2===4||await satisfyWanted(repo,deps,result.wanted,fetcher)===0)return result;rmSync2(join9(overlay,"node_modules"),{recursive:!0,force:!0})}}function compileAgainstTarget(repoRef,pkg,targetDir,options={}){return compileAgainstTargets(repoRef,[{name:pkg,dir:targetDir}],options)}async function compileAgainstTargets(repoRef,targets,options={}){let repo;try{repo=loadedRepo(realpathSync4(repoRef.dir),repoRef.rootFiles)}catch(err){let message=(err instanceof Error?err.message:String(err)).split(`
154
+ `)[0]??"";return{diagnostics:[],baselineErrors:0,skipped:`invalid tsconfig: ${message}`,unresolvedInTarget:[],unresolvedFiles:[],linkedDependencies:[],unsatisfiedDependencies:[],timing:{baselineMs:0,overlayMs:0,dependenciesMs:0}}}let t0=Date.now(),base=repo.project.getProgram().compilerObject,baselineTargets=options.baselineTargets&&options.baselineTargets.length>0?options.baselineTargets:targets.flatMap(t=>{let installed=resolvePackageDir(repo,t.name);return installed?[{...t,dir:installed}]:[]}),baselineOverlayDir,checked,memoized=baselineTargets.length===0;memoized?checked=checkedBaseline(repo,base):(baselineOverlayDir=mkdtempSync2(join9(tmpdir2(),"uptide-baseline-")),checked=overlayProgram(repo,base,baselineTargets,baselineOverlayDir,newLinks(),new Map).program);let files=filesToCheck(repo,repoRef,checked,options.files),baseline=files.flatMap(f=>memoized?baselineErrorsOf(repo,checked,f):checked.getSemanticDiagnostics(f).filter(d=>isRepoError(d,repo.dir)));baselineOverlayDir&&rmSync2(baselineOverlayDir,{recursive:!0,force:!0});let baselineMs=Date.now()-t0,skipped=structuralFailure(checked,files,baseline);if(skipped)return{diagnostics:[],baselineErrors:baseline.length,skipped,unresolvedInTarget:[],unresolvedFiles:[],linkedDependencies:[],unsatisfiedDependencies:[],timing:{baselineMs,overlayMs:0,dependenciesMs:0}};let known=new Set(baseline.map(d=>keyOf(d,repo.dir))),overlay=mkdtempSync2(join9(tmpdir2(),"uptide-overlay-")),deps=newLinks();for(let t of targets)deps.decided.add(t.name);try{let t1=Date.now(),{program,unresolvedInTarget,unresolvedFiles}=await convergedOverlay(repo,base,targets,overlay,deps,options.fetcher),fresh=[];for(let file of files){let overlaid=program.getSourceFile(file.fileName);if(overlaid)for(let d of program.getSemanticDiagnostics(overlaid))isRepoError(d,repo.dir)&&!known.has(keyOf(d,repo.dir))&&fresh.push({d,overlaid})}let erroredLines=new Set(fresh.map(({d,overlaid})=>{let{line}=overlaid.getLineAndCharacterOfPosition(d.start??0);return`${relative6(repo.dir,overlaid.fileName)}:${line+1}`}));return{diagnostics:fresh.map(({d,overlaid})=>{let diagnostic=toDiagnostic(d,overlaid,repo.dir),cause=findCause({overlay:program,base:checked},d,overlaid,repo.dir,erroredLines);return cause&&(diagnostic.cause=cause),diagnostic}).sort((a,b)=>a.file.localeCompare(b.file)||a.line-b.line||a.column-b.column),baselineErrors:baseline.length,unresolvedInTarget:[...unresolvedInTarget].sort(),unresolvedFiles:[...unresolvedFiles].sort(),linkedDependencies:deps.linked,linkedDependencyDirs:Object.fromEntries(deps.links),unsatisfiedDependencies:deps.unsatisfied,timing:{baselineMs,overlayMs:Date.now()-t1,dependenciesMs:0}}}finally{rmSync2(overlay,{recursive:!0,force:!0})}}function reachableFiles(entry){let seen=new Set([entry]),queue=[entry];for(let i=0;i<queue.length;i++)for(let next of queue[i].getReferencedSourceFiles())seen.has(next)||(seen.add(next),queue.push(next));return[...seen]}function rescope(path,entry){return splitPath(path).scope===void 0?scoped(entry,path):path}function merge(perEntry){let byPath=new Map,rootDecls=new Map;for(let{entry,roots}of perEntry)if(entry===".")for(let[root,decls]of roots)rootDecls.set(root,new Set(decls));let groups2=new Map;for(let{roots}of perEntry)for(let[root,decls]of roots){let list=groups2.get(root)??[],shared=list.find(g=>[...decls].some(d=>g.has(d)));if(shared)for(let d of decls)shared.add(d);else list.push(new Set(decls));groups2.set(root,list)}let collidingFor=(entry,roots)=>{let out=new Set;if(entry===".")return out;for(let[root,decls]of roots){if((groups2.get(root)?.length??0)<2)continue;let atRoot=rootDecls.get(root);atRoot&&[...decls].some(d=>atRoot.has(d))||out.add(root)}return out};for(let{entry,symbols,roots}of perEntry){let collidingRoots=collidingFor(entry,roots);for(let{symbol,root}of symbols){let path=collidingRoots.has(root)?rescope(symbol.path,entry):symbol.path;symbol.path=path;let existing=byPath.get(path);if(existing){existing.exportedFrom.includes(entry)||existing.exportedFrom.push(entry);continue}byPath.set(path,{...symbol,path,exportedFrom:[entry]})}}return[...byPath.values()].sort((a,b)=>a.path<b.path?-1:a.path>b.path?1:0)}function locationKey(fileName,start){return`${fileName}:${start}`}function createTypescriptAdapter(opts={}){let now=opts.now??(()=>new Date),adapter={id:"typescript",compareTypes:compareTypesWithChecker,findUsages:(repo,pkg,surface)=>findUsagesInRepo(adapter,repo,pkg,surface),compileAgainst:compileAgainstTarget,compileAgainstMany:compileAgainstTargets,async installedDependencies(repo){return installedDependenciesOf(repo)},installedPackageDir(repo,pkg){return installedPackageDir(repo,pkg)},async importedPackages(repo){return importedPackagesOf(repo)},async workspacePackages(root){return workspacePackagesOf(root.dir)},async repoWarnings(repo){return loadedRepo(realpathSync5(repo.dir),repo.rootFiles).warnings},async declaredSpecifiers(repo){let{packageJson}=readInstalled(realpathSync5(repo.dir));return new Map(Object.entries({...packageJson.dependencies,...packageJson.devDependencies,...packageJson.optionalDependencies}))},forgetRepo(repo){forgetRepo(realpathSync5(repo.dir))},async installedSurface(repo,pkg,version){let dir=installedPackageDir(repo,pkg);return dir?adapter.extractSurface({name:pkg,version,dir}):void 0},async extractSurface(pkg){return(await adapter.extractSurfaceDetailed(pkg)).surface},async extractSurfaceDetailed(pkg){let entries=resolveEntryPoints(pkg.dir,pkg.name,pkg.version),project=new import_ts_morph.Project({skipAddingFilesFromTsConfig:!0,skipFileDependencyResolution:!0,compilerOptions:{moduleResolution:import_ts_morph.ts.ModuleResolutionKind.Bundler,module:import_ts_morph.ts.ModuleKind.ESNext,target:import_ts_morph.ts.ScriptTarget.ESNext,skipLibCheck:!0,noEmit:!0,types:[]}}),files=entries.map(e=>({entry:e.entry,file:project.addSourceFileAtPath(e.file)}));for(let typesDir of pkg.types??[]){let index=join10(typesDir,"index.d.ts");existsSync8(index)&&project.addSourceFileAtPath(index)}project.resolveSourceFileDependencies();let checker=project.getTypeChecker(),byDeclaration=new Map,sinks=new Map,sinkFor=entry=>{let s=sinks.get(entry);if(!s){let symbols=[],roots=new Map;s={symbols,roots,sink:{entry,packageDir:pkg.dir,checker,byDeclaration,rootDecls:roots,emit(root,symbol){symbols.push({symbol,root})}}},sinks.set(entry,s)}return s};for(let e of entries)sinkFor(e.entry);let ownModules=new Map,foreign=new Map;for(let{entry,file}of files){walkModule(sinkFor(entry).sink,file);for(let reached of reachableFiles(file))for(let mod of reached.getModules()){let name=ambientModuleName(mod);if(name===void 0)continue;if(ownEntryOf(name,pkg.name)!==void 0)ownModules.has(name)||ownModules.set(name,mod);else{let f=foreign.get(name)??{mod,entries:new Set};f.entries.add(entry),foreign.set(name,f)}}}for(let[name,mod]of ownModules)walkModule(sinkFor(ownEntryOf(name,pkg.name)).sink,mod);for(let[name,{mod,entries:reachedFrom}]of foreign)for(let entry of reachedFrom)walkModule(sinkFor(entry).sink,mod,name);assignAliases(byDeclaration);let perEntry=[...sinks.entries()].sort(([a],[b])=>a==="."?-1:b==="."?1:a<b?-1:1).map(([entry,s])=>({entry,symbols:s.symbols,roots:s.roots})),surface={package:pkg.name,version:pkg.version,extractedAt:now().toISOString(),adapter:"typescript",symbols:merge(perEntry)},locations=new Map;for(let[node,cls]of byDeclaration){let canonical=cls.symbols.find(s=>s.aliasOf===void 0)??cls.symbols[0];canonical&&locations.set(locationKey(node.getSourceFile().fileName,node.getStart()),canonical.path)}return{surface,locations}}};return adapter}var typescriptAdapter=createTypescriptAdapter();function defaultCacheDir(env=process.env){if(env.UPTIDE_CACHE_DIR)return env.UPTIDE_CACHE_DIR;let base=env.XDG_CACHE_HOME||join11(homedir(),".cache");return join11(base,"uptide")}function packagePathSegments(name){return name.split("/")}function surfaceCachePath(root,key2){return join12(root,"surfaces",key2.adapter,`v${key2.schema}`,...packagePathSegments(key2.package),`${key2.version}.json`)}function createFsSurfaceCache(opts={}){let root=opts.dir??defaultCacheDir();return{async get(key2){try{return JSON.parse(await readFile(surfaceCachePath(root,key2),"utf8"))}catch{return}},async set(key2,surface){let path=surfaceCachePath(root,key2);await mkdir(dirname7(path),{recursive:!0});let tmp=`${path}.${process.pid}.${randomUUID()}.tmp`;await writeFile(tmp,JSON.stringify(surface)),await rename(tmp,path)}}}function requireFindUsages(adapter){let find=adapter.findUsages;if(!find)throw new AdapterCapabilityError(adapter.id,"findUsages");return find.bind(adapter)}var WIDENED_NOTE="type widened; breaking if the member is read by the consumer";function hasOtherMembers(callPath,symbols){let container=callPath.slice(0,-3);for(let path of symbols.keys()){if(path===callPath||!path.startsWith(container)||path.length<=container.length)continue;let sep4=path[container.length];if((sep4==="#"||sep4==="."||sep4==="[")&&path!==`${container}.new()`)return!0}return!1}function roleOf(symbol,comparison,symbols){switch(symbol.kind){case"function":return"callable";case"method":return leafOf(symbol.path)==="()"&&!hasOtherMembers(symbol.path,symbols)?"callback":"callable";case"property":return comparison.callable?symbol.optional||/^on[A-Z]/.test(leafOf(symbol.path))?"callback":"callable":symbol.signature.startsWith("readonly ")?"output":"unknown";case"variable":case"enumMember":case"class":return"output";case"interface":case"type":return"unknown";default:return}}function collect(){let breakingNotes=[],additiveNotes=[],verdict={severity:"additive",confidence:1,notes:[]};return{verdict,breaking(note){breakingNotes.push(note),verdict.severity="breaking",verdict.notes=[...breakingNotes,...additiveNotes]},additive(note,confidence){additiveNotes.push(note),confidence!==void 0&&(verdict.confidence=Math.min(verdict.confidence,confidence)),verdict.notes=[...breakingNotes,...additiveNotes]}}}function thisNote(sig){let t=sig.thisParameter;if(t){if(t.relation==="added")return`this parameter added (${t.after})`;if(t.relation==="removed")return"this parameter removed";if(t.relation!=="equivalent")return`this parameter type changed (${t.before} -> ${t.after})`}}function callerVerdict(sigs){let c=collect();for(let sig of sigs){let t=thisNote(sig);t&&c.additive(t);for(let p of sig.parameters){if(p.relation==="removed"){c.breaking(`parameter '${p.name}' removed`);continue}if(p.relation==="added"){p.optionalAfter?c.additive(`optional parameter '${p.name}' added`):c.breaking(`required parameter '${p.name}' added`);continue}p.optionalBefore&&!p.optionalAfter?c.breaking(`parameter '${p.name}' became required`):!p.optionalBefore&&p.optionalAfter&&c.additive(`parameter '${p.name}' became optional`),p.relation==="narrowed"?c.breaking(`parameter '${p.name}' type narrowed`):p.relation==="incompatible"?c.breaking(`parameter '${p.name}' type changed`):p.relation==="widened"&&c.additive(`parameter '${p.name}' type widened`,.8)}sig.returnType==="widened"?c.breaking("return type widened; callers must handle new cases"):sig.returnType==="incompatible"?c.breaking("return type changed"):sig.returnType==="narrowed"&&c.additive("return type narrowed (safe for callers)")}return finish(c.verdict)}function implementerVerdict(sigs){let c=collect();for(let sig of sigs){let t=thisNote(sig);t&&c.additive(t);for(let p of sig.parameters){if(p.relation==="removed"){c.breaking(`callback parameter '${p.name}' removed`);continue}if(p.relation==="added"){c.additive(`callback parameter '${p.name}' added (implementations may ignore it)`);continue}p.optionalBefore&&!p.optionalAfter&&c.additive(`callback parameter '${p.name}' now always provided`),p.relation==="widened"?c.breaking(`callback parameter '${p.name}' widened; implementations must accept more`):p.relation==="incompatible"?c.breaking(`callback parameter '${p.name}' type changed`):p.relation==="narrowed"&&c.additive(`callback parameter '${p.name}' narrowed`,.6)}sig.returnType==="narrowed"?c.breaking("callback return type narrowed; implementations must return less"):sig.returnType==="incompatible"?c.breaking("callback return type changed"):sig.returnType==="widened"&&c.additive("callback return type widened")}return finish(c.verdict)}function finish(verdict){let notes=verdict.notes.filter(n=>!/type widened$/.test(n)||verdict.severity==="breaking");return{...verdict,notes}}function typeParamNames(list){return splitTopLevel(list,",").map(p=>/^(const\s+)?([A-Za-z_$][\w$]*)/.exec(p.trim())?.[2]).filter(n=>n!==void 0)}function normalizeTypeParams(text){let generic=!1,rename3=(segment2,names)=>{if(names.length===0)return segment2;generic=!0;let out=segment2;return names.forEach((name,i)=>{out=out.replace(new RegExp(`\\b${name.replace(/\$/g,"\\$")}\\b`,"g"),`T${i}`)}),out},alias=/^type<((?:[^<>]|<[^<>]*>)*)> = /.exec(text);if(alias)return{normalized:rename3(text,typeParamNames(alias[1])),generic};let overloads=parseCallable(asCallable(text)??text);return overloads?{normalized:splitTopLevel(asCallable(text)??text,";").map((seg,i)=>rename3(seg,(overloads[i]?.typeParams??[]).map(tp=>typeParamNames(tp)[0]??""))).join("; "),generic}:{normalized:text,generic:!1}}var GENERIC_DIFFER={severity:"breaking",confidence:.7,notes:["generic signatures differ"]},TYPE_ARGS_NOTE="explicit type arguments will no longer compile",TYPE_PARAMS_LOST={severity:"breaking",confidence:.6,notes:[TYPE_ARGS_NOTE]};function lostTypeParameters(comparison){let counts=comparison.typeParameterCounts;if(!counts)return!1;let max=Math.max(counts.before.length,counts.after.length);for(let i=0;i<max;i++)if((counts.before[i]??0)>(counts.after[i]??0))return!0;return!1}function kindFor(relation){return relation==="widened"?"widened":relation==="narrowed"?"narrowed":"type"}function isEquivalent(comparison){return comparison.relation!=="equivalent"?!1:(comparison.signatures??[]).every(s=>s.returnType==="equivalent"&&s.parameters.every(p=>p.relation==="equivalent"))}function callbackKind(comparison){if(comparison.relation!=="equivalent")return kindFor(comparison.relation);let relations=(comparison.signatures??[]).flatMap(s=>[s.returnType,...s.parameters.map(p=>p.relation)]);return relations.includes("narrowed")?"narrowed":relations.includes("widened")?"widened":"type"}function apply(change,verdict){change.evidence="checker",change.severity=verdict.severity,change.confidence=Math.min(change.confidence,verdict.confidence),verdict.notes.length>0?change.notes=verdict.notes.join("; "):delete change.notes}function refineWithTypes(changes,comparisons,surfaceB){let symbols=new Map(surfaceB.symbols.map(s=>[s.path,s])),literalParents=[...comparisons.keys()].filter(p=>symbols.get(p)?.signature.includes("{\u2026}")||changes.some(c=>c.path===p&&c.before?.includes("{\u2026}"))),underLiteral=path=>literalParents.some(p=>path.length>p.length&&path.startsWith(p)&&/[#[]/.test(path[p.length])),out=[];for(let change of changes){if((change.kind==="removed"||change.kind==="added")&&underLiteral(change.path))continue;if(change.kind!=="signature"&&change.kind!=="type"){out.push(change);continue}if(change.notes==="member became optional"||change.notes==="no longer callable"||change.notes==="became callable"){out.push(change);continue}let comparison=comparisons.get(change.path),symbol=symbols.get(change.path),kindChanged=change.notes?.startsWith("declaration kind changed")===!0;if(!comparison||!symbol){out.push(change);continue}if(comparison.callable&&lostTypeParameters(comparison)){let refined2={...change,kind:"signature"};apply(refined2,TYPE_PARAMS_LOST),kindChanged&&(refined2.notes=`${change.notes}; ${refined2.notes}`),out.push(refined2);continue}if(isEquivalent(comparison)&&(!kindChanged||/(interface|type) to (interface|type)/.test(change.notes??"")))continue;if(kindChanged){if(/(variable|function|method|property) to (variable|function|method|property)/.test(change.notes??"")&&comparison.callable){if(isEquivalent(comparison))continue;let refined2={...change,kind:"signature"},verdict=comparison.signatures?callerVerdict(comparison.signatures):comparison.relation==="narrowed"?{severity:"additive",confidence:1,notes:["signature narrowed (compatible for callers)"]}:{severity:"breaking",confidence:1,notes:[comparison.relation==="widened"?"signature widened; callers must handle new cases":"signature incompatible"]};apply(refined2,verdict),refined2.notes=[change.notes,refined2.notes].filter(Boolean).join("; "),out.push(refined2);continue}out.push(change);continue}let role=roleOf(symbol,comparison,symbols);if(!role){out.push(change);continue}let refined={...change};if(comparison.relation==="incompatible"&&!comparison.signatures&&change.before&&change.after){let a=normalizeTypeParams(change.before),b=normalizeTypeParams(change.after);if(a.generic&&b.generic){if(a.normalized===b.normalized)continue;refined.kind="type",apply(refined,GENERIC_DIFFER),out.push(refined);continue}}switch(role){case"callable":{refined.kind="signature",comparison.signatures?apply(refined,callerVerdict(comparison.signatures)):comparison.relation==="narrowed"?apply(refined,{severity:"additive",confidence:1,notes:["signature narrowed (compatible for callers)"]}):apply(refined,{severity:"breaking",confidence:1,notes:[comparison.relation==="widened"?"signature widened; callers must handle new cases":"signature incompatible"]});break}case"callback":{refined.kind=callbackKind(comparison),comparison.signatures?apply(refined,implementerVerdict(comparison.signatures)):comparison.relation==="widened"?apply(refined,{severity:"additive",confidence:1,notes:["callback type widened (implementations still fit)"]}):apply(refined,{severity:"breaking",confidence:1,notes:["callback type incompatible with existing implementations"]});break}case"output":{refined.kind=kindFor(comparison.relation),comparison.relation==="narrowed"?apply(refined,{severity:"additive",confidence:1,notes:["type narrowed (safe for readers)"]}):comparison.relation==="widened"?apply(refined,{severity:"breaking",confidence:1,notes:["type widened; readers must handle new cases"]}):apply(refined,{severity:"breaking",confidence:1,notes:["type incompatible"]});break}case"unknown":{refined.kind=kindFor(comparison.relation),comparison.relation==="widened"?apply(refined,{severity:"additive",confidence:.6,notes:[WIDENED_NOTE]}):comparison.relation==="narrowed"?apply(refined,{severity:"breaking",confidence:.7,notes:["type narrowed"]}):apply(refined,{severity:"breaking",confidence:1,notes:["type incompatible"]});break}}out.push(refined)}return out}var BREAKING={severity:"breaking"},ADDITIVE={severity:"additive"};function relate2(before,after){if(before===after)return"same";if(after==="any"||after==="unknown")return"wider";let a=new Set(unionMembers(before)),b=new Set(unionMembers(after)),aInB=[...a].every(m=>b.has(m)),bInA=[...b].every(m=>a.has(m));return aInB&&!bInA?"wider":bInA&&!aInB?"narrower":"different"}function normalizeThis(type,path){let container=parentOf(path);return type==="this"&&container!==void 0?leafOf(container):type}function classifyCallable(before,after,path=""){let key2=o=>JSON.stringify(o),beforeKeys=before.map(key2),afterKeys=new Set(after.map(key2));if(beforeKeys.every(k=>afterKeys.has(k)))return{severity:"additive",notes:"overload added"};if(before.length!==1||after.length!==1)return{severity:"breaking",notes:"overload removed or changed"};let[a,b]=[before[0],after[0]];if(a.typeParams.length>b.typeParams.length)return{severity:"breaking",confidence:.6,notes:TYPE_ARGS_NOTE};if(a.typeParams.join(",")!==b.typeParams.join(",")){let added=b.typeParams.slice(a.typeParams.length);return a.typeParams.every((p,i)=>b.typeParams[i]===p)&&added.every(p=>p.includes("="))?{severity:"additive",notes:"type parameter with default added"}:a.typeParams.length===b.typeParams.length?{severity:"breaking",confidence:.5,notes:"type parameter constraints changed; explicit type arguments may not compile"}:{severity:"breaking",notes:"type parameters changed"}}let returnRelation=relate2(normalizeThis(a.returnType,path),normalizeThis(b.returnType,path));if(returnRelation==="different")return{severity:"breaking",confidence:.7,notes:"return type changed"};if(returnRelation==="wider")return{severity:"breaking",notes:"return type widened; callers must handle new cases"};let returnNote=returnRelation==="narrower"?"return type narrowed (safe for readers)":void 0,notes=returnNote?[returnNote]:[];a.thisType===void 0&&b.thisType!==void 0?notes.push(`this parameter added (${b.thisType})`):a.thisType!==void 0&&b.thisType===void 0&&notes.push("this parameter removed");let confidence,max=Math.max(a.params.length,b.params.length);for(let i=0;i<max;i++){let pa=a.params[i],pb=b.params[i];if(pa&&!pb)return{severity:"breaking",notes:`parameter '${pa.name}' removed`};if(!pa&&pb){if(pb.optional||pb.rest){notes.push(`optional parameter '${pb.name}' added`);continue}return{severity:"breaking",notes:`required parameter '${pb.name}' added`}}if(!pa||!pb)continue;if(pa.rest!==pb.rest)return{severity:"breaking",notes:`parameter '${pa.name}' rest-ness changed`};if(!pa.optional&&pb.optional&&notes.push(`parameter '${pa.name}' became optional`),pa.optional&&!pb.optional)return{severity:"breaking",notes:`parameter '${pa.name}' became required`};let rel=relate2(pa.type,pb.type);if(rel==="wider")confidence=.8;else{if(rel==="narrower")return{severity:"breaking",notes:`parameter '${pa.name}' type narrowed`};if(rel==="different")return pa.type.startsWith("{")&&/^[A-Za-z_$][\w$.]*(<.*>)?$/.test(pb.type)?{severity:"breaking",confidence:.5,notes:`parameter '${pa.name}' inline type replaced by named type ${pb.type}; may be equivalent`}:{severity:"breaking",confidence:.7,notes:`parameter '${pa.name}' type changed`}}}let verdict={severity:"additive",notes:notes.join("; ")||void 0};return confidence!==void 0&&(verdict.confidence=confidence),verdict}var WIDENED={confidence:.6,notes:WIDENED_NOTE};function classifyType(before,after){let rel=relate2(before,after);return rel==="wider"?{severity:"additive",kind:"widened",...WIDENED}:rel==="narrower"?{severity:"breaking",kind:"narrowed",confidence:.7,notes:"type narrowed"}:{severity:"breaking",confidence:.7,notes:"type changed"}}var VALUE_KINDS=new Set(["variable","function","method","property"]);function callableText(kindAndSignature){return asCallable(kindAndSignature.slice(kindAndSignature.indexOf(":")+2))}function classifyKindChange(before,after,note,path){let[fromKind,toKind]=[before.split(":")[0],after.split(":")[0]],pair=`${fromKind}->${toKind}`;if(VALUE_KINDS.has(fromKind)&&VALUE_KINDS.has(toKind)){let a=callableText(before),b=callableText(after),pa=a?parseCallable(a):void 0,pb=b?parseCallable(b):void 0;if(pa&&pb){let verdict=classifyCallable(pa,pb,path);return{...verdict,notes:[note,verdict.notes].filter(Boolean).join("; ")}}}return pair==="interface->type"||pair==="type->interface"?{severity:"additive",confidence:.7,notes:`${note}; usable the same way, but declaration merging and extends may differ`}:pair==="method->property"||pair==="property->method"||pair==="function->variable"||pair==="variable->function"||pair==="variable->namespace"||pair==="namespace->variable"?{severity:"additive",confidence:.7,notes:`${note}; call sites keep working if the property is callable`}:fromKind==="class"&&toKind==="variable"?{severity:"breaking",confidence:.6,notes:`${note}; a value+type pair may still construct, but extends/instanceof may break`}:{severity:"breaking",notes:note}}function classifyHeader(before,after){let parse4=h=>{let m=/^(abstract )?(class|interface)(<.*>)?(?: extends (.+?))?(?: implements (.+))?$/.exec(h);if(m)return{abstract:m[1]!==void 0,kind:m[2],typeParams:m[3]??"",extends:m[4]?splitTopLevel(m[4],","):[],implements:m[5]?splitTopLevel(m[5],","):[]}},a=parse4(before),b=parse4(after);if(!a||!b||a.kind!==b.kind||a.typeParams!==b.typeParams)return BREAKING;if(a.abstract&&!b.abstract)return{severity:"additive",notes:"no longer abstract"};if(!a.abstract&&b.abstract)return{severity:"breaking",notes:"became abstract"};let grew=(x,y)=>x.every(m=>y.includes(m))&&y.length>x.length,same=(x,y)=>x.length===y.length&&x.every(m=>y.includes(m));return(grew(a.extends,b.extends)||same(a.extends,b.extends))&&(grew(a.implements,b.implements)||same(a.implements,b.implements))?{severity:"additive",confidence:.8,notes:"base list grew; inherited members are new API"}:{severity:"breaking",notes:"base list changed"}}function verdictFor(change){switch(change.kind){case"added":return ADDITIVE;case"deprecated":return{severity:"deprecated"};case"removed":case"renamed":case"moved":case"required":return BREAKING;case"widened":return{severity:"additive",confidence:.6,notes:WIDENED_NOTE};case"narrowed":return{severity:"breaking",confidence:.7,notes:"type narrowed"};case"cause":case"module-format":return BREAKING;case"signature":case"type":{let{before,after}=change;if(before===void 0||after===void 0)return BREAKING;if(change.notes==="member became optional")return ADDITIVE;if(change.notes==="no longer callable"||change.notes==="became callable")return BREAKING;if(change.notes?.startsWith("declaration kind changed"))return classifyKindChange(before,after,change.notes,change.path);let callableLike=/^(protected |abstract |static )*(<|\()/;if(callableLike.test(before)&&callableLike.test(after)){let a=parseCallable(before),b=parseCallable(after);return a&&b?classifyCallable(a,b,change.path):{severity:"breaking",notes:"signature changed (not parsed)"}}return/^(abstract )?(class|interface)/.test(before)&&/^(abstract )?(class|interface)/.test(after)?classifyHeader(before,after):change.kind==="type"?classifyType(before,after):BREAKING}}}function classify(changes){return changes.map(change=>{if(change.severity!==void 0)return{...change,severity:change.severity};let verdict=verdictFor(change),out={...change,severity:verdict.severity};return verdict.kind&&(out.kind=verdict.kind),(out.kind==="signature"||out.kind==="type"||out.kind==="widened"||out.kind==="narrowed")&&out.evidence===void 0&&(out.evidence="text"),verdict.confidence!==void 0&&(out.confidence=Math.min(out.confidence,verdict.confidence)),verdict.notes&&(out.notes=out.notes&&!verdict.notes.startsWith(out.notes)?`${out.notes}; ${verdict.notes}`:verdict.notes),out})}function similarity(a,b){if(a===b)return 1;if(a.length<2||b.length<2)return 0;let bigrams=s=>{let m=new Map;for(let i=0;i<s.length-1;i++){let g=s.slice(i,i+2);m.set(g,(m.get(g)??0)+1)}return m},ga=bigrams(a),gb=bigrams(b),shared=0;for(let[g,n]of ga)shared+=Math.min(n,gb.get(g)??0);return 2*shared/(a.length-1+(b.length-1))}var CONTAINER_KINDS=new Set(["class","interface","namespace","enum","module","type"]);function withVisibility(change,symbol){return symbol.visibility&&(change.visibility=symbol.visibility),symbol.aliasOf&&(change.aliasOf=symbol.aliasOf),change}function effectiveKind(symbol){return symbol.kind==="variable"&&asCallable(symbol.signature)!==void 0?"function":symbol.kind==="property"&&asCallable(symbol.signature)!==void 0?"method":symbol.kind}function changeKindFor(symbol){return symbol.kind==="function"||symbol.kind==="method"||symbol.kind==="class"||symbol.kind==="interface"||symbol.kind==="namespace"||symbol.kind==="module"?"signature":"type"}function sortByPath(changes){return changes.sort((x,y)=>x.path<y.path?-1:x.path>y.path?1:0)}function unqualify(name){let qualifier=new RegExp(`\\b${name.replace(/[$]/g,"\\$&")}\\.(?=[A-Za-z_$])`,"g");return signature=>signature.replace(qualifier,"")}function esmEquivalence(from,other){let identity={active:!1,lookup:path=>other.get(path),reverse:()=>{},normalize:s=>s},root=from.symbols.find(s=>s.exportEquals);if(!root)return identity;let otherRoot=other.get(root.path)??other.get("default");if(!otherRoot||otherRoot.exportEquals)return identity;let name=root.path,rootPath=otherRoot.path;return{active:!0,lookup(path){let direct=other.get(path);if(direct)return direct;if(path===name)return otherRoot;if(path.startsWith(`${name}#`))return other.get(`${rootPath}${path.slice(name.length)}`);if(path.startsWith(`${name}.`)){let rest=path.slice(name.length+1);return rest==="new()"?other.get(`${rootPath}.new()`):other.get(rest)}},reverse(path,own){return path===rootPath?own.get(name):path.startsWith(`${rootPath}#`)?own.get(`${name}${path.slice(rootPath.length)}`):path===`${rootPath}.new()`?own.get(`${name}.new()`):own.get(`${name}.${path}`)},normalize:unqualify(name)}}var CUT=/^recursive type (.+) \(compared by name\)$/,isCut=s=>!!s&&CUT.test(s.signature);function throughCuts(symbols){let cuts=new Map;for(let s of symbols.values()){let target=CUT.exec(s.signature)?.[1];target!==void 0&&cuts.set(s.path,target)}return path=>{let current=path;for(let hop=0;cuts.size>0&&hop<16;hop++){let parts=splitPath(current),rewritten;for(let n=parts.segments.length;n>=1&&rewritten===void 0;n--){let target=cuts.get(joinPath({...parts,segments:parts.segments.slice(0,n)}));if(target===void 0)continue;let into=splitPath(target);rewritten=joinPath({...into,segments:[...into.segments,...parts.segments.slice(n)]})}if(rewritten===void 0)return;let found=symbols.get(rewritten);if(found&&!isCut(found))return found;current=rewritten}}}function rawDiff(a,b){let meta={package:b.package,from:a.version,to:b.version},inA=new Map(a.symbols.map(s=>[s.path,s])),inB=new Map(b.symbols.map(s=>[s.path,s])),raw=[],removed=[],added=[],equivB=esmEquivalence(a,inB),equivA=esmEquivalence(b,inA),viaB=throughCuts(inB),viaA=throughCuts(inA);for(let cut of a.symbols){let found=equivB.lookup(cut.path),resolvedB=!found||isCut(found)&&!isCut(cut)?viaB(cut.path):void 0;resolvedB&&(found={...resolvedB,path:cut.path});let resolvedA=isCut(cut)&&found&&!isCut(found)?viaA(cut.path):void 0,original=resolvedA?{...resolvedA,path:cut.path}:cut,through=resolvedB??resolvedA;if(through&&found){let plain=unqualify(leafOf(through.path));original={...original,signature:plain(original.signature)},found={...found,signature:plain(found.signature)}}let before=equivB.active?{...original,signature:equivB.normalize(original.signature)}:original,after=found&&equivA.active?{...found,signature:equivA.normalize(found.signature)}:found;if(!after){removed.push(before);continue}if(!after.exportedFrom.some(e=>before.exportedFrom.includes(e))){let[target]=[...after.exportedFrom].sort();raw.push(withVisibility({...meta,path:before.path,kind:"moved",severity:"breaking",source:"types",confidence:.95,replacement:target,notes:`no longer exported from ${before.exportedFrom.join(", ")}; now exported from ${after.exportedFrom.join(", ")}`},before))}compareSymbol(meta,before,after,raw)}for(let after of b.symbols)!equivA.lookup(after.path)&&!equivB.reverse(after.path,inA)&&!viaA(after.path)&&added.push(after);let hints=renameHints(removed,added,a.symbols,b.symbols);for(let symbol of removed){let hint=hints.get(symbol.path),change={...meta,path:symbol.path,kind:"removed",before:symbol.signature,source:"types",confidence:hint?hint.confidence:1};hint&&(change.replacement=hint.replacement,change.notes=hint.notes),symbol.deprecated!==void 0&&(change.notes=[change.notes,"was deprecated"].filter(Boolean).join("; ")),raw.push(withVisibility(change,symbol))}for(let symbol of added)raw.push(withVisibility({...meta,path:symbol.path,kind:"added",after:symbol.signature,source:"types",confidence:1},symbol));return raw}function compareSymbol(meta,before,after,out){let base={...meta,path:before.path,source:"types",confidence:1},push=change=>out.push(withVisibility(change,after)),kindA=effectiveKind(before),kindB=effectiveKind(after);if(kindA!==kindB&&before.kind===after.kind){let change={...base,kind:changeKindFor(before),before:before.signature,after:after.signature};before.kind!=="property"&&(change.notes=kindA==="method"||kindA==="function"?"no longer callable":"became callable"),push(change)}else if(kindA!==kindB)push({...base,kind:"signature",before:`${before.kind}: ${before.signature}`,after:`${after.kind}: ${after.signature}`,notes:`declaration kind changed from ${before.kind} to ${after.kind}`});else if(kindA==="function"||kindA==="method"){let textA=asCallable(before.signature)??before.signature,textB=asCallable(after.signature)??after.signature;textA!==textB&&callableShape(before.signature)!==callableShape(after.signature)&&push({...base,kind:"signature",before:textA,after:textB})}else before.signature!==after.signature&&push({...base,kind:changeKindFor(before),before:before.signature,after:after.signature});let wasOptional=before.optional===!0,isOptional=after.optional===!0;if(wasOptional&&!isOptional?push({...base,kind:"required",before:`${before.signature} (optional)`,after:after.signature}):!wasOptional&&isOptional&&push({...base,kind:"type",before:before.signature,after:`${after.signature} (optional)`,notes:"member became optional"}),before.deprecated===void 0&&after.deprecated!==void 0){let change={...base,kind:"deprecated",source:"jsdoc"};typeof after.deprecated=="string"&&(change.notes=after.deprecated),push(change)}}function memberFingerprints(container,symbols){let out=new Set;for(let s of symbols)s.path.length>container.length&&s.path.startsWith(container)&&/[.#[]/.test(s.path[container.length])&&out.add(`${s.path.slice(container.length)}=${s.signature}`);return out}function jaccard(a,b){if(a.size===0&&b.size===0)return 1;let shared=0;for(let x of a)b.has(x)&&shared++;return shared/(a.size+b.size-shared)}function renameHints(removed,added,allA,allB){let hints=new Map,addedByPath=new Map(added.map(s=>[s.path,s])),addedByParent=new Map;for(let s of added){let parent=parentOf(s.path)??"",list=addedByParent.get(parent)??[];list.push(s),addedByParent.set(parent,list)}let claimed=new Set,shallowFirst=[...removed].sort((x,y)=>depth(x.path)-depth(y.path));for(let symbol of shallowFirst){let parent=parentOf(symbol.path),parentHint=parent===void 0?void 0:hints.get(parent);if(parentHint){let counterpart2=parentHint.replacement+symbol.path.slice(parent.length),twin=addedByPath.get(counterpart2);if(twin&&twin.signature===symbol.signature&&twin.kind===symbol.kind){hints.set(symbol.path,{...parentHint,replacement:counterpart2}),claimed.add(counterpart2);continue}}let candidates=(addedByParent.get(parent??"")??[]).filter(c=>c.kind===symbol.kind&&!claimed.has(c.path)),best=CONTAINER_KINDS.has(symbol.kind)?pickContainerRename(symbol,candidates,allA,allB):pickLeafRename(symbol,candidates);best&&(hints.set(symbol.path,best),claimed.add(best.replacement))}return hints}function depth(path){return(path.match(/[.#]|\[\]/g)??[]).length}function unique(scored){let sorted=[...scored].sort((x,y)=>y.score-x.score),top=sorted[0];if(!top)return;let runnerUp=sorted[1];return runnerUp&&runnerUp.score===top.score?void 0:top}var TRIVIAL_SIGNATURE=/^(readonly |protected )*[A-Za-z_$][\w$]*$/;function pickLeafRename(symbol,candidates){let trivial=TRIVIAL_SIGNATURE.test(symbol.signature),scored=candidates.map(c=>{let same=c.signature===symbol.signature,sig=same?1:similarity(c.signature,symbol.signature),name=similarity(leafOf(c.path),leafOf(symbol.path));return{c,same,name,score:sig+name/10}}).filter(({same,score,name})=>(same||score>=.85)&&(!trivial||name>=.5)),top=unique(scored);if(top)return{replacement:top.c.path,confidence:top.same?.8:.6,notes:top.same?"possibly renamed (identical signature)":"possibly renamed (similar signature)"}}function pickContainerRename(symbol,candidates,allA,allB){let mine=memberFingerprints(symbol.path,allA),scored=candidates.map(c=>{let name=similarity(leafOf(c.path),leafOf(symbol.path)),members=jaccard(mine,memberFingerprints(c.path,allB));return{c,name,members,score:name+members}}).filter(({name,members})=>mine.size===0?name>=.8:name>=.5&&members>=.5),top=unique(scored);if(!top)return;let strong=top.members>=.8&&top.name>=.6;return{replacement:top.c.path,confidence:strong?.8:.6,notes:strong?"possibly renamed (same members, similar name)":"possibly renamed (similar name and members)"}}var SURFACE_SCHEMA_VERSION=10,DEFAULT_REGISTRY="https://registry.npmjs.org",stripSlash=url=>url.replace(/\/+$/,"");function expandEnv(value,env){return value.replace(/(\\*)\$\{([^${}?]+)(\?)?\}/g,(match2,escapes,name,optional)=>escapes.length%2?match2.slice((escapes.length+1)/2):escapes.slice(escapes.length/2)+(env[name]??(optional?"":`\${${name}}`)))}function registryConfig(values){let out={scoped:{},tokens:{}};for(let[key2,value]of Object.entries(values))if(typeof value=="string"){if(key2==="registry")out.registry=stripSlash(value);else if(key2.startsWith("@")&&key2.endsWith(":registry"))out.scoped[key2.slice(0,-9)]=stripSlash(value);else if(key2.startsWith("//")){let match2=key2.match(/^(\/\/.*):(_authToken|_auth|username|_password)$/);if(!match2)continue;let[,scope,field]=match2,prefix=`${stripSlash(scope.slice(2))}/`;field==="_authToken"&&(out.tokens[prefix]=value),field==="_auth"&&(out.basicAuth??={},out.basicAuth[prefix]=value),field==="username"&&typeof values[`${scope}:_password`]=="string"&&(out.basicAuth??={},out.basicAuth[prefix]=Buffer.from(`${value}:${Buffer.from(values[`${scope}:_password`],"base64").toString("utf8")}`).toString("base64"))}}return out}var fields=(text,env)=>Object.fromEntries(Object.entries((0,import_ini.parse)(text)).map(([key2,value])=>[key2,typeof value=="string"?expandEnv(value,env):value]));function readIfExists(path){try{return readFileSync8(path,"utf8")}catch{return""}}function projectRoot(cwd){let nearest;for(let dir=resolve4(cwd);;dir=dirname8(dir)){if(existsSync9(join13(dir,"package.json"))){nearest??=dir;try{if(JSON.parse(readIfExists(join13(dir,"package.json"))).workspaces&&workspacePackagesOrRoot(dir).includes(relative7(dir,nearest).replaceAll("\\","/")||"."))return dir}catch{}}if(existsSync9(join13(dir,"pnpm-workspace.yaml"))&&(!nearest||workspacePackagesOrRoot(dir).includes(relative7(dir,nearest).replaceAll("\\","/")||".")))return dir;if(dirname8(dir)===dir)return nearest??cwd}}function loadRegistryConfig(opts={}){let env=opts.env??process.env,environment={};for(let[key2,value]of Object.entries(env)){if(!/^npm_config_/i.test(key2)||value===void 0)continue;let raw=key2.slice(11);environment[raw.startsWith("//")?raw:raw.toLowerCase().replaceAll("_","-")]=expandEnv(value,env)}let cwd=opts.cwd??process.cwd(),home=env.HOME??homedir2(),pathOf=value=>resolve4(cwd,value.replace(/^~(?=\/|$)/,home)),project=fields(readIfExists(join13(projectRoot(cwd),".npmrc")),env),userFile=String(environment.userconfig??project.userconfig??join13(home,".npmrc")),user=fields(readIfExists(pathOf(userFile)),env),prefix=String(environment.prefix??project.prefix??user.prefix??env.PREFIX??dirname8(dirname8(process.execPath))),globalFile=String(environment.globalconfig??project.globalconfig??user.globalconfig??join13(prefix,"etc/npmrc"));return{registry:DEFAULT_REGISTRY,scoped:{},tokens:{},...registryConfig({...fields(readIfExists(pathOf(globalFile)),env),...user,...project,...environment})}}function registryFor(name,config){let scope=name.startsWith("@")?name.slice(0,name.indexOf("/")):void 0;return scope&&config.scoped[scope]||config.registry}function scopedCredential(url,credentials){let target=new URL(url),candidates=Object.keys(credentials).filter(prefix=>{try{let scope=new URL(`https://${prefix}`);return scope.host===target.host&&target.pathname.startsWith(scope.pathname.endsWith("/")?scope.pathname:`${scope.pathname}/`)}catch{return!1}}).sort((a,b)=>b.length-a.length);return candidates[0]===void 0?void 0:credentials[candidates[0]]}function authHeaders(url,config){let credentials={...Object.fromEntries(Object.entries(config.basicAuth??{}).filter(([,value])=>value).map(([key2,value])=>[key2,`Basic ${value}`])),...Object.fromEntries(Object.entries(config.tokens).filter(([,value])=>value).map(([key2,value])=>[key2,`Bearer ${value}`]))},authorization=scopedCredential(url,credentials);return authorization?{authorization}:{}}function parseVersion(v){let m=/^v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?/.exec(v.trim());if(m)return{major:Number(m[1]),minor:Number(m[2]),patch:Number(m[3]),pre:m[4]}}function compareVersions(a,b){let pa=parseVersion(a),pb=parseVersion(b);if(!pa||!pb)return a.localeCompare(b);for(let key2 of["major","minor","patch"])if(pa[key2]!==pb[key2])return pa[key2]-pb[key2];return pa.pre===pb.pre?0:pa.pre===void 0?1:pb.pre===void 0?-1:pa.pre.localeCompare(pb.pre)}function majorsBehind(installed,target){let a=parseVersion(installed),b=parseVersion(target);return!a||!b?0:Math.max(0,b.major-a.major)}function packumentUrl(name,registry){return`${registry}/${name.replace("/","%2F")}`}function manifestUrl(name,version,registry){return`${packumentUrl(name,registry)}/${encodeURIComponent(version)}`}var TRANSIENT=new Set([429,500,502,503,504]),BACKOFF_MS=[500,1500,4e3],MAX_WAIT_MS=8e3;function retryAfterMs(res){let seconds=Number(res.headers.get("retry-after"));return Number.isFinite(seconds)&&seconds>0?seconds*1e3:void 0}function withRetry(fetchFn,options={}){let retries=options.retries??BACKOFF_MS.length,sleep=options.sleep??(ms=>new Promise(r=>setTimeout(r,ms)));return async(input,init)=>{for(let attempt=0;;attempt++){let last=attempt>=retries,backoff=BACKOFF_MS[Math.min(attempt,BACKOFF_MS.length-1)];try{let res=await fetchFn(input,init);if(!TRANSIENT.has(res.status)||last)return res;await sleep(Math.min(retryAfterMs(res)??backoff,MAX_WAIT_MS))}catch(err){if(last)throw err;await sleep(backoff)}}}}function httpFailure(res){let wait=retryAfterMs(res),what=res.status===429?", rate limited":"";return`HTTP ${res.status}${what}${wait?`; the registry asks to wait ${Math.ceil(wait/1e3)}s`:""}`}async function request(fetchFn,url,init){try{return await fetchFn(url,init)}catch(cause){throw new UptideError("REGISTRY_UNREACHABLE",`cannot reach registry: ${url}`,{cause})}}async function getJson(url,config,fetchFn){let res=await request(fetchFn,url,{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8",...authHeaders(url,config)}});if(res.status!==404){if(res.status===401||res.status===403)throw new RegistryAuthError(url.split("/").slice(3).join("/"),url.split("/").slice(0,3).join("/"),res.status);if(!res.ok)throw new UptideError("REGISTRY_HTTP_ERROR",`${url}: ${httpFailure(res)}`);return await res.json()}}function toResolved(name,manifest2){if(!manifest2?.version||!manifest2.dist?.tarball)return;let resolved2={name,version:manifest2.version,tarball:manifest2.dist.tarball,...manifest2.dependencies?{dependencies:manifest2.dependencies}:{},peerDependencies:manifest2.peerDependencies??{}};return manifest2.bin&&(resolved2.bin=manifest2.bin),manifest2.dist.integrity&&(resolved2.integrity=manifest2.dist.integrity),manifest2.dist.shasum&&(resolved2.shasum=manifest2.dist.shasum),resolved2}function resolveFromPackument(name,requested,packument){let versions=packument.versions??{},version=packument["dist-tags"]?.[requested]??requested,resolved2=toResolved(name,{...versions[version],version});if(!resolved2)throw new VersionNotFoundError(name,requested,Object.keys(versions));return resolved2}async function resolveVersion(name,requested,config,fetchFn){let registry=registryFor(name,config),manifest2=await getJson(manifestUrl(name,requested,registry),config,fetchFn),fast=toResolved(name,manifest2);if(fast)return fast;let packument=await getJson(packumentUrl(name,registry),config,fetchFn);if(!packument)throw new PackageNotFoundError(name,registry);return resolveFromPackument(name,requested,packument)}async function downloadTarball(resolved2,config,fetchFn){let res=await request(fetchFn,resolved2.tarball,{headers:authHeaders(resolved2.tarball,config)});if(!res.ok)throw new UptideError("REGISTRY_HTTP_ERROR",`${resolved2.tarball}: ${httpFailure(res)}`);return Buffer.from(await res.arrayBuffer())}async function listVersions(name,config,fetchFn){let registry=registryFor(name,config),packument=await getJson(packumentUrl(name,registry),config,fetchFn);if(!packument)throw new PackageNotFoundError(name,registry);return Object.keys(packument.versions??{}).filter(v=>parseVersion(v)!==void 0).sort(compareVersions)}var BLOCK=512;function readString(buf,start,length){let end=buf.indexOf(0,start),stop=end===-1||end>start+length?start+length:end;return buf.toString("utf8",start,stop)}function readNumber(buf,start,length){if((buf[start]??0)&128){let value=0;for(let i=start+1;i<start+length;i++)value=value*256+(buf[i]??0);return value}let text=readString(buf,start,length).trim();return text===""?0:Number.parseInt(text,8)}function parsePax(buf){let out={},offset=0;for(;offset<buf.length;){let space=buf.indexOf(32,offset);if(space===-1)break;let length=Number.parseInt(buf.toString("utf8",offset,space),10);if(!Number.isFinite(length)||length<=0)break;let record=buf.toString("utf8",space+1,offset+length-1),eq=record.indexOf("=");eq!==-1&&(out[record.slice(0,eq)]=record.slice(eq+1)),offset+=length}return out}function*readTar(tar){let offset=0,pendingPath;for(;offset+BLOCK<=tar.length;){let header=tar.subarray(offset,offset+BLOCK);if(header.every(b=>b===0))break;let type=header[156]===0?"0":String.fromCharCode(header[156]),size=readNumber(header,124,12),prefix=readString(header,345,155),name=readString(header,0,100),dataStart=offset+BLOCK,data=tar.subarray(dataStart,dataStart+size);if(offset=dataStart+Math.ceil(size/BLOCK)*BLOCK,type==="x"){let pax=parsePax(data);pax.path!==void 0&&(pendingPath=pax.path);continue}if(type==="L"){pendingPath=readString(data,0,data.length);continue}if(type==="g"||type==="K")continue;let path=pendingPath??(prefix?`${prefix}/${name}`:name);pendingPath=void 0,yield{path,type,size,data}}}function safeRelativePath(entryPath){let parts=entryPath.split("/").filter(p=>p!==""&&p!==".");if(parts.shift(),parts.length===0||parts.some(p=>p===".."))return;let rel=normalize(parts.join("/"));if(!(rel.startsWith("..")||rel.startsWith(sep)||/^[A-Za-z]:/.test(rel)))return rel}function extractTgz(tgz,dest){let written2=[];for(let entry of readTar(gunzipSync(tgz))){let rel=safeRelativePath(entry.path);if(rel===void 0)continue;let target=join14(dest,rel);entry.type==="5"?mkdirSync2(target,{recursive:!0}):(entry.type==="0"||entry.type==="7")&&(mkdirSync2(dirname9(target),{recursive:!0}),writeFileSync2(target,entry.data),written2.push(rel))}return written2}function tarballCachePath(root,name,version){return join15(root,"tarballs",...packagePathSegments(name),`${version}.tgz`)}function extractedPath(root,name,version){return join15(root,...packagePathSegments(name),version)}var COMPLETE_MARKER=".uptide-complete",EXACT_VERSION=/^v?\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/;function verify(tgz,resolved2){if(resolved2.integrity){let[algo,expected]=resolved2.integrity.split("-",2),actual=createHash(algo).update(tgz).digest("base64");if(actual!==expected)throw new IntegrityError(resolved2.name,resolved2.version,resolved2.integrity,`${algo}-${actual}`);return}if(resolved2.shasum){let actual=createHash("sha1").update(tgz).digest("hex");if(actual!==resolved2.shasum)throw new IntegrityError(resolved2.name,resolved2.version,resolved2.shasum,actual)}}function createNpmFetcher(opts={}){let cacheDir=opts.cacheDir??defaultCacheDir(),extractRoot=opts.extractRoot??join15(cacheDir,"extracted"),fetchFn=withRetry(opts.fetch??fetch,opts.sleep?{sleep:opts.sleep}:{}),config=opts.config??loadRegistryConfig(),ttl=opts.metadataTtlMs??3600*1e3;async function remembered(key2,forever,ask){let path=join15(cacheDir,"registry",...key2.slice(0,-1),`${key2.at(-1)}.json`),expired;try{let entry=JSON.parse(await readFile2(path,"utf8"));if(forever||Date.now()-entry.at<ttl)return entry.value;expired=entry}catch{}let value;try{value=await ask()}catch(err){let code=errorCode(err);if(expired&&(code==="REGISTRY_UNREACHABLE"||code==="REGISTRY_HTTP_ERROR"))return expired.value;throw err}await mkdir2(dirname10(path),{recursive:!0});let tmp=`${path}.${process.pid}.tmp`;return await writeFile2(tmp,JSON.stringify({at:Date.now(),value})),await rename2(tmp,path),value}function resolved2(name,requested){return remembered([...packagePathSegments(name),`resolve-${requested}`],EXACT_VERSION.test(requested),async()=>{let result=await resolveVersion(name,requested,config,fetchFn),registry=registryFor(name,config);return{...result,publicRegistry:registry==="https://registry.npmjs.org"&&!authHeaders(manifestUrl(name,requested,registry),config).authorization&&!authHeaders(packumentUrl(name,registry),config).authorization}})}async function tarballFor(resolved3){let path=tarballCachePath(cacheDir,resolved3.name,resolved3.version);try{let cached=await readFile2(path);return verify(cached,resolved3),cached}catch(err){err instanceof IntegrityError&&await rm(path,{force:!0})}let tgz=await downloadTarball(resolved3,config,fetchFn);verify(tgz,resolved3),await mkdir2(dirname10(path),{recursive:!0});let tmp=`${path}.${process.pid}.tmp`;return await writeFile2(tmp,tgz),await rename2(tmp,path),tgz}return{metadata:(name,version)=>remembered([...packagePathSegments(name),`metadata-${version}`],EXACT_VERSION.test(version),async()=>{let manifest2=await resolveVersion(name,version,config,fetchFn);return{...manifest2.dependencies?{dependencies:manifest2.dependencies}:{},peerDependencies:manifest2.peerDependencies??{},bin:manifest2.bin}}),async resolve(name,requested){return(await resolved2(name,requested)).version},async versions(name){return remembered([...packagePathSegments(name),"versions"],!1,()=>listVersions(name,config,fetchFn))},async fetch(name,version){let target=await resolved2(name,version),tgz=await tarballFor(target),dir=extractedPath(extractRoot,name,target.version);return existsSync10(join15(dir,COMPLETE_MARKER))||(await rm(dir,{recursive:!0,force:!0}),await mkdir2(dir,{recursive:!0}),extractTgz(tgz,dir),await writeFile2(join15(dir,COMPLETE_MARKER),"")),{name,version:target.version,dir}},async release(){}}}async function releasePackage(fetcher,pkg){fetcher.release?await fetcher.release(pkg):await removePackageDir(pkg).catch(()=>{})}async function removePackageDir(pkg,extractRoot=tmpdir3()){let dir=resolve5(pkg.dir),root=resolve5(extractRoot);if(!dir.startsWith(`${root}/`)||dir===root)throw new Error(`refusing to remove ${dir}: not under ${root}`);await rm(dir,{recursive:!0,force:!0})}var defaultFetcher,defaultCache;function defaults(){return defaultFetcher??=createNpmFetcher(),defaultCache??=createFsSurfaceCache(),{fetcher:defaultFetcher,cache:defaultCache}}async function surfaceOfDir(pkg,adapter,cache){let key2={package:pkg.name,version:pkg.version,adapter:adapter.id,schema:SURFACE_SCHEMA_VERSION},cached=await cache.get(key2);if(cached)return cached;let surface=await adapter.extractSurface(pkg);return await cache.set(key2,surface),surface}async function diffPackage(opts){return(await diffPackageDetailed(opts)).changes}async function diffPackageDetailed(opts){let fetcher=opts.fetcher??defaults().fetcher,[pkgA,pkgB]=await Promise.all([fetcher.fetch(opts.name,opts.from),fetcher.fetch(opts.name,opts.to)]);try{return await diffDirs(pkgA,pkgB,opts)}finally{await Promise.all([pkgA,pkgB].map(p=>releasePackage(fetcher,p)))}}function restrict(surface,only){return only?{...surface,symbols:surface.symbols.filter(s=>only.has(s.path))}:surface}async function diffDirs(pkgA,pkgB,opts={}){let adapter=opts.adapter??typescriptAdapter,cache=opts.cache??defaults().cache,[fullA,fullB]=await Promise.all([surfaceOfDir(pkgA,adapter,cache),surfaceOfDir(pkgB,adapter,cache)]),a=restrict(fullA,opts.onlyPaths),b=fullB,raw=rawDiff(a,b);if(opts.assignability!==!1&&adapter.compareTypes){let paths=[...new Set(raw.filter(c=>c.kind==="signature"||c.kind==="type").map(c=>c.path))];if(paths.length>0){let comparisons=await adapter.compareTypes({a:pkgA,b:pkgB,surfaceA:a,surfaceB:b,paths});raw=refineWithTypes(raw,comparisons,b)}}return{surfaceA:a,surfaceB:b,changes:sortByPath(classify(raw))}}var BY={rule:n=>`${n} auto-fixable`,agent:n=>`${n} ${n===1?"needs":"need"} the agent (LLM)`,ruleTag:"auto-fixable",agentTag:"needs the agent (LLM)",ruleDone:n=>`${n} auto-fixed`,agentDone:n=>`${n} fixed by the agent (LLM)`,ruleDoneTag:"auto-fixed",agentDoneTag:"by the agent (LLM)"},GENERIC_NOTE=name=>`No migration pack covers \`${name}\`. Every edit here was written by the agent and kept only because the compiler error at that site went away and no new one appeared: review each change carefully.`;function genericPack(name){return{name,defaultTarget:"",rules:[],supports:()=>!0,transform:text=>({text,applied:!1,reason:"no migration pack: assisted review required"}),guide:f=>[`Migrate this call site of ${f.change.package} from ${f.change.from} to ${f.change.to}. There is no curated guide for this package: work only from the compiler error and the change below.`,`Change: ${f.change.path} (${f.change.kind})${f.change.notes?`: ${f.change.notes}`:""}.`,f.change.before?`Before: ${f.change.before}`:"",f.change.after?`After: ${f.change.after}`:"",f.change.replacement?`Likely replacement: ${f.change.replacement}`:"",...f.details??[],"Patch ONLY the reported site, with the smallest edit that makes it compile against the target and keeps what the code does. Never cast, never suppress a diagnostic, never delete the call, never change values, messages or control flow that the upgrade does not require. If the site cannot be migrated safely from what is shown, say so instead of guessing."].filter(Boolean).join(`
155
+ `),reviewNotes:()=>[GENERIC_NOTE(name)]}}var must=text=>({kind:"text",text,rank:0});function fitPieces(pieces,budget){if(budget===void 0)return pieces.map(p=>full(p)).join(`
156
+ `);let floor=p=>p.kind==="text"?p.rank===0?p.text:p.alt??"":p.items.length?p.more.replace("{n}",String(p.items.length)):"",chosen=pieces.map(floor),size=chosen.reduce((n,text)=>n+text.length+1,0),order=pieces.map((p,i)=>({p,i})).filter(({p})=>p.rank>0).sort((a,b)=>a.p.rank-b.p.rank||a.i-b.i);for(let{p,i}of order){let before=chosen[i].length;if(p.kind==="text"){size-before+p.text.length<=budget&&(size+=p.text.length-before,chosen[i]=p.text);continue}let shown=0,best=chosen[i];for(let n=1;n<=p.items.length;n++){let hidden=p.items.length-n,text=[p.open,...p.items.slice(0,n),...hidden?[p.more.replace("{n}",String(hidden))]:[],p.close].join(`
157
+ `);if(size-before+text.length>budget)break;shown=n,best=text}shown>0&&(size+=best.length-before,chosen[i]=best)}return chosen.filter((text,i)=>text!==""||pieces[i]?.rank===0).join(`
158
+ `)}function full(p){return p.kind==="text"?p.text:[p.open,...p.items,p.close].join(`
159
+ `)}var SERVICE_GLOBS=["**/*.integration.test.*","**/*.integration.spec.*","**/*.int.test.*","**/*.e2e.test.*","**/*.e2e.spec.*","**/integration/**","**/e2e/**"],SERVICE_FILE=/(?:\.(?:integration|int|e2e)\.(?:test|spec)\.[cm]?[jt]sx?$)|(?:(?:^|\/)(?:integration|e2e)\/.*\.(?:test|spec)\.[cm]?[jt]sx?$)/,isServiceTest=file=>SERVICE_FILE.test(file),SIGNALS=[[/\bfrom\s+["']pg["']|require\(["']pg["']\)|\bpostgres(?:ql)?:\/\/|\bpostgres\b|DATABASE_URL/i,"Postgres"],[/\bmysql2?\b|mysql:\/\//i,"MySQL"],[/\bmongoose\b|\bmongodb\b/i,"MongoDB"],[/\bioredis\b|\bredis:\/\/|from\s+["']redis["']|REDIS_URL/i,"Redis"],[/\bamqplib\b|amqps?:\/\//i,"RabbitMQ"],[/\bkafkajs\b/i,"Kafka"],[/@azure\/service-bus/i,"Azure Service Bus"],[/\btestcontainers\b/i,"Docker (testcontainers)"]],SKIPPED=new Set(["node_modules","dist","build","coverage",".git",".uptide"]);function read(path){try{return readFileSync9(path,"utf8")}catch{return}}var mask=url=>url.replace(/\/\/[^@/\s]+@/,"//***@");function globalSetups(configDir,configText){let found=new Set;for(let match2 of configText.matchAll(/globalSetup\s*:\s*(\[[^\]]*\]|["'`][^"'`]+["'`])/g))for(let path of(match2[1]??"").matchAll(/["'`]([^"'`]+)["'`]/g))path[1]&&found.add(path[1].replace(/^<rootDir>\//,"./"));return[...found].filter(file=>existsSync11(resolve6(configDir,file)))}function serviceNeeds(root,configDir,configFile,workspaces,env=process.env){let files=[],walk=dir=>{for(let entry of readdirSync4(dir,{withFileTypes:!0})){if(SKIPPED.has(entry.name))continue;let path=join16(dir,entry.name);entry.isDirectory()?walk(path):isServiceTest(relative8(root,path))&&files.push(relative8(root,path))}};for(let workspace of workspaces)if(!(workspace==="."&&workspaces.length>1))try{walk(join16(root,workspace))}catch{}let configText=read(join16(configDir,configFile))??"",services=new Set,targets=new Set,setups=[];for(let setup of globalSetups(configDir,configText)){let text=read(resolve6(configDir,setup))??"",named=SIGNALS.filter(([signal])=>signal.test(text)).map(([,name])=>name);if(named.length!==0){setups.push(setup);for(let name of named)services.add(name);for(let url of text.matchAll(/\b(?:postgres(?:ql)?|mysql|mongodb(?:\+srv)?|rediss?|amqps?):\/\/[^\s"'`]+/g))targets.add(mask(url[0]));for(let variable of text.matchAll(/process\.env\.([A-Z][A-Z0-9_]*)/g)){let name=variable[1]??"";if(!/DATABASE|POSTGRES|PG|REDIS|MONGO|MYSQL|AMQP|RABBIT|KAFKA|SERVICE_?BUS/.test(name))continue;let value=env[name];targets.add(value?`${name}=${mask(value)}`:`${name} (not set)`)}}}return{files:files.sort(),services:[...services].sort(),targets:[...targets].sort(),setups}}function unitConfig(configFile,stripGlobalSetup){return`// Written by uptide for one test run; never committed.
160
+ import base from './${configFile}';
161
+
162
+ const SERVICE = ${JSON.stringify(SERVICE_GLOBS)};
163
+ const SERVICE_NAME = /(?:integration|\\.int\\.|e2e)/;
164
+ const resolved = typeof base === 'function' ? await base({ mode: 'test', command: 'serve' }) : await base;
165
+ const unit = (test) => {
166
+ if (!test) return test;
167
+ const { ${stripGlobalSetup?"globalSetup, ":""}...rest } = test;
168
+ return { ...rest, exclude: [...(rest.exclude ?? ['**/node_modules/**', '**/dist/**']), ...SERVICE] };
169
+ };
170
+ const onlyServices = (project) =>
171
+ typeof project === 'object' && project !== null && Array.isArray(project.test?.include) &&
172
+ project.test.include.length > 0 && project.test.include.every((glob) => SERVICE_NAME.test(glob));
173
+ const top = unit(resolved.test ?? {});
174
+ export default {
175
+ ...resolved,
176
+ test: {
177
+ ...top,
178
+ ...(Array.isArray(top.projects)
179
+ ? {
180
+ projects: top.projects
181
+ .filter((project) => !onlyServices(project))
182
+ .map((project) =>
183
+ typeof project === 'object' && project !== null && project.test
184
+ ? { ...project, test: unit(project.test) }
185
+ : project,
186
+ ),
187
+ }
188
+ : {}),
189
+ },
190
+ };
191
+ `}function resolveCompiler(dir,bundled=import_ts_morph10.ts,load=path=>createRequire(path)("typescript")){try{return load(join17(dir,"package.json"))}catch{if(bundled)return bundled;throw new UptideError("TYPESCRIPT_UNAVAILABLE","TypeScript compiler unavailable: install typescript in the consumer repository or reinstall the Uptide bundle")}}var bundledLibraries;function bundledHost(options){if(!bundledLibraries?.has(import_ts_morph10.ts.getDefaultLibFileName(options))){let project=new import_ts_morph10.Project({useInMemoryFileSystem:!0,compilerOptions:{target:options.target??import_ts_morph10.ts.ScriptTarget.ES2025}});project.createSourceFile("probe.ts","const value = 1;"),bundledLibraries=new Map(project.getProgram().compilerObject.getSourceFiles().filter(f=>f.fileName.includes("/typescript/lib/")).map(f=>[basename(f.fileName),f.text]))}let host=import_ts_morph10.ts.createCompilerHost(options),read2=host.readFile,exists=host.fileExists,lib=file=>file.startsWith("/__uptide_lib__/")?bundledLibraries?.get(basename(file)):void 0;return host.readFile=file=>lib(file)??read2(file),host.fileExists=file=>lib(file)!==void 0||exists(file),host.getDefaultLibLocation=()=>"/__uptide_lib__",host.getDefaultLibFileName=o=>join17("/__uptide_lib__",import_ts_morph10.ts.getDefaultLibFileName(o)),host.getSourceFile=(file,languageVersion)=>{let text=host.readFile(file);return text===void 0?void 0:import_ts_morph10.ts.createSourceFile(file,text,languageVersion,!0)},host}function expectedShape(compiler,program,d){if(!(!d.file||d.start===void 0||![2322,2345].includes(d.code)))try{let checker=program.getTypeChecker(),node,visit=n=>{n.getStart()<=d.start&&d.start<n.getEnd()&&(node=n,n.forEachChild(visit))};d.file.forEachChild(visit);let expression=node;for(;expression&&!compiler.isExpression(expression);)expression=expression.parent;if(expression&&compiler.isPropertyAssignment(expression.parent)&&(expression=expression.parent.initializer),!expression||!compiler.isExpression(expression))return;let type=checker.getContextualType(expression);if(!type)return;let flags=compiler.TypeFormatFlags.NoTruncation|compiler.TypeFormatFlags.InTypeAlias,plain=text=>text.replace(/import\("[^"]*"\)\./g,""),print=(t,f=flags)=>plain(checker.typeToString(t,expression,f)),parts=(type.isUnion()?type.types:[type]).filter(t=>!(t.flags&compiler.TypeFlags.Undefined)),members=t=>{let props=t.getProperties();if(!(props.length===0||props.length>12))return`{ ${props.map(p=>{let optional=p.flags&compiler.SymbolFlags.Optional?"?":"",own=checker.getTypeOfSymbolAtLocation(p,expression);return`${p.name}${optional}: ${print(own).replace(/ \| undefined$/,"")}`}).join("; ")} }`},name=parts.map(t=>print(t,compiler.TypeFormatFlags.NoTruncation)).join(" | "),shape=parts.map(t=>members(t)??print(t)).join(" | ");return shape===name?void 0:`${name}: ${shape}`.slice(0,600)}catch{return}}function diagnostics(root,workspaces){let all=new Map,queue=[...workspaces],visited=new Set;for(let workspace of queue){if(visited.has(workspace))continue;visited.add(workspace);let dir=join17(root,workspace),compiler=resolveCompiler(dir),tsconfig=join17(dir,"tsconfig.json"),config=compiler.readConfigFile(tsconfig,compiler.sys.readFile),parsed2=compiler.parseJsonConfigFileContent(config.config??{include:["**/*.ts","**/*.tsx"],exclude:["node_modules","dist","build"]},compiler.sys,dir,void 0,config.config?tsconfig:void 0),sources=workspaceSourceMap(dir,readInstalled(dir).installed),fileNames=new Set(parsed2.fileNames);for(let reference of parsed2.projectReferences??[]){let path=reference.path.endsWith(".json")?reference.path:join17(reference.path,"tsconfig.json"),ref=compiler.readConfigFile(path,compiler.sys.readFile),files=compiler.parseJsonConfigFileContent(ref.config??{},compiler.sys,dirname11(path)).fileNames;for(let f of files)fileNames.add(f)}compiler===import_ts_morph10.ts&&(parsed2.options.ignoreDeprecations="6.0");let hostOptions={...parsed2.options,noEmit:!0,skipLibCheck:!0},host=compiler===import_ts_morph10.ts?bundledHost(hostOptions):compiler.createCompilerHost(hostOptions);host.getCurrentDirectory=()=>dir;let program=compiler.createProgram({host,rootNames:[...fileNames],options:{...parsed2.options,noEmit:!0,rootDir:root,composite:!1,incremental:!1,paths:{...parsed2.options.paths,...sources.paths}}}),errors=[...parsed2.errors,...config.error?[config.error]:[],...program.getOptionsDiagnostics(),...program.getGlobalDiagnostics()];for(let file of program.getSourceFiles()){if(file.isDeclarationFile||!file.fileName.startsWith(`${root}/`)||file.fileName.includes("/node_modules/"))continue;let owner=dirname11(file.fileName);for(;owner!==root&&!existsSync12(join17(owner,"tsconfig.json"));)owner=dirname11(owner);if(owner!==dir&&owner!==root){let other=relative9(root,owner);visited.has(other)||queue.push(other);continue}errors.push(...program.getSyntacticDiagnostics(file),...program.getSemanticDiagnostics(file))}for(let d of errors){if(d.category!==import_ts_morph10.ts.DiagnosticCategory.Error)continue;let location=d.file?.getLineAndCharacterOfPosition(d.start??0),expected=expectedShape(compiler,program,d),value={file:d.file?relative9(root,d.file.fileName):join17(workspace,"tsconfig.json"),line:(location?.line??0)+1,column:(location?.character??0)+1,code:d.code,message:import_ts_morph10.ts.flattenDiagnosticMessageText(d.messageText,`
192
+ `).split(root).join("<repo>"),...expected?{expected}:{}};all.set(`${value.file}:${value.line}:${value.column}:${value.code}:${value.message}`,value)}}return[...all.values()].sort((a,b)=>a.file.localeCompare(b.file)||a.line-b.line||a.column-b.column)}var RESOLUTION_CODES=new Set([2307,2580,2581,2582,2591,2592,2593,2688,2792]);function missingPackages(d){if(!RESOLUTION_CODES.has(d.code))return[];let suggested=/@types\/[\w.-]+/.exec(d.message)?.[0];if(suggested)return[suggested];let name=/'([^']+)'/.exec(d.message)?.[1];if(!name||name.startsWith(".")||name.startsWith("/"))return[];if(name.startsWith("node:")||builtinModules2.includes(name))return["@types/node"];let pkg=name.split("/").slice(0,name.startsWith("@")?2:1).join("/"),types=`@types/${pkg.startsWith("@")?pkg.slice(1).replace("/","__"):pkg}`;return d.code===2688?[types,pkg]:[pkg,types]}function typeResolutionFailure(root,baseline){let seen=new Set,errors=0;for(let d of baseline){let candidates=missingPackages(d);if(candidates.length===0)continue;let declared=!1,installed;for(let dir=dirname11(join17(root,d.file));;dir=dirname11(dir)){let manifest2=existsSync12(join17(dir,"package.json"))?JSON.parse(readFileSync10(join17(dir,"package.json"),"utf8")):{};for(let name of candidates)declared||=["dependencies","devDependencies","optionalDependencies","peerDependencies"].map(field=>manifest2[field]).some(deps=>deps?.[name]!==void 0),!installed&&existsSync12(join17(dir,"node_modules",name,"package.json"))&&(installed=name);if(dir===root||dirname11(dir)===dir)break}declared&&installed&&(errors++,seen.add(installed))}if(errors===0)return;let names=[...seen].sort();return`${errors} baseline error${errors===1?"":"s"} cannot see ${names.join(", ")}, which ${names.length===1?"is":"are"} declared and installed`}var key=d=>`${d.file}|${d.code}|${d.message.replace(/\s+/g," ")}`;function newDiagnostics(baseline,target){let counts=new Map;for(let d of baseline)counts.set(key(d),(counts.get(key(d))??0)+1);return target.filter(d=>{let n=counts.get(key(d))??0;return n?(counts.set(key(d),n-1),!1):!0})}var VITEST_CONFIGS=["vitest.config","vitest.workspace"].flatMap(base=>["ts","mts","cts","js","mjs","cjs"].map(ext=>`${base}.${ext}`)),JEST_CONFIGS=["ts","mts","cts","js","mjs","cjs","json"].map(ext=>`jest.config.${ext}`),quote=arg=>/^[\w@%+=:,./-]+$/.test(arg)?arg:`'${arg.replaceAll("'","'\\''")}'`;function manifest(dir){try{return JSON.parse(readFileSync10(join17(dir,"package.json"),"utf8"))}catch{return}}function upTo(root,from){let dirs=[];for(let dir=from;dirs.push(dir),!(dir===root||dirname11(dir)===dir);dir=dirname11(dir));return dirs}function runnerFor(root,workspace){for(let dir of upTo(root,join17(root,workspace))){let installed=bin=>upTo(root,dir).some(d=>existsSync12(join17(d,"node_modules/.bin",bin))),vitest=VITEST_CONFIGS.find(name=>existsSync12(join17(dir,name)));if(vitest&&installed("vitest"))return{runner:"vitest",dir,config:vitest};let jest=JEST_CONFIGS.find(name=>existsSync12(join17(dir,name)))??(manifest(dir)?.jest?"package.json":void 0);if(jest&&installed("jest"))return{runner:"jest",dir,config:jest}}}function planTests(root,workspaces,files=[],options={}){let plans=[],shared=new Map,rootScript=[];for(let workspace of workspaces){let script=manifest(join17(root,workspace))?.scripts?.test,bare=/^\s*(?:(?:npx|pnpm exec|yarn)\s+)?(vitest|jest)\b/.exec(script??"")?.[1];if(script&&!(bare&&runnerFor(root,workspace)?.runner===bare)){plans.push({workspace,covers:[workspace],cwd:join17(root,workspace),command:script,scope:`the \`test\` script of ${workspace==="."?"the repository":workspace}`});continue}let found=runnerFor(root,workspace);if(found){let key2=`${found.runner}:${found.dir}`,group=shared.get(key2)??{...found,covers:[]};group.covers.push(workspace),shared.set(key2,group);continue}workspace!=="."&&manifest(root)?.scripts?.test?rootScript.push(workspace):plans.push({workspace,covers:[workspace],cwd:join17(root,workspace),command:"",scope:"no test script, and no vitest or jest configuration covers this workspace"})}for(let group of shared.values()){let inside=file=>group.covers.some(w=>w==="."||file===w||file.startsWith(`${w}/`)),related=[...new Set(files)].filter(inside).filter(file=>existsSync12(join17(root,file))).map(file=>relative9(group.dir,join17(root,file))).sort(),dirs=group.covers.map(w=>relative9(group.dir,join17(root,w))||"."),where=relative9(root,join17(group.dir,group.config))||group.config,needs=serviceNeeds(root,group.dir,group.config,group.covers),sensitive=needs.files.length>0||needs.setups.length>0,unitOnly=sensitive&&!options.withServices,needsText=needs.services.length?needs.services:["services"],workspace=relative9(root,group.dir)||".",wrapper="vitest.uptide-unit.config.mjs",canIsolate=group.runner==="vitest"?group.config.startsWith("vitest.config."):needs.setups.length===0;if(unitOnly&&!canIsolate){plans.push({workspace,covers:group.covers,cwd:group.dir,command:"",scope:`not run: the ${group.runner} setup in ${where} connects to ${needsText.join(", ")}; pass --with-services to include it`,notRun:{files:needs.files.length,needs:needsText}});continue}let targets=unitOnly?related.filter(file=>!isServiceTest(file)):related,isolate=unitOnly?group.runner==="vitest"?["--config",wrapper]:["--testPathIgnorePatterns","\\.(integration|int|e2e)\\.","/(integration|e2e)/"]:[],args=group.runner==="vitest"?targets.length?["related","--run","--passWithNoTests",...isolate,...targets]:["run","--passWithNoTests",...isolate,...dirs.filter(d=>d!==".")]:targets.length?["--findRelatedTests","--passWithNoTests",...isolate,...targets]:["--passWithNoTests",...isolate,...dirs.filter(d=>d!==".")],scripts=manifest(group.dir)?.scripts,prepare2=scripts?.pretest&&new RegExp(`\\b${group.runner}\\b`).test(scripts.test??"")?scripts.pretest:void 0,run=[group.runner,...args.map(quote)].join(" "),kind=unitOnly?"unit tests":"tests";plans.push({workspace,covers:group.covers,cwd:group.dir,command:prepare2?`${prepare2} && ${run}`:run,scope:`${targets.length?`${group.runner} ${kind} related to ${targets.length} affected file${targets.length===1?"":"s"}`:`${group.runner} ${kind} under ${dirs.join(", ")}`}, ${where}${prepare2?" after `pretest`":""}`,...unitOnly&&group.runner==="vitest"?{write:{path:join17(group.dir,wrapper),text:unitConfig(group.config,needs.setups.length>0)}}:{},...unitOnly?{notRun:{files:needs.files.length,needs:needsText}}:{},...sensitive&&options.withServices?{services:{names:needsText,targets:needs.targets}}:{}})}return rootScript.length&&plans.push({workspace:".",covers:rootScript,cwd:root,command:manifest(root)?.scripts?.test??"",scope:"the `test` script of the repository"}),plans}function testSummary(output){let plain=output.replace(new RegExp("\x1B\\[[0-9;]*m","g"),""),tests=/^\s*Tests:?\s+(?:.*?,\s*)?(\d+) passed/m.exec(plain)?.[1],files=/^\s*Test (?:Files|Suites):?\s+(?:.*?,\s*)?(\d+) passed/m.exec(plain)?.[1];if(!tests)return;let n=Number(tests);return`${n} test${n===1?"":"s"}${files?` in ${files} file${files==="1"?"":"s"}`:""}`}function failedTestFiles(output){let files=new Set;for(let line of output.split(`
193
+ `)){if(!/^\s*FAIL\b/.test(line))continue;let file=/([\w@./-]+\.(?:test|spec)\.[cm]?[jt]sx?)/.exec(line)?.[1];file&&files.add(file)}return[...files].sort()}var stem=file=>(file.split("/").pop()??file).replace(/(?:\.(?:e2e|integration))?(?:\.(?:test|spec))?\.[cm]?[jt]sx?$/,"");function concerns(testFile,affected){return affected.some(file=>file.endsWith(testFile)||testFile.endsWith(file)||stem(file)===stem(testFile))}var ANSI=new RegExp("\x1B\\[[0-9;]*[A-Za-z]","g");async function testWorkspaces(root,workspaces,timeoutMs=12e4,files=[],options={}){let results=[],realRoot=root;try{realRoot=realpathSync6(root)}catch{}for(let plan of planTests(root,workspaces,files,options)){let described={covers:plan.covers,scope:plan.scope,...plan.notRun?{notRun:plan.notRun}:{},...plan.services?{services:plan.services}:{}};if(!plan.command){results.push({workspace:plan.workspace,status:"missing",output:plan.scope,...described});continue}let bins=upTo(root,plan.cwd).map(dir=>join17(dir,"node_modules/.bin")).filter(dir=>existsSync12(dir)),attempt=()=>command(plan.cwd,process.env.SHELL??"/bin/sh",["-c",plan.command],timeoutMs,{PATH:[...bins,process.env.PATH].join(":")}),plain=text=>text.replace(ANSI,"").split(realRoot).join("<repo>").split(root).join("<repo>");plan.write&&writeFileSync3(plan.write.path,plan.write.text);let result,retried=[];try{if(result=await attempt(),result.code&&!result.timeout){let failing=failedTestFiles(plain(result.output));if(failing.length>0&&failing.every(file=>!concerns(file,files))){let again=await attempt();!again.code&&!again.timeout&&(retried=failing),result=again}}}finally{plan.write&&rmSync3(plan.write.path,{force:!0})}let output=plain(result.output),summary=testSummary(output),empty=!result.code&&!result.timeout&&/No test files found|No tests found/i.test(output)&&!summary;results.push({workspace:plan.workspace,status:result.timeout?"timeout":result.code?"failed":empty?"missing":"passed",output:empty?`no tests are related to the affected files (${plan.command})`:output,command:plan.command,...described,...summary?{summary}:{},...retried.length?{retried}:{}})}return results}function describeServices(root,workspaces){let lines=[],seen=new Set;for(let workspace of workspaces){let found=runnerFor(root,workspace);if(!found||seen.has(`${found.runner}:${found.dir}`))continue;seen.add(`${found.runner}:${found.dir}`);let needs=serviceNeeds(root,found.dir,found.config,workspaces);if(needs.files.length===0&&needs.setups.length===0)continue;let names=needs.services.length?needs.services.join(", "):"services not identified";lines.push(`${names}: ${needs.files.length} integration or end-to-end test file${needs.files.length===1?"":"s"}${needs.setups.length?`, global setup ${needs.setups.join(", ")} runs against it and may reset data`:""}`,...needs.targets.map(target=>` ${target}`))}return lines}function markPreexisting(tests,baseline){return tests.map(t=>{if(t.status!=="failed")return t;let before=baseline.find(b=>b.workspace===t.workspace&&(b.status==="failed"||b.status==="timeout"));if(!before)return t;let now=failedTestFiles(t.output),then=new Set(failedTestFiles(before.output));return now.length===0&&then.size===0?{...t,preexisting:["*"]}:now.length>0&&now.every(f=>then.has(f))?{...t,preexisting:now}:t})}function fixCounts(report){return{mechanical:report.sites.filter(s=>s.outcome==="mechanical").length,agent:report.sites.filter(s=>s.outcome==="agent").length,manual:report.sites.filter(s=>s.outcome==="manual").length}}var cell=s=>s.replaceAll("|","\\|").replace(/[\r\n]/g," "),sentence=s=>{let text=s.replace(/(?:[\w.@-]+[/])+[\w.@-]+\.[\w]+/g,path=>basename2(path)).replace(/\s+/g," "),end=text.replace(/\b(e|i)\.(g|e)\./g,"$1_$2_").match(/^.*?[.!?](?:\s|$)/)?.[0]?.length,first=end===void 0?text:text.slice(0,end).trim();return first.length>240?`${first.slice(0,237)}\u2026`:first},siteKey=s=>`${s.finding.usage.file}:${s.finding.usage.line}:${s.finding.usage.column}`,folded=s=>!!s.resolvedBy||s.reason.startsWith("diagnostic resolved by an earlier");function changeRule(report,s){if(s.rule)return s.rule;if(s.finding.rule)return s.finding.rule;let evidence=`${s.finding.change.path} ${s.finding.usage.compileError??""} ${s.finding.usage.snippet}`;if(report.package==="zod"){if(s.outcome==="mechanical")return/format/.test(s.reason)?"string-format":"error-params";if(/required_error|invalid_type_error/.test(evidence))return"error-params";if(/#ip$/.test(s.finding.change.path))return"ip";if(/ZodType|TS2724/.test(evidence)||folded(s))return"types"}if(report.package==="stripe"){if(/apiVersion|LatestApiVersion/.test(evidence))return"api-version";if(/current_period_(?:end|start)/.test(evidence))return"subscription-period"}return s.finding.change.path}var RULE_TITLES={"error-params":{title:"New error API",plain:"New error API (required_error \u2192 error)"},"string-format":{title:"Top-level string formats"},ip:{title:"`.ip()` removed"},"api-version":{title:"Stripe API version",plain:"apiVersion no longer matches the SDK"},"api-version-unpinned":{title:"Stripe API version unpinned",plain:"client without apiVersion: the API version changes at runtime"},"api-version-pin":{title:"Stripe API version pinned"},"subscription-period":{title:"Subscription billing period moved to items"},"default-messages":{title:"Default error messages"},"fixture-cast":{title:"Test fixture casts widened"}};function diagnosticTitle(code,findings){let concrete=findings.map(f=>concreteTitle(code,f)),first=concrete[0];return first&&concrete.every(t=>t===first)?first:{2305:"An import no longer exists",2724:"An import no longer exists",2614:"An import no longer exists",2339:"A property no longer exists",2551:"A property no longer exists",2353:"An option is no longer accepted",2554:"A call passes the wrong number of arguments",2555:"A call passes the wrong number of arguments",2769:"A call no longer matches any signature",2345:"An argument no longer has the expected type",2322:"A value no longer has the expected type",2344:"A type argument no longer satisfies its constraint",2589:"A type became too deep for the compiler to instantiate",2349:"A value is no longer callable",2351:"A value is no longer constructable",18046:"A value became unknown",18048:"A value may now be undefined",7006:"A callback parameter lost its type"}[code]??`Type error introduced by the upgrade (TS${code})`}var typeOf=text=>text.length>40?`${text.slice(0,37)}...`:text;function concreteTitle(code,f){let message=f.usage.compileError?.split(`
194
+ `)[0]??"";if(code===2305||code===2724||code===2614){let m=/has no exported member(?: named)? '([^']+)'/.exec(message);return m?`${m[1]} is no longer exported`:void 0}if(code===2322){let m=/^Type '(.+?)' is not assignable to type '(.+?)'\.?$/.exec(message);if(!m)return;let name=/^\s*(?:[\w$.]+\.)?([\w$]+)\s*[:=](?!=)/.exec(f.usage.snippet)?.[1];return name?`${name} no longer accepts a ${typeOf(m[1])} (expects ${typeOf(m[2])})`:`A ${typeOf(m[1])} no longer satisfies ${typeOf(m[2])}`}if(code===2345){let m=/^Argument of type '(.+?)' is not assignable to parameter of type '(.+?)'\.?$/.exec(message);return m?`An argument of type ${typeOf(m[1])} no longer matches ${typeOf(m[2])}`:void 0}}function ruleTitle(rule,zodTypeDef=!1){return rule==="types"?zodTypeDef?"`ZodTypeDef` removed":"Schema generics":RULE_TITLES[rule]?.title}function groups(report){let result=new Map;for(let site of report.sites){let parent=site.resolvedBy?report.sites.find(s=>siteKey(s)===site.resolvedBy):folded(site)?report.sites.find(s=>s.outcome==="agent"&&!folded(s)&&s.finding.usage.file===site.finding.usage.file):void 0,rule=changeRule(report,parent??site),key2=rule,group=result.get(key2)??{rule,outcome:site.outcome,sites:[],edits:[]};(site.outcome==="manual"||site.outcome==="agent"&&group.outcome==="mechanical")&&(group.outcome=site.outcome),group.sites.push(site),folded(site)||group.edits.push(site),result.set(key2,group)}return[...result.values()].sort((a,b)=>+(a.outcome!=="mechanical")-+(b.outcome!=="mechanical")||a.rule.localeCompare(b.rule))}function description(g,report){if(g.outcome==="manual")return{title:g.rule,summary:`Manual migration required: ${sentence(g.sites.find(s=>s.outcome==="manual")?.reason??"review the remaining sites.")}`};let edited=g.edits[0],patch=edited?.diff??edited?.attempts?.findLast(a=>a.outcome==="accepted")?.diff??"",zodTypeDef=g.sites.some(s=>/ZodTypeDef/.test(`${s.finding.usage.compileError??""} ${s.finding.usage.snippet} ${s.diff??""} ${s.attempts?.map(a=>a.diff??"").join(" ")??""}`)),declaration=edited?basename2(edited.finding.usage.file).replace(/\.[cm]?[jt]sx?$/,""):void 0,generic=/^\+.*?(ZodType<[^>\n]+>)/m.exec(patch)?.[1]??"ZodType<Output, Input>";return{"error-params":{title:ruleTitle("error-params"),summary:"`required_error` and `invalid_type_error` were replaced by `error`. "+(schemas(report).some(b=>b.messageChecks?.some(c=>c.status==="different")||b.differences.some(d=>/message|issue/.test(d.kind)))?"Message differences need review.":"Messages are unchanged."),note:"Returning `undefined` keeps zod's default message for wrong types, exactly like v3."},"string-format":{title:ruleTitle("string-format"),summary:"String format chains now use top-level factories, preserving arguments and subsequent checks."},ip:{title:ruleTitle("ip"),summary:g.edits.every(s=>/z\.union/.test(s.diff??"")&&/ipv4/.test(s.diff??"")&&/ipv6/.test(s.diff??""))?"Now `z.union([z.ipv4(), z.ipv6()])`, which accepts both families like before.":"Uses the target IP factories; review the accepted patch for address-family semantics."},types:{title:ruleTitle("types",zodTypeDef),summary:zodTypeDef&&declaration?`\`${declaration}\` now types schemas as \`${generic}\`, preserving the input/output contract.`:"Schema declarations use the target output/input generics; no new type errors were introduced."},"api-version":{title:ruleTitle("api-version"),summary:additiveBumpOnly(report)?"API literals now match the target SDK. No changelog entry between the two API versions affects this code, and none is breaking.":"API literals now match the target SDK; types compile, but response and webhook compatibility needs review."},"default-messages":{title:ruleTitle("default-messages"),summary:"Zod 4 words its default messages differently. Assertions that the migrated code made fail now match the new text; the tests pass again."},"subscription-period":{title:ruleTitle("subscription-period"),summary:"One shared helper takes the item that ends last and returns start and end from that same item (undefined with no items), preserving the single-item values; multi-item and no-item behavior needs your decision."},"api-version-unpinned":{title:"Stripe API version unpinned",summary:`A client created without \`apiVersion\` spoke the SDK's default; it now says \`${report.apiChanges?.to??"the target version"}\` explicitly, the version the new SDK's types describe. The next SDK bump cannot move it silently.`},"fixture-cast":{title:ruleTitle("fixture-cast"),summary:"Test fixtures that were already cast straight to an SDK type no longer overlap with it, so the same cast now goes through `unknown`. No application code and no new assertion: the tests decide whether the fixtures still hold."},"api-version-pin":{title:ruleTitle("api-version-pin"),summary:`\`apiVersion: '${report.apiVersion??""}'\` added to a client that relied on the SDK default. Identical behaviour: this is the version the installed SDK already speaks. The next SDK bump no longer changes it silently.`}}[g.rule]??{title:/^TS\d+$/.test(g.rule)?diagnosticTitle(Number(g.rule.slice(2)),g.sites.map(s=>s.finding)):g.rule,summary:`${sentence(g.edits[0]?.attempts?.findLast(a=>a.outcome==="accepted")?.explanation??g.edits[0]?.reason??"Migration recorded.")} ${report.verification.passed?"No new type errors.":"Verification is incomplete."}`}}function schemas(report){return(report.behavior??[]).filter(b=>b.schema!=="(reported site)")}function differs(b){return b.differences.length>0||!b.skipped&&b.identical!==b.inputs||!!b.messageChecks?.some(c=>c.status==="different")}function unchecked(b){return!!b.skipped||!b.inputs||!!b.messageChecks?.some(c=>c.status==="skipped")}function additiveBumpOnly(report){let c=report.apiChanges;return report.package==="stripe"&&!!c&&c.relevant===0&&c.breaking===0&&groups(report).every(g=>g.rule==="api-version")}function migrationRisk(report){if(report.verificationPending)return{level:"High",reason:"verification pending"};if(report.mode==="pin"&&report.verification.passed&&!report.sites.some(s=>s.outcome==="manual"))return{level:"Low",reason:"no behaviour change: the explicit pin equals the SDK default"};let g=groups(report),high=[...report.sites.some(s=>s.outcome==="manual")?["manual sites left"]:[],...!report.verification.passed||report.verification.newErrors.length||report.sites.some(s=>s.finding.severity==="unverified")?["unverified sites"]:[],...schemas(report).some(differs)||report.package==="stripe"&&g.some(x=>["api-version","subscription-period"].includes(x.rule))&&!additiveBumpOnly(report)?["behavior changes"]:[]];if(high.length)return{level:"High",reason:high.join("; ")};if(report.sites.length===0&&report.verification.tests.length>0&&report.verification.tests.every(t=>t.status==="passed"))return{level:"Low",reason:"no code changes; types and tests verified"};if(report.tier==="generic")return{level:"Medium",reason:`no migration pack for ${report.package}: agent edits verified by the compiler only`};if(additiveBumpOnly(report))return{level:"Medium",reason:"billing path; API version bump with additive changes only"};if(report.package==="zod"&&report.sites.some(s=>/(?:schemas|validation|auth|webhook|instance)/i.test(s.finding.usage.file)))return{level:"Medium",reason:`request validation${validationScopes(report).length?` in ${scopeList(report)}`:""}`};let medium=[...report.sites.some(s=>s.outcome==="agent")?["agent edits"]:[],...report.sites.some(s=>/(?:validation|auth|billing|payment|webhook)/i.test(s.finding.usage.file))?["sensitive paths"]:[],...!report.verification.tests.length||report.verification.tests.some(t=>t.status==="missing")?["no tests"]:[],...schemas(report).some(unchecked)?["unchecked schemas"]:[]];return medium.length?{level:"Medium",reason:medium.join("; ")}:{level:"Low",reason:"rule-only; all verified"}}function validationScopes(report){let paths=report.sites.map(s=>s.finding.usage.file).join(" ");return[.../auth|user\.ts/i.test(paths)?["auth"]:[],.../instance/i.test(paths)?["instances"]:[],.../webhook/i.test(paths)?["webhooks"]:[]]}var listed=items=>items.length<2?items.join(""):`${items.slice(0,-1).join(", ")} and ${items.at(-1)}`,scopeList=report=>listed(validationScopes(report));function errorSummary(diagnostics2,what){let byKind=new Map;for(let d of diagnostics2){let missing=missingPackages(d)[0],kind=missing?` missing ${missing==="@types/node"?"Node types":`\`${missing}\``}`:`|${d.code}`,entry=byKind.get(kind)??{codes:new Set,n:0};entry.codes.add(d.code),entry.n++,byKind.set(kind,entry)}let parts=[...byKind].sort((a,b)=>b[1].n-a[1].n).map(([kind,{codes,n}])=>`${n} \xD7 ${[...codes].map(c=>`TS${c}`).join("/")}${kind.startsWith("|")?"":kind}`);return`${count(diagnostics2.length,what)} (${parts.join(", ")})`}var count=(n,one)=>`${n} ${one}${n===1?"":"s"}`;function lintCell(report){let lint=report.verification.lint??[];if(!lint.length)return"";let tools=status=>lint.filter(l=>l.status===status).map(l=>l.tool).join(", ");return tools("failed")?` \xB7 \u274C lint fails (${tools("failed")})`:tools("pre-existing")?` \xB7 \u26A0\uFE0F lint was already failing (${tools("pre-existing")})`:` \xB7 lint clean (${tools("passed")})`}function testsRow(report){let all=report.verification.tests,names=ts15=>ts15.flatMap(t=>t.covers??[t.workspace]).map(w=>w==="."?"the repository":`\`${basename2(w)}\``).join(" or "),failed=all.filter(t=>["failed","timeout"].includes(t.status)&&!t.preexisting);if(failed.length)return`\u274C ${failed.length} failed or timed out`;let missing=all.filter(t=>t.status==="missing"),passed=all.filter(t=>t.status==="passed"),preexisting=all.filter(t=>t.preexisting),before=preexisting.length?` \xB7 \u26A0\uFE0F ${names(preexisting)}: ${(()=>{let files=preexisting.flatMap(t=>t.preexisting??[]).filter(f=>f!=="*");return files.length?count(files.length,"test file"):"the run"})()} already failing before the change`:"";if(preexisting.length&&!passed.length)return`\u26A0\uFE0F ${names(preexisting)}: ${preexisting.flatMap(t=>t.preexisting??[]).filter(f=>f!=="*").length||"the run"} already failing before the change; nothing else ran`.replace(/: (\d+) already/,(_,n)=>`: ${count(Number(n),"test file")} already`);if(!all.length)return"\u26A0\uFE0F no tests ran";if(!passed.length)return missing.every(t=>!t.scope)?`\u26A0\uFE0F no test script in ${names(missing)}`:`\u26A0\uFE0F no tests ran: ${missing[0]?.command?"none relate to the affected files":`no test script or runner configuration for ${names(missing)}`}`;let counted=passed.filter(t=>t.summary),parts=counted.map(t=>/^(\d+) tests? in (\d+) files?$/.exec(t.summary??"")),total=parts.every(m=>m!==null)?`${count(parts.reduce((n,m)=>n+Number(m?.[1]),0),"test")} in ${count(parts.reduce((n,m)=>n+Number(m?.[2]),0),"file")}`:counted.map(t=>t.summary).join(" + "),what=counted.length===passed.length?`${total} passed`:`${count(passed.length,"workspace")} passed`,scopes=[...new Set(passed.map(t=>t.scope).filter(Boolean))],relatedCounts=passed.map(t=>/tests related to/.test(t.scope??"")?/^(\d+) tests?/.exec(t.summary??"")?.[1]:void 0),related=relatedCounts.every(n=>n!==void 0)?relatedCounts.reduce((sum,n)=>sum+Number(n),0):void 0,skipped=all.reduce((n,t)=>n+(t.notRun?.files??0),0),left=skipped?` \xB7 \u26A0\uFE0F ${count(skipped,"integration test file")} not run`:"",retried=passed.flatMap(t=>t.retried??[]),rerun=retried.length?` \xB7 ${count(retried.length,"unrelated test")} failed once and passed on rerun`:"";return related!==void 0?`\u2705 ${related} related ${skipped?"unit ":""}test${related===1?"":"s"} passed${rerun}${left}${before}${missing.length?` \xB7 \u26A0\uFE0F no tests for ${names(missing)}`:""}`:`\u2705 ${what}${scopes.length===1?` \xB7 ${scopes[0]}`:""}${rerun}${left}${before}${missing.length?` \xB7 \u26A0\uFE0F no tests for ${names(missing)}`:""}`}var sentenceCase=s=>s.charAt(0).toUpperCase()+s.slice(1);function apiChangeSummary(c){let changes=count(c.total,"API change");if(c.total===0)return"no API changes";let more=c.resources?` \xB7 ${c.resources.total} touch resources you use (${c.resources.breaking} breaking)`:"";if(c.relevant>0)return`${c.relevant} of ${changes} affect${c.relevant===1?"s":""} your code${more}`;let nature=c.breaking===0?c.total===1?"additive":"all additive":`${c.breaking} breaking for surfaces you do not use`;return`${changes}, none affect${c.total===1?"s":""} your code, ${nature}`}function summaryCells(report){let c=fixCounts(report),risk=migrationRisk(report),bs=schemas(report),identical=bs.filter(b=>!unchecked(b)&&!differs(b)).length,tests=`${testsRow(report)}${lintCell(report)}`,changes=report.sites.length?`${count(report.sites.length,"site")} in ${new Set(report.sites.map(s=>s.finding.usage.file)).size} file${new Set(report.sites.map(s=>s.finding.usage.file)).size===1?"":"s"}${report.verificationPending?" \xB7 analysis only":` \xB7 ${BY.ruleDone(c.mechanical)} \xB7 ${BY.agentDone(c.agent)}${c.manual?` \xB7 ${c.manual} manual`:""}`}`:"none: versions and lockfile only",messages=bs.flatMap(b=>b.messageChecks??[]).filter(c2=>c2.status!=="default"),messageSummary=messages.length?` \xB7 ${messages.filter(c2=>c2.status==="identical").length}/${messages.length} custom-message assertions`:"",behavior=bs.length?`${bs.some(differs)?"\u26A0\uFE0F":"\u2705"} ${count(identical,"schema")} identical${bs.filter(unchecked).length?` \xB7 ${bs.filter(unchecked).length} not checked`:""}${bs.some(differs)?` \xB7 ${bs.filter(differs).length} with differences`:""}${messageSummary}`:report.apiChanges?`${report.apiChanges.relevant?"\u26A0\uFE0F":"\u2705"} ${apiChangeSummary(report.apiChanges)}`:report.mode==="pin"?`\u2705 unchanged: \`${report.apiVersion}\` is what the installed SDK already defaults to`:"\u26A0\uFE0F not checked";return{risk:`${risk.level}: ${cell(risk.reason)}`,changes,types:report.verificationPending?"\u26A0\uFE0F verification pending":report.verification.typesUnverified?"\u26A0\uFE0F not verified (type resolution failed)":`${report.verification.newErrors.length?"\u274C":"\u2705"} ${count(report.verification.target.length,"error")} ${report.mode==="pin"?"before":"after the bump"} \u2192 ${report.verification.after.length}${report.verification.baseline.length?` (${report.verification.baseline.length} pre-existing)`:""}`,behavior,tests:cell(report.verificationPending?"\u26A0\uFE0F not run":tests)}}function summaryRows(report){let c=summaryCells(report);return["| | |","|---|---|",`| **Risk** | ${c.risk} |`,`| **Changes** | ${c.changes} |`,`| **Types** | ${c.types} |`,`| **Behavior** | ${c.behavior} |`,`| **Tests** | ${c.tests} |`]}var heading=(g,report,i)=>{let sources=[...new Set(g.sites.map(s=>s.outcome))].map(source=>source==="mechanical"?BY.ruleDoneTag:source==="agent"?BY.agentDoneTag:"manual").sort();return`**${i+1}. ${description(g,report).title}** \xB7 ${g.edits.length!==g.sites.length?`${g.edits.length} fix${g.edits.length===1?"":"es"}, ${count(g.sites.length,"error")}`:`${g.sites.length} site${g.sites.length===1?"":"s"}`} \xB7 ${sources.join(" + ")}`},collapse=(label,lines)=>[`<details><summary>${label}</summary>`,"",...lines,"","</details>"],PR_BODY_BUDGET=6e4,droppable=(rank,block,what)=>({kind:"text",text:block.join(`
195
+ `),rank,alt:`_${what} left out: this description is at GitHub's size limit._`}),withCommand=text=>text.replace(/\bnpx uptide(?!@)/g,UPTIDE_COMMAND).replace(/`uptide (fix|pr|pr-body|verify|check|clean)\b/g,`\`${UPTIDE_COMMAND} $1`);function renderMigration(report,mode="full",budget){let from=report.from??([...new Set(report.sites.map(s=>s.finding.change.from))].join(", ")||"unknown"),lines=report.mode==="pin"?[`## Pin the Stripe API version to ${report.apiVersion}`,""]:[`## Upgrade ${report.package} ${from} \u2192 ${report.target}`,""];if(mode==="full"&&report.mode==="pin"){let manual=report.sites.filter(s=>s.outcome==="manual").length;lines.push(`**${report.verification.passed&&!manual?"Ready for review.":"Review required before merging."}** stripe stays at ${report.target}; each client created without \`apiVersion\` now says \`${report.apiVersion}\`, the version that SDK already defaults to. No behaviour change.${manual?` ${manual} client${manual===1?"":"s"} build${manual===1?"s":""} options elsewhere and need${manual===1?"s":""} the pin by hand.`:""}`,"")}else if(mode==="full"){let bs=schemas(report),inputs=bs.filter(b=>!unchecked(b)&&!differs(b)).reduce((n,b)=>n+b.inputs,0),ready=report.verification.passed&&migrationRisk(report).level!=="High"&&!report.sites.some(s=>s.outcome==="manual")&&!bs.some(differs)&&!(report.package==="stripe"&&groups(report).some(g=>["api-version","subscription-period"].includes(g.rule))&&!additiveBumpOnly(report)),workspaces=[...new Set(report.verification.tests.flatMap(t=>t.covers??[t.workspace]))].filter(w=>w!==".").map(w=>`\`${basename2(w)}\``),typeVerdict=report.verification.newErrors.length?"New type errors remain.":report.verification.after.length?"No new type errors; pre-existing errors remain.":inputs?`Types compile, and the checked schemas behave the same as before on ${inputs.toLocaleString("en-US")} sampled inputs.`:additiveBumpOnly(report)?"Types compile.":!report.sites.length&&migrationRisk(report).level==="Low"?"Types compile and the tests pass.":"Types compile; runtime behavior needs review.",what=report.sites.length?`The code was migrated to ${report.package} ${from.split(".")[0]===report.target.split(".")[0]?report.target:report.target.split(".")[0]}${workspaces.length?` in ${listed(workspaces)}`:""}.`:"No code changes were needed; only versions and the lockfile changed.";lines.push(`**${ready?"Ready for review.":"Review required before merging."}** ${what} ${typeVerdict}${report.apiChanges?` ${sentenceCase(apiChangeSummary(report.apiChanges))} between ${report.apiChanges.from} and ${report.apiChanges.to}.`:""}`,"")}if(report.tier==="generic"&&report.sites.some(s=>s.outcome==="agent")&&lines.push(`> ${GENERIC_NOTE(report.package)}`,""),report.llm.disabled&&lines.push("Assisted fixes disabled (--no-llm).",""),lines.push(...summaryRows(report),""),groups(report).length&&lines.push("### What changed",""),groups(report).forEach((g,i)=>{if(lines.push(heading(g,report,i)),mode==="compact")return;let d=description(g,report);lines.push(d.summary);let representative=g.edits.find(s=>g.rule==="error-params"&&/Field 'email' is required/.test(s.diff??""))??g.edits.find(s=>s.diff||s.attempts?.some(a=>a.outcome==="accepted"&&a.diff)),diff=representative?.diff??representative?.attempts?.findLast(a=>a.outcome==="accepted")?.diff,files=new Map;for(let s of g.sites)files.set(s.finding.usage.file,(files.get(s.finding.usage.file)??0)+1);let detail=[...diff?["```diff",diff.trim(),"```"]:["Representative diff was not retained in this stored run."],...d.note?["",d.note]:[],"",...[...files].map(([f,n])=>`- \`${f}\` (${n})`)];for(let s of g.edits){let attempts=s.attempts??[];for(let a of attempts)a.diff&&(s!==representative||a.outcome!=="accepted")&&detail.push("","```diff",a.diff.trim(),"```"),detail.push("",`**${s.finding.usage.file}:${s.finding.usage.line} \xB7 attempt ${a.attempt} (${a.outcome})**`,"",a.explanation.replace(/([^\n])\n(?=\d+\. |[-*] )/g,`$1
196
+
197
+ `),"",`Diagnostics: ${a.before.length} \u2192 ${a.after.length}.`);!attempts.length&&g.outcome==="manual"&&detail.push("",s.reason)}let label=g.outcome==="mechanical"?"Example and files":"Diff and reasoning";lines.push(droppable(1,collapse(label,detail),label),"")}),mode==="compact")return`${lines.filter(l=>typeof l=="string").join(`
198
+ `).trimEnd()}
199
+ `;let review=[],notChecked=schemas(report).filter(unchecked);notChecked.length&&review.push(`- ${listed(notChecked.map(b=>`\`${b.schema}\``))}: behavior not checked${notChecked.every(b=>b.skipped?.includes("runtime import"))?" (they import another schema file)":""}.`);for(let b of schemas(report).filter(differs)){for(let d of b.differences)review.push(`- \`${b.schema}\`: ${d.kind}; minimal example \`${JSON.stringify(d.input)}\` \u2192 before \`${JSON.stringify(d.before)}\`, after \`${JSON.stringify(d.after)}\`.`);for(let c of b.messageChecks?.filter(c2=>c2.status==="different")??[])review.push(`- \`${b.schema}\`: ${c.input} at \`${c.path.join(".")||"(root)"}\`; message ${JSON.stringify(c.before)} \u2192 ${JSON.stringify(c.after)}.`);!b.differences.length&&!b.messageChecks?.some(c=>c.status==="different")&&review.push(`- \`${b.schema}\`: ${b.inputs-b.identical} sampled inputs differ; no example was retained.`)}report.package==="stripe"&&!report.behavior&&review.push(additiveBumpOnly(report)?"- Check the webhook endpoint's API version in the Stripe Dashboard before deploying.":"- Runtime behavior was not checked; smoke-test billing and webhook responses against the target API version."),(!report.verification.tests.length||report.verification.tests.some(t=>t.status==="missing"))&&review.push(`- ${report.verification.tests.every(t=>t.status==="missing")?"No tests ran.":"Some workspaces have no tests."} ${report.package==="zod"?`Smoke-test the routes ${scopeList(report)?`behind ${scopeList(report)}`:"that use the changed schemas"} before merging.`:report.package==="stripe"?"Add coverage for the changed billing and webhook flows before merging.":"Exercise the changed code by hand before merging."}`);for(let t of report.verification.tests.filter(t2=>["failed","timeout"].includes(t2.status)))review.push(t.preexisting?`- Tests in \`${basename2(t.workspace)}\` were failing before this change (${t.preexisting[0]==="*"?"the whole run":t.preexisting.map(f=>`\`${basename2(f)}\``).join(", ")}); not caused here, but a green suite would verify more.`:`- Tests in \`${basename2(t.workspace)}\` ${t.status}; fix or rerun before merging.`);for(let t of report.verification.tests.filter(t2=>t2.notRun&&t2.notRun.files>0))review.push(`- ${count(t.notRun?.files??0,"integration test file")} not run (need ${t.notRun?.needs.join("/")}). Run with \`--with-services\` to include them.`);for(let l of(report.verification.lint??[]).filter(l2=>l2.status==="failed"))review.push(`- The repository's lint (${l.tool}) fails on the edited files; fix it before merging (see verification details).`);report.llm.unreportedCostUsd&&review.push(`- Unreported API usage: $${report.llm.unreportedCostUsd.toFixed(2)} reserved against the budget (actual spend unknown).`),report.llm.costLimit&&review.push(`- The agent stopped at the cost limit of $${report.llm.costLimit.limitUsd.toFixed(2)} (\`--max-cost\`): ${count(report.llm.costLimit.notAttempted,"site")} not completed. Run again with a higher limit to continue.`);for(let s of report.sites.filter(s2=>s2.outcome==="manual"))review.push(`- Manual: \`${basename2(s.finding.usage.file)}:${s.finding.usage.line}\` \u2014 ${sentence(s.reason)}`);report.verification.newErrors.length&&review.push(`- Resolve ${report.verification.newErrors.length} new type errors before merging (see verification details).`),!report.verification.passed&&!report.verification.newErrors.length&&!report.verification.tests.some(t=>["failed","timeout"].includes(t.status))&&review.push("- Verification is incomplete; resolve the recorded run notes before merging."),review.length&&lines.push("### Worth a look","",...review,"");let decisions=[];return report.package==="stripe"&&groups(report).some(g=>g.rule==="subscription-period")&&!(report.decisions??[]).some(d=>/billing period now comes from one item/.test(d))&&decisions.push("- Confirm the latest-ending item is the desired billing rule: items ending `[100, 200]` \u2192 that item's `{ start, end }`; a single item is unchanged.",'- Confirm what no items means (Stripe never returns that): the webhook keeps fetching the full subscription, API routes throw "subscription has no items". Check pagination: only returned `items.data` are considered.'),report.package==="stripe"&&groups(report).some(g=>g.rule==="api-version")&&!additiveBumpOnly(report)&&decisions.push("- Coordinate the API-version rollout with dashboard webhook endpoints and other services."),decisions.push(...report.decisions??[]),decisions.length&&lines.push("### Decisions for you","",...decisions,""),lines.push("<details><summary>Verification details</summary>","",...verificationDetails(report),"","</details>","",...collapse("Run details",[`Uptide ${report.uptideVersion??"version not retained"} \xB7 ${report.llm.disabled?"agent disabled (--no-llm)":report.llm.model??"agent unavailable"} \xB7 ${(report.llm.inputTokens/1e3).toFixed(1)}k/${(report.llm.outputTokens/1e3).toFixed(1)}k tokens \xB7 $${report.llm.costUsd.toFixed(2)} \xB7 ${Math.round(report.timingMs/6e4)} min`,"",`Uptide commit: \`${report.uptideCommit??"not retained"}\`${report.uptideDirty?" (working-tree changes)":""}`,`Branch: \`${report.branch}\``,...report.tier?[`Tier: ${report.tier} (${report.tier==="verified"?"a migration pack covers this upgrade":"no migration pack: agent edits verified by the compiler"})`]:[],...report.verifiedAt?[`Verified at: ${report.verifiedAt}${report.verificationTimingMs===void 0?"":` \xB7 ${(report.verificationTimingMs/1e3).toFixed(2)}s`}`]:[],...report.head?[`Verified commit: \`${report.head}\``]:[]]),""),withCommand(fitPieces(lines.map(part=>typeof part=="string"?must(part):part),budget))}function verificationDetails(report){let v=report.verification,bs=schemas(report),checks=bs.flatMap(b=>b.messageChecks??[]).filter(c=>c.status!=="default"),lines=[`Type errors: baseline ${v.baseline.length}; target ${v.target.length}; after ${v.after.length}; ${v.newErrors.length} new. Verification: ${v.passed?"PASS":"FAIL"}.${v.typesUnverified?` Types not verified (type resolution failed): ${v.typesUnverified}.`:""}`,...report.generated?.length?["",...report.generated.map(g=>`Generated before the baseline: \`${g.command}\` in \`${g.workspace}\` \u2014 ${g.status==="generated"?"ok (no database contacted)":`${g.status}: ${(g.output??"").split(`
200
+ `).filter(Boolean).at(-1)??""}`}`)]:[],"","| Workspace | Baseline tests | Target tests |","|---|---|---|",...v.tests.map(t=>`| ${cell(t.workspace)} | ${v.baselineTests.find(b=>b.workspace===t.workspace)?.status??"not run"} | ${t.status} |`),...v.tests.some(t=>t.scope)?["",...v.tests.filter(t=>t.scope).map(t=>`- \`${t.workspace}\`: ${t.scope}${t.covers&&t.covers.join()!==t.workspace?`, covering ${t.covers.map(w=>`\`${w}\``).join(", ")}`:""}${t.command?` \u2014 \`${t.command}\``:""}${t.summary?` \u2014 ${t.summary} passed`:""}${t.retried?.length?` \u2014 failed once outside the affected files and passed on rerun: ${t.retried.map(f=>`\`${f}\``).join(", ")}`:""}${t.notRun?.files?` \u2014 ${count(t.notRun.files,"integration test file")} not run (need ${t.notRun.needs.join("/")})`:""}${t.services?` \u2014 ran against ${t.services.names.join(", ")}${t.services.targets.length?` (${t.services.targets.join("; ")})`:""}`:""}`)]:[]];v.formatted?.length&&lines.push("",`Formatted with ${v.formatted.join(", ")}: only the files this migration edited, in their own commit.`);for(let l of v.lint??[])lines.push("",`Lint (${l.tool}) on ${count(l.files,"edited file")}: ${l.status==="passed"?"passed":l.status==="pre-existing"?"fails, and failed on the same files before the migration":"FAILED"} \u2014 \`${l.command}\``),l.status!=="passed"&&l.output&&lines.push(droppable(5,["```text",l.output.trim(),"```"],`Lint output (${l.tool})`));let listing=d=>`- ${d.file}:${d.line} TS${d.code}: ${d.message}`;if(v.baseline.length){let shown=v.baseline.slice(0,10).map(listing),rest=v.baseline.length-shown.length;lines.push("",`**${errorSummary(v.baseline,"pre-existing error")}**`,droppable(4,collapse(rest?`First 10 of ${v.baseline.length}`:"List",[...shown,...rest?[`- \u2026 and ${rest} more`]:[]]),"Pre-existing error list"))}v.newErrors.length&&lines.push("","**Remaining errors**",...v.newErrors.map(listing)),v.workspaceTypes?.length&&lines.push("","| Workspace | Type errors after verification |","|---|---|",...v.workspaceTypes.map(w=>`| ${cell(w.workspace)} | ${w.errors} |`)),report.behavior&&lines.push("",`Samples: ${bs.reduce((n,b)=>n+b.identical,0).toLocaleString("en-US")}/${bs.reduce((n,b)=>n+b.inputs,0).toLocaleString("en-US")} identical across ${bs.length} schemas. Custom-message assertions: ${checks.filter(c=>c.status==="identical").length}/${checks.length} identical.`,"","Fixed seed 1729; up to 200 v3-derived inputs per schema. Isolated schema declarations and dependencies; no application code executed. Sampled equivalence is not a proof; examples are greedily minimized.","","| Schema | Inputs | Identical | Valid v3 inputs | Differences / limits |","|---|---|---|---|---|",...report.behavior.map(b=>`| ${cell(`${b.file}: ${b.schema}`)} | ${b.inputs} | ${b.identical} | ${b.validInputs} | ${cell(b.skipped??`${b.differences.length}${b.schemaKind==="object"&&b.validInputs<20?"; fewer than 20 valid inputs":""}`)} |`));for(let b of report.behavior??[])b.differences.length&&lines.push("",`**${b.file}: ${b.schema} differences**`,"```json",JSON.stringify(b.differences,null,2),"```"),b.messageChecks?.length&&lines.push("",`**${b.file}: ${b.schema} custom messages**`,...b.messageChecks.map(c=>`- ${c.site}, ${c.input} ${c.path.join(".")||"(root)"}: ${c.status} \u2014 ${c.before?`${JSON.stringify(c.before)} \u2192 ${JSON.stringify(c.after)}`:c.reason??""}`));for(let t of v.tests)t.status!=="missing"&&t.output&&lines.push("",`**Tests: ${t.workspace}**`,droppable(5,["```text",t.output,"```"],`Test output (${t.status})`));let agentEdits=report.sites.some(s=>s.outcome==="agent"),notes=report.notes.filter(n=>!/^(?:Publication plan printed|PR not opened:)/.test(n)&&(agentEdits||n!==GENERIC_NOTE(report.package)));notes.length&&lines.push("","**Run notes**","",...notes.map(n=>`- ${n}`));for(let stored of report.reviewSections??[]){if(stored.title==="Decisions for you")continue;let section=withLists(stored,report);lines.push("",`**${section.title}**`,"",...section.lines),(section.lists??[]).forEach((list,i)=>{lines.push("",{kind:"list",open:`<details>
201
+ <summary>${list.summary}</summary>
202
+ `,close:`
203
+ </details>`,items:list.items,rank:2+Math.min(i,1),more:list.more})})}return lines}function withLists(section,report){if(section.lists||!section.lines.includes("<details>"))return section;let lines=[],lists=[];for(let i=0;i<section.lines.length;i++){let line=section.lines[i];if(line!=="<details>"){lines.push(line);continue}let end=section.lines.indexOf("</details>",i),block=end<0?[]:section.lines.slice(i+1,end),summary=/^<summary>(.*)<\/summary>$/.exec(block[0]??"")?.[1],items=block.slice(1).filter(l=>l.trim()!=="");if(end<0||summary===void 0||!items.every(l=>l.startsWith("- "))){lines.push(line);continue}lists.push({summary,items,more:/Stripe/.test(section.title)?`- \u2026 {n} more not shown here: [Stripe's changelog](https://docs.stripe.com/changelog)${report.apiChanges?`, ${report.apiChanges.from} \u2192 ${report.apiChanges.to}`:""}.`:"- \u2026 {n} more not shown here: this description is at GitHub's size limit."}),i=end}for(;lines.at(-1)==="";)lines.pop();return{...section,lines,lists}}var prBody=report=>renderMigration(report,"full",PR_BODY_BUDGET),migrationBody=report=>renderMigration(report,"full"),formatFix=report=>renderMigration(report,"compact");function editDiff(before,after){let a=before.split(`
204
+ `),b=after.split(`
205
+ `),start=0;for(;start<a.length&&start<b.length&&a[start]===b[start];)start++;let endA=a.length,endB=b.length;for(;endA>start&&endB>start&&a[endA-1]===b[endB-1];)endA--,endB--;return[...a.slice(start,endA).map(s=>`- ${s.trim()}`),...b.slice(start,endB).map(s=>`+ ${s.trim()}`)].join(`
206
+ `)}function selectedFindings(report,name,deprecated){let selected=[];for(let p of report.packages)if(p.name===name){for(let finding of p.findings)if(["breaking","unverified",...deprecated?["deprecated"]:[]].includes(finding.severity))if(finding.change.kind==="cause")for(let d of finding.downstream??[])selected.push({...finding,change:{...finding.change,kind:"type",path:`TS${d.code}`},usage:{...finding.usage,file:d.file,line:d.line,column:d.column??1,snippet:d.snippet??finding.usage.snippet,compileCode:d.code,compileError:d.message}});else selected.push({...finding,usage:{...finding.usage,file:p.workspace==="."||p.workspace==="*"?finding.usage.file:join18(p.workspace,finding.usage.file)}})}let unique2=new Map;for(let f of selected)unique2.set(`${f.usage.file}:${f.usage.line}:${f.usage.column}:${f.change.kind}`,f);return[...unique2.values()].sort((a,b)=>a.usage.file.localeCompare(b.usage.file)||b.usage.line-a.usage.line||b.usage.column-a.usage.column)}var VISIBLE_CONFIDENCE=.5;function planPackage(p,pack,read2=()=>{},context={}){let usable=pack!==void 0&&pack.name===p.name&&pack.supports(p.installed,p.target),visible={...p,findings:p.findings.filter(f=>f.confidence>=VISIBLE_CONFIDENCE)},planned=selectedFindings({repo:"",workspaces:[],packages:[visible],summary:emptySummary},p.name,!0).map(finding=>{let source=usable?read2(finding.usage.file):void 0,dry=usable&&source!==void 0?pack.transform(source,finding,{...context,from:finding.change.from,to:p.target,includeDeprecated:!0}):void 0,decision=finding.change.source==="pack"&&finding.fixability==="manual",generic=!usable&&finding.severity==="breaking",outcome=dry?.applied?"mechanical":usable&&!decision||generic?"agent":"manual",rule=finding.rule??dry?.rule??changeRule({package:p.name},{finding,outcome,reason:dry?.reason??finding.reason});return{finding,outcome,rule}}),perFile=new Set((usable?pack.rules:[]).filter(r=>r.perFile).map(r=>r.id));for(let site of planned){if(site.outcome==="mechanical"||!/^TS\d+$/.test(site.rule))continue;let anchor=planned.find(other=>perFile.has(other.rule)&&other.finding.severity===site.finding.severity&&other.finding.usage.file===site.finding.usage.file);anchor&&(site.rule=anchor.rule)}let groups2=new Map;for(let site of planned){let key2=`${site.finding.severity}:${site.rule}`;groups2.set(key2,[...groups2.get(key2)??[],site])}let order={breaking:0,unverified:1,deprecated:2};return[...groups2.values()].map(sites=>{let first=sites[0],severity=first.finding.severity,count3=o=>sites.filter(s=>s.outcome===o).length,assisted=sites.filter(s=>s.outcome!=="mechanical"),group={rule:first.rule,title:titleOf(first.rule,sites),severity,by:{rule:count3("mechanical"),agent:count3("agent"),manual:count3("manual")},sites:sites.length,fixes:perFile.has(first.rule)?count3("mechanical")+new Set(assisted.map(s=>s.finding.usage.file)).size:sites.length,locations:sites.map(s=>({file:s.finding.usage.file,line:s.finding.usage.line})).sort((a,b)=>a.file.localeCompare(b.file)||a.line-b.line),detail:(first.finding.usage.compileError??first.finding.reason).split(`
207
+ `)[0]??""};if(severity==="deprecated"){let symbols={};for(let s of sites){let name=written(s.finding.change.path);symbols[name]=(symbols[name]??0)+1}group.symbols=symbols}return group}).sort((a,b)=>order[a.severity]-order[b.severity]||+(a.by.rule===0)-+(b.by.rule===0)||b.sites-a.sites||a.rule.localeCompare(b.rule))}var emptySummary={packagesNeedingAttention:0,breaking:0,deprecated:0,unverified:0,unaffected:0,notImported:0,partiallyAnalyzed:0,autoFixable:0,skippedForTime:0,failed:0};function written(path){let member=/[#.]([^#.[(]+)(?:\(\))?$/.exec(path);return member&&path.includes("#")?`.${member[1]}`:path}function titleOf(rule,sites){if(rule==="typescript-no-js-api")return"TypeScript 7 has no JavaScript compiler API in its main entry";let evidence=sites.map(s=>`${s.finding.change.path} ${s.finding.usage.compileError??""} ${s.finding.usage.snippet}`).join(" "),known=RULE_TITLES[rule]?.plain??ruleTitle(rule,/ZodTypeDef/.test(evidence));if(known)return known.replaceAll("`","");let first=sites[0].finding,code=/^TS(\d+)$/.exec(rule);if(code)return diagnosticTitle(Number(code[1]),sites.map(s=>s.finding));let c=first.change,compiled=sites.every(s=>s.finding.usage.compileCode!==void 0),missing=[2305,2339,2551,2614,2694,2724].includes(first.usage.compileCode??0),structural=["removed","renamed","moved"].includes(c.kind)&&missing;if(compiled&&!structural&&!["module-format","deprecated"].includes(c.kind))return diagnosticTitle(first.usage.compileCode,sites.map(s=>s.finding));switch(c.kind){case"removed":return`${rule} removed`;case"renamed":return`${rule} renamed${c.replacement?` to ${c.replacement}`:""}`;case"moved":return`${rule} moved to ${c.replacement??"another entry point"}`;case"required":return`${rule} is now required`;case"signature":return`${rule} takes different arguments`;case"module-format":return`${c.package} is ESM-only: require() no longer loads it`;case"deprecated":return`${rule} deprecated`;default:return`${rule} changed type`}}var TOOL_FILES=[[/^\.huskyrc(?:\..+)?$/,"husky"],[/^(?:\.lintstagedrc(?:\..+)?|lint-staged\.config\..+)$/,"lint-staged"],[/^(?:\.prettierrc.*|prettier\.config\..+)$/,"prettier"],[/^(?:\.eslintrc.*|eslint\.config\..+)$/,"eslint"],[/^(?:\.stylelintrc.*|stylelint\.config\..+)$/,"stylelint"],[/^(?:\.babelrc(?:\..+)?|babel\.config\..+)$/,"@babel/core"],[/^(?:\.commitlintrc(?:\..+)?|commitlint\.config\..+)$/,"@commitlint/cli"],[/^\.czrc(?:\..+)?$/,"commitizen"],[/^(?:\.standard(?:rc)?(?:\..+)?|standard\.config\..+)$/,"standard"],[/^(?:\.simple-git-hooksrc(?:\..+)?|\.?simple-git-hooks(?:\.config)?\.(?:[cm]?js|json|ya?ml))$/,"simple-git-hooks"]],configConsumers=file=>TOOL_FILES.filter(([pattern])=>pattern.test(basename3(file))).map(([,name])=>name);function stringValues(value,seen=new Set){return typeof value=="string"?[value]:!value||typeof value!="object"||seen.has(value)?[]:(seen.add(value),Object.values(value).flatMap(child=>stringValues(child,seen)))}function manifestCommands(manifest2){let husky=manifest2.husky,hooks=husky&&typeof husky=="object"&&"hooks"in husky?husky.hooks:void 0;return[{text:stringValues(hooks).join(`
208
+ `),reason:"hook/task command in package.json husky.hooks"},{text:lintStaged(manifest2["lint-staged"]).commands.join(`
209
+ `),reason:"lint-staged command"},{text:stringValues(manifest2["simple-git-hooks"]).join(`
210
+ `),reason:"hook/task command in package.json simple-git-hooks"}].filter(entry=>entry.text)}var KARMA_PACKAGES={jasmine:["karma-jasmine","jasmine-core"],webpack:["karma-webpack"],coverage:["karma-coverage"],spec:["karma-spec-reporter"],Chrome:["karma-chrome-launcher"],ChromeHeadless:["karma-chrome-launcher"],sourcemap:["karma-sourcemap-loader"]};function karmaEvidence(file,text,names,add){let source=import_ts_morph11.ts.createSourceFile(file,text,import_ts_morph11.ts.ScriptTarget.Latest,!0),objects=[],candidates=[],visit=node=>{if(import_ts_morph11.ts.isCallExpression(node)&&import_ts_morph11.ts.isPropertyAccessExpression(node.expression)&&node.expression.name.text==="set"){let argument=node.arguments[0];argument&&import_ts_morph11.ts.isObjectLiteralExpression(argument)&&objects.push(argument)}import_ts_morph11.ts.isObjectLiteralExpression(node)&&node.properties.some(p=>import_ts_morph11.ts.isPropertyAssignment(p)&&["frameworks","reporters","browsers","preprocessors","plugins"].includes(p.name.getText(source).replace(/['"]/g,"")))&&candidates.push(node),import_ts_morph11.ts.forEachChild(node,visit)};visit(source);let configs=objects.length?objects:candidates,strings=node=>{if(import_ts_morph11.ts.isStringLiteralLike(node))return[node.text];let result=[];return import_ts_morph11.ts.isPropertyAssignment(node)?strings(node.initializer):(import_ts_morph11.ts.forEachChild(node,child=>{result.push(...strings(child))}),result)};for(let config of configs){let hasPlugins=!1;for(let property of config.properties){if(!property.name)continue;let key2=property.name.getText(source).replace(/['"]/g,"");if(key2==="plugins"&&(hasPlugins=!0),!(!import_ts_morph11.ts.isPropertyAssignment(property)||!["frameworks","plugins","reporters","browsers","preprocessors","customLaunchers"].includes(key2)))for(let token of strings(property.initializer)){for(let name of KARMA_PACKAGES[token]??[])add(name,`Karma ${key2}: ${token}`);if(token.startsWith("karma-")){let pattern=new RegExp(`^${token.split("*").map(part=>part.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")}$`);for(let name of names.filter(name2=>pattern.test(name2)))add(name,`Karma ${key2}: ${token}`)}}}if(!hasPlugins)for(let name of names.filter(name2=>name2.startsWith("karma-")))add(name,"auto-loaded by Karma (plugins unset)")}}function literalTokens(text){let scanner=import_ts_morph11.ts.createScanner(import_ts_morph11.ts.ScriptTarget.Latest,!0,import_ts_morph11.ts.LanguageVariant.Standard,text),values=[];for(let token=scanner.scan();token!==import_ts_morph11.ts.SyntaxKind.EndOfFileToken;token=scanner.scan())(token===import_ts_morph11.ts.SyntaxKind.StringLiteral||token===import_ts_morph11.ts.SyntaxKind.NoSubstitutionTemplateLiteral)&&values.push(scanner.getTokenValue());return values.join(`
211
+ `)}function lintStaged(value){if(!value||typeof value!="object"||Array.isArray(value))return{commands:[]};let data=value,linters=data.linters&&typeof data.linters=="object"?data.linters:data;return{commands:Object.entries(linters).filter(([key2])=>key2!=="ignore").flatMap(([,command2])=>typeof command2=="string"?[command2]:Array.isArray(command2)?command2.filter(v=>typeof v=="string"):[])}}function configValue(file,text){if(!/\.[cm]?[jt]s$/.test(file)){let document=(0,import_yaml2.parseDocument)(text,{customTags:[],logLevel:"silent"});try{return document.errors.length?void 0:document.toJS({maxAliasCount:50})}catch{return}}let source=import_ts_morph11.ts.createSourceFile(file,text,import_ts_morph11.ts.ScriptTarget.Latest,!0),bindings=new Map,exported,visit=node=>{import_ts_morph11.ts.isVariableDeclaration(node)&&import_ts_morph11.ts.isIdentifier(node.name)&&node.initializer&&bindings.set(node.name.text,node.initializer),import_ts_morph11.ts.isExportAssignment(node)&&(exported=node.expression),import_ts_morph11.ts.isBinaryExpression(node)&&node.operatorToken.kind===import_ts_morph11.ts.SyntaxKind.EqualsToken&&node.left.getText(source)==="module.exports"&&(exported=node.right),import_ts_morph11.ts.forEachChild(node,visit)};visit(source);let seen=new Set,value=node=>{if(!(!node||seen.has(node))){seen.add(node);try{return import_ts_morph11.ts.isStringLiteralLike(node)?node.text:import_ts_morph11.ts.isIdentifier(node)?value(bindings.get(node.text)):import_ts_morph11.ts.isParenthesizedExpression(node)||import_ts_morph11.ts.isAsExpression(node)||import_ts_morph11.ts.isSatisfiesExpression(node)?value(node.expression):import_ts_morph11.ts.isArrayLiteralExpression(node)?node.elements.map(value):import_ts_morph11.ts.isObjectLiteralExpression(node)?Object.fromEntries(node.properties.flatMap(p=>import_ts_morph11.ts.isPropertyAssignment(p)?[[p.name.getText(source).replace(/^['"]|['"]$/g,""),value(p.initializer)]]:[])):void 0}finally{seen.delete(node)}}};return value(exported)}function scanConfig(file,text,names,evidence,tasks){let label=basename3(file),add=(name,reason)=>{if(!names.includes(name))return;let reasons=evidence?.get(name)??[];reasons.includes(reason)||reasons.push(reason),evidence?.set(name,reasons)},consumers=configConsumers(file);for(let name of consumers)add(name,`config file ${label}`);let literals;if(consumers.includes("lint-staged"))literals=lintStaged(configValue(file,text)).commands.join(`
212
+ `),tasks?.push({text:literals,reason:"lint-staged command"});else{if(/(?:^|\/)\.husky\//.test(file))literals=text.replace(/^\s*#.*$/gm,"");else if(/\.(?:ya?ml|json)$/.test(label)||/^\.[\w-]+rc$/.test(label)||label===".standard"){let value=configValue(file,text);literals=value===void 0&&label.endsWith(".json")?literalTokens(text):stringValues(value).join(`
213
+ `)}else literals=literalTokens(text);(consumers.some(name=>["husky","simple-git-hooks"].includes(name))||/(?:^|\/)\.husky\//.test(file))&&tasks?.push({text:literals,reason:`hook/task command in ${label}`})}return/(?:^|\/)karma\.conf\.[^/]+$/.test(file)&&karmaEvidence(file,text,names,add),literals}function installedManifest(root,workspace,name){for(let dir=resolve7(root,workspace);;dir=dirname12(dir)){try{return JSON.parse(readFileSync11(join19(dir,"node_modules",name,"package.json"),"utf8"))}catch{}if(dirname12(dir)===dir)return}}var isConfig=file=>configConsumers(file).length>0||/(?:^|\/)(?:tsconfig[^/]*\.jsonc?|nest-cli\.json|\.(?:eslintrc|prettierrc|babelrc|commitlintrc|czrc|cz-config)(?:\.[^/]+)?|[^/]*\.config\.[^/]+|(?:karma\.conf|gulpfile|jest|eslint|prettier|webpack|commitlint|cz)[^/]*\.(?:json|[cm]?[jt]s))$/.test(file)||/(?:^|\/)\.husky\//.test(file),knownTool=name=>/^(?:eslint|prettier)/.test(name)||/^(?:@eslint\/|@typescript-eslint\/|@jest\/|@prettier\/)/.test(name)||["jest","ts-jest","typescript","webpack","ts-loader","@nestjs/cli","@nestjs/schematics"].includes(name),COMPILER="compiler major: check build and tsconfig",BUNDLER="bundler major: check build config",BUILD_TOOLS={typescript:COMPILER,"@swc/core":COMPILER,esbuild:COMPILER,"@babel/core":COMPILER,vite:BUNDLER,webpack:BUNDLER},buildToolMajor=p=>p.change==="major"?BUILD_TOOLS[p.name]:void 0;function mentions(text,token){let escaped=token.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(?:^|[^\\w@/.-])${escaped}(?=$|[^\\w.-])`).test(text)}function toolingReasons(name,metadata,scripts,configs,manifests2=[],tasks=[]){let reasons=[];(knownTool(name)||BUILD_TOOLS[name])&&reasons.push("known configuration or build tool");let bins=metadata.flatMap(m=>typeof m.bin=="string"?[(m.name??name).split("/").at(-1)]:Object.keys(m.bin??{}));([name,...bins].some(token=>mentions(scripts,token))||scripts.split(/[\s;&|\x22\x27`]+/).some(token=>bins.includes(basename4(token)))||scripts.includes(`node_modules/${name}/`))&&reasons.push("used by package scripts"),(referencesPackage(configs,name)||bins.some(bin=>mentions(configs,bin)))&&reasons.push("referenced by configuration");for(let command2 of[...tasks,...manifests2.flatMap(manifestCommands)])([name,...bins].some(bin=>mentions(command2.text,bin))||command2.text.split(/[\s;&|\x22\x27`]+/).some(token=>bins.includes(basename4(token))))&&reasons.push(command2.reason);for(let manifest2 of manifests2){Object.hasOwn(manifest2,name)&&reasons.push(`package.json field: ${name}`);for(let[field,consumers]of Object.entries(CONFIG_FIELDS)){let value=field==="config.commitizen"?manifest2.config?.commitizen:manifest2[field];if(value===void 0)continue;let text=field==="lint-staged"?lintStaged(value).commands.join(`
214
+ `):JSON.stringify(value);(consumers.includes(name)||referencesPackage(text,name)||bins.some(bin=>mentions(text,bin)))&&reasons.push(`package.json field: ${field}`)}}return[...new Set(reasons)]}var CONFIG_FIELDS={husky:["husky"],"lint-staged":["lint-staged"],"simple-git-hooks":["simple-git-hooks"],"config.commitizen":["commitizen"],prettier:["prettier"],eslintConfig:["eslint"],babel:["@babel/core","babel-core"],jest:["jest"],browserslist:["browserslist"],stylelint:["stylelint"]};function referencesPackage(text,name){return mentions(text,name)||mentions(text.replace(/(?:\.\.?\/)*node_modules\//g,""),name)}var UNUSED_REASON="no static imports, script/bin usage, configuration references, stylesheet imports or HTML assets found";function between(catalog,from,to){let preview=from.endsWith(".preview")||to.endsWith(".preview");if(from>to)throw new Error("Stripe API downgrades are not supported");if(!catalog.versions.includes(to))throw new Error(`Stripe API ${to} is absent from the checked-in changelog; regenerate it before publishing`);return catalog.entries.filter(e=>e.version>from&&e.version<=to&&(preview||!e.version.endsWith(".preview")))}var changelog_v1_default={schema:1,source:"https://docs.stripe.com/changelog.md",sha256:"82918706521bb638c359174dea33fb55d1446e66c8fb36c73e247c56893f0602",generatedAt:"2026-10-01T17:47:55.822Z",versions:["2011-06-21","2011-06-28","2011-08-01","2011-09-15","2012-02-23","2012-03-25","2012-06-18","2012-07-09","2012-09-24","2012-10-26","2012-11-07","2013-02-11","2013-02-13","2013-07-05","2013-08-12","2013-08-13","2013-10-29","2013-12-03","2014-01-31","2014-03-13","2014-03-28","2014-05-19","2014-06-13","2014-06-17","2014-07-22","2014-07-26","2014-08-04","2014-08-20","2014-09-08","2014-10-07","2014-11-05","2014-11-20","2014-12-08","2014-12-17","2014-12-22","2015-01-11","2015-01-26","2015-02-10","2015-02-16","2015-02-18","2015-03-24","2015-04-07","2015-06-15","2015-07-07","2015-07-13","2015-07-28","2015-08-07","2015-08-19","2015-09-03","2015-09-08","2015-09-23","2015-10-01","2015-10-12","2015-10-16","2016-02-03","2016-02-19","2016-02-22","2016-02-23","2016-02-29","2016-03-07","2016-06-15","2016-07-06","2016-10-19","2017-01-27","2017-02-14","2017-04-06","2017-05-25","2017-06-05","2017-08-15","2017-12-14","2018-01-23","2018-02-05","2018-02-06","2018-02-28","2018-05-21","2018-07-27","2018-08-23","2018-09-06","2018-09-24","2018-10-31","2018-11-08","2019-02-11","2019-02-19","2019-03-14","2019-05-16","2019-08-14","2019-09-09","2019-10-08","2019-10-17","2019-11-05","2019-12-03","2020-03-02","2020-08-27","2022-08-01","2022-11-15","2023-08-16","2023-10-16","2024-04-10","2024-06-20","2024-09-30.acacia","2024-10-28.acacia","2024-11-20.acacia","2024-12-18.acacia","2025-01-27.acacia","2025-02-24.acacia","2025-03-31.basil","2025-04-30.basil","2025-04-30.preview","2025-05-28.basil","2025-05-28.preview","2025-06-30.basil","2025-06-30.preview","2025-07-30.basil","2025-07-30.preview","2025-08-27.basil","2025-08-27.preview","2025-09-30.clover","2025-09-30.preview","2025-10-29.clover","2025-10-29.preview","2025-11-17.clover","2025-11-17.preview","2025-12-15.clover","2025-12-15.preview","2026-01-28.clover","2026-01-28.preview","2026-02-25.clover","2026-02-25.preview","2026-03-25.dahlia","2026-03-25.preview","2026-04-22.dahlia","2026-04-22.preview","2026-05-27.dahlia","2026-05-27.preview","2026-06-24.dahlia","2026-06-24.preview","2026-07-29.dahlia","2026-07-29.preview","2026-08-26.dahlia","2026-08-26.preview","2026-09-30.endive","2026-09-30.preview"],entries:[{version:"2011-06-21",title:"Errors now produce exceptions for unrecognized API parameters",url:"https://docs.stripe.com/changelog/2011-06-21/exceptions-unrecognized-api-parameters.md",products:"All products",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2011-06-28",title:"Plans no longer include the `identifier` field",url:"https://docs.stripe.com/changelog/2011-06-28/plans-no-longer-identifier-field.md",products:"Billing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2011-08-01",title:"Lists now provide a total count of items and a `data` field",url:"https://docs.stripe.com/changelog/2011-08-01/lists-provide-total-count-data-field.md",products:"All products",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2011-09-15",title:"Cards validate differently when creating tokens",url:"https://docs.stripe.com/changelog/2011-09-15/cards-validate-differently-creating-tokens.md",products:"Elements, Payments",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2012-02-23",title:"Fields with null values are now included in API responses",url:"https://docs.stripe.com/changelog/2012-02-23/fields-null-values-included-api-responses.md",products:"All products",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2012-03-25",title:"Customers no longer include a `next_recurring_charge` field",url:"https://docs.stripe.com/changelog/2012-03-25/customers-no-longer-next-recurring-charge-field.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["customer","charge"],fields:["next_recurring_charge"],params:["next_recurring_charge"],events:[]}},{version:"2012-06-18",title:"Tokens no longer include the `amount` and `currency` properties",url:"https://docs.stripe.com/changelog/2012-06-18/tokens-no-longer-amount-currency-fields.md",products:"Elements, Payments",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2012-07-09",title:"Customers no longer include the `uncaptured` field",url:"https://docs.stripe.com/changelog/2012-07-09/customers-no-longer-uncaptured-field.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2012-09-24",title:"Discounts no longer include an extraneous `id` field",url:"https://docs.stripe.com/changelog/2012-09-24/discounts-no-longer-extraneous-id-field.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2012-10-26",title:"Invoices now include a sublist of invoice line items",url:"https://docs.stripe.com/changelog/2012-10-26/invoices-include-invoice-line-items-sublist.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2012-11-07",title:"Renames the `disputed` field for Charges to `dispute`",url:"https://docs.stripe.com/changelog/2012-11-07/renames-disputed-field-charges-dispute.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["charge","dispute"],fields:[],params:[],events:[]}},{version:"2013-02-11",title:"Failed invoice payments now return an HTTP error",url:"https://docs.stripe.com/changelog/2013-02-11/failed-invoice-payments-return-http-error.md",products:"Invoicing, Billing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2013-02-13",title:"Disputes on charges are now tracked through the `stripe_fee` field and included in the fee total",url:"https://docs.stripe.com/changelog/2013-02-13/disputes-tracked-stripe-fee-field-fee-total.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["charge","dispute"],fields:["stripe_fee"],params:["stripe_fee"],events:[]}},{version:"2013-07-05",title:"Customers now include a `cards` sublist and `default_card` field",url:"https://docs.stripe.com/changelog/2013-07-05/customers-include-cards-sublist-default-card-field.md",products:"Payments, Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["customer"],fields:["default_card"],params:["default_card"],events:[]}},{version:"2013-08-12",title:"Lets the `description` and `email` fields be null on several objects",url:"https://docs.stripe.com/changelog/2013-08-12/allows-description-email-fields-null.md",products:"Payments, Billing, Invoicing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2013-08-13",title:"Fee details have moved from transfers to their corresponding balance transactions",url:"https://docs.stripe.com/changelog/2013-08-13/fee-details-moved-balance-transactions-transfers.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["balance"],fields:[],params:[],events:[]}},{version:"2013-08-13",title:"Fee details have moved from charges to their corresponding balance transactions",url:"https://docs.stripe.com/changelog/2013-08-13/fee-details-moved-balance-transactions.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["charge","balance"],fields:[],params:[],events:[]}},{version:"2013-10-29",title:"Coupons only apply to an invoice\u2019s total balance, no longer applying to zero-cost invoices",url:"https://docs.stripe.com/changelog/2013-10-29/coupons-apply-invoice-total-balance.md",products:"Invoicing, Billing",breaking:!0,category:"api",touches:{resources:["invoice","balance","coupon"],fields:[],params:[],events:[]}},{version:"2013-12-03",title:"Application fee refunds are now proportional to the charged amount",url:"https://docs.stripe.com/changelog/2013-12-03/application-fee-refunds-proportional-charged-amount.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["charge","refund"],fields:[],params:[],events:[]}},{version:"2013-12-03",title:"Application fees now provide an expandable `account` field to obtain user details",url:"https://docs.stripe.com/changelog/2013-12-03/application-fees-provide-expandable-account-field.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2014-01-31",title:"Customers now support multiple subscriptions",url:"https://docs.stripe.com/changelog/2014-01-31/customers-support-multiple-subscriptions.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription","customer"],fields:[],params:[],events:[]}},{version:"2014-01-31",title:"Trial end dates are no longer computed for canceled subscriptions",url:"https://docs.stripe.com/changelog/2014-01-31/trial-end-dates-canceled-subscriptions.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2014-03-13",title:"Renames the statement descriptor field",url:"https://docs.stripe.com/changelog/2014-03-13/renames-statement-descriptor-field-transfers.md",products:"Connect",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2014-03-28",title:"Lists no longer include the `count` field",url:"https://docs.stripe.com/changelog/2014-03-28/lists-no-longer-include-count-field.md",products:"All products",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2014-05-19",title:"Replaces the `account` field on transfers",url:"https://docs.stripe.com/changelog/2014-05-19/renames-account-field-transfers-bank-account.md",products:"Connect, Payouts",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2014-06-13",title:"Renames the `type` field on cards to `brand`",url:"https://docs.stripe.com/changelog/2014-06-13/renames-type-field-cards-brand.md",products:"Payments, Elements",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2014-06-17",title:"Charges now include a sublist of refunds through the `refunds` field",url:"https://docs.stripe.com/changelog/2014-06-17/invoices-include-refunds-sublist-refunds-field.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["invoice","charge","refund"],fields:[],params:[],events:[]}},{version:"2014-07-22",title:"Invoice line items now include subscription plans and quantities",url:"https://docs.stripe.com/changelog/2014-07-22/invoice-line-items-include-subscription-plans-quantities.md",products:"Invoicing, Billing",breaking:!1,category:"api",touches:{resources:["subscription","invoice"],fields:[],params:[],events:[]}},{version:"2014-07-26",title:"Application fees now include a sublist of refunds through the `refunds` field",url:"https://docs.stripe.com/changelog/2014-07-26/application-fees-include-refunds-sublist-refunds-field.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["refund"],fields:[],params:[],events:[]}},{version:"2014-08-04",title:"You can now retrieve balance histories rather than relying on `Transfer` fields",url:"https://docs.stripe.com/changelog/2014-08-04/retrieve-balance-histories-transfer-fields.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["balance"],fields:[],params:[],events:[]}},{version:"2014-08-20",title:"Disputes now include multiple balance transactions",url:"https://docs.stripe.com/changelog/2014-08-20/disputes-include-multiple-balance-transactions.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["dispute","balance"],fields:[],params:[],events:[]}},{version:"2014-08-20",title:"Disputes now provide several new statuses",url:"https://docs.stripe.com/changelog/2014-08-20/disputes-provide-several-new-statuses.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["dispute"],fields:[],params:[],events:[]}},{version:"2014-09-08",title:"Bank Accounts now include a `status` enum that replace multiple fields",url:"https://docs.stripe.com/changelog/2014-09-08/bank-accounts-include-status-enum.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2014-10-07",title:"Creating a Card or Bank Account with a publishable key omits fingerprints in API responses",url:"https://docs.stripe.com/changelog/2014-10-07/create-card-bank-account-omit-fingerprints.md",products:"Elements",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2014-10-07",title:"You can no longer retrieve tokens with publishable keys",url:"https://docs.stripe.com/changelog/2014-10-07/no-longer-retrieve-tokens-publishable-keys.md",products:"Elements",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2014-11-05",title:"Account activation status terms updated for payments and transfers",url:"https://docs.stripe.com/changelog/2014-11-05/renames-charge-account-enabled-fields.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["charge","account"],fields:[],params:[],events:[]}},{version:"2014-11-20",title:"Disputes are now reported as `won` even if the charge is refunded",url:"https://docs.stripe.com/changelog/2014-11-20/disputes-reported-won-refunded-charge.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["charge","refund","dispute"],fields:[],params:[],events:[]}},{version:"2014-11-20",title:"Invoice items now reflect the metadata for their associated subscription, rather than plan",url:"https://docs.stripe.com/changelog/2014-11-20/invoice-items-reflect-subscription-metadata.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription","invoice"],fields:[],params:[],events:[]}},{version:"2014-12-08",title:"Disputes now include an `evidence_details` object for evidence documentation",url:"https://docs.stripe.com/changelog/2014-12-08/disputes-include-evidence-details-object.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["dispute"],fields:["evidence_details"],params:["evidence_details"],events:[]}},{version:"2014-12-17",title:"Creating accounts using the API requires the 2014-12-17 version or newer",url:"https://docs.stripe.com/changelog/2014-12-17/creating-accounts-requires-2014-12-17-version.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2014-12-17",title:"Introduces the `statement_description` field and logic for how charges, invoices, plans, and transfers render statement descriptors",url:"https://docs.stripe.com/changelog/2014-12-17/introduces-statement-description-field-logic.md",products:"Payments, Billing, Invoicing, Connect",breaking:!0,category:"api",touches:{resources:["invoice","charge"],fields:["statement_description"],params:["statement_description"],events:[]}},{version:"2014-12-22",title:"Cards now use both the `unchecked` and `unavailable` values to describe address and CVC checks by issuing banks",url:"https://docs.stripe.com/changelog/2014-12-22/cards-use-unchecked-unavailable-address-cvc-checks.md",products:"Payments",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2014-12-22",title:"Tokens with cards no longer include the `customer` field",url:"https://docs.stripe.com/changelog/2014-12-22/tokens-cards-no-longer-include-customer-field.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2015-01-11",title:"File uploads describe their file type with the simpler `type` field and format",url:"https://docs.stripe.com/changelog/2015-01-11/file-uploads-describe-type-format.md",products:"All products",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2015-01-26",title:"Events with the `previous_attributes` field now only render the differences to objects across updates",url:"https://docs.stripe.com/changelog/2015-01-26/events-previous-attributes-render-differences.md",products:"All products",breaking:!0,category:"api",touches:{resources:["event"],fields:["previous_attributes"],params:["previous_attributes"],events:[]}},{version:"2015-01-26",title:"Subscriptions now only report the timestamp for API or invoice payment failures for the `canceled_at` field",url:"https://docs.stripe.com/changelog/2015-01-26/subscriptions-report-api-invoice-failures.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription","invoice"],fields:["canceled_at"],params:["canceled_at"],events:[]}},{version:"2015-02-10",title:"Dispute statuses now include the `warning_closed` value",url:"https://docs.stripe.com/changelog/2015-02-10/dispute-statuses-include-warning-closed.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["dispute"],fields:["warning_closed"],params:["warning_closed"],events:[]}},{version:"2015-02-10",title:"Transfers now require a sufficient account balance in test mode to better simulate live mode",url:"https://docs.stripe.com/changelog/2015-02-10/transfers-require-sufficient-balance-test-mode.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["balance","account"],fields:[],params:[],events:[]}},{version:"2015-02-16",title:"Renames the `transfer.canceled` event type to `transfer.reversed`",url:"https://docs.stripe.com/changelog/2015-02-16/renames-transfer-canceled-event-transfer-reversed.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2015-02-18",title:"Charges now have a `source` field that accepts a source or card",url:"https://docs.stripe.com/changelog/2015-02-18/charges-have-source-field-accepts-source-card.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["charge"],fields:[],params:[],events:[]}},{version:"2015-02-18",title:"Charges that succeed now have a `succeeded` status",url:"https://docs.stripe.com/changelog/2015-02-18/charges-succeed-have-succeeded-status.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["charge"],fields:[],params:[],events:[]}},{version:"2015-02-18",title:"Customers now have a `source` field that accepts a source or card, and updates related event types",url:"https://docs.stripe.com/changelog/2015-02-18/customers-have-source-field-accepts-source-card.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["customer","event"],fields:[],params:[],events:[]}},{version:"2015-03-24",title:"By default, coupons no longer apply to invoice items with negative amounts",url:"https://docs.stripe.com/changelog/2015-03-24/coupons-no-longer-apply-negative-invoice-items.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["invoice","coupon"],fields:[],params:[],events:[]}},{version:"2015-04-07",title:"Changes the sorting order of `lines` for invoices",url:"https://docs.stripe.com/changelog/2015-04-07/changes-sorting-order-lines-invoices.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2015-04-07",title:"Updates how ending periods are calculated on prorated invoice line items",url:"https://docs.stripe.com/changelog/2015-04-07/updates-ending-periods-prorated-invoice-line-items.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2015-06-15",title:"Accounts on manual payout schedules now throw a new error",url:"https://docs.stripe.com/changelog/2015-06-15/accounts-manual-payout-schedules-throw-error.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["payout","account"],fields:[],params:[],events:[]}},{version:"2015-07-07",title:"Transfers submitted to the bank that haven\u2019t arrived now provide an `in_transit` status",url:"https://docs.stripe.com/changelog/2015-07-07/transfers-in-transit-provide-status.md",products:"Connect",breaking:!0,category:"api",touches:{resources:[],fields:["in_transit"],params:["in_transit"],events:[]}},{version:"2015-07-13",title:"Accounts now include the `verification[disabled_reason]` field to describe why they can\u2019t make transfers or charges",url:"https://docs.stripe.com/changelog/2015-07-13/accounts-include-verification-disabled-reason-field.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["charge","account"],fields:["disabled_reason"],params:["disabled_reason"],events:[]}},{version:"2015-07-28",title:"Transfers that are immediately processed now trigger the `balance.available` event",url:"https://docs.stripe.com/changelog/2015-07-28/transfers-immediately-processed-trigger-balance-available.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["balance","event"],fields:[],params:[],events:[]}},{version:"2015-08-07",title:"Stripe now ensures the `tos_acceptance[date]` field on accounts is a valid timestamp",url:"https://docs.stripe.com/changelog/2015-08-07/stripe-ensures-tos-acceptance-date-valid-timestamp.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:["tos_acceptance"],params:["tos_acceptance"],events:[]}},{version:"2015-08-19",title:"Balance transactions with refunds or disputes now specify the corresponding ID in the `source` field",url:"https://docs.stripe.com/changelog/2015-08-19/balance-transactions-refunds-disputes-specify-source.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["refund","dispute","balance"],fields:[],params:[],events:[]}},{version:"2015-09-03",title:"Requests that reuse idempotency tokens but alter request parameters now throw an error",url:"https://docs.stripe.com/changelog/2015-09-03/reuse-idempotency-tokens-alter-error.md",products:"All products",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2015-09-08",title:"Rate-limited requests now return an HTTP 429 error, no longer including the `rate_limit` field",url:"https://docs.stripe.com/changelog/2015-09-08/rate-limited-requests-return-429-no-rate-limit.md",products:"All products",breaking:!0,category:"api",touches:{resources:[],fields:["rate_limit"],params:["rate_limit"],events:[]}},{version:"2015-09-23",title:"Charges only support an `offset` for list pagination when filtering by source",url:"https://docs.stripe.com/changelog/2015-09-23/charges-support-offset-list-pagination-source.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["charge"],fields:[],params:[],events:[]}},{version:"2015-09-23",title:"The `charge` field now always reflects the latest charge on invoices",url:"https://docs.stripe.com/changelog/2015-09-23/invoice-charge-field-reflect-latest-charge.md",products:"Invoicing, Billing",breaking:!0,category:"api",touches:{resources:["invoice","charge"],fields:[],params:[],events:[]}},{version:"2015-09-23",title:"Invoices no longer include the `payment` property",url:"https://docs.stripe.com/changelog/2015-09-23/invoices-no-longer-include-payment-field.md",products:"Invoicing, Billing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2015-09-23",title:"Listing all charges now includes payments from all funding sources",url:"https://docs.stripe.com/changelog/2015-09-23/listing-charges-includes-payments-funding-sources.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["charge"],fields:[],params:[],events:[]}},{version:"2015-10-01",title:"Bank account information renamed to external accounts on user profiles",url:"https://docs.stripe.com/changelog/2015-10-01/accounts-include-external-accounts-field.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2015-10-01",title:"Accounts now include an `external_accounts` field",url:"https://docs.stripe.com/changelog/2015-10-01/accounts-specify-additional-fields-bank-accounts.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:["external_accounts"],params:["external_accounts"],events:[]}},{version:"2015-10-12",title:"Using invalid parameters to create cards or bank accounts for tokens, sources, or external bank accounts now throws an HTTP 400 error",url:"https://docs.stripe.com/changelog/2015-10-12/invalid-parameters-throw-400-error.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2015-10-16",title:"Creating or updating customers must now include a plan if a tax percentage is specified",url:"https://docs.stripe.com/changelog/2015-10-16/customers-must-include-plan-tax-percentage.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["customer","tax"],fields:[],params:[],events:[]}},{version:"2016-02-03",title:"Accounts now only show country-specific subfields for the `legal_entity` field",url:"https://docs.stripe.com/changelog/2016-02-03/accounts-only-show-country-fields-legal-entity.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:["legal_entity"],params:["legal_entity"],events:[]}},{version:"2016-02-19",title:"Renames the `name` field on Bank Accounts to `account_holder_name`",url:"https://docs.stripe.com/changelog/2016-02-19/renames-name-field-bank-accounts-account-holder-name.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["account"],fields:["account_holder_name"],params:["account_holder_name"],events:[]}},{version:"2016-02-22",title:"You can no longer add more than 250 invoice items to an invoice",url:"https://docs.stripe.com/changelog/2016-02-22/no-more-than-250-invoice-items.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2016-02-23",title:"Orders that are paid or fulfilled, and then become canceled or returned, now automatically refund associated charges",url:"https://docs.stripe.com/changelog/2016-02-23/orders-paid-fulfilled-refund-associated-charges.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["charge","refund"],fields:[],params:[],events:[]}},{version:"2016-02-29",title:"Creating or updating an account now validates the postal code for its legal entity",url:"https://docs.stripe.com/changelog/2016-02-29/creating-updating-account-validates-postal-code.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2016-03-07",title:"Supported currencies are defined on the country spec for an account\u2019s country",url:"https://docs.stripe.com/changelog/2016-03-07/supported-currencies-defined-country-spec.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2016-06-15",title:"Deactivating a product no longer automatically deactivates its SKUs",url:"https://docs.stripe.com/changelog/2016-06-15/deactivating-product-deactivates-skus.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["product"],fields:[],params:[],events:[]}},{version:"2016-07-06",title:"Filter lists of subscriptions for canceled subscriptions",url:"https://docs.stripe.com/changelog/2016-07-06/filter-canceled-subscriptions-retrieve-individually.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2016-10-19",title:"Using insufficient permissions to make API requests now throws an HTTP 403 error",url:"https://docs.stripe.com/changelog/2016-10-19/insufficient-permissions-throw-403-error.md",products:"All products",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2017-01-27",title:"Balance transactions no longer include the `sourced_transfers` field",url:"https://docs.stripe.com/changelog/2017-01-27/balance-transactions-no-longer-include-sourced-transfers.md",products:"Payments, Connect",breaking:!0,category:"api",touches:{resources:["balance"],fields:["sourced_transfers"],params:["sourced_transfers"],events:[]}},{version:"2017-02-14",title:"Charges now specify the ID for the dispute associated with a transaction, which can be expanded",url:"https://docs.stripe.com/changelog/2017-02-14/charges-specify-dispute-associated-transaction.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["charge","dispute"],fields:[],params:[],events:[]}},{version:"2017-02-14",title:"Charges now specify the ID for the rule blocking a transaction, which can be expanded",url:"https://docs.stripe.com/changelog/2017-02-14/charges-specify-rule-blocking-transaction.md",products:"Payments, Radar",breaking:!0,category:"api",touches:{resources:["charge"],fields:[],params:[],events:[]}},{version:"2017-04-06",title:"Transfers are now split into payouts and transfers",url:"https://docs.stripe.com/changelog/2017-04-06/transfers-split-payouts-transfers.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2017-05-25",title:"Accounts must now specify one of three types (Standard, Express, or Custom)",url:"https://docs.stripe.com/changelog/2017-05-25/accounts-specify-type-standard-express-custom.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2017-05-25",title:"Events for Connect now specify the originating connected account using the `account` field",url:"https://docs.stripe.com/changelog/2017-05-25/events-connect-specify-originating-account.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account","event"],fields:[],params:[],events:[]}},{version:"2017-05-25",title:"Events with the `previous_attributes` field now render the complete affected sub-array",url:"https://docs.stripe.com/changelog/2017-05-25/events-previous-attributes-render-complete-sub-array.md",products:"All products",breaking:!0,category:"api",touches:{resources:["event"],fields:["previous_attributes"],params:["previous_attributes"],events:[]}},{version:"2017-05-25",title:"The `request` field of the `Events` object now specifies both the request ID and idempotency key",url:"https://docs.stripe.com/changelog/2017-05-25/events-specify-request-id-idempotency-key.md",products:"All products",breaking:!0,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2017-06-05",title:"Accounts can now specify why an account isn\u2019t enabled with the new reason `under_review`",url:"https://docs.stripe.com/changelog/2017-06-05/accounts-specify-under-review-reason.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:["under_review"],params:["under_review"],events:[]}},{version:"2017-08-15",title:"Sources can now specify that an authentication redirect isn\u2019t required",url:"https://docs.stripe.com/changelog/2017-08-15/sources-specify-no-authentication-redirect-required.md",products:"Payments",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2017-12-14",title:"Invoice line items now must always set a `description`",url:"https://docs.stripe.com/changelog/2017-12-14/invoice-line-items-must-set-description.md",products:"Invoicing, Billing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2017-12-14",title:"Invoice payment failures now return a `card_error` when a charge is declined",url:"https://docs.stripe.com/changelog/2017-12-14/invoice-payment-failures-return-card-error.md",products:"Invoicing, Billing",breaking:!0,category:"api",touches:{resources:["invoice","charge"],fields:["card_error"],params:["card_error"],events:[]}},{version:"2018-01-23",title:"Connect platforms can identify reused card or bank accounts across connected accounts as they now will share the same fingerprint",url:"https://docs.stripe.com/changelog/2018-01-23/connect-platforms-identify-reused-cards-bank-accounts.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2018-02-05",title:"Free plans with prorations now produce zero-dollar invoices",url:"https://docs.stripe.com/changelog/2018-02-05/free-plans-with-prorations-produce-zero-dollar-invoices.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2018-02-05",title:"Plans now link to individual products, with several fields moving to the product resource",url:"https://docs.stripe.com/changelog/2018-02-05/plans-link-individual-products-several-fields-moved.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["product"],fields:[],params:[],events:[]}},{version:"2018-02-05",title:"Products now require a `type` field, differentiating their use with order SKUs or subscriptions and plans",url:"https://docs.stripe.com/changelog/2018-02-05/products-require-type-field-differentiating-use.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["subscription","product"],fields:[],params:[],events:[]}},{version:"2018-02-05",title:"Subscriptions can now delay the first full invoice to a future date (and optionally include a free trial)",url:"https://docs.stripe.com/changelog/2018-02-05/subscriptions-delay-first-full-invoice-future-date.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription","invoice"],fields:[],params:[],events:[]}},{version:"2018-02-06",title:"Sources now provide a `recommended` value when the issuer advises using 3D Secure",url:"https://docs.stripe.com/changelog/2018-02-06/sources-provide-recommended-use-3d-secure.md",products:"Payments",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2018-02-28",title:"Updating a canceled subscription on a future date no longer resets its status",url:"https://docs.stripe.com/changelog/2018-02-28/updating-canceled-subscription-no-longer-resets-status.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2018-05-21",title:"Changing a subscription to a new plan with a trial now extends the trial period",url:"https://docs.stripe.com/changelog/2018-05-21/changing-subscription-new-plan-extends-trial.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2018-05-21",title:"Invoice line items now have unique IDs and can\u2019t be used in place of a subscription",url:"https://docs.stripe.com/changelog/2018-05-21/invoice-line-items-have-unique-ids-cannot-use-subscription.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["subscription","invoice"],fields:[],params:[],events:[]}},{version:"2018-05-21",title:"Products no longer embed lists of SKUs",url:"https://docs.stripe.com/changelog/2018-05-21/products-no-longer-embed-sku-lists.md",products:"Checkout",breaking:!0,category:"api",touches:{resources:["product"],fields:[],params:[],events:[]}},{version:"2018-05-21",title:"Subscriptions now default to not defining their trial periods depending on a plan",url:"https://docs.stripe.com/changelog/2018-05-21/subscriptions-default-no-trial-period-plan.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2018-05-21",title:"Coupons, SKUs, customers, products, and plans now limit the valid characters for IDs",url:"https://docs.stripe.com/changelog/2018-05-21/valid-characters-ids-coupons-skus-customers-products-plans.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["customer","product","coupon"],fields:[],params:[],events:[]}},{version:"2018-07-27",title:"Coupons now use floats rather than integers to specify `percent_off`",url:"https://docs.stripe.com/changelog/2018-07-27/coupons-use-floats-specify-percent-off.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["coupon"],fields:["percent_off"],params:["percent_off"],events:[]}},{version:"2018-07-27",title:"Ending a subscription trial now uses the timestamp of that API request",url:"https://docs.stripe.com/changelog/2018-07-27/ending-subscription-trial-uses-request-timestamp.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2018-07-27",title:"Stripe now validates email addresses when creating or updating customers",url:"https://docs.stripe.com/changelog/2018-07-27/stripe-validates-email-addresses-customers.md",products:"All products",breaking:!0,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2018-07-27",title:"Subscriptions no longer support modifying the `source` parameter directly",url:"https://docs.stripe.com/changelog/2018-07-27/subscriptions-no-longer-support-modifying-source.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2018-08-23",title:"Customers now provide a `tax_info` object with their tax ID details",url:"https://docs.stripe.com/changelog/2018-08-23/customers-provide-tax-info-object.md",products:"All products",breaking:!0,category:"api",touches:{resources:["customer","tax"],fields:["tax_info"],params:["tax_info"],events:[]}},{version:"2018-08-23",title:"Renames the `amount` field for plan tiers to `unit_amount`",url:"https://docs.stripe.com/changelog/2018-08-23/renames-amount-field-plan-tiers-unit-amount.md",products:"Billing",breaking:!0,category:"api",touches:{resources:[],fields:["unit_amount"],params:["unit_amount"],events:[]}},{version:"2018-08-23",title:"A subscription\u2019s ending period can no longer be configured while canceling it",url:"https://docs.stripe.com/changelog/2018-08-23/subscription-ending-period-cannot-configured-canceling.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2018-09-06",title:"SKU values no longer need to be unique",url:"https://docs.stripe.com/changelog/2018-09-06/sku-values-no-longer-need-unique.md",products:"Checkout",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2018-09-24",title:"Renames the `FileUpload` object to `Files`, which now require secret keys to download files",url:"https://docs.stripe.com/changelog/2018-09-24/file-uploads-renamed-files-require-secret-keys.md",products:"All products",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2018-10-31",title:"Descriptions for customers now have a character limit",url:"https://docs.stripe.com/changelog/2018-10-31/descriptions-customers-character-limit.md",products:"All products",breaking:!0,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2018-10-31",title:"Descriptions for invoice line items now have a character limit",url:"https://docs.stripe.com/changelog/2018-10-31/descriptions-invoice-line-items-character-limit.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2018-10-31",title:"The `billing_reason` of the first invoice of a subscription is now `subscription_create`",url:"https://docs.stripe.com/changelog/2018-10-31/first-invoice-subscription-billing-reason-subscription-create.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["subscription","invoice"],fields:["billing_reason","subscription_create"],params:["billing_reason","subscription_create"],events:[]}},{version:"2018-10-31",title:"Product names now have a character limit",url:"https://docs.stripe.com/changelog/2018-10-31/names-products-character-limit.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["product"],fields:[],params:[],events:[]}},{version:"2018-11-08",title:"Invoices now specify their automatic collection behavior using the `auto_advance` field",url:"https://docs.stripe.com/changelog/2018-11-08/invoices-specify-auto-advance-field.md",products:"Invoicing, Billing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:["auto_advance"],params:["auto_advance"],events:[]}},{version:"2018-11-08",title:"Replaces the `forgiven` field with a new `uncollectible` status for invoices",url:"https://docs.stripe.com/changelog/2018-11-08/mark-invoice-uncollectible-instead-forgiven.md",products:"Invoicing, Billing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2018-11-08",title:"One-off Invoices no longer automatically collect payment by default",url:"https://docs.stripe.com/changelog/2018-11-08/one-off-invoices-no-longer-auto-collect-payment.md",products:"Invoicing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2018-11-08",title:"Renames an invoice error code to `invoice_already_finalized`",url:"https://docs.stripe.com/changelog/2018-11-08/renames-invoice-error-code-invoice-already-finalized.md",products:"Invoicing, Billing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:["invoice_already_finalized"],params:["invoice_already_finalized"],events:[]}},{version:"2018-11-08",title:"Includes several changes for users of the Payment Intents API private beta",url:"https://docs.stripe.com/changelog/2018-11-08/several-changes-payment-intents-private-beta.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["payment_intent"],fields:[],params:[],events:[]}},{version:"2019-02-11",title:"Renames the `allowed_source_types` field for `sources` to `payment_method_types`",url:"https://docs.stripe.com/changelog/2019-02-11/renames-allowed-source-types-payment-method-types.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["payment_method"],fields:["allowed_source_types","payment_method_types"],params:["allowed_source_types","payment_method_types"],events:[]}},{version:"2019-02-11",title:"Renames the `authorize_with_url` field for Payment Intents to `redirect_to_url`",url:"https://docs.stripe.com/changelog/2019-02-11/renames-authorize-with-url-redirect-to-url.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["payment_intent"],fields:["authorize_with_url","redirect_to_url"],params:["authorize_with_url","redirect_to_url"],events:[]}},{version:"2019-02-11",title:"Renames the `next_source_action` field for Payment Intents to `next_action`",url:"https://docs.stripe.com/changelog/2019-02-11/renames-next-source-action-next-action.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["payment_intent"],fields:["next_source_action","next_action"],params:["next_source_action","next_action"],events:[]}},{version:"2019-02-11",title:"Renames the `save_source_to_customer` field for sources to `save_payment_method`",url:"https://docs.stripe.com/changelog/2019-02-11/renames-save-source-to-customer-save-payment-method.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["customer","payment_method"],fields:["save_source_to_customer","save_payment_method"],params:["save_source_to_customer","save_payment_method"],events:[]}},{version:"2019-02-11",title:"Renames several statuses for PaymentIntents",url:"https://docs.stripe.com/changelog/2019-02-11/renames-several-statuses-payment-intents.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["payment_intent"],fields:[],params:[],events:[]}},{version:"2019-02-19",title:"Accounts no longer provide a `keys` field. Platforms should use their own API key to authenticate as their connected accounts",url:"https://docs.stripe.com/changelog/2019-02-19/accounts-no-longer-provide-keys-field.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2019-02-19",title:"Accounts in the US now require specifying capabilities at creation time",url:"https://docs.stripe.com/changelog/2019-02-19/accounts-us-require-specifying-capabilities-creation.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2019-02-19",title:"Several fields describing an account\u2019s business details have moved to the `business_profile` subhash",url:"https://docs.stripe.com/changelog/2019-02-19/business-details-moved-business-profile-object.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:["business_profile"],params:["business_profile"],events:[]}},{version:"2019-02-19",title:"Changes statement descriptor behaviors for card payments created with Charges",url:"https://docs.stripe.com/changelog/2019-02-19/changes-statement-descriptor-behaviors-charges.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["charge"],fields:[],params:[],events:[]}},{version:"2019-02-19",title:"Renames the `business_id_number` for an account\u2019s legal entity to `business_registration_number`",url:"https://docs.stripe.com/changelog/2019-02-19/renames-business-id-number-business-registration-number.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:["business_id_number","business_registration_number"],params:["business_id_number","business_registration_number"],events:[]}},{version:"2019-02-19",title:"Several account fields have been refactored to better describe legal entity, verification status and requirements, and configurable settings",url:"https://docs.stripe.com/changelog/2019-02-19/several-fields-accounts-refactored.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2019-02-19",title:"Verification of accounts or persons now supports uploading both front and back sides",url:"https://docs.stripe.com/changelog/2019-02-19/verification-accounts-persons-supports-front-back.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2019-03-14",title:"Invoices now provide timestamps for each state transition",url:"https://docs.stripe.com/changelog/2019-03-14/invoices-provide-timestamps-state-transitions.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2019-03-14",title:"Invoices now specify when they\u2019re finalized alongside other status transitions",url:"https://docs.stripe.com/changelog/2019-03-14/invoices-specify-finalized-alongside-status-transitions.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2019-03-14",title:"Renames `application_fee` on invoices to `application_fee_amount`",url:"https://docs.stripe.com/changelog/2019-03-14/renames-application-fee-invoices-application-fee-amount.md",products:"Connect, Invoicing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:["application_fee","application_fee_amount"],params:["application_fee","application_fee_amount"],events:[]}},{version:"2019-03-14",title:"Renames the `date` field for invoices to `created`",url:"https://docs.stripe.com/changelog/2019-03-14/renames-date-field-invoices-created.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2019-03-14",title:"Subscriptions are now successfully created even if the first payment fails",url:"https://docs.stripe.com/changelog/2019-03-14/subscriptions-successfully-created-first-payment-fails.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2019-05-16",title:"Bank pull payments no longer expose internal system refunds on failure",url:"https://docs.stripe.com/changelog/2019-05-16/renames-platform-payments-capability-card-payments.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["refund"],fields:[],params:[],events:[]}},{version:"2019-08-14",title:"Configuring a person as an account opener no longer automatically sets them as an executive",url:"https://docs.stripe.com/changelog/2019-08-14/accounts-many-countries-require-specifying-capabilities.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2019-08-14",title:"Renames the `platform_payments` capability for accounts to `card_payments`, requiring the manual specification of the added `transfers` capability",url:"https://docs.stripe.com/changelog/2019-08-14/configuring-person-account-opener-no-longer-sets-executive.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:["platform_payments","card_payments"],params:["platform_payments","card_payments"],events:[]}},{version:"2019-09-09",title:"Accounts in many countries now require specifying capabilities at creation time",url:"https://docs.stripe.com/changelog/2019-09-09/2019-09-09-1.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2019-09-09",title:"Adds new `details_code` values to person document verification",url:"https://docs.stripe.com/changelog/2019-09-09/adds-detail-code-person-document-verification.md",products:"Connect",breaking:!0,category:"api",touches:{resources:[],fields:["details_code"],params:["details_code"],events:[]}},{version:"2019-10-08",title:"Renames a `Person` object relationship attribute",url:"https://docs.stripe.com/changelog/2019-10-08/renames-person-object-relationship-attribute.md",products:"Connect",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2019-10-17",title:"The `due_date` property is always null on auto-billed invoices",url:"https://docs.stripe.com/changelog/2019-10-17/invoice-due-date-null.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:["due_date"],params:["due_date"],events:[]}},{version:"2019-10-17",title:"Renames `account_balance` to `balance` on `Customer` object",url:"https://docs.stripe.com/changelog/2019-10-17/renames-account-balance-customer-object.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["customer","balance","account"],fields:["account_balance"],params:["account_balance"],events:[]}},{version:"2019-10-17",title:"Renames `billing` to `collection_method` on invoices, subscriptions, and subscription schedules",url:"https://docs.stripe.com/changelog/2019-10-17/renames-billing-attribute.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["subscription","invoice"],fields:["collection_method"],params:["collection_method"],events:[]}},{version:"2019-10-17",title:"Replaces the subscription `start` field with `start_date`",url:"https://docs.stripe.com/changelog/2019-10-17/replaces-subscription-start-field.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:["start_date"],params:["start_date"],events:[]}},{version:"2019-10-17",title:"Renames and updates subscription schedule renewal properties",url:"https://docs.stripe.com/changelog/2019-10-17/updates-subscription-renewal-properties.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2019-11-05",title:"Adds requirement for `requested_capabilities` on custom account creation",url:"https://docs.stripe.com/changelog/2019-11-05/adds-requested-capabilities-requirement-custom-account.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:["requested_capabilities"],params:["requested_capabilities"],events:[]}},{version:"2019-11-05",title:"Nested subscription schedule settings under `default_settings`",url:"https://docs.stripe.com/changelog/2019-11-05/nests-subscription-schedule-settings.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:["default_settings"],params:["default_settings"],events:[]}},{version:"2019-12-03",title:"Customer balances are now returned when voiding invoices",url:"https://docs.stripe.com/changelog/2019-12-03/customer-balances-returned-voided-invoices.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["customer","invoice","balance"],fields:[],params:[],events:[]}},{version:"2019-12-03",title:"New requirement for `out_of_band_amount` when creating post-payment credit notes",url:"https://docs.stripe.com/changelog/2019-12-03/post-payment-credit-note-requirement.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:[],fields:["out_of_band_amount"],params:["out_of_band_amount"],events:[]}},{version:"2019-12-03",title:"Removes deprecated tax information fields from the `Customer` object",url:"https://docs.stripe.com/changelog/2019-12-03/removes-deprecated-tax-information-fields.md",products:"All products",breaking:!0,category:"api",touches:{resources:["customer","tax"],fields:[],params:[],events:[]}},{version:"2019-12-03",title:"Standardizes invoice line item IDs",url:"https://docs.stripe.com/changelog/2019-12-03/standardizes-invoice-line-item-ids.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2020-03-02",title:"Invoices can now be numbered sequentially across your account",url:"https://docs.stripe.com/changelog/2020-03-02/sequentially-number-invoices.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["invoice","account"],fields:[],params:[],events:[]}},{version:"2020-08-27",title:"Adds new error codes to the Accounts, Persons, and Capabilities APIs",url:"https://docs.stripe.com/changelog/2020-08-27/adds-error-codes-accounts-persons-capabilities.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2020-08-27",title:"Customer sources are no longer auto-expanded by default",url:"https://docs.stripe.com/changelog/2020-08-27/deprecates-auto-expansion-customer-sources.md",products:"Payments, Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2020-08-27",title:"Customer subscriptions are no longer auto-expanded by default",url:"https://docs.stripe.com/changelog/2020-08-27/deprecates-auto-expansion-customer-subscriptions.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription","customer"],fields:[],params:[],events:[]}},{version:"2020-08-27",title:"Plan tiers are no longer auto-expanded by default",url:"https://docs.stripe.com/changelog/2020-08-27/deprecates-auto-expansion-plan-tiers.md",products:"Billing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2020-08-27",title:"Tax IDs are no longer auto-expanded on the `Customer` object",url:"https://docs.stripe.com/changelog/2020-08-27/deprecates-auto-expansion-tax-id-customer.md",products:"All products",breaking:!0,category:"api",touches:{resources:["customer","tax"],fields:[],params:[],events:[]}},{version:"2020-08-27",title:"Deprecates subscription `prorate` and `subscription_prorate` parameters",url:"https://docs.stripe.com/changelog/2020-08-27/deprecates-prorate-parameters-subscriptions.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:["subscription_prorate"],params:["subscription_prorate"],events:[]}},{version:"2020-08-27",title:"Formats requirements for key persons associated with accounts",url:"https://docs.stripe.com/changelog/2020-08-27/formats-requirements-key-persons-accounts.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2020-08-27",title:"Removes the `display_items` property from Checkout Sessions",url:"https://docs.stripe.com/changelog/2020-08-27/removes-display-items-checkout-session.md",products:"Checkout",breaking:!0,category:"api",touches:{resources:["checkout"],fields:["display_items"],params:["display_items"],events:[]}},{version:"2020-08-27",title:"Removes the `tax_percent` attribute",url:"https://docs.stripe.com/changelog/2020-08-27/removes-tax-percent-attribute.md",products:"Checkout, Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["tax"],fields:["tax_percent"],params:["tax_percent"],events:[]}},{version:"2020-08-27",title:"Renames event type that triggers on automatic updates",url:"https://docs.stripe.com/changelog/2020-08-27/renames-automatically-updated-event-type.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2020-08-27",title:"Renames `phases` attributes in subscription schedules",url:"https://docs.stripe.com/changelog/2020-08-27/renames-phases-attributes-subscription-schedules.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2020-08-27",title:"Updates to 3D Secure details in `Charge` object",url:"https://docs.stripe.com/changelog/2020-08-27/updates-3d-scure-charge-object.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["charge"],fields:[],params:[],events:[]}},{version:"2022-08-01",title:"Adds 3D Secure exemption status to card charges",url:"https://docs.stripe.com/changelog/2022-08-01/adds-3d-secure-exemption-charges.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["charge"],fields:[],params:[],events:[]}},{version:"2022-08-01",title:"Adds `design_rejected` as a possible cancellation reason for issued cards",url:"https://docs.stripe.com/changelog/2022-08-01/adds-design-rejected-value-cards.md",products:"Issuing",breaking:!0,category:"api",touches:{resources:[],fields:["design_rejected"],params:["design_rejected"],events:[]}},{version:"2022-08-01",title:"Default customer creation in Checkout Session payment mode changed to `if_required`",url:"https://docs.stripe.com/changelog/2022-08-01/default-customer-creation-checkout-session.md",products:"Checkout",breaking:!0,category:"api",touches:{resources:["checkout","customer"],fields:["if_required"],params:["if_required"],events:[]}},{version:"2022-08-01",title:"Deferred PaymentIntent creation in Checkout Session payment mode",url:"https://docs.stripe.com/changelog/2022-08-01/deferred-paymentintent-checkout-session.md",products:"Checkout, Payments",breaking:!0,category:"api",touches:{resources:["checkout","payment_intent"],fields:[],params:[],events:[]}},{version:"2022-08-01",title:"New endpoints for managing a physical card\u2019s shipping status in test mode",url:"https://docs.stripe.com/changelog/2022-08-01/endpoints-shipping-status-cards.md",products:"Issuing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2022-08-01",title:"New error code for invalid terms of service acceptance in Accounts API",url:"https://docs.stripe.com/changelog/2022-08-01/error-code-invalid-tos-accounts.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2022-08-01",title:"Removes the `default_currency` attribute from the `Customer` object",url:"https://docs.stripe.com/changelog/2022-08-01/removes-default-currency-customer-object.md",products:"All products",breaking:!0,category:"api",touches:{resources:["customer"],fields:["default_currency"],params:["default_currency"],events:[]}},{version:"2022-08-01",title:"Removes the `include_and_require` value when creating invoices",url:"https://docs.stripe.com/changelog/2022-08-01/removes-include-require-value-invoices.md",products:"Invoicing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:["include_and_require"],params:["include_and_require"],events:[]}},{version:"2022-08-01",title:"Removes the `setup_intent` property from Checkout Sessions in subscription mode",url:"https://docs.stripe.com/changelog/2022-08-01/removes-setupintent-checkout-session.md",products:"Checkout",breaking:!0,category:"api",touches:{resources:["checkout","subscription","setup_intent"],fields:["setup_intent"],params:["setup_intent"],events:[]}},{version:"2022-08-01",title:"Removes the shipping rate parameter from Create Checkout Session endpoint",url:"https://docs.stripe.com/changelog/2022-08-01/removes-shipping-rate-create-checkout-session.md",products:"Checkout",breaking:!0,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2022-08-01",title:"Removes the subscription data parameter from the Create Checkout Session endpoint",url:"https://docs.stripe.com/changelog/2022-08-01/removes-subscription-data-create-checkout-session.md",products:"Checkout, Billing",breaking:!0,category:"api",touches:{resources:["checkout","subscription"],fields:[],params:[],events:[]}},{version:"2022-08-01",title:"Replaces line item parameters from the Create Checkout Session endpoint",url:"https://docs.stripe.com/changelog/2022-08-01/replaces-line-item-create-checkout-session.md",products:"Checkout",breaking:!0,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2022-08-01",title:"Updates Checkout Session shipping properties",url:"https://docs.stripe.com/changelog/2022-08-01/updates-shipping-property-checkout-session.md",products:"Checkout",breaking:!0,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2022-11-15",title:"Adds new decline codes to the PaymentIntent and PaymentMethod APIs",url:"https://docs.stripe.com/changelog/2022-11-15/adds-decline-codes-paymentintent-paymentmethod.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["payment_intent","payment_method"],fields:[],params:[],events:[]}},{version:"2022-11-15",title:"Adds new decline codes to the SetupIntent API",url:"https://docs.stripe.com/changelog/2022-11-15/adds-decline-codes-setupintent.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["setup_intent"],fields:[],params:[],events:[]}},{version:"2022-11-15",title:"Adds a new structure error code to the Accounts API",url:"https://docs.stripe.com/changelog/2022-11-15/adds-structure-error-code-accounts.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2022-11-15",title:"The `Charges` object no longer auto-expands refunds by default",url:"https://docs.stripe.com/changelog/2022-11-15/deprecates-charges-auto-expand.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["charge","refund"],fields:[],params:[],events:[]}},{version:"2022-11-15",title:"Removes the `charges` attribute from the `PaymentIntent` object",url:"https://docs.stripe.com/changelog/2022-11-15/removes-charges-attribute-paymentintent.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["payment_intent","charge"],fields:[],params:[],events:[]}},{version:"2023-08-16",title:"Adds new director verification error codes to the Accounts API",url:"https://docs.stripe.com/changelog/2023-08-16/adds-director-verfication-error-accounts.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2023-08-16",title:"Enables automatic payment methods by default for PaymentIntents and SetupIntents",url:"https://docs.stripe.com/changelog/2023-08-16/automatic-payment-methods.md",products:"Payments, Elements",breaking:!0,category:"api",touches:{resources:["payment_intent","payment_method","setup_intent"],fields:[],params:[],events:[]}},{version:"2023-08-16",title:"Adds specific error codes for failed Klarna payments",url:"https://docs.stripe.com/changelog/2023-08-16/klarna-payment-failure-error-code.md",products:"Payments, Checkout",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2023-08-16",title:"One-time payments in Checkout Sessions support no-cost orders",url:"https://docs.stripe.com/changelog/2023-08-16/no-cost-orders-checkout-session.md",products:"Checkout",breaking:!0,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2023-08-16",title:"Platform-scope rendering for select PaymentMethod fingerprints",url:"https://docs.stripe.com/changelog/2023-08-16/platform-scope-rendering-payment-method.md",products:"Connect, Payments, Billing",breaking:!0,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2023-10-16",title:"Adds new account requirement error codes to the Accounts API",url:"https://docs.stripe.com/changelog/2023-10-16/adds-account-requirement-error-accounts.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2023-10-16",title:"Auto-populates the statement descriptor and prefix in the Accounts API",url:"https://docs.stripe.com/changelog/2023-10-16/auto-populates-statement-descriptor-accounts.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2024-04-10",title:"Makes automatic async the default capture method for PaymentIntents when not specified",url:"https://docs.stripe.com/changelog/2024-04-10/automatic-sync-default-paymentintents.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["payment_intent"],fields:[],params:[],events:[]}},{version:"2024-04-10",title:"Renames the `features` attribute of the `Product` object",url:"https://docs.stripe.com/changelog/2024-04-10/renames-features-attribute-product-object.md",products:"Invoicing, Billing",breaking:!0,category:"api",touches:{resources:["product"],fields:[],params:[],events:[]}},{version:"2024-04-10",title:"Renames the `rendering_options` attribute for invoices to `rendering`",url:"https://docs.stripe.com/changelog/2024-04-10/renames-rendering-options-invoicing.md",products:"Invoicing, Billing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:["rendering_options"],params:["rendering_options"],events:[]}},{version:"2024-06-20",title:"Adds enum values for disabled reasons",url:"https://docs.stripe.com/changelog/2024-06-20/adds-enum-disabled-reasons-capabilities.md",products:"Connect",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-06-20",title:"Adds enum values for fuel units",url:"https://docs.stripe.com/changelog/2024-06-20/adds-enum-fuel-units-issuing.md",products:"Issuing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-06-20",title:"Adds new enum values for request history reasons",url:"https://docs.stripe.com/changelog/2024-06-20/adds-enum-request-history-reasons-issuing.md",products:"Issuing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-06-20",title:"Deprecates `alphanumeric_id` for Issuing Authorization",url:"https://docs.stripe.com/changelog/2024-06-20/deprecates-alphanumeric-id-issuing.md",products:"Issuing",breaking:!0,category:"api",touches:{resources:[],fields:["alphanumeric_id"],params:["alphanumeric_id"],events:[]}},{version:"2024-06-20",title:"Deprecates the `bank_transfer_payments` capability type in favor of newer capability types",url:"https://docs.stripe.com/changelog/2024-06-20/deprecates-bank-transfer-payments-capabilities.md",products:"Connect",breaking:!0,category:"api",touches:{resources:[],fields:["bank_transfer_payments"],params:["bank_transfer_payments"],events:[]}},{version:"2024-06-20",title:"Removes undocumented fleet fields",url:"https://docs.stripe.com/changelog/2024-06-20/removes-undocumented-fleet-fields-issuing.md",products:"Issuing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-06-20",title:"Removes undocumented fuel fields",url:"https://docs.stripe.com/changelog/2024-06-20/removes-undocumented-fuel-fields-issuing.md",products:"Issuing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-06-20",title:"Renames a `fuel` attribute of the `Authorization` object",url:"https://docs.stripe.com/changelog/2024-06-20/renames-fuel-attribute-authorization-object.md",products:"Issuing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-06-20",title:"Renames a `purchase_details` attribute of the `Transaction` object",url:"https://docs.stripe.com/changelog/2024-06-20/renames-purchase-details-transaction-object.md",products:"Issuing",breaking:!0,category:"api",touches:{resources:[],fields:["purchase_details"],params:["purchase_details"],events:[]}},{version:"2024-09-30.acacia",title:"Adds additional reasonable defaulting to the Account Link API v1",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/account-link-api-default-fields-v1.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds risk verification details for connected accounts",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/additional-risk-verification-details-connected-accounts.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds billing alert resources and endpoints",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/adds-billing-alert-resources-endpoints.md",products:"Billing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds Girocard as a PaymentMethod brand and network",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/adds-girocard-paymentmethod-brand-network.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds wallet details for `card_present` Charges and Payment Methods",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/adds-offline-details-card-present-paymentmethods.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:["payment_method","charge"],fields:["card_present"],params:["card_present"],events:[]}},{version:"2024-09-30.acacia",title:"Adds Croatian Personal Identification Number to supported Tax IDs",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/adds-tax-id-type-hr_oib-croatian-personal-id-number.md",products:"Billing, Checkout, Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:["hr_oib"],params:["hr_oib"],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for Affirm transaction IDs",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/affirm-transaction-id-dashboard.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for retrieving thin events",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/api-v2-thin-events.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds option to automatically finalize invoices",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/automatically-finalizes-at-invoice.md",products:"Invoicing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds an event for triggered billing alerts",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/billing-alert-trigger-event.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for listening to triggered billing alerts",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/billing-alert-webhook-listener.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["webhook"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds an Alerts API for usage-based billing",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/billing-alerts-api.md",products:"Billing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds contextual filters to billing alerts",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/billing-alerts-contextualizing-filters.md",products:"Billing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for subscriptions and subscription items to billing alerts",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/billing-alerts-subscription-items-subscriptions.md",products:"Billing, Invoicing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds webhook events for when an invoice is due or overdue",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/billing-due-date-webhooks.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["invoice","event","webhook"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for using the Multibanco payment method with billing",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/billing-mutlibanco-support.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Makes it optional to update the products and prices of a subscription",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/billing-portal-updates-optional.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription","price","product"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for identifying the unique payer for the BLIK payment method",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/buyer-id-blik.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for in-person payment methods, including Interac cards",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/card-interac-present-support.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Updates the default value for shipping address validation",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/card-shipping-status-submitted-address-validation.md",products:"Issuing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds country field for Charges that use Klarna",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/charges-klarna-payer-details-country.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["charge"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds a method to update the metadata for Checkout Sessions",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/checkout-update-method.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for email types to Credit Notes",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/credit-note-email-type.md",products:"Invoicing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Makes `LineItem.description` optional",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/description-optional-checkout-session-line-item.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Displays Amazon Pay dispute type on Disputes",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/display-amazonpay-dispute-type.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["dispute"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Displays `authorization_code` for Charges",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/displays-authorization-code-for-charges.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["charge"],fields:["authorization_code"],params:["authorization_code"],events:[]}},{version:"2024-09-30.acacia",title:"Displays CHIPS tracking details for outbound wire payments and transfers",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/displays-chips-tracking-details-treasury-outbound-wires.md",products:"Treasury",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for identifying the case type for card disputes",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/disputes-case-type-card.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["dispute"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds a new enum value representing a ReceivedDebit failure due to an international transaction",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/ef-features.md",products:"Treasury",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds new error code for invalid mandate prefixes to Bacs Direct Debit and SEPA Direct Debit payments",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/error-code-invalid-mandate-reference-prefix.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds error code for exceeded transaction limits",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/error-code-transaction-limit.md",products:"Invoicing, Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Expands filtering support for Financial Connections Sessions",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/financial-connections-additional-filters.md",products:"Financialconnections",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for filtering by account subcategories on Financial Connections",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/financial-connections-filters.md",products:"Financialconnections",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds parameter to link Verification Sessions to Customers",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/identity-verification-session-related-customer.md",products:"Identity",breaking:!1,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds retrieve and archive methods for Invoice Rendering Templates",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/invoice-rendering-template-methods.md",products:"Invoicing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for templates to Invoices and Customers",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/invoice-rendering-template-parameter.md",products:"Invoicing",breaking:!1,category:"api",touches:{resources:["customer","invoice"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds Invoice Rendering Templates for Invoices",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/invoice-rendering-template-resource.md",products:"Invoicing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds version support for Invoice Rendering Templates",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/invoice-rendering-template-version.md",products:"Invoicing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for bulk invoice line item operations",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/invoicing-bulk-line-item-operations.md",products:"Invoicing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds address validation for physical cards",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/issuing-address-validation.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds a new webhook event for when funds are deducted as part of a dispute",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/issuing-webhook-fund-deduction.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:["dispute","event","webhook"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Makes status details for Test Clock test helpers required",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/make-testclock-status-details-required.md",products:"Billing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for three new payment methods: Multibanco, Twint, and Zip",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/payment-links-new-payment-methods.md",products:"Paymentlinks",breaking:!1,category:"api",touches:{resources:["payment_method","payment_link"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Add support for `custom_unit_amount` during product creation",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/products-custom-unit-amount.md",products:"Checkout, Paymentlinks",breaking:!1,category:"api",touches:{resources:["product"],fields:["custom_unit_amount"],params:["custom_unit_amount"],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for requiring a customer tax ID on Checkout and Payment Links",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/requiring-customer-tax-id-checkout-session-paymentlink.md",products:"Checkout, Paymentlinks",breaking:!1,category:"api",touches:{resources:["checkout","customer","payment_link","tax"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds new method to retrieve a Tax Calculation",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/retrieves-tax-calculation-api.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds customer ID to payment method preview on a confirmation token",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/support-customer-payment-method-preview.md",products:"Elements",breaking:!1,category:"api",touches:{resources:["customer","payment_method"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for the Payment Element on a Customer Session",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/support-payment-element-customer-session.md",products:"Elements",breaking:!1,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds option to retrieve CVC tokens on Confirmation Tokens",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/support-payment-method-options-confirmation.md",products:"Elements",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds `target_frozen_time` for advancing `test_helpers.test_clock` objects",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/support-status-details-test-clock.md",products:"Billing",breaking:!1,category:"api",touches:{resources:[],fields:["target_frozen_time","test_helpers","test_clock"],params:["target_frozen_time","test_helpers","test_clock"],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for specifying US state sales tax elections while creating tax registrations",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/support-us-state-sales-tax-elections-api.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds Switzerland UID as a supported customer tax ID",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/switzerland-tax-uid.md",products:"Invoicing, Tax",breaking:!1,category:"api",touches:{resources:["customer","tax"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for posting time on tax transaction creation",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/tax-posting-time-on-creation.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for tax settings and registrations for Embedded Components",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/tax-registrations-settings-embedded-components.md",products:"Connect, Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds details about offline collection on `card_present` PaymentMethod objects",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/terminal-offline-details-card-present-paymentmethods.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:["card_present"],params:["card_present"],events:[]}},{version:"2024-09-30.acacia",title:"Adds the Stripe S700 reader as a valid device type",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/terminal-reader-s700.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds support for configuring the reboot time setting",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/terminal-reboot-window.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Updates consent modeling for saving cards with Terminal",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/terminal-remove-customer-consent-require-allow-redisplay.md",products:"Terminal",breaking:!0,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds Twint to the PaymentMethodConfiguration API",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/twint-support-payment-method-configuration.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2024-09-30.acacia",title:"Adds Meter Event v2 API endpoints",url:"https://docs.stripe.com/changelog/acacia/2024-09-30/usage-based-billing-v2-meter-events-api.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds support for Alma in France",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/alma.md",products:"Checkout, Elements, Paymentlinks, Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Supports domain registration for Amazon Pay",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/amazon-pay-domain-registration.md",products:"Elements",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds Credit Grant APIs and resources",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/billing-credits-apis.md",products:"Billing, Invoicing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds support for pre-tax credit amount information to credit notes",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/billing-credits-credit-note.md",products:"Billing, Invoicing",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds support for pre-tax credit amount information to invoices",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/billing-credits-invoice.md",products:"Billing, Invoicing",breaking:!1,category:"api",touches:{resources:["invoice","tax"],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Makes business profile optional for customer portal configuration",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/customer-portal-config-business-profile.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds scheduled subscription downgrades in the customer portal",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/customer-portal-schedule-downgrades.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription","customer"],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds support for disabling Stripe user authentication for certain embedded components",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/disable-stripe-user-authentication-account-sessions.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds Event Destinations v2 API endpoint",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/event-destinations-api.md",products:"All products",breaking:!1,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds a metadata field to the Vault and Forward API",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/forwarding-api-metadata-field.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds event type for updated receipt data in Issuing transactions",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/issuing-transactions-updated-receipt-event.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds pricing groups to the Accounts API",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/pricing-groups-account-objects.md",products:"Connect, Payments",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds created, updated, and failed events for all refund types",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/refund-webhook-update.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["refund","event","webhook"],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds support for scheduling invoice finalization",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/schedule-invoice-finalization.md",products:"Invoicing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds support for new South Korean payment methods",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/south-korean-payment-methods.md",products:"Billing, Checkout, Elements, Invoicing, Paymentlinks, Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds support for tax ID types in several new countries",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/tax-ids.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds support for new countries to the Tax Registration API",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/tax-registration-new-countries.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds support for collecting retail delivery fees",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/tax-retail-delivery-fee.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds option to automatically validate customer tax location during an update",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/tax-validate-location-auto.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["customer","tax"],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds Polish PLN currency support to Terminal tipping configuration",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/terminal-tipping-pln.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Adds a test helper that updates the shipping status for physical cards",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/testmode-helper-shipping-status.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-10-28.acacia",title:"Uses Visa\u2019s Compelling Evidence 3.0 to respond to qualifying disputes",url:"https://docs.stripe.com/changelog/acacia/2024-10-28/visa-compelling-evidence-3-0.md",products:"All products",breaking:!1,category:"api",touches:{resources:["dispute"],fields:[],params:[],events:[]}},{version:"2024-11-20.acacia",title:"Converts properties on the Account object from a String to an enum",url:"https://docs.stripe.com/changelog/acacia/2024-11-20/account-disabled-reason.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2024-11-20.acacia",title:"Adds indicator for connected accounts that must log in before using embedded components",url:"https://docs.stripe.com/changelog/acacia/2024-11-20/account-sessions-stripe-authentication-response.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2024-11-20.acacia",title:"Adds support for enabling Adaptive Pricing per Checkout Session",url:"https://docs.stripe.com/changelog/acacia/2024-11-20/adaptive-pricing-param.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2024-11-20.acacia",title:"Adds support for merchant amount and currency for test mode authorizations",url:"https://docs.stripe.com/changelog/acacia/2024-11-20/add-merchant-currency-and-merchant-amount-on-create-testmode-authorization-method.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-11-20.acacia",title:"Adds support for advanced card features on Checkout Sessions",url:"https://docs.stripe.com/changelog/acacia/2024-11-20/advanced-card-features.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2024-11-20.acacia",title:"Adds support for authorizers to Person API",url:"https://docs.stripe.com/changelog/acacia/2024-11-20/authorizer-person-api.md",products:"Connect",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-11-20.acacia",title:"Adds support for SEPA Direct Debit and Bacs Direct Debit mandate reference prefixes in Checkout Sessions",url:"https://docs.stripe.com/changelog/acacia/2024-11-20/checkout-sessions-sepa-debit-bacs-debit-mandate-options.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2024-11-20.acacia",title:"Specifying an originating payment method for Inbound Transfers is now optional",url:"https://docs.stripe.com/changelog/acacia/2024-11-20/inbound-transfers-optional-pm.md",products:"Treasury",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2024-11-20.acacia",title:"Adds support for issuing fraud challenges",url:"https://docs.stripe.com/changelog/acacia/2024-11-20/issuing-fraud-challenges.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-11-20.acacia",title:"Adds tax ID support for Liechtenstein VAT",url:"https://docs.stripe.com/changelog/acacia/2024-11-20/li_vat.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:["li_vat"],params:["li_vat"],events:[]}},{version:"2024-11-20.acacia",title:"Allows Link card-only integrations to accept non-card payments under Link card brand",url:"https://docs.stripe.com/changelog/acacia/2024-11-20/link-card-brand.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-11-20.acacia",title:"Adds additional beneficiary information for bank transfer payments",url:"https://docs.stripe.com/changelog/acacia/2024-11-20/new-bank-transfer-beneficiary-information.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-11-20.acacia",title:"Trace payouts with a unique identifier",url:"https://docs.stripe.com/changelog/acacia/2024-11-20/payout-trace-id-api.md",products:"Payouts",breaking:!1,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2024-11-20.acacia",title:"Adds network decline code field for Swish and BLIK refunds",url:"https://docs.stripe.com/changelog/acacia/2024-11-20/refunds-network-decline-code.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["refund"],fields:[],params:[],events:[]}},{version:"2024-11-20.acacia",title:"Adds support for Service Tax type",url:"https://docs.stripe.com/changelog/acacia/2024-11-20/service_tax.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:["service_tax"],params:["service_tax"],events:[]}},{version:"2024-11-20.acacia",title:"Use configurable capture methods and set up future usage for South Korean payment methods",url:"https://docs.stripe.com/changelog/acacia/2024-11-20/south-korea-payment-methods.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2024-11-20.acacia",title:"Customize the submit button recurring Payment Links and Checkout Sessions",url:"https://docs.stripe.com/changelog/acacia/2024-11-20/submit-type-recurring-cpl.md",products:"Checkout, Paymentlinks",breaking:!1,category:"api",touches:{resources:["checkout","payment_link"],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Adds disabled reason to invoices, subscriptions, and schedules",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/add-disabled-reason.md",products:"Tax, Billing, Invoicing",breaking:!1,category:"api",touches:{resources:["subscription","invoice"],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Modify trial subscriptions created by Payment Links",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/add-trial-days-update-payment-links-api.md",products:"Paymentlinks",breaking:!1,category:"api",touches:{resources:["subscription","payment_link"],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Adds support for reinstating Billing Credits on Invoice voiding",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/billing-credits-invoice-voiding.md",products:"Billing, Invoicing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Adds field-level permissions for revenue and worker count in an Account\u2019s business profile",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/business-profile-revenue-worker-count.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Supports redisplaying payment methods for Cards and Sources",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/cards-sources-allow-redisplay.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Adds network transaction ID to charges",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/charge-display-network-transaction-id.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["charge"],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Adds funding details to Amazon Pay and Revolut Pay charges",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/charge-pm-details.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["charge"],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Creates Issuing authorizations when Stripe is unavailable",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/issuing-auths-when-stripe-unavailable.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Issuing authorizations now include merchant tax ID number",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/issuing-merchant-tax-id.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Adds support for SEPA Direct Debit and Bacs Direct Debit mandate reference prefix",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/mandate-reference-prefix.md",products:"Checkout, Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Adds network advice and decline codes",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/network-advice-code-network-decline-code.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Adds additional beneficiary information for bank transfer payments",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/new-bank-transfer-beneficiary-information.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Adds new balance transaction types to support minimum balance",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/payout-minimum-balance.md",products:"Payouts",breaking:!1,category:"api",touches:{resources:["payout","balance"],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Billing Portal Configuration always returns period end date in responses",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/portal-config-schedule-at-period-end-required.md",products:"Billing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Adds regulated status field to card objects in several APIs",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/regulated-status.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Adds support for tax ID types in 19 new countries",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/tax-ids-19-new-countries.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Adds support for 21 new countries to the Tax Registration API",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/tax-registration-21-new-countries.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Adds SDK support for trace IDs",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/trace-id-sdk.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Adds signature request as a replacement option for the Vault and Forward API",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/vault-and-forward-request-signature-replacement.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2024-12-18.acacia",title:"Adds support for responding to Visa compliance disputes",url:"https://docs.stripe.com/changelog/acacia/2024-12-18/visa-compliance.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["dispute"],fields:[],params:[],events:[]}},{version:"2025-01-27.acacia",title:"Modify phone number collection on Payment Links",url:"https://docs.stripe.com/changelog/acacia/2025-01-27/add-phone-number-collection-update-payment-links-api.md",products:"Paymentlinks",breaking:!1,category:"api",touches:{resources:["payment_link"],fields:[],params:[],events:[]}},{version:"2025-01-27.acacia",title:"Adds advice code to Charges",url:"https://docs.stripe.com/changelog/acacia/2025-01-27/charge-outcome-advice-code.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["charge"],fields:[],params:[],events:[]}},{version:"2025-01-27.acacia",title:"Adds discounts field to Checkout Sessions",url:"https://docs.stripe.com/changelog/acacia/2025-01-27/checkout-sessions-discounts-field.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2025-01-27.acacia",title:"Adds Sudan to allowed shipping countries for Checkout",url:"https://docs.stripe.com/changelog/acacia/2025-01-27/checkout-sudan-shipping-support.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2025-01-27.acacia",title:"Adds directorship declaration to the Accounts API",url:"https://docs.stripe.com/changelog/acacia/2025-01-27/directorship-declaration.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-01-27.acacia",title:"Makes Issuing and Treasury embedded components generally available",url:"https://docs.stripe.com/changelog/acacia/2025-01-27/issuing-treasury-embedded-components.md",products:"Issuing, Treasury",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-01-27.acacia",title:"Adds support for multiple financial accounts per business",url:"https://docs.stripe.com/changelog/acacia/2025-01-27/multi-fa.md",products:"Treasury",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-01-27.acacia",title:"Adds support for ownership exemption reason to the Accounts API",url:"https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-01-27.acacia",title:"Adds support for the Pay by Bank local payment method",url:"https://docs.stripe.com/changelog/acacia/2025-01-27/pay-by-bank-lpm.md",products:"Checkout, Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-01-27.acacia",title:"Adds PayPal country property to the PaymentMethods and Charge objects",url:"https://docs.stripe.com/changelog/acacia/2025-01-27/paypal-country.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method","charge"],fields:[],params:[],events:[]}},{version:"2025-01-27.acacia",title:"Adds proof of ultimate beneficial ownership as a document type",url:"https://docs.stripe.com/changelog/acacia/2025-01-27/proof-of-ultimate-beneficial-ownership-document-support.md",products:"Connect",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-01-27.acacia",title:"Adds support for collecting tips in JPY currency to Terminal",url:"https://docs.stripe.com/changelog/acacia/2025-01-27/terminal-jp-supported-country.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-02-24.acacia",title:"Makes shipping information an optional parameter for Afterpay payments",url:"https://docs.stripe.com/changelog/acacia/2025-02-24/afterpay-shipping-details-optional.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-02-24.acacia",title:"Credit grants can now be applied to specific prices",url:"https://docs.stripe.com/changelog/acacia/2025-02-24/billing-credits-price-level-applicability.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["price"],fields:[],params:[],events:[]}},{version:"2025-02-24.acacia",title:"Credit grants can now be prioritized",url:"https://docs.stripe.com/changelog/acacia/2025-02-24/billing-credits-priority.md",products:"Billing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-02-24.acacia",title:"Adds support for blocking specific card brands in Checkout Sessions",url:"https://docs.stripe.com/changelog/acacia/2025-02-24/checkout_add_brands_blocked.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout"],fields:["checkout_add_brands_blocked"],params:["checkout_add_brands_blocked"],events:[]}},{version:"2025-02-24.acacia",title:"Checkout Sessions now group customer information in one field",url:"https://docs.stripe.com/changelog/acacia/2025-02-24/checkout-sessions-collected-info.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout","customer"],fields:[],params:[],events:[]}},{version:"2025-02-24.acacia",title:"Makes billing country and email fields optional for Klarna payments",url:"https://docs.stripe.com/changelog/acacia/2025-02-24/cs_make_billing_country_and_email_field_optional_for_klarna_payments.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:["cs_make_billing_country_and_email_field_optional_for_klarna_payments"],params:["cs_make_billing_country_and_email_field_optional_for_klarna_payments"],events:[]}},{version:"2025-02-24.acacia",title:"Adds metadata field to the Products API for creating an inline default price",url:"https://docs.stripe.com/changelog/acacia/2025-02-24/products-default-price-data-metadata-field.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["price","product"],fields:[],params:[],events:[]}},{version:"2025-02-24.acacia",title:"Versioning in Stripe JS",url:"https://docs.stripe.com/changelog/acacia/2025-02-24/stripe-js-versioning.md",products:"Checkout, Elements",breaking:!1,category:"stripejs",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-02-24.acacia",title:"Adds ability to schedule debit payments for a specific date",url:"https://docs.stripe.com/changelog/acacia/2025-02-24/target-date.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds BalanceTransaction types related to pay with Stripe balance",url:"https://docs.stripe.com/changelog/basil/2025-03-31/add_pay_with_stripe_balance_bt_types.md",products:"Connect, Payments",breaking:!1,category:"api",touches:{resources:["balance"],fields:["add_pay_with_stripe_balance_bt_types"],params:["add_pay_with_stripe_balance_bt_types"],events:[]}},{version:"2025-03-31.basil",title:"Adds presentment details for Adaptive Pricing",url:"https://docs.stripe.com/changelog/basil/2025-03-31/add_presentment_details.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:[],fields:["add_presentment_details"],params:["add_presentment_details"],events:[]}},{version:"2025-03-31.basil",title:"Adds support for the Billie local payment method",url:"https://docs.stripe.com/changelog/basil/2025-03-31/add-billie.md",products:"Checkout, Connect, Elements, Paymentlinks, Payments, Sigma",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds custom UI mode to Checkout Sessions",url:"https://docs.stripe.com/changelog/basil/2025-03-31/add-checkout-session-custom-ui-mode.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds the initCheckout method",url:"https://docs.stripe.com/changelog/basil/2025-03-31/add-init-checkout.md",products:"Checkout, Elements",breaking:!1,category:"stripejs",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds support for multiple (partial) payments on invoices",url:"https://docs.stripe.com/changelog/basil/2025-03-31/add-support-for-multiple-partial-payments-on-invoices.md",products:"Billing, Invoicing, Payments",breaking:!0,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Invoicing resources now specify how they were generated",url:"https://docs.stripe.com/changelog/basil/2025-03-31/adds-new-parent-field-to-invoicing-objects.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds new error codes for required verifications",url:"https://docs.stripe.com/changelog/basil/2025-03-31/adds-requirement-error-codes.md",products:"Connect",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Expanded availability of Account KYC data",url:"https://docs.stripe.com/changelog/basil/2025-03-31/availability_of_additional_kyc_data.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:["availability_of_additional_kyc_data"],params:["availability_of_additional_kyc_data"],events:[]}},{version:"2025-03-31.basil",title:"Adds new webhook event types for billing credits",url:"https://docs.stripe.com/changelog/basil/2025-03-31/billing-credit-webhooks.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["event","webhook"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds new webhook event types for Billing Meters",url:"https://docs.stripe.com/changelog/basil/2025-03-31/billing-meter-webhooks.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["event","webhook"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds optional items to Checkout Sessions and Payment Links",url:"https://docs.stripe.com/changelog/basil/2025-03-31/checkout_optional_items.md",products:"Checkout, Paymentlinks",breaking:!1,category:"api",touches:{resources:["checkout","payment_link"],fields:["checkout_optional_items"],params:["checkout_optional_items"],events:[]}},{version:"2025-03-31.basil",title:"Checkout Sessions have lower latency and new update semantics",url:"https://docs.stripe.com/changelog/basil/2025-03-31/checkout-legacy-subscription-upgrade.md",products:"Checkout",breaking:!0,category:"api",touches:{resources:["checkout","subscription"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Checkout Session removes shipping details",url:"https://docs.stripe.com/changelog/basil/2025-03-31/checkout-session-remove-shipping-details.md",products:"Checkout",breaking:!0,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Checkout Session allows shipping option updates",url:"https://docs.stripe.com/changelog/basil/2025-03-31/checkout-session-shipping-options-update-param.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds permissions parameter to Checkout Sessions",url:"https://docs.stripe.com/changelog/basil/2025-03-31/cs_add_checkout_session_permissions.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout"],fields:["cs_add_checkout_session_permissions"],params:["cs_add_checkout_session_permissions"],events:[]}},{version:"2025-03-31.basil",title:"Updates the default layout for Payment Element",url:"https://docs.stripe.com/changelog/basil/2025-03-31/default-layout-of-payment-element.md",products:"Elements",breaking:!0,category:"stripejs",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds default value to custom fields on Payment Links",url:"https://docs.stripe.com/changelog/basil/2025-03-31/default-value-payment-links-custom-fields.md",products:"Paymentlinks",breaking:!1,category:"api",touches:{resources:["payment_link"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Removes manual capture method for Interac cards",url:"https://docs.stripe.com/changelog/basil/2025-03-31/deprecate-interac-present-manual-capture-method.md",products:"Payments, Terminal",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Removes legacy usage-based billing",url:"https://docs.stripe.com/changelog/basil/2025-03-31/deprecate-legacy-usage-based-billing.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Removes coupon and promotion code parameters with stackable discounts",url:"https://docs.stripe.com/changelog/basil/2025-03-31/deprecate-singular-coupon-promotion-code.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["coupon","promotion_code"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds subscription item-level billing periods and removes subscription-level periods",url:"https://docs.stripe.com/changelog/basil/2025-03-31/deprecate-subscription-current-period-start-and-end.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:["current_period_start","current_period_end"],params:["current_period_start","current_period_end"],events:[]}},{version:"2025-03-31.basil",title:"Removes total count expansion for list API methods",url:"https://docs.stripe.com/changelog/basil/2025-03-31/deprecate-total-count-expansion.md",products:"All products",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds ability to configure saved payment methods for one-time payments on the hosted invoice page",url:"https://docs.stripe.com/changelog/basil/2025-03-31/hosted-payment-method-save.md",products:"Connect, Invoicing",breaking:!1,category:"api",touches:{resources:["invoice","payment_method"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds jurisdiction level and taxability reason to manual tax amounts on invoices",url:"https://docs.stripe.com/changelog/basil/2025-03-31/invoice-manual-tax-amount-fields.md",products:"Invoicing",breaking:!1,category:"api",touches:{resources:["invoice","tax"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Replaces Upcoming Invoice API methods with the Create Preview Invoice API",url:"https://docs.stripe.com/changelog/basil/2025-03-31/invoice-preview-api-deprecations.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Replaces top-level price fields with improved price modeling on Invoice Items and Invoice Line Items",url:"https://docs.stripe.com/changelog/basil/2025-03-31/invoice-pricing-configurations.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["invoice","price"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Replaces top-level tax-related properties with improved tax modeling on Invoices, Invoice Line Items, and Credit Note Line Items",url:"https://docs.stripe.com/changelog/basil/2025-03-31/invoice-tax-configurations.md",products:"Billing, Invoicing",breaking:!0,category:"api",touches:{resources:["invoice","tax"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds expired status for Issuing Authorizations",url:"https://docs.stripe.com/changelog/basil/2025-03-31/issuing-authorizations-expired.md",products:"Issuing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"HTTP Accept headers for webhooks now specify JSON during Issuing authorizations",url:"https://docs.stripe.com/changelog/basil/2025-03-31/issuing-json-webhook.md",products:"Issuing",breaking:!0,category:"api",touches:{resources:["webhook"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds support for Klarna in the hosted invoice page",url:"https://docs.stripe.com/changelog/basil/2025-03-31/klarna-send-invoice.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Makes the client parameter optional for WeChat Pay until confirmation",url:"https://docs.stripe.com/changelog/basil/2025-03-31/lient-param-optional-wechatpay-before-confirmation.md",products:"Invoicing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds support for last aggregation formula on meters",url:"https://docs.stripe.com/changelog/basil/2025-03-31/meters-last-agg-formula.md",products:"Billing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Payment Methods won\u2019t allow modifying fields for Naver Pay after the object is first created",url:"https://docs.stripe.com/changelog/basil/2025-03-31/naver-pay-payment-method.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds support for saving and reusing Naver Pay payment methods",url:"https://docs.stripe.com/changelog/basil/2025-03-31/naver-pay-recurring.md",products:"Billing, Checkout, Elements, Paymentlinks, Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Introduces new customer balance transaction types",url:"https://docs.stripe.com/changelog/basil/2025-03-31/new-customer-transaction-types.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["customer","balance"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds reason code for Issuing authorizations created while Stripe is unavailable",url:"https://docs.stripe.com/changelog/basil/2025-03-31/new-network-fallback-issuing-authorization-reason-code.md",products:"Issuing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds support for the New Zealand BECS Direct Debit local payment method",url:"https://docs.stripe.com/changelog/basil/2025-03-31/nz-bank-account.md",products:"Billing, Checkout, Connect, Elements, Invoicing, Paymentlinks, Payments",breaking:!1,category:"api",touches:{resources:["payment_method","account"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Changes the political exposure property of the Person object from a string to an enum",url:"https://docs.stripe.com/changelog/basil/2025-03-31/political-exposure-persons-api.md",products:"Connect",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Removes support for the page parameter",url:"https://docs.stripe.com/changelog/basil/2025-03-31/remove-page-event-destinations.md",products:"All products",breaking:!1,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Partially capturing or canceling payments no longer creates a Refund",url:"https://docs.stripe.com/changelog/basil/2025-03-31/remove-refund-from-partial-capture-and-payment-cancellation-flow.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["refund"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Removes support for discount coupons that don\u2019t have a specified end time",url:"https://docs.stripe.com/changelog/basil/2025-03-31/restrict-coupon-duration.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["coupon"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds support for the Satispay local payment method",url:"https://docs.stripe.com/changelog/basil/2025-03-31/satispay-lpm.md",products:"Checkout, Connect, Elements, Paymentlinks, Payments, Sigma",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds new error code for failures with the Setup Intents API using mobile wallets",url:"https://docs.stripe.com/changelog/basil/2025-03-31/terminal-mobile-wallets-setup-intents-error-code.md",products:"Payments, Terminal",breaking:!1,category:"api",touches:{resources:["setup_intent"],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Adds ability to configure WiFi for Terminal readers",url:"https://docs.stripe.com/changelog/basil/2025-03-31/terminal-wifi-configuration.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-03-31.basil",title:"Updates the Vault and Forward API to return a 402 status code for upstream request timeouts",url:"https://docs.stripe.com/changelog/basil/2025-03-31/vault-forward-api-returns-402.md",products:"Payments",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-04-30.basil",title:"Adds Pix to payment method configurations",url:"https://docs.stripe.com/changelog/basil/2025-04-30/add_pix_to_payment_method_configuration.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:["add_pix_to_payment_method_configuration"],params:["add_pix_to_payment_method_configuration"],events:[]}},{version:"2025-04-30.basil",title:"Adds a minority-owned business designation field to the business profile hash",url:"https://docs.stripe.com/changelog/basil/2025-04-30/add-minority-owned-business-designation-to-business-profile.md",products:"Connect, Issuing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-04-30.basil",title:"Adds tax ID to Payment Method billing details",url:"https://docs.stripe.com/changelog/basil/2025-04-30/add-tax-id-to-billing-details.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method","tax"],fields:[],params:[],events:[]}},{version:"2025-04-30.basil",title:"Adds support for tax ID types in ten new countries",url:"https://docs.stripe.com/changelog/basil/2025-04-30/add-tax-ids.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2025-04-30.basil",title:"Adds a demographic information hash to the Persons API",url:"https://docs.stripe.com/changelog/basil/2025-04-30/add-us-cfpb-data-to-person.md",products:"Connect, Issuing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-04-30.basil",title:"Adds context field to event payload",url:"https://docs.stripe.com/changelog/basil/2025-04-30/additional-context-organization-events.md",products:"All products",breaking:!1,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2025-04-30.basil",title:"Tax Registration API now supports twelve new countries",url:"https://docs.stripe.com/changelog/basil/2025-04-30/additional-tax-registration-countries.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2025-04-30.basil",title:"Adds Affirm as a supported payment method for one-time invoices and subscriptions",url:"https://docs.stripe.com/changelog/basil/2025-04-30/affirm-send-invoice.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription","invoice","payment_method"],fields:[],params:[],events:[]}},{version:"2025-04-30.basil",title:"Adds capture method option to Billie payments",url:"https://docs.stripe.com/changelog/basil/2025-04-30/billie-capture-method-option.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-04-30.basil",title:"Adds wallet options to Checkout Sessions",url:"https://docs.stripe.com/changelog/basil/2025-04-30/checkout-link-wallet-options.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2025-04-30.basil",title:"Adds a new ping event type for testing an event destination",url:"https://docs.stripe.com/changelog/basil/2025-04-30/cs_document_event_destination_ping_event.md",products:"All products",breaking:!1,category:"api",touches:{resources:["event"],fields:["cs_document_event_destination_ping_event"],params:["cs_document_event_destination_ping_event"],events:[]}},{version:"2025-04-30.basil",title:"Adds support for card installments on Confirmation Token",url:"https://docs.stripe.com/changelog/basil/2025-04-30/ct-pmo-card-installments.md",products:"Elements, Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-04-30.basil",title:"Adds a field explaining why refunds are pending",url:"https://docs.stripe.com/changelog/basil/2025-04-30/refund-pending-reason.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["refund"],fields:[],params:[],events:[]}},{version:"2025-04-30.basil",title:"Adds registration date to the Accounts API",url:"https://docs.stripe.com/changelog/basil/2025-04-30/us_cfpb.md",products:"Capital, Issuing",breaking:!1,category:"api",touches:{resources:["account"],fields:["us_cfpb"],params:["us_cfpb"],events:[]}},{version:"2025-04-30.preview",title:"Adds support for third-party tax providers in Accounts v2",url:"https://docs.stripe.com/changelog/basil/2025-04-30/accounts-v2-3p-api-ref.md",products:"All products",breaking:!1,category:"api",touches:{resources:["account","tax"],fields:[],params:[],events:[]}},{version:"2025-04-30.preview",title:"Adds support for Global Payouts",url:"https://docs.stripe.com/changelog/basil/2025-04-30/adds-support-for-global-payouts.md",products:"Payouts",breaking:!1,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2025-04-30.preview",title:"Adds the FX Quote API to provide extended exchange rate quotes",url:"https://docs.stripe.com/changelog/basil/2025-04-30/fx-quote-api.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-04-30.preview",title:"Adds new event types for Accounts v2",url:"https://docs.stripe.com/changelog/basil/2025-04-30/new-accounts-v2-events.md",products:"Connect, Payouts",breaking:!1,category:"api",touches:{resources:["account","event"],fields:[],params:[],events:[]}},{version:"2025-04-30.preview",title:"Adds support for payment line items",url:"https://docs.stripe.com/changelog/basil/2025-04-30/payment-line-items.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-04-30.preview",title:"Payouts are now a capability",url:"https://docs.stripe.com/changelog/basil/2025-04-30/payouts-are-now-a-capability.md",products:"Connect, Tax",breaking:!0,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2025-04-30.preview",title:"Adds support for US sellers to accept cross-border Pix payments",url:"https://docs.stripe.com/changelog/basil/2025-04-30/pix_cross_border_in_public_preview.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:["pix_cross_border_in_public_preview"],params:["pix_cross_border_in_public_preview"],events:[]}},{version:"2025-04-30.preview",title:"Adds support for script coupons",url:"https://docs.stripe.com/changelog/basil/2025-04-30/script-coupons.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["coupon"],fields:[],params:[],events:[]}},{version:"2025-04-30.preview",title:"Adds billing mode to control how prorations and invoices for subscriptions are calculated and orchestrated",url:"https://docs.stripe.com/changelog/basil/2025-04-30/subscriptions-billing-mode.md",products:"Billing, Invoicing",breaking:!1,category:"api",touches:{resources:["subscription","invoice"],fields:[],params:[],events:[]}},{version:"2025-04-30.preview",title:"Adds provider to automatic tax",url:"https://docs.stripe.com/changelog/basil/2025-04-30/taxprovider.md",products:"Billing, Checkout",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2025-04-30.preview",title:"Updated address validations for Tax",url:"https://docs.stripe.com/changelog/basil/2025-04-30/updated-address-validations-for-tax.md",products:"Connect, Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2025-05-28.basil",title:"Adds balance types to the Balance Transactions API",url:"https://docs.stripe.com/changelog/basil/2025-05-28/add-balance-type-to-balance-transactions.md",products:"Issuing, Payments, Payouts, Treasury",breaking:!1,category:"api",touches:{resources:["balance"],fields:[],params:[],events:[]}},{version:"2025-05-28.basil",title:"Adds metadata field on Tax Calculation line items",url:"https://docs.stripe.com/changelog/basil/2025-05-28/add-metadata-on-tax-calculation-line-item.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2025-05-28.basil",title:"Adds refund and dispute prefunding balances to the Balance API",url:"https://docs.stripe.com/changelog/basil/2025-05-28/add-refund-and-dispute-prefunding-to-balances.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["refund","dispute","balance"],fields:[],params:[],events:[]}},{version:"2025-05-28.basil",title:"Adds account capability for the Pix payment method for US-based sellers",url:"https://docs.stripe.com/changelog/basil/2025-05-28/adds-pix-capability-for-us-sellers.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method","account"],fields:[],params:[],events:[]}},{version:"2025-05-28.basil",title:"Adds option to Checkout Sessions to let customers remove saved payment methods",url:"https://docs.stripe.com/changelog/basil/2025-05-28/checkout-payment-method-remove.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout","customer","payment_method"],fields:[],params:[],events:[]}},{version:"2025-05-28.basil",title:"Adds forms to Terminal readers to collect user information",url:"https://docs.stripe.com/changelog/basil/2025-05-28/collect-inputs.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-05-28.basil",title:"Adds two new Connect embedded components for Disputes",url:"https://docs.stripe.com/changelog/basil/2025-05-28/disputes-embedded-components.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["dispute"],fields:[],params:[],events:[]}},{version:"2025-05-28.basil",title:"Extracts sex and place of birth from government-issued ID documents",url:"https://docs.stripe.com/changelog/basil/2025-05-28/extract-sex-and-place-of-birth.md",products:"Identity",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-05-28.basil",title:"Adds South Korean payment methods to the Payment Method Configurations API",url:"https://docs.stripe.com/changelog/basil/2025-05-28/korea-payment-method-configuration.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-05-28.basil",title:"Adds support for setting up future usage of Naver Pay in Checkout Sessions",url:"https://docs.stripe.com/changelog/basil/2025-05-28/naver-pay-update.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2025-05-28.basil",title:"Adds support for partial payments on invoices",url:"https://docs.stripe.com/changelog/basil/2025-05-28/partial-payments.md",products:"Billing, Invoicing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2025-05-28.basil",title:"Adds network decline codes for PayPal refunds",url:"https://docs.stripe.com/changelog/basil/2025-05-28/paypal_refund_network_decline_code.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["refund"],fields:["paypal_refund_network_decline_code"],params:["paypal_refund_network_decline_code"],events:[]}},{version:"2025-05-28.basil",title:"Reintroduces billing thresholds",url:"https://docs.stripe.com/changelog/basil/2025-05-28/reintroduce-billing-thresholds.md",products:"Billing, Invoicing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-05-28.basil",title:"Adds capture method option to Satispay payments",url:"https://docs.stripe.com/changelog/basil/2025-05-28/satispay-capture-method-option.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-05-28.basil",title:"Adds support for WeChat Pay for Setup Intents",url:"https://docs.stripe.com/changelog/basil/2025-05-28/setup-intents-wechat-pay.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["setup_intent"],fields:[],params:[],events:[]}},{version:"2025-05-28.basil",title:"Adds simulated S700 device type to Reader API",url:"https://docs.stripe.com/changelog/basil/2025-05-28/simulated-s700-device-type.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-05-28.preview",title:"Adds more flexibility for how you manage subscription end-of-period cancellations",url:"https://docs.stripe.com/changelog/basil/2025-05-28/cancel-at-enums.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2025-05-28.preview",title:"Replaces tax association status fields",url:"https://docs.stripe.com/changelog/basil/2025-05-28/flatten-tax-association.md",products:"Payments, Tax",breaking:!0,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2025-05-28.preview",title:"Adds the ability to migrate subscriptions to flexible billing mode",url:"https://docs.stripe.com/changelog/basil/2025-05-28/migrate-subscription.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2025-05-28.preview",title:"Updated validation errors for redaction jobs to specify affected objects",url:"https://docs.stripe.com/changelog/basil/2025-05-28/redaction-jobs-validation-error-erroring-object.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-05-28.preview",title:"Renames Payment Intent field for linking tax calculation",url:"https://docs.stripe.com/changelog/basil/2025-05-28/rename-async-workflows.md",products:"Payments, Tax",breaking:!0,category:"api",touches:{resources:["payment_intent","tax"],fields:[],params:[],events:[]}},{version:"2025-05-28.preview",title:"Adds support for WeChat Pay and Affirm on Terminal",url:"https://docs.stripe.com/changelog/basil/2025-05-28/terminal-wechat-pay-and-affirm.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-06-30.basil",title:"Adds the ability to provide proof-of-address documents for connected accounts",url:"https://docs.stripe.com/changelog/basil/2025-06-30/accounts-proof-of-address.md",products:"Connect, Issuing, Treasury",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-06-30.basil",title:"Adds new plan types for Japan installments",url:"https://docs.stripe.com/changelog/basil/2025-06-30/add_jp_installments_plan_types.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:["add_jp_installments_plan_types"],params:["add_jp_installments_plan_types"],events:[]}},{version:"2025-06-30.basil",title:"Adds billing mode for more flexible subscriptions behavior",url:"https://docs.stripe.com/changelog/basil/2025-06-30/billing-mode.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2025-06-30.basil",title:"Adds support for crypto payment method",url:"https://docs.stripe.com/changelog/basil/2025-06-30/crypto-payment-method.md",products:"Crypto",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-06-30.basil",title:"Adds optional filter by status when listing Financial Accounts",url:"https://docs.stripe.com/changelog/basil/2025-06-30/financial-accounts-status-filter.md",products:"Treasury",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-06-30.basil",title:"Adds more flexible schedules for monthly and weekly payouts",url:"https://docs.stripe.com/changelog/basil/2025-06-30/flexible-schedules-payouts.md",products:"Connect, Payouts",breaking:!1,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2025-06-30.basil",title:"Adds BUUT as a supported bank when using iDEAL",url:"https://docs.stripe.com/changelog/basil/2025-06-30/ideal-buut-support.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-06-30.basil",title:"Verification Sessions can now collect verification information for a related Person",url:"https://docs.stripe.com/changelog/basil/2025-06-30/identity-related-person.md",products:"Connect, Identity",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-06-30.basil",title:"Adds support for saving Klarna payment methods",url:"https://docs.stripe.com/changelog/basil/2025-06-30/klarna-saved-payment-methods.md",products:"Billing, Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-06-30.basil",title:"Adds support for collecting card details and confirming Payment Intents to server-driven Terminal integrations",url:"https://docs.stripe.com/changelog/basil/2025-06-30/terminal-server-support-cards-payments.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:["payment_intent"],fields:[],params:[],events:[]}},{version:"2025-06-30.basil",title:"Adds Visa compliance disputes",url:"https://docs.stripe.com/changelog/basil/2025-06-30/visa-compliance-disputes.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["dispute"],fields:[],params:[],events:[]}},{version:"2025-06-30.preview",title:"Adds the ability to provide proof-of-address documents for connected accounts in v2 APIs",url:"https://docs.stripe.com/changelog/basil/2025-06-30/accounts-api-v2-proof-of-address.md",products:"Connect, Issuing, Treasury",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-06-30.preview",title:"Adds submission method to dispute evidence details",url:"https://docs.stripe.com/changelog/basil/2025-06-30/add-submission-method-to-disputes-evidence-details.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["dispute"],fields:[],params:[],events:[]}},{version:"2025-06-30.preview",title:"Adds error types for unsupported countries or entities when requesting capabilities for Accounts v2",url:"https://docs.stripe.com/changelog/basil/2025-06-30/adds-unsupported-capability-status.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-06-30.preview",title:"Consolidates billing mode configuration across Billing products",url:"https://docs.stripe.com/changelog/basil/2025-06-30/billing-mode-hash.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["product"],fields:[],params:[],events:[]}},{version:"2025-06-30.preview",title:"Adds new status and consolidates error codes for money management APIs",url:"https://docs.stripe.com/changelog/basil/2025-06-30/enhance-money-management-apis.md",products:"Payouts",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-06-30.preview",title:"Adds support for saving Klarna payment methods",url:"https://docs.stripe.com/changelog/basil/2025-06-30/klarna_saved_payment_methods_preview.md",products:"Billing, Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:["klarna_saved_payment_methods_preview"],params:["klarna_saved_payment_methods_preview"],events:[]}},{version:"2025-07-30.basil",title:"Adds support for ad-hoc products and prices when creating Payment Links",url:"https://docs.stripe.com/changelog/basil/2025-07-30/ad-hoc-prices-for-payment-links.md",products:"Paymentlinks",breaking:!1,category:"api",touches:{resources:["payment_link","price","product"],fields:[],params:[],events:[]}},{version:"2025-07-30.basil",title:"Adds support for new tipping currencies to the Terminal Configuration object",url:"https://docs.stripe.com/changelog/basil/2025-07-30/add_terminal_tipping_currency_aed_bgn_huf_chf_ron.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:["add_terminal_tipping_currency_aed_bgn_huf_chf_ron"],params:["add_terminal_tipping_currency_aed_bgn_huf_chf_ron"],events:[]}},{version:"2025-07-30.basil",title:"Adds transaction ID to Charges for Cash App",url:"https://docs.stripe.com/changelog/basil/2025-07-30/add-cashapp-transaction-id-to-charges.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["charge"],fields:[],params:[],events:[]}},{version:"2025-07-30.basil",title:"Adds a new value to payment review closed reasons",url:"https://docs.stripe.com/changelog/basil/2025-07-30/add-new-enum-to-payment-review-close-reason.md",products:"Radar",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-07-30.basil",title:"Adds a duration parameter for schedule phases",url:"https://docs.stripe.com/changelog/basil/2025-07-30/add-schedule-phase-duration.md",products:"Billing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-07-30.basil",title:"Adds support for the America/Coyhaique time zone",url:"https://docs.stripe.com/changelog/basil/2025-07-30/america_coyhaique_timezone.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:["america_coyhaique_timezone"],params:["america_coyhaique_timezone"],events:[]}},{version:"2025-07-30.basil",title:"Adds support for billing thresholds on flexible billing mode Subscriptions",url:"https://docs.stripe.com/changelog/basil/2025-07-30/billing-thresholds.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2025-07-30.basil",title:"Adds helpers to cancel subscriptions for billing periods with mixed intervals",url:"https://docs.stripe.com/changelog/basil/2025-07-30/cancel-at-enums.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2025-07-30.basil",title:"Enhances Checkout for app-to-web purchases",url:"https://docs.stripe.com/changelog/basil/2025-07-30/checkout-origin-context.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2025-07-30.basil",title:"Adds support for Invoice Rendering Templates on Checkout and Payment Links",url:"https://docs.stripe.com/changelog/basil/2025-07-30/checkout-payment-link-invoice-rendering-templates.md",products:"Checkout, Paymentlinks",breaking:!1,category:"api",touches:{resources:["checkout","invoice","payment_link"],fields:[],params:[],events:[]}},{version:"2025-07-30.basil",title:"Adds support for quantity adjustment to the Customer Portal Configuration API",url:"https://docs.stripe.com/changelog/basil/2025-07-30/customer-portal-subscription-update-quantity-limits.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription","customer"],fields:[],params:[],events:[]}},{version:"2025-07-30.basil",title:"Adds support for disabling future usage of Pix in Checkout Sessions",url:"https://docs.stripe.com/changelog/basil/2025-07-30/disable-future-usage-of-pix-in-checkout-sessions.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2025-07-30.basil",title:"Adds Connect embedded component for Instant Payouts promotion",url:"https://docs.stripe.com/changelog/basil/2025-07-30/instant-payouts-promotion-embedded-component-ga.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2025-07-30.basil",title:"Adds support for the NZ BECS Direct Debit local payment method in Checkout and Payment Links",url:"https://docs.stripe.com/changelog/basil/2025-07-30/nz-bank-account-checkout-payment-links.md",products:"Checkout, Paymentlinks, Payments",breaking:!1,category:"api",touches:{resources:["checkout","payment_method","payment_link","account"],fields:[],params:[],events:[]}},{version:"2025-07-30.basil",title:"Adds support for mixed intervals on the same subscription",url:"https://docs.stripe.com/changelog/basil/2025-07-30/support-mixed-intervals.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2025-07-30.preview",title:"Adds validation for active financial addresses to Outbound Payments and Transfers",url:"https://docs.stripe.com/changelog/basil/2025-07-30/add-financial-address-requirement.md",products:"Treasury",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-07-30.preview",title:"Adds a new value to payment review closed reasons",url:"https://docs.stripe.com/changelog/basil/2025-07-30/add-new-enum-value-to-review-close-reasons.md",products:"Radar",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-07-30.preview",title:"Adds Smart Disputes to the Disputes API",url:"https://docs.stripe.com/changelog/basil/2025-07-30/adds-smart-disputes.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["dispute"],fields:[],params:[],events:[]}},{version:"2025-07-30.preview",title:"Renames the parameter for custom settlement timing on the Balance Settings API",url:"https://docs.stripe.com/changelog/basil/2025-07-30/balance-settings-delay-days-rename.md",products:"Connect, Payouts",breaking:!0,category:"api",touches:{resources:["balance"],fields:[],params:[],events:[]}},{version:"2025-07-30.preview",title:"Adds UPI support to the Subscriptions and Invoices APIs",url:"https://docs.stripe.com/changelog/basil/2025-07-30/cs-upi-pmo-subscription-support.md",products:"Billing, Invoicing",breaking:!1,category:"api",touches:{resources:["subscription","invoice"],fields:[],params:[],events:[]}},{version:"2025-07-30.preview",title:"Adds Account Links v2 API support for connected accounts created using the Accounts v2 API",url:"https://docs.stripe.com/changelog/basil/2025-07-30/enable-v2-account-links-api-for-connect.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-07-30.preview",title:"Increases payment line items limit to 200",url:"https://docs.stripe.com/changelog/basil/2025-07-30/increase-payment-line-items-limit-to-200.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-07-30.preview",title:"Adds Connect embedded component for Instant Payouts promotion",url:"https://docs.stripe.com/changelog/basil/2025-07-30/instant-payouts-promotion-embedded-component.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2025-07-30.preview",title:"Adds support for payment line items to incremental authorization",url:"https://docs.stripe.com/changelog/basil/2025-07-30/payment-line-items-increment-authorization.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-07-30.preview",title:"Adds support for payment line items to multicapture",url:"https://docs.stripe.com/changelog/basil/2025-07-30/payment-line-items-multicapture.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-07-30.preview",title:"Updates schedule customization for weekly and monthly payouts",url:"https://docs.stripe.com/changelog/basil/2025-07-30/payout_schedule_customization_on_balance_settings.md",products:"Connect, Payouts",breaking:!0,category:"api",touches:{resources:["payout","balance"],fields:["payout_schedule_customization_on_balance_settings"],params:["payout_schedule_customization_on_balance_settings"],events:[]}},{version:"2025-07-30.preview",title:"Adds a new event type for Payout Method updates",url:"https://docs.stripe.com/changelog/basil/2025-07-30/payout-method-updated-webhook-event.md",products:"Payouts",breaking:!1,category:"api",touches:{resources:["payout","event","webhook"],fields:[],params:[],events:[]}},{version:"2025-07-30.preview",title:"Adds support for accepting Apple\u2019s Tap to Pay on iPhone Terms and Conditions on the web",url:"https://docs.stripe.com/changelog/basil/2025-07-30/terminal-onboarding-links.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-08-27.basil",title:"Adds support for third-party tax on flexible billing mode subscriptions",url:"https://docs.stripe.com/changelog/basil/2025-08-27/3p-tax.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription","tax"],fields:[],params:[],events:[]}},{version:"2025-08-27.basil",title:"Adds support for invoice items metadata and period in subscriptions and schedules",url:"https://docs.stripe.com/changelog/basil/2025-08-27/add_invoice_items_metadata_and_period.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription","invoice"],fields:["add_invoice_items_metadata_and_period"],params:["add_invoice_items_metadata_and_period"],events:[]}},{version:"2025-08-27.basil",title:"Adds PayPay settings to the Account object",url:"https://docs.stripe.com/changelog/basil/2025-08-27/add_paypay_payments_settings.md",products:"Connect, Payments",breaking:!1,category:"api",touches:{resources:["account"],fields:["add_paypay_payments_settings"],params:["add_paypay_payments_settings"],events:[]}},{version:"2025-08-27.basil",title:"Adds support for paying out to Financial Accounts v2",url:"https://docs.stripe.com/changelog/basil/2025-08-27/add-payout-method-to-payouts.md",products:"Payouts",breaking:!1,category:"api",touches:{resources:["payout","account"],fields:[],params:[],events:[]}},{version:"2025-08-27.basil",title:"Adds support for Dispute Preventions",url:"https://docs.stripe.com/changelog/basil/2025-08-27/add-preventions-to-dispute.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["dispute","event"],fields:[],params:[],events:[]}},{version:"2025-08-27.basil",title:"Adds the number of installments for Alma payments to Charge objects",url:"https://docs.stripe.com/changelog/basil/2025-08-27/alma-installments.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["charge"],fields:[],params:[],events:[]}},{version:"2025-08-27.basil",title:"Adds support for simulating card payments on Terminal readers",url:"https://docs.stripe.com/changelog/basil/2025-08-27/card-present-payment-method.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-08-27.basil",title:"Adds excluded payment method types to the Payment Intents API",url:"https://docs.stripe.com/changelog/basil/2025-08-27/cs_add_excluded_payment_method_types_pi.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_intent","payment_method"],fields:["cs_add_excluded_payment_method_types_pi"],params:["cs_add_excluded_payment_method_types_pi"],events:[]}},{version:"2025-08-27.basil",title:"Adds a name field to the customer portal configuration object",url:"https://docs.stripe.com/changelog/basil/2025-08-27/customer-portal-config-name.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2025-08-27.basil",title:"Public preview for Payout Details embedded component",url:"https://docs.stripe.com/changelog/basil/2025-08-27/embedded-payout-details-public-preview.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2025-08-27.basil",title:"Adds Payout Details embedded component to the Account Session API",url:"https://docs.stripe.com/changelog/basil/2025-08-27/embedded-payout-details.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["payout","account"],fields:[],params:[],events:[]}},{version:"2025-08-27.basil",title:"Adds support for custom expiration dates to Issuing virtual cards",url:"https://docs.stripe.com/changelog/basil/2025-08-27/issuing-custom-expiration-dates.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-08-27.basil",title:"Makes CVC optional when presenting a payment method on a simulated reader",url:"https://docs.stripe.com/changelog/basil/2025-08-27/make-cvc-optional.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-08-27.basil",title:"Adds support to include the IOF tax in the amount for Pix payments",url:"https://docs.stripe.com/changelog/basil/2025-08-27/pix-payments-iof-tax.md",products:"Checkout, Payments",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2025-08-27.basil",title:"Adds Android APK for Terminal to purpose of file uploads",url:"https://docs.stripe.com/changelog/basil/2025-08-27/terminal-android-apk-file-purpose.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-08-27.basil",title:"Adds support for PayNow on Terminal",url:"https://docs.stripe.com/changelog/basil/2025-08-27/terminal-paynow-api.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-08-27.basil",title:"Adds support for MXN currency in Terminal tipping configuration",url:"https://docs.stripe.com/changelog/basil/2025-08-27/terminal-tipping-configuration-mxn.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-08-27.basil",title:"Adds a Charge transaction ID for several payment methods",url:"https://docs.stripe.com/changelog/basil/2025-08-27/transaction-id.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method","charge"],fields:[],params:[],events:[]}},{version:"2025-08-27.preview",title:"Additional ID number types in Accounts v2",url:"https://docs.stripe.com/changelog/basil/2025-08-27/accounts-v2-support-more-id-types.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-08-27.preview",title:"Nests the Balance Settings request object under a new Payments parameter",url:"https://docs.stripe.com/changelog/basil/2025-08-27/balance-settings-nested-in-payments-field.md",products:"Connect, Payouts",breaking:!0,category:"api",touches:{resources:["balance"],fields:[],params:[],events:[]}},{version:"2025-08-27.preview",title:"Makes flexible billing mode the default for new subscriptions",url:"https://docs.stripe.com/changelog/basil/2025-08-27/billing-mode-default-flexible.md",products:"Billing, Checkout",breaking:!0,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2025-08-27.preview",title:"Adds a display name to the FinancialAccount object",url:"https://docs.stripe.com/changelog/basil/2025-08-27/financial-account-display-name.md",products:"Treasury",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-08-27.preview",title:"Adds support for listing a payment method\u2019s mandates",url:"https://docs.stripe.com/changelog/basil/2025-08-27/mandates_listing_support.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:["mandates_listing_support"],params:["mandates_listing_support"],events:[]}},{version:"2025-08-27.preview",title:"Adds support for payment line items with overcapture",url:"https://docs.stripe.com/changelog/basil/2025-08-27/payment-line-items-overcapture.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-08-27.preview",title:"Additional properties on PaymentRecord and PaymentAttemptRecord",url:"https://docs.stripe.com/changelog/basil/2025-08-27/payment-records.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-08-27.preview",title:"Add the payout_method field as a property on the Payout object",url:"https://docs.stripe.com/changelog/basil/2025-08-27/payout-payout-method.md",products:"Payouts",breaking:!1,category:"api",touches:{resources:["payout"],fields:["payout_method"],params:["payout_method"],events:[]}},{version:"2025-08-27.preview",title:"Removes iterations parameter for subscription schedules",url:"https://docs.stripe.com/changelog/basil/2025-08-27/remove_schedule_phase_iterations.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:["remove_schedule_phase_iterations"],params:["remove_schedule_phase_iterations"],events:[]}},{version:"2025-08-27.preview",title:"Adds support for admin menu passcodes on the Terminal Configuration object",url:"https://docs.stripe.com/changelog/basil/2025-08-27/terminal-configurable-admin-menu-passcode.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-08-27.preview",title:"Adds support for deactivating configurations in Accounts v2",url:"https://docs.stripe.com/changelog/basil/2025-08-27/v2_accounts_configuration_deactivation.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds the Discount source property and removes the Discount coupon property",url:"https://docs.stripe.com/changelog/clover/2025-09-30/add-discount-source-property.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["coupon"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds Japan-specific fields to the Terminal Locations API",url:"https://docs.stripe.com/changelog/clover/2025-09-30/add-japan-fields-to-terminal-locations.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds account balance and payout settings with the Balance Settings API",url:"https://docs.stripe.com/changelog/clover/2025-09-30/balance-settings-ga.md",products:"Connect, Payouts",breaking:!1,category:"api",touches:{resources:["payout","balance","account"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Updates computation of subscription schedule phase end date to consider billing cycle anchor changes",url:"https://docs.stripe.com/changelog/clover/2025-09-30/billing-cycle-anchor-resets-during-phase-computation.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Makes flexible billing mode the default for new subscriptions",url:"https://docs.stripe.com/changelog/clover/2025-09-30/billing-mode-default-flexible.md",products:"Billing, Checkout",breaking:!0,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds a new error code for business type validations",url:"https://docs.stripe.com/changelog/clover/2025-09-30/business-type-error-code.md",products:"Connect",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds a documented reason for Klarna chargeback losses to Disputes API",url:"https://docs.stripe.com/changelog/clover/2025-09-30/chargeback-loss-reason.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["charge","dispute"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds support for setting the capture method for specific payment methods with the Checkout Sessions API",url:"https://docs.stripe.com/changelog/clover/2025-09-30/checkout-capture-method-per-payment-method.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout","payment_method"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds support for collecting business and individual names in Checkout Sessions",url:"https://docs.stripe.com/changelog/clover/2025-09-30/checkout-name-collection.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds support for configuring branding settings for Checkout Sessions",url:"https://docs.stripe.com/changelog/clover/2025-09-30/checkout-sessions-branding-settings.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Prevents reusing client secrets for Intents in certain states when initializing Elements",url:"https://docs.stripe.com/changelog/clover/2025-09-30/client-secret-reuse.md",products:"Elements",breaking:!0,category:"stripejs",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds cash as a value for the crypto token currency enum",url:"https://docs.stripe.com/changelog/clover/2025-09-30/crypto-cash-value.md",products:"Crypto",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds support for custom BBPOS WisePad 3 splash screens",url:"https://docs.stripe.com/changelog/clover/2025-09-30/custom-bbpos-wisepad3-splash-screens.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Updates default behavior for saved payment methods in Elements with Checkout Sessions",url:"https://docs.stripe.com/changelog/clover/2025-09-30/custom-checkout-saved-payment-method-defaults.md",products:"Elements",breaking:!0,category:"stripejs",touches:{resources:["checkout","payment_method"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds support for business and individual names on Customers",url:"https://docs.stripe.com/changelog/clover/2025-09-30/customer-business-individual-names.md",products:"All products",breaking:!1,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds customer portal configuration trial behavior",url:"https://docs.stripe.com/changelog/clover/2025-09-30/customer-portal-trial-behavior.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds the ability to exclude payment methods from Checkout Sessions and Payment Intents",url:"https://docs.stripe.com/changelog/clover/2025-09-30/exclude-payment-methods-checkout-sessions.md",products:"Checkout, Payments",breaking:!1,category:"api",touches:{resources:["checkout","payment_intent","payment_method"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds specific descriptions for risk requirements during legal, PEP, and sanctions review",url:"https://docs.stripe.com/changelog/clover/2025-09-30/expanded-risk-requirement-descriptions.md",products:"Connect",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds new error codes for failures when creating Payment Methods from Financial Connections Accounts",url:"https://docs.stripe.com/changelog/clover/2025-09-30/financial-connections-payment-method-error-codes.md",products:"Financialconnections, Invoicing, Payments",breaking:!1,category:"api",touches:{resources:["payment_method","account"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds support for printing a second line on Issuing physical cards",url:"https://docs.stripe.com/changelog/clover/2025-09-30/issuing_card_second_line.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:[],fields:["issuing_card_second_line"],params:["issuing_card_second_line"],events:[]}},{version:"2025-09-30.clover",title:"Adds the ability to itemize proration discount amounts",url:"https://docs.stripe.com/changelog/clover/2025-09-30/itemize-proration-discount-amounts.md",products:"Billing, Checkout, Invoicing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Changes the set of decline codes used for Alma, Amazon Pay, Billie, Satispay, and South Korean payment methods",url:"https://docs.stripe.com/changelog/clover/2025-09-30/lpm-descriptive-decline-codes.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds support for the MB WAY payment method",url:"https://docs.stripe.com/changelog/clover/2025-09-30/mb-way-payments.md",products:"Checkout, Elements, Paymentlinks, Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Promotion Codes now reference Coupons using a polymorphic field for promotions",url:"https://docs.stripe.com/changelog/clover/2025-09-30/polymorphic-coupon.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["coupon","promotion_code"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Removes postal code for card payments in certain regions on Checkout and Payment Element",url:"https://docs.stripe.com/changelog/clover/2025-09-30/postal_code_in_card_form_for_non_us_countries.md",products:"Checkout, Elements",breaking:!0,category:"stripejs",touches:{resources:["checkout"],fields:["postal_code_in_card_form_for_non_us_countries"],params:["postal_code_in_card_form_for_non_us_countries"],events:[]}},{version:"2025-09-30.clover",title:"Enables specifying units of measurement for Products",url:"https://docs.stripe.com/changelog/clover/2025-09-30/product-data-unit-label.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["product"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds additional enum values for Radar manual reviews",url:"https://docs.stripe.com/changelog/clover/2025-09-30/radar-manual-review-enum.md",products:"Radar",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Removes currency conversion field from Checkout Sessions",url:"https://docs.stripe.com/changelog/clover/2025-09-30/remove-checkout-session-currency-conversion-field.md",products:"Checkout",breaking:!0,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Removes iterations parameter for subscription schedules",url:"https://docs.stripe.com/changelog/clover/2025-09-30/remove-iterations.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Removes support for the redirectToCheckout method",url:"https://docs.stripe.com/changelog/clover/2025-09-30/remove-redirect-to-checkout.md",products:"Checkout",breaking:!0,category:"stripejs",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Updates risk levels for Issuing Authorizations to use standard values",url:"https://docs.stripe.com/changelog/clover/2025-09-30/risk-levels-issuing-authorizations.md",products:"Issuing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds a processing status to submitted stablecoin payments",url:"https://docs.stripe.com/changelog/clover/2025-09-30/stablecoin-payments-processing-status.md",products:"Payments",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds a testing developer assistant in Elements with Intents",url:"https://docs.stripe.com/changelog/clover/2025-09-30/stripe-js-developer-assistant.md",products:"Elements",breaking:!1,category:"stripejs",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Removes deprecated messaging and bank elements that were replaced",url:"https://docs.stripe.com/changelog/clover/2025-09-30/stripejs-deprecated-elements-removal.md",products:"Elements",breaking:!0,category:"stripejs",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Adds tax calculation provider to Tax settings",url:"https://docs.stripe.com/changelog/clover/2025-09-30/tax-calculation-provider.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2025-09-30.clover",title:"Updates initCheckout to be synchronous",url:"https://docs.stripe.com/changelog/clover/2025-09-30/update-init-checkout-synchronous.md",products:"Checkout, Elements",breaking:!0,category:"stripejs",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2025-09-30.preview",title:"Adds support for PayPay as a local payment method",url:"https://docs.stripe.com/changelog/clover/2025-09-30/add-paypay-public-preview.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-09-30.preview",title:"Adds the unit label parameter to the product data hash",url:"https://docs.stripe.com/changelog/clover/2025-09-30/add-product-data-unit-label-preview.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["product"],fields:[],params:[],events:[]}},{version:"2025-09-30.preview",title:"Adds the ability to update automatic tax, invoice creation, and invoice settings for Checkout Sessions",url:"https://docs.stripe.com/changelog/clover/2025-09-30/checkout-sessions-tax-and-invoice-settings.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout","invoice","tax"],fields:[],params:[],events:[]}},{version:"2025-09-30.preview",title:"Adds the ability to choose how you submit a dispute response",url:"https://docs.stripe.com/changelog/clover/2025-09-30/dispute-submission-method.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["dispute"],fields:[],params:[],events:[]}},{version:"2025-09-30.preview",title:"Adds per-currency minimum balances for automatic payouts on the Balance Settings API",url:"https://docs.stripe.com/changelog/clover/2025-09-30/minimum-balance-by-currency-on-balance-settings.md",products:"Connect, Payouts",breaking:!1,category:"api",touches:{resources:["payout","balance"],fields:[],params:[],events:[]}},{version:"2025-09-30.preview",title:"Moves platform-specific identity fields to a default profile for Accounts",url:"https://docs.stripe.com/changelog/clover/2025-09-30/moving-identity-fields.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-09-30.preview",title:"Adds Outbound Setup Intents to create usable payout methods",url:"https://docs.stripe.com/changelog/clover/2025-09-30/outbound-setup-intents.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payout","setup_intent"],fields:[],params:[],events:[]}},{version:"2025-09-30.preview",title:"Updating Balance Settings no longer requires specifying payment settings",url:"https://docs.stripe.com/changelog/clover/2025-09-30/payments-field-optional-for-update-balance-settings.md",products:"Connect, Payouts",breaking:!1,category:"api",touches:{resources:["balance"],fields:[],params:[],events:[]}},{version:"2025-09-30.preview",title:"Restructures Smart Disputes recommended evidence field",url:"https://docs.stripe.com/changelog/clover/2025-09-30/restructure-smart-disputes-recommended-evidence.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["dispute"],fields:[],params:[],events:[]}},{version:"2025-09-30.preview",title:"Enables prebilling for subscriptions",url:"https://docs.stripe.com/changelog/clover/2025-09-30/subscriptions-prebilling.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2025-09-30.preview",title:"Adds pagination and updates fields for aggregrated Billing meter usage data",url:"https://docs.stripe.com/changelog/clover/2025-09-30/update-meter-usage-fields.md",products:"Billing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds third-party tax providers for automatic tax calculation",url:"https://docs.stripe.com/changelog/clover/2025-10-29/automatic-tax-provider.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds a webhook event type for updates to the balance settings for connected accounts",url:"https://docs.stripe.com/changelog/clover/2025-10-29/balance-settings-updated-webhook.md",products:"Connect, Payouts",breaking:!1,category:"api",touches:{resources:["balance","account","event","webhook"],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Updates the category field of Credit Grants to be optional",url:"https://docs.stripe.com/changelog/clover/2025-10-29/credit-grant-optional-category.md",products:"Billing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds crypto network support for Solana",url:"https://docs.stripe.com/changelog/clover/2025-10-29/crypto-network-solana.md",products:"Crypto",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds support for custom payment methods",url:"https://docs.stripe.com/changelog/clover/2025-10-29/custom-payment-methods.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds support for specifying payment method configurations to the customer portal",url:"https://docs.stripe.com/changelog/clover/2025-10-29/customer-portal-payment-method-configurations.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["customer","payment_method"],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds support for Customer Sessions for Mobile Payment Element and Customer Sheet",url:"https://docs.stripe.com/changelog/clover/2025-10-29/customer-sessions-mpe-customer-sheet.md",products:"Elements, Payments",breaking:!1,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds the ability to exclude payment methods when using Setup Intents",url:"https://docs.stripe.com/changelog/clover/2025-10-29/exclude-payment-methods-setup-intents.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method","setup_intent"],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds a webhook event type for Invoices that require a non-Stripe payment",url:"https://docs.stripe.com/changelog/clover/2025-10-29/invoice-payment-attempt-required-event.md",products:"Billing, Invoicing",breaking:!1,category:"api",touches:{resources:["invoice","event","webhook"],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds support for using Payment Records with Invoices and Credit Notes",url:"https://docs.stripe.com/changelog/clover/2025-10-29/invoicing-payment-records.md",products:"Billing, Invoicing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds a subscription reference to Klarna line items in Payment Intents",url:"https://docs.stripe.com/changelog/clover/2025-10-29/klarna-items-payment-intents.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["subscription","payment_intent"],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds Klarna reference parameters for line items in Payment Intents",url:"https://docs.stripe.com/changelog/clover/2025-10-29/klarna-line-item-reference.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_intent"],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds MB WAY payment method to Payment Links and Checkout Sessions",url:"https://docs.stripe.com/changelog/clover/2025-10-29/mb-way-payment-link-checkout-sessions.md",products:"Checkout, Paymentlinks",breaking:!1,category:"api",touches:{resources:["checkout","payment_method","payment_link"],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds MB WAY to payment method configurations",url:"https://docs.stripe.com/changelog/clover/2025-10-29/mb-way-payment-method-configuration.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds support for payment line items",url:"https://docs.stripe.com/changelog/clover/2025-10-29/payment-line-items.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds support for collecting business and individual names on Payment Links",url:"https://docs.stripe.com/changelog/clover/2025-10-29/payment-links-name-collection.md",products:"Paymentlinks",breaking:!1,category:"api",touches:{resources:["payment_link"],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds Payment Records and Payment Attempt Records",url:"https://docs.stripe.com/changelog/clover/2025-10-29/payment-records.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds the ability to attest to an Account\u2019s authorized company representative",url:"https://docs.stripe.com/changelog/clover/2025-10-29/representative-declaration.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds support for managing stablecoin payments with Payment Method Configurations",url:"https://docs.stripe.com/changelog/clover/2025-10-29/stablecoin-payments-pmc.md",products:"Crypto, Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds blockchain transaction hash to stablecoin refunds",url:"https://docs.stripe.com/changelog/clover/2025-10-29/stablecoin-refunds-reference-details.md",products:"Crypto, Payments",breaking:!1,category:"api",touches:{resources:["refund"],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds support for remote sellers in Taiwan to Stripe Tax",url:"https://docs.stripe.com/changelog/clover/2025-10-29/stripe-tax-taiwan-remote-support.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds a field for a Terminal reader\u2019s last connection timestamp",url:"https://docs.stripe.com/changelog/clover/2025-10-29/terminal-reader-last-seen.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds support for tipping in Gibraltar pounds on Terminal readers",url:"https://docs.stripe.com/changelog/clover/2025-10-29/terminal-tips-gip.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds TWINT payment method options to Checkout Sessions",url:"https://docs.stripe.com/changelog/clover/2025-10-29/twint-checkout-sessions.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout","payment_method"],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds the ability to upload your platform\u2019s terms of service agreement",url:"https://docs.stripe.com/changelog/clover/2025-10-29/upload-file-terms-of-service.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-10-29.clover",title:"Adds support for filtering by event type to Events v2",url:"https://docs.stripe.com/changelog/clover/2025-10-29/v2-events-api-filtering.md",products:"All products",breaking:!1,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2025-10-29.preview",title:"Adds new error code for missing verification data from connected accounts",url:"https://docs.stripe.com/changelog/clover/2025-10-29/accounts-verification-data-error.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-10-29.preview",title:"Adds new error codes for the crypto wallet payout method",url:"https://docs.stripe.com/changelog/clover/2025-10-29/crypto-wallet-errors.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2025-10-29.preview",title:"Adds Tax ID Element support to Customer Sessions",url:"https://docs.stripe.com/changelog/clover/2025-10-29/cs-add-tax-id-element-to-customer-session.md",products:"Elements",breaking:!1,category:"api",touches:{resources:["customer","tax"],fields:[],params:[],events:[]}},{version:"2025-10-29.preview",title:"Adds support for listing US and GB bank accounts",url:"https://docs.stripe.com/changelog/clover/2025-10-29/list-bank-accounts.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-10-29.preview",title:"Adds support for microdeposits to US Bank Accounts",url:"https://docs.stripe.com/changelog/clover/2025-10-29/microdeposits-us-bank-accounts.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-10-29.preview",title:"Adds support for using Accounts v2 payment method billing details for Stripe Tax location",url:"https://docs.stripe.com/changelog/clover/2025-10-29/payment-method-location-source.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["payment_method","account","tax"],fields:[],params:[],events:[]}},{version:"2025-10-29.preview",title:"Updates to Payment Record APIs",url:"https://docs.stripe.com/changelog/clover/2025-10-29/payment-records-updates.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-10-29.preview",title:"Adds support for retrieving and listing closed v2 Accounts",url:"https://docs.stripe.com/changelog/clover/2025-10-29/return-closed-v2-accounts.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-10-29.preview",title:"Adds tracking for which tax provider resolved a Customer location",url:"https://docs.stripe.com/changelog/clover/2025-10-29/tax-provider-customer-location.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["customer","tax"],fields:[],params:[],events:[]}},{version:"2025-10-29.preview",title:"Adds the ability to update the metadata and display name of a Financial Account",url:"https://docs.stripe.com/changelog/clover/2025-10-29/update-financial-account.md",products:"Treasury",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-10-29.preview",title:"Adds the ability to attest to the authorized company representative for Accounts v2",url:"https://docs.stripe.com/changelog/clover/2025-10-29/v2-representative-declaration.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-11-17.clover",title:"Adds the ability to specify the capture method for card present payments with Payment Intents",url:"https://docs.stripe.com/changelog/clover/2025-11-17/card-present-capture-method.md",products:"Terminal, Payments",breaking:!1,category:"api",touches:{resources:["payment_intent"],fields:[],params:[],events:[]}},{version:"2025-11-17.clover",title:"Adds filtering by creation date to Customer Balance Transactions lists",url:"https://docs.stripe.com/changelog/clover/2025-11-17/customer-balance-transactions-list-created.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["customer","balance"],fields:[],params:[],events:[]}},{version:"2025-11-17.clover",title:"Makes client secret optional for Financial Connections Sessions",url:"https://docs.stripe.com/changelog/clover/2025-11-17/financial-connections-client-secret.md",products:"Financialconnections",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-11-17.clover",title:"Adds fraud risk assessments to Issuing Authorizations",url:"https://docs.stripe.com/changelog/clover/2025-11-17/fraud-risk-assessments-for-issuing-authorizations.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-11-17.clover",title:"Adds Finom as a supported iDEAL issuer",url:"https://docs.stripe.com/changelog/clover/2025-11-17/ideal-payments-finom.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-11-17.clover",title:"Adds the transaction ID to iDEAL payment method details",url:"https://docs.stripe.com/changelog/clover/2025-11-17/ideal-transaction-id.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-11-17.clover",title:"Adds filtering by creation date to Invoice Payment lists",url:"https://docs.stripe.com/changelog/clover/2025-11-17/invoice-payments-list-created.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2025-11-17.clover",title:"Adds a fraud warning for potentially compromised Issuing Cards",url:"https://docs.stripe.com/changelog/clover/2025-11-17/issuing-fraud-warnings.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-11-17.clover",title:"Adds MB WAY and TWINT to destination details for refunds",url:"https://docs.stripe.com/changelog/clover/2025-11-17/mb-way-twint-destination-details-for-refunds.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["refund"],fields:[],params:[],events:[]}},{version:"2025-11-17.clover",title:"Adds support for automatic tax transactions to Payment Intents",url:"https://docs.stripe.com/changelog/clover/2025-11-17/payment-intents-tax-support.md",products:"Tax, Payments",breaking:!1,category:"api",touches:{resources:["payment_intent","tax"],fields:[],params:[],events:[]}},{version:"2025-11-17.clover",title:"Adds the ability to specify a payment method configuration in the customer portal",url:"https://docs.stripe.com/changelog/clover/2025-11-17/portal-payment-method-configuration.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["customer","payment_method"],fields:[],params:[],events:[]}},{version:"2025-11-17.clover",title:"Adds support for using a web browser to accept Apple\u2019s terms and conditions for Tap to Pay on iPhone",url:"https://docs.stripe.com/changelog/clover/2025-11-17/terminal-onboarding-links.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-11-17.clover",title:"Adds support for handling tokenized bank account numbers",url:"https://docs.stripe.com/changelog/clover/2025-11-17/tokenized-account-numbers.md",products:"Payments, Financialconnections",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-11-17.preview",title:"Adds the capabilty to hold EUR funds to Accounts v2",url:"https://docs.stripe.com/changelog/clover/2025-11-17/account-v2-storer-config-eur.md",products:"All products",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-11-17.preview",title:"Adds future requirements field to Accounts v2",url:"https://docs.stripe.com/changelog/clover/2025-11-17/accounts-v2-future-requirements.md",products:"All products",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-11-17.preview",title:"Adds support for Konbini payments and Japanese statement descriptors in Accounts v2",url:"https://docs.stripe.com/changelog/clover/2025-11-17/accounts-v2-konbini-payments.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-11-17.preview",title:"Updates requirements collection parameters for Accounts v2",url:"https://docs.stripe.com/changelog/clover/2025-11-17/accounts-v2-requirements-collection.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-11-17.preview",title:"Adds account and person tokens to Accounts v2 to securely transmit sensitive data",url:"https://docs.stripe.com/changelog/clover/2025-11-17/accounts-v2-tokens.md",products:"All products",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-11-17.preview",title:"Adds support for Argentine ID types",url:"https://docs.stripe.com/changelog/clover/2025-11-17/argentine-id-types.md",products:"Identity, Connect",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-11-17.preview",title:"Adds health alerts for when events fail to generate",url:"https://docs.stripe.com/changelog/clover/2025-11-17/event-generation-failure-alert.md",products:"All products",breaking:!0,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2025-11-17.preview",title:"Adds industry-specific transaction details and purchase data for cards and Klarna",url:"https://docs.stripe.com/changelog/clover/2025-11-17/industry-fields-cards-klarna.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-11-17.preview",title:"Meter Usage Analytics adds support for filtering multiple tenants and dimension values",url:"https://docs.stripe.com/changelog/clover/2025-11-17/meter-usage-tenant-dimension-filters.md",products:"Billing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-11-17.preview",title:"Adds support for PayPay to Accounts",url:"https://docs.stripe.com/changelog/clover/2025-11-17/paypay-connect.md",products:"Payments, Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-11-17.preview",title:"Adds support for Accounts v2 to accept the terms of service for storing stablecoins",url:"https://docs.stripe.com/changelog/clover/2025-11-17/stablecoin-fa-tos.md",products:"Crypto, Treasury",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-11-17.preview",title:"Tax Associations now always return the list of attempted tax transactions",url:"https://docs.stripe.com/changelog/clover/2025-11-17/tax-assocation-transaction-attempts.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2025-11-17.preview",title:"Thin events now include field changes on related objects",url:"https://docs.stripe.com/changelog/clover/2025-11-17/thin-events-changes.md",products:"All products",breaking:!1,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2025-11-17.preview",title:"PaymentMethods can now list payment methods for a customer account using Accounts v2",url:"https://docs.stripe.com/changelog/clover/2025-11-17/v2-accounts-payment-methods.md",products:"Connect, Payments",breaking:!1,category:"api",touches:{resources:["customer","payment_method","account"],fields:[],params:[],events:[]}},{version:"2025-12-15.clover",title:"Accounts now support digital attestation for proof of registration and beneficial ownership verification",url:"https://docs.stripe.com/changelog/clover/2025-12-15/accounts-digital-attestation.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-12-15.clover",title:"Adds the customer account property to v1 APIs for Accounts v2 interoperability",url:"https://docs.stripe.com/changelog/clover/2025-12-15/accounts-v2-v1-api-support.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["customer","account"],fields:[],params:[],events:[]}},{version:"2025-12-15.clover",title:"Connect platforms can now use Accounts v2 to manage connected accounts and customers",url:"https://docs.stripe.com/changelog/clover/2025-12-15/accounts-v2.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["customer","account"],fields:[],params:[],events:[]}},{version:"2025-12-15.clover",title:"Adds additional card payment method details to Payment Records",url:"https://docs.stripe.com/changelog/clover/2025-12-15/card-payment-method-details-payment-record.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-12-15.clover",title:"Adds the ability to filter customer balance transactions by invoice",url:"https://docs.stripe.com/changelog/clover/2025-12-15/customer-balance-transations-list-invoice.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["customer","invoice","balance"],fields:[],params:[],events:[]}},{version:"2025-12-15.clover",title:"Subscriptions updated from the Customer Portal can now also modify their billing cycle anchor",url:"https://docs.stripe.com/changelog/clover/2025-12-15/customer-portal-billing-cycle-anchor.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription","customer"],fields:[],params:[],events:[]}},{version:"2025-12-15.clover",title:"Enables expansion for invoice pricing details",url:"https://docs.stripe.com/changelog/clover/2025-12-15/expandable-price-details-price.md",products:"Invoicing",breaking:!1,category:"api",touches:{resources:["invoice","price"],fields:[],params:[],events:[]}},{version:"2025-12-15.clover",title:"Adds expected debit date for bank debit payments",url:"https://docs.stripe.com/changelog/clover/2025-12-15/expected-debit-date-on-charges.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["charge"],fields:[],params:[],events:[]}},{version:"2025-12-15.clover",title:"Adds subtotal property to Invoice Line Items",url:"https://docs.stripe.com/changelog/clover/2025-12-15/invoice-line-item-subtotal.md",products:"Billing, Invoicing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2025-12-15.clover",title:"Adds Mollie as a supported iDEAL issuer",url:"https://docs.stripe.com/changelog/clover/2025-12-15/mollie-ideal-issuer.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-12-15.clover",title:"Adds support for the PayTo payment method",url:"https://docs.stripe.com/changelog/clover/2025-12-15/payto.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2025-12-15.clover",title:"Adds the ability to update line items on existing Checkout Sessions with a custom UI",url:"https://docs.stripe.com/changelog/clover/2025-12-15/update-line-items.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2025-12-15.preview",title:"Account Tokens no longer require identity information on creation",url:"https://docs.stripe.com/changelog/clover/2025-12-15/account-tokens-identity-optional.md",products:"All products",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-12-15.preview",title:"Removes requested field from Accounts v2 capabilities hashes",url:"https://docs.stripe.com/changelog/clover/2025-12-15/accounts-v2-capabilities-remove-requested.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-12-15.preview",title:"Accounts v2 now always returns the responsibilities field when the defaults field is included",url:"https://docs.stripe.com/changelog/clover/2025-12-15/accounts-v2-responsibilities.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2025-12-15.preview",title:"Global Payouts adds support for 13 new countries for cross-border payouts",url:"https://docs.stripe.com/changelog/clover/2025-12-15/cross-border-payouts-new-countries.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2025-12-15.preview",title:"Adds generic error types for Payout Methods",url:"https://docs.stripe.com/changelog/clover/2025-12-15/generic-error-types-payout-methods.md",products:"Payouts",breaking:!0,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2025-12-15.preview",title:"Creating a Payout Method now triggers an event",url:"https://docs.stripe.com/changelog/clover/2025-12-15/payout-method-created-event.md",products:"Payouts",breaking:!1,category:"api",touches:{resources:["payout","event"],fields:[],params:[],events:[]}},{version:"2025-12-15.preview",title:"Adds support for retrieving information about reserves",url:"https://docs.stripe.com/changelog/clover/2025-12-15/reserves-retrieve-api.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2025-12-15.preview",title:"Adds support for tracking transfers from connected accounts to financial accounts",url:"https://docs.stripe.com/changelog/clover/2025-12-15/transfers-to-financial-accounts.md",products:"All products",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-01-28.clover",title:"Adds support for 3D Secure versions 2.3.0 and 2.3.1",url:"https://docs.stripe.com/changelog/clover/2026-01-28/3d-secure-version-support.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-01-28.clover",title:"Adds the contact phone parameter to the Accounts API",url:"https://docs.stripe.com/changelog/clover/2026-01-28/accounts-contact-phone.md",products:"All products",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-01-28.clover",title:"Adds the ability to specify a company\u2019s registration date on Accounts v2 objects",url:"https://docs.stripe.com/changelog/clover/2026-01-28/accounts-v2-registration-date.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-01-28.clover",title:"Adds Adyen as an issuer for iDEAL payments",url:"https://docs.stripe.com/changelog/clover/2026-01-28/adds-adyen-as-an-issuer-for-ideal-payments.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-01-28.clover",title:"Changes currency mapping for Bulgaria from BGN to EUR",url:"https://docs.stripe.com/changelog/clover/2026-01-28/bulgaria-currency-mapping-bgn-to-eur.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-01-28.clover",title:"Adds adjustable quantity to the line items response",url:"https://docs.stripe.com/changelog/clover/2026-01-28/line-items-adjustable-quantity.md",products:"Checkout, Paymentlinks",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-01-28.clover",title:"Adds the ability to opt out of strict arithmetic validation for Payment Line Items",url:"https://docs.stripe.com/changelog/clover/2026-01-28/loosen-arithmetic-validation-for-payment-line-items.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-01-28.clover",title:"Adds the ability to monitor reserve activity on Balance Transactions and reconcile Risk Reserved balance changes",url:"https://docs.stripe.com/changelog/clover/2026-01-28/monitor-reserve-activity-on-balance-transactions.md",products:"Payments, Payouts",breaking:!1,category:"api",touches:{resources:["balance"],fields:[],params:[],events:[]}},{version:"2026-01-28.clover",title:"Adds OpenAPI artifacts containing v2 API endpoints",url:"https://docs.stripe.com/changelog/clover/2026-01-28/openapi-with-v2-apis.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-01-28.clover",title:"Adds support for Polish NIP tax ID type",url:"https://docs.stripe.com/changelog/clover/2026-01-28/polish-nip-tax-id-type.md",products:"Tax, Checkout, Invoicing",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2026-01-28.clover",title:"Reintroduces the ability to set an amount-off coupon\u2019s duration to forever",url:"https://docs.stripe.com/changelog/clover/2026-01-28/reintroduce-forever-amount-off-coupon.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["coupon"],fields:[],params:[],events:[]}},{version:"2026-01-28.clover",title:"Adds the top-up field to Treasury ReceivedDebit linked flows",url:"https://docs.stripe.com/changelog/clover/2026-01-28/treasury-received-debit-linked-flows-topup.md",products:"Treasury",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-01-28.preview",title:"Adds PayPay onboarding parameters to the Accounts API",url:"https://docs.stripe.com/changelog/clover/2026-01-28/accounts-paypay-onboarding.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-01-28.preview",title:"Adds alternative reference field to bank account and payout method resources",url:"https://docs.stripe.com/changelog/clover/2026-01-28/alternative-reference-field.md",products:"Payouts",breaking:!1,category:"api",touches:{resources:["payout","account"],fields:[],params:[],events:[]}},{version:"2026-01-28.preview",title:"Adds fingerprint property to card payout methods",url:"https://docs.stripe.com/changelog/clover/2026-01-28/card-payout-methods-fingerprint-property.md",products:"Payouts",breaking:!1,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2026-01-28.preview",title:"Global Payouts adds support for 15 new countries for cross-border payouts",url:"https://docs.stripe.com/changelog/clover/2026-01-28/cross-border-payouts-new-countries.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2026-01-28.preview",title:"Adds the ability to detach a PaymentIntent from an Invoice",url:"https://docs.stripe.com/changelog/clover/2026-01-28/detach-payment-from-invoice.md",products:"Invoicing",breaking:!1,category:"api",touches:{resources:["invoice","payment_intent"],fields:[],params:[],events:[]}},{version:"2026-01-28.preview",title:"Adds account holder information to Financial Address credentials for US bank accounts",url:"https://docs.stripe.com/changelog/clover/2026-01-28/financial-address-account-holder-information.md",products:"Financialconnections",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-01-28.preview",title:"Adds the ability to relink deactivated Financial Connections Accounts",url:"https://docs.stripe.com/changelog/clover/2026-01-28/financial-connections-relink.md",products:"Financialconnections",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-01-28.preview",title:"Adds event type for updates on a line of credit when using Capital for Platforms",url:"https://docs.stripe.com/changelog/clover/2026-01-28/line-of-credit-event.md",products:"Capital",breaking:!1,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2026-01-28.preview",title:"Updates error codes for the Outbound Setup Intents API",url:"https://docs.stripe.com/changelog/clover/2026-01-28/outbound-setup-intents-error-codes.md",products:"Payouts",breaking:!0,category:"api",touches:{resources:["setup_intent"],fields:[],params:[],events:[]}},{version:"2026-01-28.preview",title:"Removes the source type parameter when creating new Stripe balance payment methods",url:"https://docs.stripe.com/changelog/clover/2026-01-28/stripe-balance-remove-source-type.md",products:"Invoicing, Payments",breaking:!1,category:"api",touches:{resources:["payment_method","balance"],fields:[],params:[],events:[]}},{version:"2026-02-25.clover",title:"Adds Pay by Bank to the Billing API",url:"https://docs.stripe.com/changelog/clover/2026-02-25/billing-api-pay-by-bank.md",products:"Billing, Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-02-25.clover",title:"Adds display name and service user number to Bacs Direct Debit mandates",url:"https://docs.stripe.com/changelog/clover/2026-02-25/display-name-and-service-user-number.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-02-25.clover",title:"Makes Boleto tax ID nullable in payment method details for Payment Records",url:"https://docs.stripe.com/changelog/clover/2026-02-25/makes-tax-id-field-nullable-in-boleto-payment-method-details.md",products:"All products",breaking:!1,category:"api",touches:{resources:["payment_method","tax"],fields:[],params:[],events:[]}},{version:"2026-02-25.clover",title:"Adds events for reserve holds, releases, and plans",url:"https://docs.stripe.com/changelog/clover/2026-02-25/reserve-holds-releases-plans-events.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2026-02-25.clover",title:"Adds settlement type to Application Fee objects",url:"https://docs.stripe.com/changelog/clover/2026-02-25/settlement-type.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-02-25.clover",title:"Adds support for Sri Lanka VAT numbers",url:"https://docs.stripe.com/changelog/clover/2026-02-25/sri-lanka-tax-id.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2026-02-25.clover",title:"Adds support for the Stripe Reader S710",url:"https://docs.stripe.com/changelog/clover/2026-02-25/stripe-reader-s710.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-02-25.clover",title:"Adds payment behavior control for subscription item deletion",url:"https://docs.stripe.com/changelog/clover/2026-02-25/subscription-item-deletion-payment-behavior-control.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2026-02-25.clover",title:"Adds support for tax collection in Sri Lanka for digital services",url:"https://docs.stripe.com/changelog/clover/2026-02-25/tax-registrations-sri-lanka.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2026-02-25.clover",title:"Adds the ability to manage cellular connectivity settings for Terminal readers",url:"https://docs.stripe.com/changelog/clover/2026-02-25/terminal-cellular-configuration.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-02-25.clover",title:"Adds Terminal reader and location to payment method details",url:"https://docs.stripe.com/changelog/clover/2026-02-25/terminal-reader-and-location.md",products:"Payments, Terminal",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-02-25.clover",title:"Adds support for uploading Terminal Wi-Fi certificates and private keys",url:"https://docs.stripe.com/changelog/clover/2026-02-25/terminal-wifi-certificates-and-private-keys.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-02-25.clover",title:"Adds transaction purpose to PaymentIntents for US bank account payments",url:"https://docs.stripe.com/changelog/clover/2026-02-25/us-bank-account-payments-transaction-purpose.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_intent","account"],fields:[],params:[],events:[]}},{version:"2026-02-25.preview",title:"Expands cross-border payout destinations to 12 additional countries",url:"https://docs.stripe.com/changelog/clover/2026-02-25/cross-border-payouts-new-countries.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2026-02-25.preview",title:"Introduces Managed Payments, Stripe\u2019s merchant of record solution",url:"https://docs.stripe.com/changelog/clover/2026-02-25/managed-payments.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-02-25.preview",title:"Adds the ability to specify the purpose of Outbound Payments",url:"https://docs.stripe.com/changelog/clover/2026-02-25/outbound-payments-purpose.md",products:"Payouts",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-02-25.preview",title:"Expands bank account identification details in payout method responses",url:"https://docs.stripe.com/changelog/clover/2026-02-25/payout-method-bank-account-identification.md",products:"All products",breaking:!1,category:"api",touches:{resources:["payout","account"],fields:[],params:[],events:[]}},{version:"2026-02-25.preview",title:"Adds Smart Disputes settings to v2 Accounts",url:"https://docs.stripe.com/changelog/clover/2026-02-25/smart-disputes-v2-accounts.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["dispute","account"],fields:[],params:[],events:[]}},{version:"2026-02-25.preview",title:"Make the flow property nullable on Transactions",url:"https://docs.stripe.com/changelog/clover/2026-02-25/transaction-flow-nullable.md",products:"Treasury",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Adds presentment details for Adaptive Pricing Subscriptions",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/add-presentment-details-for-subscriptions.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Changes the Address Element state field to default to Latin-formatted characters",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/address-element-getvalue-and-change-event-formatting.md",products:"Elements",breaking:!0,category:"stripejs",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Adds crypto fingerprint support to Radar value list items",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/adds-crypto-fingerprint-support-to-radar-value-list-items.md",products:"Radar, Crypto",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Adds integration identifier parameter to Checkout Sessions",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/adds-integration-identifier-parameter-to-checkout-sessions.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Adds metadata property to credit note line items",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/adds-metadata-field-to-credit-note-line-items.md",products:"Invoicing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Adds retention policy cancellation reason to Subscriptions",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/adds-new-cancellation-reason-subscription-test-retention-policy.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Adds pending invoice item interval parameter to create Checkout Sessions",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/adds-pending-invoice-item-interval-parameter-to-checkout-sessions.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout","invoice"],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Adds support for the UPI payment method",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/adds-support-for-the-upi-payment-method.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Adds Tempo network support for crypto payments",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/adds-tempo-network-enum-for-crypto-payments.md",products:"Payments, Crypto",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Adds risk requirements to the Capabilities API",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/capabilities-api-risk-requirements.md",products:"Connect",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Removes support for boolean values in options.layout.radios",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/disallow-booleans-for-radios.md",products:"Elements",breaking:!0,category:"stripejs",touches:{resources:[],fields:[],params:[],events:["options.layout.radios"]}},{version:"2026-03-25.dahlia",title:"Updates the elements.update() method to return a Promise",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/elements-update-returns-promise.md",products:"Elements",breaking:!0,category:"stripejs",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Adds payment method-level support for configuring future usage of crypto payment methods in Checkout Sessions",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/expands-crypto-payment-method-options-for-checkout-sessions.md",products:"Payments, Crypto",breaking:!1,category:"api",touches:{resources:["checkout","payment_method"],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Adds decimal quantity support for Invoice Items and Invoice Line Items",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/invoice-items-decimal-quantity.md",products:"Invoicing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Adds support for limiting the number of allowed payments for Issuing cards",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/issuing-card-lifecycle-controls.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Adds marine carbon removal as a new Climate Orders pathway",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/marine-carbon-removal-pathway.md",products:"Climate",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Updates card property requirements and adds 3D Secure authentication properties to Payment Records",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/payment-records-card-property-requirements-and-3d-secure-properties.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Removes the requirement for certain connected accounts to collect external account information in the Account Sessions API",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/relaxed_external_account_collection_account_session.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:["relaxed_external_account_collection_account_session"],params:["relaxed_external_account_collection_account_session"],events:[]}},{version:"2026-03-25.dahlia",title:"Removes deprecated Payment Intents, Setup Intents, and Sources methods from Stripe.js",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/remove-legacy-stripejs-methods.md",products:"Payments",breaking:!0,category:"stripejs",touches:{resources:["payment_intent","setup_intent"],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Renames Checkout initialization method",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/rename-init-checkout-to-init-checkout-elements.md",products:"Checkout, Elements",breaking:!0,category:"stripejs",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Renames Embedded Checkout initialization method",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/rename-init-embedded-checkout-to-create-embedded-checkout-page.md",products:"Checkout",breaking:!0,category:"stripejs",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Updates Checkout Session UI mode enum values",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/updates-available-checkout-session-ui-modes.md",products:"Checkout, Paymentlinks",breaking:!0,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2026-03-25.dahlia",title:"Updates the events_from parameter on event destinations to accept string values",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/updates-eventsfrom-parameter-on-event-destinations.md",products:"All products",breaking:!0,category:"api",touches:{resources:["event"],fields:["events_from"],params:["events_from"],events:[]}},{version:"2026-03-25.dahlia",title:"Updates the Issuing Token card reference ID for Visa to be optional",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/visa-card-reference-id-optional.md",products:"Issuing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-03-25.preview",title:"Restricts Accounts v2 identity properties for some Global Payouts use cases",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/accounts-identity-fields-global-payouts.md",products:"Payouts",breaking:!0,category:"api",touches:{resources:["payout","account"],fields:[],params:[],events:[]}},{version:"2026-03-25.preview",title:"Adds time zone support to the Accounts v2 API",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/accounts-v2-time-zone-support.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-03-25.preview",title:"Adds a description and counterparty to transactions",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/adds-description-and-counterparty-to-transactions.md",products:"Treasury",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-03-25.preview",title:"Adds pending invoice item interval parameter to update Checkout Sessions",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/adds-pending-invoice-item-interval-parameter-to-checkout-sessions-update.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout","invoice"],fields:[],params:[],events:[]}},{version:"2026-03-25.preview",title:"Adds Risk Reserved Balance to the Balances API",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/adds-risk-reserved-balance-to-the-balances-api.md",products:"Payments, Payouts",breaking:!1,category:"api",touches:{resources:["balance"],fields:[],params:[],events:[]}},{version:"2026-03-25.preview",title:"Adds support for Azure Event Grid as an event destination",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/adds-support-for-azure-event-grid-as-an-event-destination.md",products:"All products",breaking:!1,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2026-03-25.preview",title:"Adds support for Managed Payments on payment links",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/adds-support-for-managed-payments-on-payment-links.md",products:"Paymentlinks",breaking:!1,category:"api",touches:{resources:["payment_link"],fields:[],params:[],events:[]}},{version:"2026-03-25.preview",title:"Adds support for running API operations in batches",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/batch-jobs-v2-api.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-03-25.preview",title:"Adds surcharge configuration options for card-not-present payments",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/card-not-present-payments-surcharge-configuration-options.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["charge"],fields:[],params:[],events:[]}},{version:"2026-03-25.preview",title:"Expands Global Payouts cross-border payout destinations to three additional countries",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/cross-border-payouts-new-countries.md",products:"Payouts",breaking:!1,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2026-03-25.preview",title:"Adds hosted relink flow for Financial Connections",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/financial-connections-hosted-relink-api.md",products:"Financialconnections",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-03-25.preview",title:"Adds multicurrency support for v2 payout methods",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/multicurrency-v2-payout-methods.md",products:"Payouts",breaking:!0,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2026-03-25.preview",title:"Adds the restricted property to the Payout Method object",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/payout-method-restricted-property.md",products:"Payouts",breaking:!1,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2026-03-25.preview",title:"Removes the source type property from Stripe balance payment methods",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/stripe-balance-payment-method-source-type.md",products:"Payments, Connect",breaking:!0,category:"api",touches:{resources:["payment_method","balance"],fields:[],params:[],events:[]}},{version:"2026-03-25.preview",title:"Adds Stripe Tax support for ticket sales",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/stripe-tax-ticket-sales-event-location.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax","event"],fields:[],params:[],events:[]}},{version:"2026-03-25.preview",title:"Adds configurable trial offers for subscription items",url:"https://docs.stripe.com/changelog/dahlia/2026-03-25/trial-offers-on-subscription-items.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2026-04-22.dahlia",title:"Adds expandable tax rate property to tax rate details",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/adds-expandable-tax-rate-property-to-tax-rate-details.md",products:"Invoicing",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2026-04-22.dahlia",title:"Removes mandatory payments KYC onboarding for app distribution for Stripe Apps",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/app-distribution-capability.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-04-22.dahlia",title:"Adds support for Azure Event Grid as an event destination",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/azure-event-grid-event-destination.md",products:"All products",breaking:!1,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2026-04-22.dahlia",title:"Adds balance report and payout reconciliation report embedded components to the Account Session API",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/balance-and-payout-reconciliation-report-embedded-components.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["payout","balance","account"],fields:[],params:[],events:[]}},{version:"2026-04-22.dahlia",title:"Adds fulfillment error to issuing card cancellation and replacement reasons",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/fulfillment-error-to-issuing-card-cancellation-and-replacement.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-04-22.dahlia",title:"Adds new balance transaction types for inbound transfers and reversals",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/inbound-transfers-balance-transaction-types.md",products:"Treasury",breaking:!1,category:"api",touches:{resources:["balance"],fields:[],params:[],events:[]}},{version:"2026-04-22.dahlia",title:"Adds the Product Catalog Import API v2",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/introduces-product-catalog-import-api-v2.md",products:"All products",breaking:!1,category:"api",touches:{resources:["product"],fields:[],params:[],events:[]}},{version:"2026-04-22.dahlia",title:"Adds a card-presence spending control for Issuing",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/issuing-card-presence-spending-control.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-04-22.dahlia",title:"Adds QR code support for Klarna payments with Terminal readers",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/klarna-payments-with-terminal-readers-qr-code-support.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-04-22.dahlia",title:"Adds support for Managed Payments, Stripe\u2019s merchant of record solution",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/managed-payments.md",products:"Checkout, Paymentlinks, Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-04-22.dahlia",title:"Adds the ability to collect and store tax identification information for customers in the Faroe Islands, Gibraltar, Italy, and Paraguay",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/new-tax-id-types-support.md",products:"Tax, Invoicing",breaking:!1,category:"api",touches:{resources:["customer","tax"],fields:[],params:[],events:[]}},{version:"2026-04-22.dahlia",title:"Adds support for Pix recurring payments",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/pix-recurring-payments-support.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-04-22.dahlia",title:"Adds account as a new item type to Radar value lists",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/radar-value-lists-account-item-type.md",products:"Radar",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-04-22.dahlia",title:"Adds the moto property to Setup Attempt payment method details for cards",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/setup-attempt-payment-method-details-for-cards-moto.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-04-22.dahlia",title:"Adds support for Phantom Cash and USDT to stablecoin payments",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/stablecoin-payments-phantom-cash-and-usdt.md",products:"Crypto",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-04-22.dahlia",title:"Adds support for Sunbit, a buy now, pay later payment method",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/sunbit-buy-now-pay-later-support.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Makes Accounts v2 available to all Stripe users for managing customers",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/accounts-v2-expanded-availability.md",products:"Billing, Connect, Payments",breaking:!1,category:"api",touches:{resources:["customer","account"],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Adds programmatic invocation of Stripe Workflows",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/adds-workflows-api-with-programmatic-invocation.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Adds an amount confirmation parameter to the Payment Intent API",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/amount-confirmation-parameter-to-paymentintent.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_intent"],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Adds DELETE method support to the Batch API",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/batch-api-delete-method.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Adds validation for billing meter event values with more than 15 digits",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/billing-meter-event-values-validation.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Adds support for automatic surcharge calculations on Checkout Sessions",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/checkout-sessions-automatic-surcharge.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout","charge"],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Adds credential reuse for Global Payouts with Accounts v2",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/credential-reuse-with-accounts-v2.md",products:"Payouts, Payments, Billing, Connect",breaking:!1,category:"api",touches:{resources:["payout","account"],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Adds support for Japan and China as Global Payouts cross-border payout destinations",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/cross-border-payouts-new-countries.md",products:"Payouts",breaking:!0,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Adds the Orchestrated Commerce Agreements API to manage relationships for agentic commerce integrations",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/orchestrated-commerce-agreements-api.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Makes the radar session property optional in the Payment Evaluations API",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/payment-evaluations-optional-radar-session.md",products:"Radar",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Adds programmatic access to account activity logs",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/programmatic-access-to-activity-logs.md",products:"All products",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Adds validation errors property to the Redaction Job object",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/redaction-job-validation-errors-property.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Adds the Reporting Query Runs API v2",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/reporting-query-runs-api-v2.md",products:"Sigma",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Adds the Shared Payment Granted Token for managing payment methods shared by agents",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/shared-payment-granted-token.md",products:"All products",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Adds the SharedPaymentIssuedToken resource to allow agents to give sellers scoped access to a customer\u2019s credentials",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/shared-payment-issued-token.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Adds Blik as a supported payment method for recurring payments in Stripe Billing",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/stripe-billing-blik-recurring-payments.md",products:"Billing, Checkout",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Adds the Stripe fee tax transaction category",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/stripe-fee-tax-transaction-category.md",products:"Treasury",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Adds the Stripe profiles API to represent public business identities on Stripe",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/stripe-profiles-apis.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Adds new tax registration types and product tax details for Stripe Tax for tickets",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/stripe-tax-for-tickets-new-tax-registration-types.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["product","tax"],fields:[],params:[],events:[]}},{version:"2026-04-22.preview",title:"Updates transaction categories to use flow-specific reversal types and adds Stripe fee tax category",url:"https://docs.stripe.com/changelog/dahlia/2026-04-22/transaction-categories-flow-specific-reversal-types.md",products:"Treasury",breaking:!0,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds the ability to collect email in Checkout Sessions with Contact Details Element",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/add-contact-details-element-to-checkout.md",products:"Checkout, Elements",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds card brand restrictions to Payment Links",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/adds-card-brand-restrictions-to-payment-links.md",products:"Paymentlinks",breaking:!1,category:"api",touches:{resources:["payment_link"],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds automatic transfer rules to balance settings",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/balance-settings-automatic-transfer-rules.md",products:"Payouts",breaking:!1,category:"api",touches:{resources:["balance"],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds support for Bizum payments",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/bizum-payments.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds the ability to configure custom start of day per connected account",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/custom-start-of-day.md",products:"Payments, Payouts",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds digital attestation support to Accounts v2 for proof of registration and beneficial ownership verification",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/digital-attestation-accounts-v2.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds credited items information to invoice item proration details",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/invoice-item-proration-credited-items.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds discount eligibility options for add-on invoice items on Subscriptions and Preview Invoice APIs",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/invoice-items-discount-eligibility.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription","invoice"],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds amount paid off Stripe property to Invoice object",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/invoice-object-amount-paid-off-stripe-property.md",products:"Invoicing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Renames Link Authentication Element to Contact Details Element",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/link-authentication-element-rename.md",products:"Elements",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds active status filtering to payment method configurations",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/payment-method-configurations-active-status-filtering.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds metadata support to pending subscription updates",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/pending-subscription-update-metadata.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds discount and discounts properties to pending subscription updates",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/pending-subscription-updates-discount-and-discounts-properties.md",products:"Sigma, Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds support for Twint as a payment method for recurring payments",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/recurring-payments-twint.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds support for Scalapay payments",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/scalapay-payments.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds billing schedules to enable prebilling on subscriptions",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/subscriptions-billing-schedules.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds API error details to Terminal reader action failures",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/terminal-reader-action-failures-error-details.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds support for printing images on Terminal readers with embedded printers",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/terminal-reader-print-action.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds customer parameter to test clock creation",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/test-clock-creation-customer-parameter.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds destination payment description and metadata support to transfer data",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/transfer-data-destination-payment-description-and-metadata.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-05-27.dahlia",title:"Adds support for Verifone third-party device types to Terminal APIs",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/verifone-third-party-device-types.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-05-27.preview",title:"Adds support for retrieving individual activity logs",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/activity-logs-api-retrieve-endpoint.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-05-27.preview",title:"Adds CHAPS support to Financial Addresses and Received Credits",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/chaps-support-financial-addresses-and-received-credits.md",products:"Treasury",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-05-27.preview",title:"Adds 20 new bank account types for cross-border payouts in Global Payouts",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/cross-border-payouts-20-new-bank-account-types.md",products:"Payouts",breaking:!1,category:"api",touches:{resources:["payout","account"],fields:[],params:[],events:[]}},{version:"2026-05-27.preview",title:"Adds Mastercard support to Issuing Settlement API",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/issuing-settlement-mastercard-support.md",products:"Issuing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-05-27.preview",title:"Adds the subscription pause endpoint",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/pause-subscriptions.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2026-05-27.preview",title:"Billed until property on subscription items is no longer included in responses by default",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/subscription-item-billed-until-includable.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2026-05-27.preview",title:"Enables expansion of trial offer prices",url:"https://docs.stripe.com/changelog/dahlia/2026-05-27/trial-offer-prices-expansion.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["price"],fields:[],params:[],events:[]}},{version:"2026-06-24.dahlia",title:"Adds buyer ID support for Bizum payments",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/bizum-payments-buyer-id.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-06-24.dahlia",title:"Adds buyer ID support for BLIK payments",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/blik-payments-buyer-id.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-06-24.dahlia",title:"Adds transaction link ID to card payment method details for Mastercard and Maestro transactions",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/card-payment-method-details-transaction-link-id.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-06-24.dahlia",title:"Adds WeChat Pay payment method options to the Checkout Session response",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/checkout-session-response-wechat-pay-payment-method-options.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout","payment_method"],fields:[],params:[],events:[]}},{version:"2026-06-24.dahlia",title:"Makes billing cycle anchor configuration available for Checkout Sessions in subscription mode",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/checkout-sessions-billing-cycle-anchor-config.md",products:"Checkout",breaking:!1,category:"api",touches:{resources:["checkout","subscription"],fields:[],params:[],events:[]}},{version:"2026-06-24.dahlia",title:"Enables manual capture for Sunbit payments",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/enables-manual-capture-for-sunbit-payments.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-06-24.dahlia",title:"Adds information about upcoming deactivations to the Financial Connections Account object",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/financial-connections-upcoming-deactivations.md",products:"Financialconnections",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-06-24.dahlia",title:"Adds invoice description, footer, and custom fields to the Subscriptions API",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/invoice-description-footer-and-custom-fields.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription","invoice"],fields:[],params:[],events:[]}},{version:"2026-06-24.dahlia",title:"Adds support for Mastercard compliance disputes",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/mastercard-compliance-disputes.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["dispute"],fields:[],params:[],events:[]}},{version:"2026-06-24.dahlia",title:"Adds a fingerprint to Pix payment method details",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/pix-fingerprint-payment-method-details.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-06-24.dahlia",title:"Adds mode property and promotion feed type support to the Product Catalog Import API v2",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/product-catalog-import-v2-improvements.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["product"],fields:[],params:[],events:[]}},{version:"2026-06-24.dahlia",title:"Adds validated status to the redaction status enum",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/redaction-status-enum-validated-status.md",products:"Identity",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-06-24.dahlia",title:"Adds reserve release details to the Reserve Hold object",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/reserve-hold-reserve-release-details.md",products:"Payments, Payouts, Radar",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-06-24.dahlia",title:"Adds support for recurring payments with Satispay",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/satispay-recurring-payments.md",products:"Billing, Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-06-24.dahlia",title:"Adds support for the Sui network and USDsui token for crypto payments",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/sui-network-and-usdsui-token-support.md",products:"Crypto, Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-06-24.dahlia",title:"Adds payment method options for Sunbit in Checkout Sessions",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/sunbit-checkout-pmo.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["checkout","payment_method"],fields:[],params:[],events:[]}},{version:"2026-06-24.dahlia",title:"Adds payment method and payment method options to the Top-ups API (US bank accounts only)",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/top-ups-payment-method-support-for-us-bank-accounts.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["payment_method","account"],fields:[],params:[],events:[]}},{version:"2026-06-24.preview",title:"Adds error codes for Financial Account capability errors",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/adds-error-codes-for-financial-account-capability-errors.md",products:"Payouts",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-06-24.preview",title:"Makes metadata optional when creating a Batch Job v2",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/batch-job-creation-optional-metadata.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-06-24.preview",title:"Removes the rate limit parameter from the Batch Job v2 object",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/batch-job-v2-remove-rate-limit-parameter.md",products:"All products",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-06-24.preview",title:"Adds redaction details to the Customer object",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/customer-object-redaction-details.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2026-06-24.preview",title:"Adds support for Express connected accounts v1 with Stripe-owned pricing and negative balance liability",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/express-connected-accounts-v1-stripe-owned-pricing-negative-balance-liability.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["balance","account"],fields:[],params:[],events:[]}},{version:"2026-06-24.preview",title:"Adds support for Express connected accounts v2 with Stripe-owned pricing and negative balance liability",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/express-connected-accounts-v2-stripe-owned-pricing-negative-balance-liability.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["balance","account"],fields:[],params:[],events:[]}},{version:"2026-06-24.preview",title:"Replaces SWIFT code with BIC in Financial Addresses",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/financial-addresses-replace-swift-with-bic.md",products:"Treasury",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-06-24.preview",title:"Adds support for previewing invoices before pausing a subscription",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/preview-invoices-before-pausing-subscription.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription","invoice"],fields:[],params:[],events:[]}},{version:"2026-06-24.preview",title:"Adds the originating account holder name to Received Credit bank transfers",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/received-credit-bank-transfers-account-holder-name.md",products:"Treasury",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-06-24.preview",title:"Adds a failure reason for received debits when the debit capability is inactive",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/received-debits-failure-reason-enum-capability-inactive.md",products:"Treasury",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-06-24.preview",title:"Adds redaction details to additional API resources",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/redaction-property.md",products:"Issuing, Checkout, Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-06-24.preview",title:"Adds Sunbit payments support to Accounts v2",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/sunbit-accounts-v2.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-06-24.preview",title:"Adds under review status events for outbound payments and transfers",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/under-review-status-events-for-outbound-payments-and-transfers.md",products:"Payouts",breaking:!0,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2026-06-24.preview",title:"Replaces the status filter with statuses on the List Financial Accounts endpoint",url:"https://docs.stripe.com/changelog/dahlia/2026-06-24/v2-financial-accounts-statuses-filter.md",products:"Treasury",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds a new Smart Disputes management feature to Account Session embedded components",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/account-session-embedded-components-smart-disputes-management.md",products:"Connect, Payments",breaking:!1,category:"api",touches:{resources:["dispute","account"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds new address fields to Accounts v1 for Singapore compliance",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/accounts-v1-address-fields.md",products:"All products",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds new address fields to Accounts v2 for Singapore compliance",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/accounts-v2-address-fields.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds Correos as an Issuing card shipping carrier in the EU",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/adds-correos-as-an-issuing-card-shipping-carrier-in-the-eu.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds customer and payment method details to the Refunds API",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/adds-customer-and-payment-method-details-to-the-refunds-api.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["customer","payment_method","refund"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds Payment Method support to Top-ups",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/adds-payment-method-support-to-top-ups.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds subscription metadata support to invoice previews",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/adds-subscription-metadata-support-to-invoice-preview.md",products:"Invoicing, Billing",breaking:!1,category:"api",touches:{resources:["subscription","invoice"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds Alipay support for invoices and subscriptions that send invoices for collection",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/alipay-support-for-invoices-and-subscriptions-with-sendinvoice-collection.md",products:"Invoicing, Billing, Payments",breaking:!1,category:"api",touches:{resources:["subscription","invoice"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds the allowed payment method types parameter to Payment Intents and Setup Intents",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/allowed-payment-method-types-parameter.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_intent","payment_method","setup_intent"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds support for Canary Islands tax ID type",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/canary-islands-tax-id-type.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds CHAPS as a supported network for funding instructions",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/chaps-as-supported-networks.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds card network details to the Dispute object",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/dispute-payment-method-details-card-network.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method","dispute"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds explicit session configuration options for Financial Connections",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/financial-connections-advanced-session-config.md",products:"Financialconnections",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds deactivation event notifications for Financial Connections accounts and authorizations",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/financial-connections-deactivation-event-notifications.md",products:"Financialconnections",breaking:!1,category:"api",touches:{resources:["account","event"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds support for new banks to FPX payments",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/fpx-payments-new-banks.md",products:"Payments, Elements, Checkout",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds MB WAY support to the hosted invoice page",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/hosted-invoice-page-mb-way-support.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds invoice description, footer, and custom parameters to the Subscription Schedules and Quotes APIs",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/invoice-description-footer-and-custom-fields.md",products:"Billing, Invoicing",breaking:!1,category:"api",touches:{resources:["subscription","invoice"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds the business name field to the shipping address for Issuing cards",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/issuing-cards-shipping-address-business-name.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds item-level discount support for pending updates",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/item-level-discounts-for-pending-updates.md",products:"Billing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds the ability to list Payment Records",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/list-payment-records.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds the ability to update shipping options, consent collection, and future usage support on Payment Links",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/payment-links-update-endpoint-new-parameters.md",products:"Paymentlinks",breaking:!1,category:"api",touches:{resources:["payment_link"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds a referrer parameter to Radar options on Payment Intents",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/radar-options-referrer.md",products:"Radar, Payments",breaking:!1,category:"api",touches:{resources:["payment_intent"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Enables rejecting connected accounts with non-zero balances and controlling whether to pause payouts",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/reject-connected-accounts-with-non-zero-balances.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["payout","balance","account"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds the ability to indicate that you don\u2019t intend to reuse Samsung Pay and PAYCO payment method types",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/samsung-pay-and-payco-setup-future-usage-none-only.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds the trial property to subscription schedule phases",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/subscription-schedule-phases-trial-property.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds the ability to show who initiated a top-up",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/top-up-initiated-by-property.md",products:"Connect",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds the ability to reverse platform rejections on connected accounts",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/unreject-connected-account-endpoint.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-07-29.dahlia",title:"Adds support for parking tax registration types in the US",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/us-parking-tax-registration-types.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2026-07-29.preview",title:"Adds SCIM and SSO user role change actions to Activity Logs",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/activity-logs-scim-and-sso-user-role-change-actions.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-07-29.preview",title:"Adds the ability to list and retrieve trial offers",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/adds-list-and-retrieve-api-methods-for-trial-offers.md",products:"Billing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-07-29.preview",title:"Updates Received Debits to enable bank transfer types other than US bank accounts",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/change-us-bank-account-to-optional-on-received-debit-bank-transfer-to-enable-additional-bank-transfer-types.md",products:"Treasury",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-07-29.preview",title:"Renames the tax IDs property to tax ID in Checkout Session collected information",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/checkout-session-collected-information-tax-ids-rename.md",products:"Checkout",breaking:!0,category:"api",touches:{resources:["checkout","tax"],fields:[],params:[],events:[]}},{version:"2026-07-29.preview",title:"Renames the taxes parameter to tax items in industry metadata payment details",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/industry-metadata-taxes-parameter-rename.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2026-07-29.preview",title:"Adds support for updating Issuing Cardholder names",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/issuing-cardholder-name-parameter.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-07-29.preview",title:"Deprecates legacy payout type for balance transfers in the ReceivedCredit API",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/received-credit-payout-v1-deprecation.md",products:"All products",breaking:!1,category:"api",touches:{resources:["payout","balance"],fields:[],params:[],events:[]}},{version:"2026-07-29.preview",title:"Shows errors for eventually due requirements",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/shows-errors-for-eventually-due-requirements.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2026-07-29.preview",title:"Adds additional next action support for Shared Payment Tokens",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/spts-next-action-support.md",products:"Payments",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-07-29.preview",title:"Adds the live mode indicator to the Tax Location object",url:"https://docs.stripe.com/changelog/dahlia/2026-07-29/tax-location-live-mode-indicator.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2026-08-26.dahlia",title:"Adds a customer update deep link for billing portal sessions",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/adds-a-customer-update-deep-link-for-billing-portal-sessions.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2026-08-26.dahlia",title:"Adds the ability to restrict card funding types in Checkout Sessions",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/adds-card-funding-type-filtering-to-checkout-sessions.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2026-08-26.dahlia",title:"Adds support for updating Connect parameters of an existing Payment Link",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/adds-connect-parameters-to-the-payment-link-update-method.md",products:"Paymentlinks",breaking:!1,category:"api",touches:{resources:["payment_link"],fields:[],params:[],events:[]}},{version:"2026-08-26.dahlia",title:"Adds frozen fields property to Invoice Items",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/adds-frozen-fields-property-to-invoice-items.md",products:"Invoicing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2026-08-26.dahlia",title:"Adds a funding source identifier to Link payments",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/adds-funding-source-group-property-for-link-payments.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-08-26.dahlia",title:"Adds a funding source identifier to Link wallet card payments",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/adds-funding-source-group-property-to-link-wallet-payments-on-card-charges.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["charge"],fields:[],params:[],events:[]}},{version:"2026-08-26.dahlia",title:"Adds support for specifying place of supply scheme on IGIC tax in the EU",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/adds-igic-tax-registration-type-with-place-of-supply-scheme-for-eu-countries.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2026-08-26.dahlia",title:"Adds support for metadata in confirmation tokens",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/adds-metadata-support-to-confirmation-tokens.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-08-26.dahlia",title:"Adds new error codes for payment method failures",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/adds-payment-method-error-codes.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-08-26.dahlia",title:"Adds support for the Billie payment method for invoices and subscriptions",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/billie-support-for-invoices-and-subscriptions.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription","invoice","payment_method"],fields:[],params:[],events:[]}},{version:"2026-08-26.dahlia",title:"Adds the ability to query entitlements and launch the customer portal in Customer Sessions",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/customer-session-improvements.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2026-08-26.dahlia",title:"Increases the subscription item limit",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/flexible-subscription-item-limits.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2026-08-26.preview",title:"Redirects new Connect platforms away from unsupported integration patterns",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/2026-08-17-blocks-unsupported-integration-patterns.md",products:"Connect",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-08-26.preview",title:"Adds Account Signals, Account Evaluations, and Account Activity APIs in public preview",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/adds-account-signals-account-evaluations-and-account-activity-apis-in-public-preview.md",products:"Radar, Connect",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-08-26.preview",title:"Adds support to specify different default payout methods for each currency",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/adds-default-payout-methods-to-the-accounts-v2-api.md",products:"Connect, Treasury",breaking:!1,category:"api",touches:{resources:["payout","account"],fields:[],params:[],events:[]}},{version:"2026-08-26.preview",title:"Adds support for disabling payout methods",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/disable-payout-methods.md",products:"Payouts",breaking:!0,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2026-08-26.preview",title:"Adds ability to require approval for Stripe-initiated actions",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/introduces-approval-requests-in-public-preview.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-08-26.preview",title:"Adds control over Stripe user authentication to Payment Method Settings",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/payment-method-settings-disable-stripe-user-authentication.md",products:"Connect",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-08-26.preview",title:"Removes support for specifying payment method types in Payment Intents and Setup Intents",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/removes-payment-method-types-parameter-from-payment-intents-setup-intents.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["payment_intent","payment_method","setup_intent"],fields:[],params:[],events:[]}},{version:"2026-08-26.preview",title:"Includes deleted prices in trial offer price data",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/trial-offers-return-deleted-prices.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["price"],fields:[],params:[],events:[]}},{version:"2026-08-26.preview",title:"Updates bank account and payout method resources for Global Payouts",url:"https://docs.stripe.com/changelog/dahlia/2026-08-26/updates-v2-payout-method-and-vault-bank-account-resources.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["payout","account"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds 3D Secure versions 2.3.0 and 2.3.1 to Payment Records",url:"https://docs.stripe.com/changelog/endive/2026-09-30/3d-secure-payment-records.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds additional shared fields to customer sharing",url:"https://docs.stripe.com/changelog/endive/2026-09-30/additional-shared-fields-customer-sharing.md",products:"All products",breaking:!1,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds address validation errors for CMRAs and registered agents to Accounts v1 and Accounts v2",url:"https://docs.stripe.com/changelog/endive/2026-09-30/address-validation-cmra-registered-agents-accounts-v2.md",products:"Issuing, Treasury",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds a new outcome type for rerouted payments to Payment Evaluations",url:"https://docs.stripe.com/changelog/endive/2026-09-30/adds-a-new-outcome-type-for-rerouted-bank-payments-to-payment-evaluations.md",products:"Radar",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds Link wallet details to Payment Records for card payments",url:"https://docs.stripe.com/changelog/endive/2026-09-30/adds-link-wallet-details-to-payment-records-for-card-payments.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds MoMo payment method details to Payment Records",url:"https://docs.stripe.com/changelog/endive/2026-09-30/adds-momo-payment-method-details-to-payment-records.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Saves Bancontact payment details for future off-session payments in Checkout",url:"https://docs.stripe.com/changelog/endive/2026-09-30/bancontact-off-session-payments-checkout.md",products:"Checkout, Payments, Paymentlinks",breaking:!1,category:"api",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Returns specific decline codes for BLIK payment failures",url:"https://docs.stripe.com/changelog/endive/2026-09-30/blik-granular-decline-codes.md",products:"Payments",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds support for BLIK recurring off-session payments",url:"https://docs.stripe.com/changelog/endive/2026-09-30/blik-recurring-off-session-payments.md",products:"Payments, Invoicing, Checkout, Billing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Sets canConfirm to false while updates are pending in Elements with Checkout Sessions",url:"https://docs.stripe.com/changelog/endive/2026-09-30/block-custom-checkout-confirmation-pending-updates.md",products:"Checkout, Elements",breaking:!0,category:"stripejs",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds card-present payment methods to allowed payment method types",url:"https://docs.stripe.com/changelog/endive/2026-09-30/card-present-and-interac-present-enum-values-for-allowed-payment-method-types.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds the ability to clear invoicing rules on Invoice Items",url:"https://docs.stripe.com/changelog/endive/2026-09-30/clear-invoicing-rules-on-invoice-items.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds support for Data Share Only for 3D Secure authentication",url:"https://docs.stripe.com/changelog/endive/2026-09-30/data-share-only.md",products:"Payments",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Deprecates the payment request button",url:"https://docs.stripe.com/changelog/endive/2026-09-30/deprecate-payment-request-button.md",products:"Elements",breaking:!0,category:"stripejs",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Rejects duplicate references for pending India card mandates",url:"https://docs.stripe.com/changelog/endive/2026-09-30/duplicate-reference-validation-for-india-pending-mandates.md",products:"Payments",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds support for expanding the mandate on card payment method details",url:"https://docs.stripe.com/changelog/endive/2026-09-30/expand-mandate-on-card-payments-details.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds an expiration timestamp to the Swish QR code object",url:"https://docs.stripe.com/changelog/endive/2026-09-30/expiration-timestamp-swish-qr.md",products:"Terminal",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds Failed Tax Calculation error",url:"https://docs.stripe.com/changelog/endive/2026-09-30/failed-tax-calculation-error.md",products:"Tax, Billing, Invoicing, Checkout",breaking:!0,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds the Feedback Options API",url:"https://docs.stripe.com/changelog/endive/2026-09-30/feedback-options-api.md",products:"Billing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Updates Financial Connections Session defaults",url:"https://docs.stripe.com/changelog/endive/2026-09-30/financial-connections-session-defaults.md",products:"Financialconnections",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Shows pending-authorization UI for MB WAY, Bizum, and BLIK with stripe.handleNextAction",url:"https://docs.stripe.com/changelog/endive/2026-09-30/handle-next-action-mb-way-bizum-ui.md",products:"Elements",breaking:!0,category:"stripejs",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds India-specific mandate details to card payment method responses",url:"https://docs.stripe.com/changelog/endive/2026-09-30/india-specific-mandate-card-payments.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds the Install API for Stripe Apps",url:"https://docs.stripe.com/changelog/endive/2026-09-30/install-api.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds proration details for Invoice Items using classic billing mode",url:"https://docs.stripe.com/changelog/endive/2026-09-30/invoice-items-proration-details.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds detailed status to explain why an Invoice is uncollectable",url:"https://docs.stripe.com/changelog/endive/2026-09-30/invoice-uncollectible-status-detail.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds invoicing rules to Invoice Items",url:"https://docs.stripe.com/changelog/endive/2026-09-30/invoicing-rules-for-invoice-items.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["invoice"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds Link funding source group details on Payment Records",url:"https://docs.stripe.com/changelog/endive/2026-09-30/link-funding-source-group-payment-records.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds early fraud warnings and fraudulent dispute signals for Payment Evaluations",url:"https://docs.stripe.com/changelog/endive/2026-09-30/new-radar-signals-for-payment-evaluations.md",products:"Radar",breaking:!1,category:"api",touches:{resources:["dispute"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds page limit validation for dispute evidence",url:"https://docs.stripe.com/changelog/endive/2026-09-30/page-limit-validation-dispute-evidence.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["dispute"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds the option to automatically pause subscriptions after payment failures",url:"https://docs.stripe.com/changelog/endive/2026-09-30/pause-on-payment-failure.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds the ability to pause and resume Subscriptions on demand",url:"https://docs.stripe.com/changelog/endive/2026-09-30/pause-subscription.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Makes Payment Evaluation signal scores nullable",url:"https://docs.stripe.com/changelog/endive/2026-09-30/payment-evaluations-nullable-score.md",products:"Radar",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds payment method type information for failed payments",url:"https://docs.stripe.com/changelog/endive/2026-09-30/payment-method-type-payment-failures.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds the Payment Record property to the Payment Intent object",url:"https://docs.stripe.com/changelog/endive/2026-09-30/payment-records-on-payment-intents.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["payment_intent"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds PayPay support for one-time online payments in Japan",url:"https://docs.stripe.com/changelog/endive/2026-09-30/paypay-payments-japan.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds pending and expired statuses to Financial Connections account numbers",url:"https://docs.stripe.com/changelog/endive/2026-09-30/pending-and-expired-status-added-to-financial-connections-account-numbers.md",products:"Financialconnections",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Distinguishes platform-initiated account rejections from Stripe rejections",url:"https://docs.stripe.com/changelog/endive/2026-09-30/platform-rejection-reasons.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Unifies the billing cycle anchor format across Subscriptions and Invoices",url:"https://docs.stripe.com/changelog/endive/2026-09-30/polymorphic-billing-cycle-anchor.md",products:"Billing",breaking:!0,category:"api",touches:{resources:["subscription","invoice"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds Balance Transaction types for provisional credits for Issuing disputes",url:"https://docs.stripe.com/changelog/endive/2026-09-30/provisional-credit-issuing-disputes-balance-transaction-types.md",products:"Issuing",breaking:!1,category:"api",touches:{resources:["dispute","balance"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds reference and company details parameters for Billie",url:"https://docs.stripe.com/changelog/endive/2026-09-30/reference-and-company-details-billie.md",products:"Payments, Invoicing, Billing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds rejected status for Accounts v2 capabilities",url:"https://docs.stripe.com/changelog/endive/2026-09-30/rejected-accounts-v2-capabilities.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Removes support for the payment method types option in Elements",url:"https://docs.stripe.com/changelog/endive/2026-09-30/remove-elements-deferred-intent-payment-method-types.md",products:"Elements",breaking:!0,category:"stripejs",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Removes the payment method types parameter from Checkout Sessions",url:"https://docs.stripe.com/changelog/endive/2026-09-30/remove-payment-method-types-checkout-sessions.md",products:"Checkout",breaking:!0,category:"api",touches:{resources:["checkout","payment_method"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Removes PayTo-specific fields from Payment Methods",url:"https://docs.stripe.com/changelog/endive/2026-09-30/removed-payto-fields.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["payment_method"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Removes the configurations parameter from the Account Links v2 API",url:"https://docs.stripe.com/changelog/endive/2026-09-30/removes-configurations-parameter-from-v2-core-account-links-api.md",products:"All products",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Removes the payment method types parameter from Payment Intents and Setup Intents",url:"https://docs.stripe.com/changelog/endive/2026-09-30/removes-the-payment-method-types-parameter-from-payment-intents-and-setup-intents.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["payment_intent","payment_method","setup_intent"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Renames the countries filter to country on Financial Connections Sessions",url:"https://docs.stripe.com/changelog/endive/2026-09-30/rename-financial-connections-countries-filter-to-country.md",products:"Financialconnections",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds the ability to report canceled payments",url:"https://docs.stripe.com/changelog/endive/2026-09-30/reporting-canceled-payments.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Enforces collection of billing address parameters for non-EEA SEPA Direct Debit payments",url:"https://docs.stripe.com/changelog/endive/2026-09-30/require-sepa-direct-debit-address-fields.md",products:"Payments",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Renames the Reserve Release reason enum value",url:"https://docs.stripe.com/changelog/endive/2026-09-30/reserve-release-reason.md",products:"Radar",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds support for received credits sent via the Real-Time Payments network",url:"https://docs.stripe.com/changelog/endive/2026-09-30/rtp-network-received-credits.md",products:"Treasury",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds Satispay payments capability to Accounts v2",url:"https://docs.stripe.com/changelog/endive/2026-09-30/satispay-payments-capability-for-accounts-v2-api.md",products:"All products",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds support for scheduling Subscription cancellation as part of pending update",url:"https://docs.stripe.com/changelog/endive/2026-09-30/scheduled-subscription-cancellation.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["subscription"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Standardizes SEPA Direct Debit payment settings in the Accounts API",url:"https://docs.stripe.com/changelog/endive/2026-09-30/sepa-debit-settings-accounts.md",products:"Connect, Payments",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds support for SeQura payments",url:"https://docs.stripe.com/changelog/endive/2026-09-30/sequra-payments.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds destination property and new enum values to Reserve Plans, Holds and Releases",url:"https://docs.stripe.com/changelog/endive/2026-09-30/settlement-reserve-api.md",products:"Treasury, Payments",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Shows errors for eventually due requirements",url:"https://docs.stripe.com/changelog/endive/2026-09-30/shows-errors-for-eventually-due-requirements.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Allows empty optional address fields in Elements with Checkout Sessions",url:"https://docs.stripe.com/changelog/endive/2026-09-30/skip-format-validation-empty-optional-address-fields.md",products:"Checkout, Elements",breaking:!0,category:"stripejs",touches:{resources:["checkout"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds the Standalone 3D Secure API",url:"https://docs.stripe.com/changelog/endive/2026-09-30/standalone-3ds.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Requires billing details when Payment Element collection is disabled",url:"https://docs.stripe.com/changelog/endive/2026-09-30/strict-billing-details-validation.md",products:"Checkout, Elements",breaking:!0,category:"stripejs",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds support for new tax types",url:"https://docs.stripe.com/changelog/endive/2026-09-30/stripe-tax-new-tax-types.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Adds support for ticket sales to Stripe Tax",url:"https://docs.stripe.com/changelog/endive/2026-09-30/stripe-tax-tickets.md",products:"Billing, Checkout, Invoicing, Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Surfaces India card mandates on Charges and SetupIntents even when inactive",url:"https://docs.stripe.com/changelog/endive/2026-09-30/surface-india-card-mandate-even-when-inactive.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["charge","setup_intent"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Makes thin events for API v1 resources generally available",url:"https://docs.stripe.com/changelog/endive/2026-09-30/thin-events-for-api-v1-resources-generally-available.md",products:"All products",breaking:!1,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Makes trial offers generally available",url:"https://docs.stripe.com/changelog/endive/2026-09-30/trial-offer-ga.md",products:"Billing",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Replaces the generic fraud rejection reason with more granular fraud reasons",url:"https://docs.stripe.com/changelog/endive/2026-09-30/updated-reject-reason-codes.md",products:"Connect",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Exposes ACH return codes on OutboundPayments, OutboundTransfers, and InboundTransfers in v1 Treasury",url:"https://docs.stripe.com/changelog/endive/2026-09-30/v1-treasury-ach-return-codes.md",products:"Treasury",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.endive",title:"Exposes the network response electronic commerce indicator on card charges",url:"https://docs.stripe.com/changelog/endive/2026-09-30/view-network-response-eci-on-card-charges.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["charge"],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Adds support for specifying card-on-file usage when saving and charging saved cards",url:"https://docs.stripe.com/changelog/endive/2026-09-30/add-card-on-file-usage-indicators.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Expands action coverage in Activity Logs",url:"https://docs.stripe.com/changelog/endive/2026-09-30/adds-authentication-and-money-movement-actions-to-activity-logs.md",products:"All products",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Adds Billing Evaluations for assessing non-payment abuse risk",url:"https://docs.stripe.com/changelog/endive/2026-09-30/adds-billing-evaluations-for-assessing-non-payment-abuse-risk.md",products:"Radar",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Adds network fee details to estimated fees on Outbound Payment Quotes",url:"https://docs.stripe.com/changelog/endive/2026-09-30/adds-network-fee-details-to-estimated-fees.md",products:"Payouts, Treasury",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Adds Billie company details and reference properties to Quote Preview Invoices",url:"https://docs.stripe.com/changelog/endive/2026-09-30/adds-reference-and-company-details-payment-method-options-for-billie.md",products:"Billing, Invoicing",breaking:!1,category:"api",touches:{resources:["invoice","payment_method"],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Adds session recovery for expired customer portal sessions",url:"https://docs.stripe.com/changelog/endive/2026-09-30/adds-session-recovery-for-expired-customer-portal-sessions.md",products:"Billing",breaking:!1,category:"api",touches:{resources:["customer"],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Adds a Canada financing disclaimer variant for Capital for Platforms",url:"https://docs.stripe.com/changelog/endive/2026-09-30/canada-financing-disclaimer-variant-for-capital-for-platforms.md",products:"Capital",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Expands Reserve Plan listing access and adds filters",url:"https://docs.stripe.com/changelog/endive/2026-09-30/expands-reserve-plan-listing-access.md",products:"Payments, Treasury",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Updates the shapes of v2 Financial Address and v2 Received Credit objects",url:"https://docs.stripe.com/changelog/endive/2026-09-30/financial-address-and-received-credit-shape-updates.md",products:"All products",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Adds fraudulent merchant and fraudulent website account signals to the Signals API",url:"https://docs.stripe.com/changelog/endive/2026-09-30/fraudulent-merchant-and-fraudulent-website-account-signals.md",products:"Radar, Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Adds deposit insurance eligibility details to Financial Accounts",url:"https://docs.stripe.com/changelog/endive/2026-09-30/includable-insurance-eligibility-field-for-v2-financial-accounts.md",products:"Treasury",breaking:!1,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Adds live mode indicator to FX Quotes",url:"https://docs.stripe.com/changelog/endive/2026-09-30/live-mode-indicator-for-fx-quotes.md",products:"Payments",breaking:!1,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Moves Financial Address test helper endpoints to the money management namespace",url:"https://docs.stripe.com/changelog/endive/2026-09-30/moves-financial-address-test-helper-endpoints-to-the-money-management-namespace.md",products:"All products",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Opens the adjusted flow type enum and changes the list filters for v2 Adjustments and v2 Transactions",url:"https://docs.stripe.com/changelog/endive/2026-09-30/opens-adjusted-flow-type-enum-and-changes-date-filtering-syntax.md",products:"Treasury",breaking:!0,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Adds page limit validation for dispute evidence",url:"https://docs.stripe.com/changelog/endive/2026-09-30/page-limit-validation-for-dispute-evidence.md",products:"Payments",breaking:!0,category:"api",touches:{resources:["dispute"],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Upgrades fields and refines error contracts for Payout Methods",url:"https://docs.stripe.com/changelog/endive/2026-09-30/pre-ga-upgrades-v2-poms.md",products:"Payouts",breaking:!0,category:"api",touches:{resources:["payout"],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Adds rejected status for Accounts v2 capabilities",url:"https://docs.stripe.com/changelog/endive/2026-09-30/rejected-accounts-v2-capabilities-preview.md",products:"Connect",breaking:!0,category:"api",touches:{resources:["account"],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Removes the capture method parameter for PayPay payments",url:"https://docs.stripe.com/changelog/endive/2026-09-30/removes-capture-method-parameter-for-paypay-payments.md",products:"Payments",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Removes IGIC tax registration type from non-Spain EU countries",url:"https://docs.stripe.com/changelog/endive/2026-09-30/removes-igic-tax-registration-type-from-non-spain-eu-countries.md",products:"Tax",breaking:!1,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Removes level property from inbound transfer history and changes date filtering syntax for list endpoints",url:"https://docs.stripe.com/changelog/endive/2026-09-30/removes-level-property-from-inbound-transfer-history-and-changes-date-filtering-syntax-for-list-endpoints.md",products:"All products",breaking:!0,category:"api",touches:{resources:["tax"],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Adds support for submitting evidence to appeal a dispute decision",url:"https://docs.stripe.com/changelog/endive/2026-09-30/submit-evidence-to-appeal-dispute-decision.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["dispute"],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Adds a Treasury Transaction property to the Money Management Transaction update events",url:"https://docs.stripe.com/changelog/endive/2026-09-30/treasury-transaction-property-for-money-management-transaction-update-events.md",products:"Treasury",breaking:!1,category:"api",touches:{resources:["event"],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Adds archiving and trial end behavior settings to Trial Offers",url:"https://docs.stripe.com/changelog/endive/2026-09-30/trial-offers-archiving-and-trial-end-behavior-settings.md",products:"Billing",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Adds the ability to update payment intent data on Checkout Sessions",url:"https://docs.stripe.com/changelog/endive/2026-09-30/update-payment-intent-data-on-checkout-sessions.md",products:"Payments",breaking:!1,category:"api",touches:{resources:["checkout","payment_intent"],fields:[],params:[],events:[]}},{version:"2026-09-30.preview",title:"Updates Financial Address request and response structure",url:"https://docs.stripe.com/changelog/endive/2026-09-30/updating-financial-address-request-and-response-structure.md",products:"All products",breaking:!0,category:"api",touches:{resources:[],fields:[],params:[],events:[]}}]},resources=["checkout","billing_portal","subscription_schedule","subscription_item","subscription","customer","invoice","payment_intent","payment_method","payment_link","price","product","charge","refund","dispute","payout","balance","account","tax","coupon","promotion_code","setup_intent","invoice_item","usage_record","meter","event","webhook"];function words(text){return text.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase().replace(/[_./#-]/g," ").replace(/\b([a-z]+)s\b/g,"$1")}function entryTouches(entry){let text=words(`${entry.title} ${entry.url}`),fields2=[...new Set(`${entry.title} ${entry.url}`.match(/\b[a-z]+(?:_[a-z]+)+\b/g)??[])];return entry.url.includes("/deprecate-subscription-current-period-start-and-end")&&fields2.push("current_period_start","current_period_end"),{resources:resources.filter(r=>text.includes(words(r))),fields:fields2,params:fields2,events:[...new Set(entry.title.match(/\b[a-z]+(?:\.[a-z_]+){2,}\b/g)??[])]}}function evidencedEntries(entries,evidence){return entries.map(entry=>{let t=entry.touches??entryTouches(entry),matches=evidence.filter(e=>{if(e.kind==="event")return t.events.includes(e.path);let member=e.path.split(/[.#]/).at(-1)??"",sameResource=t.resources.some(r=>words(e.path).includes(words(r)));return e.kind==="method"?(t.methods??[]).includes(e.path):sameResource&&(e.kind==="param"?t.params:t.fields).includes(member)?!0:e.compiler===!0&&entry.breaking&&sameResource&&member.includes("_")&&` ${words(`${entry.title} ${entry.url}`)} `.includes(` ${words(member)} `)});return{entry,evidence:matches}}).filter(e=>e.evidence.length).sort((a,b)=>b.evidence.length-a.evidence.length||Number(b.entry.breaking)-Number(a.entry.breaking)||a.entry.url.localeCompare(b.entry.url))}var PRODUCTS={checkout:["Checkout"],billing_portal:["Billing"],subscription_schedule:["Billing"],subscription_item:["Billing"],subscription:["Billing"],invoice:["Billing","Invoicing"],invoice_item:["Billing","Invoicing"],usage_record:["Billing"],meter:["Billing"],coupon:["Billing"],promotion_code:["Billing"],price:["Billing","Checkout","Paymentlinks"],product:["Billing","Checkout","Paymentlinks"],customer:["Billing","Payments"],payment_intent:["Payments"],payment_method:["Payments"],setup_intent:["Payments"],charge:["Payments"],refund:["Payments"],dispute:["Payments"],payment_link:["Paymentlinks"],payout:["Payouts"],balance:["Payouts"],account:["Connect"],tax:["Tax"]};function usedProducts(used){return[...new Set(used.flatMap(r=>PRODUCTS[r]??[]))].sort()}function calledResources(evidence,events){return usedResources(evidence.filter(e=>e.kind==="method"||e.kind==="param").map(e=>e.path),events).filter(r=>r!=="event"&&r!=="webhook")}function usedResources(paths,events){let texts=[...paths,...events].map(t=>` ${words(t)} `),found=new Set;for(let r of[...resources].sort((a,b)=>b.length-a.length)){let name=` ${words(r)} `;for(let i=0;i<texts.length;i++){let t=texts[i];t.includes(name)&&(found.add(r),texts[i]=t.replaceAll(name," "))}}return resources.filter(r=>found.has(r))}function resourceEntries(entries,evidenced,used){let names=used.map(r=>words(r)),products=usedProducts(used);return entries.filter(e=>!evidenced.includes(e)).filter(e=>{let tags=e.products.split(",").map(t=>t.trim());return tags.includes("All products")||tags.some(t=>products.includes(t))}).filter(e=>{let touched=(e.touches??entryTouches(e)).resources.map(r=>words(r)),text=` ${words(`${e.title} ${e.url}`)} `;return names.some(n=>touched.includes(n)||text.includes(` ${n} `)||text.includes(` ${n}s `))}).sort((a,b)=>Number(b.breaking)-Number(a.breaking)||b.version.localeCompare(a.version)||a.url.localeCompare(b.url))}function handledEvents(source){return new import_ts_morph13.Project({useInMemoryFileSystem:!0}).createSourceFile("events.ts",source).getDescendantsOfKind(import_ts_morph13.SyntaxKind.StringLiteral).filter(l=>{let p=l.getParent();if(import_ts_morph13.Node.isCaseClause(p)){let sw=p.getFirstAncestorByKind(import_ts_morph13.SyntaxKind.SwitchStatement);return/\.type$/.test(sw?.getExpression().getText()??"")}return import_ts_morph13.Node.isBinaryExpression(p)&&["===","=="].includes(p.getOperatorToken().getText())&&/\.type$/.test(p.getLeft().getText())}).map(l=>l.getLiteralValue()).filter(s=>/^[a-z_]+(?:\.[a-z_]+)+$/.test(s))}function stripeEvidence(root,workspace,usages){let paths=new Set,events=new Set,evidence=[];for(let usage of usages)for(let path of usagePaths(usage))paths.add(path),["call","read","write"].includes(usage.access)&&evidence.push({path,kind:usage.access==="call"?"method":usage.access==="write"?"param":"field",file:join20(workspace,usage.file),line:usage.line});for(let file of new Set(usages.map(u=>u.file))){let source;try{source=readFileSync12(join20(root,workspace,file),"utf8")}catch{continue}let ast=new import_ts_morph13.Project({useInMemoryFileSystem:!0}).createSourceFile("source.ts",source);for(let event of handledEvents(source)){events.add(event);for(let literal of ast.getDescendantsOfKind(import_ts_morph13.SyntaxKind.StringLiteral).filter(l=>l.getLiteralValue()===event))evidence.push({path:event,kind:"event",file:join20(workspace,file),line:literal.getStartLineNumber()})}for(let call of ast.getDescendantsOfKind(import_ts_morph13.SyntaxKind.CallExpression)){let usage=usages.find(u=>u.file===file&&u.access==="call"&&u.line===call.getExpression().getStartLineNumber()&&u.snippet.includes(call.getExpression().getText()));if(usage)for(let arg of call.getArguments().filter(import_ts_morph13.Node.isObjectLiteralExpression))for(let property of arg.getDescendantsOfKind(import_ts_morph13.SyntaxKind.PropertyAssignment))evidence.push({path:`${usage.symbolPath}#${property.getName()}`,kind:"param",file:join20(workspace,file),line:property.getStartLineNumber()})}}return{usagePaths:[...paths],eventTypes:[...events],evidence}}var SOURCE=/\.[cm]?[jt]sx?$/,SKIPPED2=new Set(["node_modules","dist","build","coverage",".git",".uptide"]);function pinClient(text,line,version){let node=new import_ts_morph13.Project({useInMemoryFileSystem:!0}).createSourceFile("source.ts",text).getDescendantsOfKind(import_ts_morph13.SyntaxKind.NewExpression).find(n=>n.getStartLineNumber()===line);if(!node)return;let quote2=(text.match(/from\s*"/g)?.length??0)>(text.match(/from\s*'/g)?.length??0)?'"':"'",pin2=`apiVersion: ${quote2}${version}${quote2}`,args=node.getArguments(),options=args[1];if(args.length===1){let first2=args[0];return`${text.slice(0,first2.getEnd())}, { ${pin2} }${text.slice(first2.getEnd())}`}if(!options||!import_ts_morph13.Node.isObjectLiteralExpression(options)||options.getProperty("apiVersion"))return;let open=options.getStart()+1,first=options.getProperties()[0];if(!first)return`${text.slice(0,open)} ${pin2} ${text.slice(open).replace(/^\s*/,"")}`;let multiline=text.slice(open,first.getStart()).includes(`
215
+ `),indent=multiline?/^[ \t]*/.exec(text.slice(first.getStartLinePos()))?.[0]??"":"",at=first.getStart();return multiline?`${text.slice(0,at)}${pin2},
216
+ ${indent}${text.slice(at)}`:`${text.slice(0,at)}${pin2}, ${text.slice(at)}`}function unpinnedClients(usages,read2){let found=[],constructs=usages.filter(u=>u.access==="construct"&&/^(?:Stripe|default)(?:\.new\(\))?$/.test(u.symbolPath));for(let file of new Set(constructs.map(u=>u.file))){let source=read2(file);if(source===void 0)continue;let ast=new import_ts_morph13.Project({useInMemoryFileSystem:!0}).createSourceFile("source.ts",source),mentionsPin=/\bapiVersion\b/.test(source);for(let node of ast.getDescendantsOfKind(import_ts_morph13.SyntaxKind.NewExpression)){let line=node.getStartLineNumber();if(!constructs.some(u=>u.file===file&&u.line===line))continue;let options=node.getArguments()[1],pinned;if(options===void 0?pinned=!1:import_ts_morph13.Node.isObjectLiteralExpression(options)?pinned=options.getProperties().some(p=>import_ts_morph13.Node.isSpreadAssignment(p))||options.getProperty("apiVersion")!==void 0:pinned=mentionsPin,pinned)continue;let end=node.getEnd();found.push({file,line,column:node.getStart()-node.getStartLinePos()+1,endLine:ast.getLineAndColumnAtPos(end).line,endColumn:ast.getLineAndColumnAtPos(end).column,snippet:(source.split(`
217
+ `)[line-1]??"").trim()})}}return found}function payloadApiVersions(root,workspaces){let found=[],walk=dir=>{for(let entry of readdirSync5(dir,{withFileTypes:!0})){if(SKIPPED2.has(entry.name))continue;let path=join20(dir,entry.name);entry.isDirectory()?walk(path):SOURCE.test(entry.name)&&readFileSync12(path,"utf8").split(`
218
+ `).forEach((text,i)=>{let m=/\bapi_version["']?\s*:\s*["'](\d{4}-\d{2}-\d{2}(?:\.[\w-]+)?)["']/.exec(text);m?.[1]&&found.push({file:relative10(root,path),line:i+1,value:m[1]})})}};for(let workspace of workspaces)if(!(workspace==="."&&workspaces.length>1))try{walk(join20(root,workspace))}catch{}return found.sort((a,b)=>a.file.localeCompare(b.file)||a.line-b.line)}function pinAssertions(root,workspaces,declaration,versions){let name=/\bconst\s+([A-Za-z_$][\w$]*)\b[^=]*=\s*["'`]/.exec(declaration)?.[1];if(!name||!declaration.includes(versions.from))return[];let escaped=versions.from.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),assertion=new RegExp(`(\\bexpect\\(\\s*${name}\\s*\\)\\s*\\.\\s*(?:toBe|toEqual|toStrictEqual)\\(\\s*["'\`])${escaped}(["'\`]\\s*\\))`),found=[],walk=dir=>{for(let entry of readdirSync5(dir,{withFileTypes:!0})){if(SKIPPED2.has(entry.name))continue;let path=join20(dir,entry.name);entry.isDirectory()?walk(path):SOURCE.test(entry.name)&&readFileSync12(path,"utf8").split(`
219
+ `).forEach((text,i)=>{assertion.test(text)&&found.push({file:relative10(root,path),line:i+1,before:text,after:text.replace(assertion,`$1${versions.to}$2`),reason:`the assertion on \`${name}\` follows the constant to ${versions.to}`})})}};for(let workspace of workspaces)if(!(workspace==="."&&workspaces.length>1))try{walk(join20(root,workspace))}catch{}return found.sort((a,b)=>a.file.localeCompare(b.file)||a.line-b.line)}function clientPins(root,workspaces,site,versions){let name=/\bconst\s+([A-Za-z_$][\w$]*)\b[^=]*=\s*["'`]/.exec(site.declaration)?.[1];if(!name||!site.declaration.includes(versions.from))return[];let exported=/^\s*export\s+const\b/.test(site.declaration),escaped=versions.from.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),literal=new RegExp(`(\\bapiVersion\\s*:\\s*)(["'\`])${escaped}\\2`),found=[],visit=path=>{let file=relative10(root,path);if(file===site.file)return;let text=readFileSync12(path,"utf8"),lines=text.split(`
220
+ `),hits=lines.flatMap((line,i)=>literal.test(line)?[i]:[]);if(hits.length===0)return;let imported=new RegExp(`\\bimport\\b[^;]*\\b${name}\\b`).test(text),importEdit=exported&&!imported?importOf(name,path,join20(root,site.file),lines):void 0;hits.forEach((i,n)=>{let before=lines[i];found.push({file,line:i+1,before,after:exported?before.replace(literal,`$1${name}`):before.replace(literal,`$1$2${versions.to}$2`),reason:exported?`this client uses \`${name}\` instead of repeating the API version`:`this client follows the API version to ${versions.to}`,...n===0&&importEdit?{also:[importEdit]}:{}})})},walk=dir=>{for(let entry of readdirSync5(dir,{withFileTypes:!0})){if(SKIPPED2.has(entry.name))continue;let path=join20(dir,entry.name);entry.isDirectory()?walk(path):SOURCE.test(entry.name)&&visit(path)}};for(let workspace of workspaces)if(!(workspace==="."&&workspaces.length>1))try{walk(join20(root,workspace))}catch{}return found.sort((a,b)=>a.file.localeCompare(b.file)||a.line-b.line)}function importOf(name,file,target,lines){let imports=new import_ts_morph13.Project({useInMemoryFileSystem:!0}).createSourceFile("file.ts",lines.join(`
221
+ `)).getImportDeclarations(),last=imports.at(-1);if(!last)return;let relatives=imports.filter(d=>d.getModuleSpecifierValue().startsWith(".")),sample=(relatives[0]??last).getText(),quote2=sample.includes("'")?"'":'"',semicolon=sample.trimEnd().endsWith(";")?";":"",style=relatives[0]?.getModuleSpecifierValue()??"",specifier=relative10(dirname13(file),target).split("\\").join("/");specifier.startsWith(".")||(specifier=`./${specifier}`),specifier=specifier.replace(/\.[cm]?tsx?$/,/\.[cm]?js$/.test(style)?".js":"");let statement=`import { ${name} } from ${quote2}${specifier}${quote2}${semicolon}`,first=relatives[0];if(first&&specifier.startsWith("../")&&!first.getModuleSpecifierValue().startsWith("../")){let at=first.getStartLineNumber(),before2=lines[at-1];return{line:at,before:before2,after:`${statement}
222
+ ${before2}`}}let anchor=(relatives.at(-1)??last).getEndLineNumber(),before=lines[anchor-1];return{line:anchor,before,after:`${before}
223
+ ${statement}`}}async function stripeUsageContext(root,workspaces,version){let typescriptAdapter2=createTypescriptAdapter(),paths=new Set,events=new Set,evidence=[];for(let workspace of workspaces){let repo={dir:join20(root,workspace)},surface=await typescriptAdapter2.installedSurface(repo,"stripe",version);if(!surface)continue;let scan=await typescriptAdapter2.findUsages(repo,"stripe",surface),found=stripeEvidence(root,workspace,scan.usages);for(let path of found.usagePaths)paths.add(path);for(let event of found.eventTypes)events.add(event);evidence.push(...found.evidence)}return{usagePaths:[...paths],eventTypes:[...events],evidence:[...new Map(evidence.map(e=>[JSON.stringify(e),e])).values()]}}function periodFixtureEdits(root,file){let text;try{text=readFileSync12(join20(root,file),"utf8")}catch{return[]}if(!/current_period_(?:start|end)/.test(text))return[];let lines=text.split(`
224
+ `),ast=new import_ts_morph13.Project({useInMemoryFileSystem:!0}).createSourceFile("fixture.ts",text),edits=[],seen=new Set;for(let literal of ast.getDescendantsOfKind(import_ts_morph13.SyntaxKind.ObjectLiteralExpression)){let start=literal.getProperty("current_period_start"),end=literal.getProperty("current_period_end"),items=literal.getProperty("items");if(!start||!end||!import_ts_morph13.Node.isPropertyAssignment(start)||!import_ts_morph13.Node.isPropertyAssignment(end))continue;if(!items){let last=start.getStartLineNumber()>end.getStartLineNumber()?start:end,line=last.getEndLineNumber(),before=lines[line-1];if(last.getStartLineNumber()!==line||seen.has(line)||literal.getStartLineNumber()===line||literal.getEndLineNumber()===line)continue;seen.add(line);let indent=/^\s*/.exec(before)?.[0]??"",kept=/,\s*(?:\/\/.*)?$/.test(before)?before:before.replace(/\s*$/,",");edits.push({file,line,before,after:`${kept}
225
+ ${indent}items: { data: [{ current_period_start: ${start.getInitializer()?.getText()??"0"}, current_period_end: ${end.getInitializer()?.getText()??"0"} }] },`,reason:"the fixture now carries the billing period on an item, where the API puts it since 2025-03-31.basil; the migrated code reads it there",rule:"subscription-period"});continue}if(!import_ts_morph13.Node.isPropertyAssignment(items))continue;let bag=items.getInitializer();if(!bag||!import_ts_morph13.Node.isObjectLiteralExpression(bag))continue;let data=bag.getProperty("data"),list=data&&import_ts_morph13.Node.isPropertyAssignment(data)?data.getInitializer():void 0;if(!(!list||!import_ts_morph13.Node.isArrayLiteralExpression(list)))for(let item of list.getElements()){if(!import_ts_morph13.Node.isObjectLiteralExpression(item)||item.getProperty("current_period_end"))continue;let line=item.getStartLineNumber();if(item.getEndLineNumber()!==line||seen.has(line))continue;seen.add(line);let before=lines[line-1],close=before.lastIndexOf("}",item.getEnd()-item.getStartLinePos());if(close<0)continue;let head=before.slice(0,close).replace(/,?\s*$/,""),fields2=`current_period_start: ${start.getInitializer()?.getText()??"0"}, current_period_end: ${end.getInitializer()?.getText()??"0"}`,body=head.endsWith("{")?`${head} ${fields2} `:`${head}, ${fields2} `;edits.push({file,line,before,after:`${body}${before.slice(close)}`,reason:"the fixture now carries the billing period on its item, where the API puts it since 2025-03-31.basil; the migrated code reads it there",rule:"subscription-period"})}}return edits}function aboveDeclaration(text,line,declaration){let statement=new import_ts_morph13.Project({useInMemoryFileSystem:!0}).createSourceFile("home.ts",text).getStatements().find(s=>s.getStartLineNumber()<=line&&line<=s.getEndLineNumber());if(!statement||import_ts_morph13.Node.isImportDeclaration(statement))return;let lines=text.split(`
226
+ `),at=statement.getStartLineNumber(!0);for(;at>1&&/^\s*(?:\/\/|\/\*|\*)/.test(lines[at-2]);)at--;return lines.splice(at-1,0,...declaration.split(`
227
+ `),""),{text:lines.join(`
228
+ `),line:at}}function sharedPeriodHelper(root,workspaces,findings,declaration){let name="subscriptionPeriod",periodSites=findings.filter(f=>/current_period_(?:start|end)/.test(f.change.path));if(periodSites.length===0)return;let ownerOf=file=>workspaces.filter(w=>w==="."||file.startsWith(`${w}/`)).sort((a,b)=>b.length-a.length)[0],siteWorkspaces=[...new Set(periodSites.map(f=>ownerOf(f.usage.file)??"."))],manifestOf=w=>{try{return JSON.parse(readFileSync12(join20(root,w,"package.json"),"utf8"))}catch{return{}}},dependsOn=(w,pkg2)=>["dependencies","devDependencies"].some(s=>{let spec=manifestOf(w)[s]?.[pkg2];return typeof spec=="string"&&/^(?:workspace|link|file):/.test(spec)}),clients=findings.filter(f=>/^new Stripe\(|= new Stripe\(|\? new Stripe\(/.test(f.usage.snippet.trim())),candidates=[...new Set(clients.map(f=>f.usage.file))].map(file=>({file,workspace:ownerOf(file)??"."})).filter(({workspace})=>{let pkg2=manifestOf(workspace).name;return siteWorkspaces.every(w=>w===workspace||typeof pkg2=="string"&&dependsOn(w,pkg2))}),first=[...periodSites].sort((x,y)=>x.usage.file.localeCompare(y.usage.file)||x.usage.line-y.usage.line)[0],inPlace=!candidates[0]&&siteWorkspaces.length===1,home=candidates[0]??(inPlace?{file:first.usage.file,workspace:siteWorkspaces[0]}:void 0);if(!home)return;let text;try{text=readFileSync12(join20(root,home.file),"utf8")}catch{return}if(new RegExp(`\\bfunction ${name}\\b`).test(text))return;let placed=inPlace?aboveDeclaration(text,first.usage.line,declaration):{text:`${text.replace(/\s*$/,`
229
+ `)}
230
+ ${declaration}
231
+ `,line:text.split(`
232
+ `).length};if(!placed)return;let edits=[{file:home.file,text:placed.text,line:placed.line}];for(let dir=dirname13(join20(root,home.file));dir.startsWith(join20(root,home.workspace));dir=dirname13(dir)){for(let index of["index.ts","index.tsx","index.mts"]){let barrel=join20(dir,index);if(!existsSync13(barrel)||barrel===join20(root,home.file))continue;let source=readFileSync12(barrel,"utf8"),relativeModule=relative10(dir,join20(root,home.file)).replace(/\.[cm]?[jt]sx?$/,""),m=new RegExp(`export\\s*\\{([^}]*)\\}\\s*from\\s*(["'])\\.\\/${relativeModule.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?:\\.[cm]?[jt]sx?|\\.js)?\\2`).exec(source);if(!m)continue;if(m[1]?.includes(name))break;let inner=m[1].replace(/\s*$/,""),joined=inner.endsWith(",")?`${inner} ${name} `:`${inner.trim()?`${inner}, `:" "}${name} `;edits.push({file:relative10(root,barrel),text:source.replace(m[0],m[0].replace(m[1],joined))})}if(dir===join20(root,home.workspace))break}let specifiers={},pkg=manifestOf(home.workspace).name;for(let w of siteWorkspaces)if(w===home.workspace){let from=periodSites.find(f=>ownerOf(f.usage.file)===w)?.usage.file??home.file,rel=relative10(dirname13(from),home.file).replace(/\.[cm]?[jt]sx?$/,"");specifiers[w]=`${rel.startsWith(".")?rel:`./${rel}`}.ts`}else typeof pkg=="string"&&(specifiers[w]=pkg);return{helper:{name,file:home.file,specifiers},edits}}function mockFollowUps(root,file,output,name){let missing=new Set([...output.matchAll(/No "(\w+)" export is defined on the "([^"]+)" mock/g)].filter(m=>m[1]===name).map(m=>m[2]));if(missing.size===0)return[];let text;try{text=readFileSync12(join20(root,file),"utf8")}catch{return[]}let edits=[];return text.split(`
233
+ `).forEach((line,i)=>{let m=/^(\s*)vi\.mock\((["'])([^"']+)\2,\s*\(\)\s*=>\s*\(\{\s*$/.exec(line);if(!m||!missing.has(m[3]))return;let[,indent,quote2,specifier]=m;edits.push({file,line:i+1,before:line,after:`${indent}vi.mock(${quote2}${specifier}${quote2}, async (importOriginal) => ({
234
+ ${indent} ...(await importOriginal<typeof import(${quote2}${specifier}${quote2})>()),`,reason:`the test mocks ${specifier} wholesale and the migrated code now imports ${name} from it; the mock starts from the real module and overrides what it did before`,rule:"subscription-period"})}),edits}function sdkApiVersion(dir){for(let relative16 of["cjs/apiVersion.d.ts","esm/apiVersion.d.ts","types/lib.d.ts","cjs/apiVersion.js","esm/apiVersion.js"]){let file=join21(dir,relative16);if(!existsSync14(file))continue;let match2=/(?:LatestApiVersion\s*=|ApiVersion\s*=)\s*['"](\d{4}-\d{2}-\d{2}(?:\.[\w-]+)?)['"]/.exec(readFileSync13(file,"utf8"));if(match2?.[1])return match2[1]}throw new Error("cannot read the API version pinned by this Stripe SDK; review manually")}var pin=/(?:^|[.#])(?:apiVersion|LatestApiVersion)$/;function resourcesOf(context){return context.evidence?.length?calledResources(context.evidence,context.eventTypes??[]):usedResources(context.usagePaths??[],context.eventTypes??[])}function workspaceOf(file,helper){return Object.keys(helper.specifiers).filter(w=>w==="."||file.startsWith(`${w}/`)).sort((a,b)=>b.length-a.length)[0]}function relativeSpecifier(from,to){let rel=relative11(dirname14(from),to).replace(/\.[cm]?[jt]sx?$/,"");return`${rel.startsWith(".")?rel:`./${rel}`}.ts`}function periodGuide(f,context){let shared=context?.helpers?.find(h=>h.name==="subscriptionPeriod"),workspace=shared?workspaceOf(f.usage.file,shared):void 0,mapped=shared&&workspace?shared.specifiers[workspace]:void 0,specifier=shared&&mapped?.startsWith(".")?relativeSpecifier(f.usage.file,shared.file):mapped;return[`For current_period_start or current_period_end on Subscription use the helper subscriptionPeriod(s), which returns { start, end } from the item that ends last, or undefined when the subscription has no items. ${shared&&shared.file===f.usage.file?"`subscriptionPeriod` is already defined in this file, above the function that reads the period. Call it; never define a second copy and never move it.":specifier?`\`subscriptionPeriod\` is already exported from \`${shared?.file}\`; import it with \`import { subscriptionPeriod } from "${specifier}"\` (add the name to an existing import from "${specifier}" when the file has one). Never define a local copy.`:`Define it once, before the enclosing function, exactly as: ${PERIOD_HELPER}`}`,"Call it once per site into a local (const period = subscriptionPeriod(subscription)) and read period.start / period.end. Never fall back to 0 or any other sentinel for a timestamp.",'When the helper returns undefined: where the code already handles a missing period (it fetches the full subscription), keep that path and use the undefined check for it; everywhere else throw new Error("subscription " + subscription.id + " has no items"), since Stripe never returns one. That throw is the one new failure mode allowed.',"Add a code comment at the site: identical to the old subscription-level values for a single-item subscription; the latest-ending item for a multi-item one. State the multi-item decision in your explanation."].join(" ")}var TEST_FILE=/(?:\.(?:test|spec)\.[cm]?[jt]sx?$|(?:^|\/)__tests__\/)/;function widenFixtureCast(text,finding){if((finding.usage.compileCode??Number(/^TS(\d+)$/.exec(finding.change.path)?.[1]))!==2352||!TEST_FILE.test(finding.usage.file))return;let casts=new import_ts_morph12.Project({useInMemoryFileSystem:!0}).createSourceFile("fixture.ts",text).getDescendantsOfKind(import_ts_morph12.SyntaxKind.AsExpression).filter(cast2=>{let type2=cast2.getTypeNode();return cast2.getStartLineNumber()===finding.usage.line&&type2!==void 0&&type2.getKind()!==import_ts_morph12.SyntaxKind.UnknownKeyword&&!import_ts_morph12.Node.isAsExpression(cast2.getExpression())&&type2.getText()!=="const"}),column=cast2=>cast2.getStart()-cast2.getStartLinePos()+1,cast=casts.find(c=>column(c)===finding.usage.column)??(casts.length===1?casts[0]:void 0),type=cast?.getTypeNode();if(!cast||!type)return;let at=type.getStart();return{text:`${text.slice(0,at)}unknown as ${text.slice(at)}`,applied:!0,rule:"fixture-cast",reason:`the test already cast this partial fixture to ${type.getText()}; the same cast now goes through unknown, which the compiler requires once the types stop overlapping`}}var PERIOD_HELPER=`type PeriodItem = { current_period_start: number; current_period_end: number };
235
+ /**
236
+ * The billing period of a subscription, from its items: Stripe moved current_period_start and
237
+ * current_period_end there in API 2025-03-31.basil. The item that ends last, start and end from
238
+ * that same item, so the period is always coherent; identical to the old subscription-level
239
+ * values for a single-item subscription. Undefined when there are no items, which Stripe never
240
+ * returns: the caller decides what that means where it stands.
241
+ */
242
+ export function subscriptionPeriod(s: { items: { data: PeriodItem[] } }): { start: number; end: number } | undefined {
243
+ const latest = s.items.data.reduce<PeriodItem | undefined>(
244
+ (best, item) => (best === undefined || item.current_period_end > best.current_period_end ? item : best),
245
+ undefined,
246
+ );
247
+ return latest && { start: latest.current_period_start, end: latest.current_period_end };
248
+ }`;var stripePack={name:"stripe",defaultTarget:"22.6.2",supports:(from,to)=>satisfies(from,">=14")&&satisfies(to,`>${from}`),rules:[{id:"api-version",kinds:["type","signature","narrowed","widened","required"],symbols:pin,guide:"Changing apiVersion changes server responses and webhook payloads. Review every intervening API changelog entry. Never update the literal mechanically or cast it to LatestApiVersion merely to compile. Confirm response and request field migrations and coordinate webhook endpoints/other services."},{id:"api-version-unpinned",kinds:["type"],symbols:/^Stripe\.StripeConfig#apiVersion$/,guide:"This client sets no apiVersion, so the SDK bump changes the API version it speaks at runtime. Either pin the version the installed SDK defaulted to (no behaviour change) or adopt the new default and migrate every field the changelog entries touch. The owner decides; do not pick for them."},{id:"sdk-surface",kinds:["removed","moved","signature","type","required","deprecated","narrowed","widened"],symbols:/./,guide:"Migrate the reported Stripe SDK usage while preserving payment, subscription and webhook semantics. Use the target diagnostic and checked-in API changelog. Never remove signature verification, change monetary amounts/currency, or introduce a cast to hide incompatible data."}],transform:(text,finding,context)=>{if(finding.rule==="api-version-unpinned"&&context.apiVersions){let pinned=pinClient(text,finding.usage.line,context.apiVersions.to);if(pinned!==void 0)return{text:pinned,applied:!0,rule:"api-version-unpinned",reason:`apiVersion: '${context.apiVersions.to}' added, the version the target SDK's types describe`}}let widened=widenFixtureCast(text,finding);return widened||{text,applied:!1,reason:pin.test(finding.change.path)||/apiVersion|LatestApiVersion/.test(finding.usage.compileError??"")?"API version changes runtime behaviour; assisted review required":"Stripe SDK/response-field migration requires assisted review"}},guide:(f,context)=>{let general=stripePack.rules.find(r=>r.kinds.includes(f.change.kind)&&r.symbols.test(f.change.path))?.guide??"Review the Stripe API upgrade before editing this usage.",isPin=pin.test(f.change.path)||/apiVersion|LatestApiVersion/.test(f.usage.compileError??""),entries=context?.apiVersions?evidencedEntries(between(changelog_v1_default,context.apiVersions.from,context.apiVersions.to),(context.evidence??[]).filter(e=>isPin||e.file===f.usage.file&&e.line===f.usage.line)):[];return[general,`Target API literal: ${context?.apiVersions?.to??"unknown: do not guess"}. Update literal values, never cast away the API-version constraint.`,"Never change `api_version` values inside webhook payloads, event objects or their test fixtures: they record the API version configured on the webhook endpoint, not the SDK pin.","Patch ONLY the current reported site. When adding a helper, insert immediately before the enclosing function shown in the context, using its exact source as the patch anchor. Do not guess unshown lines or fix other evidence sites. Reuse an existing helper if provided. Never introduce throws, nulls, or new failure modes in a migration. Preserve existing payment and webhook behavior and constructEvent signature verification.",periodGuide(f,context),...entries.map(({entry:e,evidence})=>`${e.version}: "${e.title}" (${e.url}) \u2014 evidence: ${evidence.map(u=>`${u.file}:${u.line} ${u.path}`).join("; ")}`)].join(`
249
+ `)},validateAssisted(text,finding,explanation,original="",context){let ast=source=>new import_ts_morph12.Project({useInMemoryFileSystem:!0}).createSourceFile("code.ts",source),before=ast(original),after=ast(text),payloads=source=>source.match(/\bapi_version["']?\s*:\s*["'][^"']+["']/g)??[];if(payloads(text).join("|")!==payloads(original).join("|"))return"Do not change api_version values in webhook payloads or fixtures; they reflect the endpoint configuration.";let throws=source=>ast(source).getDescendantsOfKind(import_ts_morph12.SyntaxKind.ThrowStatement).filter(t=>!/no items/.test(t.getText())).length;if(throws(text)>throws(original))return"Never introduce throws, nulls or new failure modes in a migration.";for(let kind of[import_ts_morph12.SyntaxKind.NullKeyword]){let count3=before.getDescendantsOfKind(kind).length;if(after.getDescendantsOfKind(kind).length>count3)return"Never introduce throws, nulls or new failure modes in a migration."}if(!/current_period_(end|start)/.test(`${finding.change.path} ${finding.usage.compileError??""}`))return;if(!/single[- ]item/i.test(text)||!/multi[- ]item/i.test(explanation))return"Document single-item equivalence in code and the multi-item decision in the explanation.";let had=new Set(original.split(`
250
+ `)),added=text.split(`
251
+ `).filter(line=>!had.has(line)).join(`
252
+ `),shared=context?.helpers?.some(h=>h.name==="subscriptionPeriod");if(shared&&/\bfunction subscriptionPeriod\b|\bconst subscriptionPeriod\b/.test(added))return"subscriptionPeriod is already exported from the shared billing module: import it, do not define a copy.";if(!shared&&(!/\.reduce(?:<[^>]*>)?\(/.test(text)||!/current_period_end\s*>/.test(text)))return"Use the deterministic helper that picks the item ending last and returns start and end from that same item.";if(!/\bsubscriptionPeriod\(/.test(added)&&!(/\bsubscriptionPeriod\(/.test(text)&&/\bperiod\.(?:start|end)\b/.test(added)))return"Read the period through subscriptionPeriod(subscription), not from the subscription itself.";if(/(?:period|start|end|_at)\b[^\n]*(?:\?\?|\|\|)\s*0\b/.test(added))return'No sentinel for a timestamp: handle undefined where the code stands (keep the existing fetch path, or throw "has no items"), never fall back to 0.';if(/Math\.(?:max|min)\(/.test(added))return"Start and end must come from the same item: no separate Math.max over ends or Math.min over starts.";if(/\.data\s*\[\s*0\s*\]|\.length\s*!==?\s*1/.test(added))return"Do not choose a first item or add a single-item failure guard."},async resolveContext(context){let fetcher=createNpmFetcher(),a=await fetcher.fetch("stripe",context.from),b=await fetcher.fetch("stripe",context.to);try{return{...context,apiVersions:{from:sdkApiVersion(a.dir),to:sdkApiVersion(b.dir)}}}finally{await releasePackage(fetcher,a),await releasePackage(fetcher,b)}},reviewNotes:context=>[`SDK ${context.from} \u2192 ${context.to}. API pin ${context.apiVersions?.from??"unknown"} \u2192 ${context.apiVersions?.to??"unknown"}. SDK releases pin an API date; the date can also change within a major.`,"Changing apiVersion can change response shapes and webhook payloads. It is never a mechanical fix."],followUps({root,workspaces,finding,context}){return!(pin.test(finding.change.path)||/apiVersion|LatestApiVersion/.test(finding.usage.compileError??""))||!context.apiVersions?[]:[...pinAssertions(root,workspaces,finding.usage.snippet,context.apiVersions),...clientPins(root,workspaces,{file:finding.usage.file,declaration:finding.usage.snippet},context.apiVersions)]},sharedHelpers({root,workspaces,findings}){let placed=sharedPeriodHelper(root,workspaces,findings,PERIOD_HELPER);return placed?[placed]:[]},testFollowUps({root,workspaces,failing,output="",context}){let candidates=f=>[f,...workspaces.map(w=>join21(w,f))];return failing.flatMap(f=>{let file=candidates(f).find(c=>existsSync14(join21(root,c)));return file?[...periodFixtureEdits(root,file),...(context.helpers??[]).flatMap(h=>mockFollowUps(root,file,output,h.name))]:[]})},apiChanges(context){if(!context.apiVersions)return;let{from,to}=context.apiVersions,entries=between(changelog_v1_default,from,to),evidenced=evidencedEntries(entries,context.evidence??[]).map(e=>e.entry),names=resourcesOf(context),byResource=resourceEntries(entries,evidenced,names);return{from,to,total:entries.length,relevant:evidenced.length,breaking:entries.filter(e=>e.breaking).length,...byResource.length?{resources:{total:byResource.length,breaking:byResource.filter(e=>e.breaking).length,names}}:{}}},decisions(context,rules=[]){let choices=[];if(rules.includes("api-version-unpinned")&&context.apiVersions){let{from,to}=context.apiVersions;choices.push(`- A client was created without \`apiVersion\`, so it spoke \`${from}\`, the SDK default. Two PRs are possible: (a) the small one, stay on stripe ${context.from} and write \`apiVersion: '${from}'\` on the client, zero behaviour change: \`${UPTIDE_COMMAND} fix --only stripe --pin-current-api\`; (b) the full one, this PR: stripe ${context.to}, \`apiVersion: '${to}'\`, and the code migrated to it. Not offered: stripe ${context.to} pinned to \`${from}\`, because the new SDK's types describe \`${to}\` and the code would compile against shapes the server no longer sends.`)}rules.includes("subscription-period")&&choices.push("- The subscription billing period now comes from one item: the item that ends last, start and end from that same item. Identical to the old subscription-level values for a single-item subscription. Items can have different periods: this chooses the latest-ending item, not a shared billing period. Confirm that this is the desired business rule.",'- A subscription with no items (Stripe never returns one) makes the helper return undefined: a webhook keeps its existing path of fetching the full subscription; an API route throws "subscription has no items". No sentinel timestamps. Pagination can omit items: the helper uses the returned items.data, so review subscriptions with more items than one response page.');let kept=(context.payloadVersions??[]).filter(p=>p.value!==context.apiVersions?.to);if(kept.length===0)return choices;let values=[...new Set(kept.map(p=>p.value))].map(v=>`\`${v}\``).join(", "),files=new Map;for(let p of kept)files.set(p.file,[...files.get(p.file)??[],p.line]);let where=[...files].map(([file,lines])=>`\`${file}\` (line${lines.length===1?"":"s"} ${lines.join(", ")})`).join("; ");return[...choices,`- \`api_version\` stays ${values} in ${kept.length} webhook payload fixture${kept.length===1?"":"s"}: ${where}. They reflect the API version configured on the webhook endpoint, which this upgrade does not change; update them when you roll the endpoint.`]},runtimeFindings({workspace,from,to,installedDir,targetDir,usages,read:read2}){let api={from:sdkApiVersion(installedDir),to:sdkApiVersion(targetDir)};if(api.from===api.to)return[];let path="Stripe.StripeConfig#apiVersion",reason=`API version changes from ${api.from} to ${api.to} at runtime`;return unpinnedClients(usages,file=>read2(join21(workspace,file))).map(site=>({change:{package:"stripe",from,to,path,kind:"type",severity:"breaking",source:"pack",confidence:1,before:api.from,after:api.to},usage:{...site,symbolPath:path,access:"construct",via:"direct"},severity:"breaking",confidence:1,fixability:"manual",reason,rule:"api-version-unpinned"}))},describeFinding(finding,context){if(finding.rule!=="api-version-unpinned"||!context.apiVersions)return;let{from,to}=context.apiVersions,entries=between(changelog_v1_default,from,to),relevant=evidencedEntries(entries,context.evidence??[]);return{reason:`API version changes from ${from} to ${to} at runtime: ${relevant.length} of ${entries.length} API changes touch what this repository reads`,details:relevant.map(({entry,evidence})=>{let byFile=new Map;for(let e of evidence)byFile.set(e.file,new Set(byFile.get(e.file)??[]).add(e.line));let where=[...byFile].map(([file,lines])=>`${file}:${[...lines].sort((a,b)=>a-b).join(",")}`).join("; ");return`${entry.version}: ${entry.title} \u2014 ${where}`})}},planContext({root,workspace,installedDir,targetDir,usages}){return{apiVersions:{from:sdkApiVersion(installedDir),to:sdkApiVersion(targetDir)},evidence:stripeEvidence(root,workspace,usages).evidence}},planNote(rule,context){if(!["api-version","api-version-unpinned"].includes(rule)||!context.apiVersions)return;let entries=between(changelog_v1_default,context.apiVersions.from,context.apiVersions.to),relevant=evidencedEntries(entries,context.evidence??[]).length,changes=`API change${entries.length===1?"":"s"}`;return relevant>0?`${relevant} API change${relevant===1?"":"s"} since ${context.apiVersions.from} affect${relevant===1?"s":""} your code`:`none of the ${entries.length} ${changes} since ${context.apiVersions.from} has evidence in your code`},reviewSections(context){if(!context.apiVersions)throw new Error("Stripe API versions must be resolved before generating the PR");let entries=between(changelog_v1_default,context.apiVersions.from,context.apiVersions.to),relevant=evidencedEntries(entries,context.evidence??[]),names=resourcesOf(context),byResource=resourceEntries(entries,relevant.map(r=>r.entry),names),other=entries.filter(e=>!relevant.some(r=>r.entry===e)&&!byResource.includes(e)),render=e=>`- ${e.version}: [${e.title}](${e.url}) \u2014 ${e.breaking?"breaking":"non-breaking"}; ${e.products}`,breaking=byResource.filter(e=>e.breaking).length;return[{title:"Stripe API changelog",lines:[`${relevant.length} of ${entries.length} affect your code: each shown entry names a method, field, parameter or event the code uses, with where. ${byResource.length} more change resources the code uses (${breaking} breaking), listed below breaking first, then the rest.`,"",...relevant.map(({entry,evidence})=>`${render(entry)} \u2014 evidence: ${evidence.map(e=>`\`${e.file}:${e.line}\` (${e.kind} \`${e.path}\`)`).join("; ")}`)],lists:[{summary:`${byResource.length} changes to resources you use (${breaking} breaking): ${names.map(n=>n.replaceAll("_"," ")).join(", ")}`,items:byResource.map(render),more:`- \u2026 {n} more not shown here: [Stripe's changelog](https://docs.stripe.com/changelog), ${context.apiVersions.from} \u2192 ${context.apiVersions.to}.`},{summary:`${other.length} other changelog entries`,items:other.map(render),more:`- \u2026 {n} more not shown here: [Stripe's changelog](https://docs.stripe.com/changelog), ${context.apiVersions.from} \u2192 ${context.apiVersions.to}.`}].filter(list=>list.items.length>0)},{title:"Also check outside the code",lines:["- Webhook endpoint API versions configured in the Stripe dashboard, including replayed events.","- API versions pinned by other services, workers, and consumers of webhook payloads."]}]}},zodGuide={errors:"Zod 4 uses error for customization. required_error and invalid_type_error were removed. Distinguish missing input using issue.input === undefined; returning undefined delegates to the default error map. Do not combine the old keys with errorMap.",formats:"String formats moved to top-level factories. email, uuid, url and base64 are on z; datetime is on z.iso. Keep validation options and subsequent chain operations. message is deprecated in favor of error.",ip:"The combined string.ip validator was removed. Use z.ipv4() or z.ipv6() when the intended family is known; use z.union([z.ipv4(), z.ipv6()]) when the previous validator accepted both families. These are top-level factories, not z.string() methods. Preserve options and error text.",generics:"ZodType now takes Output and Input, defaulting to unknown. The definition type parameter is gone. Remove reliance on ZodTypeDef without weakening the input/output contract. SafeParse success contains data; failure contains error. Narrow on success before accessing either. Preserve validation and type safety; do not cast to any to hide diagnostics."},DEFAULTS=[{was:/^Required$/,rewrite:()=>"received undefined",now:"Invalid input: expected <type>, received undefined"},{was:/^Expected (\w+), received (\w+)$/,rewrite:text=>text.replace(/^Expected (\w+), received (\w+)$/,"Invalid input: expected $1, received $2"),now:"Invalid input: expected <type>, received <type>"},{was:/^Invalid (?:email|uuid|url|datetime|date|cuid|ulid|ip)$/,now:"a reworded format message"},{was:/^Invalid enum value\b/,now:"Invalid option: expected one of \u2026"},{was:/^Invalid literal value\b/,now:"Invalid input: expected \u2026"},{was:/^(?:String|Array) must contain (?:at least|at most|exactly) \d+ /,now:"Too small / Too big: expected \u2026"},{was:/^Number must be (?:greater|less) than\b/,now:"Too small / Too big: expected number \u2026"},{was:/^Unrecognized key\(s\) in object\b/,now:"Unrecognized key: \u2026"}],SOURCE2=/\.[cm]?[jt]sx?$/,TEST=/\.(?:test|spec)\.[cm]?[jt]sx?$/,SKIPPED3=new Set(["node_modules","dist","build","coverage",".git",".uptide"]),LITERAL=/(["'`])((?:\\.|(?!\1)[^\\\n])*)\1/g,BUILDER=/\bz\.\w+\(|\.(?:min|max|length|nonempty|email|url|uuid|regex|refine|superRefine|int|positive)\(/,MATCHER=/\b(?:expect\b|toBe|toEqual|toStrictEqual|toContain|toMatch|toThrow|stringContaining|stringMatching|toHaveProperty|toHaveBeenCalledWith|objectContaining)\b/;function defaultMessageSites(root,workspaces){let found=[],visit=path=>{let text=readFileSync14(path,"utf8"),usesZod=/from\s+["']zod(?:\/[\w./-]+)?["']|require\(\s*["']zod["']\s*\)/.test(text),isTest=TEST.test(path);!usesZod&&!isTest||text.split(`
253
+ `).forEach((line,i)=>{if(!(!usesZod&&!MATCHER.test(line))&&!/\b(?:message|error|required_error|invalid_type_error)\s*:/.test(line)&&!(!MATCHER.test(line)&&BUILDER.test(line)))for(let match2 of line.matchAll(LITERAL)){let value=match2[2]??"",known=DEFAULTS.find(d=>d.was.test(value));if(!known)continue;let replacement=known.rewrite?.(value);found.push({file:relative12(root,path),line:i+1,text:value,now:known.now,...replacement!==void 0?{replacement}:{}})}})},walk=dir=>{for(let entry of readdirSync6(dir,{withFileTypes:!0})){if(SKIPPED3.has(entry.name))continue;let path=join22(dir,entry.name);entry.isDirectory()?walk(path):SOURCE2.test(entry.name)&&visit(path)}};for(let workspace of workspaces)if(!(workspace==="."&&workspaces.length>1))try{walk(join22(root,workspace))}catch{}return found.sort((a,b)=>a.file.localeCompare(b.file)||a.line-b.line)}var params={string:0,number:0,boolean:0,bigint:0,date:0,symbol:0,undefined:0,null:0,void:0,any:0,unknown:0,never:0,enum:1,nativeEnum:1,object:1,strictObject:1,literal:1,array:1,tuple:1,union:1,discriminatedUnion:2,record:2,map:2,set:1},formats=new Set(["email","uuid","url","base64","datetime"]);function edit(text,changes){for(let c of changes.sort((a,b)=>b.start-a.start))text=text.slice(0,c.start)+c.text+text.slice(c.end);return text}function namespace(node){if(!import_ts_morph14.Node.isIdentifier(node))return!1;let declaration=node.getSymbol()?.getDeclarations()[0],imported=declaration?.getFirstAncestorByKind(import_ts_morph14.SyntaxKind.ImportDeclaration);return!imported||!/^zod(?:\/v3)?$/.test(imported.getModuleSpecifierValue())?!1:import_ts_morph14.Node.isNamespaceImport(declaration)||import_ts_morph14.Node.isImportClause(declaration)||import_ts_morph14.Node.isImportSpecifier(declaration)&&declaration.getName()==="z"}function factory(call){let expression=call.getExpression();if(import_ts_morph14.Node.isPropertyAccessExpression(expression)){let receiver=expression.getExpression();if(namespace(receiver)||import_ts_morph14.Node.isPropertyAccessExpression(receiver)&&receiver.getName()==="coerce"&&namespace(receiver.getExpression()))return expression.getName()}if(import_ts_morph14.Node.isIdentifier(expression)){let declaration=expression.getSymbol()?.getDeclarations()[0];if(declaration&&import_ts_morph14.Node.isImportSpecifier(declaration)&&/^zod(?:\/v3)?$/.test(declaration.getImportDeclaration().getModuleSpecifierValue()))return declaration.getName()}}function errorTransform(text,call){let name=factory(call);if(name===void 0||params[name]===void 0)return;let argument=call.getArguments()[params[name]];if(!argument||!import_ts_morph14.Node.isObjectLiteralExpression(argument))return;let properties=argument.getProperties(),required=argument.getProperty("required_error"),invalid=argument.getProperty("invalid_type_error");if(!required&&!invalid)return;let skip=reason=>({text,applied:!1,reason});if(argument.getProperty("error")||argument.getProperty("errorMap"))return skip("existing error/errorMap needs manual merging");if(properties.some(p=>import_ts_morph14.Node.isSpreadAssignment(p)||import_ts_morph14.Node.isPropertyAssignment(p)&&import_ts_morph14.Node.isComputedPropertyName(p.getNameNode())))return skip("spread or computed params need manual review");if(required&&!import_ts_morph14.Node.isPropertyAssignment(required)||invalid&&!import_ts_morph14.Node.isPropertyAssignment(invalid))return skip("non-property error option needs manual review");let req=required&&import_ts_morph14.Node.isPropertyAssignment(required)?required.getInitializer():void 0,inv=invalid&&import_ts_morph14.Node.isPropertyAssignment(invalid)?invalid.getInitializer():void 0,a=req?.getText()??"undefined",b=inv?.getText()??"undefined",literal=n=>!n||import_ts_morph14.Node.isStringLiteral(n)||import_ts_morph14.Node.isNoSubstitutionTemplateLiteral(n),value=`(iss) => iss.input === undefined ? ${a} : ${b}`;if(!literal(req)||!literal(inv)){let capture=`(<T extends { required_error?: string; invalid_type_error?: string }>(options: T) => { const { required_error, invalid_type_error, ...rest } = options; return { ...rest, error: (iss: { input: unknown }) => iss.input === undefined ? required_error : invalid_type_error }; })(${argument.getText()})`;return{text:edit(text,[{start:argument.getStart(),end:argument.getEnd(),text:capture}]),applied:!0,rule:"error-params",reason:"capture error expressions and other options in original evaluation order"}}let first=[required,invalid].filter(p=>!!p).sort((x,y)=>x.getStart()-y.getStart())[0];if(!first)return;let comments=[];for(let property of[required,invalid].filter(p=>!!p).sort((x,y)=>x.getStart()-y.getStart())){let scanner=import_ts_morph14.ts.createScanner(import_ts_morph14.ts.ScriptTarget.Latest,!1,import_ts_morph14.ts.LanguageVariant.Standard,property.getText());for(let token=scanner.scan();token!==import_ts_morph14.ts.SyntaxKind.EndOfFileToken;token=scanner.scan())token===import_ts_morph14.ts.SyntaxKind.SingleLineCommentTrivia&&comments.push(`${scanner.getTokenText()}
254
+ `),token===import_ts_morph14.ts.SyntaxKind.MultiLineCommentTrivia&&comments.push(`${scanner.getTokenText()} `)}let changes=[{start:first.getStart(),end:first.getEnd(),text:`${comments.join("")}error: ${value}`}];for(let p of[required,invalid]){if(!p||p===first)continue;let comma=/^\s*,/.exec(text.slice(p.getEnd()));changes.push({start:p.getStart(),end:p.getEnd()+(comma?.[0].length??0),text:""})}return{text:edit(text,changes),applied:!0,rule:"error-params",reason:"preserve missing/invalid input messages with error"}}function formatTransform(text,call){let expression=call.getExpression();if(!import_ts_morph14.Node.isPropertyAccessExpression(expression)||!formats.has(expression.getName()))return;let root=expression.getExpression();if(!import_ts_morph14.Node.isCallExpression(root)||factory(root)!=="string"||root.getArguments().length!==0)return{text,applied:!1,reason:"format chain is not directly rooted at z.string() without options"};let rootExpression=root.getExpression();if(!import_ts_morph14.Node.isPropertyAccessExpression(rootExpression)||!namespace(rootExpression.getExpression()))return{text,applied:!1,reason:"format migration requires a zod namespace binding"};if(/\/\*|\/\//.test(text.slice(root.getStart(),expression.getEnd())))return{text,applied:!1,reason:"comments inside the format receiver require manual placement"};let name=expression.getName()==="datetime"?"iso.datetime":expression.getName(),changes=[{start:expression.getStart(),end:expression.getEnd(),text:`${rootExpression.getExpression().getText()}.${name}`}];for(let argument of call.getArguments()){if(!import_ts_morph14.Node.isObjectLiteralExpression(argument))continue;let message=argument.getProperty("message");if(message&&import_ts_morph14.Node.isPropertyAssignment(message)){if(argument.getProperty("error"))return{text,applied:!1,reason:"both message and error require manual review"};changes.push({start:message.getNameNode().getStart(),end:message.getNameNode().getEnd(),text:"error"})}}return{text:edit(text,changes),applied:!0,rule:"string-format",reason:"use top-level format factory, preserving arguments and subsequent chain"}}var parsed=new Map;onReset(()=>parsed.clear());function parse3(text){let source=parsed.get(text);return source||(source=new import_ts_morph14.Project({useInMemoryFileSystem:!0}).createSourceFile("consumer.ts",text),parsed.size>=16&&parsed.delete(parsed.keys().next().value),parsed.set(text,source)),source}function transform(text,finding,context){if(!zodPack.supports(context.from,context.to))return{text,applied:!1,reason:"pack supports zod 3 to 4 only"};let rule=zodPack.rules.find(r=>r.kinds.includes(finding.change.kind)&&r.symbols.test(finding.change.path));if(!rule||!["error-params","string-format"].includes(rule.id))return{text,applied:!1,reason:"no mechanical rule for this change kind and symbol"};let source=parse3(text),offset=text.split(`
255
+ `).slice(0,finding.usage.line-1).reduce((n,l)=>n+l.length+1,0)+finding.usage.column-1,calls=source.getDescendantsOfKind(import_ts_morph14.SyntaxKind.CallExpression).filter(c=>c.getStart()<=offset&&c.getEnd()>=offset).sort((a,b)=>a.getWidth()-b.getWidth());for(let call of calls){let result=finding.change.kind==="deprecated"?context.includeDeprecated?formatTransform(text,call):void 0:errorTransform(text,call);if(result)return result}return{text,applied:!1,reason:"no safe mechanical transform for this reported site"}}var zodPack={name:"zod",defaultTarget:"4.6.5",supports:(from,to)=>satisfies(from,">=3 <4")&&satisfies(to,">=4 <5"),rules:[{id:"error-params",kinds:["signature","type","required"],symbols:/string|number|boolean|bigint|date|symbol|undefined|null|void|any|unknown|never|enum|object|literal|array|tuple|union|record|map|set|TS(?:2353|2769|2345)/,guide:zodGuide.errors},{id:"string-format",kinds:["deprecated"],symbols:/#(email|uuid|url|base64|datetime)$/,guide:zodGuide.formats},{id:"ip",kinds:["removed"],symbols:/#ip$/,guide:zodGuide.ip},{id:"types",kinds:["type","signature","removed","narrowed","cause"],symbols:/./,guide:zodGuide.generics,perFile:!0}],transform,guide:f=>zodPack.rules.find(r=>r.kinds.includes(f.change.kind)&&r.symbols.test(f.change.path))?.guide??zodGuide.generics,scanContext:(root,workspaces)=>({defaultMessages:defaultMessageSites(root,workspaces)}),testFollowUps({root,failing,context,output}){let edits=[],printed=[...new Set((output??"").match(/Invalid input: expected [\w ]+?, received \w+/g)??[])];for(let site of context.defaultMessages??[]){if(site.replacement===void 0||!failing.some(f=>site.file===f||site.file.endsWith(`/${f}`)))continue;let before;try{before=readFileSync15(join23(root,site.file),"utf8").split(`
256
+ `)[site.line-1]}catch{continue}if(before===void 0||!before.includes(site.text))continue;let partial=/\b(?:stringContaining|stringMatching|toContain|toMatch|toThrow)\(/.test(before),whole=printed.filter(sentence2=>sentence2.endsWith(site.replacement));if(!partial&&whole.length!==1)continue;let replacement=partial?site.replacement:whole[0];edits.push({file:site.file,line:site.line,before,after:before.replace(site.text,replacement),reason:`zod 4 says "${site.now}" where zod 3 said "${site.text}"; the assertion follows`})}return edits},decisions(context,_rules,followed=[]){let lines=[],updated=followed.filter(f=>f.rule==="default-messages"),literal=text=>/(["'`])((?:\\.|(?!\1).)*)\1/.exec(text)?.[0];updated.length&&lines.push(`- Zod 4 words its default error messages differently, and a test of the migrated code failed on it. Updated ${updated.length} assertion${updated.length===1?"":"s"}: ${updated.map(u=>{let site=context.defaultMessages?.find(d=>d.file===u.file&&d.line===u.line),whole=/Invalid input: expected [\w ]+?, received \w+/.exec(u.after)?.[0],written2=whole??site?.replacement??literal(u.after)??"";return`\`${u.file}:${u.line}\` \`"${site?.text??literal(u.before)??""}"\` \u2192 \`"${written2}"\`${site&&!whole?` (zod 4 says "${site.now}")`:""}`}).join("; ")}. Confirm that nothing outside the tests reads this text: logs, alerts, dead-letter descriptions, API responses.`);let rest=(context.defaultMessages??[]).filter(d=>!updated.some(u=>u.file===d.file&&u.line===d.line));return rest.length&&lines.push(`- ${rest.length} other place${rest.length===1?" depends":"s depend"} on a zod default message, which zod 4 words differently, and ${rest.length===1?"was":"were"} not changed: ${rest.slice(0,8).map(d=>`\`${d.file}:${d.line}\` \`"${d.text}"\``).join("; ")}${rest.length>8?`; and ${rest.length-8} more`:""}.`),lines},reviewNotes:()=>["Review validation behaviour and custom messages; compilation alone cannot prove runtime equivalence.","Migration reference: https://zod.dev/v4/changelog"]},PROBE_SOURCE=`
257
+ import { createRequire } from 'node:module';
258
+
259
+ const [, , name, mode] = process.argv;
260
+ const require = createRequire(process.cwd() + '/probe.mjs');
261
+
262
+ function describe(value) {
263
+ const kind = value === null ? 'null' : typeof value;
264
+ const out = { ok: true, kind };
265
+ if (kind === 'function' || kind === 'object') {
266
+ const keys = {};
267
+ for (const key of Object.keys(value)) {
268
+ try { keys[key] = typeof value[key]; } catch { keys[key] = 'unknown'; }
269
+ }
270
+ out.keys = keys;
271
+ }
272
+ if (kind === 'function') {
273
+ out.callable = true;
274
+ out.constructable = typeof value.prototype === 'object' && value.prototype !== null;
275
+ }
276
+ const def = value && (kind === 'object' || kind === 'function') ? value.default : undefined;
277
+ if (def !== undefined) {
278
+ out.defaultKind = typeof def;
279
+ if (typeof def === 'function') {
280
+ out.defaultCallable = true;
281
+ out.defaultConstructable = typeof def.prototype === 'object' && def.prototype !== null;
282
+ }
283
+ if (def && (typeof def === 'object' || typeof def === 'function')) {
284
+ out.defaultKeys = Object.keys(def);
285
+ }
286
+ }
287
+ return out;
288
+ }
289
+
290
+ function failure(err) {
291
+ const message = String(err && err.message ? err.message : err);
292
+ const missing = /Cannot find (?:module|package) '([^']+)'/.exec(message);
293
+ const importedFrom = /imported from (\\S+)/.exec(message);
294
+ const stack = err && Array.isArray(err.requireStack) ? err.requireStack[0] : undefined;
295
+ return {
296
+ ok: false,
297
+ code: err && err.code ? String(err.code) : undefined,
298
+ message: message.split('\\n')[0].slice(0, 300),
299
+ missing: missing ? missing[1] : undefined,
300
+ from: stack || (importedFrom ? importedFrom[1] : undefined),
301
+ };
302
+ }
303
+
304
+ const result = {};
305
+ if (mode === 'require' || mode === 'both') {
306
+ try { result.require = describe(require(name)); } catch (err) { result.require = failure(err); }
307
+ }
308
+ if (mode === 'import' || mode === 'both') {
309
+ try { result.import = describe(await import(name)); } catch (err) { result.import = failure(err); }
310
+ }
311
+ process.stdout.write(JSON.stringify(result) + '\\n');
312
+ `,PROBE_TIMEOUT_MS=15e3,CACHE_SCHEMA=2;async function probeRuntime(packageDir,opts){let manifest2=readManifest2(packageDir),name=manifest2?.name??"unknown",version=manifest2?.version??"0.0.0",node=chooseNode(opts.nodeRange,opts.nodeBinary),cacheDir=opts.cacheDir??defaultCacheDir(),cacheFile=join24(cacheDir,"runtime",...packagePathSegments(name),`${version}-node${node.major}.json`);if(!opts.noCache&&existsSync15(cacheFile))try{let cached=JSON.parse(readFileSync16(cacheFile,"utf8"));if(cached.schema===CACHE_SCHEMA&&cached.surface.package===name&&cached.surface.version===version)return{...cached.surface,nodeSource:node.source}}catch{}let base={package:name,version,node:node.version,nodeSource:node.source,require:{ok:!1},import:{ok:!1}},native=looksNative(manifest2),surface=native?{...base,inconclusive:native}:await probeWithDependencies(name,packageDir,node,opts,base);if(!opts.noCache)try{if(mkdirSync3(dirname15(cacheFile),{recursive:!0}),!surface.inconclusive||looksNative(manifest2)){let temporary=`${cacheFile}.${process.pid}.${Math.random().toString(16).slice(2)}.tmp`;writeFileSync4(temporary,JSON.stringify({schema:CACHE_SCHEMA,surface})),renameSync(temporary,cacheFile)}}catch{}return surface}var MAX_DEPENDENCY_ROUNDS=40;async function probeWithDependencies(name,packageDir,node,opts,base){let links={...opts.extraLinks??{}},tried=new Set(Object.keys(links)),consumer=opts.linkConsumer===!1?void 0:opts.dependenciesFrom,bring=async dir=>{if(!opts.resolveDependency)return!0;let m=readManifest2(dir);for(let[dep,range]of Object.entries({...m?.peerDependencies,...m?.dependencies})){if(dep===name||tried.has(dep))continue;tried.add(dep);let found=await opts.resolveDependency(dep,range).catch(()=>{});found&&(links[dep]=found)}return!0};consumer===void 0&&await bring(packageDir);for(let round2=0;round2<MAX_DEPENDENCY_ROUNDS;round2++){let result=runProbe(name,packageDir,node,consumer,links,base),missing=missingDependency(name,result);if(!missing||!opts.resolveDependency)return result;if(tried.has(missing.dep)&&links[missing.dep]===void 0)return{...result,inconclusive:`dependency "${missing.dep}@${missing.range}" could not be provided to the probe`};tried.add(missing.dep);let dir=links[missing.dep]??await opts.resolveDependency(missing.dep,missing.range).catch(()=>{});if(!dir)return{...result,inconclusive:`dependency "${missing.dep}@${missing.range}" could not be provided to the probe`};if(links[missing.dep]===void 0)links[missing.dep]=dir,await bring(dir);else return result}return runProbe(name,packageDir,node,consumer,links,base)}function missingDependency(name,result){for(let load of[result.require,result.import]){if(load.ok||!load.missing)continue;let dep=packageNameOf3(missingPackage(load.missing));if(dep===name||dep.startsWith(".")||dep.startsWith("/")||dep.startsWith("node:"))continue;let range=load.missingRange??"*";return{dep,range}}}function packageNameOf3(specifier){let parts=specifier.split("/");return specifier.startsWith("@")?parts.slice(0,2).join("/"):parts[0]??specifier}function nearestManifestDir(dir){let current=dir;for(let i=0;i<20;i++){if(existsSync15(join24(current,"package.json")))return current;let up=dirname15(current);if(up===current)return;current=up}}function declaredRangeIn(dir,dep){let m=readManifest2(dir);return m?.dependencies?.[dep]??m?.peerDependencies?.[dep]??m?.optionalDependencies?.[dep]}function looksNative(manifest2){if(!manifest2)return;if(manifest2.gypfile||manifest2.binary)return"native addon (gypfile/binary in package.json)";let scripts=manifest2.scripts??{};for(let hook of["install","preinstall","postinstall"])if(scripts[hook])return`install script "${hook}" is never run`;if(Object.keys(manifest2.optionalDependencies??{}).some(dep=>/^@[\w-]+\/[\w-]+-(darwin|linux|win32|android|freebsd)-/.test(dep)))return"platform-specific optional dependencies (prebuilt binaries)"}function runProbe(name,packageDir,node,dependenciesFrom,extraLinks,base){let sandbox=mkdtempSync3(join24(tmpdir4(),"uptide-probe-"));try{let modules=join24(sandbox,"node_modules");mkdirSync3(modules),dependenciesFrom!==void 0&&linkDependencies(dependenciesFrom,modules,name);let tree=treeRoot(dependenciesFrom??resolve8(packageDir));for(let[dep,dir]of Object.entries(extraLinks)){if(dep===name)continue;let at=join24(modules,...packagePathSegments(dep));rmSync4(at,{force:!0,recursive:!0}),mkdirSync3(dirname15(at),{recursive:!0}),place(dir,at,tree)}let link=join24(modules,...packagePathSegments(name));mkdirSync3(dirname15(link),{recursive:!0}),place(resolve8(packageDir),link,tree),writeFileSync4(join24(sandbox,"probe.mjs"),PROBE_SOURCE),writeFileSync4(join24(sandbox,"no-net.mjs"),NO_NET_SOURCE);let line=execFileSync(node.binary,[permissionFlag(node.major),"--allow-fs-read=*","--no-warnings","--import",join24(sandbox,"no-net.mjs"),join24(sandbox,"probe.mjs"),name,"both"],{cwd:sandbox,timeout:PROBE_TIMEOUT_MS,encoding:"utf8",stdio:["ignore","pipe","pipe"],env:{PATH:process.env.PATH??"",HOME:sandbox,NODE_ENV:"production"},maxBuffer:4*1024*1024}).trim().split(`
313
+ `).pop()??"",parsed2=JSON.parse(line);for(let load of[parsed2.require,parsed2.import]){if(load.ok||!load.missing||!load.from)continue;let importerDir=nearestManifestDir(dirname15(load.from)),dep=packageNameOf3(missingPackage(load.missing));load.missingRange=importerDir?declaredRangeIn(importerDir,dep)??"*":"*"}let surface={...base,require:parsed2.require,import:parsed2.import},inconclusive=inconclusiveReason(name,parsed2.require,parsed2.import);return inconclusive?{...surface,inconclusive}:surface}catch(err){let message=err instanceof Error?err.message.split(`
314
+ `)[0]:String(err);return{...base,inconclusive:`probe did not complete: ${message}`}}finally{rmSync4(sandbox,{recursive:!0,force:!0})}}function inconclusiveReason(name,req,imp){for(let load of[req,imp]){if(load.ok)continue;let ownFile=load.missing?.includes(`/node_modules/${name}/`)??!1,missing=load.missing===void 0?void 0:missingPackage(load.missing);if(missing&&!ownFile&&missing!==name&&!missing.startsWith(`${name}/`))return`dependency "${missing}" not available to the probe`;if(load.code==="ERR_ACCESS_DENIED")return`the probe sandbox denied: ${load.message}`;if(load.code==="ERR_DLOPEN_DISABLED"||load.code==="ERR_DLOPEN_FAILED")return"native addon"}if(!req.ok&&!imp.ok)return`both loaders failed: ${imp.message??imp.code??"unknown error"}`}function missingPackage(missing){let at=missing.lastIndexOf("/node_modules/");return at<0?missing:missing.slice(at+14)}function linkDependencies(from,into,except){if(existsSync15(from)){for(let entry of readdirSync7(from))if(!entry.startsWith(".")){if(entry.startsWith("@")){let scopeDir=join24(from,entry);mkdirSync3(join24(into,entry),{recursive:!0});for(let inner of readdirSafe2(scopeDir))`${entry}/${inner}`!==except&&trySymlink(join24(scopeDir,inner),join24(into,entry,inner));continue}entry!==except&&trySymlink(join24(from,entry),join24(into,entry))}}}function treeRoot(dependenciesFrom){let real=realpathSafe(dependenciesFrom),at=real.indexOf(`${sep2}node_modules`);return at<0?real:real.slice(0,at)}function place(dir,at,tree){let real=realpathSafe(dir);real.startsWith(`${tree}${sep2}`)?symlinkSync2(real,at,"dir"):cpSync(real,at,{recursive:!0})}function realpathSafe(dir){try{return realpathSync7(dir)}catch{return dir}}function trySymlink(target,path){try{symlinkSync2(target,path,"dir")}catch{}}function readdirSafe2(dir){try{return readdirSync7(dir)}catch{return[]}}function readManifest2(dir){try{return JSON.parse(readFileSync16(join24(dir,"package.json"),"utf8"))}catch{return}}function permissionFlag(major){return major>=23?"--permission":"--experimental-permission"}var NO_NET_SOURCE=`
315
+ import net from 'node:net';
316
+ import dgram from 'node:dgram';
317
+ import dns from 'node:dns';
318
+ const deny = () => { const e = new Error('network disabled by uptide probe'); e.code = 'ERR_UPTIDE_NO_NET'; throw e; };
319
+ net.Socket.prototype.connect = deny;
320
+ net.createConnection = deny;
321
+ net.connect = deny;
322
+ dgram.createSocket = deny;
323
+ for (const fn of ['lookup', 'resolve', 'resolve4', 'resolve6']) { dns[fn] = deny; dns.promises[fn] = deny; }
324
+ `;function chooseNode(range,override){let current={binary:override??process.execPath,version:process.version,major:Number(process.versions.node.split(".")[0]),source:"current"};if(override)return current;let major=majorOf(range);if(major===void 0)return current;if(major===current.major)return{...current,source:"repository"};let found=nodeBinaryFor(major);return found?{...found,source:"repository"}:current}function majorOf(range){let m=range?/(\d+)/.exec(range):null;return m?Number(m[1]):void 0}function nodeBinaryFor(major,home=homedir3()){let roots=[{dir:join24(home,".nvm/versions/node"),bin:"bin/node"},{dir:join24(home,".volta/tools/image/node"),bin:"bin/node"},{dir:join24(home,".asdf/installs/nodejs"),bin:"bin/node"},{dir:join24(home,".fnm/node-versions"),bin:"installation/bin/node"},{dir:join24(home,"Library/Application Support/fnm/node-versions"),bin:"installation/bin/node"},{dir:join24(home,".local/share/fnm/node-versions"),bin:"installation/bin/node"}],best,bestKey=[-1,-1,-1];for(let root of roots)for(let entry of readdirSafe2(root.dir)){let m=/^v?(\d+)\.(\d+)\.(\d+)$/.exec(entry);if(!m||Number(m[1])!==major)continue;let key2=[Number(m[1]),Number(m[2]),Number(m[3])],binary=join24(root.dir,entry,root.bin);existsSync15(binary)&&compare2(key2,bestKey)>0&&(bestKey=key2,best={binary,version:`v${key2.join(".")}`,major})}return best}function compare2(a,b){for(let i=0;i<3;i++){let d=(a[i]??0)-(b[i]??0);if(d!==0)return d}return 0}function diffRuntime(before,after){if(before.inconclusive)return{changes:[],inconclusive:`installed copy: ${before.inconclusive}`};if(after.inconclusive)return{changes:[],inconclusive:`target copy: ${after.inconclusive}`};let changes=[];for(let loader of["require","import"]){let a=before[loader],b=after[loader];if(a.ok&&!b.ok){changes.push({kind:loader==="require"?"require-throws":"import-throws",loader,detail:`${loader}() now throws ${b.code??"an error"}${b.message?`: ${b.message}`:""}`});continue}if(!a.ok||!b.ok)continue;a.callable&&!b.callable?b.defaultCallable?changes.push({kind:"namespace-instead",loader,detail:`${loader}() returned a function and now returns a namespace; the function is its \`default\``}):changes.push({kind:"callable-lost",loader,detail:`${loader}() no longer returns a callable value`}):a.constructable&&!b.constructable&&b.callable&&changes.push({kind:"constructable-lost",loader,detail:`${loader}() returns a function that can no longer be used with \`new\``});let afterKeys=new Set(Object.keys(b.keys??{})),afterDefaultKeys=new Set(b.defaultKeys??[]);for(let key2 of Object.keys(a.keys??{}))afterKeys.has(key2)||afterDefaultKeys.has(key2)||changes.push({kind:"key-removed",loader,key:key2,detail:`\`${key2}\` is no longer an export of ${loader}()`})}return{changes}}function isNativeProbeSkip(reason){return reason!==void 0&&/native addon|install script|platform-specific optional dependencies|native package/.test(reason)}function resolveDirection(change,usage){let{access}=usage,consumes=access==="read"||access==="typeRef",supplies=access==="write"||access==="call"||access==="construct";switch(change.kind){case"widened":return consumes?{severity:"breaking",reason:"widened type is read by the consumer"}:supplies?{severity:"additive",reason:"widened type only receives values from the consumer"}:void 0;case"narrowed":return consumes?{severity:"additive",reason:"narrower value still satisfies the reader"}:supplies?{severity:"breaking",reason:"consumer's values may no longer fit"}:void 0;case"required":return access==="write"||access==="construct"?{severity:"breaking",reason:"consumer must now supply the member"}:access==="implement"?{severity:"breaking",reason:"implementation must now provide the member"}:access==="read"?{severity:"additive",reason:"the member is now always present"}:void 0;case"signature":{let notes=change.notes??"",parameterRequired=/parameter '[^']+' became required|required parameter '[^']+' added/.test(notes),parameterWidened=/parameter '[^']+' type widened/.test(notes),parameterNarrowed=/parameter '[^']+' type narrowed/.test(notes),parameterAddedOptional=/optional parameter '[^']+' added/.test(notes),parameterRemoved=/parameter '[^']+' removed/.test(notes);return access==="implement"?parameterRequired?{severity:"additive",reason:"implementation now always receives the argument"}:parameterWidened?{severity:"breaking",reason:"implementation must accept more"}:parameterNarrowed?{severity:"additive",reason:"implementation receives a narrower argument"}:parameterAddedOptional?{severity:"additive",reason:"implementation may ignore extra arguments"}:parameterRemoved?{severity:"breaking",reason:"implementation must not expect the missing argument"}:void 0:parameterRequired&&(access==="call"||access==="construct")?{severity:"breaking",reason:"caller must now supply the argument"}:void 0}default:return}}var IDENTIFIER_OR_MEMBER=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*(?:\(\))?$/;function deprecationReplacement(notes){if(!notes)return;let candidates=new Set;for(let m of notes.matchAll(/\{@link\s+([^}|\s]+)[^}]*\}/g))candidates.add(m[1]);for(let m of notes.matchAll(/`([^`]+)`/g))candidates.add(m[1]);if(candidates.size===0){let m=/\buse\s+([A-Za-z_$][\w$.]*(?:\(\))?)\s+instead/i.exec(notes);m&&candidates.add(m[1])}let valid=[...candidates].filter(c=>IDENTIFIER_OR_MEMBER.test(c));return valid.length===1?valid[0]:void 0}var ONLY_PARAM_REMOVED=/^(parameter '[^']+' removed)(; parameter '[^']+' removed)*$/;function fixabilityOf(change,usage,severity){if(severity==="additive"||severity==="info")return"none";if(usage.via==="inferred")return"unknown";switch(change.kind){case"moved":case"renamed":return"mechanical";case"removed":return change.replacement!==void 0?"mechanical":"manual";case"deprecated":return deprecationReplacement(change.notes)!==void 0?"mechanical":"manual";case"signature":return change.notes!==void 0&&ONLY_PARAM_REMOVED.test(change.notes)?"mechanical":"assisted";case"required":case"type":case"widened":case"narrowed":case"module-format":return"assisted";default:return"manual"}}var THROUGH_REFERENCE=new Set(["type","narrowed","widened","signature","removed"]),COMPILE_TIME_KINDS=new Set(["removed","moved","renamed","signature","required","type","narrowed"]);function arbitrate(finding,options){if(finding.usage.checked===!1||options.compiled!==!0||finding.severity!=="breaking"||finding.usage.compileError!==void 0)return finding;let{change}=finding;return COMPILE_TIME_KINDS.has(change.kind)?options.unverifiedPaths?.has(change.path)?{...finding,severity:"unverified",reason:`${finding.reason}; the declaration file has unresolved imports in the target, compile check inconclusive`}:{...finding,severity:"info",fixability:"none",confidence:.3,reason:`diff says ${change.kind} but your code compiles against the target`}:change.kind==="widened"&&finding.confidence<.8?{...finding,severity:"info",fixability:"none",confidence:.3,reason:`${finding.reason}; compiles against target; possible runtime change`}:finding}function match(changes,usages,options={}){let byPath=new Map;for(let change of changes){let list=byPath.get(change.path)??[];list.push(change),byPath.set(change.path,list)}let containerChanges=changes.filter(c=>c.kind==="removed"||c.kind==="moved"),formatChanges=changes.filter(c=>c.kind==="module-format"),findings=[],seen=new Set,add=(change,usage,inherited,through)=>{let key2=`${usage.file}:${usage.line}:${usage.column}:${usage.symbolPath}:${change.path}:${change.kind}`;if(seen.has(key2))return;seen.add(key2);let resolved2=resolveDirection(change,usage),severity=resolved2?.severity??change.severity,reason=resolved2?.reason??(inherited?`${change.path} was ${change.kind}; this member goes with it`:change.notes??defaultReason(change));through!==void 0&&(reason=`${change.path}, the type of ${through}, ${reason}`),usage.compileError!==void 0&&severity!=="breaking"&&change.kind!=="deprecated"&&(severity="breaking",reason=`compiler rejects this usage: ${usage.compileError.split(`
325
+ `)[0]}`),findings.push({change,usage,severity,confidence:round(change.confidence*USAGE_CERTAINTY[usage.via]),fixability:fixabilityOf(change,usage,severity),reason})};for(let usage of usages){let paths=usagePaths(usage),relevant=change=>usage.access!=="import"||change.kind==="removed"||change.kind==="moved"||change.kind==="renamed"||change.kind==="module-format";for(let change of formatChanges){if(usage.loader!=="require")continue;let key2=`${usage.file}:${usage.line}:${usage.column}:${usage.symbolPath}:.:module-format`;if(seen.has(key2))continue;seen.add(key2);let verdict=options.targetRequire?observedRequireVerdict(change,usage,options.targetRequire):requireEsmVerdict(change,usage,options.esmNamed,options.targetPaths);verdict&&findings.push({change,usage,severity:verdict.severity,confidence:round(change.confidence*USAGE_CERTAINTY[usage.via]),fixability:"assisted",reason:`${change.notes??"no longer loadable with require()"}${verdict.detail}`})}let kindsSeen=new Set;for(let path of paths)for(let change of byPath.get(path)??[])!relevant(change)||kindsSeen.has(change.kind)||change.kind==="deprecated"&&path!==usage.symbolPath||(kindsSeen.add(change.kind),add(change,usage,!1));for(let path of paths)for(let ref of options.references?.get(path)??[])for(let change of byPath.get(ref)??[])THROUGH_REFERENCE.has(change.kind)&&relevant(change)&&add(change,usage,!1,path);for(let kind of["removed","moved"]){let outermost=containerChanges.filter(c=>c.kind===kind&&paths.some(p=>isDescendant(p,c.path))).filter(c=>options.targetPaths===void 0||!survivesWithout(c.path,paths,options.targetPaths)).sort((x,y)=>x.path.length-y.path.length)[0];outermost&&add(outermost,usage,!0)}}let confirmedOrder=["removed","moved","renamed","required","signature","narrowed","type","widened","deprecated","added"],bestFor=new Map;for(let f of findings){if(f.usage.compileError===void 0||f.severity!=="breaking"||!confirmedOrder.includes(f.change.kind))continue;let current=bestFor.get(f.usage);(!current||f.confidence>current.confidence||f.confidence===current.confidence&&confirmedOrder.indexOf(f.change.kind)<confirmedOrder.indexOf(current.change.kind))&&bestFor.set(f.usage,f)}let oneEach=findings.filter(f=>{let best=bestFor.get(f.usage);return best===void 0||best===f||f.severity!=="breaking"||!confirmedOrder.includes(f.change.kind)});findings.length=0,findings.push(...oneEach);let collapsed=findings.filter(f=>{let gone=findings.some(g=>g!==f&&g.usage===f.usage&&(g.change.kind==="removed"||g.change.kind==="moved")&&g.change.path===f.usage.symbolPath),aliasContainer=f.usage.canonicalPath!==void 0&&isDescendant(f.usage.canonicalPath,f.change.path)&&!isDescendant(f.usage.symbolPath,f.change.path);return gone&&(f.reason.includes(", the type of ")||aliasContainer)?!1:f.change.kind!=="removed"&&f.change.kind!=="moved"?!0:!findings.some(g=>g!==f&&g.usage===f.usage&&g.change.kind===f.change.kind&&isDescendant(f.change.path,g.change.path))});findings.length=0,findings.push(...collapsed);let bySite=new Map;for(let f of findings){if(f.change.kind!=="removed"&&f.change.kind!=="moved"||f.severity!=="breaking")continue;let key2=`${f.usage.file}:${f.usage.line}:${f.change.kind}`,list=bySite.get(key2)??[];list.push(f),bySite.set(key2,list)}let dropped=new Set;for(let list of bySite.values()){let paths=[...new Set(list.map(f=>f.change.path))].sort();if(paths.length<2)continue;let[first,...rest]=list;if(first){first.reason=`${paths.length} symbols ${first.change.kind} at this site: ${paths.join(", ")}`;for(let f of rest)dropped.add(f)}}if(dropped.size>0){let kept=findings.filter(f=>!dropped.has(f));findings.length=0,findings.push(...kept)}let perFile=new Map,folded2=new Set;for(let f of findings){if(f.change.kind!=="module-format")continue;let key2=`${f.change.package}|${f.usage.file}|${f.severity}|${f.reason}`,head=perFile.get(key2);if(!head){perFile.set(key2,f),f.sites=[{line:f.usage.line,snippet:f.usage.snippet}];continue}head.sites?.some(s=>s.line===f.usage.line)||head.sites?.push({line:f.usage.line,snippet:f.usage.snippet}),folded2.add(f)}if(folded2.size>0){let kept=findings.filter(f=>!folded2.has(f));findings.length=0,findings.push(...kept)}let rank={breaking:0,unverified:1,deprecated:2,additive:3,info:4};return findings.map(f=>arbitrate(f,options)).sort((a,b)=>rank[a.severity]-rank[b.severity]||a.usage.file.localeCompare(b.usage.file)||a.usage.line-b.usage.line||a.usage.column-b.usage.column||a.change.path.localeCompare(b.change.path))}function requireEsmVerdict(change,usage,esmNamed,targetPaths){let pkg=change.package,isRoot=usage.symbolPath==="."||usage.symbolPath==="default"||usage.symbolPath===change.loadRoot;if(change.requireEsm==="unknown")return{severity:"unverified",detail:"; whether this require() keeps working depends on the Node version"};if(change.requireEsm==="no")return{severity:"breaking",detail:""};if(change.topLevelAwait)return{severity:"breaking",detail:`; require('${pkg}') throws at load time; use import()`};if(isRoot)return usage.access==="call"||usage.access==="construct"?{severity:"breaking",detail:`; require('${pkg}') now returns a namespace, so the value at this site is not a function or class; use require('${pkg}').default or import()`}:void 0;let root=change.loadRoot??"default",onDefault=usage.symbolPath.startsWith(`${root}#`)||usage.symbolPath.startsWith(`${root}.`),leaf=onDefault?usage.symbolPath.slice(root.length+1).split(/[.#[(]/)[0]??usage.symbolPath:usage.symbolPath.split(/[.#[]/)[0]??usage.symbolPath;if(!(!onDefault&&(esmNamed===void 0||esmNamed.has(leaf)||esmNamed.has(usage.symbolPath)))&&!(!onDefault&&targetPaths!==void 0&&!targetPaths.has(`${root}.${leaf}`)&&!targetPaths.has(`${root}#${leaf}`)))return{severity:"breaking",detail:`; \`${leaf}\` is not a named export of ${pkg}, it lives on the default export: use require('${pkg}').default.${leaf} or import()`}}function observedRequireVerdict(change,usage,observed){let pkg=change.package;if(!observed.ok){let code=observed.code??"an error";return{severity:"breaking",detail:`; require('${pkg}') throws ${code} on the repository's Node${code==="ERR_REQUIRE_ASYNC_MODULE"?" (top-level await)":""}; use import()`}}if(usage.symbolPath==="."||usage.symbolPath==="default"||usage.symbolPath===change.loadRoot)return(usage.access==="call"||usage.access==="construct")&&!observed.callable?{severity:"breaking",detail:`; require('${pkg}') returns a namespace on the repository's Node, so the value at this site is not a function or class; use require('${pkg}').default or import()`}:void 0;let root=change.loadRoot??"default",leaf=usage.symbolPath.startsWith(`${root}#`)||usage.symbolPath.startsWith(`${root}.`)?usage.symbolPath.slice(root.length+1).split(/[.#[(]/)[0]??usage.symbolPath:usage.symbolPath.split(/[.#[]/)[0]??usage.symbolPath,keys=observed.keys??{};if(!(leaf in keys)&&observed.defaultKeys?.includes(leaf))return{severity:"breaking",detail:`; \`${leaf}\` is not on the namespace require('${pkg}') returns, it lives on the default export: use require('${pkg}').default.${leaf} or import()`}}function survivesWithout(container,paths,targetPaths){return paths.some(path=>{let rest=isDescendant(path,container)?path.slice(container.length+1):path;return targetPaths.has(topLevelOf(rest))})}function topLevelOf(path){let m=/^("[^"]*":)?[^.#[(]+/.exec(path);return m?m[0]:path}function isDescendant(path,ancestor){if(path===ancestor)return!1;let p=parentOf(path);for(;p!==void 0;){if(p===ancestor)return!0;p=parentOf(p)}return!1}function defaultReason(change){switch(change.kind){case"removed":return change.replacement?`removed, possibly renamed to ${change.replacement}`:"removed";case"moved":return`moved to ${change.replacement??"another entry point"}`;case"added":return"added";case"deprecated":return"deprecated";case"required":return"now required";default:return`${change.kind} changed`}}function round(n){return Math.round(n*1e3)/1e3}function contains(u,d){if(u.file!==d.file)return!1;let before=(aLine,aCol,bLine,bCol)=>aLine<bLine||aLine===bLine&&aCol<=bCol;return before(u.line,u.column,d.line,d.column)&&before(d.line,d.column,u.endLine,u.endColumn)}function spanOf(u){return[u.endLine-u.line,u.endLine===u.line?u.endColumn-u.column:u.endColumn]}function innermost(candidates){let best;for(let u of candidates){if(!best){best=u;continue}let[bl,bc]=spanOf(best),[ul,uc]=spanOf(u);(ul<bl||ul===bl&&uc<bc)&&(best=u)}return best}function symbolFromMessage(message,surface){let known=new Set(surface.symbols.map(s=>s.path)),property=/Property '([^']+)' does not exist on type '([^'<]+)/.exec(message);if(property){let[,member,type]=property;for(let candidate of[`${type}#${member}`,`${type}.${member}`])if(known.has(candidate))return candidate}let exported=/has no exported member (?:named )?'([^']+)'/.exec(message);if(exported&&known.has(exported[1]))return exported[1];let assignable=/is not assignable to (?:parameter of )?type '([^'<]+)/.exec(message);if(assignable&&known.has(assignable[1]))return assignable[1]}function mergeSignals(usages,signal,surface,changedPaths=new Set){if(!signal)return{usages,unattributed:[]};let merged=usages.map(u=>({...u})),unattributed=[],attach=(u,d)=>{u.compileError=u.compileError?`${u.compileError}
326
+ ${d.message}`:d.message,u.compileCode??=d.code},explained=u=>usagePaths(u).some(p=>changedPaths.has(p));for(let d of signal.diagnostics){let hit=innermost(merged.filter(u=>contains(u,d)&&u.access!=="import"));if(hit){attach(hit,d);continue}let nearest=merged.filter(u=>u.file===d.file&&u.line===d.line&&u.access!=="import"&&explained(u)).sort((a,b)=>Math.abs(a.column-d.column)-Math.abs(b.column-d.column))[0];if(nearest){attach(nearest,d);continue}let symbolPath=symbolFromMessage(d.message,surface);symbolPath?merged.push({file:d.file,line:d.line,column:d.column,endLine:d.endLine,endColumn:d.endColumn,symbolPath,access:/is not assignable to (?:parameter of )?type/.test(d.message)?"write":"read",snippet:d.snippet,via:"inferred",compileError:d.message,compileCode:d.code}):unattributed.push(d)}return{usages:merged,unattributed}}function arbitrateUnchecked(findings,runtime,loadRoot){return findings.map(f=>{if(f.usage.checked!==!1||f.change.kind==="module-format"||f.change.kind==="deprecated"||f.change.path.startsWith("runtime:")||f.severity!=="breaking"&&f.severity!=="unverified")return f;let hit=runtime&&!runtime.inconclusive?runtimeConfirms(f.usage,runtime.changes,loadRoot):void 0;return hit?{...f,severity:"breaking",reason:`${stripVerdict(f.reason)}; confirmed at runtime (${runtime?.node}): ${hit.detail}`}:runtime?runtime.inconclusive?{...f,severity:"unverified",reason:isNativeProbeSkip(runtime.inconclusive)?stripVerdict(f.reason):`${stripVerdict(f.reason)}; the repository does not type-check this file and the runtime probe was inconclusive (${runtime.inconclusive})`}:isScoped(f.usage.symbolPath)?{...f,severity:"unverified",reason:`${stripVerdict(f.reason)}; the repository does not type-check this file and the runtime probe only loads the package root`}:{...f,severity:"info",fixability:"none",confidence:Math.min(f.confidence,.3),reason:`${f.change.source==="types"&&f.usage.compileError!==void 0?"the compiler":"the diff"} says ${f.change.kind==="type"&&f.usage.compileError!==void 0?"this would not type-check":f.change.kind} but the repository does not type-check this file, and the target loads with the same shape at runtime (${runtime.node})`}:{...f,severity:"unverified",reason:`${stripVerdict(f.reason)}; the repository does not type-check this file and the runtime probe did not run`}})}function runtimeConfirms(usage,changes,loadRoot){let loader=usage.loader??"import",own=changes.filter(c=>c.loader===loader),throws=own.find(c=>c.kind==="require-throws"||c.kind==="import-throws");if(throws)return throws;if(isScoped(usage.symbolPath))return;let paths=usage.canonicalPath?[usage.symbolPath,usage.canonicalPath]:[usage.symbolPath];for(let path of paths){let{root,member}=split(path,loadRoot);if(root){if(member===void 0){if(usage.access==="call"){let hit=own.find(c=>c.kind==="callable-lost"||c.kind==="namespace-instead");if(hit)return hit}if(usage.access==="construct"){let hit=own.find(c=>c.kind==="constructable-lost"||c.kind==="callable-lost"||c.kind==="namespace-instead");if(hit)return hit}continue}let gone2=own.find(c=>c.kind==="key-removed"&&c.key===member);if(gone2)return gone2;continue}let key2=member===void 0?path:path.slice(0,path.length-member.length-1),gone=own.find(c=>c.kind==="key-removed"&&c.key===topKey(key2));if(gone)return gone}}function split(path,loadRoot){let top=topKey(path);if(!(path==="."||top===loadRoot||top==="default"))return{root:!1,member:path.includes(".")?path.slice(top.length+1):void 0};let rest=path.slice(top.length),m=/^[.#]([^.#[(]+)/.exec(rest);return m?{root:!0,member:m[1]}:{root:!0}}function topKey(path){let m=/^[^.#[(]+/.exec(path);return m?m[0]:path}function isScoped(path){return path.startsWith('"')}function stripVerdict(reason){return reason.replace(/; the compiler cannot type this file.*$/,"").replace(/; the installed version ships no declarations.*$/,"")}var TIER_LEGEND="verified: migration pack \xB7 generic: no pack, breaking only if the compiler or the runtime probe confirms it";function tierOf(packs,name,installed,target){return packs.find(candidate=>candidate.name===name)?.supports(installed,target)?"verified":"generic"}function evidenceOf(f,runtime,loadRoot){if(f.change.source==="pack")return"pack";if(f.usage.compileError!==void 0||/^TS\d+$/.test(f.change.path)||f.change.path.startsWith("cause:"))return"compiler";if(f.change.kind==="module-format")return"module-format";if(runtime&&!runtime.inconclusive&&runtimeConfirms(f.usage,runtime.changes,loadRoot))return"runtime";if((f.change.kind==="removed"||f.change.kind==="moved")&&f.usage.access==="import"&&!/[.#[]/.test(f.change.path))return"removed-export"}function confirmGeneric(findings,evidence){return findings.map(f=>{let found=evidence(f);return f.severity!=="breaking"?found?{...f,evidence:found}:f:found?{...f,evidence:found}:{...f,severity:"unverified",reason:`${f.reason}; not confirmed by the compiler or the runtime probe`}})}var count2=(n,noun)=>`${n} ${noun}${n===1?"":"s"}`;function verdictOf(p,notCompiled){let breaking=p.findings.filter(f=>f.severity==="breaking").length;if(p.compile!==void 0&&p.compile.skipped===void 0){let newErrors=p.compile.newErrors;return{breaking,compiledAgainst:p.target,...newErrors!==void 0?{newErrors}:{},summary:`${breaking} breaking \xB7 compiled against ${p.target}${newErrors!==void 0?`: ${count2(newErrors,"new type error")}`:""}`}}let reason=p.compile?.skipped??notCompiled??"the compiler did not run";return{breaking,notVerified:reason,summary:`${breaking} breaking \xB7 types not verified: ${reason}`}}async function progress(listener,event,work){let start=performance.now();listener?.({...event,state:"start"});try{return await work()}finally{listener?.({...event,state:"done",ms:performance.now()-start})}}var defaults2=new Set(["node_modules",".git","coverage","dist","build","bower_components","vendor"]),defaultSkip=name=>defaults2.has(name)?`default: ${name}`:/(?:\.min\.js|\.bundle\.js|\.map)$/i.test(name)?"generated files (*.min.js, *.bundle.js, *.map)":void 0;function directoryRules(dir,entries){if(!entries.includes(".gitignore"))return[];let matcher=(0,import_ignore.default)().add(readFileSync17(join25(dir,".gitignore"),"utf8"));return[{base:dir,test:path=>matcher.test(path)}]}function ignoredBy(path,directory,rules){let pattern;for(let rule of rules){let local=relative13(rule.base,path).replaceAll("\\","/")+(directory?"/":""),result=rule.test(local);result.ignored?pattern=result.rule?.pattern??"(matching pattern unavailable)":result.unignored&&(pattern=void 0)}return pattern}async function scanImports(root,names,workspaces,configs,evidence,stats,tasks,concurrency){let start=performance.now(),counts={sourceMs:0,configMs:0,visitedFiles:0,sourceFiles:0,configFiles:0,assetFiles:0,parsedFiles:0,workers:0,candidateSourceFiles:0,ignoredSourceFiles:0,ignoredSourceRules:{},skipped:{}},result=new Map,jobs=[],ignoredRules=new Map,skip=(reason,directory)=>{let skipped=counts.skipped,count3=skipped[reason]??{files:0,directories:0};skipped[reason]=count3,count3[directory?"directories":"files"]++},wanted=new Set(names),packageOf=specifier=>{let name=specifier.startsWith("@")?specifier.split("/").slice(0,2).join("/"):specifier.split("/")[0];return name&&wanted.has(name)?name:void 0},isSource=file=>/\.[cm]?[jt]sx?$/.test(file)&&!/\.d\.[cm]?ts$/.test(file)&&!isConfig(file),candidate=(file,pattern)=>{isSource(file)&&(counts.candidateSourceFiles=(counts.candidateSourceFiles??0)+1,pattern!==void 0&&(counts.ignoredSourceFiles=(counts.ignoredSourceFiles??0)+1,ignoredRules.set(pattern,(ignoredRules.get(pattern)??0)+1)))},auditIgnored=(dir,pattern)=>{for(let entry of readdirSync8(dir,{withFileTypes:!0})){let directory=entry.isDirectory();directory||counts.visitedFiles++;let builtIn=entry.isSymbolicLink()?"symbolic links":defaultSkip(entry.name);if(builtIn){skip(builtIn,directory);continue}let path=join26(dir,entry.name);skip(".gitignore",directory),directory?auditIgnored(path,pattern):entry.isFile()&&candidate(relative14(root,path).replaceAll("\\","/"),pattern)}},walk=(dir,inherited=[])=>{let entries=readdirSync8(dir,{withFileTypes:!0}).sort((a,b)=>a.name.localeCompare(b.name)),started=performance.now(),rules=[...inherited,...directoryRules(dir,entries.filter(e=>e.isFile()).map(e=>e.name))];counts.configMs+=performance.now()-started;for(let entry of entries){let path=join26(dir,entry.name),directory=entry.isDirectory();directory||counts.visitedFiles++;let reason=entry.isSymbolicLink()?"symbolic links":defaultSkip(entry.name);if(reason){skip(reason,directory);continue}let pattern=ignoredBy(path,directory,rules);if(pattern!==void 0){skip(".gitignore",directory),directory?auditIgnored(path,pattern):entry.isFile()&&candidate(relative14(root,path).replaceAll("\\","/"),pattern);continue}if(directory){walk(path,rules);continue}if(!entry.isFile()){skip("non-regular files",!1);continue}let file=relative14(root,path).replaceAll("\\","/");if(candidate(file),isConfig(file)){let started2=performance.now();configs?.push(scanConfig(file,readFileSync18(path,"utf8"),names,evidence,tasks)),counts.configFiles++,counts.configMs+=performance.now()-started2;continue}if(/\.(?:scss|sass|less|css|html?)$/i.test(entry.name)){counts.assetFiles++;let text2=readFileSync18(path,"utf8");if(!names.some(name=>text2.includes(name))){skip("no dependency text",!1);continue}let add=(specifier,reason2)=>{let clean=specifier.replace(/^~/,"").replace(/^(?:\.\.?\/|\/)*node_modules\//,""),name=packageOf(clean);if(name){let reasons=evidence?.get(name)??[];reasons.includes(reason2)||reasons.push(reason2),evidence?.set(name,reasons)}};if(/\.html?$/i.test(entry.name)){let html=text2.replace(/<!--[\s\S]*?-->/g,"");for(let tag of html.matchAll(/<(script|link)\b[^>]*>/gi)){let attr=tag[1]?.toLowerCase()==="script"?"src":"href",value=tag[0].match(new RegExp(`\\s${attr}\\s*=\\s*(?:"([^"<>]*)"|'([^'<>]*)'|([^\\s>]+))`,"i")),url=value?.[1]??value?.[2]??value?.[3];url&&/^(?:\.\.?\/|\/)*node_modules\//.test(url)&&add(url,"referenced by HTML assets")}}else{let styles=text2.replace(/\/\*[\s\S]*?\*\//g,"").replace(/^\s*\/\/.*$/gm,"");for(let rule of styles.matchAll(/@(import|use|forward)\s+([^;\n]+)/gi)){let specifiers=(rule[2]??"").matchAll(/(?:^|,)\s*(?:\([^)]*\)\s*)?(?:url\(\s*(?:"([^"]+)"|'([^']+)'|([^\s)"']+))\s*\)|"([^"]+)"|'([^']+)')/g);for(let value of specifiers)if(add(value.slice(1).find(Boolean)??"","referenced by stylesheet imports"),rule[1]?.toLowerCase()!=="import")break}}continue}if(!/\.[cm]?[jt]sx?$/.test(entry.name)||/\.d\.[cm]?ts$/.test(entry.name))continue;counts.sourceFiles++;let workspace=[...workspaces].sort((a,b)=>b.length-a.length).find(w=>w!=="."&&file.startsWith(`${w}/`))??".",text=readFileSync18(path,"utf8"),gate=sourceCandidate(text,names);if(gate){skip(gate==="text"?"no dependency text":"no dependency imports (lexer)",!1);continue}jobs.push({file,text,workspace})}};walk(resolve9(root)),counts.ignoredSourceRules=Object.fromEntries(ignoredRules);let ignored=counts.ignoredSourceFiles??0,candidates=counts.candidateSourceFiles??0;if(ignored>candidates/2){let rules=Object.entries(counts.ignoredSourceRules??{}).sort(([a],[b])=>a.localeCompare(b)).map(([pattern,files])=>`${JSON.stringify(pattern)} (${files})`).join(", ");counts.warnings=[`Usage warning: .gitignore skipped ${ignored} of ${candidates} candidate source files (${Math.round(100*ignored/candidates)}%); rules: ${rules}. Usage may be understated.`]}counts.parsedFiles=jobs.length;let cpus=Math.max(1,Math.min(4,availableParallelism())),workerCount=concurrency??(jobs.length>=32&&jobs.reduce((n,job)=>n+job.text.length,0)>=8e6?cpus:0),merge2=entries=>{for(let[name,found]of entries){let value=result.get(name)??{files:[],callSites:0,references:0,symbols:{},workspaces:[]};value.files.push(...found.files),value.callSites+=found.callSites,value.references+=found.references;for(let[symbol,count3]of Object.entries(found.symbols))value.symbols[symbol]=(value.symbols[symbol]??0)+count3;value.workspaces=[...new Set([...value.workspaces,...found.workspaces])].sort(),result.set(name,value)}};if(workerCount>1&&jobs.length>1){let size=Math.min(workerCount,jobs.length);counts.workers=size;let batches=Array.from({length:size},()=>[]);jobs.forEach((job,i)=>{batches[i%size]?.push(job)});let results=await Promise.all(batches.map(batch=>runSourceWorker(batch,names)));for(let batch of results)for(let entries of batch)merge2(entries)}else for(let job of jobs)merge2([...parseSource(job,names)]);for(let value of result.values())value.files.sort();return counts.sourceMs=performance.now()-start-counts.configMs,stats&&Object.assign(stats,counts),result}async function runSourceWorker(jobs,names){let fromSource=import.meta.url.endsWith(".ts"),url=new URL(fromSource?"./list-worker.ts":"./list-worker.js",import.meta.url);return new Promise((resolve13,reject)=>{let entry=fromSource?`import('tsx/esm/api').then(({ tsImport }) => tsImport(${JSON.stringify(url.href)}, ${JSON.stringify(import.meta.url)}));`:url,worker=new Worker(entry,{workerData:{jobs,names},eval:fromSource,execArgv:[]}),settled=!1;worker.once("message",result=>{settled=!0,worker.terminate().then(()=>resolve13(result))}),worker.once("error",error=>{settled=!0,worker.terminate().then(()=>reject(error))}),worker.once("exit",code=>{settled||reject(new Error(`source worker exited with ${code}`))})})}function packFixability(finding,source,pack){return["breaking","unverified","deprecated"].includes(finding.severity)&&pack.transform(source,finding,{from:finding.change.from,to:finding.change.to,includeDeprecated:!0}).applied?{...finding,fixability:"mechanical"}:finding}function releaseGroups(candidates){let byName=new Map(candidates.map(c=>[c.name,c])),keyOf2=c=>{if(!c.name.startsWith("@"))return;let major=parseVersion(c.installed)?.major;return major===void 0?void 0:`${c.name.split("/")[0]}@${major}`},parent=new Map,find=n=>{let root=n;for(;parent.get(root)!==root;)root=parent.get(root);return root};for(let c of candidates)parent.set(c.name,c.name);let viaShared=new Map;for(let c of candidates){let key2=keyOf2(c);if(key2===void 0)continue;let scope=c.name.split("/")[0];for(let dep of c.dependsOn){let other=byName.get(dep);if(other){other.name.startsWith(`${scope}/`)&&parent.set(find(c.name),find(other.name));continue}if(!dep.startsWith(`${scope}/`))continue;let sharedKey=`${key2}:${dep}`,earlier=viaShared.get(sharedKey);earlier?parent.set(find(c.name),find(earlier)):viaShared.set(sharedKey,c.name)}}let groups2=new Map;for(let c of candidates){let root=find(c.name),list=groups2.get(root)??[];list.push(c.name),groups2.set(root,list)}return[...groups2.values()].filter(g=>g.length>1).map(g=>g.sort())}function groupName(members){let first=members[0];return members.length>1?`${first.split("/")[0]}/*`:first}var SOURCE3=/\.(?:[cm]?[jt]sx?)$/,SKIPPED4=new Set(["node_modules","dist","build","coverage",".git",".next",".turbo"]);function importedByText(root,workspace,names,nested=[]){if(names.length===0)return[];let dir=resolve10(root,workspace),exclude=new Set(nested.filter(w=>w!==workspace).map(w=>resolve10(root,w)).filter(other=>other.startsWith(`${dir}/`))),escaped=names.map(n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),pattern=new RegExp(`(?:\\bfrom\\s*|\\bimport\\s*\\(?\\s*|\\brequire\\s*\\(\\s*|\\bimport\\s+)["'](${escaped})(?:\\/[^"']*)?["']`,"g"),found=new Set,walk=at=>{let entries;try{entries=readdirSync9(at)}catch{return}for(let name of entries){if(SKIPPED4.has(name))continue;let path=join27(at,name);if(exclude.has(path))continue;let directory=!1;try{directory=statSync3(path).isDirectory()}catch{continue}if(directory){walk(path);continue}if(!SOURCE3.test(name)||/\.d\.[cm]?ts$/.test(name))continue;let text;try{text=readFileSync19(path,"utf8")}catch{continue}for(let match2 of text.matchAll(pattern))match2[1]&&found.add(match2[1]);if(found.size===names.length)return}};return walk(dir),[...found].sort()}function importFileCounts(root,names){let counts=new Map(names.map(n=>[n,0]));if(names.length===0)return counts;let escaped=names.map(n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),pattern=new RegExp(`(?:\\bfrom\\s*|\\bimport\\s*\\(?\\s*|\\brequire\\s*\\(\\s*|\\bimport\\s+)["'](${escaped})(?:\\/[^"']*)?["']`,"g"),walk=at=>{let entries;try{entries=readdirSync9(at)}catch{return}for(let name of entries){if(SKIPPED4.has(name))continue;let path=join27(at,name),directory=!1;try{directory=statSync3(path).isDirectory()}catch{continue}if(directory){walk(path);continue}if(!SOURCE3.test(name)||/\.d\.[cm]?ts$/.test(name))continue;let text;try{text=readFileSync19(path,"utf8")}catch{continue}let inFile=new Set;for(let match2 of text.matchAll(pattern))match2[1]&&inFile.add(match2[1]);for(let name2 of inFile)counts.set(name2,(counts.get(name2)??0)+1)}};return walk(resolve10(root)),counts}var MB=1024**2;function freeMemoryBytes(){try{if(platform()==="linux"){let available=/^MemAvailable:\s+(\d+) kB/m.exec(readFileSync20("/proc/meminfo","utf8")),bytes=available?Number(available[1])*1024:freemem();for(let[limitFile,usedFile]of[["/sys/fs/cgroup/memory.max","/sys/fs/cgroup/memory.current"],["/sys/fs/cgroup/memory/memory.limit_in_bytes","/sys/fs/cgroup/memory/memory.usage_in_bytes"]])try{let limit=Number(readFileSync20(limitFile,"utf8").trim()),used=Number(readFileSync20(usedFile,"utf8").trim());Number.isFinite(limit)&&Number.isFinite(used)&&(bytes=Math.min(bytes,Math.max(0,limit-used)))}catch{}return bytes}if(platform()==="darwin"){let percent=/memory free percentage: (\d+)%/.exec(execFileSync2("/usr/bin/memory_pressure",["-Q"],{encoding:"utf8",timeout:1e3}));if(percent)return totalmem()*Number(percent[1])/100}}catch{}return freemem()}function memoryPolicy(freeBytes=freeMemoryBytes(),cpus=availableParallelism2(),requested=cpus,estimateMb=1024,env=process.env){let budgetMb=Math.floor(freeBytes/MB*.6),workers=Math.max(1,Math.min(cpus,requested,Math.floor(budgetMb/(estimateMb*1.4)))),limit=Math.max(0,Math.floor(budgetMb/workers/1.4)),override=Number(env.UPTIDE_WORKER_HEAP_MB);return{workers,heapMb:Math.min(8192,limit,Number.isFinite(override)&&override>=128?Math.floor(override):8192),budgetMb}}function scopedMemoryEstimate(dir,roots){let config=join28(dir,"tsconfig.json"),parsed2=existsSync16(config)?import_ts_morph15.ts.getParsedCommandLineOfConfigFile(config,{},{...import_ts_morph15.ts.sys,onUnRecoverableConfigFileDiagnostic:()=>{}}):void 0,options=parsed2?.options??{target:import_ts_morph15.ts.ScriptTarget.ES2022,module:import_ts_morph15.ts.ModuleKind.ESNext,moduleResolution:import_ts_morph15.ts.ModuleResolutionKind.Bundler,strict:!0},sources=workspaceSourceMap(dir,readInstalled(dir).installed);options.paths={...options.paths,...sources.paths};let pending=new Set(roots??parsed2?.fileNames??[]),cache=import_ts_morph15.ts.createModuleResolutionCache(dir,p=>p,options),addType=(name,containing)=>{let found=import_ts_morph15.ts.resolveTypeReferenceDirective(name,containing,options,import_ts_morph15.ts.sys).resolvedTypeReferenceDirective;found?.resolvedFileName&&pending.add(found.resolvedFileName)};for(let name of import_ts_morph15.ts.getAutomaticTypeDirectiveNames(options,import_ts_morph15.ts.sys))addType(name,join28(dir,"__uptide__.ts"));pending.add(import_ts_morph15.ts.getDefaultLibFilePath(options));let sourceBytes=0,declarationBytes=0;for(let file of pending){let text=import_ts_morph15.ts.sys.readFile(file);if(text===void 0)continue;/\.d\.[cm]?ts$/.test(file)?declarationBytes+=Buffer.byteLength(text):sourceBytes+=Buffer.byteLength(text);let info=import_ts_morph15.ts.preProcessFile(text,!0,!0),mode=import_ts_morph15.ts.getImpliedNodeFormatForFile(file,void 0,import_ts_morph15.ts.sys,options);for(let imp of info.importedFiles){let found=import_ts_morph15.ts.resolveModuleName(imp.fileName,file,options,import_ts_morph15.ts.sys,cache,void 0,mode).resolvedModule;found?.resolvedFileName&&pending.add(found.resolvedFileName)}for(let ref of info.referencedFiles)pending.add(resolve11(dirname16(file),ref.fileName));for(let ref of info.typeReferenceDirectives)addType(ref.fileName,file);for(let ref of info.libReferenceDirectives)pending.add(join28(dirname16(import_ts_morph15.ts.getDefaultLibFilePath(options)),`lib.${ref.fileName.toLowerCase()}.d.ts`))}return{heapMb:Math.ceil(512+sourceBytes/MB*150+declarationBytes/MB*24+(roots??parsed2?.fileNames??[]).length*4.5),sourceBytes,declarationBytes,files:pending.size}}function estimateScopedHeapMb(dir,roots){return scopedMemoryEstimate(dir,roots).heapMb}function readManifest3(dir){try{return JSON.parse(readFileSync21(join29(dir,"package.json"),"utf8"))}catch{return}}function fileSupportsRequire(file,type){return file.endsWith(".cjs")?!0:file.endsWith(".mjs")?!1:type!=="module"}function exportsSupportRequire(value,type){if(typeof value=="string")return fileSupportsRequire(value,type);if(Array.isArray(value))return value.some(v=>exportsSupportRequire(v,type));if(!value||typeof value!="object")return!1;let record=value;return"require"in record&&record.require!==null?!0:Object.entries(record).some(([key2,v])=>key2!=="import"&&key2!=="types"&&exportsSupportRequire(v,type))}function supportsRequire(m){if(m.exports!==void 0&&m.exports!==null){let record=m.exports,root=typeof m.exports=="object"&&!Array.isArray(m.exports)&&Object.keys(record).some(k=>k.startsWith("."))?record["."]:m.exports;return exportsSupportRequire(root,m.type)}return fileSupportsRequire(m.main??"index.js",m.type)}function shipsTypes(dir,m=readManifest3(dir)){if(!m)return!1;if(m.types||m.typings||existsSync17(join29(dir,"index.d.ts"))||/"types"/.test(JSON.stringify(m.exports??{})))return!0;try{return resolveEntryPoints(dir,m.name??"",m.version??""),!0}catch{return!1}}function minimumVersion(range){let lowest;for(let alternative of range.split("||")){let first=alternative.trim().split(/\s+/)[0]??"";if(first.startsWith("<"))continue;let m=/^(?:>=|>|\^|~|=)?v?(\d+)(?:\.(\d+|x|\*))?(?:\.(\d+|x|\*))?/.exec(first);if(!m)continue;let version=`${m[1]}.${/\d/.test(m[2]??"")?m[2]:0}.${/\d/.test(m[3]??"")?m[3]:0}`;(lowest===void 0||compare3(version,lowest)<0)&&(lowest=version)}return lowest}function compare3(a,b){let pa=parseVersion(a),pb=parseVersion(b);return!pa||!pb?0:pa.major-pb.major||pa.minor-pb.minor||pa.patch-pb.patch}function requireEsmSupport(range){if(!range)return"unknown";let min=minimumVersion(range);if(!min)return"unknown";let v=parseVersion(min);return v?v.major>=23?"yes":isBareMajor(range)?v.major===22||v.major===20?"yes":"no":v.major===22?v.minor>=12?"yes":"no":v.major===20&&v.minor>=19?"yes":"no":"unknown"}function isBareMajor(range){let min=minimumVersion(range);if(!min)return!1;for(let alternative of range.split("||")){let first=alternative.trim().split(/\s+/)[0]??"",m=/^(?:>=|>|\^|~|=)?v?(\d+)(?:\.(\d+|x|\*))?/.exec(first);if(m&&`${m[1]}.${/\d/.test(m[2]??"")?m[2]:0}`===min.replace(/\.\d+$/,""))return m[2]===void 0||!/\d/.test(m[2])}return!1}function readIf(path){try{return existsSync17(path)?readFileSync21(path,"utf8"):void 0}catch{return}}function resolveNodeVersion(dirs){for(let dir of dirs){let dockerfiles=["Dockerfile","docker/Dockerfile","Dockerfile.prod","Dockerfile.production"];for(let candidate of readdirSafe3(dir))/^Dockerfile/.test(candidate)&&!dockerfiles.includes(candidate)&&dockerfiles.push(candidate);let caveat;for(let rel of dockerfiles){let text=readIf(join29(dir,rel));if(!text)continue;let m=/^FROM\s+(?:--platform=\S+\s+)?(?:[\w.-]+\/)?node:(\d+(?:\.\d+){0,2})/im.exec(text);if(m)return{range:m[1],source:rel};let custom=/^FROM\s+(?:--platform=\S+\s+)?(\S+)/im.exec(text);custom&&caveat===void 0&&(caveat=`production Node unknown: ${rel} uses a custom base image (${custom[1]})`)}let found=resolveNodeVersionFrom(dir);if(found)return caveat?{...found,caveat}:found}}function resolveNodeVersionFrom(dir){for(let file of[".nvmrc",".node-version"]){let text=readIf(join29(dir,file))?.trim().replace(/^v/,"");if(text&&!/^(lts|node|latest)/i.test(text))return{range:text,source:file}}let tool=readIf(join29(dir,".tool-versions")),toolMatch=tool?/^nodejs\s+(\S+)/m.exec(tool):null;if(toolMatch)return{range:toolMatch[1],source:".tool-versions"};let workflows=join29(dir,".github/workflows");for(let wf of readdirSafe3(workflows).sort()){if(!/\.ya?ml$/.test(wf))continue;let text=readIf(join29(workflows,wf))??"",m=/node-version:\s*['"]?(\d+(?:\.\d+){0,2})['"]?\s*$/m.exec(text);if(m)return{range:m[1],source:`.github/workflows/${wf}`}}let engines=readManifest3(dir)?.engines?.node;if(engines)return{range:engines,source:"package.json engines.node"}}function readdirSafe3(dir){try{return readdirSync10(dir)}catch{return[]}}function hasTopLevelAwait(dir,budget=300){let files=[],walk=(d,depth2)=>{if(!(files.length>=budget||depth2>6))for(let entry of readdirSafe3(d)){if(entry==="node_modules"||entry.startsWith("."))continue;let full2=join29(d,entry),stat;try{stat=statSync4(full2)}catch{continue}if(stat.isDirectory()?walk(full2,depth2+1):/\.(m?js)$/.test(entry)&&!/\.cjs$/.test(entry)&&files.push(full2),files.length>=budget)return}};walk(dir,0);for(let file of files){let text=readIf(file);if(!text||!/\bawait\b/.test(text))continue;let sf=import_ts_morph16.ts.createSourceFile(file,text,import_ts_morph16.ts.ScriptTarget.ESNext,!1,import_ts_morph16.ts.ScriptKind.JS),found=!1,visit=n=>{found||import_ts_morph16.ts.isFunctionLike(n)||import_ts_morph16.ts.isClassLike(n)||(import_ts_morph16.ts.isAwaitExpression(n)||import_ts_morph16.ts.isForOfStatement(n)&&n.awaitModifier?found=!0:import_ts_morph16.ts.forEachChild(n,visit))};if(import_ts_morph16.ts.forEachChild(sf,visit),found)return!0}return!1}function moduleFormatChange(before,after,meta,node){if(!supportsRequire(before)||supportsRequire(after))return;let why=after.type==="module"?`"type": "module" and ${after.exports!==void 0?"no require condition in exports":`an ESM main (${after.main??"index.js"})`}`:"no CommonJS entry",bare=node.range!==void 0&&isBareMajor(node.range)?", read as its latest release":"",where=node.source?` (${node.source}${bare})`:bare?` (${bare.slice(2)})`:"",nodeClause=node.support==="yes"?node.topLevelAwait?`Node ${node.range}${where} supports require(esm), but the target awaits at top level, which require() cannot load (ERR_REQUIRE_ASYNC_MODULE)`:`Node ${node.range}${where} supports require(esm): require() returns the module namespace`:node.support==="no"?`Node ${node.range}${where} does not guarantee require(esm) (needs 22.12+ or 20.19+)`:"Node version unknown (no Dockerfile FROM node, .nvmrc, .node-version, .tool-versions, CI node-version or engines.node), so require(esm) cannot be assumed",engines=after.engines?.node&&after.engines.node!==before.engines?.node?`; requires Node ${after.engines.node}`:"";return{...meta,path:".",kind:"module-format",severity:"breaking",source:"types",confidence:1,evidence:"checker",before:"loadable with require()",after:"ESM only",notes:`no longer loadable with require(): ${why}; ${nodeClause}${engines}`,requireEsm:node.support,...node.topLevelAwait?{topLevelAwait:!0}:{}}}async function mapWithLimit(items,limit,task){let results=new Array(items.length),next=0,worker=async()=>{for(;;){let i=next++;if(i>=items.length)return;results[i]=await task(items[i])}};return await Promise.all(Array.from({length:Math.min(limit,items.length)},worker)),results}async function mapWithSerialRetry(items,limit,task,shouldRetry,retry){let results=await mapWithLimit(items,limit,task);if(limit>1)for(let i=0;i<items.length;i++)shouldRetry(results[i])&&(results[i]=await retry(items[i]));return results}function isBehind(c){return c.latest!==void 0&&compareVersions(c.latest,c.installed)>0}function rankCandidates(candidates){let major=c=>c.latest?majorsBehind(c.installed,c.latest):0;return[...candidates].sort((a,b)=>+(major(b)>0)-+(major(a)>0)||b.importSites-a.importSites||+(b.latest!==void 0)-+(a.latest!==void 0)||a.name.localeCompare(b.name))}function groupRootCauses(report){if(report.name!=="typescript"||parseVersion(report.target)?.major!==7)return;let codeOf=f=>f.usage.compileCode??Number(/^TS(\d+)$/.exec(f.change.path)?.[1]??0),missing=report.findings.filter(f=>f.severity==="breaking"&&f.evidence==="compiler"&&[2305,2339,2551,2614,2694,2724].includes(codeOf(f)));if(missing.length<2)return;let first=missing[0],cause={...first,rule:"typescript-no-js-api",change:{...first.change,kind:"cause",path:"cause:typescript-no-js-api"},reason:"TypeScript 7 has no JavaScript compiler API in its main entry",details:["Migrate compiler API consumers separately; changing individual missing members does not restore the API."],downstream:missing.map(f=>({file:f.usage.file,line:f.usage.line,column:f.usage.column,snippet:f.usage.snippet,code:codeOf(f),message:f.usage.compileError??f.reason}))};report.findings=[cause,...report.findings.filter(f=>!missing.includes(f))]}var CURATED=[{package:"express",major:5,rules:[{pattern:/\.del\(/,what:"app.del() was removed; use app.delete()"},{pattern:/\breq\.param\(/,what:"req.param() was removed; read req.params, req.query or req.body"},{pattern:/\bres\.send\(\s*\d{3}\s*[,)]/,what:"res.send(status) was removed; use res.sendStatus(code) or res.status(code).send()"},{pattern:/\.(get|post|put|patch|delete|all|use|route)\(\s*['"`][^'"`]*(\*|\?|\+|\(|:[A-Za-z_$][\w$]*\?)/,what:"route paths use path-to-regexp v8: `*` becomes a named splat (`/{*path}`), `?`/`+`/regex groups and optional params (`:id?`) are written as `{/:id}`"}]}],RUNTIME_LABEL="runtime change, not visible in types";function runtimeChangeFindings(meta,files){let curated=CURATED.find(c=>c.package===meta.package);if(!curated)return[];let from=parseVersion(meta.from)?.major,to=parseVersion(meta.to)?.major;if(from===void 0||to===void 0||from>=curated.major||to<curated.major)return[];let out=[];for(let{file,text}of files)text.split(`
327
+ `).forEach((line,index)=>{for(let rule of curated.rules){if(!rule.pattern.test(line))continue;let usage={file,line:index+1,column:1,endLine:index+1,endColumn:line.length+1,symbolPath:`runtime:${meta.package}`,access:"call",snippet:line.trim(),via:"inferred"},change={...meta,path:`runtime:${meta.package}`,kind:"signature",severity:"breaking",source:"types",confidence:.6,evidence:"text",notes:`${RUNTIME_LABEL}: ${rule.what}`};out.push({change,usage,severity:"unverified",confidence:.6,fixability:"assisted",reason:`${RUNTIME_LABEL}: ${rule.what}`})}});return out}var UNATTRIBUTED_REASON="compile error not attributed to a known API change";function normalizeMessage(message){return(message.split(`
328
+ `)[0]??"").replace(/'[^']*'/g,"'_'").replace(/\s+/g," ").trim()}function quotedNames(message){return[...message.matchAll(/'([^']*)'/g)].map(m=>m[1])}function describeCluster(count3,cause){return`${count3} error${count3===1?"":"s"} caused by \`${cause.name}\` (${cause.file}:${cause.line}), ${cause.reason}. Fix here first.`}function unattributedFindings(diagnostics2,meta,surfaceB,unresolvedFiles,filePrefix=""){let clusters=new Map,single=[];for(let d of diagnostics2){if(!d.cause){single.push(d);continue}let key2=`${d.cause.file}:${d.cause.line}:${d.cause.name}`,list=clusters.get(key2)??[];list.push(d),clusters.set(key2,list)}return[...[...clusters.values()].map(group=>{let cause=group[0].cause,usage={file:cause.file,line:cause.line,column:1,endLine:cause.line,endColumn:1,symbolPath:`cause:${cause.name}`,access:"read",snippet:"",via:"inferred"};return{change:{...meta,path:`cause:${cause.name}`,kind:"cause",severity:"breaking",source:"types",confidence:1,evidence:"checker",notes:describeCluster(group.length,{...cause,file:`${filePrefix}${cause.file}`})},usage,downstream:group.map(d=>({file:`${filePrefix}${d.file}`,line:d.line,code:d.code,message:d.message.split(`
329
+ `)[0]??d.message})),severity:"breaking",confidence:1,fixability:"unknown",reason:UNATTRIBUTED_REASON}}),...plainFindings(single,meta,surfaceB,unresolvedFiles)]}function plainFindings(diagnostics2,meta,surfaceB,unresolvedFiles){let unresolved=new Set(unresolvedFiles),shaky=new Set(surfaceB.symbols.filter(s=>s.file!==void 0&&unresolved.has(s.file)).map(s=>s.path.split(/[.#[]/).pop()??s.path));return diagnostics2.map(d=>{let usage={file:d.file,line:d.line,column:d.column,endLine:d.endLine,endColumn:d.endColumn,symbolPath:`TS${d.code}`,access:"read",snippet:d.snippet??"",via:"inferred",compileError:d.message},change={...meta,path:`TS${d.code}`,kind:"type",severity:"breaking",source:"types",confidence:1,evidence:"checker",notes:normalizeMessage(d.message)},inconclusive=quotedNames(d.message).some(n=>shaky.has(n));return{change,usage,severity:inconclusive?"unverified":"breaking",confidence:1,fixability:"unknown",reason:inconclusive?`${UNATTRIBUTED_REASON}; a type it names is declared in a target file with unresolved imports, compile check inconclusive`:UNATTRIBUTED_REASON}})}var PACKS=[zodPack,stripePack];async function check(opts){let started=Date.now(),adapter=opts.adapter??typescriptAdapter,fetcher=opts.fetcher??createNpmFetcher(),cache=opts.cache??createFsSurfaceCache(),findUsages=requireFindUsages(adapter);if(!adapter.installedDependencies)throw new AdapterCapabilityError(adapter.id,"findUsages");let root={dir:opts.cwd},workspaces=await adapter.workspacePackages?.(root)??["."],ctx={adapter,fetcher:memoizingFetcher(fetcher),cache,findUsages,opts},installedByWorkspace={},catalogByWorkspace={};for(let workspace of workspaces){let repo={dir:resolve12(opts.cwd,workspace)};installedByWorkspace[workspace]=Object.fromEntries(await adapter.installedDependencies(repo));let specifiers=await adapter.declaredSpecifiers?.(repo)??new Map;catalogByWorkspace[workspace]=[...specifiers].filter(([,spec])=>spec.startsWith("catalog:")).map(([name])=>name)}let candidates=opts.only??[...new Set(Object.values(installedByWorkspace).flatMap(deps=>Object.keys(deps)))],scopedImports=opts.only&&!opts.adapter?await scanImports(opts.cwd,candidates,workspaces):void 0,roots=new Map;for(let workspace of workspaces){let files=new Set;for(let usage of scopedImports?.values()??[])for(let file of usage.files)([...workspaces].sort((a,b)=>b.length-a.length).find(w=>w!=="."&&file.startsWith(`${w}/`))??".")===workspace&&files.add(resolve12(opts.cwd,file));scopedImports&&roots.set(workspace,[...files].sort())}let importedByWorkspace={};for(let workspace of workspaces)importedByWorkspace[workspace]=scopedImports?candidates.filter(name=>scopedImports.get(name)?.workspaces.includes(workspace)):importedByText(opts.cwd,workspace,candidates,workspaces);let linked=version=>version!==void 0&&/^(link|workspace|file):/.test(version),versionOf=name=>Object.values(installedByWorkspace).map(deps=>deps[name]).find(version=>version!==void 0&&!linked(version)),rankable=candidates.filter(name=>!name.startsWith("@types/")&&versionOf(name)!==void 0&&(opts.allDeps||Object.values(importedByWorkspace).some(names=>names.includes(name)))),sites=importFileCounts(opts.cwd,rankable),ranked=rankCandidates(await mapWithLimit(rankable,8,async name=>{let latest=opts.targets?.[name]??await ctx.fetcher.resolve(name,"latest").catch(()=>{});return{name,installed:versionOf(name),...latest!==void 0?{latest}:{},importSites:sites.get(name)??0}})),{adapter:_a,fetcher:_f,cache:_c,onProgress:_p,...givenOpts}=opts,plainOpts={...givenOpts,concurrency:1,targets:{...Object.fromEntries(ranked.filter(c=>c.latest!==void 0).map(c=>[c.name,c.latest])),...opts.targets},order:ranked.map(c=>c.name),behind:ranked.filter(c=>c.latest===void 0||isBehind(c)).map(c=>c.name),...opts.maxTimeMs?{deadline:started+opts.maxTimeMs,hardDeadline:started+opts.maxTimeMs*1.5}:{}},behindNames=new Set(plainOpts.behind??[]),stake=workspace=>opts.maxTimeMs?(importedByWorkspace[workspace]??[]).filter(name=>behindNames.has(name)).length:0,jobs=[...workspaces].sort((a,b)=>stake(b)-stake(a)||Object.keys(installedByWorkspace[b]??{}).length-Object.keys(installedByWorkspace[a]??{}).length).map(workspace=>({cwd:opts.cwd,workspace,...roots.has(workspace)?{rootFiles:roots.get(workspace)}:{},workspaces,installedByWorkspace,importedByWorkspace,opts:plainOpts})),injected=opts.adapter!==void 0||opts.fetcher!==void 0||opts.cache!==void 0,estimates=new Map(jobs.map(job=>[job.workspace,injected||job.rootFiles?.length===0?0:estimateScopedHeapMb(resolve12(job.cwd,job.workspace),job.rootFiles)])),policy=memoryPolicy(void 0,void 0,Math.min(opts.workspaceConcurrency??Number.MAX_SAFE_INTEGER,jobs.filter(j=>(estimates.get(j.workspace)??0)>0).length||1),Math.max(1024,...estimates.values())),workers=injected?1:policy.workers;plainOpts.workerHeapMb=policy.heapMb,plainOpts.workspaceConcurrency=workers;let guarded=run=>job=>(async()=>{let estimate=estimates.get(job.workspace)??0,available=job.opts.workerHeapMb??policy.heapMb,active=(importedByWorkspace[job.workspace]??[]).some(name=>behindNames.has(name));if(!injected&&(active||opts.allDeps)&&estimate>available)throw new UptideError("MEMORY_BUDGET",`workspace ${job.workspace}: scoped program estimate ${estimate} MB of heap; ${available} MB available for a single worker within the ${policy.budgetMb} MB memory budget (60% of available memory). Close other applications or check a smaller workspace.`);return run(job)})().catch(err=>{let declared=installedByWorkspace[job.workspace]??{};return(plainOpts.behind??[]).filter(name=>(declared[name]!==void 0||importedByWorkspace[job.workspace]?.includes(name))&&!linked(declared[name])).map(name=>({...notImported(job.workspace,name,declared[name]??versionOf(name)??"?"),target:plainOpts.targets?.[name]??declared[name]??"?",latest:plainOpts.targets?.[name]??declared[name]??"?",...declared[name]===void 0?{undeclared:{}}:{},status:"skipped",skipReason:errorCode(err),notes:[errorCode(err)==="MEMORY_BUDGET"?err.message:/memory/i.test(String(err.message))?`workspace ${job.workspace}: scoped program exhausted its memory reservation (estimate ${estimates.get(job.workspace)??0} MB of heap; ${job.opts.workerHeapMb??policy.heapMb} MB available). No safety verdict; free more memory and retry.`:`analysis failed: ${err.message??String(err)}`]}))}),results=injected?await mapWithLimit(jobs,1,guarded(job=>checkWorkspace(ctx,job))):await mapWithSerialRetry(jobs,workers,guarded(job=>job.rootFiles?.length===0&&!opts.allDeps?checkWorkspace(ctx,job):runInWorker(job,opts.onProgress)),reports=>reports.some(p=>p.skipReason==="ERR_WORKER_OUT_OF_MEMORY"||p.skipReason==="MEMORY_BUDGET"),async job=>{let serial=memoryPolicy(void 0,1,1),heapMb=Math.min(serial.heapMb,Math.floor(policy.budgetMb/1.4));return guarded(retry=>runInWorker(retry,opts.onProgress))({...job,opts:{...job.opts,workspaceConcurrency:1,workerHeapMb:heapMb}})});if(adapter.id==="typescript")for(let report of results.flat()){if(report.name!=="zod")continue;let sources=new Map;report.findings=report.findings.map(finding=>{let file=resolve12(opts.cwd,report.workspace,finding.usage.file),source=sources.get(file);if(source===void 0){try{source=readFileSync22(file,"utf8")}catch{return finding}sources.set(file,source)}return packFixability(finding,source,zodPack)})}let order=new Map(workspaces.map((w,i)=>[w,i])),packages=mergeAcrossWorkspaces(results.flat().sort((a,b)=>(order.get(a.workspace)??0)-(order.get(b.workspace)??0)),catalogByWorkspace);for(let p of packages)p.tier??=tierOf(PACKS,p.name,p.installed,p.target);for(let p of packages)groupRootCauses(p);if(adapter.id==="typescript"&&opts.plan!==!1)planPackages(packages,opts);else for(let p of packages)delete p.planContext;return await ctx.fetcher.dispose(),{repo:opts.cwd,workspaces,packages,summary:summarize(packages),timing:{totalMs:Date.now()-started}}}function planPackages(packages,opts){let sources=new Map,read2=file=>{if(!sources.has(file))try{sources.set(file,readFileSync22(resolve12(opts.cwd,file),"utf8"))}catch{sources.set(file,void 0)}return sources.get(file)};for(let p of packages){if(!["breaking","deprecated"].includes(p.status)&&p.findings.length===0)continue;let pack=PACKS.find(candidate=>candidate.name===p.name),plan=planPackage(p,pack,read2,p.planContext??{});if(plan.length===0||(p.plan=plan,!p.planContext))continue;let context={from:p.installed,to:p.target,includeDeprecated:!1,...p.planContext};if(pack?.describeFinding)for(let f of p.findings){if(f.change.source!=="pack")continue;let words2=pack.describeFinding(f,context);words2?.reason&&(f.reason=words2.reason),words2?.details?.length&&(f.details=words2.details)}if(pack?.planNote)for(let group of plan){if(group.severity==="deprecated")continue;let note=pack.planNote(group.rule,context);note&&(group.note=note)}}for(let p of packages)delete p.planContext}function importerOf(p){let analyzed=!["skipped","no-types","private","not-imported"].includes(p.status);return{workspace:p.workspace,declared:p.undeclared===void 0,...p.undeclared?.via?{via:p.undeclared.via}:{},analyzed,...analyzed?{}:{reason:p.notes[0]??p.status}}}function sitesOf(f){return f.change.kind==="cause"?f.downstream?.length??0:1}function isFailure(p){return p.status==="skipped"&&p.skipReason!==void 0&&!["TIME_BUDGET","NO_TYPES","PACKAGE_NOT_INSTALLED","PACKAGE_NOT_FOUND","REGISTRY_AUTH"].includes(p.skipReason)}function summarize(packages){let byName=status=>new Set(packages.filter(status).map(p=>p.name)).size,findings=packages.flatMap(p=>p.findings),count3=pick=>findings.filter(pick).reduce((n,f)=>n+sitesOf(f),0);return{packagesNeedingAttention:byName(p=>p.status==="breaking"||p.status==="deprecated"),breaking:count3(f=>f.severity==="breaking"),deprecated:count3(f=>f.severity==="deprecated"),unverified:count3(f=>f.severity==="unverified"),unaffected:byName(p=>p.status==="safe"),notImported:byName(p=>p.status==="not-imported"),partiallyAnalyzed:byName(p=>p.status==="partial"||p.status==="unknown"),autoFixable:count3(f=>(f.severity==="breaking"||f.severity==="deprecated")&&f.fixability==="mechanical"),skippedForTime:byName(p=>p.skipReason==="TIME_BUDGET"),failed:byName(p=>isFailure(p))}}function mergeAcrossWorkspaces(packages,catalogByWorkspace){let analyzable=new Set(["breaking","deprecated","safe","partial","unknown"]),groups2=new Map;for(let p of packages){if(!analyzable.has(p.status)||p.notes.includes("up to date"))continue;let key2=`${p.name}@${p.installed}->${p.target}`,list=groups2.get(key2)??[];list.push(p),groups2.set(key2,list)}let merged=new Map,dropped=new Set;for(let list of groups2.values()){let catalog=list.some(p=>catalogByWorkspace[p.workspace]?.includes(p.name));if(list.length<2&&!catalog)continue;let prefixed=(p,file)=>p.workspace==="."?file:`${p.workspace}/${file}`,first=list[0],sum=pick=>list.reduce((n,p)=>n+pick(p),0),combined={...first,workspace:"*",workspaces:list.map(p=>p.workspace),...catalog?{source:"catalog"}:{},findings:list.flatMap(p=>p.findings.map(f=>({...f,usage:{...f.usage,file:prefixed(p,f.usage.file)},change:f.change.path.startsWith("cause:")?{...f.change,notes:f.change.notes?.replace(`(${f.usage.file}:`,`(${prefixed(p,f.usage.file)}:`)}:f.change}))),callSitesChecked:sum(p=>p.callSitesChecked),unanalyzed:list.flatMap(p=>p.unanalyzed.map(u=>({...u,file:prefixed(p,u.file)}))),notes:[...new Set(list.flatMap(p=>p.notes))],...list.find(p=>p.skipReason)?.skipReason?{skipReason:list.find(p=>p.skipReason)?.skipReason}:{},status:statusOf(list.flatMap(p=>p.findings),sum(p=>p.callSitesChecked),sum(p=>p.unanalyzed.length)),timing:{fetchMs:sum(p=>p.timing.fetchMs),diffMs:sum(p=>p.timing.diffMs),usagesMs:sum(p=>p.timing.usagesMs),compileMs:sum(p=>p.timing.compileMs),runtimeMs:sum(p=>p.timing.runtimeMs??0)}};first.runtime&&(combined.runtime=first.runtime),combined.importers=list.map(importerOf);let contexts=list.map(p=>p.planContext).filter(c=>c!==void 0);contexts.length>0&&(combined.planContext={...contexts[0],evidence:contexts.flatMap(c=>c.evidence??[])}),first.compile&&(combined.compile={...first.compile,baselineErrors:sum(p=>p.compile?.baselineErrors??0),unresolvedInTarget:[...new Set(list.flatMap(p=>p.compile?.unresolvedInTarget??[]))],unresolvedFiles:[...new Set(list.flatMap(p=>p.compile?.unresolvedFiles??[]))],unattributed:list.flatMap(p=>(p.compile?.unattributed??[]).map(d=>({...d,file:prefixed(p,d.file)}))),...list.every(p=>p.compile?.newErrors!==void 0)?{newErrors:sum(p=>p.compile?.newErrors??0)}:{}}),first.verdict&&(combined.verdict=verdictOf(combined,list.find(p=>p.verdict?.notVerified)?.verdict?.notVerified)),merged.set(first,combined);for(let p of list.slice(1))dropped.add(p)}let shared=[],rest=[],failedImporters=packages.filter(p=>p.status==="skipped"&&p.undeclared);for(let p of packages){if(dropped.has(p)||failedImporters.includes(p))continue;let m=merged.get(p);m?shared.push(m):rest.push(p)}let result=[...shared,...rest];for(let p of result){if(!analyzable.has(p.status))continue;let importers2=p.importers??[importerOf(p)],failed=failedImporters.filter(f=>f.name===p.name).map(importerOf);(importers2.length>1||failed.length>0||p.undeclared)&&(p.importers=[...importers2,...failed])}let orphans=failedImporters.filter(f=>!result.some(p=>p.name===f.name));for(let f of orphans)f.importers=[importerOf(f)];return[...result,...orphans]}function workerHeapMb(workers,freeBytes=freeMemoryBytes(),env=process.env){let budget=Math.floor(freeBytes/1024/1024*.6/Math.max(1,workers)/1.4),asked=Number(env.UPTIDE_WORKER_HEAP_MB);return Math.max(0,Math.min(8192,budget,Number.isFinite(asked)&&asked>=128?Math.floor(asked):8192))}async function runInWorker(job,onProgress){let{Worker:Worker2}=await import("worker_threads"),here=import.meta.url,fromSource=here.endsWith(".ts"),url=new URL(fromSource?"./worker.ts":"./worker.js",here);return new Promise((resolvePromise,reject)=>{let worker=new Worker2(url,{workerData:job,execArgv:fromSource?["--import","tsx"]:[],resourceLimits:{maxOldGenerationSizeMb:Math.max(16,job.opts.workerHeapMb??workerHeapMb(1))}}),settled=!1;worker.on("message",message=>{message.type==="error"?(settled=!0,worker.terminate().then(()=>reject(new UptideError(message.code,message.message)))):message.type==="progress"?onProgress?.(message.event):message.type==="result"&&(settled=!0,worker.terminate().then(()=>resolvePromise(message.reports)))}),worker.once("error",err=>{settled=!0,worker.terminate().then(()=>reject(err))}),worker.once("exit",code=>{settled||reject(new Error(`workspace ${job.workspace}: worker exited with ${code}`))})})}async function checkWorkspaceJob(job,onProgress){let adapter=typescriptAdapter,ctx={adapter,fetcher:memoizingFetcher(createNpmFetcher()),cache:createFsSurfaceCache(),findUsages:requireFindUsages(adapter),opts:{...job.opts,cwd:job.cwd,...onProgress?{onProgress}:{}}};try{return await checkWorkspace(ctx,job)}finally{await ctx.fetcher.dispose()}}async function checkWorkspace(ctx,job){let{adapter}=ctx,opts={...ctx.opts,...job.opts},{workspace,workspaces,installedByWorkspace,importedByWorkspace}=job,packages=[];if(!opts.adapter&&opts.only&&!opts.allDeps&&(importedByWorkspace[workspace]??[]).length===0)return progress(opts.onProgress,{phase:"resolve",workspace},()=>Object.entries(installedByWorkspace[workspace]??{}).filter(([name])=>opts.only?.includes(name)).map(([name,version])=>notImported(workspace,name,version)));if(opts.deadline!==void 0&&Date.now()>opts.deadline){let declared=installedByWorkspace[workspace]??{},imported=new Set(importedByWorkspace[workspace]??[]),late=(name,version,undeclared)=>({...notImported(workspace,name,version),status:"skipped",skipReason:"TIME_BUDGET",notes:["time budget reached before this workspace"],...undeclared?{undeclared:{}}:{}});for(let name of opts.behind??[]){if(opts.only&&!opts.only.includes(name))continue;let version=declared[name];version!==void 0&&/^(link|workspace|file):/.test(version)||(version!==void 0&&(opts.allDeps||imported.has(name))?packages.push(late(name,version,!1)):version===void 0&&imported.has(name)&&packages.push(late(name,"unresolved",!0)))}return packages}{let dir=resolve12(opts.cwd,workspace),repo={dir,...job.rootFiles?{rootFiles:job.rootFiles}:{}},installed=new Map(Object.entries(installedByWorkspace[workspace]??{})),others=workspaces.filter(w=>w!==workspace&&!`${dir}/`.startsWith(`${resolve12(opts.cwd,w)}/`)),scopeFor=name=>{let exclude=others.filter(w=>installedByWorkspace[w]?.[name]!==void 0||importedByWorkspace[w]?.includes(name)).map(w=>resolve12(opts.cwd,w));return exclude.length>0?{...repo,exclude}:repo},imported=opts.allDeps?void 0:await progress(opts.onProgress,{phase:"resolve",workspace},()=>adapter.importedPackages?.(repo)),undeclared=new Map,unresolved=new Map;for(let name of importedByWorkspace[workspace]??[]){if(installed.has(name)||name.startsWith("@types/"))continue;let dir2=installedPackageDirOf(adapter,repo,name,"")?.dir,version=dir2?readManifest3(dir2)?.version:void 0;if(!dir2||!version){unresolved.set(name,`imports ${name} without declaring it, and it does not resolve from ${workspace}`);continue}let via=[...installed].filter(([,v])=>/^(link|workspace|file):/.test(v)).map(([dep])=>dep).find(dep=>{let home=workspaces.find(w=>readManifest3(resolve12(opts.cwd,w))?.name===dep);return home!==void 0&&installedByWorkspace[home]?.[name]!==void 0});installed.set(name,version),undeclared.set(name,via?{via}:{})}let rank=new Map((opts.order??[]).map((name,i)=>[name,i])),entries=[...installed].sort(([a],[b])=>(rank.get(a)??Number.MAX_SAFE_INTEGER)-(rank.get(b)??Number.MAX_SAFE_INTEGER)||a.localeCompare(b)).filter(([name])=>!opts.only||opts.only.includes(name)),behind=new Set(opts.behind??[]),analyzable=entries.filter(([name,version])=>!/^(link|workspace|file):/.test(version)&&(opts.allDeps||!name.startsWith("@types/")&&(imported===void 0||imported.has(name)))),groups2=releaseGroups(analyzable.map(([name,version])=>({name,installed:version,dependsOn:dependsOnOf(installedPackageDirOf(adapter,repo,name,version)?.dir)}))),groupOf=new Map(groups2.flatMap(g=>g.map(m=>[m,g]))),done=new Set,reports=await mapWithLimit(entries,opts.concurrency??(opts.deadline!==void 0?1:6),async([name,installedVersion2])=>{if(done.has(name))return[];if(/^(link|workspace|file):/.test(installedVersion2)){let linked=notImported(workspace,name,installedVersion2);return linked.status="workspace",linked.notes=[],[linked]}if(!opts.allDeps&&(name.startsWith("@types/")||imported!==void 0&&!imported.has(name)))return[notImported(workspace,name,installedVersion2)];let members=groupOf.get(name)??[name];if(opts.deadline!==void 0&&Date.now()>opts.deadline&&behind.has(name)){for(let m of members)done.add(m);return members.map(m=>({...notImported(workspace,m,installed.get(m)),status:"skipped",skipReason:"TIME_BUDGET",notes:["time budget reached before this dependency"]}))}for(let m of members)done.add(m);try{return[await checkGroup({...ctx,opts},scopeFor(name),workspace,members.map(m=>({name:m,installed:installed.get(m)})))]}catch(err){resetSharedState();let late=errorCode(err)==="TIME_BUDGET";return members.map(m=>({...notImported(workspace,m,installed.get(m)),status:"skipped",target:opts.targets?.[m]??installed.get(m)??"?",latest:opts.targets?.[m]??installed.get(m)??"?",skipReason:/Maximum call stack size exceeded/.test(String(err))?"ANALYSIS_STACK_OVERFLOW":errorCode(err),notes:[/Maximum call stack size exceeded/.test(String(err))?`${m}: analysis exceeded its recursion limit while inspecting declarations (Maximum call stack size exceeded). No safety verdict; other named packages continue.`:late?"time budget reached during its analysis":`analysis failed: ${err.message??String(err)}`]}))}}),warnings=await adapter.repoWarnings?.(repo)??[];for(let r of reports.flat()){(r.status==="breaking"||r.status==="deprecated"||r.status==="safe")&&r.notes.push(...warnings);let undeclaredAs=undeclared.get(r.name);undeclaredAs&&(r.undeclared=undeclaredAs)}packages.push(...reports.flat().sort((x,y)=>x.name.localeCompare(y.name)));for(let[name,reason]of unresolved)opts.only&&!opts.only.includes(name)||packages.push({...notImported(workspace,name,"unresolved"),status:"skipped",skipReason:"PACKAGE_NOT_INSTALLED",undeclared:{},notes:[reason]});adapter.forgetRepo?.(repo)}return packages}function dependsOnOf(dir){if(!dir)return[];try{let m=JSON.parse(readFileSync22(join30(dir,"package.json"),"utf8"));return[...Object.keys(m.dependencies??{}),...Object.keys(m.peerDependencies??{})]}catch{return[]}}function memoizingFetcher(inner){let resolved2=new Map,versions=new Map,fetched=new Map,once=(map,key2,make)=>{let p=map.get(key2);return p||(p=make(),map.set(key2,p)),p};return{resolve:(name,requested)=>once(resolved2,`${name}@${requested}`,()=>inner.resolve(name,requested)),fetch:(name,version)=>once(fetched,`${name}@${version}`,()=>inner.fetch(name,version)),...inner.versions?{versions:name=>once(versions,name,()=>inner.versions?.(name)??Promise.resolve([]))}:{},async dispose(){for(let dir of fetched.values())await dir.then(pkg=>releasePackage(inner,pkg)).catch(()=>{})}}}function notImported(workspace,name,installed){return{workspace,name,installed,latest:installed,target:installed,majorsBehind:0,findings:[],callSitesChecked:0,unanalyzed:[],status:"not-imported",notes:[name.startsWith("@types/")?"type-only package, skipped":"never imported by this workspace, skipped"],timing:{fetchMs:0,diffMs:0,usagesMs:0,compileMs:0}}}var UNKNOWN_SHARE=.2;function statusOf(findings,analyzed=0,unanalyzed=0){return findings.some(f=>f.severity==="breaking")?"breaking":findings.some(f=>f.severity==="deprecated")?"deprecated":unanalyzed===0?"safe":unanalyzed/(analyzed+unanalyzed)>UNKNOWN_SHARE?"unknown":"partial"}function pathsOfInterest(usages,all){let out=new Set,known=new Set(all),implemented=new Set;for(let u of usages)for(let path of usagePaths(u)){out.add(path);for(let p=parentOf(path);p!==void 0;p=parentOf(p))out.add(p);u.access==="implement"&&implemented.add(path)}if(implemented.size>0){for(let path of known)for(let p=parentOf(path);p!==void 0;p=parentOf(p))if(implemented.has(p)){out.add(path);break}}return out}var TYPE_WORDS=new Set(["string","number","boolean","unknown","any","never","void","null","undefined","object","symbol","bigint","this","readonly","typeof","keyof","infer","extends","new","import","Promise","Array","Record","Partial","Required","Readonly","Pick","Omit","Map","Set"]);function referencedTypes(usages,symbols){let out=new Map;for(let u of usages)for(let path of usagePaths(u)){if(out.has(path))continue;let symbol=symbols.get(path);if(!symbol)continue;let top=path.split(/[.#[]/)[0]??"",prefixes=top&&top!==path?[top]:[],refs=new Set;for(let id of symbol.signature.match(/[A-Za-z_$][\w$]*/g)??[])if(!TYPE_WORDS.has(id)){for(let candidate of[...prefixes.map(pre=>`${pre}.${id}`),id])if(candidate!==path&&symbols.has(candidate)){refs.add(candidate);break}}refs.size>0&&out.set(path,[...refs])}return out}async function prepare(ctx,repo,workspace,name,installedVersion2){let timing={fetchMs:0,diffMs:0,usagesMs:0,compileMs:0},notes=[],base=(status,target2,latest2)=>({workspace,name,installed:installedVersion2,latest:latest2,target:target2,majorsBehind:majorsBehind(installedVersion2,target2),findings:[],callSitesChecked:0,unanalyzed:[],status,notes,timing}),latest;try{latest=await progress(ctx.opts.onProgress,{phase:"resolve",package:name,workspace},()=>ctx.fetcher.resolve(name,"latest"))}catch(err){return err instanceof PackageNotFoundError||err instanceof RegistryAuthError?(notes.push(err instanceof RegistryAuthError?"registry auth":"not on the registry"),{...base("private",installedVersion2,installedVersion2),skipReason:errorCode(err)}):(notes.push(`could not resolve latest: ${err.message}`),{...base("skipped",installedVersion2,installedVersion2),skipReason:errorCode(err)})}let target=ctx.opts.targets?.[name]??latest;if(compareVersions(target,installedVersion2)<=0)return notes.push("up to date"),base("safe",target,latest);let installedDir=installedPackageDirOf(ctx.adapter,repo,name,installedVersion2),nodeTypes=installedPackageDirOf(ctx.adapter,repo,"@types/node","")?.dir;installedDir&&nodeTypes&&(installedDir.types=[nodeTypes]);let typesName=`@types/${name.startsWith("@")?name.slice(1).replace("/","__"):name}`,typesDir=installedPackageDirOf(ctx.adapter,repo,typesName,""),types,runtimeDir;if(typesDir&&(!installedDir||!shipsTypes(installedDir.dir))){let typesInstalled=readManifest3(typesDir.dir)?.version??"0.0.0",major=parseVersion(target)?.major,published=await ctx.fetcher.versions?.(typesName).catch(()=>[])??[],sameMajor=major===void 0?void 0:maxSatisfying(published,`${major}.x`),latestTypes=published.at(-1),typesTarget=sameMajor!==void 0&&compareVersions(sameMajor,typesInstalled)>=0?sameMajor:latestTypes!==void 0&&compareVersions(latestTypes,typesInstalled)>=0?latestTypes:typesInstalled;typesTarget!==sameMajor&&published.length>0&&notes.push(`${typesName} has no ${major}.x release above ${typesInstalled}; diffed against ${typesTarget}`),types={name:typesName,installedVersion:typesInstalled,target:typesTarget},runtimeDir=installedDir,installedDir={...typesDir,version:typesInstalled};let runtimeMajor=parseVersion(installedVersion2)?.major,installedTypesMajor=parseVersion(typesInstalled)?.major;if(runtimeMajor!==void 0&&installedTypesMajor!==void 0&&runtimeMajor!==installedTypesMajor&&installedTypesMajor===parseVersion(target)?.major){let matching=maxSatisfying(published,`${runtimeMajor}.x`);if(notes.push(`${typesName} ${typesInstalled} is installed while ${name} ${installedVersion2} runs${matching?`; baseline taken as ${typesName} ${matching}`:""}`),matching!==void 0&&matching!==typesInstalled)try{let baselineDir=await progress(ctx.opts.onProgress,{phase:"fetch",package:name,workspace},()=>ctx.fetcher.fetch(typesName,matching));types.baseline=matching,installedDir={...baselineDir,version:matching}}catch{notes.push(`${typesName} ${matching} could not be fetched; baseline stays ${typesInstalled}`)}}nodeTypes&&(installedDir.types=[nodeTypes])}if(!installedDir)return notes.push("not installed: declared in the lockfile, missing from node_modules"),{...base("skipped",target,latest),skipReason:"PACKAGE_NOT_INSTALLED"};let installedSurface,untyped=!1;try{let key2={package:installedDir.name,version:installedDir.version,adapter:ctx.adapter.id,schema:SURFACE_SCHEMA_VERSION};installedSurface=await ctx.cache.get(key2)??await ctx.adapter.extractSurface(installedDir),await ctx.cache.set(key2,installedSurface)}catch(err){if(!(err instanceof NoTypesError))throw err;untyped=!0,installedSurface={package:name,version:installedVersion2,extractedAt:new Date(0).toISOString(),adapter:ctx.adapter.id,symbols:[]}}let tUsages=Date.now(),scan=await progress(ctx.opts.onProgress,{phase:"usages",package:name,workspace},()=>ctx.findUsages(repo,name,installedSurface));if(timing.usagesMs=Date.now()-tUsages,scan.unanalyzed.length>0&&notes.push(`${scan.unanalyzed.length} site${scan.unanalyzed.length===1?"":"s"} not analyzed (require/dynamic import)`),scan.usages.length===0){if(scan.unanalyzed.length>0){let report2=base("unknown",target,latest);return report2.unanalyzed=scan.unanalyzed,report2}notes.push("no usages found");let report=base("not-imported",target,latest);return report.unanalyzed=scan.unanalyzed,report}for(let u of scan.usages)u.package=name;let prepared={name,installedVersion:installedVersion2,latest,target,installedDir,installedSurface,scan,notes,timing};return untyped&&(prepared.untyped=!0),types&&(prepared.types=types,runtimeDir&&(prepared.runtimeDir=runtimeDir)),prepared}function outOfTime(ctx){if(ctx.opts.hardDeadline!==void 0&&Date.now()>ctx.opts.hardDeadline)throw new UptideError("TIME_BUDGET","time budget reached")}async function checkGroup(ctx,repo,workspace,members){let prepared=[],early=[];for(let m of members){let p=await prepare(ctx,repo,workspace,m.name,m.installed);"scan"in p?prepared.push(p):early.push(p)}if(prepared.length===0)return early.length===1?early[0]:mergeEarly(workspace,early);let name=groupName(prepared.map(p=>p.name)),notes=prepared.flatMap(p=>prepared.length>1?p.notes.map(n=>`${p.name}: ${n}`):p.notes),timing={fetchMs:0,diffMs:0,usagesMs:0,compileMs:0};for(let p of prepared)timing.usagesMs+=p.timing.usagesMs;let installed=prepared.map(p=>p.installedVersion).sort(compareVersions),targets=prepared.map(p=>p.target).sort(compareVersions),base=status=>({workspace,name,...prepared.length>1?{members:prepared.map(p=>({name:p.name,installed:p.installedVersion,target:p.target}))}:{},installed:installed[0],latest:prepared.length===1?prepared[0]?.latest:targets.at(-1),target:targets.at(-1),majorsBehind:Math.max(...prepared.map(p=>majorsBehind(p.installedVersion,p.target))),findings:[],callSitesChecked:0,unanalyzed:prepared.flatMap(p=>p.scan.unanalyzed),status,notes,timing}),tFetch=Date.now(),fetched=[];for(let p of prepared)try{let pkg=p.types?await progress(ctx.opts.onProgress,{phase:"fetch",package:p.name,workspace},()=>ctx.fetcher.fetch(p.types?.name??p.name,p.types?.target??p.target)):await progress(ctx.opts.onProgress,{phase:"fetch",package:p.name,workspace},()=>ctx.fetcher.fetch(p.name,p.target)),runtime=p.types?await progress(ctx.opts.onProgress,{phase:"fetch",package:p.name,workspace},()=>ctx.fetcher.fetch(p.name,p.target)):void 0;fetched.push({p,pkg:p.installedDir.types?{...pkg,types:p.installedDir.types}:pkg,runtime})}catch(err){return notes.push(`could not fetch ${p.name}@${p.target}: ${err.message}`),{...base("skipped"),skipReason:errorCode(err)}}timing.fetchMs=Date.now()-tFetch;let node=resolveNodeVersion([repo.dir,ctx.opts.cwd]),nodeRange=node?.range,nodeSupport=requireEsmSupport(nodeRange);try{outOfTime(ctx);let tDiff=Date.now(),diffs=new Map;for(let{p,pkg}of fetched){let meta={package:p.name,from:p.installedVersion,to:p.target},installedManifest2=readManifest3((p.runtimeDir??p.installedDir).dir),targetManifest=readManifest3(fetched.find(f=>f.p===p)?.runtime?.dir??pkg.dir),diff;if(p.untyped){let targetTyped=shipsTypes(pkg.dir,targetManifest);notes.push(`${prepared.length>1?`${p.name}: `:""}installed ${p.installedVersion} ships no type declarations${targetTyped?`, ${p.target} does`:` and neither does ${p.target}`}; only load sites and the manifest were analyzed`),diff={surfaceA:p.installedSurface,surfaceB:p.installedSurface,changes:[]}}else{let bySymbol=new Map(p.installedSurface.symbols.map(s=>[s.path,s]));p.references=referencedTypes(p.scan.usages,bySymbol);let onlyPaths=ctx.opts.usageFirst===!1?void 0:new Set([...pathsOfInterest(p.scan.usages,bySymbol.keys()),...[...p.references.values()].flat()]);diff=await progress(ctx.opts.onProgress,{phase:"diff",package:p.name,workspace},()=>diffDirs(p.installedDir,pkg,{adapter:ctx.adapter,cache:ctx.cache,assignability:ctx.opts.assignability,onlyPaths}))}if(installedManifest2&&targetManifest){let targetDir=fetched.find(f=>f.p===p)?.runtime?.dir??pkg.dir,format=moduleFormatChange(installedManifest2,targetManifest,meta,{range:nodeRange,support:nodeSupport,...node?{source:node.caveat?`${node.source}; ${node.caveat}`:node.source}:{},topLevelAwait:nodeSupport==="yes"&&hasTopLevelAwait(targetDir)});format&&(format.loadRoot=loadRootOf(p),diff={...diff,changes:[...diff.changes,format]})}diffs.set(p.name,diff)}timing.diffMs=Date.now()-tDiff;let allUsages=prepared.flatMap(p=>p.scan.usages),compile,usages=allUsages,compiled=!1,compileMany=ctx.adapter.compileAgainstMany,linkedDirs={},sameDeclarations=prepared.every(p=>p.types!==void 0&&p.types.target===(p.types.baseline??p.types.installedVersion));if(sameDeclarations&&notes.push("type declarations unchanged; compile check skipped"),ctx.opts.compile!==!1&&compileMany&&!sameDeclarations){outOfTime(ctx);let t2=Date.now(),baselineTargets=prepared.map(p=>({name:p.types?.name??p.name,dir:p.installedDir.dir,specifier:p.name})),signal=await progress(ctx.opts.onProgress,{phase:"compile",package:prepared.map(p=>p.name).join(", "),workspace},()=>compileMany(repo,fetched.map(({p,pkg})=>p.types?{name:p.types.name,dir:pkg.dir,specifier:p.name}:{name:p.name,dir:pkg.dir}),{fetcher:ctx.fetcher,files:[...new Set([...allUsages.map(u=>u.file),...(repo.rootFiles??[]).map(file=>relative15(repo.dir,file))])],...baselineTargets.length>0?{baselineTargets}:{}}));timing.compileMs=Date.now()-t2;let unionSurface={...prepared[0].installedSurface,symbols:prepared.flatMap(p=>p.installedSurface.symbols)},changedPaths=new Set([...diffs.values()].flatMap(d=>d.changes.map(c=>c.path))),merged=mergeSignals(allUsages,signal,unionSurface,changedPaths);compiled=signal.skipped===void 0,usages=merged.usages;for(let u of usages)u.package===void 0&&(u.package=prepared.find(p=>p.installedSurface.symbols.some(s=>s.path===u.symbolPath))?.name);linkedDirs=signal.linkedDependencyDirs??{},compile={baselineErrors:signal.baselineErrors,skipped:signal.skipped,unresolvedInTarget:signal.unresolvedInTarget,unresolvedFiles:signal.unresolvedFiles,unattributed:merged.unattributed,newErrors:signal.diagnostics.length},signal.skipped?notes.push(signal.skipped):signal.baselineErrors>0&&notes.push(`${signal.baselineErrors} pre-existing type error${signal.baselineErrors===1?"":"s"} at the installed version (subtracted)`);let fetchedDeps=signal.linkedDependencies.filter(l=>l.endsWith("(fetched)")).length;fetchedDeps>0&&notes.push(`${fetchedDeps} dependenc${fetchedDeps===1?"y":"ies"} of ${name}@${base("safe").target} fetched at the versions it declares`);for(let u of signal.unsatisfiedDependencies)notes.push(`dependency of ${name} unsatisfied: ${u}`);signal.unresolvedInTarget.length>0&&notes.push(`${signal.unresolvedInTarget.length} unresolved module${signal.unresolvedInTarget.length===1?"":"s"} inside ${name}, results may be incomplete`)}let resolveDependency=async(dep,range)=>{let wanted=range==="*"||/^[a-z]+:/i.test(range)?">=0.0.0":range,consumer=installedPackageDirOf(ctx.adapter,repo,dep,""),consumerVersion=consumer?readManifest3(consumer.dir)?.version:void 0;if(consumer&&consumerVersion&&maxSatisfying([consumerVersion],wanted)===consumerVersion)return realpathSafe2(consumer.dir);let versions=ctx.fetcher.versions?await ctx.fetcher.versions(dep).catch(()=>[]):[],best=maxSatisfying(versions,wanted);if(best!==void 0)return(await progress(ctx.opts.onProgress,{phase:"fetch",package:dep,workspace},()=>ctx.fetcher.fetch(dep,best))).dir};if(ctx.opts.runtime!==!1){outOfTime(ctx);let tRuntime=Date.now();for(let{p,pkg,runtime:runtime2}of fetched){let installedDir=(p.runtimeDir??p.installedDir).dir;p.runtime=await progress(ctx.opts.onProgress,{phase:"runtime",package:p.name,workspace},()=>probeBoth(p.name,installedDir,runtime2?.dir??pkg.dir,nodeRange,linkedDirs,resolveDependency)),p.runtime.usedKeys=[...new Set(p.scan.usages.flatMap(u=>usagePaths(u).flatMap(path=>path.split(/[.#[\]]/).filter(Boolean))))]}timing.runtimeMs=Date.now()-tRuntime;let first=prepared.map(p=>p.runtime).find(r=>r!==void 0);first&&first.nodeSource==="current"&&nodeRange!==void 0&&notes.push(`runtime probed with the current Node ${first.node}: no local install of Node ${nodeRange} (${node?.source}) was found${node?.caveat?`; ${node.caveat}`:""}`)}let findings=[];for(let p of prepared){let usageFiles=[...new Set(p.scan.usages.map(u=>u.file))];findings.push(...runtimeChangeFindings({package:p.name,from:p.installedVersion,to:p.target},usageFiles.flatMap(file=>{try{return[{file,text:readFileSync22(join30(repo.dir,file),"utf8")}]}catch{return[]}})));let diff=diffs.get(p.name),unverifiedPaths=new Set;if(compile&&compile.unresolvedFiles.length>0){let files=new Set(compile.unresolvedFiles),fileOf=new Map;for(let sym of diff.surfaceA.symbols)fileOf.set(sym.path,sym.file);for(let sym of diff.surfaceB.symbols)fileOf.set(sym.path,sym.file);for(let change of diff.changes){let file=fileOf.get(change.path);file!==void 0&&files.has(file)&&unverifiedPaths.add(change.path)}}let own=usages.filter(u=>u.package===p.name),esmNamed=new Set(diff.surfaceB.symbols.map(sym=>sym.path).filter(path=>!/[.#[]/.test(path)));findings.push(...match(diff.changes,own,{compiled,unverifiedPaths,references:p.references,esmNamed,...p.runtime?.targetRequire?{targetRequire:p.runtime.targetRequire}:{},targetPaths:new Set(diff.surfaceB.symbols.map(sym=>sym.path))}))}if(!compiled&&findings.some(f=>f.severity==="breaking")&&notes.push("unverified: compile check skipped"),compile){let explained=new Set(findings.map(f=>f.usage)),wentEsmOnly=new Set(findings.filter(f=>f.change.kind==="module-format").map(f=>f.usage));for(let u of usages){if(u.compileError===void 0||explained.has(u)||wentEsmOnly.has(u))continue;let shapeCodes=new Set([2349,2351,2507]);if(u.loader==="require"&&u.compileCode!==void 0&&shapeCodes.has(u.compileCode)&&(u.access==="call"||u.access==="construct")){findings.push({change:{package:name,from:prepared[0].installedVersion,to:prepared[0].target,path:`TS${u.compileCode}`,kind:"type",severity:"breaking",source:"types",confidence:.6,evidence:"checker",notes:"the declarations now export a default where the installed version used `export =`; the CommonJS build normally still assigns module.exports, so the require() value is usually callable at runtime"},usage:u,severity:"unverified",confidence:.6,fixability:"assisted",reason:"types reject calling the require() value (default export instead of `export =`); the CommonJS build usually keeps module.exports callable, verify at runtime or switch to import"});continue}compile.unattributed.push({file:u.file,line:u.line,column:u.column,endLine:u.endLine,endColumn:u.endColumn,code:u.compileCode??0,message:u.compileError,snippet:u.snippet})}compile.unattributed.sort((a,b)=>a.file.localeCompare(b.file)||a.line-b.line);let first=prepared[0];findings.push(...unattributedFindings(compile.unattributed,{package:name,from:first.installedVersion,to:first.target},{...first.installedSurface,symbols:[...diffs.values()].flatMap(d=>d.surfaceB.symbols)},compile.unresolvedFiles,workspace==="."?"":`${workspace}/`))}if(prepared.every(p=>p.untyped))for(let f of findings)f.severity==="breaking"&&(!/^TS\d+$/.test(f.change.path)&&!f.change.path.startsWith("cause:")||(f.severity="unverified",f.reason=`${f.reason}; the installed version ships no declarations, so this error exists only because ${prepared[0]?.target} does`));let checksJs=prepared.some(p=>p.scan.checksJs),heads=new Map,headOf=file=>{let head=heads.get(file);if(head===void 0){try{head=readFileSync22(join30(repo.dir,file),"utf8").slice(0,2e3)}catch{head=""}heads.set(file,head)}return head};for(let f of findings)f.usage.checked===void 0&&!repoTypeChecks(f.usage.file,headOf(f.usage.file),checksJs)&&(f.usage.checked=!1);let runtimeOf=f=>prepared.find(p=>p.name===(f.usage.package??f.change.package))??prepared[0],arbitrated=prepared.length===1?arbitrateUnchecked(findings,prepared[0]?.runtime,loadRootOf(prepared[0])):findings.map(f=>{let p=runtimeOf(f);return arbitrateUnchecked([f],p?.runtime,p?loadRootOf(p):void 0)[0]});findings.length=0,findings.push(...arbitrated);let pack=PACKS.find(candidate=>candidate.name===name),only=prepared.length===1?prepared[0]:void 0,packDirs=p=>{let target=fetched.find(f=>f.p===p);return{installedDir:(p.runtimeDir??p.installedDir).dir,targetDir:target?.runtime?.dir??target?.pkg.dir??p.installedDir.dir}};if(pack?.runtimeFindings&&only)try{findings.push(...pack.runtimeFindings({root:ctx.opts.cwd,workspace,from:only.installedVersion,to:only.target,...packDirs(only),usages:only.scan.usages,read:file=>{try{return readFileSync22(resolve12(ctx.opts.cwd,file),"utf8")}catch{return}}}))}catch{}let tier=tierOf(PACKS,name,installed[0],targets.at(-1)),evidence=f=>{let p=runtimeOf(f);return evidenceOf(f,p?.runtime,p?loadRootOf(p):void 0)},confirmed=tier==="generic"?confirmGeneric(findings,evidence):findings.map(f=>{let found=f.severity==="breaking"?evidence(f):void 0;return found?{...f,evidence:found}:f});if(findings.length=0,findings.push(...confirmed),tier==="generic")for(let f of findings){if(f.severity==="breaking"&&[2589,2590].includes(f.usage.compileCode??0)&&(f.details=[...f.details??[],"the compiler reaches its type-instantiation limit after the upgrade; which expression reports it depends on the compiler version, so yours may name another site"]),f.severity!=="breaking"||![2305,2614,2724].includes(f.usage.compileCode??0))continue;let diff=diffs.get(f.usage.package??f.change.package)??[...diffs.values()][0],exported=[...new Set((diff?.surfaceB.symbols??[]).map(sym=>sym.path).filter(path=>!/[.#[(]/.test(path)))].sort();exported.length>0&&(f.details=[...f.details??[],`${f.change.package} ${f.change.to} exports: ${exported.slice(0,60).join(", ")}${exported.length>60?`, and ${exported.length-60} more`:""}`])}let unanalyzedCount=prepared.reduce((n,p)=>n+p.scan.unanalyzed.length,0),status=statusOf(findings,usages.length,unanalyzedCount);prepared.every(p=>p.untyped)&&status!=="breaking"&&status!=="deprecated"&&(status="no-types");let report=base(status);report.tier=tier;let viaTypes=prepared.filter(p=>p.types);viaTypes.length>0&&(report.typesVia=viaTypes.map(p=>`${p.types?.name} ${p.types?.baseline??p.types?.installedVersion} \u2192 ${p.types?.target}`).join(", ")),report.findings=findings,report.callSitesChecked=usages.length,compile&&(report.compile=compile),["breaking","deprecated","safe","partial","unknown"].includes(report.status)&&(report.verdict=verdictOf(report,ctx.opts.compile===!1?"compile check off (--no-compile)":sameDeclarations?"type declarations unchanged":"this language adapter does not compile"));let runtime=prepared.map(p=>p.runtime).filter(r=>r!==void 0);if(runtime.length>0&&(report.runtime=runtime),pack?.planContext&&only&&ctx.opts.plan!==!1)try{report.planContext=pack.planContext({root:ctx.opts.cwd,workspace,...packDirs(only),usages:only.scan.usages});let rejected=new Set(findings.filter(f=>f.usage.compileError!==void 0).map(f=>`${join30(workspace,f.usage.file)}:${f.usage.line}`));report.planContext.evidence&&(report.planContext.evidence=report.planContext.evidence.map(e=>rejected.has(`${e.file}:${e.line}`)?{...e,compiler:!0}:e))}catch{}return report}catch(err){if(err instanceof NoTypesError){let side=fetched.some(({pkg})=>!shipsTypes(pkg.dir))?"target":"installed version";return notes.push(`${err.packageName}@${err.version}: no type declarations in the ${side}, cannot diff`),{...base("no-types"),skipReason:"NO_TYPES"}}throw err}}async function probeBoth(name,installedDir,targetDir,nodeRange,targetLinks,resolveDependency){let real=realpathSafe2(installedDir),dependenciesFrom=nodeModulesOf(real),options=nodeRange===void 0?{dependenciesFrom}:{dependenciesFrom,nodeRange},before=await probeRuntime(real,options),after=await probeRuntime(targetDir,{...options,extraLinks:targetLinks,resolveDependency,linkConsumer:!1}),diff=diffRuntime(before,after),report={package:name,node:after.node,nodeSource:after.nodeSource,changes:diff.changes};return diff.inconclusive?report.inconclusive=diff.inconclusive:after.nodeSource==="repository"&&(report.targetRequire=after.require),report}function realpathSafe2(dir){try{return realpathSync8(dir)}catch{return dir}}function nodeModulesOf(installedDir){let marker=`${sep3}node_modules${sep3}`,at=installedDir.lastIndexOf(marker);return at<0?join30(installedDir,".."):installedDir.slice(0,at+marker.length-1)}function loadRootOf(p){return p.installedSurface.symbols.find(s=>s.exportEquals)?.path??"default"}function mergeEarly(workspace,early){let first=early[0];return{...first,workspace,name:groupName(early.map(p=>p.name)),members:early.map(p=>({name:p.name,installed:p.installed,target:p.target})),...early.find(p=>p.skipReason)?.skipReason?{skipReason:early.find(p=>p.skipReason)?.skipReason}:{},notes:early.flatMap(p=>p.notes.map(n=>`${p.name}: ${n}`)),status:early.every(p=>p.status===first.status)?first.status:"safe"}}function installedPackageDirOf(adapter,repo,name,version){let locate=adapter.installedPackageDir,dir=locate?.(repo,name);return dir?{name,version,dir}:void 0}export{require_dist,parentOf,resetSharedState,satisfies,parseNpm,parsePnpm,parseYarn,workspacePackagesOf,createTypescriptAdapter,typescriptAdapter,defaultCacheDir,loadRegistryConfig,registryFor,authHeaders,parseVersion,compareVersions,majorsBehind,packumentUrl,createNpmFetcher,diffPackage,BY,genericPack,diagnostics,typeResolutionFailure,newDiagnostics,failedTestFiles,testWorkspaces,describeServices,markPreexisting,siteKey,changeRule,summaryCells,prBody,migrationBody,formatFix,editDiff,selectedFindings,planPackage,installedManifest,knownTool,BUILD_TOOLS,buildToolMajor,toolingReasons,UNUSED_REASON,pinClient,unpinnedClients,payloadApiVersions,stripeUsageContext,sdkApiVersion,stripePack,zodPack,isNativeProbeSkip,TIER_LEGEND,tierOf,verdictOf,progress,scanImports,importedByText,readManifest3,mapWithLimit,check,isFailure,summarize,workerHeapMb,checkWorkspaceJob};