gemi 0.8.1 → 0.8.2

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 (43) hide show
  1. package/dist/bin/index.js +212 -232
  2. package/dist/chunk-18ce9t29.js +4 -0
  3. package/dist/{chunk-taxjvwa6.js.map → chunk-18ce9t29.js.map} +5 -5
  4. package/dist/{chunk-cbt3v889.js → chunk-471zprvy.js} +2 -2
  5. package/dist/{chunk-cbt3v889.js.map → chunk-471zprvy.js.map} +1 -1
  6. package/dist/chunk-686d5sc0.js +5 -0
  7. package/dist/{chunk-vq90tfsz.js.map → chunk-686d5sc0.js.map} +5 -5
  8. package/dist/{chunk-t2aat5vw.js → chunk-8mg4frr6.js} +1 -1
  9. package/dist/{chunk-9aaqjzzf.js → chunk-9hs4hzpr.js} +2 -2
  10. package/dist/{chunk-9aaqjzzf.js.map → chunk-9hs4hzpr.js.map} +1 -1
  11. package/dist/chunk-dgbadcr8.js +4 -0
  12. package/dist/{chunk-j1cwwmg0.js.map → chunk-dgbadcr8.js.map} +2 -2
  13. package/dist/{chunk-q11xg1z2.js → chunk-fe0yca19.js} +2 -2
  14. package/dist/{chunk-f3qyx9ah.js → chunk-pvqj4vwf.js} +1 -1
  15. package/dist/chunk-rbxbvagv.js +4 -0
  16. package/dist/{chunk-2g6dyn68.js.map → chunk-rbxbvagv.js.map} +4 -4
  17. package/dist/chunk-vegenqty.js +20 -0
  18. package/dist/{chunk-bs1xyw0h.js.map → chunk-vegenqty.js.map} +12 -10
  19. package/dist/chunk-xckygssg.js +4 -0
  20. package/dist/{chunk-9s54rg4n.js.map → chunk-xckygssg.js.map} +4 -4
  21. package/dist/{chunk-tc3amtc4.js → chunk-zvwbevjc.js} +1 -1
  22. package/dist/client/Mutation.d.ts +1 -1
  23. package/dist/client/Mutation.d.ts.map +1 -1
  24. package/dist/client/_Form.d.ts +1 -1
  25. package/dist/client/_Form.d.ts.map +1 -1
  26. package/dist/client/index.js +4977 -4512
  27. package/dist/client/index.js.map +1 -1
  28. package/dist/kernel/index.js +1 -1
  29. package/dist/services/index.js +6 -6
  30. package/dist/services/index.js.map +6 -6
  31. package/dist/services/router/ViewRouterServiceProvider.d.ts +2 -1
  32. package/dist/services/router/ViewRouterServiceProvider.d.ts.map +1 -1
  33. package/package.json +5 -3
  34. package/dist/chunk-2g6dyn68.js +0 -4
  35. package/dist/chunk-9s54rg4n.js +0 -4
  36. package/dist/chunk-bs1xyw0h.js +0 -20
  37. package/dist/chunk-j1cwwmg0.js +0 -4
  38. package/dist/chunk-taxjvwa6.js +0 -4
  39. package/dist/chunk-vq90tfsz.js +0 -5
  40. /package/dist/{chunk-t2aat5vw.js.map → chunk-8mg4frr6.js.map} +0 -0
  41. /package/dist/{chunk-q11xg1z2.js.map → chunk-fe0yca19.js.map} +0 -0
  42. /package/dist/{chunk-f3qyx9ah.js.map → chunk-pvqj4vwf.js.map} +0 -0
  43. /package/dist/{chunk-tc3amtc4.js.map → chunk-zvwbevjc.js.map} +0 -0
