gemi 0.35.1 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/app/index.js +272 -2
  2. package/dist/app/index.js.map +6 -4
  3. package/dist/app/prismaExtension.d.ts +5 -1
  4. package/dist/app/prismaExtension.d.ts.map +1 -1
  5. package/dist/bin/gemi.js +16 -2
  6. package/dist/bin/gemi.js.map +2 -2
  7. package/dist/broadcasting/index.js +1 -1
  8. package/dist/{chunk-wvjzg5z2.js → chunk-1gd1fyth.js} +1 -1
  9. package/dist/{chunk-wzba9wy7.js → chunk-1sdckzzr.js} +1 -1
  10. package/dist/{chunk-n0wwc7rb.js → chunk-21hd56fa.js} +1 -1
  11. package/dist/chunk-2vpsbhpm.js +5 -0
  12. package/dist/{chunk-dwsazw95.js.map → chunk-2vpsbhpm.js.map} +1 -1
  13. package/dist/{chunk-74zbp6jx.js → chunk-3vxaqv3c.js} +1 -1
  14. package/dist/{chunk-w4p9g023.js → chunk-4pxf7y2s.js} +1 -1
  15. package/dist/{chunk-nxybcsrs.js → chunk-513mekrd.js} +1 -1
  16. package/dist/{chunk-tcn3gykx.js → chunk-640e07kh.js} +1 -1
  17. package/dist/{chunk-61tk6d6h.js → chunk-65z4wbps.js} +1 -1
  18. package/dist/{chunk-rvp6vtqh.js → chunk-69wrnjjn.js} +1 -1
  19. package/dist/{chunk-q2h6t84y.js → chunk-6g2bsmwf.js} +1 -1
  20. package/dist/{chunk-e2k5akxp.js → chunk-bwd327vf.js} +3 -3
  21. package/dist/{chunk-e2k5akxp.js.map → chunk-bwd327vf.js.map} +2 -2
  22. package/dist/{chunk-v4871k17.js → chunk-es84e2a1.js} +2 -2
  23. package/dist/{chunk-gychaaxb.js → chunk-fjqa7s60.js} +1 -1
  24. package/dist/{chunk-cbzr2eg7.js → chunk-ghy6gn4g.js} +1 -1
  25. package/dist/{chunk-mjaervnt.js → chunk-gj2setdy.js} +1 -1
  26. package/dist/{chunk-hpjqg060.js → chunk-gncq70ga.js} +1 -1
  27. package/dist/{chunk-hzbeqg40.js → chunk-haenvmrp.js} +1 -1
  28. package/dist/{chunk-c97bw1re.js → chunk-kp6wx276.js} +1 -1
  29. package/dist/{chunk-1fs08n6j.js → chunk-mnvzewf8.js} +1 -1
  30. package/dist/{chunk-cpvmftfy.js → chunk-pp10jse0.js} +1 -1
  31. package/dist/{chunk-5bh1vy2a.js → chunk-qy4114a4.js} +1 -1
  32. package/dist/{chunk-0p9jcm4w.js → chunk-rat133ng.js} +3 -3
  33. package/dist/{chunk-v85jqkwg.js → chunk-tp6rd9q1.js} +1 -1
  34. package/dist/{chunk-e1v59k8r.js → chunk-txk5dr5r.js} +1 -1
  35. package/dist/{chunk-6mgdr9jm.js → chunk-vmpxc391.js} +1 -1
  36. package/dist/{chunk-g5q7a8zt.js → chunk-wm448x87.js} +1 -1
  37. package/dist/{chunk-qh9pbhfd.js → chunk-xak5xspk.js} +2 -2
  38. package/dist/{chunk-ykn3pyw0.js → chunk-xdm3d6a3.js} +1 -1
  39. package/dist/{chunk-8fvf22sv.js → chunk-yhrk5bfy.js} +1 -1
  40. package/dist/{chunk-yj6yh651.js → chunk-za0tn4cg.js} +1 -1
  41. package/dist/email/Email.d.ts +1 -0
  42. package/dist/email/Email.d.ts.map +1 -1
  43. package/dist/email/index.js +2 -2
  44. package/dist/email/index.js.map +3 -3
  45. package/dist/facades/index.js +1 -1
  46. package/dist/http/index.js +1 -1
  47. package/dist/i18n/index.js +1 -1
  48. package/dist/kernel/index.js +1 -1
  49. package/dist/server/index.js +1 -1
  50. package/dist/services/index.js +1 -1
  51. package/package.json +1 -1
  52. package/dist/chunk-dwsazw95.js +0 -5
  53. /package/dist/{chunk-wvjzg5z2.js.map → chunk-1gd1fyth.js.map} +0 -0
  54. /package/dist/{chunk-wzba9wy7.js.map → chunk-1sdckzzr.js.map} +0 -0
  55. /package/dist/{chunk-n0wwc7rb.js.map → chunk-21hd56fa.js.map} +0 -0
  56. /package/dist/{chunk-74zbp6jx.js.map → chunk-3vxaqv3c.js.map} +0 -0
  57. /package/dist/{chunk-w4p9g023.js.map → chunk-4pxf7y2s.js.map} +0 -0
  58. /package/dist/{chunk-nxybcsrs.js.map → chunk-513mekrd.js.map} +0 -0
  59. /package/dist/{chunk-tcn3gykx.js.map → chunk-640e07kh.js.map} +0 -0
  60. /package/dist/{chunk-61tk6d6h.js.map → chunk-65z4wbps.js.map} +0 -0
  61. /package/dist/{chunk-rvp6vtqh.js.map → chunk-69wrnjjn.js.map} +0 -0
  62. /package/dist/{chunk-q2h6t84y.js.map → chunk-6g2bsmwf.js.map} +0 -0
  63. /package/dist/{chunk-v4871k17.js.map → chunk-es84e2a1.js.map} +0 -0
  64. /package/dist/{chunk-gychaaxb.js.map → chunk-fjqa7s60.js.map} +0 -0
  65. /package/dist/{chunk-cbzr2eg7.js.map → chunk-ghy6gn4g.js.map} +0 -0
  66. /package/dist/{chunk-mjaervnt.js.map → chunk-gj2setdy.js.map} +0 -0
  67. /package/dist/{chunk-hpjqg060.js.map → chunk-gncq70ga.js.map} +0 -0
  68. /package/dist/{chunk-hzbeqg40.js.map → chunk-haenvmrp.js.map} +0 -0
  69. /package/dist/{chunk-c97bw1re.js.map → chunk-kp6wx276.js.map} +0 -0
  70. /package/dist/{chunk-1fs08n6j.js.map → chunk-mnvzewf8.js.map} +0 -0
  71. /package/dist/{chunk-cpvmftfy.js.map → chunk-pp10jse0.js.map} +0 -0
  72. /package/dist/{chunk-5bh1vy2a.js.map → chunk-qy4114a4.js.map} +0 -0
  73. /package/dist/{chunk-0p9jcm4w.js.map → chunk-rat133ng.js.map} +0 -0
  74. /package/dist/{chunk-v85jqkwg.js.map → chunk-tp6rd9q1.js.map} +0 -0
  75. /package/dist/{chunk-e1v59k8r.js.map → chunk-txk5dr5r.js.map} +0 -0
  76. /package/dist/{chunk-6mgdr9jm.js.map → chunk-vmpxc391.js.map} +0 -0
  77. /package/dist/{chunk-g5q7a8zt.js.map → chunk-wm448x87.js.map} +0 -0
  78. /package/dist/{chunk-qh9pbhfd.js.map → chunk-xak5xspk.js.map} +0 -0
  79. /package/dist/{chunk-ykn3pyw0.js.map → chunk-xdm3d6a3.js.map} +0 -0
  80. /package/dist/{chunk-8fvf22sv.js.map → chunk-yhrk5bfy.js.map} +0 -0
  81. /package/dist/{chunk-yj6yh651.js.map → chunk-za0tn4cg.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Aa as f,Ba as g,va as a,wa as b,xa as c,ya as d,za as e}from"./chunk-e1v59k8r.js";import"./chunk-c97bw1re.js";import"./chunk-cpvmftfy.js";import"./chunk-dwsazw95.js";export{g as fromEnv,c as ENV_SESSION,b as ENV_SECRET,a as ENV_KEY,d as ENV_EXPIRATION,e as ENV_CREDENTIAL_SCOPE,f as ENV_ACCOUNT_ID};
2
+ import{Aa as f,Ba as g,va as a,wa as b,xa as c,ya as d,za as e}from"./chunk-txk5dr5r.js";import"./chunk-kp6wx276.js";import"./chunk-pp10jse0.js";import"./chunk-2vpsbhpm.js";export{g as fromEnv,c as ENV_SESSION,b as ENV_SECRET,a as ENV_KEY,d as ENV_EXPIRATION,e as ENV_CREDENTIAL_SCOPE,f as ENV_ACCOUNT_ID};
3
3
 
4
4
  //# debugId=5CDD920059679F8564756E2164756E21
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{jb as ye}from"./chunk-ykn3pyw0.js";import{mb as Ze,nb as Te}from"./chunk-wzba9wy7.js";import{ob as en}from"./chunk-cbzr2eg7.js";import{pb as At}from"./chunk-hpjqg060.js";import{zb as Hi}from"./chunk-hzbeqg40.js";import{Bb as _,Db as D}from"./chunk-dwsazw95.js";var Rt=_((Gs)=>{var Pt=At(),Xs=(e)=>e[Pt.SMITHY_CONTEXT_KEY]||(e[Pt.SMITHY_CONTEXT_KEY]={}),Zs=(e)=>{if(typeof e==="function")return e;let t=Promise.resolve(e);return()=>t};Gs.getSmithyContext=Xs;Gs.normalizeProvider=Zs});var It=_((rn)=>{var Ut=en(),tn=(e)=>{if(typeof e==="object"){if("url"in e){let t=Ut.parseUrl(e.url);if(e.headers){t.headers={};for(let[r,s]of Object.entries(e.headers))t.headers[r.toLowerCase()]=s.join(", ")}return t}return e}return Ut.parseUrl(e)};rn.toEndpointV1=tn});var Qe=_((wn)=>{var nn=ye(),Dt=Rt(),on=It(),de=(e)=>{if(typeof e==="function")return e();return e},Ye=(e,t,r,s,n)=>({name:t,namespace:e,traits:r,input:s,output:n}),cn=(e)=>(t,r)=>async(s)=>{let{response:n}=await t(s),{operationSchema:o}=Dt.getSmithyContext(r),[,i,c,a,l,d]=o??[];try{let f=await e.protocol.deserializeResponse(Ye(i,c,a,l,d),{...e,...r},n);return{response:n,output:f}}catch(f){if(Object.defineProperty(f,"$response",{value:n,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in f)){try{f.message+=`
2
+ import{jb as ye}from"./chunk-xdm3d6a3.js";import{mb as Ze,nb as Te}from"./chunk-1sdckzzr.js";import{ob as en}from"./chunk-ghy6gn4g.js";import{pb as At}from"./chunk-gncq70ga.js";import{zb as Hi}from"./chunk-haenvmrp.js";import{Bb as _,Db as D}from"./chunk-2vpsbhpm.js";var Rt=_((Gs)=>{var Pt=At(),Xs=(e)=>e[Pt.SMITHY_CONTEXT_KEY]||(e[Pt.SMITHY_CONTEXT_KEY]={}),Zs=(e)=>{if(typeof e==="function")return e;let t=Promise.resolve(e);return()=>t};Gs.getSmithyContext=Xs;Gs.normalizeProvider=Zs});var It=_((rn)=>{var Ut=en(),tn=(e)=>{if(typeof e==="object"){if("url"in e){let t=Ut.parseUrl(e.url);if(e.headers){t.headers={};for(let[r,s]of Object.entries(e.headers))t.headers[r.toLowerCase()]=s.join(", ")}return t}return e}return Ut.parseUrl(e)};rn.toEndpointV1=tn});var Qe=_((wn)=>{var nn=ye(),Dt=Rt(),on=It(),de=(e)=>{if(typeof e==="function")return e();return e},Ye=(e,t,r,s,n)=>({name:t,namespace:e,traits:r,input:s,output:n}),cn=(e)=>(t,r)=>async(s)=>{let{response:n}=await t(s),{operationSchema:o}=Dt.getSmithyContext(r),[,i,c,a,l,d]=o??[];try{let f=await e.protocol.deserializeResponse(Ye(i,c,a,l,d),{...e,...r},n);return{response:n,output:f}}catch(f){if(Object.defineProperty(f,"$response",{value:n,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in f)){try{f.message+=`
3
3
  Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`}catch(h){if(!r.logger||r.logger?.constructor?.name==="NoOpLogger")console.warn("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.");else r.logger?.warn?.("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.")}if(typeof f.$responseBodyText<"u"){if(f.$response)f.$response.body=f.$responseBodyText}try{if(nn.HttpResponse.isInstance(n)){let{headers:h={}}=n,p=Object.entries(h);f.$metadata={httpStatusCode:n.statusCode,requestId:Je(/^x-[\w-]+-request-?id$/,p),extendedRequestId:Je(/^x-[\w-]+-id-2$/,p),cfId:Je(/^x-[\w-]+-cf-id$/,p)}}}catch(h){}}throw f}},Je=(e,t)=>{return(t.find(([r])=>{return r.match(e)})||[void 0,void 0])[1]},an=(e)=>(t,r)=>async(s)=>{let{operationSchema:n}=Dt.getSmithyContext(r),[,o,i,c,a,l]=n??[],d=r.endpointV2?async()=>on.toEndpointV1(r.endpointV2):e.endpoint,f=await e.protocol.serializeRequest(Ye(o,i,c,a,l),s.input,{...e,...r,endpoint:d});return t({...s,request:f})},Bt={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Lt={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function fn(e){return{applyToStack:(t)=>{t.add(an(e),Lt),t.add(cn(e),Bt),e.protocol.setSerdeContext(e)}}}class A{name;namespace;traits;static assign(e,t){return Object.assign(e,t)}static[Symbol.hasInstance](e){let t=this.prototype.isPrototypeOf(e);if(!t&&typeof e==="object"&&e!==null)return e.symbol===this.symbol;return t}getName(){return this.namespace+"#"+this.name}}class be extends A{static symbol=Symbol.for("@smithy/lis");name;traits;valueSchema;symbol=be.symbol}var un=(e,t,r,s)=>A.assign(new be,{name:t,namespace:e,traits:r,valueSchema:s});class we extends A{static symbol=Symbol.for("@smithy/map");name;traits;keySchema;valueSchema;symbol=we.symbol}var hn=(e,t,r,s,n)=>A.assign(new we,{name:t,namespace:e,traits:r,keySchema:s,valueSchema:n});class ge extends A{static symbol=Symbol.for("@smithy/ope");name;traits;input;output;symbol=ge.symbol}var dn=(e,t,r,s,n)=>A.assign(new ge,{name:t,namespace:e,traits:r,input:s,output:n});class re extends A{static symbol=Symbol.for("@smithy/str");name;traits;memberNames;memberList;symbol=re.symbol}var ln=(e,t,r,s,n)=>A.assign(new re,{name:t,namespace:e,traits:r,memberNames:s,memberList:n});class _e extends re{static symbol=Symbol.for("@smithy/err");ctor;symbol=_e.symbol}var pn=(e,t,r,s,n,o)=>A.assign(new _e,{name:t,namespace:e,traits:r,memberNames:s,memberList:n,ctor:null}),le=[];function te(e){if(typeof e==="object")return e;if(e=e|0,le[e])return le[e];let t={},r=0;for(let s of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])if((e>>r++&1)===1)t[s]=1;return le[e]=t}var K={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},pe=[],me={};class q{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=q.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,t){this.ref=e,this.memberName=t;let r=[],s=e,n=e;this._isMemberSchema=!1;while(ve(s))r.push(s[1]),s=s[0],n=de(s),this._isMemberSchema=!0;if(r.length>0){this.memberTraits={};for(let o=r.length-1;o>=0;--o){let i=r[o];Object.assign(this.memberTraits,te(i))}}else this.memberTraits=0;if(n instanceof q){let o=this.memberTraits;Object.assign(this,n),this.memberTraits=Object.assign({},o,n.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=t??n.memberName;return}if(this.schema=de(n),Nt(this.schema))this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3];else this.name=this.memberName??String(n),this.traits=0;if(this._isMemberSchema&&!t)throw Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){let t=this.prototype.isPrototypeOf(e);if(!t&&typeof e==="object"&&e!==null)return e.symbol===this.symbol;return t}static of(e){let t=typeof e==="function"||typeof e==="object"&&e!==null;if(typeof e==="number"){if(pe[e])return pe[e]}else if(typeof e==="string"){if(me[e])return me[e]}else if(t){if(e[K.ns])return e[K.ns]}let r=de(e);if(r instanceof q)return r;if(ve(r)){let[n,o]=r;if(n instanceof q)return Object.assign(n.getMergedTraits(),te(o)),n;throw Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}let s=new q(r);if(t)return e[K.ns]=s;if(typeof r==="string")return me[r]=s;if(typeof r==="number")return pe[r]=s;return s}getSchema(){let e=this.schema;if(Array.isArray(e)&&e[0]===0)return e[4];return e}getName(e=!1){let{name:t}=this;return!e&&t&&t.includes("#")?t.split("#")[1]:t||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){let e=this.getSchema();return typeof e==="number"?e>=64&&e<128:e[0]===1}isMapSchema(){let e=this.getSchema();return typeof e==="number"?e>=128&&e<=255:e[0]===2}isStructSchema(){let e=this.getSchema();if(typeof e!=="object")return!1;let t=e[0];return t===3||t===-3||t===4}isUnionSchema(){let e=this.getSchema();if(typeof e!=="object")return!1;return e[0]===4}isBlobSchema(){let e=this.getSchema();return e===21||e===42}isTimestampSchema(){let e=this.getSchema();return typeof e==="number"&&e>=4&&e<=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:e}=this.getMergedTraits();return!!e||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return te(this.memberTraits)}getOwnTraits(){return te(this.traits)}getKeySchema(){let[e,t]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!t)throw Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);let r=this.getSchema(),s=e?15:r[4]??0;return ee([s,0],"key")}getValueSchema(){let e=this.getSchema(),[t,r,s]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],n=typeof e==="number"?63&e:e&&typeof e==="object"&&(r||s)?e[3+e[0]]:t?15:void 0;if(n!=null)return ee([n,0],r?"value":"member");throw Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(e){let t=this.getSchema();if(this.isStructSchema()&&t[4].includes(e)){let r=t[4].indexOf(e),s=t[5][r];return ee(ve(s)?s:[s,0],e)}if(this.isDocumentSchema())return ee([15,0],e);throw Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${e}.`)}getMemberSchemas(){let e={};try{for(let[t,r]of this.structIterator())e[t]=r}catch(t){}return e}getEventStreamMember(){if(this.isStructSchema()){for(let[e,t]of this.structIterator())if(t.isStreaming()&&t.isStructSchema())return e}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw Error("@smithy/core/schema - cannot iterate non-struct schema.");let e=this.getSchema(),t=e[4].length,r=e[K.it];if(r&&t===r.length){yield*r;return}r=Array(t);for(let s=0;s<t;++s){let n=e[4][s],o=ee([e[5][s],0],n);yield r[s]=[n,o]}e[K.it]=r}}function ee(e,t){if(e instanceof q)return Object.assign(e,{memberName:t,_isMemberSchema:!0});return new q(e,t)}var ve=(e)=>Array.isArray(e)&&e.length===2,Nt=(e)=>Array.isArray(e)&&e.length>=5;class se extends A{static symbol=Symbol.for("@smithy/sim");name;schemaRef;traits;symbol=se.symbol}var mn=(e,t,r,s)=>A.assign(new se,{name:t,namespace:e,traits:s,schemaRef:r}),yn=(e,t,r,s)=>A.assign(new se,{name:t,namespace:e,traits:r,schemaRef:s}),bn={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};class N{namespace;schemas;exceptions;static registries=new Map;constructor(e,t=new Map,r=new Map){this.namespace=e,this.schemas=t,this.exceptions=r}static for(e){if(!N.registries.has(e))N.registries.set(e,new N(e));return N.registries.get(e)}copyFrom(e){let{schemas:t,exceptions:r}=this;for(let[s,n]of e.schemas)if(!t.has(s))t.set(s,n);for(let[s,n]of e.exceptions)if(!r.has(s))r.set(s,n)}register(e,t){let r=this.normalizeShapeId(e);for(let s of[this,N.for(r.split("#")[0])])s.schemas.set(r,t)}getSchema(e){let t=this.normalizeShapeId(e);if(!this.schemas.has(t))throw Error(`@smithy/core/schema - schema not found for ${t}`);return this.schemas.get(t)}registerError(e,t){let r=e,s=r[1];for(let n of[this,N.for(s)])n.schemas.set(s+"#"+r[2],r),n.exceptions.set(r,t)}getErrorCtor(e){let t=e;if(this.exceptions.has(t))return this.exceptions.get(t);return N.for(t[1]).exceptions.get(t)}getBaseException(){for(let e of this.exceptions.keys())if(Array.isArray(e)){let[,t,r]=e,s=t+"#"+r;if(s.startsWith("smithy.ts.sdk.synthetic.")&&s.endsWith("ServiceException"))return e}return}find(e){return[...this.schemas.values()].find(e)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(e){if(e.includes("#"))return e;return this.namespace+"#"+e}}wn.ErrorSchema=_e;wn.ListSchema=be;wn.MapSchema=we;wn.NormalizedSchema=q;wn.OperationSchema=ge;wn.SCHEMA=bn;wn.Schema=A;wn.SimpleSchema=se;wn.StructureSchema=re;wn.TypeRegistry=N;wn.deref=de;wn.deserializerMiddlewareOption=Bt;wn.error=pn;wn.getSchemaSerdePlugin=fn;wn.isStaticSchema=Nt;wn.list=un;wn.map=hn;wn.op=dn;wn.operation=Ye;wn.serializerMiddlewareOption=Lt;wn.sim=mn;wn.simAdapter=yn;wn.simpleSchemaCacheN=pe;wn.simpleSchemaCacheS=me;wn.struct=ln;wn.traitsCache=le;wn.translateTraits=te});var Ct=_((vn)=>{var W=(e,t)=>{let r=[];if(e)r.push(e);if(t)for(let s of t)r.push(s);return r},z=(e,t)=>{return`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`},Xe=()=>{let e=[],t=[],r=!1,s=new Set,n=(f)=>f.sort((u,h)=>qt[h.step]-qt[u.step]||jt[h.priority||"normal"]-jt[u.priority||"normal"]),o=(f)=>{let u=!1,h=(p)=>{let b=W(p.name,p.aliases);if(b.includes(f)){u=!0;for(let y of b)s.delete(y);return!1}return!0};return e=e.filter(h),t=t.filter(h),u},i=(f)=>{let u=!1,h=(p)=>{if(p.middleware===f){u=!0;for(let b of W(p.name,p.aliases))s.delete(b);return!1}return!0};return e=e.filter(h),t=t.filter(h),u},c=(f)=>{return e.forEach((u)=>{f.add(u.middleware,{...u})}),t.forEach((u)=>{f.addRelativeTo(u.middleware,{...u})}),f.identifyOnResolve?.(d.identifyOnResolve()),f},a=(f)=>{let u=[];return f.before.forEach((h)=>{if(h.before.length===0&&h.after.length===0)u.push(h);else u.push(...a(h))}),u.push(f),f.after.reverse().forEach((h)=>{if(h.before.length===0&&h.after.length===0)u.push(h);else u.push(...a(h))}),u},l=(f=!1)=>{let u=[],h=[],p={};return e.forEach((y)=>{let m={...y,before:[],after:[]};for(let w of W(m.name,m.aliases))p[w]=m;u.push(m)}),t.forEach((y)=>{let m={...y,before:[],after:[]};for(let w of W(m.name,m.aliases))p[w]=m;h.push(m)}),h.forEach((y)=>{if(y.toMiddleware){let m=p[y.toMiddleware];if(m===void 0){if(f)return;throw Error(`${y.toMiddleware} is not found when adding ${z(y.name,y.aliases)} middleware ${y.relation} ${y.toMiddleware}`)}if(y.relation==="after")m.after.push(y);if(y.relation==="before")m.before.push(y)}}),n(u).map(a).reduce((y,m)=>{return y.push(...m),y},[])},d={add:(f,u={})=>{let{name:h,override:p,aliases:b}=u,y={step:"initialize",priority:"normal",middleware:f,...u},m=W(h,b);if(m.length>0){if(m.some((w)=>s.has(w))){if(!p)throw Error(`Duplicate middleware name '${z(h,b)}'`);for(let w of m){let S=e.findIndex((O)=>O.name===w||O.aliases?.some((I)=>I===w));if(S===-1)continue;let g=e[S];if(g.step!==y.step||y.priority!==g.priority)throw Error(`"${z(g.name,g.aliases)}" middleware with ${g.priority} priority in ${g.step} step cannot be overridden by "${z(h,b)}" middleware with ${y.priority} priority in ${y.step} step.`);e.splice(S,1)}}for(let w of m)s.add(w)}e.push(y)},addRelativeTo:(f,u)=>{let{name:h,override:p,aliases:b}=u,y={middleware:f,...u},m=W(h,b);if(m.length>0){if(m.some((w)=>s.has(w))){if(!p)throw Error(`Duplicate middleware name '${z(h,b)}'`);for(let w of m){let S=t.findIndex((O)=>O.name===w||O.aliases?.some((I)=>I===w));if(S===-1)continue;let g=t[S];if(g.toMiddleware!==y.toMiddleware||g.relation!==y.relation)throw Error(`"${z(g.name,g.aliases)}" middleware ${g.relation} "${g.toMiddleware}" middleware cannot be overridden by "${z(h,b)}" middleware ${y.relation} "${y.toMiddleware}" middleware.`);t.splice(S,1)}}for(let w of m)s.add(w)}t.push(y)},clone:()=>c(Xe()),use:(f)=>{f.applyToStack(d)},remove:(f)=>{if(typeof f==="string")return o(f);else return i(f)},removeByTag:(f)=>{let u=!1,h=(p)=>{let{tags:b,name:y,aliases:m}=p;if(b&&b.includes(f)){let w=W(y,m);for(let S of w)s.delete(S);return u=!0,!1}return!0};return e=e.filter(h),t=t.filter(h),u},concat:(f)=>{let u=c(Xe());return u.use(f),u.identifyOnResolve(r||u.identifyOnResolve()||(f.identifyOnResolve?.()??!1)),u},applyToStack:c,identify:()=>{return l(!0).map((f)=>{let u=f.step??f.relation+" "+f.toMiddleware;return z(f.name,f.aliases)+" - "+u})},identifyOnResolve(f){if(typeof f==="boolean")r=f;return r},resolve:(f,u)=>{for(let h of l().map((p)=>p.middleware).reverse())f=h(f,u);if(r)console.log(d.identify());return f}};return d},qt={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},jt={high:3,normal:2,low:1};vn.constructStack=Xe});var zt=_((Ft)=>{Object.defineProperty(Ft,"__esModule",{value:!0});Ft.fromBase64=void 0;var Qn=Ze(),Xn=/^[A-Za-z0-9+/]*={0,2}$/,Zn=(e)=>{if(e.length*3%4!==0)throw TypeError("Incorrect padding on base64 string.");if(!Xn.exec(e))throw TypeError("Invalid base64 string.");let t=(0,Qn.fromString)(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)};Ft.fromBase64=Zn});var Jt=_((Wt)=>{Object.defineProperty(Wt,"__esModule",{value:!0});Wt.toBase64=void 0;var Gn=Ze(),Vn=Te(),Kn=(e)=>{let t;if(typeof e==="string")t=(0,Vn.fromUtf8)(e);else t=e;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return(0,Gn.fromArrayBuffer)(t.buffer,t.byteOffset,t.byteLength).toString("base64")};Wt.toBase64=Kn});var k=_((j)=>{var Ee=zt(),Se=Jt();Object.prototype.hasOwnProperty.call(Ee,"__proto__")&&!Object.prototype.hasOwnProperty.call(j,"__proto__")&&Object.defineProperty(j,"__proto__",{enumerable:!0,value:Ee.__proto__});Object.keys(Ee).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(j,e))j[e]=Ee[e]});Object.prototype.hasOwnProperty.call(Se,"__proto__")&&!Object.prototype.hasOwnProperty.call(j,"__proto__")&&Object.defineProperty(j,"__proto__",{enumerable:!0,value:Se.__proto__});Object.keys(Se).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(j,e))j[e]=Se[e]})});var Ge=_((Yt)=>{Object.defineProperty(Yt,"__esModule",{value:!0});Yt.ChecksumStream=void 0;var eo=k(),to=D("stream");class vt extends to.Duplex{expectedChecksum;checksumSourceLocation;checksum;source;base64Encoder;pendingCallback=null;constructor({expectedChecksum:e,checksum:t,source:r,checksumSourceLocation:s,base64Encoder:n}){super();if(typeof r.pipe==="function")this.source=r;else throw Error(`@smithy/util-stream: unsupported source type ${r?.constructor?.name??r} in ChecksumStream.`);this.base64Encoder=n??eo.toBase64,this.expectedChecksum=e,this.checksum=t,this.checksumSourceLocation=s,this.source.pipe(this)}_read(e){if(this.pendingCallback){let t=this.pendingCallback;this.pendingCallback=null,t()}}_write(e,t,r){try{if(this.checksum.update(e),!this.push(e)){this.pendingCallback=r;return}}catch(s){return r(s)}return r()}async _final(e){try{let t=await this.checksum.digest(),r=this.base64Encoder(t);if(this.expectedChecksum!==r)return e(Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${r}" in response header "${this.checksumSourceLocation}".`))}catch(t){return e(t)}return this.push(null),e()}}Yt.ChecksumStream=vt});var C=_((Xt)=>{Object.defineProperty(Xt,"__esModule",{value:!0});Xt.isBlob=Xt.isReadableStream=void 0;var ro=(e)=>typeof ReadableStream==="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream);Xt.isReadableStream=ro;var so=(e)=>{return typeof Blob==="function"&&(e?.constructor?.name===Blob.name||e instanceof Blob)};Xt.isBlob=so});var er=_((Vt)=>{Object.defineProperty(Vt,"__esModule",{value:!0});Vt.ChecksumStream=void 0;var oo=typeof ReadableStream==="function"?ReadableStream:function(){};class Gt extends oo{}Vt.ChecksumStream=Gt});var sr=_((tr)=>{Object.defineProperty(tr,"__esModule",{value:!0});tr.createChecksumStream=void 0;var io=k(),co=C(),ao=er(),fo=({expectedChecksum:e,checksum:t,source:r,checksumSourceLocation:s,base64Encoder:n})=>{if(!(0,co.isReadableStream)(r))throw Error(`@smithy/util-stream: unsupported source type ${r?.constructor?.name??r} in ChecksumStream.`);let o=n??io.toBase64;if(typeof TransformStream!=="function")throw Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let i=new TransformStream({start(){},async transform(a,l){t.update(a),l.enqueue(a)},async flush(a){let l=await t.digest(),d=o(l);if(e!==d){let f=Error(`Checksum mismatch: expected "${e}" but received "${d}" in response header "${s}".`);a.error(f)}else a.terminate()}});r.pipeThrough(i);let c=i.readable;return Object.setPrototypeOf(c,ao.ChecksumStream.prototype),c};tr.createChecksumStream=fo});var or=_((nr)=>{Object.defineProperty(nr,"__esModule",{value:!0});nr.createChecksumStream=po;var uo=C(),ho=Ge(),lo=sr();function po(e){if(typeof ReadableStream==="function"&&(0,uo.isReadableStream)(e.source))return(0,lo.createChecksumStream)(e);return new ho.ChecksumStream(e)}});var Ve=_((cr)=>{Object.defineProperty(cr,"__esModule",{value:!0});cr.ByteArrayCollector=void 0;class ir{allocByteArray;byteLength=0;byteArrays=[];constructor(e){this.allocByteArray=e}push(e){this.byteArrays.push(e),this.byteLength+=e.byteLength}flush(){if(this.byteArrays.length===1){let r=this.byteArrays[0];return this.reset(),r}let e=this.allocByteArray(this.byteLength),t=0;for(let r=0;r<this.byteArrays.length;++r){let s=this.byteArrays[r];e.set(s,t),t+=s.byteLength}return this.reset(),e}reset(){this.byteArrays=[],this.byteLength=0}}cr.ByteArrayCollector=ir});var pr=_((dr)=>{Object.defineProperty(dr,"__esModule",{value:!0});dr.createBufferedReadable=void 0;dr.createBufferedReadableStream=fr;dr.merge=ur;dr.flush=xe;dr.sizeOf=Y;dr.modeOf=hr;var yo=Ve();function fr(e,t,r){let s=e.getReader(),n=!1,o=0,i=["",new yo.ByteArrayCollector((l)=>new Uint8Array(l))],c=-1,a=async(l)=>{let{value:d,done:f}=await s.read(),u=d;if(f){if(c!==-1){let h=xe(i,c);if(Y(h)>0)l.enqueue(h)}l.close()}else{let h=hr(u,!1);if(c!==h){if(c>=0)l.enqueue(xe(i,c));c=h}if(c===-1){l.enqueue(u);return}let p=Y(u);o+=p;let b=Y(i[c]);if(p>=t&&b===0)l.enqueue(u);else{let y=ur(i,c,u);if(!n&&o>t*2)n=!0,r?.warn(`@smithy/util-stream - stream chunk size ${p} is below threshold of ${t}, automatically buffering.`);if(y>=t)l.enqueue(xe(i,c));else await a(l)}}};return new ReadableStream({pull:a})}dr.createBufferedReadable=fr;function ur(e,t,r){switch(t){case 0:return e[0]+=r,Y(e[0]);case 1:case 2:return e[t].push(r),Y(e[t])}}function xe(e,t){switch(t){case 0:let r=e[0];return e[0]="",r;case 1:case 2:return e[t].flush()}throw Error(`@smithy/util-stream - invalid index ${t} given to flush()`)}function Y(e){return e?.byteLength??e?.length??0}function hr(e,t=!0){if(t&&typeof Buffer<"u"&&e instanceof Buffer)return 2;if(e instanceof Uint8Array)return 1;if(typeof e==="string")return 0;return-1}});var br=_((yr)=>{Object.defineProperty(yr,"__esModule",{value:!0});yr.createBufferedReadable=xo;var Eo=D("stream"),mr=Ve(),F=pr(),So=C();function xo(e,t,r){if((0,So.isReadableStream)(e))return(0,F.createBufferedReadableStream)(e,t,r);let s=new Eo.Readable({read(){}}),n=!1,o=0,i=["",new mr.ByteArrayCollector((a)=>new Uint8Array(a)),new mr.ByteArrayCollector((a)=>Buffer.from(new Uint8Array(a)))],c=-1;return e.on("data",(a)=>{let l=(0,F.modeOf)(a,!0);if(c!==l){if(c>=0)s.push((0,F.flush)(i,c));c=l}if(c===-1){s.push(a);return}let d=(0,F.sizeOf)(a);o+=d;let f=(0,F.sizeOf)(i[c]);if(d>=t&&f===0)s.push(a);else{let u=(0,F.merge)(i,c,a);if(!n&&o>t*2)n=!0,r?.warn(`@smithy/util-stream - stream chunk size ${d} is below threshold of ${t}, automatically buffering.`);if(u>=t)s.push((0,F.flush)(i,c))}}),e.on("end",()=>{if(c!==-1){let a=(0,F.flush)(i,c);if((0,F.sizeOf)(a)>0)s.push(a)}s.push(null)}),s}});var _r=_((wr)=>{Object.defineProperty(wr,"__esModule",{value:!0});wr.getAwsChunkedEncodingStream=void 0;var Oo=(e,t)=>{let{base64Encoder:r,bodyLengthChecker:s,checksumAlgorithmFn:n,checksumLocationName:o,streamHasher:i}=t,c=r!==void 0&&s!==void 0&&n!==void 0&&o!==void 0&&i!==void 0,a=c?i(n,e):void 0,l=e.getReader();return new ReadableStream({async pull(d){let{value:f,done:u}=await l.read();if(u){if(d.enqueue(`0\r
4
4
  `),c){let h=r(await a);d.enqueue(`${o}:${h}\r
5
5
  `),d.enqueue(`\r
@@ -15,7 +15,7 @@ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-confi
15
15
  or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return t}constructor(e){this.configProvider=new Promise((t,r)=>{if(typeof e==="function")e().then((s)=>{t(this.resolveDefaultConfig(s))}).catch(r);else t(this.resolveDefaultConfig(e))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t,requestTimeout:r}={}){if(!this.config)this.config=await this.configProvider;let s=this.config,n=e.protocol==="https:";if(!n&&!this.config.httpAgent)this.config.httpAgent=await this.config.httpAgentProvider();return new Promise((o,i)=>{let c=void 0,a=[],l=async(E)=>{await c,a.forEach(P.clearTimeout),o(E)},d=async(E)=>{await c,a.forEach(P.clearTimeout),i(E)};if(t?.aborted){let E=Me(t);d(E);return}let f=e.headers??{},u=(f.Expect??f.expect)==="100-continue",h=n?s.httpsAgent:s.httpAgent;if(u&&!this.externalAgent)h=new(n?$e.Agent:Oe)({keepAlive:!1,maxSockets:1/0});a.push(P.setTimeout(()=>{this.socketWarningTimestamp=Pe.checkSocketUsage(h,this.socketWarningTimestamp,s.logger)},s.socketAcquisitionWarningTimeout??(s.requestTimeout??2000)+(s.connectionTimeout??1000)));let p=Nr.buildQueryString(e.query||{}),b=void 0;if(e.username!=null||e.password!=null){let E=e.username??"",x=e.password??"";b=`${E}:${x}`}let y=e.path;if(p)y+=`?${p}`;if(e.fragment)y+=`#${e.fragment}`;let m=e.hostname??"";if(m[0]==="["&&m.endsWith("]"))m=e.hostname.slice(1,-1);else m=e.hostname;let w={headers:e.headers,host:m,method:e.method,path:y,port:e.port,agent:h,auth:b},g=(n?$e.request:Br)(w,(E)=>{let x=new Lr.HttpResponse({statusCode:E.statusCode||-1,reason:E.statusMessage,headers:jr(E.headers),body:E});l({response:x})});if(g.on("error",(E)=>{if(vo.includes(E.code))d(Object.assign(E,{name:"TimeoutError"}));else d(E)}),t){let E=()=>{g.destroy();let x=Me(t);d(x)};if(typeof t.addEventListener==="function"){let x=t;x.addEventListener("abort",E,{once:!0}),g.once("close",()=>x.removeEventListener("abort",E))}else t.onabort=E}let O=r??s.requestTimeout;a.push(Yo(g,d,s.connectionTimeout)),a.push(Qo(g,d,O,s.throwOnRequestTimeout,s.logger??console)),a.push(Go(g,d,s.socketTimeout));let I=w.agent;if(typeof I==="object"&&"keepAlive"in I)a.push(Zo(g,{keepAlive:I.keepAlive,keepAliveMsecs:I.keepAliveMsecs}));c=Cr(g,e,O,this.externalAgent).catch((E)=>{return a.forEach(P.clearTimeout),i(E)})})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((r)=>{return{...r,[e]:t}})}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(e){let{requestTimeout:t,connectionTimeout:r,socketTimeout:s,socketAcquisitionWarningTimeout:n,httpAgent:o,httpsAgent:i,throwOnRequestTimeout:c,logger:a}=e||{},l=!0,d=50;return{connectionTimeout:r,requestTimeout:t,socketTimeout:s,socketAcquisitionWarningTimeout:n,throwOnRequestTimeout:c,httpAgentProvider:async()=>{let{Agent:f,request:u}=await import("http");if(Br=u,Oe=f,o instanceof Oe||typeof o?.destroy==="function")return this.externalAgent=!0,o;return new Oe({keepAlive:!0,maxSockets:50,...o})},httpsAgent:(()=>{if(i instanceof $e.Agent||typeof i?.destroy==="function")return this.externalAgent=!0,i;return new $e.Agent({keepAlive:!0,maxSockets:50,...i})})(),logger:a}}}class Fr{sessions=[];constructor(e){this.sessions=e??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(e){this.sessions.push(e)}contains(e){return this.sessions.includes(e)}remove(e){this.sessions=this.sessions.filter((t)=>t!==e)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(e){for(let t of this.sessions)if(t===e){if(!t.destroyed)t.destroy()}}}class Hr{constructor(e){if(this.config=e,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw RangeError("maxConcurrency must be greater than zero.")}config;sessionCache=new Map;lease(e,t){let r=this.getUrlString(e),s=this.sessionCache.get(r);if(s){let c=s.poll();if(c&&!this.config.disableConcurrency)return c}let n=tt.connect(r);if(this.config.maxConcurrency)n.settings({maxConcurrentStreams:this.config.maxConcurrency},(c)=>{if(c)throw Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+e.destination.toString())});n.unref();let o=()=>{n.destroy(),this.deleteSession(r,n)};if(n.on("goaway",o),n.on("error",o),n.on("frameError",o),n.on("close",()=>this.deleteSession(r,n)),t.requestTimeout)n.setTimeout(t.requestTimeout,o);let i=this.sessionCache.get(r)||new Fr;return i.offerLast(n),this.sessionCache.set(r,i),n}deleteSession(e,t){let r=this.sessionCache.get(e);if(!r)return;if(!r.contains(t))return;r.remove(t),this.sessionCache.set(e,r)}release(e,t){let r=this.getUrlString(e);this.sessionCache.get(r)?.offerLast(t)}destroy(){for(let[e,t]of this.sessionCache){for(let r of t){if(!r.destroyed)r.destroy();t.remove(r)}this.sessionCache.delete(e)}}setMaxConcurrentStreams(e){if(e&&e<=0)throw RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=e}setDisableConcurrentStreams(e){this.config.disableConcurrency=e}getUrlString(e){return e.destination.toString()}}class rt{config;configProvider;metadata={handlerProtocol:"h2"};connectionManager=new Hr({});static create(e){if(typeof e?.handle==="function")return e;return new rt(e)}constructor(e){this.configProvider=new Promise((t,r)=>{if(typeof e==="function")e().then((s)=>{t(s||{})}).catch(r);else t(e||{})})}destroy(){this.connectionManager.destroy()}async handle(e,{abortSignal:t,requestTimeout:r}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}let{requestTimeout:s,disableConcurrentStreams:n}=this.config,o=r??s;return new Promise((i,c)=>{let a=!1,l=void 0,d=async($)=>{await l,i($)},f=async($)=>{await l,c($)};if(t?.aborted){a=!0;let $=Me(t);f($);return}let{hostname:u,method:h,port:p,protocol:b,query:y}=e,m="";if(e.username!=null||e.password!=null){let $=e.username??"",B=e.password??"";m=`${$}:${B}@`}let w=`${b}//${m}${u}${p?`:${p}`:""}`,S={destination:new URL(w)},g=this.connectionManager.lease(S,{requestTimeout:this.config?.sessionTimeout,disableConcurrentStreams:n||!1}),O=($)=>{if(n)this.destroySession(g);a=!0,f($)},I=Nr.buildQueryString(y||{}),E=e.path;if(I)E+=`?${I}`;if(e.fragment)E+=`#${e.fragment}`;let x=g.request({...e.headers,[tt.constants.HTTP2_HEADER_PATH]:E,[tt.constants.HTTP2_HEADER_METHOD]:h});if(g.ref(),x.on("response",($)=>{let B=new Lr.HttpResponse({statusCode:$[":status"]||-1,headers:jr($),body:x});if(a=!0,d({response:B}),n)g.close(),this.connectionManager.deleteSession(w,g)}),o)x.setTimeout(o,()=>{x.close();let $=Error(`Stream timed out because of no activity for ${o} ms`);$.name="TimeoutError",O($)});if(t){let $=()=>{x.close();let B=Me(t);O(B)};if(typeof t.addEventListener==="function"){let B=t;B.addEventListener("abort",$,{once:!0}),x.once("close",()=>B.removeEventListener("abort",$))}else t.onabort=$}x.on("frameError",($,B,Qs)=>{O(Error(`Frame type id ${$} in stream id ${Qs} has failed with code ${B}.`))}),x.on("error",O),x.on("aborted",()=>{O(Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${x.rstCode}.`))}),x.on("close",()=>{if(g.unref(),n)g.destroy();if(!a)O(Error("Unexpected error: http2 request did not get a response"))}),l=Cr(x,e,o)})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((r)=>{return{...r,[e]:t}})}httpHandlerConfigs(){return this.config??{}}destroySession(e){if(!e.destroyed)e.destroy()}}class zr extends qr.Writable{bufferedBytes=[];_write(e,t,r){this.bufferedBytes.push(e),r()}}var ei=(e)=>{if(ti(e))return ri(e);return new Promise((t,r)=>{let s=new zr;e.pipe(s),e.on("error",(n)=>{s.end(),r(n)}),s.on("error",r),s.on("finish",function(){let n=new Uint8Array(Buffer.concat(this.bufferedBytes));t(n)})})},ti=(e)=>typeof ReadableStream==="function"&&e instanceof ReadableStream;async function ri(e){let t=[],r=e.getReader(),s=!1,n=0;while(!s){let{done:c,value:a}=await r.read();if(a)t.push(a),n+=a.length;s=c}let o=new Uint8Array(n),i=0;for(let c of t)o.set(c,i),i+=c.length;return o}si.DEFAULT_REQUEST_TIMEOUT=Ko;si.NodeHttp2Handler=rt;si.NodeHttpHandler=Pe;si.streamCollector=ei});var Yr=_((mi)=>{var kr=ye(),ai=et(),fi=k();function Jr(e,t){return new Request(e,t)}function ui(e=0){return new Promise((t,r)=>{if(e)setTimeout(()=>{let s=Error(`Request did not complete within ${e} ms`);s.name="TimeoutError",r(s)},e)})}var Ae={supported:void 0};class st{config;configProvider;static create(e){if(typeof e?.handle==="function")return e;return new st(e)}constructor(e){if(typeof e==="function")this.configProvider=e().then((t)=>t||{});else this.config=e??{},this.configProvider=Promise.resolve(this.config);if(Ae.supported===void 0)Ae.supported=Boolean(typeof Request<"u"&&"keepalive"in Jr("https://[::1]"))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:r}={}){if(!this.config)this.config=await this.configProvider;let s=r??this.config.requestTimeout,n=this.config.keepAlive===!0,o=this.config.credentials;if(t?.aborted){let m=vr(t);return Promise.reject(m)}let i=e.path,c=ai.buildQueryString(e.query||{});if(c)i+=`?${c}`;if(e.fragment)i+=`#${e.fragment}`;let a="";if(e.username!=null||e.password!=null){let m=e.username??"",w=e.password??"";a=`${m}:${w}@`}let{port:l,method:d}=e,f=`${e.protocol}//${a}${e.hostname}${l?`:${l}`:""}${i}`,u=d==="GET"||d==="HEAD"?void 0:e.body,h={body:u,headers:new Headers(e.headers),method:d,credentials:o};if(this.config?.cache)h.cache=this.config.cache;if(u)h.duplex="half";if(typeof AbortController<"u")h.signal=t;if(Ae.supported)h.keepalive=n;if(typeof this.config.requestInit==="function")Object.assign(h,this.config.requestInit(e));let p=()=>{},b=Jr(f,h),y=[fetch(b).then((m)=>{let w=m.headers,S={};for(let O of w.entries())S[O[0]]=O[1];if(m.body==null)return m.blob().then((O)=>({response:new kr.HttpResponse({headers:S,reason:m.statusText,statusCode:m.status,body:O})}));return{response:new kr.HttpResponse({headers:S,reason:m.statusText,statusCode:m.status,body:m.body})}}),ui(s)];if(t)y.push(new Promise((m,w)=>{let S=()=>{let g=vr(t);w(g)};if(typeof t.addEventListener==="function"){let g=t;g.addEventListener("abort",S,{once:!0}),p=()=>g.removeEventListener("abort",S)}else t.onabort=S}));return Promise.race(y).finally(p)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((r)=>{return r[e]=t,r})}httpHandlerConfigs(){return this.config??{}}}function vr(e){let t=e&&typeof e==="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){let n=Error("Request aborted");return n.name="AbortError",n.cause=t,n}let s=Error(String(t));return s.name="AbortError",s}let r=Error("Request aborted");return r.name="AbortError",r}var hi=async(e)=>{if(typeof Blob==="function"&&e instanceof Blob||e.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==void 0)return new Uint8Array(await e.arrayBuffer());return di(e)}return li(e)};async function di(e){let t=await pi(e),r=fi.fromBase64(t);return new Uint8Array(r)}async function li(e){let t=[],r=e.getReader(),s=!1,n=0;while(!s){let{done:c,value:a}=await r.read();if(a)t.push(a),n+=a.length;s=c}let o=new Uint8Array(n),i=0;for(let c of t)o.set(c,i),i+=c.length;return o}function pi(e){return new Promise((t,r)=>{let s=new FileReader;s.onloadend=()=>{if(s.readyState!==2)return r(Error("Reader aborted too early"));let n=s.result??"",o=n.indexOf(","),i=o>-1?o+1:n.length;t(n.substring(i))},s.onabort=()=>r(Error("Read aborted")),s.onerror=()=>r(s.error),s.readAsDataURL(e)})}mi.FetchHttpHandler=st;mi.keepAliveSupport=Ae;mi.streamCollector=hi});var Xr=_((Ti)=>{var Qr={},nt={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();if(t.length===1)t=`0${t}`;Qr[e]=t,nt[t]=e}function gi(e){if(e.length%2!==0)throw Error("Hex encoded strings must have an even number length");let t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){let s=e.slice(r,r+2).toLowerCase();if(s in nt)t[r/2]=nt[s];else throw Error(`Cannot decode unrecognized sequence ${s} as hexadecimal`)}return t}function _i(e){let t="";for(let r=0;r<e.byteLength;r++)t+=Qr[e[r]];return t}Ti.fromHex=gi;Ti.toHex=_i});var ts=_((Kr)=>{Object.defineProperty(Kr,"__esModule",{value:!0});Kr.sdkStreamMixin=void 0;var xi=Yr(),$i=k(),Oi=Xr(),Mi=Te(),Zr=C(),Gr="The stream has already been transformed.",Pi=(e)=>{if(!Vr(e)&&!(0,Zr.isReadableStream)(e)){let n=e?.__proto__?.constructor?.name||e;throw Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${n}`)}let t=!1,r=async()=>{if(t)throw Error(Gr);return t=!0,await(0,xi.streamCollector)(e)},s=(n)=>{if(typeof n.stream!=="function")throw Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
16
16
  If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return n.stream()};return Object.assign(e,{transformToByteArray:r,transformToString:async(n)=>{let o=await r();if(n==="base64")return(0,$i.toBase64)(o);else if(n==="hex")return(0,Oi.toHex)(o);else if(n===void 0||n==="utf8"||n==="utf-8")return(0,Mi.toUtf8)(o);else if(typeof TextDecoder==="function")return new TextDecoder(n).decode(o);else throw Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw Error(Gr);if(t=!0,Vr(e))return s(e);else if((0,Zr.isReadableStream)(e))return e;else throw Error(`Cannot transform payload to web stream, got ${e}`)}})};Kr.sdkStreamMixin=Pi;var Vr=(e)=>typeof Blob==="function"&&e instanceof Blob});var os=_((ss)=>{Object.defineProperty(ss,"__esModule",{value:!0});ss.sdkStreamMixin=void 0;var Ai=Wr(),Ri=Ze(),ot=D("stream"),Ui=ts(),rs="The stream has already been transformed.",Ii=(e)=>{if(!(e instanceof ot.Readable))try{return(0,Ui.sdkStreamMixin)(e)}catch(s){let n=e?.__proto__?.constructor?.name||e;throw Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${n}`)}let t=!1,r=async()=>{if(t)throw Error(rs);return t=!0,await(0,Ai.streamCollector)(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async(s)=>{let n=await r();if(s===void 0||Buffer.isEncoding(s))return(0,Ri.fromArrayBuffer)(n.buffer,n.byteOffset,n.byteLength).toString(s);else return new TextDecoder(s).decode(n)},transformToWebStream:()=>{if(t)throw Error(rs);if(e.readableFlowing!==null)throw Error("The stream has been consumed by other callbacks.");if(typeof ot.Readable.toWeb!=="function")throw Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return t=!0,ot.Readable.toWeb(e)}})};ss.sdkStreamMixin=Ii});var cs=_((is)=>{Object.defineProperty(is,"__esModule",{value:!0});is.splitStream=Di;async function Di(e){if(typeof e.stream==="function")e=e.stream();return e.tee()}});var hs=_((us)=>{Object.defineProperty(us,"__esModule",{value:!0});us.splitStream=Ni;var as=D("stream"),Li=cs(),fs=C();async function Ni(e){if((0,fs.isReadableStream)(e)||(0,fs.isBlob)(e))return(0,Li.splitStream)(e);let t=new as.PassThrough,r=new as.PassThrough;return e.pipe(t),e.pipe(r),[t,r]}});var ms=_((T)=>{var ds=k(),ls=Te(),Re=Ge(),Ue=or(),Ie=br(),De=Er(),Be=Pr(),Le=os(),Ne=hs(),ps=C();class ne extends Uint8Array{static fromString(e,t="utf-8"){if(typeof e==="string"){if(t==="base64")return ne.mutate(ds.fromBase64(e));return ne.mutate(ls.fromUtf8(e))}throw Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,ne.prototype),e}transformToString(e="utf-8"){if(e==="base64")return ds.toBase64(this);return ls.toUtf8(this)}}T.isBlob=ps.isBlob;T.isReadableStream=ps.isReadableStream;T.Uint8ArrayBlobAdapter=ne;Object.prototype.hasOwnProperty.call(Re,"__proto__")&&!Object.prototype.hasOwnProperty.call(T,"__proto__")&&Object.defineProperty(T,"__proto__",{enumerable:!0,value:Re.__proto__});Object.keys(Re).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(T,e))T[e]=Re[e]});Object.prototype.hasOwnProperty.call(Ue,"__proto__")&&!Object.prototype.hasOwnProperty.call(T,"__proto__")&&Object.defineProperty(T,"__proto__",{enumerable:!0,value:Ue.__proto__});Object.keys(Ue).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(T,e))T[e]=Ue[e]});Object.prototype.hasOwnProperty.call(Ie,"__proto__")&&!Object.prototype.hasOwnProperty.call(T,"__proto__")&&Object.defineProperty(T,"__proto__",{enumerable:!0,value:Ie.__proto__});Object.keys(Ie).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(T,e))T[e]=Ie[e]});Object.prototype.hasOwnProperty.call(De,"__proto__")&&!Object.prototype.hasOwnProperty.call(T,"__proto__")&&Object.defineProperty(T,"__proto__",{enumerable:!0,value:De.__proto__});Object.keys(De).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(T,e))T[e]=De[e]});Object.prototype.hasOwnProperty.call(Be,"__proto__")&&!Object.prototype.hasOwnProperty.call(T,"__proto__")&&Object.defineProperty(T,"__proto__",{enumerable:!0,value:Be.__proto__});Object.keys(Be).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(T,e))T[e]=Be[e]});Object.prototype.hasOwnProperty.call(Le,"__proto__")&&!Object.prototype.hasOwnProperty.call(T,"__proto__")&&Object.defineProperty(T,"__proto__",{enumerable:!0,value:Le.__proto__});Object.keys(Le).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(T,e))T[e]=Le[e]});Object.prototype.hasOwnProperty.call(Ne,"__proto__")&&!Object.prototype.hasOwnProperty.call(T,"__proto__")&&Object.defineProperty(T,"__proto__",{enumerable:!0,value:Ne.__proto__});Object.keys(Ne).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(T,e))T[e]=Ne[e]})});var gs=_((bs)=>{Object.defineProperty(bs,"__esModule",{value:!0});bs.randomUUID=void 0;var zi=Hi(),ys=zi.__importDefault(D("crypto"));bs.randomUUID=ys.default.randomUUID.bind(ys.default)});var Ts=_((ki)=>{var _s=gs(),M=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),Wi=()=>{if(_s.randomUUID)return _s.randomUUID();let e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,M[e[0]]+M[e[1]]+M[e[2]]+M[e[3]]+"-"+M[e[4]]+M[e[5]]+"-"+M[e[6]]+M[e[7]]+"-"+M[e[8]]+M[e[9]]+"-"+M[e[10]]+M[e[11]]+M[e[12]]+M[e[13]]+M[e[14]]+M[e[15]]};ki.v4=Wi});var bt=_((Fc)=>{var vi=Ts(),Yi=(e,t,r=(s)=>s)=>e,Qi=(e)=>{switch(e){case"true":return!0;case"false":return!1;default:throw Error(`Unable to parse boolean value "${e}"`)}},Xi=(e)=>{if(e===null||e===void 0)return;if(typeof e==="number"){if(e===0||e===1)ae.warn(je(`Expected boolean, got ${typeof e}: ${e}`));if(e===0)return!1;if(e===1)return!0}if(typeof e==="string"){let t=e.toLowerCase();if(t==="false"||t==="true")ae.warn(je(`Expected boolean, got ${typeof e}: ${e}`));if(t==="false")return!1;if(t==="true")return!0}if(typeof e==="boolean")return e;throw TypeError(`Expected boolean, got ${typeof e}: ${e}`)},ie=(e)=>{if(e===null||e===void 0)return;if(typeof e==="string"){let t=parseFloat(e);if(!Number.isNaN(t)){if(String(t)!==String(e))ae.warn(je(`Expected number but observed string: ${e}`));return t}}if(typeof e==="number")return e;throw TypeError(`Expected number, got ${typeof e}: ${e}`)},Zi=Math.ceil(340282346638528860000000000000000000000),qe=(e)=>{let t=ie(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0){if(Math.abs(t)>Zi)throw TypeError(`Expected 32-bit float, got ${e}`)}return t},ce=(e)=>{if(e===null||e===void 0)return;if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw TypeError(`Expected integer, got ${typeof e}: ${e}`)},Gi=ce,ct=(e)=>ut(e,32),at=(e)=>ut(e,16),ft=(e)=>ut(e,8),ut=(e,t)=>{let r=ce(e);if(r!==void 0&&Vi(r,t)!==r)throw TypeError(`Expected ${t}-bit integer, got ${e}`);return r},Vi=(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]}},Ki=(e,t)=>{if(e===null||e===void 0){if(t)throw TypeError(`Expected a non-null value for ${t}`);throw TypeError("Expected a non-null value")}return e},Ss=(e)=>{if(e===null||e===void 0)return;if(typeof e==="object"&&!Array.isArray(e))return e;let t=Array.isArray(e)?"array":typeof e;throw TypeError(`Expected object, got ${t}: ${e}`)},ec=(e)=>{if(e===null||e===void 0)return;if(typeof e==="string")return e;if(["boolean","number","bigint"].includes(typeof e))return ae.warn(je(`Expected string, got ${typeof e}: ${e}`)),String(e);throw TypeError(`Expected string, got ${typeof e}: ${e}`)},tc=(e)=>{if(e===null||e===void 0)return;let t=Ss(e),r=Object.entries(t).filter(([,s])=>s!=null).map(([s])=>s);if(r.length===0)throw TypeError("Unions must have exactly one non-null member. None were found.");if(r.length>1)throw TypeError(`Unions must have exactly one non-null member. Keys ${r} were not null.`);return t},ht=(e)=>{if(typeof e=="string")return ie(Z(e));return ie(e)},rc=ht,xs=(e)=>{if(typeof e=="string")return qe(Z(e));return qe(e)},sc=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Z=(e)=>{let t=e.match(sc);if(t===null||t[0].length!==e.length)throw TypeError("Expected real number, got implicit NaN");return parseFloat(e)},dt=(e)=>{if(typeof e=="string")return $s(e);return ie(e)},nc=dt,oc=dt,ic=(e)=>{if(typeof e=="string")return $s(e);return qe(e)},$s=(e)=>{switch(e){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw Error(`Unable to parse float value: ${e}`)}},Os=(e)=>{if(typeof e==="string")return ce(Z(e));return ce(e)},cc=Os,ac=(e)=>{if(typeof e==="string")return ct(Z(e));return ct(e)},Q=(e)=>{if(typeof e==="string")return at(Z(e));return at(e)},Ms=(e)=>{if(typeof e==="string")return ft(Z(e));return ft(e)},je=(e)=>{return String(TypeError(e).stack||e).split(`
17
17
  `).slice(0,5).filter((t)=>!t.includes("stackTraceWarning")).join(`
18
- `)},ae={warn:console.warn},fc=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],lt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function uc(e){let t=e.getUTCFullYear(),r=e.getUTCMonth(),s=e.getUTCDay(),n=e.getUTCDate(),o=e.getUTCHours(),i=e.getUTCMinutes(),c=e.getUTCSeconds(),a=n<10?`0${n}`:`${n}`,l=o<10?`0${o}`:`${o}`,d=i<10?`0${i}`:`${i}`,f=c<10?`0${c}`:`${c}`;return`${fc[s]}, ${a} ${lt[r]} ${t} ${l}:${d}:${f} GMT`}var hc=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),dc=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw TypeError("RFC-3339 date-times must be expressed as strings");let t=hc.exec(e);if(!t)throw TypeError("Invalid RFC-3339 date-time value");let[r,s,n,o,i,c,a,l]=t,d=Q(X(s)),f=L(n,"month",1,12),u=L(o,"day",1,31);return oe(d,f,u,{hours:i,minutes:c,seconds:a,fractionalMilliseconds:l})},lc=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),pc=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw TypeError("RFC-3339 date-times must be expressed as strings");let t=lc.exec(e);if(!t)throw TypeError("Invalid RFC-3339 date-time value");let[r,s,n,o,i,c,a,l,d]=t,f=Q(X(s)),u=L(n,"month",1,12),h=L(o,"day",1,31),p=oe(f,u,h,{hours:i,minutes:c,seconds:a,fractionalMilliseconds:l});if(d.toUpperCase()!="Z")p.setTime(p.getTime()-Mc(d));return p},mc=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$/),yc=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$/),bc=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})$/),wc=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw TypeError("RFC-7231 date-times must be expressed as strings");let t=mc.exec(e);if(t){let[r,s,n,o,i,c,a,l]=t;return oe(Q(X(o)),it(n),L(s,"day",1,31),{hours:i,minutes:c,seconds:a,fractionalMilliseconds:l})}if(t=yc.exec(e),t){let[r,s,n,o,i,c,a,l]=t;return Ec(oe(_c(o),it(n),L(s,"day",1,31),{hours:i,minutes:c,seconds:a,fractionalMilliseconds:l}))}if(t=bc.exec(e),t){let[r,s,n,o,i,c,a,l]=t;return oe(Q(X(l)),it(s),L(n.trimLeft(),"day",1,31),{hours:o,minutes:i,seconds:c,fractionalMilliseconds:a})}throw TypeError("Invalid RFC-7231 date-time value")},gc=(e)=>{if(e===null||e===void 0)return;let t;if(typeof e==="number")t=e;else if(typeof e==="string")t=ht(e);else if(typeof e==="object"&&e.tag===1)t=e.value;else throw 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 TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(t*1000))},oe=(e,t,r,s)=>{let n=t-1;return xc(e,n,r),new Date(Date.UTC(e,n,r,L(s.hours,"hour",0,23),L(s.minutes,"minute",0,59),L(s.seconds,"seconds",0,60),Oc(s.fractionalMilliseconds)))},_c=(e)=>{let t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+Q(X(e));if(r<t)return r+100;return r},Tc=1576800000000,Ec=(e)=>{if(e.getTime()-new Date().getTime()>Tc)return new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()));return e},it=(e)=>{let t=lt.indexOf(e);if(t<0)throw TypeError(`Invalid month: ${e}`);return t+1},Sc=[31,28,31,30,31,30,31,31,30,31,30,31],xc=(e,t,r)=>{let s=Sc[t];if(t===1&&$c(e))s=29;if(r>s)throw TypeError(`Invalid day for ${lt[t]} in ${e}: ${r}`)},$c=(e)=>{return e%4===0&&(e%100!==0||e%400===0)},L=(e,t,r,s)=>{let n=Ms(X(e));if(n<r||n>s)throw TypeError(`${t} must be between ${r} and ${s}, inclusive`);return n},Oc=(e)=>{if(e===null||e===void 0)return 0;return xs("0."+e)*1000},Mc=(e)=>{let t=e[0],r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw TypeError(`Offset direction, ${t}, must be "+" or "-"`);let s=Number(e.substring(1,3)),n=Number(e.substring(4,6));return r*(s*60+n)*60*1000},X=(e)=>{let t=0;while(t<e.length-1&&e.charAt(t)==="0")t++;if(t===0)return e;return e.slice(t)},J=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};J.from=(e)=>{if(e&&typeof e==="object"&&(e instanceof J||("deserializeJSON"in e)))return e;else if(typeof e==="string"||Object.getPrototypeOf(e)===String.prototype)return J(String(e));return J(JSON.stringify(e))};J.fromObject=J.from;function Pc(e){if(e.includes(",")||e.includes('"'))e=`"${e.replace(/"/g,"\\\"")}"`;return e}var pt="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",mt="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",yt="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",Ps="(\\d?\\d)",As="(\\d{4})",Ac=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),Rc=new RegExp(`^${pt}, ${Ps} ${mt} ${As} ${yt} GMT$`),Uc=new RegExp(`^${pt}, ${Ps}-${mt}-(\\d\\d) ${yt} GMT$`),Ic=new RegExp(`^${pt} ${mt} ( [1-9]|\\d\\d) ${yt} ${As}$`),Dc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Bc=(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 TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else if(typeof e==="object"&&e.tag===1)t=e.value;if(isNaN(t)||Math.abs(t)===1/0)throw TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1000))},Lc=(e)=>{if(e==null)return;if(typeof e!=="string")throw TypeError("RFC3339 timestamps must be strings");let t=Ac.exec(e);if(!t)throw TypeError(`Invalid RFC3339 timestamp format ${e}`);let[,r,s,n,o,i,c,,a,l]=t;H(s,1,12),H(n,1,31),H(o,0,23),H(i,0,59),H(c,0,60);let d=new Date(Date.UTC(Number(r),Number(s)-1,Number(n),Number(o),Number(i),Number(c),Number(a)?Math.round(parseFloat(`0.${a}`)*1000):0));if(d.setUTCFullYear(Number(r)),l.toUpperCase()!="Z"){let[,f,u,h]=/([+-])(\d\d):(\d\d)/.exec(l)||[void 0,"+",0,0],p=f==="-"?1:-1;d.setTime(d.getTime()+p*(Number(u)*60*60*1000+Number(h)*60*1000))}return d},Nc=(e)=>{if(e==null)return;if(typeof e!=="string")throw TypeError("RFC7231 timestamps must be strings.");let t,r,s,n,o,i,c,a;if(a=Rc.exec(e))[,t,r,s,n,o,i,c]=a;else if(a=Uc.exec(e))[,t,r,s,n,o,i,c]=a,s=(Number(s)+1900).toString();else if(a=Ic.exec(e))[,r,t,n,o,i,c,s]=a;if(s&&i){let l=Date.UTC(Number(s),Dc.indexOf(r),Number(t),Number(n),Number(o),Number(i),c?Math.round(parseFloat(`0.${c}`)*1000):0);H(t,1,31),H(n,0,23),H(o,0,59),H(i,0,60);let d=new Date(l);return d.setUTCFullYear(Number(s)),d}throw TypeError(`Invalid RFC7231 date-time value ${e}.`)};function H(e,t,r){let s=Number(e);if(s<t||s>r)throw Error(`Value ${s} out of range [${t}, ${r}]`)}function qc(e,t,r){if(r<=0||!Number.isInteger(r))throw Error("Invalid number of delimiters ("+r+") for splitEvery.");let s=e.split(t);if(r===1)return s;let n=[],o="";for(let i=0;i<s.length;i++){if(o==="")o=s[i];else o+=t+s[i];if((i+1)%r===0)n.push(o),o=""}if(o!=="")n.push(o);return n}var jc=(e)=>{let t=e.length,r=[],s=!1,n=void 0,o=0;for(let i=0;i<t;++i){let c=e[i];switch(c){case'"':if(n!=="\\")s=!s;break;case",":if(!s)r.push(e.slice(o,i)),o=i+1;break}n=c}return r.push(e.slice(o)),r.map((i)=>{i=i.trim();let c=i.length;if(c<2)return i;if(i[0]==='"'&&i[c-1]==='"')i=i.slice(1,c-1);return i.replace(/\\"/g,'"')})},Es=/^-?\d*(\.\d+)?$/;class Ce{string;type;constructor(e,t){if(this.string=e,this.type=t,!Es.test(e))throw Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](e){if(!e||typeof e!=="object")return!1;let t=e;return Ce.prototype.isPrototypeOf(e)||t.type==="bigDecimal"&&Es.test(t.string)}}function Cc(e){return new Ce(String(e),"bigDecimal")}Fc.generateIdempotencyToken=vi.v4;Fc.LazyJsonString=J;Fc.NumericValue=Ce;Fc._parseEpochTimestamp=Bc;Fc._parseRfc3339DateTimeWithOffset=Lc;Fc._parseRfc7231DateTime=Nc;Fc.copyDocumentWithTransform=Yi;Fc.dateToUtcString=uc;Fc.expectBoolean=Xi;Fc.expectByte=ft;Fc.expectFloat32=qe;Fc.expectInt=Gi;Fc.expectInt32=ct;Fc.expectLong=ce;Fc.expectNonNull=Ki;Fc.expectNumber=ie;Fc.expectObject=Ss;Fc.expectShort=at;Fc.expectString=ec;Fc.expectUnion=tc;Fc.handleFloat=nc;Fc.limitedParseDouble=dt;Fc.limitedParseFloat=oc;Fc.limitedParseFloat32=ic;Fc.logger=ae;Fc.nv=Cc;Fc.parseBoolean=Qi;Fc.parseEpochTimestamp=gc;Fc.parseRfc3339DateTime=dc;Fc.parseRfc3339DateTimeWithOffset=pc;Fc.parseRfc7231DateTime=wc;Fc.quoteHeader=Pc;Fc.splitEvery=qc;Fc.splitHeader=jc;Fc.strictParseByte=Ms;Fc.strictParseDouble=ht;Fc.strictParseFloat=rc;Fc.strictParseFloat32=xs;Fc.strictParseInt=cc;Fc.strictParseInt32=ac;Fc.strictParseLong=Os;Fc.strictParseShort=Q});var Ls=_((Ra)=>{var Fe=ms(),R=Qe(),U=bt(),fe=ye(),He=k(),wt=Te(),v=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Fe.Uint8ArrayBlobAdapter.mutate(e);if(!e)return Fe.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let r=t.streamCollector(e);return Fe.Uint8ArrayBlobAdapter.mutate(await r)};function ue(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}class G{serdeContext;setSerdeContext(e){this.serdeContext=e}}class ze extends G{options;compositeErrorRegistry;constructor(e){super();this.options=e,this.compositeErrorRegistry=R.TypeRegistry.for(e.defaultNamespace);for(let t of e.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(t)}getRequestType(){return fe.HttpRequest}getResponseType(){return fe.HttpResponse}setSerdeContext(e){if(this.serdeContext=e,this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e),this.getPayloadCodec())this.getPayloadCodec().setSerdeContext(e)}updateServiceEndpoint(e,t){if("url"in t){if(e.protocol=t.url.protocol,e.hostname=t.url.hostname,e.port=t.url.port?Number(t.url.port):void 0,e.path=t.url.pathname,e.fragment=t.url.hash||void 0,e.username=t.url.username||void 0,e.password=t.url.password||void 0,!e.query)e.query={};for(let[r,s]of t.url.searchParams.entries())e.query[r]=s;if(t.headers)for(let[r,s]of Object.entries(t.headers))e.headers[r]=s.join(", ");return e}else{if(e.protocol=t.protocol,e.hostname=t.hostname,e.port=t.port?Number(t.port):void 0,e.path=t.path,e.query={...t.query},t.headers)for(let[r,s]of Object.entries(t.headers))e.headers[r]=s;return e}}setHostPrefix(e,t,r){if(this.serdeContext?.disableHostPrefix)return;let s=R.NormalizedSchema.of(t.input),n=R.translateTraits(t.traits??{});if(n.endpoint){let o=n.endpoint?.[0];if(typeof o==="string"){let i=[...s.structIterator()].filter(([,c])=>c.getMergedTraits().hostLabel);for(let[c]of i){let a=r[c];if(typeof a!=="string")throw Error(`@smithy/core/schema - ${c} in input must be a string as hostLabel.`);o=o.replace(`{${c}}`,a)}e.hostname=o+e.hostname}}}deserializeMetadata(e){return{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"]}}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:r}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:e,requestSchema:t,initialRequest:r})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:r}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:r})}async loadEventStreamCapability(){let{EventStreamSerde:e}=await import("./chunk-n0wwc7rb.js");return new e({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(e,t,r,s,n){return[]}getEventStreamMarshaller(){let e=this.serdeContext;if(!e.eventStreamMarshaller)throw Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return e.eventStreamMarshaller}}class Rs extends ze{async serializeRequest(e,t,r){let s={...t??{}},n=this.serializer,o={},i={},c=await r.endpoint(),a=R.NormalizedSchema.of(e?.input),l=[],d=[],f=!1,u,h=new fe.HttpRequest({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:o,headers:i,body:void 0});if(c){this.updateServiceEndpoint(h,c),this.setHostPrefix(h,e,s);let p=R.translateTraits(e.traits);if(p.http){h.method=p.http[0];let[b,y]=p.http[1].split("?");if(h.path=="/")h.path=b;else h.path+=b;let m=new URLSearchParams(y??"");Object.assign(o,Object.fromEntries(m))}}for(let[p,b]of a.structIterator()){let y=b.getMergedTraits()??{},m=s[p];if(m==null&&!b.isIdempotencyToken()){if(y.httpLabel){if(h.path.includes(`{${p}+}`)||h.path.includes(`{${p}}`))throw Error(`No value provided for input HTTP label: ${p}.`)}continue}if(y.httpPayload){if(b.isStreaming())if(b.isStructSchema()){if(s[p])u=await this.serializeEventStream({eventStream:s[p],requestSchema:a})}else u=m;else n.write(b,m),u=n.flush();delete s[p]}else if(y.httpLabel){n.write(b,m);let w=n.flush();if(h.path.includes(`{${p}+}`))h.path=h.path.replace(`{${p}+}`,w.split("/").map(ue).join("/"));else if(h.path.includes(`{${p}}`))h.path=h.path.replace(`{${p}}`,ue(w));delete s[p]}else if(y.httpHeader)n.write(b,m),i[y.httpHeader.toLowerCase()]=String(n.flush()),delete s[p];else if(typeof y.httpPrefixHeaders==="string"){for(let[w,S]of Object.entries(m)){let g=y.httpPrefixHeaders+w;n.write([b.getValueSchema(),{httpHeader:g}],S),i[g.toLowerCase()]=n.flush()}delete s[p]}else if(y.httpQuery||y.httpQueryParams)this.serializeQuery(b,m,o),delete s[p];else f=!0,l.push(p),d.push(b)}if(f&&s){let[p,b]=(a.getName(!0)??"#Unknown").split("#"),y=a.getSchema()[6],m=[3,p,b,a.getMergedTraits(),l,d,void 0];if(y)m[6]=y;else m.pop();n.write(m,s),u=n.flush()}return h.headers=i,h.query=o,h.body=u,h}serializeQuery(e,t,r){let s=this.serializer,n=e.getMergedTraits();if(n.httpQueryParams){for(let[o,i]of Object.entries(t))if(!(o in r)){let c=e.getValueSchema();Object.assign(c.getMergedTraits(),{...n,httpQuery:o,httpQueryParams:void 0}),this.serializeQuery(c,i,r)}return}if(e.isListSchema()){let o=!!e.getMergedTraits().sparse,i=[];for(let c of t){s.write([e.getValueSchema(),n],c);let a=s.flush();if(o||a!==void 0)i.push(a)}r[n.httpQuery]=i}else s.write([e,n],t),r[n.httpQuery]=s.flush()}async deserializeResponse(e,t,r){let s=this.deserializer,n=R.NormalizedSchema.of(e.output),o={};if(r.statusCode>=300){let c=await v(r.body,t);if(c.byteLength>0)Object.assign(o,await s.read(15,c));throw await this.handleError(e,t,r,o,this.deserializeMetadata(r)),Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(let c in r.headers){let a=r.headers[c];delete r.headers[c],r.headers[c.toLowerCase()]=a}let i=await this.deserializeHttpMessage(n,t,r,o);if(i.length){let c=await v(r.body,t);if(c.byteLength>0){let a=await s.read(n,c);for(let l of i)if(a[l]!=null)o[l]=a[l]}}else if(i.discardResponseBody)await v(r.body,t);return o.$metadata=this.deserializeMetadata(r),o}async deserializeHttpMessage(e,t,r,s,n){let o;if(s instanceof Set)o=n;else o=s;let i=!0,c=this.deserializer,a=R.NormalizedSchema.of(e),l=[];for(let[d,f]of a.structIterator()){let u=f.getMemberTraits();if(u.httpPayload){if(i=!1,f.isStreaming())if(f.isStructSchema())o[d]=await this.deserializeEventStream({response:r,responseSchema:a});else o[d]=Fe.sdkStreamMixin(r.body);else if(r.body){let p=await v(r.body,t);if(p.byteLength>0)o[d]=await c.read(f,p)}}else if(u.httpHeader){let h=String(u.httpHeader).toLowerCase(),p=r.headers[h];if(p!=null)if(f.isListSchema()){let b=f.getValueSchema();b.getMergedTraits().httpHeader=h;let y;if(b.isTimestampSchema()&&b.getSchema()===4)y=U.splitEvery(p,",",2);else y=U.splitHeader(p);let m=[];for(let w of y)m.push(await c.read(b,w.trim()));o[d]=m}else o[d]=await c.read(f,p)}else if(u.httpPrefixHeaders!==void 0){o[d]={};for(let[h,p]of Object.entries(r.headers))if(h.startsWith(u.httpPrefixHeaders)){let b=f.getValueSchema();b.getMergedTraits().httpHeader=h,o[d][h.slice(u.httpPrefixHeaders.length)]=await c.read(b,p)}}else if(u.httpResponseCode)o[d]=r.statusCode;else l.push(d)}return l.discardResponseBody=i,l}}class Us extends ze{async serializeRequest(e,t,r){let s=this.serializer,n={},o={},i=await r.endpoint(),c=R.NormalizedSchema.of(e?.input),a=c.getSchema(),l,d=new fe.HttpRequest({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:n,headers:o,body:void 0});if(i)this.updateServiceEndpoint(d,i),this.setHostPrefix(d,e,t);let f={...t};if(t){let u=c.getEventStreamMember();if(u){if(f[u]){let h={};for(let[p,b]of c.structIterator())if(p!==u&&f[p])s.write(b,f[p]),h[p]=s.flush();l=await this.serializeEventStream({eventStream:f[u],requestSchema:c,initialRequest:h})}}else s.write(a,f),l=s.flush()}return d.headers=Object.assign(d.headers,o),d.query=n,d.body=l,d.method="POST",d}async deserializeResponse(e,t,r){let s=this.deserializer,n=R.NormalizedSchema.of(e.output),o={};if(r.statusCode>=300){let c=await v(r.body,t);if(c.byteLength>0)Object.assign(o,await s.read(15,c));throw await this.handleError(e,t,r,o,this.deserializeMetadata(r)),Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(let c in r.headers){let a=r.headers[c];delete r.headers[c],r.headers[c.toLowerCase()]=a}let i=n.getEventStreamMember();if(i)o[i]=await this.deserializeEventStream({response:r,responseSchema:n,initialResponseContainer:o});else{let c=await v(r.body,t);if(c.byteLength>0)Object.assign(o,await s.read(n,c))}return o.$metadata=this.deserializeMetadata(r),o}}var Is=(e,t,r,s,n,o)=>{if(t!=null&&t[r]!==void 0){let i=s();if(i==null||i.length<=0)throw Error("Empty value provided for input HTTP label: "+r+".");e=e.replace(n,o?i.split("/").map((c)=>ue(c)).join("/"):ue(i))}else throw Error("No value provided for input HTTP label: "+r+".");return e};function Aa(e,t){return new gt(e,t)}class gt{input;context;query={};method="";headers={};path="";body=null;hostname="";resolvePathStack=[];constructor(e,t){this.input=e,this.context=t}async build(){let{hostname:e,protocol:t="https",port:r,path:s}=await this.context.endpoint();this.path=s;for(let n of this.resolvePathStack)n(this.path);return new fe.HttpRequest({protocol:t,hostname:this.hostname||e,port:r,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push((t)=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e}),this}p(e,t,r,s){return this.resolvePathStack.push((n)=>{this.path=Is(n,this.input,e,t,r,s)}),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}function _t(e,t){if(t.timestampFormat.useTrait){if(e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema()}let{httpLabel:r,httpPrefixHeaders:s,httpHeader:n,httpQuery:o}=e.getMergedTraits();return(t.httpBindings?typeof s==="string"||Boolean(n)?6:Boolean(o)||Boolean(r)?5:void 0:void 0)??t.timestampFormat.default}class Tt extends G{settings;constructor(e){super();this.settings=e}read(e,t){let r=R.NormalizedSchema.of(e);if(r.isListSchema())return U.splitHeader(t).map((s)=>this.read(r.getValueSchema(),s));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??He.fromBase64)(t);if(r.isTimestampSchema())switch(_t(r,this.settings)){case 5:return U._parseRfc3339DateTimeWithOffset(t);case 6:return U._parseRfc7231DateTime(t);case 7:return U._parseEpochTimestamp(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}if(r.isStringSchema()){let s=r.getMergedTraits().mediaType,n=t;if(s){if(r.getMergedTraits().httpHeader)n=this.base64ToUtf8(n);if(s==="application/json"||s.endsWith("+json"))n=U.LazyJsonString.from(n);return n}}if(r.isNumericSchema())return Number(t);if(r.isBigIntegerSchema())return BigInt(t);if(r.isBigDecimalSchema())return new U.NumericValue(t,"bigDecimal");if(r.isBooleanSchema())return String(t).toLowerCase()==="true";return t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??wt.toUtf8)((this.serdeContext?.base64Decoder??He.fromBase64)(e))}}class Ds extends G{codecDeserializer;stringDeserializer;constructor(e,t){super();this.codecDeserializer=e,this.stringDeserializer=new Tt(t)}setSerdeContext(e){this.stringDeserializer.setSerdeContext(e),this.codecDeserializer.setSerdeContext(e),this.serdeContext=e}read(e,t){let r=R.NormalizedSchema.of(e),s=r.getMergedTraits(),n=this.serdeContext?.utf8Encoder??wt.toUtf8;if(s.httpHeader||s.httpResponseCode)return this.stringDeserializer.read(r,n(t));if(s.httpPayload){if(r.isBlobSchema()){let o=this.serdeContext?.utf8Decoder??wt.fromUtf8;if(typeof t==="string")return o(t);return t}else if(r.isStringSchema()){if("byteLength"in t)return n(t);return t}}return this.codecDeserializer.read(r,t)}}class Et extends G{settings;stringBuffer="";constructor(e){super();this.settings=e}write(e,t){let r=R.NormalizedSchema.of(e);switch(typeof t){case"object":if(t===null){this.stringBuffer="null";return}if(r.isTimestampSchema()){if(!(t instanceof Date))throw Error(`@smithy/core/protocols - received non-Date value ${t} when schema expected Date in ${r.getName(!0)}`);switch(_t(r,this.settings)){case 5:this.stringBuffer=t.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=U.dateToUtcString(t);break;case 7:this.stringBuffer=String(t.getTime()/1000);break;default:console.warn("Missing timestamp format, using epoch seconds",t),this.stringBuffer=String(t.getTime()/1000)}return}if(r.isBlobSchema()&&"byteLength"in t){this.stringBuffer=(this.serdeContext?.base64Encoder??He.toBase64)(t);return}if(r.isListSchema()&&Array.isArray(t)){let o="";for(let i of t){this.write([r.getValueSchema(),r.getMergedTraits()],i);let c=this.flush(),a=r.getValueSchema().isTimestampSchema()?c:U.quoteHeader(c);if(o!=="")o+=", ";o+=a}this.stringBuffer=o;return}this.stringBuffer=JSON.stringify(t,null,2);break;case"string":let s=r.getMergedTraits().mediaType,n=t;if(s){if(s==="application/json"||s.endsWith("+json"))n=U.LazyJsonString.from(n);if(r.getMergedTraits().httpHeader){this.stringBuffer=(this.serdeContext?.base64Encoder??He.toBase64)(n.toString());return}}this.stringBuffer=t;break;default:if(r.isIdempotencyToken())this.stringBuffer=U.generateIdempotencyToken();else this.stringBuffer=String(t)}}flush(){let e=this.stringBuffer;return this.stringBuffer="",e}}class Bs{codecSerializer;stringSerializer;buffer;constructor(e,t,r=new Et(t)){this.codecSerializer=e,this.stringSerializer=r}setSerdeContext(e){this.codecSerializer.setSerdeContext(e),this.stringSerializer.setSerdeContext(e)}write(e,t){let r=R.NormalizedSchema.of(e),s=r.getMergedTraits();if(s.httpHeader||s.httpLabel||s.httpQuery){this.stringSerializer.write(r,t),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(r,t)}flush(){if(this.buffer!==void 0){let e=this.buffer;return this.buffer=void 0,e}return this.codecSerializer.flush()}}Ra.FromStringShapeDeserializer=Tt;Ra.HttpBindingProtocol=Rs;Ra.HttpInterceptingShapeDeserializer=Ds;Ra.HttpInterceptingShapeSerializer=Bs;Ra.HttpProtocol=ze;Ra.RequestBuilder=gt;Ra.RpcProtocol=Us;Ra.SerdeContext=G;Ra.ToStringShapeSerializer=Et;Ra.collectBody=v;Ra.determineTimestampFormat=_t;Ra.extendedEncodeURIComponent=ue;Ra.requestBuilder=Aa;Ra.resolvedPath=Is});var Ff=_((he)=>{var qs=Ct(),Ot=Ls(),We=At(),Ja=Qe(),ke=bt();class js{config;middlewareStack=qs.constructStack();initConfig;handlers;constructor(e){this.config=e;let{protocol:t,protocolSettings:r}=e;if(r){if(typeof t==="function")e.protocol=new t(r)}}send(e,t,r){let s=typeof t!=="function"?t:void 0,n=typeof t==="function"?t:r,o=s===void 0&&this.config.cacheMiddleware===!0,i;if(o){if(!this.handlers)this.handlers=new WeakMap;let c=this.handlers;if(c.has(e.constructor))i=c.get(e.constructor);else i=e.resolveMiddleware(this.middlewareStack,this.config,s),c.set(e.constructor,i)}else delete this.handlers,i=e.resolveMiddleware(this.middlewareStack,this.config,s);if(n)i(e).then((c)=>n(null,c.output),(c)=>n(c)).catch(()=>{});else return i(e).then((c)=>c.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var St="***SensitiveInformation***";function xt(e,t){if(t==null)return t;let r=Ja.NormalizedSchema.of(e);if(r.getMergedTraits().sensitive)return St;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return St}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return St}else if(r.isStructSchema()&&typeof t==="object"){let s=t,n={};for(let[o,i]of r.structIterator())if(s[o]!=null)n[o]=xt(i,s[o]);return n}return t}class Mt{middlewareStack=qs.constructStack();schema;static classBuilder(){return new Cs}resolveMiddlewareWithContext(e,t,r,{middlewareFn:s,clientName:n,commandName:o,inputFilterSensitiveLog:i,outputFilterSensitiveLog:c,smithyContext:a,additionalContext:l,CommandCtor:d}){for(let b of s.bind(this)(d,e,t,r))this.middlewareStack.use(b);let f=e.concat(this.middlewareStack),{logger:u}=t,h={logger:u,clientName:n,commandName:o,inputFilterSensitiveLog:i,outputFilterSensitiveLog:c,[We.SMITHY_CONTEXT_KEY]:{commandInstance:this,...a},...l},{requestHandler:p}=t;return f.resolve((b)=>p.handle(b.request,r||{}),h)}}class Cs{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,r={}){return this._smithyContext={service:e,operation:t,...r},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=(r)=>r,t=(r)=>r){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){let e=this,t;return t=class extends Mt{input;static getEndpointParameterInstructions(){return e._ep}constructor(...[r]){super();this.input=r??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(r,s,n){let o=e._operationSchema,i=o?.[4]??o?.input,c=o?.[5]??o?.output;return this.resolveMiddlewareWithContext(r,s,n,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(o?xt.bind(null,i):(a)=>a),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(o?xt.bind(null,c):(a)=>a),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}}var va="***SensitiveInformation***",Ya=(e,t,r)=>{for(let[o,i]of Object.entries(e)){let c=async function(l,d,f){let u=new i(l);if(typeof d==="function")this.send(u,d);else if(typeof f==="function"){if(typeof d!=="object")throw Error(`Expected http options but got ${typeof d}`);this.send(u,d||{},f)}else return this.send(u,d)},a=(o[0].toLowerCase()+o.slice(1)).replace(/Command$/,"");t.prototype[a]=c}let{paginators:s={},waiters:n={}}=r??{};for(let[o,i]of Object.entries(s))if(t.prototype[o]===void 0)t.prototype[o]=function(c={},a,...l){return i({...a,client:this},c,...l)};for(let[o,i]of Object.entries(n))if(t.prototype[o]===void 0)t.prototype[o]=async function(c={},a,...l){let d=a;if(typeof a==="number")d={maxWaitTime:a};return i({...d,client:this},c,...l)}};class V extends Error{$fault;$response;$retryable;$metadata;constructor(e){super(e.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;let t=e;return V.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&(t.$fault==="client"||t.$fault==="server")}static[Symbol.hasInstance](e){if(!e)return!1;let t=e;if(this===V)return V.isInstance(e);if(V.isInstance(e)){if(t.name&&this.name)return this.prototype.isPrototypeOf(e)||t.name===this.name;return this.prototype.isPrototypeOf(e)}return!1}}var Fs=(e,t={})=>{Object.entries(t).filter(([,s])=>s!==void 0).forEach(([s,n])=>{if(e[s]==null||e[s]==="")e[s]=n});let r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e},Hs=({output:e,parsedBody:t,exceptionCtor:r,errorCode:s})=>{let n=Xa(e),o=n.httpStatusCode?n.httpStatusCode+"":void 0,i=new r({name:t?.code||t?.Code||s||o||"UnknownError",$fault:"client",$metadata:n});throw Fs(i,t)},Qa=(e)=>{return({output:t,parsedBody:r,errorCode:s})=>{Hs({output:t,parsedBody:r,exceptionCtor:e,errorCode:s})}},Xa=(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"]}),Za=(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:30000};default:return{}}},Ns=!1,Ga=(e)=>{if(e&&!Ns&&parseInt(e.substring(1,e.indexOf(".")))<16)Ns=!0},zs=Object.values(We.AlgorithmId),Va=(e)=>{let t=[];for(let r in We.AlgorithmId){let s=We.AlgorithmId[r];if(e[s]===void 0)continue;t.push({algorithmId:()=>s,checksumConstructor:()=>e[s]})}for(let[r,s]of Object.entries(e.checksumAlgorithms??{}))t.push({algorithmId:()=>r,checksumConstructor:()=>s});return{addChecksumAlgorithm(r){e.checksumAlgorithms=e.checksumAlgorithms??{};let s=r.algorithmId(),n=r.checksumConstructor();if(zs.includes(s))e.checksumAlgorithms[s.toUpperCase()]=n;else e.checksumAlgorithms[s]=n;t.push(r)},checksumAlgorithms(){return t}}},Ka=(e)=>{let t={};return e.checksumAlgorithms().forEach((r)=>{let s=r.algorithmId();if(zs.includes(s))t[s]=r.checksumConstructor()}),t},ef=(e)=>{return{setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}},tf=(e)=>{let t={};return t.retryStrategy=e.retryStrategy(),t},Ws=(e)=>{return Object.assign(Va(e),ef(e))},rf=Ws,sf=(e)=>{return Object.assign(Ka(e),tf(e))},nf=(e)=>Array.isArray(e)?e:[e],ks=(e)=>{for(let r in e)if(e.hasOwnProperty(r)&&e[r]["#text"]!==void 0)e[r]=e[r]["#text"];else if(typeof e[r]==="object"&&e[r]!==null)e[r]=ks(e[r]);return e},of=(e)=>{return e!=null};class Js{trace(){}debug(){}info(){}warn(){}error(){}}function vs(e,t,r){let s,n,o;if(typeof t>"u"&&typeof r>"u")s={},o=e;else if(s=e,typeof t==="function")return n=t,o=r,ff(s,n,o);else o=t;for(let i of Object.keys(o)){if(!Array.isArray(o[i])){s[i]=o[i];continue}Ys(s,null,o,i)}return s}var cf=(e)=>{let t={};for(let[r,s]of Object.entries(e||{}))t[r]=[,s];return t},af=(e,t)=>{let r={};for(let s in t)Ys(r,e,t,s);return r},ff=(e,t,r)=>{return vs(e,Object.entries(r).reduce((s,[n,o])=>{if(Array.isArray(o))s[n]=o;else if(typeof o==="function")s[n]=[t,o()];else s[n]=[t,o];return s},{}))},Ys=(e,t,r,s)=>{if(t!==null){let i=r[s];if(typeof i==="function")i=[,i];let[c=uf,a=hf,l=s]=i;if(typeof c==="function"&&c(t[l])||typeof c!=="function"&&!!c)e[s]=a(t[l]);return}let[n,o]=r[s];if(typeof o==="function"){let i,c=n===void 0&&(i=o())!=null,a=typeof n==="function"&&!!n(void 0)||typeof n!=="function"&&!!n;if(c)e[s]=i;else if(a)e[s]=o()}else{let i=n===void 0&&o!=null,c=typeof n==="function"&&!!n(o)||typeof n!=="function"&&!!n;if(i||c)e[s]=o}},uf=(e)=>e!=null,hf=(e)=>e,df=(e)=>{if(e!==e)return"NaN";switch(e){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return e}},lf=(e)=>e.toISOString().replace(".000Z","Z"),$t=(e)=>{if(e==null)return{};if(Array.isArray(e))return e.filter((t)=>t!=null).map($t);if(typeof e==="object"){let t={};for(let r of Object.keys(e)){if(e[r]==null)continue;t[r]=$t(e[r])}return t}return e};he.collectBody=Ot.collectBody;he.extendedEncodeURIComponent=Ot.extendedEncodeURIComponent;he.resolvedPath=Ot.resolvedPath;he.Client=js;he.Command=Mt;he.NoOpLogger=Js;he.SENSITIVE_STRING=va;he.ServiceException=V;he._json=$t;he.convertMap=cf;he.createAggregatedClient=Ya;he.decorateServiceException=Fs;he.emitWarningIfUnsupportedVersion=Ga;he.getArrayIfSingleItem=nf;he.getDefaultClientConfiguration=rf;he.getDefaultExtensionConfiguration=Ws;he.getValueFromTextNode=ks;he.isSerializableHeaderValue=of;he.loadConfigsForDefaultMode=Za;he.map=vs;he.resolveDefaultRuntimeConfig=sf;he.serializeDateTime=lf;he.serializeFloat=df;he.take=af;he.throwDefaultError=Hs;he.withBaseException=Qa;Object.prototype.hasOwnProperty.call(ke,"__proto__")&&!Object.prototype.hasOwnProperty.call(he,"__proto__")&&Object.defineProperty(he,"__proto__",{enumerable:!0,value:ke.__proto__});Object.keys(ke).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(he,e))he[e]=ke[e]})});
18
+ `)},ae={warn:console.warn},fc=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],lt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function uc(e){let t=e.getUTCFullYear(),r=e.getUTCMonth(),s=e.getUTCDay(),n=e.getUTCDate(),o=e.getUTCHours(),i=e.getUTCMinutes(),c=e.getUTCSeconds(),a=n<10?`0${n}`:`${n}`,l=o<10?`0${o}`:`${o}`,d=i<10?`0${i}`:`${i}`,f=c<10?`0${c}`:`${c}`;return`${fc[s]}, ${a} ${lt[r]} ${t} ${l}:${d}:${f} GMT`}var hc=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),dc=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw TypeError("RFC-3339 date-times must be expressed as strings");let t=hc.exec(e);if(!t)throw TypeError("Invalid RFC-3339 date-time value");let[r,s,n,o,i,c,a,l]=t,d=Q(X(s)),f=L(n,"month",1,12),u=L(o,"day",1,31);return oe(d,f,u,{hours:i,minutes:c,seconds:a,fractionalMilliseconds:l})},lc=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),pc=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw TypeError("RFC-3339 date-times must be expressed as strings");let t=lc.exec(e);if(!t)throw TypeError("Invalid RFC-3339 date-time value");let[r,s,n,o,i,c,a,l,d]=t,f=Q(X(s)),u=L(n,"month",1,12),h=L(o,"day",1,31),p=oe(f,u,h,{hours:i,minutes:c,seconds:a,fractionalMilliseconds:l});if(d.toUpperCase()!="Z")p.setTime(p.getTime()-Mc(d));return p},mc=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$/),yc=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$/),bc=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})$/),wc=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw TypeError("RFC-7231 date-times must be expressed as strings");let t=mc.exec(e);if(t){let[r,s,n,o,i,c,a,l]=t;return oe(Q(X(o)),it(n),L(s,"day",1,31),{hours:i,minutes:c,seconds:a,fractionalMilliseconds:l})}if(t=yc.exec(e),t){let[r,s,n,o,i,c,a,l]=t;return Ec(oe(_c(o),it(n),L(s,"day",1,31),{hours:i,minutes:c,seconds:a,fractionalMilliseconds:l}))}if(t=bc.exec(e),t){let[r,s,n,o,i,c,a,l]=t;return oe(Q(X(l)),it(s),L(n.trimLeft(),"day",1,31),{hours:o,minutes:i,seconds:c,fractionalMilliseconds:a})}throw TypeError("Invalid RFC-7231 date-time value")},gc=(e)=>{if(e===null||e===void 0)return;let t;if(typeof e==="number")t=e;else if(typeof e==="string")t=ht(e);else if(typeof e==="object"&&e.tag===1)t=e.value;else throw 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 TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(t*1000))},oe=(e,t,r,s)=>{let n=t-1;return xc(e,n,r),new Date(Date.UTC(e,n,r,L(s.hours,"hour",0,23),L(s.minutes,"minute",0,59),L(s.seconds,"seconds",0,60),Oc(s.fractionalMilliseconds)))},_c=(e)=>{let t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+Q(X(e));if(r<t)return r+100;return r},Tc=1576800000000,Ec=(e)=>{if(e.getTime()-new Date().getTime()>Tc)return new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()));return e},it=(e)=>{let t=lt.indexOf(e);if(t<0)throw TypeError(`Invalid month: ${e}`);return t+1},Sc=[31,28,31,30,31,30,31,31,30,31,30,31],xc=(e,t,r)=>{let s=Sc[t];if(t===1&&$c(e))s=29;if(r>s)throw TypeError(`Invalid day for ${lt[t]} in ${e}: ${r}`)},$c=(e)=>{return e%4===0&&(e%100!==0||e%400===0)},L=(e,t,r,s)=>{let n=Ms(X(e));if(n<r||n>s)throw TypeError(`${t} must be between ${r} and ${s}, inclusive`);return n},Oc=(e)=>{if(e===null||e===void 0)return 0;return xs("0."+e)*1000},Mc=(e)=>{let t=e[0],r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw TypeError(`Offset direction, ${t}, must be "+" or "-"`);let s=Number(e.substring(1,3)),n=Number(e.substring(4,6));return r*(s*60+n)*60*1000},X=(e)=>{let t=0;while(t<e.length-1&&e.charAt(t)==="0")t++;if(t===0)return e;return e.slice(t)},J=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};J.from=(e)=>{if(e&&typeof e==="object"&&(e instanceof J||("deserializeJSON"in e)))return e;else if(typeof e==="string"||Object.getPrototypeOf(e)===String.prototype)return J(String(e));return J(JSON.stringify(e))};J.fromObject=J.from;function Pc(e){if(e.includes(",")||e.includes('"'))e=`"${e.replace(/"/g,"\\\"")}"`;return e}var pt="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",mt="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",yt="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",Ps="(\\d?\\d)",As="(\\d{4})",Ac=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),Rc=new RegExp(`^${pt}, ${Ps} ${mt} ${As} ${yt} GMT$`),Uc=new RegExp(`^${pt}, ${Ps}-${mt}-(\\d\\d) ${yt} GMT$`),Ic=new RegExp(`^${pt} ${mt} ( [1-9]|\\d\\d) ${yt} ${As}$`),Dc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Bc=(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 TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else if(typeof e==="object"&&e.tag===1)t=e.value;if(isNaN(t)||Math.abs(t)===1/0)throw TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1000))},Lc=(e)=>{if(e==null)return;if(typeof e!=="string")throw TypeError("RFC3339 timestamps must be strings");let t=Ac.exec(e);if(!t)throw TypeError(`Invalid RFC3339 timestamp format ${e}`);let[,r,s,n,o,i,c,,a,l]=t;H(s,1,12),H(n,1,31),H(o,0,23),H(i,0,59),H(c,0,60);let d=new Date(Date.UTC(Number(r),Number(s)-1,Number(n),Number(o),Number(i),Number(c),Number(a)?Math.round(parseFloat(`0.${a}`)*1000):0));if(d.setUTCFullYear(Number(r)),l.toUpperCase()!="Z"){let[,f,u,h]=/([+-])(\d\d):(\d\d)/.exec(l)||[void 0,"+",0,0],p=f==="-"?1:-1;d.setTime(d.getTime()+p*(Number(u)*60*60*1000+Number(h)*60*1000))}return d},Nc=(e)=>{if(e==null)return;if(typeof e!=="string")throw TypeError("RFC7231 timestamps must be strings.");let t,r,s,n,o,i,c,a;if(a=Rc.exec(e))[,t,r,s,n,o,i,c]=a;else if(a=Uc.exec(e))[,t,r,s,n,o,i,c]=a,s=(Number(s)+1900).toString();else if(a=Ic.exec(e))[,r,t,n,o,i,c,s]=a;if(s&&i){let l=Date.UTC(Number(s),Dc.indexOf(r),Number(t),Number(n),Number(o),Number(i),c?Math.round(parseFloat(`0.${c}`)*1000):0);H(t,1,31),H(n,0,23),H(o,0,59),H(i,0,60);let d=new Date(l);return d.setUTCFullYear(Number(s)),d}throw TypeError(`Invalid RFC7231 date-time value ${e}.`)};function H(e,t,r){let s=Number(e);if(s<t||s>r)throw Error(`Value ${s} out of range [${t}, ${r}]`)}function qc(e,t,r){if(r<=0||!Number.isInteger(r))throw Error("Invalid number of delimiters ("+r+") for splitEvery.");let s=e.split(t);if(r===1)return s;let n=[],o="";for(let i=0;i<s.length;i++){if(o==="")o=s[i];else o+=t+s[i];if((i+1)%r===0)n.push(o),o=""}if(o!=="")n.push(o);return n}var jc=(e)=>{let t=e.length,r=[],s=!1,n=void 0,o=0;for(let i=0;i<t;++i){let c=e[i];switch(c){case'"':if(n!=="\\")s=!s;break;case",":if(!s)r.push(e.slice(o,i)),o=i+1;break}n=c}return r.push(e.slice(o)),r.map((i)=>{i=i.trim();let c=i.length;if(c<2)return i;if(i[0]==='"'&&i[c-1]==='"')i=i.slice(1,c-1);return i.replace(/\\"/g,'"')})},Es=/^-?\d*(\.\d+)?$/;class Ce{string;type;constructor(e,t){if(this.string=e,this.type=t,!Es.test(e))throw Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](e){if(!e||typeof e!=="object")return!1;let t=e;return Ce.prototype.isPrototypeOf(e)||t.type==="bigDecimal"&&Es.test(t.string)}}function Cc(e){return new Ce(String(e),"bigDecimal")}Fc.generateIdempotencyToken=vi.v4;Fc.LazyJsonString=J;Fc.NumericValue=Ce;Fc._parseEpochTimestamp=Bc;Fc._parseRfc3339DateTimeWithOffset=Lc;Fc._parseRfc7231DateTime=Nc;Fc.copyDocumentWithTransform=Yi;Fc.dateToUtcString=uc;Fc.expectBoolean=Xi;Fc.expectByte=ft;Fc.expectFloat32=qe;Fc.expectInt=Gi;Fc.expectInt32=ct;Fc.expectLong=ce;Fc.expectNonNull=Ki;Fc.expectNumber=ie;Fc.expectObject=Ss;Fc.expectShort=at;Fc.expectString=ec;Fc.expectUnion=tc;Fc.handleFloat=nc;Fc.limitedParseDouble=dt;Fc.limitedParseFloat=oc;Fc.limitedParseFloat32=ic;Fc.logger=ae;Fc.nv=Cc;Fc.parseBoolean=Qi;Fc.parseEpochTimestamp=gc;Fc.parseRfc3339DateTime=dc;Fc.parseRfc3339DateTimeWithOffset=pc;Fc.parseRfc7231DateTime=wc;Fc.quoteHeader=Pc;Fc.splitEvery=qc;Fc.splitHeader=jc;Fc.strictParseByte=Ms;Fc.strictParseDouble=ht;Fc.strictParseFloat=rc;Fc.strictParseFloat32=xs;Fc.strictParseInt=cc;Fc.strictParseInt32=ac;Fc.strictParseLong=Os;Fc.strictParseShort=Q});var Ls=_((Ra)=>{var Fe=ms(),R=Qe(),U=bt(),fe=ye(),He=k(),wt=Te(),v=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Fe.Uint8ArrayBlobAdapter.mutate(e);if(!e)return Fe.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let r=t.streamCollector(e);return Fe.Uint8ArrayBlobAdapter.mutate(await r)};function ue(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}class G{serdeContext;setSerdeContext(e){this.serdeContext=e}}class ze extends G{options;compositeErrorRegistry;constructor(e){super();this.options=e,this.compositeErrorRegistry=R.TypeRegistry.for(e.defaultNamespace);for(let t of e.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(t)}getRequestType(){return fe.HttpRequest}getResponseType(){return fe.HttpResponse}setSerdeContext(e){if(this.serdeContext=e,this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e),this.getPayloadCodec())this.getPayloadCodec().setSerdeContext(e)}updateServiceEndpoint(e,t){if("url"in t){if(e.protocol=t.url.protocol,e.hostname=t.url.hostname,e.port=t.url.port?Number(t.url.port):void 0,e.path=t.url.pathname,e.fragment=t.url.hash||void 0,e.username=t.url.username||void 0,e.password=t.url.password||void 0,!e.query)e.query={};for(let[r,s]of t.url.searchParams.entries())e.query[r]=s;if(t.headers)for(let[r,s]of Object.entries(t.headers))e.headers[r]=s.join(", ");return e}else{if(e.protocol=t.protocol,e.hostname=t.hostname,e.port=t.port?Number(t.port):void 0,e.path=t.path,e.query={...t.query},t.headers)for(let[r,s]of Object.entries(t.headers))e.headers[r]=s;return e}}setHostPrefix(e,t,r){if(this.serdeContext?.disableHostPrefix)return;let s=R.NormalizedSchema.of(t.input),n=R.translateTraits(t.traits??{});if(n.endpoint){let o=n.endpoint?.[0];if(typeof o==="string"){let i=[...s.structIterator()].filter(([,c])=>c.getMergedTraits().hostLabel);for(let[c]of i){let a=r[c];if(typeof a!=="string")throw Error(`@smithy/core/schema - ${c} in input must be a string as hostLabel.`);o=o.replace(`{${c}}`,a)}e.hostname=o+e.hostname}}}deserializeMetadata(e){return{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"]}}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:r}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:e,requestSchema:t,initialRequest:r})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:r}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:r})}async loadEventStreamCapability(){let{EventStreamSerde:e}=await import("./chunk-21hd56fa.js");return new e({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(e,t,r,s,n){return[]}getEventStreamMarshaller(){let e=this.serdeContext;if(!e.eventStreamMarshaller)throw Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return e.eventStreamMarshaller}}class Rs extends ze{async serializeRequest(e,t,r){let s={...t??{}},n=this.serializer,o={},i={},c=await r.endpoint(),a=R.NormalizedSchema.of(e?.input),l=[],d=[],f=!1,u,h=new fe.HttpRequest({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:o,headers:i,body:void 0});if(c){this.updateServiceEndpoint(h,c),this.setHostPrefix(h,e,s);let p=R.translateTraits(e.traits);if(p.http){h.method=p.http[0];let[b,y]=p.http[1].split("?");if(h.path=="/")h.path=b;else h.path+=b;let m=new URLSearchParams(y??"");Object.assign(o,Object.fromEntries(m))}}for(let[p,b]of a.structIterator()){let y=b.getMergedTraits()??{},m=s[p];if(m==null&&!b.isIdempotencyToken()){if(y.httpLabel){if(h.path.includes(`{${p}+}`)||h.path.includes(`{${p}}`))throw Error(`No value provided for input HTTP label: ${p}.`)}continue}if(y.httpPayload){if(b.isStreaming())if(b.isStructSchema()){if(s[p])u=await this.serializeEventStream({eventStream:s[p],requestSchema:a})}else u=m;else n.write(b,m),u=n.flush();delete s[p]}else if(y.httpLabel){n.write(b,m);let w=n.flush();if(h.path.includes(`{${p}+}`))h.path=h.path.replace(`{${p}+}`,w.split("/").map(ue).join("/"));else if(h.path.includes(`{${p}}`))h.path=h.path.replace(`{${p}}`,ue(w));delete s[p]}else if(y.httpHeader)n.write(b,m),i[y.httpHeader.toLowerCase()]=String(n.flush()),delete s[p];else if(typeof y.httpPrefixHeaders==="string"){for(let[w,S]of Object.entries(m)){let g=y.httpPrefixHeaders+w;n.write([b.getValueSchema(),{httpHeader:g}],S),i[g.toLowerCase()]=n.flush()}delete s[p]}else if(y.httpQuery||y.httpQueryParams)this.serializeQuery(b,m,o),delete s[p];else f=!0,l.push(p),d.push(b)}if(f&&s){let[p,b]=(a.getName(!0)??"#Unknown").split("#"),y=a.getSchema()[6],m=[3,p,b,a.getMergedTraits(),l,d,void 0];if(y)m[6]=y;else m.pop();n.write(m,s),u=n.flush()}return h.headers=i,h.query=o,h.body=u,h}serializeQuery(e,t,r){let s=this.serializer,n=e.getMergedTraits();if(n.httpQueryParams){for(let[o,i]of Object.entries(t))if(!(o in r)){let c=e.getValueSchema();Object.assign(c.getMergedTraits(),{...n,httpQuery:o,httpQueryParams:void 0}),this.serializeQuery(c,i,r)}return}if(e.isListSchema()){let o=!!e.getMergedTraits().sparse,i=[];for(let c of t){s.write([e.getValueSchema(),n],c);let a=s.flush();if(o||a!==void 0)i.push(a)}r[n.httpQuery]=i}else s.write([e,n],t),r[n.httpQuery]=s.flush()}async deserializeResponse(e,t,r){let s=this.deserializer,n=R.NormalizedSchema.of(e.output),o={};if(r.statusCode>=300){let c=await v(r.body,t);if(c.byteLength>0)Object.assign(o,await s.read(15,c));throw await this.handleError(e,t,r,o,this.deserializeMetadata(r)),Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(let c in r.headers){let a=r.headers[c];delete r.headers[c],r.headers[c.toLowerCase()]=a}let i=await this.deserializeHttpMessage(n,t,r,o);if(i.length){let c=await v(r.body,t);if(c.byteLength>0){let a=await s.read(n,c);for(let l of i)if(a[l]!=null)o[l]=a[l]}}else if(i.discardResponseBody)await v(r.body,t);return o.$metadata=this.deserializeMetadata(r),o}async deserializeHttpMessage(e,t,r,s,n){let o;if(s instanceof Set)o=n;else o=s;let i=!0,c=this.deserializer,a=R.NormalizedSchema.of(e),l=[];for(let[d,f]of a.structIterator()){let u=f.getMemberTraits();if(u.httpPayload){if(i=!1,f.isStreaming())if(f.isStructSchema())o[d]=await this.deserializeEventStream({response:r,responseSchema:a});else o[d]=Fe.sdkStreamMixin(r.body);else if(r.body){let p=await v(r.body,t);if(p.byteLength>0)o[d]=await c.read(f,p)}}else if(u.httpHeader){let h=String(u.httpHeader).toLowerCase(),p=r.headers[h];if(p!=null)if(f.isListSchema()){let b=f.getValueSchema();b.getMergedTraits().httpHeader=h;let y;if(b.isTimestampSchema()&&b.getSchema()===4)y=U.splitEvery(p,",",2);else y=U.splitHeader(p);let m=[];for(let w of y)m.push(await c.read(b,w.trim()));o[d]=m}else o[d]=await c.read(f,p)}else if(u.httpPrefixHeaders!==void 0){o[d]={};for(let[h,p]of Object.entries(r.headers))if(h.startsWith(u.httpPrefixHeaders)){let b=f.getValueSchema();b.getMergedTraits().httpHeader=h,o[d][h.slice(u.httpPrefixHeaders.length)]=await c.read(b,p)}}else if(u.httpResponseCode)o[d]=r.statusCode;else l.push(d)}return l.discardResponseBody=i,l}}class Us extends ze{async serializeRequest(e,t,r){let s=this.serializer,n={},o={},i=await r.endpoint(),c=R.NormalizedSchema.of(e?.input),a=c.getSchema(),l,d=new fe.HttpRequest({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:n,headers:o,body:void 0});if(i)this.updateServiceEndpoint(d,i),this.setHostPrefix(d,e,t);let f={...t};if(t){let u=c.getEventStreamMember();if(u){if(f[u]){let h={};for(let[p,b]of c.structIterator())if(p!==u&&f[p])s.write(b,f[p]),h[p]=s.flush();l=await this.serializeEventStream({eventStream:f[u],requestSchema:c,initialRequest:h})}}else s.write(a,f),l=s.flush()}return d.headers=Object.assign(d.headers,o),d.query=n,d.body=l,d.method="POST",d}async deserializeResponse(e,t,r){let s=this.deserializer,n=R.NormalizedSchema.of(e.output),o={};if(r.statusCode>=300){let c=await v(r.body,t);if(c.byteLength>0)Object.assign(o,await s.read(15,c));throw await this.handleError(e,t,r,o,this.deserializeMetadata(r)),Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(let c in r.headers){let a=r.headers[c];delete r.headers[c],r.headers[c.toLowerCase()]=a}let i=n.getEventStreamMember();if(i)o[i]=await this.deserializeEventStream({response:r,responseSchema:n,initialResponseContainer:o});else{let c=await v(r.body,t);if(c.byteLength>0)Object.assign(o,await s.read(n,c))}return o.$metadata=this.deserializeMetadata(r),o}}var Is=(e,t,r,s,n,o)=>{if(t!=null&&t[r]!==void 0){let i=s();if(i==null||i.length<=0)throw Error("Empty value provided for input HTTP label: "+r+".");e=e.replace(n,o?i.split("/").map((c)=>ue(c)).join("/"):ue(i))}else throw Error("No value provided for input HTTP label: "+r+".");return e};function Aa(e,t){return new gt(e,t)}class gt{input;context;query={};method="";headers={};path="";body=null;hostname="";resolvePathStack=[];constructor(e,t){this.input=e,this.context=t}async build(){let{hostname:e,protocol:t="https",port:r,path:s}=await this.context.endpoint();this.path=s;for(let n of this.resolvePathStack)n(this.path);return new fe.HttpRequest({protocol:t,hostname:this.hostname||e,port:r,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push((t)=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e}),this}p(e,t,r,s){return this.resolvePathStack.push((n)=>{this.path=Is(n,this.input,e,t,r,s)}),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}function _t(e,t){if(t.timestampFormat.useTrait){if(e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema()}let{httpLabel:r,httpPrefixHeaders:s,httpHeader:n,httpQuery:o}=e.getMergedTraits();return(t.httpBindings?typeof s==="string"||Boolean(n)?6:Boolean(o)||Boolean(r)?5:void 0:void 0)??t.timestampFormat.default}class Tt extends G{settings;constructor(e){super();this.settings=e}read(e,t){let r=R.NormalizedSchema.of(e);if(r.isListSchema())return U.splitHeader(t).map((s)=>this.read(r.getValueSchema(),s));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??He.fromBase64)(t);if(r.isTimestampSchema())switch(_t(r,this.settings)){case 5:return U._parseRfc3339DateTimeWithOffset(t);case 6:return U._parseRfc7231DateTime(t);case 7:return U._parseEpochTimestamp(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}if(r.isStringSchema()){let s=r.getMergedTraits().mediaType,n=t;if(s){if(r.getMergedTraits().httpHeader)n=this.base64ToUtf8(n);if(s==="application/json"||s.endsWith("+json"))n=U.LazyJsonString.from(n);return n}}if(r.isNumericSchema())return Number(t);if(r.isBigIntegerSchema())return BigInt(t);if(r.isBigDecimalSchema())return new U.NumericValue(t,"bigDecimal");if(r.isBooleanSchema())return String(t).toLowerCase()==="true";return t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??wt.toUtf8)((this.serdeContext?.base64Decoder??He.fromBase64)(e))}}class Ds extends G{codecDeserializer;stringDeserializer;constructor(e,t){super();this.codecDeserializer=e,this.stringDeserializer=new Tt(t)}setSerdeContext(e){this.stringDeserializer.setSerdeContext(e),this.codecDeserializer.setSerdeContext(e),this.serdeContext=e}read(e,t){let r=R.NormalizedSchema.of(e),s=r.getMergedTraits(),n=this.serdeContext?.utf8Encoder??wt.toUtf8;if(s.httpHeader||s.httpResponseCode)return this.stringDeserializer.read(r,n(t));if(s.httpPayload){if(r.isBlobSchema()){let o=this.serdeContext?.utf8Decoder??wt.fromUtf8;if(typeof t==="string")return o(t);return t}else if(r.isStringSchema()){if("byteLength"in t)return n(t);return t}}return this.codecDeserializer.read(r,t)}}class Et extends G{settings;stringBuffer="";constructor(e){super();this.settings=e}write(e,t){let r=R.NormalizedSchema.of(e);switch(typeof t){case"object":if(t===null){this.stringBuffer="null";return}if(r.isTimestampSchema()){if(!(t instanceof Date))throw Error(`@smithy/core/protocols - received non-Date value ${t} when schema expected Date in ${r.getName(!0)}`);switch(_t(r,this.settings)){case 5:this.stringBuffer=t.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=U.dateToUtcString(t);break;case 7:this.stringBuffer=String(t.getTime()/1000);break;default:console.warn("Missing timestamp format, using epoch seconds",t),this.stringBuffer=String(t.getTime()/1000)}return}if(r.isBlobSchema()&&"byteLength"in t){this.stringBuffer=(this.serdeContext?.base64Encoder??He.toBase64)(t);return}if(r.isListSchema()&&Array.isArray(t)){let o="";for(let i of t){this.write([r.getValueSchema(),r.getMergedTraits()],i);let c=this.flush(),a=r.getValueSchema().isTimestampSchema()?c:U.quoteHeader(c);if(o!=="")o+=", ";o+=a}this.stringBuffer=o;return}this.stringBuffer=JSON.stringify(t,null,2);break;case"string":let s=r.getMergedTraits().mediaType,n=t;if(s){if(s==="application/json"||s.endsWith("+json"))n=U.LazyJsonString.from(n);if(r.getMergedTraits().httpHeader){this.stringBuffer=(this.serdeContext?.base64Encoder??He.toBase64)(n.toString());return}}this.stringBuffer=t;break;default:if(r.isIdempotencyToken())this.stringBuffer=U.generateIdempotencyToken();else this.stringBuffer=String(t)}}flush(){let e=this.stringBuffer;return this.stringBuffer="",e}}class Bs{codecSerializer;stringSerializer;buffer;constructor(e,t,r=new Et(t)){this.codecSerializer=e,this.stringSerializer=r}setSerdeContext(e){this.codecSerializer.setSerdeContext(e),this.stringSerializer.setSerdeContext(e)}write(e,t){let r=R.NormalizedSchema.of(e),s=r.getMergedTraits();if(s.httpHeader||s.httpLabel||s.httpQuery){this.stringSerializer.write(r,t),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(r,t)}flush(){if(this.buffer!==void 0){let e=this.buffer;return this.buffer=void 0,e}return this.codecSerializer.flush()}}Ra.FromStringShapeDeserializer=Tt;Ra.HttpBindingProtocol=Rs;Ra.HttpInterceptingShapeDeserializer=Ds;Ra.HttpInterceptingShapeSerializer=Bs;Ra.HttpProtocol=ze;Ra.RequestBuilder=gt;Ra.RpcProtocol=Us;Ra.SerdeContext=G;Ra.ToStringShapeSerializer=Et;Ra.collectBody=v;Ra.determineTimestampFormat=_t;Ra.extendedEncodeURIComponent=ue;Ra.requestBuilder=Aa;Ra.resolvedPath=Is});var Ff=_((he)=>{var qs=Ct(),Ot=Ls(),We=At(),Ja=Qe(),ke=bt();class js{config;middlewareStack=qs.constructStack();initConfig;handlers;constructor(e){this.config=e;let{protocol:t,protocolSettings:r}=e;if(r){if(typeof t==="function")e.protocol=new t(r)}}send(e,t,r){let s=typeof t!=="function"?t:void 0,n=typeof t==="function"?t:r,o=s===void 0&&this.config.cacheMiddleware===!0,i;if(o){if(!this.handlers)this.handlers=new WeakMap;let c=this.handlers;if(c.has(e.constructor))i=c.get(e.constructor);else i=e.resolveMiddleware(this.middlewareStack,this.config,s),c.set(e.constructor,i)}else delete this.handlers,i=e.resolveMiddleware(this.middlewareStack,this.config,s);if(n)i(e).then((c)=>n(null,c.output),(c)=>n(c)).catch(()=>{});else return i(e).then((c)=>c.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var St="***SensitiveInformation***";function xt(e,t){if(t==null)return t;let r=Ja.NormalizedSchema.of(e);if(r.getMergedTraits().sensitive)return St;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return St}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return St}else if(r.isStructSchema()&&typeof t==="object"){let s=t,n={};for(let[o,i]of r.structIterator())if(s[o]!=null)n[o]=xt(i,s[o]);return n}return t}class Mt{middlewareStack=qs.constructStack();schema;static classBuilder(){return new Cs}resolveMiddlewareWithContext(e,t,r,{middlewareFn:s,clientName:n,commandName:o,inputFilterSensitiveLog:i,outputFilterSensitiveLog:c,smithyContext:a,additionalContext:l,CommandCtor:d}){for(let b of s.bind(this)(d,e,t,r))this.middlewareStack.use(b);let f=e.concat(this.middlewareStack),{logger:u}=t,h={logger:u,clientName:n,commandName:o,inputFilterSensitiveLog:i,outputFilterSensitiveLog:c,[We.SMITHY_CONTEXT_KEY]:{commandInstance:this,...a},...l},{requestHandler:p}=t;return f.resolve((b)=>p.handle(b.request,r||{}),h)}}class Cs{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,r={}){return this._smithyContext={service:e,operation:t,...r},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=(r)=>r,t=(r)=>r){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){let e=this,t;return t=class extends Mt{input;static getEndpointParameterInstructions(){return e._ep}constructor(...[r]){super();this.input=r??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(r,s,n){let o=e._operationSchema,i=o?.[4]??o?.input,c=o?.[5]??o?.output;return this.resolveMiddlewareWithContext(r,s,n,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(o?xt.bind(null,i):(a)=>a),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(o?xt.bind(null,c):(a)=>a),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}}var va="***SensitiveInformation***",Ya=(e,t,r)=>{for(let[o,i]of Object.entries(e)){let c=async function(l,d,f){let u=new i(l);if(typeof d==="function")this.send(u,d);else if(typeof f==="function"){if(typeof d!=="object")throw Error(`Expected http options but got ${typeof d}`);this.send(u,d||{},f)}else return this.send(u,d)},a=(o[0].toLowerCase()+o.slice(1)).replace(/Command$/,"");t.prototype[a]=c}let{paginators:s={},waiters:n={}}=r??{};for(let[o,i]of Object.entries(s))if(t.prototype[o]===void 0)t.prototype[o]=function(c={},a,...l){return i({...a,client:this},c,...l)};for(let[o,i]of Object.entries(n))if(t.prototype[o]===void 0)t.prototype[o]=async function(c={},a,...l){let d=a;if(typeof a==="number")d={maxWaitTime:a};return i({...d,client:this},c,...l)}};class V extends Error{$fault;$response;$retryable;$metadata;constructor(e){super(e.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;let t=e;return V.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&(t.$fault==="client"||t.$fault==="server")}static[Symbol.hasInstance](e){if(!e)return!1;let t=e;if(this===V)return V.isInstance(e);if(V.isInstance(e)){if(t.name&&this.name)return this.prototype.isPrototypeOf(e)||t.name===this.name;return this.prototype.isPrototypeOf(e)}return!1}}var Fs=(e,t={})=>{Object.entries(t).filter(([,s])=>s!==void 0).forEach(([s,n])=>{if(e[s]==null||e[s]==="")e[s]=n});let r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e},Hs=({output:e,parsedBody:t,exceptionCtor:r,errorCode:s})=>{let n=Xa(e),o=n.httpStatusCode?n.httpStatusCode+"":void 0,i=new r({name:t?.code||t?.Code||s||o||"UnknownError",$fault:"client",$metadata:n});throw Fs(i,t)},Qa=(e)=>{return({output:t,parsedBody:r,errorCode:s})=>{Hs({output:t,parsedBody:r,exceptionCtor:e,errorCode:s})}},Xa=(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"]}),Za=(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:30000};default:return{}}},Ns=!1,Ga=(e)=>{if(e&&!Ns&&parseInt(e.substring(1,e.indexOf(".")))<16)Ns=!0},zs=Object.values(We.AlgorithmId),Va=(e)=>{let t=[];for(let r in We.AlgorithmId){let s=We.AlgorithmId[r];if(e[s]===void 0)continue;t.push({algorithmId:()=>s,checksumConstructor:()=>e[s]})}for(let[r,s]of Object.entries(e.checksumAlgorithms??{}))t.push({algorithmId:()=>r,checksumConstructor:()=>s});return{addChecksumAlgorithm(r){e.checksumAlgorithms=e.checksumAlgorithms??{};let s=r.algorithmId(),n=r.checksumConstructor();if(zs.includes(s))e.checksumAlgorithms[s.toUpperCase()]=n;else e.checksumAlgorithms[s]=n;t.push(r)},checksumAlgorithms(){return t}}},Ka=(e)=>{let t={};return e.checksumAlgorithms().forEach((r)=>{let s=r.algorithmId();if(zs.includes(s))t[s]=r.checksumConstructor()}),t},ef=(e)=>{return{setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}},tf=(e)=>{let t={};return t.retryStrategy=e.retryStrategy(),t},Ws=(e)=>{return Object.assign(Va(e),ef(e))},rf=Ws,sf=(e)=>{return Object.assign(Ka(e),tf(e))},nf=(e)=>Array.isArray(e)?e:[e],ks=(e)=>{for(let r in e)if(e.hasOwnProperty(r)&&e[r]["#text"]!==void 0)e[r]=e[r]["#text"];else if(typeof e[r]==="object"&&e[r]!==null)e[r]=ks(e[r]);return e},of=(e)=>{return e!=null};class Js{trace(){}debug(){}info(){}warn(){}error(){}}function vs(e,t,r){let s,n,o;if(typeof t>"u"&&typeof r>"u")s={},o=e;else if(s=e,typeof t==="function")return n=t,o=r,ff(s,n,o);else o=t;for(let i of Object.keys(o)){if(!Array.isArray(o[i])){s[i]=o[i];continue}Ys(s,null,o,i)}return s}var cf=(e)=>{let t={};for(let[r,s]of Object.entries(e||{}))t[r]=[,s];return t},af=(e,t)=>{let r={};for(let s in t)Ys(r,e,t,s);return r},ff=(e,t,r)=>{return vs(e,Object.entries(r).reduce((s,[n,o])=>{if(Array.isArray(o))s[n]=o;else if(typeof o==="function")s[n]=[t,o()];else s[n]=[t,o];return s},{}))},Ys=(e,t,r,s)=>{if(t!==null){let i=r[s];if(typeof i==="function")i=[,i];let[c=uf,a=hf,l=s]=i;if(typeof c==="function"&&c(t[l])||typeof c!=="function"&&!!c)e[s]=a(t[l]);return}let[n,o]=r[s];if(typeof o==="function"){let i,c=n===void 0&&(i=o())!=null,a=typeof n==="function"&&!!n(void 0)||typeof n!=="function"&&!!n;if(c)e[s]=i;else if(a)e[s]=o()}else{let i=n===void 0&&o!=null,c=typeof n==="function"&&!!n(o)||typeof n!=="function"&&!!n;if(i||c)e[s]=o}},uf=(e)=>e!=null,hf=(e)=>e,df=(e)=>{if(e!==e)return"NaN";switch(e){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return e}},lf=(e)=>e.toISOString().replace(".000Z","Z"),$t=(e)=>{if(e==null)return{};if(Array.isArray(e))return e.filter((t)=>t!=null).map($t);if(typeof e==="object"){let t={};for(let r of Object.keys(e)){if(e[r]==null)continue;t[r]=$t(e[r])}return t}return e};he.collectBody=Ot.collectBody;he.extendedEncodeURIComponent=Ot.extendedEncodeURIComponent;he.resolvedPath=Ot.resolvedPath;he.Client=js;he.Command=Mt;he.NoOpLogger=Js;he.SENSITIVE_STRING=va;he.ServiceException=V;he._json=$t;he.convertMap=cf;he.createAggregatedClient=Ya;he.decorateServiceException=Fs;he.emitWarningIfUnsupportedVersion=Ga;he.getArrayIfSingleItem=nf;he.getDefaultClientConfiguration=rf;he.getDefaultExtensionConfiguration=Ws;he.getValueFromTextNode=ks;he.isSerializableHeaderValue=of;he.loadConfigsForDefaultMode=Za;he.map=vs;he.resolveDefaultRuntimeConfig=sf;he.serializeDateTime=lf;he.serializeFloat=df;he.take=af;he.throwDefaultError=Hs;he.withBaseException=Qa;Object.prototype.hasOwnProperty.call(ke,"__proto__")&&!Object.prototype.hasOwnProperty.call(he,"__proto__")&&Object.defineProperty(he,"__proto__",{enumerable:!0,value:ke.__proto__});Object.keys(ke).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(he,e))he[e]=ke[e]})});
19
19
  export{Rt as Za,k as _a,Rr as $a,Wr as ab,Xr as bb,ms as cb,It as db,Qe as eb,Ts as fb,bt as gb,Ls as hb,Ff as ib};
20
20
 
21
21
  //# debugId=7413D41A66B4E99E64756E2164756E21
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{pb as J}from"./chunk-hpjqg060.js";import{Bb as I}from"./chunk-dwsazw95.js";var Z=I((Q)=>{var K=J(),L=(b)=>{return{setHttpHandler(j){b.httpHandler=j},httpHandler(){return b.httpHandler},updateHttpClientConfig(j,w){b.httpHandler?.updateHttpClientConfig(j,w)},httpHandlerConfigs(){return b.httpHandler.httpHandlerConfigs()}}},M=(b)=>{return{httpHandler:b.httpHandler()}};class B{name;kind;values;constructor({name:b,kind:j=K.FieldPosition.HEADER,values:w=[]}){this.name=b,this.kind=j,this.values=w}add(b){this.values.push(b)}set(b){this.values=b}remove(b){this.values=this.values.filter((j)=>j!==b)}toString(){return this.values.map((b)=>b.includes(",")||b.includes(" ")?`"${b}"`:b).join(", ")}get(){return this.values}}class D{entries={};encoding;constructor({fields:b=[],encoding:j="utf-8"}){b.forEach(this.setField.bind(this)),this.encoding=j}setField(b){this.entries[b.name.toLowerCase()]=b}getField(b){return this.entries[b.toLowerCase()]}removeField(b){delete this.entries[b.toLowerCase()]}getByType(b){return Object.values(this.entries).filter((j)=>j.kind===b)}}class z{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(b){this.method=b.method||"GET",this.hostname=b.hostname||"localhost",this.port=b.port,this.query=b.query||{},this.headers=b.headers||{},this.body=b.body,this.protocol=b.protocol?b.protocol.slice(-1)!==":"?`${b.protocol}:`:b.protocol:"https:",this.path=b.path?b.path.charAt(0)!=="/"?`/${b.path}`:b.path:"/",this.username=b.username,this.password=b.password,this.fragment=b.fragment}static clone(b){let j=new z({...b,headers:{...b.headers}});if(j.query)j.query=O(j.query);return j}static isInstance(b){if(!b)return!1;let j=b;return"method"in j&&"protocol"in j&&"hostname"in j&&"path"in j&&typeof j.query==="object"&&typeof j.headers==="object"}clone(){return z.clone(this)}}function O(b){return Object.keys(b).reduce((j,w)=>{let A=b[w];return{...j,[w]:Array.isArray(A)?[...A]:A}},{})}class G{statusCode;reason;headers;body;constructor(b){this.statusCode=b.statusCode,this.reason=b.reason,this.headers=b.headers||{},this.body=b.body}static isInstance(b){if(!b)return!1;let j=b;return typeof j.statusCode==="number"&&typeof j.headers==="object"}}function P(b){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(b)}Q.Field=B;Q.Fields=D;Q.HttpRequest=z;Q.HttpResponse=G;Q.getHttpHandlerExtensionConfiguration=L;Q.isValidHostname=P;Q.resolveHttpHandlerRuntimeConfig=M});
2
+ import{pb as J}from"./chunk-gncq70ga.js";import{Bb as I}from"./chunk-2vpsbhpm.js";var Z=I((Q)=>{var K=J(),L=(b)=>{return{setHttpHandler(j){b.httpHandler=j},httpHandler(){return b.httpHandler},updateHttpClientConfig(j,w){b.httpHandler?.updateHttpClientConfig(j,w)},httpHandlerConfigs(){return b.httpHandler.httpHandlerConfigs()}}},M=(b)=>{return{httpHandler:b.httpHandler()}};class B{name;kind;values;constructor({name:b,kind:j=K.FieldPosition.HEADER,values:w=[]}){this.name=b,this.kind=j,this.values=w}add(b){this.values.push(b)}set(b){this.values=b}remove(b){this.values=this.values.filter((j)=>j!==b)}toString(){return this.values.map((b)=>b.includes(",")||b.includes(" ")?`"${b}"`:b).join(", ")}get(){return this.values}}class D{entries={};encoding;constructor({fields:b=[],encoding:j="utf-8"}){b.forEach(this.setField.bind(this)),this.encoding=j}setField(b){this.entries[b.name.toLowerCase()]=b}getField(b){return this.entries[b.toLowerCase()]}removeField(b){delete this.entries[b.toLowerCase()]}getByType(b){return Object.values(this.entries).filter((j)=>j.kind===b)}}class z{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(b){this.method=b.method||"GET",this.hostname=b.hostname||"localhost",this.port=b.port,this.query=b.query||{},this.headers=b.headers||{},this.body=b.body,this.protocol=b.protocol?b.protocol.slice(-1)!==":"?`${b.protocol}:`:b.protocol:"https:",this.path=b.path?b.path.charAt(0)!=="/"?`/${b.path}`:b.path:"/",this.username=b.username,this.password=b.password,this.fragment=b.fragment}static clone(b){let j=new z({...b,headers:{...b.headers}});if(j.query)j.query=O(j.query);return j}static isInstance(b){if(!b)return!1;let j=b;return"method"in j&&"protocol"in j&&"hostname"in j&&"path"in j&&typeof j.query==="object"&&typeof j.headers==="object"}clone(){return z.clone(this)}}function O(b){return Object.keys(b).reduce((j,w)=>{let A=b[w];return{...j,[w]:Array.isArray(A)?[...A]:A}},{})}class G{statusCode;reason;headers;body;constructor(b){this.statusCode=b.statusCode,this.reason=b.reason,this.headers=b.headers||{},this.body=b.body}static isInstance(b){if(!b)return!1;let j=b;return typeof j.statusCode==="number"&&typeof j.headers==="object"}}function P(b){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(b)}Q.Field=B;Q.Fields=D;Q.HttpRequest=z;Q.HttpResponse=G;Q.getHttpHandlerExtensionConfiguration=L;Q.isValidHostname=P;Q.resolveHttpHandlerRuntimeConfig=M});
3
3
  export{Z as jb};
4
4
 
5
5
  //# debugId=3A0618664445C2B964756E2164756E21
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{pb as re}from"./chunk-hpjqg060.js";import{Bb as _,Db as a}from"./chunk-dwsazw95.js";var I=_((b)=>{Object.defineProperty(b,"__esModule",{value:!0});b.getHomeDir=void 0;var W=a("os"),V=a("path"),x={},G=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},U=()=>{let{HOME:e,USERPROFILE:t,HOMEPATH:r,HOMEDRIVE:o=`C:${V.sep}`}=process.env;if(e)return e;if(t)return t;if(r)return`${o}${r}`;let i=G();if(!x[i])x[i]=(0,W.homedir)();return x[i]};b.getHomeDir=U});var P=_((j)=>{Object.defineProperty(j,"__esModule",{value:!0});j.getSSOTokenFilepath=void 0;var X=a("crypto"),B=a("path"),J=I(),z=(e)=>{let r=(0,X.createHash)("sha1").update(e).digest("hex");return(0,B.join)((0,J.getHomeDir)(),".aws","sso","cache",`${r}.json`)};j.getSSOTokenFilepath=z});var R=_((C)=>{Object.defineProperty(C,"__esModule",{value:!0});C.getSSOTokenFromFile=C.tokenIntercept=void 0;var Q=a("fs/promises"),Y=P();C.tokenIntercept={};var Z=async(e)=>{if(C.tokenIntercept[e])return C.tokenIntercept[e];let t=(0,Y.getSSOTokenFilepath)(e),r=await(0,Q.readFile)(t,"utf8");return JSON.parse(r)};C.getSSOTokenFromFile=Z});var k=_((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.readFile=L.fileIntercept=L.filePromises=void 0;var ee=a("fs/promises");L.filePromises={};L.fileIntercept={};var te=(e,t)=>{if(L.fileIntercept[e]!==void 0)return L.fileIntercept[e];if(!L.filePromises[e]||t?.ignoreCache)L.filePromises[e]=(0,ee.readFile)(e,"utf8");return L.filePromises[e]};L.readFile=te});var ye=_((c)=>{var l=I(),O=P(),y=R(),g=a("path"),S=re(),f=k(),q="AWS_PROFILE",$="default",oe=(e)=>e.profile||process.env[q]||$,p=".",ie=(e)=>Object.entries(e).filter(([t])=>{let r=t.indexOf(p);if(r===-1)return!1;return Object.values(S.IniSectionType).includes(t.substring(0,r))}).reduce((t,[r,o])=>{let i=r.indexOf(p),n=r.substring(0,i)===S.IniSectionType.PROFILE?r.substring(i+1):r;return t[n]=o,t},{...e.default&&{default:e.default}}),ne="AWS_CONFIG_FILE",M=()=>process.env[ne]||g.join(l.getHomeDir(),".aws","config"),se="AWS_SHARED_CREDENTIALS_FILE",ce=()=>process.env[se]||g.join(l.getHomeDir(),".aws","credentials"),ae=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,le=["__proto__","profile __proto__"],T=(e)=>{let t={},r,o;for(let i of e.split(/\r?\n/)){let n=i.split(/(^|\s)[;#]/)[0].trim();if(n[0]==="["&&n[n.length-1]==="]"){r=void 0,o=void 0;let s=n.substring(1,n.length-1),u=ae.exec(s);if(u){let[,d,,m]=u;if(Object.values(S.IniSectionType).includes(d))r=[d,m].join(p)}else r=s;if(le.includes(s))throw Error(`Found invalid profile name "${s}"`)}else if(r){let s=n.indexOf("=");if(![0,-1].includes(s)){let[u,d]=[n.substring(0,s).trim(),n.substring(s+1).trim()];if(d==="")o=u;else{if(o&&i.trimStart()===i)o=void 0;t[r]=t[r]||{};let m=o?[o,u].join(p):u;t[r][m]=d}}}}return t},A=()=>({}),K=async(e={})=>{let{filepath:t=ce(),configFilepath:r=M()}=e,o=l.getHomeDir(),i="~/",n=t;if(t.startsWith("~/"))n=g.join(o,t.slice(2));let h=r;if(r.startsWith("~/"))h=g.join(o,r.slice(2));let s=await Promise.all([f.readFile(h,{ignoreCache:e.ignoreCache}).then(T).then(ie).catch(A),f.readFile(n,{ignoreCache:e.ignoreCache}).then(T).catch(A)]);return{configFile:s[0],credentialsFile:s[1]}},pe=(e)=>Object.entries(e).filter(([t])=>t.startsWith(S.IniSectionType.SSO_SESSION+p)).reduce((t,[r,o])=>({...t,[r.substring(r.indexOf(p)+1)]:o}),{}),ue=()=>({}),fe=async(e={})=>f.readFile(e.configFilepath??M()).then(T).then(pe).catch(ue),de=(...e)=>{let t={};for(let r of e)for(let[o,i]of Object.entries(r))if(t[o]!==void 0)Object.assign(t[o],i);else t[o]=i;return t},_e=async(e)=>{let t=await K(e);return de(t.configFile,t.credentialsFile)},Fe={getFileRecord(){return f.fileIntercept},interceptFile(e,t){f.fileIntercept[e]=Promise.resolve(t)},getTokenRecord(){return y.tokenIntercept},interceptToken(e,t){y.tokenIntercept[e]=t}};c.getSSOTokenFromFile=y.getSSOTokenFromFile;c.readFile=f.readFile;c.CONFIG_PREFIX_SEPARATOR=p;c.DEFAULT_PROFILE=$;c.ENV_PROFILE=q;c.externalDataInterceptor=Fe;c.getProfileName=oe;c.loadSharedConfigFiles=K;c.loadSsoSessionData=fe;c.parseKnownFiles=_e;Object.prototype.hasOwnProperty.call(l,"__proto__")&&!Object.prototype.hasOwnProperty.call(c,"__proto__")&&Object.defineProperty(c,"__proto__",{enumerable:!0,value:l.__proto__});Object.keys(l).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(c,e))c[e]=l[e]});Object.prototype.hasOwnProperty.call(O,"__proto__")&&!Object.prototype.hasOwnProperty.call(c,"__proto__")&&Object.defineProperty(c,"__proto__",{enumerable:!0,value:O.__proto__});Object.keys(O).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(c,e))c[e]=O[e]})});
2
+ import{pb as re}from"./chunk-gncq70ga.js";import{Bb as _,Db as a}from"./chunk-2vpsbhpm.js";var I=_((b)=>{Object.defineProperty(b,"__esModule",{value:!0});b.getHomeDir=void 0;var W=a("os"),V=a("path"),x={},G=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},U=()=>{let{HOME:e,USERPROFILE:t,HOMEPATH:r,HOMEDRIVE:o=`C:${V.sep}`}=process.env;if(e)return e;if(t)return t;if(r)return`${o}${r}`;let i=G();if(!x[i])x[i]=(0,W.homedir)();return x[i]};b.getHomeDir=U});var P=_((j)=>{Object.defineProperty(j,"__esModule",{value:!0});j.getSSOTokenFilepath=void 0;var X=a("crypto"),B=a("path"),J=I(),z=(e)=>{let r=(0,X.createHash)("sha1").update(e).digest("hex");return(0,B.join)((0,J.getHomeDir)(),".aws","sso","cache",`${r}.json`)};j.getSSOTokenFilepath=z});var R=_((C)=>{Object.defineProperty(C,"__esModule",{value:!0});C.getSSOTokenFromFile=C.tokenIntercept=void 0;var Q=a("fs/promises"),Y=P();C.tokenIntercept={};var Z=async(e)=>{if(C.tokenIntercept[e])return C.tokenIntercept[e];let t=(0,Y.getSSOTokenFilepath)(e),r=await(0,Q.readFile)(t,"utf8");return JSON.parse(r)};C.getSSOTokenFromFile=Z});var k=_((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.readFile=L.fileIntercept=L.filePromises=void 0;var ee=a("fs/promises");L.filePromises={};L.fileIntercept={};var te=(e,t)=>{if(L.fileIntercept[e]!==void 0)return L.fileIntercept[e];if(!L.filePromises[e]||t?.ignoreCache)L.filePromises[e]=(0,ee.readFile)(e,"utf8");return L.filePromises[e]};L.readFile=te});var ye=_((c)=>{var l=I(),O=P(),y=R(),g=a("path"),S=re(),f=k(),q="AWS_PROFILE",$="default",oe=(e)=>e.profile||process.env[q]||$,p=".",ie=(e)=>Object.entries(e).filter(([t])=>{let r=t.indexOf(p);if(r===-1)return!1;return Object.values(S.IniSectionType).includes(t.substring(0,r))}).reduce((t,[r,o])=>{let i=r.indexOf(p),n=r.substring(0,i)===S.IniSectionType.PROFILE?r.substring(i+1):r;return t[n]=o,t},{...e.default&&{default:e.default}}),ne="AWS_CONFIG_FILE",M=()=>process.env[ne]||g.join(l.getHomeDir(),".aws","config"),se="AWS_SHARED_CREDENTIALS_FILE",ce=()=>process.env[se]||g.join(l.getHomeDir(),".aws","credentials"),ae=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,le=["__proto__","profile __proto__"],T=(e)=>{let t={},r,o;for(let i of e.split(/\r?\n/)){let n=i.split(/(^|\s)[;#]/)[0].trim();if(n[0]==="["&&n[n.length-1]==="]"){r=void 0,o=void 0;let s=n.substring(1,n.length-1),u=ae.exec(s);if(u){let[,d,,m]=u;if(Object.values(S.IniSectionType).includes(d))r=[d,m].join(p)}else r=s;if(le.includes(s))throw Error(`Found invalid profile name "${s}"`)}else if(r){let s=n.indexOf("=");if(![0,-1].includes(s)){let[u,d]=[n.substring(0,s).trim(),n.substring(s+1).trim()];if(d==="")o=u;else{if(o&&i.trimStart()===i)o=void 0;t[r]=t[r]||{};let m=o?[o,u].join(p):u;t[r][m]=d}}}}return t},A=()=>({}),K=async(e={})=>{let{filepath:t=ce(),configFilepath:r=M()}=e,o=l.getHomeDir(),i="~/",n=t;if(t.startsWith("~/"))n=g.join(o,t.slice(2));let h=r;if(r.startsWith("~/"))h=g.join(o,r.slice(2));let s=await Promise.all([f.readFile(h,{ignoreCache:e.ignoreCache}).then(T).then(ie).catch(A),f.readFile(n,{ignoreCache:e.ignoreCache}).then(T).catch(A)]);return{configFile:s[0],credentialsFile:s[1]}},pe=(e)=>Object.entries(e).filter(([t])=>t.startsWith(S.IniSectionType.SSO_SESSION+p)).reduce((t,[r,o])=>({...t,[r.substring(r.indexOf(p)+1)]:o}),{}),ue=()=>({}),fe=async(e={})=>f.readFile(e.configFilepath??M()).then(T).then(pe).catch(ue),de=(...e)=>{let t={};for(let r of e)for(let[o,i]of Object.entries(r))if(t[o]!==void 0)Object.assign(t[o],i);else t[o]=i;return t},_e=async(e)=>{let t=await K(e);return de(t.configFile,t.credentialsFile)},Fe={getFileRecord(){return f.fileIntercept},interceptFile(e,t){f.fileIntercept[e]=Promise.resolve(t)},getTokenRecord(){return y.tokenIntercept},interceptToken(e,t){y.tokenIntercept[e]=t}};c.getSSOTokenFromFile=y.getSSOTokenFromFile;c.readFile=f.readFile;c.CONFIG_PREFIX_SEPARATOR=p;c.DEFAULT_PROFILE=$;c.ENV_PROFILE=q;c.externalDataInterceptor=Fe;c.getProfileName=oe;c.loadSharedConfigFiles=K;c.loadSsoSessionData=fe;c.parseKnownFiles=_e;Object.prototype.hasOwnProperty.call(l,"__proto__")&&!Object.prototype.hasOwnProperty.call(c,"__proto__")&&Object.defineProperty(c,"__proto__",{enumerable:!0,value:l.__proto__});Object.keys(l).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(c,e))c[e]=l[e]});Object.prototype.hasOwnProperty.call(O,"__proto__")&&!Object.prototype.hasOwnProperty.call(c,"__proto__")&&Object.defineProperty(c,"__proto__",{enumerable:!0,value:O.__proto__});Object.keys(O).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(c,e))c[e]=O[e]})});
3
3
  export{ye as Ya};
4
4
 
5
5
  //# debugId=A8D72241429BE0F864756E2164756E21