@sreetej510/pi-shipd-checks 0.9.10 → 0.9.11
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.
- package/dist/index.js +23 -22
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ More information can be found at: https://a.co/c895JFp`))}}});var LMn,MMn,Kke,Wk
|
|
|
9
9
|
`+T}catch{!s.logger||s.logger?.constructor?.name==="NoOpLogger"?console.warn(T):s.logger?.warn?.(T)}typeof v.$responseBodyText<"u"&&v.$response&&(v.$response.body=v.$responseBodyText);try{if(js.isInstance(c)){let{headers:x={},statusCode:w}=c,L=Object.entries(x);v.$metadata={httpStatusCode:w,requestId:Fne(/^x-[\w-]+-request-?id$/,L),extendedRequestId:Fne(/^x-[\w-]+-id-2$/,L),cfId:Fne(/^x-[\w-]+-cf-id$/,L)}}}catch{}}throw v}},Fne=(e,t)=>(t.find(([s])=>s.match(e))||[void 0,void 0])[1]});var CLe,TLe=b(()=>{ts();qM();CLe=e=>(t,s)=>async a=>{let{operationSchema:c}=jn(s),[,l,u,p,d,m]=c??[],S=s.endpointV2?async()=>Oi(s.endpointV2):e.endpoint,v=await e.protocol.serializeRequest(EI(l,u,p,d,m),a.input,{...e,...s,endpoint:S});return t({...a,request:v})}});function $u(e){return{applyToStack:t=>{t.add(CLe(e),Une),t.add(hLe(e),Bne),e.protocol.setSerdeContext(e)}}}var Bne,Une,ALe=b(()=>{vLe();TLe();Bne={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Une={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0}});var zs,Xm=b(()=>{zs=class{name;namespace;traits;static assign(t,s){return Object.assign(t,s)}static[Symbol.hasInstance](t){let s=this.prototype.isPrototypeOf(t);return!s&&typeof t=="object"&&t!==null?t.symbol===this.symbol:s}getName(){return this.namespace+"#"+this.name}}});var wT,DLe,bLe=b(()=>{Xm();wT=class e extends zs{static symbol=Symbol.for("@smithy/lis");valueSchema;symbol=e.symbol},DLe=(e,t,s,a)=>zs.assign(new wT,{name:t,namespace:e,traits:s,valueSchema:a})});var kT,ELe,xLe=b(()=>{Xm();kT=class e extends zs{static symbol=Symbol.for("@smithy/map");keySchema;valueSchema;symbol=e.symbol},ELe=(e,t,s,a,c)=>zs.assign(new kT,{name:t,namespace:e,traits:s,keySchema:a,valueSchema:c})});var LT,PLe,$Le=b(()=>{Xm();LT=class e extends zs{static symbol=Symbol.for("@smithy/ope");input;output;symbol=e.symbol},PLe=(e,t,s,a,c)=>zs.assign(new LT,{name:t,namespace:e,traits:s,input:a,output:c})});var lR,wLe,Hne=b(()=>{Xm();lR=class e extends zs{static symbol=Symbol.for("@smithy/str");memberNames;memberList;symbol=e.symbol},wLe=(e,t,s,a,c)=>zs.assign(new lR,{name:t,namespace:e,traits:s,memberNames:a,memberList:c})});var MT,kLe,LLe=b(()=>{Xm();Hne();MT=class e extends lR{static symbol=Symbol.for("@smithy/err");ctor;symbol=e.symbol},kLe=(e,t,s,a,c,l)=>zs.assign(new MT,{name:t,namespace:e,traits:s,memberNames:a,memberList:c,ctor:null})});function pl(e){if(typeof e=="object")return e;if(e=e|0,GT[e])return GT[e];let t={},s=0;for(let a of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(e>>s++&1)===1&&(t[a]=1);return GT[e]=t}var GT,jne=b(()=>{GT=[]});function NT(e,t){if(e instanceof be)return Object.assign(e,{memberName:t,_isMemberSchema:!0});let s=be;return new s(e,t)}var OT,VT,qT,be,zne,Kne,MLe=b(()=>{qne();jne();OT={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},VT=[],qT={},be=class e{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=e.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(t,s){this.ref=t,this.memberName=s;let a=[],c=t,l=t;for(this._isMemberSchema=!1;zne(c);)a.push(c[1]),c=c[0],l=Ic(c),this._isMemberSchema=!0;if(a.length>0){this.memberTraits={};for(let u=a.length-1;u>=0;--u){let p=a[u];Object.assign(this.memberTraits,pl(p))}}else this.memberTraits=0;if(l instanceof e){let u=this.memberTraits;Object.assign(this,l),this.memberTraits=Object.assign({},u,l.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=s??l.memberName;return}if(this.schema=Ic(l),Kne(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(l),this.traits=0),this._isMemberSchema&&!s)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](t){let s=this.prototype.isPrototypeOf(t);return!s&&typeof t=="object"&&t!==null?t.symbol===this.symbol:s}static of(t){let s=typeof t=="function"||typeof t=="object"&&t!==null;if(typeof t=="number"){if(VT[t])return VT[t]}else if(typeof t=="string"){if(qT[t])return qT[t]}else if(s&&t[OT.ns])return t[OT.ns];let a=Ic(t);if(a instanceof e)return a;if(zne(a)){let[l,u]=a;if(l instanceof e)return Object.assign(l.getMergedTraits(),pl(u)),l;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}let c=new e(a);return s?t[OT.ns]=c:typeof a=="string"?qT[a]=c:typeof a=="number"?VT[a]=c:c}getSchema(){let t=this.schema;return Array.isArray(t)&&t[0]===0?t[4]:t}getName(t=!1){let{name:s}=this;return!t&&s&&s.includes("#")?s.split("#")[1]:s||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){let t=this.getSchema();return typeof t=="number"?t>=64&&t<128:t[0]===1}isMapSchema(){let t=this.getSchema();return typeof t=="number"?t>=128&&t<=255:t[0]===2}isStructSchema(){let t=this.getSchema();if(typeof t!="object")return!1;let s=t[0];return s===3||s===-3||s===4}isUnionSchema(){let t=this.getSchema();return typeof t!="object"?!1:t[0]===4}isBlobSchema(){let t=this.getSchema();return t===21||t===42}isTimestampSchema(){let t=this.getSchema();return typeof t=="number"&&t>=4&&t<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){let{streaming:t}=this.getMergedTraits();return!!t||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return pl(this.memberTraits)}getOwnTraits(){return pl(this.traits)}getKeySchema(){let[t,s]=[this.isDocumentSchema(),this.isMapSchema()];if(!t&&!s)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);let a=this.getSchema(),c=t?15:a[4]??0;return NT([c,0],"key")}getValueSchema(){let t=this.getSchema(),[s,a,c]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],l=typeof t=="number"?63&t:t&&typeof t=="object"&&(a||c)?t[3+t[0]]:s?15:void 0;if(l!=null)return NT([l,0],a?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(t){let s=this.getSchema();if(this.isStructSchema()&&s[4].includes(t)){let a=s[4].indexOf(t),c=s[5][a];return NT(zne(c)?c:[c,0],t)}if(this.isDocumentSchema())return NT([15,0],t);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${t}.`)}getMemberSchemas(){let t={};try{for(let[s,a]of this.structIterator())t[s]=a}catch{}return t}getEventStreamMember(){if(this.isStructSchema()){for(let[t,s]of this.structIterator())if(s.isStreaming()&&s.isStructSchema())return t}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");let t=this.getSchema(),s=t[4].length,a=t[OT.it];if(a&&s===a.length){yield*a;return}a=Array(s);for(let c=0;c<s;++c){let l=t[4][c],u=NT([t[5][c],0],l);yield a[c]=[l,u]}t[OT.it]=a}};zne=e=>Array.isArray(e)&&e.length===2,Kne=e=>Array.isArray(e)&&e.length>=5});var xI,GLe,OLe,NLe=b(()=>{Xm();xI=class e extends zs{static symbol=Symbol.for("@smithy/sim");schemaRef;symbol=e.symbol},GLe=(e,t,s,a)=>zs.assign(new xI,{name:t,namespace:e,traits:a,schemaRef:s}),OLe=(e,t,s,a)=>zs.assign(new xI,{name:t,namespace:e,traits:s,schemaRef:a})});var VLe,qLe=b(()=>{VLe={BLOB:21,STREAMING_BLOB:42,BOOLEAN:2,STRING:0,NUMERIC:1,BIG_INTEGER:17,BIG_DECIMAL:19,DOCUMENT:15,TIMESTAMP_DEFAULT:4,TIMESTAMP_DATE_TIME:5,TIMESTAMP_HTTP_DATE:6,TIMESTAMP_EPOCH_SECONDS:7,LIST_MODIFIER:64,MAP_MODIFIER:128}});var cs,FLe=b(()=>{cs=class e{namespace;schemas;exceptions;static registries=new Map;constructor(t,s=new Map,a=new Map){this.namespace=t,this.schemas=s,this.exceptions=a}static for(t){return e.registries.has(t)||e.registries.set(t,new e(t)),e.registries.get(t)}copyFrom(t){let{schemas:s,exceptions:a}=this;for(let[c,l]of t.schemas)s.has(c)||s.set(c,l);for(let[c,l]of t.exceptions)a.has(c)||a.set(c,l)}register(t,s){let a=this.normalizeShapeId(t);for(let c of[this,e.for(a.split("#")[0])])c.schemas.set(a,s)}getSchema(t){let s=this.normalizeShapeId(t);if(!this.schemas.has(s)){if(!t.includes("#")){let a="#"+t,c=[];for(let[l,u]of this.schemas.entries())l.endsWith(a)&&c.push(u);if(c.length===1)return c[0]}throw new Error(`@smithy/core/schema - schema not found for ${s}`)}return this.schemas.get(s)}registerError(t,s){let a=t,c=a[1];for(let l of[this,e.for(c)])l.schemas.set(c+"#"+a[2],a),l.exceptions.set(a,s)}getErrorCtor(t){let s=t;return this.exceptions.has(s)?this.exceptions.get(s):e.for(s[1]).exceptions.get(s)}getBaseException(){for(let t of this.exceptions.keys())if(Array.isArray(t)){let[,s,a]=t,c=s+"#"+a;if(c.startsWith("smithy.ts.sdk.synthetic.")&&c.endsWith("ServiceException"))return t}}find(t){for(let s of this.schemas.values())if(t(s))return s}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(t){return t.includes("#")?t:this.namespace+"#"+t}}});var FT={};Un(FT,{ErrorSchema:()=>MT,ListSchema:()=>wT,MapSchema:()=>kT,NormalizedSchema:()=>be,OperationSchema:()=>LT,SCHEMA:()=>VLe,Schema:()=>zs,SimpleSchema:()=>xI,StructureSchema:()=>lR,TypeRegistry:()=>cs,deref:()=>Ic,deserializerMiddlewareOption:()=>Bne,error:()=>kLe,getSchemaSerdePlugin:()=>$u,isStaticSchema:()=>Kne,list:()=>DLe,map:()=>ELe,op:()=>PLe,operation:()=>EI,serializerMiddlewareOption:()=>Une,sim:()=>GLe,simAdapter:()=>OLe,simpleSchemaCacheN:()=>VT,simpleSchemaCacheS:()=>qT,struct:()=>wLe,traitsCache:()=>GT,translateTraits:()=>pl});var Mt=b(()=>{qne();ALe();bLe();xLe();$Le();qM();LLe();MLe();Xm();NLe();Hne();qLe();jne();FLe()});function PI(e,t){if(t==null)return t;let s=be.of(e);if(s.getMergedTraits().sensitive)return Wne;if(s.isListSchema()){if(!!s.getValueSchema().getMergedTraits().sensitive)return Wne}else if(s.isMapSchema()){if(!!s.getKeySchema().getMergedTraits().sensitive||!!s.getValueSchema().getMergedTraits().sensitive)return Wne}else if(s.isStructSchema()&&typeof t=="object"){let a=t,c={};for(let[l,u]of s.structIterator())a[l]!=null&&(c[l]=PI(u,a[l]));return c}return t}var Wne,Qne=b(()=>{Mt();Wne="***SensitiveInformation***"});var BLe,Pa,Zne,Yne=b(()=>{BLe=Jn(Pu());OM();Qne();Pa=class{middlewareStack=Ym();schema;static classBuilder(){return new Zne}resolveMiddlewareWithContext(t,s,a,{middlewareFn:c,clientName:l,commandName:u,inputFilterSensitiveLog:p,outputFilterSensitiveLog:d,smithyContext:m,additionalContext:S,CommandCtor:v}){for(let O of c.bind(this)(v,t,s,a))this.middlewareStack.use(O);let T=t.concat(this.middlewareStack),{logger:x}=s,w={logger:x,clientName:l,commandName:u,inputFilterSensitiveLog:p,outputFilterSensitiveLog:d,[BLe.SMITHY_CONTEXT_KEY]:{commandInstance:this,...m},...S},{requestHandler:L}=s,G=a??{};return m.eventStream&&(G={isEventStream:!0,...G}),T.resolve(O=>L.handle(O.request,G),w)}},Zne=class{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,s,a={}){return this._smithyContext={service:t,operation:s,...a},this}c(t={}){return this._additionalContext=t,this}n(t,s){return this._clientName=t,this._commandName=s,this}f(t=a=>a,s=a=>a){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=s,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}sc(t){return this._operationSchema=t,this._smithyContext.operationSchema=t,this}build(){let t=this,s;return s=class extends Pa{input;static getEndpointParameterInstructions(){return t._ep}constructor(...[a]){super(),this.input=a??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(a,c,l){let u=t._operationSchema,p=u?.[4]??u?.input,d=u?.[5]??u?.output;return this.resolveMiddlewareWithContext(a,c,l,{CommandCtor:s,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(u?PI.bind(null,p):m=>m),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(u?PI.bind(null,d):m=>m),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}});var ULe,HLe=b(()=>{ULe="***SensitiveInformation***"});var wu,jLe=b(()=>{wu=(e,t,s)=>{for(let[l,u]of Object.entries(e)){let p=async function(m,S,v){let T=new u(m);if(typeof S=="function")this.send(T,S);else if(typeof v=="function"){if(typeof S!="object")throw new Error(`Expected http options but got ${typeof S}`);this.send(T,S||{},v)}else return this.send(T,S)},d=(l[0].toLowerCase()+l.slice(1)).replace(/Command$/,"");t.prototype[d]=p}let{paginators:a={},waiters:c={}}=s??{};for(let[l,u]of Object.entries(a))t.prototype[l]===void 0&&(t.prototype[l]=function(p={},d,...m){return u({...d,client:this},p,...m)});for(let[l,u]of Object.entries(c))t.prototype[l]===void 0&&(t.prototype[l]=async function(p={},d,...m){let S=d;return typeof d=="number"&&(S={maxWaitTime:d}),u({...S,client:this},p,...m)})}});var _c,uR,Xne=b(()=>{_c=class e extends Error{$fault;$response;$retryable;$metadata;constructor(t){super(t.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}static isInstance(t){if(!t)return!1;let s=t;return e.prototype.isPrototypeOf(s)||!!s.$fault&&!!s.$metadata&&(s.$fault==="client"||s.$fault==="server")}static[Symbol.hasInstance](t){if(!t)return!1;let s=t;return this===e?e.isInstance(t):e.isInstance(t)?s.name&&this.name?this.prototype.isPrototypeOf(t)||s.name===this.name:this.prototype.isPrototypeOf(t):!1}},uR=(e,t={})=>{Object.entries(t).filter(([,a])=>a!==void 0).forEach(([a,c])=>{(e[a]==null||e[a]==="")&&(e[a]=c)});let s=e.message||e.Message||"UnknownError";return e.message=s,delete e.Message,e}});var Jne,zLe,WMn,KLe=b(()=>{Xne();Jne=({output:e,parsedBody:t,exceptionCtor:s,errorCode:a})=>{let c=WMn(e),l=c.httpStatusCode?c.httpStatusCode+"":void 0,u=new s({name:t?.code||t?.Code||a||l||"UnknownError",$fault:"client",$metadata:c});throw uR(u,t)},zLe=e=>({output:t,parsedBody:s,errorCode:a})=>{Jne({output:t,parsedBody:s,exceptionCtor:e,errorCode:a})},WMn=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]})});var ku,WLe=b(()=>{ku=e=>{switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}}});var QLe,Lu,ZLe=b(()=>{QLe=!1,Lu=e=>{e&&!QLe&&parseInt(e.substring(1,e.indexOf(".")))<16&&(QLe=!0)}});var $I,YLe,FM,BM,ese=b(()=>{$I=Jn(Pu()),YLe=Object.values($I.AlgorithmId),FM=e=>{let t=[];for(let s in $I.AlgorithmId){let a=$I.AlgorithmId[s];e[a]!==void 0&&t.push({algorithmId:()=>a,checksumConstructor:()=>e[a]})}for(let[s,a]of Object.entries(e.checksumAlgorithms??{}))t.push({algorithmId:()=>s,checksumConstructor:()=>a});return{addChecksumAlgorithm(s){e.checksumAlgorithms=e.checksumAlgorithms??{};let a=s.algorithmId(),c=s.checksumConstructor();YLe.includes(a)?e.checksumAlgorithms[a.toUpperCase()]=c:e.checksumAlgorithms[a]=c,t.push(s)},checksumAlgorithms(){return t}}},BM=e=>{let t={};return e.checksumAlgorithms().forEach(s=>{let a=s.algorithmId();YLe.includes(a)&&(t[a]=s.checksumConstructor())}),t}});var UM,HM,tse=b(()=>{UM=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),HM=e=>{let t={};return t.retryStrategy=e.retryStrategy(),t}});var dl,XLe,Mu,JLe=b(()=>{ese();tse();dl=e=>Object.assign(FM(e),UM(e)),XLe=dl,Mu=e=>Object.assign(BM(e),HM(e))});var eMe,tMe=b(()=>{eMe=e=>Array.isArray(e)?e:[e]});var pR,nMe=b(()=>{pR=e=>{let t="#text";for(let s in e)Object.prototype.hasOwnProperty.call(e,s)&&e[s][t]!==void 0?e[s]=e[s][t]:typeof e[s]=="object"&&e[s]!==null&&(e[s]=pR(e[s]));return e}});var sMe,rMe=b(()=>{sMe=e=>e!=null});var ra,oMe=b(()=>{ra=class{trace(){}debug(){}info(){}warn(){}error(){}}});function nse(e,t,s){let a,c,l;if(typeof t>"u"&&typeof s>"u")a={},l=e;else{if(a=e,typeof t=="function")return c=t,l=s,QMn(a,c,l);l=t}for(let u of Object.keys(l)){if(!Array.isArray(l[u])){a[u]=l[u];continue}cMe(a,null,l,u)}return a}var aMe,iMe,QMn,cMe,ZMn,YMn,lMe=b(()=>{aMe=e=>{let t={};for(let[s,a]of Object.entries(e||{}))t[s]=[,a];return t},iMe=(e,t)=>{let s={};for(let a in t)cMe(s,e,t,a);return s},QMn=(e,t,s)=>nse(e,Object.entries(s).reduce((a,[c,l])=>(Array.isArray(l)?a[c]=l:typeof l=="function"?a[c]=[t,l()]:a[c]=[t,l],a),{})),cMe=(e,t,s,a)=>{if(t!==null){let u=s[a];typeof u=="function"&&(u=[,u]);let[p=ZMn,d=YMn,m=a]=u;(typeof p=="function"&&p(t[m])||typeof p!="function"&&p)&&(e[a]=d(t[m]));return}let[c,l]=s[a];if(typeof l=="function"){let u,p=c===void 0&&(u=l())!=null,d=typeof c=="function"&&!!c(void 0)||typeof c!="function"&&!!c;p?e[a]=u:d&&(e[a]=l())}else{let u=c===void 0&&l!=null,p=typeof c=="function"&&!!c(l)||typeof c!="function"&&!!c;(u||p)&&(e[a]=l)}},ZMn=e=>e!=null,YMn=e=>e});var uMe,pMe,dMe=b(()=>{uMe=e=>{if(e!==e)return"NaN";switch(e){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return e}},pMe=e=>e.toISOString().replace(".000Z","Z")});var jM,mMe=b(()=>{jM=e=>{if(e==null)return{};if(Array.isArray(e))return e.filter(t=>t!=null).map(jM);if(typeof e=="object"){let t={};for(let s of Object.keys(e))e[s]!=null&&(t[s]=jM(e[s]));return t}return e}});function Gu(e,t,s,a){return function(l,u,p,d,m={}){let S=Object.assign({},e,l);return Pa.classBuilder().ep(S).m(function(v,T,x,w){let L=u.call(this,v,T,x,w);return L.unshift(a(x,v.getEndpointParameterInstructions())),L}).s(t,p,m).n(s,p.charAt(0).toUpperCase()+p.slice(1)+"Command").sc(d).build()}}var fMe=b(()=>{Yne()});var Ou={};Un(Ou,{AlgorithmId:()=>$I.AlgorithmId,Client:()=>sa,Command:()=>Pa,NoOpLogger:()=>ra,SENSITIVE_STRING:()=>ULe,ServiceException:()=>_c,WaiterState:()=>Ni,_json:()=>jM,checkExceptions:()=>dLe,constructStack:()=>Ym,convertMap:()=>aMe,createAggregatedClient:()=>wu,createWaiter:()=>yLe,decorateServiceException:()=>uR,emitWarningIfUnsupportedVersion:()=>Lu,getArrayIfSingleItem:()=>eMe,getChecksumConfiguration:()=>FM,getDefaultClientConfiguration:()=>XLe,getDefaultExtensionConfiguration:()=>dl,getRetryConfiguration:()=>UM,getSmithyContext:()=>jn,getValueFromTextNode:()=>pR,invalidFunction:()=>aLe,invalidProvider:()=>cLe,isSerializableHeaderValue:()=>sMe,loadConfigsForDefaultMode:()=>ku,makeBuilder:()=>Gu,map:()=>nse,normalizeProvider:()=>_n,resolveChecksumRuntimeConfig:()=>BM,resolveDefaultRuntimeConfig:()=>Mu,resolveRetryRuntimeConfig:()=>HM,schemaLogFilter:()=>PI,serializeDateTime:()=>pMe,serializeFloat:()=>uMe,take:()=>iMe,throwDefaultError:()=>Jne,waiterServiceDefaults:()=>NM,withBaseException:()=>zLe});var nt=b(()=>{OM();ts();ts();iLe();lLe();ILe();VM();_Le();Yne();HLe();jLe();KLe();WLe();ZLe();Xne();JLe();ese();tse();tMe();nMe();rMe();oMe();lMe();Qne();dMe();mMe();fMe()});var wI,sse=b(()=>{wI=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]"});var ml,Jm,ef=b(()=>{sse();ml=(e,t=0,s=e.byteLength-t)=>{if(!wI(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return Buffer.from(e,t,s)},Jm=(e,t)=>{if(typeof e!="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?Buffer.from(e,t):Buffer.from(e)}});var XMn,Ks,gMe=b(()=>{ef();XMn=/^[A-Za-z0-9+/]*={0,2}$/,Ks=e=>{if(e.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!XMn.exec(e))throw new TypeError("Invalid base64 string.");let t=Jm(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}});var Tr,zM=b(()=>{ef();Tr=e=>{let t=Jm(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)}});var ls,rse=b(()=>{ef();zM();ls=e=>{let t;if(typeof e=="string"?t=Tr(e):t=e,typeof t!="object"||typeof t.byteOffset!="number"||typeof t.byteLength!="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return ml(t.buffer,t.byteOffset,t.byteLength).toString("base64")}});function RMe(e,t,s,a){return class KM extends Uint8Array{static fromString(l,u="utf-8"){if(typeof l=="string")return u==="base64"?KM.mutate(a(l)):KM.mutate(t(l));throw new Error(`Unsupported conversion from ${typeof l} to Uint8ArrayBlobAdapter.`)}static mutate(l){return Object.setPrototypeOf(l,KM.prototype),l}transformToString(l="utf-8"){return l==="base64"?s(this):e(this)}}}var SMe=b(()=>{});var ks,yMe=b(()=>{ef();ks=e=>{if(typeof e=="string")return e;if(typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return ml(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}});function IMe(e){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?()=>crypto.randomUUID():()=>{let t=new Uint8Array(16);return e(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128,oa[t[0]]+oa[t[1]]+oa[t[2]]+oa[t[3]]+"-"+oa[t[4]]+oa[t[5]]+"-"+oa[t[6]]+oa[t[7]]+"-"+oa[t[8]]+oa[t[9]]+"-"+oa[t[10]]+oa[t[11]]+oa[t[12]]+oa[t[13]]+oa[t[14]]+oa[t[15]]}}var oa,_Me=b(()=>{oa=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"))});var hMe,vMe=b(()=>{hMe=(e,t,s=a=>a)=>e});var CMe,TMe,kI,JMn,BT,LI,AMe,WM,QM,ZM,ose,eGn,DMe,ase,bMe,XM,UT,EMe,JM,tGn,GI,eG,xMe,PMe,$Me,wMe,ise,kMe,LMe,tf,tG,YM,MI,cse=b(()=>{CMe=e=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}},TMe=e=>{if(e!=null){if(typeof e=="number"){if((e===0||e===1)&&MI.warn(YM(`Expected boolean, got ${typeof e}: ${e}`)),e===0)return!1;if(e===1)return!0}if(typeof e=="string"){let t=e.toLowerCase();if((t==="false"||t==="true")&&MI.warn(YM(`Expected boolean, got ${typeof e}: ${e}`)),t==="false")return!1;if(t==="true")return!0}if(typeof e=="boolean")return e;throw new TypeError(`Expected boolean, got ${typeof e}: ${e}`)}},kI=e=>{if(e!=null){if(typeof e=="string"){let t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&MI.warn(YM(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},JMn=Math.ceil(34028234663852886e22),BT=e=>{let t=kI(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>JMn)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},LI=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},AMe=LI,WM=e=>ose(e,32),QM=e=>ose(e,16),ZM=e=>ose(e,8),ose=(e,t)=>{let s=LI(e);if(s!==void 0&&eGn(s,t)!==s)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return s},eGn=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},DMe=(e,t)=>{if(e==null)throw t?new TypeError(`Expected a non-null value for ${t}`):new TypeError("Expected a non-null value");return e},ase=e=>{if(e==null)return;if(typeof e=="object"&&!Array.isArray(e))return e;let t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)},bMe=e=>{if(e!=null){if(typeof e=="string")return e;if(["boolean","number","bigint"].includes(typeof e))return MI.warn(YM(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},XM=e=>{if(e==null)return;let t=ase(e),s=[];for(let a in t)t[a]!=null&&s.push(a);if(s.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(s.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${s} were not null.`);return t},UT=e=>kI(typeof e=="string"?GI(e):e),EMe=UT,JM=e=>BT(typeof e=="string"?GI(e):e),tGn=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,GI=e=>{let t=e.match(tGn);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},eG=e=>typeof e=="string"?wMe(e):kI(e),xMe=eG,PMe=eG,$Me=e=>typeof e=="string"?wMe(e):BT(e),wMe=e=>{switch(e){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${e}`)}},ise=e=>LI(typeof e=="string"?GI(e):e),kMe=ise,LMe=e=>WM(typeof e=="string"?GI(e):e),tf=e=>QM(typeof e=="string"?GI(e):e),tG=e=>ZM(typeof e=="string"?GI(e):e),YM=e=>String(new TypeError(e).stack||e).split(`
|
|
10
10
|
`).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(`
|
|
11
11
|
`),MI={warn:console.warn}});function Vi(e){let t=e.getUTCFullYear(),s=e.getUTCMonth(),a=e.getUTCDay(),c=e.getUTCDate(),l=e.getUTCHours(),u=e.getUTCMinutes(),p=e.getUTCSeconds(),d=c<10?`0${c}`:`${c}`,m=l<10?`0${l}`:`${l}`,S=u<10?`0${u}`:`${u}`,v=p<10?`0${p}`:`${p}`;return`${nGn[a]}, ${d} ${use[s]} ${t} ${m}:${S}:${v} GMT`}var nGn,use,sGn,MMe,rGn,NI,oGn,aGn,iGn,Vu,VI,HT,cGn,lGn,uGn,lse,pGn,dGn,mGn,Nu,fGn,gGn,OI,GMe=b(()=>{cse();nGn=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],use=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];sGn=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),MMe=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=sGn.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[s,a,c,l,u,p,d,m]=t,S=tf(OI(a)),v=Nu(c,"month",1,12),T=Nu(l,"day",1,31);return HT(S,v,T,{hours:u,minutes:p,seconds:d,fractionalMilliseconds:m})},rGn=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}:\d{2})|[zZ])$/),NI=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=rGn.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[s,a,c,l,u,p,d,m,S]=t,v=tf(OI(a)),T=Nu(c,"month",1,12),x=Nu(l,"day",1,31),w=HT(v,T,x,{hours:u,minutes:p,seconds:d,fractionalMilliseconds:m});return S.toUpperCase()!="Z"&&w.setTime(w.getTime()-gGn(S)),w},oGn=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),aGn=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),iGn=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),Vu=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=oGn.exec(e);if(t){let[s,a,c,l,u,p,d,m]=t;return HT(tf(OI(l)),lse(c),Nu(a,"day",1,31),{hours:u,minutes:p,seconds:d,fractionalMilliseconds:m})}if(t=aGn.exec(e),t){let[s,a,c,l,u,p,d,m]=t;return uGn(HT(cGn(l),lse(c),Nu(a,"day",1,31),{hours:u,minutes:p,seconds:d,fractionalMilliseconds:m}))}if(t=iGn.exec(e),t){let[s,a,c,l,u,p,d,m]=t;return HT(tf(OI(m)),lse(a),Nu(c.trimLeft(),"day",1,31),{hours:l,minutes:u,seconds:p,fractionalMilliseconds:d})}throw new TypeError("Invalid RFC-7231 date-time value")},VI=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=UT(e);else if(typeof e=="object"&&e.tag===1)t=e.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(t*1e3))},HT=(e,t,s,a)=>{let c=t-1;return dGn(e,c,s),new Date(Date.UTC(e,c,s,Nu(a.hours,"hour",0,23),Nu(a.minutes,"minute",0,59),Nu(a.seconds,"seconds",0,60),fGn(a.fractionalMilliseconds)))},cGn=e=>{let t=new Date().getUTCFullYear(),s=Math.floor(t/100)*100+tf(OI(e));return s<t?s+100:s},lGn=50*365*24*60*60*1e3,uGn=e=>e.getTime()-new Date().getTime()>lGn?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,lse=e=>{let t=use.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},pGn=[31,28,31,30,31,30,31,31,30,31,30,31],dGn=(e,t,s)=>{let a=pGn[t];if(t===1&&mGn(e)&&(a=29),s>a)throw new TypeError(`Invalid day for ${use[t]} in ${e}: ${s}`)},mGn=e=>e%4===0&&(e%100!==0||e%400===0),Nu=(e,t,s,a)=>{let c=tG(OI(e));if(c<s||c>a)throw new TypeError(`${t} must be between ${s} and ${a}, inclusive`);return c},fGn=e=>e==null?0:JM("0."+e)*1e3,gGn=e=>{let t=e[0],s=1;if(t=="+")s=1;else if(t=="-")s=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);let a=Number(e.substring(1,3)),c=Number(e.substring(4,6));return s*(a*60+c)*60*1e3},OI=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)}});var fr,OMe=b(()=>{fr=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};fr.from=e=>e&&typeof e=="object"&&(e instanceof fr||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?fr(String(e)):fr(JSON.stringify(e));fr.fromObject=fr.from});function nG(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}var NMe=b(()=>{});function yd(e,t,s){let a=Number(e);if(a<t||a>s)throw new Error(`Value ${a} out of range [${t}, ${s}]`)}var pse,dse,mse,VMe,qMe,RGn,SGn,yGn,IGn,_Gn,nf,sG,rG,FMe=b(()=>{pse="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",dse="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",mse="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",VMe="(\\d?\\d)",qMe="(\\d{4})",RGn=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),SGn=new RegExp(`^${pse}, ${VMe} ${dse} ${qMe} ${mse} GMT$`),yGn=new RegExp(`^${pse}, ${VMe}-${dse}-(\\d\\d) ${mse} GMT$`),IGn=new RegExp(`^${pse} ${dse} ( [1-9]|\\d\\d) ${mse} ${qMe}$`),_Gn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],nf=e=>{if(e==null)return;let t=NaN;if(typeof e=="number")t=e;else if(typeof e=="string"){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else typeof e=="object"&&e.tag===1&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},sG=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");let t=RGn.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);let[,s,a,c,l,u,p,,d,m]=t;yd(a,1,12),yd(c,1,31),yd(l,0,23),yd(u,0,59),yd(p,0,60);let S=new Date(Date.UTC(Number(s),Number(a)-1,Number(c),Number(l),Number(u),Number(p),Number(d)?Math.round(parseFloat(`0.${d}`)*1e3):0));if(S.setUTCFullYear(Number(s)),m.toUpperCase()!="Z"){let[,v,T,x]=/([+-])(\d\d):(\d\d)/.exec(m)||[void 0,"+",0,0],w=v==="-"?1:-1;S.setTime(S.getTime()+w*(Number(T)*60*60*1e3+Number(x)*60*1e3))}return S},rG=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,s,a,c,l,u,p,d;if((d=SGn.exec(e))?[,t,s,a,c,l,u,p]=d:(d=yGn.exec(e))?([,t,s,a,c,l,u,p]=d,a=(Number(a)+1900).toString()):(d=IGn.exec(e))&&([,s,t,c,l,u,p,a]=d),a&&u){let m=Date.UTC(Number(a),_Gn.indexOf(s),Number(t),Number(c),Number(l),Number(u),p?Math.round(parseFloat(`0.${p}`)*1e3):0);yd(t,1,31),yd(c,0,23),yd(l,0,59),yd(u,0,60);let S=new Date(m);return S.setUTCFullYear(Number(a)),S}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)}});function oG(e,t,s){if(s<=0||!Number.isInteger(s))throw new Error("Invalid number of delimiters ("+s+") for splitEvery.");let a=e.split(t);if(s===1)return a;let c=[],l="";for(let u=0;u<a.length;u++)l===""?l=a[u]:l+=t+a[u],(u+1)%s===0&&(c.push(l),l="");return l!==""&&c.push(l),c}var BMe=b(()=>{});var qI,UMe=b(()=>{qI=e=>{let t=e.length,s=[],a=!1,c,l=0;for(let u=0;u<t;++u){let p=e[u];switch(p){case'"':c!=="\\"&&(a=!a);break;case",":a||(s.push(e.slice(l,u)),l=u+1);break;default:}c=p}return s.push(e.slice(l)),s.map(u=>{u=u.trim();let p=u.length;return p<2?u:(u[0]==='"'&&u[p-1]==='"'&&(u=u.slice(1,p-1)),u.replace(/\\"/g,'"'))})}});function aG(e){return new Ft(String(e),"bigDecimal")}var HMe,Ft,jMe=b(()=>{HMe=/^-?((0|[1-9]\d*)(\.\d+)?|\.\d+)([eE][+-]?\d+)?$/,Ft=class e{string;type;constructor(t,s){if(this.string=t,this.type=s,!HMe.test(t))throw new Error(`@smithy/core/serde - NumericValue string must conform to the Smithy bigDecimal format. Received: "${t}"`)}toString(){return this.string}static[Symbol.hasInstance](t){if(!t||typeof t!="object")return!1;let s=t;return e.prototype.isPrototypeOf(t)||s.type==="bigDecimal"&&HMe.test(s.string)}}});function iG(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let t=new Uint8Array(e.length/2);for(let s=0;s<e.length;s+=2){let a=e.slice(s,s+2).toLowerCase();if(a in fse)t[s/2]=fse[a];else throw new Error(`Cannot decode unrecognized sequence ${a} as hexadecimal`)}return t}function hc(e){let t="";for(let s=0;s<e.byteLength;s++)t+=zMe[e[s]];return t}var zMe,fse,gse=b(()=>{zMe={},fse={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),zMe[e]=t,fse[t]=e}});import{ReadStream as hGn,fstatSync as vGn,lstatSync as CGn}from"node:fs";var qu,KMe=b(()=>{qu=e=>{if(!e)return 0;if(typeof e=="string")return Buffer.byteLength(e);if(typeof e.byteLength=="number")return e.byteLength;if(typeof e.size=="number")return e.size;if(typeof e.start=="number"&&typeof e.end=="number")return e.end+1-e.start;if(e instanceof hGn){if(e.path!=null)return CGn(e.path).size;if(typeof e.fd=="number")return vGn(e.fd).size}throw new Error(`Body Length computation failed for ${e}`)}});var tr,Rse=b(()=>{zM();tr=e=>e instanceof Uint8Array?e:typeof e=="string"?Tr(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)});function vc(e,t){if(t===void 0){t=0;for(let c of e)t+=c.byteLength}let s=new Uint8Array(t),a=0;for(let c of e)s.set(c,a),a+=c.byteLength;return s}var jT=b(()=>{});var cG,Sse,yse=b(()=>{ts();cG=(e,t)=>(s,a)=>async c=>{let{response:l}=await s(c);try{let u=await t(l,e);return{response:l,output:u}}catch(u){if(Object.defineProperty(u,"$response",{value:l,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in u)){let p="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{u.message+=`
|
|
12
|
-
`+p}catch{!a.logger||a.logger?.constructor?.name==="NoOpLogger"?console.warn(p):a.logger?.warn?.(p)}typeof u.$responseBodyText<"u"&&u.$response&&(u.$response.body=u.$responseBodyText);try{if(js.isInstance(l)){let{headers:d={}}=l,m=Object.entries(d);u.$metadata={httpStatusCode:l.statusCode,requestId:Sse(/^x-[\w-]+-request-?id$/,m),extendedRequestId:Sse(/^x-[\w-]+-id-2$/,m),cfId:Sse(/^x-[\w-]+-cf-id$/,m)}}}catch{}}throw u}},Sse=(e,t)=>(t.find(([s])=>s.match(e))||[void 0,void 0])[1]});var qi,zT=b(()=>{qi=class e extends Error{name="ProviderError";tryNextLink;constructor(t,s=!0){let a,c=!0;typeof s=="boolean"?(a=void 0,c=s):s!=null&&typeof s=="object"&&(a=s.logger,c=s.tryNextLink??!0),super(t),this.tryNextLink=c,Object.setPrototypeOf(this,e.prototype),a?.debug?.(`@smithy/property-provider ${c?"->":"(!)"} ${t}`)}static from(t,s=!0){return Object.assign(new this(t.message,s),t)}}});var sf,lG=b(()=>{zT();sf=class e extends qi{name="CredentialsProviderError";constructor(t,s=!0){super(t,s),Object.setPrototypeOf(this,e.prototype)}}});var uG,WMe=b(()=>{zT();uG=class e extends qi{name="TokenProviderError";constructor(t,s=!0){super(t,s),Object.setPrototypeOf(this,e.prototype)}}});var pG,Ise=b(()=>{zT();pG=(...e)=>async()=>{if(e.length===0)throw new qi("No providers in chain");let t;for(let s of e)try{return await s()}catch(a){if(t=a,a?.tryNextLink)continue;throw a}throw t}});var dG,_se=b(()=>{dG=e=>()=>Promise.resolve(e)});var FI,mG=b(()=>{FI=(e,t,s)=>{let a,c,l,u=!1,p=async()=>{c||(c=e());try{a=await c,l=!0,u=!1}finally{c=void 0}return a};return t===void 0?async d=>((!l||d?.forceRefresh)&&(a=await p()),a):async d=>((!l||d?.forceRefresh)&&(a=await p()),u?a:s&&!s(a)?(u=!0,a):(t(a)&&await p(),a))}});var ns,fG=b(()=>{ns=(e,t,s)=>{if(t in e){if(e[t]==="true")return!0;if(e[t]==="false")return!1;throw new Error(`Cannot load ${s} "${t}". Expected "true" or "false", got ${e[t]}.`)}}});var QMe,ZMe=b(()=>{QMe=(e,t,s)=>{if(!(t in e))return;let a=parseInt(e[t],10);if(Number.isNaN(a))throw new TypeError(`Cannot load ${s} '${t}'. Expected number, got '${e[t]}'.`);return a}});var Gn,gG=b(()=>{(function(e){e.ENV="env",e.CONFIG="shared config entry"})(Gn||(Gn={}))});import{homedir as TGn}from"node:os";import{sep as AGn}from"node:path";var hse,DGn,Fu,BI=b(()=>{hse={},DGn=()=>process&&process.geteuid?`${process.geteuid()}`:"DEFAULT",Fu=()=>{let{HOME:e,USERPROFILE:t,HOMEPATH:s,HOMEDRIVE:a=`C:${AGn}`}=process.env;if(e)return e;if(t)return t;if(s)return`${a}${s}`;let c=DGn();return hse[c]||(hse[c]=TGn()),hse[c]}});var vse,Cse,RG,Tse=b(()=>{vse="AWS_PROFILE",Cse="default",RG=e=>e.profile||process.env[vse]||Cse});import{createHash as bGn}from"node:crypto";import{join as EGn}from"node:path";var SG,Ase=b(()=>{BI();SG=e=>{let s=bGn("sha1").update(e).digest("hex");return EGn(Fu(),".aws","sso","cache",`${s}.json`)}});import{readFile as xGn}from"node:fs/promises";var KT,YMe,Dse=b(()=>{Ase();KT={},YMe=async e=>{if(KT[e])return KT[e];let t=SG(e),s=await xGn(t,"utf8");return JSON.parse(s)}});var Bu,XMe=b(()=>{Bu="."});var bse,JMe,eGe=b(()=>{bse=Jn(Pu()),JMe=e=>Object.entries(e).filter(([t])=>{let s=t.indexOf(".");return s===-1?!1:Object.values(bse.IniSectionType).includes(t.substring(0,s))}).reduce((t,[s,a])=>{let c=s.indexOf("."),l=s.substring(0,c)===bse.IniSectionType.PROFILE?s.substring(c+1):s;return t[l]=a,t},{...e.default&&{default:e.default}})});import{join as PGn}from"node:path";var $Gn,yG,Ese=b(()=>{BI();$Gn="AWS_CONFIG_FILE",yG=()=>process.env[$Gn]||PGn(Fu(),".aws","config")});import{join as wGn}from"node:path";var kGn,tGe,nGe=b(()=>{BI();kGn="AWS_SHARED_CREDENTIALS_FILE",tGe=()=>process.env[kGn]||wGn(Fu(),".aws","credentials")});var sGe,LGn,MGn,WT,xse=b(()=>{sGe=Jn(Pu()),LGn=/^([\w-]+)\s(["'])?([\w-@+.%:/]+)\2$/,MGn=["__proto__","profile __proto__"],WT=e=>{let t={},s,a;for(let c of e.split(/\r?\n/)){let l=c.split(/(^|\s)[;#]/)[0].trim();if(l[0]==="["&&l[l.length-1]==="]"){s=void 0,a=void 0;let p=l.substring(1,l.length-1),d=LGn.exec(p);if(d){let[,m,,S]=d;Object.values(sGe.IniSectionType).includes(m)&&(s=[m,S].join("."))}else s=p;if(MGn.includes(p))throw new Error(`Found invalid profile name "${p}"`)}else if(s){let p=l.indexOf("=");if(![0,-1].includes(p)){let[d,m]=[l.substring(0,p).trim(),l.substring(p+1).trim()];if(m==="")a=d;else{a&&c.trimStart()===c&&(a=void 0),t[s]=t[s]||{};let S=a?[a,d].join("."):d;t[s][S]=m}}}}return t}});import{readFile as GGn}from"node:fs/promises";var Pse,QT,dR,ZT=b(()=>{Pse={},QT={},dR=(e,t)=>QT[e]!==void 0?QT[e]:((!Pse[e]||t?.ignoreCache)&&(Pse[e]=GGn(e,"utf8")),Pse[e])});import{join as rGe}from"node:path";var oGe,UI,IG=b(()=>{eGe();Ese();nGe();BI();xse();ZT();oGe=()=>({}),UI=async(e={})=>{let{filepath:t=tGe(),configFilepath:s=yG()}=e,a=Fu(),c="~/",l=t;t.startsWith(c)&&(l=rGe(a,t.slice(2)));let u=s;s.startsWith(c)&&(u=rGe(a,s.slice(2)));let p=await Promise.all([dR(u,{ignoreCache:e.ignoreCache}).then(WT).then(JMe).catch(oGe),dR(l,{ignoreCache:e.ignoreCache}).then(WT).catch(oGe)]);return{configFile:p[0],credentialsFile:p[1]}}});var aGe,iGe,cGe=b(()=>{aGe=Jn(Pu()),iGe=e=>Object.entries(e).filter(([t])=>t.startsWith(aGe.IniSectionType.SSO_SESSION+".")).reduce((t,[s,a])=>({...t,[s.substring(s.indexOf(".")+1)]:a}),{})});var OGn,lGe,uGe=b(()=>{Ese();cGe();xse();ZT();OGn=()=>({}),lGe=async(e={})=>dR(e.configFilepath??yG()).then(WT).then(iGe).catch(OGn)});var pGe,dGe=b(()=>{pGe=(...e)=>{let t={};for(let s of e)for(let[a,c]of Object.entries(s))t[a]!==void 0?Object.assign(t[a],c):t[a]=c;return t}});var mGe,fGe=b(()=>{IG();dGe();mGe=async e=>{let t=await UI(e);return pGe(t.configFile,t.credentialsFile)}});var gGe,RGe=b(()=>{Dse();ZT();gGe={getFileRecord(){return QT},interceptFile(e,t){QT[e]=Promise.resolve(t)},getTokenRecord(){return KT},interceptToken(e,t){KT[e]=t}}});function _G(e){try{let t=new Set(Array.from(e.match(/([A-Z_]){3,}/g)??[]));return t.delete("CONFIG"),t.delete("CONFIG_PREFIX_SEPARATOR"),t.delete("ENV"),[...t].join(", ")}catch{return e}}var $se=b(()=>{});var SGe,yGe=b(()=>{lG();$se();SGe=(e,t)=>async()=>{try{let s=e(process.env,t);if(s===void 0)throw new Error;return s}catch(s){throw new sf(s.message||`Not found in ENV: ${_G(e.toString())}`,{logger:t?.logger})}}});var IGe,_Ge=b(()=>{lG();Tse();IG();$se();IGe=(e,{preferredFile:t="config",...s}={})=>async()=>{let a=RG(s),{configFile:c,credentialsFile:l}=await UI(s),u=l[a]||{},p=c[a]||{},d=t==="config"?{...u,...p}:{...p,...u};try{let S=e(d,t==="config"?c:l);if(S===void 0)throw new Error;return S}catch(m){throw new sf(m.message||`Not found in config files w/ profile [${a}]: ${_G(e.toString())}`,{logger:s.logger})}}});var NGn,hG,wse=b(()=>{_se();NGn=e=>typeof e=="function",hG=e=>NGn(e)?async()=>await e():dG(e)});var _t,kse=b(()=>{Ise();mG();yGe();_Ge();wse();_t=({environmentVariableSelector:e,configFileSelector:t,default:s},a={})=>{let{signingName:c,logger:l}=a;return FI(pG(SGe(e,{signingName:c,logger:l}),IGe(t,a),hG(s)))}});var vG,CG,hGe,Uu,vGe,CGe=b(()=>{fG();gG();vG="AWS_USE_DUALSTACK_ENDPOINT",CG="use_dualstack_endpoint",hGe=!1,Uu={environmentVariableSelector:e=>ns(e,vG,Gn.ENV),configFileSelector:e=>ns(e,CG,Gn.CONFIG),default:!1},vGe={environmentVariableSelector:e=>ns(e,vG,Gn.ENV),configFileSelector:e=>ns(e,CG,Gn.CONFIG),default:void 0}});var TG,AG,TGe,Hu,AGe,DGe=b(()=>{fG();gG();TG="AWS_USE_FIPS_ENDPOINT",AG="use_fips_endpoint",TGe=!1,Hu={environmentVariableSelector:e=>ns(e,TG,Gn.ENV),configFileSelector:e=>ns(e,AG,Gn.CONFIG),default:!1},AGe={environmentVariableSelector:e=>ns(e,TG,Gn.ENV),configFileSelector:e=>ns(e,AG,Gn.CONFIG),default:void 0}});var bGe,EGe=b(()=>{nt();bGe=e=>{let{tls:t,endpoint:s,urlParser:a,useDualstackEndpoint:c}=e;return Object.assign(e,{tls:t??!0,endpoint:_n(typeof s=="string"?a(s):s),isCustomEndpoint:!0,useDualstackEndpoint:_n(c??!1)})}});var xGe,PGe=b(()=>{xGe=async e=>{let{tls:t=!0}=e,s=await e.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(s))throw new Error("Invalid region in client config");let c=await e.useDualstackEndpoint(),l=await e.useFipsEndpoint(),{hostname:u}=await e.regionInfoProvider(s,{useDualstackEndpoint:c,useFipsEndpoint:l})??{};if(!u)throw new Error("Cannot resolve hostname from client config");return e.urlParser(`${t?"https:":"http:"}//${u}`)}});var $Ge,wGe=b(()=>{nt();PGe();$Ge=e=>{let t=_n(e.useDualstackEndpoint??!1),{endpoint:s,useFipsEndpoint:a,urlParser:c,tls:l}=e;return Object.assign(e,{tls:l??!0,endpoint:s?_n(typeof s=="string"?c(s):s):()=>xGe({...e,useDualstackEndpoint:t,useFipsEndpoint:a}),isCustomEndpoint:!!s,useDualstackEndpoint:t})}});var kGe,Lse,Mse,LGe,MGe,GGe,OGe,NGe,VGe,Gse=b(()=>{kGe="AWS_EXECUTION_ENV",Lse="AWS_REGION",Mse="AWS_DEFAULT_REGION",LGe="AWS_EC2_METADATA_DISABLED",MGe=["in-region","cross-region","mobile","standard","legacy"],GGe="/latest/meta-data/placement/region",OGe="/latest/api/token",NGe="x-aws-ec2-metadata-token",VGe="x-aws-ec2-metadata-token-ttl-seconds"});var qGe,VGn,UGe,DG,FGe,qGn,BGe,Ose=b(()=>{Gse();qGe=1e3,VGn=6e4,UGe=0,DG=async()=>{if(!process.env[LGe]&&!(Date.now()<UGe))try{let e=qGn(),t=(await BGe({...e,path:OGe,method:"PUT",headers:{[VGe]:"21600"}})).toString();return(await BGe({...e,path:GGe,method:"GET",headers:{[NGe]:t}})).toString().trim()||FGe()}catch{return FGe()}},FGe=()=>{UGe=Date.now()+VGn},qGn=()=>{let e=process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT;if(e){let t=new URL(e);return{hostname:t.hostname.replace(/^\[(.+)]$/,"$1"),port:t.port?Number(t.port):void 0}}return process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE==="IPv6"?{hostname:"fd00:ec2::254"}:{hostname:"169.254.169.254"}},BGe=async e=>{let{request:t}=await import("node:http");return new Promise((s,a)=>{let c=t({hostname:e.hostname,port:e.port,path:e.path,method:e.method,headers:e.headers,timeout:qGe,signal:AbortSignal.timeout(qGe)});c.on("error",l=>{a(l),c.destroy()}),c.on("timeout",()=>{a(new Error("TimeoutError from instance metadata service")),c.destroy()}),c.on("response",l=>{let{statusCode:u=400}=l;if(u<200||u>=300){a(Object.assign(new Error("Error response received from instance metadata service"),{statusCode:u})),c.destroy();return}let p=[];l.on("data",d=>p.push(d)),l.on("end",()=>{s(Buffer.concat(p)),c.destroy()})}),c.end()})}});var HI,jI,To,$a,Nse=b(()=>{Ose();HI="AWS_REGION",jI="region",To={environmentVariableSelector:e=>e[HI],configFileSelector:e=>e[jI],default:async()=>{let e=await DG();if(e)return e;throw new Error("Region is missing")}},$a={preferredFile:"credentials"}});var HGe,jGe,zGe=b(()=>{ts();HGe=new Set,jGe=(e,t=ul)=>{if(!HGe.has(e)&&!t(e))if(e==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else HGe.add(e)}});var bG,Vse=b(()=>{bG=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips"))});var KGe,WGe=b(()=>{Vse();KGe=e=>bG(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e});var Fi,QGe=b(()=>{zGe();WGe();Vse();Fi=e=>{let{region:t,useFipsEndpoint:s}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{let a=typeof t=="function"?await t():t,c=KGe(a);return jGe(c),c},useFipsEndpoint:async()=>{let a=typeof t=="string"?t:await t();return bG(a)?!0:typeof s!="function"?Promise.resolve(!!s):s()}})}});var qse,ZGe=b(()=>{qse=(e=[],{useFipsEndpoint:t,useDualstackEndpoint:s})=>e.find(({tags:a})=>t===a.includes("fips")&&s===a.includes("dualstack"))?.hostname});var YGe,XGe=b(()=>{YGe=(e,{regionHostname:t,partitionHostname:s})=>t||(s?s.replace("{region}",e):void 0)});var JGe,eOe=b(()=>{JGe=(e,{partitionHash:t})=>Object.keys(t||{}).find(s=>t[s].regions.includes(e))??"aws"});var tOe,nOe=b(()=>{tOe=(e,{signingRegion:t,regionRegex:s,useFipsEndpoint:a})=>{if(t)return t;if(a){let c=s.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),l=e.match(c);if(l)return l[0].slice(1,-1)}}});var sOe,rOe=b(()=>{ZGe();XGe();eOe();nOe();sOe=(e,{useFipsEndpoint:t=!1,useDualstackEndpoint:s=!1,signingService:a,regionHash:c,partitionHash:l})=>{let u=JGe(e,{partitionHash:l}),p=e in c?e:l[u]?.endpoint??e,d={useFipsEndpoint:t,useDualstackEndpoint:s},m=qse(c[p]?.variants,d),S=qse(l[u]?.variants,d),v=YGe(p,{regionHostname:m,partitionHostname:S});if(v===void 0)throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:p,useFipsEndpoint:t,useDualstackEndpoint:s}}`);let T=tOe(v,{signingRegion:c[p]?.signingRegion,regionRegex:l[u].regionRegex,useFipsEndpoint:t});return{partition:u,signingService:a,hostname:v,...T&&{signingRegion:T},...c[p]?.signingService&&{signingService:c[p].signingService}}}});var FGn,BGn,oOe,aOe=b(()=>{FGn="AWS_DEFAULTS_MODE",BGn="defaults_mode",oOe={environmentVariableSelector:e=>e[FGn],configFileSelector:e=>e[BGn],default:"legacy"}});var ju,UGn,HGn,iOe=b(()=>{Nse();Ose();kse();mG();Gse();aOe();ju=({region:e=_t(To),defaultsMode:t=_t(oOe)}={})=>FI(async()=>{let s=typeof t=="function"?await t():t;switch(s?.toLowerCase()){case"auto":return UGn(e);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(s?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${MGe.join(", ")}, got ${s}`)}}),UGn=async e=>{if(e){let t=typeof e=="function"?await e():e,s=await HGn();return s?t===s?"in-region":"cross-region":"standard"}return"standard"},HGn=async()=>process.env[kGe]&&(process.env[Lse]||process.env[Mse])?process.env[Lse]??process.env[Mse]:DG()});var wa={};Un(wa,{CONFIG_PREFIX_SEPARATOR:()=>Bu,CONFIG_USE_DUALSTACK_ENDPOINT:()=>CG,CONFIG_USE_FIPS_ENDPOINT:()=>AG,CredentialsProviderError:()=>sf,DEFAULT_PROFILE:()=>Cse,DEFAULT_USE_DUALSTACK_ENDPOINT:()=>hGe,DEFAULT_USE_FIPS_ENDPOINT:()=>TGe,ENV_PROFILE:()=>vse,ENV_USE_DUALSTACK_ENDPOINT:()=>vG,ENV_USE_FIPS_ENDPOINT:()=>TG,NODE_REGION_CONFIG_FILE_OPTIONS:()=>$a,NODE_REGION_CONFIG_OPTIONS:()=>To,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:()=>Uu,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:()=>Hu,ProviderError:()=>qi,REGION_ENV_NAME:()=>HI,REGION_INI_NAME:()=>jI,SelectorType:()=>Gn,TokenProviderError:()=>uG,booleanSelector:()=>ns,chain:()=>pG,externalDataInterceptor:()=>gGe,fromStatic:()=>hG,fromValue:()=>dG,getHomeDir:()=>Fu,getProfileName:()=>RG,getRegionInfo:()=>sOe,getSSOTokenFilepath:()=>SG,getSSOTokenFromFile:()=>YMe,loadConfig:()=>_t,loadSharedConfigFiles:()=>UI,loadSsoSessionData:()=>lGe,memoize:()=>FI,nodeDualstackConfigSelectors:()=>vGe,nodeFipsConfigSelectors:()=>AGe,numberSelector:()=>QMe,parseKnownFiles:()=>mGe,readFile:()=>dR,resolveCustomEndpointsConfig:()=>bGe,resolveDefaultsModeConfig:()=>ju,resolveEndpointsConfig:()=>$Ge,resolveRegionConfig:()=>Fi});var tn=b(()=>{zT();lG();WMe();Ise();_se();mG();fG();ZMe();gG();BI();Tse();Ase();Dse();XMe();IG();uGe();fGe();RGe();ZT();kse();wse();CGe();DGe();EGe();wGe();Nse();QGe();rOe();iOe()});var cOe,lOe,uOe,pOe=b(()=>{cOe="AWS_ENDPOINT_URL",lOe="endpoint_url",uOe=e=>({environmentVariableSelector:t=>{let s=e.split(" ").map(l=>l.toUpperCase()),a=t[[cOe,...s].join("_")];if(a)return a;let c=t[cOe];if(c)return c},configFileSelector:(t,s)=>{if(t.services){let c=["services",t.services].join(".");if(!s||!s[c])throw new Error(`The services section "${t.services}" specified in the profile is not present in the shared configuration file.`);let l=s[c],u=e.split(" ").map(d=>d.toLowerCase()),p=l[[u.join("_"),lOe].join(".")];if(p)return p}let a=t[lOe];if(a)return a},default:void 0})});var jGn,zGn,dOe,mOe=b(()=>{tn();jGn="AWS_IGNORE_CONFIGURED_ENDPOINT_URLS",zGn="ignore_configured_endpoint_urls",dOe={environmentVariableSelector:e=>ns(e,jGn,Gn.ENV),configFileSelector:e=>ns(e,zGn,Gn.CONFIG),default:!1}});var YT,fOe=b(()=>{tn();pOe();mOe();YT=async e=>{if(!await _t(dOe)())return _t(uOe(e??""))()}});var Fse,KGn,WGn,QGn,gOe,ROe,SOe=b(()=>{Fse=async e=>{let t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),ROe(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!gOe(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},KGn=/^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/,WGn=/(\d+\.){3}\d+/,QGn=/\.\./,gOe=e=>KGn.test(e)&&!WGn.test(e)&&!QGn.test(e),ROe=e=>{let[t,s,a,,,c]=e.split(":"),l=t==="arn"&&e.split(":").length>=6,u=!!(l&&s&&a&&c);if(l&&!u)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return u}});var yOe=b(()=>{SOe()});var IOe,_Oe=b(()=>{IOe=(e,t,s,a=!1)=>{let c=async()=>{let l;return a?l=s.clientContextParams?.[e]??s[e]??s[t]:l=s[e]??s[t],typeof l=="function"?l():l};return e==="credentialScope"||t==="CredentialScope"?async()=>{let l=typeof s.credentials=="function"?await s.credentials():s.credentials;return l?.credentialScope??l?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{let l=typeof s.credentials=="function"?await s.credentials():s.credentials;return l?.accountId??l?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(s.isCustomEndpoint===!1)return;let l=await c();if(l&&typeof l=="object"){if("url"in l)return l.url.href;if("hostname"in l){let{protocol:u,hostname:p,port:d,path:m}=l;return`${u}//${p}${d?":"+d:""}${m}`}}return l}:c}});var EG=b(()=>{ts()});function xG(e){return async(t,s,a,c)=>{if(!a.isCustomEndpoint&&!a.ignoreConfiguredEndpointUrls){let p;a.serviceConfiguredEndpoint?p=await a.serviceConfiguredEndpoint():p=await e(a.serviceId),p&&(a.endpoint=()=>Promise.resolve(Oi(p)),a.isCustomEndpoint=!0,c?.logger?.debug?.(`@smithy/core/endpoints - resolved endpoint from config: ${p}`))}let l=await XT(t,s,a);if(typeof a.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");let u=a.endpointProvider(l,c);if(a.isCustomEndpoint&&a.endpoint){let p=await a.endpoint();if(p?.headers){u.headers??={};for(let[d,m]of Object.entries(p.headers))u.headers[d]=Array.isArray(m)?m:[m]}}return u}}var XT,PG=b(()=>{yOe();_Oe();EG();XT=async(e,t,s)=>{let a={},c=t?.getEndpointParameterInstructions?.()||{};for(let[l,u]of Object.entries(c))switch(u.type){case"staticContextParams":a[l]=u.value;break;case"contextParams":a[l]=e[u.name];break;case"clientContextParams":case"builtInParams":a[l]=await IOe(u.name,l,s,u.type!=="builtInParams")();break;case"operationContextParams":a[l]=u.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(u))}return Object.keys(c).length===0&&Object.assign(a,s),String(s.serviceId).toLowerCase()==="s3"&&await Fse(a),a}});function ZGn(e,t,s){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=s}function $G(e){let t=xG(e);return({config:s,instructions:a})=>(c,l)=>async u=>{s.isCustomEndpoint&&ZGn(l,"ENDPOINT_OVERRIDE","N");let p=await t(u.input,{getEndpointParameterInstructions(){return a}},{...s},l);l.endpointV2=p,l.authSchemes=p.properties?.authSchemes;let d=l.authSchemes?.[0];if(d){l.signing_region=d.signingRegion,l.signing_service=d.signingName;let S=jn(l)?.selectedHttpAuthScheme?.httpAuthOption;S&&(S.signingProperties=Object.assign(S.signingProperties||{},{signing_region:d.signingRegion,signingRegion:d.signingRegion,signing_service:d.signingName,signingName:d.signingName,signingRegionSet:d.signingRegionSet},d.properties))}return c({...u})}}var Bse=b(()=>{ts();PG()});function hOe(e){let t=$G(e);return(s,a)=>({applyToStack:c=>{c.addRelativeTo(t({config:s,instructions:a}),Use)}})}var YGn,Use,Hse=b(()=>{Bse();YGn={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0},Use={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:YGn.name}});function vOe(e){return t=>{let s=t.tls??!0,{endpoint:a,useDualstackEndpoint:c,useFipsEndpoint:l}=t,u=a!=null?async()=>Oi(await _n(a)()):void 0,d=Object.assign(t,{endpoint:u,tls:s,isCustomEndpoint:!!a,useDualstackEndpoint:_n(c??!1),useFipsEndpoint:_n(l??!1),ignoreConfiguredEndpointUrls:!!t.ignoreConfiguredEndpointUrls}),m;return d.serviceConfiguredEndpoint=async()=>(t.serviceId&&!m&&(m=e(t.serviceId)),m),d}}var COe=b(()=>{ts();EG()});var Cc,TOe=b(()=>{Cc=class e{nodes;root;conditions;results;constructor(t,s,a,c){this.nodes=t,this.root=s,this.conditions=a,this.results=c}static from(t,s,a,c){return new e(t,s,a,c)}}});var Tc,AOe=b(()=>{Tc=class{capacity;data=new Map;parameters=[];constructor({size:t,params:s}){this.capacity=t??50,s&&(this.parameters=s)}get(t,s){let a=this.hash(t);if(a===!1)return s();if(!this.data.has(a)){if(this.data.size>this.capacity+10){let c=this.data.keys(),l=0;for(;;){let{value:u,done:p}=c.next();if(this.data.delete(u),p||++l>10)break}}this.data.set(a,s())}return this.data.get(a)}size(){return this.data.size}hash(t){let s="",{parameters:a}=this;if(a.length===0)return!1;for(let c of a){let l=String(t[c]??"");if(l.includes("|;"))return!1;s+=l+"|;"}return s}}});var nn,DOe=b(()=>{nn=class extends Error{constructor(t){super(t),this.name="EndpointError"}}});var Bi=b(()=>{DOe()});var zu,bOe=b(()=>{zu="endpoints"});function Ui(e){return typeof e!="object"||e==null?e:"ref"in e?`$${Ui(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Ui).join(", ")})`:JSON.stringify(e,null,2)}var EOe=b(()=>{});var JT=b(()=>{bOe();EOe()});var ti,jse=b(()=>{ti={}});var zse,xOe=b(()=>{zse=(e,t)=>e===t});function Kse(...e){for(let t of e)if(t!=null)return t}var POe=b(()=>{});var $Oe,wOe=b(()=>{Bi();$Oe=e=>{let t=e.split("."),s=[];for(let a of t){let c=a.indexOf("[");if(c!==-1){if(a.indexOf("]")!==a.length-1)throw new nn(`Path: '${e}' does not end with ']'`);let l=a.slice(c+1,-1);if(Number.isNaN(parseInt(l)))throw new nn(`Invalid array index: '${l}' in path: '${e}'`);c!==0&&s.push(a.slice(0,c)),s.push(l)}else s.push(a)}return s}});var eA,kOe=b(()=>{Bi();wOe();eA=(e,t)=>$Oe(t).reduce((s,a)=>{if(typeof s!="object")throw new nn(`Index '${a}' in '${t}' not found in '${JSON.stringify(e)}'`);if(Array.isArray(s)){let c=parseInt(a);return s[c<0?s.length+c:c]}return s[a]},e)});var Wse,LOe=b(()=>{Wse=e=>e!=null});function Qse(e,t,s){return e?t:s}var MOe=b(()=>{});var Zse,GOe=b(()=>{Zse=e=>!e});var XGn,Id,Yse=b(()=>{XGn=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),Id=e=>XGn.test(e)||e.startsWith("[")&&e.endsWith("]")});var wG,Xse,Jse,OOe=b(()=>{wG=Jn(Pu());Yse();Xse={[wG.EndpointURLScheme.HTTP]:80,[wG.EndpointURLScheme.HTTPS]:443},Jse=e=>{let t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){let{hostname:T,port:x,protocol:w="",path:L="",query:G={}}=e,O=new URL(`${w}//${T}${x?`:${x}`:""}${L}`);return O.search=Object.entries(G).map(([U,J])=>`${U}=${J}`).join("&"),O}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;let s=t.href,{host:a,hostname:c,pathname:l,protocol:u,search:p}=t;if(p)return null;let d=u.slice(0,-1);if(!Object.values(wG.EndpointURLScheme).includes(d))return null;let m=Id(c),S=s.includes(`${a}:${Xse[d]}`)||typeof e=="string"&&e.includes(`${a}:${Xse[d]}`),v=`${a}${S?`:${Xse[d]}`:""}`;return{scheme:d,authority:v,path:l,normalizedPath:l.endsWith("/")?l:`${l}/`,isIp:m}}});function ere(e,t,s){if(s===1)return[e];if(e==="")return[""];let a=e.split(t);return s===0?a:a.slice(0,s-1).concat(a.slice(1).join(t))}var NOe=b(()=>{});var tre,VOe=b(()=>{tre=(e,t)=>e===t});var nre,qOe=b(()=>{nre=(e,t,s,a)=>e==null||t>=s||e.length<s||/[^\u0000-\u007f]/.test(e)?null:a?e.substring(e.length-s,e.length-t):e.substring(t,s)});var sre,FOe=b(()=>{sre=e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)});var rre=b(()=>{xOe();POe();kOe();LOe();ts();MOe();GOe();OOe();NOe();VOe();qOe();FOe()});var BOe,UOe=b(()=>{rre();BOe={booleanEquals:zse,coalesce:Kse,getAttr:eA,isSet:Wse,isValidHostLabel:ul,ite:Qse,not:Zse,parseURL:Jse,split:ere,stringEquals:tre,substring:nre,uriEncode:sre}});var kG,ore=b(()=>{rre();kG=(e,t)=>{let s=[],{referenceRecord:a,endpointParams:c}=t,l=0;for(;l<e.length;){let u=e.indexOf("{",l);if(u===-1){s.push(e.slice(l));break}s.push(e.slice(l,u));let p=e.indexOf("}",u);if(p===-1){s.push(e.slice(u));break}e[u+1]==="{"&&e[p+1]==="}"&&(s.push(e.slice(u+1,p)),l=p+2);let d=e.substring(u+1,p);if(d.includes("#")){let[m,S]=d.split("#");s.push(eA(a[m]??c[m],S))}else s.push(a[d]??c[d]);l=p+1}return s.join("")}});var HOe,jOe=b(()=>{HOe=({ref:e},t)=>t.referenceRecord[e]??t.endpointParams[e]});var _d,LG,zOe,zI=b(()=>{Bi();jse();UOe();ore();jOe();_d=(e,t,s)=>{if(typeof e=="string")return kG(e,s);if(e.fn)return zOe.callFunction(e,s);if(e.ref)return HOe(e,s);throw new nn(`'${t}': ${String(e)} is not a string, function or reference.`)},LG=({fn:e,argv:t},s)=>{let a=Array(t.length);for(let u=0;u<a.length;++u){let p=t[u];typeof p=="boolean"||typeof p=="number"?a[u]=p:a[u]=zOe.evaluateExpression(p,"arg",s)}let c=e.indexOf(".");if(c!==-1){let p=ti[e.slice(0,c)]?.[e.slice(c+1)];if(typeof p=="function")return p(...a)}let l=BOe[e];if(typeof l=="function")return l(...a);throw new Error(`function ${e} not loaded in endpointFunctions.`)},zOe={evaluateExpression:_d,callFunction:LG}});var KOe=b(()=>{zI()});var MG,are=b(()=>{JT();Bi();KOe();MG=(e,t)=>{let{assign:s}=e;if(s&&s in t.referenceRecord)throw new nn(`'${s}' is already defined in Reference Record.`);let a=LG(e,t);t.logger?.debug?.(`${zu} evaluateCondition: ${Ui(e)} = ${Ui(a)}`);let c=a===""?!0:!!a;return s!=null?{result:c,toAssign:{name:s,value:a}}:{result:c}}});var GG,ire=b(()=>{Bi();zI();GG=(e,t)=>Object.entries(e??{}).reduce((s,[a,c])=>(s[a]=c.map(l=>{let u=_d(l,"Header value entry",t);if(typeof u!="string")throw new nn(`Header '${a}' value '${u}' is not a string`);return u}),s),{})});var tA,WOe,QOe,cre=b(()=>{Bi();ore();tA=(e,t)=>Object.entries(e).reduce((s,[a,c])=>(s[a]=QOe.getEndpointProperty(c,t),s),{}),WOe=(e,t)=>{if(Array.isArray(e))return e.map(s=>WOe(s,t));switch(typeof e){case"string":return kG(e,t);case"object":if(e===null)throw new nn(`Unexpected endpoint property: ${e}`);return QOe.getEndpointProperties(e,t);case"boolean":return e;default:throw new nn(`Unexpected endpoint property type: ${typeof e}`)}},QOe={getEndpointProperty:WOe,getEndpointProperties:tA}});var OG,lre=b(()=>{Bi();zI();OG=(e,t)=>{let s=_d(e,"Endpoint URL",t);if(typeof s=="string")try{return new URL(s)}catch(a){throw console.error(`Failed to construct URL with ${s}`,a),a}throw new nn(`Endpoint URL must be a string, got ${typeof s}`)}});var ure,Ku,ZOe=b(()=>{Bi();are();zI();ire();cre();lre();ure=1e8,Ku=(e,t)=>{let{nodes:s,root:a,results:c,conditions:l}=e,u=a,p={},d={referenceRecord:p,endpointParams:t.endpointParams,logger:t.logger};for(;u!==1&&u!==-1&&u<ure;){let m=3*(Math.abs(u)-1),[S,v,T]=[s[m],s[m+1],s[m+2]],[x,w,L]=l[S],G=MG({fn:x,assign:L,argv:w},d);if(G.toAssign){let{name:O,value:U}=G.toAssign;p[O]=U}u=u>=0===G.result?v:T}if(u>=ure){let m=c[u-ure];if(m[0]===-1){let[,x]=m;throw new nn(_d(x,"Error",d))}let[S,v,T]=m;return{url:OG(S,d),properties:tA(v,d),headers:GG(T??{},d)}}throw new nn("No matching endpoint.")}});var KI,NG=b(()=>{JT();are();KI=(e=[],t)=>{let s={},a={...t,referenceRecord:{...t.referenceRecord}},c=!1;for(let l of e){let{result:u,toAssign:p}=MG(l,a);if(!u)return{result:u};p&&(c=!0,s[p.name]=p.value,a.referenceRecord[p.name]=p.value,t.logger?.debug?.(`${zu} assign: ${p.name} := ${Ui(p.value)}`))}return c?{result:!0,referenceRecord:s}:{result:!0}}});var YOe,XOe=b(()=>{JT();NG();ire();cre();lre();YOe=(e,t)=>{let{conditions:s,endpoint:a}=e,{result:c,referenceRecord:l}=KI(s,t);if(!c)return;let u=l?{...t,referenceRecord:{...t.referenceRecord,...l}}:t,{url:p,properties:d,headers:m}=a;t.logger?.debug?.(`${zu} Resolving endpoint from template: ${Ui(a)}`);let S={url:OG(p,u)};return m!=null&&(S.headers=GG(m,u)),d!=null&&(S.properties=tA(d,u)),S}});var JOe,eNe=b(()=>{Bi();NG();zI();JOe=(e,t)=>{let{conditions:s,error:a}=e,{result:c,referenceRecord:l}=KI(s,t);if(!c)return;let u=l?{...t,referenceRecord:{...t.referenceRecord,...l}}:t;throw new nn(_d(a,"Error",u))}});var VG,tNe,pre,nNe=b(()=>{Bi();NG();XOe();eNe();VG=(e,t)=>{for(let s of e)if(s.type==="endpoint"){let a=YOe(s,t);if(a)return a}else if(s.type==="error")JOe(s,t);else if(s.type==="tree"){let a=pre.evaluateTreeRule(s,t);if(a)return a}else throw new nn(`Unknown endpoint rule: ${s}`);throw new nn("Rules evaluation failed")},tNe=(e,t)=>{let{conditions:s,rules:a}=e,{result:c,referenceRecord:l}=KI(s,t);if(!c)return;let u=l?{...t,referenceRecord:{...t.referenceRecord,...l}}:t;return pre.evaluateRules(a,u)},pre={evaluateRules:VG,evaluateTreeRule:tNe}});var sNe=b(()=>{nNe()});var nA,rNe=b(()=>{JT();Bi();sNe();nA=(e,t)=>{let{endpointParams:s,logger:a}=t,{parameters:c,rules:l}=e;t.logger?.debug?.(`${zu} Initial EndpointParams: ${Ui(s)}`);for(let p in c){let d=c[p],m=s[p];if(m==null&&d.default!=null){s[p]=d.default;continue}if(d.required&&m==null)throw new nn(`Missing required parameter: '${p}'`)}let u=VG(l,{endpointParams:s,logger:a,referenceRecord:{}});return t.logger?.debug?.(`${zu} Resolved endpoint: ${Ui(u)}`),u}});var oNe,aNe=b(()=>{oNe=e=>{let{endpoint:t}=e;return t===void 0&&(e.endpoint=async()=>{throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.")}),e}});var mR={};Un(mR,{BinaryDecisionDiagram:()=>Cc,EndpointCache:()=>Tc,EndpointError:()=>nn,customEndpointFunctions:()=>ti,decideEndpoint:()=>Ku,endpointMiddleware:()=>eOn,endpointMiddlewareOptions:()=>Use,getEndpointFromInstructions:()=>JGn,getEndpointPlugin:()=>vd,isIpAddress:()=>Id,isValidHostLabel:()=>ul,middlewareEndpointToEndpointV1:()=>Oi,resolveEndpoint:()=>nA,resolveEndpointConfig:()=>hd,resolveEndpointRequiredConfig:()=>oNe,resolveParams:()=>XT,toEndpointV1:()=>Oi});var JGn,hd,eOn,vd,$n=b(()=>{fOe();PG();Bse();Hse();COe();ts();TOe();AOe();ZOe();Yse();ts();jse();rNe();Bi();PG();EG();Hse();aNe();JGn=xG(YT),hd=vOe(YT),eOn=$G(YT),vd=hOe(YT)});var qG,dre=b(()=>{$n();qG=(e,t)=>(s,a)=>async c=>{let l=e,u=a.endpointV2?async()=>Oi(a.endpointV2):l.endpoint;if(!u)throw new Error("No valid endpoint provider available.");let p=await t(c.input,{...e,endpoint:u});return s({...c,request:p})}});function iNe(e,t,s){return{applyToStack:a=>{a.add(cG(e,s),mre),a.add(qG(e,t),fre)}}}var mre,fre,cNe=b(()=>{yse();dre();mre={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},fre={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0}});import{createHash as tOn,createHmac as nOn}from"node:crypto";function lNe(e,t){return Buffer.isBuffer(e)?e:typeof e=="string"?Jm(e,t):ArrayBuffer.isView(e)?ml(e.buffer,e.byteOffset,e.byteLength):ml(e)}var FG,uNe=b(()=>{ef();Rse();FG=class{algorithmIdentifier;secret;hash;constructor(t,s){this.algorithmIdentifier=t,this.secret=s,this.reset()}update(t,s){this.hash.update(tr(lNe(t,s)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?nOn(this.algorithmIdentifier,lNe(this.secret)):tOn(this.algorithmIdentifier)}}});import{Readable as sOn}from"node:stream";var WI,gre=b(()=>{rse();WI=class extends sOn{expectedChecksum;checksumSourceLocation;checksum;source;base64Encoder;constructor({expectedChecksum:t,checksum:s,source:a,checksumSourceLocation:c,base64Encoder:l}){if(super(),typeof a.pipe!="function")throw new Error(`@smithy/util-stream: unsupported source type ${a?.constructor?.name??a} in ChecksumStream.`);this.source=a,this.base64Encoder=l??ls,this.expectedChecksum=t,this.checksum=s,this.checksumSourceLocation=c,this.source.on("data",this.onSourceData),this.source.on("end",this.onSourceEnd),this.source.on("error",this.onSourceError),this.source.on("close",this.onSourceClose),this.source.pause()}onSourceData=t=>{if(!this.destroyed){try{this.checksum.update(t)}catch(s){this.destroy(s);return}this.push(t)||this.source.pause()}};onSourceEnd=async()=>{if(!this.destroyed){try{let t=await this.checksum.digest(),s=this.base64Encoder(t);if(this.expectedChecksum!==s){this.destroy(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${s}" in response header "${this.checksumSourceLocation}".`));return}}catch(t){this.destroy(t);return}this.push(null)}};onSourceError=t=>{this.destroy(t)};onSourceClose=()=>{!this.destroyed&&!this.source.readableEnded&&this.destroy(new Error("Connection lost or stream closed before all data was received."))};_read(t){this.source.resume()}_destroy(t,s){this.source?.removeListener("data",this.onSourceData),this.source?.removeListener("end",this.onSourceEnd),this.source?.removeListener("error",this.onSourceError),this.source?.removeListener("close",this.onSourceClose),this.source?.destroy(),s(t)}}});var Ar,rf,fl=b(()=>{Ar=e=>typeof ReadableStream=="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),rf=e=>typeof Blob=="function"&&(e?.constructor?.name===Blob.name||e instanceof Blob)});var pNe,dNe=b(()=>{pNe=e=>new TextEncoder().encode(e)});var mNe,Cua,fNe,BG,Rre,gNe,RNe=b(()=>{mNe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cua=Object.entries(mNe).reduce((e,[t,s])=>(e[s]=Number(t),e),{}),fNe=mNe.split(""),BG=6,Rre=8,gNe=63});function UG(e){let t;typeof e=="string"?t=pNe(e):t=e;let s=typeof t=="object"&&typeof t.length=="number",a=typeof t=="object"&&typeof t.byteOffset=="number"&&typeof t.byteLength=="number";if(!s&&!a)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let c="";for(let l=0;l<t.length;l+=3){let u=0,p=0;for(let m=l,S=Math.min(l+3,t.length);m<S;m++)u|=t[m]<<(S-m-1)*Rre,p+=Rre;let d=Math.ceil(p/BG);u<<=d*BG-p;for(let m=1;m<=d;m++){let S=(d-m)*BG;c+=fNe[(u&gNe<<S)>>S]}c+="==".slice(0,4-d)}return c}var Sre=b(()=>{dNe();RNe()});var rOn,HG,SNe=b(()=>{rOn=typeof ReadableStream=="function"?ReadableStream:function(){},HG=class extends rOn{}});var yNe,INe=b(()=>{Sre();fl();SNe();yNe=({expectedChecksum:e,checksum:t,source:s,checksumSourceLocation:a,base64Encoder:c})=>{if(!Ar(s))throw new Error(`@smithy/util-stream: unsupported source type ${s?.constructor?.name??s} in ChecksumStream.`);let l=c??UG;if(typeof TransformStream!="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let u=new TransformStream({start(){},async transform(d,m){t.update(d),m.enqueue(d)},async flush(d){let m=await t.digest(),S=l(m);if(e!==S){let v=new Error(`Checksum mismatch: expected "${e}" but received "${S}" in response header "${a}".`);d.error(v)}else d.terminate()}});s.pipeThrough(u);let p=u.readable;return Object.setPrototypeOf(p,HG.prototype),p}});function jG(e){return typeof ReadableStream=="function"&&Ar(e.source)?yNe(e):new WI(e)}var _Ne=b(()=>{fl();gre();INe()});var fR,yre=b(()=>{fR=class{allocByteArray;byteLength=0;byteArrays=[];constructor(t){this.allocByteArray=t}push(t){this.byteArrays.push(t),this.byteLength+=t.byteLength}flush(){if(this.byteArrays.length===1){let a=this.byteArrays[0];return this.reset(),a}let t=this.allocByteArray(this.byteLength),s=0;for(let a=0;a<this.byteArrays.length;++a){let c=this.byteArrays[a];t.set(c,s),s+=c.byteLength}return this.reset(),t}reset(){this.byteArrays=[],this.byteLength=0}}});function hNe(e,t,s){let a=e.getReader(),c=!1,l=0,u=["",new fR(m=>new Uint8Array(m))],p=-1,d=async m=>{let{value:S,done:v}=await a.read(),T=S;if(v){if(p!==-1){let x=gR(u,p);Cd(x)>0&&m.enqueue(x)}m.close()}else{let x=_re(T,!1);if(p!==x&&(p>=0&&m.enqueue(gR(u,p)),p=x),p===-1){m.enqueue(T);return}let w=Cd(T);l+=w;let L=Cd(u[p]);if(w>=t&&L===0)m.enqueue(T);else{let G=Ire(u,p,T);!c&&l>t*2&&(c=!0,s?.warn(`@smithy/util-stream - stream chunk size ${w} is below threshold of ${t}, automatically buffering.`)),G>=t?m.enqueue(gR(u,p)):await d(m)}}};return new ReadableStream({pull:d})}function Ire(e,t,s){switch(t){case 0:return e[0]+=s,Cd(e[0]);case 1:case 2:return e[t].push(s),Cd(e[t])}}function gR(e,t){switch(t){case 0:let s=e[0];return e[0]="",s;case 1:case 2:return e[t].flush()}throw new Error(`@smithy/util-stream - invalid index ${t} given to flush()`)}function Cd(e){return e?.byteLength??e?.length??0}function _re(e,t=!0){return t&&typeof Buffer<"u"&&e instanceof Buffer?2:e instanceof Uint8Array?1:typeof e=="string"?0:-1}var vNe=b(()=>{yre()});import{Readable as oOn}from"node:stream";function zG(e,t,s){if(Ar(e))return hNe(e,t,s);let a=new oOn({read(){}}),c=!1,l=0,u=["",new fR(d=>new Uint8Array(d)),new fR(d=>Buffer.from(new Uint8Array(d)))],p=-1;return e.on("data",d=>{let m=_re(d,!0);if(p!==m&&(p>=0&&a.push(gR(u,p)),p=m),p===-1){a.push(d);return}let S=Cd(d);l+=S;let v=Cd(u[p]);if(S>=t&&v===0)a.push(d);else{let T=Ire(u,p,d);!c&&l>t*2&&(c=!0,s?.warn(`@smithy/util-stream - stream chunk size ${S} is below threshold of ${t}, automatically buffering.`)),T>=t&&a.push(gR(u,p))}}),e.on("end",()=>{if(p!==-1){let d=gR(u,p);Cd(d)>0&&a.push(d)}a.push(null)}),a}var CNe=b(()=>{yre();vNe();fl()});var TNe,ANe=b(()=>{TNe=(e,t)=>{let{base64Encoder:s,bodyLengthChecker:a,checksumAlgorithmFn:c,checksumLocationName:l,streamHasher:u}=t,p=s!==void 0&&a!==void 0&&c!==void 0&&l!==void 0&&u!==void 0,d=p?u(c,e):void 0,m=e.getReader();return new ReadableStream({async pull(S){let{value:v,done:T}=await m.read();if(T){if(S.enqueue(`0\r
|
|
12
|
+
`+p}catch{!a.logger||a.logger?.constructor?.name==="NoOpLogger"?console.warn(p):a.logger?.warn?.(p)}typeof u.$responseBodyText<"u"&&u.$response&&(u.$response.body=u.$responseBodyText);try{if(js.isInstance(l)){let{headers:d={}}=l,m=Object.entries(d);u.$metadata={httpStatusCode:l.statusCode,requestId:Sse(/^x-[\w-]+-request-?id$/,m),extendedRequestId:Sse(/^x-[\w-]+-id-2$/,m),cfId:Sse(/^x-[\w-]+-cf-id$/,m)}}}catch{}}throw u}},Sse=(e,t)=>(t.find(([s])=>s.match(e))||[void 0,void 0])[1]});var qi,zT=b(()=>{qi=class e extends Error{name="ProviderError";tryNextLink;constructor(t,s=!0){let a,c=!0;typeof s=="boolean"?(a=void 0,c=s):s!=null&&typeof s=="object"&&(a=s.logger,c=s.tryNextLink??!0),super(t),this.tryNextLink=c,Object.setPrototypeOf(this,e.prototype),a?.debug?.(`@smithy/property-provider ${c?"->":"(!)"} ${t}`)}static from(t,s=!0){return Object.assign(new this(t.message,s),t)}}});var sf,lG=b(()=>{zT();sf=class e extends qi{name="CredentialsProviderError";constructor(t,s=!0){super(t,s),Object.setPrototypeOf(this,e.prototype)}}});var uG,WMe=b(()=>{zT();uG=class e extends qi{name="TokenProviderError";constructor(t,s=!0){super(t,s),Object.setPrototypeOf(this,e.prototype)}}});var pG,Ise=b(()=>{zT();pG=(...e)=>async()=>{if(e.length===0)throw new qi("No providers in chain");let t;for(let s of e)try{return await s()}catch(a){if(t=a,a?.tryNextLink)continue;throw a}throw t}});var dG,_se=b(()=>{dG=e=>()=>Promise.resolve(e)});var FI,mG=b(()=>{FI=(e,t,s)=>{let a,c,l,u=!1,p=async()=>{c||(c=e());try{a=await c,l=!0,u=!1}finally{c=void 0}return a};return t===void 0?async d=>((!l||d?.forceRefresh)&&(a=await p()),a):async d=>((!l||d?.forceRefresh)&&(a=await p()),u?a:s&&!s(a)?(u=!0,a):(t(a)&&await p(),a))}});var ns,fG=b(()=>{ns=(e,t,s)=>{if(t in e){if(e[t]==="true")return!0;if(e[t]==="false")return!1;throw new Error(`Cannot load ${s} "${t}". Expected "true" or "false", got ${e[t]}.`)}}});var QMe,ZMe=b(()=>{QMe=(e,t,s)=>{if(!(t in e))return;let a=parseInt(e[t],10);if(Number.isNaN(a))throw new TypeError(`Cannot load ${s} '${t}'. Expected number, got '${e[t]}'.`);return a}});var Gn,gG=b(()=>{(function(e){e.ENV="env",e.CONFIG="shared config entry"})(Gn||(Gn={}))});import{homedir as TGn}from"node:os";import{sep as AGn}from"node:path";var hse,DGn,Fu,BI=b(()=>{hse={},DGn=()=>process&&process.geteuid?`${process.geteuid()}`:"DEFAULT",Fu=()=>{let{HOME:e,USERPROFILE:t,HOMEPATH:s,HOMEDRIVE:a=`C:${AGn}`}=process.env;if(e)return e;if(t)return t;if(s)return`${a}${s}`;let c=DGn();return hse[c]||(hse[c]=TGn()),hse[c]}});var vse,Cse,RG,Tse=b(()=>{vse="AWS_PROFILE",Cse="default",RG=e=>e.profile||process.env[vse]||Cse});import{createHash as bGn}from"node:crypto";import{join as EGn}from"node:path";var SG,Ase=b(()=>{BI();SG=e=>{let s=bGn("sha1").update(e).digest("hex");return EGn(Fu(),".aws","sso","cache",`${s}.json`)}});import{readFile as xGn}from"node:fs/promises";var KT,YMe,Dse=b(()=>{Ase();KT={},YMe=async e=>{if(KT[e])return KT[e];let t=SG(e),s=await xGn(t,"utf8");return JSON.parse(s)}});var Bu,XMe=b(()=>{Bu="."});var bse,JMe,eGe=b(()=>{bse=Jn(Pu()),JMe=e=>Object.entries(e).filter(([t])=>{let s=t.indexOf(".");return s===-1?!1:Object.values(bse.IniSectionType).includes(t.substring(0,s))}).reduce((t,[s,a])=>{let c=s.indexOf("."),l=s.substring(0,c)===bse.IniSectionType.PROFILE?s.substring(c+1):s;return t[l]=a,t},{...e.default&&{default:e.default}})});import{join as PGn}from"node:path";var $Gn,yG,Ese=b(()=>{BI();$Gn="AWS_CONFIG_FILE",yG=()=>process.env[$Gn]||PGn(Fu(),".aws","config")});import{join as wGn}from"node:path";var kGn,tGe,nGe=b(()=>{BI();kGn="AWS_SHARED_CREDENTIALS_FILE",tGe=()=>process.env[kGn]||wGn(Fu(),".aws","credentials")});var sGe,LGn,MGn,WT,xse=b(()=>{sGe=Jn(Pu()),LGn=/^([\w-]+)\s(["'])?([\w-@+.%:/]+)\2$/,MGn=["__proto__","profile __proto__"],WT=e=>{let t={},s,a;for(let c of e.split(/\r?\n/)){let l=c.split(/(^|\s)[;#]/)[0].trim();if(l[0]==="["&&l[l.length-1]==="]"){s=void 0,a=void 0;let p=l.substring(1,l.length-1),d=LGn.exec(p);if(d){let[,m,,S]=d;Object.values(sGe.IniSectionType).includes(m)&&(s=[m,S].join("."))}else s=p;if(MGn.includes(p))throw new Error(`Found invalid profile name "${p}"`)}else if(s){let p=l.indexOf("=");if(![0,-1].includes(p)){let[d,m]=[l.substring(0,p).trim(),l.substring(p+1).trim()];if(m==="")a=d;else{a&&c.trimStart()===c&&(a=void 0),t[s]=t[s]||{};let S=a?[a,d].join("."):d;t[s][S]=m}}}}return t}});import{readFile as GGn}from"node:fs/promises";var Pse,QT,dR,ZT=b(()=>{Pse={},QT={},dR=(e,t)=>QT[e]!==void 0?QT[e]:((!Pse[e]||t?.ignoreCache)&&(Pse[e]=GGn(e,"utf8")),Pse[e])});import{join as rGe}from"node:path";var oGe,UI,IG=b(()=>{eGe();Ese();nGe();BI();xse();ZT();oGe=()=>({}),UI=async(e={})=>{let{filepath:t=tGe(),configFilepath:s=yG()}=e,a=Fu(),c="~/",l=t;t.startsWith(c)&&(l=rGe(a,t.slice(2)));let u=s;s.startsWith(c)&&(u=rGe(a,s.slice(2)));let p=await Promise.all([dR(u,{ignoreCache:e.ignoreCache}).then(WT).then(JMe).catch(oGe),dR(l,{ignoreCache:e.ignoreCache}).then(WT).catch(oGe)]);return{configFile:p[0],credentialsFile:p[1]}}});var aGe,iGe,cGe=b(()=>{aGe=Jn(Pu()),iGe=e=>Object.entries(e).filter(([t])=>t.startsWith(aGe.IniSectionType.SSO_SESSION+".")).reduce((t,[s,a])=>({...t,[s.substring(s.indexOf(".")+1)]:a}),{})});var OGn,lGe,uGe=b(()=>{Ese();cGe();xse();ZT();OGn=()=>({}),lGe=async(e={})=>dR(e.configFilepath??yG()).then(WT).then(iGe).catch(OGn)});var pGe,dGe=b(()=>{pGe=(...e)=>{let t={};for(let s of e)for(let[a,c]of Object.entries(s))t[a]!==void 0?Object.assign(t[a],c):t[a]=c;return t}});var mGe,fGe=b(()=>{IG();dGe();mGe=async e=>{let t=await UI(e);return pGe(t.configFile,t.credentialsFile)}});var gGe,RGe=b(()=>{Dse();ZT();gGe={getFileRecord(){return QT},interceptFile(e,t){QT[e]=Promise.resolve(t)},getTokenRecord(){return KT},interceptToken(e,t){KT[e]=t}}});function _G(e){try{let t=new Set(Array.from(e.match(/([A-Z_]){3,}/g)??[]));return t.delete("CONFIG"),t.delete("CONFIG_PREFIX_SEPARATOR"),t.delete("ENV"),[...t].join(", ")}catch{return e}}var $se=b(()=>{});var SGe,yGe=b(()=>{lG();$se();SGe=(e,t)=>async()=>{try{let s=e(process.env,t);if(s===void 0)throw new Error;return s}catch(s){throw new sf(s.message||`Not found in ENV: ${_G(e.toString())}`,{logger:t?.logger})}}});var IGe,_Ge=b(()=>{lG();Tse();IG();$se();IGe=(e,{preferredFile:t="config",...s}={})=>async()=>{let a=RG(s),{configFile:c,credentialsFile:l}=await UI(s),u=l[a]||{},p=c[a]||{},d=t==="config"?{...u,...p}:{...p,...u};try{let S=e(d,t==="config"?c:l);if(S===void 0)throw new Error;return S}catch(m){throw new sf(m.message||`Not found in config files w/ profile [${a}]: ${_G(e.toString())}`,{logger:s.logger})}}});var NGn,hG,wse=b(()=>{_se();NGn=e=>typeof e=="function",hG=e=>NGn(e)?async()=>await e():dG(e)});var _t,kse=b(()=>{Ise();mG();yGe();_Ge();wse();_t=({environmentVariableSelector:e,configFileSelector:t,default:s},a={})=>{let{signingName:c,logger:l}=a;return FI(pG(SGe(e,{signingName:c,logger:l}),IGe(t,a),hG(s)))}});var vG,CG,hGe,Uu,vGe,CGe=b(()=>{fG();gG();vG="AWS_USE_DUALSTACK_ENDPOINT",CG="use_dualstack_endpoint",hGe=!1,Uu={environmentVariableSelector:e=>ns(e,vG,Gn.ENV),configFileSelector:e=>ns(e,CG,Gn.CONFIG),default:!1},vGe={environmentVariableSelector:e=>ns(e,vG,Gn.ENV),configFileSelector:e=>ns(e,CG,Gn.CONFIG),default:void 0}});var TG,AG,TGe,Hu,AGe,DGe=b(()=>{fG();gG();TG="AWS_USE_FIPS_ENDPOINT",AG="use_fips_endpoint",TGe=!1,Hu={environmentVariableSelector:e=>ns(e,TG,Gn.ENV),configFileSelector:e=>ns(e,AG,Gn.CONFIG),default:!1},AGe={environmentVariableSelector:e=>ns(e,TG,Gn.ENV),configFileSelector:e=>ns(e,AG,Gn.CONFIG),default:void 0}});var bGe,EGe=b(()=>{nt();bGe=e=>{let{tls:t,endpoint:s,urlParser:a,useDualstackEndpoint:c}=e;return Object.assign(e,{tls:t??!0,endpoint:_n(typeof s=="string"?a(s):s),isCustomEndpoint:!0,useDualstackEndpoint:_n(c??!1)})}});var xGe,PGe=b(()=>{xGe=async e=>{let{tls:t=!0}=e,s=await e.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(s))throw new Error("Invalid region in client config");let c=await e.useDualstackEndpoint(),l=await e.useFipsEndpoint(),{hostname:u}=await e.regionInfoProvider(s,{useDualstackEndpoint:c,useFipsEndpoint:l})??{};if(!u)throw new Error("Cannot resolve hostname from client config");return e.urlParser(`${t?"https:":"http:"}//${u}`)}});var $Ge,wGe=b(()=>{nt();PGe();$Ge=e=>{let t=_n(e.useDualstackEndpoint??!1),{endpoint:s,useFipsEndpoint:a,urlParser:c,tls:l}=e;return Object.assign(e,{tls:l??!0,endpoint:s?_n(typeof s=="string"?c(s):s):()=>xGe({...e,useDualstackEndpoint:t,useFipsEndpoint:a}),isCustomEndpoint:!!s,useDualstackEndpoint:t})}});var kGe,Lse,Mse,LGe,MGe,GGe,OGe,NGe,VGe,Gse=b(()=>{kGe="AWS_EXECUTION_ENV",Lse="AWS_REGION",Mse="AWS_DEFAULT_REGION",LGe="AWS_EC2_METADATA_DISABLED",MGe=["in-region","cross-region","mobile","standard","legacy"],GGe="/latest/meta-data/placement/region",OGe="/latest/api/token",NGe="x-aws-ec2-metadata-token",VGe="x-aws-ec2-metadata-token-ttl-seconds"});var qGe,VGn,UGe,DG,FGe,qGn,BGe,Ose=b(()=>{Gse();qGe=1e3,VGn=6e4,UGe=0,DG=async()=>{if(!process.env[LGe]&&!(Date.now()<UGe))try{let e=qGn(),t=(await BGe({...e,path:OGe,method:"PUT",headers:{[VGe]:"21600"}})).toString();return(await BGe({...e,path:GGe,method:"GET",headers:{[NGe]:t}})).toString().trim()||FGe()}catch{return FGe()}},FGe=()=>{UGe=Date.now()+VGn},qGn=()=>{let e=process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT;if(e){let t=new URL(e);return{hostname:t.hostname.replace(/^\[(.+)]$/,"$1"),port:t.port?Number(t.port):void 0}}return process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE==="IPv6"?{hostname:"fd00:ec2::254"}:{hostname:"169.254.169.254"}},BGe=async e=>{let{request:t}=await import("node:http");return new Promise((s,a)=>{let c=t({hostname:e.hostname,port:e.port,path:e.path,method:e.method,headers:e.headers,timeout:qGe,signal:AbortSignal.timeout(qGe)});c.on("error",l=>{a(l),c.destroy()}),c.on("timeout",()=>{a(new Error("TimeoutError from instance metadata service")),c.destroy()}),c.on("response",l=>{let{statusCode:u=400}=l;if(u<200||u>=300){a(Object.assign(new Error("Error response received from instance metadata service"),{statusCode:u})),c.destroy();return}let p=[];l.on("data",d=>p.push(d)),l.on("end",()=>{s(Buffer.concat(p)),c.destroy()})}),c.end()})}});var HI,jI,To,$a,Nse=b(()=>{Ose();HI="AWS_REGION",jI="region",To={environmentVariableSelector:e=>e[HI],configFileSelector:e=>e[jI],default:async()=>{let e=await DG();if(e)return e;throw new Error("Region is missing")}},$a={preferredFile:"credentials"}});var HGe,jGe,zGe=b(()=>{ts();HGe=new Set,jGe=(e,t=ul)=>{if(!HGe.has(e)&&!t(e))if(e==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else HGe.add(e)}});var bG,Vse=b(()=>{bG=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips"))});var KGe,WGe=b(()=>{Vse();KGe=e=>bG(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e});var Fi,QGe=b(()=>{zGe();WGe();Vse();Fi=e=>{let{region:t,useFipsEndpoint:s}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{let a=typeof t=="function"?await t():t,c=KGe(a);return jGe(c),c},useFipsEndpoint:async()=>{let a=typeof t=="string"?t:await t();return bG(a)?!0:typeof s!="function"?Promise.resolve(!!s):s()}})}});var qse,ZGe=b(()=>{qse=(e=[],{useFipsEndpoint:t,useDualstackEndpoint:s})=>e.find(({tags:a})=>t===a.includes("fips")&&s===a.includes("dualstack"))?.hostname});var YGe,XGe=b(()=>{YGe=(e,{regionHostname:t,partitionHostname:s})=>t||(s?s.replace("{region}",e):void 0)});var JGe,eOe=b(()=>{JGe=(e,{partitionHash:t})=>Object.keys(t||{}).find(s=>t[s].regions.includes(e))??"aws"});var tOe,nOe=b(()=>{tOe=(e,{signingRegion:t,regionRegex:s,useFipsEndpoint:a})=>{if(t)return t;if(a){let c=s.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),l=e.match(c);if(l)return l[0].slice(1,-1)}}});var sOe,rOe=b(()=>{ZGe();XGe();eOe();nOe();sOe=(e,{useFipsEndpoint:t=!1,useDualstackEndpoint:s=!1,signingService:a,regionHash:c,partitionHash:l})=>{let u=JGe(e,{partitionHash:l}),p=e in c?e:l[u]?.endpoint??e,d={useFipsEndpoint:t,useDualstackEndpoint:s},m=qse(c[p]?.variants,d),S=qse(l[u]?.variants,d),v=YGe(p,{regionHostname:m,partitionHostname:S});if(v===void 0)throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:p,useFipsEndpoint:t,useDualstackEndpoint:s}}`);let T=tOe(v,{signingRegion:c[p]?.signingRegion,regionRegex:l[u].regionRegex,useFipsEndpoint:t});return{partition:u,signingService:a,hostname:v,...T&&{signingRegion:T},...c[p]?.signingService&&{signingService:c[p].signingService}}}});var FGn,BGn,oOe,aOe=b(()=>{FGn="AWS_DEFAULTS_MODE",BGn="defaults_mode",oOe={environmentVariableSelector:e=>e[FGn],configFileSelector:e=>e[BGn],default:"legacy"}});var ju,UGn,HGn,iOe=b(()=>{Nse();Ose();kse();mG();Gse();aOe();ju=({region:e=_t(To),defaultsMode:t=_t(oOe)}={})=>FI(async()=>{let s=typeof t=="function"?await t():t;switch(s?.toLowerCase()){case"auto":return UGn(e);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(s?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${MGe.join(", ")}, got ${s}`)}}),UGn=async e=>{if(e){let t=typeof e=="function"?await e():e,s=await HGn();return s?t===s?"in-region":"cross-region":"standard"}return"standard"},HGn=async()=>process.env[kGe]&&(process.env[Lse]||process.env[Mse])?process.env[Lse]??process.env[Mse]:DG()});var wa={};Un(wa,{CONFIG_PREFIX_SEPARATOR:()=>Bu,CONFIG_USE_DUALSTACK_ENDPOINT:()=>CG,CONFIG_USE_FIPS_ENDPOINT:()=>AG,CredentialsProviderError:()=>sf,DEFAULT_PROFILE:()=>Cse,DEFAULT_USE_DUALSTACK_ENDPOINT:()=>hGe,DEFAULT_USE_FIPS_ENDPOINT:()=>TGe,ENV_PROFILE:()=>vse,ENV_USE_DUALSTACK_ENDPOINT:()=>vG,ENV_USE_FIPS_ENDPOINT:()=>TG,NODE_REGION_CONFIG_FILE_OPTIONS:()=>$a,NODE_REGION_CONFIG_OPTIONS:()=>To,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:()=>Uu,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:()=>Hu,ProviderError:()=>qi,REGION_ENV_NAME:()=>HI,REGION_INI_NAME:()=>jI,SelectorType:()=>Gn,TokenProviderError:()=>uG,booleanSelector:()=>ns,chain:()=>pG,externalDataInterceptor:()=>gGe,fromStatic:()=>hG,fromValue:()=>dG,getHomeDir:()=>Fu,getProfileName:()=>RG,getRegionInfo:()=>sOe,getSSOTokenFilepath:()=>SG,getSSOTokenFromFile:()=>YMe,loadConfig:()=>_t,loadSharedConfigFiles:()=>UI,loadSsoSessionData:()=>lGe,memoize:()=>FI,nodeDualstackConfigSelectors:()=>vGe,nodeFipsConfigSelectors:()=>AGe,numberSelector:()=>QMe,parseKnownFiles:()=>mGe,readFile:()=>dR,resolveCustomEndpointsConfig:()=>bGe,resolveDefaultsModeConfig:()=>ju,resolveEndpointsConfig:()=>$Ge,resolveRegionConfig:()=>Fi});var tn=b(()=>{zT();lG();WMe();Ise();_se();mG();fG();ZMe();gG();BI();Tse();Ase();Dse();XMe();IG();uGe();fGe();RGe();ZT();kse();wse();CGe();DGe();EGe();wGe();Nse();QGe();rOe();iOe()});var cOe,lOe,uOe,pOe=b(()=>{cOe="AWS_ENDPOINT_URL",lOe="endpoint_url",uOe=e=>({environmentVariableSelector:t=>{let s=e.split(" ").map(l=>l.toUpperCase()),a=t[[cOe,...s].join("_")];if(a)return a;let c=t[cOe];if(c)return c},configFileSelector:(t,s)=>{if(t.services){let c=["services",t.services].join(".");if(!s||!s[c])throw new Error(`The services section "${t.services}" specified in the profile is not present in the shared configuration file.`);let l=s[c],u=e.split(" ").map(d=>d.toLowerCase()),p=l[[u.join("_"),lOe].join(".")];if(p)return p}let a=t[lOe];if(a)return a},default:void 0})});var jGn,zGn,dOe,mOe=b(()=>{tn();jGn="AWS_IGNORE_CONFIGURED_ENDPOINT_URLS",zGn="ignore_configured_endpoint_urls",dOe={environmentVariableSelector:e=>ns(e,jGn,Gn.ENV),configFileSelector:e=>ns(e,zGn,Gn.CONFIG),default:!1}});var YT,fOe=b(()=>{tn();pOe();mOe();YT=async e=>{if(!await _t(dOe)())return _t(uOe(e??""))()}});var Fse,KGn,WGn,QGn,gOe,ROe,SOe=b(()=>{Fse=async e=>{let t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),ROe(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!gOe(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},KGn=/^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/,WGn=/(\d+\.){3}\d+/,QGn=/\.\./,gOe=e=>KGn.test(e)&&!WGn.test(e)&&!QGn.test(e),ROe=e=>{let[t,s,a,,,c]=e.split(":"),l=t==="arn"&&e.split(":").length>=6,u=!!(l&&s&&a&&c);if(l&&!u)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return u}});var yOe=b(()=>{SOe()});var IOe,_Oe=b(()=>{IOe=(e,t,s,a=!1)=>{let c=async()=>{let l;return a?l=s.clientContextParams?.[e]??s[e]??s[t]:l=s[e]??s[t],typeof l=="function"?l():l};return e==="credentialScope"||t==="CredentialScope"?async()=>{let l=typeof s.credentials=="function"?await s.credentials():s.credentials;return l?.credentialScope??l?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{let l=typeof s.credentials=="function"?await s.credentials():s.credentials;return l?.accountId??l?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(s.isCustomEndpoint===!1)return;let l=await c();if(l&&typeof l=="object"){if("url"in l)return l.url.href;if("hostname"in l){let{protocol:u,hostname:p,port:d,path:m}=l;return`${u}//${p}${d?":"+d:""}${m}`}}return l}:c}});var EG=b(()=>{ts()});function xG(e){return async(t,s,a,c)=>{if(!a.isCustomEndpoint&&!a.ignoreConfiguredEndpointUrls){let p;a.serviceConfiguredEndpoint?p=await a.serviceConfiguredEndpoint():p=await e(a.serviceId),p&&(a.endpoint=()=>Promise.resolve(Oi(p)),a.isCustomEndpoint=!0,c?.logger?.debug?.(`@smithy/core/endpoints - resolved endpoint from config: ${p}`))}let l=await XT(t,s,a);if(typeof a.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");let u=a.endpointProvider(l,c);if(a.isCustomEndpoint&&a.endpoint){let p=await a.endpoint();if(p?.headers){u.headers??={};for(let[d,m]of Object.entries(p.headers))u.headers[d]=Array.isArray(m)?m:[m]}}return u}}var XT,PG=b(()=>{yOe();_Oe();EG();XT=async(e,t,s)=>{let a={},c=t?.getEndpointParameterInstructions?.()||{};for(let[l,u]of Object.entries(c))switch(u.type){case"staticContextParams":a[l]=u.value;break;case"contextParams":a[l]=e[u.name];break;case"clientContextParams":case"builtInParams":a[l]=await IOe(u.name,l,s,u.type!=="builtInParams")();break;case"operationContextParams":a[l]=u.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(u))}return Object.keys(c).length===0&&Object.assign(a,s),String(s.serviceId).toLowerCase()==="s3"&&await Fse(a),a}});function ZGn(e,t,s){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=s}function $G(e){let t=xG(e);return({config:s,instructions:a})=>(c,l)=>async u=>{s.isCustomEndpoint&&ZGn(l,"ENDPOINT_OVERRIDE","N");let p=await t(u.input,{getEndpointParameterInstructions(){return a}},{...s},l);l.endpointV2=p,l.authSchemes=p.properties?.authSchemes;let d=l.authSchemes?.[0];if(d){l.signing_region=d.signingRegion,l.signing_service=d.signingName;let S=jn(l)?.selectedHttpAuthScheme?.httpAuthOption;S&&(S.signingProperties=Object.assign(S.signingProperties||{},{signing_region:d.signingRegion,signingRegion:d.signingRegion,signing_service:d.signingName,signingName:d.signingName,signingRegionSet:d.signingRegionSet},d.properties))}return c({...u})}}var Bse=b(()=>{ts();PG()});function hOe(e){let t=$G(e);return(s,a)=>({applyToStack:c=>{c.addRelativeTo(t({config:s,instructions:a}),Use)}})}var YGn,Use,Hse=b(()=>{Bse();YGn={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0},Use={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:YGn.name}});function vOe(e){return t=>{let s=t.tls??!0,{endpoint:a,useDualstackEndpoint:c,useFipsEndpoint:l}=t,u=a!=null?async()=>Oi(await _n(a)()):void 0,d=Object.assign(t,{endpoint:u,tls:s,isCustomEndpoint:!!a,useDualstackEndpoint:_n(c??!1),useFipsEndpoint:_n(l??!1),ignoreConfiguredEndpointUrls:!!t.ignoreConfiguredEndpointUrls}),m;return d.serviceConfiguredEndpoint=async()=>(t.serviceId&&!m&&(m=e(t.serviceId)),m),d}}var COe=b(()=>{ts();EG()});var Cc,TOe=b(()=>{Cc=class e{nodes;root;conditions;results;constructor(t,s,a,c){this.nodes=t,this.root=s,this.conditions=a,this.results=c}static from(t,s,a,c){return new e(t,s,a,c)}}});var Tc,AOe=b(()=>{Tc=class{capacity;data=new Map;parameters=[];constructor({size:t,params:s}){this.capacity=t??50,s&&(this.parameters=s)}get(t,s){let a=this.hash(t);if(a===!1)return s();if(!this.data.has(a)){if(this.data.size>this.capacity+10){let c=this.data.keys(),l=0;for(;;){let{value:u,done:p}=c.next();if(this.data.delete(u),p||++l>10)break}}this.data.set(a,s())}return this.data.get(a)}size(){return this.data.size}hash(t){let s="",{parameters:a}=this;if(a.length===0)return!1;for(let c of a){let l=String(t[c]??"");if(l.includes("|;"))return!1;s+=l+"|;"}return s}}});var nn,DOe=b(()=>{nn=class extends Error{constructor(t){super(t),this.name="EndpointError"}}});var Bi=b(()=>{DOe()});var zu,bOe=b(()=>{zu="endpoints"});function Ui(e){return typeof e!="object"||e==null?e:"ref"in e?`$${Ui(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Ui).join(", ")})`:JSON.stringify(e,null,2)}var EOe=b(()=>{});var JT=b(()=>{bOe();EOe()});var ti,jse=b(()=>{ti={}});var zse,xOe=b(()=>{zse=(e,t)=>e===t});function Kse(...e){for(let t of e)if(t!=null)return t}var POe=b(()=>{});var $Oe,wOe=b(()=>{Bi();$Oe=e=>{let t=e.split("."),s=[];for(let a of t){let c=a.indexOf("[");if(c!==-1){if(a.indexOf("]")!==a.length-1)throw new nn(`Path: '${e}' does not end with ']'`);let l=a.slice(c+1,-1);if(Number.isNaN(parseInt(l)))throw new nn(`Invalid array index: '${l}' in path: '${e}'`);c!==0&&s.push(a.slice(0,c)),s.push(l)}else s.push(a)}return s}});var eA,kOe=b(()=>{Bi();wOe();eA=(e,t)=>$Oe(t).reduce((s,a)=>{if(typeof s!="object")throw new nn(`Index '${a}' in '${t}' not found in '${JSON.stringify(e)}'`);if(Array.isArray(s)){let c=parseInt(a);return s[c<0?s.length+c:c]}return s[a]},e)});var Wse,LOe=b(()=>{Wse=e=>e!=null});function Qse(e,t,s){return e?t:s}var MOe=b(()=>{});var Zse,GOe=b(()=>{Zse=e=>!e});var XGn,Id,Yse=b(()=>{XGn=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),Id=e=>XGn.test(e)||e.startsWith("[")&&e.endsWith("]")});var wG,Xse,Jse,OOe=b(()=>{wG=Jn(Pu());Yse();Xse={[wG.EndpointURLScheme.HTTP]:80,[wG.EndpointURLScheme.HTTPS]:443},Jse=e=>{let t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){let{hostname:T,port:x,protocol:w="",path:L="",query:G={}}=e,O=new URL(`${w}//${T}${x?`:${x}`:""}${L}`);return O.search=Object.entries(G).map(([U,J])=>`${U}=${J}`).join("&"),O}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;let s=t.href,{host:a,hostname:c,pathname:l,protocol:u,search:p}=t;if(p)return null;let d=u.slice(0,-1);if(!Object.values(wG.EndpointURLScheme).includes(d))return null;let m=Id(c),S=s.includes(`${a}:${Xse[d]}`)||typeof e=="string"&&e.includes(`${a}:${Xse[d]}`),v=`${a}${S?`:${Xse[d]}`:""}`;return{scheme:d,authority:v,path:l,normalizedPath:l.endsWith("/")?l:`${l}/`,isIp:m}}});function ere(e,t,s){if(s===1)return[e];if(e==="")return[""];let a=e.split(t);return s===0?a:a.slice(0,s-1).concat(a.slice(1).join(t))}var NOe=b(()=>{});var tre,VOe=b(()=>{tre=(e,t)=>e===t});var nre,qOe=b(()=>{nre=(e,t,s,a)=>e==null||t>=s||e.length<s||/[^\u0000-\u007f]/.test(e)?null:a?e.substring(e.length-s,e.length-t):e.substring(t,s)});var sre,FOe=b(()=>{sre=e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)});var rre=b(()=>{xOe();POe();kOe();LOe();ts();MOe();GOe();OOe();NOe();VOe();qOe();FOe()});var BOe,UOe=b(()=>{rre();BOe={booleanEquals:zse,coalesce:Kse,getAttr:eA,isSet:Wse,isValidHostLabel:ul,ite:Qse,not:Zse,parseURL:Jse,split:ere,stringEquals:tre,substring:nre,uriEncode:sre}});var kG,ore=b(()=>{rre();kG=(e,t)=>{let s=[],{referenceRecord:a,endpointParams:c}=t,l=0;for(;l<e.length;){let u=e.indexOf("{",l);if(u===-1){s.push(e.slice(l));break}s.push(e.slice(l,u));let p=e.indexOf("}",u);if(p===-1){s.push(e.slice(u));break}e[u+1]==="{"&&e[p+1]==="}"&&(s.push(e.slice(u+1,p)),l=p+2);let d=e.substring(u+1,p);if(d.includes("#")){let[m,S]=d.split("#");s.push(eA(a[m]??c[m],S))}else s.push(a[d]??c[d]);l=p+1}return s.join("")}});var HOe,jOe=b(()=>{HOe=({ref:e},t)=>t.referenceRecord[e]??t.endpointParams[e]});var _d,LG,zOe,zI=b(()=>{Bi();jse();UOe();ore();jOe();_d=(e,t,s)=>{if(typeof e=="string")return kG(e,s);if(e.fn)return zOe.callFunction(e,s);if(e.ref)return HOe(e,s);throw new nn(`'${t}': ${String(e)} is not a string, function or reference.`)},LG=({fn:e,argv:t},s)=>{let a=Array(t.length);for(let u=0;u<a.length;++u){let p=t[u];typeof p=="boolean"||typeof p=="number"?a[u]=p:a[u]=zOe.evaluateExpression(p,"arg",s)}let c=e.indexOf(".");if(c!==-1){let p=ti[e.slice(0,c)]?.[e.slice(c+1)];if(typeof p=="function")return p(...a)}let l=BOe[e];if(typeof l=="function")return l(...a);throw new Error(`function ${e} not loaded in endpointFunctions.`)},zOe={evaluateExpression:_d,callFunction:LG}});var KOe=b(()=>{zI()});var MG,are=b(()=>{JT();Bi();KOe();MG=(e,t)=>{let{assign:s}=e;if(s&&s in t.referenceRecord)throw new nn(`'${s}' is already defined in Reference Record.`);let a=LG(e,t);t.logger?.debug?.(`${zu} evaluateCondition: ${Ui(e)} = ${Ui(a)}`);let c=a===""?!0:!!a;return s!=null?{result:c,toAssign:{name:s,value:a}}:{result:c}}});var GG,ire=b(()=>{Bi();zI();GG=(e,t)=>Object.entries(e??{}).reduce((s,[a,c])=>(s[a]=c.map(l=>{let u=_d(l,"Header value entry",t);if(typeof u!="string")throw new nn(`Header '${a}' value '${u}' is not a string`);return u}),s),{})});var tA,WOe,QOe,cre=b(()=>{Bi();ore();tA=(e,t)=>Object.entries(e).reduce((s,[a,c])=>(s[a]=QOe.getEndpointProperty(c,t),s),{}),WOe=(e,t)=>{if(Array.isArray(e))return e.map(s=>WOe(s,t));switch(typeof e){case"string":return kG(e,t);case"object":if(e===null)throw new nn(`Unexpected endpoint property: ${e}`);return QOe.getEndpointProperties(e,t);case"boolean":return e;default:throw new nn(`Unexpected endpoint property type: ${typeof e}`)}},QOe={getEndpointProperty:WOe,getEndpointProperties:tA}});var OG,lre=b(()=>{Bi();zI();OG=(e,t)=>{let s=_d(e,"Endpoint URL",t);if(typeof s=="string")try{return new URL(s)}catch(a){throw console.error(`Failed to construct URL with ${s}`,a),a}throw new nn(`Endpoint URL must be a string, got ${typeof s}`)}});var ure,Ku,ZOe=b(()=>{Bi();are();zI();ire();cre();lre();ure=1e8,Ku=(e,t)=>{let{nodes:s,root:a,results:c,conditions:l}=e,u=a,p={},d={referenceRecord:p,endpointParams:t.endpointParams,logger:t.logger};for(;u!==1&&u!==-1&&u<ure;){let m=3*(Math.abs(u)-1),[S,v,T]=[s[m],s[m+1],s[m+2]],[x,w,L]=l[S],G=MG({fn:x,assign:L,argv:w},d);if(G.toAssign){let{name:O,value:U}=G.toAssign;p[O]=U}u=u>=0===G.result?v:T}if(u>=ure){let m=c[u-ure];if(m[0]===-1){let[,x]=m;throw new nn(_d(x,"Error",d))}let[S,v,T]=m;return{url:OG(S,d),properties:tA(v,d),headers:GG(T??{},d)}}throw new nn("No matching endpoint.")}});var KI,NG=b(()=>{JT();are();KI=(e=[],t)=>{let s={},a={...t,referenceRecord:{...t.referenceRecord}},c=!1;for(let l of e){let{result:u,toAssign:p}=MG(l,a);if(!u)return{result:u};p&&(c=!0,s[p.name]=p.value,a.referenceRecord[p.name]=p.value,t.logger?.debug?.(`${zu} assign: ${p.name} := ${Ui(p.value)}`))}return c?{result:!0,referenceRecord:s}:{result:!0}}});var YOe,XOe=b(()=>{JT();NG();ire();cre();lre();YOe=(e,t)=>{let{conditions:s,endpoint:a}=e,{result:c,referenceRecord:l}=KI(s,t);if(!c)return;let u=l?{...t,referenceRecord:{...t.referenceRecord,...l}}:t,{url:p,properties:d,headers:m}=a;t.logger?.debug?.(`${zu} Resolving endpoint from template: ${Ui(a)}`);let S={url:OG(p,u)};return m!=null&&(S.headers=GG(m,u)),d!=null&&(S.properties=tA(d,u)),S}});var JOe,eNe=b(()=>{Bi();NG();zI();JOe=(e,t)=>{let{conditions:s,error:a}=e,{result:c,referenceRecord:l}=KI(s,t);if(!c)return;let u=l?{...t,referenceRecord:{...t.referenceRecord,...l}}:t;throw new nn(_d(a,"Error",u))}});var VG,tNe,pre,nNe=b(()=>{Bi();NG();XOe();eNe();VG=(e,t)=>{for(let s of e)if(s.type==="endpoint"){let a=YOe(s,t);if(a)return a}else if(s.type==="error")JOe(s,t);else if(s.type==="tree"){let a=pre.evaluateTreeRule(s,t);if(a)return a}else throw new nn(`Unknown endpoint rule: ${s}`);throw new nn("Rules evaluation failed")},tNe=(e,t)=>{let{conditions:s,rules:a}=e,{result:c,referenceRecord:l}=KI(s,t);if(!c)return;let u=l?{...t,referenceRecord:{...t.referenceRecord,...l}}:t;return pre.evaluateRules(a,u)},pre={evaluateRules:VG,evaluateTreeRule:tNe}});var sNe=b(()=>{nNe()});var nA,rNe=b(()=>{JT();Bi();sNe();nA=(e,t)=>{let{endpointParams:s,logger:a}=t,{parameters:c,rules:l}=e;t.logger?.debug?.(`${zu} Initial EndpointParams: ${Ui(s)}`);for(let p in c){let d=c[p],m=s[p];if(m==null&&d.default!=null){s[p]=d.default;continue}if(d.required&&m==null)throw new nn(`Missing required parameter: '${p}'`)}let u=VG(l,{endpointParams:s,logger:a,referenceRecord:{}});return t.logger?.debug?.(`${zu} Resolved endpoint: ${Ui(u)}`),u}});var oNe,aNe=b(()=>{oNe=e=>{let{endpoint:t}=e;return t===void 0&&(e.endpoint=async()=>{throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.")}),e}});var mR={};Un(mR,{BinaryDecisionDiagram:()=>Cc,EndpointCache:()=>Tc,EndpointError:()=>nn,customEndpointFunctions:()=>ti,decideEndpoint:()=>Ku,endpointMiddleware:()=>eOn,endpointMiddlewareOptions:()=>Use,getEndpointFromInstructions:()=>JGn,getEndpointPlugin:()=>vd,isIpAddress:()=>Id,isValidHostLabel:()=>ul,middlewareEndpointToEndpointV1:()=>Oi,resolveEndpoint:()=>nA,resolveEndpointConfig:()=>hd,resolveEndpointRequiredConfig:()=>oNe,resolveParams:()=>XT,toEndpointV1:()=>Oi});var JGn,hd,eOn,vd,$n=b(()=>{fOe();PG();Bse();Hse();COe();ts();TOe();AOe();ZOe();Yse();ts();jse();rNe();Bi();PG();EG();Hse();aNe();JGn=xG(YT),hd=vOe(YT),eOn=$G(YT),vd=hOe(YT)});var qG,dre=b(()=>{$n();qG=(e,t)=>(s,a)=>async c=>{let l=e,u=a.endpointV2?async()=>Oi(a.endpointV2):l.endpoint;if(!u)throw new Error("No valid endpoint provider available.");let p=await t(c.input,{...e,endpoint:u});return s({...c,request:p})}});function iNe(e,t,s){return{applyToStack:a=>{a.add(cG(e,s),mre),a.add(qG(e,t),fre)}}}var mre,fre,cNe=b(()=>{yse();dre();mre={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},fre={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0}});import{createHash as tOn,createHmac as nOn}from"node:crypto";function lNe(e,t){return Buffer.isBuffer(e)?e:typeof e=="string"?Jm(e,t):ArrayBuffer.isView(e)?ml(e.buffer,e.byteOffset,e.byteLength):ml(e)}var FG,uNe=b(()=>{ef();Rse();FG=class{algorithmIdentifier;secret;hash;constructor(t,s){this.algorithmIdentifier=t,this.secret=s,this.reset()}update(t,s){this.hash.update(tr(lNe(t,s)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?nOn(this.algorithmIdentifier,lNe(this.secret)):tOn(this.algorithmIdentifier)}}});import{Readable as sOn}from"node:stream";var WI,gre=b(()=>{rse();WI=class extends sOn{expectedChecksum;checksumSourceLocation;checksum;source;base64Encoder;constructor({expectedChecksum:t,checksum:s,source:a,checksumSourceLocation:c,base64Encoder:l}){if(super(),typeof a.pipe!="function")throw new Error(`@smithy/util-stream: unsupported source type ${a?.constructor?.name??a} in ChecksumStream.`);this.source=a,this.base64Encoder=l??ls,this.expectedChecksum=t,this.checksum=s,this.checksumSourceLocation=c,this.source.on("data",this.onSourceData),this.source.on("end",this.onSourceEnd),this.source.on("error",this.onSourceError),this.source.on("close",this.onSourceClose),this.source.pause()}onSourceData=t=>{if(!this.destroyed){try{this.checksum.update(t)}catch(s){this.destroy(s);return}this.push(t)||this.source.pause()}};onSourceEnd=async()=>{if(!this.destroyed){try{let t=await this.checksum.digest(),s=this.base64Encoder(t);if(this.expectedChecksum!==s){this.destroy(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${s}" in response header "${this.checksumSourceLocation}".`));return}}catch(t){this.destroy(t);return}this.push(null)}};onSourceError=t=>{this.destroy(t)};onSourceClose=()=>{!this.destroyed&&!this.source.readableEnded&&this.destroy(new Error("Connection lost or stream closed before all data was received."))};_read(t){this.source.resume()}_destroy(t,s){this.source?.removeListener("data",this.onSourceData),this.source?.removeListener("end",this.onSourceEnd),this.source?.removeListener("error",this.onSourceError),this.source?.removeListener("close",this.onSourceClose),this.source?.destroy(),s(t)}}});var Ar,rf,fl=b(()=>{Ar=e=>typeof ReadableStream=="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),rf=e=>typeof Blob=="function"&&(e?.constructor?.name===Blob.name||e instanceof Blob)});var pNe,dNe=b(()=>{pNe=e=>new TextEncoder().encode(e)});var mNe,Tua,fNe,BG,Rre,gNe,RNe=b(()=>{mNe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Tua=Object.entries(mNe).reduce((e,[t,s])=>(e[s]=Number(t),e),{}),fNe=mNe.split(""),BG=6,Rre=8,gNe=63});function UG(e){let t;typeof e=="string"?t=pNe(e):t=e;let s=typeof t=="object"&&typeof t.length=="number",a=typeof t=="object"&&typeof t.byteOffset=="number"&&typeof t.byteLength=="number";if(!s&&!a)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let c="";for(let l=0;l<t.length;l+=3){let u=0,p=0;for(let m=l,S=Math.min(l+3,t.length);m<S;m++)u|=t[m]<<(S-m-1)*Rre,p+=Rre;let d=Math.ceil(p/BG);u<<=d*BG-p;for(let m=1;m<=d;m++){let S=(d-m)*BG;c+=fNe[(u&gNe<<S)>>S]}c+="==".slice(0,4-d)}return c}var Sre=b(()=>{dNe();RNe()});var rOn,HG,SNe=b(()=>{rOn=typeof ReadableStream=="function"?ReadableStream:function(){},HG=class extends rOn{}});var yNe,INe=b(()=>{Sre();fl();SNe();yNe=({expectedChecksum:e,checksum:t,source:s,checksumSourceLocation:a,base64Encoder:c})=>{if(!Ar(s))throw new Error(`@smithy/util-stream: unsupported source type ${s?.constructor?.name??s} in ChecksumStream.`);let l=c??UG;if(typeof TransformStream!="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let u=new TransformStream({start(){},async transform(d,m){t.update(d),m.enqueue(d)},async flush(d){let m=await t.digest(),S=l(m);if(e!==S){let v=new Error(`Checksum mismatch: expected "${e}" but received "${S}" in response header "${a}".`);d.error(v)}else d.terminate()}});s.pipeThrough(u);let p=u.readable;return Object.setPrototypeOf(p,HG.prototype),p}});function jG(e){return typeof ReadableStream=="function"&&Ar(e.source)?yNe(e):new WI(e)}var _Ne=b(()=>{fl();gre();INe()});var fR,yre=b(()=>{fR=class{allocByteArray;byteLength=0;byteArrays=[];constructor(t){this.allocByteArray=t}push(t){this.byteArrays.push(t),this.byteLength+=t.byteLength}flush(){if(this.byteArrays.length===1){let a=this.byteArrays[0];return this.reset(),a}let t=this.allocByteArray(this.byteLength),s=0;for(let a=0;a<this.byteArrays.length;++a){let c=this.byteArrays[a];t.set(c,s),s+=c.byteLength}return this.reset(),t}reset(){this.byteArrays=[],this.byteLength=0}}});function hNe(e,t,s){let a=e.getReader(),c=!1,l=0,u=["",new fR(m=>new Uint8Array(m))],p=-1,d=async m=>{let{value:S,done:v}=await a.read(),T=S;if(v){if(p!==-1){let x=gR(u,p);Cd(x)>0&&m.enqueue(x)}m.close()}else{let x=_re(T,!1);if(p!==x&&(p>=0&&m.enqueue(gR(u,p)),p=x),p===-1){m.enqueue(T);return}let w=Cd(T);l+=w;let L=Cd(u[p]);if(w>=t&&L===0)m.enqueue(T);else{let G=Ire(u,p,T);!c&&l>t*2&&(c=!0,s?.warn(`@smithy/util-stream - stream chunk size ${w} is below threshold of ${t}, automatically buffering.`)),G>=t?m.enqueue(gR(u,p)):await d(m)}}};return new ReadableStream({pull:d})}function Ire(e,t,s){switch(t){case 0:return e[0]+=s,Cd(e[0]);case 1:case 2:return e[t].push(s),Cd(e[t])}}function gR(e,t){switch(t){case 0:let s=e[0];return e[0]="",s;case 1:case 2:return e[t].flush()}throw new Error(`@smithy/util-stream - invalid index ${t} given to flush()`)}function Cd(e){return e?.byteLength??e?.length??0}function _re(e,t=!0){return t&&typeof Buffer<"u"&&e instanceof Buffer?2:e instanceof Uint8Array?1:typeof e=="string"?0:-1}var vNe=b(()=>{yre()});import{Readable as oOn}from"node:stream";function zG(e,t,s){if(Ar(e))return hNe(e,t,s);let a=new oOn({read(){}}),c=!1,l=0,u=["",new fR(d=>new Uint8Array(d)),new fR(d=>Buffer.from(new Uint8Array(d)))],p=-1;return e.on("data",d=>{let m=_re(d,!0);if(p!==m&&(p>=0&&a.push(gR(u,p)),p=m),p===-1){a.push(d);return}let S=Cd(d);l+=S;let v=Cd(u[p]);if(S>=t&&v===0)a.push(d);else{let T=Ire(u,p,d);!c&&l>t*2&&(c=!0,s?.warn(`@smithy/util-stream - stream chunk size ${S} is below threshold of ${t}, automatically buffering.`)),T>=t&&a.push(gR(u,p))}}),e.on("end",()=>{if(p!==-1){let d=gR(u,p);Cd(d)>0&&a.push(d)}a.push(null)}),a}var CNe=b(()=>{yre();vNe();fl()});var TNe,ANe=b(()=>{TNe=(e,t)=>{let{base64Encoder:s,bodyLengthChecker:a,checksumAlgorithmFn:c,checksumLocationName:l,streamHasher:u}=t,p=s!==void 0&&a!==void 0&&c!==void 0&&l!==void 0&&u!==void 0,d=p?u(c,e):void 0,m=e.getReader();return new ReadableStream({async pull(S){let{value:v,done:T}=await m.read();if(T){if(S.enqueue(`0\r
|
|
13
13
|
`),p){let x=s(await d);S.enqueue(`${l}:${x}\r
|
|
14
14
|
`),S.enqueue(`\r
|
|
15
15
|
`)}S.close()}else S.enqueue(`${(a(v)||0).toString(16)}\r
|
|
@@ -66,7 +66,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
66
66
|
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
67
67
|
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return s}constructor(t){this.configProvider=new Promise((s,a)=>{typeof t=="function"?t().then(c=>{s(this.resolveDefaultConfig(c))}).catch(a):s(this.resolveDefaultConfig(t))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(t,{abortSignal:s,requestTimeout:a}={}){this.config||(this.config=await this.configProvider);let c=this.config,l=c.logger,u=t.protocol==="https:";return!u&&!this.config.httpAgent&&(this.config.httpAgent=await this.config.httpAgentProvider()),new Promise((p,d)=>{let m,S=-1,v=-1,T=-1,x=-1,w=-1,L=()=>{zo.clearTimeout(S),zo.clearTimeout(v),zo.clearTimeout(T),zo.clearTimeout(x),zo.clearTimeout(w)},G=async M=>{await m,L(),p(M)},O=async M=>{await m,L(),d(M)};if(s?.aborted){let M=OZ(s);O(M);return}let U=t.headers,J=U?(U.Expect??U.expect)==="100-continue":!1,ce=u?c.httpsAgent:c.httpAgent;J&&!this.externalAgent&&(ce=new(u?MZ.Agent:GZ)({keepAlive:!1,maxSockets:1/0})),S=zo.setTimeout(()=>{this.socketWarningTimestamp=e.checkSocketUsage(ce,this.socketWarningTimestamp,l)},c.socketAcquisitionWarningTimeout??(c.requestTimeout??2e3)+(c.connectionTimeout??1e3));let ke=t.query?ufn(t.query):"",Ee;if(t.username!=null||t.password!=null){let M=t.username??"",se=t.password??"";Ee=`${M}:${se}`}let _e=t.path;ke&&(_e+=`?${ke}`),t.fragment&&(_e+=`#${t.fragment}`);let Ce=t.hostname??"";Ce[0]==="["&&Ce.endsWith("]")?Ce=t.hostname.slice(1,-1):Ce=t.hostname;let Ne={headers:t.headers,host:Ce,method:t.method,path:_e,port:t.port,agent:ce,auth:Ee},Se=(u?MZ.request:cfn)(Ne,M=>{let se=new pfn({statusCode:M.statusCode||-1,reason:M.statusMessage,headers:dfn(M.headers),body:M});G({response:se})});if(Se.on("error",M=>{fuo.includes(M.code)?O(Object.assign(M,{name:"TimeoutError"})):O(M)}),s){let M=()=>{Se.destroy();let se=OZ(s);O(se)};if(typeof s.addEventListener=="function"){let se=s;se.addEventListener("abort",M,{once:!0}),Se.once("close",()=>se.removeEventListener("abort",M))}else s.onabort=M}let He=a??c.requestTimeout;v=guo(Se,O,c.connectionTimeout),T=Ruo(Se,O,He,c.throwOnRequestTimeout,l??console),x=Iuo(Se,O,c.socketTimeout);let oe=Ne.agent;typeof oe=="object"&&"keepAlive"in oe&&(w=yuo(Se,{keepAlive:oe.keepAlive,keepAliveMsecs:oe.keepAliveMsecs})),m=mfn(Se,t,He,this.externalAgent).catch(M=>(L(),d(M)))})}updateHttpClientConfig(t,s){this.config=void 0,this.configProvider=this.configProvider.then(a=>t===Symbol.for("logger")?{...a,logger:a.logger??s}:{...a,[t]:s})}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(t){let{requestTimeout:s,connectionTimeout:a,socketTimeout:c,socketAcquisitionWarningTimeout:l,httpAgent:u,httpsAgent:p,throwOnRequestTimeout:d,logger:m}=t||{},S=!0,v=50;return{connectionTimeout:a,requestTimeout:s,socketTimeout:c,socketAcquisitionWarningTimeout:l,throwOnRequestTimeout:d,httpAgentProvider:async()=>{let T=en("node:http"),{Agent:x,request:w}=T.default??T;return cfn=w,GZ=x,u instanceof GZ||typeof u?.destroy=="function"?(this.externalAgent=!0,u):new GZ({keepAlive:S,maxSockets:v,...u})},httpsAgent:p instanceof MZ.Agent||typeof p?.destroy=="function"?(this.externalAgent=!0,p):new MZ.Agent({keepAlive:S,maxSockets:v,...p}),logger:m}}},vuo=new Uint16Array(1),yk=class{id=vuo[0]++;total=0;max=0;session;refs=0;constructor(t){t.unref(),this.session=t}retain(){if(this.session.destroyed)throw new Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");this.refs+=1,this.total+=1,this.max=Math.max(this.refs,this.max),this.session.ref()}free(){if(!this.session.destroyed&&(this.refs-=1,this.refs===0&&this.session.unref(),this.refs<0))throw new Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.")}deref(){return this.session}close(){this.session.closed||this.session.close()}destroy(){this.refs=0,this.session.destroyed||this.session.destroy()}useCount(){return this.refs}},hCe=class{sessions=[];maxConcurrency=0;constructor(t){this.sessions=(t??[]).map(s=>new yk(s))}poll(){let t=!1;for(let s of this.sessions){if(s.deref().destroyed){t=!0;continue}if(!this.maxConcurrency||s.useCount()<this.maxConcurrency)return s}if(t)for(let s of this.sessions)s.deref().destroyed&&this.remove(s)}offerLast(t){this.sessions.push(t)}remove(t){let s=this.sessions.indexOf(t);s>-1&&this.sessions.splice(s,1)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}setMaxConcurrency(t){this.maxConcurrency=t}destroy(t){this.remove(t),t.destroy()}},vCe=class{config;connectOptions;connectionPools=new Map;constructor(t){if(this.config=t,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(t,s){let a=this.getUrlString(t),c=this.getPool(a);if(!this.config.disableConcurrency&&!s.isEventStream){let m=c.poll();if(m)return m.retain(),m}let l=new yk(this.connect(a)),u=l.deref();this.config.maxConcurrency&&u.settings({maxConcurrentStreams:this.config.maxConcurrency},m=>{if(m)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+t.destination.toString())});let p=()=>{this.removeFromPoolAndClose(a,l)},d=()=>{this.removeFromPoolAndCheckedDestroy(a,l)};return u.on("goaway",p),u.on("error",d),u.on("frameError",d),u.on("close",d),s.requestTimeout&&u.setTimeout(s.requestTimeout,d),c.offerLast(l),l.retain(),l}release(t,s){s.free()}createIsolatedSession(t,s){let a=this.getUrlString(t),c=new yk(this.connect(a)),l=c.deref();l.settings({maxConcurrentStreams:1});let u=()=>{c.destroy()};return l.on("error",u),l.on("frameError",u),l.on("close",u),s.requestTimeout&&l.setTimeout(s.requestTimeout,u),c.retain(),c}destroy(){for(let[t,s]of this.connectionPools){for(let a of[...s])a.destroy();this.connectionPools.delete(t)}}setMaxConcurrentStreams(t){if(t&&t<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=t;for(let s of this.connectionPools.values())s.setMaxConcurrency(t)}setDisableConcurrentStreams(t){this.config.disableConcurrency=t}setNodeHttp2ConnectOptions(t){this.connectOptions=t}debug(){let t={};for(let[s,a]of this.connectionPools){let c=[];for(let l of a)c.push({id:l.id,active:l.useCount(),maxConcurrent:l.max,totalRequests:l.total});t[s]={sessions:c}}return t}removeFromPoolAndClose(t,s){this.connectionPools.get(t)?.remove(s),s.close()}removeFromPoolAndCheckedDestroy(t,s){this.connectionPools.get(t)?.remove(s),s.destroy()}getPool(t){if(!this.connectionPools.has(t)){let s=new hCe;this.config.maxConcurrency&&s.setMaxConcurrency(this.config.maxConcurrency),this.connectionPools.set(t,s)}return this.connectionPools.get(t)}getUrlString(t){return t.destination.toString()}connect(t){return this.connectOptions===void 0?ICe.connect(t):ICe.connect(t,this.connectOptions)}},{constants:lfn}=ICe,CCe=class e{config;configProvider;metadata={handlerProtocol:"h2"};connectionManager=new vCe({});static create(t){return typeof t?.handle=="function"?t:new e(t)}constructor(t){this.configProvider=new Promise((s,a)=>{typeof t=="function"?t().then(c=>{s(c||{})}).catch(a):s(t||{})})}destroy(){this.connectionManager.destroy()}async handle(t,{abortSignal:s,requestTimeout:a,isEventStream:c}={}){if(!this.config){this.config=await this.configProvider;let{disableConcurrentStreams:m,maxConcurrentStreams:S,nodeHttp2ConnectOptions:v}=this.config;this.connectionManager.setDisableConcurrentStreams(m??!1),S&&this.connectionManager.setMaxConcurrentStreams(S),v&&this.connectionManager.setNodeHttp2ConnectOptions(v)}let{requestTimeout:l,disableConcurrentStreams:u}=this.config,p=u||c,d=a??l;return new Promise((m,S)=>{let v=!1,T,x=async M=>{await T,m(M)},w=async M=>{await T,S(M)};if(s?.aborted){v=!0;let M=OZ(s);w(M);return}let{hostname:L,method:G,port:O,protocol:U,query:J}=t,ce="";if(t.username!=null||t.password!=null){let M=t.username??"",se=t.password??"";ce=`${M}:${se}@`}let ke=`${U}//${ce}${L}${O?`:${O}`:""}`,Ee={destination:new URL(ke)},_e={requestTimeout:this.config?.sessionTimeout,isEventStream:c},Ce=p?this.connectionManager.createIsolatedSession(Ee,_e):this.connectionManager.lease(Ee,_e),Ne=Ce.deref(),Ve=M=>{p&&Ce.destroy(),v=!0,w(M)},Se=J?ufn(J):"",He=t.path;Se&&(He+=`?${Se}`),t.fragment&&(He+=`#${t.fragment}`);let oe=Ne.request({...t.headers,[lfn.HTTP2_HEADER_PATH]:He,[lfn.HTTP2_HEADER_METHOD]:G});if(d&&oe.setTimeout(d,()=>{oe.close();let M=new Error(`Stream timed out because of no activity for ${d} ms`);M.name="TimeoutError",Ve(M)}),s){let M=()=>{oe.close();let se=OZ(s);Ve(se)};if(typeof s.addEventListener=="function"){let se=s;se.addEventListener("abort",M,{once:!0}),oe.once("close",()=>se.removeEventListener("abort",M))}else s.onabort=M}oe.on("frameError",(M,se,Xn)=>{Ve(new Error(`Frame type id ${M} in stream id ${Xn} has failed with code ${se}.`))}),oe.on("error",Ve),oe.on("aborted",()=>{Ve(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${oe.rstCode}.`))}),oe.on("response",M=>{let se=new pfn({statusCode:M[":status"]??-1,headers:dfn(M),body:oe});v=!0,x({response:se}),p&&Ne.close()}),oe.on("close",()=>{p?Ce.destroy():this.connectionManager.release(Ee,Ce),v||Ve(new Error("Unexpected error: http2 request did not get a response"))}),T=mfn(oe,t,d)})}updateHttpClientConfig(t,s){this.config=void 0,this.configProvider=this.configProvider.then(a=>({...a,[t]:s}))}httpHandlerConfigs(){return this.config??{}}};Ik.DEFAULT_REQUEST_TIMEOUT=huo;Ik.NodeHttp2Handler=CCe;Ik.NodeHttpHandler=_Ce});var ir,gfn,Rfn,Cuo,Cm,NZ=b(()=>{We();ir=64,gfn=20,Rfn=new Int32Array([1732584193,4023233417,2562383102,271733878,3285377520]),Cuo=new Int32Array([1518500249,1859775393,2400959708,3395469782]),Cm=class e{digestLength=gfn;state=Int32Array.from(Rfn);w;buffer=new Uint8Array(ir);bufferLength=0;bytesHashed=0;finished=!1;inner;outer;constructor(t){if(t){let s=e.normalizeKey(t);this.inner=new e,this.outer=new e;let a=new Uint8Array(ir*2);for(let c=0;c<ir;++c)a[c]=54^s[c],a[c+ir]=92^s[c];this.inner.update(a.subarray(0,ir)),this.outer.update(a.subarray(ir))}}update(t){if(this.finished)throw new Error("Attempted to update an already finished HMAC.");if(this.inner){this.inner.update(t);return}let s=0,{length:a}=t;if(this.bytesHashed+=a,this.bufferLength>0){for(;a>0&&this.bufferLength<ir;)this.buffer[this.bufferLength++]=t[s++],--a;this.bufferLength===ir&&(this.hashBuffer(this.buffer,0),this.bufferLength=0)}for(;a>=ir;)this.hashBuffer(t,s),s+=ir,a-=ir;for(;a>0;)this.buffer[this.bufferLength++]=t[s++],--a}async digest(){if(this.inner&&this.outer){if(this.finished)throw new Error("Attempted to digest an already finished HMAC.");this.finished=!0;let t=this.inner.digestSync();return this.outer.update(t),this.outer.digestSync()}return this.digestSync()}reset(){this.state=Int32Array.from(Rfn),this.buffer=new Uint8Array(ir),this.bufferLength=0,this.bytesHashed=0}digestSync(){let t=this.state.slice(),s=this.buffer.slice(),a=this.bufferLength,c=this.bytesHashed/536870912|0,l=this.bytesHashed<<3;if(s[a++]=128,a>ir-8){for(let d=a;d<ir;++d)s[d]=0;this.hashBufferWith(t,s,0),a=0}for(let d=a;d<ir-8;++d)s[d]=0;let u=new DataView(s.buffer,s.byteOffset,ir);u.setUint32(ir-8,c,!1),u.setUint32(ir-4,l,!1),this.hashBufferWith(t,s,0);let p=new Uint8Array(gfn);return p[0]=t[0]>>>24&255,p[1]=t[0]>>>16&255,p[2]=t[0]>>>8&255,p[3]=t[0]&255,p[4]=t[1]>>>24&255,p[5]=t[1]>>>16&255,p[6]=t[1]>>>8&255,p[7]=t[1]&255,p[8]=t[2]>>>24&255,p[9]=t[2]>>>16&255,p[10]=t[2]>>>8&255,p[11]=t[2]&255,p[12]=t[3]>>>24&255,p[13]=t[3]>>>16&255,p[14]=t[3]>>>8&255,p[15]=t[3]&255,p[16]=t[4]>>>24&255,p[17]=t[4]>>>16&255,p[18]=t[4]>>>8&255,p[19]=t[4]&255,p}static normalizeKey(t){let s=tr(t);if(s.byteLength>ir){let c=new e;c.update(s);let l=c.digestSync(),u=new Uint8Array(ir);return u.set(l),u}let a=new Uint8Array(ir);return a.set(s),a}hashBuffer(t,s){this.hashBufferWith(this.state,t,s)}hashBufferWith(t,s,a){let c=this.w??=new Int32Array(80),l=t[0],u=t[1],p=t[2],d=t[3],m=t[4];for(let S=0;S<16;++S)c[S]=(s[a+S*4]&255)<<24|(s[a+S*4+1]&255)<<16|(s[a+S*4+2]&255)<<8|s[a+S*4+3]&255;for(let S=16;S<80;++S){let v=c[S-3]^c[S-8]^c[S-14]^c[S-16];c[S]=v<<1|v>>>31}for(let S=0;S<80;++S){let v=S<20?0:S<40?1:S<60?2:3,T=((l<<5|l>>>27)+(v===0?u&p^~u&d:v===2?u&p^u&d^p&d:u^p^d)|0)+(m+(Cuo[v]+c[S]|0)|0)|0;m=d,d=p,p=u<<30|u>>>2,u=l,l=T}t[0]=t[0]+l|0,t[1]=t[1]+u|0,t[2]=t[2]+p|0,t[3]=t[3]+d|0,t[4]=t[4]+m|0}}});import{createHash as Sfn,createHmac as Tuo}from"node:crypto";function Duo(){return class{digestLength=20;secret;hash;isHmac;finished=!1;constructor(t){this.secret=t,this.isHmac=!!t,this.hash=this.createHash()}update(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");this.hash.update(t)}async digest(){let t;return this.isHmac?(this.finished=!0,t=this.hash.digest()):t=this.hash.copy().digest(),new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}reset(){this.hash=this.createHash(),this.finished=!1}createHash(){return this.secret?Tuo("sha1",buo(this.secret)):Sfn("sha1")}}}function buo(e){return typeof e=="string"?e:ArrayBuffer.isView(e)?Buffer.from(e.buffer,e.byteOffset,e.byteLength):Buffer.from(e)}var Auo,TCe,yfn=b(()=>{NZ();Auo=(()=>{try{return Sfn("sha1"),!0}catch{return!1}})(),TCe=Auo?Duo():Cm});var Euo,xuo,Puo,VZ,$uo,qZ,Ifn=b(()=>{We();NZ();({digest:Euo,sign:xuo,importKey:Puo}=globalThis?.crypto?.subtle??{}),VZ=typeof Euo=="function"&&typeof xuo=="function"&&typeof Puo=="function"?globalThis.crypto.subtle:void 0,$uo=8*1024*1024,qZ=class{digestLength=20;secret;pending=[];pendingBytes=0;fallback;finished=!1;constructor(t){t&&(this.secret=tr(t))}update(t){if(this.finished)throw new Error("Attempted to update an already finished HMAC.");if(this.fallback){this.fallback.update(t);return}this.pending.push(t.slice()),this.pendingBytes+=t.byteLength,this.pendingBytes>=$uo&&this.switchToFallback()}async digest(){if(this.fallback)return this.fallback.digest();if(this.secret&&this.finished)throw new Error("Attempted to digest an already finished HMAC.");let t=vc(this.pending);if(VZ){if(this.secret){this.finished=!0;let c=await VZ.importKey("raw",this.secret,{name:"HMAC",hash:"SHA-1"},!1,["sign"]),l=await VZ.sign("HMAC",c,t);return new Uint8Array(l)}let a=await VZ.digest("SHA-1",t);return new Uint8Array(a)}let s=new Cm(this.secret);return s.update(t),s.digest()}reset(){this.pending=[],this.pendingBytes=0,this.fallback=void 0,this.finished=!1}switchToFallback(){let t=new Cm(this.secret);for(let s of this.pending)t.update(s);this.fallback=t,this.pending=[],this.pendingBytes=0}}});var _fn={};Un(_fn,{Sha1:()=>TCe,Sha1Js:()=>Cm,Sha1Node:()=>TCe,Sha1WebCrypto:()=>qZ,Sha256:()=>ni,Sha256Js:()=>Sl,Sha256Node:()=>ni});var hfn=b(()=>{NZ();yfn();Ifn();zi()});var uDn=Bn(_=>{var{getFlexibleChecksumsPlugin:wg,NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS:wuo,NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS:kuo,resolveFlexibleChecksumsConfig:Luo}=(Zdn(),ye(Qdn)),{awsEndpointFunctions:Muo,emitWarningIfUnsupportedVersion:Guo,createDefaultUserAgentProvider:Ouo,NODE_APP_ID_CONFIG_OPTIONS:Nuo,getAwsRegionExtensionConfiguration:Vuo,resolveAwsRegionExtensionConfiguration:quo,resolveUserAgentConfig:Fuo,resolveHostHeaderConfig:Buo,getUserAgentPlugin:Uuo,getHostHeaderPlugin:Huo,getLoggerPlugin:juo,getRecursionDetectionPlugin:zuo}=(sn(),ye(Wi)),{getThrow200ExceptionsPlugin:kg,getSsecPlugin:jv,getLocationConstraintPlugin:Kuo,getS3ExpiresMiddlewarePlugin:agn,getCheckContentLengthHeaderPlugin:Wuo,S3RestXmlProtocol:Quo,NODE_USE_ARN_REGION_CONFIG_OPTIONS:Zuo,NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS:Yuo,resolveS3Config:Xuo,getValidateBucketNamePlugin:Juo,getAddExpectContinuePlugin:epo,getRegionRedirectMiddlewarePlugin:tpo,getS3ExpressPlugin:npo,getS3ExpressHttpSigningPlugin:spo}=(rfn(),ye(sfn)),{getHttpAuthSchemeEndpointRuleSetPlugin:rpo,DefaultIdentityProviderConfig:opo,getHttpSigningPlugin:apo,createPaginator:kk}=(Hr(),ye(SA)),{normalizeProvider:ign,getSmithyContext:cgn,makeBuilder:ipo,ServiceException:cpo,NoOpLogger:lpo,emitWarningIfUnsupportedVersion:upo,loadConfigsForDefaultMode:ppo,getDefaultExtensionConfiguration:dpo,resolveDefaultRuntimeConfig:mpo,Client:lgn,createWaiter:Lg,checkExceptions:wJ,WaiterState:Zp,createAggregatedClient:fpo}=(nt(),ye(Ou)),{Command:gpo}=(nt(),ye(Ou));_.$Command=gpo;_.__Client=lgn;var{resolveDefaultsModeConfig:Rpo,loadConfig:zc,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:Spo,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:ypo,NODE_REGION_CONFIG_OPTIONS:Ipo,NODE_REGION_CONFIG_FILE_OPTIONS:_po,resolveRegionConfig:hpo}=(tn(),ye(wa)),{BinaryDecisionDiagram:vpo,EndpointCache:Cpo,decideEndpoint:Tpo,customEndpointFunctions:Apo,resolveParams:Dpo,getEndpointPlugin:bpo,resolveEndpointConfig:Epo}=($n(),ye(mR)),{eventStreamSerdeProvider:xpo,resolveEventStreamSerdeConfig:Ppo}=(Wre(),ye(Kre)),{parseUrl:$po,getHttpHandlerExtensionConfiguration:wpo,resolveHttpHandlerRuntimeConfig:kpo,getContentLengthPlugin:Lpo}=(Me(),ye(bo)),{DEFAULT_RETRY_MODE:Mpo,NODE_RETRY_MODE_CONFIG_OPTIONS:Gpo,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:Opo,resolveRetryConfig:Npo,getRetryPlugin:Vpo}=(ka(),ye(dA)),{TypeRegistry:ugn,getSchemaSerdePlugin:qpo}=(Mt(),ye(FT)),{resolveAwsSdkSigV4Config:Fpo,resolveAwsSdkSigV4AConfig:Bpo,AwsSdkSigV4Signer:Upo,AwsSdkSigV4ASigner:Hpo,NODE_SIGV4A_CONFIG_OPTIONS:jpo,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:zpo}=(zr(),ye(S_)),{SignatureV4MultiRegion:pgn}=$R(),{defaultProvider:Kpo}=H_(),{Sha256:Wpo,Md5:Qpo,readableStreamHasher:Zpo}=(zi(),ye(sA)),{toUtf8:Ypo,fromUtf8:Xpo,sdkStreamMixin:Jpo,getAwsChunkedEncodingStream:edo,toBase64:tdo,fromBase64:ndo,calculateBodyLength:sdo}=(We(),ye(ji)),{streamCollector:rdo,NodeHttpHandler:odo}=ffn(),{Sha1:ado}=(hfn(),ye(_fn)),ss="ref",Kt="argv",dgn="backend",Xp="authSchemes",Wc="disableDoubleEncoding",Qc="signingName",Em="signingRegion",UCe="signingRegionSet",ot=-1,Fn=!0,Kc=!1,ACe="isSet",cu="booleanEquals",Dn="stringEquals",ha="coalesce",ja="substring",kr="",vfn="aws.partition",mgn="partitionResult",Cfn="accessPointSuffix",Tfn="regionPrefix",FZ=e=>"outpostId_ssa_"+e+kr,fgn="hardwareType",DCe="ite",Tm="isValidHostLabel",xm="sigv4",Afn="aws.isVirtualHostableS3Bucket",ggn="url",za="getAttr",Rgn="bucketArn",Am="--",Sgn="arnType",Dfn="accesspoint",bCe=e=>"accessPointName_ssa_"+e+kr,HCe="s3-object-lambda",hk="s3-outposts",bfn="bucketPartition",ygn="us-east-1",Efn="outpostType",uc="name",vk="s3",ECe="{url#scheme}://{Bucket}.{url#authority}{url#path}",BZ="{url#scheme}://{url#authority}{url#path}",xfn="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",Pfn="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",$fn="https://{Bucket}.s3.{partitionResult#dnsSuffix}",wfn=e=>"{url#scheme}://{accessPointName_ssa_"+e+"}-{bucketArn#accountId}.{url#authority}{url#path}",kfn=e=>"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName_ssa_"+e+"}`",jCe="sigv4a",Lfn="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",Mfn="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",Gfn="https://s3.{partitionResult#dnsSuffix}",Ofn={[ss]:"UseFIPS"},Nfn={[ss]:"UseDualStack"},oo={[ss]:"Bucket"},xCe={fn:za,[Kt]:[{[ss]:mgn},uc]},Vfn={[ss]:ggn},Bv={[ss]:"Region"},Dm={[ss]:Rgn},qfn={[ss]:Sgn},PCe={[ss]:"accessPointName_ssa_1"},UZ={fn:za,[Kt]:[Dm,"region"]},Ffn={[ss]:fgn},$Ce={fn:za,[Kt]:[Dm,"service"]},Bfn={fn:za,[Kt]:[Dm,"accountId"]},HZ={[dgn]:"S3Express",[Xp]:[{[Wc]:!0,[uc]:"{_s3e_auth}",[Qc]:"s3express",[Em]:"{Region}"}]},Ufn={[dgn]:"S3Express",[Xp]:[{[Wc]:!0,[uc]:xm,[Qc]:"s3express",[Em]:"{Region}"}]},jZ={[Xp]:[{[Wc]:!0,[uc]:jCe,[Qc]:hk,[UCe]:["*"]},{[Wc]:!0,[uc]:xm,[Qc]:hk,[Em]:"{Region}"}]},ro={[Xp]:[{[Wc]:!0,[uc]:xm,[Qc]:vk,[Em]:ygn}]},cr={[Xp]:[{[Wc]:!0,[uc]:xm,[Qc]:vk,[Em]:"{Region}"}]},wCe={[Xp]:[{[Wc]:!0,[uc]:xm,[Qc]:HCe,[Em]:"{bucketArn#region}"}]},_k={[Xp]:[{[Wc]:!0,[uc]:xm,[Qc]:vk,[Em]:"{bucketArn#region}"}]},Hfn={[Xp]:[{[Wc]:!0,[uc]:jCe,[Qc]:hk,[UCe]:["*"]},{[Wc]:!0,[uc]:xm,[Qc]:hk,[Em]:"{bucketArn#region}"}]},kCe={[Xp]:[{[Wc]:!0,[uc]:xm,[Qc]:HCe,[Em]:"{Region}"}]},jfn=[Bv],zfn=[{[ss]:"Endpoint"}],LCe=[oo],Kfn=[oo,0,7,!0],Wfn=[Dm,"resourceId[1]"],ido=["*"],Qfn={conditions:[[ACe,jfn],[cu,[{[ss]:"Accelerate"},Fn]],[cu,[Ofn,Fn]],[cu,[Nfn,Fn]],[ACe,zfn],[ACe,LCe],[Dn,[{fn:ha,[Kt]:[{fn:ja,[Kt]:[oo,0,6,Fn]},kr]},"--x-s3"]],[Dn,[{fn:ha,[Kt]:[{fn:ja,[Kt]:Kfn},kr]},"--xa-s3"]],[vfn,jfn,mgn],[ja,Kfn,Cfn],[Dn,[{[ss]:Cfn},"--op-s3"]],[ja,[oo,8,12,Fn],Tfn],[ja,[oo,32,49,Fn],FZ(2)],[ja,[oo,49,50,Fn],fgn],[cu,[{[ss]:"ForcePathStyle"},Fn]],[Dn,[xCe,"aws-cn"]],[DCe,[Nfn,".dualstack",kr],"_s3e_ds"],[Tm,[{[ss]:FZ(2)},Kc]],[DCe,[Ofn,"-fips",kr],"_s3e_fips"],[DCe,[{fn:ha,[Kt]:[{[ss]:"DisableS3ExpressSessionAuth"},Kc]},xm,"sigv4-s3express"],"_s3e_auth"],[Afn,[oo,Kc]],["parseURL",zfn,ggn],[cu,[{fn:ha,[Kt]:[{[ss]:"UseS3ExpressControlEndpoint"},Kc]},Fn]],[Afn,[oo,Fn]],[Dn,[{fn:za,[Kt]:[Vfn,"scheme"]},"http"]],[Tm,[Bv,Kc]],["aws.parseArn",LCe,Rgn],[za,[{fn:"split",[Kt]:[oo,Am,0]},"[-2]"],"s3expressAvailabilityZoneId"],[Dn,[{fn:ha,[Kt]:[{fn:ja,[Kt]:[oo,0,4,Kc]},kr]},"arn:"]],[Dn,[{fn:ha,[Kt]:[{fn:ja,[Kt]:[oo,16,18,Fn]},kr]},Am]],[cu,[{fn:za,[Kt]:[Vfn,"isIp"]},Fn]],[Dn,[{fn:ha,[Kt]:[{fn:ja,[Kt]:[oo,21,23,Fn]},kr]},Am]],[Dn,[{fn:ha,[Kt]:[{fn:ja,[Kt]:[oo,27,29,Fn]},kr]},Am]],[Dn,[{[ss]:Tfn},"beta"]],["uriEncode",LCe,"uri_encoded_bucket"],[Tm,[Bv,Fn]],[cu,[{fn:ha,[Kt]:[{[ss]:"UseObjectLambdaEndpoint"},Kc]},Fn]],[za,[Dm,"resourceId[0]"],Sgn],[Dn,[qfn,kr]],[Dn,[qfn,Dfn]],[za,Wfn,bCe(1)],[Dn,[PCe,kr]],[Dn,[UZ,kr]],[Dn,[{fn:ha,[Kt]:[{fn:ja,[Kt]:[oo,14,16,Fn]},kr]},Am]],[Dn,[Ffn,"e"]],[Dn,[Ffn,"o"]],[Dn,[Bv,"aws-global"]],[Dn,[{fn:ha,[Kt]:[{fn:ja,[Kt]:[oo,19,21,Fn]},kr]},Am]],[Dn,[$Ce,HCe]],[cu,[{fn:ha,[Kt]:[{[ss]:"DisableAccessPoints"},Kc]},Fn]],[Dn,[$Ce,hk]],[vfn,[UZ],bfn],[Tm,[PCe,Fn]],[Dn,[{fn:ha,[Kt]:[{fn:ja,[Kt]:[oo,26,28,Fn]},kr]},Am]],[Dn,[{fn:ha,[Kt]:[{fn:ja,[Kt]:[oo,15,17,Fn]},kr]},Am]],[za,[Dm,"resourceId[4]"]],[Dn,[{fn:ha,[Kt]:[{fn:ja,[Kt]:[oo,20,22,Fn]},kr]},Am]],[cu,[{[ss]:"UseGlobalEndpoint"},Fn]],[Dn,[Bv,ygn]],[za,Wfn,FZ(1)],[cu,[{fn:ha,[Kt]:[{[ss]:"UseArnRegion"},Fn]},Fn]],[Tm,[{[ss]:FZ(1)},Kc]],[za,[Dm,"resourceId[2]"],Efn],[Dn,[Bv,UZ]],[Dn,[{fn:za,[Kt]:[{[ss]:bfn},uc]},xCe]],[cu,[{[ss]:"DisableMultiRegionAccessPoints"},Fn]],[Tm,[UZ,Fn]],[Dn,[{fn:za,[Kt]:[Dm,"partition"]},xCe]],[Dn,[Bfn,kr]],[Dn,[$Ce,vk]],[Tm,[Bfn,Kc]],[za,[Dm,"resourceId[3]"],bCe(2)],[Tm,[PCe,Kc]],[Dn,[{[ss]:Efn},Dfn]],[Tm,[{[ss]:bCe(2)},Kc]]],results:[[ot],[ot,"Accelerate cannot be used with FIPS"],[ot,"Cannot set dual-stack in combination with a custom endpoint."],[ot,"A custom endpoint cannot be combined with FIPS"],[ot,"A custom endpoint cannot be combined with S3 Accelerate"],[ot,"Partition does not support FIPS"],[ot,"S3Express does not support S3 Accelerate."],["{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",HZ],[ECe,HZ],[ot,"S3Express bucket name is not a valid virtual hostable name."],["https://s3express-control{_s3e_fips}{_s3e_ds}.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",Ufn],["https://{Bucket}.s3express{_s3e_fips}-{s3expressAvailabilityZoneId}{_s3e_ds}.{Region}.{partitionResult#dnsSuffix}",HZ],[ot,"Unrecognized S3Express bucket name format."],[BZ,HZ],["https://s3express-control{_s3e_fips}{_s3e_ds}.{Region}.{partitionResult#dnsSuffix}",Ufn],[ot,"Expected a endpoint to be specified but no endpoint was found"],["https://{Bucket}.ec2.{url#authority}",jZ],["https://{Bucket}.ec2.s3-outposts.{Region}.{partitionResult#dnsSuffix}",jZ],["https://{Bucket}.op-{outpostId_ssa_2}.{url#authority}",jZ],["https://{Bucket}.op-{outpostId_ssa_2}.s3-outposts.{Region}.{partitionResult#dnsSuffix}",jZ],[ot,'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"'],[ot,"Invalid Outposts Bucket alias - it must be a valid bucket name."],[ot,"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`."],[ot,"Custom endpoint `{Endpoint}` was not a valid URI"],[ot,"S3 Accelerate cannot be used in this region"],["https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",ro],["https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",cr],["https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",ro],["https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",cr],["https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",ro],["https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",cr],["https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",ro],["https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",cr],[xfn,ro],[ECe,ro],[xfn,cr],[ECe,cr],[Pfn,ro],[Pfn,cr],[$fn,ro],[$fn,cr],["https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",cr],[ot,"Invalid region: region was not a valid DNS name."],[ot,"S3 Object Lambda does not support Dual-stack"],[ot,"S3 Object Lambda does not support S3 Accelerate"],[ot,"Access points are not supported for this operation"],[ot,"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`"],[ot,"Invalid ARN: Missing account id"],[wfn(1),wCe],["https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",wCe],["https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",wCe],[ot,kfn(1)],[ot,"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`"],[ot,"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)"],[ot,"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`"],[ot,"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`."],[ot,"Invalid ARN: bucket ARN is missing a region"],[ot,"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided"],[ot,"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`"],[ot,"Access Points do not support S3 Accelerate"],["https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",_k],["https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",_k],["https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",_k],[wfn(1),_k],["https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",_k],[ot,"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}"],[ot,"S3 MRAP does not support dual-stack"],[ot,"S3 MRAP does not support FIPS"],[ot,"S3 MRAP does not support S3 Accelerate"],[ot,"Invalid configuration: Multi-Region Access Point ARNs are disabled."],["https://{accessPointName_ssa_1}.accesspoint.s3-global.{partitionResult#dnsSuffix}",{[Xp]:[{[Wc]:Fn,name:jCe,[Qc]:vk,[UCe]:ido}]}],[ot,"Client was configured for partition `{partitionResult#name}` but bucket referred to partition `{bucketArn#partition}`"],[ot,"Invalid Access Point Name"],[ot,"S3 Outposts does not support Dual-stack"],[ot,"S3 Outposts does not support FIPS"],[ot,"S3 Outposts does not support S3 Accelerate"],[ot,"Invalid Arn: Outpost Access Point ARN contains sub resources"],["https://{accessPointName_ssa_2}-{bucketArn#accountId}.{outpostId_ssa_1}.{url#authority}",Hfn],["https://{accessPointName_ssa_2}-{bucketArn#accountId}.{outpostId_ssa_1}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",Hfn],[ot,kfn(2)],[ot,"Expected an outpost type `accesspoint`, found {outpostType}"],[ot,"Invalid ARN: expected an access point name"],[ot,"Invalid ARN: Expected a 4-component resource"],[ot,"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId_ssa_1}`"],[ot,"Invalid ARN: The Outpost Id was not set"],[ot,"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})"],[ot,"Invalid ARN: No ARN type specified"],[ot,"Invalid ARN: `{Bucket}` was not a valid ARN"],[ot,"Path-style addressing cannot be used with ARN buckets"],["https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",ro],["https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",cr],["https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",ro],["https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",cr],["https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",ro],["https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",cr],[Lfn,ro],[Lfn,cr],[Mfn,ro],[Mfn,cr],["https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",cr],[ot,"Path-style addressing cannot be used with S3 Accelerate"],[BZ,kCe],["https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",kCe],["https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",kCe],["https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",ro],["https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",cr],["https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",ro],["https://s3-fips.{Region}.{partitionResult#dnsSuffix}",cr],["https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",ro],["https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",cr],[BZ,ro],[BZ,cr],[Gfn,ro],[Gfn,cr],["https://s3.{Region}.{partitionResult#dnsSuffix}",cr],[ot,"A region must be set when sending requests to S3."]]},cdo=2,$=1e8,ldo=new Int32Array([-1,1,-1,0,3,$+115,1,424,4,2,272,5,3,233,6,4,85,7,5,15,8,8,9,$+115,16,10,13,18,11,13,19,12,13,22,$+14,13,35,14,$+42,36,$+103,435,6,271,16,7,270,17,8,19,18,14,501,106,9,20,24,10,21,24,11,22,24,12,23,24,13,547,24,14,77,25,20,73,26,26,27,78,37,28,$+86,38,$+86,29,39,47,30,48,$+58,31,50,32,$+85,51,33,136,55,$+76,34,59,35,$+84,60,39,36,61,37,$+83,62,38,146,63,41,$+46,61,40,$+83,62,41,150,64,42,$+54,66,43,$+53,70,44,$+52,71,45,$+81,73,46,$+80,74,$+78,$+79,40,48,$+57,41,$+57,49,42,185,50,48,62,51,49,$+45,52,51,53,526,60,56,54,62,$+55,55,63,57,$+46,62,$+55,57,64,58,$+54,66,59,$+53,69,60,$+65,70,61,$+52,72,$+64,$+51,49,$+45,63,51,64,526,60,67,65,62,$+55,66,63,68,$+46,62,$+55,68,64,69,$+54,66,70,$+53,68,$+47,71,70,72,$+52,72,$+50,$+51,25,74,$+42,46,$+39,75,57,76,$+41,58,$+40,$+41,26,$+88,78,28,$+87,79,34,82,80,35,81,545,36,$+103,$+115,46,$+97,83,57,84,$+99,58,$+98,$+99,5,101,86,8,87,$+115,16,88,89,18,91,89,19,90,92,21,97,95,19,93,92,21,98,95,21,97,94,22,$+14,95,35,96,$+42,36,$+103,$+42,22,$+13,98,35,99,$+42,36,$+101,100,46,$+110,$+111,6,214,102,7,208,103,8,119,104,14,118,105,21,106,$+23,26,107,502,37,108,$+86,38,$+86,109,39,112,110,48,$+58,111,50,136,$+85,40,113,$+57,41,$+57,114,42,115,500,48,$+56,116,52,117,$+72,65,$+69,$+72,21,501,$+23,9,120,124,10,121,124,11,122,124,12,123,124,13,202,124,14,195,125,20,190,126,21,127,$+23,23,128,129,24,189,129,26,130,197,37,131,$+86,38,$+86,132,39,159,133,48,$+58,134,50,135,$+85,51,141,136,55,$+76,137,59,138,$+84,60,$+83,139,61,140,$+83,63,$+83,$+46,55,$+76,142,59,143,$+84,60,148,144,61,145,$+83,62,147,146,63,150,$+46,63,153,$+46,61,149,$+83,62,153,150,64,151,$+54,66,152,$+53,70,$+82,$+52,64,154,$+54,66,155,$+53,70,156,$+52,71,157,$+81,73,158,$+80,74,$+77,$+79,40,160,$+57,41,$+57,161,42,185,162,48,174,163,49,$+45,164,51,165,526,60,168,166,62,$+55,167,63,169,$+46,62,$+55,169,64,170,$+54,66,171,$+53,69,172,$+65,70,173,$+52,72,$+63,$+51,49,$+45,175,51,176,526,60,179,177,62,$+55,178,63,180,$+46,62,$+55,180,64,181,$+54,66,182,$+53,68,$+47,183,70,184,$+52,72,$+48,$+51,48,$+56,186,52,187,$+72,65,$+69,188,67,$+70,$+71,25,$+36,$+42,21,191,$+23,25,192,$+42,30,194,193,46,$+34,$+36,46,$+33,$+35,21,196,$+23,26,$+88,197,28,$+87,198,34,201,199,35,200,545,36,$+101,$+115,46,$+95,$+96,17,203,$+22,20,204,$+21,21,205,550,33,206,550,44,$+16,207,45,$+18,$+20,8,209,215,16,210,220,18,211,220,19,212,224,20,213,227,21,231,401,8,218,215,19,216,$+9,20,217,227,21,231,$+9,16,219,220,18,223,220,19,221,224,20,222,227,21,231,$+12,19,226,224,20,225,$+9,21,$+9,$+12,20,230,227,21,228,$+9,30,229,$+9,34,$+7,$+9,21,231,415,30,232,$+8,34,$+7,$+8,4,$+2,234,5,235,480,6,271,236,7,270,237,8,238,491,9,239,243,10,240,243,11,241,243,12,242,243,13,547,243,14,266,244,20,264,245,26,246,267,37,247,$+86,38,$+86,248,39,249,518,40,250,$+57,41,$+57,251,42,538,252,48,$+43,253,49,$+45,254,51,255,526,60,258,256,62,$+55,257,63,259,$+46,62,$+55,259,64,260,$+54,66,261,$+53,69,262,$+65,70,263,$+52,72,$+62,$+51,25,265,$+42,46,$+31,$+32,26,$+88,267,28,$+87,268,34,269,544,46,$+93,$+94,8,397,$+9,8,407,$+9,3,346,273,4,$+3,274,5,284,275,8,276,$+115,15,$+5,277,16,278,281,18,279,281,19,280,281,22,$+14,281,35,282,$+42,36,$+102,283,46,$+106,$+107,6,405,285,7,395,286,8,295,287,14,501,288,26,289,502,37,290,$+86,38,$+86,291,39,292,307,40,293,$+57,41,$+57,294,42,335,500,9,296,300,10,297,300,11,298,300,12,299,300,13,394,300,14,339,301,15,$+5,302,20,337,303,26,304,341,37,305,$+86,38,$+86,306,39,309,307,48,$+58,308,50,$+74,$+85,40,310,$+57,41,$+57,311,42,335,312,48,324,313,49,$+45,314,51,315,526,60,318,316,62,$+55,317,63,319,$+46,62,$+55,319,64,320,$+54,66,321,$+53,69,322,$+65,70,323,$+52,72,$+61,$+51,49,$+45,325,51,326,526,60,329,327,62,$+55,328,63,330,$+46,62,$+55,330,64,331,$+54,66,332,$+53,68,$+47,333,70,334,$+52,72,$+49,$+51,48,$+56,336,52,$+67,$+72,25,338,$+42,46,$+27,$+28,15,$+5,340,26,$+88,341,28,$+87,342,34,345,343,35,344,545,36,$+102,$+115,46,$+91,$+92,4,$+2,347,5,357,348,8,349,$+115,15,$+5,350,16,351,354,18,352,354,19,353,354,22,$+14,354,35,355,$+42,36,$+43,356,46,$+104,$+105,6,405,358,7,395,359,8,360,491,9,361,365,10,362,365,11,363,365,12,364,365,13,394,365,14,389,366,15,$+5,367,20,387,368,26,369,391,37,370,$+86,38,$+86,371,39,372,518,40,373,$+57,41,$+57,374,42,538,375,48,$+43,376,49,$+45,377,51,378,526,60,381,379,62,$+55,380,63,382,$+46,62,$+55,382,64,383,$+54,66,384,$+53,69,385,$+65,70,386,$+52,72,$+60,$+51,25,388,$+42,46,$+25,$+26,15,$+5,390,26,$+88,391,28,$+87,392,34,393,544,46,$+89,$+90,15,$+5,547,8,396,$+9,15,$+5,397,16,398,410,18,399,410,19,400,410,20,401,$+9,27,402,$+12,29,$+11,403,31,$+11,404,32,$+11,422,8,406,$+9,15,$+5,407,16,408,410,18,409,410,19,411,410,20,$+12,$+9,20,414,412,22,413,$+9,34,$+10,$+9,22,416,415,27,419,$+12,27,418,417,34,$+10,$+12,34,$+10,419,43,$+11,420,47,$+11,421,53,$+11,422,54,$+11,423,56,$+11,$+12,2,$+1,425,3,478,426,4,$+4,427,5,438,428,8,429,$+115,16,430,433,18,431,433,19,432,433,22,$+14,433,35,434,$+42,36,$+44,435,46,$+112,436,57,437,$+114,58,$+113,$+114,6,$+6,439,7,$+6,440,8,450,441,14,501,442,26,443,502,37,444,$+86,38,$+86,445,39,446,465,40,447,$+57,41,$+57,448,42,471,449,48,$+44,500,9,451,455,10,452,455,11,453,455,12,454,455,13,547,455,14,473,456,15,460,457,20,458,461,25,459,$+42,46,$+37,$+38,20,540,461,26,462,474,37,463,$+86,38,$+86,464,39,467,465,48,$+58,466,50,$+75,$+85,40,468,$+57,41,$+57,469,42,471,470,48,$+44,524,48,$+44,472,52,$+68,$+72,26,$+88,474,28,$+87,475,34,$+100,476,35,477,545,36,$+44,$+115,4,$+2,479,5,488,480,8,481,$+115,16,482,485,18,483,485,19,484,485,22,$+14,485,35,486,$+42,36,$+43,487,46,$+108,$+109,6,$+6,489,7,$+6,490,8,503,491,14,501,492,26,493,502,37,494,$+86,38,$+86,495,39,496,518,40,497,$+57,41,$+57,498,42,538,499,48,$+43,500,49,$+45,526,26,$+88,502,28,$+87,$+115,9,504,508,10,505,508,11,506,508,12,507,508,13,547,508,14,541,509,15,513,510,20,511,514,25,512,$+42,46,$+29,$+30,20,540,514,26,515,542,37,516,$+86,38,$+86,517,39,520,518,48,$+58,519,50,$+73,$+85,40,521,$+57,41,$+57,522,42,538,523,48,$+43,524,49,$+45,525,51,529,526,60,$+55,527,62,$+55,528,63,$+55,$+46,60,532,530,62,$+55,531,63,533,$+46,62,$+55,533,64,534,$+54,66,535,$+53,69,536,$+65,70,537,$+52,72,$+59,$+51,48,$+43,539,52,$+66,$+72,25,$+24,$+42,26,$+88,542,28,$+87,543,34,$+100,544,35,546,545,36,$+42,$+115,36,$+43,$+115,17,548,$+22,20,549,$+21,33,552,550,44,$+17,551,45,$+19,$+20,44,$+15,553,45,$+15,$+20]),udo=vpo.from(ldo,cdo,Qfn.conditions,Qfn.results),pdo=new Cpo({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),Ign=(e,t={})=>pdo.get(e,()=>Tpo(udo,{endpointParams:e,logger:t.logger}));Apo.aws=Muo;var ddo=e=>async(t,s,a)=>{if(!a)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let c=await e(t,s,a),l=cgn(s)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!l)throw new Error(`getEndpointParameterInstructions() is not defined on '${s.commandName}'`);let u=await Dpo(a,{getEndpointParameterInstructions:l},t);return Object.assign(c,u)},mdo=async(e,t,s)=>({operation:cgn(t).operation,region:await ign(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),fdo=ddo(mdo);function _gn(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}function hgn(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}var gdo=(e,t,s)=>c=>{let u=e(c).properties?.authSchemes;if(!u)return t(c);let p=[];for(let d of u){let{name:m,properties:S={},...v}=d,T=m.toLowerCase();m!==T&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${m}' to '${T}'`);let x;if(T==="sigv4a"){x="aws.auth#sigv4a";let G=u.find(O=>{let U=O.name.toLowerCase();return U!=="sigv4a"&&U.startsWith("sigv4")});if(pgn.sigv4aDependency()==="none"&&G)continue}else if(T.startsWith("sigv4"))x="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${T}'`);let w=s[x];if(!w)throw new Error(`Could not find HttpAuthOption create function for '${x}'`);let L=w(c);L.schemeId=x,L.signingProperties={...L.signingProperties||{},...v,...S},p.push(L)}return p},Rdo=e=>{let t=[];switch(e.operation){default:t.push(_gn(e)),t.push(hgn(e))}return t},Sdo=gdo(Ign,Rdo,{"aws.auth#sigv4":_gn,"aws.auth#sigv4a":hgn}),ydo=e=>{let t=Fpo(e),s=Bpo(t);return Object.assign(s,{authSchemePreference:ign(e.authSchemePreference??[])})},Ido=e=>Object.assign(e,{useFipsEndpoint:e.useFipsEndpoint??!1,useDualstackEndpoint:e.useDualstackEndpoint??!1,forcePathStyle:e.forcePathStyle??!1,useAccelerateEndpoint:e.useAccelerateEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,disableMultiregionAccessPoints:e.disableMultiregionAccessPoints??!1,defaultSigningName:"s3",clientContextParams:e.clientContextParams??{}}),_do={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},pe=ipo(_do,"AmazonS3","S3Client",bpo),Pi={Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}},hdo={DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"},CopySource:{type:"contextParams",name:"CopySource"}},vdo={UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},DisableAccessPoints:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}},Be={UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}},vgn={DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}},Ir={Bucket:{type:"contextParams",name:"Bucket"}},Cdo={},Tdo={UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0}},kJ={Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}},Ado={UseObjectLambdaEndpoint:{type:"staticContextParams",value:!0}},It=(e,t,s,a)=>[kg(s)],zv=(e,t,s,a)=>[kg(s),jv(s)],Ddo=(e,t,s,a)=>[kg(s),Kuo(s)],Ko=(e,t,s,a)=>[wg(s,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})],Ps=(e,t,s,a)=>[],Mg=(e,t,s,a)=>[wg(s,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),kg(s)],bdo=(e,t,s,a)=>[wg(s,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1","SHA512","MD5","XXHASH64","XXHASH3","XXHASH128"]})],Edo=(e,t,s,a)=>[wg(s,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1","SHA512","MD5","XXHASH64","XXHASH3","XXHASH128"]}),jv(s),agn(s)],xdo=(e,t,s,a)=>[kg(s),jv(s),agn(s)],Cgn=(e,t,s,a)=>[wg(s,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1})],Tgn=(e,t,s,a)=>[wg(s,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),kg(s)],Pdo=(e,t,s,a)=>[wg(s,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),Wuo(s),kg(s),jv(s)],$do=(e,t,s,a)=>[jv(s)],wdo=(e,t,s,a)=>[wg(s,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),kg(s),jv(s)],vs=class e extends cpo{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}},zZ=class e extends vs{name="NoSuchUpload";$fault="client";constructor(t){super({name:"NoSuchUpload",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},KZ=class e extends vs{name="AccessDenied";$fault="client";constructor(t){super({name:"AccessDenied",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},WZ=class e extends vs{name="ObjectNotInActiveTierError";$fault="client";constructor(t){super({name:"ObjectNotInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},QZ=class e extends vs{name="BucketAlreadyExists";$fault="client";constructor(t){super({name:"BucketAlreadyExists",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},ZZ=class e extends vs{name="BucketAlreadyOwnedByYou";$fault="client";constructor(t){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},YZ=class e extends vs{name="NoSuchBucket";$fault="client";constructor(t){super({name:"NoSuchBucket",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},XZ=class e extends vs{name="NoSuchKey";$fault="client";constructor(t){super({name:"NoSuchKey",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},JZ=class e extends vs{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(t){super({name:"InvalidObjectState",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.StorageClass=t.StorageClass,this.AccessTier=t.AccessTier}},eY=class e extends vs{name="NoSuchAnnotation";$fault="client";constructor(t){super({name:"NoSuchAnnotation",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},tY=class e extends vs{name="NotFound";$fault="client";constructor(t){super({name:"NotFound",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},nY=class e extends vs{name="InvalidPrefix";$fault="client";constructor(t){super({name:"InvalidPrefix",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},sY=class e extends vs{name="EncryptionTypeMismatch";$fault="client";constructor(t){super({name:"EncryptionTypeMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},rY=class e extends vs{name="InvalidRequest";$fault="client";constructor(t){super({name:"InvalidRequest",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},oY=class e extends vs{name="InvalidWriteOffset";$fault="client";constructor(t){super({name:"InvalidWriteOffset",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},aY=class e extends vs{name="TooManyParts";$fault="client";constructor(t){super({name:"TooManyParts",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},iY=class e extends vs{name="AnnotationLimitExceeded";$fault="client";constructor(t){super({name:"AnnotationLimitExceeded",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},cY=class e extends vs{name="AnnotationNameTooLong";$fault="client";constructor(t){super({name:"AnnotationNameTooLong",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},lY=class e extends vs{name="InvalidAnnotationName";$fault="client";constructor(t){super({name:"InvalidAnnotationName",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},uY=class e extends vs{name="UnsupportedMediaType";$fault="client";constructor(t){super({name:"UnsupportedMediaType",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},pY=class e extends vs{name="IdempotencyParameterMismatch";$fault="client";constructor(t){super({name:"IdempotencyParameterMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},dY=class e extends vs{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(t){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},kdo="Account",Ldo="AnalyticsAndOperator",mY="AccelerateConfiguration",LJ="AccessControlList",Kv="ACL",Agn="AnalyticsConfigurationList",qy="AccessControlPolicy",Dgn="AccessControlTranslation",Ck="AnalyticsConfiguration",Mdo="AnnotationCount",Gdo="AccessDenied",bgn="AbortDate",Odo="AnnotationDirective",Egn="AnnotationEntry",Ndo="AnalyticsExportDestination",Vdo="AnalyticsFilter",qdo="AllowedHeaders",Fdo="AllowedHeader",Bdo="AccountId",xgn="AbortIncompleteMultipartUpload",Zfn="AccessKeyId",Udo="AnnotationList",Hdo="AnnotationLimitExceeded",jdo="AllowedMethods",zdo="AbortMultipartUpload",Kdo="AbortMultipartUploadOutput",Wdo="AbortMultipartUploadRequest",Qdo="AllowedMethod",Lk="AnnotationName",Zdo="AnnotationNameTooLong",Ydo="AllowedOrigins",Xdo="AllowedOrigin",Pgn="AnnotationPayload",Jdo="AccessPointAlias",$gn="AccessPointArn",wgn="AnnotationPrefix",emo="AllowQuotedRecordDelimiter",zCe="AcceptRanges",kgn="AbortRuleId",fY="AbacStatus",tmo="AnalyticsS3BucketDestination",nmo="ApplyServerSideEncryptionByDefault",smo="ArchiveStatus",Lgn="AccessTier",gY="AnnotationTableConfiguration",Mgn="AnnotationTableConfigurationResult",rmo="AnnotationTableConfigurationUpdates",Mk="And",omo="Annotations",ie="Bucket",KCe="BucketArn",amo="BucketAlreadyExists",imo="BucketAccountId",cmo="BucketAlreadyOwnedByYou",Ggn="BlockedEncryptionTypes",WCe="BypassGovernanceRetention",lmo="BucketInfo",va="BucketKeyEnabled",umo="BucketLifecycleConfiguration",pmo="BucketLocationName",RY="BucketLoggingStatus",dmo="BucketLocationType",mmo="BucketNamespace",fmo="BucketName",Ogn="BytesProcessed",Yfn="BlockPublicAcls",Xfn="BlockPublicPolicy",QCe="BucketRegion",Ngn="BytesReturned",Vgn="BytesScanned",Gk="Body",ZCe="Buckets",qgn="Checksum",Vt="ChecksumAlgorithm",gmo="CannedACL",Rmo="CreateBucket",MCe="CreateBucketConfiguration",Smo="CreateBucketMetadataConfiguration",ymo="CreateBucketMetadataConfigurationRequest",Imo="CreateBucketMetadataTableConfiguration",_mo="CreateBucketMetadataTableConfigurationRequest",hmo="CreateBucketOutput",vmo="CreateBucketRequest",Wv="CacheControl",ao="ChecksumCRC32",io="ChecksumCRC32C",co="ChecksumCRC64NVME",Ok="Cache-Control",Cmo="CreationDate",Nk="Content-Disposition",Qv="ContentDisposition",Tmo="ContinuationEvent",Vk="Content-Encoding",Zv="ContentEncoding",Amo="CloudFunction",Dmo="CloudFunctionConfiguration",Yv="ContentLanguage",qk="Content-Language",Xv="Content-Length",Jv="ContentLength",rs="Content-MD5",lo="ChecksumMD5",os="ContentMD5",bmo="CompletedMultipartUpload",Emo="CompleteMultipartUploadOutput",xmo="CreateMultipartUploadOutput",Pmo="CompleteMultipartUploadResult",$mo="CompleteMultipartUploadRequest",wmo="CreateMultipartUploadRequest",Fgn="CompleteMultipartUpload",kmo="CreateMultipartUpload",YCe="ChecksumMode",Lmo="CopyObject",Mmo="CopyObjectOutput",Bgn="CopyObjectResult",SY="CORSConfiguration",XCe="CORSRules",JCe="CORSRule",Gmo="CopyObjectRequest",Omo="CommonPrefix",Nmo="CommonPrefixList",Vmo="CompletedPartList",Ugn="CopyPartResult",qmo="CompletedPart",MJ="CommonPrefixes",eTe="ContentRange",Fmo="ConfirmRemoveSelfBucketAccess",Hgn="Content-Range",eC="ConfigurationState",uo="ChecksumSHA1",po="ChecksumSHA256",mo="ChecksumSHA512",jgn="CopySourceIfMatch",zgn="CopySourceIfModifiedSince",Kgn="CopySourceIfNoneMatch",Wgn="CopySourceIfUnmodifiedSince",Bmo="CreateSessionOutput",Umo="CreateSessionResult",Hmo="CopySourceRange",jmo="CreateSessionRequest",Qgn="CopySourceSSECustomerAlgorithm",tTe="CopySourceSSECustomerKey",Zgn="CopySourceSSECustomerKeyMD5",Ygn="CSV",Xgn="CopySourceVersionId",zmo="CSVInput",Kmo="CSVOutput",Jgn="CopySource",Wmo="CreateSession",Ka="ChecksumType",Fk="Content-Type",Qmo="ClientToken",tC="ContentType",Zmo="CompressionType",Ca="ContinuationToken",fo="ChecksumXXHASH64",go="ChecksumXXHASH3",Ro="ChecksumXXHASH128",eRn="Condition",Ymo="Code",Xmo="Comments",tRn="Contents",Jmo="Cont",Jfn="Credentials",nC="Days",efo="DaysAfterInitiation",tfo="DeleteBucket",nfo="DeleteBucketAnalyticsConfiguration",sfo="DeleteBucketAnalyticsConfigurationRequest",rfo="DeleteBucketCors",ofo="DeleteBucketCorsRequest",afo="DeleteBucketEncryption",ifo="DeleteBucketEncryptionRequest",cfo="DeleteBucketInventoryConfiguration",lfo="DeleteBucketInventoryConfigurationRequest",ufo="DeleteBucketIntelligentTieringConfiguration",pfo="DeleteBucketIntelligentTieringConfigurationRequest",dfo="DeleteBucketLifecycle",mfo="DeleteBucketLifecycleRequest",ffo="DeleteBucketMetadataConfiguration",gfo="DeleteBucketMetadataConfigurationRequest",Rfo="DeleteBucketMetricsConfigurationRequest",Sfo="DeleteBucketMetricsConfiguration",yfo="DeleteBucketMetadataTableConfiguration",Ifo="DeleteBucketMetadataTableConfigurationRequest",_fo="DeleteBucketOwnershipControls",hfo="DeleteBucketOwnershipControlsRequest",vfo="DeleteBucketPolicy",Cfo="DeleteBucketPolicyRequest",Tfo="DeleteBucketRequest",Afo="DeleteBucketReplicationRequest",Dfo="DeleteBucketReplication",bfo="DeleteBucketTagging",Efo="DeleteBucketTaggingRequest",xfo="DeleteBucketWebsite",Pfo="DeleteBucketWebsiteRequest",$fo="DataExport",wfo="DestinationIfMatch",kfo="DestinationIfModifiedSince",Lfo="DestinationIfNoneMatch",Mfo="DestinationIfUnmodifiedSince",Fy="DeleteMarker",Gfo="DeleteMarkerEntry",nRn="DeleteMarkerReplication",Ofo="DeleteMarkerVersionId",sRn="DeleteMarkers",nTe="DisplayName",Nfo="DeletedObject",Vfo="DeleteObjectAnnotation",qfo="DeleteObjectAnnotationOutput",Ffo="DeleteObjectAnnotationRequest",Bfo="DeleteObjectOutput",Ufo="DeleteObjectsOutput",Hfo="DeleteObjectRequest",jfo="DeleteObjectsRequest",zfo="DeleteObjectTagging",Kfo="DeleteObjectTaggingOutput",Wfo="DeleteObjectTaggingRequest",Qfo="DeletedObjects",Zfo="DeleteObject",Yfo="DeleteObjects",Xfo="DeletePublicAccessBlock",Jfo="DeletePublicAccessBlockRequest",ego="DataRedundancy",rRn="DefaultRetention",tgo="DeleteResult",oRn="DestinationResult",aRn="Date",GCe="Delete",ngo="Deleted",Gg="Delimiter",GJ="Destination",sgo="Description",iRn="Details",sC="Error",rgo="EmailAddress",cRn="EventBridgeConfiguration",ge="ExpectedBucketOwner",By="EncryptionConfiguration",lRn="ErrorCode",ogo="ErrorDetails",sTe="ErrorDocument",ago="EndEvent",igo="ExposeHeaders",cgo="ExposeHeader",uRn="ErrorMessage",lgo="ExpiredObjectDeleteMarker",pRn="ExistingObjectReplication",yY="ExpiresString",dRn="ExpectedSourceBucketOwner",qs="ETag",ugo="EncryptionTypeList",pgo="EncryptionTypeMismatch",rTe="EncryptionType",Og="EncodingType",dgo="EventThreshold",mRn="ExpressionType",oTe="Encryption",mgo="Enabled",fRn="End",gRn="Errors",aTe="Events",iTe="Event",Yp="Expiration",lu="Expires",RRn="Expression",Pm="Filter",SRn="FieldDelimiter",fgo="FileHeaderInfo",ggo="FetchOwner",yRn="FilterRule",Rgo="FilterRuleList",Sgo="FilterRules",ygo="Field",IRn="Format",Igo="Frequency",OJ="Grants",_go="GetBucketAbac",hgo="GetBucketAccelerateConfiguration",vgo="GetBucketAccelerateConfigurationOutput",Cgo="GetBucketAnalyticsConfigurationOutput",Tgo="GetBucketAccelerateConfigurationRequest",Ago="GetBucketAnalyticsConfigurationRequest",Dgo="GetBucketAnalyticsConfiguration",bgo="GetBucketAbacOutput",Ego="GetBucketAclOutput",xgo="GetBucketAbacRequest",Pgo="GetBucketAclRequest",$go="GetBucketAcl",wgo="GetBucketCors",kgo="GetBucketCorsOutput",Lgo="GetBucketCorsRequest",Mgo="GetBucketEncryption",Ggo="GetBucketEncryptionOutput",Ogo="GetBucketEncryptionRequest",Ngo="GetBucketInventoryConfiguration",Vgo="GetBucketInventoryConfigurationOutput",qgo="GetBucketInventoryConfigurationRequest",Fgo="GetBucketIntelligentTieringConfiguration",Bgo="GetBucketIntelligentTieringConfigurationOutput",Ugo="GetBucketIntelligentTieringConfigurationRequest",Hgo="GetBucketLocation",jgo="GetBucketLifecycleConfiguration",zgo="GetBucketLifecycleConfigurationOutput",Kgo="GetBucketLifecycleConfigurationRequest",Wgo="GetBucketLocationOutput",Qgo="GetBucketLoggingOutput",Zgo="GetBucketLocationRequest",Ygo="GetBucketLoggingRequest",Xgo="GetBucketLogging",Jgo="GetBucketMetadataConfiguration",eRo="GetBucketMetadataConfigurationOutput",tRo="GetBucketMetricsConfigurationOutput",_Rn="GetBucketMetadataConfigurationResult",nRo="GetBucketMetadataConfigurationRequest",sRo="GetBucketMetricsConfigurationRequest",rRo="GetBucketMetricsConfiguration",oRo="GetBucketMetadataTableConfiguration",aRo="GetBucketMetadataTableConfigurationOutput",hRn="GetBucketMetadataTableConfigurationResult",iRo="GetBucketMetadataTableConfigurationRequest",cRo="GetBucketNotificationConfiguration",lRo="GetBucketNotificationConfigurationRequest",uRo="GetBucketOwnershipControls",pRo="GetBucketOwnershipControlsOutput",dRo="GetBucketOwnershipControlsRequest",mRo="GetBucketPolicy",fRo="GetBucketPolicyOutput",gRo="GetBucketPolicyRequest",RRo="GetBucketPolicyStatus",SRo="GetBucketPolicyStatusOutput",yRo="GetBucketPolicyStatusRequest",IRo="GetBucketReplication",_Ro="GetBucketReplicationOutput",hRo="GetBucketRequestPayment",vRo="GetBucketRequestPaymentOutput",CRo="GetBucketRequestPaymentRequest",TRo="GetBucketReplicationRequest",ARo="GetBucketTagging",DRo="GetBucketTaggingOutput",bRo="GetBucketTaggingRequest",ERo="GetBucketVersioning",xRo="GetBucketVersioningOutput",PRo="GetBucketVersioningRequest",$Ro="GetBucketWebsite",wRo="GetBucketWebsiteOutput",kRo="GetBucketWebsiteRequest",rC="GrantFullControl",vRn="GlacierJobParameters",LRo="GetObject",MRo="GetObjectAcl",GRo="GetObjectAclOutput",ORo="GetObjectAnnotationOutput",NRo="GetObjectAttributesOutput",VRo="GetObjectAttributesParts",qRo="GetObjectAclRequest",FRo="GetObjectAnnotationRequest",BRo="GetObjectAttributesResponse",URo="GetObjectAttributesRequest",HRo="GetObjectAnnotation",jRo="GetObjectAttributes",zRo="GetObjectLockConfiguration",KRo="GetObjectLockConfigurationOutput",WRo="GetObjectLockConfigurationRequest",QRo="GetObjectLegalHold",ZRo="GetObjectLegalHoldOutput",YRo="GetObjectLegalHoldRequest",XRo="GetObjectOutput",JRo="GetObjectRequest",eSo="GetObjectRetentionOutput",tSo="GetObjectRetentionRequest",nSo="GetObjectRetention",sSo="GetObjectTagging",rSo="GetObjectTaggingOutput",oSo="GetObjectTorrentOutput",aSo="GetObjectTaggingRequest",iSo="GetObjectTorrentRequest",cSo="GetObjectTorrent",lSo="GetPublicAccessBlock",uSo="GetPublicAccessBlockOutput",pSo="GetPublicAccessBlockRequest",oC="GrantRead",aC="GrantReadACP",cTe="GrantWrite",iC="GrantWriteACP",lTe="Grant",uTe="Grantee",dSo="HeadBucket",mSo="HeadBucketOutput",fSo="HeadBucketRequest",gSo="HttpErrorCodeReturnedEquals",CRn="HostName",RSo="HeadObject",SSo="HeadObjectOutput",ySo="HeadObjectRequest",ISo="HttpRedirectCode",Lr="Id",_So="InvalidAnnotationName",Tk="InventoryConfiguration",TRn="InventoryConfigurationList",cC="ID",pTe="IndexDocument",hSo="InventoryDestination",vSo="IsEnabled",CSo="InventoryEncryption",TSo="InventoryFilter",ARn="IsLatest",lC="IfMatch",ASo="IfMatchInitiatedTime",DSo="IfMatchLastModifiedTime",bSo="IfMatchSize",dTe="If-Modified-Since",DRn="IfModifiedSince",ESo="InitiateMultipartUploadResult",Uy="If-Match",Bk="IfNoneMatch",uC="If-None-Match",xSo="InventoryOptionalFields",PSo="InvalidObjectState",$So="IncludedObjectVersions",wSo="InvalidPrefix",egn="IgnorePublicAcls",kSo="IdempotencyParameterMismatch",tgn="IsPublic",LSo="InvalidRequest",MSo="IsRestoreInProgress",mTe="InputSerialization",GSo="InventoryS3BucketDestination",OSo="InventorySchedule",Jp="IsTruncated",NSo="IntelligentTieringAndOperator",Ak="IntelligentTieringConfiguration",bRn="IntelligentTieringConfigurationList",ERn="InventoryTableConfigurationResult",VSo="InventoryTableConfigurationUpdates",IY="InventoryTableConfiguration",qSo="IntelligentTieringFilter",xRn="IfUnmodifiedSince",fTe="If-Unmodified-Since",FSo="InvalidWriteOffset",gTe="Initiator",BSo="Initiated",PRn="JSON",USo="JSONInput",HSo="JSONOutput",_Y="JournalTableConfiguration",$Rn="JournalTableConfigurationResult",jSo="JournalTableConfigurationUpdates",vt="Key",zSo="KeyCount",KSo="KeyId",WSo="KmsKeyArn",NJ="KeyMarker",QSo="KMSContext",ZSo="KMSKeyArn",YSo="KMSKeyId",XSo="KMSMasterKeyID",JSo="KeyPrefixEquals",hY="Location",eyo="ListAllMyBucketsResult",tyo="ListAllMyDirectoryBucketsResult",nyo="ListBuckets",syo="ListBucketAnalyticsConfigurations",ryo="ListBucketAnalyticsConfigurationsOutput",oyo="ListBucketAnalyticsConfigurationResult",ayo="ListBucketAnalyticsConfigurationsRequest",iyo="ListBucketInventoryConfigurations",cyo="ListBucketInventoryConfigurationsOutput",lyo="ListBucketInventoryConfigurationsRequest",uyo="ListBucketIntelligentTieringConfigurations",pyo="ListBucketIntelligentTieringConfigurationsOutput",dyo="ListBucketIntelligentTieringConfigurationsRequest",myo="ListBucketMetricsConfigurations",fyo="ListBucketMetricsConfigurationsOutput",gyo="ListBucketMetricsConfigurationsRequest",Ryo="ListBucketsOutput",Syo="ListBucketsRequest",wRn="ListBucketResult",OCe="LocationConstraint",NCe="LifecycleConfiguration",yyo="ListDirectoryBuckets",Iyo="ListDirectoryBucketsOutput",_yo="ListDirectoryBucketsRequest",RTe="LoggingEnabled",hyo="LifecycleExpiration",vyo="LambdaFunctionArn",Cyo="LambdaFunctionConfiguration",Tyo="LambdaFunctionConfigurationList",Ayo="LambdaFunctionConfigurations",vY="LegalHold",Dyo="LocationInfo",byo="ListInventoryConfigurationsResult",Zc="LastModified",Eyo="ListMetricsConfigurationsResult",xyo="LastModifiedTime",Pyo="ListMultipartUploads",$yo="ListMultipartUploadsOutput",wyo="ListMultipartUploadsResult",kyo="ListMultipartUploadsRequest",VJ="Last-Modified",Lyo="ListObjects",Myo="ListObjectAnnotations",Gyo="ListObjectAnnotationsOutput",Oyo="ListObjectAnnotationsRequest",Nyo="ListObjectsOutput",Vyo="ListObjectsRequest",qyo="ListObjectsV2",Fyo="ListObjectsV2Output",Byo="ListObjectVersionsOutput",Uyo="ListObjectsV2Request",Hyo="ListObjectVersionsRequest",jyo="ListObjectVersions",zyo="ListParts",Kyo="ListPartsOutput",Wyo="ListPartsResult",Qyo="ListPartsRequest",Zyo="LifecycleRule",Yyo="LifecycleRuleAndOperator",Xyo="LifecycleRuleFilter",Jyo="LifecycleRules",eIo="ListVersionsResult",pC="Metadata",tIo="MetricsAndOperator",kRn="MaxAnnotationResults",nIo="MaxAgeSeconds",sIo="MaxBuckets",VCe="MetadataConfiguration",LRn="MetricsConfigurationList",MRn="MetadataConfigurationResult",Dk="MetricsConfiguration",rIo="MetadataDirective",oIo="MaxDirectoryBuckets",GRn="MfaDelete",ORn="MetadataEntry",aIo="MetricsFilter",STe="MFA",NRn="MFADelete",dC="MaxKeys",yTe="MissingMeta",iIo="MpuObjectSize",qJ="MaxParts",qCe="MetadataTableConfiguration",VRn="MetadataTableConfigurationResult",cIo="MetadataTableEncryptionConfiguration",qRn="MultipartUpload",lIo="MultipartUploadList",FRn="MaxUploads",BRn="Marker",URn="Metrics",uIo="Message",pIo="Minutes",HRn="Mode",Hy="Name",FCe="NotificationConfiguration",dIo="NotificationConfigurationFilter",mC="NextContinuationToken",jRn="NoncurrentDays",mIo="NonEmptyKmsKeyArnString",fIo="NotFound",zRn="NextKeyMarker",gIo="NextMarker",KRn="NewerNoncurrentVersions",WRn="NextPartNumberMarker",RIo="NoSuchAnnotation",SIo="NoSuchBucket",yIo="NoSuchKey",IIo="NoSuchUpload",_Io="NextUploadIdMarker",QRn="NoncurrentVersionExpiration",hIo="NextVersionIdMarker",vIo="NoncurrentVersionTransitions",CIo="NoncurrentVersionTransitionList",ZRn="NoncurrentVersionTransition",pu="Owner",TIo="ObjectAttributes",AIo="ObjectAlreadyInActiveTierError",CY="OwnershipControls",DIo="OwnershipControlsRule",bIo="OwnershipControlsRules",YRn="ObjectEncryption",EIo="OptionalFields",xIo="ObjectIdentifier",PIo="ObjectIdentifierList",XRn="ObjectIfMatch",JRn="OutputLocation",TY="ObjectLockConfiguration",$Io="ObjectLockEnabled",wIo="ObjectLockEnabledForBucket",kIo="ObjectLockLegalHold",fC="ObjectLockLegalHoldStatus",gC="ObjectLockMode",LIo="ObjectLockRetention",RC="ObjectLockRetainUntilDate",MIo="ObjectLockRule",GIo="ObjectList",OIo="ObjectNotInActiveTierError",eSn="ObjectOwnership",ITe="OptionalObjectAttributes",NIo="ObjectParts",VIo="ObjectPart",qIo="ObjectSize",tSn="ObjectSizeGreaterThan",nSn="ObjectSizeLessThan",FIo="OutputSchemaVersion",_Te="OutputSerialization",BIo="ObjectVersion",FJ="ObjectVersionId",UIo="ObjectVersionList",HIo="Objects",sSn="Object",as="Prefix",AY="PublicAccessBlockConfiguration",jIo="PutBucketAbac",zIo="PutBucketAccelerateConfiguration",KIo="PutBucketAccelerateConfigurationRequest",WIo="PutBucketAnalyticsConfigurationRequest",QIo="PutBucketAnalyticsConfiguration",ZIo="PutBucketAbacRequest",YIo="PutBucketAclRequest",XIo="PutBucketAcl",JIo="PutBucketCors",e_o="PutBucketCorsRequest",t_o="PutBucketEncryption",n_o="PutBucketEncryptionRequest",s_o="PutBucketInventoryConfiguration",r_o="PutBucketInventoryConfigurationRequest",o_o="PutBucketIntelligentTieringConfiguration",a_o="PutBucketIntelligentTieringConfigurationRequest",i_o="PutBucketLogging",c_o="PutBucketLifecycleConfiguration",l_o="PutBucketLifecycleConfigurationOutput",u_o="PutBucketLifecycleConfigurationRequest",p_o="PutBucketLoggingRequest",d_o="PutBucketMetricsConfiguration",m_o="PutBucketMetricsConfigurationRequest",f_o="PutBucketNotificationConfiguration",g_o="PutBucketNotificationConfigurationRequest",R_o="PutBucketOwnershipControls",S_o="PutBucketOwnershipControlsRequest",y_o="PutBucketPolicy",I_o="PutBucketPolicyRequest",__o="PutBucketReplication",h_o="PutBucketRequestPayment",v_o="PutBucketRequestPaymentRequest",C_o="PutBucketReplicationRequest",T_o="PutBucketTagging",A_o="PutBucketTaggingRequest",D_o="PutBucketVersioning",b_o="PutBucketVersioningRequest",E_o="PutBucketWebsite",x_o="PutBucketWebsiteRequest",BJ="PartsCount",P_o="PartitionDateSource",$_o="ProgressEvent",w_o="ParquetInput",k_o="PartsList",jy="PartNumber",UJ="PartNumberMarker",L_o="PutObject",M_o="PutObjectAcl",G_o="PutObjectAclOutput",O_o="PutObjectAnnotationOutput",N_o="PutObjectAclRequest",V_o="PutObjectAnnotationRequest",q_o="PutObjectAnnotation",F_o="PutObjectLockConfiguration",B_o="PutObjectLockConfigurationOutput",U_o="PutObjectLockConfigurationRequest",H_o="PutObjectLegalHold",j_o="PutObjectLegalHoldOutput",z_o="PutObjectLegalHoldRequest",K_o="PutObjectOutput",W_o="PutObjectRequest",Q_o="PutObjectRetentionOutput",Z_o="PutObjectRetentionRequest",Y_o="PutObjectRetention",X_o="PutObjectTagging",J_o="PutObjectTaggingOutput",eho="PutObjectTaggingRequest",DY="PartitionedPrefix",tho="PutPublicAccessBlock",nho="PutPublicAccessBlockRequest",rSn="PolicyStatus",HJ="Parts",jJ="Part",sho="Parquet",oSn="Payer",aSn="Payload",iSn="Permission",cSn="Policy",lSn="Progress",rho="Priority",uSn="Protocol",oho="Quiet",aho="QueueArn",pSn="QuoteCharacter",iho="QueueConfigurationList",cho="QueueConfigurations",dSn="QueueConfiguration",mSn="QuoteEscapeCharacter",lho="QuoteFields",uho="Queue",zJ="Role",hTe="RedirectAllRequestsTo",bn="RequestCharged",fSn="ResponseCacheControl",gSn="ResponseContentDisposition",RSn="ResponseContentEncoding",SSn="ResponseContentLanguage",ySn="ResponseContentType",bY="ReplicationConfiguration",vTe="RecordDelimiter",ISn="ResponseExpires",pho="RestoreExpiryDate",KJ="RecordExpiration",dho="RecordsEvent",mho="ReplicaKmsKeyID",fho="ReplaceKeyPrefixWith",gho="ReplaceKeyWith",_Sn="ReplicaModifications",Rho="RenameObject",Sho="RenameObjectOutput",yho="RestoreObjectOutput",Iho="RestoreOutputPath",_ho="RenameObjectRequest",hho="RestoreObjectRequest",vho="RestoreObject",dn="RequestPayer",ngn="RestrictPublicBuckets",EY="RequestPaymentConfiguration",hSn="RequestProgress",CTe="RoutingRules",Cho="ReplicationRuleAndOperator",Tho="ReplicationRuleFilter",Aho="ReplicationRule",Dho="ReplicationRules",bho="RequestRoute",BCe="RestoreRequest",vSn="RoutingRule",Uk="ReplicationStatus",TTe="RestoreStatus",Eho="RenameSource",CSn="ReplicationTime",xho="ReplicationTimeValue",Pho="RequestToken",$ho="RetainUntilDate",xY="Range",ATe="Restore",who="Records",TSn="Redirect",PY="Retention",Hk="Rules",SC="Rule",Ta="Status",ASn="StartAfter",sgn="SecretAccessKey",kho="SseAlgorithm",Lho="StreamingBlob",DSn="S3BucketDestination",Aa="StorageClass",bSn="StorageClassAnalysis",Mho="StorageClassAnalysisDataExport",Gho="SessionCredentialValue",Oho="SessionCredentials",Nho="StatusCode",Vho="SkipDestinationValidation",qho="StatsEvent",Fho="SourceIfMatch",Bho="SourceIfModifiedSince",Uho="SourceIfNoneMatch",Hho="SourceIfUnmodifiedSince",WJ="SSE-KMS",ESn="SseKmsEncryptedObjects",jho="S3KeyFilter",zho="S3Key",Kho="S3Location",Who="SessionMode",Qho="SelectObjectContent",Zho="SelectObjectContentEventStream",Yho="SelectObjectContentOutput",Xho="SelectObjectContentRequest",xSn="SelectParameters",$Y="SimplePrefix",PSn="ScanRange",$Sn="SSE-S3",wSn="SourceSelectionCriteria",Da="ServerSideEncryption",Jho="SSEAlgorithm",e0o="ServerSideEncryptionByDefault",wY="ServerSideEncryptionConfiguration",Mr="SSECustomerAlgorithm",Yc="SSECustomerKey",Gr="SSECustomerKeyMD5",DTe="SSEKMS",t0o="SSEKMSEncryption",$m="SSEKMSEncryptionContext",Wa="SSEKMSKeyId",n0o="ServerSideEncryptionRule",s0o="ServerSideEncryptionRules",kSn="SSES3",rgn="SessionToken",LSn="S3TablesDestination",MSn="S3TablesDestinationResult",r0o="S3",o0o="Schedule",zy="Size",a0o="Start",GSn="Stats",i0o="Suffix",yC="Tags",QJ="TableArn",c0o="TopicArn",l0o="TargetBucket",bTe="TableBucketArn",u0o="TableBucketType",ETe="TagCount",p0o="TopicConfigurationList",d0o="TopicConfigurations",OSn="TopicConfiguration",m0o="TaggingDirective",xTe="TransitionDefaultMinimumObjectSize",NSn="TargetGrants",f0o="TargetGrant",g0o="TieringList",R0o="TransitionList",S0o="TooManyParts",jk="TableName",VSn="TableNamespace",qSn="TargetObjectKeyFormat",y0o="TargetPrefix",I0o="TotalPartsCount",PTe="TableStatus",ZJ="TagSet",Xc="Tag",uu="Tagging",FSn="Tier",_0o="Tierings",BSn="Tiering",h0o="Time",USn="Token",v0o="Topic",C0o="Transitions",HSn="Transition",zk="Type",T0o="Uploads",A0o="UpdateBucketMetadataAnnotationTableConfiguration",D0o="UpdateBucketMetadataAnnotationTableConfigurationRequest",b0o="UpdateBucketMetadataInventoryTableConfiguration",E0o="UpdateBucketMetadataInventoryTableConfigurationRequest",x0o="UpdateBucketMetadataJournalTableConfiguration",P0o="UpdateBucketMetadataJournalTableConfigurationRequest",Ng="UploadId",jSn="UploadIdMarker",zSn="UserMetadata",$0o="UnsupportedMediaType",w0o="UpdateObjectEncryption",k0o="UpdateObjectEncryptionRequest",L0o="UpdateObjectEncryptionResponse",M0o="UploadPart",G0o="UploadPartCopy",O0o="UploadPartCopyOutput",N0o="UploadPartCopyRequest",V0o="UploadPartOutput",q0o="UploadPartRequest",F0o="URI",B0o="Upload",$Te="Value",kY="VersioningConfiguration",Xt="VersionId",KSn="VersionIdMarker",U0o="Versions",H0o="Version",LY="WebsiteConfiguration",j0o="WriteGetObjectResponse",z0o="WriteGetObjectResponseRequest",K0o="WriteOffsetBytes",Kk="WebsiteRedirectLocation",W0o="Years",wTe="annotationName",Q0o="annotation-prefix",WSn="accept-ranges",Z0o="bucket-region",lr="client",Vg="continuation-token",YJ="delimiter",ur="error",kTe="eventPayload",Y0o="endpoint",XJ="encoding-type",X0o="fetch-owner",de="http",gn="httpChecksum",_r="httpError",I="httpHeader",J0o="hostLabel",Jt="httpPayload",IC="httpPrefixHeaders",he="httpQuery",QSn="http://www.w3.org/2001/XMLSchema-instance",Jc="id",evo="idempotencyToken",ZSn="key-marker",tvo="marker",nvo="max-annotation-results",svo="max-buckets",rvo="max-directory-buckets",LTe="max-keys",ovo="max-parts",avo="max-uploads",Wk="prefix",JJ="partNumber",ivo="part-number-marker",YSn="response-cache-control",XSn="response-content-disposition",JSn="response-content-encoding",eyn="response-content-language",tyn="response-content-type",nyn="response-expires",syn="smithy.ts.sdk.synthetic.com.amazonaws.s3",cvo="start-after",ryn="streaming",Qk="uploadId",lvo="upload-id-marker",Or="versionId",uvo="version-id-marker",oyn="xsi",pvo="xmlAttribute",mt="xmlFlattened",Z="xmlName",ayn="xmlNamespace",_C="x-amz-acl",iyn="x-amz-abort-date",dvo="x-amz-access-point-alias",cyn="x-amz-abort-rule-id",mvo="x-amz-archive-status",lyn="x-amz-bucket-arn",MTe="x-amz-bypass-governance-retention",fvo="x-amz-bucket-location-name",gvo="x-amz-bucket-location-type",Rvo="x-amz-bucket-namespace",Svo="x-amz-bucket-object-lock-enabled",uyn="x-amz-bucket-object-lock-token",yvo="x-amz-bucket-region",GTe="x-amz-checksum-algorithm",ed="x-amz-checksum-crc32",td="x-amz-checksum-crc32c",nd="x-amz-checksum-crc64nvme",sd="x-amz-checksum-md5",OTe="x-amz-checksum-mode",Ivo="x-amz-confirm-remove-self-bucket-access",rd="x-amz-checksum-sha1",od="x-amz-checksum-sha256",ad="x-amz-checksum-sha512",pyn="x-amz-copy-source",dyn="x-amz-copy-source-if-match",myn="x-amz-copy-source-if-modified-since",fyn="x-amz-copy-source-if-none-match",gyn="x-amz-copy-source-if-unmodified-since",_vo="x-amz-create-session-mode",hvo="x-amz-copy-source-range",Ryn="x-amz-copy-source-server-side-encryption-customer-algorithm",Syn="x-amz-copy-source-server-side-encryption-customer-key",yyn="x-amz-copy-source-server-side-encryption-customer-key-MD5",Iyn="x-amz-copy-source-version-id",qg="x-amz-checksum-type",vvo="x-amz-client-token",id="x-amz-checksum-xxhash64",cd="x-amz-checksum-xxhash3",ld="x-amz-checksum-xxhash128",eee="x-amz-delete-marker",Zk="x-amz-expiration",Re="x-amz-expected-bucket-owner",Cvo="x-amz-fwd-error-code",Tvo="x-amz-fwd-error-message",Avo="x-amz-fwd-header-Cache-Control",Dvo="x-amz-fwd-header-Content-Disposition",bvo="x-amz-fwd-header-Content-Encoding",Evo="x-amz-fwd-header-Content-Language",xvo="x-amz-fwd-header-Content-Range",Pvo="x-amz-fwd-header-Content-Type",$vo="x-amz-fwd-header-ETag",wvo="x-amz-fwd-header-Expires",kvo="x-amz-fwd-header-Last-Modified",Lvo="x-amz-fwd-header-accept-ranges",Mvo="x-amz-fwd-header-x-amz-checksum-crc32",Gvo="x-amz-fwd-header-x-amz-checksum-crc32c",Ovo="x-amz-fwd-header-x-amz-checksum-crc64nvme",Nvo="x-amz-fwd-header-x-amz-checksum-md5",Vvo="x-amz-fwd-header-x-amz-checksum-sha1",qvo="x-amz-fwd-header-x-amz-checksum-sha256",Fvo="x-amz-fwd-header-x-amz-checksum-sha512",Bvo="x-amz-fwd-header-x-amz-checksum-xxhash64",Uvo="x-amz-fwd-header-x-amz-checksum-xxhash3",Hvo="x-amz-fwd-header-x-amz-checksum-xxhash128",jvo="x-amz-fwd-header-x-amz-delete-marker",zvo="x-amz-fwd-header-x-amz-expiration",Kvo="x-amz-fwd-header-x-amz-missing-meta",Wvo="x-amz-fwd-header-x-amz-mp-parts-count",Qvo="x-amz-fwd-header-x-amz-object-lock-legal-hold",Zvo="x-amz-fwd-header-x-amz-object-lock-mode",Yvo="x-amz-fwd-header-x-amz-object-lock-retain-until-date",Xvo="x-amz-fwd-header-x-amz-restore",Jvo="x-amz-fwd-header-x-amz-request-charged",eCo="x-amz-fwd-header-x-amz-replication-status",tCo="x-amz-fwd-header-x-amz-storage-class",nCo="x-amz-fwd-header-x-amz-server-side-encryption",sCo="x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id",rCo="x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled",oCo="x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm",aCo="x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5",iCo="x-amz-fwd-header-x-amz-tagging-count",cCo="x-amz-fwd-header-x-amz-version-id",lCo="x-amz-fwd-status",hC="x-amz-grant-full-control",vC="x-amz-grant-read",CC="x-amz-grant-read-acp",NTe="x-amz-grant-write",TC="x-amz-grant-write-acp",uCo="x-amz-if-match-initiated-time",pCo="x-amz-if-match-last-modified-time",dCo="x-amz-if-match-size",AC="x-amz-meta-",VTe="x-amz-mfa",mCo="x-amz-metadata-directive",_yn="x-amz-missing-meta",fCo="x-amz-mp-object-size",gCo="x-amz-max-parts",hyn="x-amz-mp-parts-count",RCo="x-amz-object-attributes",SCo="x-amz-object-annotation-directive",vyn="x-amz-object-if-match",Yk="x-amz-object-lock-legal-hold",Xk="x-amz-object-lock-mode",Jk="x-amz-object-lock-retain-until-date",yCo="x-amz-object-ownership",qTe="x-amz-optional-object-attributes",ICo="x-amz-object-size",tee="x-amz-object-version-id",_Co="x-amz-part-number-marker",Cyn="x-amz-restore",Mn="x-amz-request-charged",hCo="x-amz-restore-output-path",mn="x-amz-request-payer",vCo="x-amz-request-route",FTe="x-amz-replication-status",CCo="x-amz-rename-source",TCo="x-amz-rename-source-if-match",ACo="x-amz-rename-source-if-modified-since",DCo="x-amz-rename-source-if-none-match",bCo="x-amz-rename-source-if-unmodified-since",ECo="x-amz-request-token",eL="x-amz-storage-class",En="x-amz-sdk-checksum-algorithm",xCo="x-amz-skip-destination-validation",Tyn="x-amz-source-expected-bucket-owner",Qa="x-amz-server-side-encryption",pc="x-amz-server-side-encryption-aws-kms-key-id",dc="x-amz-server-side-encryption-bucket-key-enabled",Fg="x-amz-server-side-encryption-context",So="x-amz-server-side-encryption-customer-algorithm",du="x-amz-server-side-encryption-customer-key",yo="x-amz-server-side-encryption-customer-key-MD5",BTe="x-amz-tagging",Ayn="x-amz-tagging-count",PCo="x-amz-tagging-directive",UTe="x-amz-transition-default-minimum-object-size",ud="x-amz-version-id",$Co="x-amz-write-offset-bytes",tL="x-amz-website-redirect-location",wCo="xsi:type",E="com.amazonaws.s3",Dyn=ugn.for(syn),byn=[-3,syn,"S3ServiceException",0,[],[]];Dyn.registerError(byn,vs);var Xs=ugn.for(E),Eyn=[-3,E,Gdo,{[ur]:lr,[_r]:403},[],[]];Xs.registerError(Eyn,KZ);var xyn=[-3,E,Hdo,{[ur]:lr,[_r]:400},[],[]];Xs.registerError(xyn,iY);var Pyn=[-3,E,Zdo,{[ur]:lr,[_r]:400},[],[]];Xs.registerError(Pyn,cY);var $yn=[-3,E,amo,{[ur]:lr,[_r]:409},[],[]];Xs.registerError($yn,QZ);var wyn=[-3,E,cmo,{[ur]:lr,[_r]:409},[],[]];Xs.registerError(wyn,ZZ);var kyn=[-3,E,pgo,{[ur]:lr,[_r]:400},[],[]];Xs.registerError(kyn,sY);var Lyn=[-3,E,kSo,{[ur]:lr,[_r]:400},[],[]];Xs.registerError(Lyn,pY);var Myn=[-3,E,_So,{[ur]:lr,[_r]:400},[],[]];Xs.registerError(Myn,lY);var Gyn=[-3,E,PSo,{[ur]:lr,[_r]:403},[Aa,Lgn],[0,0]];Xs.registerError(Gyn,JZ);var Oyn=[-3,E,wSo,{[ur]:lr,[_r]:400},[],[]];Xs.registerError(Oyn,nY);var Nyn=[-3,E,LSo,{[ur]:lr,[_r]:400},[],[]];Xs.registerError(Nyn,rY);var Vyn=[-3,E,FSo,{[ur]:lr,[_r]:400},[],[]];Xs.registerError(Vyn,oY);var qyn=[-3,E,RIo,{[ur]:lr,[_r]:404},[],[]];Xs.registerError(qyn,eY);var Fyn=[-3,E,SIo,{[ur]:lr,[_r]:404},[],[]];Xs.registerError(Fyn,YZ);var Byn=[-3,E,yIo,{[ur]:lr,[_r]:404},[],[]];Xs.registerError(Byn,XZ);var Uyn=[-3,E,IIo,{[ur]:lr,[_r]:404},[],[]];Xs.registerError(Uyn,zZ);var Hyn=[-3,E,fIo,{[ur]:lr},[],[]];Xs.registerError(Hyn,tY);var jyn=[-3,E,AIo,{[ur]:lr,[_r]:403},[],[]];Xs.registerError(jyn,dY);var zyn=[-3,E,OIo,{[ur]:lr,[_r]:403},[],[]];Xs.registerError(zyn,WZ);var Kyn=[-3,E,S0o,{[ur]:lr,[_r]:400},[],[]];Xs.registerError(Kyn,aY);var Wyn=[-3,E,$0o,{[ur]:lr,[_r]:415},[],[]];Xs.registerError(Wyn,uY);var Qyn=[Dyn,Xs],Zyn=[0,E,tTe,8,0],kCo=[0,E,mIo,8,0],ogn=[0,E,Gho,8,0],mu=[0,E,Yc,8,0],Bg=[0,E,$m,8,0],Wo=[0,E,Wa,8,0],Ky=[0,E,Lho,{[ryn]:1},42],HTe=[3,E,fY,0,[Ta],[0]],Yyn=[3,E,xgn,0,[efo],[1]],Xyn=[3,E,Kdo,0,[bn],[[0,{[I]:Mn}]]],Jyn=[3,E,Wdo,0,[ie,vt,Ng,dn,ge,ASo],[[0,1],[0,1],[0,{[he]:Qk}],[0,{[I]:mn}],[0,{[I]:Re}],[6,{[I]:uCo}]],3],eIn=[3,E,mY,0,[Ta],[0]],jTe=[3,E,qy,0,[OJ,pu],[[()=>uee,{[Z]:LJ}],()=>pd]],tIn=[3,E,Dgn,0,[pu],[0],1],nIn=[3,E,Ldo,0,[as,yC],[0,[()=>wm,{[mt]:1,[Z]:Xc}]]],nee=[3,E,Ck,0,[Lr,bSn,Pm],[0,()=>ICn,[()=>UCn,0]],2],sIn=[3,E,Ndo,0,[DSn],[()=>rIn],1],rIn=[3,E,tmo,0,[IRn,ie,imo,as],[0,0,0,0],2],oIn=[3,E,Egn,0,[Lk,Zc,zy,qs,Vt,Uk],[0,4,1,0,[64,{[mt]:1}],0],3],aIn=[3,E,gY,0,[eC,By,zJ],[0,()=>DC,0],1],iIn=[3,E,Mgn,0,[eC,PTe,sC,jk,QJ,zJ],[0,0,()=>nL,0,0,0],1],cIn=[3,E,rmo,0,[eC,By,zJ],[0,()=>DC,0],1],lIn=[3,E,Ggn,0,[rTe],[[()=>VCo,{[mt]:1}]]],uIn=[3,E,ie,0,[Hy,Cmo,QCe,KCe],[0,4,0,0]],pIn=[3,E,lmo,0,[ego,zk],[0,0]],dIn=[3,E,umo,0,[Hk],[[()=>qCn,{[mt]:1,[Z]:SC}]],1],mIn=[3,E,RY,0,[RTe],[[()=>YTe,0]]],fIn=[3,E,qgn,0,[ao,io,co,uo,po,mo,lo,fo,go,Ro,Ka],[0,0,0,0,0,0,0,0,0,0,0]],gIn=[3,E,Omo,0,[as],[0]],RIn=[3,E,bmo,0,[HJ],[[()=>GCo,{[mt]:1,[Z]:jJ}]]],SIn=[3,E,qmo,0,[qs,ao,io,co,uo,po,mo,lo,fo,go,Ro,jy],[0,0,0,0,0,0,0,0,0,0,0,1]],yIn=[3,E,Emo,{[Z]:Pmo},[hY,ie,vt,Yp,qs,ao,io,co,uo,po,mo,lo,fo,go,Ro,Ka,Da,Xt,Wa,va,bn],[0,0,0,[0,{[I]:Zk}],0,0,0,0,0,0,0,0,0,0,0,0,[0,{[I]:Qa}],[0,{[I]:ud}],[()=>Wo,{[I]:pc}],[2,{[I]:dc}],[0,{[I]:Mn}]]],IIn=[3,E,$mo,0,[ie,vt,Ng,qRn,ao,io,co,uo,po,mo,lo,fo,go,Ro,Ka,iIo,dn,ge,lC,Bk,Mr,Yc,Gr],[[0,1],[0,1],[0,{[he]:Qk}],[()=>RIn,{[Jt]:1,[Z]:Fgn}],[0,{[I]:ed}],[0,{[I]:td}],[0,{[I]:nd}],[0,{[I]:rd}],[0,{[I]:od}],[0,{[I]:ad}],[0,{[I]:sd}],[0,{[I]:id}],[0,{[I]:cd}],[0,{[I]:ld}],[0,{[I]:qg}],[1,{[I]:fCo}],[0,{[I]:mn}],[0,{[I]:Re}],[0,{[I]:Uy}],[0,{[I]:uC}],[0,{[I]:So}],[()=>mu,{[I]:du}],[0,{[I]:yo}]],3],_In=[3,E,eRn,0,[gSo,JSo],[0,0]],hIn=[3,E,Tmo,0,[],[]],vIn=[3,E,Mmo,0,[Bgn,Yp,Xgn,Xt,Da,Mr,Gr,Wa,$m,va,bn],[[()=>TIn,16],[0,{[I]:Zk}],[0,{[I]:Iyn}],[0,{[I]:ud}],[0,{[I]:Qa}],[0,{[I]:So}],[0,{[I]:yo}],[()=>Wo,{[I]:pc}],[()=>Bg,{[I]:Fg}],[2,{[I]:dc}],[0,{[I]:Mn}]]],CIn=[3,E,Gmo,0,[ie,Jgn,vt,Kv,Wv,Vt,Qv,Zv,Yv,tC,jgn,zgn,Kgn,Wgn,lu,rC,oC,aC,iC,lC,Bk,pC,rIo,m0o,Odo,Da,Aa,Kk,Mr,Yc,Gr,Wa,$m,va,Qgn,tTe,Zgn,dn,uu,gC,RC,fC,ge,dRn],[[0,1],[0,{[I]:pyn}],[0,1],[0,{[I]:_C}],[0,{[I]:Ok}],[0,{[I]:GTe}],[0,{[I]:Nk}],[0,{[I]:Vk}],[0,{[I]:qk}],[0,{[I]:Fk}],[0,{[I]:dyn}],[4,{[I]:myn}],[0,{[I]:fyn}],[4,{[I]:gyn}],[4,{[I]:lu}],[0,{[I]:hC}],[0,{[I]:vC}],[0,{[I]:CC}],[0,{[I]:TC}],[0,{[I]:Uy}],[0,{[I]:uC}],[128,{[IC]:AC}],[0,{[I]:mCo}],[0,{[I]:PCo}],[0,{[I]:SCo}],[0,{[I]:Qa}],[0,{[I]:eL}],[0,{[I]:tL}],[0,{[I]:So}],[()=>mu,{[I]:du}],[0,{[I]:yo}],[()=>Wo,{[I]:pc}],[()=>Bg,{[I]:Fg}],[2,{[I]:dc}],[0,{[I]:Ryn}],[()=>Zyn,{[I]:Syn}],[0,{[I]:yyn}],[0,{[I]:mn}],[0,{[I]:BTe}],[0,{[I]:Xk}],[5,{[I]:Jk}],[0,{[I]:Yk}],[0,{[I]:Re}],[0,{[I]:Tyn}]],3],TIn=[3,E,Bgn,0,[qs,Zc,Ka,ao,io,co,uo,po,mo,lo,fo,go,Ro],[0,4,0,0,0,0,0,0,0,0,0,0,0]],AIn=[3,E,Ugn,0,[qs,Zc,ao,io,co,uo,po,mo,lo,fo,go,Ro],[0,4,0,0,0,0,0,0,0,0,0,0]],DIn=[3,E,SY,0,[XCe],[[()=>VCn,{[mt]:1,[Z]:JCe}]],1],bIn=[3,E,JCe,0,[jdo,Ydo,cC,qdo,igo,nIo],[[64,{[mt]:1,[Z]:Qdo}],[64,{[mt]:1,[Z]:Xdo}],0,[64,{[mt]:1,[Z]:Fdo}],[64,{[mt]:1,[Z]:cgo}],1],2],EIn=[3,E,MCe,0,[OCe,hY,ie,yC],[0,()=>k0n,()=>pIn,[()=>wm,0]]],xIn=[3,E,ymo,0,[ie,VCe,os,Vt,ge],[[0,1],[()=>L0n,{[Jt]:1,[Z]:VCe}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:Re}]],2],PIn=[3,E,_mo,0,[ie,qCe,os,Vt,ge],[[0,1],[()=>O0n,{[Jt]:1,[Z]:qCe}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:Re}]],2],$In=[3,E,hmo,0,[hY,KCe],[[0,{[I]:hY}],[0,{[I]:lyn}]]],wIn=[3,E,vmo,0,[ie,Kv,MCe,rC,oC,aC,cTe,iC,wIo,eSn,mmo],[[0,1],[0,{[I]:_C}],[()=>EIn,{[Jt]:1,[Z]:MCe}],[0,{[I]:hC}],[0,{[I]:vC}],[0,{[I]:CC}],[0,{[I]:NTe}],[0,{[I]:TC}],[2,{[I]:Svo}],[0,{[I]:yCo}],[0,{[I]:Rvo}]],1],kIn=[3,E,xmo,{[Z]:ESo},[bgn,kgn,ie,vt,Ng,Da,Mr,Gr,Wa,$m,va,bn,Vt,Ka],[[4,{[I]:iyn}],[0,{[I]:cyn}],[0,{[Z]:ie}],0,0,[0,{[I]:Qa}],[0,{[I]:So}],[0,{[I]:yo}],[()=>Wo,{[I]:pc}],[()=>Bg,{[I]:Fg}],[2,{[I]:dc}],[0,{[I]:Mn}],[0,{[I]:GTe}],[0,{[I]:qg}]]],LIn=[3,E,wmo,0,[ie,vt,Kv,Wv,Qv,Zv,Yv,tC,lu,rC,oC,aC,iC,pC,Da,Aa,Kk,Mr,Yc,Gr,Wa,$m,va,dn,uu,gC,RC,fC,ge,Vt,Ka],[[0,1],[0,1],[0,{[I]:_C}],[0,{[I]:Ok}],[0,{[I]:Nk}],[0,{[I]:Vk}],[0,{[I]:qk}],[0,{[I]:Fk}],[4,{[I]:lu}],[0,{[I]:hC}],[0,{[I]:vC}],[0,{[I]:CC}],[0,{[I]:TC}],[128,{[IC]:AC}],[0,{[I]:Qa}],[0,{[I]:eL}],[0,{[I]:tL}],[0,{[I]:So}],[()=>mu,{[I]:du}],[0,{[I]:yo}],[()=>Wo,{[I]:pc}],[()=>Bg,{[I]:Fg}],[2,{[I]:dc}],[0,{[I]:mn}],[0,{[I]:BTe}],[0,{[I]:Xk}],[5,{[I]:Jk}],[0,{[I]:Yk}],[0,{[I]:Re}],[0,{[I]:GTe}],[0,{[I]:qg}]],2],MIn=[3,E,Bmo,{[Z]:Umo},[Jfn,Da,Wa,$m,va],[[()=>uCn,{[Z]:Jfn}],[0,{[I]:Qa}],[()=>Wo,{[I]:pc}],[()=>Bg,{[I]:Fg}],[2,{[I]:dc}]],1],GIn=[3,E,jmo,0,[ie,Who,Da,Wa,$m,va],[[0,1],[0,{[I]:_vo}],[0,{[I]:Qa}],[()=>Wo,{[I]:pc}],[()=>Bg,{[I]:Fg}],[2,{[I]:dc}]],1],OIn=[3,E,zmo,0,[fgo,Xmo,mSn,vTe,SRn,pSn,emo],[0,0,0,0,0,0,2]],NIn=[3,E,Kmo,0,[lho,mSn,vTe,SRn,pSn],[0,0,0,0,0]],VIn=[3,E,rRn,0,[HRn,nC,W0o],[0,1,1]],qIn=[3,E,GCe,0,[HIo,oho],[[()=>QCo,{[mt]:1,[Z]:sSn}],2],1],FIn=[3,E,sfo,0,[ie,Lr,ge],[[0,1],[0,{[he]:Jc}],[0,{[I]:Re}]],2],BIn=[3,E,ofo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],UIn=[3,E,ifo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],HIn=[3,E,pfo,0,[ie,Lr,ge],[[0,1],[0,{[he]:Jc}],[0,{[I]:Re}]],2],jIn=[3,E,lfo,0,[ie,Lr,ge],[[0,1],[0,{[he]:Jc}],[0,{[I]:Re}]],2],zIn=[3,E,mfo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],KIn=[3,E,gfo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],WIn=[3,E,Ifo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],QIn=[3,E,Rfo,0,[ie,Lr,ge],[[0,1],[0,{[he]:Jc}],[0,{[I]:Re}]],2],ZIn=[3,E,hfo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],YIn=[3,E,Cfo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],XIn=[3,E,Afo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],JIn=[3,E,Tfo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],e_n=[3,E,Efo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],t_n=[3,E,Pfo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],n_n=[3,E,Nfo,0,[vt,Xt,Fy,Ofo],[0,0,2,0]],s_n=[3,E,Gfo,0,[pu,vt,Xt,ARn,Zc],[()=>pd,0,0,2,4]],r_n=[3,E,nRn,0,[Ta],[0]],o_n=[3,E,qfo,0,[FJ,bn],[[0,{[I]:tee}],[0,{[I]:Mn}]]],a_n=[3,E,Ffo,0,[ie,vt,Lk,Xt,dn,ge,XRn],[[0,1],[0,1],[0,{[he]:wTe}],[0,{[he]:Or}],[0,{[I]:mn}],[0,{[I]:Re}],[0,{[I]:vyn}]],3],i_n=[3,E,Bfo,0,[Fy,Xt,bn],[[2,{[I]:eee}],[0,{[I]:ud}],[0,{[I]:Mn}]]],c_n=[3,E,Hfo,0,[ie,vt,STe,Xt,dn,WCe,ge,lC,DSo,bSo],[[0,1],[0,1],[0,{[I]:VTe}],[0,{[he]:Or}],[0,{[I]:mn}],[2,{[I]:MTe}],[0,{[I]:Re}],[0,{[I]:Uy}],[6,{[I]:pCo}],[1,{[I]:dCo}]],2],l_n=[3,E,Ufo,{[Z]:tgo},[ngo,bn,gRn],[[()=>OCo,{[mt]:1}],[0,{[I]:Mn}],[()=>qCo,{[mt]:1,[Z]:sC}]]],u_n=[3,E,jfo,0,[ie,GCe,STe,dn,WCe,ge,Vt],[[0,1],[()=>qIn,{[Jt]:1,[Z]:GCe}],[0,{[I]:VTe}],[0,{[I]:mn}],[2,{[I]:MTe}],[0,{[I]:Re}],[0,{[I]:En}]],2],p_n=[3,E,Kfo,0,[Xt],[[0,{[I]:ud}]]],d_n=[3,E,Wfo,0,[ie,vt,Xt,ge],[[0,1],[0,1],[0,{[he]:Or}],[0,{[I]:Re}]],2],m_n=[3,E,Jfo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],f_n=[3,E,GJ,0,[ie,kdo,Aa,Dgn,By,CSn,URn],[0,0,0,()=>tIn,()=>S_n,()=>Kvn,()=>V0n],1],g_n=[3,E,oRn,0,[u0o,bTe,VSn],[0,0,0]],R_n=[3,E,oTe,0,[rTe,YSo,QSo],[0,[()=>Wo,0],0],1],S_n=[3,E,By,0,[mho],[0]],y_n=[3,E,ago,0,[],[]],I_n=[3,E,sC,0,[vt,Xt,Ymo,uIo],[0,0,0,0]],nL=[3,E,ogo,0,[lRn,uRn],[0,0]],zTe=[3,E,sTe,0,[vt],[0],1],__n=[3,E,cRn,0,[],[]],h_n=[3,E,pRn,0,[Ta],[0],1],v_n=[3,E,yRn,0,[Hy,$Te],[0,0]],C_n=[3,E,bgo,0,[fY],[[()=>HTe,16]]],T_n=[3,E,xgo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],A_n=[3,E,vgo,{[Z]:mY},[Ta,bn],[0,[0,{[I]:Mn}]]],D_n=[3,E,Tgo,0,[ie,ge,dn],[[0,1],[0,{[I]:Re}],[0,{[I]:mn}]],1],b_n=[3,E,Ego,{[Z]:qy},[pu,OJ],[()=>pd,[()=>uee,{[Z]:LJ}]]],E_n=[3,E,Pgo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],x_n=[3,E,Cgo,0,[Ck],[[()=>nee,16]]],P_n=[3,E,Ago,0,[ie,Lr,ge],[[0,1],[0,{[he]:Jc}],[0,{[I]:Re}]],2],$_n=[3,E,kgo,{[Z]:SY},[XCe],[[()=>VCn,{[mt]:1,[Z]:JCe}]]],w_n=[3,E,Lgo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],k_n=[3,E,Ggo,0,[wY],[[()=>lAe,16]]],L_n=[3,E,Ogo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],M_n=[3,E,Bgo,0,[Ak],[[()=>see,16]]],G_n=[3,E,Ugo,0,[ie,Lr,ge],[[0,1],[0,{[he]:Jc}],[0,{[I]:Re}]],2],O_n=[3,E,Vgo,0,[Tk],[[()=>ree,16]]],N_n=[3,E,qgo,0,[ie,Lr,ge],[[0,1],[0,{[he]:Jc}],[0,{[I]:Re}]],2],V_n=[3,E,zgo,{[Z]:NCe},[Hk,xTe],[[()=>qCn,{[mt]:1,[Z]:SC}],[0,{[I]:UTe}]]],q_n=[3,E,Kgo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],F_n=[3,E,Wgo,{[Z]:OCe},[OCe],[0]],B_n=[3,E,Zgo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],U_n=[3,E,Qgo,{[Z]:RY},[RTe],[[()=>YTe,0]]],H_n=[3,E,Ygo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],j_n=[3,E,eRo,0,[_Rn],[[()=>K_n,16]]],z_n=[3,E,nRo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],K_n=[3,E,_Rn,0,[MRn],[()=>M0n],1],W_n=[3,E,aRo,0,[hRn],[[()=>Z_n,16]]],Q_n=[3,E,iRo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],Z_n=[3,E,hRn,0,[VRn,Ta,sC],[()=>N0n,0,()=>nL],2],Y_n=[3,E,tRo,0,[Dk],[[()=>oee,16]]],X_n=[3,E,sRo,0,[ie,Lr,ge],[[0,1],[0,{[he]:Jc}],[0,{[I]:Re}]],2],J_n=[3,E,lRo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],ehn=[3,E,pRo,0,[CY],[[()=>sAe,16]]],thn=[3,E,dRo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],nhn=[3,E,fRo,0,[cSn],[[0,16]]],shn=[3,E,gRo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],rhn=[3,E,SRo,0,[rSn],[[()=>evn,16]]],ohn=[3,E,yRo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],ahn=[3,E,_Ro,0,[bY],[[()=>aAe,16]]],ihn=[3,E,TRo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],chn=[3,E,vRo,{[Z]:EY},[oSn],[0]],lhn=[3,E,CRo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],uhn=[3,E,DRo,{[Z]:uu},[ZJ],[[()=>wm,0]],1],phn=[3,E,bRo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],dhn=[3,E,xRo,{[Z]:kY},[Ta,NRn],[0,[0,{[Z]:GRn}]]],mhn=[3,E,PRo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],fhn=[3,E,wRo,{[Z]:LY},[hTe,pTe,sTe,CTe],[()=>oAe,()=>WTe,()=>zTe,[()=>BCn,0]]],ghn=[3,E,kRo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],Rhn=[3,E,GRo,{[Z]:qy},[pu,OJ,bn],[()=>pd,[()=>uee,{[Z]:LJ}],[0,{[I]:Mn}]]],Shn=[3,E,qRo,0,[ie,vt,Xt,dn,ge],[[0,1],[0,1],[0,{[he]:Or}],[0,{[I]:mn}],[0,{[I]:Re}]],2],yhn=[3,E,ORo,0,[Pgn,FJ,Zc,Jv,qs,ao,io,co,uo,po,mo,lo,fo,go,Ro,Ka,Da,bn,Uk],[[()=>Ky,16],[0,{[I]:tee}],[4,{[I]:VJ}],[1,{[I]:Xv}],[0,{[I]:qs}],[0,{[I]:ed}],[0,{[I]:td}],[0,{[I]:nd}],[0,{[I]:rd}],[0,{[I]:od}],[0,{[I]:ad}],[0,{[I]:sd}],[0,{[I]:id}],[0,{[I]:cd}],[0,{[I]:ld}],[0,{[I]:qg}],[0,{[I]:Qa}],[0,{[I]:Mn}],[0,{[I]:FTe}]]],Ihn=[3,E,FRo,0,[ie,vt,Lk,Xt,dn,ge,YCe],[[0,1],[0,1],[0,{[he]:wTe}],[0,{[he]:Or}],[0,{[I]:mn}],[0,{[I]:Re}],[0,{[I]:OTe}]],3],_hn=[3,E,NRo,{[Z]:BRo},[Fy,Zc,Xt,bn,qs,qgn,NIo,Aa,qIo],[[2,{[I]:eee}],[4,{[I]:VJ}],[0,{[I]:ud}],[0,{[I]:Mn}],0,()=>fIn,[()=>hhn,0],0,1]],hhn=[3,E,VRo,0,[I0o,UJ,WRn,qJ,Jp,HJ],[[1,{[Z]:BJ}],0,0,1,2,[()=>JCo,{[mt]:1,[Z]:jJ}]]],vhn=[3,E,URo,0,[ie,vt,TIo,Xt,qJ,UJ,Mr,Yc,Gr,dn,ge],[[0,1],[0,1],[64,{[I]:RCo}],[0,{[he]:Or}],[1,{[I]:gCo}],[0,{[I]:_Co}],[0,{[I]:So}],[()=>mu,{[I]:du}],[0,{[I]:yo}],[0,{[I]:mn}],[0,{[I]:Re}]],3],Chn=[3,E,ZRo,0,[vY],[[()=>eAe,{[Jt]:1,[Z]:vY}]]],Thn=[3,E,YRo,0,[ie,vt,Xt,dn,ge],[[0,1],[0,1],[0,{[he]:Or}],[0,{[I]:mn}],[0,{[I]:Re}]],2],Ahn=[3,E,KRo,0,[TY],[[()=>JTe,16]]],Dhn=[3,E,WRo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],bhn=[3,E,XRo,0,[Gk,Fy,zCe,Yp,ATe,Zc,Jv,qs,ao,io,co,uo,po,mo,lo,fo,go,Ro,Ka,yTe,Xt,Wv,Qv,Zv,Yv,eTe,tC,lu,yY,Kk,Da,pC,Mr,Gr,Wa,va,Aa,bn,Uk,BJ,ETe,gC,RC,fC],[[()=>Ky,16],[2,{[I]:eee}],[0,{[I]:WSn}],[0,{[I]:Zk}],[0,{[I]:Cyn}],[4,{[I]:VJ}],[1,{[I]:Xv}],[0,{[I]:qs}],[0,{[I]:ed}],[0,{[I]:td}],[0,{[I]:nd}],[0,{[I]:rd}],[0,{[I]:od}],[0,{[I]:ad}],[0,{[I]:sd}],[0,{[I]:id}],[0,{[I]:cd}],[0,{[I]:ld}],[0,{[I]:qg}],[1,{[I]:_yn}],[0,{[I]:ud}],[0,{[I]:Ok}],[0,{[I]:Nk}],[0,{[I]:Vk}],[0,{[I]:qk}],[0,{[I]:Hgn}],[0,{[I]:Fk}],[4,{[I]:lu}],[0,{[I]:yY}],[0,{[I]:tL}],[0,{[I]:Qa}],[128,{[IC]:AC}],[0,{[I]:So}],[0,{[I]:yo}],[()=>Wo,{[I]:pc}],[2,{[I]:dc}],[0,{[I]:eL}],[0,{[I]:Mn}],[0,{[I]:FTe}],[1,{[I]:hyn}],[1,{[I]:Ayn}],[0,{[I]:Xk}],[5,{[I]:Jk}],[0,{[I]:Yk}]]],Ehn=[3,E,JRo,0,[ie,vt,lC,DRn,Bk,xRn,xY,fSn,gSn,RSn,SSn,ySn,ISn,Xt,Mr,Yc,Gr,dn,jy,ge,YCe],[[0,1],[0,1],[0,{[I]:Uy}],[4,{[I]:dTe}],[0,{[I]:uC}],[4,{[I]:fTe}],[0,{[I]:xY}],[0,{[he]:YSn}],[0,{[he]:XSn}],[0,{[he]:JSn}],[0,{[he]:eyn}],[0,{[he]:tyn}],[6,{[he]:nyn}],[0,{[he]:Or}],[0,{[I]:So}],[()=>mu,{[I]:du}],[0,{[I]:yo}],[0,{[I]:mn}],[1,{[he]:JJ}],[0,{[I]:Re}],[0,{[I]:OTe}]],2],xhn=[3,E,eSo,0,[PY],[[()=>tAe,{[Jt]:1,[Z]:PY}]]],Phn=[3,E,tSo,0,[ie,vt,Xt,dn,ge],[[0,1],[0,1],[0,{[he]:Or}],[0,{[I]:mn}],[0,{[I]:Re}]],2],$hn=[3,E,rSo,{[Z]:uu},[ZJ,Xt],[[()=>wm,0],[0,{[I]:ud}]],1],whn=[3,E,aSo,0,[ie,vt,Xt,ge,dn],[[0,1],[0,1],[0,{[he]:Or}],[0,{[I]:Re}],[0,{[I]:mn}]],2],khn=[3,E,oSo,0,[Gk,bn],[[()=>Ky,16],[0,{[I]:Mn}]]],Lhn=[3,E,iSo,0,[ie,vt,dn,ge],[[0,1],[0,1],[0,{[I]:mn}],[0,{[I]:Re}]],2],Mhn=[3,E,uSo,0,[AY],[[()=>rAe,16]]],Ghn=[3,E,pSo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],Ohn=[3,E,vRn,0,[FSn],[0],1],Nhn=[3,E,lTe,0,[uTe,iSn],[[()=>KTe,{[ayn]:[oyn,QSn]}],0]],KTe=[3,E,uTe,0,[zk,nTe,rgo,cC,F0o],[[0,{[pvo]:1,[Z]:wCo}],0,0,0,0],1],Vhn=[3,E,mSo,0,[KCe,dmo,pmo,QCe,Jdo],[[0,{[I]:lyn}],[0,{[I]:gvo}],[0,{[I]:fvo}],[0,{[I]:yvo}],[2,{[I]:dvo}]]],qhn=[3,E,fSo,0,[ie,ge],[[0,1],[0,{[I]:Re}]],1],Fhn=[3,E,SSo,0,[Fy,zCe,Yp,ATe,smo,Zc,Jv,ao,io,co,uo,po,mo,lo,fo,go,Ro,Ka,qs,yTe,Xt,Wv,Qv,Zv,Yv,tC,eTe,lu,yY,Kk,Da,pC,Mr,Gr,Wa,va,Aa,bn,Uk,BJ,ETe,gC,RC,fC],[[2,{[I]:eee}],[0,{[I]:WSn}],[0,{[I]:Zk}],[0,{[I]:Cyn}],[0,{[I]:mvo}],[4,{[I]:VJ}],[1,{[I]:Xv}],[0,{[I]:ed}],[0,{[I]:td}],[0,{[I]:nd}],[0,{[I]:rd}],[0,{[I]:od}],[0,{[I]:ad}],[0,{[I]:sd}],[0,{[I]:id}],[0,{[I]:cd}],[0,{[I]:ld}],[0,{[I]:qg}],[0,{[I]:qs}],[1,{[I]:_yn}],[0,{[I]:ud}],[0,{[I]:Ok}],[0,{[I]:Nk}],[0,{[I]:Vk}],[0,{[I]:qk}],[0,{[I]:Fk}],[0,{[I]:Hgn}],[4,{[I]:lu}],[0,{[I]:yY}],[0,{[I]:tL}],[0,{[I]:Qa}],[128,{[IC]:AC}],[0,{[I]:So}],[0,{[I]:yo}],[()=>Wo,{[I]:pc}],[2,{[I]:dc}],[0,{[I]:eL}],[0,{[I]:Mn}],[0,{[I]:FTe}],[1,{[I]:hyn}],[1,{[I]:Ayn}],[0,{[I]:Xk}],[5,{[I]:Jk}],[0,{[I]:Yk}]]],Bhn=[3,E,ySo,0,[ie,vt,lC,DRn,Bk,xRn,xY,fSn,gSn,RSn,SSn,ySn,ISn,Xt,Mr,Yc,Gr,dn,jy,ge,YCe],[[0,1],[0,1],[0,{[I]:Uy}],[4,{[I]:dTe}],[0,{[I]:uC}],[4,{[I]:fTe}],[0,{[I]:xY}],[0,{[he]:YSn}],[0,{[he]:XSn}],[0,{[he]:JSn}],[0,{[he]:eyn}],[0,{[he]:tyn}],[6,{[he]:nyn}],[0,{[he]:Or}],[0,{[I]:So}],[()=>mu,{[I]:du}],[0,{[I]:yo}],[0,{[I]:mn}],[1,{[he]:JJ}],[0,{[I]:Re}],[0,{[I]:OTe}]],2],WTe=[3,E,pTe,0,[i0o],[0],1],QTe=[3,E,gTe,0,[cC,nTe],[0,0]],ZTe=[3,E,mTe,0,[Ygn,Zmo,PRn,sho],[()=>OIn,0,()=>n0n,()=>Y0n]],Uhn=[3,E,NSo,0,[as,yC],[0,[()=>wm,{[mt]:1,[Z]:Xc}]]],see=[3,E,Ak,0,[Lr,Ta,_0o,Pm],[0,0,[()=>rTo,{[mt]:1,[Z]:BSn}],[()=>Hhn,0]],3],Hhn=[3,E,qSo,0,[as,Xc,Mk],[0,()=>Wy,[()=>Uhn,0]]],ree=[3,E,Tk,0,[GJ,vSo,Lr,$So,o0o,Pm,EIo],[[()=>jhn,0],2,0,0,()=>Qhn,()=>Khn,[()=>HCo,0]],5],jhn=[3,E,hSo,0,[DSn],[[()=>Whn,0]],1],zhn=[3,E,CSo,0,[kSn,DTe],[[()=>RCn,{[Z]:$Sn}],[()=>mCn,{[Z]:WJ}]]],Khn=[3,E,TSo,0,[as],[0],1],Whn=[3,E,GSo,0,[ie,IRn,Bdo,as,oTe],[0,0,0,0,[()=>zhn,0]],2],Qhn=[3,E,OSo,0,[Igo],[0],1],Zhn=[3,E,IY,0,[eC,By],[0,()=>DC],1],Yhn=[3,E,ERn,0,[eC,PTe,sC,jk,QJ],[0,0,()=>nL,0,0],1],Xhn=[3,E,VSo,0,[eC,By],[0,()=>DC],1],Jhn=[3,E,_Y,0,[KJ,By],[()=>iee,()=>DC],1],e0n=[3,E,$Rn,0,[PTe,jk,KJ,sC,QJ],[0,0,()=>iee,()=>nL,0],3],t0n=[3,E,jSo,0,[KJ],[()=>iee],1],n0n=[3,E,USo,0,[zk],[0]],s0n=[3,E,HSo,0,[vTe],[0]],r0n=[3,E,Cyo,0,[vyo,aTe,Lr,Pm],[[0,{[Z]:Amo}],[64,{[mt]:1,[Z]:iTe}],0,[()=>aee,0]],2],o0n=[3,E,hyo,0,[aRn,nC,lgo],[5,1,2]],a0n=[3,E,Zyo,0,[Ta,Yp,cC,as,Pm,C0o,vIo,QRn,xgn],[0,()=>o0n,0,0,[()=>c0n,0],[()=>aTo,{[mt]:1,[Z]:HSn}],[()=>WCo,{[mt]:1,[Z]:ZRn}],()=>B0n,()=>Yyn],1],i0n=[3,E,Yyo,0,[as,yC,tSn,nSn],[0,[()=>wm,{[mt]:1,[Z]:Xc}],1,1]],c0n=[3,E,Xyo,0,[as,Xc,tSn,nSn,Mk],[0,()=>Wy,1,1,[()=>i0n,0]]],l0n=[3,E,ryo,{[Z]:oyo},[Jp,Ca,mC,Agn],[2,0,0,[()=>LCo,{[mt]:1,[Z]:Ck}]]],u0n=[3,E,ayo,0,[ie,Ca,ge],[[0,1],[0,{[he]:Vg}],[0,{[I]:Re}]],1],p0n=[3,E,pyo,0,[Jp,Ca,mC,bRn],[2,0,0,[()=>BCo,{[mt]:1,[Z]:Ak}]]],d0n=[3,E,dyo,0,[ie,Ca,ge],[[0,1],[0,{[he]:Vg}],[0,{[I]:Re}]],1],m0n=[3,E,cyo,{[Z]:byo},[Ca,TRn,Jp,mC],[0,[()=>UCo,{[mt]:1,[Z]:Tk}],2,0]],f0n=[3,E,lyo,0,[ie,Ca,ge],[[0,1],[0,{[he]:Vg}],[0,{[I]:Re}]],1],g0n=[3,E,fyo,{[Z]:Eyo},[Jp,Ca,mC,LRn],[2,0,0,[()=>zCo,{[mt]:1,[Z]:Dk}]]],R0n=[3,E,gyo,0,[ie,Ca,ge],[[0,1],[0,{[he]:Vg}],[0,{[I]:Re}]],1],S0n=[3,E,Ryo,{[Z]:eyo},[ZCe,pu,Ca,as],[[()=>NCn,0],()=>pd,0,0]],y0n=[3,E,Syo,0,[sIo,Ca,as,QCe],[[1,{[he]:svo}],[0,{[he]:Vg}],[0,{[he]:Wk}],[0,{[he]:Z0o}]]],I0n=[3,E,Iyo,{[Z]:tyo},[ZCe,Ca],[[()=>NCn,0],0]],_0n=[3,E,_yo,0,[Ca,oIo],[[0,{[he]:Vg}],[1,{[he]:rvo}]]],h0n=[3,E,$yo,{[Z]:wyo},[ie,NJ,jSn,zRn,as,Gg,_Io,FRn,Jp,T0o,MJ,Og,bn],[0,0,0,0,0,0,0,1,2,[()=>KCo,{[mt]:1,[Z]:B0o}],[()=>lee,{[mt]:1}],0,[0,{[I]:Mn}]]],v0n=[3,E,kyo,0,[ie,Gg,Og,NJ,FRn,as,jSn,ge,dn],[[0,1],[0,{[he]:YJ}],[0,{[he]:XJ}],[0,{[he]:ZSn}],[1,{[he]:avo}],[0,{[he]:Wk}],[0,{[he]:lvo}],[0,{[I]:Re}],[0,{[I]:mn}]],1],C0n=[3,E,Gyo,0,[omo,ie,vt,FJ,wgn,kRn,Mdo,Ca,mC,bn],[[()=>MCo,0],0,0,[0,{[I]:tee}],0,1,1,0,0,[0,{[I]:Mn}]]],T0n=[3,E,Oyo,0,[ie,vt,Xt,kRn,wgn,Ca,dn,ge],[[0,1],[0,1],[0,{[he]:Or}],[1,{[he]:nvo}],[0,{[he]:Q0o}],[0,{[he]:Vg}],[0,{[I]:mn}],[0,{[I]:Re}]],2],A0n=[3,E,Nyo,{[Z]:wRn},[Jp,BRn,gIo,tRn,Hy,as,Gg,dC,MJ,Og,bn],[2,0,0,[()=>FCn,{[mt]:1}],0,0,0,1,[()=>lee,{[mt]:1}],0,[0,{[I]:Mn}]]],D0n=[3,E,Vyo,0,[ie,Gg,Og,BRn,dC,as,dn,ge,ITe],[[0,1],[0,{[he]:YJ}],[0,{[he]:XJ}],[0,{[he]:tvo}],[1,{[he]:LTe}],[0,{[he]:Wk}],[0,{[I]:mn}],[0,{[I]:Re}],[64,{[I]:qTe}]],1],b0n=[3,E,Fyo,{[Z]:wRn},[Jp,tRn,Hy,as,Gg,dC,MJ,Og,zSo,Ca,mC,ASn,bn],[2,[()=>FCn,{[mt]:1}],0,0,0,1,[()=>lee,{[mt]:1}],0,1,0,0,0,[0,{[I]:Mn}]]],E0n=[3,E,Uyo,0,[ie,Gg,Og,dC,as,Ca,ggo,ASn,dn,ge,ITe],[[0,1],[0,{[he]:YJ}],[0,{[he]:XJ}],[1,{[he]:LTe}],[0,{[he]:Wk}],[0,{[he]:Vg}],[2,{[he]:X0o}],[0,{[he]:cvo}],[0,{[I]:mn}],[0,{[I]:Re}],[64,{[I]:qTe}]],1],x0n=[3,E,Byo,{[Z]:eIo},[Jp,NJ,KSn,zRn,hIo,U0o,sRn,Hy,as,Gg,dC,MJ,Og,bn],[2,0,0,0,0,[()=>ZCo,{[mt]:1,[Z]:H0o}],[()=>NCo,{[mt]:1,[Z]:Fy}],0,0,0,1,[()=>lee,{[mt]:1}],0,[0,{[I]:Mn}]]],P0n=[3,E,Hyo,0,[ie,Gg,Og,NJ,dC,as,KSn,ge,dn,ITe],[[0,1],[0,{[he]:YJ}],[0,{[he]:XJ}],[0,{[he]:ZSn}],[1,{[he]:LTe}],[0,{[he]:Wk}],[0,{[he]:uvo}],[0,{[I]:Re}],[0,{[I]:mn}],[64,{[I]:qTe}]],1],$0n=[3,E,Kyo,{[Z]:Wyo},[bgn,kgn,ie,vt,Ng,UJ,WRn,qJ,Jp,HJ,gTe,pu,Aa,bn,Vt,Ka],[[4,{[I]:iyn}],[0,{[I]:cyn}],0,0,0,0,0,1,2,[()=>XCo,{[mt]:1,[Z]:jJ}],()=>QTe,()=>pd,0,[0,{[I]:Mn}],0,0]],w0n=[3,E,Qyo,0,[ie,vt,Ng,qJ,UJ,dn,ge,Mr,Yc,Gr],[[0,1],[0,1],[0,{[he]:Qk}],[1,{[he]:ovo}],[0,{[he]:ivo}],[0,{[I]:mn}],[0,{[I]:Re}],[0,{[I]:So}],[()=>mu,{[I]:du}],[0,{[I]:yo}]],3],k0n=[3,E,Dyo,0,[zk,Hy],[0,0]],YTe=[3,E,RTe,0,[l0o,y0o,NSn,qSn],[0,0,[()=>sTo,0],[()=>vCn,0]],2],L0n=[3,E,VCe,0,[_Y,IY,gY],[()=>Jhn,()=>Zhn,()=>aIn],1],M0n=[3,E,MRn,0,[oRn,$Rn,ERn,Mgn],[()=>g_n,()=>e0n,()=>Yhn,()=>iIn],1],G0n=[3,E,ORn,0,[Hy,$Te],[0,0]],O0n=[3,E,qCe,0,[LSn],[()=>nCn],1],N0n=[3,E,VRn,0,[MSn],[()=>sCn],1],DC=[3,E,cIo,0,[kho,WSo],[0,0],1],V0n=[3,E,URn,0,[Ta,dgo],[0,()=>iAe],1],q0n=[3,E,tIo,0,[as,yC,$gn],[0,[()=>wm,{[mt]:1,[Z]:Xc}],0]],oee=[3,E,Dk,0,[Lr,Pm],[0,[()=>HCn,0]],1],F0n=[3,E,qRn,0,[Ng,vt,BSo,Aa,pu,gTe,Vt,Ka],[0,0,4,0,()=>pd,()=>QTe,0,0]],B0n=[3,E,QRn,0,[jRn,KRn],[1,1]],U0n=[3,E,ZRn,0,[jRn,Aa,KRn],[1,0,1]],XTe=[3,E,FCe,0,[d0o,cho,Ayo,cRn],[[()=>oTo,{[mt]:1,[Z]:OSn}],[()=>eTo,{[mt]:1,[Z]:dSn}],[()=>jCo,{[mt]:1,[Z]:Dmo}],()=>__n]],aee=[3,E,dIo,0,[vt],[[()=>eCn,{[Z]:zho}]]],H0n=[3,E,sSn,0,[vt,Zc,qs,Vt,Ka,zy,Aa,pu,TTe],[0,4,0,[64,{[mt]:1}],0,1,0,()=>pd,()=>cAe]],j0n=[3,E,xIo,0,[vt,Xt,qs,xyo,zy],[0,0,0,6,1],1],JTe=[3,E,TY,0,[$Io,SC],[0,()=>z0n]],eAe=[3,E,kIo,0,[Ta],[0]],tAe=[3,E,LIo,0,[HRn,$ho],[0,5]],z0n=[3,E,MIo,0,[rRn],[()=>VIn]],K0n=[3,E,VIo,0,[jy,zy,ao,io,co,uo,po,mo,lo,fo,go,Ro],[1,1,0,0,0,0,0,0,0,0,0,0]],W0n=[3,E,BIo,0,[qs,Vt,Ka,zy,Aa,vt,Xt,ARn,Zc,pu,TTe],[0,[64,{[mt]:1}],0,1,0,0,0,2,4,()=>pd,()=>cAe]],Q0n=[3,E,JRn,0,[r0o],[[()=>tCn,0]]],nAe=[3,E,_Te,0,[Ygn,PRn],[()=>NIn,()=>s0n]],pd=[3,E,pu,0,[nTe,cC],[0,0]],sAe=[3,E,CY,0,[Hk],[[()=>YCo,{[mt]:1,[Z]:SC}]],1],Z0n=[3,E,DIo,0,[eSn],[0],1],Y0n=[3,E,w_o,0,[],[]],X0n=[3,E,jJ,0,[jy,Zc,qs,zy,ao,io,co,uo,po,mo,lo,fo,go,Ro],[1,4,0,1,0,0,0,0,0,0,0,0,0,0]],J0n=[3,E,DY,{[Z]:DY},[P_o],[0]],evn=[3,E,rSn,0,[tgn],[[2,{[Z]:tgn}]]],tvn=[3,E,lSn,0,[Vgn,Ogn,Ngn],[1,1,1]],nvn=[3,E,$_o,0,[iRn],[[()=>tvn,{[kTe]:1}]]],rAe=[3,E,AY,0,[Yfn,egn,Xfn,ngn],[[2,{[Z]:Yfn}],[2,{[Z]:egn}],[2,{[Z]:Xfn}],[2,{[Z]:ngn}]]],svn=[3,E,ZIo,0,[ie,fY,os,Vt,ge],[[0,1],[()=>HTe,{[Jt]:1,[Z]:fY}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:Re}]],2],rvn=[3,E,KIo,0,[ie,mY,ge,Vt],[[0,1],[()=>eIn,{[Jt]:1,[Z]:mY}],[0,{[I]:Re}],[0,{[I]:En}]],2],ovn=[3,E,YIo,0,[ie,Kv,qy,os,Vt,rC,oC,aC,cTe,iC,ge],[[0,1],[0,{[I]:_C}],[()=>jTe,{[Jt]:1,[Z]:qy}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:hC}],[0,{[I]:vC}],[0,{[I]:CC}],[0,{[I]:NTe}],[0,{[I]:TC}],[0,{[I]:Re}]],1],avn=[3,E,WIo,0,[ie,Lr,Ck,ge],[[0,1],[0,{[he]:Jc}],[()=>nee,{[Jt]:1,[Z]:Ck}],[0,{[I]:Re}]],3],ivn=[3,E,e_o,0,[ie,SY,os,Vt,ge],[[0,1],[()=>DIn,{[Jt]:1,[Z]:SY}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:Re}]],2],cvn=[3,E,n_o,0,[ie,wY,os,Vt,ge],[[0,1],[()=>lAe,{[Jt]:1,[Z]:wY}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:Re}]],2],lvn=[3,E,a_o,0,[ie,Lr,Ak,ge],[[0,1],[0,{[he]:Jc}],[()=>see,{[Jt]:1,[Z]:Ak}],[0,{[I]:Re}]],3],uvn=[3,E,r_o,0,[ie,Lr,Tk,ge],[[0,1],[0,{[he]:Jc}],[()=>ree,{[Jt]:1,[Z]:Tk}],[0,{[I]:Re}]],3],pvn=[3,E,l_o,0,[xTe],[[0,{[I]:UTe}]]],dvn=[3,E,u_o,0,[ie,Vt,NCe,ge,xTe],[[0,1],[0,{[I]:En}],[()=>dIn,{[Jt]:1,[Z]:NCe}],[0,{[I]:Re}],[0,{[I]:UTe}]],1],mvn=[3,E,p_o,0,[ie,RY,os,Vt,ge],[[0,1],[()=>mIn,{[Jt]:1,[Z]:RY}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:Re}]],2],fvn=[3,E,m_o,0,[ie,Lr,Dk,ge],[[0,1],[0,{[he]:Jc}],[()=>oee,{[Jt]:1,[Z]:Dk}],[0,{[I]:Re}]],3],gvn=[3,E,g_o,0,[ie,FCe,ge,Vho],[[0,1],[()=>XTe,{[Jt]:1,[Z]:FCe}],[0,{[I]:Re}],[2,{[I]:xCo}]],2],Rvn=[3,E,S_o,0,[ie,CY,os,ge,Vt],[[0,1],[()=>sAe,{[Jt]:1,[Z]:CY}],[0,{[I]:rs}],[0,{[I]:Re}],[0,{[I]:En}]],2],Svn=[3,E,I_o,0,[ie,cSn,os,Vt,Fmo,ge],[[0,1],[0,16],[0,{[I]:rs}],[0,{[I]:En}],[2,{[I]:Ivo}],[0,{[I]:Re}]],2],yvn=[3,E,C_o,0,[ie,bY,os,Vt,USn,ge],[[0,1],[()=>aAe,{[Jt]:1,[Z]:bY}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:uyn}],[0,{[I]:Re}]],2],Ivn=[3,E,v_o,0,[ie,EY,os,Vt,ge],[[0,1],[()=>Wvn,{[Jt]:1,[Z]:EY}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:Re}]],2],_vn=[3,E,A_o,0,[ie,uu,os,Vt,ge],[[0,1],[()=>cee,{[Jt]:1,[Z]:uu}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:Re}]],2],hvn=[3,E,b_o,0,[ie,kY,os,Vt,STe,ge],[[0,1],[()=>MCn,{[Jt]:1,[Z]:kY}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:VTe}],[0,{[I]:Re}]],2],vvn=[3,E,x_o,0,[ie,LY,os,Vt,ge],[[0,1],[()=>GCn,{[Jt]:1,[Z]:LY}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:Re}]],2],Cvn=[3,E,G_o,0,[bn],[[0,{[I]:Mn}]]],Tvn=[3,E,N_o,0,[ie,vt,Kv,qy,os,Vt,rC,oC,aC,cTe,iC,dn,Xt,ge],[[0,1],[0,1],[0,{[I]:_C}],[()=>jTe,{[Jt]:1,[Z]:qy}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:hC}],[0,{[I]:vC}],[0,{[I]:CC}],[0,{[I]:NTe}],[0,{[I]:TC}],[0,{[I]:mn}],[0,{[he]:Or}],[0,{[I]:Re}]],2],Avn=[3,E,O_o,0,[vt,Lk,FJ,qs,ao,io,co,uo,po,mo,lo,fo,go,Ro,Ka,Da,bn],[0,0,[0,{[I]:tee}],[0,{[I]:qs}],[0,{[I]:ed}],[0,{[I]:td}],[0,{[I]:nd}],[0,{[I]:rd}],[0,{[I]:od}],[0,{[I]:ad}],[0,{[I]:sd}],[0,{[I]:id}],[0,{[I]:cd}],[0,{[I]:ld}],[0,{[I]:qg}],[0,{[I]:Qa}],[0,{[I]:Mn}]]],Dvn=[3,E,V_o,0,[ie,vt,Lk,Pgn,Xt,XRn,Vt,ao,io,co,uo,po,mo,lo,fo,go,Ro,os,dn,ge],[[0,1],[0,1],[0,{[he]:wTe}],[()=>Ky,16],[0,{[he]:Or}],[0,{[I]:vyn}],[0,{[I]:En}],[0,{[I]:ed}],[0,{[I]:td}],[0,{[I]:nd}],[0,{[I]:rd}],[0,{[I]:od}],[0,{[I]:ad}],[0,{[I]:sd}],[0,{[I]:id}],[0,{[I]:cd}],[0,{[I]:ld}],[0,{[I]:rs}],[0,{[I]:mn}],[0,{[I]:Re}]],4],bvn=[3,E,j_o,0,[bn],[[0,{[I]:Mn}]]],Evn=[3,E,z_o,0,[ie,vt,vY,dn,Xt,os,Vt,ge],[[0,1],[0,1],[()=>eAe,{[Jt]:1,[Z]:vY}],[0,{[I]:mn}],[0,{[he]:Or}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:Re}]],2],xvn=[3,E,B_o,0,[bn],[[0,{[I]:Mn}]]],Pvn=[3,E,U_o,0,[ie,TY,dn,USn,os,Vt,ge],[[0,1],[()=>JTe,{[Jt]:1,[Z]:TY}],[0,{[I]:mn}],[0,{[I]:uyn}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:Re}]],1],$vn=[3,E,K_o,0,[Yp,qs,ao,io,co,uo,po,mo,lo,fo,go,Ro,Ka,Da,Xt,Mr,Gr,Wa,$m,va,zy,bn],[[0,{[I]:Zk}],[0,{[I]:qs}],[0,{[I]:ed}],[0,{[I]:td}],[0,{[I]:nd}],[0,{[I]:rd}],[0,{[I]:od}],[0,{[I]:ad}],[0,{[I]:sd}],[0,{[I]:id}],[0,{[I]:cd}],[0,{[I]:ld}],[0,{[I]:qg}],[0,{[I]:Qa}],[0,{[I]:ud}],[0,{[I]:So}],[0,{[I]:yo}],[()=>Wo,{[I]:pc}],[()=>Bg,{[I]:Fg}],[2,{[I]:dc}],[1,{[I]:ICo}],[0,{[I]:Mn}]]],wvn=[3,E,W_o,0,[ie,vt,Kv,Gk,Wv,Qv,Zv,Yv,Jv,os,tC,Vt,ao,io,co,uo,po,mo,lo,fo,go,Ro,lu,lC,Bk,rC,oC,aC,iC,K0o,pC,Da,Aa,Kk,Mr,Yc,Gr,Wa,$m,va,dn,uu,gC,RC,fC,ge],[[0,1],[0,1],[0,{[I]:_C}],[()=>Ky,16],[0,{[I]:Ok}],[0,{[I]:Nk}],[0,{[I]:Vk}],[0,{[I]:qk}],[1,{[I]:Xv}],[0,{[I]:rs}],[0,{[I]:Fk}],[0,{[I]:En}],[0,{[I]:ed}],[0,{[I]:td}],[0,{[I]:nd}],[0,{[I]:rd}],[0,{[I]:od}],[0,{[I]:ad}],[0,{[I]:sd}],[0,{[I]:id}],[0,{[I]:cd}],[0,{[I]:ld}],[4,{[I]:lu}],[0,{[I]:Uy}],[0,{[I]:uC}],[0,{[I]:hC}],[0,{[I]:vC}],[0,{[I]:CC}],[0,{[I]:TC}],[1,{[I]:$Co}],[128,{[IC]:AC}],[0,{[I]:Qa}],[0,{[I]:eL}],[0,{[I]:tL}],[0,{[I]:So}],[()=>mu,{[I]:du}],[0,{[I]:yo}],[()=>Wo,{[I]:pc}],[()=>Bg,{[I]:Fg}],[2,{[I]:dc}],[0,{[I]:mn}],[0,{[I]:BTe}],[0,{[I]:Xk}],[5,{[I]:Jk}],[0,{[I]:Yk}],[0,{[I]:Re}]],2],kvn=[3,E,Q_o,0,[bn],[[0,{[I]:Mn}]]],Lvn=[3,E,Z_o,0,[ie,vt,PY,dn,Xt,WCe,os,Vt,ge],[[0,1],[0,1],[()=>tAe,{[Jt]:1,[Z]:PY}],[0,{[I]:mn}],[0,{[he]:Or}],[2,{[I]:MTe}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:Re}]],2],Mvn=[3,E,J_o,0,[Xt],[[0,{[I]:ud}]]],Gvn=[3,E,eho,0,[ie,vt,uu,Xt,os,Vt,ge,dn],[[0,1],[0,1],[()=>cee,{[Jt]:1,[Z]:uu}],[0,{[he]:Or}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:Re}],[0,{[I]:mn}]],3],Ovn=[3,E,nho,0,[ie,AY,os,Vt,ge],[[0,1],[()=>rAe,{[Jt]:1,[Z]:AY}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:Re}]],2],Nvn=[3,E,dSn,0,[aho,aTe,Lr,Pm],[[0,{[Z]:uho}],[64,{[mt]:1,[Z]:iTe}],0,[()=>aee,0]],2],iee=[3,E,KJ,0,[Yp,nC],[0,1],1],Vvn=[3,E,dho,0,[aSn],[[21,{[kTe]:1}]]],qvn=[3,E,TSn,0,[CRn,ISo,uSn,fho,gho],[0,0,0,0,0]],oAe=[3,E,hTe,0,[CRn,uSn],[0,0],1],Fvn=[3,E,Sho,0,[],[]],Bvn=[3,E,_ho,0,[ie,vt,Eho,wfo,Lfo,kfo,Mfo,Fho,Uho,Bho,Hho,Qmo],[[0,1],[0,1],[0,{[I]:CCo}],[0,{[I]:Uy}],[0,{[I]:uC}],[4,{[I]:dTe}],[4,{[I]:fTe}],[0,{[I]:TCo}],[0,{[I]:DCo}],[6,{[I]:ACo}],[6,{[I]:bCo}],[0,{[I]:vvo,[evo]:1}]],3],Uvn=[3,E,_Sn,0,[Ta],[0],1],aAe=[3,E,bY,0,[zJ,Hk],[0,[()=>tTo,{[mt]:1,[Z]:SC}]],2],Hvn=[3,E,Aho,0,[Ta,GJ,cC,rho,as,Pm,wSn,pRn,nRn],[0,()=>f_n,0,1,0,[()=>zvn,0],()=>dCn,()=>h_n,()=>r_n],2],jvn=[3,E,Cho,0,[as,yC],[0,[()=>wm,{[mt]:1,[Z]:Xc}]]],zvn=[3,E,Tho,0,[as,Xc,Mk],[0,()=>Wy,[()=>jvn,0]]],Kvn=[3,E,CSn,0,[Ta,h0o],[0,()=>iAe],2],iAe=[3,E,xho,0,[pIo],[1]],Wvn=[3,E,EY,0,[oSn],[0],1],Qvn=[3,E,hSn,0,[mgo],[2]],Zvn=[3,E,yho,0,[bn,Iho],[[0,{[I]:Mn}],[0,{[I]:hCo}]]],Yvn=[3,E,hho,0,[ie,vt,Xt,BCe,dn,Vt,ge],[[0,1],[0,1],[0,{[he]:Or}],[()=>Xvn,{[Jt]:1,[Z]:BCe}],[0,{[I]:mn}],[0,{[I]:En}],[0,{[I]:Re}]],2],Xvn=[3,E,BCe,0,[nC,vRn,zk,FSn,sgo,xSn,JRn],[1,()=>Ohn,0,0,0,()=>iCn,[()=>Q0n,0]]],cAe=[3,E,TTe,0,[MSo,pho],[2,4]],Jvn=[3,E,vSn,0,[TSn,eRn],[()=>qvn,()=>_In],1],eCn=[3,E,jho,0,[Sgo],[[()=>FCo,{[mt]:1,[Z]:yRn}]]],tCn=[3,E,Kho,0,[fmo,as,oTe,gmo,LJ,uu,zSn,Aa],[0,0,[()=>R_n,0],0,[()=>uee,0],[()=>cee,0],[()=>iTo,0],0],2],nCn=[3,E,LSn,0,[bTe,jk],[0,0],2],sCn=[3,E,MSn,0,[bTe,jk,QJ,VSn],[0,0,0,0],4],rCn=[3,E,PSn,0,[a0o,fRn],[1,1]],oCn=[3,E,Yho,0,[aSn],[[()=>zCn,16]]],aCn=[3,E,Xho,0,[ie,vt,RRn,mRn,mTe,_Te,Mr,Yc,Gr,hSn,PSn,ge],[[0,1],[0,1],0,0,()=>ZTe,()=>nAe,[0,{[I]:So}],[()=>mu,{[I]:du}],[0,{[I]:yo}],()=>Qvn,()=>rCn,[0,{[I]:Re}]],6],iCn=[3,E,xSn,0,[mTe,mRn,RRn,_Te],[()=>ZTe,0,0,()=>nAe],4],cCn=[3,E,e0o,0,[Jho,XSo],[0,[()=>Wo,0]],1],lAe=[3,E,wY,0,[Hk],[[()=>nTo,{[mt]:1,[Z]:SC}]],1],lCn=[3,E,n0o,0,[nmo,va,Ggn],[[()=>cCn,0],2,[()=>lIn,0]]],uCn=[3,E,Oho,0,[Zfn,sgn,rgn,Yp],[[0,{[Z]:Zfn}],[()=>ogn,{[Z]:sgn}],[()=>ogn,{[Z]:rgn}],[4,{[Z]:Yp}]],4],pCn=[3,E,$Y,{[Z]:$Y},[],[]],dCn=[3,E,wSn,0,[ESn,_Sn],[()=>fCn,()=>Uvn]],mCn=[3,E,DTe,{[Z]:WJ},[KSo],[[()=>Wo,0]],1],fCn=[3,E,ESn,0,[Ta],[0],1],gCn=[3,E,t0o,{[Z]:WJ},[ZSo,va],[[()=>kCo,0],2],1],RCn=[3,E,kSn,{[Z]:$Sn},[],[]],SCn=[3,E,GSn,0,[Vgn,Ogn,Ngn],[1,1,1]],yCn=[3,E,qho,0,[iRn],[[()=>SCn,{[kTe]:1}]]],ICn=[3,E,bSn,0,[$fo],[()=>_Cn]],_Cn=[3,E,Mho,0,[FIo,GJ],[0,()=>sIn],2],Wy=[3,E,Xc,0,[vt,$Te],[0,0],2],cee=[3,E,uu,0,[ZJ],[[()=>wm,0]],1],hCn=[3,E,f0o,0,[uTe,iSn],[[()=>KTe,{[ayn]:[oyn,QSn]}],0]],vCn=[3,E,qSn,0,[$Y,DY],[[()=>pCn,{[Z]:$Y}],[()=>J0n,{[Z]:DY}]]],CCn=[3,E,BSn,0,[nC,Lgn],[1,0],2],TCn=[3,E,OSn,0,[c0o,aTe,Lr,Pm],[[0,{[Z]:v0o}],[64,{[mt]:1,[Z]:iTe}],0,[()=>aee,0]],2],ACn=[3,E,HSn,0,[aRn,nC,Aa],[5,1,0]],DCn=[3,E,D0o,0,[ie,gY,os,Vt,ge],[[0,1],[()=>cIn,{[Jt]:1,[Z]:gY}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:Re}]],2],bCn=[3,E,E0o,0,[ie,IY,os,Vt,ge],[[0,1],[()=>Xhn,{[Jt]:1,[Z]:IY}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:Re}]],2],ECn=[3,E,P0o,0,[ie,_Y,os,Vt,ge],[[0,1],[()=>t0n,{[Jt]:1,[Z]:_Y}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:Re}]],2],xCn=[3,E,k0o,0,[ie,vt,YRn,Xt,dn,ge,os,Vt],[[0,1],[0,1],[()=>jCn,16],[0,{[he]:Or}],[0,{[I]:mn}],[0,{[I]:Re}],[0,{[I]:rs}],[0,{[I]:En}]],3],PCn=[3,E,L0o,0,[bn],[[0,{[I]:Mn}]]],$Cn=[3,E,O0o,0,[Xgn,Ugn,Da,Mr,Gr,Wa,va,bn],[[0,{[I]:Iyn}],[()=>AIn,16],[0,{[I]:Qa}],[0,{[I]:So}],[0,{[I]:yo}],[()=>Wo,{[I]:pc}],[2,{[I]:dc}],[0,{[I]:Mn}]]],wCn=[3,E,N0o,0,[ie,Jgn,vt,jy,Ng,jgn,zgn,Kgn,Wgn,Hmo,Mr,Yc,Gr,Qgn,tTe,Zgn,dn,ge,dRn],[[0,1],[0,{[I]:pyn}],[0,1],[1,{[he]:JJ}],[0,{[he]:Qk}],[0,{[I]:dyn}],[4,{[I]:myn}],[0,{[I]:fyn}],[4,{[I]:gyn}],[0,{[I]:hvo}],[0,{[I]:So}],[()=>mu,{[I]:du}],[0,{[I]:yo}],[0,{[I]:Ryn}],[()=>Zyn,{[I]:Syn}],[0,{[I]:yyn}],[0,{[I]:mn}],[0,{[I]:Re}],[0,{[I]:Tyn}]],5],kCn=[3,E,V0o,0,[Da,qs,ao,io,co,uo,po,mo,lo,fo,go,Ro,Mr,Gr,Wa,va,bn],[[0,{[I]:Qa}],[0,{[I]:qs}],[0,{[I]:ed}],[0,{[I]:td}],[0,{[I]:nd}],[0,{[I]:rd}],[0,{[I]:od}],[0,{[I]:ad}],[0,{[I]:sd}],[0,{[I]:id}],[0,{[I]:cd}],[0,{[I]:ld}],[0,{[I]:So}],[0,{[I]:yo}],[()=>Wo,{[I]:pc}],[2,{[I]:dc}],[0,{[I]:Mn}]]],LCn=[3,E,q0o,0,[ie,vt,jy,Ng,Gk,Jv,os,Vt,ao,io,co,uo,po,mo,lo,fo,go,Ro,Mr,Yc,Gr,dn,ge],[[0,1],[0,1],[1,{[he]:JJ}],[0,{[he]:Qk}],[()=>Ky,16],[1,{[I]:Xv}],[0,{[I]:rs}],[0,{[I]:En}],[0,{[I]:ed}],[0,{[I]:td}],[0,{[I]:nd}],[0,{[I]:rd}],[0,{[I]:od}],[0,{[I]:ad}],[0,{[I]:sd}],[0,{[I]:id}],[0,{[I]:cd}],[0,{[I]:ld}],[0,{[I]:So}],[()=>mu,{[I]:du}],[0,{[I]:yo}],[0,{[I]:mn}],[0,{[I]:Re}]],4],MCn=[3,E,kY,0,[NRn,Ta],[[0,{[Z]:GRn}],0]],GCn=[3,E,LY,0,[sTe,pTe,hTe,CTe],[()=>zTe,()=>WTe,()=>oAe,[()=>BCn,0]]],OCn=[3,E,z0o,0,[bho,Pho,Gk,Nho,lRn,uRn,zCe,Wv,Qv,Zv,Yv,Jv,eTe,tC,ao,io,co,uo,po,mo,lo,fo,go,Ro,Fy,qs,lu,Yp,Zc,yTe,pC,gC,fC,RC,BJ,Uk,bn,ATe,Da,Mr,Wa,Gr,Aa,ETe,Xt,va],[[0,{[J0o]:1,[I]:vCo}],[0,{[I]:ECo}],[()=>Ky,16],[1,{[I]:lCo}],[0,{[I]:Cvo}],[0,{[I]:Tvo}],[0,{[I]:Lvo}],[0,{[I]:Avo}],[0,{[I]:Dvo}],[0,{[I]:bvo}],[0,{[I]:Evo}],[1,{[I]:Xv}],[0,{[I]:xvo}],[0,{[I]:Pvo}],[0,{[I]:Mvo}],[0,{[I]:Gvo}],[0,{[I]:Ovo}],[0,{[I]:Vvo}],[0,{[I]:qvo}],[0,{[I]:Fvo}],[0,{[I]:Nvo}],[0,{[I]:Bvo}],[0,{[I]:Uvo}],[0,{[I]:Hvo}],[2,{[I]:jvo}],[0,{[I]:$vo}],[4,{[I]:wvo}],[0,{[I]:zvo}],[4,{[I]:kvo}],[1,{[I]:Kvo}],[128,{[IC]:AC}],[0,{[I]:Zvo}],[0,{[I]:Qvo}],[5,{[I]:Yvo}],[1,{[I]:Wvo}],[0,{[I]:eCo}],[0,{[I]:Jvo}],[0,{[I]:Xvo}],[0,{[I]:nCo}],[0,{[I]:oCo}],[()=>Wo,{[I]:sCo}],[0,{[I]:aCo}],[0,{[I]:tCo}],[1,{[I]:iCo}],[0,{[I]:cCo}],[2,{[I]:rCo}]],2],wt="unit",LCo=[1,E,Agn,0,[()=>nee,0]],MCo=[1,E,Udo,0,[()=>oIn,{[Z]:Egn}]],NCn=[1,E,ZCe,0,[()=>uIn,{[Z]:ie}]],lee=[1,E,Nmo,0,()=>gIn],GCo=[1,E,Vmo,0,()=>SIn],VCn=[1,E,XCe,0,[()=>bIn,0]],OCo=[1,E,Qfo,0,()=>n_n],NCo=[1,E,sRn,0,()=>s_n],VCo=[1,E,ugo,0,[0,{[Z]:rTe}]],qCo=[1,E,gRn,0,()=>I_n],FCo=[1,E,Rgo,0,()=>v_n],uee=[1,E,OJ,0,[()=>Nhn,{[Z]:lTe}]],BCo=[1,E,bRn,0,[()=>see,0]],UCo=[1,E,TRn,0,[()=>ree,0]],HCo=[1,E,xSo,0,[0,{[Z]:ygo}]],jCo=[1,E,Tyo,0,[()=>r0n,0]],qCn=[1,E,Jyo,0,[()=>a0n,0]],zCo=[1,E,LRn,0,[()=>oee,0]],KCo=[1,E,lIo,0,()=>F0n],WCo=[1,E,CIo,0,()=>U0n],QCo=[1,E,PIo,0,()=>j0n],FCn=[1,E,GIo,0,[()=>H0n,0]],ZCo=[1,E,UIo,0,[()=>W0n,0]],YCo=[1,E,bIo,0,()=>Z0n],XCo=[1,E,HJ,0,()=>X0n],JCo=[1,E,k_o,0,()=>K0n],eTo=[1,E,iho,0,[()=>Nvn,0]],tTo=[1,E,Dho,0,[()=>Hvn,0]],BCn=[1,E,CTe,0,[()=>Jvn,{[Z]:vSn}]],nTo=[1,E,s0o,0,[()=>lCn,0]],wm=[1,E,ZJ,0,[()=>Wy,{[Z]:Xc}]],sTo=[1,E,NSn,0,[()=>hCn,{[Z]:lTe}]],rTo=[1,E,g0o,0,()=>CCn],oTo=[1,E,p0o,0,[()=>TCn,0]],aTo=[1,E,R0o,0,()=>ACn],iTo=[1,E,zSn,0,[()=>G0n,{[Z]:ORn}]],UCn=[4,E,Vdo,0,[as,Xc,Mk],[0,()=>Wy,[()=>nIn,0]]],HCn=[4,E,aIo,0,[as,Xc,$gn,Mk],[0,()=>Wy,0,[()=>q0n,0]]],jCn=[4,E,YRn,0,[DTe],[[()=>gCn,{[Z]:WJ}]]],zCn=[4,E,Zho,{[ryn]:1},[who,GSn,lSn,Jmo,fRn],[[()=>Vvn,0],[()=>yCn,0],[()=>nvn,0],()=>hIn,()=>y_n]],KCn=[9,E,zdo,{[de]:["DELETE","/{Key+}?x-id=AbortMultipartUpload",204]},()=>Jyn,()=>Xyn],WCn=[9,E,Fgn,{[de]:["POST","/{Key+}",200]},()=>IIn,()=>yIn],QCn=[9,E,Lmo,{[de]:["PUT","/{Key+}?x-id=CopyObject",200]},()=>CIn,()=>vIn],ZCn=[9,E,Rmo,{[de]:["PUT","/",200]},()=>wIn,()=>$In],YCn=[9,E,Smo,{[gn]:"-",[de]:["POST","/?metadataConfiguration",200]},()=>xIn,()=>wt],XCn=[9,E,Imo,{[gn]:"-",[de]:["POST","/?metadataTable",200]},()=>PIn,()=>wt],JCn=[9,E,kmo,{[de]:["POST","/{Key+}?uploads",200]},()=>LIn,()=>kIn],eTn=[9,E,Wmo,{[de]:["GET","/?session",200]},()=>GIn,()=>MIn],tTn=[9,E,tfo,{[de]:["DELETE","/",204]},()=>JIn,()=>wt],nTn=[9,E,nfo,{[de]:["DELETE","/?analytics",204]},()=>FIn,()=>wt],sTn=[9,E,rfo,{[de]:["DELETE","/?cors",204]},()=>BIn,()=>wt],rTn=[9,E,afo,{[de]:["DELETE","/?encryption",204]},()=>UIn,()=>wt],oTn=[9,E,ufo,{[de]:["DELETE","/?intelligent-tiering",204]},()=>HIn,()=>wt],aTn=[9,E,cfo,{[de]:["DELETE","/?inventory",204]},()=>jIn,()=>wt],iTn=[9,E,dfo,{[de]:["DELETE","/?lifecycle",204]},()=>zIn,()=>wt],cTn=[9,E,ffo,{[de]:["DELETE","/?metadataConfiguration",204]},()=>KIn,()=>wt],lTn=[9,E,yfo,{[de]:["DELETE","/?metadataTable",204]},()=>WIn,()=>wt],uTn=[9,E,Sfo,{[de]:["DELETE","/?metrics",204]},()=>QIn,()=>wt],pTn=[9,E,_fo,{[de]:["DELETE","/?ownershipControls",204]},()=>ZIn,()=>wt],dTn=[9,E,vfo,{[de]:["DELETE","/?policy",204]},()=>YIn,()=>wt],mTn=[9,E,Dfo,{[de]:["DELETE","/?replication",204]},()=>XIn,()=>wt],fTn=[9,E,bfo,{[de]:["DELETE","/?tagging",204]},()=>e_n,()=>wt],gTn=[9,E,xfo,{[de]:["DELETE","/?website",204]},()=>t_n,()=>wt],RTn=[9,E,Zfo,{[de]:["DELETE","/{Key+}?x-id=DeleteObject",204]},()=>c_n,()=>i_n],STn=[9,E,Vfo,{[de]:["DELETE","/{Key+}?annotation",204]},()=>a_n,()=>o_n],yTn=[9,E,Yfo,{[gn]:"-",[de]:["POST","/?delete",200]},()=>u_n,()=>l_n],ITn=[9,E,zfo,{[de]:["DELETE","/{Key+}?tagging",204]},()=>d_n,()=>p_n],_Tn=[9,E,Xfo,{[de]:["DELETE","/?publicAccessBlock",204]},()=>m_n,()=>wt],hTn=[9,E,_go,{[de]:["GET","/?abac",200]},()=>T_n,()=>C_n],vTn=[9,E,hgo,{[de]:["GET","/?accelerate",200]},()=>D_n,()=>A_n],CTn=[9,E,$go,{[de]:["GET","/?acl",200]},()=>E_n,()=>b_n],TTn=[9,E,Dgo,{[de]:["GET","/?analytics&x-id=GetBucketAnalyticsConfiguration",200]},()=>P_n,()=>x_n],ATn=[9,E,wgo,{[de]:["GET","/?cors",200]},()=>w_n,()=>$_n],DTn=[9,E,Mgo,{[de]:["GET","/?encryption",200]},()=>L_n,()=>k_n],bTn=[9,E,Fgo,{[de]:["GET","/?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration",200]},()=>G_n,()=>M_n],ETn=[9,E,Ngo,{[de]:["GET","/?inventory&x-id=GetBucketInventoryConfiguration",200]},()=>N_n,()=>O_n],xTn=[9,E,jgo,{[de]:["GET","/?lifecycle",200]},()=>q_n,()=>V_n],PTn=[9,E,Hgo,{[de]:["GET","/?location",200]},()=>B_n,()=>F_n],$Tn=[9,E,Xgo,{[de]:["GET","/?logging",200]},()=>H_n,()=>U_n],wTn=[9,E,Jgo,{[de]:["GET","/?metadataConfiguration",200]},()=>z_n,()=>j_n],kTn=[9,E,oRo,{[de]:["GET","/?metadataTable",200]},()=>Q_n,()=>W_n],LTn=[9,E,rRo,{[de]:["GET","/?metrics&x-id=GetBucketMetricsConfiguration",200]},()=>X_n,()=>Y_n],MTn=[9,E,cRo,{[de]:["GET","/?notification",200]},()=>J_n,()=>XTe],GTn=[9,E,uRo,{[de]:["GET","/?ownershipControls",200]},()=>thn,()=>ehn],OTn=[9,E,mRo,{[de]:["GET","/?policy",200]},()=>shn,()=>nhn],NTn=[9,E,RRo,{[de]:["GET","/?policyStatus",200]},()=>ohn,()=>rhn],VTn=[9,E,IRo,{[de]:["GET","/?replication",200]},()=>ihn,()=>ahn],qTn=[9,E,hRo,{[de]:["GET","/?requestPayment",200]},()=>lhn,()=>chn],FTn=[9,E,ARo,{[de]:["GET","/?tagging",200]},()=>phn,()=>uhn],BTn=[9,E,ERo,{[de]:["GET","/?versioning",200]},()=>mhn,()=>dhn],UTn=[9,E,$Ro,{[de]:["GET","/?website",200]},()=>ghn,()=>fhn],HTn=[9,E,LRo,{[gn]:"-",[de]:["GET","/{Key+}?x-id=GetObject",200]},()=>Ehn,()=>bhn],jTn=[9,E,MRo,{[de]:["GET","/{Key+}?acl",200]},()=>Shn,()=>Rhn],zTn=[9,E,HRo,{[gn]:"-",[de]:["GET","/{Key+}?annotation&x-id=GetObjectAnnotation",200]},()=>Ihn,()=>yhn],KTn=[9,E,jRo,{[de]:["GET","/{Key+}?attributes",200]},()=>vhn,()=>_hn],WTn=[9,E,QRo,{[de]:["GET","/{Key+}?legal-hold",200]},()=>Thn,()=>Chn],QTn=[9,E,zRo,{[de]:["GET","/?object-lock",200]},()=>Dhn,()=>Ahn],ZTn=[9,E,nSo,{[de]:["GET","/{Key+}?retention",200]},()=>Phn,()=>xhn],YTn=[9,E,sSo,{[de]:["GET","/{Key+}?tagging",200]},()=>whn,()=>$hn],XTn=[9,E,cSo,{[de]:["GET","/{Key+}?torrent",200]},()=>Lhn,()=>khn],JTn=[9,E,lSo,{[de]:["GET","/?publicAccessBlock",200]},()=>Ghn,()=>Mhn],eAn=[9,E,dSo,{[de]:["HEAD","/",200]},()=>qhn,()=>Vhn],tAn=[9,E,RSo,{[de]:["HEAD","/{Key+}",200]},()=>Bhn,()=>Fhn],nAn=[9,E,syo,{[de]:["GET","/?analytics&x-id=ListBucketAnalyticsConfigurations",200]},()=>u0n,()=>l0n],sAn=[9,E,uyo,{[de]:["GET","/?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations",200]},()=>d0n,()=>p0n],rAn=[9,E,iyo,{[de]:["GET","/?inventory&x-id=ListBucketInventoryConfigurations",200]},()=>f0n,()=>m0n],oAn=[9,E,myo,{[de]:["GET","/?metrics&x-id=ListBucketMetricsConfigurations",200]},()=>R0n,()=>g0n],aAn=[9,E,nyo,{[de]:["GET","/?x-id=ListBuckets",200]},()=>y0n,()=>S0n],iAn=[9,E,yyo,{[de]:["GET","/?x-id=ListDirectoryBuckets",200]},()=>_0n,()=>I0n],cAn=[9,E,Pyo,{[de]:["GET","/?uploads",200]},()=>v0n,()=>h0n],lAn=[9,E,Myo,{[de]:["GET","/{Key+}?annotation&x-id=ListObjectAnnotations",200]},()=>T0n,()=>C0n],uAn=[9,E,Lyo,{[de]:["GET","/",200]},()=>D0n,()=>A0n],pAn=[9,E,qyo,{[de]:["GET","/?list-type=2",200]},()=>E0n,()=>b0n],dAn=[9,E,jyo,{[de]:["GET","/?versions",200]},()=>P0n,()=>x0n],mAn=[9,E,zyo,{[de]:["GET","/{Key+}?x-id=ListParts",200]},()=>w0n,()=>$0n],fAn=[9,E,jIo,{[gn]:"-",[de]:["PUT","/?abac",200]},()=>svn,()=>wt],gAn=[9,E,zIo,{[gn]:"-",[de]:["PUT","/?accelerate",200]},()=>rvn,()=>wt],RAn=[9,E,XIo,{[gn]:"-",[de]:["PUT","/?acl",200]},()=>ovn,()=>wt],SAn=[9,E,QIo,{[de]:["PUT","/?analytics",200]},()=>avn,()=>wt],yAn=[9,E,JIo,{[gn]:"-",[de]:["PUT","/?cors",200]},()=>ivn,()=>wt],IAn=[9,E,t_o,{[gn]:"-",[de]:["PUT","/?encryption",200]},()=>cvn,()=>wt],_An=[9,E,o_o,{[de]:["PUT","/?intelligent-tiering",200]},()=>lvn,()=>wt],hAn=[9,E,s_o,{[de]:["PUT","/?inventory",200]},()=>uvn,()=>wt],vAn=[9,E,c_o,{[gn]:"-",[de]:["PUT","/?lifecycle",200]},()=>dvn,()=>pvn],CAn=[9,E,i_o,{[gn]:"-",[de]:["PUT","/?logging",200]},()=>mvn,()=>wt],TAn=[9,E,d_o,{[de]:["PUT","/?metrics",200]},()=>fvn,()=>wt],AAn=[9,E,f_o,{[de]:["PUT","/?notification",200]},()=>gvn,()=>wt],DAn=[9,E,R_o,{[gn]:"-",[de]:["PUT","/?ownershipControls",200]},()=>Rvn,()=>wt],bAn=[9,E,y_o,{[gn]:"-",[de]:["PUT","/?policy",200]},()=>Svn,()=>wt],EAn=[9,E,__o,{[gn]:"-",[de]:["PUT","/?replication",200]},()=>yvn,()=>wt],xAn=[9,E,h_o,{[gn]:"-",[de]:["PUT","/?requestPayment",200]},()=>Ivn,()=>wt],PAn=[9,E,T_o,{[gn]:"-",[de]:["PUT","/?tagging",200]},()=>_vn,()=>wt],$An=[9,E,D_o,{[gn]:"-",[de]:["PUT","/?versioning",200]},()=>hvn,()=>wt],wAn=[9,E,E_o,{[gn]:"-",[de]:["PUT","/?website",200]},()=>vvn,()=>wt],kAn=[9,E,L_o,{[gn]:"-",[de]:["PUT","/{Key+}?x-id=PutObject",200]},()=>wvn,()=>$vn],LAn=[9,E,M_o,{[gn]:"-",[de]:["PUT","/{Key+}?acl",200]},()=>Tvn,()=>Cvn],MAn=[9,E,q_o,{[gn]:"-",[de]:["PUT","/{Key+}?annotation",200]},()=>Dvn,()=>Avn],GAn=[9,E,H_o,{[gn]:"-",[de]:["PUT","/{Key+}?legal-hold",200]},()=>Evn,()=>bvn],OAn=[9,E,F_o,{[gn]:"-",[de]:["PUT","/?object-lock",200]},()=>Pvn,()=>xvn],NAn=[9,E,Y_o,{[gn]:"-",[de]:["PUT","/{Key+}?retention",200]},()=>Lvn,()=>kvn],VAn=[9,E,X_o,{[gn]:"-",[de]:["PUT","/{Key+}?tagging",200]},()=>Gvn,()=>Mvn],qAn=[9,E,tho,{[gn]:"-",[de]:["PUT","/?publicAccessBlock",200]},()=>Ovn,()=>wt],FAn=[9,E,Rho,{[de]:["PUT","/{Key+}?renameObject",200]},()=>Bvn,()=>Fvn],BAn=[9,E,vho,{[gn]:"-",[de]:["POST","/{Key+}?restore",200]},()=>Yvn,()=>Zvn],UAn=[9,E,Qho,{[de]:["POST","/{Key+}?select&select-type=2",200]},()=>aCn,()=>oCn],HAn=[9,E,A0o,{[gn]:"-",[de]:["PUT","/?metadataAnnotationTable",200]},()=>DCn,()=>wt],jAn=[9,E,b0o,{[gn]:"-",[de]:["PUT","/?metadataInventoryTable",200]},()=>bCn,()=>wt],zAn=[9,E,x0o,{[gn]:"-",[de]:["PUT","/?metadataJournalTable",200]},()=>ECn,()=>wt],KAn=[9,E,w0o,{[gn]:"-",[de]:["PUT","/{Key+}?encryption",200]},()=>xCn,()=>PCn],WAn=[9,E,M0o,{[gn]:"-",[de]:["PUT","/{Key+}?x-id=UploadPart",200]},()=>LCn,()=>kCn],QAn=[9,E,G0o,{[de]:["PUT","/{Key+}?x-id=UploadPartCopy",200]},()=>wCn,()=>$Cn],ZAn=[9,E,j0o,{[Y0o]:["{RequestRoute}."],[de]:["POST","/WriteGetObjectResponse",200]},()=>OCn,()=>wt],bk=class extends pe(vgn,It,"CreateSession",eTn){},cTo="3.1103.0",lTo={version:cTo},uTo=e=>({apiVersion:"2006-03-01",base64Decoder:e?.base64Decoder??ndo,base64Encoder:e?.base64Encoder??tdo,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ign,extensions:e?.extensions??[],getAwsChunkedEncodingStream:e?.getAwsChunkedEncodingStream??edo,httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Sdo,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Upo},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new Hpo}],logger:e?.logger??new lpo,md5:e?.md5??Qpo,protocol:e?.protocol??Quo,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.s3",errorTypeRegistries:Qyn,xmlNamespace:"http://s3.amazonaws.com/doc/2006-03-01/",version:"2006-03-01",serviceTarget:"AmazonS3"},sdkStreamMixin:e?.sdkStreamMixin??Jpo,serviceId:e?.serviceId??"S3",sha1:e?.sha1??ado,sha256:e?.sha256??Wpo,signerConstructor:e?.signerConstructor??pgn,signingEscapePath:e?.signingEscapePath??!1,urlParser:e?.urlParser??$po,useArnRegion:e?.useArnRegion??void 0,utf8Decoder:e?.utf8Decoder??Xpo,utf8Encoder:e?.utf8Encoder??Ypo}),pTo=e=>{upo(process.version);let t=Rpo(e),s=()=>t().then(ppo),a=uTo(e);Guo(process.version);let c={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??zc(zpo,c),bodyLengthChecker:e?.bodyLengthChecker??sdo,credentialDefaultProvider:e?.credentialDefaultProvider??Kpo,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ouo({serviceId:a.serviceId,clientVersion:lTo.version}),disableS3ExpressSessionAuth:e?.disableS3ExpressSessionAuth??zc(Yuo,c),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??xpo,maxAttempts:e?.maxAttempts??zc(Opo,e),region:e?.region??zc(Ipo,{..._po,...c}),requestChecksumCalculation:e?.requestChecksumCalculation??zc(kuo,c),requestHandler:odo.create(e?.requestHandler??s),responseChecksumValidation:e?.responseChecksumValidation??zc(wuo,c),retryMode:e?.retryMode??zc({...Gpo,default:async()=>(await s()).retryMode||Mpo},e),sigv4aSigningRegionSet:e?.sigv4aSigningRegionSet??zc(jpo,c),streamCollector:e?.streamCollector??rdo,streamHasher:e?.streamHasher??Zpo,useArnRegion:e?.useArnRegion??zc(Zuo,c),useDualstackEndpoint:e?.useDualstackEndpoint??zc(ypo,c),useFipsEndpoint:e?.useFipsEndpoint??zc(Spo,c),userAgentAppId:e?.userAgentAppId??zc(Nuo,c)}},dTo=e=>{let t=e.httpAuthSchemes,s=e.httpAuthSchemeProvider,a=e.credentials;return{setHttpAuthScheme(c){let l=t.findIndex(u=>u.schemeId===c.schemeId);l===-1?t.push(c):t.splice(l,1,c)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(c){s=c},httpAuthSchemeProvider(){return s},setCredentials(c){a=c},credentials(){return a}}},mTo=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),fTo=(e,t)=>{let s=Object.assign(Vuo(e),dpo(e),wpo(e),dTo(e));return t.forEach(a=>a.configure(s)),Object.assign(e,quo(s),mpo(s),kpo(s),mTo(s))},bm=class extends lgn{config;constructor(...[t]){let s=pTo(t||{});super(s),this.initConfig=s;let a=Ido(s),c=Fuo(a),l=Luo(c),u=Npo(l),p=hpo(u),d=Buo(p),m=Epo(d),S=Ppo(m),v=ydo(S),T=Xuo(v,{session:[()=>this,bk]}),x=fTo(T,t?.extensions||[]);this.config=x,this.middlewareStack.use(qpo(this.config)),this.middlewareStack.use(Uuo(this.config)),this.middlewareStack.use(Vpo(this.config)),this.middlewareStack.use(Lpo(this.config)),this.middlewareStack.use(Huo(this.config)),this.middlewareStack.use(juo(this.config)),this.middlewareStack.use(zuo(this.config)),this.middlewareStack.use(rpo(this.config,{httpAuthSchemeParametersProvider:fdo,identityProviderConfigProvider:async w=>new opo({"aws.auth#sigv4":w.credentials,"aws.auth#sigv4a":w.credentials})})),this.middlewareStack.use(apo(this.config)),this.middlewareStack.use(Juo(this.config)),this.middlewareStack.use(epo(this.config)),this.middlewareStack.use(tpo(this.config)),this.middlewareStack.use(npo(this.config)),this.middlewareStack.use(spo(this.config))}destroy(){super.destroy()}},MY=class extends pe(Pi,It,"AbortMultipartUpload",KCn){},GY=class extends pe(Pi,zv,"CompleteMultipartUpload",WCn){},OY=class extends pe(hdo,zv,"CopyObject",QCn){},NY=class extends pe(vdo,Ddo,"CreateBucket",ZCn){},VY=class extends pe(Be,Ko,"CreateBucketMetadataConfiguration",YCn){},qY=class extends pe(Be,Ko,"CreateBucketMetadataTableConfiguration",XCn){},FY=class extends pe(Pi,zv,"CreateMultipartUpload",JCn){},BY=class extends pe(Be,Ps,"DeleteBucketAnalyticsConfiguration",nTn){},UY=class extends pe(Be,Ps,"DeleteBucket",tTn){},HY=class extends pe(Be,Ps,"DeleteBucketCors",sTn){},jY=class extends pe(Be,Ps,"DeleteBucketEncryption",rTn){},zY=class extends pe(Be,Ps,"DeleteBucketIntelligentTieringConfiguration",oTn){},KY=class extends pe(Be,Ps,"DeleteBucketInventoryConfiguration",aTn){},WY=class extends pe(Be,Ps,"DeleteBucketLifecycle",iTn){},QY=class extends pe(Be,Ps,"DeleteBucketMetadataConfiguration",cTn){},ZY=class extends pe(Be,Ps,"DeleteBucketMetadataTableConfiguration",lTn){},YY=class extends pe(Be,Ps,"DeleteBucketMetricsConfiguration",uTn){},XY=class extends pe(Be,Ps,"DeleteBucketOwnershipControls",pTn){},JY=class extends pe(Be,Ps,"DeleteBucketPolicy",dTn){},eX=class extends pe(Be,Ps,"DeleteBucketReplication",mTn){},tX=class extends pe(Be,Ps,"DeleteBucketTagging",fTn){},nX=class extends pe(Be,Ps,"DeleteBucketWebsite",gTn){},sX=class extends pe(Ir,It,"DeleteObjectAnnotation",STn){},rX=class extends pe(Pi,It,"DeleteObject",RTn){},oX=class extends pe(Ir,Mg,"DeleteObjects",yTn){},aX=class extends pe(Ir,It,"DeleteObjectTagging",ITn){},iX=class extends pe(Be,Ps,"DeletePublicAccessBlock",_Tn){},cX=class extends pe(Ir,It,"GetBucketAbac",hTn){},lX=class extends pe(Be,It,"GetBucketAccelerateConfiguration",vTn){},uX=class extends pe(Be,It,"GetBucketAcl",CTn){},pX=class extends pe(Be,It,"GetBucketAnalyticsConfiguration",TTn){},dX=class extends pe(Be,It,"GetBucketCors",ATn){},mX=class extends pe(Be,It,"GetBucketEncryption",DTn){},fX=class extends pe(Be,It,"GetBucketIntelligentTieringConfiguration",bTn){},gX=class extends pe(Be,It,"GetBucketInventoryConfiguration",ETn){},RX=class extends pe(Be,It,"GetBucketLifecycleConfiguration",xTn){},SX=class extends pe(Be,It,"GetBucketLocation",PTn){},yX=class extends pe(Be,It,"GetBucketLogging",$Tn){},IX=class extends pe(Be,It,"GetBucketMetadataConfiguration",wTn){},_X=class extends pe(Be,It,"GetBucketMetadataTableConfiguration",kTn){},hX=class extends pe(Be,It,"GetBucketMetricsConfiguration",LTn){},vX=class extends pe(Be,It,"GetBucketNotificationConfiguration",MTn){},CX=class extends pe(Be,It,"GetBucketOwnershipControls",GTn){},TX=class extends pe(Be,Ps,"GetBucketPolicy",OTn){},AX=class extends pe(Be,It,"GetBucketPolicyStatus",NTn){},DX=class extends pe(Be,It,"GetBucketReplication",VTn){},bX=class extends pe(Be,It,"GetBucketRequestPayment",qTn){},EX=class extends pe(Be,It,"GetBucketTagging",FTn){},xX=class extends pe(Be,It,"GetBucketVersioning",BTn){},PX=class extends pe(Be,It,"GetBucketWebsite",UTn){},$X=class extends pe(Pi,It,"GetObjectAcl",jTn){},wX=class extends pe(Pi,bdo,"GetObjectAnnotation",zTn){},kX=class extends pe(Ir,zv,"GetObjectAttributes",KTn){},LX=class extends pe(Pi,Edo,"GetObject",HTn){},MX=class extends pe(Ir,It,"GetObjectLegalHold",WTn){},GX=class extends pe(Ir,It,"GetObjectLockConfiguration",QTn){},OX=class extends pe(Ir,It,"GetObjectRetention",ZTn){},NX=class extends pe(Ir,It,"GetObjectTagging",YTn){},VX=class extends pe(Ir,Ps,"GetObjectTorrent",XTn){},qX=class extends pe(Be,It,"GetPublicAccessBlock",JTn){},Uv=class extends pe(Ir,It,"HeadBucket",eAn){},Hv=class extends pe(Pi,xdo,"HeadObject",tAn){},FX=class extends pe(Be,It,"ListBucketAnalyticsConfigurations",nAn){},BX=class extends pe(Be,It,"ListBucketIntelligentTieringConfigurations",sAn){},UX=class extends pe(Be,It,"ListBucketInventoryConfigurations",rAn){},HX=class extends pe(Be,It,"ListBucketMetricsConfigurations",oAn){},Ek=class extends pe(Cdo,It,"ListBuckets",aAn){},xk=class extends pe(Tdo,It,"ListDirectoryBuckets",iAn){},jX=class extends pe(kJ,It,"ListMultipartUploads",cAn){},Pk=class extends pe(Ir,It,"ListObjectAnnotations",lAn){},zX=class extends pe(kJ,It,"ListObjects",uAn){},$k=class extends pe(kJ,It,"ListObjectsV2",pAn){},KX=class extends pe(kJ,It,"ListObjectVersions",dAn){},wk=class extends pe(Pi,zv,"ListParts",mAn){},WX=class extends pe(Ir,Cgn,"PutBucketAbac",fAn){},QX=class extends pe(Be,Cgn,"PutBucketAccelerateConfiguration",gAn){},ZX=class extends pe(Be,Ko,"PutBucketAcl",RAn){},YX=class extends pe(Be,Ps,"PutBucketAnalyticsConfiguration",SAn){},XX=class extends pe(Be,Ko,"PutBucketCors",yAn){},JX=class extends pe(Be,Ko,"PutBucketEncryption",IAn){},eJ=class extends pe(Be,Ps,"PutBucketIntelligentTieringConfiguration",_An){},tJ=class extends pe(Be,Ps,"PutBucketInventoryConfiguration",hAn){},nJ=class extends pe(Be,Mg,"PutBucketLifecycleConfiguration",vAn){},sJ=class extends pe(Be,Ko,"PutBucketLogging",CAn){},rJ=class extends pe(Be,Ps,"PutBucketMetricsConfiguration",TAn){},oJ=class extends pe(Be,Ps,"PutBucketNotificationConfiguration",AAn){},aJ=class extends pe(Be,Ko,"PutBucketOwnershipControls",DAn){},iJ=class extends pe(Be,Ko,"PutBucketPolicy",bAn){},cJ=class extends pe(Be,Ko,"PutBucketReplication",EAn){},lJ=class extends pe(Be,Ko,"PutBucketRequestPayment",xAn){},uJ=class extends pe(Be,Ko,"PutBucketTagging",PAn){},pJ=class extends pe(Be,Ko,"PutBucketVersioning",$An){},dJ=class extends pe(Be,Ko,"PutBucketWebsite",wAn){},mJ=class extends pe(Pi,Mg,"PutObjectAcl",LAn){},fJ=class extends pe(Pi,Tgn,"PutObjectAnnotation",MAn){},gJ=class extends pe(Pi,Pdo,"PutObject",kAn){},RJ=class extends pe(Ir,Mg,"PutObjectLegalHold",GAn){},SJ=class extends pe(Ir,Mg,"PutObjectLockConfiguration",OAn){},yJ=class extends pe(Ir,Mg,"PutObjectRetention",NAn){},IJ=class extends pe(Ir,Mg,"PutObjectTagging",VAn){},_J=class extends pe(Be,Ko,"PutPublicAccessBlock",qAn){},hJ=class extends pe(Pi,It,"RenameObject",FAn){},vJ=class extends pe(Ir,Tgn,"RestoreObject",BAn){},CJ=class extends pe(Ir,$do,"SelectObjectContent",UAn){},TJ=class extends pe(Be,Ko,"UpdateBucketMetadataAnnotationTableConfiguration",HAn){},AJ=class extends pe(Be,Ko,"UpdateBucketMetadataInventoryTableConfiguration",jAn){},DJ=class extends pe(Be,Ko,"UpdateBucketMetadataJournalTableConfiguration",zAn){},bJ=class extends pe(Ir,Mg,"UpdateObjectEncryption",KAn){},EJ=class extends pe(Pi,wdo,"UploadPart",WAn){},xJ=class extends pe(vgn,zv,"UploadPartCopy",QAn){},PJ=class extends pe(Ado,Ps,"WriteGetObjectResponse",ZAn){},YAn=kk(bm,Ek,"ContinuationToken","ContinuationToken","MaxBuckets"),XAn=kk(bm,xk,"ContinuationToken","ContinuationToken","MaxDirectoryBuckets"),JAn=kk(bm,Pk,"ContinuationToken","NextContinuationToken","MaxAnnotationResults"),eDn=kk(bm,$k,"ContinuationToken","NextContinuationToken","MaxKeys"),tDn=kk(bm,wk,"PartNumberMarker","NextPartNumberMarker","MaxParts"),nDn=async(e,t)=>{let s;try{return s=await e.send(new Uv(t)),{state:Zp.SUCCESS,reason:s}}catch(a){if(s=a,a.name==="NotFound")return{state:Zp.RETRY,reason:s}}return{state:Zp.RETRY,reason:s}},gTo=async(e,t)=>Lg({...{minDelay:5,maxDelay:120},...e},t,nDn),sDn=async(e,t)=>{let a=await Lg({...{minDelay:5,maxDelay:120},...e},t,nDn);return wJ(a)},rDn=async(e,t)=>{let s;try{s=await e.send(new Uv(t))}catch(a){if(s=a,a.name==="NotFound")return{state:Zp.SUCCESS,reason:s}}return{state:Zp.RETRY,reason:s}},RTo=async(e,t)=>Lg({...{minDelay:5,maxDelay:120},...e},t,rDn),oDn=async(e,t)=>{let a=await Lg({...{minDelay:5,maxDelay:120},...e},t,rDn);return wJ(a)},aDn=async(e,t)=>{let s;try{return s=await e.send(new Hv(t)),{state:Zp.SUCCESS,reason:s}}catch(a){if(s=a,a.name==="NotFound")return{state:Zp.RETRY,reason:s}}return{state:Zp.RETRY,reason:s}},STo=async(e,t)=>Lg({...{minDelay:5,maxDelay:120},...e},t,aDn),iDn=async(e,t)=>{let a=await Lg({...{minDelay:5,maxDelay:120},...e},t,aDn);return wJ(a)},cDn=async(e,t)=>{let s;try{s=await e.send(new Hv(t))}catch(a){if(s=a,a.name==="NotFound")return{state:Zp.SUCCESS,reason:s}}return{state:Zp.RETRY,reason:s}},yTo=async(e,t)=>Lg({...{minDelay:5,maxDelay:120},...e},t,cDn),lDn=async(e,t)=>{let a=await Lg({...{minDelay:5,maxDelay:120},...e},t,cDn);return wJ(a)},ITo={AbortMultipartUploadCommand:MY,CompleteMultipartUploadCommand:GY,CopyObjectCommand:OY,CreateBucketCommand:NY,CreateBucketMetadataConfigurationCommand:VY,CreateBucketMetadataTableConfigurationCommand:qY,CreateMultipartUploadCommand:FY,CreateSessionCommand:bk,DeleteBucketCommand:UY,DeleteBucketAnalyticsConfigurationCommand:BY,DeleteBucketCorsCommand:HY,DeleteBucketEncryptionCommand:jY,DeleteBucketIntelligentTieringConfigurationCommand:zY,DeleteBucketInventoryConfigurationCommand:KY,DeleteBucketLifecycleCommand:WY,DeleteBucketMetadataConfigurationCommand:QY,DeleteBucketMetadataTableConfigurationCommand:ZY,DeleteBucketMetricsConfigurationCommand:YY,DeleteBucketOwnershipControlsCommand:XY,DeleteBucketPolicyCommand:JY,DeleteBucketReplicationCommand:eX,DeleteBucketTaggingCommand:tX,DeleteBucketWebsiteCommand:nX,DeleteObjectCommand:rX,DeleteObjectAnnotationCommand:sX,DeleteObjectsCommand:oX,DeleteObjectTaggingCommand:aX,DeletePublicAccessBlockCommand:iX,GetBucketAbacCommand:cX,GetBucketAccelerateConfigurationCommand:lX,GetBucketAclCommand:uX,GetBucketAnalyticsConfigurationCommand:pX,GetBucketCorsCommand:dX,GetBucketEncryptionCommand:mX,GetBucketIntelligentTieringConfigurationCommand:fX,GetBucketInventoryConfigurationCommand:gX,GetBucketLifecycleConfigurationCommand:RX,GetBucketLocationCommand:SX,GetBucketLoggingCommand:yX,GetBucketMetadataConfigurationCommand:IX,GetBucketMetadataTableConfigurationCommand:_X,GetBucketMetricsConfigurationCommand:hX,GetBucketNotificationConfigurationCommand:vX,GetBucketOwnershipControlsCommand:CX,GetBucketPolicyCommand:TX,GetBucketPolicyStatusCommand:AX,GetBucketReplicationCommand:DX,GetBucketRequestPaymentCommand:bX,GetBucketTaggingCommand:EX,GetBucketVersioningCommand:xX,GetBucketWebsiteCommand:PX,GetObjectCommand:LX,GetObjectAclCommand:$X,GetObjectAnnotationCommand:wX,GetObjectAttributesCommand:kX,GetObjectLegalHoldCommand:MX,GetObjectLockConfigurationCommand:GX,GetObjectRetentionCommand:OX,GetObjectTaggingCommand:NX,GetObjectTorrentCommand:VX,GetPublicAccessBlockCommand:qX,HeadBucketCommand:Uv,HeadObjectCommand:Hv,ListBucketAnalyticsConfigurationsCommand:FX,ListBucketIntelligentTieringConfigurationsCommand:BX,ListBucketInventoryConfigurationsCommand:UX,ListBucketMetricsConfigurationsCommand:HX,ListBucketsCommand:Ek,ListDirectoryBucketsCommand:xk,ListMultipartUploadsCommand:jX,ListObjectAnnotationsCommand:Pk,ListObjectsCommand:zX,ListObjectsV2Command:$k,ListObjectVersionsCommand:KX,ListPartsCommand:wk,PutBucketAbacCommand:WX,PutBucketAccelerateConfigurationCommand:QX,PutBucketAclCommand:ZX,PutBucketAnalyticsConfigurationCommand:YX,PutBucketCorsCommand:XX,PutBucketEncryptionCommand:JX,PutBucketIntelligentTieringConfigurationCommand:eJ,PutBucketInventoryConfigurationCommand:tJ,PutBucketLifecycleConfigurationCommand:nJ,PutBucketLoggingCommand:sJ,PutBucketMetricsConfigurationCommand:rJ,PutBucketNotificationConfigurationCommand:oJ,PutBucketOwnershipControlsCommand:aJ,PutBucketPolicyCommand:iJ,PutBucketReplicationCommand:cJ,PutBucketRequestPaymentCommand:lJ,PutBucketTaggingCommand:uJ,PutBucketVersioningCommand:pJ,PutBucketWebsiteCommand:dJ,PutObjectCommand:gJ,PutObjectAclCommand:mJ,PutObjectAnnotationCommand:fJ,PutObjectLegalHoldCommand:RJ,PutObjectLockConfigurationCommand:SJ,PutObjectRetentionCommand:yJ,PutObjectTaggingCommand:IJ,PutPublicAccessBlockCommand:_J,RenameObjectCommand:hJ,RestoreObjectCommand:vJ,SelectObjectContentCommand:CJ,UpdateBucketMetadataAnnotationTableConfigurationCommand:TJ,UpdateBucketMetadataInventoryTableConfigurationCommand:AJ,UpdateBucketMetadataJournalTableConfigurationCommand:DJ,UpdateObjectEncryptionCommand:bJ,UploadPartCommand:EJ,UploadPartCopyCommand:xJ,WriteGetObjectResponseCommand:PJ},_To={paginateListBuckets:YAn,paginateListDirectoryBuckets:XAn,paginateListObjectAnnotations:JAn,paginateListObjectsV2:eDn,paginateListParts:tDn},hTo={waitUntilBucketExists:sDn,waitUntilBucketNotExists:oDn,waitUntilObjectExists:iDn,waitUntilObjectNotExists:lDn},$J=class extends bm{};fpo(ITo,$J,{paginators:_To,waiters:hTo});var vTo={Disabled:"Disabled",Enabled:"Enabled"},CTo={requester:"requester"},TTo={requester:"requester"},ATo={Enabled:"Enabled",Suspended:"Suspended"},DTo={AmazonCustomerByEmail:"AmazonCustomerByEmail",CanonicalUser:"CanonicalUser",Group:"Group"},bTo={FULL_CONTROL:"FULL_CONTROL",READ:"READ",READ_ACP:"READ_ACP",WRITE:"WRITE",WRITE_ACP:"WRITE_ACP"},ETo={Destination:"Destination"},xTo={COMPOSITE:"COMPOSITE",FULL_OBJECT:"FULL_OBJECT"},PTo={AES256:"AES256",aws_fsx:"aws:fsx",aws_kms:"aws:kms",aws_kms_dsse:"aws:kms:dsse"},$To={authenticated_read:"authenticated-read",aws_exec_read:"aws-exec-read",bucket_owner_full_control:"bucket-owner-full-control",bucket_owner_read:"bucket-owner-read",private:"private",public_read:"public-read",public_read_write:"public-read-write"},wTo={COPY:"COPY",EXCLUDE:"EXCLUDE"},kTo={CRC32:"CRC32",CRC32C:"CRC32C",CRC64NVME:"CRC64NVME",MD5:"MD5",SHA1:"SHA1",SHA256:"SHA256",SHA512:"SHA512",XXHASH128:"XXHASH128",XXHASH3:"XXHASH3",XXHASH64:"XXHASH64"},LTo={COPY:"COPY",REPLACE:"REPLACE"},MTo={OFF:"OFF",ON:"ON"},GTo={COMPLIANCE:"COMPLIANCE",GOVERNANCE:"GOVERNANCE"},OTo={DEEP_ARCHIVE:"DEEP_ARCHIVE",EXPRESS_ONEZONE:"EXPRESS_ONEZONE",FSX_ONTAP:"FSX_ONTAP",FSX_OPENZFS:"FSX_OPENZFS",GLACIER:"GLACIER",GLACIER_IR:"GLACIER_IR",INTELLIGENT_TIERING:"INTELLIGENT_TIERING",ONEZONE_IA:"ONEZONE_IA",OUTPOSTS:"OUTPOSTS",REDUCED_REDUNDANCY:"REDUCED_REDUNDANCY",SNOW:"SNOW",STANDARD:"STANDARD",STANDARD_IA:"STANDARD_IA"},NTo={COPY:"COPY",REPLACE:"REPLACE"},VTo={authenticated_read:"authenticated-read",private:"private",public_read:"public-read",public_read_write:"public-read-write"},qTo={ACCOUNT_REGIONAL:"account-regional",GLOBAL:"global"},FTo={SingleAvailabilityZone:"SingleAvailabilityZone",SingleLocalZone:"SingleLocalZone"},BTo={Directory:"Directory"},UTo={AvailabilityZone:"AvailabilityZone",LocalZone:"LocalZone"},HTo={EU:"EU",af_south_1:"af-south-1",ap_east_1:"ap-east-1",ap_east_2:"ap-east-2",ap_northeast_1:"ap-northeast-1",ap_northeast_2:"ap-northeast-2",ap_northeast_3:"ap-northeast-3",ap_south_1:"ap-south-1",ap_south_2:"ap-south-2",ap_southeast_1:"ap-southeast-1",ap_southeast_2:"ap-southeast-2",ap_southeast_3:"ap-southeast-3",ap_southeast_4:"ap-southeast-4",ap_southeast_5:"ap-southeast-5",ap_southeast_6:"ap-southeast-6",ap_southeast_7:"ap-southeast-7",ca_central_1:"ca-central-1",ca_west_1:"ca-west-1",cn_north_1:"cn-north-1",cn_northwest_1:"cn-northwest-1",eu_central_1:"eu-central-1",eu_central_2:"eu-central-2",eu_north_1:"eu-north-1",eu_south_1:"eu-south-1",eu_south_2:"eu-south-2",eu_west_1:"eu-west-1",eu_west_2:"eu-west-2",eu_west_3:"eu-west-3",il_central_1:"il-central-1",me_central_1:"me-central-1",me_south_1:"me-south-1",mx_central_1:"mx-central-1",sa_east_1:"sa-east-1",us_east_2:"us-east-2",us_gov_east_1:"us-gov-east-1",us_gov_west_1:"us-gov-west-1",us_west_1:"us-west-1",us_west_2:"us-west-2"},jTo={BucketOwnerEnforced:"BucketOwnerEnforced",BucketOwnerPreferred:"BucketOwnerPreferred",ObjectWriter:"ObjectWriter"},zTo={DISABLED:"DISABLED",ENABLED:"ENABLED"},KTo={AES256:"AES256",aws_kms:"aws:kms"},WTo={DISABLED:"DISABLED",ENABLED:"ENABLED"},QTo={DISABLED:"DISABLED",ENABLED:"ENABLED"},ZTo={ReadOnly:"ReadOnly",ReadWrite:"ReadWrite"},YTo={CSV:"CSV"},XTo={V_1:"V_1"},JTo={NONE:"NONE",SSE_C:"SSE-C"},eAo={Disabled:"Disabled",Enabled:"Enabled"},tAo={ARCHIVE_ACCESS:"ARCHIVE_ACCESS",DEEP_ARCHIVE_ACCESS:"DEEP_ARCHIVE_ACCESS"},nAo={CSV:"CSV",ORC:"ORC",Parquet:"Parquet"},sAo={All:"All",Current:"Current"},rAo={BucketKeyStatus:"BucketKeyStatus",ChecksumAlgorithm:"ChecksumAlgorithm",ETag:"ETag",EncryptionStatus:"EncryptionStatus",IntelligentTieringAccessTier:"IntelligentTieringAccessTier",IsMultipartUploaded:"IsMultipartUploaded",LastModifiedDate:"LastModifiedDate",LifecycleExpirationDate:"LifecycleExpirationDate",ObjectAccessControlList:"ObjectAccessControlList",ObjectLockLegalHoldStatus:"ObjectLockLegalHoldStatus",ObjectLockMode:"ObjectLockMode",ObjectLockRetainUntilDate:"ObjectLockRetainUntilDate",ObjectOwner:"ObjectOwner",ReplicationStatus:"ReplicationStatus",Size:"Size",StorageClass:"StorageClass"},oAo={Daily:"Daily",Weekly:"Weekly"},aAo={DEEP_ARCHIVE:"DEEP_ARCHIVE",GLACIER:"GLACIER",GLACIER_IR:"GLACIER_IR",INTELLIGENT_TIERING:"INTELLIGENT_TIERING",ONEZONE_IA:"ONEZONE_IA",STANDARD_IA:"STANDARD_IA"},iAo={Disabled:"Disabled",Enabled:"Enabled"},cAo={all_storage_classes_128K:"all_storage_classes_128K",varies_by_storage_class:"varies_by_storage_class"},lAo={FULL_CONTROL:"FULL_CONTROL",READ:"READ",WRITE:"WRITE"},uAo={DeliveryTime:"DeliveryTime",EventTime:"EventTime"},pAo={aws:"aws",customer:"customer"},dAo={s3_IntelligentTiering:"s3:IntelligentTiering",s3_LifecycleExpiration_:"s3:LifecycleExpiration:*",s3_LifecycleExpiration_Delete:"s3:LifecycleExpiration:Delete",s3_LifecycleExpiration_DeleteMarkerCreated:"s3:LifecycleExpiration:DeleteMarkerCreated",s3_LifecycleTransition:"s3:LifecycleTransition",s3_ObjectAcl_Put:"s3:ObjectAcl:Put",s3_ObjectAnnotation_:"s3:ObjectAnnotation:*",s3_ObjectAnnotation_Delete:"s3:ObjectAnnotation:Delete",s3_ObjectAnnotation_Put:"s3:ObjectAnnotation:Put",s3_ObjectCreated_:"s3:ObjectCreated:*",s3_ObjectCreated_CompleteMultipartUpload:"s3:ObjectCreated:CompleteMultipartUpload",s3_ObjectCreated_Copy:"s3:ObjectCreated:Copy",s3_ObjectCreated_Post:"s3:ObjectCreated:Post",s3_ObjectCreated_Put:"s3:ObjectCreated:Put",s3_ObjectRemoved_:"s3:ObjectRemoved:*",s3_ObjectRemoved_Delete:"s3:ObjectRemoved:Delete",s3_ObjectRemoved_DeleteMarkerCreated:"s3:ObjectRemoved:DeleteMarkerCreated",s3_ObjectRestore_:"s3:ObjectRestore:*",s3_ObjectRestore_Completed:"s3:ObjectRestore:Completed",s3_ObjectRestore_Delete:"s3:ObjectRestore:Delete",s3_ObjectRestore_Post:"s3:ObjectRestore:Post",s3_ObjectTagging_:"s3:ObjectTagging:*",s3_ObjectTagging_Delete:"s3:ObjectTagging:Delete",s3_ObjectTagging_Put:"s3:ObjectTagging:Put",s3_ReducedRedundancyLostObject:"s3:ReducedRedundancyLostObject",s3_Replication_:"s3:Replication:*",s3_Replication_OperationFailedReplication:"s3:Replication:OperationFailedReplication",s3_Replication_OperationMissedThreshold:"s3:Replication:OperationMissedThreshold",s3_Replication_OperationNotTracked:"s3:Replication:OperationNotTracked",s3_Replication_OperationReplicatedAfterThreshold:"s3:Replication:OperationReplicatedAfterThreshold"},mAo={prefix:"prefix",suffix:"suffix"},fAo={Disabled:"Disabled",Enabled:"Enabled"},gAo={Disabled:"Disabled",Enabled:"Enabled"},RAo={Disabled:"Disabled",Enabled:"Enabled"},SAo={Disabled:"Disabled",Enabled:"Enabled"},yAo={Disabled:"Disabled",Enabled:"Enabled"},IAo={Disabled:"Disabled",Enabled:"Enabled"},_Ao={Disabled:"Disabled",Enabled:"Enabled"},hAo={BucketOwner:"BucketOwner",Requester:"Requester"},vAo={Disabled:"Disabled",Enabled:"Enabled"},CAo={Enabled:"Enabled",Suspended:"Suspended"},TAo={http:"http",https:"https"},AAo={COMPLETE:"COMPLETE",COMPLETED:"COMPLETED",FAILED:"FAILED",PENDING:"PENDING",REPLICA:"REPLICA"},DAo={ENABLED:"ENABLED"},bAo={CHECKSUM:"Checksum",ETAG:"ETag",OBJECT_PARTS:"ObjectParts",OBJECT_SIZE:"ObjectSize",STORAGE_CLASS:"StorageClass"},EAo={Enabled:"Enabled"},xAo={COMPLIANCE:"COMPLIANCE",GOVERNANCE:"GOVERNANCE"},PAo={ARCHIVE_ACCESS:"ARCHIVE_ACCESS",DEEP_ARCHIVE_ACCESS:"DEEP_ARCHIVE_ACCESS"},$Ao={url:"url"},wAo={DEEP_ARCHIVE:"DEEP_ARCHIVE",EXPRESS_ONEZONE:"EXPRESS_ONEZONE",FSX_ONTAP:"FSX_ONTAP",FSX_OPENZFS:"FSX_OPENZFS",GLACIER:"GLACIER",GLACIER_IR:"GLACIER_IR",INTELLIGENT_TIERING:"INTELLIGENT_TIERING",ONEZONE_IA:"ONEZONE_IA",OUTPOSTS:"OUTPOSTS",REDUCED_REDUNDANCY:"REDUCED_REDUNDANCY",SNOW:"SNOW",STANDARD:"STANDARD",STANDARD_IA:"STANDARD_IA"},kAo={RESTORE_STATUS:"RestoreStatus"},LAo={STANDARD:"STANDARD"},MAo={Disabled:"Disabled",Enabled:"Enabled"},GAo={Bulk:"Bulk",Expedited:"Expedited",Standard:"Standard"},OAo={SQL:"SQL"},NAo={BZIP2:"BZIP2",GZIP:"GZIP",NONE:"NONE"},VAo={IGNORE:"IGNORE",NONE:"NONE",USE:"USE"},qAo={DOCUMENT:"DOCUMENT",LINES:"LINES"},FAo={ALWAYS:"ALWAYS",ASNEEDED:"ASNEEDED"},BAo={SELECT:"SELECT"};_.AbacStatus$=HTe;_.AbortIncompleteMultipartUpload$=Yyn;_.AbortMultipartUpload$=KCn;_.AbortMultipartUploadCommand=MY;_.AbortMultipartUploadOutput$=Xyn;_.AbortMultipartUploadRequest$=Jyn;_.AccelerateConfiguration$=eIn;_.AccessControlPolicy$=jTe;_.AccessControlTranslation$=tIn;_.AccessDenied=KZ;_.AccessDenied$=Eyn;_.AnalyticsAndOperator$=nIn;_.AnalyticsConfiguration$=nee;_.AnalyticsExportDestination$=sIn;_.AnalyticsFilter$=UCn;_.AnalyticsS3BucketDestination$=rIn;_.AnalyticsS3ExportFileFormat=YTo;_.AnnotationConfigurationState=zTo;_.AnnotationDirective=wTo;_.AnnotationEntry$=oIn;_.AnnotationLimitExceeded=iY;_.AnnotationLimitExceeded$=xyn;_.AnnotationNameTooLong=cY;_.AnnotationNameTooLong$=Pyn;_.AnnotationTableConfiguration$=aIn;_.AnnotationTableConfigurationResult$=iIn;_.AnnotationTableConfigurationUpdates$=cIn;_.ArchiveStatus=PAo;_.BlockedEncryptionTypes$=lIn;_.Bucket$=uIn;_.BucketAbacStatus=vTo;_.BucketAccelerateStatus=ATo;_.BucketAlreadyExists=QZ;_.BucketAlreadyExists$=$yn;_.BucketAlreadyOwnedByYou=ZZ;_.BucketAlreadyOwnedByYou$=wyn;_.BucketCannedACL=VTo;_.BucketInfo$=pIn;_.BucketLifecycleConfiguration$=dIn;_.BucketLocationConstraint=HTo;_.BucketLoggingStatus$=mIn;_.BucketLogsPermission=lAo;_.BucketNamespace=qTo;_.BucketType=BTo;_.BucketVersioningStatus=CAo;_.CORSConfiguration$=DIn;_.CORSRule$=bIn;_.CSVInput$=OIn;_.CSVOutput$=NIn;_.Checksum$=fIn;_.ChecksumAlgorithm=kTo;_.ChecksumMode=DAo;_.ChecksumType=xTo;_.CommonPrefix$=gIn;_.CompleteMultipartUpload$=WCn;_.CompleteMultipartUploadCommand=GY;_.CompleteMultipartUploadOutput$=yIn;_.CompleteMultipartUploadRequest$=IIn;_.CompletedMultipartUpload$=RIn;_.CompletedPart$=SIn;_.CompressionType=NAo;_.Condition$=_In;_.ContinuationEvent$=hIn;_.CopyObject$=QCn;_.CopyObjectCommand=OY;_.CopyObjectOutput$=vIn;_.CopyObjectRequest$=CIn;_.CopyObjectResult$=TIn;_.CopyPartResult$=AIn;_.CreateBucket$=ZCn;_.CreateBucketCommand=NY;_.CreateBucketConfiguration$=EIn;_.CreateBucketMetadataConfiguration$=YCn;_.CreateBucketMetadataConfigurationCommand=VY;_.CreateBucketMetadataConfigurationRequest$=xIn;_.CreateBucketMetadataTableConfiguration$=XCn;_.CreateBucketMetadataTableConfigurationCommand=qY;_.CreateBucketMetadataTableConfigurationRequest$=PIn;_.CreateBucketOutput$=$In;_.CreateBucketRequest$=wIn;_.CreateMultipartUpload$=JCn;_.CreateMultipartUploadCommand=FY;_.CreateMultipartUploadOutput$=kIn;_.CreateMultipartUploadRequest$=LIn;_.CreateSession$=eTn;_.CreateSessionCommand=bk;_.CreateSessionOutput$=MIn;_.CreateSessionRequest$=GIn;_.DataRedundancy=FTo;_.DefaultRetention$=VIn;_.Delete$=qIn;_.DeleteBucket$=tTn;_.DeleteBucketAnalyticsConfiguration$=nTn;_.DeleteBucketAnalyticsConfigurationCommand=BY;_.DeleteBucketAnalyticsConfigurationRequest$=FIn;_.DeleteBucketCommand=UY;_.DeleteBucketCors$=sTn;_.DeleteBucketCorsCommand=HY;_.DeleteBucketCorsRequest$=BIn;_.DeleteBucketEncryption$=rTn;_.DeleteBucketEncryptionCommand=jY;_.DeleteBucketEncryptionRequest$=UIn;_.DeleteBucketIntelligentTieringConfiguration$=oTn;_.DeleteBucketIntelligentTieringConfigurationCommand=zY;_.DeleteBucketIntelligentTieringConfigurationRequest$=HIn;_.DeleteBucketInventoryConfiguration$=aTn;_.DeleteBucketInventoryConfigurationCommand=KY;_.DeleteBucketInventoryConfigurationRequest$=jIn;_.DeleteBucketLifecycle$=iTn;_.DeleteBucketLifecycleCommand=WY;_.DeleteBucketLifecycleRequest$=zIn;_.DeleteBucketMetadataConfiguration$=cTn;_.DeleteBucketMetadataConfigurationCommand=QY;_.DeleteBucketMetadataConfigurationRequest$=KIn;_.DeleteBucketMetadataTableConfiguration$=lTn;_.DeleteBucketMetadataTableConfigurationCommand=ZY;_.DeleteBucketMetadataTableConfigurationRequest$=WIn;_.DeleteBucketMetricsConfiguration$=uTn;_.DeleteBucketMetricsConfigurationCommand=YY;_.DeleteBucketMetricsConfigurationRequest$=QIn;_.DeleteBucketOwnershipControls$=pTn;_.DeleteBucketOwnershipControlsCommand=XY;_.DeleteBucketOwnershipControlsRequest$=ZIn;_.DeleteBucketPolicy$=dTn;_.DeleteBucketPolicyCommand=JY;_.DeleteBucketPolicyRequest$=YIn;_.DeleteBucketReplication$=mTn;_.DeleteBucketReplicationCommand=eX;_.DeleteBucketReplicationRequest$=XIn;_.DeleteBucketRequest$=JIn;_.DeleteBucketTagging$=fTn;_.DeleteBucketTaggingCommand=tX;_.DeleteBucketTaggingRequest$=e_n;_.DeleteBucketWebsite$=gTn;_.DeleteBucketWebsiteCommand=nX;_.DeleteBucketWebsiteRequest$=t_n;_.DeleteMarkerEntry$=s_n;_.DeleteMarkerReplication$=r_n;_.DeleteMarkerReplicationStatus=fAo;_.DeleteObject$=RTn;_.DeleteObjectAnnotation$=STn;_.DeleteObjectAnnotationCommand=sX;_.DeleteObjectAnnotationOutput$=o_n;_.DeleteObjectAnnotationRequest$=a_n;_.DeleteObjectCommand=rX;_.DeleteObjectOutput$=i_n;_.DeleteObjectRequest$=c_n;_.DeleteObjectTagging$=ITn;_.DeleteObjectTaggingCommand=aX;_.DeleteObjectTaggingOutput$=p_n;_.DeleteObjectTaggingRequest$=d_n;_.DeleteObjects$=yTn;_.DeleteObjectsCommand=oX;_.DeleteObjectsOutput$=l_n;_.DeleteObjectsRequest$=u_n;_.DeletePublicAccessBlock$=_Tn;_.DeletePublicAccessBlockCommand=iX;_.DeletePublicAccessBlockRequest$=m_n;_.DeletedObject$=n_n;_.Destination$=f_n;_.DestinationResult$=g_n;_.EncodingType=$Ao;_.Encryption$=R_n;_.EncryptionConfiguration$=S_n;_.EncryptionType=JTo;_.EncryptionTypeMismatch=sY;_.EncryptionTypeMismatch$=kyn;_.EndEvent$=y_n;_.ErrorDetails$=nL;_.ErrorDocument$=zTe;_.Event=dAo;_.EventBridgeConfiguration$=__n;_.ExistingObjectReplication$=h_n;_.ExistingObjectReplicationStatus=SAo;_.ExpirationState=QTo;_.ExpirationStatus=iAo;_.ExpressionType=OAo;_.FileHeaderInfo=VAo;_.FilterRule$=v_n;_.FilterRuleName=mAo;_.GetBucketAbac$=hTn;_.GetBucketAbacCommand=cX;_.GetBucketAbacOutput$=C_n;_.GetBucketAbacRequest$=T_n;_.GetBucketAccelerateConfiguration$=vTn;_.GetBucketAccelerateConfigurationCommand=lX;_.GetBucketAccelerateConfigurationOutput$=A_n;_.GetBucketAccelerateConfigurationRequest$=D_n;_.GetBucketAcl$=CTn;_.GetBucketAclCommand=uX;_.GetBucketAclOutput$=b_n;_.GetBucketAclRequest$=E_n;_.GetBucketAnalyticsConfiguration$=TTn;_.GetBucketAnalyticsConfigurationCommand=pX;_.GetBucketAnalyticsConfigurationOutput$=x_n;_.GetBucketAnalyticsConfigurationRequest$=P_n;_.GetBucketCors$=ATn;_.GetBucketCorsCommand=dX;_.GetBucketCorsOutput$=$_n;_.GetBucketCorsRequest$=w_n;_.GetBucketEncryption$=DTn;_.GetBucketEncryptionCommand=mX;_.GetBucketEncryptionOutput$=k_n;_.GetBucketEncryptionRequest$=L_n;_.GetBucketIntelligentTieringConfiguration$=bTn;_.GetBucketIntelligentTieringConfigurationCommand=fX;_.GetBucketIntelligentTieringConfigurationOutput$=M_n;_.GetBucketIntelligentTieringConfigurationRequest$=G_n;_.GetBucketInventoryConfiguration$=ETn;_.GetBucketInventoryConfigurationCommand=gX;_.GetBucketInventoryConfigurationOutput$=O_n;_.GetBucketInventoryConfigurationRequest$=N_n;_.GetBucketLifecycleConfiguration$=xTn;_.GetBucketLifecycleConfigurationCommand=RX;_.GetBucketLifecycleConfigurationOutput$=V_n;_.GetBucketLifecycleConfigurationRequest$=q_n;_.GetBucketLocation$=PTn;_.GetBucketLocationCommand=SX;_.GetBucketLocationOutput$=F_n;_.GetBucketLocationRequest$=B_n;_.GetBucketLogging$=$Tn;_.GetBucketLoggingCommand=yX;_.GetBucketLoggingOutput$=U_n;_.GetBucketLoggingRequest$=H_n;_.GetBucketMetadataConfiguration$=wTn;_.GetBucketMetadataConfigurationCommand=IX;_.GetBucketMetadataConfigurationOutput$=j_n;_.GetBucketMetadataConfigurationRequest$=z_n;_.GetBucketMetadataConfigurationResult$=K_n;_.GetBucketMetadataTableConfiguration$=kTn;_.GetBucketMetadataTableConfigurationCommand=_X;_.GetBucketMetadataTableConfigurationOutput$=W_n;_.GetBucketMetadataTableConfigurationRequest$=Q_n;_.GetBucketMetadataTableConfigurationResult$=Z_n;_.GetBucketMetricsConfiguration$=LTn;_.GetBucketMetricsConfigurationCommand=hX;_.GetBucketMetricsConfigurationOutput$=Y_n;_.GetBucketMetricsConfigurationRequest$=X_n;_.GetBucketNotificationConfiguration$=MTn;_.GetBucketNotificationConfigurationCommand=vX;_.GetBucketNotificationConfigurationRequest$=J_n;_.GetBucketOwnershipControls$=GTn;_.GetBucketOwnershipControlsCommand=CX;_.GetBucketOwnershipControlsOutput$=ehn;_.GetBucketOwnershipControlsRequest$=thn;_.GetBucketPolicy$=OTn;_.GetBucketPolicyCommand=TX;_.GetBucketPolicyOutput$=nhn;_.GetBucketPolicyRequest$=shn;_.GetBucketPolicyStatus$=NTn;_.GetBucketPolicyStatusCommand=AX;_.GetBucketPolicyStatusOutput$=rhn;_.GetBucketPolicyStatusRequest$=ohn;_.GetBucketReplication$=VTn;_.GetBucketReplicationCommand=DX;_.GetBucketReplicationOutput$=ahn;_.GetBucketReplicationRequest$=ihn;_.GetBucketRequestPayment$=qTn;_.GetBucketRequestPaymentCommand=bX;_.GetBucketRequestPaymentOutput$=chn;_.GetBucketRequestPaymentRequest$=lhn;_.GetBucketTagging$=FTn;_.GetBucketTaggingCommand=EX;_.GetBucketTaggingOutput$=uhn;_.GetBucketTaggingRequest$=phn;_.GetBucketVersioning$=BTn;_.GetBucketVersioningCommand=xX;_.GetBucketVersioningOutput$=dhn;_.GetBucketVersioningRequest$=mhn;_.GetBucketWebsite$=UTn;_.GetBucketWebsiteCommand=PX;_.GetBucketWebsiteOutput$=fhn;_.GetBucketWebsiteRequest$=ghn;_.GetObject$=HTn;_.GetObjectAcl$=jTn;_.GetObjectAclCommand=$X;_.GetObjectAclOutput$=Rhn;_.GetObjectAclRequest$=Shn;_.GetObjectAnnotation$=zTn;_.GetObjectAnnotationCommand=wX;_.GetObjectAnnotationOutput$=yhn;_.GetObjectAnnotationRequest$=Ihn;_.GetObjectAttributes$=KTn;_.GetObjectAttributesCommand=kX;_.GetObjectAttributesOutput$=_hn;_.GetObjectAttributesParts$=hhn;_.GetObjectAttributesRequest$=vhn;_.GetObjectCommand=LX;_.GetObjectLegalHold$=WTn;_.GetObjectLegalHoldCommand=MX;_.GetObjectLegalHoldOutput$=Chn;_.GetObjectLegalHoldRequest$=Thn;_.GetObjectLockConfiguration$=QTn;_.GetObjectLockConfigurationCommand=GX;_.GetObjectLockConfigurationOutput$=Ahn;_.GetObjectLockConfigurationRequest$=Dhn;_.GetObjectOutput$=bhn;_.GetObjectRequest$=Ehn;_.GetObjectRetention$=ZTn;_.GetObjectRetentionCommand=OX;_.GetObjectRetentionOutput$=xhn;_.GetObjectRetentionRequest$=Phn;_.GetObjectTagging$=YTn;_.GetObjectTaggingCommand=NX;_.GetObjectTaggingOutput$=$hn;_.GetObjectTaggingRequest$=whn;_.GetObjectTorrent$=XTn;_.GetObjectTorrentCommand=VX;_.GetObjectTorrentOutput$=khn;_.GetObjectTorrentRequest$=Lhn;_.GetPublicAccessBlock$=JTn;_.GetPublicAccessBlockCommand=qX;_.GetPublicAccessBlockOutput$=Mhn;_.GetPublicAccessBlockRequest$=Ghn;_.GlacierJobParameters$=Ohn;_.Grant$=Nhn;_.Grantee$=KTe;_.HeadBucket$=eAn;_.HeadBucketCommand=Uv;_.HeadBucketOutput$=Vhn;_.HeadBucketRequest$=qhn;_.HeadObject$=tAn;_.HeadObjectCommand=Hv;_.HeadObjectOutput$=Fhn;_.HeadObjectRequest$=Bhn;_.IdempotencyParameterMismatch=pY;_.IdempotencyParameterMismatch$=Lyn;_.IndexDocument$=WTe;_.Initiator$=QTe;_.InputSerialization$=ZTe;_.IntelligentTieringAccessTier=tAo;_.IntelligentTieringAndOperator$=Uhn;_.IntelligentTieringConfiguration$=see;_.IntelligentTieringFilter$=Hhn;_.IntelligentTieringStatus=eAo;_.InvalidAnnotationName=lY;_.InvalidAnnotationName$=Myn;_.InvalidObjectState=JZ;_.InvalidObjectState$=Gyn;_.InvalidPrefix=nY;_.InvalidPrefix$=Oyn;_.InvalidRequest=rY;_.InvalidRequest$=Nyn;_.InvalidWriteOffset=oY;_.InvalidWriteOffset$=Vyn;_.InventoryConfiguration$=ree;_.InventoryConfigurationState=WTo;_.InventoryDestination$=jhn;_.InventoryEncryption$=zhn;_.InventoryFilter$=Khn;_.InventoryFormat=nAo;_.InventoryFrequency=oAo;_.InventoryIncludedObjectVersions=sAo;_.InventoryOptionalField=rAo;_.InventoryS3BucketDestination$=Whn;_.InventorySchedule$=Qhn;_.InventoryTableConfiguration$=Zhn;_.InventoryTableConfigurationResult$=Yhn;_.InventoryTableConfigurationUpdates$=Xhn;_.JSONInput$=n0n;_.JSONOutput$=s0n;_.JSONType=qAo;_.JournalTableConfiguration$=Jhn;_.JournalTableConfigurationResult$=e0n;_.JournalTableConfigurationUpdates$=t0n;_.LambdaFunctionConfiguration$=r0n;_.LifecycleExpiration$=o0n;_.LifecycleRule$=a0n;_.LifecycleRuleAndOperator$=i0n;_.LifecycleRuleFilter$=c0n;_.ListBucketAnalyticsConfigurations$=nAn;_.ListBucketAnalyticsConfigurationsCommand=FX;_.ListBucketAnalyticsConfigurationsOutput$=l0n;_.ListBucketAnalyticsConfigurationsRequest$=u0n;_.ListBucketIntelligentTieringConfigurations$=sAn;_.ListBucketIntelligentTieringConfigurationsCommand=BX;_.ListBucketIntelligentTieringConfigurationsOutput$=p0n;_.ListBucketIntelligentTieringConfigurationsRequest$=d0n;_.ListBucketInventoryConfigurations$=rAn;_.ListBucketInventoryConfigurationsCommand=UX;_.ListBucketInventoryConfigurationsOutput$=m0n;_.ListBucketInventoryConfigurationsRequest$=f0n;_.ListBucketMetricsConfigurations$=oAn;_.ListBucketMetricsConfigurationsCommand=HX;_.ListBucketMetricsConfigurationsOutput$=g0n;_.ListBucketMetricsConfigurationsRequest$=R0n;_.ListBuckets$=aAn;_.ListBucketsCommand=Ek;_.ListBucketsOutput$=S0n;_.ListBucketsRequest$=y0n;_.ListDirectoryBuckets$=iAn;_.ListDirectoryBucketsCommand=xk;_.ListDirectoryBucketsOutput$=I0n;_.ListDirectoryBucketsRequest$=_0n;_.ListMultipartUploads$=cAn;_.ListMultipartUploadsCommand=jX;_.ListMultipartUploadsOutput$=h0n;_.ListMultipartUploadsRequest$=v0n;_.ListObjectAnnotations$=lAn;_.ListObjectAnnotationsCommand=Pk;_.ListObjectAnnotationsOutput$=C0n;_.ListObjectAnnotationsRequest$=T0n;_.ListObjectVersions$=dAn;_.ListObjectVersionsCommand=KX;_.ListObjectVersionsOutput$=x0n;_.ListObjectVersionsRequest$=P0n;_.ListObjects$=uAn;_.ListObjectsCommand=zX;_.ListObjectsOutput$=A0n;_.ListObjectsRequest$=D0n;_.ListObjectsV2$=pAn;_.ListObjectsV2Command=$k;_.ListObjectsV2Output$=b0n;_.ListObjectsV2Request$=E0n;_.ListParts$=mAn;_.ListPartsCommand=wk;_.ListPartsOutput$=$0n;_.ListPartsRequest$=w0n;_.LocationInfo$=k0n;_.LocationType=UTo;_.LoggingEnabled$=YTe;_.MFADelete=MAo;_.MFADeleteStatus=vAo;_.MetadataConfiguration$=L0n;_.MetadataConfigurationResult$=M0n;_.MetadataDirective=LTo;_.MetadataEntry$=G0n;_.MetadataTableConfiguration$=O0n;_.MetadataTableConfigurationResult$=N0n;_.MetadataTableEncryptionConfiguration$=DC;_.Metrics$=V0n;_.MetricsAndOperator$=q0n;_.MetricsConfiguration$=oee;_.MetricsFilter$=HCn;_.MetricsStatus=gAo;_.MultipartUpload$=F0n;_.NoSuchAnnotation=eY;_.NoSuchAnnotation$=qyn;_.NoSuchBucket=YZ;_.NoSuchBucket$=Fyn;_.NoSuchKey=XZ;_.NoSuchKey$=Byn;_.NoSuchUpload=zZ;_.NoSuchUpload$=Uyn;_.NoncurrentVersionExpiration$=B0n;_.NoncurrentVersionTransition$=U0n;_.NotFound=tY;_.NotFound$=Hyn;_.NotificationConfiguration$=XTe;_.NotificationConfigurationFilter$=aee;_.ObjectAlreadyInActiveTierError=dY;_.ObjectAlreadyInActiveTierError$=jyn;_.ObjectAttributes=bAo;_.ObjectCannedACL=$To;_.ObjectEncryption$=jCn;_.ObjectIdentifier$=j0n;_.ObjectLockConfiguration$=JTe;_.ObjectLockEnabled=EAo;_.ObjectLockLegalHold$=eAe;_.ObjectLockLegalHoldStatus=MTo;_.ObjectLockMode=GTo;_.ObjectLockRetention$=tAe;_.ObjectLockRetentionMode=xAo;_.ObjectLockRule$=z0n;_.ObjectNotInActiveTierError=WZ;_.ObjectNotInActiveTierError$=zyn;_.ObjectOwnership=jTo;_.ObjectPart$=K0n;_.ObjectStorageClass=wAo;_.ObjectVersion$=W0n;_.ObjectVersionStorageClass=LAo;_.OptionalObjectAttributes=kAo;_.OutputLocation$=Q0n;_.OutputSerialization$=nAe;_.Owner$=pd;_.OwnerOverride=ETo;_.OwnershipControls$=sAe;_.OwnershipControlsRule$=Z0n;_.ParquetInput$=Y0n;_.Part$=X0n;_.PartitionDateSource=uAo;_.PartitionedPrefix$=J0n;_.Payer=hAo;_.Permission=bTo;_.PolicyStatus$=evn;_.Progress$=tvn;_.ProgressEvent$=nvn;_.Protocol=TAo;_.PublicAccessBlockConfiguration$=rAe;_.PutBucketAbac$=fAn;_.PutBucketAbacCommand=WX;_.PutBucketAbacRequest$=svn;_.PutBucketAccelerateConfiguration$=gAn;_.PutBucketAccelerateConfigurationCommand=QX;_.PutBucketAccelerateConfigurationRequest$=rvn;_.PutBucketAcl$=RAn;_.PutBucketAclCommand=ZX;_.PutBucketAclRequest$=ovn;_.PutBucketAnalyticsConfiguration$=SAn;_.PutBucketAnalyticsConfigurationCommand=YX;_.PutBucketAnalyticsConfigurationRequest$=avn;_.PutBucketCors$=yAn;_.PutBucketCorsCommand=XX;_.PutBucketCorsRequest$=ivn;_.PutBucketEncryption$=IAn;_.PutBucketEncryptionCommand=JX;_.PutBucketEncryptionRequest$=cvn;_.PutBucketIntelligentTieringConfiguration$=_An;_.PutBucketIntelligentTieringConfigurationCommand=eJ;_.PutBucketIntelligentTieringConfigurationRequest$=lvn;_.PutBucketInventoryConfiguration$=hAn;_.PutBucketInventoryConfigurationCommand=tJ;_.PutBucketInventoryConfigurationRequest$=uvn;_.PutBucketLifecycleConfiguration$=vAn;_.PutBucketLifecycleConfigurationCommand=nJ;_.PutBucketLifecycleConfigurationOutput$=pvn;_.PutBucketLifecycleConfigurationRequest$=dvn;_.PutBucketLogging$=CAn;_.PutBucketLoggingCommand=sJ;_.PutBucketLoggingRequest$=mvn;_.PutBucketMetricsConfiguration$=TAn;_.PutBucketMetricsConfigurationCommand=rJ;_.PutBucketMetricsConfigurationRequest$=fvn;_.PutBucketNotificationConfiguration$=AAn;_.PutBucketNotificationConfigurationCommand=oJ;_.PutBucketNotificationConfigurationRequest$=gvn;_.PutBucketOwnershipControls$=DAn;_.PutBucketOwnershipControlsCommand=aJ;_.PutBucketOwnershipControlsRequest$=Rvn;_.PutBucketPolicy$=bAn;_.PutBucketPolicyCommand=iJ;_.PutBucketPolicyRequest$=Svn;_.PutBucketReplication$=EAn;_.PutBucketReplicationCommand=cJ;_.PutBucketReplicationRequest$=yvn;_.PutBucketRequestPayment$=xAn;_.PutBucketRequestPaymentCommand=lJ;_.PutBucketRequestPaymentRequest$=Ivn;_.PutBucketTagging$=PAn;_.PutBucketTaggingCommand=uJ;_.PutBucketTaggingRequest$=_vn;_.PutBucketVersioning$=$An;_.PutBucketVersioningCommand=pJ;_.PutBucketVersioningRequest$=hvn;_.PutBucketWebsite$=wAn;_.PutBucketWebsiteCommand=dJ;_.PutBucketWebsiteRequest$=vvn;_.PutObject$=kAn;_.PutObjectAcl$=LAn;_.PutObjectAclCommand=mJ;_.PutObjectAclOutput$=Cvn;_.PutObjectAclRequest$=Tvn;_.PutObjectAnnotation$=MAn;_.PutObjectAnnotationCommand=fJ;_.PutObjectAnnotationOutput$=Avn;_.PutObjectAnnotationRequest$=Dvn;_.PutObjectCommand=gJ;_.PutObjectLegalHold$=GAn;_.PutObjectLegalHoldCommand=RJ;_.PutObjectLegalHoldOutput$=bvn;_.PutObjectLegalHoldRequest$=Evn;_.PutObjectLockConfiguration$=OAn;_.PutObjectLockConfigurationCommand=SJ;_.PutObjectLockConfigurationOutput$=xvn;_.PutObjectLockConfigurationRequest$=Pvn;_.PutObjectOutput$=$vn;_.PutObjectRequest$=wvn;_.PutObjectRetention$=NAn;_.PutObjectRetentionCommand=yJ;_.PutObjectRetentionOutput$=kvn;_.PutObjectRetentionRequest$=Lvn;_.PutObjectTagging$=VAn;_.PutObjectTaggingCommand=IJ;_.PutObjectTaggingOutput$=Mvn;_.PutObjectTaggingRequest$=Gvn;_.PutPublicAccessBlock$=qAn;_.PutPublicAccessBlockCommand=_J;_.PutPublicAccessBlockRequest$=Ovn;_.QueueConfiguration$=Nvn;_.QuoteFields=FAo;_.RecordExpiration$=iee;_.RecordsEvent$=Vvn;_.Redirect$=qvn;_.RedirectAllRequestsTo$=oAe;_.RenameObject$=FAn;_.RenameObjectCommand=hJ;_.RenameObjectOutput$=Fvn;_.RenameObjectRequest$=Bvn;_.ReplicaModifications$=Uvn;_.ReplicaModificationsStatus=yAo;_.ReplicationConfiguration$=aAe;_.ReplicationRule$=Hvn;_.ReplicationRuleAndOperator$=jvn;_.ReplicationRuleFilter$=zvn;_.ReplicationRuleStatus=_Ao;_.ReplicationStatus=AAo;_.ReplicationTime$=Kvn;_.ReplicationTimeStatus=RAo;_.ReplicationTimeValue$=iAe;_.RequestCharged=CTo;_.RequestPayer=TTo;_.RequestPaymentConfiguration$=Wvn;_.RequestProgress$=Qvn;_.RestoreObject$=BAn;_.RestoreObjectCommand=vJ;_.RestoreObjectOutput$=Zvn;_.RestoreObjectRequest$=Yvn;_.RestoreRequest$=Xvn;_.RestoreRequestType=BAo;_.RestoreStatus$=cAe;_.RoutingRule$=Jvn;_.S3=$J;_.S3Client=bm;_.S3KeyFilter$=eCn;_.S3Location$=tCn;_.S3ServiceException=vs;_.S3ServiceException$=byn;_.S3TablesBucketType=pAo;_.S3TablesDestination$=nCn;_.S3TablesDestinationResult$=sCn;_.SSEKMS$=mCn;_.SSEKMSEncryption$=gCn;_.SSES3$=RCn;_.ScanRange$=rCn;_.SelectObjectContent$=UAn;_.SelectObjectContentCommand=CJ;_.SelectObjectContentEventStream$=zCn;_.SelectObjectContentOutput$=oCn;_.SelectObjectContentRequest$=aCn;_.SelectParameters$=iCn;_.ServerSideEncryption=PTo;_.ServerSideEncryptionByDefault$=cCn;_.ServerSideEncryptionConfiguration$=lAe;_.ServerSideEncryptionRule$=lCn;_.SessionCredentials$=uCn;_.SessionMode=ZTo;_.SimplePrefix$=pCn;_.SourceSelectionCriteria$=dCn;_.SseKmsEncryptedObjects$=fCn;_.SseKmsEncryptedObjectsStatus=IAo;_.Stats$=SCn;_.StatsEvent$=yCn;_.StorageClass=OTo;_.StorageClassAnalysis$=ICn;_.StorageClassAnalysisDataExport$=_Cn;_.StorageClassAnalysisSchemaVersion=XTo;_.TableSseAlgorithm=KTo;_.Tag$=Wy;_.Tagging$=cee;_.TaggingDirective=NTo;_.TargetGrant$=hCn;_.TargetObjectKeyFormat$=vCn;_.Tier=GAo;_.Tiering$=CCn;_.TooManyParts=aY;_.TooManyParts$=Kyn;_.TopicConfiguration$=TCn;_.Transition$=ACn;_.TransitionDefaultMinimumObjectSize=cAo;_.TransitionStorageClass=aAo;_.Type=DTo;_.UnsupportedMediaType=uY;_.UnsupportedMediaType$=Wyn;_.UpdateBucketMetadataAnnotationTableConfiguration$=HAn;_.UpdateBucketMetadataAnnotationTableConfigurationCommand=TJ;_.UpdateBucketMetadataAnnotationTableConfigurationRequest$=DCn;_.UpdateBucketMetadataInventoryTableConfiguration$=jAn;_.UpdateBucketMetadataInventoryTableConfigurationCommand=AJ;_.UpdateBucketMetadataInventoryTableConfigurationRequest$=bCn;_.UpdateBucketMetadataJournalTableConfiguration$=zAn;_.UpdateBucketMetadataJournalTableConfigurationCommand=DJ;_.UpdateBucketMetadataJournalTableConfigurationRequest$=ECn;_.UpdateObjectEncryption$=KAn;_.UpdateObjectEncryptionCommand=bJ;_.UpdateObjectEncryptionRequest$=xCn;_.UpdateObjectEncryptionResponse$=PCn;_.UploadPart$=WAn;_.UploadPartCommand=EJ;_.UploadPartCopy$=QAn;_.UploadPartCopyCommand=xJ;_.UploadPartCopyOutput$=$Cn;_.UploadPartCopyRequest$=wCn;_.UploadPartOutput$=kCn;_.UploadPartRequest$=LCn;_.VersioningConfiguration$=MCn;_.WebsiteConfiguration$=GCn;_.WriteGetObjectResponse$=ZAn;_.WriteGetObjectResponseCommand=PJ;_.WriteGetObjectResponseRequest$=OCn;_._Error$=I_n;_._Object$=H0n;_.errorTypeRegistries=Qyn;_.paginateListBuckets=YAn;_.paginateListDirectoryBuckets=XAn;_.paginateListObjectAnnotations=JAn;_.paginateListObjectsV2=eDn;_.paginateListParts=tDn;_.waitForBucketExists=gTo;_.waitForBucketNotExists=RTo;_.waitForObjectExists=STo;_.waitForObjectNotExists=yTo;_.waitUntilBucketExists=sDn;_.waitUntilBucketNotExists=oDn;_.waitUntilObjectExists=iDn;_.waitUntilObjectNotExists=lDn});var _Dn=Bn(rL=>{var{buildQueryString:RDn,HttpResponse:SDn}=(Me(),ye(bo)),pee=en("node:https"),{Readable:UAo}=en("node:stream"),uAe=en("node:http2"),{streamCollector:HAo}=(We(),ye(ji));rL.streamCollector=HAo;function mee(e){let t=e&&typeof e=="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){let c=new Error("Request aborted");return c.name="AbortError",c.cause=t,c}let a=new Error(String(t));return a.name="AbortError",a}let s=new Error("Request aborted");return s.name="AbortError",s}var jAo=["ECONNRESET","EPIPE","ETIMEDOUT"],yDn=e=>{let t={};for(let s in e){let a=e[s];t[s]=Array.isArray(a)?a.join(","):a}return t},Qo={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)},pDn=1e3,zAo=(e,t,s=0)=>{if(!s)return-1;let a=c=>{let l=Qo.setTimeout(()=>{e.destroy(),t(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${s} ms.`),{name:"TimeoutError"}))},s-c),u=p=>{p?.connecting?p.on("connect",()=>{Qo.clearTimeout(l)}):Qo.clearTimeout(l)};e.socket?u(e.socket):e.on("socket",u)};return s<2e3?(a(0),0):Qo.setTimeout(a.bind(null,pDn),pDn)},KAo=(e,t,s=0,a,c)=>s?Qo.setTimeout(()=>{let l=`@smithy/node-http-handler - [${a?"ERROR":"WARN"}] a request has exceeded the configured ${s} ms requestTimeout.`;if(a){let u=Object.assign(new Error(l),{name:"TimeoutError",code:"ETIMEDOUT"});e.destroy(u),t(u)}else l+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",c?.warn?.(l)},s):-1,WAo=3e3,QAo=(e,{keepAlive:t,keepAliveMsecs:s},a=WAo)=>{if(t!==!0)return-1;let c=()=>{e.socket?e.socket.setKeepAlive(t,s||0):e.on("socket",l=>{l.setKeepAlive(t,s||0)})};return a===0?(c(),0):Qo.setTimeout(c,a)},dDn=3e3,ZAo=(e,t,s=0)=>{let a=c=>{let l=s-c,u=()=>{e.destroy(),t(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${s} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};e.socket?(e.socket.setTimeout(l,u),e.on("close",()=>e.socket?.removeListener("timeout",u))):e.setTimeout(l,u)};return 0<s&&s<6e3?(a(0),0):Qo.setTimeout(a.bind(null,s===0?0:dDn),dDn)},mDn=6e3;async function IDn(e,t,s=mDn,a=!1){let c=t.headers,l=c?c.Expect||c.expect:void 0,u=-1,p=!0;!a&&l==="100-continue"&&(p=await Promise.race([new Promise(d=>{u=Number(Qo.setTimeout(()=>d(!0),Math.max(mDn,s)))}),new Promise(d=>{e.on("continue",()=>{Qo.clearTimeout(u),d(!0)}),e.on("response",()=>{Qo.clearTimeout(u),d(!1)}),e.on("error",()=>{Qo.clearTimeout(u),d(!1)})})])),p&&YAo(e,t.body)}function YAo(e,t){if(t instanceof UAo){t.pipe(e);return}if(t){let s=Buffer.isBuffer(t);if(s||typeof t=="string"){s&&t.byteLength===0?e.end():e.end(t);return}let c=t;if(typeof c=="object"&&c.buffer&&typeof c.byteOffset=="number"&&typeof c.byteLength=="number"){e.end(Buffer.from(c.buffer,c.byteOffset,c.byteLength));return}e.end(Buffer.from(t));return}e.end()}var XAo=0,dee,fDn,pAe=class e{config;configProvider;socketWarningTimestamp=0;externalAgent=!1;metadata={handlerProtocol:"http/1.1"};static create(t){return typeof t?.handle=="function"?t:new e(t)}static checkSocketUsage(t,s,a=console){let{sockets:c,requests:l,maxSockets:u}=t;if(typeof u!="number"||u===1/0||Date.now()-15e3<s)return s;if(c&&l)for(let d in c){let m=c[d]?.length??0,S=l[d]?.length??0;if(m>=u&&S>=2*u)return a?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${m} and ${S} additional requests are enqueued.
|
|
68
68
|
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
69
|
-
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return s}constructor(t){this.configProvider=new Promise((s,a)=>{typeof t=="function"?t().then(c=>{s(this.resolveDefaultConfig(c))}).catch(a):s(this.resolveDefaultConfig(t))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(t,{abortSignal:s,requestTimeout:a}={}){this.config||(this.config=await this.configProvider);let c=this.config,l=c.logger,u=t.protocol==="https:";return!u&&!this.config.httpAgent&&(this.config.httpAgent=await this.config.httpAgentProvider()),new Promise((p,d)=>{let m,S=-1,v=-1,T=-1,x=-1,w=-1,L=()=>{Qo.clearTimeout(S),Qo.clearTimeout(v),Qo.clearTimeout(T),Qo.clearTimeout(x),Qo.clearTimeout(w)},G=async M=>{await m,L(),p(M)},O=async M=>{await m,L(),d(M)};if(s?.aborted){let M=mee(s);O(M);return}let U=t.headers,J=U?(U.Expect??U.expect)==="100-continue":!1,ce=u?c.httpsAgent:c.httpAgent;J&&!this.externalAgent&&(ce=new(u?pee.Agent:dee)({keepAlive:!1,maxSockets:1/0})),S=Qo.setTimeout(()=>{this.socketWarningTimestamp=e.checkSocketUsage(ce,this.socketWarningTimestamp,l)},c.socketAcquisitionWarningTimeout??(c.requestTimeout??2e3)+(c.connectionTimeout??1e3));let ke=t.query?RDn(t.query):"",Ee;if(t.username!=null||t.password!=null){let M=t.username??"",se=t.password??"";Ee=`${M}:${se}`}let _e=t.path;ke&&(_e+=`?${ke}`),t.fragment&&(_e+=`#${t.fragment}`);let Ce=t.hostname??"";Ce[0]==="["&&Ce.endsWith("]")?Ce=t.hostname.slice(1,-1):Ce=t.hostname;let Ne={headers:t.headers,host:Ce,method:t.method,path:_e,port:t.port,agent:ce,auth:Ee},Se=(u?pee.request:fDn)(Ne,M=>{let se=new SDn({statusCode:M.statusCode||-1,reason:M.statusMessage,headers:yDn(M.headers),body:M});G({response:se})});if(Se.on("error",M=>{jAo.includes(M.code)?O(Object.assign(M,{name:"TimeoutError"})):O(M)}),s){let M=()=>{Se.destroy();let se=mee(s);O(se)};if(typeof s.addEventListener=="function"){let se=s;se.addEventListener("abort",M,{once:!0}),Se.once("close",()=>se.removeEventListener("abort",M))}else s.onabort=M}let He=a??c.requestTimeout;v=zAo(Se,O,c.connectionTimeout),T=KAo(Se,O,He,c.throwOnRequestTimeout,l??console),x=ZAo(Se,O,c.socketTimeout);let oe=Ne.agent;typeof oe=="object"&&"keepAlive"in oe&&(w=QAo(Se,{keepAlive:oe.keepAlive,keepAliveMsecs:oe.keepAliveMsecs})),m=IDn(Se,t,He,this.externalAgent).catch(M=>(L(),d(M)))})}updateHttpClientConfig(t,s){this.config=void 0,this.configProvider=this.configProvider.then(a=>t===Symbol.for("logger")?{...a,logger:a.logger??s}:{...a,[t]:s})}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(t){let{requestTimeout:s,connectionTimeout:a,socketTimeout:c,socketAcquisitionWarningTimeout:l,httpAgent:u,httpsAgent:p,throwOnRequestTimeout:d,logger:m}=t||{},S=!0,v=50;return{connectionTimeout:a,requestTimeout:s,socketTimeout:c,socketAcquisitionWarningTimeout:l,throwOnRequestTimeout:d,httpAgentProvider:async()=>{let T=en("node:http"),{Agent:x,request:w}=T.default??T;return fDn=w,dee=x,u instanceof dee||typeof u?.destroy=="function"?(this.externalAgent=!0,u):new dee({keepAlive:S,maxSockets:v,...u})},httpsAgent:p instanceof pee.Agent||typeof p?.destroy=="function"?(this.externalAgent=!0,p):new pee.Agent({keepAlive:S,maxSockets:v,...p}),logger:m}}},JAo=new Uint16Array(1),sL=class{id=JAo[0]++;total=0;max=0;session;refs=0;constructor(t){t.unref(),this.session=t}retain(){if(this.session.destroyed)throw new Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");this.refs+=1,this.total+=1,this.max=Math.max(this.refs,this.max),this.session.ref()}free(){if(!this.session.destroyed&&(this.refs-=1,this.refs===0&&this.session.unref(),this.refs<0))throw new Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.")}deref(){return this.session}close(){this.session.closed||this.session.close()}destroy(){this.refs=0,this.session.destroyed||this.session.destroy()}useCount(){return this.refs}},dAe=class{sessions=[];maxConcurrency=0;constructor(t){this.sessions=(t??[]).map(s=>new sL(s))}poll(){let t=!1;for(let s of this.sessions){if(s.deref().destroyed){t=!0;continue}if(!this.maxConcurrency||s.useCount()<this.maxConcurrency)return s}if(t)for(let s of this.sessions)s.deref().destroyed&&this.remove(s)}offerLast(t){this.sessions.push(t)}remove(t){let s=this.sessions.indexOf(t);s>-1&&this.sessions.splice(s,1)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}setMaxConcurrency(t){this.maxConcurrency=t}destroy(t){this.remove(t),t.destroy()}},mAe=class{config;connectOptions;connectionPools=new Map;constructor(t){if(this.config=t,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(t,s){let a=this.getUrlString(t),c=this.getPool(a);if(!this.config.disableConcurrency&&!s.isEventStream){let m=c.poll();if(m)return m.retain(),m}let l=new sL(this.connect(a)),u=l.deref();this.config.maxConcurrency&&u.settings({maxConcurrentStreams:this.config.maxConcurrency},m=>{if(m)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+t.destination.toString())});let p=()=>{this.removeFromPoolAndClose(a,l)},d=()=>{this.removeFromPoolAndCheckedDestroy(a,l)};return u.on("goaway",p),u.on("error",d),u.on("frameError",d),u.on("close",d),s.requestTimeout&&u.setTimeout(s.requestTimeout,d),c.offerLast(l),l.retain(),l}release(t,s){s.free()}createIsolatedSession(t,s){let a=this.getUrlString(t),c=new sL(this.connect(a)),l=c.deref();l.settings({maxConcurrentStreams:1});let u=()=>{c.destroy()};return l.on("error",u),l.on("frameError",u),l.on("close",u),s.requestTimeout&&l.setTimeout(s.requestTimeout,u),c.retain(),c}destroy(){for(let[t,s]of this.connectionPools){for(let a of[...s])a.destroy();this.connectionPools.delete(t)}}setMaxConcurrentStreams(t){if(t&&t<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=t;for(let s of this.connectionPools.values())s.setMaxConcurrency(t)}setDisableConcurrentStreams(t){this.config.disableConcurrency=t}setNodeHttp2ConnectOptions(t){this.connectOptions=t}debug(){let t={};for(let[s,a]of this.connectionPools){let c=[];for(let l of a)c.push({id:l.id,active:l.useCount(),maxConcurrent:l.max,totalRequests:l.total});t[s]={sessions:c}}return t}removeFromPoolAndClose(t,s){this.connectionPools.get(t)?.remove(s),s.close()}removeFromPoolAndCheckedDestroy(t,s){this.connectionPools.get(t)?.remove(s),s.destroy()}getPool(t){if(!this.connectionPools.has(t)){let s=new dAe;this.config.maxConcurrency&&s.setMaxConcurrency(this.config.maxConcurrency),this.connectionPools.set(t,s)}return this.connectionPools.get(t)}getUrlString(t){return t.destination.toString()}connect(t){return this.connectOptions===void 0?uAe.connect(t):uAe.connect(t,this.connectOptions)}},{constants:gDn}=uAe,fAe=class e{config;configProvider;metadata={handlerProtocol:"h2"};connectionManager=new mAe({});static create(t){return typeof t?.handle=="function"?t:new e(t)}constructor(t){this.configProvider=new Promise((s,a)=>{typeof t=="function"?t().then(c=>{s(c||{})}).catch(a):s(t||{})})}destroy(){this.connectionManager.destroy()}async handle(t,{abortSignal:s,requestTimeout:a,isEventStream:c}={}){if(!this.config){this.config=await this.configProvider;let{disableConcurrentStreams:m,maxConcurrentStreams:S,nodeHttp2ConnectOptions:v}=this.config;this.connectionManager.setDisableConcurrentStreams(m??!1),S&&this.connectionManager.setMaxConcurrentStreams(S),v&&this.connectionManager.setNodeHttp2ConnectOptions(v)}let{requestTimeout:l,disableConcurrentStreams:u}=this.config,p=u||c,d=a??l;return new Promise((m,S)=>{let v=!1,T,x=async M=>{await T,m(M)},w=async M=>{await T,S(M)};if(s?.aborted){v=!0;let M=mee(s);w(M);return}let{hostname:L,method:G,port:O,protocol:U,query:J}=t,ce="";if(t.username!=null||t.password!=null){let M=t.username??"",se=t.password??"";ce=`${M}:${se}@`}let ke=`${U}//${ce}${L}${O?`:${O}`:""}`,Ee={destination:new URL(ke)},_e={requestTimeout:this.config?.sessionTimeout,isEventStream:c},Ce=p?this.connectionManager.createIsolatedSession(Ee,_e):this.connectionManager.lease(Ee,_e),Ne=Ce.deref(),Ve=M=>{p&&Ce.destroy(),v=!0,w(M)},Se=J?RDn(J):"",He=t.path;Se&&(He+=`?${Se}`),t.fragment&&(He+=`#${t.fragment}`);let oe=Ne.request({...t.headers,[gDn.HTTP2_HEADER_PATH]:He,[gDn.HTTP2_HEADER_METHOD]:G});if(d&&oe.setTimeout(d,()=>{oe.close();let M=new Error(`Stream timed out because of no activity for ${d} ms`);M.name="TimeoutError",Ve(M)}),s){let M=()=>{oe.close();let se=mee(s);Ve(se)};if(typeof s.addEventListener=="function"){let se=s;se.addEventListener("abort",M,{once:!0}),oe.once("close",()=>se.removeEventListener("abort",M))}else s.onabort=M}oe.on("frameError",(M,se,Xn)=>{Ve(new Error(`Frame type id ${M} in stream id ${Xn} has failed with code ${se}.`))}),oe.on("error",Ve),oe.on("aborted",()=>{Ve(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${oe.rstCode}.`))}),oe.on("response",M=>{let se=new SDn({statusCode:M[":status"]??-1,headers:yDn(M),body:oe});v=!0,x({response:se}),p&&Ne.close()}),oe.on("close",()=>{p?Ce.destroy():this.connectionManager.release(Ee,Ce),v||Ve(new Error("Unexpected error: http2 request did not get a response"))}),T=IDn(oe,t,d)})}updateHttpClientConfig(t,s){this.config=void 0,this.configProvider=this.configProvider.then(a=>({...a,[t]:s}))}httpHandlerConfigs(){return this.config??{}}};rL.DEFAULT_REQUEST_TIMEOUT=XAo;rL.NodeHttp2Handler=fAe;rL.NodeHttpHandler=pAe});var Jbn=Bn(Ae=>{var{awsEndpointFunctions:eDo,emitWarningIfUnsupportedVersion:tDo,createDefaultUserAgentProvider:nDo,NODE_APP_ID_CONFIG_OPTIONS:sDo,getAwsRegionExtensionConfiguration:rDo,resolveAwsRegionExtensionConfiguration:oDo,resolveUserAgentConfig:aDo,resolveHostHeaderConfig:iDo,getUserAgentPlugin:cDo,getHostHeaderPlugin:lDo,getLoggerPlugin:uDo,getRecursionDetectionPlugin:pDo,setCredentialFeature:SAe,stsRegionDefaultResolver:dDo}=(sn(),ye(Wi)),{NoAuthSigner:PDn,getHttpAuthSchemeEndpointRuleSetPlugin:mDo,DefaultIdentityProviderConfig:fDo,getHttpSigningPlugin:gDo}=(Hr(),ye(SA)),{normalizeProvider:$Dn,getSmithyContext:wDn,ServiceException:RDo,NoOpLogger:SDo,emitWarningIfUnsupportedVersion:yDo,loadConfigsForDefaultMode:IDo,getDefaultExtensionConfiguration:_Do,resolveDefaultRuntimeConfig:hDo,Client:kDn,makeBuilder:vDo,createAggregatedClient:CDo}=(nt(),ye(Ou)),{Command:TDo}=(nt(),ye(Ou));Ae.$Command=TDo;Ae.__Client=kDn;var{resolveDefaultsModeConfig:ADo,loadConfig:Ug,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:DDo,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:bDo,NODE_REGION_CONFIG_OPTIONS:EDo,NODE_REGION_CONFIG_FILE_OPTIONS:xDo,resolveRegionConfig:PDo}=(tn(),ye(wa)),{BinaryDecisionDiagram:$Do,EndpointCache:wDo,decideEndpoint:kDo,customEndpointFunctions:LDo,resolveParams:MDo,resolveEndpointConfig:GDo,getEndpointPlugin:ODo}=($n(),ye(mR)),{parseUrl:NDo,getHttpHandlerExtensionConfiguration:VDo,resolveHttpHandlerRuntimeConfig:qDo,getContentLengthPlugin:FDo}=(Me(),ye(bo)),{DEFAULT_RETRY_MODE:BDo,NODE_RETRY_MODE_CONFIG_OPTIONS:UDo,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:HDo,resolveRetryConfig:jDo,getRetryPlugin:zDo}=(ka(),ye(dA)),{TypeRegistry:LDn,getSchemaSerdePlugin:KDo}=(Mt(),ye(FT)),{resolveAwsSdkSigV4Config:WDo,resolveAwsSdkSigV4AConfig:QDo,AwsSdkSigV4Signer:MDn,AwsSdkSigV4ASigner:GDn,NODE_SIGV4A_CONFIG_OPTIONS:ZDo,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:YDo}=(zr(),ye(S_)),{SignatureV4MultiRegion:ODn}=$R(),{defaultProvider:hDn}=H_(),{toUtf8:XDo,fromUtf8:JDo,toBase64:ebo,fromBase64:tbo,calculateBodyLength:nbo}=(We(),ye(ji)),{streamCollector:sbo,NodeHttpHandler:rbo}=_Dn(),{AwsQueryProtocol:obo}=(bd(),ye(HN)),{Sha256:abo}=(zi(),ye(sA)),EC="ref",Qy=-1,oL=!0,vDn="isSet",NDn="PartitionResult",aL="booleanEquals",Zo="stringEquals",gAe="getAttr",CDn="us-east-1",TDn="sigv4",ADn="sts",DDn="https://sts.{Region}.{PartitionResult#dnsSuffix}",bDn={[EC]:"Endpoint"},Yo={[EC]:"Region"},RAe={[EC]:NDn},bC={},EDn=[Yo],xDn={conditions:[[vDn,[bDn]],[vDn,EDn],["aws.partition",EDn,NDn],[aL,[{[EC]:"UseFIPS"},oL]],[aL,[{[EC]:"UseDualStack"},oL]],[Zo,[Yo,"aws-global"]],[aL,[{[EC]:"UseGlobalEndpoint"},oL]],[Zo,[Yo,"eu-central-1"]],[aL,[{fn:gAe,argv:[RAe,"supportsDualStack"]},oL]],[aL,[{fn:gAe,argv:[RAe,"supportsFIPS"]},oL]],[Zo,[Yo,"ap-south-1"]],[Zo,[Yo,"eu-north-1"]],[Zo,[Yo,"eu-west-1"]],[Zo,[Yo,"eu-west-2"]],[Zo,[Yo,"eu-west-3"]],[Zo,[Yo,"sa-east-1"]],[Zo,[Yo,CDn]],[Zo,[Yo,"us-east-2"]],[Zo,[Yo,"us-west-2"]],[Zo,[Yo,"us-west-1"]],[Zo,[Yo,"ca-central-1"]],[Zo,[Yo,"ap-southeast-1"]],[Zo,[Yo,"ap-northeast-1"]],[Zo,[Yo,"ap-southeast-2"]],[Zo,[{fn:gAe,argv:[RAe,"name"]},"aws-us-gov"]]],results:[[Qy],["https://sts.amazonaws.com",{authSchemes:[{name:TDn,signingName:ADn,signingRegion:CDn}]}],[DDn,{authSchemes:[{name:TDn,signingName:ADn,signingRegion:"{Region}"}]}],[Qy,"Invalid Configuration: FIPS and custom endpoint are not supported"],[Qy,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[bDn,bC],["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",bC],[Qy,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://sts.{Region}.amazonaws.com",bC],["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",bC],[Qy,"FIPS is enabled but this partition does not support FIPS"],["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",bC],[Qy,"DualStack is enabled but this partition does not support DualStack"],[DDn,bC],[Qy,"Invalid Configuration: Missing Region"]]},ibo=2,xn=1e8,cbo=new Int32Array([-1,1,-1,0,30,3,1,4,xn+14,2,5,xn+14,3,25,6,4,24,7,5,xn+1,8,6,9,xn+13,7,xn+1,10,10,xn+1,11,11,xn+1,12,12,xn+1,13,13,xn+1,14,14,xn+1,15,15,xn+1,16,16,xn+1,17,17,xn+1,18,18,xn+1,19,19,xn+1,20,20,xn+1,21,21,xn+1,22,22,xn+1,23,23,xn+1,xn+2,8,xn+11,xn+12,4,28,26,9,27,xn+10,24,xn+8,xn+9,8,29,xn+7,9,xn+6,xn+7,3,xn+3,31,4,xn+4,xn+5]),lbo=$Do.from(cbo,ibo,xDn.conditions,xDn.results),ubo=new wDo({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),VDn=(e,t={})=>ubo.get(e,()=>kDo(lbo,{endpointParams:e,logger:t.logger}));LDo.aws=eDo;var pbo=e=>async(t,s,a)=>{if(!a)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let c=await e(t,s,a),l=wDn(s)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!l)throw new Error(`getEndpointParameterInstructions() is not defined on '${s.commandName}'`);let u=await MDo(a,{getEndpointParameterInstructions:l},t);return Object.assign(c,u)},dbo=async(e,t,s)=>({operation:wDn(t).operation,region:await $Dn(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),mbo=pbo(dbo);function qDn(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}function fee(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}function yAe(e){return{schemeId:"smithy.api#noAuth"}}var fbo=(e,t,s)=>c=>{let u=e(c).properties?.authSchemes;if(!u)return t(c);let p=[];for(let d of u){let{name:m,properties:S={},...v}=d,T=m.toLowerCase();m!==T&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${m}' to '${T}'`);let x;if(T==="sigv4a"){x="aws.auth#sigv4a";let G=u.find(O=>{let U=O.name.toLowerCase();return U!=="sigv4a"&&U.startsWith("sigv4")});if(ODn.sigv4aDependency()==="none"&&G)continue}else if(T.startsWith("sigv4"))x="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${T}'`);let w=s[x];if(!w)throw new Error(`Could not find HttpAuthOption create function for '${x}'`);let L=w(c);L.schemeId=x,L.signingProperties={...L.signingProperties||{},...v,...S},p.push(L)}return p},gbo=e=>{let t=[];switch(e.operation){case"AssumeRoleWithSAML":{t.push(yAe()),t.push(fee(e));break}case"AssumeRoleWithWebIdentity":{t.push(yAe()),t.push(fee(e));break}default:t.push(qDn(e)),t.push(fee(e))}return t},Rbo=fbo(VDn,gbo,{"aws.auth#sigv4":qDn,"aws.auth#sigv4a":fee,"smithy.api#noAuth":yAe}),Sbo=e=>{let t=WDo(e),s=QDo(t);return Object.assign(s,{authSchemePreference:$Dn(e.authSchemePreference??[])})},ybo=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),Ibo={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},_bo="3.1103.0",hbo={version:_bo},ba=class e extends RDo{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}},gee=class e extends ba{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Ree=class e extends ba{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},See=class e extends ba{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},yee=class e extends ba{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Iee=class e extends ba{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},_ee=class e extends ba{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},hee=class e extends ba{name="IDPCommunicationErrorException";$fault="client";$retryable={};constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},vee=class e extends ba{name="InvalidAuthorizationMessageException";$fault="client";constructor(t){super({name:"InvalidAuthorizationMessageException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Cee=class e extends ba{name="ExpiredTradeInTokenException";$fault="client";constructor(t){super({name:"ExpiredTradeInTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Tee=class e extends ba{name="JWTPayloadSizeExceededException";$fault="client";constructor(t){super({name:"JWTPayloadSizeExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Aee=class e extends ba{name="OutboundWebIdentityFederationDisabledException";$fault="client";constructor(t){super({name:"OutboundWebIdentityFederationDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Dee=class e extends ba{name="SessionDurationEscalationException";$fault="client";constructor(t){super({name:"SessionDurationEscalationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},IAe="Arn",FDn="AccessKeyId",vbo="AssumedPrincipal",Cbo="AssumeRole",Tbo="AssumedRoleId",Abo="AssumeRoleRequest",Dbo="AssumeRoleResponse",bbo="AssumeRootRequest",Ebo="AssumeRootResponse",Oee="AssumedRoleUser",xbo="AssumeRoleWithSAML",Pbo="AssumeRoleWithSAMLRequest",$bo="AssumeRoleWithSAMLResponse",wbo="AssumeRoleWithWebIdentity",kbo="AssumeRoleWithWebIdentityRequest",Lbo="AssumeRoleWithWebIdentityResponse",Mbo="AssumeRoot",BDn="Account",_Ae="Audience",Hg="Credentials",Gbo="ContextAssertion",Obo="DecodeAuthorizationMessage",Nbo="DecodeAuthorizationMessageRequest",Vbo="DecodeAuthorizationMessageResponse",qbo="DecodedMessage",Zy="DurationSeconds",UDn="Expiration",Fbo="ExternalId",Bbo="EncodedMessage",Ubo="ExpiredTokenException",Hbo="ExpiredTradeInTokenException",HDn="FederatedUser",jbo="FederatedUserId",zbo="GetAccessKeyInfo",Kbo="GetAccessKeyInfoRequest",Wbo="GetAccessKeyInfoResponse",Qbo="GetCallerIdentity",Zbo="GetCallerIdentityRequest",Ybo="GetCallerIdentityResponse",Xbo="GetDelegatedAccessToken",Jbo="GetDelegatedAccessTokenRequest",eEo="GetDelegatedAccessTokenResponse",tEo="GetFederationToken",nEo="GetFederationTokenRequest",sEo="GetFederationTokenResponse",rEo="GetSessionToken",oEo="GetSessionTokenRequest",aEo="GetSessionTokenResponse",iEo="GetWebIdentityToken",cEo="GetWebIdentityTokenRequest",lEo="GetWebIdentityTokenResponse",uEo="Issuer",pEo="InvalidAuthorizationMessageException",dEo="IDPCommunicationErrorException",mEo="IDPRejectedClaimException",fEo="InvalidIdentityTokenException",gEo="JWTPayloadSizeExceededException",REo="Key",SEo="MalformedPolicyDocumentException",yEo="Name",IEo="NameQualifier",_Eo="OutboundWebIdentityFederationDisabledException",Nee="Policy",Vee="PolicyArns",hEo="PrincipalArn",vEo="ProviderArn",CEo="ProvidedContexts",TEo="ProvidedContextsListType",AEo="ProvidedContext",DEo="PolicyDescriptorType",bEo="ProviderId",lL="PackedPolicySize",EEo="PackedPolicyTooLargeException",xEo="Provider",hAe="RoleArn",PEo="RegionDisabledException",jDn="RoleSessionName",$Eo="Subject",wEo="SigningAlgorithm",kEo="SecretAccessKey",LEo="SAMLAssertion",MEo="SAMLAssertionType",GEo="SessionDurationEscalationException",OEo="SubjectFromWebIdentityToken",uL="SourceIdentity",zDn="SerialNumber",NEo="SubjectType",VEo="SessionToken",vAe="Tags",KDn="TokenCode",qEo="TradeInToken",FEo="TargetPrincipal",BEo="TaskPolicyArn",UEo="TransitiveTagKeys",HEo="Tag",jEo="UserId",zEo="Value",WDn="WebIdentityToken",KEo="arn",WEo="accessKeySecretType",el="awsQueryError",tl="client",QEo="clientTokenType",nl="error",sl="httpError",rl="message",ZEo="policyDescriptorListType",QDn="smithy.ts.sdk.synthetic.com.amazonaws.sts",YEo="tradeInTokenType",XEo="tagListType",JEo="webIdentityTokenType",Je="com.amazonaws.sts",ZDn=LDn.for(QDn),YDn=[-3,QDn,"STSServiceException",0,[],[]];ZDn.registerError(YDn,ba);var mc=LDn.for(Je),XDn=[-3,Je,Ubo,{[el]:["ExpiredTokenException",400],[nl]:tl,[sl]:400},[rl],[0]];mc.registerError(XDn,gee);var JDn=[-3,Je,Hbo,{[el]:["ExpiredTradeInTokenException",400],[nl]:tl,[sl]:400},[rl],[0]];mc.registerError(JDn,Cee);var ebn=[-3,Je,dEo,{[el]:["IDPCommunicationError",400],[nl]:tl,[sl]:400},[rl],[0]];mc.registerError(ebn,hee);var tbn=[-3,Je,mEo,{[el]:["IDPRejectedClaim",403],[nl]:tl,[sl]:403},[rl],[0]];mc.registerError(tbn,Iee);var nbn=[-3,Je,pEo,{[el]:["InvalidAuthorizationMessageException",400],[nl]:tl,[sl]:400},[rl],[0]];mc.registerError(nbn,vee);var sbn=[-3,Je,fEo,{[el]:["InvalidIdentityToken",400],[nl]:tl,[sl]:400},[rl],[0]];mc.registerError(sbn,_ee);var rbn=[-3,Je,gEo,{[el]:["JWTPayloadSizeExceededException",400],[nl]:tl,[sl]:400},[rl],[0]];mc.registerError(rbn,Tee);var obn=[-3,Je,SEo,{[el]:["MalformedPolicyDocument",400],[nl]:tl,[sl]:400},[rl],[0]];mc.registerError(obn,Ree);var abn=[-3,Je,_Eo,{[el]:["OutboundWebIdentityFederationDisabledException",403],[nl]:tl,[sl]:403},[rl],[0]];mc.registerError(abn,Aee);var ibn=[-3,Je,EEo,{[el]:["PackedPolicyTooLarge",400],[nl]:tl,[sl]:400},[rl],[0]];mc.registerError(ibn,See);var cbn=[-3,Je,PEo,{[el]:["RegionDisabledException",403],[nl]:tl,[sl]:403},[rl],[0]];mc.registerError(cbn,yee);var lbn=[-3,Je,GEo,{[el]:["SessionDurationEscalationException",403],[nl]:tl,[sl]:403},[rl],[0]];mc.registerError(lbn,Dee);var ubn=[ZDn,mc],exo=[0,Je,WEo,8,0],txo=[0,Je,QEo,8,0],nxo=[0,Je,MEo,8,0],sxo=[0,Je,YEo,8,0],rxo=[0,Je,JEo,8,0],qee=[3,Je,Oee,0,[Tbo,IAe],[0,0],2],pbn=[3,Je,Abo,0,[hAe,jDn,Vee,Nee,Zy,vAe,UEo,Fbo,zDn,KDn,uL,CEo],[0,0,()=>Fee,0,1,()=>TAe,64,0,0,0,0,()=>oxo],2],dbn=[3,Je,Dbo,0,[Hg,Oee,lL,uL],[[()=>jg,0],()=>qee,1,0]],mbn=[3,Je,Pbo,0,[hAe,hEo,LEo,Vee,Nee,Zy],[0,0,[()=>nxo,0],()=>Fee,0,1],3],fbn=[3,Je,$bo,0,[Hg,Oee,lL,$Eo,NEo,uEo,_Ae,IEo,uL],[[()=>jg,0],()=>qee,1,0,0,0,0,0,0]],gbn=[3,Je,kbo,0,[hAe,jDn,WDn,bEo,Vee,Nee,Zy],[0,0,[()=>txo,0],0,()=>Fee,0,1],3],Rbn=[3,Je,Lbo,0,[Hg,OEo,Oee,lL,xEo,_Ae,uL],[[()=>jg,0],0,()=>qee,1,0,0,0]],Sbn=[3,Je,bbo,0,[FEo,BEo,Zy],[0,()=>CAe,1],2],ybn=[3,Je,Ebo,0,[Hg,uL],[[()=>jg,0],0]],jg=[3,Je,Hg,0,[FDn,kEo,VEo,UDn],[0,[()=>exo,0],0,4],4],Ibn=[3,Je,Nbo,0,[Bbo],[0],1],_bn=[3,Je,Vbo,0,[qbo],[0]],hbn=[3,Je,HDn,0,[jbo,IAe],[0,0],2],vbn=[3,Je,Kbo,0,[FDn],[0],1],Cbn=[3,Je,Wbo,0,[BDn],[0]],Tbn=[3,Je,Zbo,0,[],[]],Abn=[3,Je,Ybo,0,[jEo,BDn,IAe],[0,0,0]],Dbn=[3,Je,Jbo,0,[qEo],[[()=>sxo,0]],1],bbn=[3,Je,eEo,0,[Hg,lL,vbo],[[()=>jg,0],1,0]],Ebn=[3,Je,nEo,0,[yEo,Nee,Vee,Zy,vAe],[0,0,()=>Fee,1,()=>TAe],1],xbn=[3,Je,sEo,0,[Hg,HDn,lL],[[()=>jg,0],()=>hbn,1]],Pbn=[3,Je,oEo,0,[Zy,zDn,KDn],[1,0,0]],$bn=[3,Je,aEo,0,[Hg],[[()=>jg,0]]],wbn=[3,Je,cEo,0,[_Ae,wEo,Zy,vAe],[64,0,1,()=>TAe],2],kbn=[3,Je,lEo,0,[WDn,UDn],[[()=>rxo,0],4]],CAe=[3,Je,DEo,0,[KEo],[0]],Lbn=[3,Je,AEo,0,[vEo,Gbo],[0,0]],Mbn=[3,Je,HEo,0,[REo,zEo],[0,0],2],Fee=[1,Je,ZEo,0,()=>CAe],oxo=[1,Je,TEo,0,()=>Lbn],TAe=[1,Je,XEo,0,()=>Mbn],Gbn=[9,Je,Cbo,0,()=>pbn,()=>dbn],Obn=[9,Je,xbo,0,()=>mbn,()=>fbn],Nbn=[9,Je,wbo,0,()=>gbn,()=>Rbn],Vbn=[9,Je,Mbo,0,()=>Sbn,()=>ybn],qbn=[9,Je,Obo,0,()=>Ibn,()=>_bn],Fbn=[9,Je,zbo,0,()=>vbn,()=>Cbn],Bbn=[9,Je,Qbo,0,()=>Tbn,()=>Abn],Ubn=[9,Je,Xbo,0,()=>Dbn,()=>bbn],Hbn=[9,Je,tEo,0,()=>Ebn,()=>xbn],jbn=[9,Je,rEo,0,()=>Pbn,()=>$bn],zbn=[9,Je,iEo,0,()=>wbn,()=>kbn],axo=e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??tbo,base64Encoder:e?.base64Encoder??ebo,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??VDn,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Rbo,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new MDn},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new GDn},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new PDn}],logger:e?.logger??new SDo,protocol:e?.protocol??obo,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:ubn,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",sha256:e?.sha256??abo,signerConstructor:e?.signerConstructor??ODn,urlParser:e?.urlParser??NDo,utf8Decoder:e?.utf8Decoder??JDo,utf8Encoder:e?.utf8Encoder??XDo}),ixo=e=>{yDo(process.version);let t=ADo(e),s=()=>t().then(IDo),a=axo(e);tDo(process.version);let c={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??Ug(YDo,c),bodyLengthChecker:e?.bodyLengthChecker??nbo,credentialDefaultProvider:e?.credentialDefaultProvider??hDn,defaultUserAgentProvider:e?.defaultUserAgentProvider??nDo({serviceId:a.serviceId,clientVersion:hbo.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:l=>l.getIdentityProvider("aws.auth#sigv4")||(async u=>await hDn(u?.__config||{})()),signer:new MDn},{schemeId:"aws.auth#sigv4a",identityProvider:l=>l.getIdentityProvider("aws.auth#sigv4a"),signer:new GDn},{schemeId:"smithy.api#noAuth",identityProvider:l=>l.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new PDn}],maxAttempts:e?.maxAttempts??Ug(HDo,e),region:e?.region??Ug(EDo,{...xDo,...c}),requestHandler:rbo.create(e?.requestHandler??s),retryMode:e?.retryMode??Ug({...UDo,default:async()=>(await s()).retryMode||BDo},e),sigv4aSigningRegionSet:e?.sigv4aSigningRegionSet??Ug(ZDo,c),streamCollector:e?.streamCollector??sbo,useDualstackEndpoint:e?.useDualstackEndpoint??Ug(bDo,c),useFipsEndpoint:e?.useFipsEndpoint??Ug(DDo,c),userAgentAppId:e?.userAgentAppId??Ug(sDo,c)}},cxo=e=>{let t=e.httpAuthSchemes,s=e.httpAuthSchemeProvider,a=e.credentials;return{setHttpAuthScheme(c){let l=t.findIndex(u=>u.schemeId===c.schemeId);l===-1?t.push(c):t.splice(l,1,c)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(c){s=c},httpAuthSchemeProvider(){return s},setCredentials(c){a=c},credentials(){return a}}},lxo=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),uxo=(e,t)=>{let s=Object.assign(rDo(e),_Do(e),VDo(e),cxo(e));return t.forEach(a=>a.configure(s)),Object.assign(e,oDo(s),hDo(s),qDo(s),lxo(s))},xC=class extends kDn{config;constructor(...[t]){let s=ixo(t||{});super(s),this.initConfig=s;let a=ybo(s),c=aDo(a),l=jDo(c),u=PDo(l),p=iDo(u),d=GDo(p),m=Sbo(d),S=uxo(m,t?.extensions||[]);this.config=S,this.middlewareStack.use(KDo(this.config)),this.middlewareStack.use(cDo(this.config)),this.middlewareStack.use(zDo(this.config)),this.middlewareStack.use(FDo(this.config)),this.middlewareStack.use(lDo(this.config)),this.middlewareStack.use(uDo(this.config)),this.middlewareStack.use(pDo(this.config)),this.middlewareStack.use(mDo(this.config,{httpAuthSchemeParametersProvider:mbo,identityProviderConfigProvider:async v=>new fDo({"aws.auth#sigv4":v.credentials,"aws.auth#sigv4a":v.credentials})})),this.middlewareStack.use(gDo(this.config))}destroy(){super.destroy()}},fu=vDo(Ibo,"AWSSecurityTokenServiceV20110615","STSClient",ODo),gu={},Ru=(e,t,s,a)=>[],iL=class extends fu(gu,Ru,"AssumeRole",Gbn){},bee=class extends fu(gu,Ru,"AssumeRoleWithSAML",Obn){},cL=class extends fu(gu,Ru,"AssumeRoleWithWebIdentity",Nbn){},Eee=class extends fu(gu,Ru,"AssumeRoot",Vbn){},xee=class extends fu(gu,Ru,"DecodeAuthorizationMessage",qbn){},Pee=class extends fu(gu,Ru,"GetAccessKeyInfo",Fbn){},$ee=class extends fu(gu,Ru,"GetCallerIdentity",Bbn){},wee=class extends fu(gu,Ru,"GetDelegatedAccessToken",Ubn){},kee=class extends fu(gu,Ru,"GetFederationToken",Hbn){},Lee=class extends fu(gu,Ru,"GetSessionToken",jbn){},Mee=class extends fu(gu,Ru,"GetWebIdentityToken",zbn){},pxo={AssumeRoleCommand:iL,AssumeRoleWithSAMLCommand:bee,AssumeRoleWithWebIdentityCommand:cL,AssumeRootCommand:Eee,DecodeAuthorizationMessageCommand:xee,GetAccessKeyInfoCommand:Pee,GetCallerIdentityCommand:$ee,GetDelegatedAccessTokenCommand:wee,GetFederationTokenCommand:kee,GetSessionTokenCommand:Lee,GetWebIdentityTokenCommand:Mee},Gee=class extends xC{};CDo(pxo,Gee);var Kbn=e=>{if(typeof e?.Arn=="string"){let t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}},Wbn=async(e,t,s,a={})=>{let c=typeof e=="function"?await e():e,l=typeof t=="function"?await t():t,u="",p=c??l??(u=await dDo(a)());return s?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${c} (credential provider clientConfig)`,`${l} (contextual client)`,`${u} (STS default: AWS_REGION, profile region, or us-east-1)`),p},dxo=(e,t)=>{let s,a;return async(c,l)=>{if(a=c,!s){let{logger:S=e?.parentClientConfig?.logger,profile:v=e?.parentClientConfig?.profile,region:T,requestHandler:x=e?.parentClientConfig?.requestHandler,credentialProviderLogger:w,userAgentAppId:L=e?.parentClientConfig?.userAgentAppId}=e,G=await Wbn(T,e?.parentClientConfig?.region,w,{logger:S,profile:v}),O=!Qbn(x);s=new t({...e,userAgentAppId:L,profile:v,credentialDefaultProvider:()=>async()=>a,region:G,requestHandler:O?x:void 0,logger:S})}let{Credentials:u,AssumedRoleUser:p}=await s.send(new iL(l));if(!u||!u.AccessKeyId||!u.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${l.RoleArn}`);let d=Kbn(p),m={accessKeyId:u.AccessKeyId,secretAccessKey:u.SecretAccessKey,sessionToken:u.SessionToken,expiration:u.Expiration,...u.CredentialScope&&{credentialScope:u.CredentialScope},...d&&{accountId:d}};return SAe(m,"CREDENTIALS_STS_ASSUME_ROLE","i"),m}},mxo=(e,t)=>{let s;return async a=>{if(!s){let{logger:d=e?.parentClientConfig?.logger,profile:m=e?.parentClientConfig?.profile,region:S,requestHandler:v=e?.parentClientConfig?.requestHandler,credentialProviderLogger:T,userAgentAppId:x=e?.parentClientConfig?.userAgentAppId}=e,w=await Wbn(S,e?.parentClientConfig?.region,T,{logger:d,profile:m}),L=!Qbn(v);s=new t({...e,userAgentAppId:x,profile:m,region:w,requestHandler:L?v:void 0,logger:d})}let{Credentials:c,AssumedRoleUser:l}=await s.send(new cL(a));if(!c||!c.AccessKeyId||!c.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${a.RoleArn}`);let u=Kbn(l),p={accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.SessionToken,expiration:c.Expiration,...c.CredentialScope&&{credentialScope:c.CredentialScope},...u&&{accountId:u}};return u&&SAe(p,"RESOLVED_ACCOUNT_ID","T"),SAe(p,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),p}},Qbn=e=>e?.metadata?.handlerProtocol==="h2",Zbn=(e,t)=>t?class extends e{constructor(a){super(a);for(let c of t)this.middlewareStack.use(c)}}:e,Ybn=(e={},t)=>dxo(e,Zbn(xC,t)),Xbn=(e={},t)=>mxo(e,Zbn(xC,t)),fxo=e=>t=>e({roleAssumer:Ybn(t),roleAssumerWithWebIdentity:Xbn(t),...t});Ae.AssumeRole$=Gbn;Ae.AssumeRoleCommand=iL;Ae.AssumeRoleRequest$=pbn;Ae.AssumeRoleResponse$=dbn;Ae.AssumeRoleWithSAML$=Obn;Ae.AssumeRoleWithSAMLCommand=bee;Ae.AssumeRoleWithSAMLRequest$=mbn;Ae.AssumeRoleWithSAMLResponse$=fbn;Ae.AssumeRoleWithWebIdentity$=Nbn;Ae.AssumeRoleWithWebIdentityCommand=cL;Ae.AssumeRoleWithWebIdentityRequest$=gbn;Ae.AssumeRoleWithWebIdentityResponse$=Rbn;Ae.AssumeRoot$=Vbn;Ae.AssumeRootCommand=Eee;Ae.AssumeRootRequest$=Sbn;Ae.AssumeRootResponse$=ybn;Ae.AssumedRoleUser$=qee;Ae.Credentials$=jg;Ae.DecodeAuthorizationMessage$=qbn;Ae.DecodeAuthorizationMessageCommand=xee;Ae.DecodeAuthorizationMessageRequest$=Ibn;Ae.DecodeAuthorizationMessageResponse$=_bn;Ae.ExpiredTokenException=gee;Ae.ExpiredTokenException$=XDn;Ae.ExpiredTradeInTokenException=Cee;Ae.ExpiredTradeInTokenException$=JDn;Ae.FederatedUser$=hbn;Ae.GetAccessKeyInfo$=Fbn;Ae.GetAccessKeyInfoCommand=Pee;Ae.GetAccessKeyInfoRequest$=vbn;Ae.GetAccessKeyInfoResponse$=Cbn;Ae.GetCallerIdentity$=Bbn;Ae.GetCallerIdentityCommand=$ee;Ae.GetCallerIdentityRequest$=Tbn;Ae.GetCallerIdentityResponse$=Abn;Ae.GetDelegatedAccessToken$=Ubn;Ae.GetDelegatedAccessTokenCommand=wee;Ae.GetDelegatedAccessTokenRequest$=Dbn;Ae.GetDelegatedAccessTokenResponse$=bbn;Ae.GetFederationToken$=Hbn;Ae.GetFederationTokenCommand=kee;Ae.GetFederationTokenRequest$=Ebn;Ae.GetFederationTokenResponse$=xbn;Ae.GetSessionToken$=jbn;Ae.GetSessionTokenCommand=Lee;Ae.GetSessionTokenRequest$=Pbn;Ae.GetSessionTokenResponse$=$bn;Ae.GetWebIdentityToken$=zbn;Ae.GetWebIdentityTokenCommand=Mee;Ae.GetWebIdentityTokenRequest$=wbn;Ae.GetWebIdentityTokenResponse$=kbn;Ae.IDPCommunicationErrorException=hee;Ae.IDPCommunicationErrorException$=ebn;Ae.IDPRejectedClaimException=Iee;Ae.IDPRejectedClaimException$=tbn;Ae.InvalidAuthorizationMessageException=vee;Ae.InvalidAuthorizationMessageException$=nbn;Ae.InvalidIdentityTokenException=_ee;Ae.InvalidIdentityTokenException$=sbn;Ae.JWTPayloadSizeExceededException=Tee;Ae.JWTPayloadSizeExceededException$=rbn;Ae.MalformedPolicyDocumentException=Ree;Ae.MalformedPolicyDocumentException$=obn;Ae.OutboundWebIdentityFederationDisabledException=Aee;Ae.OutboundWebIdentityFederationDisabledException$=abn;Ae.PackedPolicyTooLargeException=See;Ae.PackedPolicyTooLargeException$=ibn;Ae.PolicyDescriptorType$=CAe;Ae.ProvidedContext$=Lbn;Ae.RegionDisabledException=yee;Ae.RegionDisabledException$=cbn;Ae.STS=Gee;Ae.STSClient=xC;Ae.STSServiceException=ba;Ae.STSServiceException$=YDn;Ae.SessionDurationEscalationException=Dee;Ae.SessionDurationEscalationException$=lbn;Ae.Tag$=Mbn;Ae.decorateDefaultCredentialProvider=fxo;Ae.errorTypeRegistries=ubn;Ae.getDefaultRoleAssumer=Ybn;Ae.getDefaultRoleAssumerWithWebIdentity=Xbn});var eEn=Bn(AAe=>{var{formatUrl:gxo}=(MD(),ye(Vce)),{getEndpointFromInstructions:Rxo}=($n(),ye(mR)),{HttpRequest:Sxo}=(Me(),ye(bo)),{SignatureV4MultiRegion:yxo}=$R(),Ixo="UNSIGNED-PAYLOAD",_xo="X-Amz-Content-Sha256",pL=class{signer;constructor(t){let s={service:t.signingName||t.service||"s3",uriEscapePath:t.uriEscapePath||!1,applyChecksum:t.applyChecksum||!1,...t};this.signer=new yxo(s)}presign(t,{unsignableHeaders:s=new Set,hoistableHeaders:a=new Set,unhoistableHeaders:c=new Set,...l}={}){return this.prepareRequest(t,{unsignableHeaders:s,unhoistableHeaders:c,hoistableHeaders:a}),this.signer.presign(t,{expiresIn:900,unsignableHeaders:s,unhoistableHeaders:c,...l})}presignWithCredentials(t,s,{unsignableHeaders:a=new Set,hoistableHeaders:c=new Set,unhoistableHeaders:l=new Set,...u}={}){return this.prepareRequest(t,{unsignableHeaders:a,unhoistableHeaders:l,hoistableHeaders:c}),this.signer.presignWithCredentials(t,s,{expiresIn:900,unsignableHeaders:a,unhoistableHeaders:l,...u})}prepareRequest(t,{unsignableHeaders:s=new Set,unhoistableHeaders:a=new Set,hoistableHeaders:c=new Set}={}){s.add("content-type"),Object.keys(t.headers).map(d=>d.toLowerCase()).filter(d=>d.startsWith("x-amz-server-side-encryption")).forEach(d=>{c.has(d)||a.add(d)}),t.headers[_xo]=Ixo;let l=t.headers.host,u=t.port,p=`${t.hostname}${t.port!=null?":"+u:""}`;(!l||l===t.hostname&&t.port!=null)&&(t.headers.host=p)}},hxo=async(e,t,s={})=>{let a,c;if(typeof e.config.endpointProvider=="function"){let T=(await Rxo(t.input,t.constructor,e.config)).properties?.authSchemes?.[0];T?.name==="sigv4a"?c=T?.signingRegionSet?.join(","):c=T?.signingRegion,a=new pL({...e.config,signingName:T?.signingName,region:async()=>c})}else a=new pL(e.config);let l=(v,T)=>async x=>{let{request:w}=x;if(!Sxo.isInstance(w))throw new Error("Request to be presigned is not an valid HTTP request.");delete w.headers["amz-sdk-invocation-id"],delete w.headers["amz-sdk-request"],delete w.headers["x-amz-user-agent"];let L,G={...s,signingRegion:s.signingRegion??T.signing_region??c,signingService:s.signingService??T.signing_service};return T.s3ExpressIdentity?L=await a.presignWithCredentials(w,T.s3ExpressIdentity,G):L=await a.presign(w,G),{response:{},output:{$metadata:{httpStatusCode:200},presigned:L}}},u="presignInterceptMiddleware",p=e.middlewareStack.clone();p.addRelativeTo(l,{name:u,relation:"before",toMiddleware:"awsAuthMiddleware",override:!0});let d=t.resolveMiddleware(p,e.config,{}),{output:m}=await d({input:t.input}),{presigned:S}=m;return gxo(S)};AAe.S3RequestPresigner=pL;AAe.getSignedUrl=hxo});import{Container as o$o,Key as a$o,Spacer as i$o,Text as zAe}from"@earendil-works/pi-tui";import{randomUUID as jPo}from"node:crypto";import{copyFileSync as zPo,existsSync as BEn,mkdirSync as KPo,rmSync as WPo,writeFileSync as QPo}from"node:fs";import{tmpdir as ZPo}from"node:os";import{join as tI}from"node:path";import{getSettingsListTheme as YPo}from"@earendil-works/pi-coding-agent";import{Container as XPo,Key as nI,matchesKey as sI,Spacer as JPo,Text as UEn}from"@earendil-works/pi-tui";import{createAgentSession as Cne,SessionManager as Tne}from"@earendil-works/pi-coding-agent";import{copyFileSync as _$o,existsSync as h$o,lstatSync as v$o,mkdirSync as dDe,readFileSync as C$o,rmSync as T$o,symlinkSync as A$o,unlinkSync as D$o,writeFileSync as Ste}from"node:fs";import{join as FC}from"node:path";import{createLocalBashOperations as x$o}from"@earendil-works/pi-coding-agent";import{existsSync as Kg,mkdirSync as rte,readFileSync as CL,writeFileSync as ote}from"node:fs";import{dirname as ate,join as QAe}from"node:path";import{getAgentDir as ZAe}from"@earendil-works/pi-coding-agent";var Ya=QAe(ZAe(),"checks-config.json"),hL=QAe(ZAe(),"settings.json"),YAe=10,XAe=60,ite=20,cte=1,JAe=5,lte=3,ute=!0,eDe=!1,TL=10,AL=30,rI=15,vL={small:{cpu:1,memoryMiB:2048},medium:{cpu:2,memoryMiB:4096},large:{cpu:4,memoryMiB:8192}},pte="medium",tDe="medium",nxn=1,sxn=420*1e3,rxn=120*1e3,oxn=["off","minimal","low","medium","high","xhigh","max"];function nDe(e){return e?.reasoning?oxn.filter(t=>{let s=e.thinkingLevelMap?.[t];return s===null?!1:t==="xhigh"||t==="max"?s!==void 0:!0}):["off"]}function Xo(){try{if(!Kg(Ya))return null;let e=JSON.parse(CL(Ya,"utf-8"));if(e.provider&&e.modelId&&e.thinkingLevel)return e}catch{}return null}function wi(e){let t=ate(Ya);Kg(t)||rte(t,{recursive:!0}),ote(Ya,JSON.stringify(e,null,2),"utf-8")}function dte(){let e=GC().fargate,t=e&&typeof e=="object"&&!Array.isArray(e)?e:{},s=Object.hasOwn(vL,t.resourceProfile??"")?t.resourceProfile:pte,a=Number.isFinite(t.maxRetries)?Math.min(3,Math.max(0,Math.floor(t.maxRetries))):nxn;return{...t,resourceProfile:s,adaptiveResourceProfile:t.adaptiveResourceProfile===!0,maxRetries:a}}function sDe(e,t=dte()){let a=t.projectProfiles?.[e]??axn(e,t),c=Object.hasOwn(vL,a)?a:pte;return{profile:c,...vL[c]}}function axn(e,t){return t.projectProfiles?.[e]??t.resourceProfile??pte}function WAe(e,t,s){let a=e.fargate??{};if(a.adaptiveResourceProfile!==!0)return e;let c=Object.keys(vL),l=c.indexOf(s.profile),u=(s.cpuOver95DurationMs??0)>sxn,p=typeof s.cpuOver95DurationMs=="number"&&s.cpuOver95DurationMs<rxn,d=s.profile;u&&l<c.length-1?d=c[l+1]:p&&l>0&&(d=c[l-1]);let m={...a.projectProfiles??{},[t]:d};return{...e,fargate:{...a,projectProfiles:m}}}function rDe(e,t){let s=Xo();if(s){wi(WAe(s,e,t));return}let a=GC(),c=a.fargate;if(!c||typeof c!="object"||Array.isArray(c))return;let l=WAe({provider:"patch-precheck",modelId:"patch-precheck",thinkingLevel:"off",fargate:c},e,t);if(l.fargate?.adaptiveResourceProfile!==!0)return;let u=ate(Ya);Kg(u)||rte(u,{recursive:!0}),ote(Ya,JSON.stringify({...a,fargate:l.fargate},null,2),"utf-8")}function oDe(){let e=Xo()?.solverGap;return!e?.provider||!e.modelId||!e.thinkingLevel?null:{...e,timeoutMinutes:e.timeoutMinutes>0?e.timeoutMinutes:ite,solverCount:e.solverCount>0?e.solverCount:lte,saveArtifacts:typeof e.saveArtifacts=="boolean"?e.saveArtifacts:ute}}function GC(){try{if(!Kg(Ya))return{};let e=JSON.parse(CL(Ya,"utf-8"));return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}catch{return{}}}function mte(){let e=GC().enabledProjects;return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function DL(e){let t=GC();return Array.isArray(t.enabledProjects)?t.enabledProjects.some(s=>s===e):Xo()?.enableAnalyzeTool??eDe}function bL(e,t){let s=new Set(mte());t?s.add(e):s.delete(e);let a=[...s],c=Xo();if(c){wi({...c,enabledProjects:a});return}let l=ate(Ya);Kg(l)||rte(l,{recursive:!0}),ote(Ya,JSON.stringify({...GC(),enabledProjects:a},null,2),"utf-8")}function EL(e){return e!==void 0?DL(e):Xo()?.enableAnalyzeTool??eDe}function aDe(){let e=Xo()?.analyzeGap;if(!e?.provider||!e.modelId||!e.thinkingLevel)return null;let t=Number.isFinite(e.timeoutMinutes)?Math.min(AL,Math.max(TL,e.timeoutMinutes)):rI;return{...e,timeoutMinutes:t}}function iDe(){try{return Kg(hL)?JSON.parse(CL(hL,"utf-8")).enabledModels??[]:[]}catch{return[]}}function cDe(e){let t=e.indexOf("/");return t<=0||t===e.length-1?null:{provider:e.slice(0,t),modelId:e.slice(t+1)}}function ixn(){try{if(Kg(hL))return JSON.parse(CL(hL,"utf-8"))}catch{}return{}}function OC(){let e=ixn().shellPath;return e||(process.platform==="win32"?"C:\\Program Files\\Git\\bin\\bash.exe":"bash")}import{existsSync as lDe,readFileSync as cxn}from"node:fs";import{join as Rte}from"node:path";function NC(e){return e.replace(/\\/g,"/")}function VC(e){return`'${e.replace(/'/g,"'\\''")}'`}var lxn=/(?:\.patch|\.md|\.sh)$/i,uxn=/(?:^|\/)dockerfile(?:$|\.)/i;function fte(e){return e.trim().replace(/\\/g,"/")}function gte(e){return e.length>0&&!lxn.test(e)&&!uxn.test(e)}async function uDe(e,t,s){if(s?.aborted)return[];let a=await e.exec("git",["diff","--name-only","HEAD","--"],{cwd:t,timeout:15e3,signal:s}),c=await e.exec("git",["ls-files","--others","--exclude-standard"],{cwd:t,timeout:15e3,signal:s}),l=[...a.code===0?a.stdout.split(/\r?\n/):[],...c.code===0?c.stdout.split(/\r?\n/):[]].map(fte).filter(gte).filter(u=>lDe(Rte(t,u)));return[...new Set(l)]}async function pDe(e,t,s,a){let c=[...new Set(s.map(fte).filter(gte))].filter(m=>lDe(Rte(t,m)));if(a?.aborted||c.length===0)return"";let l=await e.exec("git",["diff","HEAD","--no-ext-diff","--no-color","--unified=20","--",...c],{cwd:t,timeout:3e4,signal:a});if(a?.aborted)return"";let u=await e.exec("git",["ls-files","--others","--exclude-standard","--",...c],{cwd:t,timeout:15e3,signal:a});if(a?.aborted)return"";let d=[...u.code===0?new Set(u.stdout.split(/\r?\n/).map(fte).filter(gte)):new Set].map(m=>pxn(t,m)).filter(m=>m!==null);return[l.code===0?l.stdout.trimEnd():"",...d].filter(m=>m.length>0).join(`
|
|
69
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return s}constructor(t){this.configProvider=new Promise((s,a)=>{typeof t=="function"?t().then(c=>{s(this.resolveDefaultConfig(c))}).catch(a):s(this.resolveDefaultConfig(t))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(t,{abortSignal:s,requestTimeout:a}={}){this.config||(this.config=await this.configProvider);let c=this.config,l=c.logger,u=t.protocol==="https:";return!u&&!this.config.httpAgent&&(this.config.httpAgent=await this.config.httpAgentProvider()),new Promise((p,d)=>{let m,S=-1,v=-1,T=-1,x=-1,w=-1,L=()=>{Qo.clearTimeout(S),Qo.clearTimeout(v),Qo.clearTimeout(T),Qo.clearTimeout(x),Qo.clearTimeout(w)},G=async M=>{await m,L(),p(M)},O=async M=>{await m,L(),d(M)};if(s?.aborted){let M=mee(s);O(M);return}let U=t.headers,J=U?(U.Expect??U.expect)==="100-continue":!1,ce=u?c.httpsAgent:c.httpAgent;J&&!this.externalAgent&&(ce=new(u?pee.Agent:dee)({keepAlive:!1,maxSockets:1/0})),S=Qo.setTimeout(()=>{this.socketWarningTimestamp=e.checkSocketUsage(ce,this.socketWarningTimestamp,l)},c.socketAcquisitionWarningTimeout??(c.requestTimeout??2e3)+(c.connectionTimeout??1e3));let ke=t.query?RDn(t.query):"",Ee;if(t.username!=null||t.password!=null){let M=t.username??"",se=t.password??"";Ee=`${M}:${se}`}let _e=t.path;ke&&(_e+=`?${ke}`),t.fragment&&(_e+=`#${t.fragment}`);let Ce=t.hostname??"";Ce[0]==="["&&Ce.endsWith("]")?Ce=t.hostname.slice(1,-1):Ce=t.hostname;let Ne={headers:t.headers,host:Ce,method:t.method,path:_e,port:t.port,agent:ce,auth:Ee},Se=(u?pee.request:fDn)(Ne,M=>{let se=new SDn({statusCode:M.statusCode||-1,reason:M.statusMessage,headers:yDn(M.headers),body:M});G({response:se})});if(Se.on("error",M=>{jAo.includes(M.code)?O(Object.assign(M,{name:"TimeoutError"})):O(M)}),s){let M=()=>{Se.destroy();let se=mee(s);O(se)};if(typeof s.addEventListener=="function"){let se=s;se.addEventListener("abort",M,{once:!0}),Se.once("close",()=>se.removeEventListener("abort",M))}else s.onabort=M}let He=a??c.requestTimeout;v=zAo(Se,O,c.connectionTimeout),T=KAo(Se,O,He,c.throwOnRequestTimeout,l??console),x=ZAo(Se,O,c.socketTimeout);let oe=Ne.agent;typeof oe=="object"&&"keepAlive"in oe&&(w=QAo(Se,{keepAlive:oe.keepAlive,keepAliveMsecs:oe.keepAliveMsecs})),m=IDn(Se,t,He,this.externalAgent).catch(M=>(L(),d(M)))})}updateHttpClientConfig(t,s){this.config=void 0,this.configProvider=this.configProvider.then(a=>t===Symbol.for("logger")?{...a,logger:a.logger??s}:{...a,[t]:s})}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(t){let{requestTimeout:s,connectionTimeout:a,socketTimeout:c,socketAcquisitionWarningTimeout:l,httpAgent:u,httpsAgent:p,throwOnRequestTimeout:d,logger:m}=t||{},S=!0,v=50;return{connectionTimeout:a,requestTimeout:s,socketTimeout:c,socketAcquisitionWarningTimeout:l,throwOnRequestTimeout:d,httpAgentProvider:async()=>{let T=en("node:http"),{Agent:x,request:w}=T.default??T;return fDn=w,dee=x,u instanceof dee||typeof u?.destroy=="function"?(this.externalAgent=!0,u):new dee({keepAlive:S,maxSockets:v,...u})},httpsAgent:p instanceof pee.Agent||typeof p?.destroy=="function"?(this.externalAgent=!0,p):new pee.Agent({keepAlive:S,maxSockets:v,...p}),logger:m}}},JAo=new Uint16Array(1),sL=class{id=JAo[0]++;total=0;max=0;session;refs=0;constructor(t){t.unref(),this.session=t}retain(){if(this.session.destroyed)throw new Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");this.refs+=1,this.total+=1,this.max=Math.max(this.refs,this.max),this.session.ref()}free(){if(!this.session.destroyed&&(this.refs-=1,this.refs===0&&this.session.unref(),this.refs<0))throw new Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.")}deref(){return this.session}close(){this.session.closed||this.session.close()}destroy(){this.refs=0,this.session.destroyed||this.session.destroy()}useCount(){return this.refs}},dAe=class{sessions=[];maxConcurrency=0;constructor(t){this.sessions=(t??[]).map(s=>new sL(s))}poll(){let t=!1;for(let s of this.sessions){if(s.deref().destroyed){t=!0;continue}if(!this.maxConcurrency||s.useCount()<this.maxConcurrency)return s}if(t)for(let s of this.sessions)s.deref().destroyed&&this.remove(s)}offerLast(t){this.sessions.push(t)}remove(t){let s=this.sessions.indexOf(t);s>-1&&this.sessions.splice(s,1)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}setMaxConcurrency(t){this.maxConcurrency=t}destroy(t){this.remove(t),t.destroy()}},mAe=class{config;connectOptions;connectionPools=new Map;constructor(t){if(this.config=t,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(t,s){let a=this.getUrlString(t),c=this.getPool(a);if(!this.config.disableConcurrency&&!s.isEventStream){let m=c.poll();if(m)return m.retain(),m}let l=new sL(this.connect(a)),u=l.deref();this.config.maxConcurrency&&u.settings({maxConcurrentStreams:this.config.maxConcurrency},m=>{if(m)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+t.destination.toString())});let p=()=>{this.removeFromPoolAndClose(a,l)},d=()=>{this.removeFromPoolAndCheckedDestroy(a,l)};return u.on("goaway",p),u.on("error",d),u.on("frameError",d),u.on("close",d),s.requestTimeout&&u.setTimeout(s.requestTimeout,d),c.offerLast(l),l.retain(),l}release(t,s){s.free()}createIsolatedSession(t,s){let a=this.getUrlString(t),c=new sL(this.connect(a)),l=c.deref();l.settings({maxConcurrentStreams:1});let u=()=>{c.destroy()};return l.on("error",u),l.on("frameError",u),l.on("close",u),s.requestTimeout&&l.setTimeout(s.requestTimeout,u),c.retain(),c}destroy(){for(let[t,s]of this.connectionPools){for(let a of[...s])a.destroy();this.connectionPools.delete(t)}}setMaxConcurrentStreams(t){if(t&&t<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=t;for(let s of this.connectionPools.values())s.setMaxConcurrency(t)}setDisableConcurrentStreams(t){this.config.disableConcurrency=t}setNodeHttp2ConnectOptions(t){this.connectOptions=t}debug(){let t={};for(let[s,a]of this.connectionPools){let c=[];for(let l of a)c.push({id:l.id,active:l.useCount(),maxConcurrent:l.max,totalRequests:l.total});t[s]={sessions:c}}return t}removeFromPoolAndClose(t,s){this.connectionPools.get(t)?.remove(s),s.close()}removeFromPoolAndCheckedDestroy(t,s){this.connectionPools.get(t)?.remove(s),s.destroy()}getPool(t){if(!this.connectionPools.has(t)){let s=new dAe;this.config.maxConcurrency&&s.setMaxConcurrency(this.config.maxConcurrency),this.connectionPools.set(t,s)}return this.connectionPools.get(t)}getUrlString(t){return t.destination.toString()}connect(t){return this.connectOptions===void 0?uAe.connect(t):uAe.connect(t,this.connectOptions)}},{constants:gDn}=uAe,fAe=class e{config;configProvider;metadata={handlerProtocol:"h2"};connectionManager=new mAe({});static create(t){return typeof t?.handle=="function"?t:new e(t)}constructor(t){this.configProvider=new Promise((s,a)=>{typeof t=="function"?t().then(c=>{s(c||{})}).catch(a):s(t||{})})}destroy(){this.connectionManager.destroy()}async handle(t,{abortSignal:s,requestTimeout:a,isEventStream:c}={}){if(!this.config){this.config=await this.configProvider;let{disableConcurrentStreams:m,maxConcurrentStreams:S,nodeHttp2ConnectOptions:v}=this.config;this.connectionManager.setDisableConcurrentStreams(m??!1),S&&this.connectionManager.setMaxConcurrentStreams(S),v&&this.connectionManager.setNodeHttp2ConnectOptions(v)}let{requestTimeout:l,disableConcurrentStreams:u}=this.config,p=u||c,d=a??l;return new Promise((m,S)=>{let v=!1,T,x=async M=>{await T,m(M)},w=async M=>{await T,S(M)};if(s?.aborted){v=!0;let M=mee(s);w(M);return}let{hostname:L,method:G,port:O,protocol:U,query:J}=t,ce="";if(t.username!=null||t.password!=null){let M=t.username??"",se=t.password??"";ce=`${M}:${se}@`}let ke=`${U}//${ce}${L}${O?`:${O}`:""}`,Ee={destination:new URL(ke)},_e={requestTimeout:this.config?.sessionTimeout,isEventStream:c},Ce=p?this.connectionManager.createIsolatedSession(Ee,_e):this.connectionManager.lease(Ee,_e),Ne=Ce.deref(),Ve=M=>{p&&Ce.destroy(),v=!0,w(M)},Se=J?RDn(J):"",He=t.path;Se&&(He+=`?${Se}`),t.fragment&&(He+=`#${t.fragment}`);let oe=Ne.request({...t.headers,[gDn.HTTP2_HEADER_PATH]:He,[gDn.HTTP2_HEADER_METHOD]:G});if(d&&oe.setTimeout(d,()=>{oe.close();let M=new Error(`Stream timed out because of no activity for ${d} ms`);M.name="TimeoutError",Ve(M)}),s){let M=()=>{oe.close();let se=mee(s);Ve(se)};if(typeof s.addEventListener=="function"){let se=s;se.addEventListener("abort",M,{once:!0}),oe.once("close",()=>se.removeEventListener("abort",M))}else s.onabort=M}oe.on("frameError",(M,se,Xn)=>{Ve(new Error(`Frame type id ${M} in stream id ${Xn} has failed with code ${se}.`))}),oe.on("error",Ve),oe.on("aborted",()=>{Ve(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${oe.rstCode}.`))}),oe.on("response",M=>{let se=new SDn({statusCode:M[":status"]??-1,headers:yDn(M),body:oe});v=!0,x({response:se}),p&&Ne.close()}),oe.on("close",()=>{p?Ce.destroy():this.connectionManager.release(Ee,Ce),v||Ve(new Error("Unexpected error: http2 request did not get a response"))}),T=IDn(oe,t,d)})}updateHttpClientConfig(t,s){this.config=void 0,this.configProvider=this.configProvider.then(a=>({...a,[t]:s}))}httpHandlerConfigs(){return this.config??{}}};rL.DEFAULT_REQUEST_TIMEOUT=XAo;rL.NodeHttp2Handler=fAe;rL.NodeHttpHandler=pAe});var Jbn=Bn(Ae=>{var{awsEndpointFunctions:eDo,emitWarningIfUnsupportedVersion:tDo,createDefaultUserAgentProvider:nDo,NODE_APP_ID_CONFIG_OPTIONS:sDo,getAwsRegionExtensionConfiguration:rDo,resolveAwsRegionExtensionConfiguration:oDo,resolveUserAgentConfig:aDo,resolveHostHeaderConfig:iDo,getUserAgentPlugin:cDo,getHostHeaderPlugin:lDo,getLoggerPlugin:uDo,getRecursionDetectionPlugin:pDo,setCredentialFeature:SAe,stsRegionDefaultResolver:dDo}=(sn(),ye(Wi)),{NoAuthSigner:PDn,getHttpAuthSchemeEndpointRuleSetPlugin:mDo,DefaultIdentityProviderConfig:fDo,getHttpSigningPlugin:gDo}=(Hr(),ye(SA)),{normalizeProvider:$Dn,getSmithyContext:wDn,ServiceException:RDo,NoOpLogger:SDo,emitWarningIfUnsupportedVersion:yDo,loadConfigsForDefaultMode:IDo,getDefaultExtensionConfiguration:_Do,resolveDefaultRuntimeConfig:hDo,Client:kDn,makeBuilder:vDo,createAggregatedClient:CDo}=(nt(),ye(Ou)),{Command:TDo}=(nt(),ye(Ou));Ae.$Command=TDo;Ae.__Client=kDn;var{resolveDefaultsModeConfig:ADo,loadConfig:Ug,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:DDo,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:bDo,NODE_REGION_CONFIG_OPTIONS:EDo,NODE_REGION_CONFIG_FILE_OPTIONS:xDo,resolveRegionConfig:PDo}=(tn(),ye(wa)),{BinaryDecisionDiagram:$Do,EndpointCache:wDo,decideEndpoint:kDo,customEndpointFunctions:LDo,resolveParams:MDo,resolveEndpointConfig:GDo,getEndpointPlugin:ODo}=($n(),ye(mR)),{parseUrl:NDo,getHttpHandlerExtensionConfiguration:VDo,resolveHttpHandlerRuntimeConfig:qDo,getContentLengthPlugin:FDo}=(Me(),ye(bo)),{DEFAULT_RETRY_MODE:BDo,NODE_RETRY_MODE_CONFIG_OPTIONS:UDo,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:HDo,resolveRetryConfig:jDo,getRetryPlugin:zDo}=(ka(),ye(dA)),{TypeRegistry:LDn,getSchemaSerdePlugin:KDo}=(Mt(),ye(FT)),{resolveAwsSdkSigV4Config:WDo,resolveAwsSdkSigV4AConfig:QDo,AwsSdkSigV4Signer:MDn,AwsSdkSigV4ASigner:GDn,NODE_SIGV4A_CONFIG_OPTIONS:ZDo,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:YDo}=(zr(),ye(S_)),{SignatureV4MultiRegion:ODn}=$R(),{defaultProvider:hDn}=H_(),{toUtf8:XDo,fromUtf8:JDo,toBase64:ebo,fromBase64:tbo,calculateBodyLength:nbo}=(We(),ye(ji)),{streamCollector:sbo,NodeHttpHandler:rbo}=_Dn(),{AwsQueryProtocol:obo}=(bd(),ye(HN)),{Sha256:abo}=(zi(),ye(sA)),EC="ref",Qy=-1,oL=!0,vDn="isSet",NDn="PartitionResult",aL="booleanEquals",Zo="stringEquals",gAe="getAttr",CDn="us-east-1",TDn="sigv4",ADn="sts",DDn="https://sts.{Region}.{PartitionResult#dnsSuffix}",bDn={[EC]:"Endpoint"},Yo={[EC]:"Region"},RAe={[EC]:NDn},bC={},EDn=[Yo],xDn={conditions:[[vDn,[bDn]],[vDn,EDn],["aws.partition",EDn,NDn],[aL,[{[EC]:"UseFIPS"},oL]],[aL,[{[EC]:"UseDualStack"},oL]],[Zo,[Yo,"aws-global"]],[aL,[{[EC]:"UseGlobalEndpoint"},oL]],[Zo,[Yo,"eu-central-1"]],[aL,[{fn:gAe,argv:[RAe,"supportsDualStack"]},oL]],[aL,[{fn:gAe,argv:[RAe,"supportsFIPS"]},oL]],[Zo,[Yo,"ap-south-1"]],[Zo,[Yo,"eu-north-1"]],[Zo,[Yo,"eu-west-1"]],[Zo,[Yo,"eu-west-2"]],[Zo,[Yo,"eu-west-3"]],[Zo,[Yo,"sa-east-1"]],[Zo,[Yo,CDn]],[Zo,[Yo,"us-east-2"]],[Zo,[Yo,"us-west-2"]],[Zo,[Yo,"us-west-1"]],[Zo,[Yo,"ca-central-1"]],[Zo,[Yo,"ap-southeast-1"]],[Zo,[Yo,"ap-northeast-1"]],[Zo,[Yo,"ap-southeast-2"]],[Zo,[{fn:gAe,argv:[RAe,"name"]},"aws-us-gov"]]],results:[[Qy],["https://sts.amazonaws.com",{authSchemes:[{name:TDn,signingName:ADn,signingRegion:CDn}]}],[DDn,{authSchemes:[{name:TDn,signingName:ADn,signingRegion:"{Region}"}]}],[Qy,"Invalid Configuration: FIPS and custom endpoint are not supported"],[Qy,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[bDn,bC],["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",bC],[Qy,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://sts.{Region}.amazonaws.com",bC],["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",bC],[Qy,"FIPS is enabled but this partition does not support FIPS"],["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",bC],[Qy,"DualStack is enabled but this partition does not support DualStack"],[DDn,bC],[Qy,"Invalid Configuration: Missing Region"]]},ibo=2,xn=1e8,cbo=new Int32Array([-1,1,-1,0,30,3,1,4,xn+14,2,5,xn+14,3,25,6,4,24,7,5,xn+1,8,6,9,xn+13,7,xn+1,10,10,xn+1,11,11,xn+1,12,12,xn+1,13,13,xn+1,14,14,xn+1,15,15,xn+1,16,16,xn+1,17,17,xn+1,18,18,xn+1,19,19,xn+1,20,20,xn+1,21,21,xn+1,22,22,xn+1,23,23,xn+1,xn+2,8,xn+11,xn+12,4,28,26,9,27,xn+10,24,xn+8,xn+9,8,29,xn+7,9,xn+6,xn+7,3,xn+3,31,4,xn+4,xn+5]),lbo=$Do.from(cbo,ibo,xDn.conditions,xDn.results),ubo=new wDo({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),VDn=(e,t={})=>ubo.get(e,()=>kDo(lbo,{endpointParams:e,logger:t.logger}));LDo.aws=eDo;var pbo=e=>async(t,s,a)=>{if(!a)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let c=await e(t,s,a),l=wDn(s)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!l)throw new Error(`getEndpointParameterInstructions() is not defined on '${s.commandName}'`);let u=await MDo(a,{getEndpointParameterInstructions:l},t);return Object.assign(c,u)},dbo=async(e,t,s)=>({operation:wDn(t).operation,region:await $Dn(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),mbo=pbo(dbo);function qDn(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}function fee(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}function yAe(e){return{schemeId:"smithy.api#noAuth"}}var fbo=(e,t,s)=>c=>{let u=e(c).properties?.authSchemes;if(!u)return t(c);let p=[];for(let d of u){let{name:m,properties:S={},...v}=d,T=m.toLowerCase();m!==T&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${m}' to '${T}'`);let x;if(T==="sigv4a"){x="aws.auth#sigv4a";let G=u.find(O=>{let U=O.name.toLowerCase();return U!=="sigv4a"&&U.startsWith("sigv4")});if(ODn.sigv4aDependency()==="none"&&G)continue}else if(T.startsWith("sigv4"))x="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${T}'`);let w=s[x];if(!w)throw new Error(`Could not find HttpAuthOption create function for '${x}'`);let L=w(c);L.schemeId=x,L.signingProperties={...L.signingProperties||{},...v,...S},p.push(L)}return p},gbo=e=>{let t=[];switch(e.operation){case"AssumeRoleWithSAML":{t.push(yAe()),t.push(fee(e));break}case"AssumeRoleWithWebIdentity":{t.push(yAe()),t.push(fee(e));break}default:t.push(qDn(e)),t.push(fee(e))}return t},Rbo=fbo(VDn,gbo,{"aws.auth#sigv4":qDn,"aws.auth#sigv4a":fee,"smithy.api#noAuth":yAe}),Sbo=e=>{let t=WDo(e),s=QDo(t);return Object.assign(s,{authSchemePreference:$Dn(e.authSchemePreference??[])})},ybo=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),Ibo={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},_bo="3.1103.0",hbo={version:_bo},ba=class e extends RDo{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}},gee=class e extends ba{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Ree=class e extends ba{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},See=class e extends ba{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},yee=class e extends ba{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Iee=class e extends ba{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},_ee=class e extends ba{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},hee=class e extends ba{name="IDPCommunicationErrorException";$fault="client";$retryable={};constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},vee=class e extends ba{name="InvalidAuthorizationMessageException";$fault="client";constructor(t){super({name:"InvalidAuthorizationMessageException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Cee=class e extends ba{name="ExpiredTradeInTokenException";$fault="client";constructor(t){super({name:"ExpiredTradeInTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Tee=class e extends ba{name="JWTPayloadSizeExceededException";$fault="client";constructor(t){super({name:"JWTPayloadSizeExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Aee=class e extends ba{name="OutboundWebIdentityFederationDisabledException";$fault="client";constructor(t){super({name:"OutboundWebIdentityFederationDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Dee=class e extends ba{name="SessionDurationEscalationException";$fault="client";constructor(t){super({name:"SessionDurationEscalationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},IAe="Arn",FDn="AccessKeyId",vbo="AssumedPrincipal",Cbo="AssumeRole",Tbo="AssumedRoleId",Abo="AssumeRoleRequest",Dbo="AssumeRoleResponse",bbo="AssumeRootRequest",Ebo="AssumeRootResponse",Oee="AssumedRoleUser",xbo="AssumeRoleWithSAML",Pbo="AssumeRoleWithSAMLRequest",$bo="AssumeRoleWithSAMLResponse",wbo="AssumeRoleWithWebIdentity",kbo="AssumeRoleWithWebIdentityRequest",Lbo="AssumeRoleWithWebIdentityResponse",Mbo="AssumeRoot",BDn="Account",_Ae="Audience",Hg="Credentials",Gbo="ContextAssertion",Obo="DecodeAuthorizationMessage",Nbo="DecodeAuthorizationMessageRequest",Vbo="DecodeAuthorizationMessageResponse",qbo="DecodedMessage",Zy="DurationSeconds",UDn="Expiration",Fbo="ExternalId",Bbo="EncodedMessage",Ubo="ExpiredTokenException",Hbo="ExpiredTradeInTokenException",HDn="FederatedUser",jbo="FederatedUserId",zbo="GetAccessKeyInfo",Kbo="GetAccessKeyInfoRequest",Wbo="GetAccessKeyInfoResponse",Qbo="GetCallerIdentity",Zbo="GetCallerIdentityRequest",Ybo="GetCallerIdentityResponse",Xbo="GetDelegatedAccessToken",Jbo="GetDelegatedAccessTokenRequest",eEo="GetDelegatedAccessTokenResponse",tEo="GetFederationToken",nEo="GetFederationTokenRequest",sEo="GetFederationTokenResponse",rEo="GetSessionToken",oEo="GetSessionTokenRequest",aEo="GetSessionTokenResponse",iEo="GetWebIdentityToken",cEo="GetWebIdentityTokenRequest",lEo="GetWebIdentityTokenResponse",uEo="Issuer",pEo="InvalidAuthorizationMessageException",dEo="IDPCommunicationErrorException",mEo="IDPRejectedClaimException",fEo="InvalidIdentityTokenException",gEo="JWTPayloadSizeExceededException",REo="Key",SEo="MalformedPolicyDocumentException",yEo="Name",IEo="NameQualifier",_Eo="OutboundWebIdentityFederationDisabledException",Nee="Policy",Vee="PolicyArns",hEo="PrincipalArn",vEo="ProviderArn",CEo="ProvidedContexts",TEo="ProvidedContextsListType",AEo="ProvidedContext",DEo="PolicyDescriptorType",bEo="ProviderId",lL="PackedPolicySize",EEo="PackedPolicyTooLargeException",xEo="Provider",hAe="RoleArn",PEo="RegionDisabledException",jDn="RoleSessionName",$Eo="Subject",wEo="SigningAlgorithm",kEo="SecretAccessKey",LEo="SAMLAssertion",MEo="SAMLAssertionType",GEo="SessionDurationEscalationException",OEo="SubjectFromWebIdentityToken",uL="SourceIdentity",zDn="SerialNumber",NEo="SubjectType",VEo="SessionToken",vAe="Tags",KDn="TokenCode",qEo="TradeInToken",FEo="TargetPrincipal",BEo="TaskPolicyArn",UEo="TransitiveTagKeys",HEo="Tag",jEo="UserId",zEo="Value",WDn="WebIdentityToken",KEo="arn",WEo="accessKeySecretType",el="awsQueryError",tl="client",QEo="clientTokenType",nl="error",sl="httpError",rl="message",ZEo="policyDescriptorListType",QDn="smithy.ts.sdk.synthetic.com.amazonaws.sts",YEo="tradeInTokenType",XEo="tagListType",JEo="webIdentityTokenType",Je="com.amazonaws.sts",ZDn=LDn.for(QDn),YDn=[-3,QDn,"STSServiceException",0,[],[]];ZDn.registerError(YDn,ba);var mc=LDn.for(Je),XDn=[-3,Je,Ubo,{[el]:["ExpiredTokenException",400],[nl]:tl,[sl]:400},[rl],[0]];mc.registerError(XDn,gee);var JDn=[-3,Je,Hbo,{[el]:["ExpiredTradeInTokenException",400],[nl]:tl,[sl]:400},[rl],[0]];mc.registerError(JDn,Cee);var ebn=[-3,Je,dEo,{[el]:["IDPCommunicationError",400],[nl]:tl,[sl]:400},[rl],[0]];mc.registerError(ebn,hee);var tbn=[-3,Je,mEo,{[el]:["IDPRejectedClaim",403],[nl]:tl,[sl]:403},[rl],[0]];mc.registerError(tbn,Iee);var nbn=[-3,Je,pEo,{[el]:["InvalidAuthorizationMessageException",400],[nl]:tl,[sl]:400},[rl],[0]];mc.registerError(nbn,vee);var sbn=[-3,Je,fEo,{[el]:["InvalidIdentityToken",400],[nl]:tl,[sl]:400},[rl],[0]];mc.registerError(sbn,_ee);var rbn=[-3,Je,gEo,{[el]:["JWTPayloadSizeExceededException",400],[nl]:tl,[sl]:400},[rl],[0]];mc.registerError(rbn,Tee);var obn=[-3,Je,SEo,{[el]:["MalformedPolicyDocument",400],[nl]:tl,[sl]:400},[rl],[0]];mc.registerError(obn,Ree);var abn=[-3,Je,_Eo,{[el]:["OutboundWebIdentityFederationDisabledException",403],[nl]:tl,[sl]:403},[rl],[0]];mc.registerError(abn,Aee);var ibn=[-3,Je,EEo,{[el]:["PackedPolicyTooLarge",400],[nl]:tl,[sl]:400},[rl],[0]];mc.registerError(ibn,See);var cbn=[-3,Je,PEo,{[el]:["RegionDisabledException",403],[nl]:tl,[sl]:403},[rl],[0]];mc.registerError(cbn,yee);var lbn=[-3,Je,GEo,{[el]:["SessionDurationEscalationException",403],[nl]:tl,[sl]:403},[rl],[0]];mc.registerError(lbn,Dee);var ubn=[ZDn,mc],exo=[0,Je,WEo,8,0],txo=[0,Je,QEo,8,0],nxo=[0,Je,MEo,8,0],sxo=[0,Je,YEo,8,0],rxo=[0,Je,JEo,8,0],qee=[3,Je,Oee,0,[Tbo,IAe],[0,0],2],pbn=[3,Je,Abo,0,[hAe,jDn,Vee,Nee,Zy,vAe,UEo,Fbo,zDn,KDn,uL,CEo],[0,0,()=>Fee,0,1,()=>TAe,64,0,0,0,0,()=>oxo],2],dbn=[3,Je,Dbo,0,[Hg,Oee,lL,uL],[[()=>jg,0],()=>qee,1,0]],mbn=[3,Je,Pbo,0,[hAe,hEo,LEo,Vee,Nee,Zy],[0,0,[()=>nxo,0],()=>Fee,0,1],3],fbn=[3,Je,$bo,0,[Hg,Oee,lL,$Eo,NEo,uEo,_Ae,IEo,uL],[[()=>jg,0],()=>qee,1,0,0,0,0,0,0]],gbn=[3,Je,kbo,0,[hAe,jDn,WDn,bEo,Vee,Nee,Zy],[0,0,[()=>txo,0],0,()=>Fee,0,1],3],Rbn=[3,Je,Lbo,0,[Hg,OEo,Oee,lL,xEo,_Ae,uL],[[()=>jg,0],0,()=>qee,1,0,0,0]],Sbn=[3,Je,bbo,0,[FEo,BEo,Zy],[0,()=>CAe,1],2],ybn=[3,Je,Ebo,0,[Hg,uL],[[()=>jg,0],0]],jg=[3,Je,Hg,0,[FDn,kEo,VEo,UDn],[0,[()=>exo,0],0,4],4],Ibn=[3,Je,Nbo,0,[Bbo],[0],1],_bn=[3,Je,Vbo,0,[qbo],[0]],hbn=[3,Je,HDn,0,[jbo,IAe],[0,0],2],vbn=[3,Je,Kbo,0,[FDn],[0],1],Cbn=[3,Je,Wbo,0,[BDn],[0]],Tbn=[3,Je,Zbo,0,[],[]],Abn=[3,Je,Ybo,0,[jEo,BDn,IAe],[0,0,0]],Dbn=[3,Je,Jbo,0,[qEo],[[()=>sxo,0]],1],bbn=[3,Je,eEo,0,[Hg,lL,vbo],[[()=>jg,0],1,0]],Ebn=[3,Je,nEo,0,[yEo,Nee,Vee,Zy,vAe],[0,0,()=>Fee,1,()=>TAe],1],xbn=[3,Je,sEo,0,[Hg,HDn,lL],[[()=>jg,0],()=>hbn,1]],Pbn=[3,Je,oEo,0,[Zy,zDn,KDn],[1,0,0]],$bn=[3,Je,aEo,0,[Hg],[[()=>jg,0]]],wbn=[3,Je,cEo,0,[_Ae,wEo,Zy,vAe],[64,0,1,()=>TAe],2],kbn=[3,Je,lEo,0,[WDn,UDn],[[()=>rxo,0],4]],CAe=[3,Je,DEo,0,[KEo],[0]],Lbn=[3,Je,AEo,0,[vEo,Gbo],[0,0]],Mbn=[3,Je,HEo,0,[REo,zEo],[0,0],2],Fee=[1,Je,ZEo,0,()=>CAe],oxo=[1,Je,TEo,0,()=>Lbn],TAe=[1,Je,XEo,0,()=>Mbn],Gbn=[9,Je,Cbo,0,()=>pbn,()=>dbn],Obn=[9,Je,xbo,0,()=>mbn,()=>fbn],Nbn=[9,Je,wbo,0,()=>gbn,()=>Rbn],Vbn=[9,Je,Mbo,0,()=>Sbn,()=>ybn],qbn=[9,Je,Obo,0,()=>Ibn,()=>_bn],Fbn=[9,Je,zbo,0,()=>vbn,()=>Cbn],Bbn=[9,Je,Qbo,0,()=>Tbn,()=>Abn],Ubn=[9,Je,Xbo,0,()=>Dbn,()=>bbn],Hbn=[9,Je,tEo,0,()=>Ebn,()=>xbn],jbn=[9,Je,rEo,0,()=>Pbn,()=>$bn],zbn=[9,Je,iEo,0,()=>wbn,()=>kbn],axo=e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??tbo,base64Encoder:e?.base64Encoder??ebo,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??VDn,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Rbo,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new MDn},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new GDn},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new PDn}],logger:e?.logger??new SDo,protocol:e?.protocol??obo,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:ubn,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",sha256:e?.sha256??abo,signerConstructor:e?.signerConstructor??ODn,urlParser:e?.urlParser??NDo,utf8Decoder:e?.utf8Decoder??JDo,utf8Encoder:e?.utf8Encoder??XDo}),ixo=e=>{yDo(process.version);let t=ADo(e),s=()=>t().then(IDo),a=axo(e);tDo(process.version);let c={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??Ug(YDo,c),bodyLengthChecker:e?.bodyLengthChecker??nbo,credentialDefaultProvider:e?.credentialDefaultProvider??hDn,defaultUserAgentProvider:e?.defaultUserAgentProvider??nDo({serviceId:a.serviceId,clientVersion:hbo.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:l=>l.getIdentityProvider("aws.auth#sigv4")||(async u=>await hDn(u?.__config||{})()),signer:new MDn},{schemeId:"aws.auth#sigv4a",identityProvider:l=>l.getIdentityProvider("aws.auth#sigv4a"),signer:new GDn},{schemeId:"smithy.api#noAuth",identityProvider:l=>l.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new PDn}],maxAttempts:e?.maxAttempts??Ug(HDo,e),region:e?.region??Ug(EDo,{...xDo,...c}),requestHandler:rbo.create(e?.requestHandler??s),retryMode:e?.retryMode??Ug({...UDo,default:async()=>(await s()).retryMode||BDo},e),sigv4aSigningRegionSet:e?.sigv4aSigningRegionSet??Ug(ZDo,c),streamCollector:e?.streamCollector??sbo,useDualstackEndpoint:e?.useDualstackEndpoint??Ug(bDo,c),useFipsEndpoint:e?.useFipsEndpoint??Ug(DDo,c),userAgentAppId:e?.userAgentAppId??Ug(sDo,c)}},cxo=e=>{let t=e.httpAuthSchemes,s=e.httpAuthSchemeProvider,a=e.credentials;return{setHttpAuthScheme(c){let l=t.findIndex(u=>u.schemeId===c.schemeId);l===-1?t.push(c):t.splice(l,1,c)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(c){s=c},httpAuthSchemeProvider(){return s},setCredentials(c){a=c},credentials(){return a}}},lxo=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),uxo=(e,t)=>{let s=Object.assign(rDo(e),_Do(e),VDo(e),cxo(e));return t.forEach(a=>a.configure(s)),Object.assign(e,oDo(s),hDo(s),qDo(s),lxo(s))},xC=class extends kDn{config;constructor(...[t]){let s=ixo(t||{});super(s),this.initConfig=s;let a=ybo(s),c=aDo(a),l=jDo(c),u=PDo(l),p=iDo(u),d=GDo(p),m=Sbo(d),S=uxo(m,t?.extensions||[]);this.config=S,this.middlewareStack.use(KDo(this.config)),this.middlewareStack.use(cDo(this.config)),this.middlewareStack.use(zDo(this.config)),this.middlewareStack.use(FDo(this.config)),this.middlewareStack.use(lDo(this.config)),this.middlewareStack.use(uDo(this.config)),this.middlewareStack.use(pDo(this.config)),this.middlewareStack.use(mDo(this.config,{httpAuthSchemeParametersProvider:mbo,identityProviderConfigProvider:async v=>new fDo({"aws.auth#sigv4":v.credentials,"aws.auth#sigv4a":v.credentials})})),this.middlewareStack.use(gDo(this.config))}destroy(){super.destroy()}},fu=vDo(Ibo,"AWSSecurityTokenServiceV20110615","STSClient",ODo),gu={},Ru=(e,t,s,a)=>[],iL=class extends fu(gu,Ru,"AssumeRole",Gbn){},bee=class extends fu(gu,Ru,"AssumeRoleWithSAML",Obn){},cL=class extends fu(gu,Ru,"AssumeRoleWithWebIdentity",Nbn){},Eee=class extends fu(gu,Ru,"AssumeRoot",Vbn){},xee=class extends fu(gu,Ru,"DecodeAuthorizationMessage",qbn){},Pee=class extends fu(gu,Ru,"GetAccessKeyInfo",Fbn){},$ee=class extends fu(gu,Ru,"GetCallerIdentity",Bbn){},wee=class extends fu(gu,Ru,"GetDelegatedAccessToken",Ubn){},kee=class extends fu(gu,Ru,"GetFederationToken",Hbn){},Lee=class extends fu(gu,Ru,"GetSessionToken",jbn){},Mee=class extends fu(gu,Ru,"GetWebIdentityToken",zbn){},pxo={AssumeRoleCommand:iL,AssumeRoleWithSAMLCommand:bee,AssumeRoleWithWebIdentityCommand:cL,AssumeRootCommand:Eee,DecodeAuthorizationMessageCommand:xee,GetAccessKeyInfoCommand:Pee,GetCallerIdentityCommand:$ee,GetDelegatedAccessTokenCommand:wee,GetFederationTokenCommand:kee,GetSessionTokenCommand:Lee,GetWebIdentityTokenCommand:Mee},Gee=class extends xC{};CDo(pxo,Gee);var Kbn=e=>{if(typeof e?.Arn=="string"){let t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}},Wbn=async(e,t,s,a={})=>{let c=typeof e=="function"?await e():e,l=typeof t=="function"?await t():t,u="",p=c??l??(u=await dDo(a)());return s?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${c} (credential provider clientConfig)`,`${l} (contextual client)`,`${u} (STS default: AWS_REGION, profile region, or us-east-1)`),p},dxo=(e,t)=>{let s,a;return async(c,l)=>{if(a=c,!s){let{logger:S=e?.parentClientConfig?.logger,profile:v=e?.parentClientConfig?.profile,region:T,requestHandler:x=e?.parentClientConfig?.requestHandler,credentialProviderLogger:w,userAgentAppId:L=e?.parentClientConfig?.userAgentAppId}=e,G=await Wbn(T,e?.parentClientConfig?.region,w,{logger:S,profile:v}),O=!Qbn(x);s=new t({...e,userAgentAppId:L,profile:v,credentialDefaultProvider:()=>async()=>a,region:G,requestHandler:O?x:void 0,logger:S})}let{Credentials:u,AssumedRoleUser:p}=await s.send(new iL(l));if(!u||!u.AccessKeyId||!u.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${l.RoleArn}`);let d=Kbn(p),m={accessKeyId:u.AccessKeyId,secretAccessKey:u.SecretAccessKey,sessionToken:u.SessionToken,expiration:u.Expiration,...u.CredentialScope&&{credentialScope:u.CredentialScope},...d&&{accountId:d}};return SAe(m,"CREDENTIALS_STS_ASSUME_ROLE","i"),m}},mxo=(e,t)=>{let s;return async a=>{if(!s){let{logger:d=e?.parentClientConfig?.logger,profile:m=e?.parentClientConfig?.profile,region:S,requestHandler:v=e?.parentClientConfig?.requestHandler,credentialProviderLogger:T,userAgentAppId:x=e?.parentClientConfig?.userAgentAppId}=e,w=await Wbn(S,e?.parentClientConfig?.region,T,{logger:d,profile:m}),L=!Qbn(v);s=new t({...e,userAgentAppId:x,profile:m,region:w,requestHandler:L?v:void 0,logger:d})}let{Credentials:c,AssumedRoleUser:l}=await s.send(new cL(a));if(!c||!c.AccessKeyId||!c.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${a.RoleArn}`);let u=Kbn(l),p={accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.SessionToken,expiration:c.Expiration,...c.CredentialScope&&{credentialScope:c.CredentialScope},...u&&{accountId:u}};return u&&SAe(p,"RESOLVED_ACCOUNT_ID","T"),SAe(p,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),p}},Qbn=e=>e?.metadata?.handlerProtocol==="h2",Zbn=(e,t)=>t?class extends e{constructor(a){super(a);for(let c of t)this.middlewareStack.use(c)}}:e,Ybn=(e={},t)=>dxo(e,Zbn(xC,t)),Xbn=(e={},t)=>mxo(e,Zbn(xC,t)),fxo=e=>t=>e({roleAssumer:Ybn(t),roleAssumerWithWebIdentity:Xbn(t),...t});Ae.AssumeRole$=Gbn;Ae.AssumeRoleCommand=iL;Ae.AssumeRoleRequest$=pbn;Ae.AssumeRoleResponse$=dbn;Ae.AssumeRoleWithSAML$=Obn;Ae.AssumeRoleWithSAMLCommand=bee;Ae.AssumeRoleWithSAMLRequest$=mbn;Ae.AssumeRoleWithSAMLResponse$=fbn;Ae.AssumeRoleWithWebIdentity$=Nbn;Ae.AssumeRoleWithWebIdentityCommand=cL;Ae.AssumeRoleWithWebIdentityRequest$=gbn;Ae.AssumeRoleWithWebIdentityResponse$=Rbn;Ae.AssumeRoot$=Vbn;Ae.AssumeRootCommand=Eee;Ae.AssumeRootRequest$=Sbn;Ae.AssumeRootResponse$=ybn;Ae.AssumedRoleUser$=qee;Ae.Credentials$=jg;Ae.DecodeAuthorizationMessage$=qbn;Ae.DecodeAuthorizationMessageCommand=xee;Ae.DecodeAuthorizationMessageRequest$=Ibn;Ae.DecodeAuthorizationMessageResponse$=_bn;Ae.ExpiredTokenException=gee;Ae.ExpiredTokenException$=XDn;Ae.ExpiredTradeInTokenException=Cee;Ae.ExpiredTradeInTokenException$=JDn;Ae.FederatedUser$=hbn;Ae.GetAccessKeyInfo$=Fbn;Ae.GetAccessKeyInfoCommand=Pee;Ae.GetAccessKeyInfoRequest$=vbn;Ae.GetAccessKeyInfoResponse$=Cbn;Ae.GetCallerIdentity$=Bbn;Ae.GetCallerIdentityCommand=$ee;Ae.GetCallerIdentityRequest$=Tbn;Ae.GetCallerIdentityResponse$=Abn;Ae.GetDelegatedAccessToken$=Ubn;Ae.GetDelegatedAccessTokenCommand=wee;Ae.GetDelegatedAccessTokenRequest$=Dbn;Ae.GetDelegatedAccessTokenResponse$=bbn;Ae.GetFederationToken$=Hbn;Ae.GetFederationTokenCommand=kee;Ae.GetFederationTokenRequest$=Ebn;Ae.GetFederationTokenResponse$=xbn;Ae.GetSessionToken$=jbn;Ae.GetSessionTokenCommand=Lee;Ae.GetSessionTokenRequest$=Pbn;Ae.GetSessionTokenResponse$=$bn;Ae.GetWebIdentityToken$=zbn;Ae.GetWebIdentityTokenCommand=Mee;Ae.GetWebIdentityTokenRequest$=wbn;Ae.GetWebIdentityTokenResponse$=kbn;Ae.IDPCommunicationErrorException=hee;Ae.IDPCommunicationErrorException$=ebn;Ae.IDPRejectedClaimException=Iee;Ae.IDPRejectedClaimException$=tbn;Ae.InvalidAuthorizationMessageException=vee;Ae.InvalidAuthorizationMessageException$=nbn;Ae.InvalidIdentityTokenException=_ee;Ae.InvalidIdentityTokenException$=sbn;Ae.JWTPayloadSizeExceededException=Tee;Ae.JWTPayloadSizeExceededException$=rbn;Ae.MalformedPolicyDocumentException=Ree;Ae.MalformedPolicyDocumentException$=obn;Ae.OutboundWebIdentityFederationDisabledException=Aee;Ae.OutboundWebIdentityFederationDisabledException$=abn;Ae.PackedPolicyTooLargeException=See;Ae.PackedPolicyTooLargeException$=ibn;Ae.PolicyDescriptorType$=CAe;Ae.ProvidedContext$=Lbn;Ae.RegionDisabledException=yee;Ae.RegionDisabledException$=cbn;Ae.STS=Gee;Ae.STSClient=xC;Ae.STSServiceException=ba;Ae.STSServiceException$=YDn;Ae.SessionDurationEscalationException=Dee;Ae.SessionDurationEscalationException$=lbn;Ae.Tag$=Mbn;Ae.decorateDefaultCredentialProvider=fxo;Ae.errorTypeRegistries=ubn;Ae.getDefaultRoleAssumer=Ybn;Ae.getDefaultRoleAssumerWithWebIdentity=Xbn});var eEn=Bn(AAe=>{var{formatUrl:gxo}=(MD(),ye(Vce)),{getEndpointFromInstructions:Rxo}=($n(),ye(mR)),{HttpRequest:Sxo}=(Me(),ye(bo)),{SignatureV4MultiRegion:yxo}=$R(),Ixo="UNSIGNED-PAYLOAD",_xo="X-Amz-Content-Sha256",pL=class{signer;constructor(t){let s={service:t.signingName||t.service||"s3",uriEscapePath:t.uriEscapePath||!1,applyChecksum:t.applyChecksum||!1,...t};this.signer=new yxo(s)}presign(t,{unsignableHeaders:s=new Set,hoistableHeaders:a=new Set,unhoistableHeaders:c=new Set,...l}={}){return this.prepareRequest(t,{unsignableHeaders:s,unhoistableHeaders:c,hoistableHeaders:a}),this.signer.presign(t,{expiresIn:900,unsignableHeaders:s,unhoistableHeaders:c,...l})}presignWithCredentials(t,s,{unsignableHeaders:a=new Set,hoistableHeaders:c=new Set,unhoistableHeaders:l=new Set,...u}={}){return this.prepareRequest(t,{unsignableHeaders:a,unhoistableHeaders:l,hoistableHeaders:c}),this.signer.presignWithCredentials(t,s,{expiresIn:900,unsignableHeaders:a,unhoistableHeaders:l,...u})}prepareRequest(t,{unsignableHeaders:s=new Set,unhoistableHeaders:a=new Set,hoistableHeaders:c=new Set}={}){s.add("content-type"),Object.keys(t.headers).map(d=>d.toLowerCase()).filter(d=>d.startsWith("x-amz-server-side-encryption")).forEach(d=>{c.has(d)||a.add(d)}),t.headers[_xo]=Ixo;let l=t.headers.host,u=t.port,p=`${t.hostname}${t.port!=null?":"+u:""}`;(!l||l===t.hostname&&t.port!=null)&&(t.headers.host=p)}},hxo=async(e,t,s={})=>{let a,c;if(typeof e.config.endpointProvider=="function"){let T=(await Rxo(t.input,t.constructor,e.config)).properties?.authSchemes?.[0];T?.name==="sigv4a"?c=T?.signingRegionSet?.join(","):c=T?.signingRegion,a=new pL({...e.config,signingName:T?.signingName,region:async()=>c})}else a=new pL(e.config);let l=(v,T)=>async x=>{let{request:w}=x;if(!Sxo.isInstance(w))throw new Error("Request to be presigned is not an valid HTTP request.");delete w.headers["amz-sdk-invocation-id"],delete w.headers["amz-sdk-request"],delete w.headers["x-amz-user-agent"];let L,G={...s,signingRegion:s.signingRegion??T.signing_region??c,signingService:s.signingService??T.signing_service};return T.s3ExpressIdentity?L=await a.presignWithCredentials(w,T.s3ExpressIdentity,G):L=await a.presign(w,G),{response:{},output:{$metadata:{httpStatusCode:200},presigned:L}}},u="presignInterceptMiddleware",p=e.middlewareStack.clone();p.addRelativeTo(l,{name:u,relation:"before",toMiddleware:"awsAuthMiddleware",override:!0});let d=t.resolveMiddleware(p,e.config,{}),{output:m}=await d({input:t.input}),{presigned:S}=m;return gxo(S)};AAe.S3RequestPresigner=pL;AAe.getSignedUrl=hxo});import{Container as a$o,Key as i$o,Spacer as c$o,Text as zAe}from"@earendil-works/pi-tui";import{randomUUID as zPo}from"node:crypto";import{copyFileSync as KPo,existsSync as BEn,mkdirSync as WPo,rmSync as QPo,writeFileSync as ZPo}from"node:fs";import{tmpdir as YPo}from"node:os";import{join as tI}from"node:path";import{getSettingsListTheme as XPo}from"@earendil-works/pi-coding-agent";import{Container as JPo,Key as nI,matchesKey as sI,Spacer as e$o,Text as UEn}from"@earendil-works/pi-tui";import{createAgentSession as Cne,SessionManager as Tne}from"@earendil-works/pi-coding-agent";import{copyFileSync as h$o,existsSync as v$o,lstatSync as C$o,mkdirSync as dDe,readFileSync as T$o,rmSync as A$o,symlinkSync as D$o,unlinkSync as b$o,writeFileSync as Ste}from"node:fs";import{join as FC}from"node:path";import{createLocalBashOperations as P$o}from"@earendil-works/pi-coding-agent";import{existsSync as Kg,mkdirSync as rte,readFileSync as CL,writeFileSync as ote}from"node:fs";import{dirname as ate,join as QAe}from"node:path";import{getAgentDir as ZAe}from"@earendil-works/pi-coding-agent";var Ya=QAe(ZAe(),"checks-config.json"),hL=QAe(ZAe(),"settings.json"),YAe=10,XAe=60,ite=20,cte=1,JAe=5,lte=3,ute=!0,eDe=!1,TL=10,AL=30,rI=15,vL={small:{cpu:1,memoryMiB:2048},medium:{cpu:2,memoryMiB:4096},large:{cpu:4,memoryMiB:8192}},pte="medium",tDe="medium",nxn=1,sxn=420*1e3,rxn=120*1e3,oxn=["off","minimal","low","medium","high","xhigh","max"];function nDe(e){return e?.reasoning?oxn.filter(t=>{let s=e.thinkingLevelMap?.[t];return s===null?!1:t==="xhigh"||t==="max"?s!==void 0:!0}):["off"]}function Xo(){try{if(!Kg(Ya))return null;let e=JSON.parse(CL(Ya,"utf-8"));if(e.provider&&e.modelId&&e.thinkingLevel)return e}catch{}return null}function wi(e){let t=ate(Ya);Kg(t)||rte(t,{recursive:!0}),ote(Ya,JSON.stringify(e,null,2),"utf-8")}function dte(){let e=GC().fargate,t=e&&typeof e=="object"&&!Array.isArray(e)?e:{},s=Object.hasOwn(vL,t.resourceProfile??"")?t.resourceProfile:pte,a=Number.isFinite(t.maxRetries)?Math.min(3,Math.max(0,Math.floor(t.maxRetries))):nxn;return{...t,resourceProfile:s,adaptiveResourceProfile:t.adaptiveResourceProfile===!0,maxRetries:a}}function sDe(e,t=dte()){let a=t.projectProfiles?.[e]??axn(e,t),c=Object.hasOwn(vL,a)?a:pte;return{profile:c,...vL[c]}}function axn(e,t){return t.projectProfiles?.[e]??t.resourceProfile??pte}function WAe(e,t,s){let a=e.fargate??{};if(a.adaptiveResourceProfile!==!0)return e;let c=Object.keys(vL),l=c.indexOf(s.profile),u=(s.cpuOver95DurationMs??0)>sxn,p=typeof s.cpuOver95DurationMs=="number"&&s.cpuOver95DurationMs<rxn,d=s.profile;u&&l<c.length-1?d=c[l+1]:p&&l>0&&(d=c[l-1]);let m={...a.projectProfiles??{},[t]:d};return{...e,fargate:{...a,projectProfiles:m}}}function rDe(e,t){let s=Xo();if(s){wi(WAe(s,e,t));return}let a=GC(),c=a.fargate;if(!c||typeof c!="object"||Array.isArray(c))return;let l=WAe({provider:"patch-precheck",modelId:"patch-precheck",thinkingLevel:"off",fargate:c},e,t);if(l.fargate?.adaptiveResourceProfile!==!0)return;let u=ate(Ya);Kg(u)||rte(u,{recursive:!0}),ote(Ya,JSON.stringify({...a,fargate:l.fargate},null,2),"utf-8")}function oDe(){let e=Xo()?.solverGap;return!e?.provider||!e.modelId||!e.thinkingLevel?null:{...e,timeoutMinutes:e.timeoutMinutes>0?e.timeoutMinutes:ite,solverCount:e.solverCount>0?e.solverCount:lte,saveArtifacts:typeof e.saveArtifacts=="boolean"?e.saveArtifacts:ute}}function GC(){try{if(!Kg(Ya))return{};let e=JSON.parse(CL(Ya,"utf-8"));return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}catch{return{}}}function mte(){let e=GC().enabledProjects;return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function DL(e){let t=GC();return Array.isArray(t.enabledProjects)?t.enabledProjects.some(s=>s===e):Xo()?.enableAnalyzeTool??eDe}function bL(e,t){let s=new Set(mte());t?s.add(e):s.delete(e);let a=[...s],c=Xo();if(c){wi({...c,enabledProjects:a});return}let l=ate(Ya);Kg(l)||rte(l,{recursive:!0}),ote(Ya,JSON.stringify({...GC(),enabledProjects:a},null,2),"utf-8")}function EL(e){return e!==void 0?DL(e):Xo()?.enableAnalyzeTool??eDe}function aDe(){let e=Xo()?.analyzeGap;if(!e?.provider||!e.modelId||!e.thinkingLevel)return null;let t=Number.isFinite(e.timeoutMinutes)?Math.min(AL,Math.max(TL,e.timeoutMinutes)):rI;return{...e,timeoutMinutes:t}}function iDe(){try{return Kg(hL)?JSON.parse(CL(hL,"utf-8")).enabledModels??[]:[]}catch{return[]}}function cDe(e){let t=e.indexOf("/");return t<=0||t===e.length-1?null:{provider:e.slice(0,t),modelId:e.slice(t+1)}}function ixn(){try{if(Kg(hL))return JSON.parse(CL(hL,"utf-8"))}catch{}return{}}function OC(){let e=ixn().shellPath;return e||(process.platform==="win32"?"C:\\Program Files\\Git\\bin\\bash.exe":"bash")}import{existsSync as lDe,readFileSync as cxn}from"node:fs";import{join as Rte}from"node:path";function NC(e){return e.replace(/\\/g,"/")}function VC(e){return`'${e.replace(/'/g,"'\\''")}'`}var lxn=/(?:\.patch|\.md|\.sh)$/i,uxn=/(?:^|\/)dockerfile(?:$|\.)/i;function fte(e){return e.trim().replace(/\\/g,"/")}function gte(e){return e.length>0&&!lxn.test(e)&&!uxn.test(e)}async function uDe(e,t,s){if(s?.aborted)return[];let a=await e.exec("git",["diff","--name-only","HEAD","--"],{cwd:t,timeout:15e3,signal:s}),c=await e.exec("git",["ls-files","--others","--exclude-standard"],{cwd:t,timeout:15e3,signal:s}),l=[...a.code===0?a.stdout.split(/\r?\n/):[],...c.code===0?c.stdout.split(/\r?\n/):[]].map(fte).filter(gte).filter(u=>lDe(Rte(t,u)));return[...new Set(l)]}async function pDe(e,t,s,a){let c=[...new Set(s.map(fte).filter(gte))].filter(m=>lDe(Rte(t,m)));if(a?.aborted||c.length===0)return"";let l=await e.exec("git",["diff","HEAD","--no-ext-diff","--no-color","--unified=20","--",...c],{cwd:t,timeout:3e4,signal:a});if(a?.aborted)return"";let u=await e.exec("git",["ls-files","--others","--exclude-standard","--",...c],{cwd:t,timeout:15e3,signal:a});if(a?.aborted)return"";let d=[...u.code===0?new Set(u.stdout.split(/\r?\n/).map(fte).filter(gte)):new Set].map(m=>pxn(t,m)).filter(m=>m!==null);return[l.code===0?l.stdout.trimEnd():"",...d].filter(m=>m.length>0).join(`
|
|
70
70
|
|
|
71
71
|
`)}function pxn(e,t){try{let s=cxn(Rte(e,t)),a=t.replace(/\\/g,"/"),c=[`diff --git a/${a} b/${a}`,"new file mode 100644","--- /dev/null",`+++ b/${a}`];if(s.includes(0))return[...c,`Binary files /dev/null and b/${a} differ`].join(`
|
|
72
72
|
`);let l=s.toString("utf8").replace(/\r\n/g,`
|
|
@@ -74,13 +74,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
74
74
|
`);let u=l.endsWith(`
|
|
75
75
|
`),d=(u?l.slice(0,-1):l).split(`
|
|
76
76
|
`),m=[...c,`@@ -0,0 +1,${d.length} @@`,...d.map(S=>`+${S}`)];return u||m.push("\"),m.join(`
|
|
77
|
-
`)}catch{return null}}async function qC(e,t,s,a){if(a?.aborted)return{status:"error",error:"cancelled"};if((await e.exec("git",["rev-parse","HEAD"],{cwd:t,timeout:15e3,signal:a})).code!==0)return{status:"error",error:"Not a git repository, or it has no commits yet."};let l=`git -c core.autocrlf=false archive HEAD | tar -x -C ${VC(NC(s))}`,u=await e.exec(OC(),["-c",l],{cwd:t,timeout:6e4,signal:a});return u.code!==0?{status:"error",error:u.stderr?.trim()||`git archive failed (exit ${u.code})`}:{status:"ok"}}var mDe=".pi/shipd-checks",BC="solver_gap_solutions";function fDe(e,t){let s=FC(e,BC);dDe(s,{recursive:!0});let a=t.map(c=>{let l=FC(s,`solver_${c.index}`);return dDe(l,{recursive:!0}),Ste(FC(l,"solution.diff"),c.diff,"utf-8"),Ste(FC(l,"test_output.txt"),c.testOutputTail,"utf-8"),{index:c.index,status:c.status,passed:c.passed}});return Ste(FC(s,"manifest.json"),JSON.stringify(a,null,2),"utf-8"),s}var q={};Un(q,{Assign:()=>dxn,Clone:()=>zC,Create:()=>yPn,Discard:()=>IPn,Metrics:()=>al,Update:()=>_Pn});var al={assign:0,create:0,clone:0,discard:0,update:0};function dxn(e,t){return al.assign+=1,{...e,...t}}var k={};Un(k,{Entries:()=>kxn,EntriesRegExp:()=>wxn,Every:()=>xxn,EveryAll:()=>Pxn,GraphemeCount:()=>Dxn,HasPropertyKey:()=>$xn,IsArray:()=>HC,IsBigInt:()=>UC,IsBoolean:()=>CDe,IsClassInstance:()=>Txn,IsConstructor:()=>yxn,IsDeepEqual:()=>hte,IsEqual:()=>qt,IsFunction:()=>TDe,IsGreaterEqualThan:()=>DDe,IsGreaterThan:()=>hxn,IsInteger:()=>Ite,IsLessEqualThan:()=>ADe,IsLessThan:()=>vxn,IsMaxLength:()=>bxn,IsMinLength:()=>Exn,IsMultipleOf:()=>Cxn,IsNull:()=>$L,IsNumber:()=>wL,IsObject:()=>jC,IsObjectNotArray:()=>Ixn,IsString:()=>kL,IsSymbol:()=>_xn,IsUndefined:()=>_te,IsUnsafePropertyKey:()=>bDe,IsValueLike:()=>Axn,Keys:()=>PL,ShiftLeft:()=>LL,Symbols:()=>Lxn,Values:()=>Mxn});function Wg(e,t,s){return e>=t&&e<=s}function mxn(e){return e===8205}function fxn(e){return Wg(e,55296,56319)}function gDe(e){return Wg(e,127462,127487)}function SDe(e){return Wg(e,65024,65039)}function yDe(e){return Wg(e,768,879)||Wg(e,6832,6911)||Wg(e,7616,7679)||Wg(e,65056,65071)}function xL(e){return e>65535?2:1}function RDe(e,t){for(;t<e.length;){let s=e.codePointAt(t);if(yDe(s)||SDe(s))t+=xL(s);else break}return t}function yte(e,t){let s=e.codePointAt(t),a=t+xL(s);for(a=RDe(e,a);a<e.length-1&&e[a]==="\u200D";){let c=e.codePointAt(a+1);a+=1+xL(c),a=RDe(e,a)}return gDe(s)&&a<e.length&&gDe(e.codePointAt(a))&&(a+=xL(e.codePointAt(a))),a}function IDe(e){return fxn(e)||yDe(e)||SDe(e)||mxn(e)}function _De(e){let t=0,s=0;for(;s<e.length;)s=yte(e,s),t++;return t}function gxn(e,t){if(t===0)return!0;let s=0,a=0;for(;a<e.length;)if(a=yte(e,a),s++,s>=t)return!0;return!1}function Rxn(e,t){let s=0,a=0;for(;a<e.length;)if(a=yte(e,a),s++,s>t)return!1;return!0}function hDe(e,t){if(t===0)return!0;let s=0;for(;s<e.length;){if(IDe(e.charCodeAt(s)))return gxn(e,t);if(s++,s>=t)return!0}return!1}function vDe(e,t){let s=0;for(;s<e.length;){if(IDe(e.charCodeAt(s)))return Rxn(e,t);if(s++,s>t)return!1}return!0}function HC(e){return Array.isArray(e)}function UC(e){return qt(typeof e,"bigint")}function CDe(e){return qt(typeof e,"boolean")}function yxn(e){if(_te(e)||!TDe(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function TDe(e){return qt(typeof e,"function")}function Ite(e){return Number.isInteger(e)}function $L(e){return qt(e,null)}function wL(e){return Number.isFinite(e)}function Ixn(e){return jC(e)&&!HC(e)}function jC(e){return qt(typeof e,"object")&&!$L(e)}function kL(e){return qt(typeof e,"string")}function _xn(e){return qt(typeof e,"symbol")}function _te(e){return qt(e,void 0)}function qt(e,t){return e===t}function hxn(e,t){return e>t}function vxn(e,t){return e<t}function ADe(e,t){return e<=t}function DDe(e,t){return e>=t}function Cxn(e,t){if(UC(e)||UC(t))return BigInt(e)%BigInt(t)===0n;let s=1e-10;if(!wL(e)||Ite(e)&&1/t%1===0)return!0;let a=e%t;return Math.min(Math.abs(a),Math.abs(a-t),Math.abs(a+t))<s}function Txn(e){if(!jC(e))return!1;let t=globalThis.Object.getPrototypeOf(e);return $L(t)?!1:qt(typeof t.constructor,"function")&&!(qt(t.constructor,globalThis.Object)||qt(t.constructor.name,"Object"))}function Axn(e){return UC(e)||CDe(e)||$L(e)||wL(e)||kL(e)||_te(e)}function Dxn(e){return _De(e)}function bxn(e,t){return vDe(e,t)}function Exn(e,t){return hDe(e,t)}function xxn(e,t,s){for(let a=t;a<e.length;a++)if(!s(e[a],a))return!1;return!0}function Pxn(e,t,s){let a=!0;for(let c=t;c<e.length;c++)s(e[c],c)||(a=!1);return a}function LL(e,t,s){return qt(e.length,0)?s():t(e[0],e.slice(1))}function bDe(e){return qt(e,"__proto__")||qt(e,"constructor")||qt(e,"prototype")}function $xn(e,t){return bDe(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function wxn(e){return PL(e).map(t=>[new RegExp(`^${t}$`),e[t]])}function kxn(e){return Object.entries(e)}function PL(e){return Object.getOwnPropertyNames(e)}function Lxn(e){return Object.getOwnPropertySymbols(e)}function Mxn(e){return Object.values(e)}function Gxn(e,t){if(!jC(t))return!1;let s=PL(e);return qt(s.length,PL(t).length)&&s.every(a=>hte(e[a],t[a]))}function Oxn(e,t){return HC(t)&&qt(e.length,t.length)&&e.every((s,a)=>hte(e[a],t[a]))}function hte(e,t){return HC(e)?Oxn(e,t):jC(e)?Gxn(e,t):qt(e,t)}var Om={};Un(Om,{IsBigInt64Array:()=>Xxn,IsBigUint64Array:()=>Jxn,IsBoolean:()=>Vxn,IsDate:()=>tPn,IsFloat32Array:()=>Zxn,IsFloat64Array:()=>Yxn,IsInt16Array:()=>zxn,IsInt32Array:()=>Wxn,IsInt8Array:()=>Uxn,IsMap:()=>sPn,IsNumber:()=>qxn,IsRegExp:()=>ePn,IsSet:()=>nPn,IsString:()=>Fxn,IsTypeArray:()=>Bxn,IsUint16Array:()=>Kxn,IsUint32Array:()=>Qxn,IsUint8Array:()=>Hxn,IsUint8ClampedArray:()=>jxn});function Vxn(e){return e instanceof Boolean}function qxn(e){return e instanceof Number}function Fxn(e){return e instanceof String}function Bxn(e){return globalThis.ArrayBuffer.isView(e)}function Uxn(e){return e instanceof globalThis.Int8Array}function Hxn(e){return e instanceof globalThis.Uint8Array}function jxn(e){return e instanceof globalThis.Uint8ClampedArray}function zxn(e){return e instanceof globalThis.Int16Array}function Kxn(e){return e instanceof globalThis.Uint16Array}function Wxn(e){return e instanceof globalThis.Int32Array}function Qxn(e){return e instanceof globalThis.Uint32Array}function Zxn(e){return e instanceof globalThis.Float32Array}function Yxn(e){return e instanceof globalThis.Float64Array}function Xxn(e){return e instanceof globalThis.BigInt64Array}function Jxn(e){return e instanceof globalThis.BigUint64Array}function ePn(e){return e instanceof globalThis.RegExp}function tPn(e){return e instanceof globalThis.Date}function nPn(e){return e instanceof globalThis.Set}function sPn(e){return e instanceof globalThis.Map}function oPn(e){return k.HasPropertyKey(e,"~kind")||k.HasPropertyKey(e,"~unsafe")}function aPn(e){let t={},s=Object.getOwnPropertyDescriptors(e);for(let a of Object.keys(s)){if(k.IsUnsafePropertyKey(a))continue;let c=s[a];k.HasPropertyKey(c,"value")&&Object.defineProperty(t,a,{...c,value:Qg(c.value)})}return t}function iPn(e){let t={};for(let s of k.Keys(e))k.IsUnsafePropertyKey(s)||(t[s]=Qg(e[s]));for(let s of k.Symbols(e))t[s]=Qg(e[s]);return t}function cPn(e){return k.IsClassInstance(e)?e:oPn(e)?aPn(e):iPn(e)}function lPn(e){return e.map(t=>Qg(t))}function uPn(e){return e.slice()}function pPn(e){return new RegExp(e.source,e.flags)}function dPn(e){return new Map(Qg([...e.entries()]))}function mPn(e){return new Set(Qg([...e.values()]))}function Qg(e){return Om.IsTypeArray(e)?uPn(e):Om.IsRegExp(e)?pPn(e):Om.IsMap(e)?dPn(e):Om.IsSet(e)?mPn(e):k.IsArray(e)?lPn(e):k.IsObject(e)?cPn(e):e}function zC(e){return al.clone+=1,Qg(e)}var Zg={};Un(Zg,{Get:()=>RPn,Reset:()=>fPn,Set:()=>gPn});var md={immutableTypes:!1,maxErrors:8,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function fPn(){md.immutableTypes=!1,md.maxErrors=8,md.useAcceleration=!0,md.exactOptionalPropertyTypes=!1,md.enumerableKind=!1,md.correctiveParse=!1,md.unionPrioritySort=!0}function gPn(e){for(let t of k.Keys(e)){let s=e[t];s!==void 0&&Object.defineProperty(md,t,{value:s})}}function RPn(){return md}function SPn(e,t){for(let s of Object.keys(t))Object.defineProperty(e,s,{configurable:!0,writable:!0,enumerable:!1,value:t[s]});return e}function EDe(e,t){return{...e,...t}}function yPn(e,t,s={}){al.create+=1;let a=Zg.Get(),c=EDe(t,s),l=a.enumerableKind?EDe(c,e):SPn(c,e);return a.immutableTypes?Object.freeze(l):l}function IPn(e,t){al.discard+=1;let s={},a=Object.getOwnPropertyDescriptors(zC(e)),c=new Set(t);for(let l of Object.keys(a))c.has(l)||Object.defineProperty(s,l,a[l]);return s}function _Pn(e,t,s){al.update+=1;let a=Zg.Get(),c=zC(e);for(let l of Object.keys(t))Object.defineProperty(c,l,{configurable:!0,writable:!0,enumerable:a.enumerableKind,value:t[l]});for(let l of Object.keys(s))Object.defineProperty(c,l,{configurable:!0,enumerable:!0,writable:!0,value:s[l]});return c}function Ge(e,t){return k.IsObject(e)&&k.HasPropertyKey(e,"~kind")&&k.IsEqual(e["~kind"],t)}function Js(e){return k.IsObject(e)}function je(e,t,s){return q.Create({"~kind":"Deferred"},{type:"deferred",action:e,parameters:t,options:s},{})}function Nm(e){return Ge(e,"Deferred")}function hPn(e){return q.Update(e,{"~readonly":!0},{})}function KC(e,t){return q.Update(hPn(e),{},t)}function xDe(e,t,s,a){let c=ve(e,t,s);return KC(c,a)}function vPn(e){return q.Update(e,{"~optional":!0},{})}function WC(e,t){return q.Update(vPn(e),{},t)}function PDe(e,t,s,a){let c=ve(e,t,s);return WC(c,a)}function ki(e,t){return q.Create({"~kind":"Array"},{type:"array",items:e},t)}function is(e){return Ge(e,"Array")}function ML(e){return q.Discard(e,["~kind","type","items"])}function Su(e,t,s={}){return q.Create({"~kind":"Constructor"},{type:"constructor",parameters:e,instanceType:t},s)}function pr(e){return Ge(e,"Constructor")}function $De(e){return q.Discard(e,["~kind","type","parameters","instanceType"])}function yu(e,t,s={}){return q.Create({"~kind":"Function"},{type:"function",parameters:e,returnType:t},s)}function dr(e){return Ge(e,"Function")}function wDe(e){return q.Discard(e,["~kind","type","parameters","returnType"])}function fd(e,t){return q.Create({"~kind":"Ref"},{$ref:e},t)}function mr(e){return Ge(e,"Ref")}function Vm(e,t){return q.Create({"~kind":"Generic"},{type:"generic",parameters:e,expression:t})}function oI(e){return Ge(e,"Generic")}function aI(e){return q.Create({"~kind":"Any"},{},e)}function Fs(e){return Ge(e,"Any")}var kDe="(?!)";function Rn(e){return q.Create({"~kind":"Never"},{not:{}},e)}function qm(e){return Ge(e,"Never")}function Iu(e,t={}){return je("AddOptional",[e],t)}function Yg(e,t={}){return WC(e,t)}function LDe(e){return Yg(e)}function ho(e){return Js(e)&&k.HasPropertyKey(e,"~optional")}function MDe(e){return k.Keys(e).filter(t=>!ho(e[t]))}function GL(e){return k.Keys(e)}function OL(e){return k.Values(e)}function ct(e,t={}){let s=MDe(e),a=s.length>0?{required:s}:{};return q.Create({"~kind":"Object"},{type:"object",...a,properties:e},t)}function Ht(e){return Ge(e,"Object")}function GDe(e){return q.Discard(e,["~kind","type","properties","required"])}function vr(e){return q.Create({"~kind":"Unknown"},{},e)}function er(e){return Ge(e,"Unknown")}function _u(e,t,s){let a=k.Keys(e).reduce((c,l)=>({...c,[l]:q.Update(e[l],{},{$id:l})}),{});return q.Create({"~kind":"Cyclic"},{$defs:a,$ref:t},s)}function Nr(e){return Ge(e,"Cyclic")}function ODe(e){return q.Update(e,{"~unsafe":null},{})}function NL(e){return k.IsObjectNotArray(e)&&k.HasPropertyKey(e,"~unsafe")&&k.IsNull(e["~unsafe"])}var hu={};Un(hu,{Match:()=>CPn});function CPn(e,t){return t[e.length]?.(...e)??(()=>{throw Error("Invalid Arguments")})()}function QC(...e){let[t,s]=hu.Match(e,{2:(a,c)=>[a,c,c],1:a=>[a,vr(),vr()]});return q.Create({"~kind":"Infer"},{type:"infer",name:t,extends:s},{})}function $s(e){return Ge(e,"Infer")}function Xg(e,t,s,a={}){return q.Create({"~kind":"Dependent"},{if:e,then:t,else:s},a)}function Cs(e){return Ge(e,"Dependent")}function NDe(e){return q.Discard(e,["~kind","if","then","else"])}function VDe(e){return k.IsObjectNotArray(e)}function qDe(e){return k.Keys(e).filter(s=>isNaN(s)).reduce((s,a)=>[...s,e[a]],[])}function FDe(e){return k.IsString(e)||k.IsNumber(e)}function BDe(e,t){let s=VDe(e)?qDe(e):e;return q.Create({"~kind":"Enum"},{enum:s},t)}function Jo(e){return Ge(e,"Enum")}function vo(e,t={}){return q.Create({"~kind":"Intersect"},{allOf:e},t)}function kt(e){return Ge(e,"Intersect")}function UDe(e){return q.Discard(e,["~kind","allOf"])}function ws(){throw new Error("Unreachable")}var HDe;(function(e){e[e.Array=0]="Array",e[e.BigInt=1]="BigInt",e[e.Boolean=2]="Boolean",e[e.Date=3]="Date",e[e.Constructor=4]="Constructor",e[e.Function=5]="Function",e[e.Null=6]="Null",e[e.Number=7]="Number",e[e.Object=8]="Object",e[e.RegExp=9]="RegExp",e[e.String=10]="String",e[e.Symbol=11]="Symbol",e[e.TypeArray=12]="TypeArray",e[e.Undefined=13]="Undefined"})(HDe||(HDe={}));var Oko=BigInt("14695981039346656037"),[Nko,Vko]=[BigInt("1099511628211"),BigInt("18446744073709551616")],qko=Array.from({length:256}).map((e,t)=>BigInt(t)),jDe=new Float64Array(1),Fko=new DataView(jDe.buffer),Bko=new Uint8Array(jDe.buffer);var Uko=new TextEncoder;var ZC=class{constructor(t,s){this.type=t,this.decode=s}Encode(t){let s=this.type,a=VL(s)?u=>this.decode(s["~codec"].decode(u)):this.decode,c=VL(s)?u=>s["~codec"].encode(t(u)):t,l={decode:a,encode:c};return q.Update(this.type,{"~codec":l},{})}},YC=class{constructor(t){this.type=t}Decode(t){return new ZC(this.type,t)}};function qL(e){return new YC(e)}function KDe(e,t){return qL(e).Decode(t).Encode(()=>{throw Error("Encode not implemented")})}function WDe(e,t){return qL(e).Decode(()=>{throw Error("Decode not implemented")}).Encode(t)}function VL(e){return Js(e)&&k.HasPropertyKey(e,"~codec")&&k.IsObject(e["~codec"])&&k.HasPropertyKey(e["~codec"],"encode")&&k.HasPropertyKey(e["~codec"],"decode")}function QDe(e){return iI(e)}function Jg(e){return Js(e)&&k.HasPropertyKey(e,"~immutable")}function vu(e,t={}){return je("AddReadonly",[e],t)}function eR(e,t={}){return KC(e,t)}function ZDe(e){return eR(e)}function tR(e){return Js(e)&&k.HasPropertyKey(e,"~readonly")}function bPn(e,t){let s=vte(e)?[...e["~refine"],t]:[t];return q.Update(e,{"~refine":s},{})}function YDe(...e){let[t,s,a]=hu.Match(e,{3:(c,l,u)=>[c,l,u],2:(c,l)=>[c,l,()=>"Refine Error"]});return bPn(t,{check:s,error:a})}function EPn(e){return k.IsObjectNotArray(e)&&k.HasPropertyKey(e,"check")&&k.HasPropertyKey(e,"error")&&k.IsFunction(e.check)&&k.IsFunction(e.error)}function vte(e){return Js(e)&&k.HasPropertyKey(e,"~refine")&&k.IsArray(e["~refine"])&&k.Every(e["~refine"],0,t=>EPn(t))}var XDe="-?(?:0|[1-9][0-9]*)n";function XC(e){return q.Create({"~kind":"BigInt"},{type:"bigint"},e)}function Cu(e){return Ge(e,"BigInt")}function FL(e){return q.Create({"~kind":"Boolean"},{type:"boolean"},e)}function gc(e){return Ge(e,"Boolean")}function JC(e){return q.Create({"~kind":"Identifier"},{name:e})}function JDe(e){return Ge(e,"Identifier")}var BL="-?(?:0|[1-9][0-9]*)";function nR(e){return q.Create({"~kind":"Integer"},{type:"integer"},e)}function ea(e){return Ge(e,"Integer")}var Cte=class extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}};function xPn(e){return k.IsBigInt(e)?"bigint":k.IsBoolean(e)?"boolean":k.IsNumber(e)?"number":k.IsString(e)?"string":(()=>{throw new Cte(e)})()}function Lt(e,t){return q.Create({"~kind":"Literal"},{type:xPn(e),const:e},t)}function UL(e){return k.IsBigInt(e)||k.IsBoolean(e)||k.IsNumber(e)||k.IsString(e)}function ebe(e){return Wt(e)&&k.IsNumber(e.const)}function tbe(e){return Wt(e)&&k.IsString(e.const)}function Wt(e){return Ge(e,"Literal")}function cI(e){return q.Create({"~kind":"Null"},{type:"null"},e)}function lI(e){return Ge(e,"Null")}var HL="-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?";function Xa(e){return q.Create({"~kind":"Number"},{type:"number"},e)}function Bs(e){return Ge(e,"Number")}function uI(e){return q.Create({"~kind":"Symbol"},{type:"symbol"},e)}function Fm(e){return Ge(e,"Symbol")}function sR(...e){let[t,s,a]=hu.Match(e,{3:(c,l,u)=>[c,l,u],2:(c,l)=>[c,l,l],1:c=>[c,vr(),vr()]});return q.Create({"~kind":"Parameter"},{name:t,extends:s,equals:a},{})}function nbe(e){return Ge(e,"Parameter")}var jL=".*";function Rc(e){return q.Create({"~kind":"String"},{type:"string"},e)}function ta(e){return Ge(e,"String")}function At(e,t={}){return q.Create({"~kind":"Union"},{anyOf:e},t)}function Ue(e){return Ge(e,"Union")}function sbe(e){return q.Discard(e,["~kind","anyOf"])}function eT(e){let t=rbe(e);return k.IsEqual(t.length,2)?t[0]:[]}function PPn(e){return!0}function obe(e){return k.ShiftLeft(e,(t,s)=>$Pn(t)?obe(s):!1,()=>!0)}function abe(e){return k.IsEqual(e.length,0)?!1:obe(e)}function $Pn(e){return Ue(e)?abe(e.anyOf):Wt(e)?PPn(e.const):!1}function zL(e){return abe(e)}function KL(e){return q.Create({"~kind":"TemplateLiteral"},{type:"string",pattern:e},{})}function ibe(e,t,s=[]){return k.ShiftLeft(e,(a,c)=>ibe(c,t,[...s,`${a}${t}`]),()=>s)}function wPn(e,t){return k.IsEqual(e.length,0)?[`${t}`]:ibe(e,t)}function cbe(e,t,s=[]){return k.ShiftLeft(t,(a,c)=>cbe(e,c,[...s,...lbe(e,a)]),()=>s)}function lbe(e,t){return Ue(t)?cbe(e,t.anyOf):Wt(t)?wPn(e,t.const):ws()}function ube(e,t){return k.ShiftLeft(t,(s,a)=>ube(lbe(e,s),a),()=>e)}function kPn(e){return e.map(t=>Lt(t))}function LPn(e){let t=ube([],e),s=kPn(t);return At(s)}function MPn(e){return k.IsEqual(e.length,0)?ws():k.IsEqual(e.length,1)&&Wt(e[0])?e[0]:LPn(e)}function Tte(e){let t=eT(e);return k.IsEqual(t.length,0)?Rc():zL(t)?MPn(t):KL(e)}function pbe(e){let t=Tte(e);return Us(t)?Rc():t}function Ea(e,t){let s="object",a={[e]:t};return q.Create({"~kind":"Record"},{type:s,patternProperties:a})}function dbe(e){return Ea(il,e)}function mbe(e){return ct({true:e,false:e})}function Hs(e,t={}){let[s,a,c]=[e,e.length,!1];return q.Create({"~kind":"Tuple"},{type:"array",additionalItems:c,items:s,minItems:a},t)}function Pn(e){return Ge(e,"Tuple")}function fbe(e){return q.Discard(e,["~kind","type","items","minItems","additionalItems"])}function GPn(e){return q.Discard(e,["~readonly"])}function Ate(e,t){return q.Update(GPn(e),{},t)}function gbe(e,t,s,a){let c=ve(e,t,s);return Ate(c,a)}function Rbe(e,t={}){return je("RemoveReadonly",[e],t)}function Sbe(e,t={}){return Ate(e,t)}function OPn(e){return q.Discard(e,["~optional"])}function Dte(e,t){return q.Update(OPn(e),{},t)}function ybe(e,t,s,a){let c=ve(e,t,s);return Dte(c,a)}function Ibe(e,t={}){return je("RemoveOptional",[e],t)}function WL(e,t={}){return Dte(e,t)}function bte(e){return e.reduceRight((s,a,c)=>({[c]:a,...s}),{})}function _be(e){let t=bte(e.items);return ct(t)}function NPn(e,t){return tR(e)?!!tR(t):!1}function VPn(e,t){return ho(e)?!!ho(t):!1}function qPn(e,t){let s=NPn(e,t),a=VPn(e,t),c=gs([e,t]),l=Sbe(WL(c));return s&&a?eR(Yg(l)):s&&!a?eR(l):!s&&a?Yg(l):l}function FPn(e,t,s){return s in e?s in t?qPn(e[s],t[s]):e[s]:s in t?t[s]:Rn()}function BPn(e,t){return[...new Set([...k.Keys(t),...k.Keys(e)])].reduce((a,c)=>({...a,[c]:FPn(e,t,c)}),{})}function hbe(e){return Ht(e)?e.properties:Pn(e)?bte(e.items):ws()}function vbe(e,t){let s=hbe(e),a=hbe(t),c=BPn(s,a);return ct(c)}function Cbe(e,t){let s=pI(e,t);return k.IsEqual(s,nT)?e:k.IsEqual(s,sT)||k.IsEqual(s,tT)?t:Rn()}function Tbe(e){return Ht(e)||Pn(e)}function UPn(e,t){let s=Ue(e),a=Ue(t);return s||a}function HPn(e,t){let s=Sc(e),a=Sc(t),c=UPn(s,a),l=Tbe(s),u=Tbe(a);return c?gs([s,a]):l&&u?vbe(s,a):l&&!u?s:!l&&u?a:Cbe(s,a)}function Abe(e,t,s=[]){return k.ShiftLeft(t,(a,c)=>Abe(e,c,[...s,HPn(e,a)]),()=>k.IsEqual(s.length,0)?[e]:s)}function Dbe(e,t,s=[]){return k.ShiftLeft(e,(a,c)=>Dbe(c,t,[...s,...rT([a],t)]),()=>s)}function rT(e,t=[]){return k.ShiftLeft(e,(s,a)=>Ue(s)?rT(a,Dbe(s.anyOf,t)):rT(a,Abe(s,t)),()=>t)}function jPn(e,t){let s=Vr({},e,t);return at.IsExtendsTrueLike(s)?[]:[e]}function zPn(e,t){return e.reduce((s,a)=>[...s,...jPn(a,t)],[])}function QL(e,t){let s=Sc(e),a=Ue(s)?s.anyOf:[s],c=zPn(a,t);return Ja(c)}function cl(e,t,s){let a=vo([e,t]),c=QL(s,e);return Ja([a,c])}function Li(e){let t=e.map(s=>Lt(s));return Ja(t)}function gs(e){let t=rT(e),s=Ete(t);return gd(s)}function xa(e){let t=pbe(e);return Sc(t)}function Ja(e){let t=Ete(e);return gd(t)}function Sc(e){return Cs(e)?cl(e.if,e.then,e.else):Jo(e)?Li(e.enum):kt(e)?gs(e.allOf):Us(e)?xa(e.pattern):Ue(e)?Ja(e.anyOf):e}function gd(e){return k.IsEqual(e.length,1)?e[0]:k.IsEqual(e.length,0)?Rn():At(e)}function bbe(e,t){let s=Li(e);return Bm(s,t)}function Ebe(e,t){return Ea(Um,t)}function xbe(e,t){let s=gs(e);return Bm(s,t)}function Pbe(e,t){return k.IsString(e)||k.IsNumber(e)?ct({[e]:t}):k.IsEqual(e,!1)?ct({false:t}):k.IsEqual(e,!0)?ct({true:t}):ct({})}function $be(e,t){return Ea(dI,t)}function wbe(e,t){return k.HasPropertyKey(e,"pattern")&&(k.IsString(e.pattern)||e.pattern instanceof RegExp)?Ea(e.pattern.toString(),t):Ea(il,t)}function kbe(e,t){let s=eT(e);return zL(s)?Bm(xa(e),t):Ea(e,t)}function KPn(e){return Ue(e)?oT(e.anyOf):[e]}function oT(e){return e.reduce((t,s)=>[...t,...KPn(s)],[])}function WPn(e){return e.some(t=>ta(t)||Bs(t)||ea(t))}function QPn(e,t){return k.IsEqual(WPn(e),!0)?Ea(il,t):void 0}function ZPn(e,t){return e.reduce((s,a)=>Wt(a)&&(k.IsString(a.const)||k.IsNumber(a.const))?{...s,[a.const]:t}:s,{})}function YPn(e,t){let s=ZPn(e,t);return ct(s)}function Lbe(e,t){let s=oT(e),a=QPn(s,t);return Js(a)?a:YPn(s,t)}function Bm(e,t){return Fs(e)?dbe(t):gc(e)?mbe(t):Jo(e)?bbe(e.enum,t):ea(e)?Ebe(e,t):kt(e)?xbe(e.allOf,t):Wt(e)?Pbe(e.const,t):Bs(e)?$be(e,t):Ue(e)?Lbe(e.anyOf,t):ta(e)?wbe(e,t):Us(e)?kbe(e.pattern,t):ct({})}function xte(e,t,s){return St([e])?q.Update(Bm(e,t),{},s):ZL(e,t,s)}function Mbe(e,t,s,a,c){let l=ve(e,t,s),u=ve(e,t,a);return xte(l,u,c)}var Um=`^${BL}$`,dI=`^${HL}$`,il=`^${jL}$`;function ZL(e,t,s={}){return je("Record",[e,t],s)}function YL(e,t,s={}){return xte(e,t,s)}function Gbe(e,t){return Ea(e,t)}function XL(e){return k.IsEqual(e,il)?Rc():k.IsEqual(e,Um)?nR():k.IsEqual(e,dI)?Xa():Tte(e)}function yc(e){return k.Keys(e.patternProperties)[0]}function mI(e){let t=yc(e);return XL(t)}function na(e){return e.patternProperties[yc(e)]}function qr(e){return Ge(e,"Record")}function rR(e){return q.Create({"~kind":"Rest"},{type:"rest",items:e},{})}function Hm(e){return Ge(e,"Rest")}function JL(e){return q.Create({"~kind":"This"},{$ref:"#"},e)}function eM(e){return Ge(e,"This")}function fI(e){return q.Create({"~kind":"Undefined"},{type:"undefined"},e)}function gI(e){return Ge(e,"Undefined")}function tM(e){return q.Create({"~kind":"Void"},{type:"void"},e)}function Tu(e){return Ge(e,"Void")}function JPn(e,t){return k.IsEqual(e,"Array")?ki(t[0]):k.IsEqual(e,"Capitalize")?sM(t[0]):k.IsEqual(e,"ConstructorParameters")?cM(t[0]):k.IsEqual(e,"Evaluate")?Nxe(t[0]):k.IsEqual(e,"Exclude")?lM(t[0],t[1]):k.IsEqual(e,"Extract")?uM(t[0],t[1]):k.IsEqual(e,"Index")?lT(t[0],t[1]):k.IsEqual(e,"InstanceType")?pM(t[0]):k.IsEqual(e,"Lowercase")?rM(t[0]):k.IsEqual(e,"NonNullable")?dM(t[0]):k.IsEqual(e,"Omit")?mM(t[0],t[1]):k.IsEqual(e,"Parameters")?fM(t[0]):k.IsEqual(e,"Partial")?gM(t[0]):k.IsEqual(e,"Pick")?RM(t[0],t[1]):k.IsEqual(e,"Readonly")?SM(t[0]):k.IsEqual(e,"KeyOf")?uT(t[0]):k.IsEqual(e,"Record")?ZL(t[0],t[1]):k.IsEqual(e,"Required")?yM(t[0]):k.IsEqual(e,"ReturnType")?IM(t[0]):k.IsEqual(e,"Uncapitalize")?oM(t[0]):k.IsEqual(e,"Uppercase")?aM(t[0]):cT(fd(e),t)}function oR(){throw Error("Unreachable")}var e$n=(e,t=[])=>e.reduce((s,a)=>k.IsArray(a)&&k.IsEqual(a.length,2)?[...s,a[0]]:[...s,a],[]),Rd=e=>{let[t,s]=e;return e$n([...t,...s])};function Fbe(e){return sR(e[0],e[2],e[4])}function Bbe(e){return sR(e[0],e[2],e[2])}function Ube(e){return sR(e[0],vr(),e[2])}function Hbe(e){return sR(e,vr(),vr())}function jbe(e){return Rd(e)}function zbe(e){return e[1]}function Kbe(e){return Rd(e)}function Wbe(e){return e[1]}function Qbe(e){return JPn(e[0],e[1])}function Zbe(e){return null}function Ybe(e){return Rc()}function Xbe(e){return Xa()}function Jbe(e){return FL()}function eEe(e){return fI()}function tEe(e){return cI()}function nEe(e){return nR()}function sEe(e){return XC()}function rEe(e){return vr()}function oEe(e){return aI()}function aEe(e){return ct({})}function iEe(e){return Rn()}function cEe(e){return uI()}function lEe(e){return tM()}function uEe(e){return JL()}function pEe(e){return Lt(BigInt(e))}function dEe(e){return Lt(k.IsEqual(e,"true"))}function mEe(e){return Lt(parseFloat(e))}function fEe(e){return Lt(e)}function gEe(e){return e[1]}function REe(e){return Lt(e)}function SEe(e){return k.IsEqual(e.length,3)?[e[0],e[1],...e[2]]:[e[0]]}function yEe(e){return e[1]}function IEe(e){return nM(e)}function _Ee(e){return k.IsEqual(e.length,6)?Xg(e[1],e[3],e[5]):Xg(e[1],e[3],vr())}function hEe(e){return e.length>0}function vEe(e){return e.reduce((t,s)=>k.IsEqual(s.length,3)?[...t,[s[1]]]:[...t,[]],[])}function CEe(e){return k.IsEqual(e.length,6)?[e[1],e[3],e[5]]:[]}function TEe(e){return k.IsArray(e)&&k.IsEqual(e.length,3)?e[1]:e}function AEe(e){return k.IsEqual(e.length,2)?e[1]:[]}function Obe(e,t){return t.reduce((s,a)=>{let c=a;return k.IsEqual(c.length,1)?lT(s,c[0]):k.IsEqual(c.length,0)?ki(s):oR()},e)}function Nbe(e,t){return k.IsEqual(t.length,3)?iM(e,t[0],t[1],t[2]):e}function t$n(e,t){return k.IsArray(t)&&k.IsEqual(t.length,0)?e:_M(e,t)}function DEe(e){let[t,s,a,c,l]=e;return t$n(Nbe(t?uT(Obe(s,a)):Obe(s,a),c),l)}function Pte(e,t){return k.IsEqual(t.length,3)?(()=>{let[s,a,c]=t,l=Pte(a,c);if(k.IsEqual(s,"&"))return kt(l)?vo([e,...l.allOf]):vo([e,l]);if(k.IsEqual(s,"|"))return Ue(l)?At([e,...l.anyOf]):At([e,l]);oR()})():e}function bEe(e){let[t,s]=e;return Pte(t,s)}function EEe(e){let[t,s]=e;return Pte(t,s)}function xEe(e){return Oxe(e[1])}function PEe(e){return e[1]}function $Ee(e){return Vm(e[0],e[2])}function wEe(e){return k.IsEqual(e.length,4)?QC(e[1],e[3]):k.IsEqual(e.length,2)?QC(e[1],vr()):oR()}function kEe(e){return`${e}`}function LEe(e){return ea(e[3])?Um:Bs(e[3])?dI:Fm(e[3])?il:ta(e[3])?il:oR()}function MEe(e){return e.length>0}function GEe(e){return e.length>0}function OEe(e){let[t,s,a,c,l]=e;return{[s]:t&&a?vu(Iu(l)):t&&!a?vu(l):!t&&a?Iu(l):l}}function NEe(e){return Rd(e)}function VEe(e){return e.reduce((t,s)=>k.HasPropertyKey(s,Um)||k.HasPropertyKey(s,dI)||k.HasPropertyKey(s,il)?[t[0],q.Assign(t[1],s)]:[q.Assign(t[0],s),t[1]],[{},{}])}function qEe(e){return VEe(e[1])}function FEe(e){let[t,s]=e,a=k.IsEqual(k.Keys(s).length,0)?{}:{patternProperties:s};return ct(t,a)}function BEe(e){return k.IsEqual(e.length,5)?vu(Iu(e[4])):k.IsEqual(e.length,3)?e[2]:k.IsEqual(e.length,4)?k.IsEqual(e[2],"readonly")?vu(e[3]):Iu(e[3]):oR()}function UEe(e){return vu(Iu(e[1]))}function HEe(e){return vu(e[1])}function jEe(e){return Iu(e[0])}function zEe(e){return k.IsEqual(e.length,2)?rR(e[1]):k.IsEqual(e.length,1)?e[0]:oR()}function KEe(e){return Rd(e)}function WEe(e){return Hs(e[1])}function QEe(e){return vu(Iu(e[4]))}function ZEe(e){return vu(e[3])}function YEe(e){return Iu(e[3])}function XEe(e){return e[2]}function JEe(e){return k.IsEqual(e.length,2)?rR(e[1]):k.IsEqual(e.length,1)?e[0]:oR()}function exe(e){return Rd(e)}function txe(e){return yu(e[1],e[4])}function nxe(e){return Su(e[2],e[5])}function Vbe(e,t){return k.IsEqual(e,"remove")?Rbe(t):k.IsEqual(e,"add")?vu(t):t}function sxe(e){return k.IsEqual(e.length,2)&&k.IsEqual(e[0],"-")?"remove":k.IsEqual(e.length,2)&&k.IsEqual(e[0],"+")||k.IsEqual(e.length,1)?"add":"none"}function qbe(e,t){return k.IsEqual(e,"remove")?Ibe(t):k.IsEqual(e,"add")?Iu(t):t}function rxe(e){return k.IsEqual(e.length,2)&&k.IsEqual(e[0],"-")?"remove":k.IsEqual(e.length,2)&&k.IsEqual(e[0],"+")||k.IsEqual(e.length,1)?"add":"none"}function oxe(e){return k.IsEqual(e.length,2)?[e[1]]:[]}function axe(e){return k.IsArray(e[6])&&k.IsEqual(e[6].length,1)?aT(JC(e[3]),e[5],e[6][0],Vbe(e[1],qbe(e[8],e[10]))):aT(JC(e[3]),e[5],fd(e[3]),Vbe(e[1],qbe(e[8],e[10])))}function ixe(e){return fd(e)}function cxe(e){return BigInt(e)}function lxe(e){return parseFloat(e)}function uxe(e){return k.IsEqual(e,"true")}function pxe(e){return null}function dxe(e){return{[e[0]]:e[2]}}function mxe(e){return Rd(e)}function n$n(e){return e.reduce((t,s)=>q.Assign(t,s),{})}function fxe(e){return n$n(e[1])}function gxe(e){return Rd(e)}function Rxe(e){return e[1]}function Sxe(e){return XC()}function yxe(e){return Rc()}function Ixe(e){return Xa()}function _xe(e){return nR()}function hxe(e){return Rn()}function vxe(e){return Lt(e)}function Cxe(e){return At(e[1])}function Txe(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function Axe(e){return[e[0],...e[1]]}function Dxe(e){return e[1]}function bxe(e){return Rd(e)}function Exe(e){return k.IsEqual(e.length,2)?e[1]:[]}function xxe(e){let t=e[2],s=e[3],[a,c]=e[4],l=k.IsEqual(k.Keys(c).length,0)?{}:{patternProperties:c};return{[e[1]]:Vm(t,iT(s,a,l))}}function Pxe(e){let t=e[2],[s,a]=e[3],c=k.IsEqual(k.Keys(a).length,0)?{}:{patternProperties:a};return{[e[1]]:iT(t,s,c)}}function $xe(e){return{[e[1]]:Vm(e[2],e[4])}}function wxe(e){return{[e[1]]:e[3]}}function kxe(e){return null}function Lxe(e){return VEe(Rd(e))}function Mxe(e){return e[1]}function Gxe(e){let t=e[0],s=e[1];return Vxe(q.Assign(t,s[0]))}function pT(e){return qt(e.length,2)}function Et(e,t,s){return pT(e)?t(e[0],e[1]):s()}function o$n(e,t){return qt(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function Rs(e,t){for(let s=0;s<e.length;s++){let a=o$n(e[s],t);if(pT(a))return a}return[]}function $te(e,t){return Array.from({length:t-e+1},(s,a)=>String.fromCharCode(e+a))}var qxe=[...$te(97,122),...$te(65,90)],wte="0",kte=$te(49,57),RI=[wte,...kte],Fxe=" ",SI=`
|
|
77
|
+
`)}catch{return null}}async function qC(e,t,s,a){if(a?.aborted)return{status:"error",error:"cancelled"};if((await e.exec("git",["rev-parse","HEAD"],{cwd:t,timeout:15e3,signal:a})).code!==0)return{status:"error",error:"Not a git repository, or it has no commits yet."};let l=`git -c core.autocrlf=false archive HEAD | tar -x -C ${VC(NC(s))}`,u=await e.exec(OC(),["-c",l],{cwd:t,timeout:6e4,signal:a});return u.code!==0?{status:"error",error:u.stderr?.trim()||`git archive failed (exit ${u.code})`}:{status:"ok"}}var mDe=".pi/shipd-checks",BC="solver_gap_solutions";function fDe(e,t){let s=FC(e,BC);dDe(s,{recursive:!0});let a=t.map(c=>{let l=FC(s,`solver_${c.index}`);return dDe(l,{recursive:!0}),Ste(FC(l,"solution.diff"),c.diff,"utf-8"),Ste(FC(l,"test_output.txt"),c.testOutputTail,"utf-8"),{index:c.index,status:c.status,passed:c.passed}});return Ste(FC(s,"manifest.json"),JSON.stringify(a,null,2),"utf-8"),s}var q={};Un(q,{Assign:()=>dxn,Clone:()=>zC,Create:()=>yPn,Discard:()=>IPn,Metrics:()=>al,Update:()=>_Pn});var al={assign:0,create:0,clone:0,discard:0,update:0};function dxn(e,t){return al.assign+=1,{...e,...t}}var k={};Un(k,{Entries:()=>kxn,EntriesRegExp:()=>wxn,Every:()=>xxn,EveryAll:()=>Pxn,GraphemeCount:()=>Dxn,HasPropertyKey:()=>$xn,IsArray:()=>HC,IsBigInt:()=>UC,IsBoolean:()=>CDe,IsClassInstance:()=>Txn,IsConstructor:()=>yxn,IsDeepEqual:()=>hte,IsEqual:()=>qt,IsFunction:()=>TDe,IsGreaterEqualThan:()=>DDe,IsGreaterThan:()=>hxn,IsInteger:()=>Ite,IsLessEqualThan:()=>ADe,IsLessThan:()=>vxn,IsMaxLength:()=>bxn,IsMinLength:()=>Exn,IsMultipleOf:()=>Cxn,IsNull:()=>$L,IsNumber:()=>wL,IsObject:()=>jC,IsObjectNotArray:()=>Ixn,IsString:()=>kL,IsSymbol:()=>_xn,IsUndefined:()=>_te,IsUnsafePropertyKey:()=>bDe,IsValueLike:()=>Axn,Keys:()=>PL,ShiftLeft:()=>LL,Symbols:()=>Lxn,Values:()=>Mxn});function Wg(e,t,s){return e>=t&&e<=s}function mxn(e){return e===8205}function fxn(e){return Wg(e,55296,56319)}function gDe(e){return Wg(e,127462,127487)}function SDe(e){return Wg(e,65024,65039)}function yDe(e){return Wg(e,768,879)||Wg(e,6832,6911)||Wg(e,7616,7679)||Wg(e,65056,65071)}function xL(e){return e>65535?2:1}function RDe(e,t){for(;t<e.length;){let s=e.codePointAt(t);if(yDe(s)||SDe(s))t+=xL(s);else break}return t}function yte(e,t){let s=e.codePointAt(t),a=t+xL(s);for(a=RDe(e,a);a<e.length-1&&e[a]==="\u200D";){let c=e.codePointAt(a+1);a+=1+xL(c),a=RDe(e,a)}return gDe(s)&&a<e.length&&gDe(e.codePointAt(a))&&(a+=xL(e.codePointAt(a))),a}function IDe(e){return fxn(e)||yDe(e)||SDe(e)||mxn(e)}function _De(e){let t=0,s=0;for(;s<e.length;)s=yte(e,s),t++;return t}function gxn(e,t){if(t===0)return!0;let s=0,a=0;for(;a<e.length;)if(a=yte(e,a),s++,s>=t)return!0;return!1}function Rxn(e,t){let s=0,a=0;for(;a<e.length;)if(a=yte(e,a),s++,s>t)return!1;return!0}function hDe(e,t){if(t===0)return!0;let s=0;for(;s<e.length;){if(IDe(e.charCodeAt(s)))return gxn(e,t);if(s++,s>=t)return!0}return!1}function vDe(e,t){let s=0;for(;s<e.length;){if(IDe(e.charCodeAt(s)))return Rxn(e,t);if(s++,s>t)return!1}return!0}function HC(e){return Array.isArray(e)}function UC(e){return qt(typeof e,"bigint")}function CDe(e){return qt(typeof e,"boolean")}function yxn(e){if(_te(e)||!TDe(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function TDe(e){return qt(typeof e,"function")}function Ite(e){return Number.isInteger(e)}function $L(e){return qt(e,null)}function wL(e){return Number.isFinite(e)}function Ixn(e){return jC(e)&&!HC(e)}function jC(e){return qt(typeof e,"object")&&!$L(e)}function kL(e){return qt(typeof e,"string")}function _xn(e){return qt(typeof e,"symbol")}function _te(e){return qt(e,void 0)}function qt(e,t){return e===t}function hxn(e,t){return e>t}function vxn(e,t){return e<t}function ADe(e,t){return e<=t}function DDe(e,t){return e>=t}function Cxn(e,t){if(UC(e)||UC(t))return BigInt(e)%BigInt(t)===0n;let s=1e-10;if(!wL(e)||Ite(e)&&1/t%1===0)return!0;let a=e%t;return Math.min(Math.abs(a),Math.abs(a-t),Math.abs(a+t))<s}function Txn(e){if(!jC(e))return!1;let t=globalThis.Object.getPrototypeOf(e);return $L(t)?!1:qt(typeof t.constructor,"function")&&!(qt(t.constructor,globalThis.Object)||qt(t.constructor.name,"Object"))}function Axn(e){return UC(e)||CDe(e)||$L(e)||wL(e)||kL(e)||_te(e)}function Dxn(e){return _De(e)}function bxn(e,t){return vDe(e,t)}function Exn(e,t){return hDe(e,t)}function xxn(e,t,s){for(let a=t;a<e.length;a++)if(!s(e[a],a))return!1;return!0}function Pxn(e,t,s){let a=!0;for(let c=t;c<e.length;c++)s(e[c],c)||(a=!1);return a}function LL(e,t,s){return qt(e.length,0)?s():t(e[0],e.slice(1))}function bDe(e){return qt(e,"__proto__")||qt(e,"constructor")||qt(e,"prototype")}function $xn(e,t){return bDe(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function wxn(e){return PL(e).map(t=>[new RegExp(`^${t}$`),e[t]])}function kxn(e){return Object.entries(e)}function PL(e){return Object.getOwnPropertyNames(e)}function Lxn(e){return Object.getOwnPropertySymbols(e)}function Mxn(e){return Object.values(e)}function Gxn(e,t){if(!jC(t))return!1;let s=PL(e);return qt(s.length,PL(t).length)&&s.every(a=>hte(e[a],t[a]))}function Oxn(e,t){return HC(t)&&qt(e.length,t.length)&&e.every((s,a)=>hte(e[a],t[a]))}function hte(e,t){return HC(e)?Oxn(e,t):jC(e)?Gxn(e,t):qt(e,t)}var Om={};Un(Om,{IsBigInt64Array:()=>Xxn,IsBigUint64Array:()=>Jxn,IsBoolean:()=>Vxn,IsDate:()=>tPn,IsFloat32Array:()=>Zxn,IsFloat64Array:()=>Yxn,IsInt16Array:()=>zxn,IsInt32Array:()=>Wxn,IsInt8Array:()=>Uxn,IsMap:()=>sPn,IsNumber:()=>qxn,IsRegExp:()=>ePn,IsSet:()=>nPn,IsString:()=>Fxn,IsTypeArray:()=>Bxn,IsUint16Array:()=>Kxn,IsUint32Array:()=>Qxn,IsUint8Array:()=>Hxn,IsUint8ClampedArray:()=>jxn});function Vxn(e){return e instanceof Boolean}function qxn(e){return e instanceof Number}function Fxn(e){return e instanceof String}function Bxn(e){return globalThis.ArrayBuffer.isView(e)}function Uxn(e){return e instanceof globalThis.Int8Array}function Hxn(e){return e instanceof globalThis.Uint8Array}function jxn(e){return e instanceof globalThis.Uint8ClampedArray}function zxn(e){return e instanceof globalThis.Int16Array}function Kxn(e){return e instanceof globalThis.Uint16Array}function Wxn(e){return e instanceof globalThis.Int32Array}function Qxn(e){return e instanceof globalThis.Uint32Array}function Zxn(e){return e instanceof globalThis.Float32Array}function Yxn(e){return e instanceof globalThis.Float64Array}function Xxn(e){return e instanceof globalThis.BigInt64Array}function Jxn(e){return e instanceof globalThis.BigUint64Array}function ePn(e){return e instanceof globalThis.RegExp}function tPn(e){return e instanceof globalThis.Date}function nPn(e){return e instanceof globalThis.Set}function sPn(e){return e instanceof globalThis.Map}function oPn(e){return k.HasPropertyKey(e,"~kind")||k.HasPropertyKey(e,"~unsafe")}function aPn(e){let t={},s=Object.getOwnPropertyDescriptors(e);for(let a of Object.keys(s)){if(k.IsUnsafePropertyKey(a))continue;let c=s[a];k.HasPropertyKey(c,"value")&&Object.defineProperty(t,a,{...c,value:Qg(c.value)})}return t}function iPn(e){let t={};for(let s of k.Keys(e))k.IsUnsafePropertyKey(s)||(t[s]=Qg(e[s]));for(let s of k.Symbols(e))t[s]=Qg(e[s]);return t}function cPn(e){return k.IsClassInstance(e)?e:oPn(e)?aPn(e):iPn(e)}function lPn(e){return e.map(t=>Qg(t))}function uPn(e){return e.slice()}function pPn(e){return new RegExp(e.source,e.flags)}function dPn(e){return new Map(Qg([...e.entries()]))}function mPn(e){return new Set(Qg([...e.values()]))}function Qg(e){return Om.IsTypeArray(e)?uPn(e):Om.IsRegExp(e)?pPn(e):Om.IsMap(e)?dPn(e):Om.IsSet(e)?mPn(e):k.IsArray(e)?lPn(e):k.IsObject(e)?cPn(e):e}function zC(e){return al.clone+=1,Qg(e)}var Zg={};Un(Zg,{Get:()=>RPn,Reset:()=>fPn,Set:()=>gPn});var md={immutableTypes:!1,maxErrors:8,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function fPn(){md.immutableTypes=!1,md.maxErrors=8,md.useAcceleration=!0,md.exactOptionalPropertyTypes=!1,md.enumerableKind=!1,md.correctiveParse=!1,md.unionPrioritySort=!0}function gPn(e){for(let t of k.Keys(e)){let s=e[t];s!==void 0&&Object.defineProperty(md,t,{value:s})}}function RPn(){return md}function SPn(e,t){for(let s of Object.keys(t))Object.defineProperty(e,s,{configurable:!0,writable:!0,enumerable:!1,value:t[s]});return e}function EDe(e,t){return{...e,...t}}function yPn(e,t,s={}){al.create+=1;let a=Zg.Get(),c=EDe(t,s),l=a.enumerableKind?EDe(c,e):SPn(c,e);return a.immutableTypes?Object.freeze(l):l}function IPn(e,t){al.discard+=1;let s={},a=Object.getOwnPropertyDescriptors(zC(e)),c=new Set(t);for(let l of Object.keys(a))c.has(l)||Object.defineProperty(s,l,a[l]);return s}function _Pn(e,t,s){al.update+=1;let a=Zg.Get(),c=zC(e);for(let l of Object.keys(t))Object.defineProperty(c,l,{configurable:!0,writable:!0,enumerable:a.enumerableKind,value:t[l]});for(let l of Object.keys(s))Object.defineProperty(c,l,{configurable:!0,enumerable:!0,writable:!0,value:s[l]});return c}function Ge(e,t){return k.IsObject(e)&&k.HasPropertyKey(e,"~kind")&&k.IsEqual(e["~kind"],t)}function Js(e){return k.IsObject(e)}function je(e,t,s){return q.Create({"~kind":"Deferred"},{type:"deferred",action:e,parameters:t,options:s},{})}function Nm(e){return Ge(e,"Deferred")}function hPn(e){return q.Update(e,{"~readonly":!0},{})}function KC(e,t){return q.Update(hPn(e),{},t)}function xDe(e,t,s,a){let c=ve(e,t,s);return KC(c,a)}function vPn(e){return q.Update(e,{"~optional":!0},{})}function WC(e,t){return q.Update(vPn(e),{},t)}function PDe(e,t,s,a){let c=ve(e,t,s);return WC(c,a)}function ki(e,t){return q.Create({"~kind":"Array"},{type:"array",items:e},t)}function is(e){return Ge(e,"Array")}function ML(e){return q.Discard(e,["~kind","type","items"])}function Su(e,t,s={}){return q.Create({"~kind":"Constructor"},{type:"constructor",parameters:e,instanceType:t},s)}function pr(e){return Ge(e,"Constructor")}function $De(e){return q.Discard(e,["~kind","type","parameters","instanceType"])}function yu(e,t,s={}){return q.Create({"~kind":"Function"},{type:"function",parameters:e,returnType:t},s)}function dr(e){return Ge(e,"Function")}function wDe(e){return q.Discard(e,["~kind","type","parameters","returnType"])}function fd(e,t){return q.Create({"~kind":"Ref"},{$ref:e},t)}function mr(e){return Ge(e,"Ref")}function Vm(e,t){return q.Create({"~kind":"Generic"},{type:"generic",parameters:e,expression:t})}function oI(e){return Ge(e,"Generic")}function aI(e){return q.Create({"~kind":"Any"},{},e)}function Fs(e){return Ge(e,"Any")}var kDe="(?!)";function Rn(e){return q.Create({"~kind":"Never"},{not:{}},e)}function qm(e){return Ge(e,"Never")}function Iu(e,t={}){return je("AddOptional",[e],t)}function Yg(e,t={}){return WC(e,t)}function LDe(e){return Yg(e)}function ho(e){return Js(e)&&k.HasPropertyKey(e,"~optional")}function MDe(e){return k.Keys(e).filter(t=>!ho(e[t]))}function GL(e){return k.Keys(e)}function OL(e){return k.Values(e)}function ct(e,t={}){let s=MDe(e),a=s.length>0?{required:s}:{};return q.Create({"~kind":"Object"},{type:"object",...a,properties:e},t)}function Ht(e){return Ge(e,"Object")}function GDe(e){return q.Discard(e,["~kind","type","properties","required"])}function vr(e){return q.Create({"~kind":"Unknown"},{},e)}function er(e){return Ge(e,"Unknown")}function _u(e,t,s){let a=k.Keys(e).reduce((c,l)=>({...c,[l]:q.Update(e[l],{},{$id:l})}),{});return q.Create({"~kind":"Cyclic"},{$defs:a,$ref:t},s)}function Nr(e){return Ge(e,"Cyclic")}function ODe(e){return q.Update(e,{"~unsafe":null},{})}function NL(e){return k.IsObjectNotArray(e)&&k.HasPropertyKey(e,"~unsafe")&&k.IsNull(e["~unsafe"])}var hu={};Un(hu,{Match:()=>CPn});function CPn(e,t){return t[e.length]?.(...e)??(()=>{throw Error("Invalid Arguments")})()}function QC(...e){let[t,s]=hu.Match(e,{2:(a,c)=>[a,c,c],1:a=>[a,vr(),vr()]});return q.Create({"~kind":"Infer"},{type:"infer",name:t,extends:s},{})}function $s(e){return Ge(e,"Infer")}function Xg(e,t,s,a={}){return q.Create({"~kind":"Dependent"},{if:e,then:t,else:s},a)}function Cs(e){return Ge(e,"Dependent")}function NDe(e){return q.Discard(e,["~kind","if","then","else"])}function VDe(e){return k.IsObjectNotArray(e)}function qDe(e){return k.Keys(e).filter(s=>isNaN(s)).reduce((s,a)=>[...s,e[a]],[])}function FDe(e){return k.IsString(e)||k.IsNumber(e)}function BDe(e,t){let s=VDe(e)?qDe(e):e;return q.Create({"~kind":"Enum"},{enum:s},t)}function Jo(e){return Ge(e,"Enum")}function vo(e,t={}){return q.Create({"~kind":"Intersect"},{allOf:e},t)}function kt(e){return Ge(e,"Intersect")}function UDe(e){return q.Discard(e,["~kind","allOf"])}function ws(){throw new Error("Unreachable")}var HDe;(function(e){e[e.Array=0]="Array",e[e.BigInt=1]="BigInt",e[e.Boolean=2]="Boolean",e[e.Date=3]="Date",e[e.Constructor=4]="Constructor",e[e.Function=5]="Function",e[e.Null=6]="Null",e[e.Number=7]="Number",e[e.Object=8]="Object",e[e.RegExp=9]="RegExp",e[e.String=10]="String",e[e.Symbol=11]="Symbol",e[e.TypeArray=12]="TypeArray",e[e.Undefined=13]="Undefined"})(HDe||(HDe={}));var Nko=BigInt("14695981039346656037"),[Vko,qko]=[BigInt("1099511628211"),BigInt("18446744073709551616")],Fko=Array.from({length:256}).map((e,t)=>BigInt(t)),jDe=new Float64Array(1),Bko=new DataView(jDe.buffer),Uko=new Uint8Array(jDe.buffer);var Hko=new TextEncoder;var ZC=class{constructor(t,s){this.type=t,this.decode=s}Encode(t){let s=this.type,a=VL(s)?u=>this.decode(s["~codec"].decode(u)):this.decode,c=VL(s)?u=>s["~codec"].encode(t(u)):t,l={decode:a,encode:c};return q.Update(this.type,{"~codec":l},{})}},YC=class{constructor(t){this.type=t}Decode(t){return new ZC(this.type,t)}};function qL(e){return new YC(e)}function KDe(e,t){return qL(e).Decode(t).Encode(()=>{throw Error("Encode not implemented")})}function WDe(e,t){return qL(e).Decode(()=>{throw Error("Decode not implemented")}).Encode(t)}function VL(e){return Js(e)&&k.HasPropertyKey(e,"~codec")&&k.IsObject(e["~codec"])&&k.HasPropertyKey(e["~codec"],"encode")&&k.HasPropertyKey(e["~codec"],"decode")}function QDe(e){return iI(e)}function Jg(e){return Js(e)&&k.HasPropertyKey(e,"~immutable")}function vu(e,t={}){return je("AddReadonly",[e],t)}function eR(e,t={}){return KC(e,t)}function ZDe(e){return eR(e)}function tR(e){return Js(e)&&k.HasPropertyKey(e,"~readonly")}function bPn(e,t){let s=vte(e)?[...e["~refine"],t]:[t];return q.Update(e,{"~refine":s},{})}function YDe(...e){let[t,s,a]=hu.Match(e,{3:(c,l,u)=>[c,l,u],2:(c,l)=>[c,l,()=>"Refine Error"]});return bPn(t,{check:s,error:a})}function EPn(e){return k.IsObjectNotArray(e)&&k.HasPropertyKey(e,"check")&&k.HasPropertyKey(e,"error")&&k.IsFunction(e.check)&&k.IsFunction(e.error)}function vte(e){return Js(e)&&k.HasPropertyKey(e,"~refine")&&k.IsArray(e["~refine"])&&k.Every(e["~refine"],0,t=>EPn(t))}var XDe="-?(?:0|[1-9][0-9]*)n";function XC(e){return q.Create({"~kind":"BigInt"},{type:"bigint"},e)}function Cu(e){return Ge(e,"BigInt")}function FL(e){return q.Create({"~kind":"Boolean"},{type:"boolean"},e)}function gc(e){return Ge(e,"Boolean")}function JC(e){return q.Create({"~kind":"Identifier"},{name:e})}function JDe(e){return Ge(e,"Identifier")}var BL="-?(?:0|[1-9][0-9]*)";function nR(e){return q.Create({"~kind":"Integer"},{type:"integer"},e)}function ea(e){return Ge(e,"Integer")}var Cte=class extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}};function xPn(e){return k.IsBigInt(e)?"bigint":k.IsBoolean(e)?"boolean":k.IsNumber(e)?"number":k.IsString(e)?"string":(()=>{throw new Cte(e)})()}function Lt(e,t){return q.Create({"~kind":"Literal"},{type:xPn(e),const:e},t)}function UL(e){return k.IsBigInt(e)||k.IsBoolean(e)||k.IsNumber(e)||k.IsString(e)}function ebe(e){return Wt(e)&&k.IsNumber(e.const)}function tbe(e){return Wt(e)&&k.IsString(e.const)}function Wt(e){return Ge(e,"Literal")}function cI(e){return q.Create({"~kind":"Null"},{type:"null"},e)}function lI(e){return Ge(e,"Null")}var HL="-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?";function Xa(e){return q.Create({"~kind":"Number"},{type:"number"},e)}function Bs(e){return Ge(e,"Number")}function uI(e){return q.Create({"~kind":"Symbol"},{type:"symbol"},e)}function Fm(e){return Ge(e,"Symbol")}function sR(...e){let[t,s,a]=hu.Match(e,{3:(c,l,u)=>[c,l,u],2:(c,l)=>[c,l,l],1:c=>[c,vr(),vr()]});return q.Create({"~kind":"Parameter"},{name:t,extends:s,equals:a},{})}function nbe(e){return Ge(e,"Parameter")}var jL=".*";function Rc(e){return q.Create({"~kind":"String"},{type:"string"},e)}function ta(e){return Ge(e,"String")}function At(e,t={}){return q.Create({"~kind":"Union"},{anyOf:e},t)}function Ue(e){return Ge(e,"Union")}function sbe(e){return q.Discard(e,["~kind","anyOf"])}function eT(e){let t=rbe(e);return k.IsEqual(t.length,2)?t[0]:[]}function PPn(e){return!0}function obe(e){return k.ShiftLeft(e,(t,s)=>$Pn(t)?obe(s):!1,()=>!0)}function abe(e){return k.IsEqual(e.length,0)?!1:obe(e)}function $Pn(e){return Ue(e)?abe(e.anyOf):Wt(e)?PPn(e.const):!1}function zL(e){return abe(e)}function KL(e){return q.Create({"~kind":"TemplateLiteral"},{type:"string",pattern:e},{})}function ibe(e,t,s=[]){return k.ShiftLeft(e,(a,c)=>ibe(c,t,[...s,`${a}${t}`]),()=>s)}function wPn(e,t){return k.IsEqual(e.length,0)?[`${t}`]:ibe(e,t)}function cbe(e,t,s=[]){return k.ShiftLeft(t,(a,c)=>cbe(e,c,[...s,...lbe(e,a)]),()=>s)}function lbe(e,t){return Ue(t)?cbe(e,t.anyOf):Wt(t)?wPn(e,t.const):ws()}function ube(e,t){return k.ShiftLeft(t,(s,a)=>ube(lbe(e,s),a),()=>e)}function kPn(e){return e.map(t=>Lt(t))}function LPn(e){let t=ube([],e),s=kPn(t);return At(s)}function MPn(e){return k.IsEqual(e.length,0)?ws():k.IsEqual(e.length,1)&&Wt(e[0])?e[0]:LPn(e)}function Tte(e){let t=eT(e);return k.IsEqual(t.length,0)?Rc():zL(t)?MPn(t):KL(e)}function pbe(e){let t=Tte(e);return Us(t)?Rc():t}function Ea(e,t){let s="object",a={[e]:t};return q.Create({"~kind":"Record"},{type:s,patternProperties:a})}function dbe(e){return Ea(il,e)}function mbe(e){return ct({true:e,false:e})}function Hs(e,t={}){let[s,a,c]=[e,e.length,!1];return q.Create({"~kind":"Tuple"},{type:"array",additionalItems:c,items:s,minItems:a},t)}function Pn(e){return Ge(e,"Tuple")}function fbe(e){return q.Discard(e,["~kind","type","items","minItems","additionalItems"])}function GPn(e){return q.Discard(e,["~readonly"])}function Ate(e,t){return q.Update(GPn(e),{},t)}function gbe(e,t,s,a){let c=ve(e,t,s);return Ate(c,a)}function Rbe(e,t={}){return je("RemoveReadonly",[e],t)}function Sbe(e,t={}){return Ate(e,t)}function OPn(e){return q.Discard(e,["~optional"])}function Dte(e,t){return q.Update(OPn(e),{},t)}function ybe(e,t,s,a){let c=ve(e,t,s);return Dte(c,a)}function Ibe(e,t={}){return je("RemoveOptional",[e],t)}function WL(e,t={}){return Dte(e,t)}function bte(e){return e.reduceRight((s,a,c)=>({[c]:a,...s}),{})}function _be(e){let t=bte(e.items);return ct(t)}function NPn(e,t){return tR(e)?!!tR(t):!1}function VPn(e,t){return ho(e)?!!ho(t):!1}function qPn(e,t){let s=NPn(e,t),a=VPn(e,t),c=gs([e,t]),l=Sbe(WL(c));return s&&a?eR(Yg(l)):s&&!a?eR(l):!s&&a?Yg(l):l}function FPn(e,t,s){return s in e?s in t?qPn(e[s],t[s]):e[s]:s in t?t[s]:Rn()}function BPn(e,t){return[...new Set([...k.Keys(t),...k.Keys(e)])].reduce((a,c)=>({...a,[c]:FPn(e,t,c)}),{})}function hbe(e){return Ht(e)?e.properties:Pn(e)?bte(e.items):ws()}function vbe(e,t){let s=hbe(e),a=hbe(t),c=BPn(s,a);return ct(c)}function Cbe(e,t){let s=pI(e,t);return k.IsEqual(s,nT)?e:k.IsEqual(s,sT)||k.IsEqual(s,tT)?t:Rn()}function Tbe(e){return Ht(e)||Pn(e)}function UPn(e,t){let s=Ue(e),a=Ue(t);return s||a}function HPn(e,t){let s=Sc(e),a=Sc(t),c=UPn(s,a),l=Tbe(s),u=Tbe(a);return c?gs([s,a]):l&&u?vbe(s,a):l&&!u?s:!l&&u?a:Cbe(s,a)}function Abe(e,t,s=[]){return k.ShiftLeft(t,(a,c)=>Abe(e,c,[...s,HPn(e,a)]),()=>k.IsEqual(s.length,0)?[e]:s)}function Dbe(e,t,s=[]){return k.ShiftLeft(e,(a,c)=>Dbe(c,t,[...s,...rT([a],t)]),()=>s)}function rT(e,t=[]){return k.ShiftLeft(e,(s,a)=>Ue(s)?rT(a,Dbe(s.anyOf,t)):rT(a,Abe(s,t)),()=>t)}function jPn(e,t){let s=Vr({},e,t);return at.IsExtendsTrueLike(s)?[]:[e]}function zPn(e,t){return e.reduce((s,a)=>[...s,...jPn(a,t)],[])}function QL(e,t){let s=Sc(e),a=Ue(s)?s.anyOf:[s],c=zPn(a,t);return Ja(c)}function cl(e,t,s){let a=vo([e,t]),c=QL(s,e);return Ja([a,c])}function Li(e){let t=e.map(s=>Lt(s));return Ja(t)}function gs(e){let t=rT(e),s=Ete(t);return gd(s)}function xa(e){let t=pbe(e);return Sc(t)}function Ja(e){let t=Ete(e);return gd(t)}function Sc(e){return Cs(e)?cl(e.if,e.then,e.else):Jo(e)?Li(e.enum):kt(e)?gs(e.allOf):Us(e)?xa(e.pattern):Ue(e)?Ja(e.anyOf):e}function gd(e){return k.IsEqual(e.length,1)?e[0]:k.IsEqual(e.length,0)?Rn():At(e)}function bbe(e,t){let s=Li(e);return Bm(s,t)}function Ebe(e,t){return Ea(Um,t)}function xbe(e,t){let s=gs(e);return Bm(s,t)}function Pbe(e,t){return k.IsString(e)||k.IsNumber(e)?ct({[e]:t}):k.IsEqual(e,!1)?ct({false:t}):k.IsEqual(e,!0)?ct({true:t}):ct({})}function $be(e,t){return Ea(dI,t)}function wbe(e,t){return k.HasPropertyKey(e,"pattern")&&(k.IsString(e.pattern)||e.pattern instanceof RegExp)?Ea(e.pattern.toString(),t):Ea(il,t)}function kbe(e,t){let s=eT(e);return zL(s)?Bm(xa(e),t):Ea(e,t)}function KPn(e){return Ue(e)?oT(e.anyOf):[e]}function oT(e){return e.reduce((t,s)=>[...t,...KPn(s)],[])}function WPn(e){return e.some(t=>ta(t)||Bs(t)||ea(t))}function QPn(e,t){return k.IsEqual(WPn(e),!0)?Ea(il,t):void 0}function ZPn(e,t){return e.reduce((s,a)=>Wt(a)&&(k.IsString(a.const)||k.IsNumber(a.const))?{...s,[a.const]:t}:s,{})}function YPn(e,t){let s=ZPn(e,t);return ct(s)}function Lbe(e,t){let s=oT(e),a=QPn(s,t);return Js(a)?a:YPn(s,t)}function Bm(e,t){return Fs(e)?dbe(t):gc(e)?mbe(t):Jo(e)?bbe(e.enum,t):ea(e)?Ebe(e,t):kt(e)?xbe(e.allOf,t):Wt(e)?Pbe(e.const,t):Bs(e)?$be(e,t):Ue(e)?Lbe(e.anyOf,t):ta(e)?wbe(e,t):Us(e)?kbe(e.pattern,t):ct({})}function xte(e,t,s){return St([e])?q.Update(Bm(e,t),{},s):ZL(e,t,s)}function Mbe(e,t,s,a,c){let l=ve(e,t,s),u=ve(e,t,a);return xte(l,u,c)}var Um=`^${BL}$`,dI=`^${HL}$`,il=`^${jL}$`;function ZL(e,t,s={}){return je("Record",[e,t],s)}function YL(e,t,s={}){return xte(e,t,s)}function Gbe(e,t){return Ea(e,t)}function XL(e){return k.IsEqual(e,il)?Rc():k.IsEqual(e,Um)?nR():k.IsEqual(e,dI)?Xa():Tte(e)}function yc(e){return k.Keys(e.patternProperties)[0]}function mI(e){let t=yc(e);return XL(t)}function na(e){return e.patternProperties[yc(e)]}function qr(e){return Ge(e,"Record")}function rR(e){return q.Create({"~kind":"Rest"},{type:"rest",items:e},{})}function Hm(e){return Ge(e,"Rest")}function JL(e){return q.Create({"~kind":"This"},{$ref:"#"},e)}function eM(e){return Ge(e,"This")}function fI(e){return q.Create({"~kind":"Undefined"},{type:"undefined"},e)}function gI(e){return Ge(e,"Undefined")}function tM(e){return q.Create({"~kind":"Void"},{type:"void"},e)}function Tu(e){return Ge(e,"Void")}function JPn(e,t){return k.IsEqual(e,"Array")?ki(t[0]):k.IsEqual(e,"Capitalize")?sM(t[0]):k.IsEqual(e,"ConstructorParameters")?cM(t[0]):k.IsEqual(e,"Evaluate")?Nxe(t[0]):k.IsEqual(e,"Exclude")?lM(t[0],t[1]):k.IsEqual(e,"Extract")?uM(t[0],t[1]):k.IsEqual(e,"Index")?lT(t[0],t[1]):k.IsEqual(e,"InstanceType")?pM(t[0]):k.IsEqual(e,"Lowercase")?rM(t[0]):k.IsEqual(e,"NonNullable")?dM(t[0]):k.IsEqual(e,"Omit")?mM(t[0],t[1]):k.IsEqual(e,"Parameters")?fM(t[0]):k.IsEqual(e,"Partial")?gM(t[0]):k.IsEqual(e,"Pick")?RM(t[0],t[1]):k.IsEqual(e,"Readonly")?SM(t[0]):k.IsEqual(e,"KeyOf")?uT(t[0]):k.IsEqual(e,"Record")?ZL(t[0],t[1]):k.IsEqual(e,"Required")?yM(t[0]):k.IsEqual(e,"ReturnType")?IM(t[0]):k.IsEqual(e,"Uncapitalize")?oM(t[0]):k.IsEqual(e,"Uppercase")?aM(t[0]):cT(fd(e),t)}function oR(){throw Error("Unreachable")}var e$n=(e,t=[])=>e.reduce((s,a)=>k.IsArray(a)&&k.IsEqual(a.length,2)?[...s,a[0]]:[...s,a],[]),Rd=e=>{let[t,s]=e;return e$n([...t,...s])};function Fbe(e){return sR(e[0],e[2],e[4])}function Bbe(e){return sR(e[0],e[2],e[2])}function Ube(e){return sR(e[0],vr(),e[2])}function Hbe(e){return sR(e,vr(),vr())}function jbe(e){return Rd(e)}function zbe(e){return e[1]}function Kbe(e){return Rd(e)}function Wbe(e){return e[1]}function Qbe(e){return JPn(e[0],e[1])}function Zbe(e){return null}function Ybe(e){return Rc()}function Xbe(e){return Xa()}function Jbe(e){return FL()}function eEe(e){return fI()}function tEe(e){return cI()}function nEe(e){return nR()}function sEe(e){return XC()}function rEe(e){return vr()}function oEe(e){return aI()}function aEe(e){return ct({})}function iEe(e){return Rn()}function cEe(e){return uI()}function lEe(e){return tM()}function uEe(e){return JL()}function pEe(e){return Lt(BigInt(e))}function dEe(e){return Lt(k.IsEqual(e,"true"))}function mEe(e){return Lt(parseFloat(e))}function fEe(e){return Lt(e)}function gEe(e){return e[1]}function REe(e){return Lt(e)}function SEe(e){return k.IsEqual(e.length,3)?[e[0],e[1],...e[2]]:[e[0]]}function yEe(e){return e[1]}function IEe(e){return nM(e)}function _Ee(e){return k.IsEqual(e.length,6)?Xg(e[1],e[3],e[5]):Xg(e[1],e[3],vr())}function hEe(e){return e.length>0}function vEe(e){return e.reduce((t,s)=>k.IsEqual(s.length,3)?[...t,[s[1]]]:[...t,[]],[])}function CEe(e){return k.IsEqual(e.length,6)?[e[1],e[3],e[5]]:[]}function TEe(e){return k.IsArray(e)&&k.IsEqual(e.length,3)?e[1]:e}function AEe(e){return k.IsEqual(e.length,2)?e[1]:[]}function Obe(e,t){return t.reduce((s,a)=>{let c=a;return k.IsEqual(c.length,1)?lT(s,c[0]):k.IsEqual(c.length,0)?ki(s):oR()},e)}function Nbe(e,t){return k.IsEqual(t.length,3)?iM(e,t[0],t[1],t[2]):e}function t$n(e,t){return k.IsArray(t)&&k.IsEqual(t.length,0)?e:_M(e,t)}function DEe(e){let[t,s,a,c,l]=e;return t$n(Nbe(t?uT(Obe(s,a)):Obe(s,a),c),l)}function Pte(e,t){return k.IsEqual(t.length,3)?(()=>{let[s,a,c]=t,l=Pte(a,c);if(k.IsEqual(s,"&"))return kt(l)?vo([e,...l.allOf]):vo([e,l]);if(k.IsEqual(s,"|"))return Ue(l)?At([e,...l.anyOf]):At([e,l]);oR()})():e}function bEe(e){let[t,s]=e;return Pte(t,s)}function EEe(e){let[t,s]=e;return Pte(t,s)}function xEe(e){return Oxe(e[1])}function PEe(e){return e[1]}function $Ee(e){return Vm(e[0],e[2])}function wEe(e){return k.IsEqual(e.length,4)?QC(e[1],e[3]):k.IsEqual(e.length,2)?QC(e[1],vr()):oR()}function kEe(e){return`${e}`}function LEe(e){return ea(e[3])?Um:Bs(e[3])?dI:Fm(e[3])?il:ta(e[3])?il:oR()}function MEe(e){return e.length>0}function GEe(e){return e.length>0}function OEe(e){let[t,s,a,c,l]=e;return{[s]:t&&a?vu(Iu(l)):t&&!a?vu(l):!t&&a?Iu(l):l}}function NEe(e){return Rd(e)}function VEe(e){return e.reduce((t,s)=>k.HasPropertyKey(s,Um)||k.HasPropertyKey(s,dI)||k.HasPropertyKey(s,il)?[t[0],q.Assign(t[1],s)]:[q.Assign(t[0],s),t[1]],[{},{}])}function qEe(e){return VEe(e[1])}function FEe(e){let[t,s]=e,a=k.IsEqual(k.Keys(s).length,0)?{}:{patternProperties:s};return ct(t,a)}function BEe(e){return k.IsEqual(e.length,5)?vu(Iu(e[4])):k.IsEqual(e.length,3)?e[2]:k.IsEqual(e.length,4)?k.IsEqual(e[2],"readonly")?vu(e[3]):Iu(e[3]):oR()}function UEe(e){return vu(Iu(e[1]))}function HEe(e){return vu(e[1])}function jEe(e){return Iu(e[0])}function zEe(e){return k.IsEqual(e.length,2)?rR(e[1]):k.IsEqual(e.length,1)?e[0]:oR()}function KEe(e){return Rd(e)}function WEe(e){return Hs(e[1])}function QEe(e){return vu(Iu(e[4]))}function ZEe(e){return vu(e[3])}function YEe(e){return Iu(e[3])}function XEe(e){return e[2]}function JEe(e){return k.IsEqual(e.length,2)?rR(e[1]):k.IsEqual(e.length,1)?e[0]:oR()}function exe(e){return Rd(e)}function txe(e){return yu(e[1],e[4])}function nxe(e){return Su(e[2],e[5])}function Vbe(e,t){return k.IsEqual(e,"remove")?Rbe(t):k.IsEqual(e,"add")?vu(t):t}function sxe(e){return k.IsEqual(e.length,2)&&k.IsEqual(e[0],"-")?"remove":k.IsEqual(e.length,2)&&k.IsEqual(e[0],"+")||k.IsEqual(e.length,1)?"add":"none"}function qbe(e,t){return k.IsEqual(e,"remove")?Ibe(t):k.IsEqual(e,"add")?Iu(t):t}function rxe(e){return k.IsEqual(e.length,2)&&k.IsEqual(e[0],"-")?"remove":k.IsEqual(e.length,2)&&k.IsEqual(e[0],"+")||k.IsEqual(e.length,1)?"add":"none"}function oxe(e){return k.IsEqual(e.length,2)?[e[1]]:[]}function axe(e){return k.IsArray(e[6])&&k.IsEqual(e[6].length,1)?aT(JC(e[3]),e[5],e[6][0],Vbe(e[1],qbe(e[8],e[10]))):aT(JC(e[3]),e[5],fd(e[3]),Vbe(e[1],qbe(e[8],e[10])))}function ixe(e){return fd(e)}function cxe(e){return BigInt(e)}function lxe(e){return parseFloat(e)}function uxe(e){return k.IsEqual(e,"true")}function pxe(e){return null}function dxe(e){return{[e[0]]:e[2]}}function mxe(e){return Rd(e)}function n$n(e){return e.reduce((t,s)=>q.Assign(t,s),{})}function fxe(e){return n$n(e[1])}function gxe(e){return Rd(e)}function Rxe(e){return e[1]}function Sxe(e){return XC()}function yxe(e){return Rc()}function Ixe(e){return Xa()}function _xe(e){return nR()}function hxe(e){return Rn()}function vxe(e){return Lt(e)}function Cxe(e){return At(e[1])}function Txe(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function Axe(e){return[e[0],...e[1]]}function Dxe(e){return e[1]}function bxe(e){return Rd(e)}function Exe(e){return k.IsEqual(e.length,2)?e[1]:[]}function xxe(e){let t=e[2],s=e[3],[a,c]=e[4],l=k.IsEqual(k.Keys(c).length,0)?{}:{patternProperties:c};return{[e[1]]:Vm(t,iT(s,a,l))}}function Pxe(e){let t=e[2],[s,a]=e[3],c=k.IsEqual(k.Keys(a).length,0)?{}:{patternProperties:a};return{[e[1]]:iT(t,s,c)}}function $xe(e){return{[e[1]]:Vm(e[2],e[4])}}function wxe(e){return{[e[1]]:e[3]}}function kxe(e){return null}function Lxe(e){return VEe(Rd(e))}function Mxe(e){return e[1]}function Gxe(e){let t=e[0],s=e[1];return Vxe(q.Assign(t,s[0]))}function pT(e){return qt(e.length,2)}function Et(e,t,s){return pT(e)?t(e[0],e[1]):s()}function o$n(e,t){return qt(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function Rs(e,t){for(let s=0;s<e.length;s++){let a=o$n(e[s],t);if(pT(a))return a}return[]}function $te(e,t){return Array.from({length:t-e+1},(s,a)=>String.fromCharCode(e+a))}var qxe=[...$te(97,122),...$te(65,90)],wte="0",kte=$te(49,57),RI=[wte,...kte],Fxe=" ",SI=`
|
|
78
78
|
`;var jm="_",hM=".",Bxe="$",vM="-";var Uxe="//",Hxe="/*",i$n="*/";function jxe(e){let t=e.indexOf(i$n);return qt(t,-1)?"":e.slice(t+2)}function zxe(e){let t=e.indexOf(SI);return qt(t,-1)?"":e.slice(t)}function c$n(e){return e.replace(/^[ \t\r\f\v]+/,"")}function CM(e){let t=c$n(e);return t.startsWith(Hxe)?CM(jxe(t.slice(2))):t.startsWith(Uxe)?CM(zxe(t.slice(2))):t}function Cr(e){let t=e.trimStart();return t.startsWith(Hxe)?Cr(jxe(t.slice(2))):t.startsWith(Uxe)?Cr(zxe(t.slice(2))):t}function TM(e,t){return Et(Rs([e],t),(s,a)=>[s,a],()=>["",t])}function l$n(e,t){return e.includes(t)}function yI(e,t,s,a=""){return Et(Rs(e,s),(c,l)=>l$n(t,c)?yI(e,t,l,a):yI(e,t,l,`${a}${c}`),()=>[a,s])}function u$n(e){return Rs(kte,e)}var p$n=[...RI,jm];function d$n(e){return yI(p$n,[jm],e)}function m$n(e){return Et(Rs([wte],e),(t,s)=>[t,s],()=>Et(u$n(e),(t,s)=>Et(d$n(s),(a,c)=>[`${t}${a}`,c],()=>[]),()=>[]))}function AM(e){return m$n(Cr(e))}function f$n(e){return TM(vM,e)}function g$n(e){return Et(f$n(e),(t,s)=>Et(AM(s),(a,c)=>[`${t}${a}`,c],()=>[]),()=>[])}function Kxe(e){return g$n(Cr(e))}function R$n(e){return Et(Kxe(e),(t,s)=>Et(Rs(["n"],s),(a,c)=>[`${t}`,c],()=>[]),()=>[])}function Lte(e){return R$n(e)}function Mte(e,t){return Rs([e],t)}function K(e,t){return qt(e,"")?["",t]:e.startsWith(SI)?Mte(e,CM(t)):e.startsWith(Fxe)?Mte(e,t):Mte(e,Cr(t))}var Wxe=[...qxe,jm,Bxe];function S$n(e){return Rs(Wxe,e)}var y$n=[...Wxe,...RI];function Qxe(e,t=""){return Et(Rs(y$n,e),(s,a)=>Qxe(a,`${t}${s}`),()=>[t,e])}function I$n(e){return Et(S$n(e),(t,s)=>Et(Qxe(s),(a,c)=>[`${t}${a}`,c],()=>[]),()=>[])}function Ts(e){return I$n(Cr(e))}var _$n=[...RI,jm];function h$n(e){return pT(Rs([hM],e))}function Zxe(e){return Et(yI(_$n,[jm],e),(t,s)=>qt(t,"")?[]:[t,s],()=>[])}function v$n(e){return Et(Rs([hM],e),(t,s)=>Et(Zxe(s),(a,c)=>[`0${t}${a}`,c],()=>[]),()=>[])}function C$n(e){return Et(AM(e),(t,s)=>Et(Rs([hM],s),(a,c)=>Et(Zxe(c),(l,u)=>[`${t}${a}${l}`,u],()=>[`${t}`,c]),()=>[`${t}`,s]),()=>[])}function T$n(e){return h$n(e)?v$n(e):C$n(e)}function Yxe(e){return T$n(Cr(e))}function A$n(e){return TM(vM,e)}function D$n(e){return Et(A$n(e),(t,s)=>Et(Yxe(s),(a,c)=>[`${t}${a}`,c],()=>[]),()=>[])}function DM(e){return D$n(Cr(e))}function b$n(e){return qt(e,"")?[]:[e.slice(0,1),e.slice(1)]}function Xxe(e,t){return LL(e,(s,a)=>t.startsWith(s)?!0:Xxe(a,t),()=>!1)}function zm(e,t,s=""){return Et(b$n(t),(a,c)=>Xxe(e,t)?[s,t]:zm(e,c,`${s}${a}`),()=>[])}function E$n(e,t,s){return Et(Rs([e],s),(a,c)=>Et(zm([t],c),(l,u)=>Et(Rs([t],u),(p,d)=>[`${l}`,d],()=>[]),()=>[]),()=>[])}function x$n(e,t,s){return Et(Rs([e],s),(a,c)=>Et(zm([SI,t],c),(l,u)=>Et(Rs([t],u),(p,d)=>[`${l}`,d],()=>[]),()=>[]),()=>[])}function Jxe(e,t,s,a){return s?E$n(e,t,Cr(a)):x$n(e,t,Cr(a))}function P$n(e,t){return Rs(e,t)}function $$n(e,t){return Jxe(e,e,!1,t)}function w$n(e,t){return Et(P$n(e,t),(s,a)=>$$n(s,`${s}${a}`),()=>[])}function bM(e,t){return w$n(e,Cr(t))}function ePe(e,t){return Et(zm(e,t),(s,a)=>qt(s,"")?[]:[s,a],()=>[])}var A=(e,t,s=()=>[])=>e.length===2?t(e):s(),L$n=e=>A(A(Ts(e),([t,s])=>A(K("extends",s),([a,c])=>A(xt(c),([l,u])=>A(K("=",u),([p,d])=>A(xt(d),([m,S])=>[[t,a,l,p,m],S]))))),([t,s])=>[Fbe(t),s]),M$n=e=>A(A(Ts(e),([t,s])=>A(K("extends",s),([a,c])=>A(xt(c),([l,u])=>[[t,a,l],u]))),([t,s])=>[Bbe(t),s]),G$n=e=>A(A(Ts(e),([t,s])=>A(K("=",s),([a,c])=>A(xt(c),([l,u])=>[[t,a,l],u]))),([t,s])=>[Ube(t),s]),O$n=e=>A(Ts(e),([t,s])=>[Hbe(t),s]),sPe=e=>A(A(L$n(e),([t,s])=>[t,s],()=>A(M$n(e),([t,s])=>[t,s],()=>A(G$n(e),([t,s])=>[t,s],()=>A(O$n(e),([t,s])=>[t,s],()=>[])))),([t,s])=>[t,s]),rPe=(e,t=[])=>A(A(sPe(e),([s,a])=>A(K(",",a),([c,l])=>[[s,c],l])),([s,a])=>rPe(a,[...t,s]),()=>[t,e]),N$n=e=>A(A(rPe(e),([t,s])=>A(A(A(sPe(s),([a,c])=>[[a],c]),([a,c])=>[a,c],()=>A([[],s],([a,c])=>[a,c],()=>[])),([a,c])=>[[t,a],c])),([t,s])=>[jbe(t),s]),Nte=e=>A(A(K("<",e),([t,s])=>A(N$n(s),([a,c])=>A(K(">",c),([l,u])=>[[t,a,l],u]))),([t,s])=>[zbe(t),s]),oPe=(e,t=[])=>A(A(xt(e),([s,a])=>A(K(",",a),([c,l])=>[[s,c],l])),([s,a])=>oPe(a,[...t,s]),()=>[t,e]),V$n=e=>A(A(oPe(e),([t,s])=>A(A(A(xt(s),([a,c])=>[[a],c]),([a,c])=>[a,c],()=>A([[],s],([a,c])=>[a,c],()=>[])),([a,c])=>[[t,a],c])),([t,s])=>[Kbe(t),s]),q$n=e=>A(A(K("<",e),([t,s])=>A(V$n(s),([a,c])=>A(K(">",c),([l,u])=>[[t,a,l],u]))),([t,s])=>[Wbe(t),s]),F$n=e=>A(A(Ts(e),([t,s])=>A(q$n(s),([a,c])=>[[t,a],c])),([t,s])=>[Qbe(t),s]),aPe=e=>A(A(A(K(";",e),([t,s])=>[[t],s]),([t,s])=>[t,s],()=>A([[],e],([t,s])=>[t,s],()=>[])),([t,s])=>[Zbe(t),s]),iPe=e=>A(K("string",e),([t,s])=>[Ybe(t),s]),cPe=e=>A(K("number",e),([t,s])=>[Xbe(t),s]),B$n=e=>A(K("boolean",e),([t,s])=>[Jbe(t),s]),U$n=e=>A(K("undefined",e),([t,s])=>[eEe(t),s]),H$n=e=>A(K("null",e),([t,s])=>[tEe(t),s]),lPe=e=>A(K("integer",e),([t,s])=>[nEe(t),s]),j$n=e=>A(K("bigint",e),([t,s])=>[sEe(t),s]),z$n=e=>A(K("unknown",e),([t,s])=>[rEe(t),s]),K$n=e=>A(K("any",e),([t,s])=>[oEe(t),s]),W$n=e=>A(K("object",e),([t,s])=>[aEe(t),s]),Q$n=e=>A(K("never",e),([t,s])=>[iEe(t),s]),uPe=e=>A(K("symbol",e),([t,s])=>[cEe(t),s]),Z$n=e=>A(K("void",e),([t,s])=>[lEe(t),s]),Y$n=e=>A(K("this",e),([t,s])=>[uEe(t),s]),X$n=e=>A(A(K("${",e),([t,s])=>A(xt(s),([a,c])=>A(K("}",c),([l,u])=>[[t,a,l],u]))),([t,s])=>[gEe(t),s]),Gte=e=>A(zm(["${","`"],e),([t,s])=>[REe(t),s]),pPe=e=>A(A(A(Gte(e),([t,s])=>A(X$n(s),([a,c])=>A(pPe(c),([l,u])=>[[t,a,l],u]))),([t,s])=>[t,s],()=>A(A(Gte(e),([t,s])=>[[t],s]),([t,s])=>[t,s],()=>A(A(Gte(e),([t,s])=>[[t],s]),([t,s])=>[t,s],()=>[]))),([t,s])=>[SEe(t),s]),Vte=e=>A(A(K("`",e),([t,s])=>A(pPe(s),([a,c])=>A(K("`",c),([l,u])=>[[t,a,l],u]))),([t,s])=>[yEe(t),s]),J$n=e=>A(Vte(e),([t,s])=>[IEe(t),s]),ewn=e=>A(A(A(K("if",e),([t,s])=>A(xt(s),([a,c])=>A(K("then",c),([l,u])=>A(xt(u),([p,d])=>A(K("else",d),([m,S])=>A(xt(S),([v,T])=>[[t,a,l,p,m,v],T])))))),([t,s])=>[t,s],()=>A(A(K("if",e),([t,s])=>A(xt(s),([a,c])=>A(K("then",c),([l,u])=>A(xt(u),([p,d])=>[[t,a,l,p],d])))),([t,s])=>[t,s],()=>[])),([t,s])=>[_Ee(t),s]),twn=e=>A(Lte(e),([t,s])=>[pEe(t),s]),nwn=e=>A(A(K("true",e),([t,s])=>[t,s],()=>A(K("false",e),([t,s])=>[t,s],()=>[])),([t,s])=>[dEe(t),s]),swn=e=>A(DM(e),([t,s])=>[mEe(t),s]),rwn=e=>A(bM(["'",'"'],e),([t,s])=>[fEe(t),s]),own=e=>A(A(A(K("keyof",e),([t,s])=>[[t],s]),([t,s])=>[t,s],()=>A([[],e],([t,s])=>[t,s],()=>[])),([t,s])=>[hEe(t),s]),dPe=(e,t=[])=>A(A(A(K("[",e),([s,a])=>A(xt(a),([c,l])=>A(K("]",l),([u,p])=>[[s,c,u],p]))),([s,a])=>[s,a],()=>A(A(K("[",e),([s,a])=>A(K("]",a),([c,l])=>[[s,c],l])),([s,a])=>[s,a],()=>[])),([s,a])=>dPe(a,[...t,s]),()=>[t,e]),awn=e=>A(dPe(e),([t,s])=>[vEe(t),s]),iwn=e=>A(A(A(K("extends",e),([t,s])=>A(xt(s),([a,c])=>A(K("?",c),([l,u])=>A(xt(u),([p,d])=>A(K(":",d),([m,S])=>A(xt(S),([v,T])=>[[t,a,l,p,m,v],T])))))),([t,s])=>[t,s],()=>A([[],e],([t,s])=>[t,s],()=>[])),([t,s])=>[CEe(t),s]),cwn=e=>A(A(A(K("(",e),([t,s])=>A(xt(s),([a,c])=>A(K(")",c),([l,u])=>[[t,a,l],u]))),([t,s])=>[t,s],()=>A(iPe(e),([t,s])=>[t,s],()=>A(cPe(e),([t,s])=>[t,s],()=>A(B$n(e),([t,s])=>[t,s],()=>A(U$n(e),([t,s])=>[t,s],()=>A(H$n(e),([t,s])=>[t,s],()=>A(lPe(e),([t,s])=>[t,s],()=>A(j$n(e),([t,s])=>[t,s],()=>A(z$n(e),([t,s])=>[t,s],()=>A(K$n(e),([t,s])=>[t,s],()=>A(W$n(e),([t,s])=>[t,s],()=>A(Q$n(e),([t,s])=>[t,s],()=>A(uPe(e),([t,s])=>[t,s],()=>A(Z$n(e),([t,s])=>[t,s],()=>A(Y$n(e),([t,s])=>[t,s],()=>A(twn(e),([t,s])=>[t,s],()=>A(nwn(e),([t,s])=>[t,s],()=>A(swn(e),([t,s])=>[t,s],()=>A(rwn(e),([t,s])=>[t,s],()=>A(J$n(e),([t,s])=>[t,s],()=>A(ewn(e),([t,s])=>[t,s],()=>A(hwn(e),([t,s])=>[t,s],()=>A(bwn(e),([t,s])=>[t,s],()=>A(kwn(e),([t,s])=>[t,s],()=>A(wwn(e),([t,s])=>[t,s],()=>A(Own(e),([t,s])=>[t,s],()=>A(F$n(e),([t,s])=>[t,s],()=>A(Nwn(e),([t,s])=>[t,s],()=>[])))))))))))))))))))))))))))),([t,s])=>[TEe(t),s]),lwn=e=>A(A(A(K("with",e),([t,s])=>A(EPe(s),([a,c])=>[[t,a],c])),([t,s])=>[t,s],()=>A([[],e],([t,s])=>[t,s],()=>[])),([t,s])=>[AEe(t),s]),mPe=e=>A(A(own(e),([t,s])=>A(cwn(s),([a,c])=>A(awn(c),([l,u])=>A(iwn(u),([p,d])=>A(lwn(d),([m,S])=>[[t,a,l,p,m],S]))))),([t,s])=>[DEe(t),s]),fPe=e=>A(A(A(K("&",e),([t,s])=>A(mPe(s),([a,c])=>A(fPe(c),([l,u])=>[[t,a,l],u]))),([t,s])=>[t,s],()=>A([[],e],([t,s])=>[t,s],()=>[])),([t,s])=>[t,s]),gPe=e=>A(A(mPe(e),([t,s])=>A(fPe(s),([a,c])=>[[t,a],c])),([t,s])=>[bEe(t),s]),RPe=e=>A(A(A(K("|",e),([t,s])=>A(gPe(s),([a,c])=>A(RPe(c),([l,u])=>[[t,a,l],u]))),([t,s])=>[t,s],()=>A([[],e],([t,s])=>[t,s],()=>[])),([t,s])=>[t,s]),EM=e=>A(A(gPe(e),([t,s])=>A(RPe(s),([a,c])=>[[t,a],c])),([t,s])=>[EEe(t),s]),uwn=e=>A(A(K("readonly",e),([t,s])=>A(EM(s),([a,c])=>[[t,a],c])),([t,s])=>[xEe(t),s]),pwn=e=>A(A(K("|",e),([t,s])=>A(EM(s),([a,c])=>[[t,a],c])),([t,s])=>[PEe(t),s]),dwn=e=>A(A(Nte(e),([t,s])=>A(K("=",s),([a,c])=>A(xt(c),([l,u])=>[[t,a,l],u]))),([t,s])=>[$Ee(t),s]),mwn=e=>A(A(A(K("infer",e),([t,s])=>A(Ts(s),([a,c])=>A(K("extends",c),([l,u])=>A(EM(u),([p,d])=>[[t,a,l,p],d])))),([t,s])=>[t,s],()=>A(A(K("infer",e),([t,s])=>A(Ts(s),([a,c])=>[[t,a],c])),([t,s])=>[t,s],()=>[])),([t,s])=>[wEe(t),s]),xt=e=>A(A(mwn(e),([t,s])=>[t,s],()=>A(pwn(e),([t,s])=>[t,s],()=>A(uwn(e),([t,s])=>[t,s],()=>A(EM(e),([t,s])=>[t,s],()=>[])))),([t,s])=>[t,s]),fwn=e=>A(DM(e),([t,s])=>[kEe(t),s]),gwn=e=>A(Ts(e),([t,s])=>[t,s]),Rwn=e=>A(bM(["'",'"'],e),([t,s])=>[t,s]),Swn=e=>A(A(K("[",e),([t,s])=>A(Ts(s),([a,c])=>A(K(":",c),([l,u])=>A(A(lPe(u),([p,d])=>[p,d],()=>A(cPe(u),([p,d])=>[p,d],()=>A(iPe(u),([p,d])=>[p,d],()=>A(uPe(u),([p,d])=>[p,d],()=>[])))),([p,d])=>A(K("]",d),([m,S])=>[[t,a,l,p,m],S]))))),([t,s])=>[LEe(t),s]),SPe=e=>A(A(fwn(e),([t,s])=>[t,s],()=>A(gwn(e),([t,s])=>[t,s],()=>A(Rwn(e),([t,s])=>[t,s],()=>A(Swn(e),([t,s])=>[t,s],()=>[])))),([t,s])=>[t,s]),ywn=e=>A(A(A(K("readonly",e),([t,s])=>[[t],s]),([t,s])=>[t,s],()=>A([[],e],([t,s])=>[t,s],()=>[])),([t,s])=>[MEe(t),s]),Iwn=e=>A(A(A(K("?",e),([t,s])=>[[t],s]),([t,s])=>[t,s],()=>A([[],e],([t,s])=>[t,s],()=>[])),([t,s])=>[GEe(t),s]),yPe=e=>A(A(ywn(e),([t,s])=>A(SPe(s),([a,c])=>A(Iwn(c),([l,u])=>A(K(":",u),([p,d])=>A(xt(d),([m,S])=>[[t,a,l,p,m],S]))))),([t,s])=>[OEe(t),s]),IPe=e=>A(A(A(K(",",e),([t,s])=>A(K(`
|
|
79
79
|
`,s),([a,c])=>[[t,a],c])),([t,s])=>[t,s],()=>A(A(K(";",e),([t,s])=>A(K(`
|
|
80
80
|
`,s),([a,c])=>[[t,a],c])),([t,s])=>[t,s],()=>A(A(K(",",e),([t,s])=>[[t],s]),([t,s])=>[t,s],()=>A(A(K(";",e),([t,s])=>[[t],s]),([t,s])=>[t,s],()=>A(A(K(`
|
|
81
81
|
`,e),([t,s])=>[[t],s]),([t,s])=>[t,s],()=>[]))))),([t,s])=>[t,s]),_Pe=(e,t=[])=>A(A(yPe(e),([s,a])=>A(IPe(a),([c,l])=>[[s,c],l])),([s,a])=>_Pe(a,[...t,s]),()=>[t,e]),_wn=e=>A(A(_Pe(e),([t,s])=>A(A(A(yPe(s),([a,c])=>[[a],c]),([a,c])=>[a,c],()=>A([[],s],([a,c])=>[a,c],()=>[])),([a,c])=>[[t,a],c])),([t,s])=>[NEe(t),s]),qte=e=>A(A(K("{",e),([t,s])=>A(_wn(s),([a,c])=>A(K("}",c),([l,u])=>[[t,a,l],u]))),([t,s])=>[qEe(t),s]),hwn=e=>A(qte(e),([t,s])=>[FEe(t),s]),vwn=e=>A(A(A(Ts(e),([t,s])=>A(K("?",s),([a,c])=>A(K(":",c),([l,u])=>A(K("readonly",u),([p,d])=>A(xt(d),([m,S])=>[[t,a,l,p,m],S]))))),([t,s])=>[t,s],()=>A(A(Ts(e),([t,s])=>A(K(":",s),([a,c])=>A(K("readonly",c),([l,u])=>A(xt(u),([p,d])=>[[t,a,l,p],d])))),([t,s])=>[t,s],()=>A(A(Ts(e),([t,s])=>A(K("?",s),([a,c])=>A(K(":",c),([l,u])=>A(xt(u),([p,d])=>[[t,a,l,p],d])))),([t,s])=>[t,s],()=>A(A(Ts(e),([t,s])=>A(K(":",s),([a,c])=>A(xt(c),([l,u])=>[[t,a,l],u]))),([t,s])=>[t,s],()=>[])))),([t,s])=>[BEe(t),s]),Cwn=e=>A(A(K("readonly",e),([t,s])=>A(xt(s),([a,c])=>A(K("?",c),([l,u])=>[[t,a,l],u]))),([t,s])=>[UEe(t),s]),Twn=e=>A(A(K("readonly",e),([t,s])=>A(xt(s),([a,c])=>[[t,a],c])),([t,s])=>[HEe(t),s]),Awn=e=>A(A(xt(e),([t,s])=>A(K("?",s),([a,c])=>[[t,a],c])),([t,s])=>[jEe(t),s]),tPe=e=>A(A(vwn(e),([t,s])=>[t,s],()=>A(Cwn(e),([t,s])=>[t,s],()=>A(Twn(e),([t,s])=>[t,s],()=>A(Awn(e),([t,s])=>[t,s],()=>A(xt(e),([t,s])=>[t,s],()=>[]))))),([t,s])=>[t,s]),hPe=e=>A(A(A(K("...",e),([t,s])=>A(tPe(s),([a,c])=>[[t,a],c])),([t,s])=>[t,s],()=>A(A(tPe(e),([t,s])=>[[t],s]),([t,s])=>[t,s],()=>[])),([t,s])=>[zEe(t),s]),vPe=(e,t=[])=>A(A(hPe(e),([s,a])=>A(K(",",a),([c,l])=>[[s,c],l])),([s,a])=>vPe(a,[...t,s]),()=>[t,e]),Dwn=e=>A(A(vPe(e),([t,s])=>A(A(A(hPe(s),([a,c])=>[[a],c]),([a,c])=>[a,c],()=>A([[],s],([a,c])=>[a,c],()=>[])),([a,c])=>[[t,a],c])),([t,s])=>[KEe(t),s]),bwn=e=>A(A(K("[",e),([t,s])=>A(Dwn(s),([a,c])=>A(K("]",c),([l,u])=>[[t,a,l],u]))),([t,s])=>[WEe(t),s]),Ewn=e=>A(A(Ts(e),([t,s])=>A(K("?",s),([a,c])=>A(K(":",c),([l,u])=>A(K("readonly",u),([p,d])=>A(xt(d),([m,S])=>[[t,a,l,p,m],S]))))),([t,s])=>[QEe(t),s]),xwn=e=>A(A(Ts(e),([t,s])=>A(K(":",s),([a,c])=>A(K("readonly",c),([l,u])=>A(xt(u),([p,d])=>[[t,a,l,p],d])))),([t,s])=>[ZEe(t),s]),Pwn=e=>A(A(Ts(e),([t,s])=>A(K("?",s),([a,c])=>A(K(":",c),([l,u])=>A(xt(u),([p,d])=>[[t,a,l,p],d])))),([t,s])=>[YEe(t),s]),$wn=e=>A(A(Ts(e),([t,s])=>A(K(":",s),([a,c])=>A(xt(c),([l,u])=>[[t,a,l],u]))),([t,s])=>[XEe(t),s]),nPe=e=>A(A(Ewn(e),([t,s])=>[t,s],()=>A(xwn(e),([t,s])=>[t,s],()=>A(Pwn(e),([t,s])=>[t,s],()=>A($wn(e),([t,s])=>[t,s],()=>[])))),([t,s])=>[t,s]),CPe=e=>A(A(A(K("...",e),([t,s])=>A(nPe(s),([a,c])=>[[t,a],c])),([t,s])=>[t,s],()=>A(A(nPe(e),([t,s])=>[[t],s]),([t,s])=>[t,s],()=>[])),([t,s])=>[JEe(t),s]),TPe=(e,t=[])=>A(A(CPe(e),([s,a])=>A(K(",",a),([c,l])=>[[s,c],l])),([s,a])=>TPe(a,[...t,s]),()=>[t,e]),APe=e=>A(A(TPe(e),([t,s])=>A(A(A(CPe(s),([a,c])=>[[a],c]),([a,c])=>[a,c],()=>A([[],s],([a,c])=>[a,c],()=>[])),([a,c])=>[[t,a],c])),([t,s])=>[exe(t),s]),wwn=e=>A(A(K("(",e),([t,s])=>A(APe(s),([a,c])=>A(K(")",c),([l,u])=>A(K("=>",u),([p,d])=>A(xt(d),([m,S])=>[[t,a,l,p,m],S]))))),([t,s])=>[txe(t),s]),kwn=e=>A(A(K("new",e),([t,s])=>A(K("(",s),([a,c])=>A(APe(c),([l,u])=>A(K(")",u),([p,d])=>A(K("=>",d),([m,S])=>A(xt(S),([v,T])=>[[t,a,l,p,m,v],T])))))),([t,s])=>[nxe(t),s]),Lwn=e=>A(A(A(K("+",e),([t,s])=>A(K("readonly",s),([a,c])=>[[t,a],c])),([t,s])=>[t,s],()=>A(A(K("-",e),([t,s])=>A(K("readonly",s),([a,c])=>[[t,a],c])),([t,s])=>[t,s],()=>A(A(K("readonly",e),([t,s])=>[[t],s]),([t,s])=>[t,s],()=>A([[],e],([t,s])=>[t,s],()=>[])))),([t,s])=>[sxe(t),s]),Mwn=e=>A(A(A(K("+",e),([t,s])=>A(K("?",s),([a,c])=>[[t,a],c])),([t,s])=>[t,s],()=>A(A(K("-",e),([t,s])=>A(K("?",s),([a,c])=>[[t,a],c])),([t,s])=>[t,s],()=>A(A(K("?",e),([t,s])=>[[t],s]),([t,s])=>[t,s],()=>A([[],e],([t,s])=>[t,s],()=>[])))),([t,s])=>[rxe(t),s]),Gwn=e=>A(A(A(K("as",e),([t,s])=>A(xt(s),([a,c])=>[[t,a],c])),([t,s])=>[t,s],()=>A([[],e],([t,s])=>[t,s],()=>[])),([t,s])=>[oxe(t),s]),Own=e=>A(A(K("{",e),([t,s])=>A(Lwn(s),([a,c])=>A(K("[",c),([l,u])=>A(Ts(u),([p,d])=>A(K("in",d),([m,S])=>A(xt(S),([v,T])=>A(Gwn(T),([x,w])=>A(K("]",w),([L,G])=>A(Mwn(G),([O,U])=>A(K(":",U),([J,ce])=>A(xt(ce),([ke,Ee])=>A(aPe(Ee),([_e,Ce])=>A(K("}",Ce),([Ne,Ve])=>[[t,a,l,p,m,v,x,L,O,J,ke,_e,Ne],Ve]))))))))))))),([t,s])=>[axe(t),s]),Nwn=e=>A(Ts(e),([t,s])=>[ixe(t),s]),Vwn=e=>A(Lte(e),([t,s])=>[cxe(t),s]),qwn=e=>A(DM(e),([t,s])=>[lxe(t),s]),Fwn=e=>A(A(K("true",e),([t,s])=>[t,s],()=>A(K("false",e),([t,s])=>[t,s],()=>[])),([t,s])=>[uxe(t),s]),Bwn=e=>A(bM(['"',"'"],e),([t,s])=>[t,s]),Uwn=e=>A(K("null",e),([t,s])=>[pxe(t),s]),Hwn=e=>A(K("undefined",e),([t,s])=>[void 0,s]),DPe=e=>A(A(SPe(e),([t,s])=>A(K(":",s),([a,c])=>A(Fte(c),([l,u])=>[[t,a,l],u]))),([t,s])=>[dxe(t),s]),bPe=(e,t=[])=>A(A(DPe(e),([s,a])=>A(IPe(a),([c,l])=>[[s,c],l])),([s,a])=>bPe(a,[...t,s]),()=>[t,e]),jwn=e=>A(A(bPe(e),([t,s])=>A(A(A(DPe(s),([a,c])=>[[a],c]),([a,c])=>[a,c],()=>A([[],s],([a,c])=>[a,c],()=>[])),([a,c])=>[[t,a],c])),([t,s])=>[mxe(t),s]),EPe=e=>A(A(K("{",e),([t,s])=>A(jwn(s),([a,c])=>A(K("}",c),([l,u])=>[[t,a,l],u]))),([t,s])=>[fxe(t),s]),xPe=(e,t=[])=>A(A(Fte(e),([s,a])=>A(K(",",a),([c,l])=>[[s,c],l])),([s,a])=>xPe(a,[...t,s]),()=>[t,e]),zwn=e=>A(A(xPe(e),([t,s])=>A(A(A(Fte(s),([a,c])=>[[a],c]),([a,c])=>[a,c],()=>A([[],s],([a,c])=>[a,c],()=>[])),([a,c])=>[[t,a],c])),([t,s])=>[gxe(t),s]),Kwn=e=>A(A(K("[",e),([t,s])=>A(zwn(s),([a,c])=>A(K("]",c),([l,u])=>[[t,a,l],u]))),([t,s])=>[Rxe(t),s]),Fte=e=>A(A(Vwn(e),([t,s])=>[t,s],()=>A(qwn(e),([t,s])=>[t,s],()=>A(Fwn(e),([t,s])=>[t,s],()=>A(Bwn(e),([t,s])=>[t,s],()=>A(Uwn(e),([t,s])=>[t,s],()=>A(Hwn(e),([t,s])=>[t,s],()=>A(EPe(e),([t,s])=>[t,s],()=>A(Kwn(e),([t,s])=>[t,s],()=>[])))))))),([t,s])=>[t,s]),Wwn=e=>A(K("-?(?:0|[1-9][0-9]*)n",e),([t,s])=>[Sxe(t),s]),Qwn=e=>A(K(".*",e),([t,s])=>[yxe(t),s]),Zwn=e=>A(K("-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?",e),([t,s])=>[Ixe(t),s]),Ywn=e=>A(K("-?(?:0|[1-9][0-9]*)",e),([t,s])=>[_xe(t),s]),Xwn=e=>A(K("(?!)",e),([t,s])=>[hxe(t),s]),Jwn=e=>A(ePe(["-?(?:0|[1-9][0-9]*)n",".*","-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?","-?(?:0|[1-9][0-9]*)","(?!)","(",")","$","|"],e),([t,s])=>[vxe(t),s]),ekn=e=>A(A(Wwn(e),([t,s])=>[t,s],()=>A(Qwn(e),([t,s])=>[t,s],()=>A(Zwn(e),([t,s])=>[t,s],()=>A(Ywn(e),([t,s])=>[t,s],()=>A(Xwn(e),([t,s])=>[t,s],()=>A(tkn(e),([t,s])=>[t,s],()=>A(Jwn(e),([t,s])=>[t,s],()=>[]))))))),([t,s])=>[t,s]),tkn=e=>A(A(K("(",e),([t,s])=>A(Bte(s),([a,c])=>A(K(")",c),([l,u])=>[[t,a,l],u]))),([t,s])=>[Cxe(t),s]),PPe=e=>A(A(A(Ote(e),([t,s])=>A(K("|",s),([a,c])=>A(PPe(c),([l,u])=>[[t,a,l],u]))),([t,s])=>[t,s],()=>A(A(Ote(e),([t,s])=>[[t],s]),([t,s])=>[t,s],()=>A([[],e],([t,s])=>[t,s],()=>[]))),([t,s])=>[Txe(t),s]),Ote=e=>A(A(ekn(e),([t,s])=>A(Bte(s),([a,c])=>[[t,a],c])),([t,s])=>[Axe(t),s]),Bte=e=>A(A(PPe(e),([t,s])=>[t,s],()=>A(Ote(e),([t,s])=>[t,s],()=>[])),([t,s])=>[t,s]),rbe=e=>A(A(K("^",e),([t,s])=>A(Bte(s),([a,c])=>A(K("$",c),([l,u])=>[[t,a,l],u]))),([t,s])=>[Dxe(t),s]),$Pe=(e,t=[])=>A(A(xt(e),([s,a])=>A(K(",",a),([c,l])=>[[s,c],l])),([s,a])=>$Pe(a,[...t,s]),()=>[t,e]),nkn=e=>A(A($Pe(e),([t,s])=>A(A(A(xt(s),([a,c])=>[[a],c]),([a,c])=>[a,c],()=>A([[],s],([a,c])=>[a,c],()=>[])),([a,c])=>[[t,a],c])),([t,s])=>[bxe(t),s]),wPe=e=>A(A(A(K("extends",e),([t,s])=>A(nkn(s),([a,c])=>[[t,a],c])),([t,s])=>[t,s],()=>A([[],e],([t,s])=>[t,s],()=>[])),([t,s])=>[Exe(t),s]),skn=e=>A(A(K("interface",e),([t,s])=>A(Ts(s),([a,c])=>A(Nte(c),([l,u])=>A(wPe(u),([p,d])=>A(qte(d),([m,S])=>[[t,a,l,p,m],S]))))),([t,s])=>[xxe(t),s]),rkn=e=>A(A(K("interface",e),([t,s])=>A(Ts(s),([a,c])=>A(wPe(c),([l,u])=>A(qte(u),([p,d])=>[[t,a,l,p],d])))),([t,s])=>[Pxe(t),s]),okn=e=>A(A(K("type",e),([t,s])=>A(Ts(s),([a,c])=>A(Nte(c),([l,u])=>A(K("=",u),([p,d])=>A(xt(d),([m,S])=>[[t,a,l,p,m],S]))))),([t,s])=>[$xe(t),s]),akn=e=>A(A(K("type",e),([t,s])=>A(Ts(s),([a,c])=>A(K("=",c),([l,u])=>A(xt(u),([p,d])=>[[t,a,l,p],d])))),([t,s])=>[wxe(t),s]),ikn=e=>A(A(A(K("export",e),([t,s])=>[[t],s]),([t,s])=>[t,s],()=>A([[],e],([t,s])=>[t,s],()=>[])),([t,s])=>[kxe(t),s]),ckn=e=>A(A(A(K(";",e),([t,s])=>A(K(`
|
|
82
82
|
`,s),([a,c])=>[[t,a],c])),([t,s])=>[t,s],()=>A(A(K(";",e),([t,s])=>[[t],s]),([t,s])=>[t,s],()=>A(A(K(`
|
|
83
|
-
`,e),([t,s])=>[[t],s]),([t,s])=>[t,s],()=>[]))),([t,s])=>[t,s]),kPe=(e,t=[])=>A(A(Ute(e),([s,a])=>A(ckn(a),([c,l])=>[[s,c],l])),([s,a])=>kPe(a,[...t,s]),()=>[t,e]),lkn=e=>A(A(kPe(e),([t,s])=>A(A(A(Ute(s),([a,c])=>[[a],c]),([a,c])=>[a,c],()=>A([[],s],([a,c])=>[a,c],()=>[])),([a,c])=>[[t,a],c])),([t,s])=>[Lxe(t),s]),Ute=e=>A(A(ikn(e),([t,s])=>A(A(skn(s),([a,c])=>[a,c],()=>A(rkn(s),([a,c])=>[a,c],()=>A(okn(s),([a,c])=>[a,c],()=>A(akn(s),([a,c])=>[a,c],()=>[])))),([a,c])=>A(aPe(c),([l,u])=>[[t,a,l],u]))),([t,s])=>[Mxe(t),s]),ukn=e=>A(A(Ute(e),([t,s])=>A(lkn(s),([a,c])=>[[t,a],c])),([t,s])=>[Gxe(t),s]),LPe=e=>A(A(ukn(e),([t,s])=>[t,s],()=>A(dwn(e),([t,s])=>[t,s],()=>A(xt(e),([t,s])=>[t,s],()=>[]))),([t,s])=>[t,s]);function MPe(e){let t=Vte(`\`${e}\``);return k.IsEqual(t.length,2)?t[0]:ws()}function dkn(e){return e.join("|")}function mkn(e){return e.slice(1,e.length-1)}function fkn(e,t,s){return Km(t,`${s}${e}`)}function gkn(e,t){return Km(e,`${t}${XDe}`)}function Rkn(e,t){return Km(e,`${t}${BL}`)}function Skn(e,t){return Km(e,`${t}${HL}`)}function ykn(e,t){return dT(At([Lt("false"),Lt("true")]),e,t)}function Ikn(e,t){return Km(e,`${t}${jL}`)}function _kn(e,t,s){return Km(t,`${s}${mkn(e)}`)}function hkn(e,t,s){let a=mT(e,{});return dT(a,t,s)}function vkn(e,t,s){let a=Li(e);return dT(a,t,s)}function GPe(e,t,s,a=[]){return k.ShiftLeft(e,(c,l)=>GPe(l,t,s,[...a,dT(c,[],"")]),()=>Km(t,`${s}(${dkn(a)})`))}function dT(e,t,s){return Jo(e)?vkn(e.enum,t,s):ea(e)?Rkn(t,s):Wt(e)?fkn(e.const,t,s):Cu(e)?gkn(t,s):gc(e)?ykn(t,s):Bs(e)?Skn(t,s):ta(e)?Ikn(t,s):Us(e)?_kn(e.pattern,t,s):NPe(e)?hkn(e.parameters[0],t,s):Ue(e)?GPe(e.anyOf,t,s):kDe}function Km(e,t){return k.ShiftLeft(e,(s,a)=>dT(s,a,t),()=>t)}function Ckn(e){return`^${Km(e,"")}$`}function OPe(e){let t=Ckn(e);return KL(t)}function mT(e,t){return St(e)?q.Update(OPe(e),{},t):nM(e,t)}function VPe(e,t,s,a){let c=Mi(e,t,s);return mT(c,a)}function nM(e,t={}){return je("TemplateLiteral",[e],t)}function NPe(e){return Js(e)&&k.HasPropertyKey(e,"action")&&k.IsEqual(e.action,"TemplateLiteral")}function qPe(e){return mT(e,{})}function Tkn(e){let t=MPe(e);return qPe(t)}function FPe(e,t={}){let s=k.IsString(e)?Tkn(e):qPe(e);return q.Update(s,{},t)}function Us(e){return Ge(e,"TemplateLiteral")}var at={};Un(at,{ExtendsFalse:()=>ft,ExtendsTrue:()=>we,ExtendsUnion:()=>Hte,IsExtendsFalse:()=>Akn,IsExtendsTrue:()=>UPe,IsExtendsTrueLike:()=>II,IsExtendsUnion:()=>BPe,Match:()=>es});function Hte(e){return q.Create({"~kind":"ExtendsUnion"},{inferred:e})}function BPe(e){return k.IsObject(e)&&k.HasPropertyKey(e,"~kind")&&k.HasPropertyKey(e,"inferred")&&k.IsEqual(e["~kind"],"ExtendsUnion")&&k.IsObject(e.inferred)}function we(e){return q.Create({"~kind":"ExtendsTrue"},{inferred:e})}function UPe(e){return k.IsObject(e)&&k.HasPropertyKey(e,"~kind")&&k.HasPropertyKey(e,"inferred")&&k.IsEqual(e["~kind"],"ExtendsTrue")&&k.IsObject(e.inferred)}function ft(){return q.Create({"~kind":"ExtendsFalse"},{})}function Akn(e){return k.IsObject(e)&&k.HasPropertyKey(e,"~kind")&&k.IsEqual(e["~kind"],"ExtendsFalse")}function II(e){return BPe(e)||UPe(e)}function es(e,t,s){return II(e)?t(e.inferred):s()}function Dkn(e,t,s,a){return es(Ot(e,s,a),c=>we(q.Assign(q.Assign(e,c),{[t]:s})),()=>ft())}function bkn(e,t){return we(e)}function Ekn(e,t,s,a,c){return es(Ot(e,t,s),l=>es(Ot(l,t,a),u=>we(u),()=>ft()),()=>es(Ot(e,t,c),l=>we(l),()=>ft()))}function xkn(e,t,s){let a=Li(s);return Ot(e,t,a)}function HPe(e,t,s){return k.ShiftLeft(s,(a,c)=>es(Ot(e,t,a),l=>HPe(l,t,c),()=>ft()),()=>we(e))}function Pkn(e,t,s){let a=xa(s);return Ot(e,t,a)}function jPe(e,t,s){return k.ShiftLeft(s,(a,c)=>es(Ot(e,t,a),l=>we(l),()=>jPe(e,t,c)),()=>ft())}function Qt(e,t,s){return Fs(s)?bkn(e,t):Cs(s)?Ekn(e,t,s.if,s.then,s.else):Jo(s)?xkn(e,t,s.enum):$s(s)?Dkn(e,s.name,t,s.extends):kt(s)?HPe(e,t,s.allOf):Us(s)?Pkn(e,t,s.pattern):Ue(s)?jPe(e,t,s.anyOf):er(s)?we(e):ft()}function zPe(e,t,s){return $s(s)?Qt(e,t,s):Fs(s)?we(e):er(s)?we(e):Hte(e)}function $kn(e,t){let s=Jg(e),a=Jg(t);return s&&a||!s&&a?!0:!(s&&!a)}function KPe(e,t,s,a){return is(a)?$kn(t,a)?Ot(e,s,a.items):ft():Qt(e,t,a)}function WPe(e,t,s){return Cu(s)?we(e):Qt(e,t,s)}function QPe(e,t,s){return gc(s)?we(e):Qt(e,t,s)}function wkn(e,t,s,a,c){let l=$s(a)?t:a,u=$s(a)?a:t,p=ho(t),d=ho(a);return!p&&d?ft():es(Ot(e,l,u),m=>fT(m,s,c),()=>ft())}function kkn(e,t,s,a){return k.ShiftLeft(a,(c,l)=>wkn(e,t,s,c,l),()=>ho(t)?we(e):ft())}function Lkn(e,t,s){return k.ShiftLeft(t,(a,c)=>kkn(e,a,c,s),()=>we(e))}function fT(e,t,s){return Lkn(e,t,s)}function xM(e,t,s){return Tu(s)?we(e):Ot(e,t,s)}function ZPe(e,t,s,a){return Fs(a)?we(e):er(a)?we(e):pr(a)?es(fT(e,t,a.parameters),c=>xM(c,s,a.instanceType),()=>ft()):ft()}function YPe(e,t,s,a,c){return es(Ot(e,t,c),()=>Ot(e,s,c),()=>Ot(e,a,c))}function XPe(e,t,s){let a=Li(t);return Ot(e,a,s)}function JPe(e,t,s,a){return Fs(a)?we(e):er(a)?we(e):dr(a)?es(fT(e,t,a.parameters),c=>xM(c,s,a.returnType),()=>ft()):ft()}function e$e(e,t,s){return ea(s)?we(e):Bs(s)?we(e):Qt(e,t,s)}function t$e(e,t,s){let a=gs(t);return Ot(e,a,s)}function PM(e,t,s){return t===s?we(e):ft()}function Mkn(e,t,s){return Wt(s)?PM(e,t,s.const):Cu(s)?we(e):Qt(e,Lt(t),s)}function Gkn(e,t,s){return Wt(s)?PM(e,t,s.const):gc(s)?we(e):Qt(e,Lt(t),s)}function Okn(e,t,s){return Wt(s)?PM(e,t,s.const):Bs(s)?we(e):Qt(e,Lt(t),s)}function Nkn(e,t,s){return Wt(s)?PM(e,t,s.const):ta(s)?we(e):Qt(e,Lt(t),s)}function n$e(e,t,s){return k.IsBigInt(t.const)?Mkn(e,t.const,s):k.IsBoolean(t.const)?Gkn(e,t.const,s):k.IsNumber(t.const)?Okn(e,t.const,s):k.IsString(t.const)?Nkn(e,t.const,s):ws()}function s$e(e,t,s){return $s(s)?Qt(e,t,s):we(e)}function r$e(e,t,s){return lI(s)?we(e):Qt(e,t,s)}function o$e(e,t,s){return Bs(s)?we(e):Qt(e,t,s)}function Vkn(e,t,s){return ho(t)?ho(s)?we(e):ft():we(e)}function qkn(e,t,s){return $s(s)&&qm(s.extends)?ft():es(Ot(e,t,s),a=>Vkn(a,t,s),()=>ft())}function Fkn(e,t){return e.reduce((s,a)=>a in t?II(t[a])?{...s,...t[a].inferred}:ws():ws(),{})}function Bkn(e,t,s){let a={};for(let u of k.Keys(s))a[u]=u in t?qkn({},t[u],s[u]):ho(s[u])?$s(s[u])?we(q.Assign(e,{[s[u].name]:s[u].extends})):we(e):ft();let c=k.Values(a).every(u=>II(u)),l=c?Fkn(k.Keys(a),a):{};return c?we(l):ft()}function Ukn(e,t,s){let a=Bkn(e,t,s);return II(a)?we(q.Assign(e,a.inferred)):ft()}function Hkn(e,t,s){return Ukn(e,t,s)}function jkn(e,t){return k.Keys(t).reduce((s,a)=>({...s,[a]:k.HasPropertyKey(e,a)?Ue(s[a])?At([...s[a].anyOf,t[a]]):At([e[a],t[a]]):t[a]}),e)}function a$e(e,t,s,a){return k.ShiftLeft(t,(c,l)=>es(Ot({},e[c],s),u=>a$e(e,l,s,jkn(a,u)),()=>ft()),()=>we(a))}function zkn(e,t,s,a){let c=k.Keys(t);return a$e(t,c,a,e)}function i$e(e,t,s){return qr(s)?zkn(e,t,yc(s),na(s)):Ht(s)?Hkn(e,t,s.properties):Qt(e,ct(t),s)}function Kkn(e,t){return k.IsEqual(k.Keys(t).length,0)?we(e):ft()}function Wkn(e,t,s,a,c){return Ot(e,s,c)}function c$e(e,t,s,a){return qr(a)?Wkn(e,XL(t),s,XL(yc(a)),na(a)):Ht(a)?Kkn(e,a.properties):Fs(a)?we(e):er(a)?we(e):ft()}function l$e(e,t,s){return ta(s)?we(e):Qt(e,t,s)}function u$e(e,t,s){return Fm(s)?we(e):Qt(e,t,s)}function p$e(e,t,s){let a=xa(t);return Ot(e,a,s)}function jte(e,t){return q.Create({"~kind":"Inferrable"},{name:e,type:t},{})}function gT(e){return k.IsObject(e)&&k.HasPropertyKey(e,"~kind")&&k.HasPropertyKey(e,"name")&&k.HasPropertyKey(e,"type")&&k.IsEqual(e["~kind"],"Inferrable")&&k.IsString(e.name)&&k.IsObject(e.type)}function zte(e){return Hm(e)?$s(e.items)?is(e.items.extends)?jte(e.items.name,e.items.extends.items):er(e.items.extends)?jte(e.items.name,e.items.extends):void 0:ws():void 0}function $M(e){return $s(e)?jte(e.name,e.extends):void 0}function Kte(e,t,s=[]){return k.ShiftLeft(e,(a,c)=>es(Ot({},a,t),()=>Kte(c,t,[...s,a]),()=>{}),()=>s)}function d$e(e,t,s,a){let c=Kte(s,a);return k.IsArray(c)?we(q.Assign(e,{[t]:Hs(c)})):ft()}function wM(e,t,s,a){let c=Kte(s,a);return k.IsArray(c)?we(q.Assign(e,{[t]:At(c)})):ft()}function Qkn(e){return[...e].reverse()}function Wte(e,t){return t?Qkn(e):e}function Zkn(e){let t=e.length>0?e[0]:void 0,s=Js(t)?zte(t):void 0;return Js(s)}function Ykn(e,t,s,a,c,l){return es(Ot(e,s,c),u=>m$e(u,t,a,l),()=>ft())}function Xkn(e,t,s,a,c){let l=zte(a);return gT(l)?d$e(e,l.name,Wte(s,t),l.type):k.ShiftLeft(s,(u,p)=>Ykn(e,t,u,p,a,c),()=>ft())}function Jkn(e,t,s,a){return k.ShiftLeft(a,(c,l)=>Xkn(e,t,s,c,l),()=>k.IsEqual(s.length,0)?we(e):ft())}function m$e(e,t,s,a){return Jkn(e,t,s,a)}function eLn(e,t,s){let a=Wm(e,Hn([],[]),s),c=Zkn(a);return m$e(e,c,Wte(t,c),Wte(a,c))}function f$e(e,t,s){let a=$M(s);return gT(a)?wM(e,a.name,t,a.type):k.ShiftLeft(t,(c,l)=>es(Ot(e,c,s),u=>f$e(u,l,s),()=>ft()),()=>we(e))}function g$e(e,t,s){let a=Wm(e,Hn([],[]),t);return Pn(s)?eLn(e,a,s.items):is(s)?f$e(e,a,s.items):Qt(e,Hs(a),s)}function R$e(e,t,s){return Tu(s)?we(e):gI(s)?we(e):Qt(e,t,s)}function S$e(e,t,s){return k.ShiftLeft(s,(a,c)=>es(Ot(e,t,a),l=>we(l),()=>S$e(e,t,c)),()=>ft())}function Qte(e,t,s){return k.ShiftLeft(t,(a,c)=>es(S$e(e,a,s),l=>Qte(l,c,s),()=>ft()),()=>we(e))}function y$e(e,t,s){let a=$M(s);return gT(a)?wM(e,a.name,t,a.type):Ue(s)?Qte(e,t,s.anyOf):Qte(e,t,[s])}function I$e(e,t,s){return $s(s)?Qt(e,t,s):Fs(s)?we(e):er(s)?we(e):ft()}function _$e(e,t,s){return Tu(s)?we(e):Qt(e,t,s)}function Ot(e,t,s){return Fs(t)?zPe(e,t,s):is(t)?KPe(e,t,t.items,s):Cu(t)?WPe(e,t,s):gc(t)?QPe(e,t,s):pr(t)?ZPe(e,t.parameters,t.instanceType,s):Cs(t)?YPe(e,t.if,t.then,t.else,s):Jo(t)?XPe(e,t.enum,s):dr(t)?JPe(e,t.parameters,t.returnType,s):ea(t)?e$e(e,t,s):kt(t)?t$e(e,t.allOf,s):Wt(t)?n$e(e,t,s):qm(t)?s$e(e,t,s):lI(t)?r$e(e,t,s):Bs(t)?o$e(e,t,s):Ht(t)?i$e(e,t.properties,s):qr(t)?c$e(e,yc(t),na(t),s):ta(t)?l$e(e,t,s):Fm(t)?u$e(e,t,s):Us(t)?p$e(e,t.pattern,s):Pn(t)?g$e(e,t.items,s):gI(t)?R$e(e,t,s):Ue(t)?y$e(e,t.anyOf,s):er(t)?I$e(e,t,s):Tu(t)?_$e(e,t,s):ft()}function tLn(e,t){return gs([...e,ct(t)])}function Zte(e,t,s){return St(e)?q.Update(tLn(e,t),{},s):iT(e,t,s)}function h$e(e,t,s,a,c){let l=Mi(e,t,s),u=RT(e,t,a);return Zte(l,u,c)}function iT(e,t,s={}){return je("Interface",[e,t],s)}function _I(e){return Js(e)&&k.HasPropertyKey(e,"action")&&k.IsEqual(e.action,"Interface")}function v$e(e,t,s={}){return Zte(e,t,s)}function nLn(e,t,s){return e.includes(s)?!0:ST([...e,s],t,t[s])}function C$e(e,t,s){let a=OL(s);return aR(e,t,a)}function aR(e,t,s){return k.ShiftLeft(s,(a,c)=>ST(e,t,a)?!0:aR(e,t,c),()=>!1)}function ST(e,t,s){return mr(s)?nLn(e,t,s.$ref):is(s)?ST(e,t,s.items):pr(s)?aR(e,t,[...s.parameters,s.instanceType]):dr(s)?aR(e,t,[...s.parameters,s.returnType]):_I(s)?C$e(e,t,s.parameters[1]):kt(s)?aR(e,t,s.allOf):Ht(s)?C$e(e,t,s.properties):Ue(s)?aR(e,t,s.anyOf):Pn(s)?aR(e,t,s.items):qr(s)?ST(e,t,na(s)):!1}function T$e(e,t,s){return ST(e,t,s)}function sLn(e,t){return t.reduce((s,a)=>T$e([a],e,e[a])?[...s,a]:s,[])}function A$e(e){let t=GL(e);return sLn(e,t)}function rLn(e,t,s){return s.includes(t)?s:t in e?yT(e,e[t],[...s,t]):ws()}function D$e(e,t,s){let a=OL(t);return hI(e,a,s)}function hI(e,t,s){return t.reduce((a,c)=>yT(e,c,a),s)}function yT(e,t,s){return mr(t)?rLn(e,t.$ref,s):is(t)?yT(e,t.items,s):pr(t)?hI(e,[...t.parameters,t.instanceType],s):dr(t)?hI(e,[...t.parameters,t.returnType],s):_I(t)?D$e(e,t.parameters[1],s):kt(t)?hI(e,t.allOf,s):Ht(t)?D$e(e,t.properties,s):Ue(t)?hI(e,t.anyOf,s):Pn(t)?hI(e,t.items,s):qr(t)?yT(e,na(t),s):s}function b$e(e,t,s){return yT(e,s,[t])}function oLn(e){return aI()}function aLn(e){return k.Keys(e).reduce((t,s)=>({...t,[s]:iR(e[s])}),{})}function IT(e){return e.reduce((t,s)=>[...t,iR(s)],[])}function iR(e){return mr(e)?oLn(e.$ref):is(e)?ki(iR(e.items),ML(e)):pr(e)?Su(IT(e.parameters),iR(e.instanceType)):dr(e)?yu(IT(e.parameters),iR(e.returnType)):kt(e)?vo(IT(e.allOf)):Ht(e)?ct(aLn(e.properties)):qr(e)?YL(mI(e),iR(na(e))):Ue(e)?At(IT(e.anyOf)):Pn(e)?Hs(IT(e.items)):e}function iLn(e,t){return t in e?iR(e[t]):vr()}function E$e(e){return iLn(e.$defs,e.$ref)}function cLn(e,t,s){let a=Mi(e,Hn([],[]),t),c=RT({},Hn([],[]),s);return gs([...a,ct(c)])}function lLn(e,t){return k.Keys(e).filter(a=>t.includes(a)).reduce((a,c)=>{let l=e[c],u=_I(l)?cLn(e,l.parameters[0],l.parameters[1]):l;return{...a,[c]:u}},{})}function x$e(e,t,s){let a=b$e(e,t,s),c=lLn(e,a);return _u(c,t)}function P$e(e,t){return t in e?mr(e[t])?P$e(e,e[t].$ref):e[t]:Rn()}function Au(e,t){return P$e(e,t)}function $$e(e){return Nr(e)?E$e(e):NL(e)?vr():e}function Vr(e,t,s){let a=$$e(t),c=$$e(s);return Ot(e,a,c)}var tT="equal",uLn="disjoint",nT="left-inside",sT="right-inside";function pI(e,t){let s=[er(e)?at.ExtendsFalse():Vr({},e,t),er(e)?at.ExtendsTrue({}):Vr({},t,e)];return at.IsExtendsTrueLike(s[0])&&at.IsExtendsTrueLike(s[1])?tT:at.IsExtendsTrueLike(s[0])&&at.IsExtendsFalse(s[1])?nT:at.IsExtendsFalse(s[0])&&at.IsExtendsTrueLike(s[1])?sT:uLn}function pLn(e,t){return t.filter(s=>pI(e,s)!==sT)}function dLn(e,t){let s=t.some(a=>{let c=pI(e,a);return k.IsEqual(c,nT)||k.IsEqual(c,tT)});return k.IsEqual(s,!1)}function mLn(e,t){let s=Sc(e);return Fs(s)?[s]:dLn(s,t)?[...pLn(s,t),s]:t}function fLn(e){return e.reduce((t,s)=>Ht(s)?[...t,s]:qm(s)?t:mLn(s,t),[])}function Ete(e){let t=fLn(e);return oT(t)}function Yte(e,t){return q.Update(Sc(e),{},t)}function w$e(e,t,s,a){let c=ve(e,t,s);return Yte(c,a)}function _T(e,t=[]){return Nm(e)&&k.IsEqual(e.action,"Conditional")?mr(e.parameters[0])?_T(e.parameters[2],_T(e.parameters[3],[...t,e.parameters[0].$ref])):_T(e.parameters[2],_T(e.parameters[3],t)):Nm(e)&&k.IsEqual(e.action,"Mapped")&&Nm(e.parameters[1])&&k.IsEqual(e.parameters[1].action,"KeyOf")&&mr(e.parameters[1].parameters[0])?[...t,e.parameters[1].parameters[0].$ref]:t}function gLn(e,t){return e.reduce((s,a)=>[...s,t.includes(a.name)],[])}function M$e(e,t,s=[]){return k.ShiftLeft(e,(a,c)=>k.ShiftLeft(t,(l,u)=>M$e(c,u,[...s,[l,a]]),()=>s),()=>s)}function RLn(e){return Ue(e)?[...e.anyOf]:[e]}function SLn(e,t){return e.reduce((s,a)=>[...s,[...a,t]],[])}function k$e(e,t){return t.reduce((s,a)=>[...s,...SLn(e,a)],[])}function L$e(e){return e.reduce((t,s)=>k.IsEqual(s[0],!0)?k$e(t,RLn(s[1])):k$e(t,[s[1]]),[[]])}function G$e(e,t,s){let a=_T(s),c=gLn(e,a),l=M$e(t,c);return Nm(s)&&k.IsEqual(s.action,"Conditional")||Nm(s)&&k.IsEqual(s.action,"Mapped")?L$e(l):[t]}function yLn(){return["(not-resolvable)",Rn()]}function ILn(){return["(not-generic)",Rn()]}function _Ln(e,t,s){return[e,Vm(t,s)]}function hLn(e,t,s){return t in e?O$e(e,t,e[t],s):yLn()}function O$e(e,t,s,a){return oI(s)?_Ln(t,s.parameters,s.expression):mr(s)?hLn(e,s.$ref,a):ILn()}function N$e(e,t,s){return O$e(e,"(anonymous)",t,s)}function vLn(e,t,s){if($s(t)||vI(t)||at.IsExtendsTrueLike(Vr({},t,s)))return;let a={parameter:e,expect:s,actual:t};throw new Error(`Argument for parameter ${e} does not satisfy constraint`,{cause:a})}function V$e(e,t,s,a,c){let l=ve(e,t,c);return vLn(s,l,a),q.Assign(e,{[s]:l})}function CLn(e,t,s,a,c){let l=ve(e,t,s.extends),u=ve(e,t,s.equals);return k.ShiftLeft(c,(p,d)=>Xte(V$e(e,t,s.name,l,p),t,a,d),()=>Xte(V$e(e,t,s.name,l,u),t,a,[]))}function Xte(e,t,s,a){return k.ShiftLeft(s,(c,l)=>CLn(e,t,c,l,a),()=>e)}function q$e(e,t,s,a){return Xte(e,t,s,a)}function TLn(e){return k.IsGreaterThan(e.callstack.length,0)?e.callstack[e.callstack.length-1]:""}function ALn(e,t){return k.IsEqual(TLn(e),t)}function DLn(e,t,s,a,c,l){let u=q$e(e,t,a,l),p=ve(u,Hn([...t.callstack,s.$ref],t.visited),c);return ve(u,Hn([],[]),p)}function bLn(e,t,s,a,c,l){return l.reduce((u,p)=>[...u,DLn(e,t,s,a,c,p)],[])}function ELn(e,t,s,a,c,l){let u=G$e(a,l,c),p=bLn(e,t,s,a,c,u);return k.IsEqual(p.length,1)?p[0]:Ja(p)}function kM(e,t,s,a){let c=Mi(e,t,a),l=N$e(e,s,a),u=l[0],p=l[1];return oI(p)?ALn(t,u)?cT(fd(u),c):ELn(e,t,fd(u),p.parameters,p.expression,c):cT(s,c)}function cT(e,t){return q.Create({"~kind":"Call"},{type:"call",target:e,arguments:t},{})}function F$e(e,t){return kM({},Hn([],[]),e,t)}function vI(e){return Ge(e,"Call")}function xLn(e){return q.Discard(e,["~immutable"])}function B$e(e,t){return q.Update(xLn(e),{},t)}function U$e(e,t,s,a){let c=ve(e,t,s);return B$e(c,a)}function H$e(e,t){return e(t)}function j$e(e,t){return k.IsString(t)?Lt(H$e(e,t)):Lt(t)}function z$e(e,t){let s=xa(t);return Sd(e,s)}function K$e(e,t){let s=t.map(a=>Sd(e,a));return At(s)}function Sd(e,t){return Wt(t)?j$e(e,t.const):Us(t)?z$e(e,t.pattern):Ue(t)?K$e(e,t.anyOf):t}function sM(e,t={}){return je("Capitalize",[e],t)}function W$e(e,t={}){return Jte(e,t)}function rM(e,t={}){return je("Lowercase",[e],t)}function Q$e(e,t={}){return ene(e,t)}function oM(e,t={}){return je("Uncapitalize",[e],t)}function Z$e(e,t={}){return tne(e,t)}function aM(e,t={}){return je("Uppercase",[e],t)}function Y$e(e,t={}){return nne(e,t)}var PLn=e=>e[0].toUpperCase()+e.slice(1),$Ln=e=>e.toLowerCase(),wLn=e=>e[0].toLowerCase()+e.slice(1),kLn=e=>e.toUpperCase();function Jte(e,t){return St([e])?q.Update(Sd(PLn,e),{},t):sM(e,t)}function ene(e,t){return St([e])?q.Update(Sd($Ln,e),{},t):rM(e,t)}function tne(e,t){return St([e])?q.Update(Sd(wLn,e),{},t):oM(e,t)}function nne(e,t){return St([e])?q.Update(Sd(kLn,e),{},t):aM(e,t)}function X$e(e,t,s,a){let c=ve(e,t,s);return Jte(c,a)}function J$e(e,t,s,a){let c=ve(e,t,s);return ene(c,a)}function ewe(e,t,s,a){let c=ve(e,t,s);return tne(c,a)}function twe(e,t,s,a){let c=ve(e,t,s);return nne(c,a)}function iM(e,t,s,a,c={}){return je("Conditional",[e,t,s,a],c)}function nwe(e,t,s,a,c={}){return sne({},Hn([],[]),e,t,s,a,c)}function LLn(e,t,s,a,c,l){let u=Vr(e,s,a);return at.IsExtendsUnion(u)?At([ve(u.inferred,t,c),ve(e,t,l)]):at.IsExtendsTrue(u)?ve(u.inferred,t,c):ve(e,t,l)}function sne(e,t,s,a,c,l,u){return St([s,a])?q.Update(LLn(e,t,s,a,c,l),{},u):iM(s,a,c,l,u)}function swe(e,t,s,a,c,l,u){let p=ve(e,t,s),d=ve(e,t,a);return sne(e,t,p,d,c,l,u)}function cM(e,t={}){return je("ConstructorParameters",[e],t)}function rwe(e,t={}){return rne(e,t)}function MLn(e){let t=pr(e)?e.parameters:[],s=Wm({},Hn([],[]),t);return Hs(s)}function rne(e,t){return St([e])?q.Update(MLn(e),{},t):cM(e,t)}function owe(e,t,s,a){let c=ve(e,t,s);return rne(c,a)}function lM(e,t,s={}){return je("Exclude",[e,t],s)}function awe(e,t,s={}){return hT(e,t,s)}function hT(e,t,s){return St([e,t])?q.Update(QL(e,t),{},s):lM(e,t,s)}function iwe(e,t,s,a,c){let l=ve(e,t,s),u=ve(e,t,a);return hT(l,u,c)}function uM(e,t,s={}){return je("Extract",[e,t],s)}function cwe(e,t,s={}){return one(e,t,s)}function GLn(e,t){let s=Vr({},e,t);return at.IsExtendsTrueLike(s)?[e]:[]}function OLn(e,t){return e.reduce((s,a)=>[...s,...GLn(a,t)],[])}function lwe(e,t){let s=Sc(e),a=Ue(s)?s.anyOf:[s],c=OLn(a,t);return Ja(c)}function one(e,t,s){return St([e,t])?q.Update(lwe(e,t),{},s):uM(e,t,s)}function uwe(e,t,s,a,c){let l=ve(e,t,s),u=ve(e,t,a);return one(l,u,c)}function NLn(e){return e.reduce((t,s)=>UL(s)?[...t,Lt(s)]:t,[])}function CI(e){let t=NLn(e);return At(t)}function lT(e,t,s={}){return je("Index",[e,t],s)}function pwe(e,t,s={}){let a=k.IsArray(t)?CI(t):t;return ane(e,a,s)}function dwe(e,t){let s=Au(e,t);return Gi(s)}function mwe(e,t,s){let a=cl(e,t,s);return Gi(a)}function VLn(e,t){let s=k.Keys(e).filter(S=>!k.HasPropertyKey(t,S)),a=k.Keys(t).filter(S=>!k.HasPropertyKey(e,S)),c=k.Keys(e).filter(S=>k.HasPropertyKey(t,S)),l=s.reduce((S,v)=>({...S,[v]:e[v]}),{}),u=a.reduce((S,v)=>({...S,[v]:t[v]}),{}),p=c.reduce((S,v)=>({...S,[v]:gs([e[v],t[v]])}),{}),d=q.Assign(l,u);return q.Assign(d,p)}function fwe(e){return e.reduce((t,s)=>VLn(t,Gi(s)),{})}function gwe(e){let t=_be(Hs(e));return Gi(t)}function qLn(e,t){return k.Keys(e).filter(c=>c in t).reduce((c,l)=>({...c,[l]:Ja([e[l],t[l]])}),{})}function Rwe(e,t){return k.ShiftLeft(e,(s,a)=>Rwe(a,qLn(t,Gi(s))),()=>t)}function Swe(e){return k.ShiftLeft(e,(t,s)=>Rwe(s,Gi(t)),()=>ws())}function Gi(e){return Nr(e)?dwe(e.$defs,e.$ref):Cs(e)?mwe(e.if,e.then,e.else):kt(e)?fwe(e.allOf):Ue(e)?Swe(e.anyOf):Pn(e)?gwe(e.items):Ht(e)?e.properties:{}}function TI(e){let t=Gi(e);return ct(t)}var FLn=new RegExp("^(?:0|[1-9][0-9]*)$");function AI(e){let t=`${e}`;return FLn.test(t)?parseInt(t):e}function BLn(e){return Lt(AI(e))}function ywe(e){return e.map(t=>Iwe(t))}function Iwe(e){return kt(e)?vo(ywe(e.allOf)):Ue(e)?At(ywe(e.anyOf)):Wt(e)?BLn(e.const):e}function _we(e,t){let s=Iwe(t),a=Vr({},s,Xa());return at.IsExtendsTrueLike(a)?e:Wt(t)&&k.IsEqual(t.const,"length")?Xa():Rn()}function hwe(e,t){let s=Au(e,t);return ei(s)}function vwe(e,t,s){let a=cl(e,t,s);return ei(a)}function Cwe(e){let t=Li(e);return ei(t)}function Twe(e){let t=gs(e);return ei(t)}function Awe(e){return[`${e}`]}function Dwe(e){let t=xa(e);return ei(t)}function bwe(e){return e.reduce((t,s)=>[...t,...ei(s)],[])}function ei(e){return Nr(e)?hwe(e.$defs,e.$ref):Cs(e)?vwe(e.if,e.then,e.else):Jo(e)?Cwe(e.enum):kt(e)?Twe(e.allOf):Wt(e)?Awe(e.const):Us(e)?Dwe(e.pattern):Ue(e)?bwe(e.anyOf):[]}function DI(e){return ei(e)}function vT(e,t){return t.map(s=>CT(e,s))}function CT(e,t){return is(t)?ki(CT(e,t.items)):pr(t)?Su(vT(e,t.parameters),CT(e,t.instanceType)):dr(t)?yu(vT(e,t.parameters),CT(e,t.returnType)):Pn(t)?Hs(vT(e,t.items)):Ue(t)?At(vT(e,t.anyOf)):kt(t)?vo(vT(e,t.allOf)):eM(t)?ct(e):t}function Ewe(e,t){return CT(e,t)}function ULn(e,t){let s=t in e?e[t]:Rn();return Ewe(e,s)}function xwe(e,t){return t.reduce((s,a)=>[...s,ULn(e,a)],[])}function HLn(e,t){let s=DI(t),a=xwe(e,s);return Ja(a)}var jLn=new RegExp(Um);function zLn(e){return e.filter(s=>jLn.test(s))}function KLn(e){let t=GL(e),s=zLn(t),a=xwe(e,s);return Ja(a)}function Pwe(e,t){return Bs(t)?KLn(e):HLn(e,t)}function WLn(e){return Lt(AI(e))}function $we(e){return e.map(t=>ine(t))}function ine(e){return kt(e)?vo($we(e.allOf)):Ue(e)?At($we(e.anyOf)):Wt(e)?WLn(e.const):e}function QLn(e,t){return e.reduceRight((s,a,c)=>{let l=Vr({},Lt(c),t);return at.IsExtendsTrueLike(l)?[a,...s]:s},[])}function ZLn(e,t){let s=ine(t),a=QLn(e,s);return gd(a)}function YLn(e){return gd(e)}function wwe(e,t){return Wt(t)&&k.IsEqual(t.const,"length")?Lt(e.length):Bs(t)||ea(t)?YLn(e):ZLn(e,t)}function kwe(e,t){return is(e)?_we(e.items,t):Ht(e)?Pwe(e.properties,t):Pn(e)?wwe(e.items,t):Rn()}function XLn(e){return Nr(e)||Cs(e)||kt(e)||Ue(e)?TI(e):e}function ane(e,t,s){return St([e,t])?q.Update(kwe(XLn(e),t),{},s):lT(e,t,s)}function Lwe(e,t,s,a,c){let l=ve(e,t,s),u=ve(e,t,a);return ane(l,u,c)}function pM(e,t={}){return je("InstanceType",[e],t)}function Mwe(e,t={}){return cne(e,t)}function JLn(e){return pr(e)?e.instanceType:Rn()}function cne(e,t){return St([e])?q.Update(JLn(e),{},t):pM(e,t)}function Gwe(e,t,s,a={}){let c=ve(e,t,s);return cne(c,a)}function uT(e,t={}){return je("KeyOf",[e],t)}function Owe(e,t={}){return lne(e,t)}function Nwe(){return At([Xa(),Rc(),uI()])}function Vwe(e){return Xa()}function eMn(e){return e.reduce((s,a)=>UL(a)?[...s,Lt(AI(a))]:ws(),[])}function qwe(e){let t=k.Keys(e),s=eMn(t);return gd(s)}function Fwe(e){return mI(e)}function Bwe(e){let t=e.map((s,a)=>Lt(a));return gd(t)}function Uwe(e){return Fs(e)?Nwe():is(e)?Vwe(e.items):Ht(e)?qwe(e.properties):qr(e)?Fwe(e):Pn(e)?Bwe(e.items):Rn()}function tMn(e){return Nr(e)||Cs(e)||kt(e)||Ue(e)?TI(e):e}function lne(e,t){return St([e])?q.Update(Uwe(tMn(e)),{},t):uT(e,t)}function Hwe(e,t,s,a){let c=ve(e,t,s);return lne(c,a)}function aT(e,t,s,a,c={}){return je("Mapped",[e,t,s,a],c)}function jwe(e,t,s,a,c={}){return une({},Hn([],[]),e,t,s,a,c)}function nMn(e){let t=xa(e);return LM(t)}function sMn(e){return e.reduce((t,s)=>[...t,...LM(s)],[])}function rMn(e){let t=Li(e);return LM(t)}function oMn(e){return k.IsNumber(e)?[Lt(`${e}`)]:[Lt(e)]}function LM(e){return Jo(e)?rMn(e.enum):Wt(e)?oMn(e.const):Us(e)?nMn(e.pattern):Ue(e)?sMn(e.anyOf):[e]}function zwe(e){return LM(e)}function aMn(e){return Us(e)?xa(e.pattern):e}function iMn(e,t,s,a,c,l){let u=q.Assign(e,{[s.name]:a}),p=ve(u,t,c),d=aMn(p),m=ve(u,t,l);return ebe(d)||tbe(d)?{[d.const]:m}:{}}function cMn(e,t,s,a,c,l){return a.reduce((u,p)=>[...u,iMn(e,t,s,p,c,l)],[])}function lMn(e){return e.reduce((t,s)=>[...t,ct(s)],[])}function Kwe(e,t,s,a,c,l){let u=zwe(a),p=cMn(e,t,s,u,c,l),d=lMn(p);return gs(d)}function une(e,t,s,a,c,l,u){return St([a])?q.Update(Kwe(e,t,s,a,c,l),{},u):aT(s,a,c,l,u)}function Wwe(e,t,s,a,c,l,u){let p=ve(e,t,a);return une(e,t,s,p,c,l,u)}function uMn(e,t,s){let a=q.Assign(e,t);return k.Keys(t).filter(l=>s.includes(l)).reduce((l,u)=>({...l,[u]:x$e(a,u,t[u])}),{})}function pMn(e,t,s){let a=q.Assign(e,t);return k.Keys(t).filter(l=>!s.includes(l)).reduce((l,u)=>({...l,[u]:ve(a,Hn([],[]),t[u])}),{})}function dMn(e,t,s){let a=A$e(t),c=uMn(e,t,a),l=pMn(e,t,a),u={...c,...l};return q.Update(u,{},s)}function MM(e,t,s,a){return dMn(e,s,a)}function dM(e,t={}){return je("NonNullable",[e],t)}function Qwe(e,t={}){return pne(e,t)}function mMn(e){let t=At([cI(),fI()]);return hT(e,t,{})}function pne(e,t){return St([e])?q.Update(mMn(e),{},t):dM(e,t)}function Zwe(e,t,s,a){let c=ve(e,t,s);return pne(c,a)}function mM(e,t,s={}){return je("Omit",[e,t],s)}function Ywe(e,t,s={}){let a=k.IsArray(t)?CI(t):t;return dne(e,a,s)}function GM(e){let t=TI(e);return Ht(t)?t.properties:ws()}function fMn(e,t){return k.Keys(e).reduce((a,c)=>t.includes(c)?a:{...a,[c]:e[c]},{})}function Xwe(e,t){let s=GM(e),a=DI(t),c=fMn(s,a);return ct(c)}function dne(e,t,s){return St([e,t])?q.Update(Xwe(e,t),{},s):mM(e,t,s)}function Jwe(e,t,s,a,c){let l=ve(e,t,s),u=ve(e,t,a);return dne(l,u,c)}function fM(e,t={}){return je("Parameters",[e],t)}function eke(e,t={}){return mne(e,t)}function gMn(e){let t=dr(e)?e.parameters:[],s=Wm({},Hn([],[]),t);return Hs(s)}function mne(e,t){return St([e])?q.Update(gMn(e),{},t):fM(e,t)}function tke(e,t,s,a){let c=ve(e,t,s);return mne(c,a)}function gM(e,t={}){return je("Partial",[e],t)}function nke(e,t={}){return fne(e,t)}function ske(e,t){let s=Au(e,t),a=Du(s);return _u(q.Assign(e,{[t]:a}),t)}function rke(e,t,s){let a=cl(e,t,s);return Du(a)}function oke(e){let t=gs(e);return Du(t)}function ake(e){let t=e.map(s=>Du(s));return At(t)}function ike(e){let t=k.Keys(e).reduce((a,c)=>({...a,[c]:Yg(e[c])}),{});return ct(t)}function Du(e){return Nr(e)?ske(e.$defs,e.$ref):Cs(e)?rke(e.if,e.then,e.else):kt(e)?oke(e.allOf):Ue(e)?ake(e.anyOf):Ht(e)?ike(e.properties):ct({})}function fne(e,t){return St([e])?q.Update(Du(e),{},t):gM(e,t)}function cke(e,t,s,a){let c=ve(e,t,s);return fne(c,a)}function RM(e,t,s={}){return je("Pick",[e,t],s)}function lke(e,t,s={}){let a=k.IsArray(t)?CI(t):t;return gne(e,a,s)}function RMn(e,t){return k.Keys(e).reduce((a,c)=>t.includes(c)?q.Assign(a,{[c]:e[c]}):a,{})}function uke(e,t){let s=GM(e),a=DI(t),c=RMn(s,a);return ct(c)}function gne(e,t,s){return St([e,t])?q.Update(uke(e,t),{},s):RM(e,t,s)}function pke(e,t,s,a,c){let l=ve(e,t,s),u=ve(e,t,a);return gne(l,u,c)}function SM(e,t={}){return je("ReadonlyObject",[e],t)}function Rne(e,t={}){return Sne(e,t)}var dke=Rne;function mke(e){return iI(ki(e))}function fke(e,t){let s=Au(e,t),a=bu(s);return _u(q.Assign(e,{[t]:a}),t)}function gke(e,t,s){let a=cl(e,t,s);return bu(a)}function Rke(e){let t=gs(e);return bu(t)}function Ske(e){let t=k.Keys(e).reduce((a,c)=>({...a,[c]:eR(e[c])}),{});return ct(t)}function yke(e){return iI(Hs(e))}function Ike(e){let t=e.map(s=>bu(s));return At(t)}function bu(e){return is(e)?mke(e.items):Nr(e)?fke(e.$defs,e.$ref):Cs(e)?gke(e.if,e.then,e.else):kt(e)?Rke(e.allOf):Ht(e)?Ske(e.properties):Pn(e)?yke(e.items):Ue(e)?Ike(e.anyOf):e}function Sne(e,t){return St([e])?q.Update(bu(e),{},t):SM(e)}function _ke(e,t,s,a){let c=ve(e,t,s);return Sne(c,a)}function hke(e,t,s,a){return t.visited.includes(a)?s:a in e?ve(e,Hn(t.callstack,[...t.visited,a]),e[a]):s}function vke(e,t){let s=Au(e,t),a=Eu(s);return _u(q.Assign(e,{[t]:a}),t)}function Cke(e,t,s){let a=cl(e,t,s);return Eu(a)}function Tke(e){let t=gs(e);return Eu(t)}function Ake(e){let t=e.map(s=>Eu(s));return At(t)}function Dke(e){let t=k.Keys(e).reduce((a,c)=>({...a,[c]:WL(e[c])}),{});return ct(t)}function Eu(e){return Nr(e)?vke(e.$defs,e.$ref):Cs(e)?Cke(e.if,e.then,e.else):kt(e)?Tke(e.allOf):Ue(e)?Ake(e.anyOf):Ht(e)?Dke(e.properties):ct({})}function yM(e,t={}){return je("Required",[e],t)}function bke(e,t={}){return yne(e,t)}function yne(e,t){return St([e])?q.Update(Eu(e),{},t):yM(e,t)}function Eke(e,t,s,a){let c=ve(e,t,s);return yne(c,a)}function IM(e,t={}){return je("ReturnType",[e],t)}function xke(e,t={}){return Ine(e,t)}function SMn(e){return dr(e)?e.returnType:Rn()}function Ine(e,t){return St([e])?q.Update(SMn(e),{},t):IM(e,t)}function Pke(e,t,s,a={}){let c=ve(e,t,s);return Ine(c,a)}function _M(e,t){return je("With",[e,t],{})}function $ke(e,t){return _ne(e,t)}function _ne(e,t){return St([e])?q.Update(e,{},t):_M(e,t)}function wke(e,t,s,a){let c=ve(e,t,s);return _ne(c,a)}function yMn(e){return Hm(e)?Pn(e.items)?hne(e.items.items):$s(e.items)?[e]:mr(e.items)?[e]:[Rn()]:[e]}function hne(e){return e.reduce((s,a)=>[...s,...yMn(a)],[])}function Hn(e,t){return{callstack:e,visited:t}}function St(e){return k.ShiftLeft(e,(t,s)=>mr(t)?!1:St(s),()=>!0)}function RT(e,t,s){return k.Keys(s).reduce((a,c)=>({...a,[c]:ve(e,t,s[c])}),{})}function Wm(e,t,s){let a=Mi(e,t,s);return hne(a)}function Mi(e,t,s){return s.map(a=>ve(e,t,a))}function IMn(e,t){let s=ho(e)?WC(t,{}):t,a=tR(e)?KC(s,{}):s;return Jg(e)?TT(a,{}):a}function _Mn(e,t,s,a,c){return k.IsEqual(s,"AddImmutable")?kke(e,t,a[0],c):k.IsEqual(s,"RemoveImmutable")?U$e(e,t,a[0],c):k.IsEqual(s,"AddReadonly")?xDe(e,t,a[0],c):k.IsEqual(s,"RemoveReadonly")?gbe(e,t,a[0],c):k.IsEqual(s,"AddOptional")?PDe(e,t,a[0],c):k.IsEqual(s,"RemoveOptional")?ybe(e,t,a[0],c):k.IsEqual(s,"Capitalize")?X$e(e,t,a[0],c):k.IsEqual(s,"Conditional")?swe(e,t,a[0],a[1],a[2],a[3],c):k.IsEqual(s,"ConstructorParameters")?owe(e,t,a[0],c):k.IsEqual(s,"Evaluate")?w$e(e,t,a[0],c):k.IsEqual(s,"Exclude")?iwe(e,t,a[0],a[1],c):k.IsEqual(s,"Extract")?uwe(e,t,a[0],a[1],c):k.IsEqual(s,"Index")?Lwe(e,t,a[0],a[1],c):k.IsEqual(s,"InstanceType")?Gwe(e,t,a[0],c):k.IsEqual(s,"Interface")?h$e(e,t,a[0],a[1],c):k.IsEqual(s,"KeyOf")?Hwe(e,t,a[0],c):k.IsEqual(s,"Lowercase")?J$e(e,t,a[0],c):k.IsEqual(s,"Mapped")?Wwe(e,t,a[0],a[1],a[2],a[3],c):k.IsEqual(s,"Module")?MM(e,t,a[0],c):k.IsEqual(s,"NonNullable")?Zwe(e,t,a[0],c):k.IsEqual(s,"Pick")?pke(e,t,a[0],a[1],c):k.IsEqual(s,"Parameters")?tke(e,t,a[0],c):k.IsEqual(s,"Partial")?cke(e,t,a[0],c):k.IsEqual(s,"Omit")?Jwe(e,t,a[0],a[1],c):k.IsEqual(s,"ReadonlyObject")?_ke(e,t,a[0],c):k.IsEqual(s,"Record")?Mbe(e,t,a[0],a[1],c):k.IsEqual(s,"Required")?Eke(e,t,a[0],c):k.IsEqual(s,"ReturnType")?Pke(e,t,a[0],c):k.IsEqual(s,"TemplateLiteral")?VPe(e,t,a[0],c):k.IsEqual(s,"Uncapitalize")?ewe(e,t,a[0],c):k.IsEqual(s,"Uppercase")?twe(e,t,a[0],c):k.IsEqual(s,"With")?wke(e,t,a[0],a[1]):je(s,a,c)}function hMn(e,t,s){let a=mr(s)?hke(e,t,s,s.$ref):is(s)?ki(ve(e,t,s.items),ML(s)):vI(s)?kM(e,t,s.target,s.arguments):pr(s)?Su(Mi(e,t,s.parameters),ve(e,t,s.instanceType),$De(s)):dr(s)?yu(Mi(e,t,s.parameters),ve(e,t,s.returnType),wDe(s)):Cs(s)?Xg(ve(e,t,s.if),ve(e,t,s.then),ve(e,t,s.else),NDe(s)):kt(s)?vo(Mi(e,t,s.allOf),UDe(s)):Ht(s)?ct(RT(e,t,s.properties),GDe(s)):qr(s)?Gbe(yc(s),ve(e,t,na(s))):Hm(s)?rR(ve(e,t,s.items)):Pn(s)?Hs(Wm(e,t,s.items),fbe(s)):Ue(s)?At(Mi(e,t,s.anyOf),sbe(s)):s;return IMn(s,a)}function ve(e,t,s){return Nm(s)?_Mn(e,t,s.action,s.parameters,s.options):hMn(e,t,s)}function vne(e,t){return ve(e,Hn([],[]),t)}function vMn(e){return q.Update(e,{"~immutable":!0},{})}function TT(e,t){return q.Update(vMn(e),{},t)}function kke(e,t,s,a){let c=ve(e,t,s);return TT(c,a)}function Oxe(e,t={}){return je("AddImmutable",[e],t)}function iI(e,t={}){return TT(e,t)}function Nxe(e,t={}){return je("Evaluate",[e],t)}function Lke(e,t={}){return Yte(e,t)}function Vxe(e,t={}){return je("Module",[e],t)}function Mke(e,t={}){return MM({},Hn([],[]),e,t)}function Gke(...e){let[t,s,a]=hu.Match(e,{2:(u,p)=>k.IsString(u)?[{},u,p]:[u,p,{}],3:(u,p,d)=>[u,p,d],1:u=>[{},u,{}]}),c=LPe(s),l=k.IsArray(c)&&k.IsEqual(c.length,2)?ve(t,Hn([],[]),c[0]):Rn();return q.Update(l,{},a)}var Ct={};Un(Ct,{Any:()=>aI,Array:()=>ki,BigInt:()=>XC,Boolean:()=>FL,Call:()=>F$e,Capitalize:()=>W$e,Codec:()=>qL,Conditional:()=>nwe,Constructor:()=>Su,ConstructorParameters:()=>rwe,Cyclic:()=>_u,Decode:()=>KDe,DecodeBuilder:()=>YC,Dependent:()=>Xg,Encode:()=>WDe,EncodeBuilder:()=>ZC,Enum:()=>BDe,Evaluate:()=>Lke,Exclude:()=>awe,Extends:()=>Vr,ExtendsResult:()=>at,Extract:()=>cwe,Function:()=>yu,Generic:()=>Vm,Identifier:()=>JC,Immutable:()=>QDe,Index:()=>pwe,Infer:()=>QC,InstanceType:()=>Mwe,Instantiate:()=>vne,Integer:()=>nR,Interface:()=>v$e,Intersect:()=>vo,IsAny:()=>Fs,IsArray:()=>is,IsBigInt:()=>Cu,IsBoolean:()=>gc,IsCall:()=>vI,IsCodec:()=>VL,IsConstructor:()=>pr,IsCyclic:()=>Nr,IsDependent:()=>Cs,IsEnum:()=>Jo,IsEnumValue:()=>FDe,IsFunction:()=>dr,IsGeneric:()=>oI,IsIdentifier:()=>JDe,IsImmutable:()=>Jg,IsInfer:()=>$s,IsInteger:()=>ea,IsIntersect:()=>kt,IsKind:()=>Ge,IsLiteral:()=>Wt,IsNever:()=>qm,IsNull:()=>lI,IsNumber:()=>Bs,IsObject:()=>Ht,IsOptional:()=>ho,IsParameter:()=>nbe,IsReadonly:()=>tR,IsRecord:()=>qr,IsRef:()=>mr,IsRefine:()=>vte,IsRest:()=>Hm,IsSchema:()=>Js,IsString:()=>ta,IsSymbol:()=>Fm,IsTemplateLiteral:()=>Us,IsThis:()=>eM,IsTuple:()=>Pn,IsUndefined:()=>gI,IsUnion:()=>Ue,IsUnknown:()=>er,IsUnsafe:()=>NL,IsVoid:()=>Tu,KeyOf:()=>Owe,Literal:()=>Lt,Lowercase:()=>Q$e,Mapped:()=>jwe,Module:()=>Mke,Never:()=>Rn,NonNullable:()=>Qwe,Null:()=>cI,Number:()=>Xa,Object:()=>ct,Omit:()=>Ywe,Optional:()=>LDe,Parameter:()=>sR,Parameters:()=>eke,Partial:()=>nke,Pick:()=>lke,Readonly:()=>ZDe,ReadonlyObject:()=>Rne,ReadonlyType:()=>dke,Record:()=>YL,RecordKey:()=>mI,RecordPattern:()=>yc,RecordValue:()=>na,Ref:()=>fd,Refine:()=>YDe,Required:()=>bke,Rest:()=>rR,ReturnType:()=>xke,Script:()=>Gke,String:()=>Rc,Symbol:()=>uI,TemplateLiteral:()=>FPe,This:()=>JL,Tuple:()=>Hs,Uncapitalize:()=>Z$e,Undefined:()=>fI,Union:()=>At,Unknown:()=>vr,Unsafe:()=>ODe,Uppercase:()=>Y$e,Void:()=>tM,With:()=>$ke});var AT="submit_test_gaps",DT="submit_solution_audit_findings",bT="submit_solver_gaps",_ta=Ct.Object({verdict:Ct.Union([Ct.Literal("PASS"),Ct.Literal("FAIL")],{description:"FAIL only for a genuine blocking issue (clear rubric violation, agent-fault-worthy gap, unfair/undiscoverable test requirement, or a real determinism/regression risk). Optional, minor, or stylistic points are NOT grounds for FAIL \u2014 put those in `notes` instead and use PASS."}),summary:Ct.String({description:"One short sentence summarizing the verdict."}),reasons:Ct.Array(Ct.String(),{description:"Specific BLOCKING justifications only, citing rubric item IDs and concrete evidence from the files you read. Required (non-empty) when verdict is FAIL. Use an empty array when verdict is PASS."}),notes:Ct.Array(Ct.String(),{description:"Non-blocking, optional/minor observations or suggested improvements \u2014 the kind of feedback a real reviewer leaves as 'Minor/optional' without failing the task. Include these regardless of verdict; use an empty array if you truly have none."})});var CMn=Ct.Object({gaps:Ct.Array(Ct.Object({description:Ct.String({description:"A fair, publicly observable missing behavioral test."}),justification:Ct.String({description:"Why the gap is grounded in agent_prompt.md or the repository and why a plausible incorrect implementation could pass the current tests despite missing this behavior."})}),{description:"The complete final list of distinct, evidence-backed positive and negative behavioral test gaps. Use an empty array only after exhaustive analysis finds none."})});function Oke(e){return{name:AT,label:"Submit Test Gaps",description:"Submit the complete final list of fair behavioral test gaps. This is the ONLY way to report your result \u2014 call it exactly once, as your last action, after independently checking every candidate.",parameters:CMn,async execute(t,s){let a=s.gaps??[];return e.gaps=a,{content:[{type:"text",text:`Recorded ${a.length} test gap(s)`}],details:void 0}}}}var TMn=Ct.Object({category:Ct.Union([Ct.Literal("missing-requirement"),Ct.Literal("regression"),Ct.Literal("architecture"),Ct.Literal("unsafe-failure"),Ct.Literal("inconsistent-path"),Ct.Literal("dead-code"),Ct.Literal("unrelated-change")],{description:"The kind of actionable quality problem found in the solution implementation."}),subject:Ct.String({description:"A short behavior, symbol, or concern identifier; do not require a source line or file location."}),problem:Ct.String({description:"What is wrong with the implementation and why it is actionable."}),evidence:Ct.String({description:"The prompt, repository, implementation, or regression evidence supporting the finding."}),requiredBehavior:Ct.String({description:"The requirement, invariant, or solution-quality property that must be preserved."}),recommendation:Ct.String({description:"A concrete repair that stays within the prompt and repository conventions."})}),AMn=Ct.Object({findings:Ct.Array(TMn,{description:"Only confirmed, actionable solution-quality findings. Use an empty array when the implementation meets the prompt and repository standards."})});function Nke(e){return{name:DT,label:"Submit Solution Precheck Findings",description:"Submit the complete result from the single post-implementation solution-quality audit. This is the ONLY way to report your result \u2014 call it exactly once, as your last action. Use an empty list when no actionable issue is found.",parameters:AMn,async execute(t,s){let a=s.findings??[];return e.findings=a,{content:[{type:"text",text:`Recorded ${a.length} solution-precheck finding(s)`}],details:void 0}}}}var DMn=Ct.Object({gaps:Ct.Array(Ct.Object({description:Ct.String({description:"The specific behavioral gap: a way one or more solver's diff differs materially from what agent_prompt.md/solution.patch require, despite that solver passing `./test.sh new`."}),justification:Ct.String({description:"Why this is a genuine requirement from agent_prompt.md or solution.patch (cite the specific requirement/line) that the solver's diff misses, contradicts, or diverges from \u2014 and why the current tests fail to catch that divergence."}),evidence:Ct.String({description:"Which solver(s) (by index) exhibit this, and the specific part of their diff that grounds the gap."})}),{description:"Concrete, diff-grounded behavioral gaps \u2014 cases where a passing solver's materially different approach reveals that `test.sh new` under-specifies a real requirement. Use an empty array if the solvers converged on equivalent behavior; do not manufacture gaps just to report something."})});function Vke(e){return{name:bT,label:"Submit Solver Gaps",description:"Submit your final list of behavioral gaps found by comparing the solver diffs against the real solution.patch. This is the ONLY way to report your result \u2014 call it exactly once, as your last action, after you have finished comparing every solver.",parameters:DMn,async execute(t,s){let a=s.gaps??[];return e.gaps=a,{content:[{type:"text",text:`Recorded ${a.length} solver gap(s)`}],details:void 0}}}}function bMn(e){return["The problem prompt is at `agent_prompt.md`.","Before this run, the orchestrator identified these code files as the files needed for this problem:",e.length>0?e.map(s=>`- \`${s}\``).join(`
|
|
83
|
+
`,e),([t,s])=>[[t],s]),([t,s])=>[t,s],()=>[]))),([t,s])=>[t,s]),kPe=(e,t=[])=>A(A(Ute(e),([s,a])=>A(ckn(a),([c,l])=>[[s,c],l])),([s,a])=>kPe(a,[...t,s]),()=>[t,e]),lkn=e=>A(A(kPe(e),([t,s])=>A(A(A(Ute(s),([a,c])=>[[a],c]),([a,c])=>[a,c],()=>A([[],s],([a,c])=>[a,c],()=>[])),([a,c])=>[[t,a],c])),([t,s])=>[Lxe(t),s]),Ute=e=>A(A(ikn(e),([t,s])=>A(A(skn(s),([a,c])=>[a,c],()=>A(rkn(s),([a,c])=>[a,c],()=>A(okn(s),([a,c])=>[a,c],()=>A(akn(s),([a,c])=>[a,c],()=>[])))),([a,c])=>A(aPe(c),([l,u])=>[[t,a,l],u]))),([t,s])=>[Mxe(t),s]),ukn=e=>A(A(Ute(e),([t,s])=>A(lkn(s),([a,c])=>[[t,a],c])),([t,s])=>[Gxe(t),s]),LPe=e=>A(A(ukn(e),([t,s])=>[t,s],()=>A(dwn(e),([t,s])=>[t,s],()=>A(xt(e),([t,s])=>[t,s],()=>[]))),([t,s])=>[t,s]);function MPe(e){let t=Vte(`\`${e}\``);return k.IsEqual(t.length,2)?t[0]:ws()}function dkn(e){return e.join("|")}function mkn(e){return e.slice(1,e.length-1)}function fkn(e,t,s){return Km(t,`${s}${e}`)}function gkn(e,t){return Km(e,`${t}${XDe}`)}function Rkn(e,t){return Km(e,`${t}${BL}`)}function Skn(e,t){return Km(e,`${t}${HL}`)}function ykn(e,t){return dT(At([Lt("false"),Lt("true")]),e,t)}function Ikn(e,t){return Km(e,`${t}${jL}`)}function _kn(e,t,s){return Km(t,`${s}${mkn(e)}`)}function hkn(e,t,s){let a=mT(e,{});return dT(a,t,s)}function vkn(e,t,s){let a=Li(e);return dT(a,t,s)}function GPe(e,t,s,a=[]){return k.ShiftLeft(e,(c,l)=>GPe(l,t,s,[...a,dT(c,[],"")]),()=>Km(t,`${s}(${dkn(a)})`))}function dT(e,t,s){return Jo(e)?vkn(e.enum,t,s):ea(e)?Rkn(t,s):Wt(e)?fkn(e.const,t,s):Cu(e)?gkn(t,s):gc(e)?ykn(t,s):Bs(e)?Skn(t,s):ta(e)?Ikn(t,s):Us(e)?_kn(e.pattern,t,s):NPe(e)?hkn(e.parameters[0],t,s):Ue(e)?GPe(e.anyOf,t,s):kDe}function Km(e,t){return k.ShiftLeft(e,(s,a)=>dT(s,a,t),()=>t)}function Ckn(e){return`^${Km(e,"")}$`}function OPe(e){let t=Ckn(e);return KL(t)}function mT(e,t){return St(e)?q.Update(OPe(e),{},t):nM(e,t)}function VPe(e,t,s,a){let c=Mi(e,t,s);return mT(c,a)}function nM(e,t={}){return je("TemplateLiteral",[e],t)}function NPe(e){return Js(e)&&k.HasPropertyKey(e,"action")&&k.IsEqual(e.action,"TemplateLiteral")}function qPe(e){return mT(e,{})}function Tkn(e){let t=MPe(e);return qPe(t)}function FPe(e,t={}){let s=k.IsString(e)?Tkn(e):qPe(e);return q.Update(s,{},t)}function Us(e){return Ge(e,"TemplateLiteral")}var at={};Un(at,{ExtendsFalse:()=>ft,ExtendsTrue:()=>we,ExtendsUnion:()=>Hte,IsExtendsFalse:()=>Akn,IsExtendsTrue:()=>UPe,IsExtendsTrueLike:()=>II,IsExtendsUnion:()=>BPe,Match:()=>es});function Hte(e){return q.Create({"~kind":"ExtendsUnion"},{inferred:e})}function BPe(e){return k.IsObject(e)&&k.HasPropertyKey(e,"~kind")&&k.HasPropertyKey(e,"inferred")&&k.IsEqual(e["~kind"],"ExtendsUnion")&&k.IsObject(e.inferred)}function we(e){return q.Create({"~kind":"ExtendsTrue"},{inferred:e})}function UPe(e){return k.IsObject(e)&&k.HasPropertyKey(e,"~kind")&&k.HasPropertyKey(e,"inferred")&&k.IsEqual(e["~kind"],"ExtendsTrue")&&k.IsObject(e.inferred)}function ft(){return q.Create({"~kind":"ExtendsFalse"},{})}function Akn(e){return k.IsObject(e)&&k.HasPropertyKey(e,"~kind")&&k.IsEqual(e["~kind"],"ExtendsFalse")}function II(e){return BPe(e)||UPe(e)}function es(e,t,s){return II(e)?t(e.inferred):s()}function Dkn(e,t,s,a){return es(Ot(e,s,a),c=>we(q.Assign(q.Assign(e,c),{[t]:s})),()=>ft())}function bkn(e,t){return we(e)}function Ekn(e,t,s,a,c){return es(Ot(e,t,s),l=>es(Ot(l,t,a),u=>we(u),()=>ft()),()=>es(Ot(e,t,c),l=>we(l),()=>ft()))}function xkn(e,t,s){let a=Li(s);return Ot(e,t,a)}function HPe(e,t,s){return k.ShiftLeft(s,(a,c)=>es(Ot(e,t,a),l=>HPe(l,t,c),()=>ft()),()=>we(e))}function Pkn(e,t,s){let a=xa(s);return Ot(e,t,a)}function jPe(e,t,s){return k.ShiftLeft(s,(a,c)=>es(Ot(e,t,a),l=>we(l),()=>jPe(e,t,c)),()=>ft())}function Qt(e,t,s){return Fs(s)?bkn(e,t):Cs(s)?Ekn(e,t,s.if,s.then,s.else):Jo(s)?xkn(e,t,s.enum):$s(s)?Dkn(e,s.name,t,s.extends):kt(s)?HPe(e,t,s.allOf):Us(s)?Pkn(e,t,s.pattern):Ue(s)?jPe(e,t,s.anyOf):er(s)?we(e):ft()}function zPe(e,t,s){return $s(s)?Qt(e,t,s):Fs(s)?we(e):er(s)?we(e):Hte(e)}function $kn(e,t){let s=Jg(e),a=Jg(t);return s&&a||!s&&a?!0:!(s&&!a)}function KPe(e,t,s,a){return is(a)?$kn(t,a)?Ot(e,s,a.items):ft():Qt(e,t,a)}function WPe(e,t,s){return Cu(s)?we(e):Qt(e,t,s)}function QPe(e,t,s){return gc(s)?we(e):Qt(e,t,s)}function wkn(e,t,s,a,c){let l=$s(a)?t:a,u=$s(a)?a:t,p=ho(t),d=ho(a);return!p&&d?ft():es(Ot(e,l,u),m=>fT(m,s,c),()=>ft())}function kkn(e,t,s,a){return k.ShiftLeft(a,(c,l)=>wkn(e,t,s,c,l),()=>ho(t)?we(e):ft())}function Lkn(e,t,s){return k.ShiftLeft(t,(a,c)=>kkn(e,a,c,s),()=>we(e))}function fT(e,t,s){return Lkn(e,t,s)}function xM(e,t,s){return Tu(s)?we(e):Ot(e,t,s)}function ZPe(e,t,s,a){return Fs(a)?we(e):er(a)?we(e):pr(a)?es(fT(e,t,a.parameters),c=>xM(c,s,a.instanceType),()=>ft()):ft()}function YPe(e,t,s,a,c){return es(Ot(e,t,c),()=>Ot(e,s,c),()=>Ot(e,a,c))}function XPe(e,t,s){let a=Li(t);return Ot(e,a,s)}function JPe(e,t,s,a){return Fs(a)?we(e):er(a)?we(e):dr(a)?es(fT(e,t,a.parameters),c=>xM(c,s,a.returnType),()=>ft()):ft()}function e$e(e,t,s){return ea(s)?we(e):Bs(s)?we(e):Qt(e,t,s)}function t$e(e,t,s){let a=gs(t);return Ot(e,a,s)}function PM(e,t,s){return t===s?we(e):ft()}function Mkn(e,t,s){return Wt(s)?PM(e,t,s.const):Cu(s)?we(e):Qt(e,Lt(t),s)}function Gkn(e,t,s){return Wt(s)?PM(e,t,s.const):gc(s)?we(e):Qt(e,Lt(t),s)}function Okn(e,t,s){return Wt(s)?PM(e,t,s.const):Bs(s)?we(e):Qt(e,Lt(t),s)}function Nkn(e,t,s){return Wt(s)?PM(e,t,s.const):ta(s)?we(e):Qt(e,Lt(t),s)}function n$e(e,t,s){return k.IsBigInt(t.const)?Mkn(e,t.const,s):k.IsBoolean(t.const)?Gkn(e,t.const,s):k.IsNumber(t.const)?Okn(e,t.const,s):k.IsString(t.const)?Nkn(e,t.const,s):ws()}function s$e(e,t,s){return $s(s)?Qt(e,t,s):we(e)}function r$e(e,t,s){return lI(s)?we(e):Qt(e,t,s)}function o$e(e,t,s){return Bs(s)?we(e):Qt(e,t,s)}function Vkn(e,t,s){return ho(t)?ho(s)?we(e):ft():we(e)}function qkn(e,t,s){return $s(s)&&qm(s.extends)?ft():es(Ot(e,t,s),a=>Vkn(a,t,s),()=>ft())}function Fkn(e,t){return e.reduce((s,a)=>a in t?II(t[a])?{...s,...t[a].inferred}:ws():ws(),{})}function Bkn(e,t,s){let a={};for(let u of k.Keys(s))a[u]=u in t?qkn({},t[u],s[u]):ho(s[u])?$s(s[u])?we(q.Assign(e,{[s[u].name]:s[u].extends})):we(e):ft();let c=k.Values(a).every(u=>II(u)),l=c?Fkn(k.Keys(a),a):{};return c?we(l):ft()}function Ukn(e,t,s){let a=Bkn(e,t,s);return II(a)?we(q.Assign(e,a.inferred)):ft()}function Hkn(e,t,s){return Ukn(e,t,s)}function jkn(e,t){return k.Keys(t).reduce((s,a)=>({...s,[a]:k.HasPropertyKey(e,a)?Ue(s[a])?At([...s[a].anyOf,t[a]]):At([e[a],t[a]]):t[a]}),e)}function a$e(e,t,s,a){return k.ShiftLeft(t,(c,l)=>es(Ot({},e[c],s),u=>a$e(e,l,s,jkn(a,u)),()=>ft()),()=>we(a))}function zkn(e,t,s,a){let c=k.Keys(t);return a$e(t,c,a,e)}function i$e(e,t,s){return qr(s)?zkn(e,t,yc(s),na(s)):Ht(s)?Hkn(e,t,s.properties):Qt(e,ct(t),s)}function Kkn(e,t){return k.IsEqual(k.Keys(t).length,0)?we(e):ft()}function Wkn(e,t,s,a,c){return Ot(e,s,c)}function c$e(e,t,s,a){return qr(a)?Wkn(e,XL(t),s,XL(yc(a)),na(a)):Ht(a)?Kkn(e,a.properties):Fs(a)?we(e):er(a)?we(e):ft()}function l$e(e,t,s){return ta(s)?we(e):Qt(e,t,s)}function u$e(e,t,s){return Fm(s)?we(e):Qt(e,t,s)}function p$e(e,t,s){let a=xa(t);return Ot(e,a,s)}function jte(e,t){return q.Create({"~kind":"Inferrable"},{name:e,type:t},{})}function gT(e){return k.IsObject(e)&&k.HasPropertyKey(e,"~kind")&&k.HasPropertyKey(e,"name")&&k.HasPropertyKey(e,"type")&&k.IsEqual(e["~kind"],"Inferrable")&&k.IsString(e.name)&&k.IsObject(e.type)}function zte(e){return Hm(e)?$s(e.items)?is(e.items.extends)?jte(e.items.name,e.items.extends.items):er(e.items.extends)?jte(e.items.name,e.items.extends):void 0:ws():void 0}function $M(e){return $s(e)?jte(e.name,e.extends):void 0}function Kte(e,t,s=[]){return k.ShiftLeft(e,(a,c)=>es(Ot({},a,t),()=>Kte(c,t,[...s,a]),()=>{}),()=>s)}function d$e(e,t,s,a){let c=Kte(s,a);return k.IsArray(c)?we(q.Assign(e,{[t]:Hs(c)})):ft()}function wM(e,t,s,a){let c=Kte(s,a);return k.IsArray(c)?we(q.Assign(e,{[t]:At(c)})):ft()}function Qkn(e){return[...e].reverse()}function Wte(e,t){return t?Qkn(e):e}function Zkn(e){let t=e.length>0?e[0]:void 0,s=Js(t)?zte(t):void 0;return Js(s)}function Ykn(e,t,s,a,c,l){return es(Ot(e,s,c),u=>m$e(u,t,a,l),()=>ft())}function Xkn(e,t,s,a,c){let l=zte(a);return gT(l)?d$e(e,l.name,Wte(s,t),l.type):k.ShiftLeft(s,(u,p)=>Ykn(e,t,u,p,a,c),()=>ft())}function Jkn(e,t,s,a){return k.ShiftLeft(a,(c,l)=>Xkn(e,t,s,c,l),()=>k.IsEqual(s.length,0)?we(e):ft())}function m$e(e,t,s,a){return Jkn(e,t,s,a)}function eLn(e,t,s){let a=Wm(e,Hn([],[]),s),c=Zkn(a);return m$e(e,c,Wte(t,c),Wte(a,c))}function f$e(e,t,s){let a=$M(s);return gT(a)?wM(e,a.name,t,a.type):k.ShiftLeft(t,(c,l)=>es(Ot(e,c,s),u=>f$e(u,l,s),()=>ft()),()=>we(e))}function g$e(e,t,s){let a=Wm(e,Hn([],[]),t);return Pn(s)?eLn(e,a,s.items):is(s)?f$e(e,a,s.items):Qt(e,Hs(a),s)}function R$e(e,t,s){return Tu(s)?we(e):gI(s)?we(e):Qt(e,t,s)}function S$e(e,t,s){return k.ShiftLeft(s,(a,c)=>es(Ot(e,t,a),l=>we(l),()=>S$e(e,t,c)),()=>ft())}function Qte(e,t,s){return k.ShiftLeft(t,(a,c)=>es(S$e(e,a,s),l=>Qte(l,c,s),()=>ft()),()=>we(e))}function y$e(e,t,s){let a=$M(s);return gT(a)?wM(e,a.name,t,a.type):Ue(s)?Qte(e,t,s.anyOf):Qte(e,t,[s])}function I$e(e,t,s){return $s(s)?Qt(e,t,s):Fs(s)?we(e):er(s)?we(e):ft()}function _$e(e,t,s){return Tu(s)?we(e):Qt(e,t,s)}function Ot(e,t,s){return Fs(t)?zPe(e,t,s):is(t)?KPe(e,t,t.items,s):Cu(t)?WPe(e,t,s):gc(t)?QPe(e,t,s):pr(t)?ZPe(e,t.parameters,t.instanceType,s):Cs(t)?YPe(e,t.if,t.then,t.else,s):Jo(t)?XPe(e,t.enum,s):dr(t)?JPe(e,t.parameters,t.returnType,s):ea(t)?e$e(e,t,s):kt(t)?t$e(e,t.allOf,s):Wt(t)?n$e(e,t,s):qm(t)?s$e(e,t,s):lI(t)?r$e(e,t,s):Bs(t)?o$e(e,t,s):Ht(t)?i$e(e,t.properties,s):qr(t)?c$e(e,yc(t),na(t),s):ta(t)?l$e(e,t,s):Fm(t)?u$e(e,t,s):Us(t)?p$e(e,t.pattern,s):Pn(t)?g$e(e,t.items,s):gI(t)?R$e(e,t,s):Ue(t)?y$e(e,t.anyOf,s):er(t)?I$e(e,t,s):Tu(t)?_$e(e,t,s):ft()}function tLn(e,t){return gs([...e,ct(t)])}function Zte(e,t,s){return St(e)?q.Update(tLn(e,t),{},s):iT(e,t,s)}function h$e(e,t,s,a,c){let l=Mi(e,t,s),u=RT(e,t,a);return Zte(l,u,c)}function iT(e,t,s={}){return je("Interface",[e,t],s)}function _I(e){return Js(e)&&k.HasPropertyKey(e,"action")&&k.IsEqual(e.action,"Interface")}function v$e(e,t,s={}){return Zte(e,t,s)}function nLn(e,t,s){return e.includes(s)?!0:ST([...e,s],t,t[s])}function C$e(e,t,s){let a=OL(s);return aR(e,t,a)}function aR(e,t,s){return k.ShiftLeft(s,(a,c)=>ST(e,t,a)?!0:aR(e,t,c),()=>!1)}function ST(e,t,s){return mr(s)?nLn(e,t,s.$ref):is(s)?ST(e,t,s.items):pr(s)?aR(e,t,[...s.parameters,s.instanceType]):dr(s)?aR(e,t,[...s.parameters,s.returnType]):_I(s)?C$e(e,t,s.parameters[1]):kt(s)?aR(e,t,s.allOf):Ht(s)?C$e(e,t,s.properties):Ue(s)?aR(e,t,s.anyOf):Pn(s)?aR(e,t,s.items):qr(s)?ST(e,t,na(s)):!1}function T$e(e,t,s){return ST(e,t,s)}function sLn(e,t){return t.reduce((s,a)=>T$e([a],e,e[a])?[...s,a]:s,[])}function A$e(e){let t=GL(e);return sLn(e,t)}function rLn(e,t,s){return s.includes(t)?s:t in e?yT(e,e[t],[...s,t]):ws()}function D$e(e,t,s){let a=OL(t);return hI(e,a,s)}function hI(e,t,s){return t.reduce((a,c)=>yT(e,c,a),s)}function yT(e,t,s){return mr(t)?rLn(e,t.$ref,s):is(t)?yT(e,t.items,s):pr(t)?hI(e,[...t.parameters,t.instanceType],s):dr(t)?hI(e,[...t.parameters,t.returnType],s):_I(t)?D$e(e,t.parameters[1],s):kt(t)?hI(e,t.allOf,s):Ht(t)?D$e(e,t.properties,s):Ue(t)?hI(e,t.anyOf,s):Pn(t)?hI(e,t.items,s):qr(t)?yT(e,na(t),s):s}function b$e(e,t,s){return yT(e,s,[t])}function oLn(e){return aI()}function aLn(e){return k.Keys(e).reduce((t,s)=>({...t,[s]:iR(e[s])}),{})}function IT(e){return e.reduce((t,s)=>[...t,iR(s)],[])}function iR(e){return mr(e)?oLn(e.$ref):is(e)?ki(iR(e.items),ML(e)):pr(e)?Su(IT(e.parameters),iR(e.instanceType)):dr(e)?yu(IT(e.parameters),iR(e.returnType)):kt(e)?vo(IT(e.allOf)):Ht(e)?ct(aLn(e.properties)):qr(e)?YL(mI(e),iR(na(e))):Ue(e)?At(IT(e.anyOf)):Pn(e)?Hs(IT(e.items)):e}function iLn(e,t){return t in e?iR(e[t]):vr()}function E$e(e){return iLn(e.$defs,e.$ref)}function cLn(e,t,s){let a=Mi(e,Hn([],[]),t),c=RT({},Hn([],[]),s);return gs([...a,ct(c)])}function lLn(e,t){return k.Keys(e).filter(a=>t.includes(a)).reduce((a,c)=>{let l=e[c],u=_I(l)?cLn(e,l.parameters[0],l.parameters[1]):l;return{...a,[c]:u}},{})}function x$e(e,t,s){let a=b$e(e,t,s),c=lLn(e,a);return _u(c,t)}function P$e(e,t){return t in e?mr(e[t])?P$e(e,e[t].$ref):e[t]:Rn()}function Au(e,t){return P$e(e,t)}function $$e(e){return Nr(e)?E$e(e):NL(e)?vr():e}function Vr(e,t,s){let a=$$e(t),c=$$e(s);return Ot(e,a,c)}var tT="equal",uLn="disjoint",nT="left-inside",sT="right-inside";function pI(e,t){let s=[er(e)?at.ExtendsFalse():Vr({},e,t),er(e)?at.ExtendsTrue({}):Vr({},t,e)];return at.IsExtendsTrueLike(s[0])&&at.IsExtendsTrueLike(s[1])?tT:at.IsExtendsTrueLike(s[0])&&at.IsExtendsFalse(s[1])?nT:at.IsExtendsFalse(s[0])&&at.IsExtendsTrueLike(s[1])?sT:uLn}function pLn(e,t){return t.filter(s=>pI(e,s)!==sT)}function dLn(e,t){let s=t.some(a=>{let c=pI(e,a);return k.IsEqual(c,nT)||k.IsEqual(c,tT)});return k.IsEqual(s,!1)}function mLn(e,t){let s=Sc(e);return Fs(s)?[s]:dLn(s,t)?[...pLn(s,t),s]:t}function fLn(e){return e.reduce((t,s)=>Ht(s)?[...t,s]:qm(s)?t:mLn(s,t),[])}function Ete(e){let t=fLn(e);return oT(t)}function Yte(e,t){return q.Update(Sc(e),{},t)}function w$e(e,t,s,a){let c=ve(e,t,s);return Yte(c,a)}function _T(e,t=[]){return Nm(e)&&k.IsEqual(e.action,"Conditional")?mr(e.parameters[0])?_T(e.parameters[2],_T(e.parameters[3],[...t,e.parameters[0].$ref])):_T(e.parameters[2],_T(e.parameters[3],t)):Nm(e)&&k.IsEqual(e.action,"Mapped")&&Nm(e.parameters[1])&&k.IsEqual(e.parameters[1].action,"KeyOf")&&mr(e.parameters[1].parameters[0])?[...t,e.parameters[1].parameters[0].$ref]:t}function gLn(e,t){return e.reduce((s,a)=>[...s,t.includes(a.name)],[])}function M$e(e,t,s=[]){return k.ShiftLeft(e,(a,c)=>k.ShiftLeft(t,(l,u)=>M$e(c,u,[...s,[l,a]]),()=>s),()=>s)}function RLn(e){return Ue(e)?[...e.anyOf]:[e]}function SLn(e,t){return e.reduce((s,a)=>[...s,[...a,t]],[])}function k$e(e,t){return t.reduce((s,a)=>[...s,...SLn(e,a)],[])}function L$e(e){return e.reduce((t,s)=>k.IsEqual(s[0],!0)?k$e(t,RLn(s[1])):k$e(t,[s[1]]),[[]])}function G$e(e,t,s){let a=_T(s),c=gLn(e,a),l=M$e(t,c);return Nm(s)&&k.IsEqual(s.action,"Conditional")||Nm(s)&&k.IsEqual(s.action,"Mapped")?L$e(l):[t]}function yLn(){return["(not-resolvable)",Rn()]}function ILn(){return["(not-generic)",Rn()]}function _Ln(e,t,s){return[e,Vm(t,s)]}function hLn(e,t,s){return t in e?O$e(e,t,e[t],s):yLn()}function O$e(e,t,s,a){return oI(s)?_Ln(t,s.parameters,s.expression):mr(s)?hLn(e,s.$ref,a):ILn()}function N$e(e,t,s){return O$e(e,"(anonymous)",t,s)}function vLn(e,t,s){if($s(t)||vI(t)||at.IsExtendsTrueLike(Vr({},t,s)))return;let a={parameter:e,expect:s,actual:t};throw new Error(`Argument for parameter ${e} does not satisfy constraint`,{cause:a})}function V$e(e,t,s,a,c){let l=ve(e,t,c);return vLn(s,l,a),q.Assign(e,{[s]:l})}function CLn(e,t,s,a,c){let l=ve(e,t,s.extends),u=ve(e,t,s.equals);return k.ShiftLeft(c,(p,d)=>Xte(V$e(e,t,s.name,l,p),t,a,d),()=>Xte(V$e(e,t,s.name,l,u),t,a,[]))}function Xte(e,t,s,a){return k.ShiftLeft(s,(c,l)=>CLn(e,t,c,l,a),()=>e)}function q$e(e,t,s,a){return Xte(e,t,s,a)}function TLn(e){return k.IsGreaterThan(e.callstack.length,0)?e.callstack[e.callstack.length-1]:""}function ALn(e,t){return k.IsEqual(TLn(e),t)}function DLn(e,t,s,a,c,l){let u=q$e(e,t,a,l),p=ve(u,Hn([...t.callstack,s.$ref],t.visited),c);return ve(u,Hn([],[]),p)}function bLn(e,t,s,a,c,l){return l.reduce((u,p)=>[...u,DLn(e,t,s,a,c,p)],[])}function ELn(e,t,s,a,c,l){let u=G$e(a,l,c),p=bLn(e,t,s,a,c,u);return k.IsEqual(p.length,1)?p[0]:Ja(p)}function kM(e,t,s,a){let c=Mi(e,t,a),l=N$e(e,s,a),u=l[0],p=l[1];return oI(p)?ALn(t,u)?cT(fd(u),c):ELn(e,t,fd(u),p.parameters,p.expression,c):cT(s,c)}function cT(e,t){return q.Create({"~kind":"Call"},{type:"call",target:e,arguments:t},{})}function F$e(e,t){return kM({},Hn([],[]),e,t)}function vI(e){return Ge(e,"Call")}function xLn(e){return q.Discard(e,["~immutable"])}function B$e(e,t){return q.Update(xLn(e),{},t)}function U$e(e,t,s,a){let c=ve(e,t,s);return B$e(c,a)}function H$e(e,t){return e(t)}function j$e(e,t){return k.IsString(t)?Lt(H$e(e,t)):Lt(t)}function z$e(e,t){let s=xa(t);return Sd(e,s)}function K$e(e,t){let s=t.map(a=>Sd(e,a));return At(s)}function Sd(e,t){return Wt(t)?j$e(e,t.const):Us(t)?z$e(e,t.pattern):Ue(t)?K$e(e,t.anyOf):t}function sM(e,t={}){return je("Capitalize",[e],t)}function W$e(e,t={}){return Jte(e,t)}function rM(e,t={}){return je("Lowercase",[e],t)}function Q$e(e,t={}){return ene(e,t)}function oM(e,t={}){return je("Uncapitalize",[e],t)}function Z$e(e,t={}){return tne(e,t)}function aM(e,t={}){return je("Uppercase",[e],t)}function Y$e(e,t={}){return nne(e,t)}var PLn=e=>e[0].toUpperCase()+e.slice(1),$Ln=e=>e.toLowerCase(),wLn=e=>e[0].toLowerCase()+e.slice(1),kLn=e=>e.toUpperCase();function Jte(e,t){return St([e])?q.Update(Sd(PLn,e),{},t):sM(e,t)}function ene(e,t){return St([e])?q.Update(Sd($Ln,e),{},t):rM(e,t)}function tne(e,t){return St([e])?q.Update(Sd(wLn,e),{},t):oM(e,t)}function nne(e,t){return St([e])?q.Update(Sd(kLn,e),{},t):aM(e,t)}function X$e(e,t,s,a){let c=ve(e,t,s);return Jte(c,a)}function J$e(e,t,s,a){let c=ve(e,t,s);return ene(c,a)}function ewe(e,t,s,a){let c=ve(e,t,s);return tne(c,a)}function twe(e,t,s,a){let c=ve(e,t,s);return nne(c,a)}function iM(e,t,s,a,c={}){return je("Conditional",[e,t,s,a],c)}function nwe(e,t,s,a,c={}){return sne({},Hn([],[]),e,t,s,a,c)}function LLn(e,t,s,a,c,l){let u=Vr(e,s,a);return at.IsExtendsUnion(u)?At([ve(u.inferred,t,c),ve(e,t,l)]):at.IsExtendsTrue(u)?ve(u.inferred,t,c):ve(e,t,l)}function sne(e,t,s,a,c,l,u){return St([s,a])?q.Update(LLn(e,t,s,a,c,l),{},u):iM(s,a,c,l,u)}function swe(e,t,s,a,c,l,u){let p=ve(e,t,s),d=ve(e,t,a);return sne(e,t,p,d,c,l,u)}function cM(e,t={}){return je("ConstructorParameters",[e],t)}function rwe(e,t={}){return rne(e,t)}function MLn(e){let t=pr(e)?e.parameters:[],s=Wm({},Hn([],[]),t);return Hs(s)}function rne(e,t){return St([e])?q.Update(MLn(e),{},t):cM(e,t)}function owe(e,t,s,a){let c=ve(e,t,s);return rne(c,a)}function lM(e,t,s={}){return je("Exclude",[e,t],s)}function awe(e,t,s={}){return hT(e,t,s)}function hT(e,t,s){return St([e,t])?q.Update(QL(e,t),{},s):lM(e,t,s)}function iwe(e,t,s,a,c){let l=ve(e,t,s),u=ve(e,t,a);return hT(l,u,c)}function uM(e,t,s={}){return je("Extract",[e,t],s)}function cwe(e,t,s={}){return one(e,t,s)}function GLn(e,t){let s=Vr({},e,t);return at.IsExtendsTrueLike(s)?[e]:[]}function OLn(e,t){return e.reduce((s,a)=>[...s,...GLn(a,t)],[])}function lwe(e,t){let s=Sc(e),a=Ue(s)?s.anyOf:[s],c=OLn(a,t);return Ja(c)}function one(e,t,s){return St([e,t])?q.Update(lwe(e,t),{},s):uM(e,t,s)}function uwe(e,t,s,a,c){let l=ve(e,t,s),u=ve(e,t,a);return one(l,u,c)}function NLn(e){return e.reduce((t,s)=>UL(s)?[...t,Lt(s)]:t,[])}function CI(e){let t=NLn(e);return At(t)}function lT(e,t,s={}){return je("Index",[e,t],s)}function pwe(e,t,s={}){let a=k.IsArray(t)?CI(t):t;return ane(e,a,s)}function dwe(e,t){let s=Au(e,t);return Gi(s)}function mwe(e,t,s){let a=cl(e,t,s);return Gi(a)}function VLn(e,t){let s=k.Keys(e).filter(S=>!k.HasPropertyKey(t,S)),a=k.Keys(t).filter(S=>!k.HasPropertyKey(e,S)),c=k.Keys(e).filter(S=>k.HasPropertyKey(t,S)),l=s.reduce((S,v)=>({...S,[v]:e[v]}),{}),u=a.reduce((S,v)=>({...S,[v]:t[v]}),{}),p=c.reduce((S,v)=>({...S,[v]:gs([e[v],t[v]])}),{}),d=q.Assign(l,u);return q.Assign(d,p)}function fwe(e){return e.reduce((t,s)=>VLn(t,Gi(s)),{})}function gwe(e){let t=_be(Hs(e));return Gi(t)}function qLn(e,t){return k.Keys(e).filter(c=>c in t).reduce((c,l)=>({...c,[l]:Ja([e[l],t[l]])}),{})}function Rwe(e,t){return k.ShiftLeft(e,(s,a)=>Rwe(a,qLn(t,Gi(s))),()=>t)}function Swe(e){return k.ShiftLeft(e,(t,s)=>Rwe(s,Gi(t)),()=>ws())}function Gi(e){return Nr(e)?dwe(e.$defs,e.$ref):Cs(e)?mwe(e.if,e.then,e.else):kt(e)?fwe(e.allOf):Ue(e)?Swe(e.anyOf):Pn(e)?gwe(e.items):Ht(e)?e.properties:{}}function TI(e){let t=Gi(e);return ct(t)}var FLn=new RegExp("^(?:0|[1-9][0-9]*)$");function AI(e){let t=`${e}`;return FLn.test(t)?parseInt(t):e}function BLn(e){return Lt(AI(e))}function ywe(e){return e.map(t=>Iwe(t))}function Iwe(e){return kt(e)?vo(ywe(e.allOf)):Ue(e)?At(ywe(e.anyOf)):Wt(e)?BLn(e.const):e}function _we(e,t){let s=Iwe(t),a=Vr({},s,Xa());return at.IsExtendsTrueLike(a)?e:Wt(t)&&k.IsEqual(t.const,"length")?Xa():Rn()}function hwe(e,t){let s=Au(e,t);return ei(s)}function vwe(e,t,s){let a=cl(e,t,s);return ei(a)}function Cwe(e){let t=Li(e);return ei(t)}function Twe(e){let t=gs(e);return ei(t)}function Awe(e){return[`${e}`]}function Dwe(e){let t=xa(e);return ei(t)}function bwe(e){return e.reduce((t,s)=>[...t,...ei(s)],[])}function ei(e){return Nr(e)?hwe(e.$defs,e.$ref):Cs(e)?vwe(e.if,e.then,e.else):Jo(e)?Cwe(e.enum):kt(e)?Twe(e.allOf):Wt(e)?Awe(e.const):Us(e)?Dwe(e.pattern):Ue(e)?bwe(e.anyOf):[]}function DI(e){return ei(e)}function vT(e,t){return t.map(s=>CT(e,s))}function CT(e,t){return is(t)?ki(CT(e,t.items)):pr(t)?Su(vT(e,t.parameters),CT(e,t.instanceType)):dr(t)?yu(vT(e,t.parameters),CT(e,t.returnType)):Pn(t)?Hs(vT(e,t.items)):Ue(t)?At(vT(e,t.anyOf)):kt(t)?vo(vT(e,t.allOf)):eM(t)?ct(e):t}function Ewe(e,t){return CT(e,t)}function ULn(e,t){let s=t in e?e[t]:Rn();return Ewe(e,s)}function xwe(e,t){return t.reduce((s,a)=>[...s,ULn(e,a)],[])}function HLn(e,t){let s=DI(t),a=xwe(e,s);return Ja(a)}var jLn=new RegExp(Um);function zLn(e){return e.filter(s=>jLn.test(s))}function KLn(e){let t=GL(e),s=zLn(t),a=xwe(e,s);return Ja(a)}function Pwe(e,t){return Bs(t)?KLn(e):HLn(e,t)}function WLn(e){return Lt(AI(e))}function $we(e){return e.map(t=>ine(t))}function ine(e){return kt(e)?vo($we(e.allOf)):Ue(e)?At($we(e.anyOf)):Wt(e)?WLn(e.const):e}function QLn(e,t){return e.reduceRight((s,a,c)=>{let l=Vr({},Lt(c),t);return at.IsExtendsTrueLike(l)?[a,...s]:s},[])}function ZLn(e,t){let s=ine(t),a=QLn(e,s);return gd(a)}function YLn(e){return gd(e)}function wwe(e,t){return Wt(t)&&k.IsEqual(t.const,"length")?Lt(e.length):Bs(t)||ea(t)?YLn(e):ZLn(e,t)}function kwe(e,t){return is(e)?_we(e.items,t):Ht(e)?Pwe(e.properties,t):Pn(e)?wwe(e.items,t):Rn()}function XLn(e){return Nr(e)||Cs(e)||kt(e)||Ue(e)?TI(e):e}function ane(e,t,s){return St([e,t])?q.Update(kwe(XLn(e),t),{},s):lT(e,t,s)}function Lwe(e,t,s,a,c){let l=ve(e,t,s),u=ve(e,t,a);return ane(l,u,c)}function pM(e,t={}){return je("InstanceType",[e],t)}function Mwe(e,t={}){return cne(e,t)}function JLn(e){return pr(e)?e.instanceType:Rn()}function cne(e,t){return St([e])?q.Update(JLn(e),{},t):pM(e,t)}function Gwe(e,t,s,a={}){let c=ve(e,t,s);return cne(c,a)}function uT(e,t={}){return je("KeyOf",[e],t)}function Owe(e,t={}){return lne(e,t)}function Nwe(){return At([Xa(),Rc(),uI()])}function Vwe(e){return Xa()}function eMn(e){return e.reduce((s,a)=>UL(a)?[...s,Lt(AI(a))]:ws(),[])}function qwe(e){let t=k.Keys(e),s=eMn(t);return gd(s)}function Fwe(e){return mI(e)}function Bwe(e){let t=e.map((s,a)=>Lt(a));return gd(t)}function Uwe(e){return Fs(e)?Nwe():is(e)?Vwe(e.items):Ht(e)?qwe(e.properties):qr(e)?Fwe(e):Pn(e)?Bwe(e.items):Rn()}function tMn(e){return Nr(e)||Cs(e)||kt(e)||Ue(e)?TI(e):e}function lne(e,t){return St([e])?q.Update(Uwe(tMn(e)),{},t):uT(e,t)}function Hwe(e,t,s,a){let c=ve(e,t,s);return lne(c,a)}function aT(e,t,s,a,c={}){return je("Mapped",[e,t,s,a],c)}function jwe(e,t,s,a,c={}){return une({},Hn([],[]),e,t,s,a,c)}function nMn(e){let t=xa(e);return LM(t)}function sMn(e){return e.reduce((t,s)=>[...t,...LM(s)],[])}function rMn(e){let t=Li(e);return LM(t)}function oMn(e){return k.IsNumber(e)?[Lt(`${e}`)]:[Lt(e)]}function LM(e){return Jo(e)?rMn(e.enum):Wt(e)?oMn(e.const):Us(e)?nMn(e.pattern):Ue(e)?sMn(e.anyOf):[e]}function zwe(e){return LM(e)}function aMn(e){return Us(e)?xa(e.pattern):e}function iMn(e,t,s,a,c,l){let u=q.Assign(e,{[s.name]:a}),p=ve(u,t,c),d=aMn(p),m=ve(u,t,l);return ebe(d)||tbe(d)?{[d.const]:m}:{}}function cMn(e,t,s,a,c,l){return a.reduce((u,p)=>[...u,iMn(e,t,s,p,c,l)],[])}function lMn(e){return e.reduce((t,s)=>[...t,ct(s)],[])}function Kwe(e,t,s,a,c,l){let u=zwe(a),p=cMn(e,t,s,u,c,l),d=lMn(p);return gs(d)}function une(e,t,s,a,c,l,u){return St([a])?q.Update(Kwe(e,t,s,a,c,l),{},u):aT(s,a,c,l,u)}function Wwe(e,t,s,a,c,l,u){let p=ve(e,t,a);return une(e,t,s,p,c,l,u)}function uMn(e,t,s){let a=q.Assign(e,t);return k.Keys(t).filter(l=>s.includes(l)).reduce((l,u)=>({...l,[u]:x$e(a,u,t[u])}),{})}function pMn(e,t,s){let a=q.Assign(e,t);return k.Keys(t).filter(l=>!s.includes(l)).reduce((l,u)=>({...l,[u]:ve(a,Hn([],[]),t[u])}),{})}function dMn(e,t,s){let a=A$e(t),c=uMn(e,t,a),l=pMn(e,t,a),u={...c,...l};return q.Update(u,{},s)}function MM(e,t,s,a){return dMn(e,s,a)}function dM(e,t={}){return je("NonNullable",[e],t)}function Qwe(e,t={}){return pne(e,t)}function mMn(e){let t=At([cI(),fI()]);return hT(e,t,{})}function pne(e,t){return St([e])?q.Update(mMn(e),{},t):dM(e,t)}function Zwe(e,t,s,a){let c=ve(e,t,s);return pne(c,a)}function mM(e,t,s={}){return je("Omit",[e,t],s)}function Ywe(e,t,s={}){let a=k.IsArray(t)?CI(t):t;return dne(e,a,s)}function GM(e){let t=TI(e);return Ht(t)?t.properties:ws()}function fMn(e,t){return k.Keys(e).reduce((a,c)=>t.includes(c)?a:{...a,[c]:e[c]},{})}function Xwe(e,t){let s=GM(e),a=DI(t),c=fMn(s,a);return ct(c)}function dne(e,t,s){return St([e,t])?q.Update(Xwe(e,t),{},s):mM(e,t,s)}function Jwe(e,t,s,a,c){let l=ve(e,t,s),u=ve(e,t,a);return dne(l,u,c)}function fM(e,t={}){return je("Parameters",[e],t)}function eke(e,t={}){return mne(e,t)}function gMn(e){let t=dr(e)?e.parameters:[],s=Wm({},Hn([],[]),t);return Hs(s)}function mne(e,t){return St([e])?q.Update(gMn(e),{},t):fM(e,t)}function tke(e,t,s,a){let c=ve(e,t,s);return mne(c,a)}function gM(e,t={}){return je("Partial",[e],t)}function nke(e,t={}){return fne(e,t)}function ske(e,t){let s=Au(e,t),a=Du(s);return _u(q.Assign(e,{[t]:a}),t)}function rke(e,t,s){let a=cl(e,t,s);return Du(a)}function oke(e){let t=gs(e);return Du(t)}function ake(e){let t=e.map(s=>Du(s));return At(t)}function ike(e){let t=k.Keys(e).reduce((a,c)=>({...a,[c]:Yg(e[c])}),{});return ct(t)}function Du(e){return Nr(e)?ske(e.$defs,e.$ref):Cs(e)?rke(e.if,e.then,e.else):kt(e)?oke(e.allOf):Ue(e)?ake(e.anyOf):Ht(e)?ike(e.properties):ct({})}function fne(e,t){return St([e])?q.Update(Du(e),{},t):gM(e,t)}function cke(e,t,s,a){let c=ve(e,t,s);return fne(c,a)}function RM(e,t,s={}){return je("Pick",[e,t],s)}function lke(e,t,s={}){let a=k.IsArray(t)?CI(t):t;return gne(e,a,s)}function RMn(e,t){return k.Keys(e).reduce((a,c)=>t.includes(c)?q.Assign(a,{[c]:e[c]}):a,{})}function uke(e,t){let s=GM(e),a=DI(t),c=RMn(s,a);return ct(c)}function gne(e,t,s){return St([e,t])?q.Update(uke(e,t),{},s):RM(e,t,s)}function pke(e,t,s,a,c){let l=ve(e,t,s),u=ve(e,t,a);return gne(l,u,c)}function SM(e,t={}){return je("ReadonlyObject",[e],t)}function Rne(e,t={}){return Sne(e,t)}var dke=Rne;function mke(e){return iI(ki(e))}function fke(e,t){let s=Au(e,t),a=bu(s);return _u(q.Assign(e,{[t]:a}),t)}function gke(e,t,s){let a=cl(e,t,s);return bu(a)}function Rke(e){let t=gs(e);return bu(t)}function Ske(e){let t=k.Keys(e).reduce((a,c)=>({...a,[c]:eR(e[c])}),{});return ct(t)}function yke(e){return iI(Hs(e))}function Ike(e){let t=e.map(s=>bu(s));return At(t)}function bu(e){return is(e)?mke(e.items):Nr(e)?fke(e.$defs,e.$ref):Cs(e)?gke(e.if,e.then,e.else):kt(e)?Rke(e.allOf):Ht(e)?Ske(e.properties):Pn(e)?yke(e.items):Ue(e)?Ike(e.anyOf):e}function Sne(e,t){return St([e])?q.Update(bu(e),{},t):SM(e)}function _ke(e,t,s,a){let c=ve(e,t,s);return Sne(c,a)}function hke(e,t,s,a){return t.visited.includes(a)?s:a in e?ve(e,Hn(t.callstack,[...t.visited,a]),e[a]):s}function vke(e,t){let s=Au(e,t),a=Eu(s);return _u(q.Assign(e,{[t]:a}),t)}function Cke(e,t,s){let a=cl(e,t,s);return Eu(a)}function Tke(e){let t=gs(e);return Eu(t)}function Ake(e){let t=e.map(s=>Eu(s));return At(t)}function Dke(e){let t=k.Keys(e).reduce((a,c)=>({...a,[c]:WL(e[c])}),{});return ct(t)}function Eu(e){return Nr(e)?vke(e.$defs,e.$ref):Cs(e)?Cke(e.if,e.then,e.else):kt(e)?Tke(e.allOf):Ue(e)?Ake(e.anyOf):Ht(e)?Dke(e.properties):ct({})}function yM(e,t={}){return je("Required",[e],t)}function bke(e,t={}){return yne(e,t)}function yne(e,t){return St([e])?q.Update(Eu(e),{},t):yM(e,t)}function Eke(e,t,s,a){let c=ve(e,t,s);return yne(c,a)}function IM(e,t={}){return je("ReturnType",[e],t)}function xke(e,t={}){return Ine(e,t)}function SMn(e){return dr(e)?e.returnType:Rn()}function Ine(e,t){return St([e])?q.Update(SMn(e),{},t):IM(e,t)}function Pke(e,t,s,a={}){let c=ve(e,t,s);return Ine(c,a)}function _M(e,t){return je("With",[e,t],{})}function $ke(e,t){return _ne(e,t)}function _ne(e,t){return St([e])?q.Update(e,{},t):_M(e,t)}function wke(e,t,s,a){let c=ve(e,t,s);return _ne(c,a)}function yMn(e){return Hm(e)?Pn(e.items)?hne(e.items.items):$s(e.items)?[e]:mr(e.items)?[e]:[Rn()]:[e]}function hne(e){return e.reduce((s,a)=>[...s,...yMn(a)],[])}function Hn(e,t){return{callstack:e,visited:t}}function St(e){return k.ShiftLeft(e,(t,s)=>mr(t)?!1:St(s),()=>!0)}function RT(e,t,s){return k.Keys(s).reduce((a,c)=>({...a,[c]:ve(e,t,s[c])}),{})}function Wm(e,t,s){let a=Mi(e,t,s);return hne(a)}function Mi(e,t,s){return s.map(a=>ve(e,t,a))}function IMn(e,t){let s=ho(e)?WC(t,{}):t,a=tR(e)?KC(s,{}):s;return Jg(e)?TT(a,{}):a}function _Mn(e,t,s,a,c){return k.IsEqual(s,"AddImmutable")?kke(e,t,a[0],c):k.IsEqual(s,"RemoveImmutable")?U$e(e,t,a[0],c):k.IsEqual(s,"AddReadonly")?xDe(e,t,a[0],c):k.IsEqual(s,"RemoveReadonly")?gbe(e,t,a[0],c):k.IsEqual(s,"AddOptional")?PDe(e,t,a[0],c):k.IsEqual(s,"RemoveOptional")?ybe(e,t,a[0],c):k.IsEqual(s,"Capitalize")?X$e(e,t,a[0],c):k.IsEqual(s,"Conditional")?swe(e,t,a[0],a[1],a[2],a[3],c):k.IsEqual(s,"ConstructorParameters")?owe(e,t,a[0],c):k.IsEqual(s,"Evaluate")?w$e(e,t,a[0],c):k.IsEqual(s,"Exclude")?iwe(e,t,a[0],a[1],c):k.IsEqual(s,"Extract")?uwe(e,t,a[0],a[1],c):k.IsEqual(s,"Index")?Lwe(e,t,a[0],a[1],c):k.IsEqual(s,"InstanceType")?Gwe(e,t,a[0],c):k.IsEqual(s,"Interface")?h$e(e,t,a[0],a[1],c):k.IsEqual(s,"KeyOf")?Hwe(e,t,a[0],c):k.IsEqual(s,"Lowercase")?J$e(e,t,a[0],c):k.IsEqual(s,"Mapped")?Wwe(e,t,a[0],a[1],a[2],a[3],c):k.IsEqual(s,"Module")?MM(e,t,a[0],c):k.IsEqual(s,"NonNullable")?Zwe(e,t,a[0],c):k.IsEqual(s,"Pick")?pke(e,t,a[0],a[1],c):k.IsEqual(s,"Parameters")?tke(e,t,a[0],c):k.IsEqual(s,"Partial")?cke(e,t,a[0],c):k.IsEqual(s,"Omit")?Jwe(e,t,a[0],a[1],c):k.IsEqual(s,"ReadonlyObject")?_ke(e,t,a[0],c):k.IsEqual(s,"Record")?Mbe(e,t,a[0],a[1],c):k.IsEqual(s,"Required")?Eke(e,t,a[0],c):k.IsEqual(s,"ReturnType")?Pke(e,t,a[0],c):k.IsEqual(s,"TemplateLiteral")?VPe(e,t,a[0],c):k.IsEqual(s,"Uncapitalize")?ewe(e,t,a[0],c):k.IsEqual(s,"Uppercase")?twe(e,t,a[0],c):k.IsEqual(s,"With")?wke(e,t,a[0],a[1]):je(s,a,c)}function hMn(e,t,s){let a=mr(s)?hke(e,t,s,s.$ref):is(s)?ki(ve(e,t,s.items),ML(s)):vI(s)?kM(e,t,s.target,s.arguments):pr(s)?Su(Mi(e,t,s.parameters),ve(e,t,s.instanceType),$De(s)):dr(s)?yu(Mi(e,t,s.parameters),ve(e,t,s.returnType),wDe(s)):Cs(s)?Xg(ve(e,t,s.if),ve(e,t,s.then),ve(e,t,s.else),NDe(s)):kt(s)?vo(Mi(e,t,s.allOf),UDe(s)):Ht(s)?ct(RT(e,t,s.properties),GDe(s)):qr(s)?Gbe(yc(s),ve(e,t,na(s))):Hm(s)?rR(ve(e,t,s.items)):Pn(s)?Hs(Wm(e,t,s.items),fbe(s)):Ue(s)?At(Mi(e,t,s.anyOf),sbe(s)):s;return IMn(s,a)}function ve(e,t,s){return Nm(s)?_Mn(e,t,s.action,s.parameters,s.options):hMn(e,t,s)}function vne(e,t){return ve(e,Hn([],[]),t)}function vMn(e){return q.Update(e,{"~immutable":!0},{})}function TT(e,t){return q.Update(vMn(e),{},t)}function kke(e,t,s,a){let c=ve(e,t,s);return TT(c,a)}function Oxe(e,t={}){return je("AddImmutable",[e],t)}function iI(e,t={}){return TT(e,t)}function Nxe(e,t={}){return je("Evaluate",[e],t)}function Lke(e,t={}){return Yte(e,t)}function Vxe(e,t={}){return je("Module",[e],t)}function Mke(e,t={}){return MM({},Hn([],[]),e,t)}function Gke(...e){let[t,s,a]=hu.Match(e,{2:(u,p)=>k.IsString(u)?[{},u,p]:[u,p,{}],3:(u,p,d)=>[u,p,d],1:u=>[{},u,{}]}),c=LPe(s),l=k.IsArray(c)&&k.IsEqual(c.length,2)?ve(t,Hn([],[]),c[0]):Rn();return q.Update(l,{},a)}var Ct={};Un(Ct,{Any:()=>aI,Array:()=>ki,BigInt:()=>XC,Boolean:()=>FL,Call:()=>F$e,Capitalize:()=>W$e,Codec:()=>qL,Conditional:()=>nwe,Constructor:()=>Su,ConstructorParameters:()=>rwe,Cyclic:()=>_u,Decode:()=>KDe,DecodeBuilder:()=>YC,Dependent:()=>Xg,Encode:()=>WDe,EncodeBuilder:()=>ZC,Enum:()=>BDe,Evaluate:()=>Lke,Exclude:()=>awe,Extends:()=>Vr,ExtendsResult:()=>at,Extract:()=>cwe,Function:()=>yu,Generic:()=>Vm,Identifier:()=>JC,Immutable:()=>QDe,Index:()=>pwe,Infer:()=>QC,InstanceType:()=>Mwe,Instantiate:()=>vne,Integer:()=>nR,Interface:()=>v$e,Intersect:()=>vo,IsAny:()=>Fs,IsArray:()=>is,IsBigInt:()=>Cu,IsBoolean:()=>gc,IsCall:()=>vI,IsCodec:()=>VL,IsConstructor:()=>pr,IsCyclic:()=>Nr,IsDependent:()=>Cs,IsEnum:()=>Jo,IsEnumValue:()=>FDe,IsFunction:()=>dr,IsGeneric:()=>oI,IsIdentifier:()=>JDe,IsImmutable:()=>Jg,IsInfer:()=>$s,IsInteger:()=>ea,IsIntersect:()=>kt,IsKind:()=>Ge,IsLiteral:()=>Wt,IsNever:()=>qm,IsNull:()=>lI,IsNumber:()=>Bs,IsObject:()=>Ht,IsOptional:()=>ho,IsParameter:()=>nbe,IsReadonly:()=>tR,IsRecord:()=>qr,IsRef:()=>mr,IsRefine:()=>vte,IsRest:()=>Hm,IsSchema:()=>Js,IsString:()=>ta,IsSymbol:()=>Fm,IsTemplateLiteral:()=>Us,IsThis:()=>eM,IsTuple:()=>Pn,IsUndefined:()=>gI,IsUnion:()=>Ue,IsUnknown:()=>er,IsUnsafe:()=>NL,IsVoid:()=>Tu,KeyOf:()=>Owe,Literal:()=>Lt,Lowercase:()=>Q$e,Mapped:()=>jwe,Module:()=>Mke,Never:()=>Rn,NonNullable:()=>Qwe,Null:()=>cI,Number:()=>Xa,Object:()=>ct,Omit:()=>Ywe,Optional:()=>LDe,Parameter:()=>sR,Parameters:()=>eke,Partial:()=>nke,Pick:()=>lke,Readonly:()=>ZDe,ReadonlyObject:()=>Rne,ReadonlyType:()=>dke,Record:()=>YL,RecordKey:()=>mI,RecordPattern:()=>yc,RecordValue:()=>na,Ref:()=>fd,Refine:()=>YDe,Required:()=>bke,Rest:()=>rR,ReturnType:()=>xke,Script:()=>Gke,String:()=>Rc,Symbol:()=>uI,TemplateLiteral:()=>FPe,This:()=>JL,Tuple:()=>Hs,Uncapitalize:()=>Z$e,Undefined:()=>fI,Union:()=>At,Unknown:()=>vr,Unsafe:()=>ODe,Uppercase:()=>Y$e,Void:()=>tM,With:()=>$ke});var AT="submit_test_gaps",DT="submit_solution_audit_findings",bT="submit_solver_gaps",hta=Ct.Object({verdict:Ct.Union([Ct.Literal("PASS"),Ct.Literal("FAIL")],{description:"FAIL only for a genuine blocking issue (clear rubric violation, agent-fault-worthy gap, unfair/undiscoverable test requirement, or a real determinism/regression risk). Optional, minor, or stylistic points are NOT grounds for FAIL \u2014 put those in `notes` instead and use PASS."}),summary:Ct.String({description:"One short sentence summarizing the verdict."}),reasons:Ct.Array(Ct.String(),{description:"Specific BLOCKING justifications only, citing rubric item IDs and concrete evidence from the files you read. Required (non-empty) when verdict is FAIL. Use an empty array when verdict is PASS."}),notes:Ct.Array(Ct.String(),{description:"Non-blocking, optional/minor observations or suggested improvements \u2014 the kind of feedback a real reviewer leaves as 'Minor/optional' without failing the task. Include these regardless of verdict; use an empty array if you truly have none."})});var CMn=Ct.Object({gaps:Ct.Array(Ct.Object({description:Ct.String({description:"A fair, publicly observable missing behavioral test."}),justification:Ct.String({description:"Why the gap is grounded in agent_prompt.md or the repository and why a plausible incorrect implementation could pass the current tests despite missing this behavior."})}),{description:"The complete final list of distinct, evidence-backed positive and negative behavioral test gaps. Use an empty array only after exhaustive analysis finds none."})});function Oke(e){return{name:AT,label:"Submit Test Gaps",description:"Submit the complete final list of fair behavioral test gaps. This is the ONLY way to report your result \u2014 call it exactly once, as your last action, after independently checking every candidate.",parameters:CMn,async execute(t,s){let a=s.gaps??[];return e.gaps=a,{content:[{type:"text",text:`Recorded ${a.length} test gap(s)`}],details:void 0}}}}var TMn=Ct.Object({category:Ct.Union([Ct.Literal("missing-requirement"),Ct.Literal("regression"),Ct.Literal("architecture"),Ct.Literal("unsafe-failure"),Ct.Literal("inconsistent-path"),Ct.Literal("dead-code"),Ct.Literal("unrelated-change")],{description:"The kind of actionable quality problem found in the solution implementation."}),subject:Ct.String({description:"A short behavior, symbol, or concern identifier; do not require a source line or file location."}),problem:Ct.String({description:"What is wrong with the implementation and why it is actionable."}),evidence:Ct.String({description:"The prompt, repository, implementation, or regression evidence supporting the finding."}),requiredBehavior:Ct.String({description:"The requirement, invariant, or solution-quality property that must be preserved."}),recommendation:Ct.String({description:"A concrete repair that stays within the prompt and repository conventions."})}),AMn=Ct.Object({findings:Ct.Array(TMn,{description:"Only confirmed, actionable solution-quality findings. Use an empty array when the implementation meets the prompt and repository standards."})});function Nke(e){return{name:DT,label:"Submit Solution Precheck Findings",description:"Submit the complete result from the single post-implementation solution-quality audit. This is the ONLY way to report your result \u2014 call it exactly once, as your last action. Use an empty list when no actionable issue is found.",parameters:AMn,async execute(t,s){let a=s.findings??[];return e.findings=a,{content:[{type:"text",text:`Recorded ${a.length} solution-precheck finding(s)`}],details:void 0}}}}var DMn=Ct.Object({gaps:Ct.Array(Ct.Object({description:Ct.String({description:"The specific behavioral gap: a way one or more solver's diff differs materially from what agent_prompt.md/solution.patch require, despite that solver passing `./test.sh new`."}),justification:Ct.String({description:"Why this is a genuine requirement from agent_prompt.md or solution.patch (cite the specific requirement/line) that the solver's diff misses, contradicts, or diverges from \u2014 and why the current tests fail to catch that divergence."}),evidence:Ct.String({description:"Which solver(s) (by index) exhibit this, and the specific part of their diff that grounds the gap."})}),{description:"Concrete, diff-grounded behavioral gaps \u2014 cases where a passing solver's materially different approach reveals that `test.sh new` under-specifies a real requirement. Use an empty array if the solvers converged on equivalent behavior; do not manufacture gaps just to report something."})});function Vke(e){return{name:bT,label:"Submit Solver Gaps",description:"Submit your final list of behavioral gaps found by comparing the solver diffs against the real solution.patch. This is the ONLY way to report your result \u2014 call it exactly once, as your last action, after you have finished comparing every solver.",parameters:DMn,async execute(t,s){let a=s.gaps??[];return e.gaps=a,{content:[{type:"text",text:`Recorded ${a.length} solver gap(s)`}],details:void 0}}}}function bMn(e){return["The problem prompt is at `agent_prompt.md`.","Before this run, the orchestrator identified these code files as the files needed for this problem:",e.length>0?e.map(s=>`- \`${s}\``).join(`
|
|
84
84
|
`):"- No changed code files were identified.","Read these files first with read/grep/find/ls. They are starting points, not a limit: inspect additional actual source, test, fixture, and public analogue files when needed. Base conclusions on the code files and the prompt, not on generated representations."].join(`
|
|
85
85
|
`)}function EMn(e){return["The task contract is in `agent_prompt.md`; read it before judging the implementation.","The orchestrator identified these changed code files for this audit:",e.length>0?e.map(s=>`- \`${s}\``).join(`
|
|
86
86
|
`):"- No changed code files were identified.","Read `agent_prompt.md` and these changed code files first. They are the authoritative starting scope, like the changed-code file list. You may read directly imported or extended code and one or two closest code analogues only when necessary to judge the changed code's quality.","Do not open or inspect `solution.patch`, `test.patch`, any other `.patch`, any `.sh`, Dockerfiles, generated files, dependency lockfiles, unrelated repository areas, or any Markdown file other than `agent_prompt.md`."].join(`
|
|
@@ -88,31 +88,32 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
88
88
|
`):"No in-memory changed-code diff was available for this audit."}function PMn(e,t){return[e,"You are working inside the actual repository (this is your current directory) in read-only mode. You have access to read/grep/find/ls tools only \u2014 you cannot execute code or edit files.",bMn(t)]}var $Mn=["Thoroughness \u2014 your job is high recall on genuine gaps only:","- There is no target count or cap: do not stop at 10 (or any other arbitrary number). For each prompt sentence, enumerate as many distinct uncovered required behaviors and edge cases as the files justify, then continue until an additional sweep finds no new genuine gap.","- Find every gap you can justify with concrete evidence. Do not stop after the first obvious ones \u2014 keep reading until you have systematically covered the prompt and relevant repository code.","- After your first pass, run at least one deliberate second sweep (re-read `agent_prompt.md` and grep/read the relevant code files) before submitting \u2014 but if that sweep still finds nothing, submit an empty list.","- Do not self-censor or merge distinct genuine gaps into one. Never invent or pad the list to seem thorough; an empty array is correct when exhaustive analysis truly finds none.","- Hunt subtle gaps too: behaviors that may be missed under other valid inputs, repository conventions, interaction effects, ordering/timing, and branches in the relevant source code that need behavioral coverage.","- Include a candidate only when you can cite specific grounding and a concrete false-pass risk \u2014 not to meet a quota."];function qke(e,t,s,a=[]){return[...PMn("You are the sole, exhaustive behavioral test-gap finder for a coding-agent benchmark task. Review the task prompt sentence by sentence, finding both missing required behavior (positive gaps) and missing forbidden or wrong behavior (negative gaps), then independently validate and filter your own findings before reporting.",a),"","First split `agent_prompt.md` into meaningful sentences using periods (`.`) as the sentence boundary. Create an internal TODO checklist of every resulting requirement sentence and do not finish until every item is checked.","","For each sentence, inspect the relevant source files and closest analogues with read/grep/find/ls. Trace public contracts, branches, guards, early returns, state transitions, side effects, boundary handling, and prohibited outcomes. Report every distinct prompt-required behavior that a plausible implementation could miss while still passing the current tests. Include positive and negative gaps, including relevant boundary, empty, repeated, interacting, ordering, and failure cases; do not stop at an arbitrary count.","",...$Mn,"","The `# Gaps in tests` section of `rules.md` is authoritative. Apply its candidate, T-metric, contract-first, assertion-strength, fixture, and edge-case rules to every proposed gap:",t,"","Test-coverage checklist for calibration:",e,"","Fairness rules are also authoritative. Keep only behavior observable through a user, caller, or existing public contract. Do not require private helpers, internal state, implementation structure, call order, selectors, or incidental strings unless the prompt explicitly makes them public requirements:",s,"","Before submitting, perform a skeptical second pass over every candidate. Drop speculative, nice-to-have, duplicate, reference-only, implementation-specific, or unfair candidates. For every retained gap, provide a concise description and a justification citing the prompt/repository grounding and the plausible false-pass risk. Do not propose the exact test implementation.",`When all sentences and the self-review are complete, call \`${AT}\` exactly once with the complete final list of gaps (which may be empty). That tool call is your only way to report a result.`].join(`
|
|
89
89
|
`)}function Fke(e,t=[],s=""){return["You are the sole, strict post-implementation solution-quality auditor for a coding-agent benchmark task.","You must discover candidate defects and then skeptically re-check and deduplicate them yourself before submitting. Do not defer validation to another agent.","You are working inside the actual repository in read-only mode. You have access to read/grep/find/ls tools only \u2014 you cannot execute code, edit files, or modify the repository.","The task contract is `agent_prompt.md`. The changed code-file list and in-memory changed-code diff below are the authoritative implementation scope. Inspect the changed source and directly relevant public code/analogues only. Do not inspect `solution.patch`, `test.patch`, other patches, unrelated Markdown, shell scripts, Dockerfiles, generated files, lockfiles, or unrelated repository areas.",EMn(t),xMn(s),"","Use the `# Gaps in solution` section of `rules.md` below as the authoritative solution-gap contract. Report concrete implementation defects, not test-quality complaints, hypothetical hardening, reference-only differences, or personal style preferences.","","Mandatory full-audit procedure \u2014 complete every step before calling the report tool:","1. Read `agent_prompt.md` and every listed changed code file completely enough to understand all changed symbols, control flow, public boundaries, state transitions, error handling, cleanup, and compatibility behavior.","2. Map each explicit requirement, public invariant, prohibition, supported path, and failure guarantee to the changed code. Check for missing requirements, wrong public results/state, regressions, inconsistent equivalent entry points, unsafe partial failure/cancellation/rollback/concurrency/resource behavior, dead or unreachable code, and unrelated changes.","3. Compare changed areas with one or two closest real repository analogues for layering, naming, exports, logging and errors, persistence, async/state handling, cleanup, and public extension points. Treat a convention as evidence only when it is directly relevant and unambiguous; do not prescribe one equivalent architecture.","4. For every candidate, cite the exact prompt/public contract or established convention, the concrete changed-code evidence, the observable consequence, and why it is a real defect rather than a different valid implementation. Use the narrowest S1/S2/S3 quality classification implied by the rules, and allow combined metrics when justified.","5. Perform an adversarial self-review: imagine a compliant caller, invalid input, later-phase failure, repeated or parallel invocation, fresh process/backend, and every equivalent public path. Re-read every candidate and drop anything speculative, duplicate, unrelated to the inspected scope, or unsupported by evidence.","6. Return an empty list when the changed code is good quality after this complete review. Do not use the reference solution or visible tests as a completeness oracle.","","Use only these finding categories (include S1/S2/S3 in the evidence or subject when useful):","- missing-requirement: the implementation misses an explicit prompt requirement or required public behavior (usually S1).","- regression: the change breaks existing behavior, compatibility, defaults, or an unrelated public scope (S1/S3).","- architecture: the implementation violates a clear repository pattern/public extension point or adds avoidable duplication/coupling that harms correctness or maintainability (S3).","- unsafe-failure: invalid input, cancellation, partial failure, persistence, rollback, concurrency, or cleanup leaves invalid, destructive, leaked, or inconsistent state contrary to the contract (S2, possibly S1).","- inconsistent-path: equivalent public entry points, representations, modes, or lifecycle paths have different semantics without a prompt-supported reason (S1/S2).","- dead-code: grep/read proves added or changed code is unused, unreachable, or leftover scaffolding (S3).","- unrelated-change: behavior outside the task changed without a contract or regression reason (S3).","","Solution-gap rules from `rules.md` \u2014 authoritative for this audit:",e,"","For every retained finding provide its category, short subject identifier, concrete problem, evidence from the inspected code/analogues and prompt, required behavior or quality property to preserve, and a focused repair recommendation. Do not prescribe a private name or one equivalent implementation when alternatives remain valid.",`When you are done, call the \`${DT}\` tool exactly once with the complete candidate list. That tool call is your only way to report a result.`].join(`
|
|
90
90
|
`)}function wMn(e){let t=e.status==="ok"?e.passed?"PASSED all new tests":"did NOT pass all new tests":`did not complete normally (status: ${e.status})`;return`- Solver ${e.index} \u2014 ${t} \u2014 solution.diff / test_output.txt in \`${BC}/solver_${e.index}/\``}function Bke(e,t,s,a){let c=["You are a strict, skeptical behavioral-gap auditor for a coding-agent benchmark task.","You are working inside a throwaway, read-only copy of a git repository (this is your current directory). You have access to read/grep/find/ls tools only \u2014 you cannot execute code, apply patches, or edit files.","The repo root contains `agent_prompt.md` (the real task description), `solution.patch` (a unified diff of the real golden/reference solution), and `test.patch` (a unified diff adding the hidden tests).","",`Separately, several coding agents ('solvers') were each given the same \`agent_prompt.md\` plus the failing tests from \`test.patch\` \u2014 but never \`solution.patch\` \u2014 and asked to implement the task TDD-style, iterating with real shell access until the tests passed or they gave up. Each solver's diff and full \`test.sh new\` output \u2014 captured and verified independently by the harness, not self-reported \u2014 is saved under \`${BC}/solver_<index>/\` (\`solution.diff\`, \`test_output.txt\`), with a \`${BC}/manifest.json\` summary. Use read/grep/find/ls to open exactly what you need. Status summary:`,"",...e.map(wMn),"","Your job: compare the reference `solution.patch` with each solver's `solution.diff` to find concrete BEHAVIORAL GAPS. Keep only a difference where: (a) `agent_prompt.md` explicitly requires the behavior, (b) the solver passed the relevant tests (even if it failed elsewhere), (c) the reference and solver produce observably different behavior for a real edge case or scenario, and (d) a fair public-facing test could distinguish them. The reference solution is evidence for scenarios to inspect, never a specification by itself.","","How to work:","1. Read `agent_prompt.md` sentence by sentence and note every distinct requirement, constraint, and prohibition.","2. Read `solution.patch` to see how the reference solution satisfies those requirements.","3. For each solver, read its `solution.diff` and compare it against the reference behavior. Look specifically for a solver shortcut, missed constraint, edge case, or side effect that the PROMPT requires, where the solver still passes because the tests do not observe the behavioral difference.","4. A solver that did not pass the full suite may still provide evidence for a completed, relevant part of its diff, but only when its test output shows the failure is unrelated to that behavior (or shows the relevant tests already passed). Do not treat its failing behavior as a gap, and do not infer gaps from a hypothetical wrong implementation.","5. Treat multiple solvers converging on the same divergent-but-passing shortcut as stronger evidence of a real gap, not proof it's acceptable \u2014 the tests are what's under scrutiny, not majority solver behavior.","","The `# Gaps in tests` section of `rules.md` is authoritative for candidate gaps:",s,"- Every gap must be evidenced by an actual, cited solver diff and a contrasting reference behavior. For a solver that failed the full suite, also cite its test output showing that the relevant behavior already passed or is unrelated to the failure. Cite the prompt sentence that makes the behavioral difference required; do not report a gap that is purely theoretical or based only on the reference implementation.","- It is fine, and expected, to submit an empty list if the solvers that passed all converged on behavior equivalent to the reference solution with no material gaps.","- Do not self-censor for volume, but do not pad the list either \u2014 only include what you can concretely justify with cited evidence.","","For reference, here is the checklist for the tests focus area (use it to calibrate what good coverage looks like, not as a list of gaps to report verbatim):",t,"","Apply the `# Fairness vs. unfairness` rules from `rules.md` before retaining any candidate:",a];return c.push("",`When you are done, call the \`${bT}\` tool exactly once with your final list (which may be empty). That tool call is your only way to report a result.`),c.join(`
|
|
91
|
-
`)}var kMn=900*1e3,Ane=["read","grep","find","ls"];function Dne(e){return e==="off"?void 0:e}async function bne(e,t,s=kMn){return t.aborted?"cancelled":new Promise((a,c)=>{let l=!1,u,p=()=>{u!==void 0&&clearTimeout(u),t.removeEventListener("abort",m)},d=S=>{l||(l=!0,p(),a(S))},m=()=>d("cancelled");u=setTimeout(()=>d("timedOut"),s),t.addEventListener("abort",m,{once:!0}),e().then(()=>d("done"),S=>{l||(l=!0,p(),c(S))})})}async function Ene(e){if(e){try{e.isIdle||await e.abort()}catch{}e.dispose()}}async function Uke(e){let t={},s=e.model,a;try{({session:a}=await Cne({cwd:e.tempDir,model:s,thinkingLevel:Dne(e.thinkingLevel),tools:[...Ane,AT],customTools:[Oke(t)],sessionManager:Tne.inMemory()}));let c=await bne(async()=>{await a?.prompt(qke(e.testRubric,e.gapRules,e.fairnessRules,e.codeFiles))},e.cancelSignal,e.timeoutMinutes*60*1e3);if(c!=="done")return await a.abort(),{status:c,gaps:[]}}catch{return{status:"error",gaps:[]}}finally{await Ene(a)}return t.gaps?{status:"ok",gaps:t.gaps}:{status:"noSubmission",gaps:[]}}async function Hke(e){let t={},s=e.model,a;try{({session:a}=await Cne({cwd:e.tempDir,model:s,thinkingLevel:Dne(e.thinkingLevel),tools:[...Ane,bT],customTools:[Vke(t)],sessionManager:Tne.inMemory()}));let c=await bne(async()=>{await a?.prompt(Bke(e.solverResults,e.testRubric,e.gapRules,e.fairnessRules))},e.cancelSignal);if(c!=="done")return await a.abort(),{status:c,gaps:[]}}catch{return{status:"error",gaps:[]}}finally{await Ene(a)}return t.gaps?{status:"ok",gaps:t.gaps}:{status:"noSubmission",gaps:[]}}async function jke(e){let t={},s=e.model,a;try{({session:a}=await Cne({cwd:e.tempDir,model:s,thinkingLevel:Dne(e.thinkingLevel),tools:[...Ane,DT],customTools:[Nke(t)],sessionManager:Tne.inMemory()}));let c=await bne(async()=>{await a?.prompt(Fke(e.solutionRules,e.codeFiles,e.changedCodeDiff))},e.cancelSignal,e.timeoutMinutes*60*1e3);if(c!=="done")return await a.abort(),{status:c,findings:[]}}catch{return{status:"error",findings:[]}}finally{await Ene(a)}return t.findings?{status:"ok",findings:t.findings}:{status:"noSubmission",findings:[]}}var zg=Jn(xtn(),1),Io=Jn(mdn(),1),hr=Jn(uDn(),1),Hee=Jn(Jbn(),1),rEn=Jn(H_(),1),Yy=Jn(eEn(),1);import{randomUUID as DAe}from"node:crypto";import{createReadStream as Dxo,existsSync as xAe,mkdirSync as bxo,readFileSync as sEn,rmSync as bAe,writeFileSync as $C}from"node:fs";import{tmpdir as EAe}from"node:os";import{join as dd}from"node:path";import{fileURLToPath as nEn}from"node:url";import{posix as vxo}from"node:path";function tEn(e){let t,s="/",a={},c=[];for(let l of Txo(e)){let u=l.match(/^([A-Za-z]+)(?:\s+(.+))?$/s);if(!u)throw new Error(`Invalid Dockerfile instruction: ${l}`);let p=u[1]?.toUpperCase(),d=u[2]?.trim()??"";switch(p){case"FROM":{if(t)throw new Error("Multi-stage Dockerfiles are not supported by the Fargate runner.");let m=Bee(d);if(!m[0]||m.some(S=>S.startsWith("--")||S.toUpperCase()==="AS"))throw new Error(`Unsupported FROM instruction: ${l}`);t=m[0];break}case"WORKDIR":if(!d||d.includes("$")||d.includes("\\"))throw new Error(`WORKDIR must be a concrete POSIX path: ${l}`);s=vxo.resolve(s,d);break;case"ENV":Cxo(d,a);break;case"COPY":if(Bee(d).length<2||Bee(d).some(m=>m.startsWith("--")))throw new Error(`COPY flags and malformed COPY instructions are not supported: ${l}`);break;case"RUN":if(!d||d.startsWith("--")||d.startsWith("["))throw new Error(`Only shell-form RUN instructions without options are supported: ${l}`);c.push(d);break;case"CMD":case"ENTRYPOINT":case"LABEL":case"EXPOSE":break;default:throw new Error(`Unsupported Dockerfile instruction for Fargate execution: ${p}`)}}if(!t)throw new Error("Dockerfile is missing a FROM instruction.");return{baseImage:t,workdir:s,env:a,runtimeCommands:c}}function Cxo(e,t){let s=Bee(e);if(s.length===0)throw new Error("ENV requires a variable assignment.");if(s[0]?.includes("=")){for(let a of s){let c=a.indexOf("=");if(c<=0)throw new Error(`Invalid ENV assignment: ${a}`);t[a.slice(0,c)]=a.slice(c+1)}return}if(s.length<2)throw new Error(`ENV requires a value: ${e}`);t[s[0]]=s.slice(1).join(" ")}function Txo(e){let t=[],s="";for(let a of e.split(/\r?\n/)){let c=a.trimEnd();if(!s&&/^\s*#/.test(c))continue;let l=s?`${s}${c.trimStart()}`:c.trimStart();Axo(l)?s=`${l.slice(0,-1).trimEnd()} `:(l.trim()&&t.push(l.trim()),s="")}return s.trim()&&t.push(s.trim()),t}function Axo(e){let t=0;for(let s=e.length-1;s>=0&&e[s]==="\\";s-=1)t+=1;return t%2===1}function Bee(e){let t=[],s="",a,c=!1;for(let l of e)c?(s+=l,c=!1):l==="\\"&&a!=="'"?c=!0:a?l===a?a=void 0:s+=l:l==='"'||l==="'"?a=l:/\s/.test(l)?s&&(t.push(s),s=""):s+=l;if(c&&(s+="\\"),a)throw new Error(`Unterminated quote in Dockerfile instruction: ${e}`);return s&&t.push(s),t}var oEn="shipd-worker",Exo="fargate-worker.mjs",PC=3300,xxo=5e3;function aEn(e){return new Promise(t=>setTimeout(t,e))}function Pxo(e,t){let s=(0,rEn.defaultProvider)({profile:process.env.AWS_PROFILE??t}),a={region:e,credentials:s,maxAttempts:5};return{ecs:new Io.ECSClient(a),ec2:new zg.EC2Client(a),s3:new hr.S3Client(a),sts:new Hee.STSClient(a)}}async function iEn(e){if(e.cancelSignal.aborted)throw new Error("Cancelled by user.");e.onPhase?.("preparing image");let t=dd(e.repoDir,"Dockerfile");if(!xAe(t))throw new Error(`Fargate ${e.mode==="solver"?"solver gap finder":"patch precheck"} requires Dockerfile in the project root.`);let s=tEn(sEn(t,"utf-8")),a
|
|
92
|
-
`,"utf-8"),await Uee(l.s3,J.bucket,U.bootstrap,L,"application/json");let Lm=await(0,Yy.getSignedUrl)(l.s3,new hr.GetObjectCommand({Bucket:J.bucket,Key:U.bootstrap}),{expiresIn:PC}),RL={name:oEn,environment:[{name:"SHIPD_BOOTSTRAP_URL",value:Lm}]},fc=await l.ecs.send(new Io.RunTaskCommand({cluster:J.cluster,capacityProviderStrategy:[{capacityProvider:"FARGATE_SPOT",weight:1}],taskDefinition:ce,count:1,networkConfiguration:{awsvpcConfiguration:{subnets:J.subnets,securityGroups:[J.securityGroup],assignPublicIp:"ENABLED"}},overrides:{containerOverrides:[RL]}})),SL=fc.failures?.[0]?.reason;if(T=fc.tasks?.[0]?.taskArn,x=J.cluster,!T){Ne=SL??"Fargate could not place the Spot task.",e.onPhase?.("requesting sandbox");continue}e.onPhase?.("sandbox created");let Za=await
|
|
91
|
+
`)}var kMn=900*1e3,Ane=["read","grep","find","ls"];function Dne(e){return e==="off"?void 0:e}async function bne(e,t,s=kMn){return t.aborted?"cancelled":new Promise((a,c)=>{let l=!1,u,p=()=>{u!==void 0&&clearTimeout(u),t.removeEventListener("abort",m)},d=S=>{l||(l=!0,p(),a(S))},m=()=>d("cancelled");u=setTimeout(()=>d("timedOut"),s),t.addEventListener("abort",m,{once:!0}),e().then(()=>d("done"),S=>{l||(l=!0,p(),c(S))})})}async function Ene(e){if(e){try{e.isIdle||await e.abort()}catch{}e.dispose()}}async function Uke(e){let t={},s=e.model,a;try{({session:a}=await Cne({cwd:e.tempDir,model:s,thinkingLevel:Dne(e.thinkingLevel),tools:[...Ane,AT],customTools:[Oke(t)],sessionManager:Tne.inMemory()}));let c=await bne(async()=>{await a?.prompt(qke(e.testRubric,e.gapRules,e.fairnessRules,e.codeFiles))},e.cancelSignal,e.timeoutMinutes*60*1e3);if(c!=="done")return await a.abort(),{status:c,gaps:[]}}catch{return{status:"error",gaps:[]}}finally{await Ene(a)}return t.gaps?{status:"ok",gaps:t.gaps}:{status:"noSubmission",gaps:[]}}async function Hke(e){let t={},s=e.model,a;try{({session:a}=await Cne({cwd:e.tempDir,model:s,thinkingLevel:Dne(e.thinkingLevel),tools:[...Ane,bT],customTools:[Vke(t)],sessionManager:Tne.inMemory()}));let c=await bne(async()=>{await a?.prompt(Bke(e.solverResults,e.testRubric,e.gapRules,e.fairnessRules))},e.cancelSignal);if(c!=="done")return await a.abort(),{status:c,gaps:[]}}catch{return{status:"error",gaps:[]}}finally{await Ene(a)}return t.gaps?{status:"ok",gaps:t.gaps}:{status:"noSubmission",gaps:[]}}async function jke(e){let t={},s=e.model,a;try{({session:a}=await Cne({cwd:e.tempDir,model:s,thinkingLevel:Dne(e.thinkingLevel),tools:[...Ane,DT],customTools:[Nke(t)],sessionManager:Tne.inMemory()}));let c=await bne(async()=>{await a?.prompt(Fke(e.solutionRules,e.codeFiles,e.changedCodeDiff))},e.cancelSignal,e.timeoutMinutes*60*1e3);if(c!=="done")return await a.abort(),{status:c,findings:[]}}catch{return{status:"error",findings:[]}}finally{await Ene(a)}return t.findings?{status:"ok",findings:t.findings}:{status:"noSubmission",findings:[]}}var zg=Jn(xtn(),1),Io=Jn(mdn(),1),hr=Jn(uDn(),1),Hee=Jn(Jbn(),1),rEn=Jn(H_(),1),Yy=Jn(eEn(),1);import{randomUUID as DAe}from"node:crypto";import{createReadStream as Dxo,existsSync as xAe,mkdirSync as bxo,readFileSync as sEn,rmSync as bAe,writeFileSync as $C}from"node:fs";import{tmpdir as EAe}from"node:os";import{join as dd}from"node:path";import{fileURLToPath as nEn}from"node:url";import{posix as vxo}from"node:path";function tEn(e){let t,s="/",a={},c=[];for(let l of Txo(e)){let u=l.match(/^([A-Za-z]+)(?:\s+(.+))?$/s);if(!u)throw new Error(`Invalid Dockerfile instruction: ${l}`);let p=u[1]?.toUpperCase(),d=u[2]?.trim()??"";switch(p){case"FROM":{if(t)throw new Error("Multi-stage Dockerfiles are not supported by the Fargate runner.");let m=Bee(d);if(!m[0]||m.some(S=>S.startsWith("--")||S.toUpperCase()==="AS"))throw new Error(`Unsupported FROM instruction: ${l}`);t=m[0];break}case"WORKDIR":if(!d||d.includes("$")||d.includes("\\"))throw new Error(`WORKDIR must be a concrete POSIX path: ${l}`);s=vxo.resolve(s,d);break;case"ENV":Cxo(d,a);break;case"COPY":if(Bee(d).length<2||Bee(d).some(m=>m.startsWith("--")))throw new Error(`COPY flags and malformed COPY instructions are not supported: ${l}`);break;case"RUN":if(!d||d.startsWith("--")||d.startsWith("["))throw new Error(`Only shell-form RUN instructions without options are supported: ${l}`);c.push(d);break;case"CMD":case"ENTRYPOINT":case"LABEL":case"EXPOSE":break;default:throw new Error(`Unsupported Dockerfile instruction for Fargate execution: ${p}`)}}if(!t)throw new Error("Dockerfile is missing a FROM instruction.");return{baseImage:t,workdir:s,env:a,runtimeCommands:c}}function Cxo(e,t){let s=Bee(e);if(s.length===0)throw new Error("ENV requires a variable assignment.");if(s[0]?.includes("=")){for(let a of s){let c=a.indexOf("=");if(c<=0)throw new Error(`Invalid ENV assignment: ${a}`);t[a.slice(0,c)]=a.slice(c+1)}return}if(s.length<2)throw new Error(`ENV requires a value: ${e}`);t[s[0]]=s.slice(1).join(" ")}function Txo(e){let t=[],s="";for(let a of e.split(/\r?\n/)){let c=a.trimEnd();if(!s&&/^\s*#/.test(c))continue;let l=s?`${s}${c.trimStart()}`:c.trimStart();Axo(l)?s=`${l.slice(0,-1).trimEnd()} `:(l.trim()&&t.push(l.trim()),s="")}return s.trim()&&t.push(s.trim()),t}function Axo(e){let t=0;for(let s=e.length-1;s>=0&&e[s]==="\\";s-=1)t+=1;return t%2===1}function Bee(e){let t=[],s="",a,c=!1;for(let l of e)c?(s+=l,c=!1):l==="\\"&&a!=="'"?c=!0:a?l===a?a=void 0:s+=l:l==='"'||l==="'"?a=l:/\s/.test(l)?s&&(t.push(s),s=""):s+=l;if(c&&(s+="\\"),a)throw new Error(`Unterminated quote in Dockerfile instruction: ${e}`);return s&&t.push(s),t}var oEn="shipd-worker",Exo="fargate-worker.mjs",PC=3300,xxo=5e3;function aEn(e){return new Promise(t=>setTimeout(t,e))}function Pxo(e,t){let s=(0,rEn.defaultProvider)({profile:process.env.AWS_PROFILE??t}),a={region:e,credentials:s,maxAttempts:5};return{ecs:new Io.ECSClient(a),ec2:new zg.EC2Client(a),s3:new hr.S3Client(a),sts:new Hee.STSClient(a)}}async function iEn(e){if(e.cancelSignal.aborted)throw new Error("Cancelled by user.");e.onPhase?.("preparing image");let t=dd(e.repoDir,"Dockerfile");if(!xAe(t))throw new Error(`Fargate ${e.mode==="solver"?"solver gap finder":"patch precheck"} requires Dockerfile in the project root.`);let s=tEn(sEn(t,"utf-8")),a=wxo(e.config,e.repoDir,e.mode),c=process.env.AWS_REGION??a.region??"us-east-1",l=Pxo(c,a.awsProfile),u=sDe(e.repoDir,a),p=dd(EAe(),`.shipd-fargate-source-${DAe()}.tar.gz`),d=Lxo(),m=e.solverConfig,S=e.mode==="solver"?dd(kxo(),"auth.json"):void 0,v=S?dd(EAe(),`.shipd-fargate-auth-${DAe()}.json`):void 0,T,x,w,L,G=!1,O=()=>{T&&(G=!0,l.ecs.send(new Io.StopTaskCommand({cluster:x,task:T,reason:"shipd checks cancelled"})).catch(()=>{}))};e.cancelSignal.addEventListener("abort",O,{once:!0});let U={source:`runs/${e.runId}/source.tar.gz`,worker:`runs/${e.runId}/${Exo}`,auth:`runs/${e.runId}/auth.json`,bootstrap:`runs/${e.runId}/bootstrap.json`,result:`runs/${e.runId}/result.json`};try{if(e.mode==="solver"&&!m)throw new Error("Fargate solver configuration is missing.");if(S&&!xAe(S))throw new Error(`Missing Pi auth file: ${S}`);let J=await Oxo(l,a,c);w=J.bucket,x=J.cluster,await Mxo(e.pi,e.snapshotDir,p,e.cancelSignal,e.mode==="solver"),await Uee(l.s3,J.bucket,U.source,p,"application/gzip"),await Uee(l.s3,J.bucket,U.worker,d,"text/javascript"),S&&v&&m&&(Gxo(S,m.provider,v),await Uee(l.s3,J.bucket,U.auth,v,"application/json")),L=dd(EAe(),`.shipd-fargate-bootstrap-${DAe()}.json`);let ce=await Vxo(l.ecs,s,u.cpu,u.memoryMiB,c,a),ke=e.mode==="solver"?Math.max(1,Math.floor(m?.timeoutMinutes??1)):Math.max(1,Math.floor(e.precheckTimeoutMinutes??20)),Ee=e.mode==="solver"?Math.max(1,Math.floor(m?.solverCount??1)):0,_e=!!a.taskRoleArn,Ce=Math.min(3,Math.max(0,Math.floor(a.maxRetries??1))),Ne="Fargate task did not produce a result.";e.onPhase?.("requesting sandbox");let Ve=[];for(let Se=0;Se<=Ce;Se+=1){if(e.cancelSignal.aborted)throw new Error("Cancelled by user.");e.onPhase?.("requesting sandbox");let He=await(0,Yy.getSignedUrl)(l.s3,new hr.GetObjectCommand({Bucket:J.bucket,Key:U.worker}),{expiresIn:PC}),oe=_e?void 0:await(0,Yy.getSignedUrl)(l.s3,new hr.GetObjectCommand({Bucket:J.bucket,Key:U.source}),{expiresIn:PC}),M=_e||!S?void 0:await(0,Yy.getSignedUrl)(l.s3,new hr.GetObjectCommand({Bucket:J.bucket,Key:U.auth}),{expiresIn:PC}),se=_e?void 0:await(0,Yy.getSignedUrl)(l.s3,new hr.PutObjectCommand({Bucket:J.bucket,Key:U.result,ContentType:"application/json"}),{expiresIn:PC}),Xn=_e?void 0:await(0,Yy.getSignedUrl)(l.s3,new hr.GetObjectCommand({Bucket:J.bucket,Key:U.result}),{expiresIn:PC});$C(L,`${JSON.stringify({workerUrl:He,sourceUrl:oe,authUrl:M,resultPutUrl:se,resultGetUrl:Xn,..._e?{bucket:J.bucket,region:c,sourceKey:U.source,...S?{authKey:U.auth}:{},resultKey:U.result}:{},mode:e.mode,planB64:Buffer.from(JSON.stringify(s),"utf-8").toString("base64url"),...m?{provider:m.provider,modelId:m.modelId,thinkingLevel:m.thinkingLevel}:{},timeoutMinutes:ke,...e.mode==="solver"?{solverCount:Ee}:{},resourceProfile:u.profile})}
|
|
92
|
+
`,"utf-8"),await Uee(l.s3,J.bucket,U.bootstrap,L,"application/json");let Lm=await(0,Yy.getSignedUrl)(l.s3,new hr.GetObjectCommand({Bucket:J.bucket,Key:U.bootstrap}),{expiresIn:PC}),RL={name:oEn,environment:[{name:"SHIPD_BOOTSTRAP_URL",value:Lm}]},fc=await l.ecs.send(new Io.RunTaskCommand({cluster:J.cluster,capacityProviderStrategy:[{capacityProvider:"FARGATE_SPOT",weight:1}],taskDefinition:ce,count:1,networkConfiguration:{awsvpcConfiguration:{subnets:J.subnets,securityGroups:[J.securityGroup],assignPublicIp:"ENABLED"}},overrides:{containerOverrides:[RL]}})),SL=fc.failures?.[0]?.reason;if(T=fc.tasks?.[0]?.taskArn,x=J.cluster,!T){Ne=SL??"Fargate could not place the Spot task.",e.onPhase?.("requesting sandbox");continue}e.onPhase?.("sandbox created");let Za=await Fxo(l.ecs,J.cluster,T,()=>Bxo(l.s3,J.bucket,U.result),ke,e.cancelSignal,(Mm,yL)=>{e.mode==="solver"&&e.onSolverProgress?.(Mm),yL&&e.onResourceUsage?.(yL)},()=>e.onPhase?.(e.mode==="solver"?"running agents":"running patch prechecks"),()=>{G=!0});if(T=void 0,Za?.resourceUsage&&e.onResourceUsage?.(Za.resourceUsage),e.mode==="patch-precheck"){if(Za?.complete&&!Za.error&&Za.precheck)return e.onPhase?.("finalizing"),Za;Ne=Za?.error??Ne}else{if(Ve=Hxo(Ve,Za?.results??[]),e.onSolverProgress?.(Ve),Za?.complete&&!Za.error&&Ve.length>=Ee)return e.onPhase?.("finalizing"),{...Za,results:Ve};Ne=Za?.error??Ne}if(e.cancelSignal.aborted)throw new Error("Cancelled by user.")}return e.mode==="patch-precheck"?{complete:!1,results:[],error:Ne}:{complete:!1,results:jxo(Ee,Ve,Ne),error:Ne}}finally{e.cancelSignal.removeEventListener("abort",O),T&&(G||await l.ecs.send(new Io.StopTaskCommand({cluster:x,task:T,reason:"shipd checks cleanup"})).catch(()=>{}),await qxo(l.ecs,x,T)),await zxo(l.s3,w,U).catch(()=>{}),l.ecs.destroy(),l.ec2.destroy(),l.s3.destroy(),l.sts.destroy();try{bAe(p,{force:!0}),L&&bAe(L,{force:!0}),v&&bAe(v,{force:!0})}catch{}}}async function cEn(e){let t=await iEn({...e,mode:"solver"}),s=await Uxo(e,t.results,e.solverConfig.saveArtifacts);for(let a of s)e.onSolverCompleted?.(a);return s}function $xo(e){let t=e.phases.find(a=>a.phase==="new-before-solution");if(!t||t.passedTestcases===null||t.passedTestcases<=0)return e;let s=e.error??["phase: new tests before solution","instruction: Fix test.patch so every new test fails or errors individually before the solution; no new test may pass. Do not remove tests.",`passed tests: ${t.passedTestcases}`,`skipped tests: ${t.skippedTestcases??"unknown"}`,`failed tests: ${t.failedTestNames.length>0?t.failedTestNames.join(", "):"none"}`,`errored tests: ${t.erroredTestNames.length>0?t.erroredTestNames.join(", "):"none"}`].join(`
|
|
93
|
+
`);return{...e,status:"failed",passed:!1,error:s}}async function lEn(e){try{let t=await iEn({...e,mode:"patch-precheck"});if(!t.precheck)throw new Error(t.error??"no result was returned");return $xo(t.precheck)}catch(t){throw new Error(`Fargate patch precheck task failed.
|
|
93
94
|
platform: linux
|
|
94
|
-
${t instanceof Error?t.message:String(t)}`)}}function
|
|
95
|
-
`,{encoding:"utf-8",mode:384});return}if(typeof l!="object"||l===null||Array.isArray(l))throw new Error(`Invalid credential for provider "${t}" in ${e}.`);if(t==="commandcode"){let u=l;u.type==="api"&&(l={...u,type:"api_key"})}$C(s,JSON.stringify({[t]:l},null,2),{encoding:"utf-8",mode:384})}async function Uee(e,t,s,a,c){await e.send(new hr.PutObjectCommand({Bucket:t,Key:s,Body:Dxo(a),ContentType:c,ServerSideEncryption:"AES256"}))}async function
|
|
96
|
-
`,"utf-8"),$C(dd(u,"solution.patch"),a.diff,"utf-8"),$C(dd(u,"test_output.txt"),a.testOutputTail,"utf-8"),l.artifactsDir=u}return l})}function
|
|
97
|
-
`),Zxo=["# Fairness vs. unfairness","","## Core standard","","A test is fair when it checks behavior required by the task description, clearly established by an existing public repository contract, or directly observable by a user or caller. A test is unfair when a reasonable implementation can satisfy the task and the repository's public contract but fail because the test chooses an undocumented implementation detail.","","The reference implementation, a convenient fixture, a neighboring private helper, and a test harness are evidence at most. They are not the specification by themselves.","","For every assertion, ask:","","1. What exact prompt requirement or established public contract supports it?","2. What can a user, caller, or public API observe?","3. Could two competent implementations satisfy that contract while differing on this assertion?","4. Does the fixture and observation point preserve all repository-valid implementation paths?","5. Would the assertion catch a materially incorrect behavior rather than merely a different implementation?","","If two competent implementations can satisfy the contract while differing on the assertion, and the prompt/repository does not select one outcome, the assertion is unfair. Rewrite it around the shared semantic behavior or remove it.","","## Fair","","- Verifies behavior explicitly required by the task.","- Verifies behavior exposed by an existing public API or an established public repository convention.","- Checks the visible result, caller-visible state, required side effect, or documented data contract.","- Requires a new exported name, field, control, attribute, label, key, or option only when the task names it or the existing public API already establishes it.","- Allows equivalent public integration paths, helper delegation, service boundaries, and implementation structures.","- Allows additional valid fields or metadata when the contract requires only a subset of structured output.","- Checks required relationships such as preservation, isolation, ordering, association, or eventual refresh without guessing unrelated concrete values.","- Normalizes or parses equivalent syntax before comparing semantics.","- Accepts clear failure behavior when the contract does not prescribe one exact error representation.","- Waits or polls for an eventual result when synchronous completion is not part of the contract.","- Uses fixtures that preserve real state invariants, module shape, exported references, and valid repository behavior.","- Observes a public effect rather than requiring one internal call or observation point.","- Separates a fair behavioral assertion from an unrelated unsupported co-assertion.","","## Unfair","","### Undocumented implementation choices","","- Requires a private helper, internal class, private state field, or unmentioned file path.","- Requires a particular module boundary, import path, direct platform call, algorithm, call order, or failure-injection primitive when another repository-valid path produces the same effect.","- Requires a new method, constructor, property, export, argument shape, registry key, option ID, or configuration name that the task does not specify and the repository does not already expose publicly.","- Treats the reference implementation's structure, naming, defaults, or minimal serialization as mandatory.","","### Representation instead of semantics","","- Compares an entire object, document, mapping, or array to a minimal expected serialization when the contract requires only selected fields, values, preservation, or relationships.","- Rejects additional valid fields or metadata that do not weaken the required behavior.","- Pins a concrete container or materialization type when the contract specifies the contents or tabular behavior but not the wrapper type.","- Requires a particular field location, source file, interface placement, AST node shape, type alias, type spelling, quote style, whitespace, line break, token adjacency, generated identifier, or code length.","- Requires exact row/group ordering, result cardinality, or per-item counting when the contract does not define that ordering or granularity.","- Requires literal source words to prove behavior that can be checked by compiling, parsing, rendering, executing, or inspecting the public result.","","### Values and relative language","","- Infers an exact value from words such as current, latest, selected, next, matching, appropriate, or stable when only a relationship or effect is required.","- Treats an example, default, neighboring helper behavior, or one fixture value as a universal requirement.","- Requires a particular normalization or encoding strategy when multiple representations preserve the required meaning.","- Requires an incidental no-op artifact, such as whether an empty file, directory, cache entry, history item, or output record exists, when only content/state/reuse/non-duplication is contractual.","","### Counts, categories, and interactions","","- Requires an exact count without a specified counting unit. A count might be per input, field, item, target, rule, match, category, finding, log record, or operation.","- Requires a repair or mutation count without specifying whether it reports findings before the change or findings remaining afterward.","- Assumes diagnostic categories are mutually exclusive or overlapping when the task does not define that relationship.","- Assumes a majority, plurality, unanimity, or other consensus rule without the prompt defining what dissenting values mean.","- Assumes duplicate detection is per collection or global across collections without the contract defining the scope.","- Resolves an interaction between two requirements by intuition\u2014for example, whether a missing optional value skips only value checks or an entire combined rule, whether a cache is reused across a changed input, or whether a target-level check still runs when a value path is absent.","- Requires one line, one repeated term, one log record, or one message per underlying issue when aggregate reporting is equally compliant.","","### Configuration schemas and boundaries","","- Invents a field type, collection shape, omitted-field default, unknown-key policy, coercion rule, extension-based parser dispatch, or cross-field constraint.","- Requires a string-only name, boolean-only flag, particular list schema, strict rejection of extra top-level keys, or rejection of an inverted range when the task does not establish that schema choice.","- Invents acceptance or rejection rules for unspecified malformed, missing, nullish, Unicode, unusually large, boolean-like, numeric, platform-specific, symlink, or missing-parent inputs.","- Assumes a strict validation policy, unlimited policy, coercion policy, or normalization policy that the task does not state.","- Selects one behavior at an underspecified boundary such as dry-run, preview, no-op, conflict, rollback, cache reuse, preflight, or a state transition.","- Assumes mathematical edge values or non-finite values have a particular ordering or rejection policy when the prompt specifies only ordinary finite bounds or numeric behavior.","","### Errors, messages, and timing","","- Requires an exact exception class, error code, message text, punctuation, capitalization, embedded input, basename, or log wording when the contract only requires failure, a clear error, or reporting.","- Requires validation during construction rather than evaluation, or vice versa, when the public contract does not specify timing.","- Requires a callback to return a promise, be fully settled on return, or update immediately when the contract promises only an eventual effect.","- Uses a small wall-clock threshold as a functional requirement without a stated performance contract; such limits are often platform- and load-dependent.","- Requires a particular signal, alarm, subprocess ceiling, poll interval, viewport size, or platform-specific safety mechanism when only bounded or fail-fast behavior is required.","- Requires one exact logging vocabulary when the operation can be reported clearly in equivalent wording.","- Rejects one permitted failure path when the task explicitly allows alternatives such as load-time rejection or evaluation-time violation.","","### Expressions and embedded languages","","- Assumes an unlisted builtin, operator, method, container type, mapping shape, mutability rule, or context binding in a restricted expression language.","- Requires a particular representation for context variables when the task names their meaning but not whether they are mappings, models, lists, tuples, or another equivalent public value.","- Requires a dangerous expression to be rejected during parsing when the contract also permits prohibited constructs to be rejected during evaluation, or vice versa.","- Treats one expression-evaluation cardinality as mandatory when a multi-match rule could reasonably be evaluated once per target, once per rule, or once per resolved value.","","### UI, lifecycle, and harness coupling","","- Requires exact DOM hierarchy, CSS classes, selectors, test/data attributes, native tags, hidden text, hidden-shim text, ARIA attributes, focus order, keyboard traversal, or mock-specific control counts when the task specifies only a user-facing action or visible result.","- Requires an initial focus, default Enter action, Tab order, button order, or immediate control visibility when the prompt only names the available choices.","- Requires a component to expose a particular model API merely so the test can mutate it, when the behavior can be exercised through the real public UI or caller flow.","- Exercises a detached constructor, unmounted widget, partial view, or inactive editor while asserting behavior qualified by an active or mounted production context.","- Uses a mock that omits valid exports, changes the shape of real state, reassigns exported arrays/objects, or patches a source module while the application holds an imported binding.","- Requires a fake collaborator to implement hidden, newly invented hooks instead of using the repository's existing public extension point.","- Uses incomplete fixtures that cause a valid implementation to fail before the behavior under test is reached.","- Accepts only a hidden harness's import path, shim, serialized text, or mock behavior rather than the repository's public contract.","","### Mixed assertions","","A test can contain both fair and unfair assertions. Do not discard the entire behavioral goal automatically. Keep the assertion that checks the required observable effect and remove or relax only the unsupported value, representation, timing, API, side effect, or harness assumption. Conversely, a test that looks behaviorally useful is still unfair overall if one mandatory co-assertion rejects a valid implementation.","","## Scope and alternatives","","Preserve every qualifier in the prompt. A requirement for aware values, naive values, all-day values, one mode, one target state, or one lifecycle phase does not automatically apply to every representation or phase. Do not transfer a rule from one subtype to another, or require a changed wall time, timezone, normalization, or side effect outside the stated scope.","","When the prompt expressly allows more than one outcome or phase, a fair test must accept every permitted alternative. Do not force one load/evaluation phase, one error form, or one integration route merely because it is simpler to assert. Conversely, do not call a test unfair merely because it rejects behavior that the prompt explicitly forbids; distinguish an actual contract prohibition from an unstated mechanism used to enforce it.","","## Public repository evidence","","Existing source code can establish a public contract when the behavior is exposed through a public API, documented UI, established file format, or stable user-facing convention. It does not make every internal branch or helper behavior contractual.","","Use the closest relevant analogues, not an arbitrary nearby example. If analogues disagree, or if the only evidence is private implementation structure, do not pin the detail. A visible security or compatibility rule can make a boundary requirement discoverable, but an unrelated helper's default does not automatically define a new feature.","","A repository convention can justify an exact detail only when it is public, stable, directly relevant, and unambiguous. It does not justify a hidden import-binding assumption, a particular cache mutation path, or a newly introduced collaborator method merely because one implementation uses it.","","## Test strength versus test fairness","","A test may be fair but too weak. For example, a color assertion that searches the entire viewport may pass because an unrelated cell has that color; a message check may find text unrelated to the operation; a timezone assertion may check the destination representation without checking preservation of the underlying instant. These are coverage or observation defects, not reasons to impose a new implementation detail.","","Strengthen such tests by observing the correct public target, associating the result with the operation, and checking the semantic invariant. Do not strengthen them by requiring private state, exact source form, or one architecture.","","A failed setup and a failed behavioral assertion are also different. If a shared fixture crashes before the feature is observed, or an observer renders the wrong widget/viewport after locating a valid result, that is a broken test harness\u2014not evidence of an implementation gap. If the fixture reaches the public behavior but rejects a valid alternative representation or integration path, that is a test/contract mismatch. Neither should be treated as a fair behavioral requirement."].join(`
|
|
98
|
-
`),Yxo=["# Gaps in tests","","This section defines missing or weak test coverage. It is separate from fairness: a test may be fair but too weak, or a proposed gap may describe a real missing behavior but be unfairly asserted. Use `--GAPS--` records for test-side deficiencies and `T<num>` labels for the test-quality dimension involved.","","## `--GAPS--` candidate rules","","A `--GAPS--` block is a candidate, not an automatic requirement. Accept it only after checking the prompt/public contract, the validity of its fixture, the public observation, and whether a plausible incomplete implementation can evade the current suite. Keep the candidate distinct, actionable, and fair.","","A genuine gap must be:","","- grounded in a specific task requirement or clear public contract;","- distinct from other candidates;","- observable through a public behavior;","- expressible without private implementation assumptions;","- meaningful enough that a plausible incomplete implementation could pass without it; and","- fair to multiple reasonable implementations.","","Do not report optional coverage ideas, generic requests for more negative tests, speculative edge cases, or details that are merely convenient to assert. Edge cases are valuable when the task requires them or the public contract clearly implies them; otherwise they are not gaps.","","When a candidate's first wording is too specific, reformulate it around the semantic requirement. For example, require preservation of required data rather than a minimal serialized object, required ordering relationships rather than an incidental sort order, and a reported failure rather than an arbitrary message or exception path. If no fair formulation remains, drop the candidate.","","An empty candidate list is correct when no proposed check survives these rules.","","## T<num> metrics for test gaps","","`T` metrics describe weaknesses in the tests or test harness. They do not, by themselves, claim that the implementation is wrong. Combine labels when one gap has more than one weakness, for example `T3/T4` for a weak assertion that also misses a required branch.","","### T1 \u2014 fixture and setup reliability","","The test setup must be valid and must reach the behavior under test. Do not count a malformed fixture, missing required outer field, stale object, invalid lifecycle state, incomplete mock, unavailable dependency, or setup exception as an implementation failure. Repair the fixture or isolate the environmental problem while preserving meaningful regression coverage.","","### T2 \u2014 deterministic and terminating execution","","Tests must not depend on wall-clock races, unseeded randomness, scheduler order, loose configurable timeouts, unbounded polling, infinite expressions, deadlocking workers, or machine-dependent thresholds. Use controlled clocks, synchronization, bounded waits, deterministic inputs, and an explicit failure when the bound is exceeded.","","### T3 \u2014 assertion strength and diagnostic specificity","","Assertions must prove the required public result, state, count, relationship, side effect, error channel, or continuation. Avoid label-only output checks, whole-output inequality, stale/unrelated messages, generic exceptions, aggregate flags that hide individual failures, and mixed fixtures that allow a wrong implementation to pass. When diagnostics are contractual, verify that they identify the relevant target/field/rule without pinning exact wording.","","### T4 \u2014 required behavior and edge coverage","","Cover every prompt sentence, explicit prohibition, public entry point, supported backend/format, lifecycle path, and justified boundary. Include meaningful falsey values, aliases, malformed input, empty/missing values, repeated operations, nested/list members, persistence/reload, failure/rollback, and cross-feature interactions when the contract supports them. Do not turn unspecified hypothetical cases into gaps.","","### T5 \u2014 interaction-protocol neutrality","","Drive interactive and UI behavior through the public user contract, not one prompt choreography, ordinal answer sequence, hidden control, private widget, exact call count, or implementation-specific selection protocol. Test the resulting public state/effect and accept equivalent accessible flows unless the prompt fixes the protocol.","","### T6 \u2014 evaluation-environment viability","","The required base/regression command must be runnable in the prescribed offline, non-root, permission, dependency, and repository environment. A broad unrelated suite that fails before reaching the touched area is a harness blocker, not evidence against the solution. Keep genuine touched-area regression tests while removing environmental false failures.","","### T7 \u2014 representation and expectation fairness","","Do not require a reference-only rendering, full untruncated value, exact field placement, parser spelling, DOM structure, output order, or concrete serialization when the public contract permits equivalent results. If a display/format detail is required, assert only that specified semantic detail and use fixtures that do not accidentally test an unrelated truncation or layout limit.","","### T8 \u2014 complete and honest reporting","","Do not use fail-fast execution when the task requires all diagnostics. Every real test must run and appear in the report/JUnit output. Distinguish setup failures, timeouts/OOMs, environment failures, and behavioral assertion failures; never synthesize a collection of failures after a wrapper aborts or let an unrelated warning satisfy the current test.","","## Test-gap calibration from the corpus","","The following rules are distilled from the cleaned unfair-test, gap-report, and rubric corpus. They apply when proposing a test, auditing a reported gap, or judging a solution. They refine the core standard above; they do not create requirements that the task prompt leaves open.","","### Contract-first gap triage","","- A reported gap is actionable only when it identifies a concrete prompt/public-contract requirement, a plausible incomplete implementation that would evade the current tests, and a public observation that distinguishes the behaviors. \u201CMore coverage would be nice\u201D is not a gap.","- During Gap Finder analysis, use `agent_prompt.md` and observable repository behavior as the specification. Do not use `test.patch`, `solution.patch`, a hidden-test name, or reference-only structure to invent a requirement; those may help locate a scenario only after the public contract has independently grounded it.","- Separate three questions: is the behavior required, is the current suite blind to it, and is the proposed test fair? A candidate can be a real missing behavior but still need its assertion rewritten to remove an unfair value, API, timing, fixture, or harness assumption.","- Keep the semantic core when possible. If a candidate fairly proves preservation, isolation, rejection, ordering, or an effect but also pins a message, count, serialization, private method, or prompt sequence, relax only the unsupported co-assertion rather than discarding the whole candidate.","- Do not infer a requirement from solver convergence, the golden solution, a hidden test name, a reference branch, a default chosen by one implementation, or a reviewer\u2019s preferred design. Those are investigation clues only.","- If a candidate exposes a genuine ambiguity\u2014consensus versus plurality, pre- versus post-repair counts, omitted-default semantics, cross-format collision policy, preset precedence, hunk grouping, or a recurrence alias grammar\u2014clarify the prompt or accept all reasonable outcomes. Do not silently turn one interpretation into a hidden requirement.","- Negative tests require an actual prohibition, guard, invalid state, isolation rule, or failure policy. Do not turn ordinary positive coverage into a negative gap merely because a second wrong implementation is imaginable.","","### Assertion strength without unfairness","","- Do not use whole-output inequality, \u201Csome output changed,\u201D \u201Csome warning exists,\u201D a nonempty exception, or a generic `has_issues` flag as the only proof of a required behavior. Assert the relevant public state, result, count, continuation, or effect directly.","- When a contract defines counts, parse the complete count lines and assert the correct count. When it does not define the counting unit, assert detection and state/effect, or first define whether the unit is a field, item, rule, target, match, category, or operation.","- Do not require one log record per issue, one repeated keyword, or one physical line per item unless the prompt specifies that granularity. Conversely, do not allow a single aggregate result to hide required independent findings when the prompt explicitly says to count/log each violation.","- Test positive and negative cases independently. A mixed fixture with one valid and one invalid value can prove only that something happened; add an isolated valid case and an isolated invalid case when acceptance of the valid case matters.","- For aliases, options, fields, formats, supported types, and backends, test each promised category or a justified representative matrix. Do not let a hard-coded subset pass because the visible examples cover only four fields, one backend, one selector, one alias, or one error path.","- For multi-item or multi-field operations, assert that all required members are processed, that valid neighbors continue after a skippable invalid member, and that one failure does not silently short-circuit later required checks.","- When testing a warning or diagnostic, capture the repository\u2019s actual public channel and associate the message with the operation. Do not accept an unrelated log record, and do not require a literal word, exact field name, basename, punctuation, or stdout when the contract only requires a clear diagnostic.","- If a message must identify a rule, target, field, or path, accept the contract\u2019s alternatives (name, index, or equivalent location) and do not assume zero-based indexing, a dotted path, a particular vocabulary, or a fixed output layout.","","### Harness and fixture integrity","","- A test setup must be valid under the repository\u2019s real public lifecycle. Do not create state outside the invocation/session that the prompt says owns it and then require an invocation-scoped recorder to observe it. Do not use stale model objects after the contract says pruning/removal permanently deletes them.","- Do not omit required outer fields, use an invalid document shape, or combine an unrelated malformed field with the behavior under test. For example, a JSON test requiring successful import must include every prompt-required top-level list, and an ICS success fixture must be valid independently of the RRULE edge being tested.","- Do not make a fake module or collaborator less capable than the real public object. Preserve valid exports, attributes, method signatures, model shapes, iterable/generator behavior, and state invariants. A fake that drops new fields, returns a list where the real API returns a generator, or changes import identity can reject a correct solution.","- Patch the public boundary actually used by the application, or use a real isolated integration path. Do not patch `module.function` while the implementation may have a direct imported binding, patch one of several invented import paths, require a nonexistent future helper, or make success depend on a private `get_templates_dir`, loader, saver, or factory name.","- A test must not require a specific pool API (`apply_async` versus `imap_unordered`), callback protocol, executor, scheduler, import style, or worker placement. Test prerequisite ordering, blocking, isolation, and failure propagation through a fair public boundary. Use deterministic latches for concurrency rather than inspecting a private `pending` map.","- Do not drive a new UI by an ordinal iterator of answers, prompt keyword matching, exact confirmation-call count, or hard-coded free-text token unless that protocol is explicitly specified. A compliant implementation may use a menu, free text, a delimited selection, a separate confirmation, or another accessible flow.","- Do not assume a detached constructor, unmounted screen, inactive editor, or fake collection has the same lifecycle effects as the production path. If the requirement is \u201Cwhile active,\u201D open it through the real public path; if the requirement is a model behavior, test the model directly.","- Shared helpers must not contain hidden assumptions that contaminate every test: fixed path lengths, presumed default filenames, required absolute paths, a particular editor implementation, a specific button traversal order, or a default format that the prompt does not define.","","### Public UI and interaction checks","","- Check visible, usable behavior through accessible labels, public actions, resulting state, and actual requests/effects. Do not count inert text in a script/template block as a rendered control, and do not require a particular DOM/widget class, layout, query order, coordinate, or internal model key.","- Locate controls by stable public role/label or exercise them through user-visible navigation. Do not require a specific initial focus, Enter default, Tab order, Up/Down key, row order, button order, or that a successful action keeps a screen mounted unless the prompt or an established UI contract says so.","- For selection tests, identify the intended row/action by its visible identity rather than assuming the second row is selected after one particular key. Assert both directions when the prompt requires both, and verify the selected item\u2019s public identity, not merely the row index.","- For status/error tests, clear or snapshot prior status so stale text cannot satisfy a later assertion. Capture stdout, stderr, structured events, and user-facing notifications according to the repository contract rather than choosing one stream arbitrarily.","- For machine-readable output, parse events/fields structurally. Do not require a field to be top-level, an array rather than a mapping, a particular error key, a traceback key, a bytes-count interpretation, or a welcome payload flattening unless the prompt explicitly states that shape.","- For destructive dialogs, assert that the warning communicates the required consequence and that Confirm/Cancel effects are correct. Do not require exact explanatory prose, initial focus, or a particular widget type.","","### Serialization, formats, and structured data","","- Assert required semantic fields and relationships while allowing valid extra fields, metadata, headers, separators, and equivalent serialization. Do not compare an entire object to the reference\u2019s minimal form.","- Do not assume an omitted option has a particular default format, algorithm, encoding, extension, output destination, or parser. Pass the option explicitly when the test is about another behavior, or state the default in the prompt before testing it.","- Do not require a headerless file, zero physical lines, one exact newline form, lowercase digest hex, one field order, one RRULE prefix/case/order, or one Markdown/Taskpaper syntax when the contract permits equivalent representations. Parse the result and compare meaning.","- When a format contract does require a schema, test the schema itself: required top-level fields, field types, list element types, valid/invalid enum values, round-trip preservation, and malformed stored data. Do not accidentally accept a missing required field or test only data created by the same implementation.","- Test create, edit, load/show, list, validate, and externally corrupted storage separately when each is public. A create-time validator does not prove that `validate` reads stored corruption, and a parser that saves a file does not prove that a later process can reload it.","- Failed edits, overwrite attempts, cross-format replacement, serialization failures, and editor cancellation must preserve the last valid representation when the prompt promises non-destructive behavior. Verify by reopening/reloading, not only by checking the immediate error.",'- For round trips, include falsey but meaningful values (`0`, `False`, `""` when allowed), `None` where distinct, non-ASCII text, malformed nested types, duplicate rows, optional fields, and fields with metadata. Avoid truthiness shortcuts in both implementation and assertions.',"","### Validation, numeric, and schema boundaries","","- Test all required enforcement surfaces: direct assignment, construction/addition, modification, defaults, collection validation, CLI overrides, interactive prompts, serialization, reload, and each supported model type. Do not infer that one path covers another.","- Distinguish missing, explicit null, blank/whitespace, empty container, false, zero, NaN, infinity, and a textual representation of each. A truthiness check must not reject valid `False`/`0` or accept malformed falsey input.","- If the prompt requires finite numeric bounds or rejects numeric NaN, test both positive/negative infinity and NaN independently against minimum and maximum, including list members and configured bounds. Do not use ordinary comparison behavior as an unstated policy for non-finite values.","- Use base-type normalization consistently for enum choices, bounds, defaults, native values, JSON values, BLOB/text values, aliases, dates, durations, and nullable numeric types. Test fractional numeric strings, epoch dates, boolean-valued options, Unicode case behavior, and canonicalization only when the prompt defines those semantics.","- If invalid schemas must fail at construction, assert construction-time failure; if the prompt allows eager or lazy validation, accept either by triggering and observing the first required validation boundary. Do not accidentally test only one timing.","- Test nested schemas recursively: native and JSON roots, nested JSON strings, typed list/dict descriptors, declared fields, dynamic dictionaries, required nested containers, defaults, invalid enum/schema names, cycles versus shared DAGs, depth limits, clone independence, empty explicitly supplied schemas, and CLI override integration.","- Keep schema syntax and field grammar explicit. Do not invent bare mappings, sibling `type/schema` keys, reserved-field handling, enum aliases, extra top-level keys, or omitted-required defaults in a test unless the prompt states them.","","### Persistence, transactions, and state isolation","","- For every mutating operation, snapshot the important state before and after: database/model values, media/files, selected configuration, history, caches, output trees, and unaffected siblings. Unknown IDs, skipped entries, canceled actions, and invalid input must not mutate unrelated state.","- Test all-or-nothing behavior across phases, not only a failure in the first phase. Force a later write to fail after an earlier repair/import/override has changed state, then use a fresh reader to verify complete rollback.","- Test continuation where the contract says to skip one bad record and continue, including valid records before and after missing/invalid records. Do not accept a warning as proof that valid work was restored/imported.","- Test no-op semantics independently: duplicate additions should not create data or undo/history entries; identical content should not cause unnecessary writes unless the contract requires a write; empty values should not be confused with omitted values.","- Persist and reload through a fresh process/session/backend. A same-process object or a monkeypatched in-memory store can hide missing serialization, stale cache, remote-backend, or lifecycle behavior.","- Cache tests must vary the requested input/path and invocation order. Do not let a stale cached inventory, profile, schema, or preset make a second operation observe the first operation\u2019s data.","- Backend-neutral history/snapshot tests must include complete remote state and backend-specific settings, not merely a serialized local reference/locator. Verify retention, sidecars, digests, encoding metadata, rollback, and update-target paths without requiring a private snapshot format.","","### Paths, filesystems, archives, and security","","- Test both lexical and resolved containment. Reject absolute paths, dot-segment escapes, drive/UNC forms, alternate separators, NUL/control forms, and symlink traversal through an in-root link to an outside location. Preserve existing outside files and avoid publishing partial trees.","- Apply confinement consistently to list/read/create/update/delete, history tokens, profile/template names, playlist paths, archive members, extraction destinations, and selected archive views. A safe lexical path can still escape through a filesystem symlink.","- Do not require safe inputs to be transformed into one particular spelling. For safe symlinks, backslashes, dot segments, or encoded names, compare resolved containment and semantic output unless the prompt defines canonical normalization. Separately test malicious forms where rejection is required.","- For archive manifests, test manifest/archive bijection, type/path/size/mode/digest schemas, duplicate and normalized-collision paths, symlink target agreement, counters, ordering independence, malformed ZIPs, path hierarchy conflicts, and no-partial-extraction cleanup. Do not infer array-vs-map manifest shape or duplicate archive rejection unless specified.","- Test missing, malformed, unreadable, externally corrupted, and symlinked storage. A valid filename or index name must not be treated as corruption merely because it matches a test fixture\u2019s naming pattern.","- Preserve encoding and text semantics. State UTF-8 or another codec before testing invalid bytes; include successful Unicode round trips as well as invalid-byte failures. Do not treat a valid U+FFFD filename as undecodable merely because it contains the replacement character.","","### Time, recurrence, and platform-sensitive behavior","","- Freeze or inject the clock for completion, expiration, age, timestamp, retry, and schedule tests. Never compare against independently sampled wall-clock values across a possible midnight/second boundary.","- Test strict-after equality, due-before/due-after completion, month-end clamping, leap days, original calendar anchors across repeated cycles and reload, COUNT/UNTIL preservation and exhaustion, multiple comma-separated selectors, and all-day/aware/floating timezone behavior when the prompt promises them.","- Preserve the prompt\u2019s qualifier. A requirement about existing aware values does not automatically impose a changed wall time on floating values; a rule about actual completion time does not justify a pre-call timestamp; a rule about one format does not define another format\u2019s error policy.","- Compare recurrence schedules semantically or parse structured fields. Do not require an exact RRULE prefix, case, field order, minimal field set, natural-language alias spelling, formatter vocabulary, microsecond precision, or hidden anchor property unless explicitly specified.","- Test both model and editor surfaces, persistence/reload, save/discard/undo, unsupported valid rules, destructive confirmation content, dirty-state propagation, and visible calendar highlighting through the real active view. Do not mutate a detached model and call that proof of UI synchronization.","","### Restricted expressions and resource limits","","- A \u201Cread-only\u201D expression context must be genuinely non-mutable or mutation attempts must be rejected and reported according to the prompt. A deep copy alone is isolation, not immutability.","- Test all documented bindings (`target`, `inventory`, `value`, `values`, target name) with successful reads, including wildcard and recursive matches. Do not assume mapping/list shapes, builtin availability, evaluation cardinality, or per-member count unless specified.","- Test prohibited imports, file access, dangerous builtins, mutation through every binding, evaluation errors, recursion, infinite iterators, C-level loops, and later-rule isolation. A trace hook alone may not interrupt C-level work; use a process/resource boundary or reject dangerous constructs at load time if the prompt allows either.","- Any pathological-expression test must have an unconditional finite timeout and a deterministic failure path. It must not hang, OOM, or rely on an externally configured environment variable to become safe.","","### Test runner and reporting integrity","","- Never use `--maxfail=1` or another fail-fast mode when the task requires complete diagnostics. Every real test must execute and appear in JUnit/report output; do not synthesize \u201Cmissing test\u201D failures after a wrapper aborts.","- Bound every test-side growth loop, retry loop, subprocess, poll, and concurrency wait. If the required marker/result is not observed by the bound, fail that test with an explicit cause.","- Keep test diagnostics honest. Separate infrastructure/setup failure, timeout/OOM, and implementation assertion failure. Do not classify a killed process as every individual test failing, and do not let an unrelated warning or stale status satisfy the current operation.","- Avoid machine-dependent thresholds, platform-specific permissions, real network, mutable global state, and unseeded randomness unless the prompt explicitly requires them and the test controls the environment.","","### Gap-finder recurring fair-gap checklist","","When auditing a suite for missing behavioral coverage, deliberately consider these public branches when the prompt supports them:","","- noncanonical but meaningful values, falsey malformed values, Unicode/case variants, NaN/infinity, empty/zero values, nested and repeated inputs;","- every public entry point and lifecycle: constructor/add/modify, direct/JSON/native, interactive/non-interactive, CLI/TUI, create/edit/load/show/list/validate, fresh reload/process, and all supported backends/formats;","- defaults, aliases, requiredness, retry locality, blank versus interruption, cancellation/resume, duplicate no-ops, and invalid input side effects;","- all declared fields rather than a hard-coded subset, all selector values/grammar branches, all target/path scopes, all independent siblings, and all transitive dependencies;","- resolved data rather than raw files, cache misses and stale-cache changes, target identity versus display aliases, dotted/cross-platform names, and selected-target closure scope;","- public counts, per-target attribution, summary completeness, structured diagnostics, correct output channels, and actual visible controls/effects rather than labels alone;","- malformed stored data, failed later phases, atomic rollback, cross-format replacement, unknown IDs, missing records, remote/backend-specific state, sidecar integrity, and no partial artifacts;","- real parallel execution, dependency gating, fetch ordering, failure propagation, deterministic public order/graph output, and cleanup of threads/processes/temporary files;","- archive/playlist/template/profile path safety, symlink containment, separator variants, archive-manifest agreement, encoding, and successful Unicode paths;","- recurrence/calendar anchor, strict-time, selector-list, COUNT/UNTIL, all-day/aware/floating, save/discard/undo, and active-UI highlight branches.","","For each candidate, still apply the fairness screen: the edge must be required or clearly public, the fixture must be valid, the observation must be public, and the assertion must not smuggle in a count unit, parser spelling, UI protocol, private API, harness shape, or timing threshold."].join(`
|
|
99
|
-
`),Xxo=["# Gaps in solution","","This section describes defects in the implementation or solution behavior, even when the current tests pass. A solution gap must be grounded in an explicit prompt requirement, an established public contract, or a regression in observable repository behavior. Do not infer an `S` finding from a difference from `solution.patch`, a reference structure, a private helper, or a preferred architecture.","","## S<num> metrics for solution gaps","","`S` metrics classify implementation-side deficiencies. They are independent of `T` metrics: a weak test is a `T` finding, a wrong public behavior is an `S` finding, and one issue may legitimately have both. Use combined labels such as `S1/S2` when the defect affects both correctness and safety/integration.","","### S1 \u2014 behavioral correctness and compatibility","","The solution misses an explicit requirement, returns the wrong public value/state, loses data on a round trip, mishandles a required edge or entry point, violates a specified error/transition, or regresses established behavior. Examples include incomplete normalization, wrong recurrence/persistence semantics, missing root-level data, malformed input accepted, required invalid input ignored, or an existing non-interactive path broken.","","### S2 \u2014 safety, isolation, and integration correctness","","The solution leaves partial state after failure, violates transaction/rollback or dependency/concurrency boundaries, leaks state across invocations, mishandles backend/lifecycle integration, weakens path/security confinement, logs secrets, deadlocks, propagates data to the wrong scope, or otherwise makes a required operation unsafe or non-isolated. A defect can be S1 and S2 when it is both observably wrong and unsafe.","","### S3 \u2014 scope, maintainability, and repository quality","","The solution introduces unrelated changes, formatting churn, dead code, avoidable duplication, private coupling, unsupported API changes, architecture violations, or repository-quality regressions outside the requested behavior. Do not use S3 to penalize a merely different valid implementation; the issue must be concrete and externally or repository-observably harmful.","","## Solution implementation and test-authoring rules","","These rules describe what a high-quality solution and its tests must achieve. They are deliberately contract-first: a solution should be complete against the prompt and the repository's public behavior, not merely optimized to pass the currently visible examples.","","### 1. Implement the whole contract","","- Read the task sentence by sentence and map every explicit requirement, condition, prohibition, error case, state transition, side effect, and compatibility constraint to an implementation path and a meaningful test.","- Treat the prompt as the specification and tests as evidence. Passing the supplied tests is necessary but not sufficient when the prompt contains behavior they do not exercise.","- Before declaring completion, perform an adversarial pass: imagine a plausible shortcut that passes the obvious happy paths and check every boundary, empty/missing value, repeated operation, interacting feature, failure path, and state left behind.","- Fix every concrete, reproducible contract gap and regression. Do not dismiss an externally observable mismatch as a minor edge case merely because the main path works.","- Do not add behavior solely to satisfy a speculative reviewer preference, a reference implementation, or an ungrounded hypothetical. Improvements must remain within the stated contract and established repository behavior.","","### 2. Make new tests prove the solution","","- New feature tests should fail against the pre-solution implementation for the behavior they claim to cover and pass after the solution. A test that already passes before the feature is implemented is not evidence for that feature unless it is explicitly a regression test.","- Assert the actual semantic result, not merely that execution completed, output changed, a word appeared somewhere, or a serializer returned something. Use independent expected data and nontrivial conversions so a pass-through or hardcoded shortcut cannot pass.","- For mutations, verify both the intended new state and the important untouched state. Check no-op, unknown-ID, missing-record, invalid-input, cancellation, and failure paths for unintended writes or side effects.","- For collections and batch operations, verify counts and contents when the contract specifies them, continuation after a skippable bad item when required, and that valid neighboring work is not lost.","- Cover each public entry point that promises the behavior: direct and serialized input, interactive and non-interactive flows, create and edit, save and load, CLI and TUI, model and collection validation, and every supported backend or format.","- Add interaction tests for requirements that combine features. A feature tested in isolation can still be wrong when defaults, retries, empty values, state transitions, or another required feature are present simultaneously.","- Add negative tests for explicit guards and prohibitions: invalid configuration, forbidden writes, isolation boundaries, duplicate effects, invalid transitions, rollback boundaries, and dependent work after failure. Assert the required error/failure outcome and state preservation without pinning unspecified error wording.","- Do not manufacture a passing test by calling the same implementation or serializer to produce the expected value, by asserting only whole-output inequality, or by checking private call counts when the public effect is the contract.","- Keep tests fair under the rules above. A strong test suite catches materially wrong implementations without prescribing private names, mock shapes, pool APIs, source layout, or incidental formatting.","","### 3. Fit the existing architecture","","- Inspect real neighboring implementations before designing a new path. Reuse established public model, service, parser, transaction, configuration, logging, error, storage, and UI extension points where they fit.","- Prefer the repository's public APIs over private fields, private helpers, direct database connections, internal event dictionaries, hidden callbacks, or reference-only module structure. If a public extension hook exists, use it rather than process-wide monkeypatching.","- Keep responsibilities cohesive. Put parsing/normalization, domain behavior, persistence, command wiring, and presentation in the layers where the repository already keeps them. Do not put a large feature into one monolithic command, UI module, or unrelated existing file when the codebase uses focused modules.","- Use focused helpers with clear contracts, but avoid needless wrapper layers, ad hoc `getattr()` fallbacks, duplicated option definitions, and special branches that exist only to adapt an avoidable design.","- Centralize genuinely shared semantics\u2014schema validation, path handling, date coercion, error formatting, serialization, or merge rules\u2014so direct, interactive, load, and save paths cannot silently diverge. Expose a suitable public/shared helper rather than coupling unrelated classes to a private method.","- Remove unused helpers, imports, constants, temporary scaffolding, dead branches, and unrelated edits before completion. A feature patch should be reviewable and narrowly scoped.","","### 4. Preserve behavior and make failures safe","","- Run the complete relevant regression suite as well as the new feature tests. Existing behavior, defaults, public APIs, and compatibility paths must remain intact unless the prompt explicitly changes them.","- Use the repository's normal exception and logging patterns. Catch only expected failures, report them consistently to users, and do not use broad `except Exception` blocks that hide programming errors or turn distinct failures into misleading messages.","- Validate at the correct boundary and validate all relevant representations. Reject malformed configuration, wrong types, invalid schemas, falsey-but-invalid values, bad aliases, and invalid serialized content when the contract requires rejection; do not defer a required validation until an unrelated later operation.","- Ensure save-time and load-time validation are symmetric. Data accepted by one entry point must have the same semantics when serialized and read back, and corrupted stored data must follow the documented recoverable/error policy.","- For multi-step database or state mutations, use the existing transaction/rollback mechanism when the contract requires an atomic operation. A late failure must not leave an unexplained partial repair, rollback, import, migration, or batch update.","- For file replacement, validate before modifying the destination and use the repository's atomic temporary-file/replacement pattern where preservation matters. Failed creation, editing, replacement, or serialization must not destroy the last valid file.","- Enforce locks and concurrency boundaries consistently. Unknown identifiers, skipped records, rejected inputs, canceled operations, and failed prerequisites must not mutate unrelated state. Perform dependent side effects only after the prerequisite operation has succeeded.","- Preserve backend-neutral semantics. A snapshot must contain the complete state needed to restore every supported backend, including remote values when the prompt promises historical values\u2014not merely a local locator or configuration dump.","","### 5. Keep all paths semantically consistent","","- Interactive and non-interactive conversion must apply the same normalization, schema, requiredness, default, blank-value, and error rules unless the prompt explicitly distinguishes them.","- The same applies across JSON/native input, constructor/default application, collection validation, rendering, serialization/deserialization, CLI/TUI, and create/edit/load flows. Do not let one layer accept a value that a later layer rejects unexpectedly.","- Validate aliases independently before choosing a preferred alias. Do not let a valid `visibility` mask an invalid `class`, or let a truthiness check allow an invalid falsey value through.","- Normalize only what the contract requires. When it does require normalization, apply it consistently at every entry point and preserve repository invariants such as path separators, case-insensitive extensions, all-day exclusive end dates, timezone-aware values, newline state, encoding, and canonical enum forms.","- Keep defaults and retries stable across the initial prompt and retry prompt. An explicit blank, cancellation, default-on-Enter rule, and invalid answer must follow the same documented policy after a retry as before it.","- Preserve required information through round trips. Do not lose fields, metadata, ordering, duplicate policy, timezone components, remote content, or trailing-newline state merely because one implementation representation is convenient.","","### 6. Handle paths, formats, and boundaries defensively","","- Treat paths as untrusted input. Normalize both platform separator styles before interpreting them, reject traversal and absolute escapes, constrain resolution to the configured root, and apply the same safety rules to list, read, create, update, and delete operations.","- If a format or extension is specified as case-insensitive, perform case-insensitive resolution on case-sensitive filesystems as well as case-insensitive ones. Define deterministic behavior when equivalent sibling names coexist rather than depending on directory iteration order.","- Use the repository's existing parser and model invariants for dates, recurrence, calendars, events, and structured formats. Hand-rolled parsing should not silently accept values the established parser rejects or lose timezone/all-day/encoding information.","- Preserve meaningful text differences, including an end-of-file newline when the contract cares about it. Diff, merge, and serialization code must distinguish content equality from a representation that merely looks equal after lossy splitting or normalization.","- Treat empty, null, zero, missing, malformed, Unicode, unusually large, duplicate, and repeated values according to the prompt\u2014not according to a convenient truthiness check or an accidental default.","","### 7. State, concurrency, and resource discipline","","- Avoid mutable process-global state for feature state, cached arguments, active sessions, monkeypatches, or dependency injection. If a framework requires shared state, scope it explicitly, restore it after the operation, and provide a lifecycle/unhook path.","- Do not mutate live configuration or model objects temporarily without a reliable `try/finally` restoration. Prefer copies or explicit context objects, and ensure one invocation cannot leak into a later in-process invocation or test.","- Use one canonical identity and one canonical dependency graph for discovery, validation, closure expansion, visualization, and execution. Do not validate using inventory keys and execute using a different field such as `vars.target` unless the mapping is explicit and guaranteed.","- For dependency scheduling, resolve all transitive prerequisites, reject missing targets and cycles before work starts, preserve deterministic ordering where promised, run only ready work, block dependents after prerequisite failure, and use the same dependency constraints in serial and parallel modes.","- Do not turn an implementation-specific pool API, callback order, or thread event into the behavioral contract. At the same time, do not weaken the actual failure/isolation guarantees: no dependent may run early, no forbidden work may occur, and all required independent work must follow the prompt's stated failure policy.","- Retain existing deduplication, cache reuse, batching, and parallelism behavior unless the prompt changes it. Avoid creating a new temporary cache or serial worker for every target when shared grouping is part of the existing behavior or causes an avoidable performance regression.","- Bound untrusted or potentially expensive work without claiming that a shallow copy is immutable or that `eval` plus a trace hook is a secure sandbox. Use a genuinely read-only context, restrict accessible operations, and choose a resource-control mechanism that cannot corrupt global interpreter state when the security contract matters.","- Use iterative processing or bounded recursion for large imports, graphs, inventories, and batches. Clean up threads, temporary files, locks, and callbacks on success, failure, and cancellation.","","### 8. User-facing CLI and UI quality","","- Follow the project's existing command and UI architecture rather than adding unrelated inline styling, imperative flows, deeply nested closures, or global changes to shared input primitives when a focused extension is available.","- Match the exact interaction contract. If the prompt allows only `y`/`n`, exact words, or enumerated choices, reject aliases and blank/default responses unless the prompt explicitly permits them. Make cancellation and interruption behavior consistent at every branch, including the initial, empty-state, retry, and creation paths.","- Keep destructive, overwrite, merge, repair, and rollback operations explicit and recoverable. Do not silently choose a default that the contract requires the user to choose, and do not leave a partially modified UI or persisted state after cancellation or failed confirmation.","- Keep user-facing errors consistent in channel, status, response shape, and actionable content. Use the established error type/logger/HTTP response pattern rather than mixing generic abort pages, raw exceptions, and custom payloads without a contract reason.","- Avoid unrequested UI shortcuts, automatic matching, hidden text, extra commands, or unrelated feature changes. They increase maintenance surface and can create behavior that conflicts with existing workflows.","- Treat warnings from the project's UI/toolkit tests as real quality issues when they indicate invalid sizing, layout, focus, or resource usage. Do not declare a polished UI while the implementation emits avoidable runtime warnings.","","### 9. Security, privacy, and compatibility gate","","- Do not log raw secrets, CLI override values, variable-file values, preset contents, passwords, tokens, or other sensitive values at any log level. Tests should use distinctive sentinels and inspect logs/display diagnostics without requiring exact safe wording.","- Preserve existing public behavior outside the feature: fixed-field deletion, non-interactive overwrite, legacy/simple recurrence compatibility, optional feature-disabled paths, selected backend behavior, and normal error/transaction semantics.","- Do not introduce unrelated formatting churn, refactors, comments removals, metadata edits, helper rewrites, or changes to vdir/transaction/storage behavior merely because a feature touches a neighboring file. Keep the diff narrow and repository-formatted.","- Do not claim a top-quality score while known regressions remain in an untested alternate backend, fresh process, cross-format path, supported alias, all-day/floating case, parallel path, or public UI surface. Fix concrete caveats rather than explaining them away as edge cases.","","### 10. Full-quality completion gate","","A solution is ready for a highest-quality review only when all of the following are true:","","- every prompt requirement has a deliberate implementation path;","- every important public path has an independent behavioral test;","- new tests fail for the intended reason before the solution and pass afterward;","- baseline and regression tests remain green;","- no known public behavior differs across equivalent entry points without an explicit reason;","- invalid input and failure paths are safe, consistent, and non-destructive;","- persistence and multi-step mutations preserve valid prior state or roll back as required;","- concurrency and lifecycle state cannot leak across operations;","- the implementation uses repository conventions and public extension points;","- there is no dead code, unrelated change, avoidable duplication, or hidden implementation coupling; and","- remaining review notes are either fixed or explicitly shown to be outside the contract rather than silently ignored."].join(`
|
|
100
|
-
`);function jee(){return
|
|
101
|
-
`).trim(),U=O?
|
|
102
|
-
`)):["(no output)"];if(!l.expanded){let ce=Math.max(0,U.length-yEn);U=U.slice(0,yEn),ce>0&&U.push(`... (${ce} more lines, ${
|
|
95
|
+
${t instanceof Error?t.message:String(t)}`)}}function wxo(e,t,s){let a=e.fargate??{};if(s==="patch-precheck")return{...a,resourceProfile:tDe,adaptiveResourceProfile:!1,projectProfiles:{}};let c=a.projectProfiles?.[t];return c?{...a,resourceProfile:c}:a}function kxo(){let e=Math.max(Ya.lastIndexOf("/"),Ya.lastIndexOf("\\"));return e>=0?Ya.slice(0,e):"."}function Lxo(){let t=[nEn(new URL("./fargate-worker.mjs",import.meta.url)),nEn(new URL("../dist/fargate-worker.mjs",import.meta.url)),dd(process.cwd(),"dist","fargate-worker.mjs")].find(s=>xAe(s));if(!t)throw new Error("Missing dist/fargate-worker.mjs. Build pi-shipd-checks first.");return t}async function Mxo(e,t,s,a,c){let p=`tar ${process.platform==="win32"?"--force-local ":""}${c?"--exclude=./solution.patch ":""}-czf ${VC(NC(s))} -C ${VC(NC(t))} .`,d=process.platform==="win32"?"C:\\Program Files\\Git\\bin\\bash.exe":"bash",m=await e.exec(d,["-c",p],{cwd:t,timeout:12e4,signal:a});if(a.aborted)throw new Error("Cancelled by user.");if(m.code!==0)throw new Error(m.stderr?.trim()||"Could not create the Fargate source archive.")}function Gxo(e,t,s){let a;try{a=JSON.parse(sEn(e,"utf-8"))}catch(u){throw new Error(`Could not read Pi auth file: ${u instanceof Error?u.message:String(u)}`)}if(typeof a!="object"||a===null||Array.isArray(a))throw new Error("Could not prepare Fargate auth: auth.json must contain an object.");let c=a,l=c[t];if(t==="commandcode"&&(typeof l=="string"&&(l={type:"api_key",key:l}),l===void 0&&(l=c["command-code"]),typeof l=="string"&&(l={type:"api_key",key:l}),l===void 0&&typeof c.apiKey=="string"&&(l={type:"api_key",key:c.apiKey})),l===void 0){$C(s,`{}
|
|
96
|
+
`,{encoding:"utf-8",mode:384});return}if(typeof l!="object"||l===null||Array.isArray(l))throw new Error(`Invalid credential for provider "${t}" in ${e}.`);if(t==="commandcode"){let u=l;u.type==="api"&&(l={...u,type:"api_key"})}$C(s,JSON.stringify({[t]:l},null,2),{encoding:"utf-8",mode:384})}async function Uee(e,t,s,a,c){await e.send(new hr.PutObjectCommand({Bucket:t,Key:s,Body:Dxo(a),ContentType:c,ServerSideEncryption:"AES256"}))}async function Oxo(e,t,s){let a=await e.sts.send(new Hee.GetCallerIdentityCommand({}));if(!a.Account)throw new Error("Could not determine AWS account identity.");let c=t.bucket??`shipd-checks-${a.Account}-${s}`;await Nxo(e.s3,c,s);let l=t.cluster;if(l||(l=(await e.ecs.send(new Io.ListClustersCommand({maxResults:1}))).clusterArns?.[0]),l||(l=(await e.ecs.send(new Io.CreateClusterCommand({clusterName:"pi-shipd-checks"}))).cluster?.clusterArn),!l)throw new Error("Could not find or create an ECS cluster.");let p=(await e.ec2.send(new zg.DescribeVpcsCommand({Filters:[{Name:"isDefault",Values:["true"]}]}))).Vpcs?.[0]?.VpcId;if(!p)throw new Error("No default VPC found. Configure Fargate subnetIds/securityGroupId explicitly.");let d=t.subnetIds?.length?t.subnetIds:(await e.ec2.send(new zg.DescribeSubnetsCommand({Filters:[{Name:"vpc-id",Values:[p]},{Name:"map-public-ip-on-launch",Values:["true"]}]}))).Subnets?.map(S=>S.SubnetId).filter(S=>!!S)??[];if(d.length===0)throw new Error("No public subnet found for the Fargate task.");let m=t.securityGroupId;if(m||(m=(await e.ec2.send(new zg.DescribeSecurityGroupsCommand({Filters:[{Name:"vpc-id",Values:[p]},{Name:"group-name",Values:["default"]}]}))).SecurityGroups?.[0]?.GroupId),!m)throw new Error("No default security group found.");return{region:s,bucket:c,cluster:l,subnets:d,securityGroup:m}}async function Nxo(e,t,s){try{await e.send(new hr.HeadBucketCommand({Bucket:t}))}catch{await e.send(new hr.CreateBucketCommand({Bucket:t,...s==="us-east-1"?{}:{CreateBucketConfiguration:{LocationConstraint:s}}}))}await e.send(new hr.PutPublicAccessBlockCommand({Bucket:t,PublicAccessBlockConfiguration:{BlockPublicAcls:!0,BlockPublicPolicy:!0,IgnorePublicAcls:!0,RestrictPublicBuckets:!0}}))}async function Vxo(e,t,s,a,c,l){let u=await e.send(new Io.RegisterTaskDefinitionCommand({family:"pi-shipd-checks-fargate",...l.taskRoleArn?{taskRoleArn:l.taskRoleArn}:{},...l.executionRoleArn?{executionRoleArn:l.executionRoleArn}:{},networkMode:"awsvpc",requiresCompatibilities:["FARGATE"],cpu:String(s*1024),memory:String(a),containerDefinitions:[{name:oEn,image:t.baseImage,essential:!0,linuxParameters:{initProcessEnabled:!0},command:["bash","-lc",`python -c "import os,urllib.request; urllib.request.urlretrieve(os.environ['SHIPD_BOOTSTRAP_URL'],'/tmp/shipd-bootstrap.json')" && python -c "import json,urllib.request; b=json.load(open('/tmp/shipd-bootstrap.json')); urllib.request.urlretrieve(b['workerUrl'],'/tmp/shipd-fargate-worker.mjs')" && exec node /tmp/shipd-fargate-worker.mjs`],...l.executionRoleArn?{logConfiguration:{logDriver:"awslogs",options:{"awslogs-group":l.logGroup??"/aws/ecs/pi-shipd-checks","awslogs-region":c,"awslogs-stream-prefix":"solver"}}}:{}}]}));if(!u.taskDefinition?.taskDefinitionArn)throw new Error("ECS did not return a task definition ARN.");return u.taskDefinition.taskDefinitionArn}async function qxo(e,t,s){if(!t)return;let a=Date.now()+12e4;for(;Date.now()<a;){try{if((await e.send(new Io.DescribeTasksCommand({cluster:t,tasks:[s]}))).tasks?.[0]?.lastStatus==="STOPPED")return}catch{return}await aEn(2e3)}}async function Fxo(e,t,s,a,c,l,u,p,d){let m=Date.now()+(Math.max(10,c)+20)*60*1e3,S,v=!1;for(;Date.now()<m;){if(l.aborted)throw d(),await e.send(new Io.StopTaskCommand({cluster:t,task:s,reason:"shipd checks cancelled"})).catch(()=>{}),new Error("Cancelled by user.");let T=await a();if(T&&(S=T,u(T.results,T.resourceUsage),T.complete))return T;let w=(await e.send(new Io.DescribeTasksCommand({cluster:t,tasks:[s]}))).tasks?.[0];if(w?.lastStatus==="RUNNING"&&!v&&(v=!0,p()),w?.lastStatus==="STOPPED"){let L=await a();if(L)return u(L.results,L.resourceUsage),L;let G=w.stoppedReason??w.containers?.[0]?.reason??"Fargate task stopped without a result.";return S??{complete:!1,results:[],error:G}}await aEn(xxo)}return d(),await e.send(new Io.StopTaskCommand({cluster:t,task:s,reason:"shipd checks timeout"})).catch(()=>{}),S??{complete:!1,results:[],error:"Fargate task timed out."}}async function Bxo(e,t,s){try{let c=await(await e.send(new hr.GetObjectCommand({Bucket:t,Key:s}))).Body?.transformToString();return c?JSON.parse(c):void 0}catch{return}}async function Uxo(e,t,s){return t.map(a=>{let{trajectory:c,...l}=a;if(s){let u=dd(e.repoDir,mDe,e.runId,`solver_${a.index}`);bxo(u,{recursive:!0}),$C(dd(u,"trajectory.json"),`${JSON.stringify(c??[],null,2)}
|
|
97
|
+
`,"utf-8"),$C(dd(u,"solution.patch"),a.diff,"utf-8"),$C(dd(u,"test_output.txt"),a.testOutputTail,"utf-8"),l.artifactsDir=u}return l})}function Hxo(e,t){let s=new Map(e.map(a=>[a.index,a]));for(let a of t)s.set(a.index,a);return[...s.values()].sort((a,c)=>a.index-c.index)}function jxo(e,t,s){let a=new Map(t.map(c=>[c.index,c]));for(let c=1;c<=e;c+=1)a.has(c)||a.set(c,{index:c,status:"error",passed:!1,diff:"",testOutputTail:s,error:s,durationMs:0,totalTests:null,failedTests:null});return[...a.values()].sort((c,l)=>c.index-l.index)}async function zxo(e,t,s){t&&await e.send(new hr.DeleteObjectsCommand({Bucket:t,Delete:{Objects:Object.values(s).map(a=>({Key:a}))}}))}var dL="checks_progress";function Kxo(e){return`${Math.max(0,Math.floor(e/1e3))}s`}function uEn(e,t,s,a){let c=a?.showBar!==!1,l=s>0?Math.min(1,t/s):0,u=Math.round(24*l),p="\u2588".repeat(u)+"\u2591".repeat(Math.max(0,24-u)),d=c?` [${p}] ${t}/${s}`:"",m=a?.startedAt===void 0?"":` elapsed: ${Kxo(Date.now()-a.startedAt)}`;return[`checks: ${e}${d}${m}`]}import{existsSync as Wxo,readFileSync as Qxo}from"node:fs";var PAe=["agent_prompt.md","solution.patch","test.patch"];function $Ae(e=new Date){let t=(l,u=2)=>String(l).padStart(u,"0"),s=-e.getTimezoneOffset(),a=s>=0?"+":"-",c=Math.abs(s);return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}T${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}.${t(e.getMilliseconds(),3)}${a}${t(Math.floor(c/60))}:${t(c%60)}`}function pEn(e){try{if(!Wxo(e))return{};let t=JSON.parse(Qxo(e,"utf-8"));return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}catch{return{}}}function dEn(e){let t={...e.existingReport,timestamp:$Ae(),model:`${e.config.provider}/${e.config.modelId}`,thinkingLevel:e.config.thinkingLevel};return delete t.overall,delete t.reports,e.runGapFinder&&(t.testGaps=e.testGaps,e.gapAnalysisIncomplete?t.testGapAnalysisNote=`Gap analysis did not fully complete (sentence finder: ${e.gapFinderStatus}, review: ${e.gapFilterStatus}); testGaps may be incomplete.`:delete t.testGapAnalysisNote),e.runSolverGapFinder&&(t.solverRunSummary=e.solverResults.map(s=>({index:s.index,status:s.status,passed:s.passed,durationMs:s.durationMs,totalTests:s.totalTests,failedTests:s.failedTests,error:s.error??(s.status==="error"?s.testOutputTail:void 0),artifactsDir:s.artifactsDir})),t.solverGaps=e.solverGaps,e.fargateResourceUsage?t.fargateResourceUsage=e.fargateResourceUsage:delete t.fargateResourceUsage,e.solverGapAnalysisIncomplete?t.solverGapAnalysisNote=`Solver-gap analysis did not fully complete (comparison reviewer: ${e.solverComparisonStatus}); solverGaps may be incomplete.`:delete t.solverGapAnalysisNote),t}function Xy(e){return`${Math.floor(e/1e3)}s`}function mEn(e){let t=Array.isArray(e.merged.testGaps)?e.merged.testGaps.length:0,s=e.runSolverGapFinder&&Array.isArray(e.merged.solverRunSummary)?e.merged.solverRunSummary.map(l=>({...l,durationMs:l.durationMs??0})):[],a=Array.isArray(e.merged.solverGaps)?e.merged.solverGaps.length:0,c=[];return e.runGapFinder&&c.push(t>0?`${t} test gap(s) found`:"no test gaps found"),e.runSolverGapFinder&&c.push(`${s.filter(l=>l.passed).length}/${s.length} solvers passed, ${a} gap(s) found`),{content:`Gap finders: ${c.join(" | ")}`,details:{gapsCount:t,showGaps:e.runGapFinder,showSolverGaps:e.runSolverGapFinder,solverDetails:s,solverGapsCount:a}}}var Zxo=["## The problem description (aka the task)","P1: Aligns with the repo's philosophy.","P2: Self-contained \u2014 solvable from the repo and description alone.","P3: Clear, concise, and unambiguous \u2014 describes what to build or fix without leaving points for guessing.","P4: Verifiable \u2014 success is objectively testable.","P5: Not prescriptive \u2014 does not leak the solution.","","## The tests","T1: They highlight the missing or incorrect behavior and fail before the solution.","T2: They are deterministic and terminating.","T3: They assert the required public behavior strongly and diagnostically.","T4: They cover the requested behavior and justified edge cases.","T5: They do not check unspecified or undiscoverable behavior.","T6: They do not over-pin output, representation, timing, or wording.","T7: They preserve valid alternative implementations and public integration paths.","T8: They keep fixtures, reporting, and the evaluation environment viable.","","## The solution","S1: The solution meets all requirements and preserves required public behavior.","S2: It has no regressions and follows existing repository patterns.","S3: It contains no irrelevant changes.","S4: It contains no dead code, unexplained scaffolding, or avoidable implementation coupling."].join(`
|
|
98
|
+
`),Yxo=["# Fairness vs. unfairness","","## Core standard","","A test is fair when it checks behavior required by the task description, clearly established by an existing public repository contract, or directly observable by a user or caller. A test is unfair when a reasonable implementation can satisfy the task and the repository's public contract but fail because the test chooses an undocumented implementation detail.","","The reference implementation, a convenient fixture, a neighboring private helper, and a test harness are evidence at most. They are not the specification by themselves.","","For every assertion, ask:","","1. What exact prompt requirement or established public contract supports it?","2. What can a user, caller, or public API observe?","3. Could two competent implementations satisfy that contract while differing on this assertion?","4. Does the fixture and observation point preserve all repository-valid implementation paths?","5. Would the assertion catch a materially incorrect behavior rather than merely a different implementation?","","If two competent implementations can satisfy the contract while differing on the assertion, and the prompt/repository does not select one outcome, the assertion is unfair. Rewrite it around the shared semantic behavior or remove it.","","## Fair","","- Verifies behavior explicitly required by the task.","- Verifies behavior exposed by an existing public API or an established public repository convention.","- Checks the visible result, caller-visible state, required side effect, or documented data contract.","- Requires a new exported name, field, control, attribute, label, key, or option only when the task names it or the existing public API already establishes it.","- Allows equivalent public integration paths, helper delegation, service boundaries, and implementation structures.","- Allows additional valid fields or metadata when the contract requires only a subset of structured output.","- Checks required relationships such as preservation, isolation, ordering, association, or eventual refresh without guessing unrelated concrete values.","- Normalizes or parses equivalent syntax before comparing semantics.","- Accepts clear failure behavior when the contract does not prescribe one exact error representation.","- Waits or polls for an eventual result when synchronous completion is not part of the contract.","- Uses fixtures that preserve real state invariants, module shape, exported references, and valid repository behavior.","- Observes a public effect rather than requiring one internal call or observation point.","- Separates a fair behavioral assertion from an unrelated unsupported co-assertion.","","## Unfair","","### Undocumented implementation choices","","- Requires a private helper, internal class, private state field, or unmentioned file path.","- Requires a particular module boundary, import path, direct platform call, algorithm, call order, or failure-injection primitive when another repository-valid path produces the same effect.","- Requires a new method, constructor, property, export, argument shape, registry key, option ID, or configuration name that the task does not specify and the repository does not already expose publicly.","- Treats the reference implementation's structure, naming, defaults, or minimal serialization as mandatory.","","### Representation instead of semantics","","- Compares an entire object, document, mapping, or array to a minimal expected serialization when the contract requires only selected fields, values, preservation, or relationships.","- Rejects additional valid fields or metadata that do not weaken the required behavior.","- Pins a concrete container or materialization type when the contract specifies the contents or tabular behavior but not the wrapper type.","- Requires a particular field location, source file, interface placement, AST node shape, type alias, type spelling, quote style, whitespace, line break, token adjacency, generated identifier, or code length.","- Requires exact row/group ordering, result cardinality, or per-item counting when the contract does not define that ordering or granularity.","- Requires literal source words to prove behavior that can be checked by compiling, parsing, rendering, executing, or inspecting the public result.","","### Values and relative language","","- Infers an exact value from words such as current, latest, selected, next, matching, appropriate, or stable when only a relationship or effect is required.","- Treats an example, default, neighboring helper behavior, or one fixture value as a universal requirement.","- Requires a particular normalization or encoding strategy when multiple representations preserve the required meaning.","- Requires an incidental no-op artifact, such as whether an empty file, directory, cache entry, history item, or output record exists, when only content/state/reuse/non-duplication is contractual.","","### Counts, categories, and interactions","","- Requires an exact count without a specified counting unit. A count might be per input, field, item, target, rule, match, category, finding, log record, or operation.","- Requires a repair or mutation count without specifying whether it reports findings before the change or findings remaining afterward.","- Assumes diagnostic categories are mutually exclusive or overlapping when the task does not define that relationship.","- Assumes a majority, plurality, unanimity, or other consensus rule without the prompt defining what dissenting values mean.","- Assumes duplicate detection is per collection or global across collections without the contract defining the scope.","- Resolves an interaction between two requirements by intuition\u2014for example, whether a missing optional value skips only value checks or an entire combined rule, whether a cache is reused across a changed input, or whether a target-level check still runs when a value path is absent.","- Requires one line, one repeated term, one log record, or one message per underlying issue when aggregate reporting is equally compliant.","","### Configuration schemas and boundaries","","- Invents a field type, collection shape, omitted-field default, unknown-key policy, coercion rule, extension-based parser dispatch, or cross-field constraint.","- Requires a string-only name, boolean-only flag, particular list schema, strict rejection of extra top-level keys, or rejection of an inverted range when the task does not establish that schema choice.","- Invents acceptance or rejection rules for unspecified malformed, missing, nullish, Unicode, unusually large, boolean-like, numeric, platform-specific, symlink, or missing-parent inputs.","- Assumes a strict validation policy, unlimited policy, coercion policy, or normalization policy that the task does not state.","- Selects one behavior at an underspecified boundary such as dry-run, preview, no-op, conflict, rollback, cache reuse, preflight, or a state transition.","- Assumes mathematical edge values or non-finite values have a particular ordering or rejection policy when the prompt specifies only ordinary finite bounds or numeric behavior.","","### Errors, messages, and timing","","- Requires an exact exception class, error code, message text, punctuation, capitalization, embedded input, basename, or log wording when the contract only requires failure, a clear error, or reporting.","- Requires validation during construction rather than evaluation, or vice versa, when the public contract does not specify timing.","- Requires a callback to return a promise, be fully settled on return, or update immediately when the contract promises only an eventual effect.","- Uses a small wall-clock threshold as a functional requirement without a stated performance contract; such limits are often platform- and load-dependent.","- Requires a particular signal, alarm, subprocess ceiling, poll interval, viewport size, or platform-specific safety mechanism when only bounded or fail-fast behavior is required.","- Requires one exact logging vocabulary when the operation can be reported clearly in equivalent wording.","- Rejects one permitted failure path when the task explicitly allows alternatives such as load-time rejection or evaluation-time violation.","","### Expressions and embedded languages","","- Assumes an unlisted builtin, operator, method, container type, mapping shape, mutability rule, or context binding in a restricted expression language.","- Requires a particular representation for context variables when the task names their meaning but not whether they are mappings, models, lists, tuples, or another equivalent public value.","- Requires a dangerous expression to be rejected during parsing when the contract also permits prohibited constructs to be rejected during evaluation, or vice versa.","- Treats one expression-evaluation cardinality as mandatory when a multi-match rule could reasonably be evaluated once per target, once per rule, or once per resolved value.","","### UI, lifecycle, and harness coupling","","- Requires exact DOM hierarchy, CSS classes, selectors, test/data attributes, native tags, hidden text, hidden-shim text, ARIA attributes, focus order, keyboard traversal, or mock-specific control counts when the task specifies only a user-facing action or visible result.","- Requires an initial focus, default Enter action, Tab order, button order, or immediate control visibility when the prompt only names the available choices.","- Requires a component to expose a particular model API merely so the test can mutate it, when the behavior can be exercised through the real public UI or caller flow.","- Exercises a detached constructor, unmounted widget, partial view, or inactive editor while asserting behavior qualified by an active or mounted production context.","- Uses a mock that omits valid exports, changes the shape of real state, reassigns exported arrays/objects, or patches a source module while the application holds an imported binding.","- Requires a fake collaborator to implement hidden, newly invented hooks instead of using the repository's existing public extension point.","- Uses incomplete fixtures that cause a valid implementation to fail before the behavior under test is reached.","- Accepts only a hidden harness's import path, shim, serialized text, or mock behavior rather than the repository's public contract.","","### Mixed assertions","","A test can contain both fair and unfair assertions. Do not discard the entire behavioral goal automatically. Keep the assertion that checks the required observable effect and remove or relax only the unsupported value, representation, timing, API, side effect, or harness assumption. Conversely, a test that looks behaviorally useful is still unfair overall if one mandatory co-assertion rejects a valid implementation.","","## Scope and alternatives","","Preserve every qualifier in the prompt. A requirement for aware values, naive values, all-day values, one mode, one target state, or one lifecycle phase does not automatically apply to every representation or phase. Do not transfer a rule from one subtype to another, or require a changed wall time, timezone, normalization, or side effect outside the stated scope.","","When the prompt expressly allows more than one outcome or phase, a fair test must accept every permitted alternative. Do not force one load/evaluation phase, one error form, or one integration route merely because it is simpler to assert. Conversely, do not call a test unfair merely because it rejects behavior that the prompt explicitly forbids; distinguish an actual contract prohibition from an unstated mechanism used to enforce it.","","## Public repository evidence","","Existing source code can establish a public contract when the behavior is exposed through a public API, documented UI, established file format, or stable user-facing convention. It does not make every internal branch or helper behavior contractual.","","Use the closest relevant analogues, not an arbitrary nearby example. If analogues disagree, or if the only evidence is private implementation structure, do not pin the detail. A visible security or compatibility rule can make a boundary requirement discoverable, but an unrelated helper's default does not automatically define a new feature.","","A repository convention can justify an exact detail only when it is public, stable, directly relevant, and unambiguous. It does not justify a hidden import-binding assumption, a particular cache mutation path, or a newly introduced collaborator method merely because one implementation uses it.","","## Test strength versus test fairness","","A test may be fair but too weak. For example, a color assertion that searches the entire viewport may pass because an unrelated cell has that color; a message check may find text unrelated to the operation; a timezone assertion may check the destination representation without checking preservation of the underlying instant. These are coverage or observation defects, not reasons to impose a new implementation detail.","","Strengthen such tests by observing the correct public target, associating the result with the operation, and checking the semantic invariant. Do not strengthen them by requiring private state, exact source form, or one architecture.","","A failed setup and a failed behavioral assertion are also different. If a shared fixture crashes before the feature is observed, or an observer renders the wrong widget/viewport after locating a valid result, that is a broken test harness\u2014not evidence of an implementation gap. If the fixture reaches the public behavior but rejects a valid alternative representation or integration path, that is a test/contract mismatch. Neither should be treated as a fair behavioral requirement."].join(`
|
|
99
|
+
`),Xxo=["# Gaps in tests","","This section defines missing or weak test coverage. It is separate from fairness: a test may be fair but too weak, or a proposed gap may describe a real missing behavior but be unfairly asserted. Use `--GAPS--` records for test-side deficiencies and `T<num>` labels for the test-quality dimension involved.","","## `--GAPS--` candidate rules","","A `--GAPS--` block is a candidate, not an automatic requirement. Accept it only after checking the prompt/public contract, the validity of its fixture, the public observation, and whether a plausible incomplete implementation can evade the current suite. Keep the candidate distinct, actionable, and fair.","","A genuine gap must be:","","- grounded in a specific task requirement or clear public contract;","- distinct from other candidates;","- observable through a public behavior;","- expressible without private implementation assumptions;","- meaningful enough that a plausible incomplete implementation could pass without it; and","- fair to multiple reasonable implementations.","","Do not report optional coverage ideas, generic requests for more negative tests, speculative edge cases, or details that are merely convenient to assert. Edge cases are valuable when the task requires them or the public contract clearly implies them; otherwise they are not gaps.","","When a candidate's first wording is too specific, reformulate it around the semantic requirement. For example, require preservation of required data rather than a minimal serialized object, required ordering relationships rather than an incidental sort order, and a reported failure rather than an arbitrary message or exception path. If no fair formulation remains, drop the candidate.","","An empty candidate list is correct when no proposed check survives these rules.","","## T<num> metrics for test gaps","","`T` metrics describe weaknesses in the tests or test harness. They do not, by themselves, claim that the implementation is wrong. Combine labels when one gap has more than one weakness, for example `T3/T4` for a weak assertion that also misses a required branch.","","### T1 \u2014 fixture and setup reliability","","The test setup must be valid and must reach the behavior under test. Do not count a malformed fixture, missing required outer field, stale object, invalid lifecycle state, incomplete mock, unavailable dependency, or setup exception as an implementation failure. Repair the fixture or isolate the environmental problem while preserving meaningful regression coverage.","","### T2 \u2014 deterministic and terminating execution","","Tests must not depend on wall-clock races, unseeded randomness, scheduler order, loose configurable timeouts, unbounded polling, infinite expressions, deadlocking workers, or machine-dependent thresholds. Use controlled clocks, synchronization, bounded waits, deterministic inputs, and an explicit failure when the bound is exceeded.","","### T3 \u2014 assertion strength and diagnostic specificity","","Assertions must prove the required public result, state, count, relationship, side effect, error channel, or continuation. Avoid label-only output checks, whole-output inequality, stale/unrelated messages, generic exceptions, aggregate flags that hide individual failures, and mixed fixtures that allow a wrong implementation to pass. When diagnostics are contractual, verify that they identify the relevant target/field/rule without pinning exact wording.","","### T4 \u2014 required behavior and edge coverage","","Cover every prompt sentence, explicit prohibition, public entry point, supported backend/format, lifecycle path, and justified boundary. Include meaningful falsey values, aliases, malformed input, empty/missing values, repeated operations, nested/list members, persistence/reload, failure/rollback, and cross-feature interactions when the contract supports them. Do not turn unspecified hypothetical cases into gaps.","","### T5 \u2014 interaction-protocol neutrality","","Drive interactive and UI behavior through the public user contract, not one prompt choreography, ordinal answer sequence, hidden control, private widget, exact call count, or implementation-specific selection protocol. Test the resulting public state/effect and accept equivalent accessible flows unless the prompt fixes the protocol.","","### T6 \u2014 evaluation-environment viability","","The required base/regression command must be runnable in the prescribed offline, non-root, permission, dependency, and repository environment. A broad unrelated suite that fails before reaching the touched area is a harness blocker, not evidence against the solution. Keep genuine touched-area regression tests while removing environmental false failures.","","### T7 \u2014 representation and expectation fairness","","Do not require a reference-only rendering, full untruncated value, exact field placement, parser spelling, DOM structure, output order, or concrete serialization when the public contract permits equivalent results. If a display/format detail is required, assert only that specified semantic detail and use fixtures that do not accidentally test an unrelated truncation or layout limit.","","### T8 \u2014 complete and honest reporting","","Do not use fail-fast execution when the task requires all diagnostics. Every real test must run and appear in the report/JUnit output. Distinguish setup failures, timeouts/OOMs, environment failures, and behavioral assertion failures; never synthesize a collection of failures after a wrapper aborts or let an unrelated warning satisfy the current test.","","## Test-gap calibration from the corpus","","The following rules are distilled from the cleaned unfair-test, gap-report, and rubric corpus. They apply when proposing a test, auditing a reported gap, or judging a solution. They refine the core standard above; they do not create requirements that the task prompt leaves open.","","### Contract-first gap triage","","- A reported gap is actionable only when it identifies a concrete prompt/public-contract requirement, a plausible incomplete implementation that would evade the current tests, and a public observation that distinguishes the behaviors. \u201CMore coverage would be nice\u201D is not a gap.","- During Gap Finder analysis, use `agent_prompt.md` and observable repository behavior as the specification. Do not use `test.patch`, `solution.patch`, a hidden-test name, or reference-only structure to invent a requirement; those may help locate a scenario only after the public contract has independently grounded it.","- Separate three questions: is the behavior required, is the current suite blind to it, and is the proposed test fair? A candidate can be a real missing behavior but still need its assertion rewritten to remove an unfair value, API, timing, fixture, or harness assumption.","- Keep the semantic core when possible. If a candidate fairly proves preservation, isolation, rejection, ordering, or an effect but also pins a message, count, serialization, private method, or prompt sequence, relax only the unsupported co-assertion rather than discarding the whole candidate.","- Do not infer a requirement from solver convergence, the golden solution, a hidden test name, a reference branch, a default chosen by one implementation, or a reviewer\u2019s preferred design. Those are investigation clues only.","- If a candidate exposes a genuine ambiguity\u2014consensus versus plurality, pre- versus post-repair counts, omitted-default semantics, cross-format collision policy, preset precedence, hunk grouping, or a recurrence alias grammar\u2014clarify the prompt or accept all reasonable outcomes. Do not silently turn one interpretation into a hidden requirement.","- Negative tests require an actual prohibition, guard, invalid state, isolation rule, or failure policy. Do not turn ordinary positive coverage into a negative gap merely because a second wrong implementation is imaginable.","","### Assertion strength without unfairness","","- Do not use whole-output inequality, \u201Csome output changed,\u201D \u201Csome warning exists,\u201D a nonempty exception, or a generic `has_issues` flag as the only proof of a required behavior. Assert the relevant public state, result, count, continuation, or effect directly.","- When a contract defines counts, parse the complete count lines and assert the correct count. When it does not define the counting unit, assert detection and state/effect, or first define whether the unit is a field, item, rule, target, match, category, or operation.","- Do not require one log record per issue, one repeated keyword, or one physical line per item unless the prompt specifies that granularity. Conversely, do not allow a single aggregate result to hide required independent findings when the prompt explicitly says to count/log each violation.","- Test positive and negative cases independently. A mixed fixture with one valid and one invalid value can prove only that something happened; add an isolated valid case and an isolated invalid case when acceptance of the valid case matters.","- For aliases, options, fields, formats, supported types, and backends, test each promised category or a justified representative matrix. Do not let a hard-coded subset pass because the visible examples cover only four fields, one backend, one selector, one alias, or one error path.","- For multi-item or multi-field operations, assert that all required members are processed, that valid neighbors continue after a skippable invalid member, and that one failure does not silently short-circuit later required checks.","- When testing a warning or diagnostic, capture the repository\u2019s actual public channel and associate the message with the operation. Do not accept an unrelated log record, and do not require a literal word, exact field name, basename, punctuation, or stdout when the contract only requires a clear diagnostic.","- If a message must identify a rule, target, field, or path, accept the contract\u2019s alternatives (name, index, or equivalent location) and do not assume zero-based indexing, a dotted path, a particular vocabulary, or a fixed output layout.","","### Harness and fixture integrity","","- A test setup must be valid under the repository\u2019s real public lifecycle. Do not create state outside the invocation/session that the prompt says owns it and then require an invocation-scoped recorder to observe it. Do not use stale model objects after the contract says pruning/removal permanently deletes them.","- Do not omit required outer fields, use an invalid document shape, or combine an unrelated malformed field with the behavior under test. For example, a JSON test requiring successful import must include every prompt-required top-level list, and an ICS success fixture must be valid independently of the RRULE edge being tested.","- Do not make a fake module or collaborator less capable than the real public object. Preserve valid exports, attributes, method signatures, model shapes, iterable/generator behavior, and state invariants. A fake that drops new fields, returns a list where the real API returns a generator, or changes import identity can reject a correct solution.","- Patch the public boundary actually used by the application, or use a real isolated integration path. Do not patch `module.function` while the implementation may have a direct imported binding, patch one of several invented import paths, require a nonexistent future helper, or make success depend on a private `get_templates_dir`, loader, saver, or factory name.","- A test must not require a specific pool API (`apply_async` versus `imap_unordered`), callback protocol, executor, scheduler, import style, or worker placement. Test prerequisite ordering, blocking, isolation, and failure propagation through a fair public boundary. Use deterministic latches for concurrency rather than inspecting a private `pending` map.","- Do not drive a new UI by an ordinal iterator of answers, prompt keyword matching, exact confirmation-call count, or hard-coded free-text token unless that protocol is explicitly specified. A compliant implementation may use a menu, free text, a delimited selection, a separate confirmation, or another accessible flow.","- Do not assume a detached constructor, unmounted screen, inactive editor, or fake collection has the same lifecycle effects as the production path. If the requirement is \u201Cwhile active,\u201D open it through the real public path; if the requirement is a model behavior, test the model directly.","- Shared helpers must not contain hidden assumptions that contaminate every test: fixed path lengths, presumed default filenames, required absolute paths, a particular editor implementation, a specific button traversal order, or a default format that the prompt does not define.","","### Public UI and interaction checks","","- Check visible, usable behavior through accessible labels, public actions, resulting state, and actual requests/effects. Do not count inert text in a script/template block as a rendered control, and do not require a particular DOM/widget class, layout, query order, coordinate, or internal model key.","- Locate controls by stable public role/label or exercise them through user-visible navigation. Do not require a specific initial focus, Enter default, Tab order, Up/Down key, row order, button order, or that a successful action keeps a screen mounted unless the prompt or an established UI contract says so.","- For selection tests, identify the intended row/action by its visible identity rather than assuming the second row is selected after one particular key. Assert both directions when the prompt requires both, and verify the selected item\u2019s public identity, not merely the row index.","- For status/error tests, clear or snapshot prior status so stale text cannot satisfy a later assertion. Capture stdout, stderr, structured events, and user-facing notifications according to the repository contract rather than choosing one stream arbitrarily.","- For machine-readable output, parse events/fields structurally. Do not require a field to be top-level, an array rather than a mapping, a particular error key, a traceback key, a bytes-count interpretation, or a welcome payload flattening unless the prompt explicitly states that shape.","- For destructive dialogs, assert that the warning communicates the required consequence and that Confirm/Cancel effects are correct. Do not require exact explanatory prose, initial focus, or a particular widget type.","","### Serialization, formats, and structured data","","- Assert required semantic fields and relationships while allowing valid extra fields, metadata, headers, separators, and equivalent serialization. Do not compare an entire object to the reference\u2019s minimal form.","- Do not assume an omitted option has a particular default format, algorithm, encoding, extension, output destination, or parser. Pass the option explicitly when the test is about another behavior, or state the default in the prompt before testing it.","- Do not require a headerless file, zero physical lines, one exact newline form, lowercase digest hex, one field order, one RRULE prefix/case/order, or one Markdown/Taskpaper syntax when the contract permits equivalent representations. Parse the result and compare meaning.","- When a format contract does require a schema, test the schema itself: required top-level fields, field types, list element types, valid/invalid enum values, round-trip preservation, and malformed stored data. Do not accidentally accept a missing required field or test only data created by the same implementation.","- Test create, edit, load/show, list, validate, and externally corrupted storage separately when each is public. A create-time validator does not prove that `validate` reads stored corruption, and a parser that saves a file does not prove that a later process can reload it.","- Failed edits, overwrite attempts, cross-format replacement, serialization failures, and editor cancellation must preserve the last valid representation when the prompt promises non-destructive behavior. Verify by reopening/reloading, not only by checking the immediate error.",'- For round trips, include falsey but meaningful values (`0`, `False`, `""` when allowed), `None` where distinct, non-ASCII text, malformed nested types, duplicate rows, optional fields, and fields with metadata. Avoid truthiness shortcuts in both implementation and assertions.',"","### Validation, numeric, and schema boundaries","","- Test all required enforcement surfaces: direct assignment, construction/addition, modification, defaults, collection validation, CLI overrides, interactive prompts, serialization, reload, and each supported model type. Do not infer that one path covers another.","- Distinguish missing, explicit null, blank/whitespace, empty container, false, zero, NaN, infinity, and a textual representation of each. A truthiness check must not reject valid `False`/`0` or accept malformed falsey input.","- If the prompt requires finite numeric bounds or rejects numeric NaN, test both positive/negative infinity and NaN independently against minimum and maximum, including list members and configured bounds. Do not use ordinary comparison behavior as an unstated policy for non-finite values.","- Use base-type normalization consistently for enum choices, bounds, defaults, native values, JSON values, BLOB/text values, aliases, dates, durations, and nullable numeric types. Test fractional numeric strings, epoch dates, boolean-valued options, Unicode case behavior, and canonicalization only when the prompt defines those semantics.","- If invalid schemas must fail at construction, assert construction-time failure; if the prompt allows eager or lazy validation, accept either by triggering and observing the first required validation boundary. Do not accidentally test only one timing.","- Test nested schemas recursively: native and JSON roots, nested JSON strings, typed list/dict descriptors, declared fields, dynamic dictionaries, required nested containers, defaults, invalid enum/schema names, cycles versus shared DAGs, depth limits, clone independence, empty explicitly supplied schemas, and CLI override integration.","- Keep schema syntax and field grammar explicit. Do not invent bare mappings, sibling `type/schema` keys, reserved-field handling, enum aliases, extra top-level keys, or omitted-required defaults in a test unless the prompt states them.","","### Persistence, transactions, and state isolation","","- For every mutating operation, snapshot the important state before and after: database/model values, media/files, selected configuration, history, caches, output trees, and unaffected siblings. Unknown IDs, skipped entries, canceled actions, and invalid input must not mutate unrelated state.","- Test all-or-nothing behavior across phases, not only a failure in the first phase. Force a later write to fail after an earlier repair/import/override has changed state, then use a fresh reader to verify complete rollback.","- Test continuation where the contract says to skip one bad record and continue, including valid records before and after missing/invalid records. Do not accept a warning as proof that valid work was restored/imported.","- Test no-op semantics independently: duplicate additions should not create data or undo/history entries; identical content should not cause unnecessary writes unless the contract requires a write; empty values should not be confused with omitted values.","- Persist and reload through a fresh process/session/backend. A same-process object or a monkeypatched in-memory store can hide missing serialization, stale cache, remote-backend, or lifecycle behavior.","- Cache tests must vary the requested input/path and invocation order. Do not let a stale cached inventory, profile, schema, or preset make a second operation observe the first operation\u2019s data.","- Backend-neutral history/snapshot tests must include complete remote state and backend-specific settings, not merely a serialized local reference/locator. Verify retention, sidecars, digests, encoding metadata, rollback, and update-target paths without requiring a private snapshot format.","","### Paths, filesystems, archives, and security","","- Test both lexical and resolved containment. Reject absolute paths, dot-segment escapes, drive/UNC forms, alternate separators, NUL/control forms, and symlink traversal through an in-root link to an outside location. Preserve existing outside files and avoid publishing partial trees.","- Apply confinement consistently to list/read/create/update/delete, history tokens, profile/template names, playlist paths, archive members, extraction destinations, and selected archive views. A safe lexical path can still escape through a filesystem symlink.","- Do not require safe inputs to be transformed into one particular spelling. For safe symlinks, backslashes, dot segments, or encoded names, compare resolved containment and semantic output unless the prompt defines canonical normalization. Separately test malicious forms where rejection is required.","- For archive manifests, test manifest/archive bijection, type/path/size/mode/digest schemas, duplicate and normalized-collision paths, symlink target agreement, counters, ordering independence, malformed ZIPs, path hierarchy conflicts, and no-partial-extraction cleanup. Do not infer array-vs-map manifest shape or duplicate archive rejection unless specified.","- Test missing, malformed, unreadable, externally corrupted, and symlinked storage. A valid filename or index name must not be treated as corruption merely because it matches a test fixture\u2019s naming pattern.","- Preserve encoding and text semantics. State UTF-8 or another codec before testing invalid bytes; include successful Unicode round trips as well as invalid-byte failures. Do not treat a valid U+FFFD filename as undecodable merely because it contains the replacement character.","","### Time, recurrence, and platform-sensitive behavior","","- Freeze or inject the clock for completion, expiration, age, timestamp, retry, and schedule tests. Never compare against independently sampled wall-clock values across a possible midnight/second boundary.","- Test strict-after equality, due-before/due-after completion, month-end clamping, leap days, original calendar anchors across repeated cycles and reload, COUNT/UNTIL preservation and exhaustion, multiple comma-separated selectors, and all-day/aware/floating timezone behavior when the prompt promises them.","- Preserve the prompt\u2019s qualifier. A requirement about existing aware values does not automatically impose a changed wall time on floating values; a rule about actual completion time does not justify a pre-call timestamp; a rule about one format does not define another format\u2019s error policy.","- Compare recurrence schedules semantically or parse structured fields. Do not require an exact RRULE prefix, case, field order, minimal field set, natural-language alias spelling, formatter vocabulary, microsecond precision, or hidden anchor property unless explicitly specified.","- Test both model and editor surfaces, persistence/reload, save/discard/undo, unsupported valid rules, destructive confirmation content, dirty-state propagation, and visible calendar highlighting through the real active view. Do not mutate a detached model and call that proof of UI synchronization.","","### Restricted expressions and resource limits","","- A \u201Cread-only\u201D expression context must be genuinely non-mutable or mutation attempts must be rejected and reported according to the prompt. A deep copy alone is isolation, not immutability.","- Test all documented bindings (`target`, `inventory`, `value`, `values`, target name) with successful reads, including wildcard and recursive matches. Do not assume mapping/list shapes, builtin availability, evaluation cardinality, or per-member count unless specified.","- Test prohibited imports, file access, dangerous builtins, mutation through every binding, evaluation errors, recursion, infinite iterators, C-level loops, and later-rule isolation. A trace hook alone may not interrupt C-level work; use a process/resource boundary or reject dangerous constructs at load time if the prompt allows either.","- Any pathological-expression test must have an unconditional finite timeout and a deterministic failure path. It must not hang, OOM, or rely on an externally configured environment variable to become safe.","","### Test runner and reporting integrity","","- Never use `--maxfail=1` or another fail-fast mode when the task requires complete diagnostics. Every real test must execute and appear in JUnit/report output; do not synthesize \u201Cmissing test\u201D failures after a wrapper aborts.","- Bound every test-side growth loop, retry loop, subprocess, poll, and concurrency wait. If the required marker/result is not observed by the bound, fail that test with an explicit cause.","- Keep test diagnostics honest. Separate infrastructure/setup failure, timeout/OOM, and implementation assertion failure. Do not classify a killed process as every individual test failing, and do not let an unrelated warning or stale status satisfy the current operation.","- Avoid machine-dependent thresholds, platform-specific permissions, real network, mutable global state, and unseeded randomness unless the prompt explicitly requires them and the test controls the environment.","","### Gap-finder recurring fair-gap checklist","","When auditing a suite for missing behavioral coverage, deliberately consider these public branches when the prompt supports them:","","- noncanonical but meaningful values, falsey malformed values, Unicode/case variants, NaN/infinity, empty/zero values, nested and repeated inputs;","- every public entry point and lifecycle: constructor/add/modify, direct/JSON/native, interactive/non-interactive, CLI/TUI, create/edit/load/show/list/validate, fresh reload/process, and all supported backends/formats;","- defaults, aliases, requiredness, retry locality, blank versus interruption, cancellation/resume, duplicate no-ops, and invalid input side effects;","- all declared fields rather than a hard-coded subset, all selector values/grammar branches, all target/path scopes, all independent siblings, and all transitive dependencies;","- resolved data rather than raw files, cache misses and stale-cache changes, target identity versus display aliases, dotted/cross-platform names, and selected-target closure scope;","- public counts, per-target attribution, summary completeness, structured diagnostics, correct output channels, and actual visible controls/effects rather than labels alone;","- malformed stored data, failed later phases, atomic rollback, cross-format replacement, unknown IDs, missing records, remote/backend-specific state, sidecar integrity, and no partial artifacts;","- real parallel execution, dependency gating, fetch ordering, failure propagation, deterministic public order/graph output, and cleanup of threads/processes/temporary files;","- archive/playlist/template/profile path safety, symlink containment, separator variants, archive-manifest agreement, encoding, and successful Unicode paths;","- recurrence/calendar anchor, strict-time, selector-list, COUNT/UNTIL, all-day/aware/floating, save/discard/undo, and active-UI highlight branches.","","For each candidate, still apply the fairness screen: the edge must be required or clearly public, the fixture must be valid, the observation must be public, and the assertion must not smuggle in a count unit, parser spelling, UI protocol, private API, harness shape, or timing threshold."].join(`
|
|
100
|
+
`),Jxo=["# Gaps in solution","","This section describes defects in the implementation or solution behavior, even when the current tests pass. A solution gap must be grounded in an explicit prompt requirement, an established public contract, or a regression in observable repository behavior. Do not infer an `S` finding from a difference from `solution.patch`, a reference structure, a private helper, or a preferred architecture.","","## S<num> metrics for solution gaps","","`S` metrics classify implementation-side deficiencies. They are independent of `T` metrics: a weak test is a `T` finding, a wrong public behavior is an `S` finding, and one issue may legitimately have both. Use combined labels such as `S1/S2` when the defect affects both correctness and safety/integration.","","### S1 \u2014 behavioral correctness and compatibility","","The solution misses an explicit requirement, returns the wrong public value/state, loses data on a round trip, mishandles a required edge or entry point, violates a specified error/transition, or regresses established behavior. Examples include incomplete normalization, wrong recurrence/persistence semantics, missing root-level data, malformed input accepted, required invalid input ignored, or an existing non-interactive path broken.","","### S2 \u2014 safety, isolation, and integration correctness","","The solution leaves partial state after failure, violates transaction/rollback or dependency/concurrency boundaries, leaks state across invocations, mishandles backend/lifecycle integration, weakens path/security confinement, logs secrets, deadlocks, propagates data to the wrong scope, or otherwise makes a required operation unsafe or non-isolated. A defect can be S1 and S2 when it is both observably wrong and unsafe.","","### S3 \u2014 scope, maintainability, and repository quality","","The solution introduces unrelated changes, formatting churn, dead code, avoidable duplication, private coupling, unsupported API changes, architecture violations, or repository-quality regressions outside the requested behavior. Do not use S3 to penalize a merely different valid implementation; the issue must be concrete and externally or repository-observably harmful.","","## Solution implementation and test-authoring rules","","These rules describe what a high-quality solution and its tests must achieve. They are deliberately contract-first: a solution should be complete against the prompt and the repository's public behavior, not merely optimized to pass the currently visible examples.","","### 1. Implement the whole contract","","- Read the task sentence by sentence and map every explicit requirement, condition, prohibition, error case, state transition, side effect, and compatibility constraint to an implementation path and a meaningful test.","- Treat the prompt as the specification and tests as evidence. Passing the supplied tests is necessary but not sufficient when the prompt contains behavior they do not exercise.","- Before declaring completion, perform an adversarial pass: imagine a plausible shortcut that passes the obvious happy paths and check every boundary, empty/missing value, repeated operation, interacting feature, failure path, and state left behind.","- Fix every concrete, reproducible contract gap and regression. Do not dismiss an externally observable mismatch as a minor edge case merely because the main path works.","- Do not add behavior solely to satisfy a speculative reviewer preference, a reference implementation, or an ungrounded hypothetical. Improvements must remain within the stated contract and established repository behavior.","","### 2. Make new tests prove the solution","","- New feature tests should fail against the pre-solution implementation for the behavior they claim to cover and pass after the solution. A test that already passes before the feature is implemented is not evidence for that feature unless it is explicitly a regression test.","- Assert the actual semantic result, not merely that execution completed, output changed, a word appeared somewhere, or a serializer returned something. Use independent expected data and nontrivial conversions so a pass-through or hardcoded shortcut cannot pass.","- For mutations, verify both the intended new state and the important untouched state. Check no-op, unknown-ID, missing-record, invalid-input, cancellation, and failure paths for unintended writes or side effects.","- For collections and batch operations, verify counts and contents when the contract specifies them, continuation after a skippable bad item when required, and that valid neighboring work is not lost.","- Cover each public entry point that promises the behavior: direct and serialized input, interactive and non-interactive flows, create and edit, save and load, CLI and TUI, model and collection validation, and every supported backend or format.","- Add interaction tests for requirements that combine features. A feature tested in isolation can still be wrong when defaults, retries, empty values, state transitions, or another required feature are present simultaneously.","- Add negative tests for explicit guards and prohibitions: invalid configuration, forbidden writes, isolation boundaries, duplicate effects, invalid transitions, rollback boundaries, and dependent work after failure. Assert the required error/failure outcome and state preservation without pinning unspecified error wording.","- Do not manufacture a passing test by calling the same implementation or serializer to produce the expected value, by asserting only whole-output inequality, or by checking private call counts when the public effect is the contract.","- Keep tests fair under the rules above. A strong test suite catches materially wrong implementations without prescribing private names, mock shapes, pool APIs, source layout, or incidental formatting.","","### 3. Fit the existing architecture","","- Inspect real neighboring implementations before designing a new path. Reuse established public model, service, parser, transaction, configuration, logging, error, storage, and UI extension points where they fit.","- Prefer the repository's public APIs over private fields, private helpers, direct database connections, internal event dictionaries, hidden callbacks, or reference-only module structure. If a public extension hook exists, use it rather than process-wide monkeypatching.","- Keep responsibilities cohesive. Put parsing/normalization, domain behavior, persistence, command wiring, and presentation in the layers where the repository already keeps them. Do not put a large feature into one monolithic command, UI module, or unrelated existing file when the codebase uses focused modules.","- Use focused helpers with clear contracts, but avoid needless wrapper layers, ad hoc `getattr()` fallbacks, duplicated option definitions, and special branches that exist only to adapt an avoidable design.","- Centralize genuinely shared semantics\u2014schema validation, path handling, date coercion, error formatting, serialization, or merge rules\u2014so direct, interactive, load, and save paths cannot silently diverge. Expose a suitable public/shared helper rather than coupling unrelated classes to a private method.","- Remove unused helpers, imports, constants, temporary scaffolding, dead branches, and unrelated edits before completion. A feature patch should be reviewable and narrowly scoped.","","### 4. Preserve behavior and make failures safe","","- Run the complete relevant regression suite as well as the new feature tests. Existing behavior, defaults, public APIs, and compatibility paths must remain intact unless the prompt explicitly changes them.","- Use the repository's normal exception and logging patterns. Catch only expected failures, report them consistently to users, and do not use broad `except Exception` blocks that hide programming errors or turn distinct failures into misleading messages.","- Validate at the correct boundary and validate all relevant representations. Reject malformed configuration, wrong types, invalid schemas, falsey-but-invalid values, bad aliases, and invalid serialized content when the contract requires rejection; do not defer a required validation until an unrelated later operation.","- Ensure save-time and load-time validation are symmetric. Data accepted by one entry point must have the same semantics when serialized and read back, and corrupted stored data must follow the documented recoverable/error policy.","- For multi-step database or state mutations, use the existing transaction/rollback mechanism when the contract requires an atomic operation. A late failure must not leave an unexplained partial repair, rollback, import, migration, or batch update.","- For file replacement, validate before modifying the destination and use the repository's atomic temporary-file/replacement pattern where preservation matters. Failed creation, editing, replacement, or serialization must not destroy the last valid file.","- Enforce locks and concurrency boundaries consistently. Unknown identifiers, skipped records, rejected inputs, canceled operations, and failed prerequisites must not mutate unrelated state. Perform dependent side effects only after the prerequisite operation has succeeded.","- Preserve backend-neutral semantics. A snapshot must contain the complete state needed to restore every supported backend, including remote values when the prompt promises historical values\u2014not merely a local locator or configuration dump.","","### 5. Keep all paths semantically consistent","","- Interactive and non-interactive conversion must apply the same normalization, schema, requiredness, default, blank-value, and error rules unless the prompt explicitly distinguishes them.","- The same applies across JSON/native input, constructor/default application, collection validation, rendering, serialization/deserialization, CLI/TUI, and create/edit/load flows. Do not let one layer accept a value that a later layer rejects unexpectedly.","- Validate aliases independently before choosing a preferred alias. Do not let a valid `visibility` mask an invalid `class`, or let a truthiness check allow an invalid falsey value through.","- Normalize only what the contract requires. When it does require normalization, apply it consistently at every entry point and preserve repository invariants such as path separators, case-insensitive extensions, all-day exclusive end dates, timezone-aware values, newline state, encoding, and canonical enum forms.","- Keep defaults and retries stable across the initial prompt and retry prompt. An explicit blank, cancellation, default-on-Enter rule, and invalid answer must follow the same documented policy after a retry as before it.","- Preserve required information through round trips. Do not lose fields, metadata, ordering, duplicate policy, timezone components, remote content, or trailing-newline state merely because one implementation representation is convenient.","","### 6. Handle paths, formats, and boundaries defensively","","- Treat paths as untrusted input. Normalize both platform separator styles before interpreting them, reject traversal and absolute escapes, constrain resolution to the configured root, and apply the same safety rules to list, read, create, update, and delete operations.","- If a format or extension is specified as case-insensitive, perform case-insensitive resolution on case-sensitive filesystems as well as case-insensitive ones. Define deterministic behavior when equivalent sibling names coexist rather than depending on directory iteration order.","- Use the repository's existing parser and model invariants for dates, recurrence, calendars, events, and structured formats. Hand-rolled parsing should not silently accept values the established parser rejects or lose timezone/all-day/encoding information.","- Preserve meaningful text differences, including an end-of-file newline when the contract cares about it. Diff, merge, and serialization code must distinguish content equality from a representation that merely looks equal after lossy splitting or normalization.","- Treat empty, null, zero, missing, malformed, Unicode, unusually large, duplicate, and repeated values according to the prompt\u2014not according to a convenient truthiness check or an accidental default.","","### 7. State, concurrency, and resource discipline","","- Avoid mutable process-global state for feature state, cached arguments, active sessions, monkeypatches, or dependency injection. If a framework requires shared state, scope it explicitly, restore it after the operation, and provide a lifecycle/unhook path.","- Do not mutate live configuration or model objects temporarily without a reliable `try/finally` restoration. Prefer copies or explicit context objects, and ensure one invocation cannot leak into a later in-process invocation or test.","- Use one canonical identity and one canonical dependency graph for discovery, validation, closure expansion, visualization, and execution. Do not validate using inventory keys and execute using a different field such as `vars.target` unless the mapping is explicit and guaranteed.","- For dependency scheduling, resolve all transitive prerequisites, reject missing targets and cycles before work starts, preserve deterministic ordering where promised, run only ready work, block dependents after prerequisite failure, and use the same dependency constraints in serial and parallel modes.","- Do not turn an implementation-specific pool API, callback order, or thread event into the behavioral contract. At the same time, do not weaken the actual failure/isolation guarantees: no dependent may run early, no forbidden work may occur, and all required independent work must follow the prompt's stated failure policy.","- Retain existing deduplication, cache reuse, batching, and parallelism behavior unless the prompt changes it. Avoid creating a new temporary cache or serial worker for every target when shared grouping is part of the existing behavior or causes an avoidable performance regression.","- Bound untrusted or potentially expensive work without claiming that a shallow copy is immutable or that `eval` plus a trace hook is a secure sandbox. Use a genuinely read-only context, restrict accessible operations, and choose a resource-control mechanism that cannot corrupt global interpreter state when the security contract matters.","- Use iterative processing or bounded recursion for large imports, graphs, inventories, and batches. Clean up threads, temporary files, locks, and callbacks on success, failure, and cancellation.","","### 8. User-facing CLI and UI quality","","- Follow the project's existing command and UI architecture rather than adding unrelated inline styling, imperative flows, deeply nested closures, or global changes to shared input primitives when a focused extension is available.","- Match the exact interaction contract. If the prompt allows only `y`/`n`, exact words, or enumerated choices, reject aliases and blank/default responses unless the prompt explicitly permits them. Make cancellation and interruption behavior consistent at every branch, including the initial, empty-state, retry, and creation paths.","- Keep destructive, overwrite, merge, repair, and rollback operations explicit and recoverable. Do not silently choose a default that the contract requires the user to choose, and do not leave a partially modified UI or persisted state after cancellation or failed confirmation.","- Keep user-facing errors consistent in channel, status, response shape, and actionable content. Use the established error type/logger/HTTP response pattern rather than mixing generic abort pages, raw exceptions, and custom payloads without a contract reason.","- Avoid unrequested UI shortcuts, automatic matching, hidden text, extra commands, or unrelated feature changes. They increase maintenance surface and can create behavior that conflicts with existing workflows.","- Treat warnings from the project's UI/toolkit tests as real quality issues when they indicate invalid sizing, layout, focus, or resource usage. Do not declare a polished UI while the implementation emits avoidable runtime warnings.","","### 9. Security, privacy, and compatibility gate","","- Do not log raw secrets, CLI override values, variable-file values, preset contents, passwords, tokens, or other sensitive values at any log level. Tests should use distinctive sentinels and inspect logs/display diagnostics without requiring exact safe wording.","- Preserve existing public behavior outside the feature: fixed-field deletion, non-interactive overwrite, legacy/simple recurrence compatibility, optional feature-disabled paths, selected backend behavior, and normal error/transaction semantics.","- Do not introduce unrelated formatting churn, refactors, comments removals, metadata edits, helper rewrites, or changes to vdir/transaction/storage behavior merely because a feature touches a neighboring file. Keep the diff narrow and repository-formatted.","- Do not claim a top-quality score while known regressions remain in an untested alternate backend, fresh process, cross-format path, supported alias, all-day/floating case, parallel path, or public UI surface. Fix concrete caveats rather than explaining them away as edge cases.","","### 10. Full-quality completion gate","","A solution is ready for a highest-quality review only when all of the following are true:","","- every prompt requirement has a deliberate implementation path;","- every important public path has an independent behavioral test;","- new tests fail for the intended reason before the solution and pass afterward;","- baseline and regression tests remain green;","- no known public behavior differs across equivalent entry points without an explicit reason;","- invalid input and failure paths are safe, consistent, and non-destructive;","- persistence and multi-step mutations preserve valid prior state or roll back as required;","- concurrency and lifecycle state cannot leak across operations;","- the implementation uses repository conventions and public extension points;","- there is no dead code, unrelated change, avoidable duplication, or hidden implementation coupling; and","- remaining review notes are either fixed or explicitly shown to be outside the contract rather than silently ignored."].join(`
|
|
101
|
+
`);function jee(){return Zxo.trim()}function zee(){return Yxo.trim()}function Kee(){return Xxo.trim()}function fEn(){return Jxo.trim()}var Wee=!1,wC;function Qee(){return Wee}function gEn(){return Wee=!0,wC=new AbortController,wC}function REn(){Wee=!1,wC=void 0}function SEn(){return!Wee||!wC||wC.signal.aborted?!1:(wC.abort(),!0)}import{existsSync as ePo}from"node:fs";import{join as tPo}from"node:path";import{keyHint as nPo}from"@earendil-works/pi-coding-agent";import{Text as sPo,wrapTextWithAnsi as rPo}from"@earendil-works/pi-tui";var wAe="gap-finder",kAe="solution-precheck",yEn=6,oPo=Ct.Object({});function aPo(e){return e==="gaps"?wAe:kAe}function iPo(e){return e==="gaps"?"Gap Finder":"Solution Precheck"}function cPo(e,t){return e==="gaps"?`${t} gap${t===1?"":"s"}`:`${t} finding${t===1?"":"s"}`}function _En(e){IEn(e,"gaps"),IEn(e,"solution")}function IEn(e,t){let s=aPo(t),a=iPo(t);e.registerTool({name:s,label:a,description:t==="gaps"?"Use only when explicitly asked to find behavioral test-coverage gaps. Run one exhaustive read-only agent that reviews the prompt sentence by sentence, performs its own fairness and evidence check, and returns confirmed gaps. It never writes or modifies files.":"Use only when explicitly asked for a solution precheck or solution audit. Run one exhaustive read-only agent that checks the implementation for contract gaps, regressions, failure safety, architecture, dead code, and unrelated changes. It never writes or modifies files.",promptSnippet:t==="gaps"?"Find behavioral test gaps":"Precheck solution quality",promptGuidelines:t==="gaps"?["Call gap-finder only when the user explicitly asks for behavioral test-gap analysis; never call it proactively or for unrelated work.","gap-finder has no parameters and runs one read-only agent that performs its own discovery and fairness validation.","Run one gap-finder invocation at a time and wait for it to finish; never issue multiple invocations in parallel.","Read details.testGaps for the confirmed behavioral gaps; the caller applies any changes."]:["Call solution-precheck only when the user explicitly asks for a solution precheck or solution audit; never call it proactively or for unrelated work.","solution-precheck has no parameters and runs one read-only solution-quality auditor.","Run one solution-precheck invocation at a time and wait for it to finish; never issue multiple invocations in parallel.","Read details.solutionAuditFindings for the confirmed solution-quality findings; the caller applies any changes."],parameters:oPo,renderCall(c,l,u){let p=u.state;u.executionStarted&&p.startedAt===void 0&&(p.startedAt=Date.now(),p.endedAt=void 0);let d=u.lastComponent??new sPo("",0,0);return d.setText(""),d},renderResult(c,l,u,p){let d=p.state;d.startedAt??=Date.now(),d.startedAt!==void 0&&l.isPartial&&!d.interval&&(d.interval=setInterval(()=>p.invalidate(),1e3)),(!l.isPartial||p.isError)&&(d.endedAt??=Date.now(),d.interval&&(clearInterval(d.interval),d.interval=void 0));let m=l.isPartial?"Elapsed":"Took",S=d.endedAt??Date.now(),v=d.startedAt!==void 0?Xy(S-d.startedAt):"\u2014",T=c.details,x=t==="gaps"?T?.testGaps:T?.solutionAuditFindings,w=[`${m} ${v}`];Array.isArray(x)&&w.push(cPo(t,x.length));let L=u.fg("toolTitle",u.bold(a))+u.fg("muted",` ${w.join(" \xB7 ")}`),O=(c.content??[]).map(ce=>ce.type==="text"?ce.text:"").join(`
|
|
102
|
+
`).trim(),U=O?lPo(O.split(`
|
|
103
|
+
`)):["(no output)"];if(!l.expanded){let ce=Math.max(0,U.length-yEn);U=U.slice(0,yEn),ce>0&&U.push(`... (${ce} more lines, ${nPo("app.tools.expand","to expand")})`)}let J=p.lastComponent instanceof Zee?p.lastComponent:new Zee;return J.setContent(L,U,u),J},async execute(c,l,u,p,d){if(!EL(d.cwd))throw new Error(`${s} is disabled for this project. Enable the analysis tools with /analyze:on.`);let m=tPo(d.cwd,"agent_prompt.md");if(!ePo(m))throw new Error("Missing required file in project root: agent_prompt.md");let S=aDe(),v=S??Xo(),T=v?d.modelRegistry.find(v.provider,v.modelId):d.model;if(!T||v&&!d.modelRegistry.hasConfiguredAuth(T))throw new Error(`No model configured/authenticated for ${s}. Set one via /checks --config.`);let x=S?.thinkingLevel??v?.thinkingLevel??"off",w=S?.timeoutMinutes??rI,L=new AbortController;u&&(u.aborted?L.abort():u.addEventListener("abort",()=>L.abort(),{once:!0}));let G=await uDe(e,d.cwd,L.signal);if(L.signal.aborted)throw new Error("Cancelled by user.");let O=t==="solution"?await pDe(e,d.cwd,G,L.signal):"";if(L.signal.aborted)throw new Error("Cancelled by user.");let U={tempDir:d.cwd,model:T,thinkingLevel:x,codeFiles:G,timeoutMinutes:w,cancelSignal:L.signal};if(t==="solution"){p?.({content:[{type:"text",text:"Prechecking solution quality..."}],details:{}});let ke=await jke({...U,solutionRules:fEn(),changedCodeDiff:O});if(L.signal.aborted)throw new Error("Cancelled by user.");if(ke.status!=="ok")throw new Error(`Solution precheck did not complete (status: ${ke.status}).`);let Ee=ke.findings;return{content:[{type:"text",text:dPo(Ee)}],details:{solutionAuditFindings:Ee}}}p?.({content:[{type:"text",text:"Finding behavioral test gaps..."}],details:{}});let J=await Uke({...U,testRubric:jee(),gapRules:Kee(),fairnessRules:zee()});if(L.signal.aborted)throw new Error("Cancelled by user.");if(J.status!=="ok")throw new Error(`Gap finder did not complete (status: ${J.status}).`);let ce=J.gaps;return{content:[{type:"text",text:pPo(ce)}],details:{testGaps:ce}}}})}function lPo(e){let t=[],s=!1;for(let a of e)/^\s*\d+\.\s+/.test(a)?(s=!1,t.push(a)):/^\s*Justification:/i.test(a)?s=!0:s||t.push(a);return t}var Zee=class{header="";styledLines=[];theme;cachedWidth=-1;cachedLines=[];setContent(t,s,a){this.header=t,this.styledLines=s.map(c=>uPo(c,a)),this.theme=a,this.cachedWidth=-1}invalidate(){this.cachedWidth=-1}render(t){if(this.cachedWidth!==t){let s=this.theme,a=[];this.header&&a.push(this.header,"");for(let c of this.styledLines)s&&a.push(...rPo(c,t));this.cachedLines=a,this.cachedWidth=t}return this.cachedLines}};function uPo(e,t){let s=e.match(/^(\d+)\.\s+(.*)$/);return s?`${t.fg("accent",`${s[1]}.`)} ${t.fg("muted",s[2]??"")}`:t.fg("toolOutput",e)}function pPo(e){return e.length===0?"Gap finder complete: no confirmed behavioral test gaps were found.":["Below are behavioral test gaps found by the gap-finder agent. Validate each against the prompt and repository before implementing a test.","",...e.map((s,a)=>`${a+1}. ${s.description}
|
|
103
104
|
Justification: ${s.justification}`)].join(`
|
|
104
|
-
`)}function
|
|
105
|
+
`)}function dPo(e){return e.length===0?"Solution precheck complete: no actionable solution-quality findings were found.":["Below are suggestions from the solution-precheck agent, not instructions. Decide whether each finding is valid under the prompt and repository, and implement only the repairs you judge appropriate.","",...e.map((s,a)=>`${a+1}. [${s.category}] ${s.subject}: ${s.problem}
|
|
105
106
|
Evidence: ${s.evidence}
|
|
106
107
|
Required behavior: ${s.requiredBehavior}
|
|
107
108
|
Recommendation: ${s.recommendation}`)].join(`
|
|
108
|
-
`)}import{spawn as
|
|
109
|
-
${T}`:""}`)}$i(s);let[m,S,v]=await Promise.all([LAe(c,"utf8"),LAe(l,"utf8"),LAe(u,"utf8")]);return{taskPrompt:m,testPatch:S,solutionPatch:v}}async function
|
|
109
|
+
`)}import{spawn as mPo}from"node:child_process";import{randomUUID as fPo}from"node:crypto";import{existsSync as VAe,mkdirSync as gPo}from"node:fs";import{mkdtemp as hEn,readFile as LAe,rm as MAe,writeFile as vEn}from"node:fs/promises";import{createServer as RPo}from"node:net";import{homedir as SPo,tmpdir as CEn}from"node:os";import{dirname as yPo,join as ol}from"node:path";import{Text as mL}from"@earendil-works/pi-tui";import{chromium as wEn}from"playwright-core";var Yee="quality-check",GAe="shipd:link",OAe="shipd_job_link",TEn=ol(SPo(),".pi","agent","shipd-auth","shipd.ai.json"),IPo=15,AEn="https://shipd.ai/",_Po=12e4,hPo=3e5,vPo=9e4,Jy=5e3,NAe=["Test Quality","Solution Quality"],CPo=Ct.Object({});function fL(e){return(e??"").trim().replace(/\s+/g," ")}function TPo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function km(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function gL(e,t){return new Promise((s,a)=>{if(t?.aborted){a(new Error("Cancelled by user."));return}let c=()=>{clearTimeout(l),t?.removeEventListener("abort",c),a(new Error("Cancelled by user."))},l=setTimeout(()=>{t?.removeEventListener("abort",c),s()},e);t?.addEventListener("abort",c,{once:!0})})}function $i(e){if(e?.aborted)throw new Error("Cancelled by user.")}function DEn(){return[process.env.SHIPD_CHROME_PATH,process.env.PROGRAMFILES&&ol(process.env.PROGRAMFILES,"Google","Chrome","Application","chrome.exe"),process.env["PROGRAMFILES(X86)"]&&ol(process.env["PROGRAMFILES(X86)"],"Google","Chrome","Application","chrome.exe"),process.env.LOCALAPPDATA&&ol(process.env.LOCALAPPDATA,"Google","Chrome","Application","chrome.exe"),"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","/usr/bin/google-chrome","/usr/bin/chromium","/usr/bin/chromium-browser"].filter(t=>!!t).find(t=>VAe(t))}function APo(){let e=RPo();return new Promise((t,s)=>{e.once("error",s),e.listen(0,"127.0.0.1",()=>{let a=e.address();if(!a||typeof a=="string"){e.close(),s(new Error("Could not allocate a local Chrome debugging port."));return}e.close(c=>c?s(c):t(a.port))})})}async function DPo(e,t,s=15e3){let a=Date.now()+s;for(;Date.now()<a;){if(t.exitCode!==null)throw new Error("Chrome exited before its debugging connection became available.");try{if((await fetch(`http://127.0.0.1:${e}/json/version`)).ok)return}catch{}await gL(250)}throw new Error("Timed out waiting for Chrome to start.")}async function bPo(e,t=3e4){let s=Date.now()+t;for(;Date.now()<s;){let a=e.pages();for(let c of a){if(!kC(c.url()))continue;if(await c.locator('button[aria-label="Open user menu"]').isVisible({timeout:1e3}).catch(()=>!1))return c}for(let c of a)kC(c.url())&&await c.reload({waitUntil:"domcontentloaded",timeout:15e3}).catch(()=>{});await gL(1e3)}}function kC(e){try{let t=new URL(e),s=t.hostname.toLowerCase();return t.protocol==="https:"&&(s==="shipd.ai"||s.endsWith(".shipd.ai"))}catch{return!1}}function EPo(e){let t;for(let s of e){if(!km(s)||s.type!=="custom"||s.customType!==OAe)continue;let a=s.data;km(a)&&(typeof a.url=="string"&&kC(a.url)?t=a.url:a.url===null&&(t=void 0))}return t}function kEn(e,t){return e.locator("span").filter({hasText:new RegExp(`^${TPo(t)}$`)}).first()}function Xee(e,t){return kEn(e,t).locator("..")}function xPo(e,t){return e.locator("div.fixed").filter({hasText:t}).last()}function LEn(e){return/(?:starting|queued|pending|running|processing|reviewing|finalizing|building|evaluating|checking|\d+%)/i.test(e)}function PPo(e){return/\bstale\b/i.test(e)}function $Po(e,t){let s=e.trim().replace(/^```(?:json)?\s*/i,"").replace(/\s*```$/i,"").trim(),a;try{a=JSON.parse(s)}catch(c){throw new Error(`${t} raw output was not valid JSON: ${c instanceof Error?c.message:String(c)}`)}if(!km(a))throw new Error(`${t} raw output was not a JSON object.`);return a}async function wPo(e,t,s){let a=ol(t,"create_patches.sh"),c=ol(t,"agent_prompt.md"),l=ol(t,"test.patch"),u=ol(t,"solution.patch"),p=[["create_patches.sh",a],["agent_prompt.md",c],["test.patch",l],["solution.patch",u]].filter(([,T])=>!VAe(T)).map(([T])=>T);if(p.length)throw new Error(`Missing required file(s) in the working directory: ${p.join(", ")}`);$i(s);let d=await e.exec(OC(),["create_patches.sh"],{cwd:t,timeout:_Po,signal:s});if(d.killed||d.code!==0){let T=(d.stderr||d.stdout||"").trim().slice(-2e3);throw new Error(`create_patches.sh failed${d.killed?" or timed out":` (exit ${d.code})`}.${T?`
|
|
110
|
+
${T}`:""}`)}$i(s);let[m,S,v]=await Promise.all([LAe(c,"utf8"),LAe(l,"utf8"),LAe(u,"utf8")]);return{taskPrompt:m,testPatch:S,solutionPatch:v}}async function kPo(e,t,s){$i(s);let a=await e.goto(t,{waitUntil:"domcontentloaded",timeout:6e4});if($i(s),!kC(e.url()))throw new Error("Shipd authentication or job-link navigation failed. Check the saved job link and auth state.");if(a&&a.status()>=400)throw new Error(`Shipd job-link navigation returned HTTP ${a.status()}.`);await e.waitForTimeout(4e3),$i(s)}async function bEn(e,t,s,a){$i(a);let c=await wEn.launch({executablePath:e,headless:!0});try{let l=await c.newContext({storageState:t});await l.route("**/*",async p=>{let d=p.request().resourceType();d==="image"||d==="font"||d==="media"?await p.abort():await p.continue()});let u=await l.newPage();return await kPo(u,s,a),{browser:c,page:u}}catch(l){throw await c.close().catch(()=>{}),l}}async function EEn(e,t,s){await t.click({timeout:Jy}),await e.keyboard.press(`${process.platform==="darwin"?"Meta":"Control"}+A`),await e.keyboard.insertText(s)}async function LPo(e,t,s){$i(s);let a=e.locator("#problem-description"),c=e.locator('#problem-test-patch [contenteditable="true"][role="textbox"]'),l=e.locator('#problem-solution-patch [contenteditable="true"][role="textbox"]');for(let u of[a,c,l])if(await u.count()!==1)throw new Error("Shipd challenge form selectors were not found exactly once.");await a.fill(t.taskPrompt),await EEn(e,c,t.testPatch),await EEn(e,l,t.solutionPatch),await Xee(e,"Test Quality").hover(),await gL(1e3,s)}async function MPo(e,t,s){$i(s);let a=Xee(e,t),c=fL(await a.innerText());if(LEn(c))return{quality:t,status:"already-running",rowTextAfterConfirm:c};let l=a.locator('button[title^="Re-run"]').or(a.locator('button[title^="Run"]')),u=await l.count();if(u!==1)throw new Error(`${t}: expected one Run button, found ${u}`);if(!await l.isEnabled())throw new Error(`${t}: Run button is disabled.`);let p=await l.getAttribute("title");await l.click();let d=e.getByRole("dialog").last();await d.waitFor({state:"visible",timeout:Jy});let m=fL(await d.innerText()),S=d.getByRole("button",{name:/confirm/i});if(await S.count()!==1)throw new Error(`${t}: rerun confirmation button was not found.`);return await S.click(),await gL(500,s),{quality:t,status:"started",rerunTitle:p,confirmation:m}}async function xEn(e,t,s=NAe){let a=[];for(let c of s){$i(t);let l=kEn(e,c);if(await l.count()!==1)throw new Error(`${c}: quality status row was not found.`);await l.waitFor({state:"visible",timeout:Jy});let u=l.locator(".."),p=fL(await u.innerText()),d=await u.locator('button[title^="Run"]').count()>0;a.push({quality:c,rowText:p,busy:LEn(p),shouldRun:d||PPo(p)})}return a}async function GPo(e,t){return await Xee(e,t).locator('button[title^="Re-run"]').count()>0}async function OPo(e,t){await Xee(e,t).hover();let s=xPo(e,t);await s.waitFor({state:"visible",timeout:Jy});let a=s.locator('button[title="Expand to full view"]'),c=await a.count();if(c!==1)throw new Error(`${t}: expected one quality expander, found ${c}`);return a.first()}async function NPo(e,t,s){$i(s),await(await OPo(e,t)).click();let c=e.getByRole("dialog").last();await c.waitFor({state:"visible",timeout:Jy});let l=fL(await c.locator("h2").first().innerText().catch(()=>""));if(l!==t)throw new Error(`${t}: expanded the wrong report dialog (${l||"unknown"}).`);let u=c.locator("pre code").last();if(!await u.isVisible().catch(()=>!1)){let m=c.locator("button").filter({hasText:/raw output/i}).first();try{await m.waitFor({state:"visible",timeout:Jy})}catch{let S=fL(await c.innerText());throw new Error(`${t}: raw output control did not appear; dialog text: ${S.slice(0,1e3)}`)}await m.click()}await u.waitFor({state:"visible",timeout:Jy});let p=await u.innerText(),d=$Po(p,t);return await e.keyboard.press("Escape").catch(()=>{}),{quality:t,parsed:d}}function VPo(e,t){let s=Array.isArray(e?.coverageSuggestions)?e.coverageSuggestions:[],a=Array.isArray(e?.tests)?e.tests.filter(c=>km(c)&&c.fairness==="Not fair"):[];return{testQuality:{verdict:e?.verdict??null,completed:e?.completed??!1,skipped:!e,coverageSuggestions:s,tests:a},solutionQuality:{verdict:t?.verdict??null,completed:t?.completed??!1,skipped:!t,evaluation:t?.evaluation??null}}}function PEn(e,t){if(!km(e)||!km(e[t]))return"\u2014";let s=e[t].score,a=e[t].max_score;return typeof s=="number"&&typeof a=="number"?`${s}/${a}`:"\u2014"}function qPo(e,t){let s=km(e)?e:{},a=km(s.testQuality)?s.testQuality:{},c=km(s.solutionQuality)?s.solutionQuality:{},l=Array.isArray(a.tests)?a.tests.length:0,u=Array.isArray(a.coverageSuggestions)?a.coverageSuggestions.length:0,p=c.evaluation,d=a.skipped===!0?"skipped":`${l} unfair \xB7 ${u} suggestions`,m=c.skipped===!0?"skipped":`quality ${PEn(p,"code_quality")} \xB7 comprehensiveness ${PEn(p,"solution_comprehensiveness")}`;return[` ${t.fg("accent","Test Quality")} ${t.fg("muted",d)}`,` ${t.fg("accent","Solution Quality")} ${t.fg("muted",m)}`]}function $En(e,t){let a=e.find(c=>new RegExp(`^${t}:`,"i").test(c))?.match(/:\s*(\d+)/)?.[1];return a===void 0?void 0:Number.parseInt(a,10)}function FPo(e,t,s,a,c){return e==="new tests before solution"?t!==void 0&&t>0?"Some new tests pass before the solution; add assertions for behavior introduced by the solution.":t===0&&/:\s*none$/i.test(a)&&/:\s*none$/i.test(c)?"The test file did not produce individual failures or errors; use lazy imports so every test executes separately.":"Every new test must fail or error individually before the solution.":e==="new tests after solution"?s!==void 0&&s>0?"New tests were skipped after the solution; every new test must execute and pass.":"The solution does not make every new test pass.":e==="base tests after solution"?"Base-test regression: existing base tests fail after the solution.":e==="base tests before solution"?"Base tests fail before the solution; review the test patch and test setup.":"The patch precheck did not meet the required test outcomes."}function BPo(e){let t=(e.content??[]).map(c=>c.type==="text"?c.text??"":"").join(" "),s=t.split(/\r?\n/).map(c=>c.trim().replace(/\s+/g," ")).filter(Boolean),a=s.find(c=>/^phase:/i.test(c));if(/patch precheck/i.test(t)){if(a){let c=a.replace(/^phase:\s*/i,""),l=$En(s,"passed tests"),u=$En(s,"skipped tests"),p=s.find(m=>/^failed tests:/i.test(m))??"",d=s.find(m=>/^errored tests:/i.test(m))??"";return["Patch precheck failed.",`Phase: ${c}`,`Problem: ${FPo(c,l,u,p,d)}`].join(`
|
|
110
111
|
`)}return`Patch precheck failed.
|
|
111
112
|
Problem: The precheck task could not be completed.`}return s.map(c=>c.replace(/\bFargate\b\s*/gi,"").trim()).slice(0,4).join(`
|
|
112
|
-
`)||"Quality checks failed"}function
|
|
113
|
+
`)||"Quality checks failed"}function UPo(e){let t=`Fargate patch precheck failed:
|
|
113
114
|
platform: ${e.platform}`;if(e.error)return`${t}
|
|
114
115
|
${e.error}`;let s=e.phases.find(a=>!a.passed);return`${t}${s?`
|
|
115
|
-
phase: ${s.phase}`:""}.`}function MEn(e){let t;e.on("session_start",(s,a)=>{t=
|
|
116
|
+
phase: ${s.phase}`:""}.`}function MEn(e){let t;e.on("session_start",(s,a)=>{t=EPo(a.sessionManager.getBranch())}),e.registerCommand("shipd:auth",{description:"Open Shipd in a browser so you can sign in and save authentication.",handler:async(s,a)=>{if(a.mode!=="tui"){a.ui.notify("/shipd:auth requires interactive mode.","error");return}let c=DEn();if(!c){a.ui.notify("Could not find Chrome/Chromium. Set SHIPD_CHROME_PATH and retry.","error");return}let l=process.env.SHIPD_STORAGE_STATE??TEn,u,p,d;try{gPo(yPo(l),{recursive:!0}),d=await hEn(ol(CEn(),"shipd-auth-"));let m=await APo();p=mPo(c,[`--remote-debugging-port=${m}`,`--user-data-dir=${d}`,"--no-first-run","--no-default-browser-check",AEn],{stdio:"ignore",windowsHide:!1}),await DPo(m,p),u=await wEn.connectOverCDP(`http://127.0.0.1:${m}`);let S=u.contexts()[0]??await u.newContext(),v=S.pages()[0]??await S.newPage();if(await v.waitForLoadState("domcontentloaded",{timeout:6e4}).catch(()=>{}),kC(v.url())||await v.goto(AEn,{waitUntil:"domcontentloaded",timeout:6e4}),a.ui.notify("A Shipd browser window is open. Sign in there, then return here.","info"),!await a.ui.confirm("Shipd sign-in","After you finish signing in in the browser, press OK to save the session.")){a.ui.notify("Shipd sign-in cancelled; nothing was saved.","info");return}await S.storageState({path:l}),await bPo(S)?(await S.storageState({path:l}),a.ui.notify(`Shipd authentication saved to ${l}. quality-check is ready to use.`,"info")):a.ui.notify(`Shipd state was saved to ${l}, but the signed-in page could not be verified. Try quality-check; if it reports an authentication error, run /shipd:auth again and wait for Shipd to return before confirming.`,"warning")}catch(m){a.ui.notify(`Shipd authentication failed: ${m instanceof Error?m.message:String(m)}`,"error")}finally{await u?.close().catch(()=>{}),p&&p.exitCode===null&&p.kill(),d&&await MAe(d,{recursive:!0,force:!0}).catch(()=>{})}}}),e.registerCommand(GAe,{description:"Save the Shipd job link for this chat session.",handler:async(s,a)=>{let c=s.trim();if(c.toLowerCase()==="clear"){t=void 0,e.appendEntry(OAe,{url:null}),a.ui.notify("Shipd job link cleared for this chat session.","info");return}if(!kC(c)){a.ui.notify(`Usage: /${GAe} <https://shipd.ai/...>`,"warning");return}t=c,e.appendEntry(OAe,{url:c}),a.ui.notify("Shipd job link saved for this chat session.","info")}}),e.registerTool({name:Yee,label:"Quality Checks",description:'Run create_patches.sh in the current working directory, read agent_prompt.md, test.patch, and solution.patch, run the Fargate patch precheck, then fill the Shipd challenge draft fields, run fresh checks with a Run button, rerun checks marked Stale, and skip current checks. Start Test Quality then Solution Quality in one browser tab. Wait for any started jobs and return agent-focused JSON. details.testQuality contains coverageSuggestions and only tests whose fairness is exactly "Not fair"; details.solutionQuality contains the complete evaluation block. This consumes Shipd tokens and does not click the final challenge-submit button.',promptSnippet:"Submit the working-directory patches to Shipd",promptGuidelines:["Use quality-check when the user explicitly asks to submit or evaluate the current Shipd task.","quality-check has no parameters.","quality-check first runs the Fargate patch precheck; only after all four test phases meet their expectations does it upload the draft to Shipd. It runs fresh checks with a Run button, reruns checks marked Stale after the draft update, skips current checks, then waits using scheduled browser reopen checks.","Read details.testQuality.coverageSuggestions and details.testQuality.tests for test-quality feedback.","Read details.solutionQuality.evaluation for the complete solution-quality feedback."],parameters:CPo,renderCall(s,a,c){let l=c.state;c.executionStarted&&l.startedAt===void 0&&(l.startedAt=Date.now());let u=c.lastComponent instanceof mL?c.lastComponent:new mL("",0,0);return u.setText(""),u},renderResult(s,a,c,l){let u=l.state;u.startedAt??=Date.now(),u.startedAt!==void 0&&a.isPartial&&!u.interval&&(u.interval=setInterval(()=>l.invalidate(),1e3)),(!a.isPartial||l.isError)&&(u.endedAt??=Date.now(),u.interval&&(clearInterval(u.interval),u.interval=void 0));let p=u.endedAt??Date.now(),d=Xy(p-u.startedAt),m=a.isPartial?`Elapsed ${d}`:`Took ${d}`,S=c.fg("toolTitle",c.bold("Quality Checks"))+c.fg("muted",` ${m}`);return a.isPartial?new mL(`${S}
|
|
116
117
|
${c.fg("muted","Running quality checks...")}`,0,0):l.isError?new mL(`${S}
|
|
117
|
-
${c.fg("error",
|
|
118
|
-
`),0,0)},async execute(s,a,c,l,u){if(!t)throw new Error(`No Shipd job link is set for this chat session. Provide the job link with /${GAe} <job-link>.`);let p=t,d=process.env.SHIPD_STORAGE_STATE??TEn;if(!VAe(d))throw new Error(`Shipd authentication state not found at ${d}. Run /shipd:auth first.`);let m=DEn();if(!m)throw new Error("Could not find Chrome/Chromium. Set SHIPD_CHROME_PATH and retry.");let S,v,T,x=()=>{S?.close().catch(()=>{})};c?.addEventListener("abort",x,{once:!0});try{$i(c),l?.({content:[{type:"text",text:"Running create_patches.sh..."}],details:void 0});let w=await $Po(e,u.cwd,c);$i(c),l?.({content:[{type:"text",text:"Running patch prechecks before opening Shipd..."}],details:void 0}),T=await hEn(ol(CEn(),"shipd-patch-precheck-"));let L=await qC(e,u.cwd,T,c);if(L.status==="error")throw new Error(`Fargate patch precheck snapshot failed on linux: ${L.error}`);await Promise.all([vEn(ol(T,"test.patch"),w.testPatch,"utf8"),vEn(ol(T,"solution.patch"),w.solutionPatch,"utf8")]);let G=await lEn({pi:e,repoDir:u.cwd,snapshotDir:T,config:{provider:"patch-precheck",modelId:"patch-precheck",thinkingLevel:"off",fargate:dte()},cancelSignal:c??new AbortController().signal,runId:`quality-precheck-${mPo()}`,precheckTimeoutMinutes:yPo,onPhase:Se=>l?.({content:[{type:"text",text:`Patch precheck: ${Se}...`}],details:void 0})});if(!G.passed)throw new Error(BPo(G));await MAe(T,{recursive:!0,force:!0}),T=void 0,l?.({content:[{type:"text",text:"Patch prechecks passed; opening Shipd and filling draft fields..."}],details:void 0}),$i(c);let O=await bEn(m,d,p,c);S=O.browser,v=O.page,await kPo(v,w,c),l?.({content:[{type:"text",text:"Checking which quality checks are stale..."}],details:void 0});let U=await xEn(v,c),J=U.filter(Se=>Se.busy||Se.shouldRun).map(Se=>Se.quality),ce=[];for(let Se of NAe){let He=U.find(oe=>oe.quality===Se);if(!He)throw new Error(`${Se}: quality status was not available after updating the draft.`);He.shouldRun?ce.push(await LPo(v,Se,c)):He.busy&&ce.push({quality:Se,status:"already-running",rowTextAfterConfirm:He.rowText})}let ke=U.map(({quality:Se,rowText:He})=>({quality:Se,rowText:He}));if(J.length>0){l?.({content:[{type:"text",text:`Quality checks queued (${J.join(", ")}); closing the browser until the first check in 5 minutes...`}],details:void 0}),await S.close(),S=void 0,v=void 0;let Se=Date.now()+_Po;for(;;){let He=Se-Date.now();He>0&&(l?.({content:[{type:"text",text:`Browser closed; next quality check in ${Xy(He)}...`}],details:void 0}),await gL(He,c)),$i(c),l?.({content:[{type:"text",text:"Reopening Shipd to check quality job status..."}],details:void 0});let oe=await bEn(m,d,p,c);S=oe.browser,v=oe.page;let M=await xEn(v,c,J);if(M.every(Xn=>!Xn.busy)){ke=[...U.filter(Xn=>!J.includes(Xn.quality)).map(({quality:Xn,rowText:Lm})=>({quality:Xn,rowText:Lm})),...M.map(({quality:Xn,rowText:Lm})=>({quality:Xn,rowText:Lm}))];break}let se=M.map(Xn=>`${Xn.quality}: ${Xn.rowText}`).join("; ");l?.({content:[{type:"text",text:`Quality jobs still running (${se}); closing browser until the next check...`}],details:void 0}),await S.close(),S=void 0,v=void 0,Se=Date.now()+hPo}}else l?.({content:[{type:"text",text:"No quality checks need to run; using the current reports."}],details:void 0});if(!v)throw new Error("Shipd quality status page was closed before report extraction.");l?.({content:[{type:"text",text:"Extracting quality reports..."}],details:void 0});let Ee=[],_e=[];for(let Se of NAe){if(!await MPo(v,Se)){_e.push(Se);continue}Ee.push(await OPo(v,Se,c))}let Ce=Ee.find(Se=>Se.quality==="Test Quality")?.parsed,Ne=Ee.find(Se=>Se.quality==="Solution Quality")?.parsed,Ve=NPo(Ce,Ne);return{content:[{type:"text",text:JSON.stringify(Ve,null,2)}],details:{...Ve,started:ce,completed:ke,skipped:_e,precheck:G}}}catch(w){throw c?.aborted?new Error("Cancelled by user."):w}finally{c?.removeEventListener("abort",x),await S?.close().catch(()=>{}),T&&await MAe(T,{recursive:!0,force:!0}).catch(()=>{})}}})}var Jee=[wAe,kAe],OEn=["analyze_task_tests","analyze_test_gaps","submit_shipd"],ete=!1,GEn=!1,eI=!1;function qAe(e){return e.getActiveTools().map(s=>typeof s=="string"?s:s.name)}function FAe(){return ete}function tte(e){let t=qAe(e),s=OEn.some(l=>t.includes(l)),a=Jee.every(l=>t.includes(l)),c=Jee.some(l=>t.includes(l));return s||(FAe()?!a:c)}function UPo(e){GEn||(_En(e),GEn=!0)}function HPo(e,t){let s=qAe(e);if(t&&s.length===0){eI=!0;return}let a=s.includes("submit_shipd"),l=s.filter(d=>!OEn.includes(d)).filter(d=>!Jee.includes(d)),u=t?[...l,...Jee]:[...l];a&&!u.includes(Yee)&&u.push(Yee),(u.length!==s.length||u.some((d,m)=>d!==s[m]))&&e.setActiveTools(u),eI=tte(e)}function LC(e){let t=FAe();t&&UPo(e),HPo(e,t)}function BAe(e,t){ete=DL(t),eI=!0,NEn(e)}function NEn(e,t=0){let s=FAe(),a=qAe(e);if(s&&a.length===0&&t<8){queueMicrotask(()=>NEn(e,t+1));return}LC(e)}function VEn(e){for(let t of[0,50,150,400])setTimeout(()=>{(eI||tte(e))&&LC(e)},t)}function qEn(){return eI}function UAe(e,t,s){ete=s,bL(t,s),eI=!0,LC(e)}function FEn(e,t){ete=DL(t),eI=!0,LC(e)}var e$o="Ctrl+Shift+X",jEn=[{value:"--config",label:"--config",description:"Configure reviewer, solver, and analysis models"},{value:"--solver-gap-finder",label:"--solver-gap-finder",description:"Use TDD solver attempts to find behavioral gaps"}],t$o=["config","solver-gap-finder"];function n$o(e){let t=e.trimStart(),s=/\s$/.test(t),a=t.trimEnd().split(/\s+/).filter(Boolean),c=s?"":a.at(-1)??"",l=new Set(s?a:a.slice(0,-1)),u=s?t:t.slice(0,t.length-c.length),p=l.has("--config"),d=[...l].some(S=>S!=="--config"),m=jEn.filter(S=>!l.has(S.value)&&!p&&!(d&&S.value==="--config")&&S.value.startsWith(c));return m.length?m.map(S=>({...S,value:`${u}${S.value}`})):null}async function HAe(e,t,s){let a=iDe();if(a.length===0)return e.ui.notify("No enabledModels configured in settings.json.","error"),null;let c=e.modelRegistry.getAll(),l=a.map(m=>{let S=cDe(m);if(!S)return null;let v=c.find(w=>w.provider===S.provider&&w.id===S.modelId),T=t?.provider===S.provider&&t?.modelId===S.modelId,x=v?`${v.name} (${m})`:m;return{ref:m,parsed:S,display:T?`${x} [current]`:x,isCurrent:T}}).filter(m=>m!==null);if(l.length===0)return e.ui.notify("Could not resolve any enabledModels entries.","error"),null;let u=[...l].sort((m,S)=>m.isCurrent===S.isCurrent?0:m.isCurrent?-1:1),p=await e.ui.select(s,u.map(m=>m.display));if(!p)return null;let d=l.find(m=>m.display===p);return d?{provider:d.parsed.provider,modelId:d.parsed.modelId}:null}function MC(e,t,s){let a=e.modelRegistry.getAll().find(c=>c.provider===t&&c.id===s);return nDe(a)}var nte={provider:"",modelId:"",thinkingLevel:"off",timeoutMinutes:ite,solverCount:lte,saveArtifacts:ute},s$o={provider:"",modelId:"",thinkingLevel:"off",timeoutMinutes:rI};function ste(e){let t=e?.analyzeGap,s=t?.timeoutMinutes,a=typeof s=="number"&&Number.isFinite(s)?Math.min(AL,Math.max(TL,s)):rI;return{...s$o,...t,timeoutMinutes:a}}function HEn(e,t,s,a){let c=t?MC(e,t.provider,t.modelId):["off"],l=s.provider?MC(e,s.provider,s.modelId):["off"],u=a.provider?MC(e,a.provider,a.modelId):["off"];return[{id:"solver-model",section:"Solver",label:"Solver model",value:s.provider?`${s.provider}/${s.modelId}`:"not set",kind:"model"},{id:"solver-thinking",section:"Solver",label:"Solver thinking",value:s.thinkingLevel,kind:"cycle",values:l},{id:"solvergap-timeout",section:"Solver",label:"Timeout",value:`${s.timeoutMinutes} min`,kind:"cycle",values:[10,20,30,40,50,XAe].filter((p,d,m)=>p>=YAe&&m.indexOf(p)===d).map(p=>`${p} min`)},{id:"solvergap-solver-count",section:"Solver",label:"Parallel agents",value:String(s.solverCount),kind:"cycle",values:Array.from({length:JAe-cte+1},(p,d)=>`${cte+d}`)},{id:"solvergap-save-artifacts",section:"Solver",label:"Save artifacts",value:s.saveArtifacts?"on":"off",kind:"cycle",values:["on","off"]},{id:"reviewer-model",section:"Solver",label:"Reviewer model",value:t?`${t.provider}/${t.modelId}`:"not set",kind:"model"},{id:"reviewer-thinking",section:"Solver",label:"Reviewer thinking",value:t?.thinkingLevel??"off",kind:"cycle",values:c},{id:"analyze-enabled",section:"Analysis Tools",label:"Enabled here",value:EL(e.cwd)?"on":"off",kind:"cycle",values:["on","off"]},{id:"analyze-timeout",section:"Analysis Tools",label:"Timeout",value:`${a.timeoutMinutes} min`,kind:"cycle",values:[10,15,20,25,AL].filter((p,d,m)=>p>=TL&&m.indexOf(p)===d).map(p=>`${p} min`)},{id:"analyze-gap-model",section:"Analysis Tools",label:"Analysis model",value:a.provider?`${a.provider}/${a.modelId}`:"not set",kind:"model"},{id:"analyze-gap-thinking",section:"Analysis Tools",label:"Analysis thinking",value:a.thinkingLevel,kind:"cycle",values:u}]}var jAe=class{constructor(t,s,a,c,l,u){this.ctx=t;this.settingsListTheme=s;this.theme=a;this.onCycleSaved=c;this.onActivateModel=l;this.onExit=u;this.rows=HEn(t,Xo(),Xo()?.solverGap??nte,ste(Xo()))}selectedIndex=0;rows;refresh(){let t=Xo();this.rows=HEn(this.ctx,t,t?.solverGap??nte,ste(t)),this.selectedIndex=Math.min(this.selectedIndex,this.rows.length-1)}invalidate(){}render(t){let s=[],a=Math.min(30,Math.max(...this.rows.map(l=>l.label.length))),c;for(let l=0;l<this.rows.length;l++){let u=this.rows[l];if(!u)continue;u.section!==c&&(c!==void 0&&s.push(""),s.push(this.theme.bold(this.theme.fg("accent",u.section))),c=u.section);let p=l===this.selectedIndex,d=p?this.settingsListTheme.cursor:" ",m=u.label+" ".repeat(Math.max(0,a-u.label.length)),S=this.settingsListTheme.label(m,p),v=this.settingsListTheme.value(u.value,p);s.push(`${d}${S} ${v}`)}return s}handleInput(t){if(sI(t,nI.ctrl("s"))||sI(t,nI.escape)||sI(t,nI.ctrl("c"))){this.onExit();return}if(sI(t,nI.up)){this.selectedIndex=this.selectedIndex===0?this.rows.length-1:this.selectedIndex-1;return}if(sI(t,nI.down)){this.selectedIndex=this.selectedIndex===this.rows.length-1?0:this.selectedIndex+1;return}if(sI(t,nI.enter)||sI(t,nI.return)||t===" "){let s=this.rows[this.selectedIndex];if(!s)return;if(s.kind==="model"){this.onActivateModel(s.id);return}if(!s.values||s.values.length===0)return;let a=Xo();if(!a){this.ctx.ui.notify("Set the reviewer model first \u2014 it's required before solver settings","warning");return}let c=a.solverGap??nte,l=ste(a),u=s.values.indexOf(s.value),p=s.values[(u+1)%s.values.length];if(p===void 0)return;s.id==="reviewer-thinking"?wi({...a,thinkingLevel:p,solverGap:c,analyzeGap:l}):s.id==="solver-thinking"?wi({...a,solverGap:{...c,thinkingLevel:p}}):s.id==="solvergap-timeout"?wi({...a,solverGap:{...c,timeoutMinutes:Number.parseInt(p,10)}}):s.id==="solvergap-solver-count"?wi({...a,solverGap:{...c,solverCount:Number.parseInt(p,10)}}):s.id==="solvergap-save-artifacts"?wi({...a,solverGap:{...c,saveArtifacts:p==="on"}}):s.id==="analyze-enabled"?bL(this.ctx.cwd,p==="on"):s.id==="analyze-timeout"?wi({...a,analyzeGap:{...l,timeoutMinutes:Number.parseInt(p,10)}}):s.id==="analyze-gap-thinking"&&wi({...a,analyzeGap:{...l,thinkingLevel:p}}),this.refresh(),this.onCycleSaved()}}};async function r$o(e,t){if(t.mode!=="tui"){t.ui.notify("/checks --config requires interactive mode","error");return}let s=0;for(;;){let a=await t.ui.custom((p,d,m,S)=>{let v=new jAe(t,YPo(),d,()=>{FEn(e,t.cwd),p.requestRender()},x=>S(x),()=>S(void 0));v.selectedIndex=s;let T=new XPo;return T.addChild(new UEn(d.bold(d.fg("accent","Checks settings")))),T.addChild({render:x=>v.render(x),invalidate:()=>v.invalidate()}),T.addChild(new JPo(1)),T.addChild(new UEn(d.fg("dim","\u2191\u2193 navigate enter select ctrl+s save & exit esc cancel"))),{render(x){return T.render(x)},invalidate(){T.invalidate()},handleInput(x){v.handleInput(x),s=v.selectedIndex,p.requestRender()}}});if(!a)return;let c=Xo(),l=c?.solverGap??nte,u=ste(c);if(a==="reviewer-model"){let p=await HAe(t,c,"Select reviewer model");if(!p)continue;let d=MC(t,p.provider,p.modelId),m=d.includes(c?.thinkingLevel??"off")?c?.thinkingLevel??"off":d[0]??"off";wi({...p,thinkingLevel:m,solverGap:l,analyzeGap:u,enabledProjects:c?.enabledProjects??mte(),enableAnalyzeTool:c?.enableAnalyzeTool}),t.ui.notify(`Reviewer model saved: ${p.provider}/${p.modelId}`,"info");continue}if(a==="solver-model"){if(!c){t.ui.notify("Set the reviewer model first \u2014 it's required before solver settings.","warning");continue}let p=await HAe(t,l.provider?l:null,"Select solver model");if(!p)continue;let d=MC(t,p.provider,p.modelId),m=d.includes(l.thinkingLevel)?l.thinkingLevel:d[0]??"off";wi({...c,solverGap:{...l,...p,thinkingLevel:m}}),t.ui.notify(`Solver model saved: ${p.provider}/${p.modelId}`,"info");continue}if(a==="analyze-gap-model"){if(!c){t.ui.notify("Set the reviewer model first \u2014 it's required before analyze-tool settings.","warning");continue}let p=await HAe(t,u.provider?u:null,"Select gap-finder model");if(!p)continue;let d=MC(t,p.provider,p.modelId),m=d.includes(u.thinkingLevel)?u.thinkingLevel:d[0]??"off";wi({...c,analyzeGap:{...u,...p,thinkingLevel:m}}),t.ui.notify(`Gap-finder model saved: ${p.provider}/${p.modelId}`,"info")}}}function zEn(e){e.registerCommand("checks",{description:"Configure checks or run the solver-based behavioral gap finder.",getArgumentCompletions:n$o,handler:async(t,s)=>{let a=t.trim();if(!a){let _e=await s.ui.select("Choose a checks action",[...t$o]);if(!_e)return;a=`--${_e}`}let c=[...new Set(a.split(/\s+/).filter(Boolean))],l=new Set(jEn.map(_e=>_e.value)),u=c.filter(_e=>!l.has(_e));if(u.length){s.ui.notify(`Unknown option(s): ${u.join(", ")}. Run /checks with no arguments to see options.`,"warning");return}if(c.includes("--config")){c.length>1?s.ui.notify("--config cannot be combined with other options.","warning"):await r$o(e,s);return}let p=c.includes("--solver-gap-finder");if(!p)return;if(Qee()){s.ui.notify("A checks run is already in progress.","warning");return}let d=Xo();if(!d){s.ui.notify("No gap-finder model configured. Run /checks --config first.","error");return}let m=s.modelRegistry.find(d.provider,d.modelId);if(!m||!s.modelRegistry.hasConfiguredAuth(m)){s.ui.notify("Configured behavioral gap-finder model is unavailable or unauthenticated. Run /checks --config.","error");return}let S=PAe.filter(_e=>!BEn(tI(s.cwd,_e)));if(S.length){s.ui.notify(`Missing required file(s): ${S.join(", ")}`,"error");return}let v=null,T;if(p){if(v=oDe(),!v||!BEn(tI(s.cwd,"test.sh"))){s.ui.notify("Configure solver gap finder and provide test.sh before running it.","error");return}if(T=s.modelRegistry.find(v.provider,v.modelId),!T||!s.modelRegistry.hasConfiguredAuth(T)){s.ui.notify("Configured solver gap-finder model is unavailable or unauthenticated.","error");return}}let x=gEn(),w=v?.solverCount??0,L=w+1,G=Date.now(),O=p?"preparing image":"preparing clean snapshot",U=0,J=!p,ce=(_e=O,Ce=U,Ne=J)=>{O=_e,U=Ce,J=Ne,s.ui.setWidget(dL,uEn(_e,Ce,L,{showBar:Ne,startedAt:G}))},ke=setInterval(()=>ce(),1e3);ce(),s.ui.notify(`checks (${c.join(" ")}) started. Press ${e$o} to cancel.`,"info");let Ee;try{let _e=tI(ZPo(),`checks-${jPo()}`);KPo(_e,{recursive:!0}),Ee=_e;let Ce=await qC(e,s.cwd,_e,x.signal);if(Ce.status==="error"){s.ui.notify(`checks: ${Ce.error}`,"error");return}if(x.signal.aborted)return;for(let fc of PAe)zPo(tI(s.cwd,fc),tI(_e,fc));let Ne=jee(),Ve=Kee(),Se=zee(),He=0,oe=[],M,se={status:"ok",gaps:[]};if(p&&v){if(x.signal.aborted){s.ui.notify("checks: cancelled.","warning");return}let fc=new Map,SL=!1,Za=()=>Array.from({length:w},(_o,Gm)=>{let IL=fc.get(Gm+1);return IL?`${Gm+1}${IL.passed?"\u2713":"\u2717"}`:`${Gm+1}\u2026`}).join(" "),Mm=_o=>{_o==="running agents"&&(SL=!0);let Gm=SL&&(_o==="running agents"||_o==="finalizing"),IL=_o==="running agents"?`${_o} (${Za()})`:_o,ZEn=[...fc.values()];ce(IL,He+ZEn.length,Gm)},yL=_o=>{for(let Gm of _o)fc.set(Gm.index,Gm);Mm("running agents")},WEn=_o=>{fc.set(_o.index,_o),Mm("finalizing")};Mm("preparing image");let QEn=$Ae().replace(/[:.]/g,"-");if(oe=await cEn({pi:e,repoDir:s.cwd,snapshotDir:_e,config:d,solverConfig:v,cancelSignal:x.signal,runId:QEn,onSolverCompleted:WEn,onSolverProgress:yL,onResourceUsage:_o=>{M=_o},onPhase:Mm}),x.signal.aborted){s.ui.notify("checks: cancelled.","warning");return}if(oe.some(_o=>_o.status!=="patchFailed"&&_o.status!=="error")&&(Mm("finalizing"),fDe(_e,oe),se=await Hke({tempDir:_e,model:m,thinkingLevel:d.thinkingLevel,solverResults:oe,testRubric:Ne,gapRules:Ve,fairnessRules:Se,cancelSignal:x.signal})),He+=1,Mm("finalizing"),M&&rDe(s.cwd,M),x.signal.aborted){s.ui.notify("checks: cancelled.","warning");return}}let Xn=dEn({existingReport:pEn(tI(s.cwd,"shipd_report.json")),config:d,runGapFinder:!1,testGaps:[],gapAnalysisIncomplete:!1,gapFinderStatus:"ok",gapFilterStatus:"ok",runSolverGapFinder:p,solverResults:oe,fargateResourceUsage:M,solverGaps:se.gaps,solverGapAnalysisIncomplete:p&&(oe.some(fc=>fc.status==="error")||se.status!=="ok"),solverComparisonStatus:se.status}),Lm=mEn({merged:Xn,runGapFinder:!1,runSolverGapFinder:p});e.sendMessage({customType:"shipd_checks_report",content:Lm.content,display:!0,details:Lm.details});let RL=tI(s.cwd,"shipd_report.json");QPo(RL,JSON.stringify(Xn,null,2),"utf-8"),s.ui.notify(`checks: wrote details to ${RL}`,"info")}catch(_e){s.ui.notify(`checks failed: ${_e instanceof Error?_e.message:String(_e)}`,"error")}finally{clearInterval(ke),s.ui.setWidget(dL,void 0),Ee&&WPo(Ee,{recursive:!0,force:!0}),REn()}}})}var KEn=a$o.ctrlShift("x");function c$o(e){e.registerCommand("analyze:on",{description:"Enable the gap-finder and solution-precheck tools for this project folder",handler:async(t,s)=>{UAe(e,s.cwd,!0),s.ui.notify("Gap-finder and solution-precheck tools ON in this project","info")}}),e.registerCommand("analyze:off",{description:"Disable the gap-finder and solution-precheck tools for this project folder",handler:async(t,s)=>{UAe(e,s.cwd,!1),s.ui.notify("Gap-finder and solution-precheck tools OFF in this project","info")}}),e.registerMessageRenderer("shipd_checks_report",(t,s,a)=>{let c=t.details??{},l=new o$o;l.addChild(new zAe(a.bold(a.fg("accent","Checks")),0,0));let u=!1,p=d=>{l.addChild(new zAe(d,0,0)),u=!0};if(c.showGaps){let d=c.gapsCount??0;p(d>0?a.fg("warning",` \u26A0 ${d} test gap(s) found`):a.fg("success"," \u2713 no test gaps found"))}if(c.showSolverGaps){let d=c.solverDetails??[],m=d.filter(x=>x.passed).length,S=c.solverGapsCount??0;l.addChild(new i$o(1)),p(a.bold(a.fg("accent","Solver gap finder")));for(let x of d){let w=x.passed?a.fg("success","\u2713"):a.fg("error","\u2717"),L=x.passed?"passed":x.status==="ok"?"failed tests":x.status;p(` ${w} Solver ${x.index}: ${L} (${Xy(x.durationMs)})`)}let v=m===d.length&&d.length>0?a.fg("success",`${m}/${d.length} solvers passed`):a.fg("warning",`${m}/${d.length} solvers passed`),T=S>0?a.fg("warning",`${S} behavioral gap(s) found`):a.fg("success","no behavioral gaps found");p(` ${v}, ${T}`)}return u||l.addChild(new zAe(a.fg("dim"," nothing to report"),0,0)),l}),e.registerShortcut(KEn,{description:"Cancel an in-progress /checks run",handler:t=>{Qee()&&SEn()&&(t.ui.setWidget(dL,[`checks: cancelling (${KEn})...`]),t.ui.notify("checks: cancelling...","warning"))}}),l$o(e),MEn(e),zEn(e)}function l$o(e){e.on("session_start",(t,s)=>{BAe(e,s.cwd),(t.reason==="resume"||t.reason==="reload"||t.reason==="startup")&&VEn(e)}),e.on("session_tree",async(t,s)=>{BAe(e,s.cwd)}),e.on("before_agent_start",()=>{!qEn()&&!tte(e)||LC(e)})}export{c$o as default};
|
|
118
|
+
${c.fg("error",BPo(s))}`,0,0):new mL([S,...qPo(s.details,c)].join(`
|
|
119
|
+
`),0,0)},async execute(s,a,c,l,u){if(!t)throw new Error(`No Shipd job link is set for this chat session. Provide the job link with /${GAe} <job-link>.`);let p=t,d=process.env.SHIPD_STORAGE_STATE??TEn;if(!VAe(d))throw new Error(`Shipd authentication state not found at ${d}. Run /shipd:auth first.`);let m=DEn();if(!m)throw new Error("Could not find Chrome/Chromium. Set SHIPD_CHROME_PATH and retry.");let S,v,T,x=()=>{S?.close().catch(()=>{})};c?.addEventListener("abort",x,{once:!0});try{$i(c),l?.({content:[{type:"text",text:"Running create_patches.sh..."}],details:void 0});let w=await wPo(e,u.cwd,c);$i(c),l?.({content:[{type:"text",text:"Running patch prechecks before opening Shipd..."}],details:void 0}),T=await hEn(ol(CEn(),"shipd-patch-precheck-"));let L=await qC(e,u.cwd,T,c);if(L.status==="error")throw new Error(`Fargate patch precheck snapshot failed on linux: ${L.error}`);await Promise.all([vEn(ol(T,"test.patch"),w.testPatch,"utf8"),vEn(ol(T,"solution.patch"),w.solutionPatch,"utf8")]);let G=await lEn({pi:e,repoDir:u.cwd,snapshotDir:T,config:{provider:"patch-precheck",modelId:"patch-precheck",thinkingLevel:"off",fargate:dte()},cancelSignal:c??new AbortController().signal,runId:`quality-precheck-${fPo()}`,precheckTimeoutMinutes:IPo,onPhase:Se=>l?.({content:[{type:"text",text:`Patch precheck: ${Se}...`}],details:void 0})});if(!G.passed)throw new Error(UPo(G));await MAe(T,{recursive:!0,force:!0}),T=void 0,l?.({content:[{type:"text",text:"Patch prechecks passed; opening Shipd and filling draft fields..."}],details:void 0}),$i(c);let O=await bEn(m,d,p,c);S=O.browser,v=O.page,await LPo(v,w,c),l?.({content:[{type:"text",text:"Checking which quality checks are stale..."}],details:void 0});let U=await xEn(v,c),J=U.filter(Se=>Se.busy||Se.shouldRun).map(Se=>Se.quality),ce=[];for(let Se of NAe){let He=U.find(oe=>oe.quality===Se);if(!He)throw new Error(`${Se}: quality status was not available after updating the draft.`);He.shouldRun?ce.push(await MPo(v,Se,c)):He.busy&&ce.push({quality:Se,status:"already-running",rowTextAfterConfirm:He.rowText})}let ke=U.map(({quality:Se,rowText:He})=>({quality:Se,rowText:He}));if(J.length>0){l?.({content:[{type:"text",text:`Quality checks queued (${J.join(", ")}); closing the browser until the first check in 5 minutes...`}],details:void 0}),await S.close(),S=void 0,v=void 0;let Se=Date.now()+hPo;for(;;){let He=Se-Date.now();He>0&&(l?.({content:[{type:"text",text:`Browser closed; next quality check in ${Xy(He)}...`}],details:void 0}),await gL(He,c)),$i(c),l?.({content:[{type:"text",text:"Reopening Shipd to check quality job status..."}],details:void 0});let oe=await bEn(m,d,p,c);S=oe.browser,v=oe.page;let M=await xEn(v,c,J);if(M.every(Xn=>!Xn.busy)){ke=[...U.filter(Xn=>!J.includes(Xn.quality)).map(({quality:Xn,rowText:Lm})=>({quality:Xn,rowText:Lm})),...M.map(({quality:Xn,rowText:Lm})=>({quality:Xn,rowText:Lm}))];break}let se=M.map(Xn=>`${Xn.quality}: ${Xn.rowText}`).join("; ");l?.({content:[{type:"text",text:`Quality jobs still running (${se}); closing browser until the next check...`}],details:void 0}),await S.close(),S=void 0,v=void 0,Se=Date.now()+vPo}}else l?.({content:[{type:"text",text:"No quality checks need to run; using the current reports."}],details:void 0});if(!v)throw new Error("Shipd quality status page was closed before report extraction.");l?.({content:[{type:"text",text:"Extracting quality reports..."}],details:void 0});let Ee=[],_e=[];for(let Se of NAe){if(!await GPo(v,Se)){_e.push(Se);continue}Ee.push(await NPo(v,Se,c))}let Ce=Ee.find(Se=>Se.quality==="Test Quality")?.parsed,Ne=Ee.find(Se=>Se.quality==="Solution Quality")?.parsed,Ve=VPo(Ce,Ne);return{content:[{type:"text",text:JSON.stringify(Ve,null,2)}],details:{...Ve,started:ce,completed:ke,skipped:_e,precheck:G}}}catch(w){throw c?.aborted?new Error("Cancelled by user."):w}finally{c?.removeEventListener("abort",x),await S?.close().catch(()=>{}),T&&await MAe(T,{recursive:!0,force:!0}).catch(()=>{})}}})}var Jee=[wAe,kAe],OEn=["analyze_task_tests","analyze_test_gaps","submit_shipd"],ete=!1,GEn=!1,eI=!1;function qAe(e){return e.getActiveTools().map(s=>typeof s=="string"?s:s.name)}function FAe(){return ete}function tte(e){let t=qAe(e),s=OEn.some(l=>t.includes(l)),a=Jee.every(l=>t.includes(l)),c=Jee.some(l=>t.includes(l));return s||(FAe()?!a:c)}function HPo(e){GEn||(_En(e),GEn=!0)}function jPo(e,t){let s=qAe(e);if(t&&s.length===0){eI=!0;return}let a=s.includes("submit_shipd"),l=s.filter(d=>!OEn.includes(d)).filter(d=>!Jee.includes(d)),u=t?[...l,...Jee]:[...l];a&&!u.includes(Yee)&&u.push(Yee),(u.length!==s.length||u.some((d,m)=>d!==s[m]))&&e.setActiveTools(u),eI=tte(e)}function LC(e){let t=FAe();t&&HPo(e),jPo(e,t)}function BAe(e,t){ete=DL(t),eI=!0,NEn(e)}function NEn(e,t=0){let s=FAe(),a=qAe(e);if(s&&a.length===0&&t<8){queueMicrotask(()=>NEn(e,t+1));return}LC(e)}function VEn(e){for(let t of[0,50,150,400])setTimeout(()=>{(eI||tte(e))&&LC(e)},t)}function qEn(){return eI}function UAe(e,t,s){ete=s,bL(t,s),eI=!0,LC(e)}function FEn(e,t){ete=DL(t),eI=!0,LC(e)}var t$o="Ctrl+Shift+X",jEn=[{value:"--config",label:"--config",description:"Configure reviewer, solver, and analysis models"},{value:"--solver-gap-finder",label:"--solver-gap-finder",description:"Use TDD solver attempts to find behavioral gaps"}],n$o=["config","solver-gap-finder"];function s$o(e){let t=e.trimStart(),s=/\s$/.test(t),a=t.trimEnd().split(/\s+/).filter(Boolean),c=s?"":a.at(-1)??"",l=new Set(s?a:a.slice(0,-1)),u=s?t:t.slice(0,t.length-c.length),p=l.has("--config"),d=[...l].some(S=>S!=="--config"),m=jEn.filter(S=>!l.has(S.value)&&!p&&!(d&&S.value==="--config")&&S.value.startsWith(c));return m.length?m.map(S=>({...S,value:`${u}${S.value}`})):null}async function HAe(e,t,s){let a=iDe();if(a.length===0)return e.ui.notify("No enabledModels configured in settings.json.","error"),null;let c=e.modelRegistry.getAll(),l=a.map(m=>{let S=cDe(m);if(!S)return null;let v=c.find(w=>w.provider===S.provider&&w.id===S.modelId),T=t?.provider===S.provider&&t?.modelId===S.modelId,x=v?`${v.name} (${m})`:m;return{ref:m,parsed:S,display:T?`${x} [current]`:x,isCurrent:T}}).filter(m=>m!==null);if(l.length===0)return e.ui.notify("Could not resolve any enabledModels entries.","error"),null;let u=[...l].sort((m,S)=>m.isCurrent===S.isCurrent?0:m.isCurrent?-1:1),p=await e.ui.select(s,u.map(m=>m.display));if(!p)return null;let d=l.find(m=>m.display===p);return d?{provider:d.parsed.provider,modelId:d.parsed.modelId}:null}function MC(e,t,s){let a=e.modelRegistry.getAll().find(c=>c.provider===t&&c.id===s);return nDe(a)}var nte={provider:"",modelId:"",thinkingLevel:"off",timeoutMinutes:ite,solverCount:lte,saveArtifacts:ute},r$o={provider:"",modelId:"",thinkingLevel:"off",timeoutMinutes:rI};function ste(e){let t=e?.analyzeGap,s=t?.timeoutMinutes,a=typeof s=="number"&&Number.isFinite(s)?Math.min(AL,Math.max(TL,s)):rI;return{...r$o,...t,timeoutMinutes:a}}function HEn(e,t,s,a){let c=t?MC(e,t.provider,t.modelId):["off"],l=s.provider?MC(e,s.provider,s.modelId):["off"],u=a.provider?MC(e,a.provider,a.modelId):["off"];return[{id:"solver-model",section:"Solver",label:"Solver model",value:s.provider?`${s.provider}/${s.modelId}`:"not set",kind:"model"},{id:"solver-thinking",section:"Solver",label:"Solver thinking",value:s.thinkingLevel,kind:"cycle",values:l},{id:"solvergap-timeout",section:"Solver",label:"Timeout",value:`${s.timeoutMinutes} min`,kind:"cycle",values:[10,20,30,40,50,XAe].filter((p,d,m)=>p>=YAe&&m.indexOf(p)===d).map(p=>`${p} min`)},{id:"solvergap-solver-count",section:"Solver",label:"Parallel agents",value:String(s.solverCount),kind:"cycle",values:Array.from({length:JAe-cte+1},(p,d)=>`${cte+d}`)},{id:"solvergap-save-artifacts",section:"Solver",label:"Save artifacts",value:s.saveArtifacts?"on":"off",kind:"cycle",values:["on","off"]},{id:"reviewer-model",section:"Solver",label:"Reviewer model",value:t?`${t.provider}/${t.modelId}`:"not set",kind:"model"},{id:"reviewer-thinking",section:"Solver",label:"Reviewer thinking",value:t?.thinkingLevel??"off",kind:"cycle",values:c},{id:"analyze-enabled",section:"Analysis Tools",label:"Enabled here",value:EL(e.cwd)?"on":"off",kind:"cycle",values:["on","off"]},{id:"analyze-timeout",section:"Analysis Tools",label:"Timeout",value:`${a.timeoutMinutes} min`,kind:"cycle",values:[10,15,20,25,AL].filter((p,d,m)=>p>=TL&&m.indexOf(p)===d).map(p=>`${p} min`)},{id:"analyze-gap-model",section:"Analysis Tools",label:"Analysis model",value:a.provider?`${a.provider}/${a.modelId}`:"not set",kind:"model"},{id:"analyze-gap-thinking",section:"Analysis Tools",label:"Analysis thinking",value:a.thinkingLevel,kind:"cycle",values:u}]}var jAe=class{constructor(t,s,a,c,l,u){this.ctx=t;this.settingsListTheme=s;this.theme=a;this.onCycleSaved=c;this.onActivateModel=l;this.onExit=u;this.rows=HEn(t,Xo(),Xo()?.solverGap??nte,ste(Xo()))}selectedIndex=0;rows;refresh(){let t=Xo();this.rows=HEn(this.ctx,t,t?.solverGap??nte,ste(t)),this.selectedIndex=Math.min(this.selectedIndex,this.rows.length-1)}invalidate(){}render(t){let s=[],a=Math.min(30,Math.max(...this.rows.map(l=>l.label.length))),c;for(let l=0;l<this.rows.length;l++){let u=this.rows[l];if(!u)continue;u.section!==c&&(c!==void 0&&s.push(""),s.push(this.theme.bold(this.theme.fg("accent",u.section))),c=u.section);let p=l===this.selectedIndex,d=p?this.settingsListTheme.cursor:" ",m=u.label+" ".repeat(Math.max(0,a-u.label.length)),S=this.settingsListTheme.label(m,p),v=this.settingsListTheme.value(u.value,p);s.push(`${d}${S} ${v}`)}return s}handleInput(t){if(sI(t,nI.ctrl("s"))||sI(t,nI.escape)||sI(t,nI.ctrl("c"))){this.onExit();return}if(sI(t,nI.up)){this.selectedIndex=this.selectedIndex===0?this.rows.length-1:this.selectedIndex-1;return}if(sI(t,nI.down)){this.selectedIndex=this.selectedIndex===this.rows.length-1?0:this.selectedIndex+1;return}if(sI(t,nI.enter)||sI(t,nI.return)||t===" "){let s=this.rows[this.selectedIndex];if(!s)return;if(s.kind==="model"){this.onActivateModel(s.id);return}if(!s.values||s.values.length===0)return;let a=Xo();if(!a){this.ctx.ui.notify("Set the reviewer model first \u2014 it's required before solver settings","warning");return}let c=a.solverGap??nte,l=ste(a),u=s.values.indexOf(s.value),p=s.values[(u+1)%s.values.length];if(p===void 0)return;s.id==="reviewer-thinking"?wi({...a,thinkingLevel:p,solverGap:c,analyzeGap:l}):s.id==="solver-thinking"?wi({...a,solverGap:{...c,thinkingLevel:p}}):s.id==="solvergap-timeout"?wi({...a,solverGap:{...c,timeoutMinutes:Number.parseInt(p,10)}}):s.id==="solvergap-solver-count"?wi({...a,solverGap:{...c,solverCount:Number.parseInt(p,10)}}):s.id==="solvergap-save-artifacts"?wi({...a,solverGap:{...c,saveArtifacts:p==="on"}}):s.id==="analyze-enabled"?bL(this.ctx.cwd,p==="on"):s.id==="analyze-timeout"?wi({...a,analyzeGap:{...l,timeoutMinutes:Number.parseInt(p,10)}}):s.id==="analyze-gap-thinking"&&wi({...a,analyzeGap:{...l,thinkingLevel:p}}),this.refresh(),this.onCycleSaved()}}};async function o$o(e,t){if(t.mode!=="tui"){t.ui.notify("/checks --config requires interactive mode","error");return}let s=0;for(;;){let a=await t.ui.custom((p,d,m,S)=>{let v=new jAe(t,XPo(),d,()=>{FEn(e,t.cwd),p.requestRender()},x=>S(x),()=>S(void 0));v.selectedIndex=s;let T=new JPo;return T.addChild(new UEn(d.bold(d.fg("accent","Checks settings")))),T.addChild({render:x=>v.render(x),invalidate:()=>v.invalidate()}),T.addChild(new e$o(1)),T.addChild(new UEn(d.fg("dim","\u2191\u2193 navigate enter select ctrl+s save & exit esc cancel"))),{render(x){return T.render(x)},invalidate(){T.invalidate()},handleInput(x){v.handleInput(x),s=v.selectedIndex,p.requestRender()}}});if(!a)return;let c=Xo(),l=c?.solverGap??nte,u=ste(c);if(a==="reviewer-model"){let p=await HAe(t,c,"Select reviewer model");if(!p)continue;let d=MC(t,p.provider,p.modelId),m=d.includes(c?.thinkingLevel??"off")?c?.thinkingLevel??"off":d[0]??"off";wi({...p,thinkingLevel:m,solverGap:l,analyzeGap:u,enabledProjects:c?.enabledProjects??mte(),enableAnalyzeTool:c?.enableAnalyzeTool}),t.ui.notify(`Reviewer model saved: ${p.provider}/${p.modelId}`,"info");continue}if(a==="solver-model"){if(!c){t.ui.notify("Set the reviewer model first \u2014 it's required before solver settings.","warning");continue}let p=await HAe(t,l.provider?l:null,"Select solver model");if(!p)continue;let d=MC(t,p.provider,p.modelId),m=d.includes(l.thinkingLevel)?l.thinkingLevel:d[0]??"off";wi({...c,solverGap:{...l,...p,thinkingLevel:m}}),t.ui.notify(`Solver model saved: ${p.provider}/${p.modelId}`,"info");continue}if(a==="analyze-gap-model"){if(!c){t.ui.notify("Set the reviewer model first \u2014 it's required before analyze-tool settings.","warning");continue}let p=await HAe(t,u.provider?u:null,"Select gap-finder model");if(!p)continue;let d=MC(t,p.provider,p.modelId),m=d.includes(u.thinkingLevel)?u.thinkingLevel:d[0]??"off";wi({...c,analyzeGap:{...u,...p,thinkingLevel:m}}),t.ui.notify(`Gap-finder model saved: ${p.provider}/${p.modelId}`,"info")}}}function zEn(e){e.registerCommand("checks",{description:"Configure checks or run the solver-based behavioral gap finder.",getArgumentCompletions:s$o,handler:async(t,s)=>{let a=t.trim();if(!a){let _e=await s.ui.select("Choose a checks action",[...n$o]);if(!_e)return;a=`--${_e}`}let c=[...new Set(a.split(/\s+/).filter(Boolean))],l=new Set(jEn.map(_e=>_e.value)),u=c.filter(_e=>!l.has(_e));if(u.length){s.ui.notify(`Unknown option(s): ${u.join(", ")}. Run /checks with no arguments to see options.`,"warning");return}if(c.includes("--config")){c.length>1?s.ui.notify("--config cannot be combined with other options.","warning"):await o$o(e,s);return}let p=c.includes("--solver-gap-finder");if(!p)return;if(Qee()){s.ui.notify("A checks run is already in progress.","warning");return}let d=Xo();if(!d){s.ui.notify("No gap-finder model configured. Run /checks --config first.","error");return}let m=s.modelRegistry.find(d.provider,d.modelId);if(!m||!s.modelRegistry.hasConfiguredAuth(m)){s.ui.notify("Configured behavioral gap-finder model is unavailable or unauthenticated. Run /checks --config.","error");return}let S=PAe.filter(_e=>!BEn(tI(s.cwd,_e)));if(S.length){s.ui.notify(`Missing required file(s): ${S.join(", ")}`,"error");return}let v=null,T;if(p){if(v=oDe(),!v||!BEn(tI(s.cwd,"test.sh"))){s.ui.notify("Configure solver gap finder and provide test.sh before running it.","error");return}if(T=s.modelRegistry.find(v.provider,v.modelId),!T||!s.modelRegistry.hasConfiguredAuth(T)){s.ui.notify("Configured solver gap-finder model is unavailable or unauthenticated.","error");return}}let x=gEn(),w=v?.solverCount??0,L=w+1,G=Date.now(),O=p?"preparing image":"preparing clean snapshot",U=0,J=!p,ce=(_e=O,Ce=U,Ne=J)=>{O=_e,U=Ce,J=Ne,s.ui.setWidget(dL,uEn(_e,Ce,L,{showBar:Ne,startedAt:G}))},ke=setInterval(()=>ce(),1e3);ce(),s.ui.notify(`checks (${c.join(" ")}) started. Press ${t$o} to cancel.`,"info");let Ee;try{let _e=tI(YPo(),`checks-${zPo()}`);WPo(_e,{recursive:!0}),Ee=_e;let Ce=await qC(e,s.cwd,_e,x.signal);if(Ce.status==="error"){s.ui.notify(`checks: ${Ce.error}`,"error");return}if(x.signal.aborted)return;for(let fc of PAe)KPo(tI(s.cwd,fc),tI(_e,fc));let Ne=jee(),Ve=Kee(),Se=zee(),He=0,oe=[],M,se={status:"ok",gaps:[]};if(p&&v){if(x.signal.aborted){s.ui.notify("checks: cancelled.","warning");return}let fc=new Map,SL=!1,Za=()=>Array.from({length:w},(_o,Gm)=>{let IL=fc.get(Gm+1);return IL?`${Gm+1}${IL.passed?"\u2713":"\u2717"}`:`${Gm+1}\u2026`}).join(" "),Mm=_o=>{_o==="running agents"&&(SL=!0);let Gm=SL&&(_o==="running agents"||_o==="finalizing"),IL=_o==="running agents"?`${_o} (${Za()})`:_o,ZEn=[...fc.values()];ce(IL,He+ZEn.length,Gm)},yL=_o=>{for(let Gm of _o)fc.set(Gm.index,Gm);Mm("running agents")},WEn=_o=>{fc.set(_o.index,_o),Mm("finalizing")};Mm("preparing image");let QEn=$Ae().replace(/[:.]/g,"-");if(oe=await cEn({pi:e,repoDir:s.cwd,snapshotDir:_e,config:d,solverConfig:v,cancelSignal:x.signal,runId:QEn,onSolverCompleted:WEn,onSolverProgress:yL,onResourceUsage:_o=>{M=_o},onPhase:Mm}),x.signal.aborted){s.ui.notify("checks: cancelled.","warning");return}if(oe.some(_o=>_o.status!=="patchFailed"&&_o.status!=="error")&&(Mm("finalizing"),fDe(_e,oe),se=await Hke({tempDir:_e,model:m,thinkingLevel:d.thinkingLevel,solverResults:oe,testRubric:Ne,gapRules:Ve,fairnessRules:Se,cancelSignal:x.signal})),He+=1,Mm("finalizing"),M&&rDe(s.cwd,M),x.signal.aborted){s.ui.notify("checks: cancelled.","warning");return}}let Xn=dEn({existingReport:pEn(tI(s.cwd,"shipd_report.json")),config:d,runGapFinder:!1,testGaps:[],gapAnalysisIncomplete:!1,gapFinderStatus:"ok",gapFilterStatus:"ok",runSolverGapFinder:p,solverResults:oe,fargateResourceUsage:M,solverGaps:se.gaps,solverGapAnalysisIncomplete:p&&(oe.some(fc=>fc.status==="error")||se.status!=="ok"),solverComparisonStatus:se.status}),Lm=mEn({merged:Xn,runGapFinder:!1,runSolverGapFinder:p});e.sendMessage({customType:"shipd_checks_report",content:Lm.content,display:!0,details:Lm.details});let RL=tI(s.cwd,"shipd_report.json");ZPo(RL,JSON.stringify(Xn,null,2),"utf-8"),s.ui.notify(`checks: wrote details to ${RL}`,"info")}catch(_e){s.ui.notify(`checks failed: ${_e instanceof Error?_e.message:String(_e)}`,"error")}finally{clearInterval(ke),s.ui.setWidget(dL,void 0),Ee&&QPo(Ee,{recursive:!0,force:!0}),REn()}}})}var KEn=i$o.ctrlShift("x");function l$o(e){e.registerCommand("analyze:on",{description:"Enable the gap-finder and solution-precheck tools for this project folder",handler:async(t,s)=>{UAe(e,s.cwd,!0),s.ui.notify("Gap-finder and solution-precheck tools ON in this project","info")}}),e.registerCommand("analyze:off",{description:"Disable the gap-finder and solution-precheck tools for this project folder",handler:async(t,s)=>{UAe(e,s.cwd,!1),s.ui.notify("Gap-finder and solution-precheck tools OFF in this project","info")}}),e.registerMessageRenderer("shipd_checks_report",(t,s,a)=>{let c=t.details??{},l=new a$o;l.addChild(new zAe(a.bold(a.fg("accent","Checks")),0,0));let u=!1,p=d=>{l.addChild(new zAe(d,0,0)),u=!0};if(c.showGaps){let d=c.gapsCount??0;p(d>0?a.fg("warning",` \u26A0 ${d} test gap(s) found`):a.fg("success"," \u2713 no test gaps found"))}if(c.showSolverGaps){let d=c.solverDetails??[],m=d.filter(x=>x.passed).length,S=c.solverGapsCount??0;l.addChild(new c$o(1)),p(a.bold(a.fg("accent","Solver gap finder")));for(let x of d){let w=x.passed?a.fg("success","\u2713"):a.fg("error","\u2717"),L=x.passed?"passed":x.status==="ok"?"failed tests":x.status;p(` ${w} Solver ${x.index}: ${L} (${Xy(x.durationMs)})`)}let v=m===d.length&&d.length>0?a.fg("success",`${m}/${d.length} solvers passed`):a.fg("warning",`${m}/${d.length} solvers passed`),T=S>0?a.fg("warning",`${S} behavioral gap(s) found`):a.fg("success","no behavioral gaps found");p(` ${v}, ${T}`)}return u||l.addChild(new zAe(a.fg("dim"," nothing to report"),0,0)),l}),e.registerShortcut(KEn,{description:"Cancel an in-progress /checks run",handler:t=>{Qee()&&SEn()&&(t.ui.setWidget(dL,[`checks: cancelling (${KEn})...`]),t.ui.notify("checks: cancelling...","warning"))}}),u$o(e),MEn(e),zEn(e)}function u$o(e){e.on("session_start",(t,s)=>{BAe(e,s.cwd),(t.reason==="resume"||t.reason==="reload"||t.reason==="startup")&&VEn(e)}),e.on("session_tree",async(t,s)=>{BAe(e,s.cwd)}),e.on("before_agent_start",()=>{!qEn()&&!tte(e)||LC(e)})}export{l$o as default};
|