@@ -1,5 +0,0 @@
1
- import{hb as W}from"./chunk-t098k1va.js";import{_b as z}from"./chunk-yp5mh81v.js";var C=(e,t)=>{let r=[];if(e)r.push(e);if(t)for(let n of t)r.push(n);return r},S=(e,t)=>{return`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`},A=()=>{let e=[],t=[],r=!1,n=new Set,o=(a)=>a.sort((f,d)=>oe[d.step]-oe[f.step]||se[d.priority||"normal"]-se[f.priority||"normal"]),s=(a)=>{let f=!1,d=(y)=>{let w=C(y.name,y.aliases);if(w.includes(a)){f=!0;for(let p of w)n.delete(p);return!1}return!0};return e=e.filter(d),t=t.filter(d),f},c=(a)=>{let f=!1,d=(y)=>{if(y.middleware===a){f=!0;for(let w of C(y.name,y.aliases))n.delete(w);return!1}return!0};return e=e.filter(d),t=t.filter(d),f},i=(a)=>{return e.forEach((f)=>{a.add(f.middleware,{...f})}),t.forEach((f)=>{a.addRelativeTo(f.middleware,{...f})}),a.identifyOnResolve?.(g.identifyOnResolve()),a},u=(a)=>{let f=[];return a.before.forEach((d)=>{if(d.before.length===0&&d.after.length===0)f.push(d);else f.push(...u(d))}),f.push(a),a.after.reverse().forEach((d)=>{if(d.before.length===0&&d.after.length===0)f.push(d);else f.push(...u(d))}),f},h=(a=!1)=>{let f=[],d=[],y={};return e.forEach((p)=>{let m={...p,before:[],after:[]};for(let l of C(m.name,m.aliases))y[l]=m;f.push(m)}),t.forEach((p)=>{let m={...p,before:[],after:[]};for(let l of C(m.name,m.aliases))y[l]=m;d.push(m)}),d.forEach((p)=>{if(p.toMiddleware){let m=y[p.toMiddleware];if(m===void 0){if(a)return;throw new Error(`${p.toMiddleware} is not found when adding ${S(p.name,p.aliases)} middleware ${p.relation} ${p.toMiddleware}`)}if(p.relation==="after")m.after.push(p);if(p.relation==="before")m.before.push(p)}}),o(f).map(u).reduce((p,m)=>{return p.push(...m),p},[])},g={add:(a,f={})=>{let{name:d,override:y,aliases:w}=f,p={step:"initialize",priority:"normal",middleware:a,...f},m=C(d,w);if(m.length>0){if(m.some((l)=>n.has(l))){if(!y)throw new Error(`Duplicate middleware name '${S(d,w)}'`);for(let l of m){let x=e.findIndex((M)=>M.name===l||M.aliases?.some((v)=>v===l));if(x===-1)continue;let E=e[x];if(E.step!==p.step||p.priority!==E.priority)throw new Error(`"${S(E.name,E.aliases)}" middleware with ${E.priority} priority in ${E.step} step cannot be overridden by "${S(d,w)}" middleware with ${p.priority} priority in ${p.step} step.`);e.splice(x,1)}}for(let l of m)n.add(l)}e.push(p)},addRelativeTo:(a,f)=>{let{name:d,override:y,aliases:w}=f,p={middleware:a,...f},m=C(d,w);if(m.length>0){if(m.some((l)=>n.has(l))){if(!y)throw new Error(`Duplicate middleware name '${S(d,w)}'`);for(let l of m){let x=t.findIndex((M)=>M.name===l||M.aliases?.some((v)=>v===l));if(x===-1)continue;let E=t[x];if(E.toMiddleware!==p.toMiddleware||E.relation!==p.relation)throw new Error(`"${S(E.name,E.aliases)}" middleware ${E.relation} "${E.toMiddleware}" middleware cannot be overridden by "${S(d,w)}" middleware ${p.relation} "${p.toMiddleware}" middleware.`);t.splice(x,1)}}for(let l of m)n.add(l)}t.push(p)},clone:()=>i(A()),use:(a)=>{a.applyToStack(g)},remove:(a)=>{if(typeof a==="string")return s(a);else return c(a)},removeByTag:(a)=>{let f=!1,d=(y)=>{let{tags:w,name:p,aliases:m}=y;if(w&&w.includes(a)){let l=C(p,m);for(let x of l)n.delete(x);return f=!0,!1}return!0};return e=e.filter(d),t=t.filter(d),f},concat:(a)=>{let f=i(A());return f.use(a),f.identifyOnResolve(r||f.identifyOnResolve()||(a.identifyOnResolve?.()??!1)),f},applyToStack:i,identify:()=>{return h(!0).map((a)=>{let f=a.step??a.relation+" "+a.toMiddleware;return S(a.name,a.aliases)+" - "+f})},identifyOnResolve(a){if(typeof a==="boolean")r=a;return r},resolve:(a,f)=>{for(let d of h().map((y)=>y.middleware).reverse())a=d(a,f);if(r)console.log(g.identify());return a}};return g},oe={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},se={high:3,normal:2,low:1};class Ye{constructor(e){this.config=e,this.middlewareStack=A()}send(e,t,r){let n=typeof t!=="function"?t:void 0,o=typeof t==="function"?t:r,s=n===void 0&&this.config.cacheMiddleware===!0,c;if(s){if(!this.handlers)this.handlers=new WeakMap;let i=this.handlers;if(i.has(e.constructor))c=i.get(e.constructor);else c=e.resolveMiddleware(this.middlewareStack,this.config,n),i.set(e.constructor,c)}else delete this.handlers,c=e.resolveMiddleware(this.middlewareStack,this.config,n);if(o)c(e).then((i)=>o(null,i.output),(i)=>o(i)).catch(()=>{});else return c(e).then((i)=>i.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var ie=z(W(),1);class ce{constructor(){this.middlewareStack=A()}static classBuilder(){return new ae}resolveMiddlewareWithContext(e,t,r,{middlewareFn:n,clientName:o,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,smithyContext:u,additionalContext:h,CommandCtor:g}){for(let w of n.bind(this)(g,e,t,r))this.middlewareStack.use(w);let a=e.concat(this.middlewareStack),{logger:f}=t,d={logger:f,clientName:o,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,[ie.SMITHY_CONTEXT_KEY]:{commandInstance:this,...u},...h},{requestHandler:y}=t;return a.resolve((w)=>y.handle(w.request,r||{}),d)}}class ae{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(e)=>e,this._outputFilterSensitiveLog=(e)=>e,this._serializer=null,this._deserializer=null}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}build(){let e=this,t;return t=class extends ce{static getEndpointParameterInstructions(){return e._ep}constructor(...[r]){super();this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=r??{},e._init(this)}resolveMiddleware(r,n,o){return this.resolveMiddlewareWithContext(r,n,o,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}var Jt=(e)=>{let t=e.httpHandler;return{setHttpHandler(r){t=r},httpHandler(){return t},updateHttpClientConfig(r,n){t.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return t.httpHandlerConfigs()}}},Vt=(e)=>{return{httpHandler:e.httpHandler()}};var Xe=z(W(),1);class j{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){let t=new j({...e,headers:{...e.headers}});if(t.query)t.query=Ze(t.query);return t}static isInstance(e){if(!e)return!1;let t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query==="object"&&typeof t.headers==="object"}clone(){return j.clone(this)}}function Ze(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}class _{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;let t=e;return typeof t.statusCode==="number"&&typeof t.headers==="object"}}var U=(e)=>encodeURIComponent(e).replace(/[!'()*]/g,Qe),Qe=(e)=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function L(e){let t=[];for(let r of Object.keys(e).sort()){let n=e[r];if(r=U(r),Array.isArray(n))for(let o=0,s=n.length;o<s;o++)t.push(`${r}=${U(n[o])}`);else{let o=r;if(n||typeof n==="string")o+=`=${U(n)}`;t.push(o)}}return t.join("&")}import{Agent as pe,request as et}from"http";import{Agent as me,request as tt}from"https";var fe=["ECONNRESET","EPIPE","ETIMEDOUT"];var q=(e)=>{let t={};for(let r of Object.keys(e)){let n=e[r];t[r]=Array.isArray(n)?n.join(","):n}return t};var ue=(e,t,r=0)=>{if(!r)return-1;let n=(o)=>{let s=setTimeout(()=>{e.destroy(),t(Object.assign(new Error(`Socket timed out without establishing a connection within ${r} ms`),{name:"TimeoutError"}))},r-o),c=(i)=>{if(i?.connecting)i.on("connect",()=>{clearTimeout(s)});else clearTimeout(s)};if(e.socket)c(e.socket);else e.on("socket",c)};if(r<2000)return n(0),0;return setTimeout(n.bind(null,1000),1000)};var de=(e,{keepAlive:t,keepAliveMsecs:r},n=3000)=>{if(t!==!0)return-1;let o=()=>{if(e.socket)e.socket.setKeepAlive(t,r||0);else e.on("socket",(s)=>{s.setKeepAlive(t,r||0)})};if(n===0)return o(),0;return setTimeout(o,n)};var le=(e,t,r=0)=>{let n=(o)=>{e.setTimeout(r-o,()=>{e.destroy(),t(Object.assign(new Error(`Connection timed out after ${r} ms`),{name:"TimeoutError"}))})};if(0<r&&r<6000)return n(0),0;return setTimeout(n.bind(null,r===0?0:3000),3000)};import{Readable as Ge}from"stream";var he=1000;async function J(e,t,r=he){let n=t.headers??{},o=n.Expect||n.expect,s=-1,c=!1;if(o==="100-continue")await Promise.race([new Promise((i)=>{s=Number(setTimeout(i,Math.max(he,r)))}),new Promise((i)=>{e.on("continue",()=>{clearTimeout(s),i()}),e.on("error",()=>{c=!0,clearTimeout(s),i()})})]);if(!c)Ke(e,t.body)}function Ke(e,t){if(t instanceof Ge){t.pipe(e);return}if(t){if(Buffer.isBuffer(t)||typeof t==="string"){e.end(t);return}let r=t;if(typeof r==="object"&&r.buffer&&typeof r.byteOffset==="number"&&typeof r.byteLength==="number"){e.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}e.end(Buffer.from(t));return}e.end()}class V{static create(e){if(typeof e?.handle==="function")return e;return new V(e)}static checkSocketUsage(e,t,r=console){let{sockets:n,requests:o,maxSockets:s}=e;if(typeof s!=="number"||s===1/0)return t;let c=15000;if(Date.now()-c<t)return t;if(n&&o)for(let i in n){let u=n[i]?.length??0,h=o[i]?.length??0;if(u>=s&&h>=2*s)return r?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${u} and ${h} additional requests are enqueued.
2
- See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
3
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return t}constructor(e){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((t,r)=>{if(typeof e==="function")e().then((n)=>{t(this.resolveDefaultConfig(n))}).catch(r);else t(this.resolveDefaultConfig(e))})}resolveDefaultConfig(e){let{requestTimeout:t,connectionTimeout:r,socketTimeout:n,httpAgent:o,httpsAgent:s}=e||{},c=!0,i=50;return{connectionTimeout:r,requestTimeout:t??n,httpAgent:(()=>{if(o instanceof pe||typeof o?.destroy==="function")return o;return new pe({keepAlive:!0,maxSockets:50,...o})})(),httpsAgent:(()=>{if(s instanceof me||typeof s?.destroy==="function")return s;return new me({keepAlive:!0,maxSockets:50,...s})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t}={}){if(!this.config)this.config=await this.configProvider;return new Promise((r,n)=>{let o=void 0,s=[],c=async(l)=>{await o,s.forEach(clearTimeout),r(l)},i=async(l)=>{await o,s.forEach(clearTimeout),n(l)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(t?.aborted){let l=new Error("Request aborted");l.name="AbortError",i(l);return}let u=e.protocol==="https:",h=u?this.config.httpsAgent:this.config.httpAgent;s.push(setTimeout(()=>{this.socketWarningTimestamp=V.checkSocketUsage(h,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let g=L(e.query||{}),a=void 0;if(e.username!=null||e.password!=null){let l=e.username??"",x=e.password??"";a=`${l}:${x}`}let f=e.path;if(g)f+=`?${g}`;if(e.fragment)f+=`#${e.fragment}`;let d=e.hostname??"";if(d[0]==="["&&d.endsWith("]"))d=e.hostname.slice(1,-1);else d=e.hostname;let y={headers:e.headers,host:d,method:e.method,path:f,port:e.port,agent:h,auth:a},p=(u?tt:et)(y,(l)=>{let x=new _({statusCode:l.statusCode||-1,reason:l.statusMessage,headers:q(l.headers),body:l});c({response:x})});if(p.on("error",(l)=>{if(fe.includes(l.code))i(Object.assign(l,{name:"TimeoutError"}));else i(l)}),t){let l=()=>{p.destroy();let x=new Error("Request aborted");x.name="AbortError",i(x)};if(typeof t.addEventListener==="function"){let x=t;x.addEventListener("abort",l,{once:!0}),p.once("close",()=>x.removeEventListener("abort",l))}else t.onabort=l}s.push(ue(p,i,this.config.connectionTimeout)),s.push(le(p,i,this.config.requestTimeout));let m=y.agent;if(typeof m==="object"&&"keepAlive"in m)s.push(de(p,{keepAlive:m.keepAlive,keepAliveMsecs:m.keepAliveMsecs}));o=J(p,e,this.config.requestTimeout).catch((l)=>{return s.forEach(clearTimeout),n(l)})})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((r)=>{return{...r,[e]:t}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as rt}from"stream";class Y extends rt{constructor(){super(...arguments);this.bufferedBytes=[]}_write(e,t,r){this.bufferedBytes.push(e),r()}}var ye=(e)=>{if(nt(e))return ot(e);return new Promise((t,r)=>{let n=new Y;e.pipe(n),e.on("error",(o)=>{n.end(),r(o)}),n.on("error",r),n.on("finish",function(){let o=new Uint8Array(Buffer.concat(this.bufferedBytes));t(o)})})},nt=(e)=>typeof ReadableStream==="function"&&e instanceof ReadableStream;async function ot(e){let t=[],r=e.getReader(),n=!1,o=0;while(!n){let{done:i,value:u}=await r.read();if(u)t.push(u),o+=u.length;n=i}let s=new Uint8Array(o),c=0;for(let i of t)s.set(i,c),c+=i.length;return s}var rn="***SensitiveInformation***";var on=(e,t)=>{for(let r of Object.keys(e)){let n=e[r],o=async function(c,i,u){let h=new n(c);if(typeof i==="function")this.send(h,i);else if(typeof u==="function"){if(typeof i!=="object")throw new Error(`Expected http options but got ${typeof i}`);this.send(h,i||{},u)}else return this.send(h,i)},s=(r[0].toLowerCase()+r.slice(1)).replace(/Command$/,"");t.prototype[s]=o}};class ge extends Error{constructor(e){super(e.message);Object.setPrototypeOf(this,ge.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}var we=(e,t={})=>{Object.entries(t).filter(([,n])=>n!==void 0).forEach(([n,o])=>{if(e[n]==null||e[n]==="")e[n]=o});let r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e};class st{trace(){}debug(){}info(){}warn(){}error(){}}var xe=(e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]";import{Buffer as X}from"buffer";var I=(e,t=0,r=e.byteLength-t)=>{if(!xe(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return X.from(e,t,r)},O=(e,t)=>{if(typeof e!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?X.from(e,t):X.from(e)};var it=/^[A-Za-z0-9+/]*={0,2}$/,D=(e)=>{if(e.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!it.exec(e))throw new TypeError("Invalid base64 string.");let t=O(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)};var R=(e)=>{let t=O(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var wn=(e)=>{if(typeof e==="string")return R(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)};var B=(e)=>{if(typeof e==="string")return e;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return I(e.buffer,e.byteOffset,e.byteLength).toString("utf8")};var H=(e)=>{let t;if(typeof e==="string")t=R(e);else t=e;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return I(t.buffer,t.byteOffset,t.byteLength).toString("base64")};function Ee(e,t="utf-8"){if(t==="base64")return H(e);return B(e)}function be(e,t){if(t==="base64")return T.mutate(D(e));return T.mutate(R(e))}class T extends Uint8Array{static fromString(e,t="utf-8"){switch(typeof e){case"string":return be(e,t);default:throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}}static mutate(e){return Object.setPrototypeOf(e,T.prototype),e}transformToString(e="utf-8"){return Ee(this,e)}}import{Readable as ct}from"stream";var Bn=(e,t)=>{let{base64Encoder:r,bodyLengthChecker:n,checksumAlgorithmFn:o,checksumLocationName:s,streamHasher:c}=t,i=r!==void 0&&o!==void 0&&s!==void 0&&c!==void 0,u=i?c(o,e):void 0,h=new ct({read:()=>{}});return e.on("data",(g)=>{let a=n(g)||0;h.push(`${a.toString(16)}\r\n`),h.push(g),h.push("\r\n")}),e.on("end",async()=>{if(h.push("0\r\n"),i){let g=r(await u);h.push(`${s}:${g}\r\n`),h.push("\r\n")}h.push(null)}),h};import{Readable as Q}from"stream";import{TextDecoder as dt}from"util";var Te=(e)=>{if(typeof Blob==="function"&&e instanceof Blob)return at(e);return ft(e)};async function at(e){let t=await ut(e),r=D(t);return new Uint8Array(r)}async function ft(e){let t=[],r=e.getReader(),n=!1,o=0;while(!n){let{done:i,value:u}=await r.read();if(u)t.push(u),o+=u.length;n=i}let s=new Uint8Array(o),c=0;for(let i of t)s.set(i,c),c+=i.length;return s}function ut(e){return new Promise((t,r)=>{let n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));let o=n.result??"",s=o.indexOf(","),c=s>-1?s+1:o.length;t(o.substring(c))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})}var Se={},Z={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();if(t.length===1)t=`0${t}`;Se[e]=t,Z[t]=e}function Gn(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){let n=e.slice(r,r+2).toLowerCase();if(n in Z)t[r/2]=Z[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t}function Ce(e){let t="";for(let r=0;r<e.byteLength;r++)t+=Se[e[r]];return t}var $=(e)=>typeof ReadableStream==="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream);var $e="The stream has already been transformed.",Ie=(e)=>{if(!Ae(e)&&!$(e)){let o=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${o}`)}let t=!1,r=async()=>{if(t)throw new Error($e);return t=!0,await Te(e)},n=(o)=>{if(typeof o.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return o.stream()};return Object.assign(e,{transformToByteArray:r,transformToString:async(o)=>{let s=await r();if(o==="base64")return H(s);else if(o==="hex")return Ce(s);else if(o===void 0||o==="utf8"||o==="utf-8")return B(s);else if(typeof TextDecoder==="function")return new TextDecoder(o).decode(s);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error($e);if(t=!0,Ae(e))return n(e);else if($(e))return e;else throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},Ae=(e)=>typeof Blob==="function"&&e instanceof Blob;var Re="The stream has already been transformed.",ho=(e)=>{if(!(e instanceof Q))try{return Ie(e)}catch(n){let o=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${o}`)}let t=!1,r=async()=>{if(t)throw new Error(Re);return t=!0,await ye(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async(n)=>{let o=await r();if(n===void 0||Buffer.isEncoding(n))return I(o.buffer,o.byteOffset,o.byteLength).toString(n);else return new dt(n).decode(o)},transformToWebStream:()=>{if(t)throw new Error(Re);if(e.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof Q.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return t=!0,Q.toWeb(e)}})};import{PassThrough as ke}from"stream";async function Ne(e){if(typeof e.stream==="function")e=e.stream();return e.tee()}async function xo(e){if($(e))return Ne(e);let t=new ke,r=new ke;return e.pipe(t),e.pipe(r),[t,r]}import{Writable as lt}from"stream";async function Me(e,t){let r=0,n=[],o=e.getReader(),s=!1;while(!s){let{done:u,value:h}=await o.read();if(h)n.push(h),r+=h?.byteLength??0;if(r>=t)break;s=u}o.releaseLock();let c=new Uint8Array(Math.min(t,r)),i=0;for(let u of n){if(u.byteLength>c.byteLength-i){c.set(u.subarray(0,c.byteLength-i),i);break}else c.set(u,i);i+=u.length}return c}var $o=(e,t)=>{if($(e))return Me(e,t);return new Promise((r,n)=>{let o=new _e;o.limit=t,e.pipe(o),e.on("error",(s)=>{o.end(),n(s)}),o.on("error",n),o.on("finish",function(){let s=new Uint8Array(Buffer.concat(this.buffers));r(s)})})};class _e extends lt{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(e,t,r){if(this.buffers.push(e),this.bytesBuffered+=e.byteLength??0,this.bytesBuffered>=this.limit){let n=this.bytesBuffered-this.limit,o=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=o.subarray(0,o.byteLength-n),this.emit("finish")}r()}}var Fo=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return T.mutate(e);if(!e)return T.mutate(new Uint8Array);let r=t.streamCollector(e);return T.mutate(await r)};var Oo=(e)=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}};var ht=(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))He.warn(Be(`Expected number but observed string: ${e}`));return t}}if(typeof e==="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)},pt=Math.ceil(340282346638528860000000000000000000000),Ue=(e)=>{let t=ht(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0){if(Math.abs(t)>pt)throw new TypeError(`Expected 32-bit float, got ${e}`)}return t},G=(e)=>{if(e===null||e===void 0)return;if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)};var Pe=(e)=>K(e,32),Fe=(e)=>K(e,16),Le=(e)=>K(e,8),K=(e,t)=>{let r=G(e);if(r!==void 0&&mt(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},mt=(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]}},Do=(e,t)=>{if(e===null||e===void 0){if(t)throw new TypeError(`Expected a non-null value for ${t}`);throw new TypeError("Expected a non-null value")}return e},Bo=(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 new TypeError(`Expected object, got ${t}: ${e}`)},Ho=(e)=>{if(e===null||e===void 0)return;if(typeof e==="string")return e;if(["boolean","number","bigint"].includes(typeof e))return He.warn(Be(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)};var Oe=(e)=>{if(typeof e=="string")return Ue(P(e));return Ue(e)},yt=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,P=(e)=>{let t=e.match(yt);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)};var vo=(e)=>{if(typeof e==="string")return G(P(e));return G(e)};var zo=(e)=>{if(typeof e==="string")return Pe(P(e));return Pe(e)},N=(e)=>{if(typeof e==="string")return Fe(P(e));return Fe(e)},De=(e)=>{if(typeof e==="string")return Le(P(e));return Le(e)},Be=(e)=>{return String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((t)=>!t.includes("stackTraceWarning")).join("\n")},He={warn:console.warn};var gt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],te=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Jo(e){let t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),o=e.getUTCDate(),s=e.getUTCHours(),c=e.getUTCMinutes(),i=e.getUTCSeconds(),u=o<10?`0${o}`:`${o}`,h=s<10?`0${s}`:`${s}`,g=c<10?`0${c}`:`${c}`,a=i<10?`0${i}`:`${i}`;return`${gt[n]}, ${u} ${te[r]} ${t} ${h}:${g}:${a} GMT`}var wt=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Vo=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=wt.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,o,s,c,i,u,h]=t,g=N(k(n)),a=b(o,"month",1,12),f=b(s,"day",1,31);return F(g,a,f,{hours:c,minutes:i,seconds:u,fractionalMilliseconds:h})},xt=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Yo=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=xt.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,o,s,c,i,u,h,g]=t,a=N(k(n)),f=b(o,"month",1,12),d=b(s,"day",1,31),y=F(a,f,d,{hours:c,minutes:i,seconds:u,fractionalMilliseconds:h});if(g.toUpperCase()!="Z")y.setTime(y.getTime()-kt(g));return y},Et=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$/),bt=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$/),Tt=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})$/),Xo=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=Et.exec(e);if(t){let[r,n,o,s,c,i,u,h]=t;return F(N(k(s)),ee(o),b(n,"day",1,31),{hours:c,minutes:i,seconds:u,fractionalMilliseconds:h})}if(t=bt.exec(e),t){let[r,n,o,s,c,i,u,h]=t;return $t(F(St(s),ee(o),b(n,"day",1,31),{hours:c,minutes:i,seconds:u,fractionalMilliseconds:h}))}if(t=Tt.exec(e),t){let[r,n,o,s,c,i,u,h]=t;return F(N(k(h)),ee(n),b(o.trimLeft(),"day",1,31),{hours:s,minutes:c,seconds:i,fractionalMilliseconds:u})}throw new TypeError("Invalid RFC-7231 date-time value")};var F=(e,t,r,n)=>{let o=t-1;return It(e,o,r),new Date(Date.UTC(e,o,r,b(n.hours,"hour",0,23),b(n.minutes,"minute",0,59),b(n.seconds,"seconds",0,60),Nt(n.fractionalMilliseconds)))},St=(e)=>{let t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+N(k(e));if(r<t)return r+100;return r},Ct=1576800000000,$t=(e)=>{if(e.getTime()-new Date().getTime()>Ct)return new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()));return e},ee=(e)=>{let t=te.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},At=[31,28,31,30,31,30,31,31,30,31,30,31],It=(e,t,r)=>{let n=At[t];if(t===1&&Rt(e))n=29;if(r>n)throw new TypeError(`Invalid day for ${te[t]} in ${e}: ${r}`)},Rt=(e)=>{return e%4===0&&(e%100!==0||e%400===0)},b=(e,t,r,n)=>{let o=De(k(e));if(o<r||o>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return o},Nt=(e)=>{if(e===null||e===void 0)return 0;return Oe("0."+e)*1000},kt=(e)=>{let t=e[0],r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);let n=Number(e.substring(1,3)),o=Number(e.substring(4,6));return r*(n*60+o)*60*1000},k=(e)=>{let t=0;while(t<e.length-1&&e.charAt(t)==="0")t++;if(t===0)return e;return e.slice(t)};var Mt=({output:e,parsedBody:t,exceptionCtor:r,errorCode:n})=>{let o=_t(e),s=o.httpStatusCode?o.httpStatusCode+"":void 0,c=new r({name:t?.code||t?.Code||n||s||"UnknownError",$fault:"client",$metadata:o});throw we(c,t)},Go=(e)=>{return({output:t,parsedBody:r,errorCode:n})=>{Mt({output:t,parsedBody:r,exceptionCtor:e,errorCode:n})}},_t=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var es=(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{}}};var ve=!1,rs=(e)=>{if(e&&!ve&&parseInt(e.substring(1,e.indexOf(".")))<16)ve=!0};var re=z(W(),1);var ze=(e)=>{let t=[];for(let r in re.AlgorithmId){let n=re.AlgorithmId[r];if(e[n]===void 0)continue;t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return this._checksumAlgorithms}}},We=(e)=>{let t={};return e.checksumAlgorithms().forEach((r)=>{t[r.algorithmId()]=r.checksumConstructor()}),t};var je=(e)=>{let t=e.retryStrategy;return{setRetryStrategy(r){t=r},retryStrategy(){return t}}},qe=(e)=>{let t={};return t.retryStrategy=e.retryStrategy(),t};var as=(e)=>{return{...ze(e),...je(e)}};var fs=(e)=>{return{...We(e),...qe(e)}};function Ut(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}var ps=(e)=>Array.isArray(e)?e:[e];var ne=function(){let e=Object.getPrototypeOf(this).constructor,r=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(r,e.prototype),r};ne.prototype=Object.create(String.prototype,{constructor:{value:ne,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(ne,String);function Pt(e,t,r){let n,o,s;if(typeof t==="undefined"&&typeof r==="undefined")n={},s=e;else if(n=e,typeof t==="function")return o=t,s=r,Ft(n,o,s);else s=t;for(let c of Object.keys(s)){if(!Array.isArray(s[c])){n[c]=s[c];continue}Je(n,null,s,c)}return n}var ws=(e,t)=>{let r={};for(let n in t)Je(r,e,t,n);return r},Ft=(e,t,r)=>{return Pt(e,Object.entries(r).reduce((n,[o,s])=>{if(Array.isArray(s))n[o]=s;else if(typeof s==="function")n[o]=[t,s()];else n[o]=[t,s];return n},{}))},Je=(e,t,r,n)=>{if(t!==null){let c=r[n];if(typeof c==="function")c=[,c];let[i=Lt,u=Ot,h=n]=c;if(typeof i==="function"&&i(t[h])||typeof i!=="function"&&!!i)e[n]=u(t[h]);return}let[o,s]=r[n];if(typeof s==="function"){let c,i=o===void 0&&(c=s())!=null,u=typeof o==="function"&&!!o(void 0)||typeof o!=="function"&&!!o;if(i)e[n]=c;else if(u)e[n]=s()}else{let c=o===void 0&&s!=null,i=typeof o==="function"&&!!o(s)||typeof o!=="function"&&!!o;if(c||i)e[n]=s}},Lt=(e)=>e!=null,Ot=(e)=>e;var Ts=(e)=>e.toISOString().replace(".000Z","Z");var Ve=(e)=>{if(e==null)return{};if(Array.isArray(e))return e.filter((t)=>t!=null).map(Ve);if(typeof e==="object"){let t={};for(let r of Object.keys(e)){if(e[r]==null)continue;t[r]=Ve(e[r])}return t}return e};export{Jt as ba,Vt as ca,j as da,_ as ea,xe as fa,I as ga,O as ha,R as ia,wn as ja,B as ka,st as la,Ye as ma,D as na,H as oa,Bn as pa,U as qa,V as ra,ye as sa,Gn as ta,Ce as ua,ho as va,xo as wa,$o as xa,Fo as ya,ce as za,rn as Aa,on as Ba,Oo as Ca,G as Da,Pe as Ea,Do as Fa,Bo as Ga,Ho as Ha,vo as Ia,zo as Ja,Jo as Ka,Vo as La,Yo as Ma,Xo as Na,ge as Oa,we as Pa,Go as Qa,es as Ra,rs as Sa,as as Ta,fs as Ua,Ut as Va,ps as Wa,Pt as Xa,ws as Ya,Ts as Za,Ve as _a};
4
-
5
- //# debugId=6FC59CDB166989CD64756E2164756E21