itk-wasm
Version:
High-performance spatial analysis in a web browser, Node.js, and reproducible execution across programming languages and hardware architectures.
6 lines • 208 kB
JavaScript
var or=Object.defineProperty;var ir=(A,e)=>{for(var t in e)or(A,t,{get:e[t],enumerable:!0})};var gr="1.0.0-b.187",nr=gr;var ar={Int8:"int8",UInt8:"uint8",Int16:"int16",UInt16:"uint16",Int32:"int32",UInt32:"uint32",Int64:"int64",UInt64:"uint64",SizeValueType:"uint64",IdentifierType:"uint64",IndexValueType:"int64",OffsetValueType:"int64"},p=ar;var sr={Float32:"float32",Float64:"float64",SpacePrecisionType:"float64"},h=sr;function Br(A,e){let t=null;switch(A){case p.UInt8:{t=new Uint8Array(e);break}case p.Int8:{t=new Int8Array(e);break}case p.UInt16:{t=new Uint16Array(e);break}case p.Int16:{t=new Int16Array(e);break}case p.UInt32:{t=new Uint32Array(e);break}case p.Int32:{t=new Int32Array(e);break}case p.UInt64:{typeof globalThis.BigUint64Array=="function"?t=new BigUint64Array(e):t=new Uint8Array(e);break}case p.Int64:{typeof globalThis.BigInt64Array=="function"?t=new BigInt64Array(e):t=new Uint8Array(e);break}case h.Float32:{t=new Float32Array(e);break}case h.Float64:{t=new Float64Array(e);break}case"null":{t=null;break}case null:{t=null;break}default:throw new Error("Type is not supported as a TypedArray")}return t}var b=Br;var Cr={Unknown:"Unknown",Scalar:"Scalar",RGB:"RGB",RGBA:"RGBA",Offset:"Offset",Vector:"Vector",Point:"Point",CovariantVector:"CovariantVector",SymmetricSecondRankTensor:"SymmetricSecondRankTensor",DiffusionTensor3D:"DiffusionTensor3D",Complex:"Complex",FixedArray:"FixedArray",Array:"Array",Matrix:"Matrix",VariableLengthVector:"VariableLengthVector",VariableSizeMatrix:"VariableSizeMatrix"},U=Cr;var HA=class{constructor(e=2,t=p.UInt8,r=U.Scalar,I=1){this.dimension=e;this.componentType=t;this.pixelType=r;this.components=I}},YA=HA;function Qr(A,e,t,r,I){A[r+t*e]=I}var xA=Qr;var qA=class{constructor(e=new YA){this.imageType=e;let t=e.dimension;this.origin=new Array(t),this.origin.fill(0),this.spacing=new Array(t),this.spacing.fill(1),this.direction=new Float64Array(t*t),this.direction.fill(0);for(let r=0;r<t;r++)xA(this.direction,t,r,r,1);this.size=new Array(t),this.size.fill(0),this.metadata=new Map,this.data=null}name="Image";origin;spacing;direction;size;metadata;data},K=qA;function Er(A){let e=new K(A.imageType);if(e.name=A.name,e.origin=Array.from(A.origin),e.spacing=Array.from(A.spacing),e.direction=A.direction.slice(),e.size=Array.from(A.size),A.data!==null){let t=A.data.constructor;e.data=new t(A.data.length),e.data!=null&&e.data.set(A.data,0)}return e}var OA=Er;var lr=typeof globalThis.SharedArrayBuffer=="function";function cr(A){if(A.data===null)return A;if(lr){if(A.data.buffer instanceof SharedArrayBuffer)return A;let e=new SharedArrayBuffer(A.data.buffer.byteLength),t=A.data.constructor,r=new t(e);return r!==null&&r.set(A.data,0),A.data=r,A}else return OA(A)}var fr=cr;function ur(A){if(A.length<1)throw Error("At least one images is required.");let e=A[0];if(e.data===null)throw Error("Image data is null.");let t=new K(e.imageType);t.origin=Array.from(e.origin),t.spacing=Array.from(e.spacing);let r=t.imageType.dimension;t.direction=e.direction.slice();let I=r-1;t.size=Array.from(e.size);let o=A.reduce((g,a)=>g+a.size[I],0);t.size[I]=o;let i=t.size.reduce((g,a)=>g*a,1)*t.imageType.components,s=e.data.constructor;t.data=new s(i);let Q=t.imageType.components;for(let g=0;g<t.size.length-1;g++)Q*=t.size[g];let C=0;if(t.data!=null)for(let g=0;g<A.length;g++)t.data.set(A[g].data,Q*C),C+=A[g].size[I];else throw Error("Could not create result image data.");return t}var pr=ur;function dr(A){let e=A.slice((A.lastIndexOf(".")-1>>>0)+2);if(e.toLowerCase()==="gz"){let t=A.slice(0,-3).lastIndexOf(".");e=A.slice((t-1>>>0)+2)}else if(e.toLowerCase()==="cbor"){let t=A.slice(0,-5).lastIndexOf(".");e=A.slice((t-1>>>0)+2)}else if(e.toLowerCase()==="zst"){let t=A.slice(0,-10).lastIndexOf(".");e=A.slice((t-1>>>0)+2)}else if(e.toLowerCase()==="zip"){let t=A.slice(0,-4).lastIndexOf(".");e=A.slice((t-1>>>0)+2)}return e}var yr=dr;function mr(A,e,t,r){return A[r+t*e]}var hr=mr;function Dr(A,e){let t={...A.imageType};if(typeof e<"u"&&typeof e.pixelType<"u"&&(t.pixelType=e.pixelType,e.pixelType===U.Scalar&&t.components!==1))throw new Error("Cannot cast multi-component image to a scalar image");typeof e<"u"&&typeof e.componentType<"u"&&e.componentType!==A.imageType.componentType&&(t.componentType=e.componentType);let r=new K(t);if(r.name=A.name,r.origin=Array.from(A.origin),r.spacing=Array.from(A.spacing),r.direction=A.direction.slice(),r.size=Array.from(A.size),r.metadata=new Map(JSON.parse(JSON.stringify(Array.from(A.metadata)))),A.data!==null)if(typeof e<"u"&&typeof e.componentType<"u"&&e.componentType!==A.imageType.componentType)switch(A.imageType.componentType){case p.UInt8:case p.Int8:case p.UInt16:case p.Int16:case p.UInt32:case p.Int32:case h.Float32:case h.Float64:switch(r.imageType.componentType){case p.UInt8:r.data=new Uint8Array(A.data);break;case p.Int8:r.data=new Int8Array(A.data);break;case p.UInt16:r.data=new Uint16Array(A.data);break;case p.Int16:r.data=new Int16Array(A.data);break;case p.UInt32:r.data=new Uint32Array(A.data);break;case p.Int32:r.data=new Int32Array(A.data);break;case h.Float32:r.data=new Float32Array(A.data);break;case h.Float64:r.data=new Float64Array(A.data);break;case p.UInt64:r.data=new BigUint64Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=BigInt.asIntN(64,BigInt(A.data[I]));break;case p.Int64:r.data=new BigInt64Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=BigInt.asUintN(64,BigInt(A.data[I]));break}break;case p.UInt64:case p.Int64:switch(r.imageType.componentType){case p.UInt8:r.data=new Uint8Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=Number(A.data[I]);break;case p.Int8:r.data=new Int8Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=Number(A.data[I]);break;case p.UInt16:r.data=new Uint16Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=Number(A.data[I]);break;case p.Int16:r.data=new Int16Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=Number(A.data[I]);break;case p.UInt32:r.data=new Uint32Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=Number(A.data[I]);break;case p.Int32:r.data=new Int32Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=Number(A.data[I]);break;case h.Float32:r.data=new Float32Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=Number(A.data[I]);break;case h.Float64:r.data=new Float64Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=Number(A.data[I]);break;case p.UInt64:r.data=new BigUint64Array(A.data);break;case p.Int64:r.data=new BigInt64Array(A.data);break}break}else{let I=A.data.constructor;r.data=new I(A.data.length),r.data!=null&&r.data.set(A.data,0)}return r}var wr=Dr;var PA=class{fcn;workerQueue;runInfo;constructor(e,t){this.fcn=t,this.workerQueue=new Array(e),this.workerQueue.fill(null),this.runInfo=[]}runTasks(e,t=null){let r={taskQueue:[],results:[],addingTasks:!1,postponed:!1,runningWorkers:0,index:0,completedTasks:0,progressCallback:t,canceled:!1};return this.runInfo.push(r),r.index=this.runInfo.length-1,{promise:new Promise((I,o)=>{r.resolve=I,r.reject=o,r.results=new Array(e.length),r.completedTasks=0,r.addingTasks=!0,e.forEach((i,s)=>{this.addTask(r.index,s,i)}),r.addingTasks=!1}),runId:r.index}}terminateWorkers(){for(let e=0;e<this.workerQueue.length;e++){let t=this.workerQueue[e];t?.terminate(),this.workerQueue[e]=null}}cancel(e){let t=this.runInfo[e];t!=null&&(t.canceled=!0)}addTask(e,t,r){let I=this.runInfo[e];if(I?.canceled===!0){I.reject("Remaining tasks canceled"),this.clearTask(I.index);return}if(this.workerQueue.length>0){let o=this.workerQueue.pop();I.runningWorkers++,r[r.length-1].webWorker=o,this.fcn(...r).then(({webWorker:i,...s})=>{if(this.workerQueue.push(i),this.runInfo[e]!==null){if(I.runningWorkers--,I.results[t]=s,I.completedTasks++,I.progressCallback!=null&&I.progressCallback(I.completedTasks,I.results.length),I.taskQueue.length>0){let Q=I.taskQueue.shift();this.addTask(e,Q[0],Q[1])}else if(!I.addingTasks&&I.runningWorkers===0){let Q=I.results;I.resolve(Q),this.clearTask(I.index)}}}).catch(i=>{I.reject(i),this.clearTask(I.index)})}else I.runningWorkers!==0||I.postponed?I.taskQueue.push([t,r]):(I.postponed=!0,setTimeout(()=>{I.postponed=!1,this.addTask(I.index,t,r)},50))}clearTask(e){this.runInfo[e].results=[],this.runInfo[e].taskQueue=[],this.runInfo[e].progressCallback=null,this.runInfo[e].canceled=null,this.runInfo[e].reject=()=>{},this.runInfo[e].resolve=()=>{}}},Sr=PA;var KA=class{constructor(e=3,t=h.Float32,r=h.Float32,I=U.Scalar,o=1){this.dimension=e;this.pointComponentType=t;this.pointPixelComponentType=r;this.pointPixelType=I;this.pointPixelComponents=o}},WA=KA;var jA=class{constructor(e=new WA){this.pointSetType=e;this.name="PointSet",this.numberOfPoints=0,this.points=null,this.numberOfPointPixels=0,this.pointData=null}name="PointSet";numberOfPoints;points;numberOfPointPixels;pointData},Fr=jA;var vA=class{constructor(e=2,t=h.Float32,r=h.Float32,I=U.Scalar,o=1,i=p.Int32,s=h.Float32,Q=U.Scalar,C=1){this.dimension=e;this.pointComponentType=t;this.pointPixelComponentType=r;this.pointPixelType=I;this.pointPixelComponents=o;this.cellComponentType=i;this.cellPixelComponentType=s;this.cellPixelType=Q;this.cellPixelComponents=C}},ZA=vA;var VA=class{constructor(e=new ZA){this.meshType=e;this.name="Mesh",this.numberOfPoints=0,this.points=null,this.numberOfPointPixels=0,this.pointData=null,this.numberOfCells=0,this.cellBufferSize=0,this.cells=null,this.numberOfCellPixels=0,this.cellData=null}name="Mesh";numberOfPoints;points;numberOfPointPixels;pointData;numberOfCells;cells;cellBufferSize;numberOfCellPixels;cellData},Rr=VA;var zA=class{constructor(e=h.Float32,t=U.Scalar,r=1,I=h.Float32,o=U.Scalar,i=1){this.pointPixelComponentType=e;this.pointPixelType=t;this.pointPixelComponents=r;this.cellPixelComponentType=I;this.cellPixelType=o;this.cellPixelComponents=i}},XA=zA;var _A=class{constructor(e=new XA){this.polyDataType=e;this.polyDataType=e,this.name="PolyData",this.numberOfPoints=0,this.points=new Float32Array,this.verticesBufferSize=0,this.vertices=null,this.linesBufferSize=0,this.lines=null,this.polygonsBufferSize=0,this.polygons=null,this.triangleStripsBufferSize=0,this.triangleStrips=null,this.numberOfPointPixels=0,this.pointData=null,this.numberOfCellPixels=0,this.cellData=null}name="PolyData";numberOfPoints;points;verticesBufferSize;vertices;linesBufferSize;lines;polygonsBufferSize;polygons;triangleStripsBufferSize;triangleStrips;numberOfPointPixels;pointData;numberOfCellPixels;cellData},kr=_A;var Ur={Composite:"Composite",Identity:"Identity",Translation:"Translation",Euler2D:"Euler2D",Euler3D:"Euler3D",Rigid2D:"Rigid2D",Rigid3D:"Rigid3D",Rigid3DPerspective:"Rigid3DPerspective",Versor:"Versor",VersorRigid3D:"VersorRigid3D",Scale:"Scale",ScaleLogarithmic:"ScaleLogarithmic",ScaleSkewVersor3D:"ScaleSkewVersor3D",Similarity2D:"Similarity2D",Similarity3D:"Similarity3D",QuaternionRigid:"QuaternionRigid",Affine:"Affine",ScalableAffine:"ScalableAffine",AzimuthElevationToCartesian:"AzimuthElevationToCartesian",BSpline:"BSpline",BSplineSmoothingOnUpdateDisplacementField:"BSplineSmoothingOnUpdateDisplacementField",ConstantVelocityField:"ConstantVelocityField",DisplacementField:"DisplacementField",GaussianSmoothingOnUpdateDisplacementField:"GaussianSmoothingOnUpdateDisplacementField",GaussianExponentialDiffeomorphic:"GaussianExponentialDiffeomorphic",VelocityField:"VelocityField",TimeVaringVelocityField:"TimeVaringVelocityField",GaussianSmoothingOnUpdateTimeVaringVelocityField:"GaussianSmoothingOnUpdateTimeVaringVelocityField"},$A=Ur;var Ae=class{constructor(e=$A.Identity,t=h.Float64,r=3,I=3){this.transformParameterization=e;this.parametersValueType=t;this.inputDimension=r;this.outputDimension=I}},ee=Ae;var te=class{transformType;numberOfFixedParameters;numberOfParameters;name="Transform";inputSpaceName;outputSpaceName;parameters;fixedParameters;constructor(e=new ee){this.transformType=e,this.numberOfFixedParameters=0,this.numberOfParameters=0,this.inputSpaceName="",this.outputSpaceName="",this.parameters=new Uint8Array(0),this.fixedParameters=new Uint8Array(0)}},Nr=te;var Gr={TextFile:"TextFile",BinaryFile:"BinaryFile",TextStream:"TextStream",BinaryStream:"BinaryStream",Image:"Image",PointSet:"PointSet",Mesh:"Mesh",PolyData:"PolyData",TransformList:"TransformList",JsonCompatible:"JsonCompatible"},m=Gr;var xe=Symbol("Comlink.proxy"),br=Symbol("Comlink.endpoint"),oe=Symbol("Comlink.releaseProxy"),re=Symbol("Comlink.finalizer"),lA=Symbol("Comlink.thrown"),qe=A=>typeof A=="object"&&A!==null||typeof A=="function",Lr={canHandle:A=>qe(A)&&A[xe],serialize(A){let{port1:e,port2:t}=new MessageChannel;return Pe(A,e),[t,[t]]},deserialize(A){return A.start(),ie(A)}},Tr={canHandle:A=>qe(A)&&lA in A,serialize({value:A}){let e;return A instanceof Error?e={isError:!0,value:{message:A.message,name:A.name,stack:A.stack}}:e={isError:!1,value:A},[e,[]]},deserialize(A){throw A.isError?Object.assign(new Error(A.value.message),A.value):A.value}},Oe=new Map([["proxy",Lr],["throw",Tr]]);function Mr(A,e){for(let t of A)if(e===t||t==="*"||t instanceof RegExp&&t.test(e))return!0;return!1}function Pe(A,e=globalThis,t=["*"]){e.addEventListener("message",function r(I){if(!I||!I.data)return;if(!Mr(t,I.origin)){console.warn(`Invalid origin '${I.origin}' for comlink proxy`);return}let{id:o,type:i,path:s}=Object.assign({path:[]},I.data),Q=(I.data.argumentList||[]).map(W),C;try{let g=s.slice(0,-1).reduce((c,B)=>c[B],A),a=s.reduce((c,B)=>c[B],A);switch(i){case"GET":C=a;break;case"SET":g[s.slice(-1)[0]]=W(I.data.value),C=!0;break;case"APPLY":C=a.apply(g,Q);break;case"CONSTRUCT":{let c=new a(...Q);C=qr(c)}break;case"ENDPOINT":{let{port1:c,port2:B}=new MessageChannel;Pe(A,B),C=ge(c,[c])}break;case"RELEASE":C=void 0;break;default:return}}catch(g){C={value:g,[lA]:0}}Promise.resolve(C).catch(g=>({value:g,[lA]:0})).then(g=>{let[a,c]=uA(g);e.postMessage(Object.assign(Object.assign({},a),{id:o}),c),i==="RELEASE"&&(e.removeEventListener("message",r),Ke(e),re in A&&typeof A[re]=="function"&&A[re]())}).catch(g=>{let[a,c]=uA({value:new TypeError("Unserializable return value"),[lA]:0});e.postMessage(Object.assign(Object.assign({},a),{id:o}),c)})}),e.start&&e.start()}function Jr(A){return A.constructor.name==="MessagePort"}function Ke(A){Jr(A)&&A.close()}function ie(A,e){return Ie(A,[],e)}function EA(A){if(A)throw new Error("Proxy has been released and is not useable")}function We(A){return v(A,{type:"RELEASE"}).then(()=>{Ke(A)})}var cA=new WeakMap,fA="FinalizationRegistry"in globalThis&&new FinalizationRegistry(A=>{let e=(cA.get(A)||0)-1;cA.set(A,e),e===0&&We(A)});function Hr(A,e){let t=(cA.get(e)||0)+1;cA.set(e,t),fA&&fA.register(A,e,A)}function Yr(A){fA&&fA.unregister(A)}function Ie(A,e=[],t=function(){}){let r=!1,I=new Proxy(t,{get(o,i){if(EA(r),i===oe)return()=>{Yr(I),We(A),r=!0};if(i==="then"){if(e.length===0)return{then:()=>I};let s=v(A,{type:"GET",path:e.map(Q=>Q.toString())}).then(W);return s.then.bind(s)}return Ie(A,[...e,i])},set(o,i,s){EA(r);let[Q,C]=uA(s);return v(A,{type:"SET",path:[...e,i].map(g=>g.toString()),value:Q},C).then(W)},apply(o,i,s){EA(r);let Q=e[e.length-1];if(Q===br)return v(A,{type:"ENDPOINT"}).then(W);if(Q==="bind")return Ie(A,e.slice(0,-1));let[C,g]=Ye(s);return v(A,{type:"APPLY",path:e.map(a=>a.toString()),argumentList:C},g).then(W)},construct(o,i){EA(r);let[s,Q]=Ye(i);return v(A,{type:"CONSTRUCT",path:e.map(C=>C.toString()),argumentList:s},Q).then(W)}});return Hr(I,A),I}function xr(A){return Array.prototype.concat.apply([],A)}function Ye(A){let e=A.map(uA);return[e.map(t=>t[0]),xr(e.map(t=>t[1]))]}var je=new WeakMap;function ge(A,e){return je.set(A,e),A}function qr(A){return Object.assign(A,{[xe]:!0})}function uA(A){for(let[e,t]of Oe)if(t.canHandle(A)){let[r,I]=t.serialize(A);return[{type:"HANDLER",name:e,value:r},I]}return[{type:"RAW",value:A},je.get(A)||[]]}function W(A){switch(A.type){case"HANDLER":return Oe.get(A.name).deserialize(A.value);case"RAW":return A.value}}function v(A,e,t){return new Promise(r=>{let I=Or();A.addEventListener("message",function o(i){!i.data||!i.data.id||i.data.id!==I||(A.removeEventListener("message",o),r(i.data))}),A.start&&A.start(),A.postMessage(Object.assign({id:I},e),t)})}function Or(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function eA(A,e){return function(){return A.apply(e,arguments)}}var{toString:Pr}=Object.prototype,{getPrototypeOf:se}=Object,dA=(A=>e=>{let t=Pr.call(e);return A[t]||(A[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),L=A=>(A=A.toLowerCase(),e=>dA(e)===A),yA=A=>e=>typeof e===A,{isArray:Z}=Array,tA=yA("undefined");function Kr(A){return A!==null&&!tA(A)&&A.constructor!==null&&!tA(A.constructor)&&N(A.constructor.isBuffer)&&A.constructor.isBuffer(A)}var ze=L("ArrayBuffer");function Wr(A){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(A):e=A&&A.buffer&&ze(A.buffer),e}var jr=yA("string"),N=yA("function"),Xe=yA("number"),mA=A=>A!==null&&typeof A=="object",vr=A=>A===!0||A===!1,pA=A=>{if(dA(A)!=="object")return!1;let e=se(A);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in A)&&!(Symbol.iterator in A)},Zr=L("Date"),Vr=L("File"),zr=L("Blob"),Xr=L("FileList"),_r=A=>mA(A)&&N(A.pipe),$r=A=>{let e;return A&&(typeof FormData=="function"&&A instanceof FormData||N(A.append)&&((e=dA(A))==="formdata"||e==="object"&&N(A.toString)&&A.toString()==="[object FormData]"))},AI=L("URLSearchParams"),[eI,tI,rI,II]=["ReadableStream","Request","Response","Headers"].map(L),oI=A=>A.trim?A.trim():A.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function rA(A,e,{allOwnKeys:t=!1}={}){if(A===null||typeof A>"u")return;let r,I;if(typeof A!="object"&&(A=[A]),Z(A))for(r=0,I=A.length;r<I;r++)e.call(null,A[r],r,A);else{let o=t?Object.getOwnPropertyNames(A):Object.keys(A),i=o.length,s;for(r=0;r<i;r++)s=o[r],e.call(null,A[s],s,A)}}function _e(A,e){e=e.toLowerCase();let t=Object.keys(A),r=t.length,I;for(;r-- >0;)if(I=t[r],e===I.toLowerCase())return I;return null}var j=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$e=A=>!tA(A)&&A!==j;function ae(){let{caseless:A}=$e(this)&&this||{},e={},t=(r,I)=>{let o=A&&_e(e,I)||I;pA(e[o])&&pA(r)?e[o]=ae(e[o],r):pA(r)?e[o]=ae({},r):Z(r)?e[o]=r.slice():e[o]=r};for(let r=0,I=arguments.length;r<I;r++)arguments[r]&&rA(arguments[r],t);return e}var iI=(A,e,t,{allOwnKeys:r}={})=>(rA(e,(I,o)=>{t&&N(I)?A[o]=eA(I,t):A[o]=I},{allOwnKeys:r}),A),gI=A=>(A.charCodeAt(0)===65279&&(A=A.slice(1)),A),nI=(A,e,t,r)=>{A.prototype=Object.create(e.prototype,r),A.prototype.constructor=A,Object.defineProperty(A,"super",{value:e.prototype}),t&&Object.assign(A.prototype,t)},aI=(A,e,t,r)=>{let I,o,i,s={};if(e=e||{},A==null)return e;do{for(I=Object.getOwnPropertyNames(A),o=I.length;o-- >0;)i=I[o],(!r||r(i,A,e))&&!s[i]&&(e[i]=A[i],s[i]=!0);A=t!==!1&&se(A)}while(A&&(!t||t(A,e))&&A!==Object.prototype);return e},sI=(A,e,t)=>{A=String(A),(t===void 0||t>A.length)&&(t=A.length),t-=e.length;let r=A.indexOf(e,t);return r!==-1&&r===t},BI=A=>{if(!A)return null;if(Z(A))return A;let e=A.length;if(!Xe(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=A[e];return t},CI=(A=>e=>A&&e instanceof A)(typeof Uint8Array<"u"&&se(Uint8Array)),QI=(A,e)=>{let r=(A&&A[Symbol.iterator]).call(A),I;for(;(I=r.next())&&!I.done;){let o=I.value;e.call(A,o[0],o[1])}},EI=(A,e)=>{let t,r=[];for(;(t=A.exec(e))!==null;)r.push(t);return r},lI=L("HTMLFormElement"),cI=A=>A.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,I){return r.toUpperCase()+I}),Ze=(({hasOwnProperty:A})=>(e,t)=>A.call(e,t))(Object.prototype),fI=L("RegExp"),At=(A,e)=>{let t=Object.getOwnPropertyDescriptors(A),r={};rA(t,(I,o)=>{let i;(i=e(I,o,A))!==!1&&(r[o]=i||I)}),Object.defineProperties(A,r)},uI=A=>{At(A,(e,t)=>{if(N(A)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let r=A[t];if(N(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},pI=(A,e)=>{let t={},r=I=>{I.forEach(o=>{t[o]=!0})};return Z(A)?r(A):r(String(A).split(e)),t},dI=()=>{},yI=(A,e)=>A!=null&&Number.isFinite(A=+A)?A:e,ne="abcdefghijklmnopqrstuvwxyz",Ve="0123456789",et={DIGIT:Ve,ALPHA:ne,ALPHA_DIGIT:ne+ne.toUpperCase()+Ve},mI=(A=16,e=et.ALPHA_DIGIT)=>{let t="",{length:r}=e;for(;A--;)t+=e[Math.random()*r|0];return t};function hI(A){return!!(A&&N(A.append)&&A[Symbol.toStringTag]==="FormData"&&A[Symbol.iterator])}var DI=A=>{let e=new Array(10),t=(r,I)=>{if(mA(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[I]=r;let o=Z(r)?[]:{};return rA(r,(i,s)=>{let Q=t(i,I+1);!tA(Q)&&(o[s]=Q)}),e[I]=void 0,o}}return r};return t(A,0)},wI=L("AsyncFunction"),SI=A=>A&&(mA(A)||N(A))&&N(A.then)&&N(A.catch),tt=((A,e)=>A?setImmediate:e?((t,r)=>(j.addEventListener("message",({source:I,data:o})=>{I===j&&o===t&&r.length&&r.shift()()},!1),I=>{r.push(I),j.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",N(j.postMessage)),FI=typeof queueMicrotask<"u"?queueMicrotask.bind(j):typeof process<"u"&&process.nextTick||tt,n={isArray:Z,isArrayBuffer:ze,isBuffer:Kr,isFormData:$r,isArrayBufferView:Wr,isString:jr,isNumber:Xe,isBoolean:vr,isObject:mA,isPlainObject:pA,isReadableStream:eI,isRequest:tI,isResponse:rI,isHeaders:II,isUndefined:tA,isDate:Zr,isFile:Vr,isBlob:zr,isRegExp:fI,isFunction:N,isStream:_r,isURLSearchParams:AI,isTypedArray:CI,isFileList:Xr,forEach:rA,merge:ae,extend:iI,trim:oI,stripBOM:gI,inherits:nI,toFlatObject:aI,kindOf:dA,kindOfTest:L,endsWith:sI,toArray:BI,forEachEntry:QI,matchAll:EI,isHTMLForm:lI,hasOwnProperty:Ze,hasOwnProp:Ze,reduceDescriptors:At,freezeMethods:uI,toObjectSet:pI,toCamelCase:cI,noop:dI,toFiniteNumber:yI,findKey:_e,global:j,isContextDefined:$e,ALPHABET:et,generateString:mI,isSpecCompliantForm:hI,toJSONObject:DI,isAsyncFn:wI,isThenable:SI,setImmediate:tt,asap:FI};function V(A,e,t,r,I){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=A,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),I&&(this.response=I)}n.inherits(V,Error,{toJSON:function(){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:n.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var rt=V.prototype,It={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(A=>{It[A]={value:A}});Object.defineProperties(V,It);Object.defineProperty(rt,"isAxiosError",{value:!0});V.from=(A,e,t,r,I,o)=>{let i=Object.create(rt);return n.toFlatObject(A,i,function(Q){return Q!==Error.prototype},s=>s!=="isAxiosError"),V.call(i,A.message,e,t,r,I),i.cause=A,i.name=A.name,o&&Object.assign(i,o),i};var u=V;var hA=null;function Be(A){return n.isPlainObject(A)||n.isArray(A)}function it(A){return n.endsWith(A,"[]")?A.slice(0,-2):A}function ot(A,e,t){return A?A.concat(e).map(function(I,o){return I=it(I),!t&&o?"["+I+"]":I}).join(t?".":""):e}function RI(A){return n.isArray(A)&&!A.some(Be)}var kI=n.toFlatObject(n,{},null,function(e){return/^is[A-Z]/.test(e)});function UI(A,e,t){if(!n.isObject(A))throw new TypeError("target must be an object");e=e||new(hA||FormData),t=n.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,E){return!n.isUndefined(E[f])});let r=t.metaTokens,I=t.visitor||g,o=t.dots,i=t.indexes,Q=(t.Blob||typeof Blob<"u"&&Blob)&&n.isSpecCompliantForm(e);if(!n.isFunction(I))throw new TypeError("visitor must be a function");function C(l){if(l===null)return"";if(n.isDate(l))return l.toISOString();if(!Q&&n.isBlob(l))throw new u("Blob is not supported. Use a Buffer instead.");return n.isArrayBuffer(l)||n.isTypedArray(l)?Q&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function g(l,f,E){let y=l;if(l&&!E&&typeof l=="object"){if(n.endsWith(f,"{}"))f=r?f:f.slice(0,-2),l=JSON.stringify(l);else if(n.isArray(l)&&RI(l)||(n.isFileList(l)||n.endsWith(f,"[]"))&&(y=n.toArray(l)))return f=it(f),y.forEach(function(d,G){!(n.isUndefined(d)||d===null)&&e.append(i===!0?ot([f],G,o):i===null?f:f+"[]",C(d))}),!1}return Be(l)?!0:(e.append(ot(E,f,o),C(l)),!1)}let a=[],c=Object.assign(kI,{defaultVisitor:g,convertValue:C,isVisitable:Be});function B(l,f){if(!n.isUndefined(l)){if(a.indexOf(l)!==-1)throw Error("Circular reference detected in "+f.join("."));a.push(l),n.forEach(l,function(y,R){(!(n.isUndefined(y)||y===null)&&I.call(e,y,n.isString(R)?R.trim():R,f,c))===!0&&B(y,f?f.concat(R):[R])}),a.pop()}}if(!n.isObject(A))throw new TypeError("data must be an object");return B(A),e}var x=UI;function gt(A){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(A).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function nt(A,e){this._pairs=[],A&&x(A,this,e)}var at=nt.prototype;at.append=function(e,t){this._pairs.push([e,t])};at.toString=function(e){let t=e?function(r){return e.call(this,r,gt)}:gt;return this._pairs.map(function(I){return t(I[0])+"="+t(I[1])},"").join("&")};var DA=nt;function NI(A){return encodeURIComponent(A).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function IA(A,e,t){if(!e)return A;let r=t&&t.encode||NI,I=t&&t.serialize,o;if(I?o=I(e,t):o=n.isURLSearchParams(e)?e.toString():new DA(e,t).toString(r),o){let i=A.indexOf("#");i!==-1&&(A=A.slice(0,i)),A+=(A.indexOf("?")===-1?"?":"&")+o}return A}var Ce=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,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){n.forEach(this.handlers,function(r){r!==null&&e(r)})}},Qe=Ce;var wA={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var st=typeof URLSearchParams<"u"?URLSearchParams:DA;var Bt=typeof FormData<"u"?FormData:null;var Ct=typeof Blob<"u"?Blob:null;var Qt={isBrowser:!0,classes:{URLSearchParams:st,FormData:Bt,Blob:Ct},protocols:["http","https","file","blob","url","data"]};var le={};ir(le,{hasBrowserEnv:()=>Ee,hasStandardBrowserEnv:()=>GI,hasStandardBrowserWebWorkerEnv:()=>bI,origin:()=>LI});var Ee=typeof window<"u"&&typeof document<"u",GI=(A=>Ee&&["ReactNative","NativeScript","NS"].indexOf(A)<0)(typeof navigator<"u"&&navigator.product),bI=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",LI=Ee&&window.location.href||"http://localhost";var F={...le,...Qt};function ce(A,e){return x(A,new F.classes.URLSearchParams,Object.assign({visitor:function(t,r,I,o){return F.isNode&&n.isBuffer(t)?(this.append(r,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function TI(A){return n.matchAll(/\w+|\[(\w*)]/g,A).map(e=>e[0]==="[]"?"":e[1]||e[0])}function MI(A){let e={},t=Object.keys(A),r,I=t.length,o;for(r=0;r<I;r++)o=t[r],e[o]=A[o];return e}function JI(A){function e(t,r,I,o){let i=t[o++];if(i==="__proto__")return!0;let s=Number.isFinite(+i),Q=o>=t.length;return i=!i&&n.isArray(I)?I.length:i,Q?(n.hasOwnProp(I,i)?I[i]=[I[i],r]:I[i]=r,!s):((!I[i]||!n.isObject(I[i]))&&(I[i]=[]),e(t,r,I[i],o)&&n.isArray(I[i])&&(I[i]=MI(I[i])),!s)}if(n.isFormData(A)&&n.isFunction(A.entries)){let t={};return n.forEachEntry(A,(r,I)=>{e(TI(r),I,t,0)}),t}return null}var SA=JI;function HI(A,e,t){if(n.isString(A))try{return(e||JSON.parse)(A),n.trim(A)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(A)}var fe={transitional:wA,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let r=t.getContentType()||"",I=r.indexOf("application/json")>-1,o=n.isObject(e);if(o&&n.isHTMLForm(e)&&(e=new FormData(e)),n.isFormData(e))return I?JSON.stringify(SA(e)):e;if(n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)||n.isReadableStream(e))return e;if(n.isArrayBufferView(e))return e.buffer;if(n.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return ce(e,this.formSerializer).toString();if((s=n.isFileList(e))||r.indexOf("multipart/form-data")>-1){let Q=this.env&&this.env.FormData;return x(s?{"files[]":e}:e,Q&&new Q,this.formSerializer)}}return o||I?(t.setContentType("application/json",!1),HI(e)):e}],transformResponse:[function(e){let t=this.transitional||fe.transitional,r=t&&t.forcedJSONParsing,I=this.responseType==="json";if(n.isResponse(e)||n.isReadableStream(e))return e;if(e&&n.isString(e)&&(r&&!this.responseType||I)){let i=!(t&&t.silentJSONParsing)&&I;try{return JSON.parse(e)}catch(s){if(i)throw s.name==="SyntaxError"?u.from(s,u.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};n.forEach(["delete","get","head","post","put","patch"],A=>{fe.headers[A]={}});var z=fe;var YI=n.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"]),Et=A=>{let e={},t,r,I;return A&&A.split(`
`).forEach(function(i){I=i.indexOf(":"),t=i.substring(0,I).trim().toLowerCase(),r=i.substring(I+1).trim(),!(!t||e[t]&&YI[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e};var lt=Symbol("internals");function oA(A){return A&&String(A).trim().toLowerCase()}function FA(A){return A===!1||A==null?A:n.isArray(A)?A.map(FA):String(A)}function xI(A){let e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=t.exec(A);)e[r[1]]=r[2];return e}var qI=A=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(A.trim());function ue(A,e,t,r,I){if(n.isFunction(r))return r.call(this,e,t);if(I&&(e=t),!!n.isString(e)){if(n.isString(r))return e.indexOf(r)!==-1;if(n.isRegExp(r))return r.test(e)}}function OI(A){return A.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function PI(A,e){let t=n.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(A,r+t,{value:function(I,o,i){return this[r].call(this,e,I,o,i)},configurable:!0})})}var X=class{constructor(e){e&&this.set(e)}set(e,t,r){let I=this;function o(s,Q,C){let g=oA(Q);if(!g)throw new Error("header name must be a non-empty string");let a=n.findKey(I,g);(!a||I[a]===void 0||C===!0||C===void 0&&I[a]!==!1)&&(I[a||Q]=FA(s))}let i=(s,Q)=>n.forEach(s,(C,g)=>o(C,g,Q));if(n.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(n.isString(e)&&(e=e.trim())&&!qI(e))i(Et(e),t);else if(n.isHeaders(e))for(let[s,Q]of e.entries())o(Q,s,r);else e!=null&&o(t,e,r);return this}get(e,t){if(e=oA(e),e){let r=n.findKey(this,e);if(r){let I=this[r];if(!t)return I;if(t===!0)return xI(I);if(n.isFunction(t))return t.call(this,I,r);if(n.isRegExp(t))return t.exec(I);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=oA(e),e){let r=n.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||ue(this,this[r],r,t)))}return!1}delete(e,t){let r=this,I=!1;function o(i){if(i=oA(i),i){let s=n.findKey(r,i);s&&(!t||ue(r,r[s],s,t))&&(delete r[s],I=!0)}}return n.isArray(e)?e.forEach(o):o(e),I}clear(e){let t=Object.keys(this),r=t.length,I=!1;for(;r--;){let o=t[r];(!e||ue(this,this[o],o,e,!0))&&(delete this[o],I=!0)}return I}normalize(e){let t=this,r={};return n.forEach(this,(I,o)=>{let i=n.findKey(r,o);if(i){t[i]=FA(I),delete t[o];return}let s=e?OI(o):String(o).trim();s!==o&&delete t[o],t[s]=FA(I),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return n.forEach(this,(r,I)=>{r!=null&&r!==!1&&(t[I]=e&&n.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let r=new this(e);return t.forEach(I=>r.set(I)),r}static accessor(e){let r=(this[lt]=this[lt]={accessors:{}}).accessors,I=this.prototype;function o(i){let s=oA(i);r[s]||(PI(I,i),r[s]=!0)}return n.isArray(e)?e.forEach(o):o(e),this}};X.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);n.reduceDescriptors(X.prototype,({value:A},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>A,set(r){this[t]=r}}});n.freezeMethods(X);var S=X;function iA(A,e){let t=this||z,r=e||t,I=S.from(r.headers),o=r.data;return n.forEach(A,function(s){o=s.call(t,o,I.normalize(),e?e.status:void 0)}),I.normalize(),o}function gA(A){return!!(A&&A.__CANCEL__)}function ct(A,e,t){u.call(this,A??"canceled",u.ERR_CANCELED,e,t),this.name="CanceledError"}n.inherits(ct,u,{__CANCEL__:!0});var H=ct;function nA(A,e,t){let r=t.config.validateStatus;!t.status||!r||r(t.status)?A(t):e(new u("Request failed with status code "+t.status,[u.ERR_BAD_REQUEST,u.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function pe(A){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(A);return e&&e[1]||""}function KI(A,e){A=A||10;let t=new Array(A),r=new Array(A),I=0,o=0,i;return e=e!==void 0?e:1e3,function(Q){let C=Date.now(),g=r[o];i||(i=C),t[I]=Q,r[I]=C;let a=o,c=0;for(;a!==I;)c+=t[a++],a=a%A;if(I=(I+1)%A,I===o&&(o=(o+1)%A),C-i<e)return;let B=g&&C-g;return B?Math.round(c*1e3/B):void 0}}var ft=KI;function WI(A,e){let t=0,r=1e3/e,I,o,i=(C,g=Date.now())=>{t=g,I=null,o&&(clearTimeout(o),o=null),A.apply(null,C)};return[(...C)=>{let g=Date.now(),a=g-t;a>=r?i(C,g):(I=C,o||(o=setTimeout(()=>{o=null,i(I)},r-a)))},()=>I&&i(I)]}var ut=WI;var _=(A,e,t=3)=>{let r=0,I=ft(50,250);return ut(o=>{let i=o.loaded,s=o.lengthComputable?o.total:void 0,Q=i-r,C=I(Q),g=i<=s;r=i;let a={loaded:i,total:s,progress:s?i/s:void 0,bytes:Q,rate:C||void 0,estimated:C&&s&&g?(s-i)/C:void 0,event:o,lengthComputable:s!=null,[e?"download":"upload"]:!0};A(a)},t)},de=(A,e)=>{let t=A!=null;return[r=>e[0]({lengthComputable:t,total:A,loaded:r}),e[1]]},ye=A=>(...e)=>n.asap(()=>A(...e));var pt=F.hasStandardBrowserEnv?function(){let e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a"),r;function I(o){let i=o;return e&&(t.setAttribute("href",i),i=t.href),t.setAttribute("href",i),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return r=I(window.location.href),function(i){let s=n.isString(i)?I(i):i;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();var dt=F.hasStandardBrowserEnv?{write(A,e,t,r,I,o){let i=[A+"="+encodeURIComponent(e)];n.isNumber(t)&&i.push("expires="+new Date(t).toGMTString()),n.isString(r)&&i.push("path="+r),n.isString(I)&&i.push("domain="+I),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(A){let e=document.cookie.match(new RegExp("(^|;\\s*)("+A+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(A){this.write(A,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function me(A){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(A)}function he(A,e){return e?A.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):A}function aA(A,e){return A&&!me(e)?he(A,e):e}var yt=A=>A instanceof S?{...A}:A;function T(A,e){e=e||{};let t={};function r(C,g,a){return n.isPlainObject(C)&&n.isPlainObject(g)?n.merge.call({caseless:a},C,g):n.isPlainObject(g)?n.merge({},g):n.isArray(g)?g.slice():g}function I(C,g,a){if(n.isUndefined(g)){if(!n.isUndefined(C))return r(void 0,C,a)}else return r(C,g,a)}function o(C,g){if(!n.isUndefined(g))return r(void 0,g)}function i(C,g){if(n.isUndefined(g)){if(!n.isUndefined(C))return r(void 0,C)}else return r(void 0,g)}function s(C,g,a){if(a in e)return r(C,g);if(a in A)return r(void 0,C)}let Q={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(C,g)=>I(yt(C),yt(g),!0)};return n.forEach(Object.keys(Object.assign({},A,e)),function(g){let a=Q[g]||I,c=a(A[g],e[g],g);n.isUndefined(c)&&a!==s||(t[g]=c)}),t}var RA=A=>{let e=T({},A),{data:t,withXSRFToken:r,xsrfHeaderName:I,xsrfCookieName:o,headers:i,auth:s}=e;e.headers=i=S.from(i),e.url=IA(aA(e.baseURL,e.url),A.params,A.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let Q;if(n.isFormData(t)){if(F.hasStandardBrowserEnv||F.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((Q=i.getContentType())!==!1){let[C,...g]=Q?Q.split(";").map(a=>a.trim()).filter(Boolean):[];i.setContentType([C||"multipart/form-data",...g].join("; "))}}if(F.hasStandardBrowserEnv&&(r&&n.isFunction(r)&&(r=r(e)),r||r!==!1&&pt(e.url))){let C=I&&o&&dt.read(o);C&&i.set(I,C)}return e};var jI=typeof XMLHttpRequest<"u",mt=jI&&function(A){return new Promise(function(t,r){let I=RA(A),o=I.data,i=S.from(I.headers).normalize(),{responseType:s,onUploadProgress:Q,onDownloadProgress:C}=I,g,a,c,B,l;function f(){B&&B(),l&&l(),I.cancelToken&&I.cancelToken.unsubscribe(g),I.signal&&I.signal.removeEventListener("abort",g)}let E=new XMLHttpRequest;E.open(I.method.toUpperCase(),I.url,!0),E.timeout=I.timeout;function y(){if(!E)return;let d=S.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),P={data:!s||s==="text"||s==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:d,config:A,request:E};nA(function(J){t(J),f()},function(J){r(J),f()},P),E=null}"onloadend"in E?E.onloadend=y:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(y)},E.onabort=function(){E&&(r(new u("Request aborted",u.ECONNABORTED,A,E)),E=null)},E.onerror=function(){r(new u("Network Error",u.ERR_NETWORK,A,E)),E=null},E.ontimeout=function(){let G=I.timeout?"timeout of "+I.timeout+"ms exceeded":"timeout exceeded",P=I.transitional||wA;I.timeoutErrorMessage&&(G=I.timeoutErrorMessage),r(new u(G,P.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,A,E)),E=null},o===void 0&&i.setContentType(null),"setRequestHeader"in E&&n.forEach(i.toJSON(),function(G,P){E.setRequestHeader(P,G)}),n.isUndefined(I.withCredentials)||(E.withCredentials=!!I.withCredentials),s&&s!=="json"&&(E.responseType=I.responseType),C&&([c,l]=_(C,!0),E.addEventListener("progress",c)),Q&&E.upload&&([a,B]=_(Q),E.upload.addEventListener("progress",a),E.upload.addEventListener("loadend",B)),(I.cancelToken||I.signal)&&(g=d=>{E&&(r(!d||d.type?new H(null,A,E):d),E.abort(),E=null)},I.cancelToken&&I.cancelToken.subscribe(g),I.signal&&(I.signal.aborted?g():I.signal.addEventListener("abort",g)));let R=pe(I.url);if(R&&F.protocols.indexOf(R)===-1){r(new u("Unsupported protocol "+R+":",u.ERR_BAD_REQUEST,A));return}E.send(o||null)})};var vI=(A,e)=>{let t=new AbortController,r,I=function(Q){if(!r){r=!0,i();let C=Q instanceof Error?Q:this.reason;t.abort(C instanceof u?C:new H(C instanceof Error?C.message:C))}},o=e&&setTimeout(()=>{I(new u(`timeout ${e} of ms exceeded`,u.ETIMEDOUT))},e),i=()=>{A&&(o&&clearTimeout(o),o=null,A.forEach(Q=>{Q&&(Q.removeEventListener?Q.removeEventListener("abort",I):Q.unsubscribe(I))}),A=null)};A.forEach(Q=>Q&&Q.addEventListener&&Q.addEventListener("abort",I));let{signal:s}=t;return s.unsubscribe=i,[s,()=>{o&&clearTimeout(o),o=null}]},ht=vI;var ZI=function*(A,e){let t=A.byteLength;if(!e||t<e){yield A;return}let r=0,I;for(;r<t;)I=r+e,yield A.slice(r,I),r=I},VI=async function*(A,e,t){for await(let r of A)yield*ZI(ArrayBuffer.isView(r)?r:await t(String(r)),e)},De=(A,e,t,r,I)=>{let o=VI(A,e,I),i=0,s,Q=C=>{s||(s=!0,r&&r(C))};return new ReadableStream({async pull(C){try{let{done:g,value:a}=await o.next();if(g){Q(),C.close();return}let c=a.byteLength;if(t){let B=i+=c;t(B)}C.enqueue(new Uint8Array(a))}catch(g){throw Q(g),g}},cancel(C){return Q(C),o.return()}},{highWaterMark:2})};var UA=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",wt=UA&&typeof ReadableStream=="function",we=UA&&(typeof TextEncoder=="function"?(A=>e=>A.encode(e))(new TextEncoder):async A=>new Uint8Array(await new Response(A).arrayBuffer())),St=(A,...e)=>{try{return!!A(...e)}catch{return!1}},zI=wt&&St(()=>{let A=!1,e=new Request(F.origin,{body:new ReadableStream,method:"POST",get duplex(){return A=!0,"half"}}).headers.has("Content-Type");return A&&!e}),Dt=64*1024,Se=wt&&St(()=>n.isReadableStream(new Response("").body)),kA={stream:Se&&(A=>A.body)};UA&&(A=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!kA[e]&&(kA[e]=n.isFunction(A[e])?t=>t[e]():(t,r)=>{throw new u(`Response type '${e}' is not supported`,u.ERR_NOT_SUPPORT,r)})})})(new Response);var XI=async A=>{if(A==null)return 0;if(n.isBlob(A))return A.size;if(n.isSpecCompliantForm(A))return(await new Request(A).arrayBuffer()).byteLength;if(n.isArrayBufferView(A)||n.isArrayBuffer(A))return A.byteLength;if(n.isURLSearchParams(A)&&(A=A+""),n.isString(A))return(await we(A)).byteLength},_I=async(A,e)=>{let t=n.toFiniteNumber(A.getContentLength());return t??XI(e)},Ft=UA&&(async A=>{let{url:e,method:t,data:r,signal:I,cancelToken:o,timeout:i,onDownloadProgress:s,onUploadProgress:Q,responseType:C,headers:g,withCredentials:a="same-origin",fetchOptions:c}=RA(A);C=C?(C+"").toLowerCase():"text";let[B,l]=I||o||i?ht([I,o],i):[],f,E,y=()=>{!f&&setTimeout(()=>{B&&B.unsubscribe()}),f=!0},R;try{if(Q&&zI&&t!=="get"&&t!=="head"&&(R=await _I(g,r))!==0){let M=new Request(e,{method:"POST",body:r,duplex:"half"}),J;if(n.isFormData(r)&&(J=M.headers.get("content-type"))&&g.setContentType(J),M.body){let[JA,QA]=de(R,_(ye(Q)));r=De(M.body,Dt,JA,QA,we)}}n.isString(a)||(a=a?"include":"omit"),E=new Request(e,{...c,signal:B,method:t.toUpperCase(),headers:g.normalize().toJSON(),body:r,duplex:"half",credentials:a});let d=await fetch(E),G=Se&&(C==="stream"||C==="response");if(Se&&(s||G)){let M={};["status","statusText","headers"].forEach(He=>{M[He]=d[He]});let J=n.toFiniteNumber(d.headers.get("content-length")),[JA,QA]=s&&de(J,_(ye(s),!0))||[];d=new Response(De(d.body,Dt,JA,()=>{QA&&QA(),G&&y()},we),M)}C=C||"text";let P=await kA[n.findKey(kA,C)||"text"](d,A);return!G&&y(),l&&l(),await new Promise((M,J)=>{nA(M,J,{data:P,headers:S.from(d.headers),status:d.status,statusText:d.statusText,config:A,request:E})})}catch(d){throw y(),d&&d.name==="TypeError"&&/fetch/i.test(d.message)?Object.assign(new u("Network Error",u.ERR_NETWORK,A,E),{cause:d.cause||d}):u.from(d,d&&d.code,A,E)}});var Fe={http:hA,xhr:mt,fetch:Ft};n.forEach(Fe,(A,e)=>{if(A){try{Object.defineProperty(A,"name",{value:e})}catch{}Object.defineProperty(A,"adapterName",{value:e})}});var Rt=A=>`- ${A}`,$I=A=>n.isFunction(A)||A===null||A===!1,NA={getAdapter:A=>{A=n.isArray(A)?A:[A];let{length:e}=A,t,r,I={};for(let o=0;o<e;o++){t=A[o];let i;if(r=t,!$I(t)&&(r=Fe[(i=String(t)).toLowerCase()],r===void 0))throw new u(`Unknown adapter '${i}'`);if(r)break;I[i||"#"+o]=r}if(!r){let o=Object.entries(I).map(([s,Q])=>`adapter ${s} `+(Q===!1?"is not supported by the environment":"is not available in the build")),i=e?o.length>1?`since :
`+o.map(Rt).join(`
`):" "+Rt(o[0]):"as no adapter specified";throw new u("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:Fe};function Re(A){if(A.cancelToken&&A.cancelToken.throwIfRequested(),A.signal&&A.signal.aborted)throw new H(null,A)}function GA(A){return Re(A),A.headers=S.from(A.headers),A.data=iA.call(A,A.transformRequest),["post","put","patch"].indexOf(A.method)!==-1&&A.headers.setContentType("application/x-www-form-urlencoded",!1),NA.getAdapter(A.adapter||z.adapter)(A).then(function(r){return Re(A),r.data=iA.call(A,A.transformResponse,r),r.headers=S.from(r.headers),r},function(r){return gA(r)||(Re(A),r&&r.response&&(r.response.data=iA.call(A,A.transformResponse,r.response),r.response.headers=S.from(r.response.headers))),Promise.reject(r)})}var bA="1.7.4";var ke={};["object","boolean","number","function","string","symbol"].forEach((A,e)=>{ke[A]=function(r){return typeof r===A||"a"+(e<1?"n ":" ")+A}});var kt={};ke.transitional=function(e,t,r){function I(o,i){return"[Axios v"+bA+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,s)=>{if(e===!1)throw new u(I(i," has been removed"+(t?" in "+t:"")),u.ERR_DEPRECATED);return t&&!kt[i]&&(kt[i]=!0,console.warn(I(i," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(o,i,s):!0}};function Ao(A,e,t){if(typeof A!="object")throw new u("options must be an object",u.ERR_BAD_OPTION_VALUE);let r=Object.keys(A),I=r.length;for(;I-- >0;){let o=r[I],i=e[o];if(i){let s=A[o],Q=s===void 0||i(s,o,A);if(Q!==!0)throw new u("option "+o+" must be "+Q,u.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new u("Unknown option "+o,u.ERR_BAD_OPTION)}}var LA={assertOptions:Ao,validators:ke};var q=LA.validators,$=class{constructor(e){this.defaults=e,this.interceptors={request:new Qe,response:new Qe}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let I;Error.captureStackTrace?Error.captureStackTrace(I={}):I=new Error;let o=I.stack?I.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+o):r.stack=o}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=T(this.defaults,t);let{transitional:r,paramsSerializer:I,headers:o}=t;r!==void 0&&LA.assertOptions(r,{silentJSONParsing:q.transitional(q.boolean),forcedJSONParsing:q.transitional(q.boolean),clarifyTimeoutError:q.transitional(q.boolean)},!1),I!=null&&(n.isFunction(I)?t.paramsSerializer={serialize:I}:LA.assertOptions(I,{encode:q.function,serialize:q.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&n.merge(o.common,o[t.method]);o&&n.forEach(["delete","get","head","post","put","patch","common"],l=>{delete o[l]}),t.headers=S.concat(i,o);let s=[],Q=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(t)===!1||(Q=Q&&f.synchronous,s.unshift(f.fulfilled,f.rejected))});let C=[];this.interceptors.response.forEach(function(f){C.push(f.fulfilled,f.rejected)});let g,a=0,c;if(!Q){let l=[GA.bind(this),void 0];for(l.unshift.apply(l,s),l.push.apply(l,C),c=l.length,g=Promise.resolve(t);a<c;)g=g.then(l[a++],l[a++]);return g}c=s.length;let B=t;for(a=0;a<c;){let l=s[a++],f=s[a++];try{B=l(B)}catch(E){f.call(this,E);break}}try{g=GA.call(this,B)}catch(l){return Promise.reject(l)}for(a=0,c=C.length;a<c;)g=g.then(C[a++],C[a++]);return g}getUri(e){e=T(this.defaults,e);let t=aA(e.baseURL,e.url);return IA(t,e.params,e.paramsSerializer)}};n.forEach(["delete","get","head","options"],function(e){$.prototype[e]=function(t,r){return this.request(T(r||{},{method:e,url:t,data:(r||{}).data}))}});n.forEach(["post","put","patch"],function(e){function t(r){return function(o,i,s){return this.request(T(s||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}$.prototype[e]=t(),$.prototype[e+"Form"]=t(!0)});var sA=$;var Ue=class A{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(o){t=o});let r=this;this.promise.then(I=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](I);r._listeners=null}),this.promise.then=I=>{let o,i=new Promise(s=>{r.subscribe(s),o=s}).then(I);return i.cancel=function(){r.unsubscribe(o)},i},e(function(o,i,s){r.reason||(r.reason=new H(o,i,s),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}static source(){let e;return{token:new A(function(I){e=I}),cancel:e}}},Ut=Ue;function Ne(A){return function(t){return A.apply(null,t)}}function Ge(A){return n.isObject(A)&&A.isAxiosError===!0}var be={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSu