@maincode-ai/matilda-code 0.21.10 → 0.21.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/mainy/docs/configuration/settings.md +10 -1
- package/bundled/mainy/docs/matilda-serve.md +6 -6
- package/chunks/agent-ZFZ4HJQC.js +3 -0
- package/chunks/agent-headless-KH2BKLP7.js +3 -0
- package/chunks/{anthropicContentGenerator-SFJGSZHT.js → anthropicContentGenerator-IYZILRDW.js} +1 -1
- package/chunks/{askUserQuestion-MJ4FTAOQ.js → askUserQuestion-XWHJY3DM.js} +1 -1
- package/chunks/{ca-H4HPSGTI.js → ca-EUJBUYX5.js} +1 -1
- package/chunks/{chunk-B3NVKOSU.js → chunk-25NCTG5H.js} +63 -54
- package/chunks/{chunk-INAZKGGR.js → chunk-2HQMJ2IU.js} +1 -1
- package/chunks/{todoWrite-7BZMVNBC.js → chunk-4CSSDBOS.js} +2 -2
- package/chunks/{chunk-5PMMY47S.js → chunk-4FVBPNTZ.js} +1 -1
- package/chunks/{chunk-C62LTEOV.js → chunk-4YVN5HXG.js} +2 -2
- package/chunks/{chunk-LSDMWVW6.js → chunk-5427BPR2.js} +2 -2
- package/chunks/{chunk-GC2F575A.js → chunk-6GBNB5Z2.js} +1 -1
- package/chunks/{chunk-32PTAACU.js → chunk-ELH4YHJR.js} +1 -1
- package/chunks/{chunk-3HUM74NZ.js → chunk-EQGA7LH7.js} +2 -2
- package/chunks/{chunk-FWIVFCKF.js → chunk-FFFZ2QMG.js} +1 -1
- package/chunks/chunk-GHBKFIHC.js +35 -0
- package/chunks/{chunk-EQEQPZLQ.js → chunk-GO2GA2GY.js} +1 -1
- package/chunks/{chunk-QHA3ZBRO.js → chunk-GUFIMKF5.js} +1 -1
- package/chunks/{chunk-RJX7DK4Y.js → chunk-HWOQNYAO.js} +1 -1
- package/chunks/chunk-HYVP4472.js +8 -0
- package/chunks/{chunk-VWWEEU4V.js → chunk-JXUDKX6D.js} +1 -1
- package/chunks/chunk-M53RP3YP.js +31 -0
- package/chunks/{chunk-VLYRNOD3.js → chunk-MH2P4YXC.js} +10 -10
- package/chunks/{chunk-DJSOHDUB.js → chunk-NIQK6NX3.js} +1 -1
- package/chunks/{chunk-K3ELACN2.js → chunk-NVM7W7TG.js} +17 -17
- package/chunks/{chunk-VYTYYCBR.js → chunk-NYEWHSBL.js} +1 -1
- package/chunks/{chunk-LIWYWWOK.js → chunk-ODZOYHIC.js} +1 -1
- package/chunks/{chunk-EXIO3QHE.js → chunk-Q55AVE2N.js} +9 -9
- package/chunks/chunk-QFNFLE2I.js +2625 -0
- package/chunks/{chunk-Q2I3ARPJ.js → chunk-QH7736R5.js} +1 -1
- package/chunks/chunk-QN6WSWMM.js +9 -0
- package/chunks/chunk-RK2AKQAX.js +39 -0
- package/chunks/chunk-SNLH42QJ.js +10 -0
- package/chunks/chunk-SPW5DXX4.js +35 -0
- package/chunks/{chunk-S7G6QPEP.js → chunk-SUH3UUWZ.js} +1 -1
- package/chunks/chunk-T2T2UEPY.js +4 -0
- package/chunks/{chunk-6B5BDE7S.js → chunk-T4P4KEDW.js} +8 -8
- package/chunks/chunk-VI74YQQO.js +8 -0
- package/chunks/{chunk-DCQKJTAX.js → chunk-W5CGKUM4.js} +8 -3
- package/chunks/{chunk-32T6RWWT.js → chunk-WHG6N5X2.js} +1 -1
- package/chunks/chunk-WRQLIPXW.js +113 -0
- package/chunks/{chunk-XCJYORZX.js → chunk-XCFLI3OC.js} +1 -1
- package/chunks/{chunk-3ZAMYREW.js → chunk-YMIF2DMT.js} +1 -1
- package/chunks/{computer-use-DJV6HTND.js → computer-use-SXP25RZQ.js} +7 -7
- package/chunks/contextCommand-3GN5CAOK.js +3 -0
- package/chunks/{cron-create-BTTPO3JC.js → cron-create-2UI4AT4Q.js} +1 -1
- package/chunks/{cron-delete-U55RHRID.js → cron-delete-ZB6BOTFF.js} +1 -1
- package/chunks/{cron-list-J4HRR46K.js → cron-list-YYAXNHB6.js} +1 -1
- package/chunks/{de-S7F37S4F.js → de-DNEPG7S7.js} +1 -1
- package/chunks/{dist-SVKXQXJX.js → dist-ME6647DQ.js} +1 -1
- package/chunks/{dist-SCXU6QWY.js → dist-P6SLWL5V.js} +1 -1
- package/chunks/{dist-PVENOVGI.js → dist-VG3ZDJ2A.js} +1 -1
- package/chunks/{dist-N66KF4KX.js → dist-YTCHM57U.js} +1 -1
- package/chunks/{edit-7XEZHXE4.js → edit-KX6V4PH3.js} +1 -1
- package/chunks/{en-S6DMCJQZ.js → en-NOD6KQNM.js} +1 -1
- package/chunks/{enter-worktree-MR64QLS4.js → enter-worktree-X47BSJLE.js} +1 -1
- package/chunks/{enterPlanMode-UNWCEVYY.js → enterPlanMode-F22ZNTYJ.js} +1 -1
- package/chunks/{exit-worktree-D4BMN6LH.js → exit-worktree-XY5UMDHX.js} +1 -1
- package/chunks/{exitPlanMode-AKLFFYT2.js → exitPlanMode-G3QLIWJ4.js} +1 -1
- package/chunks/{fr-RFJP3KVL.js → fr-2OE5WLJ4.js} +1 -1
- package/chunks/{geminiContentGenerator-JBASUS2T.js → geminiContentGenerator-EQEGOXOV.js} +1 -1
- package/chunks/glob-KSBEWI3E.js +22 -0
- package/chunks/goal-tools-6QTC3UI7.js +12 -0
- package/chunks/grep-6TTPZ524.js +22 -0
- package/chunks/{ja-UTJHPL3M.js → ja-3B6V5KS7.js} +1 -1
- package/chunks/{keychain-token-storage-HAFQQIXL.js → keychain-token-storage-54BNK6VH.js} +1 -1
- package/chunks/{ls-CLDNF3YS.js → ls-YWZU3FYL.js} +1 -1
- package/chunks/{lsp-7SKRKR5Q.js → lsp-4CJDKEEC.js} +1 -1
- package/chunks/{matildaAgentContentGenerator-GMDJPWES.js → matildaAgentContentGenerator-OV4U6DJD.js} +1 -1
- package/chunks/matildaContentGenerator-ETIAWE22.js +8 -0
- package/chunks/{matildaOAuth2-W2DQO2NK.js → matildaOAuth2-WOY7ZS43.js} +1 -1
- package/chunks/monitor-F4K5HOZX.js +32 -0
- package/chunks/notebook-edit-TL7CI5EA.js +17 -0
- package/chunks/{openaiContentGenerator-XDOQRO4G.js → openaiContentGenerator-MGASUFQL.js} +1 -1
- package/chunks/{pt-KXMOTADP.js → pt-KP2JCPUY.js} +1 -1
- package/chunks/read-file-6EAPS2KG.js +3 -0
- package/chunks/ripGrep-K6SFFUIE.js +3 -0
- package/chunks/{ru-EWGWZPQH.js → ru-K7IQQKHC.js} +1 -1
- package/chunks/scheduler-TKWPD4LP.js +8 -0
- package/chunks/{send-message-XXRROIL7.js → send-message-OO2HAKCC.js} +1 -1
- package/chunks/{serve-4MDSDWP7.js → serve-ZQX2WBLF.js} +31 -31
- package/chunks/shell-AZRK5GIO.js +3 -0
- package/chunks/{skill-JIISRKQN.js → skill-KDM3UUML.js} +1 -1
- package/chunks/src-SGI6VLOS.js +3 -0
- package/chunks/{symbol-search-3MVTK4KV.js → symbol-search-ALYOX5JN.js} +1 -1
- package/chunks/{syntheticOutput-QEUQIVQJ.js → syntheticOutput-UASKABJH.js} +1 -1
- package/chunks/task-create-EBJD55TB.js +3 -0
- package/chunks/task-detach-I67ZE5MX.js +9 -0
- package/chunks/{task-list-ZEJTNZ2O.js → task-list-5BGX4G5N.js} +1 -1
- package/chunks/{task-stop-JO3CXG2K.js → task-stop-ERI5X4AO.js} +1 -1
- package/chunks/{task-update-3YY37VFN.js → task-update-CD3W556L.js} +1 -1
- package/chunks/{team-create-GMI5DIH7.js → team-create-F4KQRGMB.js} +1 -1
- package/chunks/{team-delete-4YYLUV23.js → team-delete-5U3GBFKJ.js} +1 -1
- package/chunks/todoWrite-YGG6AZ3A.js +3 -0
- package/chunks/{tool-search-OWJC3UTX.js → tool-search-JFCD5W5M.js} +1 -1
- package/chunks/{web-fetch-K575OWZ7.js → web-fetch-REWGIRWQ.js} +1 -1
- package/chunks/{web-search-F6JRBXFV.js → web-search-OX2DPEVN.js} +1 -1
- package/chunks/{workflow-H5DWTI5W.js → workflow-SEFYGBED.js} +2 -2
- package/chunks/write-file-UAGVBZMC.js +15 -0
- package/cli.js +480 -475
- package/locales/ca.js +8 -2
- package/locales/de.js +9 -2
- package/locales/en.js +15 -8
- package/locales/fr.js +9 -2
- package/locales/ja.js +8 -2
- package/locales/pt.js +8 -2
- package/locales/ru.js +9 -2
- package/package.json +2 -2
- package/sandbox-macos-restrictive-closed.sb +4 -0
- package/sandbox-macos-restrictive-open.sb +4 -0
- package/sandbox-macos-restrictive-proxied.sb +4 -0
- package/chunks/agent-2ZM5WMHY.js +0 -3
- package/chunks/agent-headless-PX4INULZ.js +0 -3
- package/chunks/chunk-2UDXLDSZ.js +0 -34
- package/chunks/chunk-34DXSYJZ.js +0 -34
- package/chunks/chunk-ESSYHTAZ.js +0 -8
- package/chunks/chunk-FRL6KOLY.js +0 -35
- package/chunks/chunk-I7TAYS6D.js +0 -108
- package/chunks/chunk-JSFA3NEP.js +0 -5
- package/chunks/chunk-ROETRE5J.js +0 -9
- package/chunks/chunk-RYLWDCCN.js +0 -2594
- package/chunks/chunk-TZIDSCTF.js +0 -31
- package/chunks/contextCommand-TAFFF6V7.js +0 -3
- package/chunks/glob-3QKPKP7Z.js +0 -22
- package/chunks/grep-6CL6HJ5Y.js +0 -22
- package/chunks/matildaContentGenerator-EFK4QDRS.js +0 -8
- package/chunks/monitor-6W2R25LH.js +0 -32
- package/chunks/notebook-edit-WL6MZ6AW.js +0 -17
- package/chunks/read-file-J5UBJYDO.js +0 -3
- package/chunks/ripGrep-2AMYRBCZ.js +0 -3
- package/chunks/scheduler-LFSCKDU6.js +0 -8
- package/chunks/shell-SMTFAOAE.js +0 -3
- package/chunks/src-OF7NIVIL.js +0 -3
- package/chunks/task-create-AEJQ73GE.js +0 -3
- package/chunks/update-goal-CF6G57J7.js +0 -16
- package/chunks/write-file-RUHYPLKF.js +0 -15
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{a as Nh,b as Kh,c as Jh}from"./chunk-WZ75OGYY.js";import{a as Vh}from"./chunk-PA6532AY.js";import"./chunk-XMZIY7XX.js";import{f as js}from"./chunk-3HUM74NZ.js";import"./chunk-JSFA3NEP.js";import"./chunk-TZIDSCTF.js";import{a as Ch,b as Ah,c as Dh,d as Mh,e as Bh,f as Lh,g as Wh,h as Uh}from"./chunk-U347OO7S.js";import{i as Hh}from"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import{a as __matilda_dirname,b as N}from"./chunk-GZPNIYVZ.js";import{a as Y,d as Xt,f as Rh}from"./chunk-OWGSC52X.js";var zo=Xt((qf,$o)=>{"use strict";N();var Qh=Nh(),Xh=Y("crypto"),Yh=Y("url"),Zh=Kh(),td=Y("http"),ed=Y("https"),ad=Y("http2"),rd=Y("util"),id=Jh(),sd=Y("zlib"),io=Y("stream"),od=Y("events");function ct(y){return y&&typeof y=="object"&&"default"in y?y:{default:y}}var so=ct(Qh),nd=ct(Xh),hd=ct(Yh),dd=ct(Zh),ld=ct(td),cd=ct(ed),oo=ct(ad),nr=ct(rd),pd=ct(id),zt=ct(sd),gt=ct(io);function no(y,e){return function(){return y.apply(e,arguments)}}var{toString:md}=Object.prototype,{getPrototypeOf:hr}=Object,{iterator:Ve,toStringTag:ho}=Symbol,Qe=(y=>e=>{let a=md.call(e);return y[a]||(y[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),pt=y=>(y=y.toLowerCase(),e=>Qe(e)===y),Xe=y=>e=>typeof e===y,{isArray:re}=Array,Zt=Xe("undefined");function fe(y){return y!==null&&!Zt(y)&&y.constructor!==null&&!Zt(y.constructor)&&rt(y.constructor.isBuffer)&&y.constructor.isBuffer(y)}var lo=pt("ArrayBuffer");function ud(y){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(y):e=y&&y.buffer&&lo(y.buffer),e}var yd=Xe("string"),rt=Xe("function"),co=Xe("number"),ve=y=>y!==null&&typeof y=="object",gd=y=>y===!0||y===!1,Le=y=>{if(Qe(y)!=="object")return!1;let e=hr(y);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ho in y)&&!(Ve in y)},fd=y=>{if(!ve(y)||fe(y))return!1;try{return Object.keys(y).length===0&&Object.getPrototypeOf(y)===Object.prototype}catch{return!1}},vd=pt("Date"),_d=pt("File"),bd=y=>!!(y&&typeof y.uri<"u"),Sd=y=>y&&typeof y.getParts<"u",Id=pt("Blob"),wd=pt("FileList"),kd=y=>ve(y)&&rt(y.pipe);function Td(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}var Gs=Td(),Rs=typeof Gs.FormData<"u"?Gs.FormData:void 0,Pd=y=>{let e;return y&&(Rs&&y instanceof Rs||rt(y.append)&&((e=Qe(y))==="formdata"||e==="object"&&rt(y.toString)&&y.toString()==="[object FormData]"))},qd=pt("URLSearchParams"),[Fd,$d,zd,Ed]=["ReadableStream","Request","Response","Headers"].map(pt),Od=y=>y.trim?y.trim():y.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _e(y,e,{allOwnKeys:a=!1}={}){if(y===null||typeof y>"u")return;let r,s;if(typeof y!="object"&&(y=[y]),re(y))for(r=0,s=y.length;r<s;r++)e.call(null,y[r],r,y);else{if(fe(y))return;let i=a?Object.getOwnPropertyNames(y):Object.keys(y),o=i.length,t;for(r=0;r<o;r++)t=i[r],e.call(null,y[t],t,y)}}function po(y,e){if(fe(y))return null;e=e.toLowerCase();let a=Object.keys(y),r=a.length,s;for(;r-- >0;)if(s=a[r],e===s.toLowerCase())return s;return null}var Ct=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:globalThis,mo=y=>!Zt(y)&&y!==Ct;function Qa(){let{caseless:y,skipUndefined:e}=mo(this)&&this||{},a={},r=(s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;let o=y&&po(a,i)||i;Le(a[o])&&Le(s)?a[o]=Qa(a[o],s):Le(s)?a[o]=Qa({},s):re(s)?a[o]=s.slice():(!e||!Zt(s))&&(a[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&_e(arguments[s],r);return a}var xd=(y,e,a,{allOwnKeys:r}={})=>(_e(e,(s,i)=>{a&&rt(s)?Object.defineProperty(y,i,{value:no(s,a),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(y,i,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),y),jd=y=>(y.charCodeAt(0)===65279&&(y=y.slice(1)),y),Gd=(y,e,a,r)=>{y.prototype=Object.create(e.prototype,r),Object.defineProperty(y.prototype,"constructor",{value:y,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(y,"super",{value:e.prototype}),a&&Object.assign(y.prototype,a)},Rd=(y,e,a,r)=>{let s,i,o,t={};if(e=e||{},y==null)return e;do{for(s=Object.getOwnPropertyNames(y),i=s.length;i-- >0;)o=s[i],(!r||r(o,y,e))&&!t[o]&&(e[o]=y[o],t[o]=!0);y=a!==!1&&hr(y)}while(y&&(!a||a(y,e))&&y!==Object.prototype);return e},Cd=(y,e,a)=>{y=String(y),(a===void 0||a>y.length)&&(a=y.length),a-=e.length;let r=y.indexOf(e,a);return r!==-1&&r===a},Ad=y=>{if(!y)return null;if(re(y))return y;let e=y.length;if(!co(e))return null;let a=new Array(e);for(;e-- >0;)a[e]=y[e];return a},Dd=(y=>e=>y&&e instanceof y)(typeof Uint8Array<"u"&&hr(Uint8Array)),Md=(y,e)=>{let r=(y&&y[Ve]).call(y),s;for(;(s=r.next())&&!s.done;){let i=s.value;e.call(y,i[0],i[1])}},Bd=(y,e)=>{let a,r=[];for(;(a=y.exec(e))!==null;)r.push(a);return r},Ld=pt("HTMLFormElement"),Wd=y=>y.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,r,s){return r.toUpperCase()+s}),Cs=(({hasOwnProperty:y})=>(e,a)=>y.call(e,a))(Object.prototype),Ud=pt("RegExp"),uo=(y,e)=>{let a=Object.getOwnPropertyDescriptors(y),r={};_e(a,(s,i)=>{let o;(o=e(s,i,y))!==!1&&(r[i]=o||s)}),Object.defineProperties(y,r)},Hd=y=>{uo(y,(e,a)=>{if(rt(y)&&["arguments","caller","callee"].indexOf(a)!==-1)return!1;let r=y[a];if(rt(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},Nd=(y,e)=>{let a={},r=s=>{s.forEach(i=>{a[i]=!0})};return re(y)?r(y):r(String(y).split(e)),a},Kd=()=>{},Jd=(y,e)=>y!=null&&Number.isFinite(y=+y)?y:e;function Vd(y){return!!(y&&rt(y.append)&&y[ho]==="FormData"&&y[Ve])}var Qd=y=>{let e=new Array(10),a=(r,s)=>{if(ve(r)){if(e.indexOf(r)>=0)return;if(fe(r))return r;if(!("toJSON"in r)){e[s]=r;let i=re(r)?[]:{};return _e(r,(o,t)=>{let f=a(o,s+1);!Zt(f)&&(i[t]=f)}),e[s]=void 0,i}}return r};return a(y,0)},Xd=pt("AsyncFunction"),Yd=y=>y&&(ve(y)||rt(y))&&rt(y.then)&&rt(y.catch),yo=((y,e)=>y?setImmediate:e?((a,r)=>(Ct.addEventListener("message",({source:s,data:i})=>{s===Ct&&i===a&&r.length&&r.shift()()},!1),s=>{r.push(s),Ct.postMessage(a,"*")}))(`axios@${Math.random()}`,[]):a=>setTimeout(a))(typeof setImmediate=="function",rt(Ct.postMessage)),Zd=typeof queueMicrotask<"u"?queueMicrotask.bind(Ct):typeof process<"u"&&process.nextTick||yo,tl=y=>y!=null&&rt(y[Ve]),q={isArray:re,isArrayBuffer:lo,isBuffer:fe,isFormData:Pd,isArrayBufferView:ud,isString:yd,isNumber:co,isBoolean:gd,isObject:ve,isPlainObject:Le,isEmptyObject:fd,isReadableStream:Fd,isRequest:$d,isResponse:zd,isHeaders:Ed,isUndefined:Zt,isDate:vd,isFile:_d,isReactNativeBlob:bd,isReactNative:Sd,isBlob:Id,isRegExp:Ud,isFunction:rt,isStream:kd,isURLSearchParams:qd,isTypedArray:Dd,isFileList:wd,forEach:_e,merge:Qa,extend:xd,trim:Od,stripBOM:jd,inherits:Gd,toFlatObject:Rd,kindOf:Qe,kindOfTest:pt,endsWith:Cd,toArray:Ad,forEachEntry:Md,matchAll:Bd,isHTMLForm:Ld,hasOwnProperty:Cs,hasOwnProp:Cs,reduceDescriptors:uo,freezeMethods:Hd,toObjectSet:Nd,toCamelCase:Wd,noop:Kd,toFiniteNumber:Jd,findKey:po,global:Ct,isContextDefined:mo,isSpecCompliantForm:Vd,toJSONObject:Qd,isAsyncFn:Xd,isThenable:Yd,setImmediate:yo,asap:Zd,isIterable:tl},tt=class y extends Error{static from(e,a,r,s,i,o){let t=new y(e.message,a||e.code,r,s,i);return t.cause=e,t.name=e.name,e.status!=null&&t.status==null&&(t.status=e.status),o&&Object.assign(t,o),t}constructor(e,a,r,s,i){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,a&&(this.code=a),r&&(this.config=r),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.status}}};tt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";tt.ERR_BAD_OPTION="ERR_BAD_OPTION";tt.ECONNABORTED="ECONNABORTED";tt.ETIMEDOUT="ETIMEDOUT";tt.ERR_NETWORK="ERR_NETWORK";tt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";tt.ERR_DEPRECATED="ERR_DEPRECATED";tt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";tt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";tt.ERR_CANCELED="ERR_CANCELED";tt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";tt.ERR_INVALID_URL="ERR_INVALID_URL";var z=tt;function Xa(y){return q.isPlainObject(y)||q.isArray(y)}function go(y){return q.endsWith(y,"[]")?y.slice(0,-2):y}function Ua(y,e,a){return y?y.concat(e).map(function(s,i){return s=go(s),!a&&i?"["+s+"]":s}).join(a?".":""):e}function el(y){return q.isArray(y)&&!y.some(Xa)}var al=q.toFlatObject(q,{},null,function(e){return/^is[A-Z]/.test(e)});function Ye(y,e,a){if(!q.isObject(y))throw new TypeError("target must be an object");e=e||new(so.default||FormData),a=q.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,b){return!q.isUndefined(b[S])});let r=a.metaTokens,s=a.visitor||u,i=a.dots,o=a.indexes,f=(a.Blob||typeof Blob<"u"&&Blob)&&q.isSpecCompliantForm(e);if(!q.isFunction(s))throw new TypeError("visitor must be a function");function p(_){if(_===null)return"";if(q.isDate(_))return _.toISOString();if(q.isBoolean(_))return _.toString();if(!f&&q.isBlob(_))throw new z("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(_)||q.isTypedArray(_)?f&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function u(_,S,b){let I=_;if(q.isReactNative(e)&&q.isReactNativeBlob(_))return e.append(Ua(b,S,i),p(_)),!1;if(_&&!b&&typeof _=="object"){if(q.endsWith(S,"{}"))S=r?S:S.slice(0,-2),_=JSON.stringify(_);else if(q.isArray(_)&&el(_)||(q.isFileList(_)||q.endsWith(S,"[]"))&&(I=q.toArray(_)))return S=go(S),I.forEach(function(F,R){!(q.isUndefined(F)||F===null)&&e.append(o===!0?Ua([S],R,i):o===null?S:S+"[]",p(F))}),!1}return Xa(_)?!0:(e.append(Ua(b,S,i),p(_)),!1)}let c=[],m=Object.assign(al,{defaultVisitor:u,convertValue:p,isVisitable:Xa});function g(_,S){if(!q.isUndefined(_)){if(c.indexOf(_)!==-1)throw Error("Circular reference detected in "+S.join("."));c.push(_),q.forEach(_,function(I,$){(!(q.isUndefined(I)||I===null)&&s.call(e,I,q.isString($)?$.trim():$,S,m))===!0&&g(I,S?S.concat($):[$])}),c.pop()}}if(!q.isObject(y))throw new TypeError("data must be an object");return g(y),e}function As(y){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(y).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function fo(y,e){this._pairs=[],y&&Ye(y,this,e)}var vo=fo.prototype;vo.append=function(e,a){this._pairs.push([e,a])};vo.toString=function(e){let a=e?function(r){return e.call(this,r,As)}:As;return this._pairs.map(function(s){return a(s[0])+"="+a(s[1])},"").join("&")};function rl(y){return encodeURIComponent(y).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function dr(y,e,a){if(!e)return y;let r=a&&a.encode||rl,s=q.isFunction(a)?{serialize:a}:a,i=s&&s.serialize,o;if(i?o=i(e,s):o=q.isURLSearchParams(e)?e.toString():new fo(e,s).toString(r),o){let t=y.indexOf("#");t!==-1&&(y=y.slice(0,t)),y+=(y.indexOf("?")===-1?"?":"&")+o}return y}var Ya=class{constructor(){this.handlers=[]}use(e,a,r){return this.handlers.push({fulfilled:e,rejected:a,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){q.forEach(this.handlers,function(r){r!==null&&e(r)})}},Ds=Ya,Ze={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},il=hd.default.URLSearchParams,Ha="abcdefghijklmnopqrstuvwxyz",Ms="0123456789",_o={DIGIT:Ms,ALPHA:Ha,ALPHA_DIGIT:Ha+Ha.toUpperCase()+Ms},sl=(y=16,e=_o.ALPHA_DIGIT)=>{let a="",{length:r}=e,s=new Uint32Array(y);nd.default.randomFillSync(s);for(let i=0;i<y;i++)a+=e[s[i]%r];return a},ol={isNode:!0,classes:{URLSearchParams:il,FormData:so.default,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:_o,generateString:sl,protocols:["http","https","file","data"]},lr=typeof window<"u"&&typeof document<"u",Za=typeof navigator=="object"&&navigator||void 0,nl=lr&&(!Za||["ReactNative","NativeScript","NS"].indexOf(Za.product)<0),hl=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dl=lr&&window.location.href||"http://localhost",ll=Object.freeze({__proto__:null,hasBrowserEnv:lr,hasStandardBrowserWebWorkerEnv:hl,hasStandardBrowserEnv:nl,navigator:Za,origin:dl}),U={...ll,...ol};function cl(y,e){return Ye(y,new U.classes.URLSearchParams,{visitor:function(a,r,s,i){return U.isNode&&q.isBuffer(a)?(this.append(r,a.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function pl(y){return q.matchAll(/\w+|\[(\w*)]/g,y).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ml(y){let e={},a=Object.keys(y),r,s=a.length,i;for(r=0;r<s;r++)i=a[r],e[i]=y[i];return e}function bo(y){function e(a,r,s,i){let o=a[i++];if(o==="__proto__")return!0;let t=Number.isFinite(+o),f=i>=a.length;return o=!o&&q.isArray(s)?s.length:o,f?(q.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!t):((!s[o]||!q.isObject(s[o]))&&(s[o]=[]),e(a,r,s[o],i)&&q.isArray(s[o])&&(s[o]=ml(s[o])),!t)}if(q.isFormData(y)&&q.isFunction(y.entries)){let a={};return q.forEachEntry(y,(r,s)=>{e(pl(r),s,a,0)}),a}return null}function ul(y,e,a){if(q.isString(y))try{return(e||JSON.parse)(y),q.trim(y)}catch(r){if(r.name!=="SyntaxError")throw r}return(a||JSON.stringify)(y)}var cr={transitional:Ze,adapter:["xhr","http","fetch"],transformRequest:[function(e,a){let r=a.getContentType()||"",s=r.indexOf("application/json")>-1,i=q.isObject(e);if(i&&q.isHTMLForm(e)&&(e=new FormData(e)),q.isFormData(e))return s?JSON.stringify(bo(e)):e;if(q.isArrayBuffer(e)||q.isBuffer(e)||q.isStream(e)||q.isFile(e)||q.isBlob(e)||q.isReadableStream(e))return e;if(q.isArrayBufferView(e))return e.buffer;if(q.isURLSearchParams(e))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let t;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return cl(e,this.formSerializer).toString();if((t=q.isFileList(e))||r.indexOf("multipart/form-data")>-1){let f=this.env&&this.env.FormData;return Ye(t?{"files[]":e}:e,f&&new f,this.formSerializer)}}return i||s?(a.setContentType("application/json",!1),ul(e)):e}],transformResponse:[function(e){let a=this.transitional||cr.transitional,r=a&&a.forcedJSONParsing,s=this.responseType==="json";if(q.isResponse(e)||q.isReadableStream(e))return e;if(e&&q.isString(e)&&(r&&!this.responseType||s)){let o=!(a&&a.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(t){if(o)throw t.name==="SyntaxError"?z.from(t,z.ERR_BAD_RESPONSE,this,null,this.response):t}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:U.classes.FormData,Blob:U.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],y=>{cr.headers[y]={}});var pr=cr,yl=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),gl=y=>{let e={},a,r,s;return y&&y.split(`
|
|
3
|
+
import{a as Vh}from"./chunk-PA6532AY.js";import{a as Nh,b as Kh,c as Jh}from"./chunk-WZ75OGYY.js";import"./chunk-XMZIY7XX.js";import{f as js}from"./chunk-EQGA7LH7.js";import"./chunk-T2T2UEPY.js";import"./chunk-M53RP3YP.js";import{a as Ch,b as Ah,c as Dh,d as Mh,e as Bh,f as Lh,g as Wh,h as Uh}from"./chunk-U347OO7S.js";import{i as Hh}from"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import{a as __matilda_dirname,b as N}from"./chunk-GZPNIYVZ.js";import{a as Y,d as Xt,f as Rh}from"./chunk-OWGSC52X.js";var zo=Xt((qf,$o)=>{"use strict";N();var Qh=Nh(),Xh=Y("crypto"),Yh=Y("url"),Zh=Kh(),td=Y("http"),ed=Y("https"),ad=Y("http2"),rd=Y("util"),id=Jh(),sd=Y("zlib"),io=Y("stream"),od=Y("events");function ct(y){return y&&typeof y=="object"&&"default"in y?y:{default:y}}var so=ct(Qh),nd=ct(Xh),hd=ct(Yh),dd=ct(Zh),ld=ct(td),cd=ct(ed),oo=ct(ad),nr=ct(rd),pd=ct(id),zt=ct(sd),gt=ct(io);function no(y,e){return function(){return y.apply(e,arguments)}}var{toString:md}=Object.prototype,{getPrototypeOf:hr}=Object,{iterator:Ve,toStringTag:ho}=Symbol,Qe=(y=>e=>{let a=md.call(e);return y[a]||(y[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),pt=y=>(y=y.toLowerCase(),e=>Qe(e)===y),Xe=y=>e=>typeof e===y,{isArray:re}=Array,Zt=Xe("undefined");function fe(y){return y!==null&&!Zt(y)&&y.constructor!==null&&!Zt(y.constructor)&&rt(y.constructor.isBuffer)&&y.constructor.isBuffer(y)}var lo=pt("ArrayBuffer");function ud(y){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(y):e=y&&y.buffer&&lo(y.buffer),e}var yd=Xe("string"),rt=Xe("function"),co=Xe("number"),ve=y=>y!==null&&typeof y=="object",gd=y=>y===!0||y===!1,Le=y=>{if(Qe(y)!=="object")return!1;let e=hr(y);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ho in y)&&!(Ve in y)},fd=y=>{if(!ve(y)||fe(y))return!1;try{return Object.keys(y).length===0&&Object.getPrototypeOf(y)===Object.prototype}catch{return!1}},vd=pt("Date"),_d=pt("File"),bd=y=>!!(y&&typeof y.uri<"u"),Sd=y=>y&&typeof y.getParts<"u",Id=pt("Blob"),wd=pt("FileList"),kd=y=>ve(y)&&rt(y.pipe);function Td(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}var Gs=Td(),Rs=typeof Gs.FormData<"u"?Gs.FormData:void 0,Pd=y=>{let e;return y&&(Rs&&y instanceof Rs||rt(y.append)&&((e=Qe(y))==="formdata"||e==="object"&&rt(y.toString)&&y.toString()==="[object FormData]"))},qd=pt("URLSearchParams"),[Fd,$d,zd,Ed]=["ReadableStream","Request","Response","Headers"].map(pt),Od=y=>y.trim?y.trim():y.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _e(y,e,{allOwnKeys:a=!1}={}){if(y===null||typeof y>"u")return;let r,s;if(typeof y!="object"&&(y=[y]),re(y))for(r=0,s=y.length;r<s;r++)e.call(null,y[r],r,y);else{if(fe(y))return;let i=a?Object.getOwnPropertyNames(y):Object.keys(y),o=i.length,t;for(r=0;r<o;r++)t=i[r],e.call(null,y[t],t,y)}}function po(y,e){if(fe(y))return null;e=e.toLowerCase();let a=Object.keys(y),r=a.length,s;for(;r-- >0;)if(s=a[r],e===s.toLowerCase())return s;return null}var Ct=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:globalThis,mo=y=>!Zt(y)&&y!==Ct;function Qa(){let{caseless:y,skipUndefined:e}=mo(this)&&this||{},a={},r=(s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;let o=y&&po(a,i)||i;Le(a[o])&&Le(s)?a[o]=Qa(a[o],s):Le(s)?a[o]=Qa({},s):re(s)?a[o]=s.slice():(!e||!Zt(s))&&(a[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&_e(arguments[s],r);return a}var xd=(y,e,a,{allOwnKeys:r}={})=>(_e(e,(s,i)=>{a&&rt(s)?Object.defineProperty(y,i,{value:no(s,a),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(y,i,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),y),jd=y=>(y.charCodeAt(0)===65279&&(y=y.slice(1)),y),Gd=(y,e,a,r)=>{y.prototype=Object.create(e.prototype,r),Object.defineProperty(y.prototype,"constructor",{value:y,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(y,"super",{value:e.prototype}),a&&Object.assign(y.prototype,a)},Rd=(y,e,a,r)=>{let s,i,o,t={};if(e=e||{},y==null)return e;do{for(s=Object.getOwnPropertyNames(y),i=s.length;i-- >0;)o=s[i],(!r||r(o,y,e))&&!t[o]&&(e[o]=y[o],t[o]=!0);y=a!==!1&&hr(y)}while(y&&(!a||a(y,e))&&y!==Object.prototype);return e},Cd=(y,e,a)=>{y=String(y),(a===void 0||a>y.length)&&(a=y.length),a-=e.length;let r=y.indexOf(e,a);return r!==-1&&r===a},Ad=y=>{if(!y)return null;if(re(y))return y;let e=y.length;if(!co(e))return null;let a=new Array(e);for(;e-- >0;)a[e]=y[e];return a},Dd=(y=>e=>y&&e instanceof y)(typeof Uint8Array<"u"&&hr(Uint8Array)),Md=(y,e)=>{let r=(y&&y[Ve]).call(y),s;for(;(s=r.next())&&!s.done;){let i=s.value;e.call(y,i[0],i[1])}},Bd=(y,e)=>{let a,r=[];for(;(a=y.exec(e))!==null;)r.push(a);return r},Ld=pt("HTMLFormElement"),Wd=y=>y.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,r,s){return r.toUpperCase()+s}),Cs=(({hasOwnProperty:y})=>(e,a)=>y.call(e,a))(Object.prototype),Ud=pt("RegExp"),uo=(y,e)=>{let a=Object.getOwnPropertyDescriptors(y),r={};_e(a,(s,i)=>{let o;(o=e(s,i,y))!==!1&&(r[i]=o||s)}),Object.defineProperties(y,r)},Hd=y=>{uo(y,(e,a)=>{if(rt(y)&&["arguments","caller","callee"].indexOf(a)!==-1)return!1;let r=y[a];if(rt(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},Nd=(y,e)=>{let a={},r=s=>{s.forEach(i=>{a[i]=!0})};return re(y)?r(y):r(String(y).split(e)),a},Kd=()=>{},Jd=(y,e)=>y!=null&&Number.isFinite(y=+y)?y:e;function Vd(y){return!!(y&&rt(y.append)&&y[ho]==="FormData"&&y[Ve])}var Qd=y=>{let e=new Array(10),a=(r,s)=>{if(ve(r)){if(e.indexOf(r)>=0)return;if(fe(r))return r;if(!("toJSON"in r)){e[s]=r;let i=re(r)?[]:{};return _e(r,(o,t)=>{let f=a(o,s+1);!Zt(f)&&(i[t]=f)}),e[s]=void 0,i}}return r};return a(y,0)},Xd=pt("AsyncFunction"),Yd=y=>y&&(ve(y)||rt(y))&&rt(y.then)&&rt(y.catch),yo=((y,e)=>y?setImmediate:e?((a,r)=>(Ct.addEventListener("message",({source:s,data:i})=>{s===Ct&&i===a&&r.length&&r.shift()()},!1),s=>{r.push(s),Ct.postMessage(a,"*")}))(`axios@${Math.random()}`,[]):a=>setTimeout(a))(typeof setImmediate=="function",rt(Ct.postMessage)),Zd=typeof queueMicrotask<"u"?queueMicrotask.bind(Ct):typeof process<"u"&&process.nextTick||yo,tl=y=>y!=null&&rt(y[Ve]),q={isArray:re,isArrayBuffer:lo,isBuffer:fe,isFormData:Pd,isArrayBufferView:ud,isString:yd,isNumber:co,isBoolean:gd,isObject:ve,isPlainObject:Le,isEmptyObject:fd,isReadableStream:Fd,isRequest:$d,isResponse:zd,isHeaders:Ed,isUndefined:Zt,isDate:vd,isFile:_d,isReactNativeBlob:bd,isReactNative:Sd,isBlob:Id,isRegExp:Ud,isFunction:rt,isStream:kd,isURLSearchParams:qd,isTypedArray:Dd,isFileList:wd,forEach:_e,merge:Qa,extend:xd,trim:Od,stripBOM:jd,inherits:Gd,toFlatObject:Rd,kindOf:Qe,kindOfTest:pt,endsWith:Cd,toArray:Ad,forEachEntry:Md,matchAll:Bd,isHTMLForm:Ld,hasOwnProperty:Cs,hasOwnProp:Cs,reduceDescriptors:uo,freezeMethods:Hd,toObjectSet:Nd,toCamelCase:Wd,noop:Kd,toFiniteNumber:Jd,findKey:po,global:Ct,isContextDefined:mo,isSpecCompliantForm:Vd,toJSONObject:Qd,isAsyncFn:Xd,isThenable:Yd,setImmediate:yo,asap:Zd,isIterable:tl},tt=class y extends Error{static from(e,a,r,s,i,o){let t=new y(e.message,a||e.code,r,s,i);return t.cause=e,t.name=e.name,e.status!=null&&t.status==null&&(t.status=e.status),o&&Object.assign(t,o),t}constructor(e,a,r,s,i){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,a&&(this.code=a),r&&(this.config=r),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.status}}};tt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";tt.ERR_BAD_OPTION="ERR_BAD_OPTION";tt.ECONNABORTED="ECONNABORTED";tt.ETIMEDOUT="ETIMEDOUT";tt.ERR_NETWORK="ERR_NETWORK";tt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";tt.ERR_DEPRECATED="ERR_DEPRECATED";tt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";tt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";tt.ERR_CANCELED="ERR_CANCELED";tt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";tt.ERR_INVALID_URL="ERR_INVALID_URL";var z=tt;function Xa(y){return q.isPlainObject(y)||q.isArray(y)}function go(y){return q.endsWith(y,"[]")?y.slice(0,-2):y}function Ua(y,e,a){return y?y.concat(e).map(function(s,i){return s=go(s),!a&&i?"["+s+"]":s}).join(a?".":""):e}function el(y){return q.isArray(y)&&!y.some(Xa)}var al=q.toFlatObject(q,{},null,function(e){return/^is[A-Z]/.test(e)});function Ye(y,e,a){if(!q.isObject(y))throw new TypeError("target must be an object");e=e||new(so.default||FormData),a=q.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,b){return!q.isUndefined(b[S])});let r=a.metaTokens,s=a.visitor||u,i=a.dots,o=a.indexes,f=(a.Blob||typeof Blob<"u"&&Blob)&&q.isSpecCompliantForm(e);if(!q.isFunction(s))throw new TypeError("visitor must be a function");function p(_){if(_===null)return"";if(q.isDate(_))return _.toISOString();if(q.isBoolean(_))return _.toString();if(!f&&q.isBlob(_))throw new z("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(_)||q.isTypedArray(_)?f&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function u(_,S,b){let I=_;if(q.isReactNative(e)&&q.isReactNativeBlob(_))return e.append(Ua(b,S,i),p(_)),!1;if(_&&!b&&typeof _=="object"){if(q.endsWith(S,"{}"))S=r?S:S.slice(0,-2),_=JSON.stringify(_);else if(q.isArray(_)&&el(_)||(q.isFileList(_)||q.endsWith(S,"[]"))&&(I=q.toArray(_)))return S=go(S),I.forEach(function(F,R){!(q.isUndefined(F)||F===null)&&e.append(o===!0?Ua([S],R,i):o===null?S:S+"[]",p(F))}),!1}return Xa(_)?!0:(e.append(Ua(b,S,i),p(_)),!1)}let c=[],m=Object.assign(al,{defaultVisitor:u,convertValue:p,isVisitable:Xa});function g(_,S){if(!q.isUndefined(_)){if(c.indexOf(_)!==-1)throw Error("Circular reference detected in "+S.join("."));c.push(_),q.forEach(_,function(I,$){(!(q.isUndefined(I)||I===null)&&s.call(e,I,q.isString($)?$.trim():$,S,m))===!0&&g(I,S?S.concat($):[$])}),c.pop()}}if(!q.isObject(y))throw new TypeError("data must be an object");return g(y),e}function As(y){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(y).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function fo(y,e){this._pairs=[],y&&Ye(y,this,e)}var vo=fo.prototype;vo.append=function(e,a){this._pairs.push([e,a])};vo.toString=function(e){let a=e?function(r){return e.call(this,r,As)}:As;return this._pairs.map(function(s){return a(s[0])+"="+a(s[1])},"").join("&")};function rl(y){return encodeURIComponent(y).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function dr(y,e,a){if(!e)return y;let r=a&&a.encode||rl,s=q.isFunction(a)?{serialize:a}:a,i=s&&s.serialize,o;if(i?o=i(e,s):o=q.isURLSearchParams(e)?e.toString():new fo(e,s).toString(r),o){let t=y.indexOf("#");t!==-1&&(y=y.slice(0,t)),y+=(y.indexOf("?")===-1?"?":"&")+o}return y}var Ya=class{constructor(){this.handlers=[]}use(e,a,r){return this.handlers.push({fulfilled:e,rejected:a,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){q.forEach(this.handlers,function(r){r!==null&&e(r)})}},Ds=Ya,Ze={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},il=hd.default.URLSearchParams,Ha="abcdefghijklmnopqrstuvwxyz",Ms="0123456789",_o={DIGIT:Ms,ALPHA:Ha,ALPHA_DIGIT:Ha+Ha.toUpperCase()+Ms},sl=(y=16,e=_o.ALPHA_DIGIT)=>{let a="",{length:r}=e,s=new Uint32Array(y);nd.default.randomFillSync(s);for(let i=0;i<y;i++)a+=e[s[i]%r];return a},ol={isNode:!0,classes:{URLSearchParams:il,FormData:so.default,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:_o,generateString:sl,protocols:["http","https","file","data"]},lr=typeof window<"u"&&typeof document<"u",Za=typeof navigator=="object"&&navigator||void 0,nl=lr&&(!Za||["ReactNative","NativeScript","NS"].indexOf(Za.product)<0),hl=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dl=lr&&window.location.href||"http://localhost",ll=Object.freeze({__proto__:null,hasBrowserEnv:lr,hasStandardBrowserWebWorkerEnv:hl,hasStandardBrowserEnv:nl,navigator:Za,origin:dl}),U={...ll,...ol};function cl(y,e){return Ye(y,new U.classes.URLSearchParams,{visitor:function(a,r,s,i){return U.isNode&&q.isBuffer(a)?(this.append(r,a.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function pl(y){return q.matchAll(/\w+|\[(\w*)]/g,y).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ml(y){let e={},a=Object.keys(y),r,s=a.length,i;for(r=0;r<s;r++)i=a[r],e[i]=y[i];return e}function bo(y){function e(a,r,s,i){let o=a[i++];if(o==="__proto__")return!0;let t=Number.isFinite(+o),f=i>=a.length;return o=!o&&q.isArray(s)?s.length:o,f?(q.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!t):((!s[o]||!q.isObject(s[o]))&&(s[o]=[]),e(a,r,s[o],i)&&q.isArray(s[o])&&(s[o]=ml(s[o])),!t)}if(q.isFormData(y)&&q.isFunction(y.entries)){let a={};return q.forEachEntry(y,(r,s)=>{e(pl(r),s,a,0)}),a}return null}function ul(y,e,a){if(q.isString(y))try{return(e||JSON.parse)(y),q.trim(y)}catch(r){if(r.name!=="SyntaxError")throw r}return(a||JSON.stringify)(y)}var cr={transitional:Ze,adapter:["xhr","http","fetch"],transformRequest:[function(e,a){let r=a.getContentType()||"",s=r.indexOf("application/json")>-1,i=q.isObject(e);if(i&&q.isHTMLForm(e)&&(e=new FormData(e)),q.isFormData(e))return s?JSON.stringify(bo(e)):e;if(q.isArrayBuffer(e)||q.isBuffer(e)||q.isStream(e)||q.isFile(e)||q.isBlob(e)||q.isReadableStream(e))return e;if(q.isArrayBufferView(e))return e.buffer;if(q.isURLSearchParams(e))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let t;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return cl(e,this.formSerializer).toString();if((t=q.isFileList(e))||r.indexOf("multipart/form-data")>-1){let f=this.env&&this.env.FormData;return Ye(t?{"files[]":e}:e,f&&new f,this.formSerializer)}}return i||s?(a.setContentType("application/json",!1),ul(e)):e}],transformResponse:[function(e){let a=this.transitional||cr.transitional,r=a&&a.forcedJSONParsing,s=this.responseType==="json";if(q.isResponse(e)||q.isReadableStream(e))return e;if(e&&q.isString(e)&&(r&&!this.responseType||s)){let o=!(a&&a.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(t){if(o)throw t.name==="SyntaxError"?z.from(t,z.ERR_BAD_RESPONSE,this,null,this.response):t}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:U.classes.FormData,Blob:U.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],y=>{cr.headers[y]={}});var pr=cr,yl=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),gl=y=>{let e={},a,r,s;return y&&y.split(`
|
|
4
4
|
`).forEach(function(o){s=o.indexOf(":"),a=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!a||e[a]&&yl[a])&&(a==="set-cookie"?e[a]?e[a].push(r):e[a]=[r]:e[a]=e[a]?e[a]+", "+r:r)}),e},Bs=Symbol("internals");function ye(y){return y&&String(y).trim().toLowerCase()}function We(y){return y===!1||y==null?y:q.isArray(y)?y.map(We):String(y)}function fl(y){let e=Object.create(null),a=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=a.exec(y);)e[r[1]]=r[2];return e}var vl=y=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(y.trim());function Na(y,e,a,r,s){if(q.isFunction(r))return r.call(this,e,a);if(s&&(e=a),!!q.isString(e)){if(q.isString(r))return e.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(e)}}function _l(y){return y.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,a,r)=>a.toUpperCase()+r)}function bl(y,e){let a=q.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(y,r+a,{value:function(s,i,o){return this[r].call(this,e,s,i,o)},configurable:!0})})}var te=class{constructor(e){e&&this.set(e)}set(e,a,r){let s=this;function i(t,f,p){let u=ye(f);if(!u)throw new Error("header name must be a non-empty string");let c=q.findKey(s,u);(!c||s[c]===void 0||p===!0||p===void 0&&s[c]!==!1)&&(s[c||f]=We(t))}let o=(t,f)=>q.forEach(t,(p,u)=>i(p,u,f));if(q.isPlainObject(e)||e instanceof this.constructor)o(e,a);else if(q.isString(e)&&(e=e.trim())&&!vl(e))o(gl(e),a);else if(q.isObject(e)&&q.isIterable(e)){let t={},f,p;for(let u of e){if(!q.isArray(u))throw TypeError("Object iterator must return a key-value pair");t[p=u[0]]=(f=t[p])?q.isArray(f)?[...f,u[1]]:[f,u[1]]:u[1]}o(t,a)}else e!=null&&i(a,e,r);return this}get(e,a){if(e=ye(e),e){let r=q.findKey(this,e);if(r){let s=this[r];if(!a)return s;if(a===!0)return fl(s);if(q.isFunction(a))return a.call(this,s,r);if(q.isRegExp(a))return a.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,a){if(e=ye(e),e){let r=q.findKey(this,e);return!!(r&&this[r]!==void 0&&(!a||Na(this,this[r],r,a)))}return!1}delete(e,a){let r=this,s=!1;function i(o){if(o=ye(o),o){let t=q.findKey(r,o);t&&(!a||Na(r,r[t],t,a))&&(delete r[t],s=!0)}}return q.isArray(e)?e.forEach(i):i(e),s}clear(e){let a=Object.keys(this),r=a.length,s=!1;for(;r--;){let i=a[r];(!e||Na(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){let a=this,r={};return q.forEach(this,(s,i)=>{let o=q.findKey(r,i);if(o){a[o]=We(s),delete a[i];return}let t=e?_l(i):String(i).trim();t!==i&&delete a[i],a[t]=We(s),r[t]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let a=Object.create(null);return q.forEach(this,(r,s)=>{r!=null&&r!==!1&&(a[s]=e&&q.isArray(r)?r.join(", "):r)}),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,a])=>e+": "+a).join(`
|
|
5
5
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...a){let r=new this(e);return a.forEach(s=>r.set(s)),r}static accessor(e){let r=(this[Bs]=this[Bs]={accessors:{}}).accessors,s=this.prototype;function i(o){let t=ye(o);r[t]||(bl(s,o),r[t]=!0)}return q.isArray(e)?e.forEach(i):i(e),this}};te.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.reduceDescriptors(te.prototype,({value:y},e)=>{let a=e[0].toUpperCase()+e.slice(1);return{get:()=>y,set(r){this[a]=r}}});q.freezeMethods(te);var it=te;function Ka(y,e){let a=this||pr,r=e||a,s=it.from(r.headers),i=r.data;return q.forEach(y,function(t){i=t.call(a,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function So(y){return!!(y&&y.__CANCEL__)}var tr=class extends z{constructor(e,a,r){super(e??"canceled",z.ERR_CANCELED,a,r),this.name="CanceledError",this.__CANCEL__=!0}},Dt=tr;function Yt(y,e,a){let r=a.config.validateStatus;!a.status||!r||r(a.status)?y(a):e(new z("Request failed with status code "+a.status,[z.ERR_BAD_REQUEST,z.ERR_BAD_RESPONSE][Math.floor(a.status/100)-4],a.config,a.request,a))}function Sl(y){return typeof y!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(y)}function Il(y,e){return e?y.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):y}function mr(y,e,a){let r=!Sl(e);return y&&(r||a==!1)?Il(y,e):e}var Ne="1.13.6";function Io(y){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(y);return e&&e[1]||""}var wl=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function kl(y,e,a){let r=a&&a.Blob||U.classes.Blob,s=Io(y);if(e===void 0&&r&&(e=!0),s==="data"){y=s.length?y.slice(s.length+1):y;let i=wl.exec(y);if(!i)throw new z("Invalid URL",z.ERR_INVALID_URL);let o=i[1],t=i[2],f=i[3],p=Buffer.from(decodeURIComponent(f),t?"base64":"utf8");if(e){if(!r)throw new z("Blob is not supported",z.ERR_NOT_SUPPORT);return new r([p],{type:o})}return p}throw new z("Unsupported protocol "+s,z.ERR_NOT_SUPPORT)}var Ja=Symbol("internals"),er=class extends gt.default.Transform{constructor(e){e=q.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(r,s)=>!q.isUndefined(s[r])),super({readableHighWaterMark:e.chunkSize});let a=this[Ja]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",r=>{r==="progress"&&(a.isCaptured||(a.isCaptured=!0))})}_read(e){let a=this[Ja];return a.onReadCallback&&a.onReadCallback(),super._read(e)}_transform(e,a,r){let s=this[Ja],i=s.maxRate,o=this.readableHighWaterMark,t=s.timeWindow,f=1e3/t,p=i/f,u=s.minChunkSize!==!1?Math.max(s.minChunkSize,p*.01):0,c=(g,_)=>{let S=Buffer.byteLength(g);s.bytesSeen+=S,s.bytes+=S,s.isCaptured&&this.emit("progress",s.bytesSeen),this.push(g)?process.nextTick(_):s.onReadCallback=()=>{s.onReadCallback=null,process.nextTick(_)}},m=(g,_)=>{let S=Buffer.byteLength(g),b=null,I=o,$,F=0;if(i){let R=Date.now();(!s.ts||(F=R-s.ts)>=t)&&(s.ts=R,$=p-s.bytes,s.bytes=$<0?-$:0,F=0),$=p-s.bytes}if(i){if($<=0)return setTimeout(()=>{_(null,g)},t-F);$<I&&(I=$)}I&&S>I&&S-I>u&&(b=g.subarray(I),g=g.subarray(0,I)),c(g,b?()=>{process.nextTick(_,null,b)}:_)};m(e,function g(_,S){if(_)return r(_);S?m(S,g):r(null)})}},Ls=er,{asyncIterator:Ws}=Symbol,Tl=async function*(y){y.stream?yield*y.stream():y.arrayBuffer?yield await y.arrayBuffer():y[Ws]?yield*y[Ws]():yield y},wo=Tl,Pl=U.ALPHABET.ALPHA_DIGIT+"-_",ge=typeof TextEncoder=="function"?new TextEncoder:new nr.default.TextEncoder,At=`\r
|
|
6
6
|
`,ql=ge.encode(At),Fl=2,ar=class{constructor(e,a){let{escapeName:r}=this.constructor,s=q.isString(a),i=`Content-Disposition: form-data; name="${r(e)}"${!s&&a.name?`; filename="${r(a.name)}"`:""}${At}`;s?a=ge.encode(String(a).replace(/\r?\n|\r\n?/g,At)):i+=`Content-Type: ${a.type||"application/octet-stream"}${At}`,this.headers=ge.encode(i+At),this.contentLength=s?a.byteLength:a.size,this.size=this.headers.byteLength+this.contentLength+Fl,this.name=e,this.value=a}async*encode(){yield this.headers;let{value:e}=this;q.isTypedArray(e)?yield e:yield*wo(e),yield ql}static escapeName(e){return String(e).replace(/[\r\n"]/g,a=>({"\r":"%0D","\n":"%0A",'"':"%22"})[a])}},$l=(y,e,a)=>{let{tag:r="form-data-boundary",size:s=25,boundary:i=r+"-"+U.generateString(s,Pl)}=a||{};if(!q.isFormData(y))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let o=ge.encode("--"+i+At),t=ge.encode("--"+i+"--"+At),f=t.byteLength,p=Array.from(y.entries()).map(([c,m])=>{let g=new ar(c,m);return f+=g.size,g});f+=o.byteLength*p.length,f=q.toFiniteNumber(f);let u={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(f)&&(u["Content-Length"]=f),e&&e(u),io.Readable.from(async function*(){for(let c of p)yield o,yield*c.encode();yield t}())},zl=$l,rr=class extends gt.default.Transform{__transform(e,a,r){this.push(e),r()}_transform(e,a,r){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let s=Buffer.alloc(2);s[0]=120,s[1]=156,this.push(s,a)}this.__transform(e,a,r)}},El=rr,Ol=(y,e)=>q.isAsyncFn(y)?function(...a){let r=a.pop();y.apply(this,a).then(s=>{try{e?r(null,...e(s)):r(null,s)}catch(i){r(i)}},r)}:y,xl=Ol;function jl(y,e){y=y||10;let a=new Array(y),r=new Array(y),s=0,i=0,o;return e=e!==void 0?e:1e3,function(f){let p=Date.now(),u=r[i];o||(o=p),a[s]=f,r[s]=p;let c=i,m=0;for(;c!==s;)m+=a[c++],c=c%y;if(s=(s+1)%y,s===i&&(i=(i+1)%y),p-o<e)return;let g=u&&p-u;return g?Math.round(m*1e3/g):void 0}}function Gl(y,e){let a=0,r=1e3/e,s,i,o=(p,u=Date.now())=>{a=u,s=null,i&&(clearTimeout(i),i=null),y(...p)};return[(...p)=>{let u=Date.now(),c=u-a;c>=r?o(p,u):(s=p,i||(i=setTimeout(()=>{i=null,o(s)},r-c)))},()=>s&&o(s)]}var ee=(y,e,a=3)=>{let r=0,s=jl(50,250);return Gl(i=>{let o=i.loaded,t=i.lengthComputable?i.total:void 0,f=o-r,p=s(f),u=o<=t;r=o;let c={loaded:o,total:t,progress:t?o/t:void 0,bytes:f,rate:p||void 0,estimated:p&&t&&u?(t-o)/p:void 0,event:i,lengthComputable:t!=null,[e?"download":"upload"]:!0};y(c)},a)},Ke=(y,e)=>{let a=y!=null;return[r=>e[0]({lengthComputable:a,total:y,loaded:r}),e[1]]},Je=y=>(...e)=>q.asap(()=>y(...e));function Rl(y){if(!y||typeof y!="string"||!y.startsWith("data:"))return 0;let e=y.indexOf(",");if(e<0)return 0;let a=y.slice(5,e),r=y.slice(e+1);if(/;base64/i.test(a)){let i=r.length,o=r.length;for(let m=0;m<o;m++)if(r.charCodeAt(m)===37&&m+2<o){let g=r.charCodeAt(m+1),_=r.charCodeAt(m+2);(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(_>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102)&&(i-=2,m+=2)}let t=0,f=o-1,p=m=>m>=2&&r.charCodeAt(m-2)===37&&r.charCodeAt(m-1)===51&&(r.charCodeAt(m)===68||r.charCodeAt(m)===100);f>=0&&(r.charCodeAt(f)===61?(t++,f--):p(f)&&(t++,f-=3)),t===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&t++;let c=Math.floor(i/4)*3-(t||0);return c>0?c:0}return Buffer.byteLength(r,"utf8")}var Us={flush:zt.default.constants.Z_SYNC_FLUSH,finishFlush:zt.default.constants.Z_SYNC_FLUSH},Cl={flush:zt.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:zt.default.constants.BROTLI_OPERATION_FLUSH},Hs=q.isFunction(zt.default.createBrotliDecompress),{http:Al,https:Dl}=pd.default,Ml=/https:?/,Ns=U.protocols.map(y=>y+":"),Ks=(y,[e,a])=>(y.on("end",a).on("error",a),e),ir=class{constructor(){this.sessions=Object.create(null)}getSession(e,a){a=Object.assign({sessionTimeout:1e3},a);let r=this.sessions[e];if(r){let u=r.length;for(let c=0;c<u;c++){let[m,g]=r[c];if(!m.destroyed&&!m.closed&&nr.default.isDeepStrictEqual(g,a))return m}}let s=oo.default.connect(e,a),i,o=()=>{if(i)return;i=!0;let u=r,c=u.length,m=c;for(;m--;)if(u[m][0]===s){c===1?delete this.sessions[e]:u.splice(m,1);return}},t=s.request,{sessionTimeout:f}=a;if(f!=null){let u,c=0;s.request=function(){let m=t.apply(this,arguments);return c++,u&&(clearTimeout(u),u=null),m.once("close",()=>{--c||(u=setTimeout(()=>{u=null,o()},f))}),m}}s.once("close",o);let p=[s,a];return r?r.push(p):r=this.sessions[e]=[p],s}},Bl=new ir;function Ll(y,e){y.beforeRedirects.proxy&&y.beforeRedirects.proxy(y),y.beforeRedirects.config&&y.beforeRedirects.config(y,e)}function ko(y,e,a){let r=e;if(!r&&r!==!1){let s=dd.default.getProxyForUrl(a);s&&(r=new URL(s))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){if(!!(r.auth.username||r.auth.password))r.auth=(r.auth.username||"")+":"+(r.auth.password||"");else if(typeof r.auth=="object")throw new z("Invalid proxy authorization",z.ERR_BAD_OPTION,{proxy:r});let o=Buffer.from(r.auth,"utf8").toString("base64");y.headers["Proxy-Authorization"]="Basic "+o}y.headers.host=y.hostname+(y.port?":"+y.port:"");let s=r.hostname||r.host;y.hostname=s,y.host=s,y.port=r.port,y.path=a,r.protocol&&(y.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}y.beforeRedirects.proxy=function(i){ko(i,e,i.href)}}var Wl=typeof process<"u"&&q.kindOf(process)==="process",Ul=y=>new Promise((e,a)=>{let r,s,i=(f,p)=>{s||(s=!0,r&&r(f,p))},o=f=>{i(f),e(f)},t=f=>{i(f,!0),a(f)};y(o,t,f=>r=f).catch(t)}),Hl=({address:y,family:e})=>{if(!q.isString(y))throw TypeError("address must be a string");return{address:y,family:e||(y.indexOf(".")<0?6:4)}},Js=(y,e)=>Hl(q.isObject(y)?y:{address:y,family:e}),Nl={request(y,e){let a=y.protocol+"//"+y.hostname+":"+(y.port||(y.protocol==="https:"?443:80)),{http2Options:r,headers:s}=y,i=Bl.getSession(a,r),{HTTP2_HEADER_SCHEME:o,HTTP2_HEADER_METHOD:t,HTTP2_HEADER_PATH:f,HTTP2_HEADER_STATUS:p}=oo.default.constants,u={[o]:y.protocol.replace(":",""),[t]:y.method,[f]:y.path};q.forEach(s,(m,g)=>{g.charAt(0)!==":"&&(u[g]=m)});let c=i.request(u);return c.once("response",m=>{let g=c;m=Object.assign({},m);let _=m[p];delete m[p],g.headers=m,g.statusCode=+_,e(g)}),c}},Kl=Wl&&function(e){return Ul(async function(r,s,i){let{data:o,lookup:t,family:f,httpVersion:p=1,http2Options:u}=e,{responseType:c,responseEncoding:m}=e,g=e.method.toUpperCase(),_,S=!1,b;if(p=+p,Number.isNaN(p))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(p!==1&&p!==2)throw TypeError(`Unsupported protocol version '${p}'`);let I=p===2;if(t){let j=xl(t,O=>q.isArray(O)?O:[O]);t=(O,A,st)=>{j(O,A,(H,lt,$t)=>{if(H)return st(H);let at=q.isArray(lt)?lt.map(Me=>Js(Me)):[Js(lt,$t)];A.all?st(H,at):st(H,at[0].address,at[0].family)})}}let $=new od.EventEmitter;function F(j){try{$.emit("abort",!j||j.type?new Dt(null,e,b):j)}catch(O){console.warn("emit error",O)}}$.once("abort",s);let R=()=>{e.cancelToken&&e.cancelToken.unsubscribe(F),e.signal&&e.signal.removeEventListener("abort",F),$.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(F),e.signal&&(e.signal.aborted?F():e.signal.addEventListener("abort",F))),i((j,O)=>{if(_=!0,O){S=!0,R();return}let{data:A}=j;if(A instanceof gt.default.Readable||A instanceof gt.default.Duplex){let st=gt.default.finished(A,()=>{st(),R()})}else R()});let M=mr(e.baseURL,e.url,e.allowAbsoluteUrls),C=new URL(M,U.hasBrowserEnv?U.origin:void 0),W=C.protocol||Ns[0];if(W==="data:"){if(e.maxContentLength>-1){let O=String(e.url||M||"");if(Rl(O)>e.maxContentLength)return s(new z("maxContentLength size of "+e.maxContentLength+" exceeded",z.ERR_BAD_RESPONSE,e))}let j;if(g!=="GET")return Yt(r,s,{status:405,statusText:"method not allowed",headers:{},config:e});try{j=kl(e.url,c==="blob",{Blob:e.env&&e.env.Blob})}catch(O){throw z.from(O,z.ERR_BAD_REQUEST,e)}return c==="text"?(j=j.toString(m),(!m||m==="utf8")&&(j=q.stripBOM(j))):c==="stream"&&(j=gt.default.Readable.from(j)),Yt(r,s,{data:j,status:200,statusText:"OK",headers:new it,config:e})}if(Ns.indexOf(W)===-1)return s(new z("Unsupported protocol "+W,z.ERR_BAD_REQUEST,e));let J=it.from(e.headers).normalize();J.set("User-Agent","axios/"+Ne,!1);let{onUploadProgress:qt,onDownloadProgress:Vt}=e,Rt=e.maxRate,_t,yt;if(q.isSpecCompliantForm(o)){let j=J.getContentType(/boundary=([-_\w\d]{10,70})/i);o=zl(o,O=>{J.set(O)},{tag:`axios-${Ne}-boundary`,boundary:j&&j[1]||void 0})}else if(q.isFormData(o)&&q.isFunction(o.getHeaders)){if(J.set(o.getHeaders()),!J.hasContentLength())try{let j=await nr.default.promisify(o.getLength).call(o);Number.isFinite(j)&&j>=0&&J.setContentLength(j)}catch{}}else if(q.isBlob(o)||q.isFile(o))o.size&&J.setContentType(o.type||"application/octet-stream"),J.setContentLength(o.size||0),o=gt.default.Readable.from(wo(o));else if(o&&!q.isStream(o)){if(!Buffer.isBuffer(o))if(q.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else if(q.isString(o))o=Buffer.from(o,"utf-8");else return s(new z("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",z.ERR_BAD_REQUEST,e));if(J.setContentLength(o.length,!1),e.maxBodyLength>-1&&o.length>e.maxBodyLength)return s(new z("Request body larger than maxBodyLength limit",z.ERR_BAD_REQUEST,e))}let bt=q.toFiniteNumber(J.getContentLength());q.isArray(Rt)?(_t=Rt[0],yt=Rt[1]):_t=yt=Rt,o&&(qt||_t)&&(q.isStream(o)||(o=gt.default.Readable.from(o,{objectMode:!1})),o=gt.default.pipeline([o,new Ls({maxRate:q.toFiniteNumber(_t)})],q.noop),qt&&o.on("progress",Ks(o,Ke(bt,ee(Je(qt),!1,3)))));let Ft;if(e.auth){let j=e.auth.username||"",O=e.auth.password||"";Ft=j+":"+O}if(!Ft&&C.username){let j=C.username,O=C.password;Ft=j+":"+O}Ft&&J.delete("authorization");let Q;try{Q=dr(C.pathname+C.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(j){let O=new Error(j.message);return O.config=e,O.url=e.url,O.exists=!0,s(O)}J.set("Accept-Encoding","gzip, compress, deflate"+(Hs?", br":""),!1);let X={path:Q,method:g,headers:J.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:Ft,protocol:W,family:f,beforeRedirect:Ll,beforeRedirects:{},http2Options:u};!q.isUndefined(t)&&(X.lookup=t),e.socketPath?X.socketPath=e.socketPath:(X.hostname=C.hostname.startsWith("[")?C.hostname.slice(1,-1):C.hostname,X.port=C.port,ko(X,e.proxy,W+"//"+C.hostname+(C.port?":"+C.port:"")+X.path));let et,Qt=Ml.test(X.protocol);if(X.agent=Qt?e.httpsAgent:e.httpAgent,I?et=Nl:e.transport?et=e.transport:e.maxRedirects===0?et=Qt?cd.default:ld.default:(e.maxRedirects&&(X.maxRedirects=e.maxRedirects),e.beforeRedirect&&(X.beforeRedirects.config=e.beforeRedirect),et=Qt?Dl:Al),e.maxBodyLength>-1?X.maxBodyLength=e.maxBodyLength:X.maxBodyLength=1/0,e.insecureHTTPParser&&(X.insecureHTTPParser=e.insecureHTTPParser),b=et.request(X,function(O){if(b.destroyed)return;let A=[O],st=q.toFiniteNumber(O.headers["content-length"]);if(Vt||yt){let at=new Ls({maxRate:q.toFiniteNumber(yt)});Vt&&at.on("progress",Ks(at,Ke(st,ee(Je(Vt),!0,3)))),A.push(at)}let H=O,lt=O.req||b;if(e.decompress!==!1&&O.headers["content-encoding"])switch((g==="HEAD"||O.statusCode===204)&&delete O.headers["content-encoding"],(O.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":A.push(zt.default.createUnzip(Us)),delete O.headers["content-encoding"];break;case"deflate":A.push(new El),A.push(zt.default.createUnzip(Us)),delete O.headers["content-encoding"];break;case"br":Hs&&(A.push(zt.default.createBrotliDecompress(Cl)),delete O.headers["content-encoding"])}H=A.length>1?gt.default.pipeline(A,q.noop):A[0];let $t={status:O.statusCode,statusText:O.statusMessage,headers:new it(O.headers),config:e,request:lt};if(c==="stream")$t.data=H,Yt(r,s,$t);else{let at=[],Me=0;H.on("data",function(Z){at.push(Z),Me+=Z.length,e.maxContentLength>-1&&Me>e.maxContentLength&&(S=!0,H.destroy(),F(new z("maxContentLength size of "+e.maxContentLength+" exceeded",z.ERR_BAD_RESPONSE,e,lt)))}),H.on("aborted",function(){if(S)return;let Z=new z("stream has been aborted",z.ERR_BAD_RESPONSE,e,lt);H.destroy(Z),s(Z)}),H.on("error",function(Z){b.destroyed||s(z.from(Z,null,e,lt))}),H.on("end",function(){try{let Z=at.length===1?at[0]:Buffer.concat(at);c!=="arraybuffer"&&(Z=Z.toString(m),(!m||m==="utf8")&&(Z=q.stripBOM(Z))),$t.data=Z}catch(Z){return s(z.from(Z,null,e,$t.request,$t))}Yt(r,s,$t)})}$.once("abort",at=>{H.destroyed||(H.emit("error",at),H.destroy())})}),$.once("abort",j=>{b.close?b.close():b.destroy(j)}),b.on("error",function(O){s(z.from(O,null,e,b))}),b.on("socket",function(O){O.setKeepAlive(!0,1e3*60)}),e.timeout){let j=parseInt(e.timeout,10);if(Number.isNaN(j)){F(new z("error trying to parse `config.timeout` to int",z.ERR_BAD_OPTION_VALUE,e,b));return}b.setTimeout(j,function(){if(_)return;let A=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",st=e.transitional||Ze;e.timeoutErrorMessage&&(A=e.timeoutErrorMessage),F(new z(A,st.clarifyTimeoutError?z.ETIMEDOUT:z.ECONNABORTED,e,b))})}else b.setTimeout(0);if(q.isStream(o)){let j=!1,O=!1;o.on("end",()=>{j=!0}),o.once("error",A=>{O=!0,b.destroy(A)}),o.on("close",()=>{!j&&!O&&F(new Dt("Request stream has been aborted",e,b))}),o.pipe(b)}else o&&b.write(o),b.end()})},Jl=U.hasStandardBrowserEnv?((y,e)=>a=>(a=new URL(a,U.origin),y.protocol===a.protocol&&y.host===a.host&&(e||y.port===a.port)))(new URL(U.origin),U.navigator&&/(msie|trident)/i.test(U.navigator.userAgent)):()=>!0,Vl=U.hasStandardBrowserEnv?{write(y,e,a,r,s,i,o){if(typeof document>"u")return;let t=[`${y}=${encodeURIComponent(e)}`];q.isNumber(a)&&t.push(`expires=${new Date(a).toUTCString()}`),q.isString(r)&&t.push(`path=${r}`),q.isString(s)&&t.push(`domain=${s}`),i===!0&&t.push("secure"),q.isString(o)&&t.push(`SameSite=${o}`),document.cookie=t.join("; ")},read(y){if(typeof document>"u")return null;let e=document.cookie.match(new RegExp("(?:^|; )"+y+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(y){this.write(y,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}},Vs=y=>y instanceof it?{...y}:y;function Mt(y,e){e=e||{};let a={};function r(p,u,c,m){return q.isPlainObject(p)&&q.isPlainObject(u)?q.merge.call({caseless:m},p,u):q.isPlainObject(u)?q.merge({},u):q.isArray(u)?u.slice():u}function s(p,u,c,m){if(q.isUndefined(u)){if(!q.isUndefined(p))return r(void 0,p,c,m)}else return r(p,u,c,m)}function i(p,u){if(!q.isUndefined(u))return r(void 0,u)}function o(p,u){if(q.isUndefined(u)){if(!q.isUndefined(p))return r(void 0,p)}else return r(void 0,u)}function t(p,u,c){if(c in e)return r(p,u);if(c in y)return r(void 0,p)}let f={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:t,headers:(p,u,c)=>s(Vs(p),Vs(u),c,!0)};return q.forEach(Object.keys({...y,...e}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;let c=q.hasOwnProp(f,u)?f[u]:s,m=c(y[u],e[u],u);q.isUndefined(m)&&c!==t||(a[u]=m)}),a}var To=y=>{let e=Mt({},y),{data:a,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:t}=e;if(e.headers=o=it.from(o),e.url=dr(mr(e.baseURL,e.url,e.allowAbsoluteUrls),y.params,y.paramsSerializer),t&&o.set("Authorization","Basic "+btoa((t.username||"")+":"+(t.password?unescape(encodeURIComponent(t.password)):""))),q.isFormData(a)){if(U.hasStandardBrowserEnv||U.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(q.isFunction(a.getHeaders)){let f=a.getHeaders(),p=["content-type","content-length"];Object.entries(f).forEach(([u,c])=>{p.includes(u.toLowerCase())&&o.set(u,c)})}}if(U.hasStandardBrowserEnv&&(r&&q.isFunction(r)&&(r=r(e)),r||r!==!1&&Jl(e.url))){let f=s&&i&&Vl.read(i);f&&o.set(s,f)}return e},Ql=typeof XMLHttpRequest<"u",Xl=Ql&&function(y){return new Promise(function(a,r){let s=To(y),i=s.data,o=it.from(s.headers).normalize(),{responseType:t,onUploadProgress:f,onDownloadProgress:p}=s,u,c,m,g,_;function S(){g&&g(),_&&_(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(s.method.toUpperCase(),s.url,!0),b.timeout=s.timeout;function I(){if(!b)return;let F=it.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),M={data:!t||t==="text"||t==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:F,config:y,request:b};Yt(function(W){a(W),S()},function(W){r(W),S()},M),b=null}"onloadend"in b?b.onloadend=I:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(I)},b.onabort=function(){b&&(r(new z("Request aborted",z.ECONNABORTED,y,b)),b=null)},b.onerror=function(R){let M=R&&R.message?R.message:"Network Error",C=new z(M,z.ERR_NETWORK,y,b);C.event=R||null,r(C),b=null},b.ontimeout=function(){let R=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded",M=s.transitional||Ze;s.timeoutErrorMessage&&(R=s.timeoutErrorMessage),r(new z(R,M.clarifyTimeoutError?z.ETIMEDOUT:z.ECONNABORTED,y,b)),b=null},i===void 0&&o.setContentType(null),"setRequestHeader"in b&&q.forEach(o.toJSON(),function(R,M){b.setRequestHeader(M,R)}),q.isUndefined(s.withCredentials)||(b.withCredentials=!!s.withCredentials),t&&t!=="json"&&(b.responseType=s.responseType),p&&([m,_]=ee(p,!0),b.addEventListener("progress",m)),f&&b.upload&&([c,g]=ee(f),b.upload.addEventListener("progress",c),b.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(u=F=>{b&&(r(!F||F.type?new Dt(null,y,b):F),b.abort(),b=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));let $=Io(s.url);if($&&U.protocols.indexOf($)===-1){r(new z("Unsupported protocol "+$+":",z.ERR_BAD_REQUEST,y));return}b.send(i||null)})},Yl=(y,e)=>{let{length:a}=y=y?y.filter(Boolean):[];if(e||a){let r=new AbortController,s,i=function(p){if(!s){s=!0,t();let u=p instanceof Error?p:this.reason;r.abort(u instanceof z?u:new Dt(u instanceof Error?u.message:u))}},o=e&&setTimeout(()=>{o=null,i(new z(`timeout of ${e}ms exceeded`,z.ETIMEDOUT))},e),t=()=>{y&&(o&&clearTimeout(o),o=null,y.forEach(p=>{p.unsubscribe?p.unsubscribe(i):p.removeEventListener("abort",i)}),y=null)};y.forEach(p=>p.addEventListener("abort",i));let{signal:f}=r;return f.unsubscribe=()=>q.asap(t),f}},Zl=Yl,tc=function*(y,e){let a=y.byteLength;if(!e||a<e){yield y;return}let r=0,s;for(;r<a;)s=r+e,yield y.slice(r,s),r=s},ec=async function*(y,e){for await(let a of ac(y))yield*tc(a,e)},ac=async function*(y){if(y[Symbol.asyncIterator]){yield*y;return}let e=y.getReader();try{for(;;){let{done:a,value:r}=await e.read();if(a)break;yield r}}finally{await e.cancel()}},Qs=(y,e,a,r)=>{let s=ec(y,e),i=0,o,t=f=>{o||(o=!0,r&&r(f))};return new ReadableStream({async pull(f){try{let{done:p,value:u}=await s.next();if(p){t(),f.close();return}let c=u.byteLength;if(a){let m=i+=c;a(m)}f.enqueue(new Uint8Array(u))}catch(p){throw t(p),p}},cancel(f){return t(f),s.return()}},{highWaterMark:2})},Xs=64*1024,{isFunction:Be}=q,rc=(({Request:y,Response:e})=>({Request:y,Response:e}))(q.global),{ReadableStream:Ys,TextEncoder:Zs}=q.global,to=(y,...e)=>{try{return!!y(...e)}catch{return!1}},ic=y=>{y=q.merge.call({skipUndefined:!0},rc,y);let{fetch:e,Request:a,Response:r}=y,s=e?Be(e):typeof fetch=="function",i=Be(a),o=Be(r);if(!s)return!1;let t=s&&Be(Ys),f=s&&(typeof Zs=="function"?(_=>S=>_.encode(S))(new Zs):async _=>new Uint8Array(await new a(_).arrayBuffer())),p=i&&t&&to(()=>{let _=!1,S=new a(U.origin,{body:new Ys,method:"POST",get duplex(){return _=!0,"half"}}).headers.has("Content-Type");return _&&!S}),u=o&&t&&to(()=>q.isReadableStream(new r("").body)),c={stream:u&&(_=>_.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!c[_]&&(c[_]=(S,b)=>{let I=S&&S[_];if(I)return I.call(S);throw new z(`Response type '${_}' is not supported`,z.ERR_NOT_SUPPORT,b)})});let m=async _=>{if(_==null)return 0;if(q.isBlob(_))return _.size;if(q.isSpecCompliantForm(_))return(await new a(U.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(q.isArrayBufferView(_)||q.isArrayBuffer(_))return _.byteLength;if(q.isURLSearchParams(_)&&(_=_+""),q.isString(_))return(await f(_)).byteLength},g=async(_,S)=>{let b=q.toFiniteNumber(_.getContentLength());return b??m(S)};return async _=>{let{url:S,method:b,data:I,signal:$,cancelToken:F,timeout:R,onDownloadProgress:M,onUploadProgress:C,responseType:W,headers:J,withCredentials:qt="same-origin",fetchOptions:Vt}=To(_),Rt=e||fetch;W=W?(W+"").toLowerCase():"text";let _t=Zl([$,F&&F.toAbortSignal()],R),yt=null,bt=_t&&_t.unsubscribe&&(()=>{_t.unsubscribe()}),Ft;try{if(C&&p&&b!=="get"&&b!=="head"&&(Ft=await g(J,I))!==0){let O=new a(S,{method:"POST",body:I,duplex:"half"}),A;if(q.isFormData(I)&&(A=O.headers.get("content-type"))&&J.setContentType(A),O.body){let[st,H]=Ke(Ft,ee(Je(C)));I=Qs(O.body,Xs,st,H)}}q.isString(qt)||(qt=qt?"include":"omit");let Q=i&&"credentials"in a.prototype,X={...Vt,signal:_t,method:b.toUpperCase(),headers:J.normalize().toJSON(),body:I,duplex:"half",credentials:Q?qt:void 0};yt=i&&new a(S,X);let et=await(i?Rt(yt,Vt):Rt(S,X)),Qt=u&&(W==="stream"||W==="response");if(u&&(M||Qt&&bt)){let O={};["status","statusText","headers"].forEach(lt=>{O[lt]=et[lt]});let A=q.toFiniteNumber(et.headers.get("content-length")),[st,H]=M&&Ke(A,ee(Je(M),!0))||[];et=new r(Qs(et.body,Xs,st,()=>{H&&H(),bt&&bt()}),O)}W=W||"text";let j=await c[q.findKey(c,W)||"text"](et,_);return!Qt&&bt&&bt(),await new Promise((O,A)=>{Yt(O,A,{data:j,headers:it.from(et.headers),status:et.status,statusText:et.statusText,config:_,request:yt})})}catch(Q){throw bt&&bt(),Q&&Q.name==="TypeError"&&/Load failed|fetch/i.test(Q.message)?Object.assign(new z("Network Error",z.ERR_NETWORK,_,yt,Q&&Q.response),{cause:Q.cause||Q}):z.from(Q,Q&&Q.code,_,yt,Q&&Q.response)}}},sc=new Map,Po=y=>{let e=y&&y.env||{},{fetch:a,Request:r,Response:s}=e,i=[r,s,a],o=i.length,t=o,f,p,u=sc;for(;t--;)f=i[t],p=u.get(f),p===void 0&&u.set(f,p=t?new Map:ic(e)),u=p;return p};Po();var ur={http:Kl,xhr:Xl,fetch:{get:Po}};q.forEach(ur,(y,e)=>{if(y){try{Object.defineProperty(y,"name",{value:e})}catch{}Object.defineProperty(y,"adapterName",{value:e})}});var eo=y=>`- ${y}`,oc=y=>q.isFunction(y)||y===null||y===!1;function nc(y,e){y=q.isArray(y)?y:[y];let{length:a}=y,r,s,i={};for(let o=0;o<a;o++){r=y[o];let t;if(s=r,!oc(r)&&(s=ur[(t=String(r)).toLowerCase()],s===void 0))throw new z(`Unknown adapter '${t}'`);if(s&&(q.isFunction(s)||(s=s.get(e))))break;i[t||"#"+o]=s}if(!s){let o=Object.entries(i).map(([f,p])=>`adapter ${f} `+(p===!1?"is not supported by the environment":"is not available in the build")),t=a?o.length>1?`since :
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{a as rt,b as Ms}from"./chunk-QN6Y6NPA.js";import{f as ot}from"./chunk-3HUM74NZ.js";import"./chunk-JSFA3NEP.js";import"./chunk-TZIDSCTF.js";import{a as Cs}from"./chunk-OOEH6ZSV.js";import{a as ws}from"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import{b as h}from"./chunk-GZPNIYVZ.js";import{a as K,d as y,f as nt}from"./chunk-OWGSC52X.js";var re=y(Y=>{"use strict";h();Object.defineProperty(Y,"__esModule",{value:!0});Y.matchFilter=Is;Y.parse=ft;Y.preprocess=_t;var at=new Map;function Is(n){var e;let t=Array.isArray(n)?n:[n],s=t.join(","),i=(e=at.get(s))!==null&&e!==void 0?e:(()=>{let r=ft(t),o=Ss(r);return at.set(s,o),o})();return r=>i(r)}function ft(n){return Array.isArray(n)?n.map(e=>e.split(":")):[n.split(":")]}function Ss(n){let e=n.flatMap(i=>ks(i,_t(i))),t=Ts(e),s=Ps(t);return i=>!!s(i.update,i)}function _t(n){let e=ne,t=[n].flatMap(s=>{let[i,r,o]=s;if(!(i in mt))return[s];if(!i&&!r&&!o)return[s];let d=mt[i].map(c=>[c,r,o]);return r===void 0||r in Ae&&(r||o)?d:d.filter(([c])=>{var l;return!!(!((l=e[c])===null||l===void 0)&&l[r])})}).flatMap(s=>{let[i,r,o]=s;if(!(r in Ae))return[s];if(!r&&!o)return[s];let d=Ae[r].map(c=>[i,c,o]);return o===void 0?d:d.filter(([,c])=>{var l,p;return!!(!((p=(l=e[i])===null||l===void 0?void 0:l[c])===null||p===void 0)&&p[o])})});if(t.length===0)throw new Error(`Shortcuts in '${n.join(":")}' do not expand to any valid filter query`);return t}function ks(n,e){if(e.length===0)throw new Error("Empty filter query given");let t=e.map(As).filter(s=>s!==!0);if(t.length===0)return e;throw t.length===1?new Error(t[0]):new Error(`Invalid filter query '${n.join(":")}'. There are ${t.length} errors after expanding the contained shortcuts: ${t.join("; ")}`)}function As(n){let[e,t,s,...i]=n;if(e===void 0)return"Empty filter query given";if(!(e in ne)){let a=Object.keys(ne);return`Invalid L1 filter '${e}' given in '${n.join(":")}'. Permitted values are: ${a.map(d=>`'${d}'`).join(", ")}.`}if(t===void 0)return!0;let r=ne[e];if(!(t in r)){let a=Object.keys(r);return`Invalid L2 filter '${t}' given in '${n.join(":")}'. Permitted values are: ${a.map(d=>`'${d}'`).join(", ")}.`}if(s===void 0)return!0;let o=r[t];if(!(s in o)){let a=Object.keys(o);return`Invalid L3 filter '${s}' given in '${n.join(":")}'. ${a.length===0?`No further filtering is possible after '${e}:${t}'.`:`Permitted values are: ${a.map(d=>`'${d}'`).join(", ")}.`}`}return i.length===0?!0:`Cannot filter further than three levels, ':${i.join(":")}' is invalid!`}function Ts(n){var e,t;let s={};for(let[i,r,o]of n){let a=(e=s[i])!==null&&e!==void 0?e:s[i]={};if(r!==void 0){let d=(t=a[r])!==null&&t!==void 0?t:a[r]=new Set;o!==void 0&&d.add(o)}}return s}function ke(n,e){return(t,s)=>n(t,s)||e(t,s)}function ut(n,e){return(t,s)=>{let i=n(t,s);return i&&e(i,s)}}function dt(n){return(e,t)=>n(e,t)!=null}function Ps(n){let e=Object.entries(n).map(([t,s])=>{let i=o=>o[t],r=Object.entries(s).map(([o,a])=>{let d=l=>l[o],c=Array.from(a).map(l=>l==="me"?(m,_)=>{let g=_.me.id;return ct(m,w=>w.id===g)}:m=>ct(m,_=>_[l]||_.type===l));return c.length===0?dt(d):ut(d,c.reduce(ke))});return r.length===0?dt(i):ut(i,r.reduce(ke))});if(e.length===0)throw new Error("Cannot create filter function for empty query");return e.reduce(ke)}function ct(n,e){let t=s=>s!=null&&e(s);return Array.isArray(n)?n.some(t):t(n)}var lt={mention:{},hashtag:{},cashtag:{},bot_command:{},url:{},email:{},phone_number:{},bold:{},italic:{},underline:{},strikethrough:{},spoiler:{},blockquote:{},expandable_blockquote:{},code:{},pre:{},text_link:{},text_mention:{},custom_emoji:{}},Te={me:{},is_bot:{},is_premium:{},added_to_attachment_menu:{}},Es={user:{},hidden_user:{},chat:{},channel:{}},js={is_video:{},is_animated:{},premium_animation:{}},Pe={emoji:{},custom_emoji:{},paid:{}},ht={can_be_upgraded:{},is_upgrade_separate:{},is_private:{}},yt={forward_origin:Es,is_topic_message:{},is_automatic_forward:{},business_connection_id:{},text:{},animation:{},audio:{},document:{},paid_media:{},photo:{},sticker:js,story:{},video:{},video_note:{},voice:{},contact:{},dice:{},game:{},poll:{},venue:{},location:{},entities:lt,caption_entities:lt,caption:{},link_preview_options:{url:{},prefer_small_media:{},prefer_large_media:{},show_above_text:{}},effect_id:{},paid_star_count:{},has_media_spoiler:{},new_chat_title:{},new_chat_photo:{},delete_chat_photo:{},message_auto_delete_timer_changed:{},pinned_message:{},invoice:{},proximity_alert_triggered:{},chat_background_set:{},giveaway_created:{},giveaway:{only_new_members:{},has_public_winners:{}},giveaway_winners:{only_new_members:{},was_refunded:{}},giveaway_completed:{},gift:ht,gift_upgrade_sent:ht,unique_gift:{transfer_star_count:{}},paid_message_price_changed:{},video_chat_scheduled:{},video_chat_started:{},video_chat_ended:{},video_chat_participants_invited:{},web_app_data:{}},ie={...yt,direct_messages_topic:{},chat_owner_left:{new_owner:{}},chat_owner_changd:{},new_chat_members:Te,left_chat_member:Te,group_chat_created:{},supergroup_chat_created:{},migrate_to_chat_id:{},migrate_from_chat_id:{},successful_payment:{},refunded_payment:{},users_shared:{},chat_shared:{},connected_website:{},write_access_allowed:{},passport_data:{},boost_added:{},forum_topic_created:{is_name_implicit:{}},forum_topic_edited:{name:{},icon_custom_emoji_id:{}},forum_topic_closed:{},forum_topic_reopened:{},general_forum_topic_hidden:{},general_forum_topic_unhidden:{},checklist:{others_can_add_tasks:{},others_can_mark_tasks_as_done:{}},checklist_tasks_done:{},checklist_tasks_added:{},suggested_post_info:{},suggested_post_approved:{},suggested_post_approval_failed:{},suggested_post_declined:{},suggested_post_paid:{},suggested_post_refunded:{},sender_boost_count:{}},pt={...yt,channel_chat_created:{},direct_message_price_changed:{},is_paid_post:{}},Rs={can_reply:{},is_enabled:{}},Bs={old_reaction:Pe,new_reaction:Pe},Fs={reactions:Pe},$s={data:{},game_short_name:{}},gt={from:Te},ne={message:ie,edited_message:ie,channel_post:pt,edited_channel_post:pt,business_connection:Rs,business_message:ie,edited_business_message:ie,deleted_business_messages:{},inline_query:{},chosen_inline_result:{},callback_query:$s,shipping_query:{},pre_checkout_query:{},poll:{},poll_answer:{},my_chat_member:gt,chat_member:gt,chat_join_request:{},message_reaction:Bs,message_reaction_count:Fs,chat_boost:{},removed_chat_boost:{},purchased_paid_media:{}},mt={"":["message","channel_post"],msg:["message","channel_post"],edit:["edited_message","edited_channel_post"]},Ae={"":["entities","caption_entities"],media:["photo","video"],file:["photo","animation","audio","document","video","video_note","voice","sticker"]}});var de=y(ue=>{"use strict";h();Object.defineProperty(ue,"__esModule",{value:!0});ue.Context=void 0;var Ls=re(),S={filterQuery(n){let e=(0,Ls.matchFilter)(n);return t=>e(t)},text(n){let e=S.filterQuery([":text",":caption"]),t=$(n);return s=>{var i,r;if(!e(s))return!1;let o=(i=s.message)!==null&&i!==void 0?i:s.channelPost,a=(r=o.text)!==null&&r!==void 0?r:o.caption;return L(s,a,t)}},command(n){let e=S.filterQuery(":entities:bot_command"),t=new Set,s=new Set;return ae(n).forEach(i=>{if(i.startsWith("/"))throw new Error(`Do not include '/' when registering command handlers (use '${i.substring(1)}' not '${i}')`);(i.includes("@")?t:s).add(i)}),i=>{var r,o;if(!e(i))return!1;let a=(r=i.message)!==null&&r!==void 0?r:i.channelPost,d=(o=a.text)!==null&&o!==void 0?o:a.caption;return a.entities.some(c=>{if(c.type!=="bot_command"||c.offset!==0)return!1;let l=d.substring(1,c.length);if(s.has(l)||t.has(l))return i.match=d.substring(l.length+1).trimStart(),!0;let p=l.indexOf("@");if(p===-1)return!1;let m=l.substring(p+1).toLowerCase(),_=i.me.username.toLowerCase();if(m!==_)return!1;let g=l.substring(0,p);return s.has(g)?(i.match=d.substring(l.length+1).trimStart(),!0):!1})}},reaction(n){let e=S.filterQuery("message_reaction"),t=typeof n=="string"?[{type:"emoji",emoji:n}]:(Array.isArray(n)?n:[n]).map(o=>typeof o=="string"?{type:"emoji",emoji:o}:o),s=new Set(t.filter(o=>o.type==="emoji").map(o=>o.emoji)),i=new Set(t.filter(o=>o.type==="custom_emoji").map(o=>o.custom_emoji_id)),r=t.some(o=>o.type==="paid");return o=>{if(!e(o))return!1;let{old_reaction:a,new_reaction:d}=o.messageReaction;for(let c of d){let l=!1;if(c.type==="emoji"){for(let p of a)if(p.type==="emoji"&&p.emoji===c.emoji){l=!0;break}}else if(c.type==="custom_emoji"){for(let p of a)if(p.type==="custom_emoji"&&p.custom_emoji_id===c.custom_emoji_id){l=!0;break}}else if(c.type==="paid"){for(let p of a)if(p.type==="paid"){l=!0;break}}if(!l)if(c.type==="emoji"){if(s.has(c.emoji))return!0}else if(c.type==="custom_emoji"){if(i.has(c.custom_emoji_id))return!0}else if(c.type==="paid"){if(r)return!0}else return!0}return!1}},chatType(n){let e=new Set(ae(n));return t=>{var s;return((s=t.chat)===null||s===void 0?void 0:s.type)!==void 0&&e.has(t.chat.type)}},callbackQuery(n){let e=S.filterQuery("callback_query:data"),t=$(n);return s=>e(s)&&L(s,s.callbackQuery.data,t)},gameQuery(n){let e=S.filterQuery("callback_query:game_short_name"),t=$(n);return s=>e(s)&&L(s,s.callbackQuery.game_short_name,t)},inlineQuery(n){let e=S.filterQuery("inline_query"),t=$(n);return s=>e(s)&&L(s,s.inlineQuery.query,t)},chosenInlineResult(n){let e=S.filterQuery("chosen_inline_result"),t=$(n);return s=>e(s)&&L(s,s.chosenInlineResult.result_id,t)},preCheckoutQuery(n){let e=S.filterQuery("pre_checkout_query"),t=$(n);return s=>e(s)&&L(s,s.preCheckoutQuery.invoice_payload,t)},shippingQuery(n){let e=S.filterQuery("shipping_query"),t=$(n);return s=>e(s)&&L(s,s.shippingQuery.invoice_payload,t)}},oe=class n{constructor(e,t,s){this.update=e,this.api=t,this.me=s}get message(){return this.update.message}get editedMessage(){return this.update.edited_message}get channelPost(){return this.update.channel_post}get editedChannelPost(){return this.update.edited_channel_post}get businessConnection(){return this.update.business_connection}get businessMessage(){return this.update.business_message}get editedBusinessMessage(){return this.update.edited_business_message}get deletedBusinessMessages(){return this.update.deleted_business_messages}get messageReaction(){return this.update.message_reaction}get messageReactionCount(){return this.update.message_reaction_count}get inlineQuery(){return this.update.inline_query}get chosenInlineResult(){return this.update.chosen_inline_result}get callbackQuery(){return this.update.callback_query}get shippingQuery(){return this.update.shipping_query}get preCheckoutQuery(){return this.update.pre_checkout_query}get poll(){return this.update.poll}get pollAnswer(){return this.update.poll_answer}get myChatMember(){return this.update.my_chat_member}get chatMember(){return this.update.chat_member}get chatJoinRequest(){return this.update.chat_join_request}get chatBoost(){return this.update.chat_boost}get removedChatBoost(){return this.update.removed_chat_boost}get purchasedPaidMedia(){return this.update.purchased_paid_media}get msg(){var e,t,s,i,r,o,a;return(o=(r=(i=(s=(t=(e=this.message)!==null&&e!==void 0?e:this.editedMessage)!==null&&t!==void 0?t:this.channelPost)!==null&&s!==void 0?s:this.editedChannelPost)!==null&&i!==void 0?i:this.businessMessage)!==null&&r!==void 0?r:this.editedBusinessMessage)!==null&&o!==void 0?o:(a=this.callbackQuery)===null||a===void 0?void 0:a.message}get chat(){var e,t,s,i,r,o,a,d,c;return(c=(d=(a=(o=(r=(i=(s=(t=(e=this.msg)!==null&&e!==void 0?e:this.deletedBusinessMessages)!==null&&t!==void 0?t:this.messageReaction)!==null&&s!==void 0?s:this.messageReactionCount)!==null&&i!==void 0?i:this.myChatMember)!==null&&r!==void 0?r:this.chatMember)!==null&&o!==void 0?o:this.chatJoinRequest)!==null&&a!==void 0?a:this.chatBoost)!==null&&d!==void 0?d:this.removedChatBoost)===null||c===void 0?void 0:c.chat}get senderChat(){var e;return(e=this.msg)===null||e===void 0?void 0:e.sender_chat}get from(){var e,t,s,i,r,o,a,d,c,l,p,m,_,g,w,M,v;return(a=(o=(t=(e=this.businessConnection)!==null&&e!==void 0?e:this.messageReaction)!==null&&t!==void 0?t:(r=(i=(s=this.chatBoost)===null||s===void 0?void 0:s.boost)!==null&&i!==void 0?i:this.removedChatBoost)===null||r===void 0?void 0:r.source)===null||o===void 0?void 0:o.user)!==null&&a!==void 0?a:(v=(M=(w=(g=(_=(m=(p=(l=(c=(d=this.callbackQuery)!==null&&d!==void 0?d:this.msg)!==null&&c!==void 0?c:this.inlineQuery)!==null&&l!==void 0?l:this.chosenInlineResult)!==null&&p!==void 0?p:this.shippingQuery)!==null&&m!==void 0?m:this.preCheckoutQuery)!==null&&_!==void 0?_:this.myChatMember)!==null&&g!==void 0?g:this.chatMember)!==null&&w!==void 0?w:this.chatJoinRequest)!==null&&M!==void 0?M:this.purchasedPaidMedia)===null||v===void 0?void 0:v.from}get msgId(){var e,t,s,i,r;return(i=(t=(e=this.msg)===null||e===void 0?void 0:e.message_id)!==null&&t!==void 0?t:(s=this.messageReaction)===null||s===void 0?void 0:s.message_id)!==null&&i!==void 0?i:(r=this.messageReactionCount)===null||r===void 0?void 0:r.message_id}get chatId(){var e,t,s;return(t=(e=this.chat)===null||e===void 0?void 0:e.id)!==null&&t!==void 0?t:(s=this.businessConnection)===null||s===void 0?void 0:s.user_chat_id}get inlineMessageId(){var e,t,s;return(t=(e=this.callbackQuery)===null||e===void 0?void 0:e.inline_message_id)!==null&&t!==void 0?t:(s=this.chosenInlineResult)===null||s===void 0?void 0:s.inline_message_id}get businessConnectionId(){var e,t,s,i,r;return(i=(t=(e=this.msg)===null||e===void 0?void 0:e.business_connection_id)!==null&&t!==void 0?t:(s=this.businessConnection)===null||s===void 0?void 0:s.id)!==null&&i!==void 0?i:(r=this.deletedBusinessMessages)===null||r===void 0?void 0:r.business_connection_id}entities(e){var t,s;let i=this.msg;if(i===void 0)return[];let r=(t=i.text)!==null&&t!==void 0?t:i.caption;if(r===void 0)return[];let o=(s=i.entities)!==null&&s!==void 0?s:i.caption_entities;if(o===void 0)return[];if(e!==void 0){let a=new Set(ae(e));o=o.filter(d=>a.has(d.type))}return o.map(a=>({...a,text:r.substring(a.offset,a.offset+a.length)}))}reactions(){let e=[],t=[],s=[],i=[],r=[],o=[],a=[],d=[],c=!1,l=!1,p=this.messageReaction;if(p!==void 0){let{old_reaction:m,new_reaction:_}=p;for(let g of _)g.type==="emoji"?e.push(g.emoji):g.type==="custom_emoji"?r.push(g.custom_emoji_id):g.type==="paid"&&(c=l=!0);for(let g of m)g.type==="emoji"?i.push(g.emoji):g.type==="custom_emoji"?d.push(g.custom_emoji_id):g.type==="paid"&&(l=!1);t.push(...e),o.push(...r);for(let g=0;g<i.length;g++){let w=t.length;if(w===0)break;let M=i[g];for(let v=0;v<w;v++)if(M===t[v]){s.push(M),i.splice(g,1),t.splice(v,1),g--;break}}for(let g=0;g<d.length;g++){let w=o.length;if(w===0)break;let M=d[g];for(let v=0;v<w;v++)if(M===o[v]){a.push(M),d.splice(g,1),o.splice(v,1),g--;break}}}return{emoji:e,emojiAdded:t,emojiKept:s,emojiRemoved:i,customEmoji:r,customEmojiAdded:o,customEmojiKept:a,customEmojiRemoved:d,paid:c,paidAdded:l}}has(e){return n.has.filterQuery(e)(this)}hasText(e){return n.has.text(e)(this)}hasCommand(e){return n.has.command(e)(this)}hasReaction(e){return n.has.reaction(e)(this)}hasChatType(e){return n.has.chatType(e)(this)}hasCallbackQuery(e){return n.has.callbackQuery(e)(this)}hasGameQuery(e){return n.has.gameQuery(e)(this)}hasInlineQuery(e){return n.has.inlineQuery(e)(this)}hasChosenInlineResult(e){return n.has.chosenInlineResult(e)(this)}hasPreCheckoutQuery(e){return n.has.preCheckoutQuery(e)(this)}hasShippingQuery(e){return n.has.shippingQuery(e)(this)}reply(e,t,s){var i;let r=this.msg;return this.api.sendMessage(u(this.chatId,"sendMessage"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithDraft(e,t,s){let i=this.msg;return this.api.sendMessageDraft(u(this.chatId,"sendMessageDraft"),this.update.update_id,e,{...i?.is_topic_message?{message_thread_id:i?.message_thread_id}:{},...t},s)}forwardMessage(e,t,s){var i;let r=this.msg;return this.api.forwardMessage(e,u(this.chatId,"forwardMessage"),u(this.msgId,"forwardMessage"),{direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}forwardMessages(e,t,s,i){var r;let o=this.msg;return this.api.forwardMessages(e,u(this.chatId,"forwardMessages"),t,{direct_messages_topic_id:(r=o?.direct_messages_topic)===null||r===void 0?void 0:r.topic_id,...s},i)}copyMessage(e,t,s){var i;let r=this.msg;return this.api.copyMessage(e,u(this.chatId,"copyMessage"),u(this.msgId,"copyMessage"),{direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}copyMessages(e,t,s,i){var r;let o=this.msg;return this.api.copyMessages(e,u(this.chatId,"copyMessages"),t,{direct_messages_topic_id:(r=o?.direct_messages_topic)===null||r===void 0?void 0:r.topic_id,...s},i)}replyWithPhoto(e,t,s){var i;let r=this.msg;return this.api.sendPhoto(u(this.chatId,"sendPhoto"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithAudio(e,t,s){var i;let r=this.msg;return this.api.sendAudio(u(this.chatId,"sendAudio"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithDocument(e,t,s){var i;let r=this.msg;return this.api.sendDocument(u(this.chatId,"sendDocument"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithVideo(e,t,s){var i;let r=this.msg;return this.api.sendVideo(u(this.chatId,"sendVideo"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithAnimation(e,t,s){var i;let r=this.msg;return this.api.sendAnimation(u(this.chatId,"sendAnimation"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithVoice(e,t,s){var i;let r=this.msg;return this.api.sendVoice(u(this.chatId,"sendVoice"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithVideoNote(e,t,s){var i;let r=this.msg;return this.api.sendVideoNote(u(this.chatId,"sendVideoNote"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithMediaGroup(e,t,s){var i;let r=this.msg;return this.api.sendMediaGroup(u(this.chatId,"sendMediaGroup"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithLocation(e,t,s,i){var r;let o=this.msg;return this.api.sendLocation(u(this.chatId,"sendLocation"),e,t,{business_connection_id:this.businessConnectionId,...o?.is_topic_message?{message_thread_id:o.message_thread_id}:{},direct_messages_topic_id:(r=o?.direct_messages_topic)===null||r===void 0?void 0:r.topic_id,...s},i)}editMessageLiveLocation(e,t,s,i){let r=this.inlineMessageId;return r!==void 0?this.api.editMessageLiveLocationInline(r,e,t,{business_connection_id:this.businessConnectionId,...s},i):this.api.editMessageLiveLocation(u(this.chatId,"editMessageLiveLocation"),u(this.msgId,"editMessageLiveLocation"),e,t,{business_connection_id:this.businessConnectionId,...s},i)}stopMessageLiveLocation(e,t){let s=this.inlineMessageId;return s!==void 0?this.api.stopMessageLiveLocationInline(s,{business_connection_id:this.businessConnectionId,...e},t):this.api.stopMessageLiveLocation(u(this.chatId,"stopMessageLiveLocation"),u(this.msgId,"stopMessageLiveLocation"),{business_connection_id:this.businessConnectionId,...e},t)}sendPaidMedia(e,t,s,i){var r,o;let a=this.msg;return this.api.sendPaidMedia(u(this.chatId,"sendPaidMedia"),e,t,{business_connection_id:this.businessConnectionId,...a?.is_topic_message?{message_thread_id:a.message_thread_id}:{},direct_messages_topic_id:(o=(r=this.msg)===null||r===void 0?void 0:r.direct_messages_topic)===null||o===void 0?void 0:o.topic_id,...s},i)}replyWithVenue(e,t,s,i,r,o){var a;let d=this.msg;return this.api.sendVenue(u(this.chatId,"sendVenue"),e,t,s,i,{business_connection_id:this.businessConnectionId,...d?.is_topic_message?{message_thread_id:d.message_thread_id}:{},direct_messages_topic_id:(a=d?.direct_messages_topic)===null||a===void 0?void 0:a.topic_id,...r},o)}replyWithContact(e,t,s,i){var r;let o=this.msg;return this.api.sendContact(u(this.chatId,"sendContact"),e,t,{business_connection_id:this.businessConnectionId,...o?.is_topic_message?{message_thread_id:o.message_thread_id}:{},direct_messages_topic_id:(r=o?.direct_messages_topic)===null||r===void 0?void 0:r.topic_id,...s},i)}replyWithPoll(e,t,s,i){let r=this.msg;return this.api.sendPoll(u(this.chatId,"sendPoll"),e,t,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},...s},i)}replyWithChecklist(e,t,s){return this.api.sendChecklist(u(this.businessConnectionId,"sendChecklist"),u(this.chatId,"sendChecklist"),e,t,s)}editMessageChecklist(e,t,s){var i,r,o,a;let d=u(this.msg,"editMessageChecklist"),c=(a=(r=(i=d.checklist_tasks_done)===null||i===void 0?void 0:i.checklist_message)!==null&&r!==void 0?r:(o=d.checklist_tasks_added)===null||o===void 0?void 0:o.checklist_message)!==null&&a!==void 0?a:d;return this.api.editMessageChecklist(u(this.businessConnectionId,"editMessageChecklist"),u(c.chat.id,"editMessageChecklist"),u(c.message_id,"editMessageChecklist"),e,t,s)}replyWithDice(e,t,s){var i;let r=this.msg;return this.api.sendDice(u(this.chatId,"sendDice"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithChatAction(e,t,s){let i=this.msg;return this.api.sendChatAction(u(this.chatId,"sendChatAction"),e,{business_connection_id:this.businessConnectionId,message_thread_id:i?.message_thread_id,...t},s)}react(e,t,s){return this.api.setMessageReaction(u(this.chatId,"setMessageReaction"),u(this.msgId,"setMessageReaction"),typeof e=="string"?[{type:"emoji",emoji:e}]:(Array.isArray(e)?e:[e]).map(i=>typeof i=="string"?{type:"emoji",emoji:i}:i),t,s)}getUserProfilePhotos(e,t){return this.api.getUserProfilePhotos(u(this.from,"getUserProfilePhotos").id,e,t)}getUserProfileAudios(e,t){return this.api.getUserProfileAudios(u(this.from,"getUserProfileAudios").id,e,t)}setUserEmojiStatus(e,t){return this.api.setUserEmojiStatus(u(this.from,"setUserEmojiStatus").id,e,t)}getUserChatBoosts(e,t){return this.api.getUserChatBoosts(e??u(this.chatId,"getUserChatBoosts"),u(this.from,"getUserChatBoosts").id,t)}getUserGifts(e,t){return this.api.getUserGifts(u(this.from,"getUserGifts").id,e,t)}getChatGifts(e,t){return this.api.getChatGifts(u(this.chatId,"getChatGifts"),e,t)}getBusinessConnection(e){return this.api.getBusinessConnection(u(this.businessConnectionId,"getBusinessConnection"),e)}getFile(e){var t,s,i,r,o,a;let d=u(this.msg,"getFile"),c=d.photo!==void 0?d.photo[d.photo.length-1]:(a=(o=(r=(i=(s=(t=d.animation)!==null&&t!==void 0?t:d.audio)!==null&&s!==void 0?s:d.document)!==null&&i!==void 0?i:d.video)!==null&&r!==void 0?r:d.video_note)!==null&&o!==void 0?o:d.voice)!==null&&a!==void 0?a:d.sticker;return this.api.getFile(u(c,"getFile").file_id,e)}kickAuthor(...e){return this.banAuthor(...e)}banAuthor(e,t){return this.api.banChatMember(u(this.chatId,"banAuthor"),u(this.from,"banAuthor").id,e,t)}kickChatMember(...e){return this.banChatMember(...e)}banChatMember(e,t,s){return this.api.banChatMember(u(this.chatId,"banChatMember"),e,t,s)}unbanChatMember(e,t,s){return this.api.unbanChatMember(u(this.chatId,"unbanChatMember"),e,t,s)}restrictAuthor(e,t,s){return this.api.restrictChatMember(u(this.chatId,"restrictAuthor"),u(this.from,"restrictAuthor").id,e,t,s)}restrictChatMember(e,t,s,i){return this.api.restrictChatMember(u(this.chatId,"restrictChatMember"),e,t,s,i)}promoteAuthor(e,t){return this.api.promoteChatMember(u(this.chatId,"promoteAuthor"),u(this.from,"promoteAuthor").id,e,t)}promoteChatMember(e,t,s){return this.api.promoteChatMember(u(this.chatId,"promoteChatMember"),e,t,s)}setChatAdministratorAuthorCustomTitle(e,t){return this.api.setChatAdministratorCustomTitle(u(this.chatId,"setChatAdministratorAuthorCustomTitle"),u(this.from,"setChatAdministratorAuthorCustomTitle").id,e,t)}setChatAdministratorCustomTitle(e,t,s){return this.api.setChatAdministratorCustomTitle(u(this.chatId,"setChatAdministratorCustomTitle"),e,t,s)}setAuthorTag(e,t){return this.api.setChatMemberTag(u(this.chatId,"setChatMemberTag"),u(this.from,"setChatMemberTag").id,e,t)}setChatMemberTag(e,t,s){return this.api.setChatMemberTag(u(this.chatId,"setChatMemberTag"),e,t,s)}banChatSenderChat(e,t){return this.api.banChatSenderChat(u(this.chatId,"banChatSenderChat"),e,t)}unbanChatSenderChat(e,t){return this.api.unbanChatSenderChat(u(this.chatId,"unbanChatSenderChat"),e,t)}setChatPermissions(e,t,s){return this.api.setChatPermissions(u(this.chatId,"setChatPermissions"),e,t,s)}exportChatInviteLink(e){return this.api.exportChatInviteLink(u(this.chatId,"exportChatInviteLink"),e)}createChatInviteLink(e,t){return this.api.createChatInviteLink(u(this.chatId,"createChatInviteLink"),e,t)}editChatInviteLink(e,t,s){return this.api.editChatInviteLink(u(this.chatId,"editChatInviteLink"),e,t,s)}createChatSubscriptionInviteLink(e,t,s,i){return this.api.createChatSubscriptionInviteLink(u(this.chatId,"createChatSubscriptionInviteLink"),e,t,s,i)}editChatSubscriptionInviteLink(e,t,s){return this.api.editChatSubscriptionInviteLink(u(this.chatId,"editChatSubscriptionInviteLink"),e,t,s)}revokeChatInviteLink(e,t){return this.api.revokeChatInviteLink(u(this.chatId,"editChatInviteLink"),e,t)}approveChatJoinRequest(e,t){return this.api.approveChatJoinRequest(u(this.chatId,"approveChatJoinRequest"),e,t)}declineChatJoinRequest(e,t){return this.api.declineChatJoinRequest(u(this.chatId,"declineChatJoinRequest"),e,t)}approveSuggestedPost(e,t){return this.api.approveSuggestedPost(u(this.chatId,"approveSuggestedPost"),u(this.msgId,"approveSuggestedPost"),e,t)}declineSuggestedPost(e,t){return this.api.declineSuggestedPost(u(this.chatId,"declineSuggestedPost"),u(this.msgId,"declineSuggestedPost"),e,t)}setChatPhoto(e,t){return this.api.setChatPhoto(u(this.chatId,"setChatPhoto"),e,t)}deleteChatPhoto(e){return this.api.deleteChatPhoto(u(this.chatId,"deleteChatPhoto"),e)}setChatTitle(e,t){return this.api.setChatTitle(u(this.chatId,"setChatTitle"),e,t)}setChatDescription(e,t){return this.api.setChatDescription(u(this.chatId,"setChatDescription"),e,t)}pinChatMessage(e,t,s){return this.api.pinChatMessage(u(this.chatId,"pinChatMessage"),e,{business_connection_id:this.businessConnectionId,...t},s)}unpinChatMessage(e,t,s){return this.api.unpinChatMessage(u(this.chatId,"unpinChatMessage"),e,{business_connection_id:this.businessConnectionId,...t},s)}unpinAllChatMessages(e){return this.api.unpinAllChatMessages(u(this.chatId,"unpinAllChatMessages"),e)}leaveChat(e){return this.api.leaveChat(u(this.chatId,"leaveChat"),e)}getChat(e){return this.api.getChat(u(this.chatId,"getChat"),e)}getChatAdministrators(e){return this.api.getChatAdministrators(u(this.chatId,"getChatAdministrators"),e)}getChatMembersCount(...e){return this.getChatMemberCount(...e)}getChatMemberCount(e){return this.api.getChatMemberCount(u(this.chatId,"getChatMemberCount"),e)}getAuthor(e){return this.api.getChatMember(u(this.chatId,"getAuthor"),u(this.from,"getAuthor").id,e)}getChatMember(e,t){return this.api.getChatMember(u(this.chatId,"getChatMember"),e,t)}setChatStickerSet(e,t){return this.api.setChatStickerSet(u(this.chatId,"setChatStickerSet"),e,t)}deleteChatStickerSet(e){return this.api.deleteChatStickerSet(u(this.chatId,"deleteChatStickerSet"),e)}createForumTopic(e,t,s){return this.api.createForumTopic(u(this.chatId,"createForumTopic"),e,t,s)}editForumTopic(e,t){let s=u(this.msg,"editForumTopic"),i=u(s.message_thread_id,"editForumTopic");return this.api.editForumTopic(s.chat.id,i,e,t)}closeForumTopic(e){let t=u(this.msg,"closeForumTopic"),s=u(t.message_thread_id,"closeForumTopic");return this.api.closeForumTopic(t.chat.id,s,e)}reopenForumTopic(e){let t=u(this.msg,"reopenForumTopic"),s=u(t.message_thread_id,"reopenForumTopic");return this.api.reopenForumTopic(t.chat.id,s,e)}deleteForumTopic(e){let t=u(this.msg,"deleteForumTopic"),s=u(t.message_thread_id,"deleteForumTopic");return this.api.deleteForumTopic(t.chat.id,s,e)}unpinAllForumTopicMessages(e){let t=u(this.msg,"unpinAllForumTopicMessages"),s=u(t.message_thread_id,"unpinAllForumTopicMessages");return this.api.unpinAllForumTopicMessages(t.chat.id,s,e)}editGeneralForumTopic(e,t){return this.api.editGeneralForumTopic(u(this.chatId,"editGeneralForumTopic"),e,t)}closeGeneralForumTopic(e){return this.api.closeGeneralForumTopic(u(this.chatId,"closeGeneralForumTopic"),e)}reopenGeneralForumTopic(e){return this.api.reopenGeneralForumTopic(u(this.chatId,"reopenGeneralForumTopic"),e)}hideGeneralForumTopic(e){return this.api.hideGeneralForumTopic(u(this.chatId,"hideGeneralForumTopic"),e)}unhideGeneralForumTopic(e){return this.api.unhideGeneralForumTopic(u(this.chatId,"unhideGeneralForumTopic"),e)}unpinAllGeneralForumTopicMessages(e){return this.api.unpinAllGeneralForumTopicMessages(u(this.chatId,"unpinAllGeneralForumTopicMessages"),e)}answerCallbackQuery(e,t){return this.api.answerCallbackQuery(u(this.callbackQuery,"answerCallbackQuery").id,typeof e=="string"?{text:e}:e,t)}setChatMenuButton(e,t){return this.api.setChatMenuButton(e,t)}getChatMenuButton(e,t){return this.api.getChatMenuButton(e,t)}setMyDefaultAdministratorRights(e,t){return this.api.setMyDefaultAdministratorRights(e,t)}getMyDefaultAdministratorRights(e,t){return this.api.getMyDefaultAdministratorRights(e,t)}editMessageText(e,t,s){var i,r,o,a,d;let c=this.inlineMessageId;return c!==void 0?this.api.editMessageTextInline(c,e,{business_connection_id:this.businessConnectionId,...t},s):this.api.editMessageText(u(this.chatId,"editMessageText"),u((a=(r=(i=this.msg)===null||i===void 0?void 0:i.message_id)!==null&&r!==void 0?r:(o=this.messageReaction)===null||o===void 0?void 0:o.message_id)!==null&&a!==void 0?a:(d=this.messageReactionCount)===null||d===void 0?void 0:d.message_id,"editMessageText"),e,{business_connection_id:this.businessConnectionId,...t},s)}editMessageCaption(e,t){var s,i,r,o,a;let d=this.inlineMessageId;return d!==void 0?this.api.editMessageCaptionInline(d,{business_connection_id:this.businessConnectionId,...e},t):this.api.editMessageCaption(u(this.chatId,"editMessageCaption"),u((o=(i=(s=this.msg)===null||s===void 0?void 0:s.message_id)!==null&&i!==void 0?i:(r=this.messageReaction)===null||r===void 0?void 0:r.message_id)!==null&&o!==void 0?o:(a=this.messageReactionCount)===null||a===void 0?void 0:a.message_id,"editMessageCaption"),{business_connection_id:this.businessConnectionId,...e},t)}editMessageMedia(e,t,s){var i,r,o,a,d;let c=this.inlineMessageId;return c!==void 0?this.api.editMessageMediaInline(c,e,{business_connection_id:this.businessConnectionId,...t},s):this.api.editMessageMedia(u(this.chatId,"editMessageMedia"),u((a=(r=(i=this.msg)===null||i===void 0?void 0:i.message_id)!==null&&r!==void 0?r:(o=this.messageReaction)===null||o===void 0?void 0:o.message_id)!==null&&a!==void 0?a:(d=this.messageReactionCount)===null||d===void 0?void 0:d.message_id,"editMessageMedia"),e,{business_connection_id:this.businessConnectionId,...t},s)}editMessageReplyMarkup(e,t){var s,i,r,o,a;let d=this.inlineMessageId;return d!==void 0?this.api.editMessageReplyMarkupInline(d,{business_connection_id:this.businessConnectionId,...e},t):this.api.editMessageReplyMarkup(u(this.chatId,"editMessageReplyMarkup"),u((o=(i=(s=this.msg)===null||s===void 0?void 0:s.message_id)!==null&&i!==void 0?i:(r=this.messageReaction)===null||r===void 0?void 0:r.message_id)!==null&&o!==void 0?o:(a=this.messageReactionCount)===null||a===void 0?void 0:a.message_id,"editMessageReplyMarkup"),{business_connection_id:this.businessConnectionId,...e},t)}stopPoll(e,t){var s,i,r,o,a;return this.api.stopPoll(u(this.chatId,"stopPoll"),u((o=(i=(s=this.msg)===null||s===void 0?void 0:s.message_id)!==null&&i!==void 0?i:(r=this.messageReaction)===null||r===void 0?void 0:r.message_id)!==null&&o!==void 0?o:(a=this.messageReactionCount)===null||a===void 0?void 0:a.message_id,"stopPoll"),{business_connection_id:this.businessConnectionId,...e},t)}deleteMessage(e){var t,s,i,r,o;return this.api.deleteMessage(u(this.chatId,"deleteMessage"),u((r=(s=(t=this.msg)===null||t===void 0?void 0:t.message_id)!==null&&s!==void 0?s:(i=this.messageReaction)===null||i===void 0?void 0:i.message_id)!==null&&r!==void 0?r:(o=this.messageReactionCount)===null||o===void 0?void 0:o.message_id,"deleteMessage"),e)}deleteMessages(e,t){return this.api.deleteMessages(u(this.chatId,"deleteMessages"),e,t)}deleteBusinessMessages(e,t){return this.api.deleteBusinessMessages(u(this.businessConnectionId,"deleteBusinessMessages"),e,t)}setBusinessAccountName(e,t,s){return this.api.setBusinessAccountName(u(this.businessConnectionId,"setBusinessAccountName"),e,t,s)}setBusinessAccountUsername(e,t){return this.api.setBusinessAccountUsername(u(this.businessConnectionId,"setBusinessAccountUsername"),e,t)}setBusinessAccountBio(e,t){return this.api.setBusinessAccountBio(u(this.businessConnectionId,"setBusinessAccountBio"),e,t)}setBusinessAccountProfilePhoto(e,t,s){return this.api.setBusinessAccountProfilePhoto(u(this.businessConnectionId,"setBusinessAccountProfilePhoto"),e,t,s)}removeBusinessAccountProfilePhoto(e,t){return this.api.removeBusinessAccountProfilePhoto(u(this.businessConnectionId,"removeBusinessAccountProfilePhoto"),e,t)}setBusinessAccountGiftSettings(e,t,s){return this.api.setBusinessAccountGiftSettings(u(this.businessConnectionId,"setBusinessAccountGiftSettings"),e,t,s)}getBusinessAccountStarBalance(e){return this.api.getBusinessAccountStarBalance(u(this.businessConnectionId,"getBusinessAccountStarBalance"),e)}transferBusinessAccountStars(e,t){return this.api.transferBusinessAccountStars(u(this.businessConnectionId,"transferBusinessAccountStars"),e,t)}getBusinessAccountGifts(e,t){return this.api.getBusinessAccountGifts(u(this.businessConnectionId,"getBusinessAccountGifts"),e,t)}convertGiftToStars(e,t){return this.api.convertGiftToStars(u(this.businessConnectionId,"convertGiftToStars"),e,t)}upgradeGift(e,t,s){return this.api.upgradeGift(u(this.businessConnectionId,"upgradeGift"),e,t,s)}transferGift(e,t,s,i){return this.api.transferGift(u(this.businessConnectionId,"transferGift"),e,t,s,i)}postStory(e,t,s,i){return this.api.postStory(u(this.businessConnectionId,"postStory"),e,t,s,i)}repostStory(e,t,s){var i;let r=u((i=this.msg)===null||i===void 0?void 0:i.story,"repostStory");return this.api.repostStory(u(this.businessConnectionId,"repostStory"),r.chat.id,r.id,e,t,s)}editStory(e,t,s,i){return this.api.editStory(u(this.businessConnectionId,"editStory"),e,t,s,i)}deleteStory(e,t){return this.api.deleteStory(u(this.businessConnectionId,"deleteStory"),e,t)}replyWithSticker(e,t,s){var i;let r=this.msg;return this.api.sendSticker(u(this.chatId,"sendSticker"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}getCustomEmojiStickers(e){var t,s;return this.api.getCustomEmojiStickers(((s=(t=this.msg)===null||t===void 0?void 0:t.entities)!==null&&s!==void 0?s:[]).filter(i=>i.type==="custom_emoji").map(i=>i.custom_emoji_id),e)}replyWithGift(e,t,s){return this.api.sendGift(u(this.from,"sendGift").id,e,t,s)}giftPremiumSubscription(e,t,s,i){return this.api.giftPremiumSubscription(u(this.from,"giftPremiumSubscription").id,e,t,s,i)}replyWithGiftToChannel(e,t,s){return this.api.sendGiftToChannel(u(this.chat,"sendGift").id,e,t,s)}answerInlineQuery(e,t,s){return this.api.answerInlineQuery(u(this.inlineQuery,"answerInlineQuery").id,e,t,s)}savePreparedInlineMessage(e,t,s){return this.api.savePreparedInlineMessage(u(this.from,"savePreparedInlineMessage").id,e,t,s)}replyWithInvoice(e,t,s,i,r,o,a){var d;let c=this.msg;return this.api.sendInvoice(u(this.chatId,"sendInvoice"),e,t,s,i,r,{...c?.is_topic_message?{message_thread_id:c.message_thread_id}:{},direct_messages_topic_id:(d=c?.direct_messages_topic)===null||d===void 0?void 0:d.topic_id,...o},a)}answerShippingQuery(e,t,s){return this.api.answerShippingQuery(u(this.shippingQuery,"answerShippingQuery").id,e,t,s)}answerPreCheckoutQuery(e,t,s){return this.api.answerPreCheckoutQuery(u(this.preCheckoutQuery,"answerPreCheckoutQuery").id,e,typeof t=="string"?{error_message:t}:t,s)}refundStarPayment(e){var t;return this.api.refundStarPayment(u(this.from,"refundStarPayment").id,u((t=this.msg)===null||t===void 0?void 0:t.successful_payment,"refundStarPayment").telegram_payment_charge_id,e)}editUserStarSubscription(e,t,s){return this.api.editUserStarSubscription(u(this.from,"editUserStarSubscription").id,e,t,s)}verifyUser(e,t){return this.api.verifyUser(u(this.from,"verifyUser").id,e,t)}verifyChat(e,t){return this.api.verifyChat(u(this.chatId,"verifyChat"),e,t)}removeUserVerification(e){return this.api.removeUserVerification(u(this.from,"removeUserVerification").id,e)}removeChatVerification(e){return this.api.removeChatVerification(u(this.chatId,"removeChatVerification"),e)}readBusinessMessage(e){return this.api.readBusinessMessage(u(this.businessConnectionId,"readBusinessMessage"),u(this.chatId,"readBusinessMessage"),u(this.msgId,"readBusinessMessage"),e)}setPassportDataErrors(e,t){return this.api.setPassportDataErrors(u(this.from,"setPassportDataErrors").id,e,t)}replyWithGame(e,t,s){let i=this.msg;return this.api.sendGame(u(this.chatId,"sendGame"),e,{business_connection_id:this.businessConnectionId,...i?.is_topic_message?{message_thread_id:i.message_thread_id}:{},...t},s)}};ue.Context=oe;oe.has=S;function u(n,e){if(n===void 0)throw new Error(`Missing information for API call to ${e}`);return n}function $(n){return ae(n).map(e=>typeof e=="string"?t=>t===e?e:null:t=>t.match(e))}function L(n,e,t){for(let s of t){let i=s(e);if(i)return n.match=i,!0}return!1}function ae(n){return Array.isArray(n)?n:[n]}});var Re=y(q=>{"use strict";h();Object.defineProperty(q,"__esModule",{value:!0});q.Composer=q.BotError=void 0;q.run=bt;var I=de(),ce=class extends Error{constructor(e,t){super(qs(e)),this.error=e,this.ctx=t,this.name="BotError",e instanceof Error&&(this.stack=e.stack)}};q.BotError=ce;function qs(n){let e;if(n instanceof Error)e=`${n.name} in middleware: ${n.message}`;else{let t=typeof n;switch(e=`Non-error value of type ${t} thrown in middleware`,t){case"bigint":case"boolean":case"number":case"symbol":e+=`: ${n}`;break;case"string":e+=`: ${String(n).substring(0,50)}`;break;default:e+="!";break}}return e}function V(n){return typeof n=="function"?n:(e,t)=>n.middleware()(e,t)}function vt(n,e){return async(t,s)=>{let i=!1;await n(t,async()=>{if(i)throw new Error("`next` already called before!");i=!0,await e(t,s)})}}function Ee(n,e){return e()}var Us=()=>Promise.resolve();async function bt(n,e){await n(e,Us)}var je=class n{constructor(...e){this.handler=e.length===0?Ee:e.map(V).reduce(vt)}middleware(){return this.handler}use(...e){let t=new n(...e);return this.handler=vt(this.handler,V(t)),t}on(e,...t){return this.filter(I.Context.has.filterQuery(e),...t)}hears(e,...t){return this.filter(I.Context.has.text(e),...t)}command(e,...t){return this.filter(I.Context.has.command(e),...t)}reaction(e,...t){return this.filter(I.Context.has.reaction(e),...t)}chatType(e,...t){return this.filter(I.Context.has.chatType(e),...t)}callbackQuery(e,...t){return this.filter(I.Context.has.callbackQuery(e),...t)}gameQuery(e,...t){return this.filter(I.Context.has.gameQuery(e),...t)}inlineQuery(e,...t){return this.filter(I.Context.has.inlineQuery(e),...t)}chosenInlineResult(e,...t){return this.filter(I.Context.has.chosenInlineResult(e),...t)}preCheckoutQuery(e,...t){return this.filter(I.Context.has.preCheckoutQuery(e),...t)}shippingQuery(e,...t){return this.filter(I.Context.has.shippingQuery(e),...t)}filter(e,...t){let s=new n(...t);return this.branch(e,s,Ee),s}drop(e,...t){return this.filter(async s=>!await e(s),...t)}fork(...e){let t=new n(...e),s=V(t);return this.use((i,r)=>Promise.all([r(),bt(s,i)])),t}lazy(e){return this.use(async(t,s)=>{let i=await e(t),r=Array.isArray(i)?i:[i];await V(new n(...r))(t,s)})}route(e,t,s=Ee){return this.lazy(async i=>{var r;let o=await e(i);return(r=o===void 0||!t[o]?s:t[o])!==null&&r!==void 0?r:[]})}branch(e,t,s){return this.lazy(async i=>await e(i)?t:s)}errorBoundary(e,...t){let s=new n(...t),i=V(s);return this.use(async(r,o)=>{let a=!1,d=()=>(a=!0,Promise.resolve());try{await i(r,d)}catch(c){a=!1,await e(new ce(c,r),d)}a&&await o()}),s}};q.Composer=je});var j=y(A=>{"use strict";h();Object.defineProperty(A,"__esModule",{value:!0});A.defaultAdapter=A.itrToStream=A.debug=void 0;A.baseFetchConfig=zs;var Gs=K("http"),Os=K("https"),Ds=K("stream"),Qs=ws();Object.defineProperty(A,"debug",{enumerable:!0,get:function(){return Qs.debug}});var Ns=n=>Ds.Readable.from(n,{objectMode:!1});A.itrToStream=Ns;var xs=new Map,Ws=new Map;function wt(n,e,t){let s=n.get(e);return s===void 0&&(s=t(),n.set(e,s)),s}function zs(n){return n.startsWith("https:")?{compress:!0,agent:wt(Ws,n,()=>new Os.Agent({keepAlive:!0}))}:n.startsWith("http:")?{agent:wt(xs,n,()=>new Gs.Agent({keepAlive:!0}))}:{}}A.defaultAdapter="express"});var pe=y(R=>{"use strict";h();Object.defineProperty(R,"__esModule",{value:!0});R.HttpError=R.GrammyError=void 0;R.toGrammyError=Ks;R.toHttpError=Vs;var Hs=j(),Ct=(0,Hs.debug)("grammy:warn"),le=class extends Error{constructor(e,t,s,i){var r;super(`${e} (${t.error_code}: ${t.description})`),this.method=s,this.payload=i,this.ok=!1,this.name="GrammyError",this.error_code=t.error_code,this.description=t.description,this.parameters=(r=t.parameters)!==null&&r!==void 0?r:{}}};R.GrammyError=le;function Ks(n,e,t){switch(n.error_code){case 401:Ct("Error 401 means that your bot token is wrong, talk to https://t.me/BotFather to check it.");break;case 409:Ct("Error 409 means that you are running your bot several times on long polling. Consider revoking the bot token if you believe that no other instance is running.");break}return new le(`Call to '${e}' failed!`,n,e,t)}var he=class extends Error{constructor(e,t){super(e),this.error=t,this.name="HttpError"}};R.HttpError=he;function Ys(n){return typeof n=="object"&&n!==null&&"status"in n&&"statusText"in n}function Vs(n,e,t){let s=`Network request for '${n}' failed!`;return Ys(t)&&(s+=` (${t.status}: ${t.statusText})`),e&&t instanceof Error&&(s+=` ${t.message}`),new he(s,t)}});var Mt=y(()=>{h()});var kt=y(T=>{"use strict";h();var Js=T&&T.__createBinding||(Object.create?function(n,e,t,s){s===void 0&&(s=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,s,i)}:function(n,e,t,s){s===void 0&&(s=t),n[s]=e[t]}),Xs=T&&T.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Js(e,n,t)};Object.defineProperty(T,"__esModule",{value:!0});T.InputFile=void 0;var It=K("fs"),Zs=rt(),ge=K("path"),ei=j(),ti=(0,ei.debug)("grammy:warn");Xs(Mt(),T);var Be=class n{constructor(e,t){this.consumed=!1,this.fileData=e,t??(t=this.guessFilename(e)),this.filename=t,typeof e=="string"&&(e.startsWith("http:")||e.startsWith("https:"))&&ti(`InputFile received the local file path '${e}' that looks like a URL. Is this a mistake?`)}guessFilename(e){if(typeof e=="string")return(0,ge.basename)(e);if("url"in e)return(0,ge.basename)(e.url);if(e instanceof URL){if(e.pathname!=="/"){let t=(0,ge.basename)(e.pathname);if(t)return t}return(0,ge.basename)(e.hostname)}}async toRaw(){if(this.consumed)throw new Error("Cannot reuse InputFile data source!");let e=this.fileData;return typeof e=="string"?(0,It.createReadStream)(e):e instanceof URL?e.protocol==="file"?(0,It.createReadStream)(e.pathname):St(e):"url"in e?St(e.url):e instanceof Uint8Array?e:typeof e=="function"?new n(await e()).toRaw():(this.consumed=!0,e)}toJSON(){throw new Error("InputFile instances must be sent via grammY")}};T.InputFile=Be;async function*St(n){let{body:e}=await(0,Zs.default)(n);for await(let t of e){if(typeof t=="string")throw new Error(`Could not transfer file, received string data instead of bytes from '${n}'`);yield t}}});var Fe=y(U=>{"use strict";h();var si=U&&U.__createBinding||(Object.create?function(n,e,t,s){s===void 0&&(s=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,s,i)}:function(n,e,t,s){s===void 0&&(s=t),n[s]=e[t]}),ii=U&&U.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&si(e,n,t)};Object.defineProperty(U,"__esModule",{value:!0});ii(kt(),U)});var Pt=y(X=>{"use strict";h();Object.defineProperty(X,"__esModule",{value:!0});X.requiresFormDataUpload=$e;X.createJsonPayload=ri;X.createFormDataPayload=ai;var ni=j(),me=Fe();function $e(n){return n instanceof me.InputFile||typeof n=="object"&&n!==null&&Object.values(n).some(e=>Array.isArray(e)?e.some($e):e instanceof me.InputFile||$e(e))}function At(n){return JSON.stringify(n,(e,t)=>t??void 0)}function ri(n){return{method:"POST",headers:{"content-type":"application/json",connection:"keep-alive"},body:At(n)}}async function*oi(n,e){try{yield*n}catch(t){e(t)}}function ai(n,e){let t=ui(),s=di(n,t),i=oi(s,e),r=(0,ni.itrToStream)(i);return{method:"POST",headers:{"content-type":`multipart/form-data; boundary=${t}`,connection:"keep-alive"},body:r}}function ui(){return"----------"+Tt(32)}function Tt(n=16){return Array.from(Array(n)).map(()=>Math.random().toString(36)[2]||0).join("")}var J=new TextEncoder;async function*di(n,e){let t=Le(n);yield J.encode(`--${e}\r
|
|
3
|
+
import{a as rt,b as Ms}from"./chunk-QN6Y6NPA.js";import{f as ot}from"./chunk-EQGA7LH7.js";import"./chunk-T2T2UEPY.js";import"./chunk-M53RP3YP.js";import{a as Cs}from"./chunk-OOEH6ZSV.js";import{a as ws}from"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import{b as h}from"./chunk-GZPNIYVZ.js";import{a as K,d as y,f as nt}from"./chunk-OWGSC52X.js";var re=y(Y=>{"use strict";h();Object.defineProperty(Y,"__esModule",{value:!0});Y.matchFilter=Is;Y.parse=ft;Y.preprocess=_t;var at=new Map;function Is(n){var e;let t=Array.isArray(n)?n:[n],s=t.join(","),i=(e=at.get(s))!==null&&e!==void 0?e:(()=>{let r=ft(t),o=Ss(r);return at.set(s,o),o})();return r=>i(r)}function ft(n){return Array.isArray(n)?n.map(e=>e.split(":")):[n.split(":")]}function Ss(n){let e=n.flatMap(i=>ks(i,_t(i))),t=Ts(e),s=Ps(t);return i=>!!s(i.update,i)}function _t(n){let e=ne,t=[n].flatMap(s=>{let[i,r,o]=s;if(!(i in mt))return[s];if(!i&&!r&&!o)return[s];let d=mt[i].map(c=>[c,r,o]);return r===void 0||r in Ae&&(r||o)?d:d.filter(([c])=>{var l;return!!(!((l=e[c])===null||l===void 0)&&l[r])})}).flatMap(s=>{let[i,r,o]=s;if(!(r in Ae))return[s];if(!r&&!o)return[s];let d=Ae[r].map(c=>[i,c,o]);return o===void 0?d:d.filter(([,c])=>{var l,p;return!!(!((p=(l=e[i])===null||l===void 0?void 0:l[c])===null||p===void 0)&&p[o])})});if(t.length===0)throw new Error(`Shortcuts in '${n.join(":")}' do not expand to any valid filter query`);return t}function ks(n,e){if(e.length===0)throw new Error("Empty filter query given");let t=e.map(As).filter(s=>s!==!0);if(t.length===0)return e;throw t.length===1?new Error(t[0]):new Error(`Invalid filter query '${n.join(":")}'. There are ${t.length} errors after expanding the contained shortcuts: ${t.join("; ")}`)}function As(n){let[e,t,s,...i]=n;if(e===void 0)return"Empty filter query given";if(!(e in ne)){let a=Object.keys(ne);return`Invalid L1 filter '${e}' given in '${n.join(":")}'. Permitted values are: ${a.map(d=>`'${d}'`).join(", ")}.`}if(t===void 0)return!0;let r=ne[e];if(!(t in r)){let a=Object.keys(r);return`Invalid L2 filter '${t}' given in '${n.join(":")}'. Permitted values are: ${a.map(d=>`'${d}'`).join(", ")}.`}if(s===void 0)return!0;let o=r[t];if(!(s in o)){let a=Object.keys(o);return`Invalid L3 filter '${s}' given in '${n.join(":")}'. ${a.length===0?`No further filtering is possible after '${e}:${t}'.`:`Permitted values are: ${a.map(d=>`'${d}'`).join(", ")}.`}`}return i.length===0?!0:`Cannot filter further than three levels, ':${i.join(":")}' is invalid!`}function Ts(n){var e,t;let s={};for(let[i,r,o]of n){let a=(e=s[i])!==null&&e!==void 0?e:s[i]={};if(r!==void 0){let d=(t=a[r])!==null&&t!==void 0?t:a[r]=new Set;o!==void 0&&d.add(o)}}return s}function ke(n,e){return(t,s)=>n(t,s)||e(t,s)}function ut(n,e){return(t,s)=>{let i=n(t,s);return i&&e(i,s)}}function dt(n){return(e,t)=>n(e,t)!=null}function Ps(n){let e=Object.entries(n).map(([t,s])=>{let i=o=>o[t],r=Object.entries(s).map(([o,a])=>{let d=l=>l[o],c=Array.from(a).map(l=>l==="me"?(m,_)=>{let g=_.me.id;return ct(m,w=>w.id===g)}:m=>ct(m,_=>_[l]||_.type===l));return c.length===0?dt(d):ut(d,c.reduce(ke))});return r.length===0?dt(i):ut(i,r.reduce(ke))});if(e.length===0)throw new Error("Cannot create filter function for empty query");return e.reduce(ke)}function ct(n,e){let t=s=>s!=null&&e(s);return Array.isArray(n)?n.some(t):t(n)}var lt={mention:{},hashtag:{},cashtag:{},bot_command:{},url:{},email:{},phone_number:{},bold:{},italic:{},underline:{},strikethrough:{},spoiler:{},blockquote:{},expandable_blockquote:{},code:{},pre:{},text_link:{},text_mention:{},custom_emoji:{}},Te={me:{},is_bot:{},is_premium:{},added_to_attachment_menu:{}},Es={user:{},hidden_user:{},chat:{},channel:{}},js={is_video:{},is_animated:{},premium_animation:{}},Pe={emoji:{},custom_emoji:{},paid:{}},ht={can_be_upgraded:{},is_upgrade_separate:{},is_private:{}},yt={forward_origin:Es,is_topic_message:{},is_automatic_forward:{},business_connection_id:{},text:{},animation:{},audio:{},document:{},paid_media:{},photo:{},sticker:js,story:{},video:{},video_note:{},voice:{},contact:{},dice:{},game:{},poll:{},venue:{},location:{},entities:lt,caption_entities:lt,caption:{},link_preview_options:{url:{},prefer_small_media:{},prefer_large_media:{},show_above_text:{}},effect_id:{},paid_star_count:{},has_media_spoiler:{},new_chat_title:{},new_chat_photo:{},delete_chat_photo:{},message_auto_delete_timer_changed:{},pinned_message:{},invoice:{},proximity_alert_triggered:{},chat_background_set:{},giveaway_created:{},giveaway:{only_new_members:{},has_public_winners:{}},giveaway_winners:{only_new_members:{},was_refunded:{}},giveaway_completed:{},gift:ht,gift_upgrade_sent:ht,unique_gift:{transfer_star_count:{}},paid_message_price_changed:{},video_chat_scheduled:{},video_chat_started:{},video_chat_ended:{},video_chat_participants_invited:{},web_app_data:{}},ie={...yt,direct_messages_topic:{},chat_owner_left:{new_owner:{}},chat_owner_changd:{},new_chat_members:Te,left_chat_member:Te,group_chat_created:{},supergroup_chat_created:{},migrate_to_chat_id:{},migrate_from_chat_id:{},successful_payment:{},refunded_payment:{},users_shared:{},chat_shared:{},connected_website:{},write_access_allowed:{},passport_data:{},boost_added:{},forum_topic_created:{is_name_implicit:{}},forum_topic_edited:{name:{},icon_custom_emoji_id:{}},forum_topic_closed:{},forum_topic_reopened:{},general_forum_topic_hidden:{},general_forum_topic_unhidden:{},checklist:{others_can_add_tasks:{},others_can_mark_tasks_as_done:{}},checklist_tasks_done:{},checklist_tasks_added:{},suggested_post_info:{},suggested_post_approved:{},suggested_post_approval_failed:{},suggested_post_declined:{},suggested_post_paid:{},suggested_post_refunded:{},sender_boost_count:{}},pt={...yt,channel_chat_created:{},direct_message_price_changed:{},is_paid_post:{}},Rs={can_reply:{},is_enabled:{}},Bs={old_reaction:Pe,new_reaction:Pe},Fs={reactions:Pe},$s={data:{},game_short_name:{}},gt={from:Te},ne={message:ie,edited_message:ie,channel_post:pt,edited_channel_post:pt,business_connection:Rs,business_message:ie,edited_business_message:ie,deleted_business_messages:{},inline_query:{},chosen_inline_result:{},callback_query:$s,shipping_query:{},pre_checkout_query:{},poll:{},poll_answer:{},my_chat_member:gt,chat_member:gt,chat_join_request:{},message_reaction:Bs,message_reaction_count:Fs,chat_boost:{},removed_chat_boost:{},purchased_paid_media:{}},mt={"":["message","channel_post"],msg:["message","channel_post"],edit:["edited_message","edited_channel_post"]},Ae={"":["entities","caption_entities"],media:["photo","video"],file:["photo","animation","audio","document","video","video_note","voice","sticker"]}});var de=y(ue=>{"use strict";h();Object.defineProperty(ue,"__esModule",{value:!0});ue.Context=void 0;var Ls=re(),S={filterQuery(n){let e=(0,Ls.matchFilter)(n);return t=>e(t)},text(n){let e=S.filterQuery([":text",":caption"]),t=$(n);return s=>{var i,r;if(!e(s))return!1;let o=(i=s.message)!==null&&i!==void 0?i:s.channelPost,a=(r=o.text)!==null&&r!==void 0?r:o.caption;return L(s,a,t)}},command(n){let e=S.filterQuery(":entities:bot_command"),t=new Set,s=new Set;return ae(n).forEach(i=>{if(i.startsWith("/"))throw new Error(`Do not include '/' when registering command handlers (use '${i.substring(1)}' not '${i}')`);(i.includes("@")?t:s).add(i)}),i=>{var r,o;if(!e(i))return!1;let a=(r=i.message)!==null&&r!==void 0?r:i.channelPost,d=(o=a.text)!==null&&o!==void 0?o:a.caption;return a.entities.some(c=>{if(c.type!=="bot_command"||c.offset!==0)return!1;let l=d.substring(1,c.length);if(s.has(l)||t.has(l))return i.match=d.substring(l.length+1).trimStart(),!0;let p=l.indexOf("@");if(p===-1)return!1;let m=l.substring(p+1).toLowerCase(),_=i.me.username.toLowerCase();if(m!==_)return!1;let g=l.substring(0,p);return s.has(g)?(i.match=d.substring(l.length+1).trimStart(),!0):!1})}},reaction(n){let e=S.filterQuery("message_reaction"),t=typeof n=="string"?[{type:"emoji",emoji:n}]:(Array.isArray(n)?n:[n]).map(o=>typeof o=="string"?{type:"emoji",emoji:o}:o),s=new Set(t.filter(o=>o.type==="emoji").map(o=>o.emoji)),i=new Set(t.filter(o=>o.type==="custom_emoji").map(o=>o.custom_emoji_id)),r=t.some(o=>o.type==="paid");return o=>{if(!e(o))return!1;let{old_reaction:a,new_reaction:d}=o.messageReaction;for(let c of d){let l=!1;if(c.type==="emoji"){for(let p of a)if(p.type==="emoji"&&p.emoji===c.emoji){l=!0;break}}else if(c.type==="custom_emoji"){for(let p of a)if(p.type==="custom_emoji"&&p.custom_emoji_id===c.custom_emoji_id){l=!0;break}}else if(c.type==="paid"){for(let p of a)if(p.type==="paid"){l=!0;break}}if(!l)if(c.type==="emoji"){if(s.has(c.emoji))return!0}else if(c.type==="custom_emoji"){if(i.has(c.custom_emoji_id))return!0}else if(c.type==="paid"){if(r)return!0}else return!0}return!1}},chatType(n){let e=new Set(ae(n));return t=>{var s;return((s=t.chat)===null||s===void 0?void 0:s.type)!==void 0&&e.has(t.chat.type)}},callbackQuery(n){let e=S.filterQuery("callback_query:data"),t=$(n);return s=>e(s)&&L(s,s.callbackQuery.data,t)},gameQuery(n){let e=S.filterQuery("callback_query:game_short_name"),t=$(n);return s=>e(s)&&L(s,s.callbackQuery.game_short_name,t)},inlineQuery(n){let e=S.filterQuery("inline_query"),t=$(n);return s=>e(s)&&L(s,s.inlineQuery.query,t)},chosenInlineResult(n){let e=S.filterQuery("chosen_inline_result"),t=$(n);return s=>e(s)&&L(s,s.chosenInlineResult.result_id,t)},preCheckoutQuery(n){let e=S.filterQuery("pre_checkout_query"),t=$(n);return s=>e(s)&&L(s,s.preCheckoutQuery.invoice_payload,t)},shippingQuery(n){let e=S.filterQuery("shipping_query"),t=$(n);return s=>e(s)&&L(s,s.shippingQuery.invoice_payload,t)}},oe=class n{constructor(e,t,s){this.update=e,this.api=t,this.me=s}get message(){return this.update.message}get editedMessage(){return this.update.edited_message}get channelPost(){return this.update.channel_post}get editedChannelPost(){return this.update.edited_channel_post}get businessConnection(){return this.update.business_connection}get businessMessage(){return this.update.business_message}get editedBusinessMessage(){return this.update.edited_business_message}get deletedBusinessMessages(){return this.update.deleted_business_messages}get messageReaction(){return this.update.message_reaction}get messageReactionCount(){return this.update.message_reaction_count}get inlineQuery(){return this.update.inline_query}get chosenInlineResult(){return this.update.chosen_inline_result}get callbackQuery(){return this.update.callback_query}get shippingQuery(){return this.update.shipping_query}get preCheckoutQuery(){return this.update.pre_checkout_query}get poll(){return this.update.poll}get pollAnswer(){return this.update.poll_answer}get myChatMember(){return this.update.my_chat_member}get chatMember(){return this.update.chat_member}get chatJoinRequest(){return this.update.chat_join_request}get chatBoost(){return this.update.chat_boost}get removedChatBoost(){return this.update.removed_chat_boost}get purchasedPaidMedia(){return this.update.purchased_paid_media}get msg(){var e,t,s,i,r,o,a;return(o=(r=(i=(s=(t=(e=this.message)!==null&&e!==void 0?e:this.editedMessage)!==null&&t!==void 0?t:this.channelPost)!==null&&s!==void 0?s:this.editedChannelPost)!==null&&i!==void 0?i:this.businessMessage)!==null&&r!==void 0?r:this.editedBusinessMessage)!==null&&o!==void 0?o:(a=this.callbackQuery)===null||a===void 0?void 0:a.message}get chat(){var e,t,s,i,r,o,a,d,c;return(c=(d=(a=(o=(r=(i=(s=(t=(e=this.msg)!==null&&e!==void 0?e:this.deletedBusinessMessages)!==null&&t!==void 0?t:this.messageReaction)!==null&&s!==void 0?s:this.messageReactionCount)!==null&&i!==void 0?i:this.myChatMember)!==null&&r!==void 0?r:this.chatMember)!==null&&o!==void 0?o:this.chatJoinRequest)!==null&&a!==void 0?a:this.chatBoost)!==null&&d!==void 0?d:this.removedChatBoost)===null||c===void 0?void 0:c.chat}get senderChat(){var e;return(e=this.msg)===null||e===void 0?void 0:e.sender_chat}get from(){var e,t,s,i,r,o,a,d,c,l,p,m,_,g,w,M,v;return(a=(o=(t=(e=this.businessConnection)!==null&&e!==void 0?e:this.messageReaction)!==null&&t!==void 0?t:(r=(i=(s=this.chatBoost)===null||s===void 0?void 0:s.boost)!==null&&i!==void 0?i:this.removedChatBoost)===null||r===void 0?void 0:r.source)===null||o===void 0?void 0:o.user)!==null&&a!==void 0?a:(v=(M=(w=(g=(_=(m=(p=(l=(c=(d=this.callbackQuery)!==null&&d!==void 0?d:this.msg)!==null&&c!==void 0?c:this.inlineQuery)!==null&&l!==void 0?l:this.chosenInlineResult)!==null&&p!==void 0?p:this.shippingQuery)!==null&&m!==void 0?m:this.preCheckoutQuery)!==null&&_!==void 0?_:this.myChatMember)!==null&&g!==void 0?g:this.chatMember)!==null&&w!==void 0?w:this.chatJoinRequest)!==null&&M!==void 0?M:this.purchasedPaidMedia)===null||v===void 0?void 0:v.from}get msgId(){var e,t,s,i,r;return(i=(t=(e=this.msg)===null||e===void 0?void 0:e.message_id)!==null&&t!==void 0?t:(s=this.messageReaction)===null||s===void 0?void 0:s.message_id)!==null&&i!==void 0?i:(r=this.messageReactionCount)===null||r===void 0?void 0:r.message_id}get chatId(){var e,t,s;return(t=(e=this.chat)===null||e===void 0?void 0:e.id)!==null&&t!==void 0?t:(s=this.businessConnection)===null||s===void 0?void 0:s.user_chat_id}get inlineMessageId(){var e,t,s;return(t=(e=this.callbackQuery)===null||e===void 0?void 0:e.inline_message_id)!==null&&t!==void 0?t:(s=this.chosenInlineResult)===null||s===void 0?void 0:s.inline_message_id}get businessConnectionId(){var e,t,s,i,r;return(i=(t=(e=this.msg)===null||e===void 0?void 0:e.business_connection_id)!==null&&t!==void 0?t:(s=this.businessConnection)===null||s===void 0?void 0:s.id)!==null&&i!==void 0?i:(r=this.deletedBusinessMessages)===null||r===void 0?void 0:r.business_connection_id}entities(e){var t,s;let i=this.msg;if(i===void 0)return[];let r=(t=i.text)!==null&&t!==void 0?t:i.caption;if(r===void 0)return[];let o=(s=i.entities)!==null&&s!==void 0?s:i.caption_entities;if(o===void 0)return[];if(e!==void 0){let a=new Set(ae(e));o=o.filter(d=>a.has(d.type))}return o.map(a=>({...a,text:r.substring(a.offset,a.offset+a.length)}))}reactions(){let e=[],t=[],s=[],i=[],r=[],o=[],a=[],d=[],c=!1,l=!1,p=this.messageReaction;if(p!==void 0){let{old_reaction:m,new_reaction:_}=p;for(let g of _)g.type==="emoji"?e.push(g.emoji):g.type==="custom_emoji"?r.push(g.custom_emoji_id):g.type==="paid"&&(c=l=!0);for(let g of m)g.type==="emoji"?i.push(g.emoji):g.type==="custom_emoji"?d.push(g.custom_emoji_id):g.type==="paid"&&(l=!1);t.push(...e),o.push(...r);for(let g=0;g<i.length;g++){let w=t.length;if(w===0)break;let M=i[g];for(let v=0;v<w;v++)if(M===t[v]){s.push(M),i.splice(g,1),t.splice(v,1),g--;break}}for(let g=0;g<d.length;g++){let w=o.length;if(w===0)break;let M=d[g];for(let v=0;v<w;v++)if(M===o[v]){a.push(M),d.splice(g,1),o.splice(v,1),g--;break}}}return{emoji:e,emojiAdded:t,emojiKept:s,emojiRemoved:i,customEmoji:r,customEmojiAdded:o,customEmojiKept:a,customEmojiRemoved:d,paid:c,paidAdded:l}}has(e){return n.has.filterQuery(e)(this)}hasText(e){return n.has.text(e)(this)}hasCommand(e){return n.has.command(e)(this)}hasReaction(e){return n.has.reaction(e)(this)}hasChatType(e){return n.has.chatType(e)(this)}hasCallbackQuery(e){return n.has.callbackQuery(e)(this)}hasGameQuery(e){return n.has.gameQuery(e)(this)}hasInlineQuery(e){return n.has.inlineQuery(e)(this)}hasChosenInlineResult(e){return n.has.chosenInlineResult(e)(this)}hasPreCheckoutQuery(e){return n.has.preCheckoutQuery(e)(this)}hasShippingQuery(e){return n.has.shippingQuery(e)(this)}reply(e,t,s){var i;let r=this.msg;return this.api.sendMessage(u(this.chatId,"sendMessage"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithDraft(e,t,s){let i=this.msg;return this.api.sendMessageDraft(u(this.chatId,"sendMessageDraft"),this.update.update_id,e,{...i?.is_topic_message?{message_thread_id:i?.message_thread_id}:{},...t},s)}forwardMessage(e,t,s){var i;let r=this.msg;return this.api.forwardMessage(e,u(this.chatId,"forwardMessage"),u(this.msgId,"forwardMessage"),{direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}forwardMessages(e,t,s,i){var r;let o=this.msg;return this.api.forwardMessages(e,u(this.chatId,"forwardMessages"),t,{direct_messages_topic_id:(r=o?.direct_messages_topic)===null||r===void 0?void 0:r.topic_id,...s},i)}copyMessage(e,t,s){var i;let r=this.msg;return this.api.copyMessage(e,u(this.chatId,"copyMessage"),u(this.msgId,"copyMessage"),{direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}copyMessages(e,t,s,i){var r;let o=this.msg;return this.api.copyMessages(e,u(this.chatId,"copyMessages"),t,{direct_messages_topic_id:(r=o?.direct_messages_topic)===null||r===void 0?void 0:r.topic_id,...s},i)}replyWithPhoto(e,t,s){var i;let r=this.msg;return this.api.sendPhoto(u(this.chatId,"sendPhoto"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithAudio(e,t,s){var i;let r=this.msg;return this.api.sendAudio(u(this.chatId,"sendAudio"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithDocument(e,t,s){var i;let r=this.msg;return this.api.sendDocument(u(this.chatId,"sendDocument"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithVideo(e,t,s){var i;let r=this.msg;return this.api.sendVideo(u(this.chatId,"sendVideo"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithAnimation(e,t,s){var i;let r=this.msg;return this.api.sendAnimation(u(this.chatId,"sendAnimation"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithVoice(e,t,s){var i;let r=this.msg;return this.api.sendVoice(u(this.chatId,"sendVoice"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithVideoNote(e,t,s){var i;let r=this.msg;return this.api.sendVideoNote(u(this.chatId,"sendVideoNote"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithMediaGroup(e,t,s){var i;let r=this.msg;return this.api.sendMediaGroup(u(this.chatId,"sendMediaGroup"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithLocation(e,t,s,i){var r;let o=this.msg;return this.api.sendLocation(u(this.chatId,"sendLocation"),e,t,{business_connection_id:this.businessConnectionId,...o?.is_topic_message?{message_thread_id:o.message_thread_id}:{},direct_messages_topic_id:(r=o?.direct_messages_topic)===null||r===void 0?void 0:r.topic_id,...s},i)}editMessageLiveLocation(e,t,s,i){let r=this.inlineMessageId;return r!==void 0?this.api.editMessageLiveLocationInline(r,e,t,{business_connection_id:this.businessConnectionId,...s},i):this.api.editMessageLiveLocation(u(this.chatId,"editMessageLiveLocation"),u(this.msgId,"editMessageLiveLocation"),e,t,{business_connection_id:this.businessConnectionId,...s},i)}stopMessageLiveLocation(e,t){let s=this.inlineMessageId;return s!==void 0?this.api.stopMessageLiveLocationInline(s,{business_connection_id:this.businessConnectionId,...e},t):this.api.stopMessageLiveLocation(u(this.chatId,"stopMessageLiveLocation"),u(this.msgId,"stopMessageLiveLocation"),{business_connection_id:this.businessConnectionId,...e},t)}sendPaidMedia(e,t,s,i){var r,o;let a=this.msg;return this.api.sendPaidMedia(u(this.chatId,"sendPaidMedia"),e,t,{business_connection_id:this.businessConnectionId,...a?.is_topic_message?{message_thread_id:a.message_thread_id}:{},direct_messages_topic_id:(o=(r=this.msg)===null||r===void 0?void 0:r.direct_messages_topic)===null||o===void 0?void 0:o.topic_id,...s},i)}replyWithVenue(e,t,s,i,r,o){var a;let d=this.msg;return this.api.sendVenue(u(this.chatId,"sendVenue"),e,t,s,i,{business_connection_id:this.businessConnectionId,...d?.is_topic_message?{message_thread_id:d.message_thread_id}:{},direct_messages_topic_id:(a=d?.direct_messages_topic)===null||a===void 0?void 0:a.topic_id,...r},o)}replyWithContact(e,t,s,i){var r;let o=this.msg;return this.api.sendContact(u(this.chatId,"sendContact"),e,t,{business_connection_id:this.businessConnectionId,...o?.is_topic_message?{message_thread_id:o.message_thread_id}:{},direct_messages_topic_id:(r=o?.direct_messages_topic)===null||r===void 0?void 0:r.topic_id,...s},i)}replyWithPoll(e,t,s,i){let r=this.msg;return this.api.sendPoll(u(this.chatId,"sendPoll"),e,t,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},...s},i)}replyWithChecklist(e,t,s){return this.api.sendChecklist(u(this.businessConnectionId,"sendChecklist"),u(this.chatId,"sendChecklist"),e,t,s)}editMessageChecklist(e,t,s){var i,r,o,a;let d=u(this.msg,"editMessageChecklist"),c=(a=(r=(i=d.checklist_tasks_done)===null||i===void 0?void 0:i.checklist_message)!==null&&r!==void 0?r:(o=d.checklist_tasks_added)===null||o===void 0?void 0:o.checklist_message)!==null&&a!==void 0?a:d;return this.api.editMessageChecklist(u(this.businessConnectionId,"editMessageChecklist"),u(c.chat.id,"editMessageChecklist"),u(c.message_id,"editMessageChecklist"),e,t,s)}replyWithDice(e,t,s){var i;let r=this.msg;return this.api.sendDice(u(this.chatId,"sendDice"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithChatAction(e,t,s){let i=this.msg;return this.api.sendChatAction(u(this.chatId,"sendChatAction"),e,{business_connection_id:this.businessConnectionId,message_thread_id:i?.message_thread_id,...t},s)}react(e,t,s){return this.api.setMessageReaction(u(this.chatId,"setMessageReaction"),u(this.msgId,"setMessageReaction"),typeof e=="string"?[{type:"emoji",emoji:e}]:(Array.isArray(e)?e:[e]).map(i=>typeof i=="string"?{type:"emoji",emoji:i}:i),t,s)}getUserProfilePhotos(e,t){return this.api.getUserProfilePhotos(u(this.from,"getUserProfilePhotos").id,e,t)}getUserProfileAudios(e,t){return this.api.getUserProfileAudios(u(this.from,"getUserProfileAudios").id,e,t)}setUserEmojiStatus(e,t){return this.api.setUserEmojiStatus(u(this.from,"setUserEmojiStatus").id,e,t)}getUserChatBoosts(e,t){return this.api.getUserChatBoosts(e??u(this.chatId,"getUserChatBoosts"),u(this.from,"getUserChatBoosts").id,t)}getUserGifts(e,t){return this.api.getUserGifts(u(this.from,"getUserGifts").id,e,t)}getChatGifts(e,t){return this.api.getChatGifts(u(this.chatId,"getChatGifts"),e,t)}getBusinessConnection(e){return this.api.getBusinessConnection(u(this.businessConnectionId,"getBusinessConnection"),e)}getFile(e){var t,s,i,r,o,a;let d=u(this.msg,"getFile"),c=d.photo!==void 0?d.photo[d.photo.length-1]:(a=(o=(r=(i=(s=(t=d.animation)!==null&&t!==void 0?t:d.audio)!==null&&s!==void 0?s:d.document)!==null&&i!==void 0?i:d.video)!==null&&r!==void 0?r:d.video_note)!==null&&o!==void 0?o:d.voice)!==null&&a!==void 0?a:d.sticker;return this.api.getFile(u(c,"getFile").file_id,e)}kickAuthor(...e){return this.banAuthor(...e)}banAuthor(e,t){return this.api.banChatMember(u(this.chatId,"banAuthor"),u(this.from,"banAuthor").id,e,t)}kickChatMember(...e){return this.banChatMember(...e)}banChatMember(e,t,s){return this.api.banChatMember(u(this.chatId,"banChatMember"),e,t,s)}unbanChatMember(e,t,s){return this.api.unbanChatMember(u(this.chatId,"unbanChatMember"),e,t,s)}restrictAuthor(e,t,s){return this.api.restrictChatMember(u(this.chatId,"restrictAuthor"),u(this.from,"restrictAuthor").id,e,t,s)}restrictChatMember(e,t,s,i){return this.api.restrictChatMember(u(this.chatId,"restrictChatMember"),e,t,s,i)}promoteAuthor(e,t){return this.api.promoteChatMember(u(this.chatId,"promoteAuthor"),u(this.from,"promoteAuthor").id,e,t)}promoteChatMember(e,t,s){return this.api.promoteChatMember(u(this.chatId,"promoteChatMember"),e,t,s)}setChatAdministratorAuthorCustomTitle(e,t){return this.api.setChatAdministratorCustomTitle(u(this.chatId,"setChatAdministratorAuthorCustomTitle"),u(this.from,"setChatAdministratorAuthorCustomTitle").id,e,t)}setChatAdministratorCustomTitle(e,t,s){return this.api.setChatAdministratorCustomTitle(u(this.chatId,"setChatAdministratorCustomTitle"),e,t,s)}setAuthorTag(e,t){return this.api.setChatMemberTag(u(this.chatId,"setChatMemberTag"),u(this.from,"setChatMemberTag").id,e,t)}setChatMemberTag(e,t,s){return this.api.setChatMemberTag(u(this.chatId,"setChatMemberTag"),e,t,s)}banChatSenderChat(e,t){return this.api.banChatSenderChat(u(this.chatId,"banChatSenderChat"),e,t)}unbanChatSenderChat(e,t){return this.api.unbanChatSenderChat(u(this.chatId,"unbanChatSenderChat"),e,t)}setChatPermissions(e,t,s){return this.api.setChatPermissions(u(this.chatId,"setChatPermissions"),e,t,s)}exportChatInviteLink(e){return this.api.exportChatInviteLink(u(this.chatId,"exportChatInviteLink"),e)}createChatInviteLink(e,t){return this.api.createChatInviteLink(u(this.chatId,"createChatInviteLink"),e,t)}editChatInviteLink(e,t,s){return this.api.editChatInviteLink(u(this.chatId,"editChatInviteLink"),e,t,s)}createChatSubscriptionInviteLink(e,t,s,i){return this.api.createChatSubscriptionInviteLink(u(this.chatId,"createChatSubscriptionInviteLink"),e,t,s,i)}editChatSubscriptionInviteLink(e,t,s){return this.api.editChatSubscriptionInviteLink(u(this.chatId,"editChatSubscriptionInviteLink"),e,t,s)}revokeChatInviteLink(e,t){return this.api.revokeChatInviteLink(u(this.chatId,"editChatInviteLink"),e,t)}approveChatJoinRequest(e,t){return this.api.approveChatJoinRequest(u(this.chatId,"approveChatJoinRequest"),e,t)}declineChatJoinRequest(e,t){return this.api.declineChatJoinRequest(u(this.chatId,"declineChatJoinRequest"),e,t)}approveSuggestedPost(e,t){return this.api.approveSuggestedPost(u(this.chatId,"approveSuggestedPost"),u(this.msgId,"approveSuggestedPost"),e,t)}declineSuggestedPost(e,t){return this.api.declineSuggestedPost(u(this.chatId,"declineSuggestedPost"),u(this.msgId,"declineSuggestedPost"),e,t)}setChatPhoto(e,t){return this.api.setChatPhoto(u(this.chatId,"setChatPhoto"),e,t)}deleteChatPhoto(e){return this.api.deleteChatPhoto(u(this.chatId,"deleteChatPhoto"),e)}setChatTitle(e,t){return this.api.setChatTitle(u(this.chatId,"setChatTitle"),e,t)}setChatDescription(e,t){return this.api.setChatDescription(u(this.chatId,"setChatDescription"),e,t)}pinChatMessage(e,t,s){return this.api.pinChatMessage(u(this.chatId,"pinChatMessage"),e,{business_connection_id:this.businessConnectionId,...t},s)}unpinChatMessage(e,t,s){return this.api.unpinChatMessage(u(this.chatId,"unpinChatMessage"),e,{business_connection_id:this.businessConnectionId,...t},s)}unpinAllChatMessages(e){return this.api.unpinAllChatMessages(u(this.chatId,"unpinAllChatMessages"),e)}leaveChat(e){return this.api.leaveChat(u(this.chatId,"leaveChat"),e)}getChat(e){return this.api.getChat(u(this.chatId,"getChat"),e)}getChatAdministrators(e){return this.api.getChatAdministrators(u(this.chatId,"getChatAdministrators"),e)}getChatMembersCount(...e){return this.getChatMemberCount(...e)}getChatMemberCount(e){return this.api.getChatMemberCount(u(this.chatId,"getChatMemberCount"),e)}getAuthor(e){return this.api.getChatMember(u(this.chatId,"getAuthor"),u(this.from,"getAuthor").id,e)}getChatMember(e,t){return this.api.getChatMember(u(this.chatId,"getChatMember"),e,t)}setChatStickerSet(e,t){return this.api.setChatStickerSet(u(this.chatId,"setChatStickerSet"),e,t)}deleteChatStickerSet(e){return this.api.deleteChatStickerSet(u(this.chatId,"deleteChatStickerSet"),e)}createForumTopic(e,t,s){return this.api.createForumTopic(u(this.chatId,"createForumTopic"),e,t,s)}editForumTopic(e,t){let s=u(this.msg,"editForumTopic"),i=u(s.message_thread_id,"editForumTopic");return this.api.editForumTopic(s.chat.id,i,e,t)}closeForumTopic(e){let t=u(this.msg,"closeForumTopic"),s=u(t.message_thread_id,"closeForumTopic");return this.api.closeForumTopic(t.chat.id,s,e)}reopenForumTopic(e){let t=u(this.msg,"reopenForumTopic"),s=u(t.message_thread_id,"reopenForumTopic");return this.api.reopenForumTopic(t.chat.id,s,e)}deleteForumTopic(e){let t=u(this.msg,"deleteForumTopic"),s=u(t.message_thread_id,"deleteForumTopic");return this.api.deleteForumTopic(t.chat.id,s,e)}unpinAllForumTopicMessages(e){let t=u(this.msg,"unpinAllForumTopicMessages"),s=u(t.message_thread_id,"unpinAllForumTopicMessages");return this.api.unpinAllForumTopicMessages(t.chat.id,s,e)}editGeneralForumTopic(e,t){return this.api.editGeneralForumTopic(u(this.chatId,"editGeneralForumTopic"),e,t)}closeGeneralForumTopic(e){return this.api.closeGeneralForumTopic(u(this.chatId,"closeGeneralForumTopic"),e)}reopenGeneralForumTopic(e){return this.api.reopenGeneralForumTopic(u(this.chatId,"reopenGeneralForumTopic"),e)}hideGeneralForumTopic(e){return this.api.hideGeneralForumTopic(u(this.chatId,"hideGeneralForumTopic"),e)}unhideGeneralForumTopic(e){return this.api.unhideGeneralForumTopic(u(this.chatId,"unhideGeneralForumTopic"),e)}unpinAllGeneralForumTopicMessages(e){return this.api.unpinAllGeneralForumTopicMessages(u(this.chatId,"unpinAllGeneralForumTopicMessages"),e)}answerCallbackQuery(e,t){return this.api.answerCallbackQuery(u(this.callbackQuery,"answerCallbackQuery").id,typeof e=="string"?{text:e}:e,t)}setChatMenuButton(e,t){return this.api.setChatMenuButton(e,t)}getChatMenuButton(e,t){return this.api.getChatMenuButton(e,t)}setMyDefaultAdministratorRights(e,t){return this.api.setMyDefaultAdministratorRights(e,t)}getMyDefaultAdministratorRights(e,t){return this.api.getMyDefaultAdministratorRights(e,t)}editMessageText(e,t,s){var i,r,o,a,d;let c=this.inlineMessageId;return c!==void 0?this.api.editMessageTextInline(c,e,{business_connection_id:this.businessConnectionId,...t},s):this.api.editMessageText(u(this.chatId,"editMessageText"),u((a=(r=(i=this.msg)===null||i===void 0?void 0:i.message_id)!==null&&r!==void 0?r:(o=this.messageReaction)===null||o===void 0?void 0:o.message_id)!==null&&a!==void 0?a:(d=this.messageReactionCount)===null||d===void 0?void 0:d.message_id,"editMessageText"),e,{business_connection_id:this.businessConnectionId,...t},s)}editMessageCaption(e,t){var s,i,r,o,a;let d=this.inlineMessageId;return d!==void 0?this.api.editMessageCaptionInline(d,{business_connection_id:this.businessConnectionId,...e},t):this.api.editMessageCaption(u(this.chatId,"editMessageCaption"),u((o=(i=(s=this.msg)===null||s===void 0?void 0:s.message_id)!==null&&i!==void 0?i:(r=this.messageReaction)===null||r===void 0?void 0:r.message_id)!==null&&o!==void 0?o:(a=this.messageReactionCount)===null||a===void 0?void 0:a.message_id,"editMessageCaption"),{business_connection_id:this.businessConnectionId,...e},t)}editMessageMedia(e,t,s){var i,r,o,a,d;let c=this.inlineMessageId;return c!==void 0?this.api.editMessageMediaInline(c,e,{business_connection_id:this.businessConnectionId,...t},s):this.api.editMessageMedia(u(this.chatId,"editMessageMedia"),u((a=(r=(i=this.msg)===null||i===void 0?void 0:i.message_id)!==null&&r!==void 0?r:(o=this.messageReaction)===null||o===void 0?void 0:o.message_id)!==null&&a!==void 0?a:(d=this.messageReactionCount)===null||d===void 0?void 0:d.message_id,"editMessageMedia"),e,{business_connection_id:this.businessConnectionId,...t},s)}editMessageReplyMarkup(e,t){var s,i,r,o,a;let d=this.inlineMessageId;return d!==void 0?this.api.editMessageReplyMarkupInline(d,{business_connection_id:this.businessConnectionId,...e},t):this.api.editMessageReplyMarkup(u(this.chatId,"editMessageReplyMarkup"),u((o=(i=(s=this.msg)===null||s===void 0?void 0:s.message_id)!==null&&i!==void 0?i:(r=this.messageReaction)===null||r===void 0?void 0:r.message_id)!==null&&o!==void 0?o:(a=this.messageReactionCount)===null||a===void 0?void 0:a.message_id,"editMessageReplyMarkup"),{business_connection_id:this.businessConnectionId,...e},t)}stopPoll(e,t){var s,i,r,o,a;return this.api.stopPoll(u(this.chatId,"stopPoll"),u((o=(i=(s=this.msg)===null||s===void 0?void 0:s.message_id)!==null&&i!==void 0?i:(r=this.messageReaction)===null||r===void 0?void 0:r.message_id)!==null&&o!==void 0?o:(a=this.messageReactionCount)===null||a===void 0?void 0:a.message_id,"stopPoll"),{business_connection_id:this.businessConnectionId,...e},t)}deleteMessage(e){var t,s,i,r,o;return this.api.deleteMessage(u(this.chatId,"deleteMessage"),u((r=(s=(t=this.msg)===null||t===void 0?void 0:t.message_id)!==null&&s!==void 0?s:(i=this.messageReaction)===null||i===void 0?void 0:i.message_id)!==null&&r!==void 0?r:(o=this.messageReactionCount)===null||o===void 0?void 0:o.message_id,"deleteMessage"),e)}deleteMessages(e,t){return this.api.deleteMessages(u(this.chatId,"deleteMessages"),e,t)}deleteBusinessMessages(e,t){return this.api.deleteBusinessMessages(u(this.businessConnectionId,"deleteBusinessMessages"),e,t)}setBusinessAccountName(e,t,s){return this.api.setBusinessAccountName(u(this.businessConnectionId,"setBusinessAccountName"),e,t,s)}setBusinessAccountUsername(e,t){return this.api.setBusinessAccountUsername(u(this.businessConnectionId,"setBusinessAccountUsername"),e,t)}setBusinessAccountBio(e,t){return this.api.setBusinessAccountBio(u(this.businessConnectionId,"setBusinessAccountBio"),e,t)}setBusinessAccountProfilePhoto(e,t,s){return this.api.setBusinessAccountProfilePhoto(u(this.businessConnectionId,"setBusinessAccountProfilePhoto"),e,t,s)}removeBusinessAccountProfilePhoto(e,t){return this.api.removeBusinessAccountProfilePhoto(u(this.businessConnectionId,"removeBusinessAccountProfilePhoto"),e,t)}setBusinessAccountGiftSettings(e,t,s){return this.api.setBusinessAccountGiftSettings(u(this.businessConnectionId,"setBusinessAccountGiftSettings"),e,t,s)}getBusinessAccountStarBalance(e){return this.api.getBusinessAccountStarBalance(u(this.businessConnectionId,"getBusinessAccountStarBalance"),e)}transferBusinessAccountStars(e,t){return this.api.transferBusinessAccountStars(u(this.businessConnectionId,"transferBusinessAccountStars"),e,t)}getBusinessAccountGifts(e,t){return this.api.getBusinessAccountGifts(u(this.businessConnectionId,"getBusinessAccountGifts"),e,t)}convertGiftToStars(e,t){return this.api.convertGiftToStars(u(this.businessConnectionId,"convertGiftToStars"),e,t)}upgradeGift(e,t,s){return this.api.upgradeGift(u(this.businessConnectionId,"upgradeGift"),e,t,s)}transferGift(e,t,s,i){return this.api.transferGift(u(this.businessConnectionId,"transferGift"),e,t,s,i)}postStory(e,t,s,i){return this.api.postStory(u(this.businessConnectionId,"postStory"),e,t,s,i)}repostStory(e,t,s){var i;let r=u((i=this.msg)===null||i===void 0?void 0:i.story,"repostStory");return this.api.repostStory(u(this.businessConnectionId,"repostStory"),r.chat.id,r.id,e,t,s)}editStory(e,t,s,i){return this.api.editStory(u(this.businessConnectionId,"editStory"),e,t,s,i)}deleteStory(e,t){return this.api.deleteStory(u(this.businessConnectionId,"deleteStory"),e,t)}replyWithSticker(e,t,s){var i;let r=this.msg;return this.api.sendSticker(u(this.chatId,"sendSticker"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}getCustomEmojiStickers(e){var t,s;return this.api.getCustomEmojiStickers(((s=(t=this.msg)===null||t===void 0?void 0:t.entities)!==null&&s!==void 0?s:[]).filter(i=>i.type==="custom_emoji").map(i=>i.custom_emoji_id),e)}replyWithGift(e,t,s){return this.api.sendGift(u(this.from,"sendGift").id,e,t,s)}giftPremiumSubscription(e,t,s,i){return this.api.giftPremiumSubscription(u(this.from,"giftPremiumSubscription").id,e,t,s,i)}replyWithGiftToChannel(e,t,s){return this.api.sendGiftToChannel(u(this.chat,"sendGift").id,e,t,s)}answerInlineQuery(e,t,s){return this.api.answerInlineQuery(u(this.inlineQuery,"answerInlineQuery").id,e,t,s)}savePreparedInlineMessage(e,t,s){return this.api.savePreparedInlineMessage(u(this.from,"savePreparedInlineMessage").id,e,t,s)}replyWithInvoice(e,t,s,i,r,o,a){var d;let c=this.msg;return this.api.sendInvoice(u(this.chatId,"sendInvoice"),e,t,s,i,r,{...c?.is_topic_message?{message_thread_id:c.message_thread_id}:{},direct_messages_topic_id:(d=c?.direct_messages_topic)===null||d===void 0?void 0:d.topic_id,...o},a)}answerShippingQuery(e,t,s){return this.api.answerShippingQuery(u(this.shippingQuery,"answerShippingQuery").id,e,t,s)}answerPreCheckoutQuery(e,t,s){return this.api.answerPreCheckoutQuery(u(this.preCheckoutQuery,"answerPreCheckoutQuery").id,e,typeof t=="string"?{error_message:t}:t,s)}refundStarPayment(e){var t;return this.api.refundStarPayment(u(this.from,"refundStarPayment").id,u((t=this.msg)===null||t===void 0?void 0:t.successful_payment,"refundStarPayment").telegram_payment_charge_id,e)}editUserStarSubscription(e,t,s){return this.api.editUserStarSubscription(u(this.from,"editUserStarSubscription").id,e,t,s)}verifyUser(e,t){return this.api.verifyUser(u(this.from,"verifyUser").id,e,t)}verifyChat(e,t){return this.api.verifyChat(u(this.chatId,"verifyChat"),e,t)}removeUserVerification(e){return this.api.removeUserVerification(u(this.from,"removeUserVerification").id,e)}removeChatVerification(e){return this.api.removeChatVerification(u(this.chatId,"removeChatVerification"),e)}readBusinessMessage(e){return this.api.readBusinessMessage(u(this.businessConnectionId,"readBusinessMessage"),u(this.chatId,"readBusinessMessage"),u(this.msgId,"readBusinessMessage"),e)}setPassportDataErrors(e,t){return this.api.setPassportDataErrors(u(this.from,"setPassportDataErrors").id,e,t)}replyWithGame(e,t,s){let i=this.msg;return this.api.sendGame(u(this.chatId,"sendGame"),e,{business_connection_id:this.businessConnectionId,...i?.is_topic_message?{message_thread_id:i.message_thread_id}:{},...t},s)}};ue.Context=oe;oe.has=S;function u(n,e){if(n===void 0)throw new Error(`Missing information for API call to ${e}`);return n}function $(n){return ae(n).map(e=>typeof e=="string"?t=>t===e?e:null:t=>t.match(e))}function L(n,e,t){for(let s of t){let i=s(e);if(i)return n.match=i,!0}return!1}function ae(n){return Array.isArray(n)?n:[n]}});var Re=y(q=>{"use strict";h();Object.defineProperty(q,"__esModule",{value:!0});q.Composer=q.BotError=void 0;q.run=bt;var I=de(),ce=class extends Error{constructor(e,t){super(qs(e)),this.error=e,this.ctx=t,this.name="BotError",e instanceof Error&&(this.stack=e.stack)}};q.BotError=ce;function qs(n){let e;if(n instanceof Error)e=`${n.name} in middleware: ${n.message}`;else{let t=typeof n;switch(e=`Non-error value of type ${t} thrown in middleware`,t){case"bigint":case"boolean":case"number":case"symbol":e+=`: ${n}`;break;case"string":e+=`: ${String(n).substring(0,50)}`;break;default:e+="!";break}}return e}function V(n){return typeof n=="function"?n:(e,t)=>n.middleware()(e,t)}function vt(n,e){return async(t,s)=>{let i=!1;await n(t,async()=>{if(i)throw new Error("`next` already called before!");i=!0,await e(t,s)})}}function Ee(n,e){return e()}var Us=()=>Promise.resolve();async function bt(n,e){await n(e,Us)}var je=class n{constructor(...e){this.handler=e.length===0?Ee:e.map(V).reduce(vt)}middleware(){return this.handler}use(...e){let t=new n(...e);return this.handler=vt(this.handler,V(t)),t}on(e,...t){return this.filter(I.Context.has.filterQuery(e),...t)}hears(e,...t){return this.filter(I.Context.has.text(e),...t)}command(e,...t){return this.filter(I.Context.has.command(e),...t)}reaction(e,...t){return this.filter(I.Context.has.reaction(e),...t)}chatType(e,...t){return this.filter(I.Context.has.chatType(e),...t)}callbackQuery(e,...t){return this.filter(I.Context.has.callbackQuery(e),...t)}gameQuery(e,...t){return this.filter(I.Context.has.gameQuery(e),...t)}inlineQuery(e,...t){return this.filter(I.Context.has.inlineQuery(e),...t)}chosenInlineResult(e,...t){return this.filter(I.Context.has.chosenInlineResult(e),...t)}preCheckoutQuery(e,...t){return this.filter(I.Context.has.preCheckoutQuery(e),...t)}shippingQuery(e,...t){return this.filter(I.Context.has.shippingQuery(e),...t)}filter(e,...t){let s=new n(...t);return this.branch(e,s,Ee),s}drop(e,...t){return this.filter(async s=>!await e(s),...t)}fork(...e){let t=new n(...e),s=V(t);return this.use((i,r)=>Promise.all([r(),bt(s,i)])),t}lazy(e){return this.use(async(t,s)=>{let i=await e(t),r=Array.isArray(i)?i:[i];await V(new n(...r))(t,s)})}route(e,t,s=Ee){return this.lazy(async i=>{var r;let o=await e(i);return(r=o===void 0||!t[o]?s:t[o])!==null&&r!==void 0?r:[]})}branch(e,t,s){return this.lazy(async i=>await e(i)?t:s)}errorBoundary(e,...t){let s=new n(...t),i=V(s);return this.use(async(r,o)=>{let a=!1,d=()=>(a=!0,Promise.resolve());try{await i(r,d)}catch(c){a=!1,await e(new ce(c,r),d)}a&&await o()}),s}};q.Composer=je});var j=y(A=>{"use strict";h();Object.defineProperty(A,"__esModule",{value:!0});A.defaultAdapter=A.itrToStream=A.debug=void 0;A.baseFetchConfig=zs;var Gs=K("http"),Os=K("https"),Ds=K("stream"),Qs=ws();Object.defineProperty(A,"debug",{enumerable:!0,get:function(){return Qs.debug}});var Ns=n=>Ds.Readable.from(n,{objectMode:!1});A.itrToStream=Ns;var xs=new Map,Ws=new Map;function wt(n,e,t){let s=n.get(e);return s===void 0&&(s=t(),n.set(e,s)),s}function zs(n){return n.startsWith("https:")?{compress:!0,agent:wt(Ws,n,()=>new Os.Agent({keepAlive:!0}))}:n.startsWith("http:")?{agent:wt(xs,n,()=>new Gs.Agent({keepAlive:!0}))}:{}}A.defaultAdapter="express"});var pe=y(R=>{"use strict";h();Object.defineProperty(R,"__esModule",{value:!0});R.HttpError=R.GrammyError=void 0;R.toGrammyError=Ks;R.toHttpError=Vs;var Hs=j(),Ct=(0,Hs.debug)("grammy:warn"),le=class extends Error{constructor(e,t,s,i){var r;super(`${e} (${t.error_code}: ${t.description})`),this.method=s,this.payload=i,this.ok=!1,this.name="GrammyError",this.error_code=t.error_code,this.description=t.description,this.parameters=(r=t.parameters)!==null&&r!==void 0?r:{}}};R.GrammyError=le;function Ks(n,e,t){switch(n.error_code){case 401:Ct("Error 401 means that your bot token is wrong, talk to https://t.me/BotFather to check it.");break;case 409:Ct("Error 409 means that you are running your bot several times on long polling. Consider revoking the bot token if you believe that no other instance is running.");break}return new le(`Call to '${e}' failed!`,n,e,t)}var he=class extends Error{constructor(e,t){super(e),this.error=t,this.name="HttpError"}};R.HttpError=he;function Ys(n){return typeof n=="object"&&n!==null&&"status"in n&&"statusText"in n}function Vs(n,e,t){let s=`Network request for '${n}' failed!`;return Ys(t)&&(s+=` (${t.status}: ${t.statusText})`),e&&t instanceof Error&&(s+=` ${t.message}`),new he(s,t)}});var Mt=y(()=>{h()});var kt=y(T=>{"use strict";h();var Js=T&&T.__createBinding||(Object.create?function(n,e,t,s){s===void 0&&(s=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,s,i)}:function(n,e,t,s){s===void 0&&(s=t),n[s]=e[t]}),Xs=T&&T.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Js(e,n,t)};Object.defineProperty(T,"__esModule",{value:!0});T.InputFile=void 0;var It=K("fs"),Zs=rt(),ge=K("path"),ei=j(),ti=(0,ei.debug)("grammy:warn");Xs(Mt(),T);var Be=class n{constructor(e,t){this.consumed=!1,this.fileData=e,t??(t=this.guessFilename(e)),this.filename=t,typeof e=="string"&&(e.startsWith("http:")||e.startsWith("https:"))&&ti(`InputFile received the local file path '${e}' that looks like a URL. Is this a mistake?`)}guessFilename(e){if(typeof e=="string")return(0,ge.basename)(e);if("url"in e)return(0,ge.basename)(e.url);if(e instanceof URL){if(e.pathname!=="/"){let t=(0,ge.basename)(e.pathname);if(t)return t}return(0,ge.basename)(e.hostname)}}async toRaw(){if(this.consumed)throw new Error("Cannot reuse InputFile data source!");let e=this.fileData;return typeof e=="string"?(0,It.createReadStream)(e):e instanceof URL?e.protocol==="file"?(0,It.createReadStream)(e.pathname):St(e):"url"in e?St(e.url):e instanceof Uint8Array?e:typeof e=="function"?new n(await e()).toRaw():(this.consumed=!0,e)}toJSON(){throw new Error("InputFile instances must be sent via grammY")}};T.InputFile=Be;async function*St(n){let{body:e}=await(0,Zs.default)(n);for await(let t of e){if(typeof t=="string")throw new Error(`Could not transfer file, received string data instead of bytes from '${n}'`);yield t}}});var Fe=y(U=>{"use strict";h();var si=U&&U.__createBinding||(Object.create?function(n,e,t,s){s===void 0&&(s=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,s,i)}:function(n,e,t,s){s===void 0&&(s=t),n[s]=e[t]}),ii=U&&U.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&si(e,n,t)};Object.defineProperty(U,"__esModule",{value:!0});ii(kt(),U)});var Pt=y(X=>{"use strict";h();Object.defineProperty(X,"__esModule",{value:!0});X.requiresFormDataUpload=$e;X.createJsonPayload=ri;X.createFormDataPayload=ai;var ni=j(),me=Fe();function $e(n){return n instanceof me.InputFile||typeof n=="object"&&n!==null&&Object.values(n).some(e=>Array.isArray(e)?e.some($e):e instanceof me.InputFile||$e(e))}function At(n){return JSON.stringify(n,(e,t)=>t??void 0)}function ri(n){return{method:"POST",headers:{"content-type":"application/json",connection:"keep-alive"},body:At(n)}}async function*oi(n,e){try{yield*n}catch(t){e(t)}}function ai(n,e){let t=ui(),s=di(n,t),i=oi(s,e),r=(0,ni.itrToStream)(i);return{method:"POST",headers:{"content-type":`multipart/form-data; boundary=${t}`,connection:"keep-alive"},body:r}}function ui(){return"----------"+Tt(32)}function Tt(n=16){return Array.from(Array(n)).map(()=>Math.random().toString(36)[2]||0).join("")}var J=new TextEncoder;async function*di(n,e){let t=Le(n);yield J.encode(`--${e}\r
|
|
4
4
|
`);let s=J.encode(`\r
|
|
5
5
|
--${e}\r
|
|
6
6
|
`),i=!0;for(let[r,o]of Object.entries(n))o!=null&&(i||(yield s),yield ci(r,o instanceof me.InputFile?o.toJSON():typeof o=="object"?At(o):o),i=!1);for(let{id:r,origin:o,file:a}of t)i||(yield s),yield*li(r,o,a),i=!1;yield J.encode(`\r
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{a as Hr,b as vr,c as qr}from"./chunk-WZ75OGYY.js";import"./chunk-XMZIY7XX.js";import{f as Bt}from"./chunk-3HUM74NZ.js";import"./chunk-JSFA3NEP.js";import"./chunk-TZIDSCTF.js";import{c as Pt}from"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-UIRBHC5X.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import{b as l}from"./chunk-GZPNIYVZ.js";import{e as Mr,f as Qe}from"./chunk-OWGSC52X.js";l();l();import{mkdirSync as js,writeFileSync as $s}from"node:fs";import{randomUUID as zs}from"node:crypto";import{basename as Js,join as Fr}from"node:path";import{tmpdir as Ws}from"node:os";l();l();var Ye="/v1.0/im/bot/messages/get";l();l();l();l();l();function Ee(t,e){return function(){return t.apply(e,arguments)}}var{toString:jr}=Object.prototype,{getPrototypeOf:et}=Object,{iterator:Fe,toStringTag:Mt}=Symbol,Me=(t=>e=>{let n=jr.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),W=t=>(t=t.toLowerCase(),e=>Me(e)===t),He=t=>e=>typeof e===t,{isArray:he}=Array,me=He("undefined");function Te(t){return t!==null&&!me(t)&&t.constructor!==null&&!me(t.constructor)&&q(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var Ht=W("ArrayBuffer");function $r(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ht(t.buffer),e}var zr=He("string"),q=He("function"),vt=He("number"),xe=t=>t!==null&&typeof t=="object",Jr=t=>t===!0||t===!1,Ue=t=>{if(Me(t)!=="object")return!1;let e=et(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Mt in t)&&!(Fe in t)},Wr=t=>{if(!xe(t)||Te(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Vr=W("Date"),Kr=W("File"),Gr=t=>!!(t&&typeof t.uri<"u"),Xr=t=>t&&typeof t.getParts<"u",Qr=W("Blob"),Yr=W("FileList"),Zr=t=>xe(t)&&q(t.pipe);function en(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}var It=en(),Ut=typeof It.FormData<"u"?It.FormData:void 0,tn=t=>{let e;return t&&(Ut&&t instanceof Ut||q(t.append)&&((e=Me(t))==="formdata"||e==="object"&&q(t.toString)&&t.toString()==="[object FormData]"))},rn=W("URLSearchParams"),[nn,sn,on,an]=["ReadableStream","Request","Response","Headers"].map(W),cn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Se(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),he(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{if(Te(t))return;let i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length,c;for(r=0;r<o;r++)c=i[r],e.call(null,t[c],c,t)}}function qt(t,e){if(Te(t))return null;e=e.toLowerCase();let n=Object.keys(t),r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}var ae=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:globalThis,jt=t=>!me(t)&&t!==ae;function Ze(){let{caseless:t,skipUndefined:e}=jt(this)&&this||{},n={},r=(s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;let o=t&&qt(n,i)||i;Ue(n[o])&&Ue(s)?n[o]=Ze(n[o],s):Ue(s)?n[o]=Ze({},s):he(s)?n[o]=s.slice():(!e||!me(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Se(arguments[s],r);return n}var ln=(t,e,n,{allOwnKeys:r}={})=>(Se(e,(s,i)=>{n&&q(s)?Object.defineProperty(t,i,{value:Ee(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,i,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),un=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),fn=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},dn=(t,e,n,r)=>{let s,i,o,c={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)o=s[i],(!r||r(o,t,e))&&!c[o]&&(e[o]=t[o],c[o]=!0);t=n!==!1&&et(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},pn=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;let r=t.indexOf(e,n);return r!==-1&&r===n},mn=t=>{if(!t)return null;if(he(t))return t;let e=t.length;if(!vt(e))return null;let n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},hn=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&et(Uint8Array)),yn=(t,e)=>{let r=(t&&t[Fe]).call(t),s;for(;(s=r.next())&&!s.done;){let i=s.value;e.call(t,i[0],i[1])}},bn=(t,e)=>{let n,r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},gn=W("HTMLFormElement"),wn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ft=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Rn=W("RegExp"),$t=(t,e)=>{let n=Object.getOwnPropertyDescriptors(t),r={};Se(n,(s,i)=>{let o;(o=e(s,i,t))!==!1&&(r[i]=o||s)}),Object.defineProperties(t,r)},En=t=>{$t(t,(e,n)=>{if(q(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let r=t[n];if(q(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Tn=(t,e)=>{let n={},r=s=>{s.forEach(i=>{n[i]=!0})};return he(t)?r(t):r(String(t).split(e)),n},xn=()=>{},Sn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function An(t){return!!(t&&q(t.append)&&t[Mt]==="FormData"&&t[Fe])}var Cn=t=>{let e=new Array(10),n=(r,s)=>{if(xe(r)){if(e.indexOf(r)>=0)return;if(Te(r))return r;if(!("toJSON"in r)){e[s]=r;let i=he(r)?[]:{};return Se(r,(o,c)=>{let d=n(o,s+1);!me(d)&&(i[c]=d)}),e[s]=void 0,i}}return r};return n(t,0)},On=W("AsyncFunction"),_n=t=>t&&(xe(t)||q(t))&&q(t.then)&&q(t.catch),zt=((t,e)=>t?setImmediate:e?((n,r)=>(ae.addEventListener("message",({source:s,data:i})=>{s===ae&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),ae.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",q(ae.postMessage)),kn=typeof queueMicrotask<"u"?queueMicrotask.bind(ae):typeof process<"u"&&process.nextTick||zt,Dn=t=>t!=null&&q(t[Fe]),a={isArray:he,isArrayBuffer:Ht,isBuffer:Te,isFormData:tn,isArrayBufferView:$r,isString:zr,isNumber:vt,isBoolean:Jr,isObject:xe,isPlainObject:Ue,isEmptyObject:Wr,isReadableStream:nn,isRequest:sn,isResponse:on,isHeaders:an,isUndefined:me,isDate:Vr,isFile:Kr,isReactNativeBlob:Gr,isReactNative:Xr,isBlob:Qr,isRegExp:Rn,isFunction:q,isStream:Zr,isURLSearchParams:rn,isTypedArray:hn,isFileList:Yr,forEach:Se,merge:Ze,extend:ln,trim:cn,stripBOM:un,inherits:fn,toFlatObject:dn,kindOf:Me,kindOfTest:W,endsWith:pn,toArray:mn,forEachEntry:yn,matchAll:bn,isHTMLForm:gn,hasOwnProperty:Ft,hasOwnProp:Ft,reduceDescriptors:$t,freezeMethods:En,toObjectSet:Tn,toCamelCase:wn,noop:xn,toFiniteNumber:Sn,findKey:qt,global:ae,isContextDefined:jt,isSpecCompliantForm:An,toJSONObject:Cn,isAsyncFn:On,isThenable:_n,setImmediate:zt,asap:kn,isIterable:Dn};l();l();l();l();l();var F=class t extends Error{static from(e,n,r,s,i,o){let c=new t(e.message,n||e.code,r,s,i);return c.cause=e,c.name=e.name,e.status!=null&&c.status==null&&(c.status=e.status),o&&Object.assign(c,o),c}constructor(e,n,r,s,i){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}};F.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";F.ERR_BAD_OPTION="ERR_BAD_OPTION";F.ECONNABORTED="ECONNABORTED";F.ETIMEDOUT="ETIMEDOUT";F.ERR_NETWORK="ERR_NETWORK";F.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";F.ERR_DEPRECATED="ERR_DEPRECATED";F.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";F.ERR_BAD_REQUEST="ERR_BAD_REQUEST";F.ERR_CANCELED="ERR_CANCELED";F.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";F.ERR_INVALID_URL="ERR_INVALID_URL";var y=F;l();var Jt=Qe(Hr(),1),ve=Jt.default;function rt(t){return a.isPlainObject(t)||a.isArray(t)}function Wt(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function tt(t,e,n){return t?t.concat(e).map(function(s,i){return s=Wt(s),!n&&i?"["+s+"]":s}).join(n?".":""):e}function Nn(t){return a.isArray(t)&&!t.some(rt)}var Ln=a.toFlatObject(a,{},null,function(e){return/^is[A-Z]/.test(e)});function Pn(t,e,n){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new(ve||FormData),n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,m){return!a.isUndefined(m[g])});let r=n.metaTokens,s=n.visitor||f,i=n.dots,o=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(a.isDate(p))return p.toISOString();if(a.isBoolean(p))return p.toString();if(!d&&a.isBlob(p))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(p)||a.isTypedArray(p)?d&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function f(p,g,m){let S=p;if(a.isReactNative(e)&&a.isReactNativeBlob(p))return e.append(tt(m,g,i),u(p)),!1;if(p&&!m&&typeof p=="object"){if(a.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(a.isArray(p)&&Nn(p)||(a.isFileList(p)||a.endsWith(g,"[]"))&&(S=a.toArray(p)))return g=Wt(g),S.forEach(function(T,_){!(a.isUndefined(T)||T===null)&&e.append(o===!0?tt([g],_,i):o===null?g:g+"[]",u(T))}),!1}return rt(p)?!0:(e.append(tt(m,g,i),u(p)),!1)}let h=[],b=Object.assign(Ln,{defaultVisitor:f,convertValue:u,isVisitable:rt});function R(p,g){if(!a.isUndefined(p)){if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));h.push(p),a.forEach(p,function(S,C){(!(a.isUndefined(S)||S===null)&&s.call(e,S,a.isString(C)?C.trim():C,g,b))===!0&&R(S,g?g.concat(C):[C])}),h.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return R(t),e}var re=Pn;function Vt(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Kt(t,e){this._pairs=[],t&&re(t,this,e)}var Gt=Kt.prototype;Gt.append=function(e,n){this._pairs.push([e,n])};Gt.toString=function(e){let n=e?function(r){return e.call(this,r,Vt)}:Vt;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};var Xt=Kt;function Bn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ce(t,e,n){if(!e)return t;let r=n&&n.encode||Bn,s=a.isFunction(n)?{serialize:n}:n,i=s&&s.serialize,o;if(i?o=i(e,s):o=a.isURLSearchParams(e)?e.toString():new Xt(e,s).toString(r),o){let c=t.indexOf("#");c!==-1&&(t=t.slice(0,c)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}l();var nt=class{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.forEach(this.handlers,function(r){r!==null&&e(r)})}},st=nt;l();l();l();l();var ne={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0};l();l();l();import Un from"crypto";l();import In from"url";var Qt=In.URLSearchParams;var ot="abcdefghijklmnopqrstuvwxyz",Yt="0123456789",Zt={DIGIT:Yt,ALPHA:ot,ALPHA_DIGIT:ot+ot.toUpperCase()+Yt},Fn=(t=16,e=Zt.ALPHA_DIGIT)=>{let n="",{length:r}=e,s=new Uint32Array(t);Un.randomFillSync(s);for(let i=0;i<t;i++)n+=e[s[i]%r];return n},er={isNode:!0,classes:{URLSearchParams:Qt,FormData:ve,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Zt,generateString:Fn,protocols:["http","https","file","data"]};var ct={};Mr(ct,{hasBrowserEnv:()=>at,hasStandardBrowserEnv:()=>Mn,hasStandardBrowserWebWorkerEnv:()=>Hn,navigator:()=>it,origin:()=>vn});l();var at=typeof window<"u"&&typeof document<"u",it=typeof navigator=="object"&&navigator||void 0,Mn=at&&(!it||["ReactNative","NativeScript","NS"].indexOf(it.product)<0),Hn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",vn=at&&window.location.href||"http://localhost";var x={...ct,...er};function lt(t,e){return re(t,new x.classes.URLSearchParams,{visitor:function(n,r,s,i){return x.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}l();function qn(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function jn(t){let e={},n=Object.keys(t),r,s=n.length,i;for(r=0;r<s;r++)i=n[r],e[i]=t[i];return e}function $n(t){function e(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;let c=Number.isFinite(+o),d=i>=n.length;return o=!o&&a.isArray(s)?s.length:o,d?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),e(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=jn(s[o])),!c)}if(a.isFormData(t)&&a.isFunction(t.entries)){let n={};return a.forEachEntry(t,(r,s)=>{e(qn(r),s,n,0)}),n}return null}var qe=$n;function zn(t,e,n){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}var ut={transitional:ne,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){let r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=a.isObject(e);if(i&&a.isHTMLForm(e)&&(e=new FormData(e)),a.isFormData(e))return s?JSON.stringify(qe(e)):e;if(a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e)||a.isReadableStream(e))return e;if(a.isArrayBufferView(e))return e.buffer;if(a.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return lt(e,this.formSerializer).toString();if((c=a.isFileList(e))||r.indexOf("multipart/form-data")>-1){let d=this.env&&this.env.FormData;return re(c?{"files[]":e}:e,d&&new d,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),zn(e)):e}],transformResponse:[function(e){let n=this.transitional||ut.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(e)||a.isReadableStream(e))return e;if(e&&a.isString(e)&&(r&&!this.responseType||s)){let o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(c){if(o)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:x.classes.FormData,Blob:x.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],t=>{ut.headers[t]={}});var ye=ut;l();l();var Jn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),tr=t=>{let e={},n,r,s;return t&&t.split(`
|
|
3
|
+
import{a as Hr,b as vr,c as qr}from"./chunk-WZ75OGYY.js";import"./chunk-XMZIY7XX.js";import{f as Bt}from"./chunk-EQGA7LH7.js";import"./chunk-T2T2UEPY.js";import"./chunk-M53RP3YP.js";import{c as Pt}from"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-UIRBHC5X.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import{b as l}from"./chunk-GZPNIYVZ.js";import{e as Mr,f as Qe}from"./chunk-OWGSC52X.js";l();l();import{mkdirSync as js,writeFileSync as $s}from"node:fs";import{randomUUID as zs}from"node:crypto";import{basename as Js,join as Fr}from"node:path";import{tmpdir as Ws}from"node:os";l();l();var Ye="/v1.0/im/bot/messages/get";l();l();l();l();l();function Ee(t,e){return function(){return t.apply(e,arguments)}}var{toString:jr}=Object.prototype,{getPrototypeOf:et}=Object,{iterator:Fe,toStringTag:Mt}=Symbol,Me=(t=>e=>{let n=jr.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),W=t=>(t=t.toLowerCase(),e=>Me(e)===t),He=t=>e=>typeof e===t,{isArray:he}=Array,me=He("undefined");function Te(t){return t!==null&&!me(t)&&t.constructor!==null&&!me(t.constructor)&&q(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var Ht=W("ArrayBuffer");function $r(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ht(t.buffer),e}var zr=He("string"),q=He("function"),vt=He("number"),xe=t=>t!==null&&typeof t=="object",Jr=t=>t===!0||t===!1,Ue=t=>{if(Me(t)!=="object")return!1;let e=et(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Mt in t)&&!(Fe in t)},Wr=t=>{if(!xe(t)||Te(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Vr=W("Date"),Kr=W("File"),Gr=t=>!!(t&&typeof t.uri<"u"),Xr=t=>t&&typeof t.getParts<"u",Qr=W("Blob"),Yr=W("FileList"),Zr=t=>xe(t)&&q(t.pipe);function en(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}var It=en(),Ut=typeof It.FormData<"u"?It.FormData:void 0,tn=t=>{let e;return t&&(Ut&&t instanceof Ut||q(t.append)&&((e=Me(t))==="formdata"||e==="object"&&q(t.toString)&&t.toString()==="[object FormData]"))},rn=W("URLSearchParams"),[nn,sn,on,an]=["ReadableStream","Request","Response","Headers"].map(W),cn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Se(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),he(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{if(Te(t))return;let i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length,c;for(r=0;r<o;r++)c=i[r],e.call(null,t[c],c,t)}}function qt(t,e){if(Te(t))return null;e=e.toLowerCase();let n=Object.keys(t),r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}var ae=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:globalThis,jt=t=>!me(t)&&t!==ae;function Ze(){let{caseless:t,skipUndefined:e}=jt(this)&&this||{},n={},r=(s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;let o=t&&qt(n,i)||i;Ue(n[o])&&Ue(s)?n[o]=Ze(n[o],s):Ue(s)?n[o]=Ze({},s):he(s)?n[o]=s.slice():(!e||!me(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Se(arguments[s],r);return n}var ln=(t,e,n,{allOwnKeys:r}={})=>(Se(e,(s,i)=>{n&&q(s)?Object.defineProperty(t,i,{value:Ee(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,i,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),un=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),fn=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},dn=(t,e,n,r)=>{let s,i,o,c={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)o=s[i],(!r||r(o,t,e))&&!c[o]&&(e[o]=t[o],c[o]=!0);t=n!==!1&&et(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},pn=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;let r=t.indexOf(e,n);return r!==-1&&r===n},mn=t=>{if(!t)return null;if(he(t))return t;let e=t.length;if(!vt(e))return null;let n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},hn=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&et(Uint8Array)),yn=(t,e)=>{let r=(t&&t[Fe]).call(t),s;for(;(s=r.next())&&!s.done;){let i=s.value;e.call(t,i[0],i[1])}},bn=(t,e)=>{let n,r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},gn=W("HTMLFormElement"),wn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ft=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Rn=W("RegExp"),$t=(t,e)=>{let n=Object.getOwnPropertyDescriptors(t),r={};Se(n,(s,i)=>{let o;(o=e(s,i,t))!==!1&&(r[i]=o||s)}),Object.defineProperties(t,r)},En=t=>{$t(t,(e,n)=>{if(q(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let r=t[n];if(q(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Tn=(t,e)=>{let n={},r=s=>{s.forEach(i=>{n[i]=!0})};return he(t)?r(t):r(String(t).split(e)),n},xn=()=>{},Sn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function An(t){return!!(t&&q(t.append)&&t[Mt]==="FormData"&&t[Fe])}var Cn=t=>{let e=new Array(10),n=(r,s)=>{if(xe(r)){if(e.indexOf(r)>=0)return;if(Te(r))return r;if(!("toJSON"in r)){e[s]=r;let i=he(r)?[]:{};return Se(r,(o,c)=>{let d=n(o,s+1);!me(d)&&(i[c]=d)}),e[s]=void 0,i}}return r};return n(t,0)},On=W("AsyncFunction"),_n=t=>t&&(xe(t)||q(t))&&q(t.then)&&q(t.catch),zt=((t,e)=>t?setImmediate:e?((n,r)=>(ae.addEventListener("message",({source:s,data:i})=>{s===ae&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),ae.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",q(ae.postMessage)),kn=typeof queueMicrotask<"u"?queueMicrotask.bind(ae):typeof process<"u"&&process.nextTick||zt,Dn=t=>t!=null&&q(t[Fe]),a={isArray:he,isArrayBuffer:Ht,isBuffer:Te,isFormData:tn,isArrayBufferView:$r,isString:zr,isNumber:vt,isBoolean:Jr,isObject:xe,isPlainObject:Ue,isEmptyObject:Wr,isReadableStream:nn,isRequest:sn,isResponse:on,isHeaders:an,isUndefined:me,isDate:Vr,isFile:Kr,isReactNativeBlob:Gr,isReactNative:Xr,isBlob:Qr,isRegExp:Rn,isFunction:q,isStream:Zr,isURLSearchParams:rn,isTypedArray:hn,isFileList:Yr,forEach:Se,merge:Ze,extend:ln,trim:cn,stripBOM:un,inherits:fn,toFlatObject:dn,kindOf:Me,kindOfTest:W,endsWith:pn,toArray:mn,forEachEntry:yn,matchAll:bn,isHTMLForm:gn,hasOwnProperty:Ft,hasOwnProp:Ft,reduceDescriptors:$t,freezeMethods:En,toObjectSet:Tn,toCamelCase:wn,noop:xn,toFiniteNumber:Sn,findKey:qt,global:ae,isContextDefined:jt,isSpecCompliantForm:An,toJSONObject:Cn,isAsyncFn:On,isThenable:_n,setImmediate:zt,asap:kn,isIterable:Dn};l();l();l();l();l();var F=class t extends Error{static from(e,n,r,s,i,o){let c=new t(e.message,n||e.code,r,s,i);return c.cause=e,c.name=e.name,e.status!=null&&c.status==null&&(c.status=e.status),o&&Object.assign(c,o),c}constructor(e,n,r,s,i){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}};F.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";F.ERR_BAD_OPTION="ERR_BAD_OPTION";F.ECONNABORTED="ECONNABORTED";F.ETIMEDOUT="ETIMEDOUT";F.ERR_NETWORK="ERR_NETWORK";F.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";F.ERR_DEPRECATED="ERR_DEPRECATED";F.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";F.ERR_BAD_REQUEST="ERR_BAD_REQUEST";F.ERR_CANCELED="ERR_CANCELED";F.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";F.ERR_INVALID_URL="ERR_INVALID_URL";var y=F;l();var Jt=Qe(Hr(),1),ve=Jt.default;function rt(t){return a.isPlainObject(t)||a.isArray(t)}function Wt(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function tt(t,e,n){return t?t.concat(e).map(function(s,i){return s=Wt(s),!n&&i?"["+s+"]":s}).join(n?".":""):e}function Nn(t){return a.isArray(t)&&!t.some(rt)}var Ln=a.toFlatObject(a,{},null,function(e){return/^is[A-Z]/.test(e)});function Pn(t,e,n){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new(ve||FormData),n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,m){return!a.isUndefined(m[g])});let r=n.metaTokens,s=n.visitor||f,i=n.dots,o=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(a.isDate(p))return p.toISOString();if(a.isBoolean(p))return p.toString();if(!d&&a.isBlob(p))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(p)||a.isTypedArray(p)?d&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function f(p,g,m){let S=p;if(a.isReactNative(e)&&a.isReactNativeBlob(p))return e.append(tt(m,g,i),u(p)),!1;if(p&&!m&&typeof p=="object"){if(a.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(a.isArray(p)&&Nn(p)||(a.isFileList(p)||a.endsWith(g,"[]"))&&(S=a.toArray(p)))return g=Wt(g),S.forEach(function(T,_){!(a.isUndefined(T)||T===null)&&e.append(o===!0?tt([g],_,i):o===null?g:g+"[]",u(T))}),!1}return rt(p)?!0:(e.append(tt(m,g,i),u(p)),!1)}let h=[],b=Object.assign(Ln,{defaultVisitor:f,convertValue:u,isVisitable:rt});function R(p,g){if(!a.isUndefined(p)){if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));h.push(p),a.forEach(p,function(S,C){(!(a.isUndefined(S)||S===null)&&s.call(e,S,a.isString(C)?C.trim():C,g,b))===!0&&R(S,g?g.concat(C):[C])}),h.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return R(t),e}var re=Pn;function Vt(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Kt(t,e){this._pairs=[],t&&re(t,this,e)}var Gt=Kt.prototype;Gt.append=function(e,n){this._pairs.push([e,n])};Gt.toString=function(e){let n=e?function(r){return e.call(this,r,Vt)}:Vt;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};var Xt=Kt;function Bn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ce(t,e,n){if(!e)return t;let r=n&&n.encode||Bn,s=a.isFunction(n)?{serialize:n}:n,i=s&&s.serialize,o;if(i?o=i(e,s):o=a.isURLSearchParams(e)?e.toString():new Xt(e,s).toString(r),o){let c=t.indexOf("#");c!==-1&&(t=t.slice(0,c)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}l();var nt=class{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.forEach(this.handlers,function(r){r!==null&&e(r)})}},st=nt;l();l();l();l();var ne={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0};l();l();l();import Un from"crypto";l();import In from"url";var Qt=In.URLSearchParams;var ot="abcdefghijklmnopqrstuvwxyz",Yt="0123456789",Zt={DIGIT:Yt,ALPHA:ot,ALPHA_DIGIT:ot+ot.toUpperCase()+Yt},Fn=(t=16,e=Zt.ALPHA_DIGIT)=>{let n="",{length:r}=e,s=new Uint32Array(t);Un.randomFillSync(s);for(let i=0;i<t;i++)n+=e[s[i]%r];return n},er={isNode:!0,classes:{URLSearchParams:Qt,FormData:ve,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Zt,generateString:Fn,protocols:["http","https","file","data"]};var ct={};Mr(ct,{hasBrowserEnv:()=>at,hasStandardBrowserEnv:()=>Mn,hasStandardBrowserWebWorkerEnv:()=>Hn,navigator:()=>it,origin:()=>vn});l();var at=typeof window<"u"&&typeof document<"u",it=typeof navigator=="object"&&navigator||void 0,Mn=at&&(!it||["ReactNative","NativeScript","NS"].indexOf(it.product)<0),Hn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",vn=at&&window.location.href||"http://localhost";var x={...ct,...er};function lt(t,e){return re(t,new x.classes.URLSearchParams,{visitor:function(n,r,s,i){return x.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}l();function qn(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function jn(t){let e={},n=Object.keys(t),r,s=n.length,i;for(r=0;r<s;r++)i=n[r],e[i]=t[i];return e}function $n(t){function e(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;let c=Number.isFinite(+o),d=i>=n.length;return o=!o&&a.isArray(s)?s.length:o,d?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),e(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=jn(s[o])),!c)}if(a.isFormData(t)&&a.isFunction(t.entries)){let n={};return a.forEachEntry(t,(r,s)=>{e(qn(r),s,n,0)}),n}return null}var qe=$n;function zn(t,e,n){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}var ut={transitional:ne,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){let r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=a.isObject(e);if(i&&a.isHTMLForm(e)&&(e=new FormData(e)),a.isFormData(e))return s?JSON.stringify(qe(e)):e;if(a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e)||a.isReadableStream(e))return e;if(a.isArrayBufferView(e))return e.buffer;if(a.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return lt(e,this.formSerializer).toString();if((c=a.isFileList(e))||r.indexOf("multipart/form-data")>-1){let d=this.env&&this.env.FormData;return re(c?{"files[]":e}:e,d&&new d,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),zn(e)):e}],transformResponse:[function(e){let n=this.transitional||ut.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(e)||a.isReadableStream(e))return e;if(e&&a.isString(e)&&(r&&!this.responseType||s)){let o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(c){if(o)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:x.classes.FormData,Blob:x.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],t=>{ut.headers[t]={}});var ye=ut;l();l();var Jn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),tr=t=>{let e={},n,r,s;return t&&t.split(`
|
|
4
4
|
`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||e[n]&&Jn[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};var rr=Symbol("internals");function Ae(t){return t&&String(t).trim().toLowerCase()}function je(t){return t===!1||t==null?t:a.isArray(t)?t.map(je):String(t)}function Wn(t){let e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}var Vn=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ft(t,e,n,r,s){if(a.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!a.isString(e)){if(a.isString(r))return e.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(e)}}function Kn(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Gn(t,e){let n=a.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(s,i,o){return this[r].call(this,e,s,i,o)},configurable:!0})})}var be=class{constructor(e){e&&this.set(e)}set(e,n,r){let s=this;function i(c,d,u){let f=Ae(d);if(!f)throw new Error("header name must be a non-empty string");let h=a.findKey(s,f);(!h||s[h]===void 0||u===!0||u===void 0&&s[h]!==!1)&&(s[h||d]=je(c))}let o=(c,d)=>a.forEach(c,(u,f)=>i(u,f,d));if(a.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if(a.isString(e)&&(e=e.trim())&&!Vn(e))o(tr(e),n);else if(a.isObject(e)&&a.isIterable(e)){let c={},d,u;for(let f of e){if(!a.isArray(f))throw TypeError("Object iterator must return a key-value pair");c[u=f[0]]=(d=c[u])?a.isArray(d)?[...d,f[1]]:[d,f[1]]:f[1]}o(c,n)}else e!=null&&i(n,e,r);return this}get(e,n){if(e=Ae(e),e){let r=a.findKey(this,e);if(r){let s=this[r];if(!n)return s;if(n===!0)return Wn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ae(e),e){let r=a.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||ft(this,this[r],r,n)))}return!1}delete(e,n){let r=this,s=!1;function i(o){if(o=Ae(o),o){let c=a.findKey(r,o);c&&(!n||ft(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(e)?e.forEach(i):i(e),s}clear(e){let n=Object.keys(this),r=n.length,s=!1;for(;r--;){let i=n[r];(!e||ft(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){let n=this,r={};return a.forEach(this,(s,i)=>{let o=a.findKey(r,i);if(o){n[o]=je(s),delete n[i];return}let c=e?Kn(i):String(i).trim();c!==i&&delete n[i],n[c]=je(s),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
5
5
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){let r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){let r=(this[rr]=this[rr]={accessors:{}}).accessors,s=this.prototype;function i(o){let c=Ae(o);r[c]||(Gn(s,o),r[c]=!0)}return a.isArray(e)?e.forEach(i):i(e),this}};be.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(be.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});a.freezeMethods(be);var O=be;function Ce(t,e){let n=this||ye,r=e||n,s=O.from(r.headers),i=r.data;return a.forEach(t,function(c){i=c.call(n,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}l();function Oe(t){return!!(t&&t.__CANCEL__)}l();var dt=class extends y{constructor(e,n,r){super(e??"canceled",y.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}},$=dt;l();l();l();function G(t,e,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}l();l();function pt(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}l();function mt(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function le(t,e,n){let r=!pt(e);return t&&(r||n==!1)?mt(t,e):e}var mr=Qe(vr(),1),br=Qe(qr(),1);import ls from"http";import us from"https";import hr from"http2";import yr from"util";import oe from"zlib";l();var ue="1.13.6";l();l();function _e(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var Xn=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function ht(t,e,n){let r=n&&n.Blob||x.classes.Blob,s=_e(t);if(e===void 0&&r&&(e=!0),s==="data"){t=s.length?t.slice(s.length+1):t;let i=Xn.exec(t);if(!i)throw new y("Invalid URL",y.ERR_INVALID_URL);let o=i[1],c=i[2],d=i[3],u=Buffer.from(decodeURIComponent(d),c?"base64":"utf8");if(e){if(!r)throw new y("Blob is not supported",y.ERR_NOT_SUPPORT);return new r([u],{type:o})}return u}throw new y("Unsupported protocol "+s,y.ERR_NOT_SUPPORT)}import se from"stream";l();import Qn from"stream";var yt=Symbol("internals"),bt=class extends Qn.Transform{constructor(e){e=a.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(r,s)=>!a.isUndefined(s[r])),super({readableHighWaterMark:e.chunkSize});let n=this[yt]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",r=>{r==="progress"&&(n.isCaptured||(n.isCaptured=!0))})}_read(e){let n=this[yt];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let s=this[yt],i=s.maxRate,o=this.readableHighWaterMark,c=s.timeWindow,d=1e3/c,u=i/d,f=s.minChunkSize!==!1?Math.max(s.minChunkSize,u*.01):0,h=(R,p)=>{let g=Buffer.byteLength(R);s.bytesSeen+=g,s.bytes+=g,s.isCaptured&&this.emit("progress",s.bytesSeen),this.push(R)?process.nextTick(p):s.onReadCallback=()=>{s.onReadCallback=null,process.nextTick(p)}},b=(R,p)=>{let g=Buffer.byteLength(R),m=null,S=o,C,T=0;if(i){let _=Date.now();(!s.ts||(T=_-s.ts)>=c)&&(s.ts=_,C=u-s.bytes,s.bytes=C<0?-C:0,T=0),C=u-s.bytes}if(i){if(C<=0)return setTimeout(()=>{p(null,R)},c-T);C<S&&(S=C)}S&&g>S&&g-S>f&&(m=R.subarray(S),R=R.subarray(0,S)),h(R,m?()=>{process.nextTick(p,null,m)}:p)};b(e,function R(p,g){if(p)return r(p);g?b(g,R):r(null)})}},gt=bt;import{EventEmitter as fs}from"events";l();import Zn from"util";import{Readable as es}from"stream";l();var{asyncIterator:nr}=Symbol,Yn=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[nr]?yield*t[nr]():yield t},$e=Yn;var ts=x.ALPHABET.ALPHA_DIGIT+"-_",ke=typeof TextEncoder=="function"?new TextEncoder:new Zn.TextEncoder,fe=`\r
|
|
6
6
|
`,rs=ke.encode(fe),ns=2,wt=class{constructor(e,n){let{escapeName:r}=this.constructor,s=a.isString(n),i=`Content-Disposition: form-data; name="${r(e)}"${!s&&n.name?`; filename="${r(n.name)}"`:""}${fe}`;s?n=ke.encode(String(n).replace(/\r?\n|\r\n?/g,fe)):i+=`Content-Type: ${n.type||"application/octet-stream"}${fe}`,this.headers=ke.encode(i+fe),this.contentLength=s?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+ns,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;a.isTypedArray(e)?yield e:yield*$e(e),yield rs}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},ss=(t,e,n)=>{let{tag:r="form-data-boundary",size:s=25,boundary:i=r+"-"+x.generateString(s,ts)}=n||{};if(!a.isFormData(t))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let o=ke.encode("--"+i+fe),c=ke.encode("--"+i+"--"+fe),d=c.byteLength,u=Array.from(t.entries()).map(([h,b])=>{let R=new wt(h,b);return d+=R.size,R});d+=o.byteLength*u.length,d=a.toFiniteNumber(d);let f={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(d)&&(f["Content-Length"]=d),e&&e(f),es.from(async function*(){for(let h of u)yield o,yield*h.encode();yield c}())},sr=ss;l();import os from"stream";var Rt=class extends os.Transform{__transform(e,n,r){this.push(e),r()}_transform(e,n,r){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let s=Buffer.alloc(2);s[0]=120,s[1]=156,this.push(s,n)}this.__transform(e,n,r)}},or=Rt;l();var is=(t,e)=>a.isAsyncFn(t)?function(...n){let r=n.pop();t.apply(this,n).then(s=>{try{e?r(null,...e(s)):r(null,s)}catch(i){r(i)}},r)}:t,ir=is;l();l();function as(t,e){t=t||10;let n=new Array(t),r=new Array(t),s=0,i=0,o;return e=e!==void 0?e:1e3,function(d){let u=Date.now(),f=r[i];o||(o=u),n[s]=d,r[s]=u;let h=i,b=0;for(;h!==s;)b+=n[h++],h=h%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),u-o<e)return;let R=f&&u-f;return R?Math.round(b*1e3/R):void 0}}var ar=as;l();function cs(t,e){let n=0,r=1e3/e,s,i,o=(u,f=Date.now())=>{n=f,s=null,i&&(clearTimeout(i),i=null),t(...u)};return[(...u)=>{let f=Date.now(),h=f-n;h>=r?o(u,f):(s=u,i||(i=setTimeout(()=>{i=null,o(s)},r-h)))},()=>s&&o(s)]}var cr=cs;var Y=(t,e,n=3)=>{let r=0,s=ar(50,250);return cr(i=>{let o=i.loaded,c=i.lengthComputable?i.total:void 0,d=o-r,u=s(d),f=o<=c;r=o;let h={loaded:o,total:c,progress:c?o/c:void 0,bytes:d,rate:u||void 0,estimated:u&&c&&f?(c-o)/u:void 0,event:i,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(h)},n)},ge=(t,e)=>{let n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},we=t=>(...e)=>a.asap(()=>t(...e));l();function Et(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;let e=t.indexOf(",");if(e<0)return 0;let n=t.slice(5,e),r=t.slice(e+1);if(/;base64/i.test(n)){let i=r.length,o=r.length;for(let b=0;b<o;b++)if(r.charCodeAt(b)===37&&b+2<o){let R=r.charCodeAt(b+1),p=r.charCodeAt(b+2);(R>=48&&R<=57||R>=65&&R<=70||R>=97&&R<=102)&&(p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102)&&(i-=2,b+=2)}let c=0,d=o-1,u=b=>b>=2&&r.charCodeAt(b-2)===37&&r.charCodeAt(b-1)===51&&(r.charCodeAt(b)===68||r.charCodeAt(b)===100);d>=0&&(r.charCodeAt(d)===61?(c++,d--):u(d)&&(c++,d-=3)),c===1&&d>=0&&(r.charCodeAt(d)===61||u(d))&&c++;let h=Math.floor(i/4)*3-(c||0);return h>0?h:0}return Buffer.byteLength(r,"utf8")}var lr={flush:oe.constants.Z_SYNC_FLUSH,finishFlush:oe.constants.Z_SYNC_FLUSH},ds={flush:oe.constants.BROTLI_OPERATION_FLUSH,finishFlush:oe.constants.BROTLI_OPERATION_FLUSH},ur=a.isFunction(oe.createBrotliDecompress),{http:ps,https:ms}=br.default,hs=/https:?/,fr=x.protocols.map(t=>t+":"),dr=(t,[e,n])=>(t.on("end",n).on("error",n),e),Tt=class{constructor(){this.sessions=Object.create(null)}getSession(e,n){n=Object.assign({sessionTimeout:1e3},n);let r=this.sessions[e];if(r){let f=r.length;for(let h=0;h<f;h++){let[b,R]=r[h];if(!b.destroyed&&!b.closed&&yr.isDeepStrictEqual(R,n))return b}}let s=hr.connect(e,n),i,o=()=>{if(i)return;i=!0;let f=r,h=f.length,b=h;for(;b--;)if(f[b][0]===s){h===1?delete this.sessions[e]:f.splice(b,1);return}},c=s.request,{sessionTimeout:d}=n;if(d!=null){let f,h=0;s.request=function(){let b=c.apply(this,arguments);return h++,f&&(clearTimeout(f),f=null),b.once("close",()=>{--h||(f=setTimeout(()=>{f=null,o()},d))}),b}}s.once("close",o);let u=[s,n];return r?r.push(u):r=this.sessions[e]=[u],s}},ys=new Tt;function bs(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function gr(t,e,n){let r=e;if(!r&&r!==!1){let s=mr.default.getProxyForUrl(n);s&&(r=new URL(s))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){if(!!(r.auth.username||r.auth.password))r.auth=(r.auth.username||"")+":"+(r.auth.password||"");else if(typeof r.auth=="object")throw new y("Invalid proxy authorization",y.ERR_BAD_OPTION,{proxy:r});let o=Buffer.from(r.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+o}t.headers.host=t.hostname+(t.port?":"+t.port:"");let s=r.hostname||r.host;t.hostname=s,t.host=s,t.port=r.port,t.path=n,r.protocol&&(t.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}t.beforeRedirects.proxy=function(i){gr(i,e,i.href)}}var gs=typeof process<"u"&&a.kindOf(process)==="process",ws=t=>new Promise((e,n)=>{let r,s,i=(d,u)=>{s||(s=!0,r&&r(d,u))},o=d=>{i(d),e(d)},c=d=>{i(d,!0),n(d)};t(o,c,d=>r=d).catch(c)}),Rs=({address:t,family:e})=>{if(!a.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},pr=(t,e)=>Rs(a.isObject(t)?t:{address:t,family:e}),Es={request(t,e){let n=t.protocol+"//"+t.hostname+":"+(t.port||(t.protocol==="https:"?443:80)),{http2Options:r,headers:s}=t,i=ys.getSession(n,r),{HTTP2_HEADER_SCHEME:o,HTTP2_HEADER_METHOD:c,HTTP2_HEADER_PATH:d,HTTP2_HEADER_STATUS:u}=hr.constants,f={[o]:t.protocol.replace(":",""),[c]:t.method,[d]:t.path};a.forEach(s,(b,R)=>{R.charAt(0)!==":"&&(f[R]=b)});let h=i.request(f);return h.once("response",b=>{let R=h;b=Object.assign({},b);let p=b[u];delete b[u],R.headers=b,R.statusCode=+p,e(R)}),h}},wr=gs&&function(e){return ws(async function(r,s,i){let{data:o,lookup:c,family:d,httpVersion:u=1,http2Options:f}=e,{responseType:h,responseEncoding:b}=e,R=e.method.toUpperCase(),p,g=!1,m;if(u=+u,Number.isNaN(u))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(u!==1&&u!==2)throw TypeError(`Unsupported protocol version '${u}'`);let S=u===2;if(c){let E=ir(c,w=>a.isArray(w)?w:[w]);c=(w,A,j)=>{E(w,A,(D,J,te)=>{if(D)return j(D);let v=a.isArray(J)?J.map(Ie=>pr(Ie)):[pr(J,te)];A.all?j(D,v):j(D,v[0].address,v[0].family)})}}let C=new fs;function T(E){try{C.emit("abort",!E||E.type?new $(null,e,m):E)}catch(w){console.warn("emit error",w)}}C.once("abort",s);let _=()=>{e.cancelToken&&e.cancelToken.unsubscribe(T),e.signal&&e.signal.removeEventListener("abort",T),C.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(T),e.signal&&(e.signal.aborted?T():e.signal.addEventListener("abort",T))),i((E,w)=>{if(p=!0,w){g=!0,_();return}let{data:A}=E;if(A instanceof se.Readable||A instanceof se.Duplex){let j=se.finished(A,()=>{j(),_()})}else _()});let M=le(e.baseURL,e.url,e.allowAbsoluteUrls),k=new URL(M,x.hasBrowserEnv?x.origin:void 0),L=k.protocol||fr[0];if(L==="data:"){if(e.maxContentLength>-1){let w=String(e.url||M||"");if(Et(w)>e.maxContentLength)return s(new y("maxContentLength size of "+e.maxContentLength+" exceeded",y.ERR_BAD_RESPONSE,e))}let E;if(R!=="GET")return G(r,s,{status:405,statusText:"method not allowed",headers:{},config:e});try{E=ht(e.url,h==="blob",{Blob:e.env&&e.env.Blob})}catch(w){throw y.from(w,y.ERR_BAD_REQUEST,e)}return h==="text"?(E=E.toString(b),(!b||b==="utf8")&&(E=a.stripBOM(E))):h==="stream"&&(E=se.Readable.from(E)),G(r,s,{data:E,status:200,statusText:"OK",headers:new O,config:e})}if(fr.indexOf(L)===-1)return s(new y("Unsupported protocol "+L,y.ERR_BAD_REQUEST,e));let P=O.from(e.headers).normalize();P.set("User-Agent","axios/"+ue,!1);let{onUploadProgress:Z,onDownloadProgress:de}=e,ie=e.maxRate,X,K;if(a.isSpecCompliantForm(o)){let E=P.getContentType(/boundary=([-_\w\d]{10,70})/i);o=sr(o,w=>{P.set(w)},{tag:`axios-${ue}-boundary`,boundary:E&&E[1]||void 0})}else if(a.isFormData(o)&&a.isFunction(o.getHeaders)){if(P.set(o.getHeaders()),!P.hasContentLength())try{let E=await yr.promisify(o.getLength).call(o);Number.isFinite(E)&&E>=0&&P.setContentLength(E)}catch{}}else if(a.isBlob(o)||a.isFile(o))o.size&&P.setContentType(o.type||"application/octet-stream"),P.setContentLength(o.size||0),o=se.Readable.from($e(o));else if(o&&!a.isStream(o)){if(!Buffer.isBuffer(o))if(a.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else if(a.isString(o))o=Buffer.from(o,"utf-8");else return s(new y("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",y.ERR_BAD_REQUEST,e));if(P.setContentLength(o.length,!1),e.maxBodyLength>-1&&o.length>e.maxBodyLength)return s(new y("Request body larger than maxBodyLength limit",y.ERR_BAD_REQUEST,e))}let Q=a.toFiniteNumber(P.getContentLength());a.isArray(ie)?(X=ie[0],K=ie[1]):X=K=ie,o&&(Z||X)&&(a.isStream(o)||(o=se.Readable.from(o,{objectMode:!1})),o=se.pipeline([o,new gt({maxRate:a.toFiniteNumber(X)})],a.noop),Z&&o.on("progress",dr(o,ge(Q,Y(we(Z),!1,3)))));let ee;if(e.auth){let E=e.auth.username||"",w=e.auth.password||"";ee=E+":"+w}if(!ee&&k.username){let E=k.username,w=k.password;ee=E+":"+w}ee&&P.delete("authorization");let B;try{B=ce(k.pathname+k.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(E){let w=new Error(E.message);return w.config=e,w.url=e.url,w.exists=!0,s(w)}P.set("Accept-Encoding","gzip, compress, deflate"+(ur?", br":""),!1);let I={path:B,method:R,headers:P.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:ee,protocol:L,family:d,beforeRedirect:bs,beforeRedirects:{},http2Options:f};!a.isUndefined(c)&&(I.lookup=c),e.socketPath?I.socketPath=e.socketPath:(I.hostname=k.hostname.startsWith("[")?k.hostname.slice(1,-1):k.hostname,I.port=k.port,gr(I,e.proxy,L+"//"+k.hostname+(k.port?":"+k.port:"")+I.path));let H,pe=hs.test(I.protocol);if(I.agent=pe?e.httpsAgent:e.httpAgent,S?H=Es:e.transport?H=e.transport:e.maxRedirects===0?H=pe?us:ls:(e.maxRedirects&&(I.maxRedirects=e.maxRedirects),e.beforeRedirect&&(I.beforeRedirects.config=e.beforeRedirect),H=pe?ms:ps),e.maxBodyLength>-1?I.maxBodyLength=e.maxBodyLength:I.maxBodyLength=1/0,e.insecureHTTPParser&&(I.insecureHTTPParser=e.insecureHTTPParser),m=H.request(I,function(w){if(m.destroyed)return;let A=[w],j=a.toFiniteNumber(w.headers["content-length"]);if(de||K){let v=new gt({maxRate:a.toFiniteNumber(K)});de&&v.on("progress",dr(v,ge(j,Y(we(de),!0,3)))),A.push(v)}let D=w,J=w.req||m;if(e.decompress!==!1&&w.headers["content-encoding"])switch((R==="HEAD"||w.statusCode===204)&&delete w.headers["content-encoding"],(w.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":A.push(oe.createUnzip(lr)),delete w.headers["content-encoding"];break;case"deflate":A.push(new or),A.push(oe.createUnzip(lr)),delete w.headers["content-encoding"];break;case"br":ur&&(A.push(oe.createBrotliDecompress(ds)),delete w.headers["content-encoding"])}D=A.length>1?se.pipeline(A,a.noop):A[0];let te={status:w.statusCode,statusText:w.statusMessage,headers:new O(w.headers),config:e,request:J};if(h==="stream")te.data=D,G(r,s,te);else{let v=[],Ie=0;D.on("data",function(U){v.push(U),Ie+=U.length,e.maxContentLength>-1&&Ie>e.maxContentLength&&(g=!0,D.destroy(),T(new y("maxContentLength size of "+e.maxContentLength+" exceeded",y.ERR_BAD_RESPONSE,e,J)))}),D.on("aborted",function(){if(g)return;let U=new y("stream has been aborted",y.ERR_BAD_RESPONSE,e,J);D.destroy(U),s(U)}),D.on("error",function(U){m.destroyed||s(y.from(U,null,e,J))}),D.on("end",function(){try{let U=v.length===1?v[0]:Buffer.concat(v);h!=="arraybuffer"&&(U=U.toString(b),(!b||b==="utf8")&&(U=a.stripBOM(U))),te.data=U}catch(U){return s(y.from(U,null,e,te.request,te))}G(r,s,te)})}C.once("abort",v=>{D.destroyed||(D.emit("error",v),D.destroy())})}),C.once("abort",E=>{m.close?m.close():m.destroy(E)}),m.on("error",function(w){s(y.from(w,null,e,m))}),m.on("socket",function(w){w.setKeepAlive(!0,1e3*60)}),e.timeout){let E=parseInt(e.timeout,10);if(Number.isNaN(E)){T(new y("error trying to parse `config.timeout` to int",y.ERR_BAD_OPTION_VALUE,e,m));return}m.setTimeout(E,function(){if(p)return;let A=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",j=e.transitional||ne;e.timeoutErrorMessage&&(A=e.timeoutErrorMessage),T(new y(A,j.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,m))})}else m.setTimeout(0);if(a.isStream(o)){let E=!1,w=!1;o.on("end",()=>{E=!0}),o.once("error",A=>{w=!0,m.destroy(A)}),o.on("close",()=>{!E&&!w&&T(new $("Request stream has been aborted",e,m))}),o.pipe(m)}else o&&m.write(o),m.end()})};l();l();l();var Rr=x.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,x.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(x.origin),x.navigator&&/(msie|trident)/i.test(x.navigator.userAgent)):()=>!0;l();var Er=x.hasStandardBrowserEnv?{write(t,e,n,r,s,i,o){if(typeof document>"u")return;let c=[`${t}=${encodeURIComponent(e)}`];a.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),a.isString(r)&&c.push(`path=${r}`),a.isString(s)&&c.push(`domain=${s}`),i===!0&&c.push("secure"),a.isString(o)&&c.push(`SameSite=${o}`),document.cookie=c.join("; ")},read(t){if(typeof document>"u")return null;let e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};l();var Tr=t=>t instanceof O?{...t}:t;function V(t,e){e=e||{};let n={};function r(u,f,h,b){return a.isPlainObject(u)&&a.isPlainObject(f)?a.merge.call({caseless:b},u,f):a.isPlainObject(f)?a.merge({},f):a.isArray(f)?f.slice():f}function s(u,f,h,b){if(a.isUndefined(f)){if(!a.isUndefined(u))return r(void 0,u,h,b)}else return r(u,f,h,b)}function i(u,f){if(!a.isUndefined(f))return r(void 0,f)}function o(u,f){if(a.isUndefined(f)){if(!a.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function c(u,f,h){if(h in e)return r(u,f);if(h in t)return r(void 0,u)}let d={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(u,f,h)=>s(Tr(u),Tr(f),h,!0)};return a.forEach(Object.keys({...t,...e}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;let h=a.hasOwnProp(d,f)?d[f]:s,b=h(t[f],e[f],f);a.isUndefined(b)&&h!==c||(n[f]=b)}),n}var ze=t=>{let e=V({},t),{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:c}=e;if(e.headers=o=O.from(o),e.url=ce(le(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(n)){if(x.hasStandardBrowserEnv||x.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(a.isFunction(n.getHeaders)){let d=n.getHeaders(),u=["content-type","content-length"];Object.entries(d).forEach(([f,h])=>{u.includes(f.toLowerCase())&&o.set(f,h)})}}if(x.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(e)),r||r!==!1&&Rr(e.url))){let d=s&&i&&Er.read(i);d&&o.set(s,d)}return e};var Ts=typeof XMLHttpRequest<"u",xr=Ts&&function(t){return new Promise(function(n,r){let s=ze(t),i=s.data,o=O.from(s.headers).normalize(),{responseType:c,onUploadProgress:d,onDownloadProgress:u}=s,f,h,b,R,p;function g(){R&&R(),p&&p(),s.cancelToken&&s.cancelToken.unsubscribe(f),s.signal&&s.signal.removeEventListener("abort",f)}let m=new XMLHttpRequest;m.open(s.method.toUpperCase(),s.url,!0),m.timeout=s.timeout;function S(){if(!m)return;let T=O.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),M={data:!c||c==="text"||c==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:T,config:t,request:m};G(function(L){n(L),g()},function(L){r(L),g()},M),m=null}"onloadend"in m?m.onloadend=S:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(S)},m.onabort=function(){m&&(r(new y("Request aborted",y.ECONNABORTED,t,m)),m=null)},m.onerror=function(_){let M=_&&_.message?_.message:"Network Error",k=new y(M,y.ERR_NETWORK,t,m);k.event=_||null,r(k),m=null},m.ontimeout=function(){let _=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded",M=s.transitional||ne;s.timeoutErrorMessage&&(_=s.timeoutErrorMessage),r(new y(_,M.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,t,m)),m=null},i===void 0&&o.setContentType(null),"setRequestHeader"in m&&a.forEach(o.toJSON(),function(_,M){m.setRequestHeader(M,_)}),a.isUndefined(s.withCredentials)||(m.withCredentials=!!s.withCredentials),c&&c!=="json"&&(m.responseType=s.responseType),u&&([b,p]=Y(u,!0),m.addEventListener("progress",b)),d&&m.upload&&([h,R]=Y(d),m.upload.addEventListener("progress",h),m.upload.addEventListener("loadend",R)),(s.cancelToken||s.signal)&&(f=T=>{m&&(r(!T||T.type?new $(null,t,m):T),m.abort(),m=null)},s.cancelToken&&s.cancelToken.subscribe(f),s.signal&&(s.signal.aborted?f():s.signal.addEventListener("abort",f)));let C=_e(s.url);if(C&&x.protocols.indexOf(C)===-1){r(new y("Unsupported protocol "+C+":",y.ERR_BAD_REQUEST,t));return}m.send(i||null)})};l();l();var xs=(t,e)=>{let{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s,i=function(u){if(!s){s=!0,c();let f=u instanceof Error?u:this.reason;r.abort(f instanceof y?f:new $(f instanceof Error?f.message:f))}},o=e&&setTimeout(()=>{o=null,i(new y(`timeout of ${e}ms exceeded`,y.ETIMEDOUT))},e),c=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),t=null)};t.forEach(u=>u.addEventListener("abort",i));let{signal:d}=r;return d.unsubscribe=()=>a.asap(c),d}},Sr=xs;l();var Ss=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},As=async function*(t,e){for await(let n of Cs(t))yield*Ss(n,e)},Cs=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}let e=t.getReader();try{for(;;){let{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},xt=(t,e,n,r)=>{let s=As(t,e),i=0,o,c=d=>{o||(o=!0,r&&r(d))};return new ReadableStream({async pull(d){try{let{done:u,value:f}=await s.next();if(u){c(),d.close();return}let h=f.byteLength;if(n){let b=i+=h;n(b)}d.enqueue(new Uint8Array(f))}catch(u){throw c(u),u}},cancel(d){return c(d),s.return()}},{highWaterMark:2})};var Ar=64*1024,{isFunction:Je}=a,Os=(({Request:t,Response:e})=>({Request:t,Response:e}))(a.global),{ReadableStream:Cr,TextEncoder:Or}=a.global,_r=(t,...e)=>{try{return!!t(...e)}catch{return!1}},_s=t=>{t=a.merge.call({skipUndefined:!0},Os,t);let{fetch:e,Request:n,Response:r}=t,s=e?Je(e):typeof fetch=="function",i=Je(n),o=Je(r);if(!s)return!1;let c=s&&Je(Cr),d=s&&(typeof Or=="function"?(p=>g=>p.encode(g))(new Or):async p=>new Uint8Array(await new n(p).arrayBuffer())),u=i&&c&&_r(()=>{let p=!1,g=new n(x.origin,{body:new Cr,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!g}),f=o&&c&&_r(()=>a.isReadableStream(new r("").body)),h={stream:f&&(p=>p.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!h[p]&&(h[p]=(g,m)=>{let S=g&&g[p];if(S)return S.call(g);throw new y(`Response type '${p}' is not supported`,y.ERR_NOT_SUPPORT,m)})});let b=async p=>{if(p==null)return 0;if(a.isBlob(p))return p.size;if(a.isSpecCompliantForm(p))return(await new n(x.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(a.isArrayBufferView(p)||a.isArrayBuffer(p))return p.byteLength;if(a.isURLSearchParams(p)&&(p=p+""),a.isString(p))return(await d(p)).byteLength},R=async(p,g)=>{let m=a.toFiniteNumber(p.getContentLength());return m??b(g)};return async p=>{let{url:g,method:m,data:S,signal:C,cancelToken:T,timeout:_,onDownloadProgress:M,onUploadProgress:k,responseType:L,headers:P,withCredentials:Z="same-origin",fetchOptions:de}=ze(p),ie=e||fetch;L=L?(L+"").toLowerCase():"text";let X=Sr([C,T&&T.toAbortSignal()],_),K=null,Q=X&&X.unsubscribe&&(()=>{X.unsubscribe()}),ee;try{if(k&&u&&m!=="get"&&m!=="head"&&(ee=await R(P,S))!==0){let w=new n(g,{method:"POST",body:S,duplex:"half"}),A;if(a.isFormData(S)&&(A=w.headers.get("content-type"))&&P.setContentType(A),w.body){let[j,D]=ge(ee,Y(we(k)));S=xt(w.body,Ar,j,D)}}a.isString(Z)||(Z=Z?"include":"omit");let B=i&&"credentials"in n.prototype,I={...de,signal:X,method:m.toUpperCase(),headers:P.normalize().toJSON(),body:S,duplex:"half",credentials:B?Z:void 0};K=i&&new n(g,I);let H=await(i?ie(K,de):ie(g,I)),pe=f&&(L==="stream"||L==="response");if(f&&(M||pe&&Q)){let w={};["status","statusText","headers"].forEach(J=>{w[J]=H[J]});let A=a.toFiniteNumber(H.headers.get("content-length")),[j,D]=M&&ge(A,Y(we(M),!0))||[];H=new r(xt(H.body,Ar,j,()=>{D&&D(),Q&&Q()}),w)}L=L||"text";let E=await h[a.findKey(h,L)||"text"](H,p);return!pe&&Q&&Q(),await new Promise((w,A)=>{G(w,A,{data:E,headers:O.from(H.headers),status:H.status,statusText:H.statusText,config:p,request:K})})}catch(B){throw Q&&Q(),B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,p,K,B&&B.response),{cause:B.cause||B}):y.from(B,B&&B.code,p,K,B&&B.response)}}},ks=new Map,St=t=>{let e=t&&t.env||{},{fetch:n,Request:r,Response:s}=e,i=[r,s,n],o=i.length,c=o,d,u,f=ks;for(;c--;)d=i[c],u=f.get(d),u===void 0&&f.set(d,u=c?new Map:_s(e)),f=u;return u},Fc=St();var At={http:wr,xhr:xr,fetch:{get:St}};a.forEach(At,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});var kr=t=>`- ${t}`,Ns=t=>a.isFunction(t)||t===null||t===!1;function Ls(t,e){t=a.isArray(t)?t:[t];let{length:n}=t,r,s,i={};for(let o=0;o<n;o++){r=t[o];let c;if(s=r,!Ns(r)&&(s=At[(c=String(r)).toLowerCase()],s===void 0))throw new y(`Unknown adapter '${c}'`);if(s&&(a.isFunction(s)||(s=s.get(e))))break;i[c||"#"+o]=s}if(!s){let o=Object.entries(i).map(([d,u])=>`adapter ${d} `+(u===!1?"is not supported by the environment":"is not available in the build")),c=n?o.length>1?`since :
|