@sumcode/svgify
Version:
A lightweight React component designed to dynamically render and style SVG icons.
29 lines (28 loc) • 43.4 kB
JavaScript
"use client";"use strict";const Fe=require("react");var xe={exports:{}},te={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Be;function Ct(){if(Be)return te;Be=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,o){var i=null;if(o!==void 0&&(i=""+o),s.key!==void 0&&(i=""+s.key),"key"in s){o={};for(var c in s)c!=="key"&&(o[c]=s[c])}else o=s;return s=o.ref,{$$typeof:e,type:r,key:i,ref:s!==void 0?s:null,props:o}}return te.Fragment=t,te.jsx=n,te.jsxs=n,te}var ne={};/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var qe;function Nt(){return qe||(qe=1,process.env.NODE_ENV!=="production"&&function(){function e(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===le?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case h:return"Fragment";case C:return"Profiler";case O:return"StrictMode";case B:return"Suspense";case N:return"SuspenseList";case ce:return"Activity"}if(typeof l=="object")switch(typeof l.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),l.$$typeof){case b:return"Portal";case x:return l.displayName||"Context";case T:return(l._context.displayName||"Context")+".Consumer";case j:var y=l.render;return l=l.displayName,l||(l=y.displayName||y.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case Z:return y=l.displayName||null,y!==null?y:e(l.type)||"Memo";case I:y=l._payload,l=l._init;try{return e(l(y))}catch{}}return null}function t(l){return""+l}function n(l){try{t(l);var y=!1}catch{y=!0}if(y){y=console;var R=y.error,g=typeof Symbol=="function"&&Symbol.toStringTag&&l[Symbol.toStringTag]||l.constructor.name||"Object";return R.call(y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",g),t(l)}}function r(l){if(l===h)return"<>";if(typeof l=="object"&&l!==null&&l.$$typeof===I)return"<...>";try{var y=e(l);return y?"<"+y+">":"<...>"}catch{return"<...>"}}function s(){var l=M.A;return l===null?null:l.getOwner()}function o(){return Error("react-stack-top-frame")}function i(l){if($.call(l,"key")){var y=Object.getOwnPropertyDescriptor(l,"key").get;if(y&&y.isReactWarning)return!1}return l.key!==void 0}function c(l,y){function R(){U||(U=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",y))}R.isReactWarning=!0,Object.defineProperty(l,"key",{get:R,configurable:!0})}function p(){var l=e(this.type);return Q[l]||(Q[l]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),l=this.props.ref,l!==void 0?l:null}function f(l,y,R,g,H,ge){var _=R.ref;return l={$$typeof:d,type:l,key:y,props:R,_owner:g},(_!==void 0?_:null)!==null?Object.defineProperty(l,"ref",{enumerable:!1,get:p}):Object.defineProperty(l,"ref",{enumerable:!1,value:null}),l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(l,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(l,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:H}),Object.defineProperty(l,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ge}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l}function u(l,y,R,g,H,ge){var _=y.children;if(_!==void 0)if(g)if(q(_)){for(g=0;g<_.length;g++)m(_[g]);Object.freeze&&Object.freeze(_)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else m(_);if($.call(y,"key")){_=e(l);var Y=Object.keys(y).filter(function(Pt){return Pt!=="key"});g=0<Y.length?"{key: someKey, "+Y.join(": ..., ")+": ...}":"{key: someKey}",ue[_+g]||(Y=0<Y.length?"{"+Y.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,g,_,Y,_),ue[_+g]=!0)}if(_=null,R!==void 0&&(n(R),_=""+R),i(y)&&(n(y.key),_=""+y.key),"key"in y){R={};for(var Se in y)Se!=="key"&&(R[Se]=y[Se])}else R=y;return _&&c(R,typeof l=="function"?l.displayName||l.name||"Unknown":l),f(l,_,R,s(),H,ge)}function m(l){w(l)?l._store&&(l._store.validated=1):typeof l=="object"&&l!==null&&l.$$typeof===I&&(l._payload.status==="fulfilled"?w(l._payload.value)&&l._payload.value._store&&(l._payload.value._store.validated=1):l._store&&(l._store.validated=1))}function w(l){return typeof l=="object"&&l!==null&&l.$$typeof===d}var S=Fe,d=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),x=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),ce=Symbol.for("react.activity"),le=Symbol.for("react.client.reference"),M=S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=Object.prototype.hasOwnProperty,q=Array.isArray,V=console.createTask?console.createTask:function(){return null};S={react_stack_bottom_frame:function(l){return l()}};var U,Q={},L=S.react_stack_bottom_frame.bind(S,o)(),ee=V(r(o)),ue={};ne.Fragment=h,ne.jsx=function(l,y,R){var g=1e4>M.recentlyCreatedOwnerStacks++;return u(l,y,R,!1,g?Error("react-stack-top-frame"):L,g?V(r(l)):ee)},ne.jsxs=function(l,y,R){var g=1e4>M.recentlyCreatedOwnerStacks++;return u(l,y,R,!0,g?Error("react-stack-top-frame"):L,g?V(r(l)):ee)}}()),ne}process.env.NODE_ENV==="production"?xe.exports=Ct():xe.exports=Nt();var rt=xe.exports;function st(e,t){return function(){return e.apply(t,arguments)}}const{toString:kt}=Object.prototype,{getPrototypeOf:je}=Object,{iterator:be,toStringTag:ot}=Symbol,ye=(e=>t=>{const n=kt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),D=e=>(e=e.toLowerCase(),t=>ye(t)===e),Ee=e=>t=>typeof t===e,{isArray:X}=Array,K=Ee("undefined");function se(e){return e!==null&&!K(e)&&e.constructor!==null&&!K(e.constructor)&&k(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const it=D("ArrayBuffer");function Ft(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&it(e.buffer),t}const jt=Ee("string"),k=Ee("function"),at=Ee("number"),oe=e=>e!==null&&typeof e=="object",Ut=e=>e===!0||e===!1,de=e=>{if(ye(e)!=="object")return!1;const t=je(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ot in e)&&!(be in e)},Lt=e=>{if(!oe(e)||se(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Dt=D("Date"),vt=D("File"),Bt=D("Blob"),qt=D("FileList"),It=e=>oe(e)&&k(e.pipe),Mt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||k(e.append)&&((t=ye(e))==="formdata"||t==="object"&&k(e.toString)&&e.toString()==="[object FormData]"))},$t=D("URLSearchParams"),[Ht,zt,Jt,Wt]=["ReadableStream","Request","Response","Headers"].map(D),Vt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ie(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),X(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(se(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(r=0;r<i;r++)c=o[r],t.call(null,e[c],c,e)}}function ct(e,t){if(se(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lt=e=>!K(e)&&e!==z;function Pe(){const{caseless:e,skipUndefined:t}=lt(this)&&this||{},n={},r=(s,o)=>{const i=e&&ct(n,o)||o;de(n[i])&&de(s)?n[i]=Pe(n[i],s):de(s)?n[i]=Pe({},s):X(s)?n[i]=s.slice():(!t||!K(s))&&(n[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&ie(arguments[s],r);return n}const Yt=(e,t,n,{allOwnKeys:r}={})=>(ie(t,(s,o)=>{n&&k(s)?e[o]=st(s,n):e[o]=s},{allOwnKeys:r}),e),Kt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Xt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Gt=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&je(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Zt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Qt=e=>{if(!e)return null;if(X(e))return e;let t=e.length;if(!at(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},en=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&je(Uint8Array)),tn=(e,t)=>{const r=(e&&e[be]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},nn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},rn=D("HTMLFormElement"),sn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ie=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),on=D("RegExp"),ut=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ie(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},an=e=>{ut(e,(t,n)=>{if(k(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(k(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},cn=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return X(e)?r(e):r(String(e).split(t)),n},ln=()=>{},un=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function fn(e){return!!(e&&k(e.append)&&e[ot]==="FormData"&&e[be])}const dn=e=>{const t=new Array(10),n=(r,s)=>{if(oe(r)){if(t.indexOf(r)>=0)return;if(se(r))return r;if(!("toJSON"in r)){t[s]=r;const o=X(r)?[]:{};return ie(r,(i,c)=>{const p=n(i,s+1);!K(p)&&(o[c]=p)}),t[s]=void 0,o}}return r};return n(e,0)},pn=D("AsyncFunction"),hn=e=>e&&(oe(e)||k(e))&&k(e.then)&&k(e.catch),ft=((e,t)=>e?setImmediate:t?((n,r)=>(z.addEventListener("message",({source:s,data:o})=>{s===z&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),z.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",k(z.postMessage)),mn=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||ft,bn=e=>e!=null&&k(e[be]),a={isArray:X,isArrayBuffer:it,isBuffer:se,isFormData:Mt,isArrayBufferView:Ft,isString:jt,isNumber:at,isBoolean:Ut,isObject:oe,isPlainObject:de,isEmptyObject:Lt,isReadableStream:Ht,isRequest:zt,isResponse:Jt,isHeaders:Wt,isUndefined:K,isDate:Dt,isFile:vt,isBlob:Bt,isRegExp:on,isFunction:k,isStream:It,isURLSearchParams:$t,isTypedArray:en,isFileList:qt,forEach:ie,merge:Pe,extend:Yt,trim:Vt,stripBOM:Kt,inherits:Xt,toFlatObject:Gt,kindOf:ye,kindOfTest:D,endsWith:Zt,toArray:Qt,forEachEntry:tn,matchAll:nn,isHTMLForm:rn,hasOwnProperty:Ie,hasOwnProp:Ie,reduceDescriptors:ut,freezeMethods:an,toObjectSet:cn,toCamelCase:sn,noop:ln,toFiniteNumber:un,findKey:ct,global:z,isContextDefined:lt,isSpecCompliantForm:fn,toJSONObject:dn,isAsyncFn:pn,isThenable:hn,setImmediate:ft,asap:mn,isIterable:bn};function E(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(E,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:a.toJSONObject(this.config),code:this.code,status:this.status}}});const dt=E.prototype,pt={};["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(e=>{pt[e]={value:e}});Object.defineProperties(E,pt);Object.defineProperty(dt,"isAxiosError",{value:!0});E.from=(e,t,n,r,s,o)=>{const i=Object.create(dt);a.toFlatObject(e,i,function(u){return u!==Error.prototype},f=>f!=="isAxiosError");const c=e&&e.message?e.message:"Error",p=t==null&&e?e.code:t;return E.call(i,c,p,n,r,s),e&&i.cause==null&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",o&&Object.assign(i,o),i};const yn=null;function Ce(e){return a.isPlainObject(e)||a.isArray(e)}function ht(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Me(e,t,n){return e?e.concat(t).map(function(s,o){return s=ht(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function En(e){return a.isArray(e)&&!e.some(Ce)}const wn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function we(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,h){return!a.isUndefined(h[b])});const r=n.metaTokens,s=n.visitor||u,o=n.dots,i=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function f(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(a.isBoolean(d))return d.toString();if(!p&&a.isBlob(d))throw new E("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(d)||a.isTypedArray(d)?p&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function u(d,b,h){let O=d;if(d&&!h&&typeof d=="object"){if(a.endsWith(b,"{}"))b=r?b:b.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&En(d)||(a.isFileList(d)||a.endsWith(b,"[]"))&&(O=a.toArray(d)))return b=ht(b),O.forEach(function(T,x){!(a.isUndefined(T)||T===null)&&t.append(i===!0?Me([b],x,o):i===null?b:b+"[]",f(T))}),!1}return Ce(d)?!0:(t.append(Me(h,b,o),f(d)),!1)}const m=[],w=Object.assign(wn,{defaultVisitor:u,convertValue:f,isVisitable:Ce});function S(d,b){if(!a.isUndefined(d)){if(m.indexOf(d)!==-1)throw Error("Circular reference detected in "+b.join("."));m.push(d),a.forEach(d,function(O,C){(!(a.isUndefined(O)||O===null)&&s.call(t,O,a.isString(C)?C.trim():C,b,w))===!0&&S(O,b?b.concat(C):[C])}),m.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return S(e),t}function $e(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ue(e,t){this._pairs=[],e&&we(e,this,t)}const mt=Ue.prototype;mt.append=function(t,n){this._pairs.push([t,n])};mt.toString=function(t){const n=t?function(r){return t.call(this,r,$e)}:$e;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Rn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function bt(e,t,n){if(!t)return e;const r=n&&n.encode||Rn;a.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(s?o=s(t,n):o=a.isURLSearchParams(t)?t.toString():new Ue(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class He{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const yt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gn=typeof URLSearchParams<"u"?URLSearchParams:Ue,Sn=typeof FormData<"u"?FormData:null,On=typeof Blob<"u"?Blob:null,Tn={isBrowser:!0,classes:{URLSearchParams:gn,FormData:Sn,Blob:On},protocols:["http","https","file","blob","url","data"]},Le=typeof window<"u"&&typeof document<"u",Ne=typeof navigator=="object"&&navigator||void 0,An=Le&&(!Ne||["ReactNative","NativeScript","NS"].indexOf(Ne.product)<0),_n=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xn=Le&&window.location.href||"http://localhost",Pn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Le,hasStandardBrowserEnv:An,hasStandardBrowserWebWorkerEnv:_n,navigator:Ne,origin:xn},Symbol.toStringTag,{value:"Module"})),P={...Pn,...Tn};function Cn(e,t){return we(e,new P.classes.URLSearchParams,{visitor:function(n,r,s,o){return P.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function Nn(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function kn(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function Et(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),p=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,p?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=kn(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Nn(r),s,n,0)}),n}return null}function Fn(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const ae={transitional:yt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(Et(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Cn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return we(c?{"files[]":t}:t,p&&new p,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Fn(t)):t}],transformResponse:[function(t){const n=this.transitional||ae.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(c){if(i)throw c.name==="SyntaxError"?E.from(c,E.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:P.classes.FormData,Blob:P.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{ae.headers[e]={}});const jn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Un=e=>{const t={};let n,r,s;return e&&e.split(`
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&jn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},ze=Symbol("internals");function re(e){return e&&String(e).trim().toLowerCase()}function pe(e){return e===!1||e==null?e:a.isArray(e)?e.map(pe):String(e)}function Ln(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Dn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Oe(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function vn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Bn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}class F{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,p,f){const u=re(p);if(!u)throw new Error("header name must be a non-empty string");const m=a.findKey(s,u);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||p]=pe(c))}const i=(c,p)=>a.forEach(c,(f,u)=>o(f,u,p));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(a.isString(t)&&(t=t.trim())&&!Dn(t))i(Un(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},p,f;for(const u of t){if(!a.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[f=u[0]]=(p=c[f])?a.isArray(p)?[...p,u[1]]:[p,u[1]]:u[1]}i(c,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=re(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Ln(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=re(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Oe(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=re(i),i){const c=a.findKey(r,i);c&&(!n||Oe(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||Oe(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=pe(s),delete n[o];return}const c=t?vn(o):String(o).trim();c!==o&&delete n[o],n[c]=pe(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[ze]=this[ze]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=re(i);r[c]||(Bn(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}}F.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(F.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(F);function Te(e,t){const n=this||ae,r=t||n,s=F.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function wt(e){return!!(e&&e.__CANCEL__)}function G(e,t,n){E.call(this,e??"canceled",E.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(G,E,{__CANCEL__:!0});function Rt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new E("Request failed with status code "+n.status,[E.ERR_BAD_REQUEST,E.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function qn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function In(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(p){const f=Date.now(),u=r[o];i||(i=f),n[s]=p,r[s]=f;let m=o,w=0;for(;m!==s;)w+=n[m++],m=m%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),f-i<t)return;const S=u&&f-u;return S?Math.round(w*1e3/S):void 0}}function Mn(e,t){let n=0,r=1e3/t,s,o;const i=(f,u=Date.now())=>{n=u,s=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const u=Date.now(),m=u-n;m>=r?i(f,u):(s=f,o||(o=setTimeout(()=>{o=null,i(s)},r-m)))},()=>s&&i(s)]}const me=(e,t,n=3)=>{let r=0;const s=In(50,250);return Mn(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,p=i-r,f=s(p),u=i<=c;r=i;const m={loaded:i,total:c,progress:c?i/c:void 0,bytes:p,rate:f||void 0,estimated:f&&c&&u?(c-i)/f:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},n)},Je=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},We=e=>(...t)=>a.asap(()=>e(...t)),$n=P.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,P.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(P.origin),P.navigator&&/(msie|trident)/i.test(P.navigator.userAgent)):()=>!0,Hn=P.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),a.isString(r)&&c.push(`path=${r}`),a.isString(s)&&c.push(`domain=${s}`),o===!0&&c.push("secure"),a.isString(i)&&c.push(`SameSite=${i}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function zn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Jn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function gt(e,t,n){let r=!zn(t);return e&&(r||n==!1)?Jn(e,t):t}const Ve=e=>e instanceof F?{...e}:e;function W(e,t){t=t||{};const n={};function r(f,u,m,w){return a.isPlainObject(f)&&a.isPlainObject(u)?a.merge.call({caseless:w},f,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(f,u,m,w){if(a.isUndefined(u)){if(!a.isUndefined(f))return r(void 0,f,m,w)}else return r(f,u,m,w)}function o(f,u){if(!a.isUndefined(u))return r(void 0,u)}function i(f,u){if(a.isUndefined(u)){if(!a.isUndefined(f))return r(void 0,f)}else return r(void 0,u)}function c(f,u,m){if(m in t)return r(f,u);if(m in e)return r(void 0,f)}const p={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:c,headers:(f,u,m)=>s(Ve(f),Ve(u),m,!0)};return a.forEach(Object.keys({...e,...t}),function(u){const m=p[u]||s,w=m(e[u],t[u],u);a.isUndefined(w)&&m!==c||(n[u]=w)}),n}const St=e=>{const t=W({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=t;if(t.headers=i=F.from(i),t.url=bt(gt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(n)){if(P.hasStandardBrowserEnv||P.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(a.isFunction(n.getHeaders)){const p=n.getHeaders(),f=["content-type","content-length"];Object.entries(p).forEach(([u,m])=>{f.includes(u.toLowerCase())&&i.set(u,m)})}}if(P.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&$n(t.url))){const p=s&&o&&Hn.read(o);p&&i.set(s,p)}return t},Wn=typeof XMLHttpRequest<"u",Vn=Wn&&function(e){return new Promise(function(n,r){const s=St(e);let o=s.data;const i=F.from(s.headers).normalize();let{responseType:c,onUploadProgress:p,onDownloadProgress:f}=s,u,m,w,S,d;function b(){S&&S(),d&&d(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let h=new XMLHttpRequest;h.open(s.method.toUpperCase(),s.url,!0),h.timeout=s.timeout;function O(){if(!h)return;const T=F.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),j={data:!c||c==="text"||c==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:T,config:e,request:h};Rt(function(N){n(N),b()},function(N){r(N),b()},j),h=null}"onloadend"in h?h.onloadend=O:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(O)},h.onabort=function(){h&&(r(new E("Request aborted",E.ECONNABORTED,e,h)),h=null)},h.onerror=function(x){const j=x&&x.message?x.message:"Network Error",B=new E(j,E.ERR_NETWORK,e,h);B.event=x||null,r(B),h=null},h.ontimeout=function(){let x=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const j=s.transitional||yt;s.timeoutErrorMessage&&(x=s.timeoutErrorMessage),r(new E(x,j.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,e,h)),h=null},o===void 0&&i.setContentType(null),"setRequestHeader"in h&&a.forEach(i.toJSON(),function(x,j){h.setRequestHeader(j,x)}),a.isUndefined(s.withCredentials)||(h.withCredentials=!!s.withCredentials),c&&c!=="json"&&(h.responseType=s.responseType),f&&([w,d]=me(f,!0),h.addEventListener("progress",w)),p&&h.upload&&([m,S]=me(p),h.upload.addEventListener("progress",m),h.upload.addEventListener("loadend",S)),(s.cancelToken||s.signal)&&(u=T=>{h&&(r(!T||T.type?new G(null,e,h):T),h.abort(),h=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const C=qn(s.url);if(C&&P.protocols.indexOf(C)===-1){r(new E("Unsupported protocol "+C+":",E.ERR_BAD_REQUEST,e));return}h.send(o||null)})},Yn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(f){if(!s){s=!0,c();const u=f instanceof Error?f:this.reason;r.abort(u instanceof E?u:new G(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,o(new E(`timeout ${t} of ms exceeded`,E.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),e=null)};e.forEach(f=>f.addEventListener("abort",o));const{signal:p}=r;return p.unsubscribe=()=>a.asap(c),p}},Kn=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},Xn=async function*(e,t){for await(const n of Gn(e))yield*Kn(n,t)},Gn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Ye=(e,t,n,r)=>{const s=Xn(e,t);let o=0,i,c=p=>{i||(i=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:f,value:u}=await s.next();if(f){c(),p.close();return}let m=u.byteLength;if(n){let w=o+=m;n(w)}p.enqueue(new Uint8Array(u))}catch(f){throw c(f),f}},cancel(p){return c(p),s.return()}},{highWaterMark:2})},Ke=64*1024,{isFunction:fe}=a,Zn=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:Xe,TextEncoder:Ge}=a.global,Ze=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Qn=e=>{e=a.merge.call({skipUndefined:!0},Zn,e);const{fetch:t,Request:n,Response:r}=e,s=t?fe(t):typeof fetch=="function",o=fe(n),i=fe(r);if(!s)return!1;const c=s&&fe(Xe),p=s&&(typeof Ge=="function"?(d=>b=>d.encode(b))(new Ge):async d=>new Uint8Array(await new n(d).arrayBuffer())),f=o&&c&&Ze(()=>{let d=!1;const b=new n(P.origin,{body:new Xe,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!b}),u=i&&c&&Ze(()=>a.isReadableStream(new r("").body)),m={stream:u&&(d=>d.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!m[d]&&(m[d]=(b,h)=>{let O=b&&b[d];if(O)return O.call(b);throw new E(`Response type '${d}' is not supported`,E.ERR_NOT_SUPPORT,h)})});const w=async d=>{if(d==null)return 0;if(a.isBlob(d))return d.size;if(a.isSpecCompliantForm(d))return(await new n(P.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(a.isArrayBufferView(d)||a.isArrayBuffer(d))return d.byteLength;if(a.isURLSearchParams(d)&&(d=d+""),a.isString(d))return(await p(d)).byteLength},S=async(d,b)=>{const h=a.toFiniteNumber(d.getContentLength());return h??w(b)};return async d=>{let{url:b,method:h,data:O,signal:C,cancelToken:T,timeout:x,onDownloadProgress:j,onUploadProgress:B,responseType:N,headers:Z,withCredentials:I="same-origin",fetchOptions:ce}=St(d),le=t||fetch;N=N?(N+"").toLowerCase():"text";let M=Yn([C,T&&T.toAbortSignal()],x),$=null;const q=M&&M.unsubscribe&&(()=>{M.unsubscribe()});let V;try{if(B&&f&&h!=="get"&&h!=="head"&&(V=await S(Z,O))!==0){let l=new n(b,{method:"POST",body:O,duplex:"half"}),y;if(a.isFormData(O)&&(y=l.headers.get("content-type"))&&Z.setContentType(y),l.body){const[R,g]=Je(V,me(We(B)));O=Ye(l.body,Ke,R,g)}}a.isString(I)||(I=I?"include":"omit");const U=o&&"credentials"in n.prototype,Q={...ce,signal:M,method:h.toUpperCase(),headers:Z.normalize().toJSON(),body:O,duplex:"half",credentials:U?I:void 0};$=o&&new n(b,Q);let L=await(o?le($,ce):le(b,Q));const ee=u&&(N==="stream"||N==="response");if(u&&(j||ee&&q)){const l={};["status","statusText","headers"].forEach(H=>{l[H]=L[H]});const y=a.toFiniteNumber(L.headers.get("content-length")),[R,g]=j&&Je(y,me(We(j),!0))||[];L=new r(Ye(L.body,Ke,R,()=>{g&&g(),q&&q()}),l)}N=N||"text";let ue=await m[a.findKey(m,N)||"text"](L,d);return!ee&&q&&q(),await new Promise((l,y)=>{Rt(l,y,{data:ue,headers:F.from(L.headers),status:L.status,statusText:L.statusText,config:d,request:$})})}catch(U){throw q&&q(),U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)?Object.assign(new E("Network Error",E.ERR_NETWORK,d,$),{cause:U.cause||U}):E.from(U,U&&U.code,d,$)}}},er=new Map,Ot=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,c=i,p,f,u=er;for(;c--;)p=o[c],f=u.get(p),f===void 0&&u.set(p,f=c?new Map:Qn(t)),u=f;return f};Ot();const De={http:yn,xhr:Vn,fetch:{get:Ot}};a.forEach(De,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Qe=e=>`- ${e}`,tr=e=>a.isFunction(e)||e===null||e===!1;function nr(e,t){e=a.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i<n;i++){r=e[i];let c;if(s=r,!tr(r)&&(s=De[(c=String(r)).toLowerCase()],s===void 0))throw new E(`Unknown adapter '${c}'`);if(s&&(a.isFunction(s)||(s=s.get(t))))break;o[c||"#"+i]=s}if(!s){const i=Object.entries(o).map(([p,f])=>`adapter ${p} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?i.length>1?`since :
`+i.map(Qe).join(`
`):" "+Qe(i[0]):"as no adapter specified";throw new E("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const Tt={getAdapter:nr,adapters:De};function Ae(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new G(null,e)}function et(e){return Ae(e),e.headers=F.from(e.headers),e.data=Te.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Tt.getAdapter(e.adapter||ae.adapter,e)(e).then(function(r){return Ae(e),r.data=Te.call(e,e.transformResponse,r),r.headers=F.from(r.headers),r},function(r){return wt(r)||(Ae(e),r&&r.response&&(r.response.data=Te.call(e,e.transformResponse,r.response),r.response.headers=F.from(r.response.headers))),Promise.reject(r)})}const At="1.13.2",Re={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Re[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const tt={};Re.transitional=function(t,n,r){function s(o,i){return"[Axios v"+At+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new E(s(i," has been removed"+(n?" in "+n:"")),E.ERR_DEPRECATED);return n&&!tt[i]&&(tt[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};Re.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function rr(e,t,n){if(typeof e!="object")throw new E("options must be an object",E.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const c=e[o],p=c===void 0||i(c,o,e);if(p!==!0)throw new E("option "+o+" must be "+p,E.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new E("Unknown option "+o,E.ERR_BAD_OPTION)}}const he={assertOptions:rr,validators:Re},v=he.validators;class J{constructor(t){this.defaults=t||{},this.interceptors={request:new He,response:new He}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.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(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=W(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&he.assertOptions(r,{silentJSONParsing:v.transitional(v.boolean),forcedJSONParsing:v.transitional(v.boolean),clarifyTimeoutError:v.transitional(v.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:he.assertOptions(s,{encode:v.function,serialize:v.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),he.assertOptions(n,{baseUrl:v.spelling("baseURL"),withXsrfToken:v.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],d=>{delete o[d]}),n.headers=F.concat(i,o);const c=[];let p=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(p=p&&b.synchronous,c.unshift(b.fulfilled,b.rejected))});const f=[];this.interceptors.response.forEach(function(b){f.push(b.fulfilled,b.rejected)});let u,m=0,w;if(!p){const d=[et.bind(this),void 0];for(d.unshift(...c),d.push(...f),w=d.length,u=Promise.resolve(n);m<w;)u=u.then(d[m++],d[m++]);return u}w=c.length;let S=n;for(;m<w;){const d=c[m++],b=c[m++];try{S=d(S)}catch(h){b.call(this,h);break}}try{u=et.call(this,S)}catch(d){return Promise.reject(d)}for(m=0,w=f.length;m<w;)u=u.then(f[m++],f[m++]);return u}getUri(t){t=W(this.defaults,t);const n=gt(t.baseURL,t.url,t.allowAbsoluteUrls);return bt(n,t.params,t.paramsSerializer)}}a.forEach(["delete","get","head","options"],function(t){J.prototype[t]=function(n,r){return this.request(W(r||{},{method:t,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request(W(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}J.prototype[t]=n(),J.prototype[t+"Form"]=n(!0)});class ve{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new G(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ve(function(s){t=s}),cancel:t}}}function sr(e){return function(n){return e.apply(null,n)}}function or(e){return a.isObject(e)&&e.isAxiosError===!0}const ke={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,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ke).forEach(([e,t])=>{ke[t]=e});function _t(e){const t=new J(e),n=st(J.prototype.request,t);return a.extend(n,J.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return _t(W(e,s))},n}const A=_t(ae);A.Axios=J;A.CanceledError=G;A.CancelToken=ve;A.isCancel=wt;A.VERSION=At;A.toFormData=we;A.AxiosError=E;A.Cancel=A.CanceledError;A.all=function(t){return Promise.all(t)};A.spread=sr;A.isAxiosError=or;A.mergeConfig=W;A.AxiosHeaders=F;A.formToJSON=e=>Et(a.isHTMLForm(e)?new FormData(e):e);A.getAdapter=Tt.getAdapter;A.HttpStatusCode=ke;A.default=A;const xt=Fe.createContext({version:1,clearForOldVersion:!0,base_path:"/assets/icons/"}),_e={},nt={},ir=({children:e,base_path:t="/assets/icons",version:n=1,clearForOldVersion:r=!0,FetchIcon:s})=>{let o=t.startsWith("/")?t:`/${t}`;o=o.endsWith("/")?`${o.slice(0,o.length-1)}`:o;const i=async(c,p=!1)=>{let f;try{if(Object.keys(_e).includes(c))f=_e[c];else if(p){const u=`${o}/${c}.svg`,m=s?s(u):A.get(u);_e[c]=m,f=m}else{const u=nt[c]+1||0;u===0&&(nt[c]=u),f=new Promise(m=>{setTimeout(async()=>{const w=await i(c,!0);m(w)},u===0?0:5)})}}catch(u){throw console.error(`Error fetching icon ${c}`),u}return f};return rt.jsx(xt.Provider,{value:{version:n,clearForOldVersion:r,FetchIcon:i},children:e})},ar=()=>{const e=Fe.useContext(xt);if(!e)throw new Error("Svgifier must be used within an SvgifyProvider.");return e};exports.Svgifier=ir;exports.jsxRuntimeExports=rt;exports.useSvgifyContext=ar;
//# sourceMappingURL=SvgifyContext-Dh47B7AG.cjs.map