itk-wasm
Version:
High-performance spatial analysis in a web browser, Node.js, and reproducible execution across programming languages and hardware architectures.
5 lines • 216 kB
JavaScript
var yr=Object.defineProperty;var pr=(A,e)=>{for(var t in e)yr(A,t,{get:e[t],enumerable:!0})};var hr="1.0.0-b.197",mr=hr;var Dr={Int8:"int8",UInt8:"uint8",Int16:"int16",UInt16:"uint16",Int32:"int32",UInt32:"uint32",Int64:"int64",UInt64:"uint64",SizeValueType:"uint64",IdentifierType:"uint64",IndexValueType:"int64",OffsetValueType:"int64"},d=Dr;var wr={Float32:"float32",Float64:"float64",SpacePrecisionType:"float64"},h=wr;function Sr(A,e){let t=null;switch(A){case d.UInt8:{t=new Uint8Array(e);break}case d.Int8:{t=new Int8Array(e);break}case d.UInt16:{t=new Uint16Array(e);break}case d.Int16:{t=new Int16Array(e);break}case d.UInt32:{t=new Uint32Array(e);break}case d.Int32:{t=new Int32Array(e);break}case d.UInt64:{typeof globalThis.BigUint64Array=="function"?t=new BigUint64Array(e):t=new Uint8Array(e);break}case d.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 H=Sr;var Fr={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"},L=Fr;var VA=class{constructor(e=2,t=d.UInt8,r=L.Scalar,I=1){this.dimension=e;this.componentType=t;this.pixelType=r;this.components=I}},_A=VA;function Rr(A,e,t,r,I){A[r+t*e]=I}var zA=Rr;var XA=class{constructor(e=new _A){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++)zA(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},V=XA;function kr(A){let e=new V(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 $A=kr;var Ur=typeof globalThis.SharedArrayBuffer=="function";function Nr(A){if(A.data===null)return A;if(Ur){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 $A(A)}var br=Nr;function Gr(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 V(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 i=A.reduce((n,s)=>n+s.size[I],0);t.size[I]=i;let o=t.size.reduce((n,s)=>n*s,1)*t.imageType.components,g=e.data.constructor;t.data=new g(o);let E=t.imageType.components;for(let n=0;n<t.size.length-1;n++)E*=t.size[n];let B=0;if(t.data!=null)for(let n=0;n<A.length;n++)t.data.set(A[n].data,E*B),B+=A[n].size[I];else throw Error("Could not create result image data.");return t}var Lr=Gr;function Tr(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 Mr=Tr;function Jr(A,e,t,r){return A[r+t*e]}var Hr=Jr;function Yr(A,e){let t={...A.imageType};if(typeof e<"u"&&typeof e.pixelType<"u"&&(t.pixelType=e.pixelType,e.pixelType===L.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 V(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 d.UInt8:case d.Int8:case d.UInt16:case d.Int16:case d.UInt32:case d.Int32:case h.Float32:case h.Float64:switch(r.imageType.componentType){case d.UInt8:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array){r.data=new Uint8Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=Number(A.data[I])}else r.data=new Uint8Array(A.data);break;case d.Int8:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array){r.data=new Int8Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=Number(A.data[I])}else r.data=new Int8Array(A.data);break;case d.UInt16:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array){r.data=new Uint16Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=Number(A.data[I])}else r.data=new Uint16Array(A.data);break;case d.Int16:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array){r.data=new Int16Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=Number(A.data[I])}else r.data=new Int16Array(A.data);break;case d.UInt32:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array){r.data=new Uint32Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=Number(A.data[I])}else r.data=new Uint32Array(A.data);break;case d.Int32:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array){r.data=new Int32Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=Number(A.data[I])}else r.data=new Int32Array(A.data);break;case h.Float32:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array){r.data=new Float32Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=Number(A.data[I])}else r.data=new Float32Array(A.data);break;case h.Float64:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array){r.data=new Float64Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=Number(A.data[I])}else r.data=new Float64Array(A.data);break;case d.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 d.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 d.UInt64:case d.Int64:switch(r.imageType.componentType){case d.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 d.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 d.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 d.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 d.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 d.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 d.UInt64:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array)r.data=new BigUint64Array(A.data);else{r.data=new BigUint64Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=BigInt.asUintN(64,BigInt(A.data[I]))}break;case d.Int64:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array)r.data=new BigInt64Array(A.data);else{r.data=new BigInt64Array(A.data.length);for(let I=0;I<r.data.length;I++)r.data[I]=BigInt.asIntN(64,BigInt(A.data[I]))}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 Or=Yr;var Ae=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,i)=>{r.resolve=I,r.reject=i,r.results=new Array(e.length),r.completedTasks=0,r.addingTasks=!0,e.forEach((o,g)=>{this.addTask(r.index,g,o)}),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 i=this.workerQueue.pop();I.runningWorkers++,r[r.length-1].webWorker=i,this.fcn(...r).then(({webWorker:o,...g})=>{if(this.workerQueue.push(o),this.runInfo[e]!==null){if(I.runningWorkers--,I.results[t]=g,I.completedTasks++,I.progressCallback!=null&&I.progressCallback(I.completedTasks,I.results.length),I.taskQueue.length>0){let E=I.taskQueue.shift();this.addTask(e,E[0],E[1])}else if(!I.addingTasks&&I.runningWorkers===0){let E=I.results;I.resolve(E),this.clearTask(I.index)}}}).catch(o=>{I.reject(o),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=()=>{}}},xr=Ae;var ee=class{constructor(e=3,t=h.Float32,r=h.Float32,I=L.Scalar,i=1){this.dimension=e;this.pointComponentType=t;this.pointPixelComponentType=r;this.pointPixelType=I;this.pointPixelComponents=i}},te=ee;var re=class{constructor(e=new te){this.pointSetType=e;this.name="PointSet",this.numberOfPoints=0,this.points=null,this.numberOfPointPixels=0,this.pointData=null}name="PointSet";numberOfPoints;points;numberOfPointPixels;pointData},Pr=re;var Ie=class{constructor(e=2,t=h.Float32,r=h.Float32,I=L.Scalar,i=1,o=d.Int32,g=h.Float32,E=L.Scalar,B=1){this.dimension=e;this.pointComponentType=t;this.pointPixelComponentType=r;this.pointPixelType=I;this.pointPixelComponents=i;this.cellComponentType=o;this.cellPixelComponentType=g;this.cellPixelType=E;this.cellPixelComponents=B}},ie=Ie;var oe=class{constructor(e=new ie){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},qr=oe;var ne=class{constructor(e=h.Float32,t=L.Scalar,r=1,I=h.Float32,i=L.Scalar,o=1){this.pointPixelComponentType=e;this.pointPixelType=t;this.pointPixelComponents=r;this.cellPixelComponentType=I;this.cellPixelType=i;this.cellPixelComponents=o}},ae=ne;var ge=class{constructor(e=new ae){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,this.metadata=new Map}name="PolyData";numberOfPoints;points;verticesBufferSize;vertices;linesBufferSize;lines;polygonsBufferSize;polygons;triangleStripsBufferSize;triangleStrips;numberOfPointPixels;pointData;numberOfCellPixels;cellData;metadata},Kr=ge;var Wr={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"},se=Wr;var Be=class{constructor(e=se.Identity,t=h.Float64,r=3,I=3){this.transformParameterization=e;this.parametersValueType=t;this.inputDimension=r;this.outputDimension=I}},Ce=Be;var Qe=class{transformType;numberOfFixedParameters;numberOfParameters;name="Transform";inputSpaceName;outputSpaceName;parameters;fixedParameters;constructor(e=new Ce){this.transformType=e,this.numberOfFixedParameters=0,this.numberOfParameters=0,this.inputSpaceName="",this.outputSpaceName="",this.parameters=new Uint8Array(0),this.fixedParameters=new Uint8Array(0)}},jr=Qe;var vr={TextFile:"TextFile",BinaryFile:"BinaryFile",TextStream:"TextStream",BinaryStream:"BinaryStream",Image:"Image",PointSet:"PointSet",Mesh:"Mesh",PolyData:"PolyData",TransformList:"TransformList",JsonCompatible:"JsonCompatible"},p=vr;function Zr(){let A=typeof globalThis.SharedArrayBuffer=="function",e=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!=="renderer",t=typeof crossOriginIsolated<"u"?crossOriginIsolated:globalThis.crossOriginIsolated||!1;return e?A:A&&t}var Vr=Zr;var tt=Symbol("Comlink.proxy"),_r=Symbol("Comlink.endpoint"),ce=Symbol("Comlink.releaseProxy"),Ee=Symbol("Comlink.finalizer"),FA=Symbol("Comlink.thrown"),rt=A=>typeof A=="object"&&A!==null||typeof A=="function",zr={canHandle:A=>rt(A)&&A[tt],serialize(A){let{port1:e,port2:t}=new MessageChannel;return it(A,e),[t,[t]]},deserialize(A){return A.start(),fe(A)}},Xr={canHandle:A=>rt(A)&&FA 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}},It=new Map([["proxy",zr],["throw",Xr]]);function $r(A,e){for(let t of A)if(e===t||t==="*"||t instanceof RegExp&&t.test(e))return!0;return!1}function it(A,e=globalThis,t=["*"]){e.addEventListener("message",function r(I){if(!I||!I.data)return;if(!$r(t,I.origin)){console.warn(`Invalid origin '${I.origin}' for comlink proxy`);return}let{id:i,type:o,path:g}=Object.assign({path:[]},I.data),E=(I.data.argumentList||[]).map(_),B;try{let n=g.slice(0,-1).reduce((f,C)=>f[C],A),s=g.reduce((f,C)=>f[C],A);switch(o){case"GET":B=s;break;case"SET":n[g.slice(-1)[0]]=_(I.data.value),B=!0;break;case"APPLY":B=s.apply(n,E);break;case"CONSTRUCT":{let f=new s(...E);B=II(f)}break;case"ENDPOINT":{let{port1:f,port2:C}=new MessageChannel;it(A,C),B=ue(f,[f])}break;case"RELEASE":B=void 0;break;default:return}}catch(n){B={value:n,[FA]:0}}Promise.resolve(B).catch(n=>({value:n,[FA]:0})).then(n=>{let[s,f]=UA(n);e.postMessage(Object.assign(Object.assign({},s),{id:i}),f),o==="RELEASE"&&(e.removeEventListener("message",r),ot(e),Ee in A&&typeof A[Ee]=="function"&&A[Ee]())}).catch(n=>{let[s,f]=UA({value:new TypeError("Unserializable return value"),[FA]:0});e.postMessage(Object.assign(Object.assign({},s),{id:i}),f)})}),e.start&&e.start()}function AI(A){return A.constructor.name==="MessagePort"}function ot(A){AI(A)&&A.close()}function fe(A,e){return le(A,[],e)}function SA(A){if(A)throw new Error("Proxy has been released and is not useable")}function nt(A){return $(A,{type:"RELEASE"}).then(()=>{ot(A)})}var RA=new WeakMap,kA="FinalizationRegistry"in globalThis&&new FinalizationRegistry(A=>{let e=(RA.get(A)||0)-1;RA.set(A,e),e===0&&nt(A)});function eI(A,e){let t=(RA.get(e)||0)+1;RA.set(e,t),kA&&kA.register(A,e,A)}function tI(A){kA&&kA.unregister(A)}function le(A,e=[],t=function(){}){let r=!1,I=new Proxy(t,{get(i,o){if(SA(r),o===ce)return()=>{tI(I),nt(A),r=!0};if(o==="then"){if(e.length===0)return{then:()=>I};let g=$(A,{type:"GET",path:e.map(E=>E.toString())}).then(_);return g.then.bind(g)}return le(A,[...e,o])},set(i,o,g){SA(r);let[E,B]=UA(g);return $(A,{type:"SET",path:[...e,o].map(n=>n.toString()),value:E},B).then(_)},apply(i,o,g){SA(r);let E=e[e.length-1];if(E===_r)return $(A,{type:"ENDPOINT"}).then(_);if(E==="bind")return le(A,e.slice(0,-1));let[B,n]=et(g);return $(A,{type:"APPLY",path:e.map(s=>s.toString()),argumentList:B},n).then(_)},construct(i,o){SA(r);let[g,E]=et(o);return $(A,{type:"CONSTRUCT",path:e.map(B=>B.toString()),argumentList:g},E).then(_)}});return eI(I,A),I}function rI(A){return Array.prototype.concat.apply([],A)}function et(A){let e=A.map(UA);return[e.map(t=>t[0]),rI(e.map(t=>t[1]))]}var at=new WeakMap;function ue(A,e){return at.set(A,e),A}function II(A){return Object.assign(A,{[tt]:!0})}function UA(A){for(let[e,t]of It)if(t.canHandle(A)){let[r,I]=t.serialize(A);return[{type:"HANDLER",name:e,value:r},I]}return[{type:"RAW",value:A},at.get(A)||[]]}function _(A){switch(A.type){case"HANDLER":return It.get(A.name).deserialize(A.value);case"RAW":return A.value}}function $(A,e,t){return new Promise(r=>{let I=iI();A.addEventListener("message",function i(o){!o.data||!o.data.id||o.data.id!==I||(A.removeEventListener("message",i),r(o.data))}),A.start&&A.start(),A.postMessage(Object.assign({id:I},e),t)})}function iI(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function gA(A,e){return function(){return A.apply(e,arguments)}}var{toString:oI}=Object.prototype,{getPrototypeOf:ye}=Object,{iterator:bA,toStringTag:Qt}=Symbol,GA=(A=>e=>{let t=oI.call(e);return A[t]||(A[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Y=A=>(A=A.toLowerCase(),e=>GA(e)===A),LA=A=>e=>typeof e===A,{isArray:eA}=Array,AA=LA("undefined");function sA(A){return A!==null&&!AA(A)&&A.constructor!==null&&!AA(A.constructor)&&G(A.constructor.isBuffer)&&A.constructor.isBuffer(A)}var Et=Y("ArrayBuffer");function nI(A){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(A):e=A&&A.buffer&&Et(A.buffer),e}var aI=LA("string"),G=LA("function"),lt=LA("number"),BA=A=>A!==null&&typeof A=="object",gI=A=>A===!0||A===!1,NA=A=>{if(GA(A)!=="object")return!1;let e=ye(A);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Qt in A)&&!(bA in A)},sI=A=>{if(!BA(A)||sA(A))return!1;try{return Object.keys(A).length===0&&Object.getPrototypeOf(A)===Object.prototype}catch{return!1}},BI=Y("Date"),CI=Y("File"),QI=A=>!!(A&&typeof A.uri<"u"),EI=A=>A&&typeof A.getParts<"u",lI=Y("Blob"),cI=Y("FileList"),fI=A=>BA(A)&&G(A.pipe);function uI(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var st=uI(),Bt=typeof st.FormData<"u"?st.FormData:void 0,dI=A=>{let e;return A&&(Bt&&A instanceof Bt||G(A.append)&&((e=GA(A))==="formdata"||e==="object"&&G(A.toString)&&A.toString()==="[object FormData]"))},yI=Y("URLSearchParams"),[pI,hI,mI,DI]=["ReadableStream","Request","Response","Headers"].map(Y),wI=A=>A.trim?A.trim():A.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function CA(A,e,{allOwnKeys:t=!1}={}){if(A===null||typeof A>"u")return;let r,I;if(typeof A!="object"&&(A=[A]),eA(A))for(r=0,I=A.length;r<I;r++)e.call(null,A[r],r,A);else{if(sA(A))return;let i=t?Object.getOwnPropertyNames(A):Object.keys(A),o=i.length,g;for(r=0;r<o;r++)g=i[r],e.call(null,A[g],g,A)}}function ct(A,e){if(sA(A))return null;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 z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ft=A=>!AA(A)&&A!==z;function de(){let{caseless:A,skipUndefined:e}=ft(this)&&this||{},t={},r=(I,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;let o=A&&ct(t,i)||i;NA(t[o])&&NA(I)?t[o]=de(t[o],I):NA(I)?t[o]=de({},I):eA(I)?t[o]=I.slice():(!e||!AA(I))&&(t[o]=I)};for(let I=0,i=arguments.length;I<i;I++)arguments[I]&&CA(arguments[I],r);return t}var SI=(A,e,t,{allOwnKeys:r}={})=>(CA(e,(I,i)=>{t&&G(I)?Object.defineProperty(A,i,{value:gA(I,t),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(A,i,{value:I,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),A),FI=A=>(A.charCodeAt(0)===65279&&(A=A.slice(1)),A),RI=(A,e,t,r)=>{A.prototype=Object.create(e.prototype,r),Object.defineProperty(A.prototype,"constructor",{value:A,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(A,"super",{value:e.prototype}),t&&Object.assign(A.prototype,t)},kI=(A,e,t,r)=>{let I,i,o,g={};if(e=e||{},A==null)return e;do{for(I=Object.getOwnPropertyNames(A),i=I.length;i-- >0;)o=I[i],(!r||r(o,A,e))&&!g[o]&&(e[o]=A[o],g[o]=!0);A=t!==!1&&ye(A)}while(A&&(!t||t(A,e))&&A!==Object.prototype);return e},UI=(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},NI=A=>{if(!A)return null;if(eA(A))return A;let e=A.length;if(!lt(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=A[e];return t},bI=(A=>e=>A&&e instanceof A)(typeof Uint8Array<"u"&&ye(Uint8Array)),GI=(A,e)=>{let r=(A&&A[bA]).call(A),I;for(;(I=r.next())&&!I.done;){let i=I.value;e.call(A,i[0],i[1])}},LI=(A,e)=>{let t,r=[];for(;(t=A.exec(e))!==null;)r.push(t);return r},TI=Y("HTMLFormElement"),MI=A=>A.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,I){return r.toUpperCase()+I}),Ct=(({hasOwnProperty:A})=>(e,t)=>A.call(e,t))(Object.prototype),JI=Y("RegExp"),ut=(A,e)=>{let t=Object.getOwnPropertyDescriptors(A),r={};CA(t,(I,i)=>{let o;(o=e(I,i,A))!==!1&&(r[i]=o||I)}),Object.defineProperties(A,r)},HI=A=>{ut(A,(e,t)=>{if(G(A)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let r=A[t];if(G(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+"'")})}})},YI=(A,e)=>{let t={},r=I=>{I.forEach(i=>{t[i]=!0})};return eA(A)?r(A):r(String(A).split(e)),t},OI=()=>{},xI=(A,e)=>A!=null&&Number.isFinite(A=+A)?A:e;function PI(A){return!!(A&&G(A.append)&&A[Qt]==="FormData"&&A[bA])}var qI=A=>{let e=new Array(10),t=(r,I)=>{if(BA(r)){if(e.indexOf(r)>=0)return;if(sA(r))return r;if(!("toJSON"in r)){e[I]=r;let i=eA(r)?[]:{};return CA(r,(o,g)=>{let E=t(o,I+1);!AA(E)&&(i[g]=E)}),e[I]=void 0,i}}return r};return t(A,0)},KI=Y("AsyncFunction"),WI=A=>A&&(BA(A)||G(A))&&G(A.then)&&G(A.catch),dt=((A,e)=>A?setImmediate:e?((t,r)=>(z.addEventListener("message",({source:I,data:i})=>{I===z&&i===t&&r.length&&r.shift()()},!1),I=>{r.push(I),z.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",G(z.postMessage)),jI=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||dt,vI=A=>A!=null&&G(A[bA]),a={isArray:eA,isArrayBuffer:Et,isBuffer:sA,isFormData:dI,isArrayBufferView:nI,isString:aI,isNumber:lt,isBoolean:gI,isObject:BA,isPlainObject:NA,isEmptyObject:sI,isReadableStream:pI,isRequest:hI,isResponse:mI,isHeaders:DI,isUndefined:AA,isDate:BI,isFile:CI,isReactNativeBlob:QI,isReactNative:EI,isBlob:lI,isRegExp:JI,isFunction:G,isStream:fI,isURLSearchParams:yI,isTypedArray:bI,isFileList:cI,forEach:CA,merge:de,extend:SI,trim:wI,stripBOM:FI,inherits:RI,toFlatObject:kI,kindOf:GA,kindOfTest:Y,endsWith:UI,toArray:NI,forEachEntry:GI,matchAll:LI,isHTMLForm:TI,hasOwnProperty:Ct,hasOwnProp:Ct,reduceDescriptors:ut,freezeMethods:HI,toObjectSet:YI,toCamelCase:MI,noop:OI,toFiniteNumber:xI,findKey:ct,global:z,isContextDefined:ft,isSpecCompliantForm:PI,toJSONObject:qI,isAsyncFn:KI,isThenable:WI,setImmediate:dt,asap:jI,isIterable:vI};var U=class A extends Error{static from(e,t,r,I,i,o){let g=new A(e.message,t||e.code,r,I,i);return g.cause=e,g.name=e.name,e.status!=null&&g.status==null&&(g.status=e.status),o&&Object.assign(g,o),g}constructor(e,t,r,I,i){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),I&&(this.request=I),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}}};U.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";U.ERR_BAD_OPTION="ERR_BAD_OPTION";U.ECONNABORTED="ECONNABORTED";U.ETIMEDOUT="ETIMEDOUT";U.ERR_NETWORK="ERR_NETWORK";U.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";U.ERR_DEPRECATED="ERR_DEPRECATED";U.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";U.ERR_BAD_REQUEST="ERR_BAD_REQUEST";U.ERR_CANCELED="ERR_CANCELED";U.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";U.ERR_INVALID_URL="ERR_INVALID_URL";var u=U;var TA=null;function he(A){return a.isPlainObject(A)||a.isArray(A)}function yt(A){return a.endsWith(A,"[]")?A.slice(0,-2):A}function pe(A,e,t){return A?A.concat(e).map(function(I,i){return I=yt(I),!t&&i?"["+I+"]":I}).join(t?".":""):e}function ZI(A){return a.isArray(A)&&!A.some(he)}var VI=a.toFlatObject(a,{},null,function(e){return/^is[A-Z]/.test(e)});function _I(A,e,t){if(!a.isObject(A))throw new TypeError("target must be an object");e=e||new(TA||FormData),t=a.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,l){return!a.isUndefined(l[c])});let r=t.metaTokens,I=t.visitor||n,i=t.dots,o=t.indexes,E=(t.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(I))throw new TypeError("visitor must be a function");function B(Q){if(Q===null)return"";if(a.isDate(Q))return Q.toISOString();if(a.isBoolean(Q))return Q.toString();if(!E&&a.isBlob(Q))throw new u("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(Q)||a.isTypedArray(Q)?E&&typeof Blob=="function"?new Blob([Q]):Buffer.from(Q):Q}function n(Q,c,l){let y=Q;if(a.isReactNative(e)&&a.isReactNativeBlob(Q))return e.append(pe(l,c,i),B(Q)),!1;if(Q&&!l&&typeof Q=="object"){if(a.endsWith(c,"{}"))c=r?c:c.slice(0,-2),Q=JSON.stringify(Q);else if(a.isArray(Q)&&ZI(Q)||(a.isFileList(Q)||a.endsWith(c,"[]"))&&(y=a.toArray(Q)))return c=yt(c),y.forEach(function(D,N){!(a.isUndefined(D)||D===null)&&e.append(o===!0?pe([c],N,i):o===null?c:c+"[]",B(D))}),!1}return he(Q)?!0:(e.append(pe(l,c,i),B(Q)),!1)}let s=[],f=Object.assign(VI,{defaultVisitor:n,convertValue:B,isVisitable:he});function C(Q,c){if(!a.isUndefined(Q)){if(s.indexOf(Q)!==-1)throw Error("Circular reference detected in "+c.join("."));s.push(Q),a.forEach(Q,function(y,k){(!(a.isUndefined(y)||y===null)&&I.call(e,y,a.isString(k)?k.trim():k,c,f))===!0&&C(y,c?c.concat(k):[k])}),s.pop()}}if(!a.isObject(A))throw new TypeError("data must be an object");return C(A),e}var W=_I;function pt(A){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(A).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function ht(A,e){this._pairs=[],A&&W(A,this,e)}var mt=ht.prototype;mt.append=function(e,t){this._pairs.push([e,t])};mt.toString=function(e){let t=e?function(r){return e.call(this,r,pt)}:pt;return this._pairs.map(function(I){return t(I[0])+"="+t(I[1])},"").join("&")};var MA=ht;function zI(A){return encodeURIComponent(A).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function QA(A,e,t){if(!e)return A;let r=t&&t.encode||zI,I=a.isFunction(t)?{serialize:t}:t,i=I&&I.serialize,o;if(i?o=i(e,I):o=a.isURLSearchParams(e)?e.toString():new MA(e,I).toString(r),o){let g=A.indexOf("#");g!==-1&&(A=A.slice(0,g)),A+=(A.indexOf("?")===-1?"?":"&")+o}return A}var me=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){a.forEach(this.handlers,function(r){r!==null&&e(r)})}},De=me;var tA={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0};var Dt=typeof URLSearchParams<"u"?URLSearchParams:MA;var wt=typeof FormData<"u"?FormData:null;var St=typeof Blob<"u"?Blob:null;var Ft={isBrowser:!0,classes:{URLSearchParams:Dt,FormData:wt,Blob:St},protocols:["http","https","file","blob","url","data"]};var Fe={};pr(Fe,{hasBrowserEnv:()=>Se,hasStandardBrowserEnv:()=>XI,hasStandardBrowserWebWorkerEnv:()=>$I,navigator:()=>we,origin:()=>Ai});var Se=typeof window<"u"&&typeof document<"u",we=typeof navigator=="object"&&navigator||void 0,XI=Se&&(!we||["ReactNative","NativeScript","NS"].indexOf(we.product)<0),$I=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ai=Se&&window.location.href||"http://localhost";var m={...Fe,...Ft};function Re(A,e){return W(A,new m.classes.URLSearchParams,{visitor:function(t,r,I,i){return m.isNode&&a.isBuffer(t)?(this.append(r,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function ei(A){return a.matchAll(/\w+|\[(\w*)]/g,A).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ti(A){let e={},t=Object.keys(A),r,I=t.length,i;for(r=0;r<I;r++)i=t[r],e[i]=A[i];return e}function ri(A){function e(t,r,I,i){let o=t[i++];if(o==="__proto__")return!0;let g=Number.isFinite(+o),E=i>=t.length;return o=!o&&a.isArray(I)?I.length:o,E?(a.hasOwnProp(I,o)?I[o]=[I[o],r]:I[o]=r,!g):((!I[o]||!a.isObject(I[o]))&&(I[o]=[]),e(t,r,I[o],i)&&a.isArray(I[o])&&(I[o]=ti(I[o])),!g)}if(a.isFormData(A)&&a.isFunction(A.entries)){let t={};return a.forEachEntry(A,(r,I)=>{e(ei(r),I,t,0)}),t}return null}var JA=ri;function Ii(A,e,t){if(a.isString(A))try{return(e||JSON.parse)(A),a.trim(A)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(A)}var ke={transitional:tA,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let r=t.getContentType()||"",I=r.indexOf("application/json")>-1,i=a.isObject(e);if(i&&a.isHTMLForm(e)&&(e=new FormData(e)),a.isFormData(e))return I?JSON.stringify(JA(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 t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let g;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Re(e,this.formSerializer).toString();if((g=a.isFileList(e))||r.indexOf("multipart/form-data")>-1){let E=this.env&&this.env.FormData;return W(g?{"files[]":e}:e,E&&new E,this.formSerializer)}}return i||I?(t.setContentType("application/json",!1),Ii(e)):e}],transformResponse:[function(e){let t=this.transitional||ke.transitional,r=t&&t.forcedJSONParsing,I=this.responseType==="json";if(a.isResponse(e)||a.isReadableStream(e))return e;if(e&&a.isString(e)&&(r&&!this.responseType||I)){let o=!(t&&t.silentJSONParsing)&&I;try{return JSON.parse(e,this.parseReviver)}catch(g){if(o)throw g.name==="SyntaxError"?u.from(g,u.ERR_BAD_RESPONSE,this,null,this.response):g}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:m.classes.FormData,Blob:m.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"],A=>{ke.headers[A]={}});var rA=ke;var ii=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"]),Rt=A=>{let e={},t,r,I;return A&&A.split(`
`).forEach(function(o){I=o.indexOf(":"),t=o.substring(0,I).trim().toLowerCase(),r=o.substring(I+1).trim(),!(!t||e[t]&&ii[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e};var kt=Symbol("internals"),oi=A=>!/[\r\n]/.test(A);function Ut(A,e){if(!(A===!1||A==null)){if(a.isArray(A)){A.forEach(t=>Ut(t,e));return}if(!oi(String(A)))throw new Error(`Invalid character in header content ["${e}"]`)}}function EA(A){return A&&String(A).trim().toLowerCase()}function ni(A){let e=A.length;for(;e>0;){let t=A.charCodeAt(e-1);if(t!==10&&t!==13)break;e-=1}return e===A.length?A:A.slice(0,e)}function HA(A){return A===!1||A==null?A:a.isArray(A)?A.map(HA):ni(String(A))}function ai(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 gi=A=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(A.trim());function Ue(A,e,t,r,I){if(a.isFunction(r))return r.call(this,e,t);if(I&&(e=t),!!a.isString(e)){if(a.isString(r))return e.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(e)}}function si(A){return A.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function Bi(A,e){let t=a.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(A,r+t,{value:function(I,i,o){return this[r].call(this,e,I,i,o)},configurable:!0})})}var IA=class{constructor(e){e&&this.set(e)}set(e,t,r){let I=this;function i(g,E,B){let n=EA(E);if(!n)throw new Error("header name must be a non-empty string");let s=a.findKey(I,n);(!s||I[s]===void 0||B===!0||B===void 0&&I[s]!==!1)&&(Ut(g,E),I[s||E]=HA(g))}let o=(g,E)=>a.forEach(g,(B,n)=>i(B,n,E));if(a.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(a.isString(e)&&(e=e.trim())&&!gi(e))o(Rt(e),t);else if(a.isObject(e)&&a.isIterable(e)){let g={},E,B;for(let n of e){if(!a.isArray(n))throw TypeError("Object iterator must return a key-value pair");g[B=n[0]]=(E=g[B])?a.isArray(E)?[...E,n[1]]:[E,n[1]]:n[1]}o(g,t)}else e!=null&&i(t,e,r);return this}get(e,t){if(e=EA(e),e){let r=a.findKey(this,e);if(r){let I=this[r];if(!t)return I;if(t===!0)return ai(I);if(a.isFunction(t))return t.call(this,I,r);if(a.isRegExp(t))return t.exec(I);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=EA(e),e){let r=a.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 i(o){if(o=EA(o),o){let g=a.findKey(r,o);g&&(!t||Ue(r,r[g],g,t))&&(delete r[g],I=!0)}}return a.isArray(e)?e.forEach(i):i(e),I}clear(e){let t=Object.keys(this),r=t.length,I=!1;for(;r--;){let i=t[r];(!e||Ue(this,this[i],i,e,!0))&&(delete this[i],I=!0)}return I}normalize(e){let t=this,r={};return a.forEach(this,(I,i)=>{let o=a.findKey(r,i);if(o){t[o]=HA(I),delete t[i];return}let g=e?si(i):String(i).trim();g!==i&&delete t[i],t[g]=HA(I),r[g]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return a.forEach(this,(r,I)=>{r!=null&&r!==!1&&(t[I]=e&&a.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(`
`)}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,...t){let r=new this(e);return t.forEach(I=>r.set(I)),r}static accessor(e){let r=(this[kt]=this[kt]={accessors:{}}).accessors,I=this.prototype;function i(o){let g=EA(o);r[g]||(Bi(I,o),r[g]=!0)}return a.isArray(e)?e.forEach(i):i(e),this}};IA.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(IA.prototype,({value:A},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>A,set(r){this[t]=r}}});a.freezeMethods(IA);var F=IA;function lA(A,e){let t=this||rA,r=e||t,I=F.from(r.headers),i=r.data;return a.forEach(A,function(g){i=g.call(t,i,I.normalize(),e?e.status:void 0)}),I.normalize(),i}function cA(A){return!!(A&&A.__CANCEL__)}var Ne=class extends u{constructor(e,t,r){super(e??"canceled",u.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}},x=Ne;function fA(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 be(A){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(A);return e&&e[1]||""}function Ci(A,e){A=A||10;let t=new Array(A),r=new Array(A),I=0,i=0,o;return e=e!==void 0?e:1e3,function(E){let B=Date.now(),n=r[i];o||(o=B),t[I]=E,r[I]=B;let s=i,f=0;for(;s!==I;)f+=t[s++],s=s%A;if(I=(I+1)%A,I===i&&(i=(i+1)%A),B-o<e)return;let C=n&&B-n;return C?Math.round(f*1e3/C):void 0}}var Nt=Ci;function Qi(A,e){let t=0,r=1e3/e,I,i,o=(B,n=Date.now())=>{t=n,I=null,i&&(clearTimeout(i),i=null),A(...B)};return[(...B)=>{let n=Date.now(),s=n-t;s>=r?o(B,n):(I=B,i||(i=setTimeout(()=>{i=null,o(I)},r-s)))},()=>I&&o(I)]}var bt=Qi;var iA=(A,e,t=3)=>{let r=0,I=Nt(50,250);return bt(i=>{let o=i.loaded,g=i.lengthComputable?i.total:void 0,E=o-r,B=I(E),n=o<=g;r=o;let s={loaded:o,total:g,progress:g?o/g:void 0,bytes:E,rate:B||void 0,estimated:B&&g&&n?(g-o)/B:void 0,event:i,lengthComputable:g!=null,[e?"download":"upload"]:!0};A(s)},t)},Ge=(A,e)=>{let t=A!=null;return[r=>e[0]({lengthComputable:t,total:A,loaded:r}),e[1]]},Le=A=>(...e)=>a.asap(()=>A(...e));var Gt=m.hasStandardBrowserEnv?((A,e)=>t=>(t=new URL(t,m.origin),A.protocol===t.protocol&&A.host===t.host&&(e||A.port===t.port)))(new URL(m.origin),m.navigator&&/(msie|trident)/i.test(m.navigator.userAgent)):()=>!0;var Lt=m.hasStandardBrowserEnv?{write(A,e,t,r,I,i,o){if(typeof document>"u")return;let g=[`${A}=${encodeURIComponent(e)}`];a.isNumber(t)&&g.push(`expires=${new Date(t).toUTCString()}`),a.isString(r)&&g.push(`path=${r}`),a.isString(I)&&g.push(`domain=${I}`),i===!0&&g.push("secure"),a.isString(o)&&g.push(`SameSite=${o}`),document.cookie=g.join("; ")},read(A){if(typeof document>"u")return null;let e=document.cookie.match(new RegExp("(?:^|; )"+A+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(A){this.write(A,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Te(A){return typeof A!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(A)}function Me(A,e){return e?A.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):A}function uA(A,e,t){let r=!Te(e);return A&&(r||t==!1)?Me(A,e):e}var Tt=A=>A instanceof F?{...A}:A;function O(A,e){e=e||{};let t={};function r(B,n,s,f){return a.isPlainObject(B)&&a.isPlainObject(n)?a.merge.call({caseless:f},B,n):a.isPlainObject(n)?a.merge({},n):a.isArray(n)?n.slice():n}function I(B,n,s,f){if(a.isUndefined(n)){if(!a.isUndefined(B))return r(void 0,B,s,f)}else return r(B,n,s,f)}function i(B,n){if(!a.isUndefined(n))return r(void 0,n)}function o(B,n){if(a.isUndefined(n)){if(!a.isUndefined(B))return r(void 0,B)}else return r(void 0,n)}function g(B,n,s){if(s in e)return r(B,n);if(s in A)return r(void 0,B)}let E={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:g,headers:(B,n,s)=>I(Tt(B),Tt(n),s,!0)};return a.forEach(Object.keys({...A,...e}),function(n){if(n==="__proto__"||n==="constructor"||n==="prototype")return;let s=a.hasOwnProp(E,n)?E[n]:I,f=s(A[n],e[n],n);a.isUndefined(f)&&s!==g||(t[n]=f)}),t}var YA=A=>{let e=O({},A),{data:t,withXSRFToken:r,xsrfHeaderName:I,xsrfCookieName:i,headers:o,auth:g}=e;if(e.headers=o=F.from(o),e.url=QA(uA(e.baseURL,e.url,e.allowAbsoluteUrls),A.params,A.paramsSerializer),g&&o.set("Authorization","Basic "+btoa((g.username||"")+":"+(g.password?unescape(encodeURIComponent(g.password)):""))),a.isFormData(t)){if(m.hasStandardBrowserEnv||m.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(a.isFunction(t.getHeaders)){let E=t.getHeaders(),B=["content-type","content-length"];Object.entries(E).forEach(([n,s])=>{B.includes(n.toLowerCase())&&o.set(n,s)})}}if(m.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(e)),r||r!==!1&&Gt(e.url))){let E=I&&i&&Lt.read(i);E&&o.set(I,E)}return e};var Ei=typeof XMLHttpRequest<"u",Mt=Ei&&function(A){return new Promise(function(t,r){let I=YA(A),i=I.data,o=F.from(I.headers).normalize(),{responseType:g,onUploadProgress:E,onDownloadProgress:B}=I,n,s,f,C,Q;function c(){C&&C(),Q&&Q(),I.cancelToken&&I.cancelToken.unsubscribe(n),I.signal&&I.signal.removeEventListener("abort",n)}let l=new XMLHttpRequest;l.open(I.method.toUpperCase(),I.url,!0),l.timeout=I.timeout;function y(){if(!l)return;let D=F.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),J={data:!g||g==="text"||g==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:D,config:A,request:l};fA(function(T){t(T),c()},function(T){r(T),c()},J),l=null}"onloadend"in l?l.onloadend=y:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(y)},l.onabort=function(){l&&(r(new u("Request aborted",u.ECONNABORTED,A,l)),l=null)},l.onerror=function(N){let J=N&&N.message?N.message:"Network Error",v=new u(J,u.ERR_NETWORK,A,l);v.event=N||null,r(v),l=null},l.ontimeout=function(){let N=I.timeout?"timeout of "+I.timeout+"ms exceeded":"timeout exceeded",J=I.transitional||tA;I.timeoutErrorMessage&&(N=I.timeoutErrorMessage),r(new u(N,J.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,A,l)),l=null},i===void 0&&o.setContentType(null),"setRequestHeader"in l&&a.forEach(o.toJSON(),function(N,J){l.setRequestHeader(J,N)}),a.isUndefined(I.withCredentials)||(l.withCredentials=!!I.withCredentials),g&&g!=="json"&&(l.responseType=I.responseType),B&&([f,Q]=iA(B,!0),l.addEventListener("progress",f)),E&&l.upload&&([s,C]=iA(E),l.upload.addEventListener("progress",s),l.upload.addEventListener("loadend",C)),(I.cancelToken||I.signal)&&(n=D=>{l&&(r(!D||D.type?new x(null,A,l):D),l.abort(),l=null)},I.cancelToken&&I.cancelToken.subscribe(n),I.signal&&(I.signal.aborted?n():I.signal.addEventListener("abort",n)));let k=be(I.url);if(k&&m.protocols.indexOf(k)===-1){r(new u("Unsupported protocol "+k+":",u.ERR_BAD_REQUEST,A));return}l.send(i||null)})};var li=(A,e)=>{let{length:t}=A=A?A.filter(Boolean):[];if(e||t){let r=new AbortController,I,i=function(B){if(!I){I=!0,g();let n=B instanceof Error?B:this.reason;r.abort(n instanceof u?n:new x(n instanceof Error?n.message:n))}},o=e&&setTimeout(()=>{o=null,i(new u(`timeout of ${e}ms exceeded`,u.ETIMEDOUT))},e),g=()=>{A&&(o&&clearTimeout(o),o=null,A.forEach(B=>{B.unsubscribe?B.unsubscribe(i):B.removeEventListener("abort",i)}),A=null)};A.forEach(B=>B.addEventListener("abort",i));let{signal:E}=r;return E.unsubscribe=()=>a.asap(g),E}},Jt=li;var ci=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},fi=async function*(A,e){for await(let t of ui(A))yield*ci(t,e)},ui=async function*(A){if(A[Symbol.asyncIterator]){yield*A;return}let e=A.getReader();try{for(;;){let{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},Je=(A,e,t,r)=>{let I=fi(A,e),i=0,o,g=E=>{o||(o=!0,r&&r(E))};return new ReadableStream({async pull(E){try{let{done:B,value:n}=await I.next();if(B){g(),E.close();return}let s=n.byteLength;if(t){let f=i+=s;t(f)}E.enqueue(new Uint8Array(n))}catch(B){throw g(B),B}},cancel(E){return g(E),I.return()}},{highWaterMark:2})};var Ht=64*1024,{isFunction:OA}=a,di=(({Request:A,Response:e})=>({Request:A,Response:e}))(a.global),{ReadableStream:Yt,TextEncoder:Ot}=a.global,xt=(A,...e)=>{try{return!!A(...e)}catch{return!1}},yi=A=>{A=a.merge.call({skipUndefined:!0},di,A);let{fetch:e,Request:t,Response:r}=A,I=e?OA(e):typeof fetch=="function",i=OA(t),o=OA(r);if(!I)return!1;let g=I&&OA(Yt),E=I&&(typeof Ot=="function"?(Q=>c=>Q.encode(c))(new Ot):async Q=>new Uint8Array(await new t(Q).arrayBuffer())),B=i&&g&&xt(()=>{let Q=!1,c=new Yt,l=new t(m.origin,{body:c,method:"POST",get duplex(){return Q=!0,"half"}}).headers.has("Content-Type");return c.cancel(),Q&&!l}),n=o&&g&&xt(()=>a.isReadableStream(new r("").body)),s={stream:n&&(Q=>Q.body)};I&&["text","arrayBuffer","blob","formData","stream"].forEach(Q=>{!s[Q]&&(s[Q]=(c,l)=>{let y=c&&c[Q];if(y)return y.call(c);throw new u(`Response type '${Q}' is not supported`,u.ERR_NOT_SUPPORT,l)})});let f=async Q=>{if(Q==null)return 0;if(a.isBlob(Q))return Q.size;if(a.isSpecCompliantForm(Q))return(await new t(m.origin,{method:"POST",body:Q}).arrayBuffer()).byteLength;if(a.isArrayBufferView(Q)||a.isArrayBuffer(Q))return Q.byteLength;if(a.isURLSearchParams(Q)&&(Q=Q+""),a.isString(Q))return(await E(Q)).byteLength},C=async(Q,c)=>{let l=a.toFiniteNumber(Q.getContentLength());return l??f(c)};return async Q=>{let{url:c,method:l,data:y,signal:k,cancelToken:D,timeout:N,onDownloadProgress:J,onUploadProgress:v,responseType:T,headers:vA,withCredentials:mA="same-origin",fetchOptions:Ve}=YA(Q),_e=e||fetch;T=T?(T+"").toLowerCase():"text";let DA=Jt([k,D&&D.toAbortSignal()],N),aA=null,Z=DA&&DA.unsubscribe&&(()=>{DA.unsubscribe()}),ze;try{if(v&&B&&l!=="get"&&l!=="head"&&(ze=await C(vA,y))!==0){let K=new t(c,{method:"POST",body:y,duplex:"half"}),X;if(a.isFormData(y)&&(X=K.headers.get("content-type"))&&vA.setContentType(X),K.body){let[ZA,wA]=Ge(ze,iA(Le(v)));y=Je(K.body,Ht,ZA,wA)}}a.isString(mA)||(mA=mA?"include":"omit");let b=i&&"credentials"in t.prototype,Xe={...Ve,signal:DA,method:l.toUpperCase(),headers:vA.normalize().toJSON(),body:y,duplex:"half",credentials:b?mA:void 0};aA=i&&new t(c,Xe);let q=await(i?_e(aA,Ve):_e(c,Xe)),$e=n&&(T==="stream"||T==="response");if(n&&(J||$e&&Z)){let K={};["status","statusText","headers"].forEach(At=>{K[At]=q[At]});let X=a.toFiniteNumber(q.headers.get("content-length")),[ZA,wA]=J&&Ge(X,iA(Le(J),!0))||[];q=new r(Je(q.body,Ht,ZA,()=>{wA&&wA(),Z&&Z()}),K)}T=T||"text";let dr=await s[a.findKey(s,T)||"text"](q,Q);return!$e&&Z&&Z(),await new Promise((K,X)=>{fA(K,X,{data:dr,headers:F.from(q.headers),status:q.status,statusText:q.statusText,config:Q,request:aA})})}catch(b){throw Z&&Z(),b&&b.name==="TypeError"&&/Load failed|fetch/i.test(b.message)?Object.assign(new u("Network Error",u.ERR_NETWORK,Q,aA,b&&b.response),{cause:b.cause||b}):u.from(b,b&&b.code,Q,aA,b&&b.response)}}},pi=new Map,He=A=>{let e=A&&A.env||{},{fetch:t,Request:r,Response:I}=e,i=[r,I,t],o=i.length,g=o,E,B,n=pi;for(;g--;)E=i[g],B=n.get(E),B===void 0&&n.set(E,B=g?new Map:yi(e)),n=B;return B},Zg=He();var Ye={http:TA,xhr:Mt,fetch:{get:He}};a.forEach(Ye,(A,e)=>{if(A){try{Object.defineProperty(A,"name",{value:e})}catch{}Object.defineProperty(A,"adapterName",{value:e})}});var Pt=A=>`- ${A}`,mi=A=>a.isFunction(A)||A===null||A===!1;function Di(A,e){A=a.isArray(A)?A:[A];let{length:t}=A,r,I,i={};for(let o=0;o<t;o++){r=A[o];let g;if(I=r,!mi(r)&&(I=Ye[(g=String(r)).toLowerCase()],I===void 0))throw new u(`Unknown adapter '${g}'`);if(I&&(a.isFunction(I)||(I=I.get(e))))break;i[g||"#"+o]=I}if(!I){let o=Object.entries(i).map(([E,B])=>`adapter ${E} `+(B===!1?"is not supported by the environment":"is not available in the build")),g=t?o.length>1?`since :
`+o.map(Pt).join(`
`):" "+Pt(o[0]):"as no adapter specified";throw new u("There is no suitable adapter to dispatch the request "+g,"ERR_NOT_SUPPORT")}return I}var xA={getAdapter:Di,adapters:Ye};function Oe(A){if(A.cancelToken&&A.cancelToken.throwIfRequested(),A.signal&&A.signal.aborted)throw new x(null,A)}function PA(A){return Oe(A),A.headers=F.from(A.headers),A.data=lA.call(A,A.transformRequest),["post","put","patch"].indexOf(A.method)!==-1&&A.headers.setContentType("application/x-www-form-urlencoded",!1),xA.getAdapter(A.adapter||rA.adapter,A)(A).then(function(r){return Oe(A),r.data=lA.call(A,A.transformResponse,r),r.headers=F.from(r.headers),r},function(r){return cA(r)||(Oe(A),r&&r.response&&(r.response.data=lA.call(A,A.transformResponse,r.response),r.response.headers=F.from(r.response.headers))),Promise.reject(r)})}var qA="1.15.0";var KA={};["object","boolean","number","function","string","symbol"].forEach((A,e)=>{KA[A]=function(r){return typeof r===A||"a"+(e<1?"n ":" ")+A}});var qt={};KA.transitional=function(e,t,r){function I(i,o){return"[Axios v"+qA+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,g)=>{if(e===!1)throw new u(I(o," has been removed"+(t?" in "+t:"")),u.ERR_DEPRECATED);return t&&!qt[o]&&(qt[o]=!0,console.warn(I(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(i,o,g):!0}};KA.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function wi(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 i=r[I],o=e[i];if(o){let g=A[i],E=g===void 0||o(g,i,A);if(E!==!0)throw new u("option "+i+" must be "+E,u.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new u("Unknown option "+i,u.ERR_BAD_OPTION)}}var dA={assertOptions:wi,validators:KA};var M=dA.validators,oA=class{constructor(e){this.defaults=e||{},this.interceptors={request:new De,response:new De}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error