@yuku123/z-task-frontend-component 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/z-task-frontend-component.es.js +1798 -1801
- package/dist/z-task-frontend-component.umd.js +15 -15
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(U,N){typeof exports=="object"&&typeof module<"u"?N(exports,require("react"),require("antd"),require("@ant-design/icons"),require("react-router-dom"),require("@ant-design/pro-components")):typeof define=="function"&&define.amd?define(["exports","react","antd","@ant-design/icons","react-router-dom","@ant-design/pro-components"],N):(U=typeof globalThis<"u"?globalThis:U||self,N(U.z_component={},U.React,U.antd,U.icons,U.ReactRouterDOM))})(this,(function(U,N,u,L,fe){"use strict";var De={exports:{}},Se={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ht;function dr(){if(ht)return
|
|
9
|
+
*/var ht;function dr(){if(ht)return Se;ht=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var c in o)c!=="key"&&(s[c]=o[c])}else s=o;return o=s.ref,{$$typeof:e,type:n,key:a,ref:o!==void 0?o:null,props:s}}return Se.Fragment=t,Se.jsx=r,Se.jsxs=r,Se}var Te={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,20 +14,12 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var mt;function pr(){return mt||(mt=1,process.env.NODE_ENV!=="production"&&(function(){function e(
|
|
17
|
+
*/var mt;function pr(){return mt||(mt=1,process.env.NODE_ENV!=="production"&&(function(){function e(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===A?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case F:return"Fragment";case h:return"Profiler";case y:return"StrictMode";case te:return"Suspense";case ye:return"SuspenseList";case E:return"Activity"}if(typeof i=="object")switch(typeof i.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),i.$$typeof){case x:return"Portal";case k:return i.displayName||"Context";case O:return(i._context.displayName||"Context")+".Consumer";case D:var g=i.render;return i=i.displayName,i||(i=g.displayName||g.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ne:return g=i.displayName||null,g!==null?g:e(i.type)||"Memo";case X:g=i._payload,i=i._init;try{return e(i(g))}catch{}}return null}function t(i){return""+i}function r(i){try{t(i);var g=!1}catch{g=!0}if(g){g=console;var T=g.error,j=typeof Symbol=="function"&&Symbol.toStringTag&&i[Symbol.toStringTag]||i.constructor.name||"Object";return T.call(g,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",j),t(i)}}function n(i){if(i===F)return"<>";if(typeof i=="object"&&i!==null&&i.$$typeof===X)return"<...>";try{var g=e(i);return g?"<"+g+">":"<...>"}catch{return"<...>"}}function o(){var i=$.A;return i===null?null:i.getOwner()}function s(){return Error("react-stack-top-frame")}function a(i){if(le.call(i,"key")){var g=Object.getOwnPropertyDescriptor(i,"key").get;if(g&&g.isReactWarning)return!1}return i.key!==void 0}function c(i,g){function T(){Q||(Q=!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)",g))}T.isReactWarning=!0,Object.defineProperty(i,"key",{get:T,configurable:!0})}function f(){var i=e(this.type);return oe[i]||(oe[i]=!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.")),i=this.props.ref,i!==void 0?i:null}function p(i,g,T,j,ee,P){var v=T.ref;return i={$$typeof:C,type:i,key:g,props:T,_owner:j},(v!==void 0?v:null)!==null?Object.defineProperty(i,"ref",{enumerable:!1,get:f}):Object.defineProperty(i,"ref",{enumerable:!1,value:null}),i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(i,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(i,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.defineProperty(i,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:P}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i}function m(i,g,T,j,ee,P){var v=g.children;if(v!==void 0)if(j)if(V(v)){for(j=0;j<v.length;j++)b(v[j]);Object.freeze&&Object.freeze(v)}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 b(v);if(le.call(g,"key")){v=e(i);var B=Object.keys(g).filter(function(Ne){return Ne!=="key"});j=0<B.length?"{key: someKey, "+B.join(": ..., ")+": ...}":"{key: someKey}",W[v+j]||(B=0<B.length?"{"+B.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,j,_,B,_),X[_+j]=!0)}if(_=null,O!==void 0&&(r(O),_=""+O),i(g)&&(r(g.key),_=""+g.key),"key"in g){O={};for(var ne in g)ne!=="key"&&(O[ne]=g[ne])}else O=g;return _&&c(O,typeof a=="function"?a.displayName||a.name||"Unknown":a),d(a,_,O,s(),re,I)}function y(a){T(a)?a._store&&(a._store.validated=1):typeof a=="object"&&a!==null&&a.$$typeof===Y&&(a._payload.status==="fulfilled"?T(a._payload.value)&&a._payload.value._store&&(a._payload.value._store.validated=1):a._store&&(a._store.validated=1))}function T(a){return typeof a=="object"&&a!==null&&a.$$typeof===C}var S=v,C=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),N=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),se=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),k=Symbol.for("react.client.reference"),$=S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=Object.prototype.hasOwnProperty,V=Array.isArray,Z=console.createTask?console.createTask:function(){return null};S={react_stack_bottom_frame:function(a){return a()}};var te,oe={},be=S.react_stack_bottom_frame.bind(S,o)(),ue=Z(n(o)),X={};Oe.Fragment=R,Oe.jsx=function(a,g,O){var j=1e4>$.recentlyCreatedOwnerStacks++;return h(a,g,O,!1,j?Error("react-stack-top-frame"):be,j?Z(n(a)):ue)},Oe.jsxs=function(a,g,O){var j=1e4>$.recentlyCreatedOwnerStacks++;return h(a,g,O,!0,j?Error("react-stack-top-frame"):be,j?Z(n(a)):ue)}})()),Oe}var yt;function hr(){return yt||(yt=1,process.env.NODE_ENV==="production"?ve.exports=dr():ve.exports=pr()),ve.exports}var p=hr();const mr={high:{color:"red",text:"高"},medium:{color:"orange",text:"中"},low:{color:"green",text:"低"}},yr={pending:{color:"default",text:"待处理"},in_progress:{color:"blue",text:"进行中"},completed:{color:"green",text:"已完成"}};function br({task:e,onEdit:t,onComplete:r}){const n=mr[e.priority]||{color:"default",text:e.priority},s=yr[e.status]||{color:"default",text:e.status};return p.jsx(u.Card,{size:"small",title:e.title,extra:p.jsxs(u.Space,{children:[e.status!=="completed"&&p.jsx(u.Button,{size:"small",icon:p.jsx(U.CheckCircleOutlined,{}),onClick:()=>r==null?void 0:r(e),children:"完成"}),p.jsx(u.Button,{size:"small",icon:p.jsx(U.EditOutlined,{}),onClick:()=>t==null?void 0:t(e),children:"编辑"})]}),children:p.jsxs(u.Space,{direction:"vertical",style:{width:"100%"},children:[p.jsxs("div",{children:["项目:",e.projectName]}),p.jsxs(u.Space,{children:[p.jsx(u.Tag,{color:n.color,children:n.text}),p.jsx(u.Tag,{color:s.color,children:s.text})]}),e.dueDate&&p.jsxs("div",{children:["截止:",e.dueDate]})]})})}const gr={high:"red",medium:"orange",low:"green"},wr={pending:"default",in_progress:"blue",completed:"green"};function Er({dataSource:e,loading:t,onEdit:r,onDelete:n,onComplete:s}){const o=[{title:"任务名称",dataIndex:"title",key:"title"},{title:"项目",dataIndex:"projectName",key:"projectName"},{title:"优先级",dataIndex:"priority",key:"priority",render:i=>p.jsx(u.Tag,{color:gr[i],children:i==="high"?"高":i==="medium"?"中":"低"})},{title:"状态",dataIndex:"status",key:"status",render:i=>{const c={pending:"待处理",in_progress:"进行中",completed:"已完成"};return p.jsx(u.Tag,{color:wr[i],children:c[i]||i})}},{title:"截止日期",dataIndex:"dueDate",key:"dueDate"},{title:"操作",key:"action",render:(i,c)=>p.jsxs(u.Space,{children:[c.status!=="completed"&&p.jsx(u.Button,{size:"small",icon:p.jsx(U.CheckCircleOutlined,{}),onClick:()=>s==null?void 0:s(c),children:"完成"}),p.jsx(u.Button,{size:"small",icon:p.jsx(U.EditOutlined,{}),onClick:()=>r==null?void 0:r(c),children:"编辑"}),p.jsx(u.Button,{size:"small",danger:!0,icon:p.jsx(U.DeleteOutlined,{}),onClick:()=>n==null?void 0:n(c),children:"删除"})]})}];return p.jsx(u.Table,{columns:o,dataSource:e,loading:t,rowKey:"id",pagination:{pageSize:10}})}function xr({value:e,onChange:t,projects:r=[]}){return p.jsx(u.Select,{value:e,onChange:t,placeholder:"请选择项目",style:{width:200},allowClear:!0,children:r.map(n=>p.jsx(u.Select.Option,{value:n.id,children:n.name},n.id))})}function bt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Rr}=Object.prototype,{getPrototypeOf:we}=Object,{iterator:_e,toStringTag:gt}=Symbol,Fe=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),je=(e,t)=>{let r=e;const n=[];for(;r!=null&&r!==Object.prototype;){if(n.indexOf(r)!==-1)return!1;if(n.push(r),Fe(r,t))return!0;r=we(r)}return!1},Sr=(e,t)=>e!=null&&je(e,t)?e[t]:void 0,Ve=(e=>t=>{const r=Rr.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ee=e=>(e=e.toLowerCase(),t=>Ve(t)===e),Le=e=>t=>typeof t===e,{isArray:pe}=Array,Ee=Le("undefined");function xe(e){return e!==null&&!Ee(e)&&e.constructor!==null&&!Ee(e.constructor)&&J(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const wt=ee("ArrayBuffer");function Tr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&wt(e.buffer),t}const Or=Le("string"),J=Le("function"),Et=Le("number"),Re=e=>e!==null&&typeof e=="object",_r=e=>e===!0||e===!1,Ue=e=>{if(!Re(e))return!1;const t=we(e);return(t===null||t===Object.prototype||we(t)===null)&&!je(e,gt)&&!je(e,_e)},jr=e=>{if(!Re(e)||xe(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Ar=ee("Date"),Pr=ee("File"),Cr=e=>!!(e&&typeof e.uri<"u"),kr=e=>e&&typeof e.getParts<"u",Nr=ee("Blob"),Ir=ee("FileList"),Dr=e=>Re(e)&&J(e.pipe);function vr(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const xt=vr(),Rt=typeof xt.FormData<"u"?xt.FormData:void 0,Fr=e=>{if(!e)return!1;if(Rt&&e instanceof Rt)return!0;const t=we(e);if(!t||t===Object.prototype||!J(e.append))return!1;const r=Ve(e);return r==="formdata"||r==="object"&&J(e.toString)&&e.toString()==="[object FormData]"},Lr=ee("URLSearchParams"),[Ur,Br,qr,zr]=["ReadableStream","Request","Response","Headers"].map(ee),Hr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ae(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),pe(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(xe(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(n=0;n<i;n++)c=o[n],t.call(null,e[c],c,e)}}function St(e,t){if(xe(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}const he=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Tt=e=>!Ee(e)&&e!==he;function Xe(...e){const{caseless:t,skipUndefined:r}=Tt(this)&&this||{},n={},s=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const c=t&&typeof i=="string"&&St(n,i)||i,f=Fe(n,c)?n[c]:void 0;Ue(f)&&Ue(o)?n[c]=Xe(f,o):Ue(o)?n[c]=Xe({},o):pe(o)?n[c]=o.slice():(!r||!Ee(o))&&(n[c]=o)};for(let o=0,i=e.length;o<i;o++){const c=e[o];if(!c||xe(c)||(Ae(c,s),typeof c!="object"||pe(c)))continue;const f=Object.getOwnPropertySymbols(c);for(let d=0;d<f.length;d++){const h=f[d];en.call(c,h)&&s(c[h],h)}}return n}const Mr=(e,t,r,{allOwnKeys:n}={})=>(Ae(t,(s,o)=>{r&&J(s)?Object.defineProperty(e,o,{__proto__:null,value:bt(s,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),$r=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Jr=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},Wr=(e,t,r,n)=>{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],(!n||n(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=r!==!1&&we(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Vr=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Xr=e=>{if(!e)return null;if(pe(e))return e;let t=e.length;if(!Et(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Kr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&we(Uint8Array)),Yr=(e,t)=>{const n=(e&&e[_e]).call(e);let s;for(;(s=n.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Gr=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Qr=ee("HTMLFormElement"),Zr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),{propertyIsEnumerable:en}=Object.prototype,tn=ee("RegExp"),Ot=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Ae(r,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(n[o]=i||s)}),Object.defineProperties(e,n)},rn=e=>{Ot(e,(t,r)=>{if(J(e)&&["arguments","caller","callee"].includes(r))return!1;const n=e[r];if(J(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},nn=(e,t)=>{const r={},n=s=>{s.forEach(o=>{r[o]=!0})};return pe(e)?n(e):n(String(e).split(t)),r},sn=()=>{},on=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function an(e){return!!(e&&J(e.append)&&e[gt]==="FormData"&&e[_e])}const ln=e=>{const t=new WeakSet,r=n=>{if(Re(n)){if(t.has(n))return;if(xe(n))return n;if(!("toJSON"in n)){t.add(n);const s=pe(n)?[]:{};return Ae(n,(o,i)=>{const c=r(o);!Ee(c)&&(s[i]=c)}),t.delete(n),s}}return n};return r(e)},cn=ee("AsyncFunction"),un=e=>e&&(Re(e)||J(e))&&J(e.then)&&J(e.catch),_t=((e,t)=>e?setImmediate:t?((r,n)=>(he.addEventListener("message",({source:s,data:o})=>{s===he&&o===r&&n.length&&n.shift()()},!1),s=>{n.push(s),he.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",J(he.postMessage)),fn=typeof queueMicrotask<"u"?queueMicrotask.bind(he):typeof process<"u"&&process.nextTick||_t,jt=e=>e!=null&&J(e[_e]),l={isArray:pe,isArrayBuffer:wt,isBuffer:xe,isFormData:Fr,isArrayBufferView:Tr,isString:Or,isNumber:Et,isBoolean:_r,isObject:Re,isPlainObject:Ue,isEmptyObject:jr,isReadableStream:Ur,isRequest:Br,isResponse:qr,isHeaders:zr,isUndefined:Ee,isDate:Ar,isFile:Pr,isReactNativeBlob:Cr,isReactNative:kr,isBlob:Nr,isRegExp:tn,isFunction:J,isStream:Dr,isURLSearchParams:Lr,isTypedArray:Kr,isFileList:Ir,forEach:Ae,merge:Xe,extend:Mr,trim:Hr,stripBOM:$r,inherits:Jr,toFlatObject:Wr,kindOf:Ve,kindOfTest:ee,endsWith:Vr,toArray:Xr,forEachEntry:Yr,matchAll:Gr,isHTMLForm:Qr,hasOwnProperty:Fe,hasOwnProp:Fe,hasOwnInPrototypeChain:je,getSafeProp:Sr,reduceDescriptors:Ot,freezeMethods:rn,toObjectSet:nn,toCamelCase:Zr,noop:sn,toFiniteNumber:on,findKey:St,global:he,isContextDefined:Tt,isSpecCompliantForm:an,toJSONObject:ln,isAsyncFn:cn,isThenable:un,setImmediate:_t,asap:fn,isIterable:jt,isSafeIterable:e=>e!=null&&je(e,_e)&&jt(e)},dn=l.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"]),pn=e=>{const t={};let r,n,s;return e&&e.split(`
|
|
23
|
-
`).forEach(function(i){s=i.indexOf(":"),r=i.substring(0,s).trim().toLowerCase(),n=i.substring(s+1).trim(),!(!r||t[r]&&dn[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t};function hn(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}const mn=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),yn=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ke(e,t){return l.isArray(e)?e.map(r=>Ke(r,t)):hn(String(e).replace(t,""))}const bn=e=>Ke(e,mn),gn=e=>Ke(e,yn);function At(e){const t=Object.create(null);return l.forEach(e.toJSON(),(r,n)=>{t[n]=gn(r)}),t}const Pt=Symbol("internals");function Pe(e){return e&&String(e).trim().toLowerCase()}function Be(e){return e===!1||e==null?e:l.isArray(e)?e.map(Be):bn(String(e))}function wn(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const En=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ye(e,t,r,n,s){if(l.isFunction(n))return n.call(this,t,r);if(s&&(t=r),!!l.isString(t)){if(l.isString(n))return t.indexOf(n)!==-1;if(l.isRegExp(n))return n.test(t)}}function xn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function Rn(e,t){const r=l.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{__proto__:null,value:function(s,o,i){return this[n].call(this,t,s,o,i)},configurable:!0})})}let H=class{constructor(t){t&&this.set(t)}set(t,r,n){const s=this;function o(c,f,d){const h=Pe(f);if(!h)return;const y=l.findKey(s,h);(!y||s[y]===void 0||d===!0||d===void 0&&s[y]!==!1)&&(s[y||f]=Be(c))}const i=(c,f)=>l.forEach(c,(d,h)=>o(d,h,f));if(l.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(l.isString(t)&&(t=t.trim())&&!En(t))i(pn(t),r);else if(l.isObject(t)&&l.isSafeIterable(t)){let c=Object.create(null),f,d;for(const h of t){if(!l.isArray(h))throw new TypeError("Object iterator must return a key-value pair");d=h[0],l.hasOwnProp(c,d)?(f=c[d],c[d]=l.isArray(f)?[...f,h[1]]:[f,h[1]]):c[d]=h[1]}i(c,r)}else t!=null&&o(r,t,n);return this}get(t,r){if(t=Pe(t),t){const n=l.findKey(this,t);if(n){const s=this[n];if(!r)return s;if(r===!0)return wn(s);if(l.isFunction(r))return r.call(this,s,n);if(l.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Pe(t),t){const n=l.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Ye(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let s=!1;function o(i){if(i=Pe(i),i){const c=l.findKey(n,i);c&&(!r||Ye(n,n[c],c,r))&&(delete n[c],s=!0)}}return l.isArray(t)?t.forEach(o):o(t),s}clear(t){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const o=r[n];(!t||Ye(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const r=this,n={};return l.forEach(this,(s,o)=>{const i=l.findKey(n,o);if(i){r[i]=Be(s),delete r[o];return}const c=t?xn(o):String(o).trim();c!==o&&delete r[o],r[c]=Be(s),n[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return l.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=t&&l.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
24
|
-
`)}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,...r){const n=new this(t);return r.forEach(s=>n.set(s)),n}static accessor(t){const n=(this[Pt]=this[Pt]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=Pe(i);n[c]||(Rn(s,i),n[c]=!0)}return l.isArray(t)?t.forEach(o):o(t),this}};H.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(H.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),l.freezeMethods(H);const Sn="[REDACTED ****]";function Tn(e){if(l.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(l.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function On(e,t){const r=new Set(t.map(o=>String(o).toLowerCase())),n=[],s=o=>{if(o===null||typeof o!="object"||l.isBuffer(o))return o;if(n.indexOf(o)!==-1)return;o instanceof H&&(o=o.toJSON()),n.push(o);let i;if(l.isArray(o))i=[],o.forEach((c,f)=>{const d=s(c);l.isUndefined(d)||(i[f]=d)});else{if(!l.isPlainObject(o)&&Tn(o))return n.pop(),o;i=Object.create(null);for(const[c,f]of Object.entries(o)){const d=r.has(c.toLowerCase())?Sn:s(f);l.isUndefined(d)||(i[c]=d)}}return n.pop(),i};return s(e)}let x=class ur extends Error{static from(t,r,n,s,o,i){const c=new ur(t.message,r||t.code,n,s,o);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),i&&Object.assign(c,i),c}constructor(t,r,n,s,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,r=t&&l.hasOwnProp(t,"redact")?t.redact:void 0,n=l.isArray(r)&&r.length>0?On(t,r):l.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};x.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",x.ERR_BAD_OPTION="ERR_BAD_OPTION",x.ECONNABORTED="ECONNABORTED",x.ETIMEDOUT="ETIMEDOUT",x.ECONNREFUSED="ECONNREFUSED",x.ERR_NETWORK="ERR_NETWORK",x.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",x.ERR_DEPRECATED="ERR_DEPRECATED",x.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",x.ERR_BAD_REQUEST="ERR_BAD_REQUEST",x.ERR_CANCELED="ERR_CANCELED",x.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",x.ERR_INVALID_URL="ERR_INVALID_URL",x.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const _n=null,Ct=100;function Ge(e){return l.isPlainObject(e)||l.isArray(e)}function kt(e){return l.endsWith(e,"[]")?e.slice(0,-2):e}function Qe(e,t,r){return e?e.concat(t).map(function(s,o){return s=kt(s),!r&&o?"["+s+"]":s}).join(r?".":""):t}function jn(e){return l.isArray(e)&&!e.some(Ge)}const An=l.toFlatObject(l,{},null,function(t){return/^is[A-Z]/.test(t)});function qe(e,t,r){if(!l.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=l.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,E){return!l.isUndefined(E[b])});const n=r.metaTokens,s=r.visitor||C,o=r.dots,i=r.indexes,c=r.Blob||typeof Blob<"u"&&Blob,f=r.maxDepth===void 0?Ct:r.maxDepth,d=c&&l.isSpecCompliantForm(t),h=[];if(!l.isFunction(s))throw new TypeError("visitor must be a function");function y(m){if(m===null)return"";if(l.isDate(m))return m.toISOString();if(l.isBoolean(m))return m.toString();if(!d&&l.isBlob(m))throw new x("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(m)||l.isTypedArray(m)?d&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function T(m){if(m>f)throw new x("Object is too deeply nested ("+m+" levels). Max depth: "+f,x.ERR_FORM_DATA_DEPTH_EXCEEDED)}function S(m,b){if(f===1/0)return JSON.stringify(m);const E=[];return JSON.stringify(m,function(L,D){if(!l.isObject(D))return D;for(;E.length&&E[E.length-1]!==this;)E.pop();return E.push(D),T(b+E.length-1),D})}function C(m,b,E){let N=m;if(l.isReactNative(t)&&l.isReactNativeBlob(m))return t.append(Qe(E,b,o),y(m)),!1;if(m&&!E&&typeof m=="object"){if(l.endsWith(b,"{}"))b=n?b:b.slice(0,-2),m=S(m,1);else if(l.isArray(m)&&jn(m)||(l.isFileList(m)||l.endsWith(b,"[]"))&&(N=l.toArray(m)))return b=kt(b),N.forEach(function(D,W){!(l.isUndefined(D)||D===null)&&t.append(i===!0?Qe([b],W,o):i===null?b:b+"[]",y(D))}),!1}return Ge(m)?!0:(t.append(Qe(E,b,o),y(m)),!1)}const A=Object.assign(An,{defaultVisitor:C,convertValue:y,isVisitable:Ge});function R(m,b,E=0){if(!l.isUndefined(m)){if(T(E),h.indexOf(m)!==-1)throw new Error("Circular reference detected in "+b.join("."));h.push(m),l.forEach(m,function(L,D){(!(l.isUndefined(L)||L===null)&&s.call(t,L,l.isString(D)?D.trim():D,b,A))===!0&&R(L,b?b.concat(D):[D],E+1)}),h.pop()}}if(!l.isObject(e))throw new TypeError("data must be an object");return R(e),t}function Nt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(n){return t[n]})}function Ze(e,t){this._pairs=[],e&&qe(e,this,t)}const It=Ze.prototype;It.append=function(t,r){this._pairs.push([t,r])},It.toString=function(t){const r=t?function(n){return t.call(this,n,Nt)}:Nt;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function Pn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Dt(e,t,r){if(!t)return e;const n=l.isFunction(r)?{serialize:r}:r,s=l.getSafeProp(n,"encode")||Pn,o=l.getSafeProp(n,"serialize");let i;if(o?i=o(t,n):i=l.isURLSearchParams(t)?t.toString():new Ze(t,n).toString(s),i){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class vt{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){l.forEach(this.handlers,function(n){n!==null&&t(n)})}}const et={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Cn={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ze,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},tt=typeof window<"u"&&typeof document<"u",rt=typeof navigator=="object"&&navigator||void 0,kn=tt&&(!rt||["ReactNative","NativeScript","NS"].indexOf(rt.product)<0),Nn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",In=tt&&window.location.href||"http://localhost",z={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:tt,hasStandardBrowserEnv:kn,hasStandardBrowserWebWorkerEnv:Nn,navigator:rt,origin:In},Symbol.toStringTag,{value:"Module"})),...Cn};function Dn(e,t){return qe(e,new z.classes.URLSearchParams,{visitor:function(r,n,s,o){return z.isNode&&l.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const Ft=Ct;function Lt(e){if(e>Ft)throw new x("FormData field is too deeply nested ("+e+" levels). Max depth: "+Ft,x.ERR_FORM_DATA_DEPTH_EXCEEDED)}function vn(e){const t=[],r=/\w+|\[(\w*)]/g;let n;for(;(n=r.exec(e))!==null;)Lt(t.length),t.push(n[0]==="[]"?"":n[1]||n[0]);return t}function Fn(e){const t={},r=Object.keys(e);let n;const s=r.length;let o;for(n=0;n<s;n++)o=r[n],t[o]=e[o];return t}function Ut(e){function t(r,n,s,o){Lt(o);let i=r[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),f=o>=r.length;return i=!i&&l.isArray(s)?s.length:i,f?(l.hasOwnProp(s,i)?s[i]=l.isArray(s[i])?s[i].concat(n):[s[i],n]:s[i]=n,!c):((!l.hasOwnProp(s,i)||!l.isObject(s[i]))&&(s[i]=[]),t(r,n,s[i],o)&&l.isArray(s[i])&&(s[i]=Fn(s[i])),!c)}if(l.isFormData(e)&&l.isFunction(e.entries)){const r={};return l.forEachEntry(e,(n,s)=>{t(vn(n),s,r,0)}),r}return null}const Se=(e,t)=>e!=null&&l.hasOwnProp(e,t)?e[t]:void 0;function Ln(e,t,r){if(l.isString(e))try{return(t||JSON.parse)(e),l.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Ce={transitional:et,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,o=l.isObject(t);if(o&&l.isHTMLForm(t)&&(t=new FormData(t)),l.isFormData(t))return s?JSON.stringify(Ut(t)):t;if(l.isArrayBuffer(t)||l.isBuffer(t)||l.isStream(t)||l.isFile(t)||l.isBlob(t)||l.isReadableStream(t))return t;if(l.isArrayBufferView(t))return t.buffer;if(l.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){const f=Se(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return Dn(t,f).toString();if((c=l.isFileList(t))||n.indexOf("multipart/form-data")>-1){const d=Se(this,"env"),h=d&&d.FormData;return qe(c?{"files[]":t}:t,h&&new h,f)}}return o||s?(r.setContentType("application/json",!1),Ln(t)):t}],transformResponse:[function(t){const r=Se(this,"transitional")||Ce.transitional,n=r&&r.forcedJSONParsing,s=Se(this,"responseType"),o=s==="json";if(l.isResponse(t)||l.isReadableStream(t))return t;if(t&&l.isString(t)&&(n&&!s||o)){const c=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t,Se(this,"parseReviver"))}catch(f){if(c)throw f.name==="SyntaxError"?x.from(f,x.ERR_BAD_RESPONSE,this,null,Se(this,"response")):f}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:z.classes.FormData,Blob:z.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch","query"],e=>{Ce.headers[e]={}});function nt(e,t){const r=this||Ce,n=t||r,s=H.from(n.headers);let o=n.data;return l.forEach(e,function(c){o=c.call(r,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Bt(e){return!!(e&&e.__CANCEL__)}let ke=class extends x{constructor(t,r,n){super(t??"canceled",x.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function qt(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new x("Request failed with status code "+r.status,r.status>=400&&r.status<500?x.ERR_BAD_REQUEST:x.ERR_BAD_RESPONSE,r.config,r.request,r))}function Un(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Bn(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(f){const d=Date.now(),h=n[o];i||(i=d),r[s]=f,n[s]=d;let y=o,T=0;for(;y!==s;)T+=r[y++],y=y%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),d-i<t)return;const S=h&&d-h;return S?Math.round(T*1e3/S):void 0}}function qn(e,t){let r=0,n=1e3/t,s,o;const i=(d,h=Date.now())=>{r=h,s=null,o&&(clearTimeout(o),o=null),e(...d)};return[(...d)=>{const h=Date.now(),y=h-r;y>=n?i(d,h):(s=d,o||(o=setTimeout(()=>{o=null,i(s)},n-y)))},()=>s&&i(s)]}const ze=(e,t,r=3)=>{let n=0;const s=Bn(50,250);return qn(o=>{if(!o||typeof o.loaded!="number")return;const i=o.loaded,c=o.lengthComputable?o.total:void 0,f=c!=null?Math.min(i,c):i,d=Math.max(0,f-n),h=s(d);n=Math.max(n,f);const y={loaded:f,total:c,progress:c?f/c:void 0,bytes:d,rate:h||void 0,estimated:h&&c?(c-f)/h:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(y)},r)},zt=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Ht=e=>(...t)=>l.asap(()=>e(...t)),zn=z.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,z.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(z.origin),z.navigator&&/(msie|trident)/i.test(z.navigator.userAgent)):()=>!0,Hn=z.hasStandardBrowserEnv?{write(e,t,r,n,s,o,i){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];l.isNumber(r)&&c.push(`expires=${new Date(r).toUTCString()}`),l.isString(n)&&c.push(`path=${n}`),l.isString(s)&&c.push(`domain=${s}`),o===!0&&c.push("secure"),l.isString(i)&&c.push(`SameSite=${i}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let r=0;r<t.length;r++){const n=t[r].replace(/^\s+/,""),s=n.indexOf("=");if(s!==-1&&n.slice(0,s)===e)return decodeURIComponent(n.slice(s+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Mn(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function $n(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const Jn=/^https?:(?!\/\/)/i,Wn=/[\t\n\r]/g;function Vn(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Xn(e){return Vn(e).replace(Wn,"")}function Mt(e,t){if(typeof e=="string"&&Jn.test(Xn(e)))throw new x('Invalid URL: missing "//" after protocol',x.ERR_INVALID_URL,t)}function $t(e,t,r,n){Mt(t,n);let s=!Mn(t);return e&&(s||r===!1)?(Mt(e,n),$n(e,t)):t}const Jt=e=>e instanceof H?{...e}:e;function me(e,t){t=t||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(h,y,T,S){return l.isPlainObject(h)&&l.isPlainObject(y)?l.merge.call({caseless:S},h,y):l.isPlainObject(y)?l.merge({},y):l.isArray(y)?y.slice():y}function s(h,y,T,S){if(l.isUndefined(y)){if(!l.isUndefined(h))return n(void 0,h,T,S)}else return n(h,y,T,S)}function o(h,y){if(!l.isUndefined(y))return n(void 0,y)}function i(h,y){if(l.isUndefined(y)){if(!l.isUndefined(h))return n(void 0,h)}else return n(void 0,y)}function c(h){const y=l.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!l.isUndefined(y))if(l.isPlainObject(y)){if(l.hasOwnProp(y,h))return y[h]}else return;const T=l.hasOwnProp(e,"transitional")?e.transitional:void 0;if(l.isPlainObject(T)&&l.hasOwnProp(T,h))return T[h]}function f(h,y,T){if(l.hasOwnProp(t,T))return n(h,y);if(l.hasOwnProp(e,T))return n(void 0,h)}const d={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,allowedSocketPaths:i,responseEncoding:i,validateStatus:f,headers:(h,y,T)=>s(Jt(h),Jt(y),T,!0)};return l.forEach(Object.keys({...e,...t}),function(y){if(y==="__proto__"||y==="constructor"||y==="prototype")return;const T=l.hasOwnProp(d,y)?d[y]:s,S=l.hasOwnProp(e,y)?e[y]:void 0,C=l.hasOwnProp(t,y)?t[y]:void 0,A=T(S,C,y);l.isUndefined(A)&&T!==f||(r[y]=A)}),l.hasOwnProp(t,"validateStatus")&&l.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(l.hasOwnProp(e,"validateStatus")?r.validateStatus=n(void 0,e.validateStatus):delete r.validateStatus),r}const Kn=["content-type","content-length"];function Yn(e,t,r){if(r!=="content-only"){e.set(t);return}Object.entries(t).forEach(([n,s])=>{Kn.includes(n.toLowerCase())&&e.set(n,s)})}const Gn=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16)));function Wt(e){const t=me({},e),r=T=>l.hasOwnProp(t,T)?t[T]:void 0,n=r("data");let s=r("withXSRFToken");const o=r("xsrfHeaderName"),i=r("xsrfCookieName");let c=r("headers");const f=r("auth"),d=r("baseURL"),h=r("allowAbsoluteUrls"),y=r("url");if(t.headers=c=H.from(c),t.url=Dt($t(d,y,h,t),r("params"),r("paramsSerializer")),f){const T=l.getSafeProp(f,"username")||"",S=l.getSafeProp(f,"password")||"";c.set("Authorization","Basic "+btoa(T+":"+(S?Gn(S):"")))}if(l.isFormData(n)&&(z.hasStandardBrowserEnv||z.hasStandardBrowserWebWorkerEnv||l.isReactNative(n)?c.setContentType(void 0):l.isFunction(n.getHeaders)&&Yn(c,n.getHeaders(),r("formDataHeaderPolicy"))),z.hasStandardBrowserEnv&&(l.isFunction(s)&&(s=s(t)),s===!0||s==null&&zn(t.url))){const S=o&&i&&Hn.read(i);S&&c.set(o,S)}return t}const Qn=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const s=Wt(e);let o=s.data;const i=H.from(s.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:d}=s,h,y,T,S,C;function A(){S&&S(),C&&C(),s.cancelToken&&s.cancelToken.unsubscribe(h),s.signal&&s.signal.removeEventListener("abort",h)}let R=new XMLHttpRequest;R.open(s.method.toUpperCase(),s.url,!0),R.timeout=s.timeout;function m(){if(!R)return;const E=H.from("getAllResponseHeaders"in R&&R.getAllResponseHeaders()),L={data:!c||c==="text"||c==="json"?R.responseText:R.response,status:R.status,statusText:R.statusText,headers:E,config:e,request:R};qt(function(W){r(W),A()},function(W){n(W),A()},L),R=null}"onloadend"in R?R.onloadend=m:R.onreadystatechange=function(){!R||R.readyState!==4||R.status===0&&!(R.responseURL&&R.responseURL.startsWith("file:"))||setTimeout(m)},R.onabort=function(){R&&(n(new x("Request aborted",x.ECONNABORTED,e,R)),A(),R=null)},R.onerror=function(N){const L=N&&N.message?N.message:"Network Error",D=new x(L,x.ERR_NETWORK,e,R);D.event=N||null,n(D),A(),R=null},R.ontimeout=function(){let N=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const L=s.transitional||et;s.timeoutErrorMessage&&(N=s.timeoutErrorMessage),n(new x(N,L.clarifyTimeoutError?x.ETIMEDOUT:x.ECONNABORTED,e,R)),A(),R=null},o===void 0&&i.setContentType(null),"setRequestHeader"in R&&l.forEach(At(i),function(N,L){R.setRequestHeader(L,N)}),l.isUndefined(s.withCredentials)||(R.withCredentials=!!s.withCredentials),c&&c!=="json"&&(R.responseType=s.responseType),d&&([T,C]=ze(d,!0),R.addEventListener("progress",T)),f&&R.upload&&([y,S]=ze(f),R.upload.addEventListener("progress",y),R.upload.addEventListener("loadend",S)),(s.cancelToken||s.signal)&&(h=E=>{R&&(n(!E||E.type?new ke(null,e,R):E),R.abort(),A(),R=null)},s.cancelToken&&s.cancelToken.subscribe(h),s.signal&&(s.signal.aborted?h():s.signal.addEventListener("abort",h)));const b=Un(s.url);if(b&&!z.protocols.includes(b)){n(new x("Unsupported protocol "+b+":",x.ERR_BAD_REQUEST,e));return}R.send(o||null)})},Zn=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const r=new AbortController;let n=!1;const s=function(f){if(!n){n=!0,i();const d=f instanceof Error?f:this.reason;r.abort(d instanceof x?d:new ke(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,s(new x(`timeout of ${t}ms exceeded`,x.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(s):f.removeEventListener("abort",s)}),e=null)};e.forEach(f=>f.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>l.asap(i),c},es=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,s;for(;n<r;)s=n+t,yield e.slice(n,s),n=s},ts=async function*(e,t){for await(const r of rs(e))yield*es(r,t)},rs=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Vt=(e,t,r,n)=>{const s=ts(e,t);let o=0,i,c=f=>{i||(i=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:d,value:h}=await s.next();if(d){c(),f.close();return}let y=h.byteLength;if(r){let T=o+=y;r(T)}f.enqueue(new Uint8Array(h))}catch(d){throw c(d),d}},cancel(f){return c(f),s.return()}},{highWaterMark:2})},He=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,ns=(e,t,r)=>t+2<r&&He(e.charCodeAt(t+1))&&He(e.charCodeAt(t+2));function ss(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const r=e.slice(5,t),n=e.slice(t+1);if(/;base64/i.test(r)){let i=n.length;const c=n.length;for(let S=0;S<c;S++)if(n.charCodeAt(S)===37&&S+2<c){const C=n.charCodeAt(S+1),A=n.charCodeAt(S+2);He(C)&&He(A)&&(i-=2,S+=2)}let f=0,d=c-1;const h=S=>S>=2&&n.charCodeAt(S-2)===37&&n.charCodeAt(S-1)===51&&(n.charCodeAt(S)===68||n.charCodeAt(S)===100);d>=0&&(n.charCodeAt(d)===61?(f++,d--):h(d)&&(f++,d-=3)),f===1&&d>=0&&(n.charCodeAt(d)===61||h(d))&&f++;const T=Math.floor(i/4)*3-(f||0);return T>0?T:0}let o=0;for(let i=0,c=n.length;i<c;i++){const f=n.charCodeAt(i);if(f===37&&ns(n,i,c))o+=1,i+=2;else if(f<128)o+=1;else if(f<2048)o+=2;else if(f>=55296&&f<=56319&&i+1<c){const d=n.charCodeAt(i+1);d>=56320&&d<=57343?(o+=4,i++):o+=3}else o+=3}return o}const st="1.18.0",Xt=64*1024,{isFunction:Me}=l,os=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16))),Kt=e=>{if(!l.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Yt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},is=e=>{const t=e.indexOf("://");let r=e;return t!==-1&&(r=r.slice(t+3)),r.includes("@")||r.includes(":")},as=e=>{const t=l.global!==void 0&&l.global!==null?l.global:globalThis,{ReadableStream:r,TextEncoder:n}=t;e=l.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:o,Response:i}=e,c=s?Me(s):typeof fetch=="function",f=Me(o),d=Me(i);if(!c)return!1;const h=c&&Me(r),y=c&&(typeof n=="function"?(m=>b=>m.encode(b))(new n):async m=>new Uint8Array(await new o(m).arrayBuffer())),T=f&&h&&Yt(()=>{let m=!1;const b=new o(z.origin,{body:new r,method:"POST",get duplex(){return m=!0,"half"}}),E=b.headers.has("Content-Type");return b.body!=null&&b.body.cancel(),m&&!E}),S=d&&h&&Yt(()=>l.isReadableStream(new i("").body)),C={stream:S&&(m=>m.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!C[m]&&(C[m]=(b,E)=>{let N=b&&b[m];if(N)return N.call(b);throw new x(`Response type '${m}' is not supported`,x.ERR_NOT_SUPPORT,E)})});const A=async m=>{if(m==null)return 0;if(l.isBlob(m))return m.size;if(l.isSpecCompliantForm(m))return(await new o(z.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(l.isArrayBufferView(m)||l.isArrayBuffer(m))return m.byteLength;if(l.isURLSearchParams(m)&&(m=m+""),l.isString(m))return(await y(m)).byteLength},R=async(m,b)=>{const E=l.toFiniteNumber(m.getContentLength());return E??A(b)};return async m=>{let{url:b,method:E,data:N,signal:L,cancelToken:D,timeout:W,onDownloadProgress:se,onUploadProgress:Y,responseType:w,headers:k,withCredentials:$="same-origin",fetchOptions:ce,maxContentLength:V,maxBodyLength:Z}=Wt(m);const te=l.isNumber(V)&&V>-1,oe=l.isNumber(Z)&&Z>-1,be=I=>l.hasOwnProp(m,I)?m[I]:void 0;let ue=s||fetch;w=w?(w+"").toLowerCase():"text";let X=Zn([L,D&&D.toAbortSignal()],W),a=null;const g=X&&X.unsubscribe&&(()=>{X.unsubscribe()});let O,j=null;const re=()=>new x("Request body larger than maxBodyLength limit",x.ERR_BAD_REQUEST,m,a);try{let I;const _=be("auth");if(_){const P=l.getSafeProp(_,"username")||"",G=l.getSafeProp(_,"password")||"";I={username:P,password:G}}if(is(b)){const P=new URL(b,z.origin);if(!I&&(P.username||P.password)){const G=Kt(P.username),fe=Kt(P.password);I={username:G,password:fe}}(P.username||P.password)&&(P.username="",P.password="",b=P.href)}if(I&&(k.delete("authorization"),k.set("Authorization","Basic "+btoa(os((I.username||"")+":"+(I.password||""))))),te&&typeof b=="string"&&b.startsWith("data:")&&ss(b)>V)throw new x("maxContentLength size of "+V+" exceeded",x.ERR_BAD_RESPONSE,m,a);if(oe&&E!=="get"&&E!=="head"){const P=await A(N);if(typeof P=="number"&&isFinite(P)&&(O=P,P>Z))throw re()}const B=oe&&(l.isReadableStream(N)||l.isStream(N)),ne=(P,G,fe)=>Vt(P,Xt,ge=>{if(oe&&ge>Z)throw j=re();G&&G(ge)},fe);if(T&&E!=="get"&&E!=="head"&&(Y||B)){if(O=O??await R(k,N),O!==0||B){let P=new o(b,{method:"POST",body:N,duplex:"half"}),G;if(l.isFormData(N)&&(G=P.headers.get("content-type"))&&k.setContentType(G),P.body){const[fe,ge]=Y&&zt(O,ze(Ht(Y)))||[];N=ne(P.body,fe,ge)}}}else if(B&&!f&&h&&E!=="get"&&E!=="head")N=ne(N);else if(B&&f&&!T&&E!=="get"&&E!=="head")throw new x("Stream request bodies are not supported by the current fetch implementation",x.ERR_NOT_SUPPORT,m,a);l.isString($)||($=$?"include":"omit");const Ie=f&&"credentials"in o.prototype;if(l.isFormData(N)){const P=k.getContentType();P&&/^multipart\/form-data/i.test(P)&&!/boundary=/i.test(P)&&k.delete("content-type")}k.set("User-Agent","axios/"+st,!1);const ar={...ce,signal:X,method:E.toUpperCase(),headers:At(k.normalize()),body:N,duplex:"half",credentials:Ie?$:void 0};a=f&&new o(b,ar);let ie=await(f?ue(a,ce):ue(b,ar));const lr=H.from(ie.headers);if(te){const P=l.toFiniteNumber(lr.getContentLength());if(P!=null&&P>V)throw new x("maxContentLength size of "+V+" exceeded",x.ERR_BAD_RESPONSE,m,a)}const pt=S&&(w==="stream"||w==="response");if(S&&ie.body&&(se||te||pt&&g)){const P={};["status","statusText","headers"].forEach(De=>{P[De]=ie[De]});const G=l.toFiniteNumber(lr.getContentLength()),[fe,ge]=se&&zt(G,ze(Ht(se),!0))||[];let cr=0;const As=De=>{if(te&&(cr=De,cr>V))throw new x("maxContentLength size of "+V+" exceeded",x.ERR_BAD_RESPONSE,m,a);fe&&fe(De)};ie=new i(Vt(ie.body,Xt,As,()=>{ge&&ge(),g&&g()}),P)}w=w||"text";let ae=await C[l.findKey(C,w)||"text"](ie,m);if(te&&!S&&!pt){let P;if(ae!=null&&(typeof ae.byteLength=="number"?P=ae.byteLength:typeof ae.size=="number"?P=ae.size:typeof ae=="string"&&(P=typeof n=="function"?new n().encode(ae).byteLength:ae.length)),typeof P=="number"&&P>V)throw new x("maxContentLength size of "+V+" exceeded",x.ERR_BAD_RESPONSE,m,a)}return!pt&&g&&g(),await new Promise((P,G)=>{qt(P,G,{data:ae,headers:H.from(ie.headers),status:ie.status,statusText:ie.statusText,config:m,request:a})})}catch(I){if(g&&g(),X&&X.aborted&&X.reason instanceof x){const _=X.reason;throw _.config=m,a&&(_.request=a),I!==_&&(_.cause=I),_}throw j?(a&&!j.request&&(j.request=a),j):I instanceof x?(a&&!I.request&&(I.request=a),I):I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new x("Network Error",x.ERR_NETWORK,m,a,I&&I.response),{cause:I.cause||I}):x.from(I,I&&I.code,m,a,I&&I.response)}}},ls=new Map,Gt=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:s}=t,o=[n,s,r];let i=o.length,c=i,f,d,h=ls;for(;c--;)f=o[c],d=h.get(f),d===void 0&&h.set(f,d=c?new Map:as(t)),h=d;return d};Gt();const ot={http:_n,xhr:Qn,fetch:{get:Gt}};l.forEach(ot,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Qt=e=>`- ${e}`,cs=e=>l.isFunction(e)||e===null||e===!1;function us(e,t){e=l.isArray(e)?e:[e];const{length:r}=e;let n,s;const o={};for(let i=0;i<r;i++){n=e[i];let c;if(s=n,!cs(n)&&(s=ot[(c=String(n)).toLowerCase()],s===void 0))throw new x(`Unknown adapter '${c}'`);if(s&&(l.isFunction(s)||(s=s.get(t))))break;o[c||"#"+i]=s}if(!s){const i=Object.entries(o).map(([f,d])=>`adapter ${f} `+(d===!1?"is not supported by the environment":"is not available in the build"));let c=r?i.length>1?`since :
|
|
25
|
-
`+i.map(Qt).join(`
|
|
26
|
-
`):" "+Qt(i[0]):"as no adapter specified";throw new x("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const Zt={getAdapter:us,adapters:ot};function it(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ke(null,e)}function er(e){return it(e),e.headers=H.from(e.headers),e.data=nt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Zt.getAdapter(e.adapter||Ce.adapter,e)(e).then(function(n){it(e),e.response=n;try{n.data=nt.call(e,e.transformResponse,n)}finally{delete e.response}return n.headers=H.from(n.headers),n},function(n){if(!Bt(n)&&(it(e),n&&n.response)){e.response=n.response;try{n.response.data=nt.call(e,e.transformResponse,n.response)}finally{delete e.response}n.response.headers=H.from(n.response.headers)}return Promise.reject(n)})}const $e={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{$e[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const tr={};$e.transitional=function(t,r,n){function s(o,i){return"[Axios v"+st+"] Transitional option '"+o+"'"+i+(n?". "+n:"")}return(o,i,c)=>{if(t===!1)throw new x(s(i," has been removed"+(r?" in "+r:"")),x.ERR_DEPRECATED);return r&&!tr[i]&&(tr[i]=!0,console.warn(s(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,i,c):!0}},$e.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function fs(e,t,r){if(typeof e!="object")throw new x("options must be an object",x.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const o=n[s],i=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(i){const c=e[o],f=c===void 0||i(c,o,e);if(f!==!0)throw new x("option "+o+" must be "+f,x.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new x("Unknown option "+o,x.ERR_BAD_OPTION)}}const Je={assertOptions:fs,validators:$e},M=Je.validators;let ye=class{constructor(t){this.defaults=t||{},this.interceptors={request:new vt,response:new vt}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=(()=>{if(!s.stack)return"";const i=s.stack.indexOf(`
|
|
27
|
-
`);return i===-1?"":s.stack.slice(i+1)})();try{if(!n.stack)n.stack=o;else if(o){const i=o.indexOf(`
|
|
28
|
-
`),c=i===-1?-1:o.indexOf(`
|
|
29
|
-
`,i+1),f=c===-1?"":o.slice(c+1);String(n.stack).endsWith(f)||(n.stack+=`
|
|
30
|
-
`+o)}}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=me(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:o}=r;n!==void 0&&Je.assertOptions(n,{silentJSONParsing:M.transitional(M.boolean),forcedJSONParsing:M.transitional(M.boolean),clarifyTimeoutError:M.transitional(M.boolean),legacyInterceptorReqResOrdering:M.transitional(M.boolean),advertiseZstdAcceptEncoding:M.transitional(M.boolean),validateStatusUndefinedResolves:M.transitional(M.boolean)},!1),s!=null&&(l.isFunction(s)?r.paramsSerializer={serialize:s}:Je.assertOptions(s,{encode:M.function,serialize:M.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Je.assertOptions(r,{baseUrl:M.spelling("baseURL"),withXsrfToken:M.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=o&&l.merge(o.common,o[r.method]);o&&l.forEach(["delete","get","head","post","put","patch","query","common"],C=>{delete o[C]}),r.headers=H.concat(i,o);const c=[];let f=!0;this.interceptors.request.forEach(function(A){if(typeof A.runWhen=="function"&&A.runWhen(r)===!1)return;f=f&&A.synchronous;const R=r.transitional||et;R&&R.legacyInterceptorReqResOrdering?c.unshift(A.fulfilled,A.rejected):c.push(A.fulfilled,A.rejected)});const d=[];this.interceptors.response.forEach(function(A){d.push(A.fulfilled,A.rejected)});let h,y=0,T;if(!f){const C=[er.bind(this),void 0];for(C.unshift(...c),C.push(...d),T=C.length,h=Promise.resolve(r);y<T;)h=h.then(C[y++],C[y++]);return h}T=c.length;let S=r;for(;y<T;){const C=c[y++],A=c[y++];try{S=C(S)}catch(R){A.call(this,R);break}}try{h=er.call(this,S)}catch(C){return Promise.reject(C)}for(y=0,T=d.length;y<T;)h=h.then(d[y++],d[y++]);return h}getUri(t){t=me(this.defaults,t);const r=$t(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Dt(r,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){ye.prototype[t]=function(r,n){return this.request(me(n||{},{method:t,url:r,data:n&&l.hasOwnProp(n,"data")?n.data:void 0}))}}),l.forEach(["post","put","patch","query"],function(t){function r(n){return function(o,i,c){return this.request(me(c||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}ye.prototype[t]=r(),t!=="query"&&(ye.prototype[t+"Form"]=r(!0))});let ds=class fr{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(s=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](s);n._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{n.subscribe(c),o=c}).then(s);return i.cancel=function(){n.unsubscribe(o)},i},t(function(o,i,c){n.reason||(n.reason=new ke(o,i,c),r(n.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 r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new fr(function(s){t=s}),cancel:t}}};function ps(e){return function(r){return e.apply(null,r)}}function hs(e){return l.isObject(e)&&e.isAxiosError===!0}const at={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(at).forEach(([e,t])=>{at[t]=e});function rr(e){const t=new ye(e),r=bt(ye.prototype.request,t);return l.extend(r,ye.prototype,t,{allOwnKeys:!0}),l.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return rr(me(e,s))},r}const F=rr(Ce);F.Axios=ye,F.CanceledError=ke,F.CancelToken=ds,F.isCancel=Bt,F.VERSION=st,F.toFormData=qe,F.AxiosError=x,F.Cancel=F.CanceledError,F.all=function(t){return Promise.all(t)},F.spread=ps,F.isAxiosError=hs,F.mergeConfig=me,F.AxiosHeaders=H,F.formToJSON=e=>Ut(l.isHTMLForm(e)?new FormData(e):e),F.getAdapter=Zt.getAdapter,F.HttpStatusCode=at,F.default=F;const{Axios:vs,AxiosError:Fs,CanceledError:Ls,isCancel:Us,CancelToken:Bs,VERSION:qs,all:zs,Cancel:Hs,isAxiosError:Ms,spread:$s,toFormData:Js,AxiosHeaders:Ws,HttpStatusCode:Vs,formToJSON:Xs,getAdapter:Ks,mergeConfig:Ys,create:Gs}=F;var ms=Object.defineProperty,ys=(e,t,r)=>t in e?ms(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bs=(e,t,r)=>ys(e,t+"",r),lt={exports:{}},Ne={};/**
|
|
22
|
+
<%s key={someKey} {...props} />`,j,v,B,v),W[v+j]=!0)}if(v=null,T!==void 0&&(r(T),v=""+T),a(g)&&(r(g.key),v=""+g.key),"key"in g){T={};for(var re in g)re!=="key"&&(T[re]=g[re])}else T=g;return v&&c(T,typeof i=="function"?i.displayName||i.name||"Unknown":i),p(i,v,T,o(),ee,P)}function b(i){S(i)?i._store&&(i._store.validated=1):typeof i=="object"&&i!==null&&i.$$typeof===X&&(i._payload.status==="fulfilled"?S(i._payload.value)&&i._payload.value._store&&(i._payload.value._store.validated=1):i._store&&(i._store.validated=1))}function S(i){return typeof i=="object"&&i!==null&&i.$$typeof===C}var R=N,C=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),F=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),k=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),ye=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),A=Symbol.for("react.client.reference"),$=R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le=Object.prototype.hasOwnProperty,V=Array.isArray,G=console.createTask?console.createTask:function(){return null};R={react_stack_bottom_frame:function(i){return i()}};var Q,oe={},ge=R.react_stack_bottom_frame.bind(R,s)(),ce=G(n(s)),W={};Te.Fragment=F,Te.jsx=function(i,g,T){var j=1e4>$.recentlyCreatedOwnerStacks++;return m(i,g,T,!1,j?Error("react-stack-top-frame"):ge,j?G(n(i)):ce)},Te.jsxs=function(i,g,T){var j=1e4>$.recentlyCreatedOwnerStacks++;return m(i,g,T,!0,j?Error("react-stack-top-frame"):ge,j?G(n(i)):ce)}})()),Te}var yt;function hr(){return yt||(yt=1,process.env.NODE_ENV==="production"?De.exports=dr():De.exports=pr()),De.exports}var d=hr();const mr={high:{color:"red",text:"高"},medium:{color:"orange",text:"中"},low:{color:"green",text:"低"}},yr={pending:{color:"default",text:"待处理"},in_progress:{color:"blue",text:"进行中"},completed:{color:"green",text:"已完成"}};function gr({task:e,onEdit:t,onComplete:r}){const n=mr[e.priority]||{color:"default",text:e.priority},o=yr[e.status]||{color:"default",text:e.status};return d.jsx(u.Card,{size:"small",title:e.title,extra:d.jsxs(u.Space,{children:[e.status!=="completed"&&d.jsx(u.Button,{size:"small",icon:d.jsx(L.CheckCircleOutlined,{}),onClick:()=>r==null?void 0:r(e),children:"完成"}),d.jsx(u.Button,{size:"small",icon:d.jsx(L.EditOutlined,{}),onClick:()=>t==null?void 0:t(e),children:"编辑"})]}),children:d.jsxs(u.Space,{direction:"vertical",style:{width:"100%"},children:[d.jsxs("div",{children:["项目:",e.projectName]}),d.jsxs(u.Space,{children:[d.jsx(u.Tag,{color:n.color,children:n.text}),d.jsx(u.Tag,{color:o.color,children:o.text})]}),e.dueDate&&d.jsxs("div",{children:["截止:",e.dueDate]})]})})}const br={high:"red",medium:"orange",low:"green"},Er={pending:"default",in_progress:"blue",completed:"green"};function wr({dataSource:e,loading:t,onEdit:r,onDelete:n,onComplete:o}){const s=[{title:"任务名称",dataIndex:"title",key:"title"},{title:"项目",dataIndex:"projectName",key:"projectName"},{title:"优先级",dataIndex:"priority",key:"priority",render:a=>d.jsx(u.Tag,{color:br[a],children:a==="high"?"高":a==="medium"?"中":"低"})},{title:"状态",dataIndex:"status",key:"status",render:a=>{const c={pending:"待处理",in_progress:"进行中",completed:"已完成"};return d.jsx(u.Tag,{color:Er[a],children:c[a]||a})}},{title:"截止日期",dataIndex:"dueDate",key:"dueDate"},{title:"操作",key:"action",render:(a,c)=>d.jsxs(u.Space,{children:[c.status!=="completed"&&d.jsx(u.Button,{size:"small",icon:d.jsx(L.CheckCircleOutlined,{}),onClick:()=>o==null?void 0:o(c),children:"完成"}),d.jsx(u.Button,{size:"small",icon:d.jsx(L.EditOutlined,{}),onClick:()=>r==null?void 0:r(c),children:"编辑"}),d.jsx(u.Button,{size:"small",danger:!0,icon:d.jsx(L.DeleteOutlined,{}),onClick:()=>n==null?void 0:n(c),children:"删除"})]})}];return d.jsx(u.Table,{columns:s,dataSource:e,loading:t,rowKey:"id",pagination:{pageSize:10}})}function Or({value:e,onChange:t,projects:r=[]}){return d.jsx(u.Select,{value:e,onChange:t,placeholder:"请选择项目",style:{width:200},allowClear:!0,children:r.map(n=>d.jsx(u.Select.Option,{value:n.id,children:n.name},n.id))})}var Rr=Object.defineProperty,xr=(e,t,r)=>t in e?Rr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Sr=(e,t,r)=>xr(e,t+"",r),Je={exports:{}},ve={};/**
|
|
31
23
|
* @license React
|
|
32
24
|
* react-jsx-runtime.production.js
|
|
33
25
|
*
|
|
@@ -35,7 +27,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
35
27
|
*
|
|
36
28
|
* This source code is licensed under the MIT license found in the
|
|
37
29
|
* LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/var
|
|
30
|
+
*/var gt;function Tr(){if(gt)return ve;gt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var c in o)c!=="key"&&(s[c]=o[c])}else s=o;return o=s.ref,{$$typeof:e,type:n,key:a,ref:o!==void 0?o:null,props:s}}return ve.Fragment=t,ve.jsx=r,ve.jsxs=r,ve}var Fe={};/**
|
|
39
31
|
* @license React
|
|
40
32
|
* react-jsx-runtime.development.js
|
|
41
33
|
*
|
|
@@ -43,9 +35,17 @@ React keys must be passed directly to JSX without using spread:
|
|
|
43
35
|
*
|
|
44
36
|
* This source code is licensed under the MIT license found in the
|
|
45
37
|
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/var
|
|
38
|
+
*/var bt;function vr(){return bt||(bt=1,process.env.NODE_ENV!=="production"&&(function(){function e(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===A?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case F:return"Fragment";case h:return"Profiler";case y:return"StrictMode";case te:return"Suspense";case ye:return"SuspenseList";case E:return"Activity"}if(typeof i=="object")switch(typeof i.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),i.$$typeof){case x:return"Portal";case k:return i.displayName||"Context";case O:return(i._context.displayName||"Context")+".Consumer";case D:var g=i.render;return i=i.displayName,i||(i=g.displayName||g.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ne:return g=i.displayName||null,g!==null?g:e(i.type)||"Memo";case X:g=i._payload,i=i._init;try{return e(i(g))}catch{}}return null}function t(i){return""+i}function r(i){try{t(i);var g=!1}catch{g=!0}if(g){g=console;var T=g.error,j=typeof Symbol=="function"&&Symbol.toStringTag&&i[Symbol.toStringTag]||i.constructor.name||"Object";return T.call(g,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",j),t(i)}}function n(i){if(i===F)return"<>";if(typeof i=="object"&&i!==null&&i.$$typeof===X)return"<...>";try{var g=e(i);return g?"<"+g+">":"<...>"}catch{return"<...>"}}function o(){var i=$.A;return i===null?null:i.getOwner()}function s(){return Error("react-stack-top-frame")}function a(i){if(le.call(i,"key")){var g=Object.getOwnPropertyDescriptor(i,"key").get;if(g&&g.isReactWarning)return!1}return i.key!==void 0}function c(i,g){function T(){Q||(Q=!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)",g))}T.isReactWarning=!0,Object.defineProperty(i,"key",{get:T,configurable:!0})}function f(){var i=e(this.type);return oe[i]||(oe[i]=!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.")),i=this.props.ref,i!==void 0?i:null}function p(i,g,T,j,ee,P){var v=T.ref;return i={$$typeof:C,type:i,key:g,props:T,_owner:j},(v!==void 0?v:null)!==null?Object.defineProperty(i,"ref",{enumerable:!1,get:f}):Object.defineProperty(i,"ref",{enumerable:!1,value:null}),i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(i,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(i,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.defineProperty(i,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:P}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i}function m(i,g,T,j,ee,P){var v=g.children;if(v!==void 0)if(j)if(V(v)){for(j=0;j<v.length;j++)b(v[j]);Object.freeze&&Object.freeze(v)}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 b(v);if(le.call(g,"key")){v=e(i);var B=Object.keys(g).filter(function(Ne){return Ne!=="key"});j=0<B.length?"{key: someKey, "+B.join(": ..., ")+": ...}":"{key: someKey}",W[v+j]||(B=0<B.length?"{"+B.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
47
39
|
let props = %s;
|
|
48
40
|
<%s {...props} />
|
|
49
41
|
React keys must be passed directly to JSX without using spread:
|
|
50
42
|
let props = %s;
|
|
51
|
-
<%s key={someKey} {...props} />`,j,_,B,_),X[_+j]=!0)}if(_=null,O!==void 0&&(r(O),_=""+O),i(g)&&(r(g.key),_=""+g.key),"key"in g){O={};for(var ne in g)ne!=="key"&&(O[ne]=g[ne])}else O=g;return _&&c(O,typeof a=="function"?a.displayName||a.name||"Unknown":a),d(a,_,O,s(),re,I)}function y(a){T(a)?a._store&&(a._store.validated=1):typeof a=="object"&&a!==null&&a.$$typeof===Y&&(a._payload.status==="fulfilled"?T(a._payload.value)&&a._payload.value._store&&(a._payload.value._store.validated=1):a._store&&(a._store.validated=1))}function T(a){return typeof a=="object"&&a!==null&&a.$$typeof===C}var S=v,C=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),N=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),se=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),k=Symbol.for("react.client.reference"),$=S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=Object.prototype.hasOwnProperty,V=Array.isArray,Z=console.createTask?console.createTask:function(){return null};S={react_stack_bottom_frame:function(a){return a()}};var te,oe={},be=S.react_stack_bottom_frame.bind(S,o)(),ue=Z(n(o)),X={};We.Fragment=R,We.jsx=function(a,g,O){var j=1e4>$.recentlyCreatedOwnerStacks++;return h(a,g,O,!1,j?Error("react-stack-top-frame"):be,j?Z(n(a)):ue)},We.jsxs=function(a,g,O){var j=1e4>$.recentlyCreatedOwnerStacks++;return h(a,g,O,!0,j?Error("react-stack-top-frame"):be,j?Z(n(a)):ue)}})()),We}var or;function Es(){return or||(or=1,process.env.NODE_ENV==="production"?lt.exports=gs():lt.exports=ws()),lt.exports}var Q=Es();const{Header:Qs,Sider:Zs,Content:eo}=u.Layout;function xs(e){if(e&&typeof e=="object"&&"code"in e&&"data"in e){const t=e;return t.code!==200?Promise.reject(new Error(t.message||"请求失败")):t.data}return e}function Rs(e,t={}){const{tokenKey:r="token",userInfoKey:n="userInfo",unauthorizedRedirect:s="/login"}=t;e.interceptors.request.use(o=>{const i=localStorage.getItem(r);return i&&(o.headers.Authorization=`Bearer ${i}`),o}),e.interceptors.response.use(o=>xs(o.data),o=>{var i,c,f;return((i=o.response)==null?void 0:i.status)===401?(localStorage.removeItem(r),localStorage.removeItem(n),window.location.href=s):((c=o.response)==null?void 0:c.status)===403?console.error("没有权限访问该资源"):((f=o.response)==null?void 0:f.status)===500&&console.error("服务器内部错误"),Promise.reject(o)})}function ct(e={}){const t=F.create({baseURL:e.baseURL??"/api",timeout:e.timeout??1e4});return Rs(t,{tokenKey:e.tokenKey,userInfoKey:e.userInfoKey,unauthorizedRedirect:e.unauthorizedRedirect}),t}ct();const Ss=ct();class to extends v.Component{constructor(t){super(t),bs(this,"handleReset",()=>{this.setState({hasError:!1,error:null,errorInfo:null}),typeof this.props.onReset=="function"&&this.props.onReset()}),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("[ErrorBoundary] caught error:",t,r),this.setState({errorInfo:r})}render(){if(!this.state.hasError)return this.props.children;const{fallbackTitle:t="组件加载失败",fallbackDescription:r,showReload:n=!0}=this.props,s=this.state.error&&(this.state.error.message||String(this.state.error))||"未知错误";return Q.jsxs("div",{style:{padding:24,background:"#fff2f0",border:"1px solid #ffccc7",borderRadius:8,minHeight:200},children:[Q.jsx(u.Alert,{type:"error",showIcon:!0,icon:Q.jsx(U.BugOutlined,{}),message:t,description:Q.jsxs("div",{children:[Q.jsx("div",{style:{marginBottom:8},children:r||"当前组件发生了异常,已被错误边界捕获。其他功能仍可正常使用。"}),Q.jsx("div",{style:{fontFamily:"Menlo, Monaco, Consolas, monospace",fontSize:12,color:"#cf1322",background:"#fff",padding:8,borderRadius:4,border:"1px solid #ffccc7",wordBreak:"break-word",whiteSpace:"pre-wrap"},children:s})]})}),n&&Q.jsx(u.Space,{style:{marginTop:16},children:Q.jsx(u.Button,{icon:Q.jsx(U.ReloadOutlined,{}),onClick:this.handleReset,children:"重试"})})]})}}const{Title:ro,Text:no,Paragraph:so}=u.Typography;let Ts="/api";function ir(){return F.create({baseURL:Ts,timeout:15e3})}const Os=ir();ir(),Os.interceptors.request.use(e=>{const t=localStorage.getItem("token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});const{Header:oo,Sider:io,Content:ao}=u.Layout,{Text:lo}=u.Typography,{Title:co,Text:uo}=u.Typography,{Option:fo}=u.Select,{TextArea:po}=u.Input,_s=[{type:"STRING",label:"字符串",icon:Q.jsx(U.FileTextOutlined,{}),color:"#1677ff",desc:"短文本 (默认 VARCHAR 255)"},{type:"TEXT",label:"长文本",icon:Q.jsx(U.FileTextOutlined,{}),color:"#13c2c2",desc:"TEXT 类型, 无长度限制"},{type:"INT",label:"整数",icon:"#",color:"#722ed1",desc:"INT 整数"},{type:"LONG",label:"长整数",icon:"#",color:"#722ed1",desc:"BIGINT 长整数"},{type:"DECIMAL",label:"小数",icon:"0.00",color:"#eb2f96",desc:"DECIMAL 精确小数"},{type:"BOOLEAN",label:"布尔",icon:Q.jsx(U.CheckCircleOutlined,{}),color:"#52c41a",desc:"TINYINT(1) 是/否"},{type:"DATE",label:"日期",icon:"📅",color:"#fa8c16",desc:"DATE yyyy-MM-dd"},{type:"DATETIME",label:"日期时间",icon:"🕐",color:"#fa8c16",desc:"DATETIME yyyy-MM-dd HH:mm:ss"},{type:"JSON",label:"JSON",icon:"{}",color:"#2f54eb",desc:"JSON 字符串"},{type:"REF",label:"引用",icon:"🔗",color:"#8c8c8c",desc:"外键引用 BIGINT"}];Object.fromEntries(_s.map(e=>[e.type,e]));const{Option:ho}=u.Select;u.Input.TextArea,u.Input.TextArea;const{Text:mo,Paragraph:yo}=u.Typography,{TextArea:bo}=u.Input,{TextArea:go}=u.Input,{Text:wo,Paragraph:Eo}=u.Typography,{TextArea:xo}=u.Input,{Text:Ro,Paragraph:So}=u.Typography,{Text:To}=u.Typography,{Text:Oo}=u.Typography,{TextArea:_o}=u.Input,{Text:jo,Paragraph:Ao}=u.Typography,{Text:Po}=u.Typography,{Text:Co}=u.Typography,{Text:ko}=u.Typography,{Text:No}=u.Typography;common;const le=ct("task"),K={listMyProjects:()=>Ss.get("/project/user/list").then(e=>e.data),createProject:e=>le.post("/project",e).then(t=>t.data),updateProject:(e,t)=>le.put(`/project/${e}`,t).then(r=>r.data),archiveProject:e=>le.put(`/project/${e}/archive`).then(t=>t.data),listTasksByProject:e=>le.get("/task/project/list",{params:{projectId:e}}).then(t=>t.data),listTasksByList:e=>le.get("/task/list",{params:{listId:e}}).then(t=>t.data),createTask:e=>le.post("/task",e).then(t=>t.data),completeTask:e=>le.post("/task/complete",null,{params:{taskId:e}}).then(t=>t.data),moveTask:(e,t,r)=>le.put("/task/move",null,{params:{taskId:e,targetListId:t,position:r}}).then(n=>n.data)},ut=e=>{if(!e)return"-";const t=String(e),r=t.match(/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})/);return r?r[1]:t};function ft({apiBaseURL:e}){const[t,r]=v.useState([]),[n,s]=v.useState(!1),[o,i]=v.useState(!1),[c,f]=v.useState(null),[d,h]=v.useState(null),[y,T]=v.useState([]),[S,C]=v.useState(!1),[A]=u.Form.useForm(),R=async()=>{s(!0);try{const w=await K.listMyProjects();r((w==null?void 0:w.data)||w||[])}catch(w){u.message.error("加载项目失败: "+((w==null?void 0:w.message)||w))}finally{s(!1)}};v.useEffect(()=>{R()},[]);const m=async w=>{h(w),C(!0);try{const k=await K.listTasksByProject(w.id);T((k==null?void 0:k.data)||k||[])}catch(k){u.message.error("加载任务失败: "+((k==null?void 0:k.message)||k))}finally{C(!1)}},b=async()=>{if(d)try{const w=await K.listTasksByProject(d.id);T((w==null?void 0:w.data)||w||[])}catch(w){u.message.error("刷新任务失败: "+((w==null?void 0:w.message)||w))}},E=()=>{f(null),A.resetFields(),A.setFieldsValue({status:1}),i(!0)},N=w=>{f(w),A.setFieldsValue({name:w.name,description:w.description,status:w.status??1}),i(!0)},L=async()=>{try{const w=await A.validateFields();c?(await K.updateProject(c.id,w),u.message.success("项目已更新")):(await K.createProject(w),u.message.success("项目已创建")),i(!1),R()}catch(w){if(w!=null&&w.errorFields)return;u.message.error("保存失败: "+((w==null?void 0:w.message)||w))}},D=async w=>{try{await K.archiveProject(w),u.message.success("项目已归档"),R(),(d==null?void 0:d.id)===w&&(h(null),T([]))}catch(k){u.message.error("归档失败: "+((k==null?void 0:k.message)||k))}},W=async w=>{try{await K.completeTask(w),u.message.success("任务已完成"),b()}catch(k){u.message.error("操作失败: "+((k==null?void 0:k.message)||k))}},se=[{title:"项目名称",dataIndex:"name",render:(w,k)=>p.jsx("a",{onClick:()=>m(k),style:{fontWeight:(d==null?void 0:d.id)===k.id?600:400},children:w})},{title:"状态",dataIndex:"status",width:80,render:w=>w===1?p.jsx(u.Tag,{color:"green",children:"进行中"}):p.jsx(u.Tag,{children:"已归档"})},{title:"创建时间",dataIndex:"createdAt",width:170,render:ut},{title:"操作",width:160,fixed:"right",render:(w,k)=>p.jsxs(u.Space,{children:[p.jsx(u.Button,{size:"small",icon:p.jsx(U.EditOutlined,{}),onClick:()=>N(k),children:"编辑"}),p.jsx(u.Popconfirm,{title:"确定归档该项目?",onConfirm:()=>D(k.id),children:p.jsx(u.Button,{size:"small",danger:!0,icon:p.jsx(U.DeleteOutlined,{}),children:"归档"})})]})}],Y=w=>{const $={0:{text:"待办",color:"default"},1:{text:"进行中",color:"blue"},2:{text:"已完成",color:"green"}}[w]||{text:String(w),color:"default"};return p.jsx(u.Tag,{color:$.color,children:$.text})};return p.jsxs("div",{children:[p.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:12},children:p.jsx(u.Button,{type:"primary",icon:p.jsx(U.PlusOutlined,{}),onClick:E,children:"新建项目"})}),p.jsxs("div",{style:{display:"flex",gap:16,height:"calc(100vh - 220px)"},children:[p.jsx(u.Card,{size:"small",title:p.jsxs(u.Space,{children:[p.jsx(U.InboxOutlined,{}),"项目管理"]}),style:{width:520,flexShrink:0},styles:{body:{padding:8,overflow:"auto",height:"calc(100% - 40px)"}},children:p.jsx(u.Table,{rowKey:"id",columns:se,dataSource:t,loading:n,pagination:{pageSize:10,size:"small"},size:"small",rowClassName:w=>(d==null?void 0:d.id)===w.id?"ant-table-row-selected":"",onRow:w=>({onClick:()=>m(w),style:{cursor:"pointer"}}),locale:{emptyText:"暂无项目"}})}),p.jsx(u.Card,{size:"small",style:{flex:1,overflow:"auto"},styles:{body:{padding:16}},title:d?p.jsxs(u.Space,{children:[p.jsx(U.UnorderedListOutlined,{}),d.name," · 任务列表"]}):"项目详情",children:d?p.jsxs(u.Spin,{spinning:S,children:[p.jsxs(u.Descriptions,{size:"small",bordered:!0,column:2,style:{marginBottom:16},children:[p.jsx(u.Descriptions.Item,{label:"项目名称",span:2,children:d.name}),p.jsx(u.Descriptions.Item,{label:"描述",span:2,children:d.description||"无"}),p.jsx(u.Descriptions.Item,{label:"负责人",children:d.ownerId||"未指定"}),p.jsx(u.Descriptions.Item,{label:"状态",children:d.status===1?p.jsx(u.Tag,{color:"green",children:"进行中"}):p.jsx(u.Tag,{children:"已归档"})}),p.jsx(u.Descriptions.Item,{label:"创建时间",children:ut(d.createdAt)}),p.jsx(u.Descriptions.Item,{label:"项目ID",children:d.id})]}),p.jsx(u.List,{size:"small",header:p.jsxs("b",{children:["任务项 (",y.length,")"]}),bordered:!0,dataSource:y,locale:{emptyText:"该项目下暂无任务"},renderItem:w=>p.jsx(u.List.Item,{actions:[p.jsx(u.Button,{size:"small",type:"primary",icon:p.jsx(U.CheckOutlined,{}),disabled:w.status===2,onClick:()=>W(w.id),children:"完成"},"complete")],children:p.jsx(u.List.Item.Meta,{title:p.jsxs(u.Space,{children:[w.title,Y(w.status),p.jsxs(u.Tag,{children:["优先级 ",w.priority??"-"]})]}),description:p.jsxs("span",{style:{color:"#888",fontSize:12},children:["截止: ",ut(w.dueDate)," · ID: ",w.id]})})})})]}):p.jsx(u.Empty,{description:"请从左侧选择一个项目",style:{marginTop:80}})})]}),p.jsx(u.Drawer,{title:c?`编辑项目 - ${c.name}`:"新建项目",width:480,open:o,onClose:()=>i(!1),destroyOnHidden:!0,extra:p.jsxs(u.Space,{children:[p.jsx(u.Button,{onClick:()=>i(!1),children:"取消"}),p.jsx(u.Button,{type:"primary",onClick:L,children:"保存"})]}),children:p.jsxs(u.Form,{form:A,layout:"vertical",preserve:!1,children:[p.jsx(u.Form.Item,{name:"name",label:"项目名称",rules:[{required:!0,message:"请输入项目名称"}],children:p.jsx(u.Input,{placeholder:"例如: 一人公司"})}),p.jsx(u.Form.Item,{name:"description",label:"项目描述",children:p.jsx(u.Input.TextArea,{rows:3,placeholder:"可选"})}),p.jsx(u.Form.Item,{name:"status",label:"状态",initialValue:1,children:p.jsx(u.Select,{options:[{label:"进行中",value:1},{label:"已归档",value:0}]})})]})})]})}function dt({apiBaseURL:e}){const[t,r]=v.useState([]),[n,s]=v.useState(null),[o,i]=v.useState([]),[c,f]=v.useState(!1),[d,h]=v.useState(!1),[y]=u.Form.useForm(),T=async()=>{try{const b=await K.listMyProjects(),E=(b==null?void 0:b.data)||b||[];r(E),E.length>0&&!n&&s(E[0].id)}catch(b){u.message.error("加载项目失败: "+((b==null?void 0:b.message)||b))}},S=async b=>{if(!b){i([]);return}f(!0);try{const E=await K.listTasksByProject(b);i((E==null?void 0:E.data)||E||[])}catch(E){u.message.error("加载任务失败: "+((E==null?void 0:E.message)||E))}finally{f(!1)}};v.useEffect(()=>{T()},[]),v.useEffect(()=>{S(n)},[n]);const C=()=>{if(!n){u.message.warning("请先选择项目");return}y.resetFields(),y.setFieldsValue({projectId:n,listId:1,status:1,priority:1}),h(!0)},A=async()=>{try{const b=await y.validateFields();await K.createTask(b),u.message.success("任务已创建"),h(!1),S(n)}catch(b){if(b!=null&&b.errorFields)return;u.message.error("创建失败: "+((b==null?void 0:b.message)||b))}},R=async b=>{try{await K.completeTask(b),u.message.success("任务已完成"),S(n)}catch(E){u.message.error("操作失败: "+((E==null?void 0:E.message)||E))}},m=[{title:"ID",dataIndex:"id",width:60},{title:"标题",dataIndex:"title"},{title:"项目ID",dataIndex:"projectId",width:80},{title:"状态",dataIndex:"status",width:100,render:b=>{const E={0:"待办",1:"进行中",2:"已完成"},N={0:"default",1:"blue",2:"green"}[b]||"default";return p.jsx(u.Tag,{color:N,children:E[b]||b})}},{title:"优先级",dataIndex:"priority",width:80},{title:"截止时间",dataIndex:"dueDate",width:180},{title:"操作",width:200,fixed:"right",render:(b,E)=>p.jsx(u.Space,{children:p.jsx(u.Button,{size:"small",type:"primary",icon:p.jsx(U.CheckOutlined,{}),onClick:()=>R(E.id),disabled:E.status===2,children:"完成"})})}];return p.jsxs("div",{children:[p.jsx(u.Card,{title:"任务管理",extra:p.jsxs(u.Space,{children:[p.jsx("span",{children:"项目:"}),p.jsx(u.Select,{value:n,onChange:s,style:{width:240},placeholder:"选择项目",options:t.map(b=>({label:b.name,value:b.id}))}),p.jsx(u.Button,{type:"primary",icon:p.jsx(U.PlusOutlined,{}),onClick:C,children:"新建任务"})]}),children:p.jsx(u.Table,{rowKey:"id",columns:m,dataSource:o,loading:c,pagination:{pageSize:10}})}),p.jsx(u.Modal,{title:"新建任务",open:d,onCancel:()=>h(!1),onOk:A,destroyOnHidden:!0,children:p.jsxs(u.Form,{form:y,layout:"vertical",preserve:!1,children:[p.jsx(u.Form.Item,{name:"title",label:"任务标题",rules:[{required:!0,message:"请输入任务标题"}],children:p.jsx(u.Input,{placeholder:"例如: 实现 xx 功能"})}),p.jsx(u.Form.Item,{name:"projectId",label:"所属项目",rules:[{required:!0}],children:p.jsx(u.Select,{options:t.map(b=>({label:b.name,value:b.id})),placeholder:"从数据库捞出的项目列表"})}),p.jsx(u.Form.Item,{name:"listId",label:"列表ID",rules:[{required:!0}],children:p.jsx(u.Input,{type:"number",placeholder:"默认 1"})}),p.jsx(u.Form.Item,{name:"priority",label:"优先级",initialValue:1,children:p.jsx(u.Select,{options:[{label:"低",value:1},{label:"中",value:2},{label:"高",value:3}]})})]})})]})}function js(){return p.jsxs(de.Routes,{children:[p.jsx(de.Route,{index:!0,element:p.jsx(de.Navigate,{to:"project",replace:!0})}),p.jsx(de.Route,{path:"project",element:p.jsx(ft,{})}),p.jsx(de.Route,{path:"project/*",element:p.jsx(ft,{})}),p.jsx(de.Route,{path:"task",element:p.jsx(dt,{})}),p.jsx(de.Route,{path:"task/*",element:p.jsx(dt,{})})]})}q.ProjectList=ft,q.ProjectSelect=xr,q.TaskApp=js,q.TaskCard=br,q.TaskList=dt,q.TaskTable=Er,q.api=K,q.taskApi=K,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})}));
|
|
43
|
+
<%s key={someKey} {...props} />`,j,v,B,v),W[v+j]=!0)}if(v=null,T!==void 0&&(r(T),v=""+T),a(g)&&(r(g.key),v=""+g.key),"key"in g){T={};for(var re in g)re!=="key"&&(T[re]=g[re])}else T=g;return v&&c(T,typeof i=="function"?i.displayName||i.name||"Unknown":i),p(i,v,T,o(),ee,P)}function b(i){S(i)?i._store&&(i._store.validated=1):typeof i=="object"&&i!==null&&i.$$typeof===X&&(i._payload.status==="fulfilled"?S(i._payload.value)&&i._payload.value._store&&(i._payload.value._store.validated=1):i._store&&(i._store.validated=1))}function S(i){return typeof i=="object"&&i!==null&&i.$$typeof===C}var R=N,C=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),F=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),k=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),ye=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),A=Symbol.for("react.client.reference"),$=R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le=Object.prototype.hasOwnProperty,V=Array.isArray,G=console.createTask?console.createTask:function(){return null};R={react_stack_bottom_frame:function(i){return i()}};var Q,oe={},ge=R.react_stack_bottom_frame.bind(R,s)(),ce=G(n(s)),W={};Fe.Fragment=F,Fe.jsx=function(i,g,T){var j=1e4>$.recentlyCreatedOwnerStacks++;return m(i,g,T,!1,j?Error("react-stack-top-frame"):ge,j?G(n(i)):ce)},Fe.jsxs=function(i,g,T){var j=1e4>$.recentlyCreatedOwnerStacks++;return m(i,g,T,!0,j?Error("react-stack-top-frame"):ge,j?G(n(i)):ce)}})()),Fe}var Et;function jr(){return Et||(Et=1,process.env.NODE_ENV==="production"?Je.exports=Tr():Je.exports=vr()),Je.exports}var Y=jr();const{Header:Fo,Sider:Lo,Content:Bo}=u.Layout;function wt(e,t){return function(){return e.apply(t,arguments)}}const{toString:_r}=Object.prototype,{getPrototypeOf:Ee}=Object,{iterator:je,toStringTag:Ot}=Symbol,Le=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),_e=(e,t)=>{let r=e;const n=[];for(;r!=null&&r!==Object.prototype;){if(n.indexOf(r)!==-1)return!1;if(n.push(r),Le(r,t))return!0;r=Ee(r)}return!1},Ar=(e,t)=>e!=null&&_e(e,t)?e[t]:void 0,Xe=(e=>t=>{const r=_r.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Z=e=>(e=e.toLowerCase(),t=>Xe(t)===e),Be=e=>t=>typeof t===e,{isArray:de}=Array,we=Be("undefined");function Oe(e){return e!==null&&!we(e)&&e.constructor!==null&&!we(e.constructor)&&H(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Rt=Z("ArrayBuffer");function kr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Rt(e.buffer),t}const Pr=Be("string"),H=Be("function"),xt=Be("number"),Re=e=>e!==null&&typeof e=="object",Cr=e=>e===!0||e===!1,Ue=e=>{if(!Re(e))return!1;const t=Ee(e);return(t===null||t===Object.prototype||Ee(t)===null)&&!_e(e,Ot)&&!_e(e,je)},Nr=e=>{if(!Re(e)||Oe(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Ir=Z("Date"),Dr=Z("File"),Fr=e=>!!(e&&typeof e.uri<"u"),Lr=e=>e&&typeof e.getParts<"u",Br=Z("Blob"),Ur=Z("FileList"),Mr=e=>Re(e)&&H(e.pipe);function zr(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const St=zr(),Tt=typeof St.FormData<"u"?St.FormData:void 0,qr=e=>{if(!e)return!1;if(Tt&&e instanceof Tt)return!0;const t=Ee(e);if(!t||t===Object.prototype||!H(e.append))return!1;const r=Xe(e);return r==="formdata"||r==="object"&&H(e.toString)&&e.toString()==="[object FormData]"},$r=Z("URLSearchParams"),[Hr,Vr,Wr,Jr]=["ReadableStream","Request","Response","Headers"].map(Z),Xr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ae(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),de(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(Oe(e))return;const s=r?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let c;for(n=0;n<a;n++)c=s[n],t.call(null,e[c],c,e)}}function vt(e,t){if(Oe(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const pe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,jt=e=>!we(e)&&e!==pe;function Ke(...e){const{caseless:t,skipUndefined:r}=jt(this)&&this||{},n={},o=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const c=t&&typeof a=="string"&&vt(n,a)||a,f=Le(n,c)?n[c]:void 0;Ue(f)&&Ue(s)?n[c]=Ke(f,s):Ue(s)?n[c]=Ke({},s):de(s)?n[c]=s.slice():(!r||!we(s))&&(n[c]=s)};for(let s=0,a=e.length;s<a;s++){const c=e[s];if(!c||Oe(c)||(Ae(c,o),typeof c!="object"||de(c)))continue;const f=Object.getOwnPropertySymbols(c);for(let p=0;p<f.length;p++){const m=f[p];an.call(c,m)&&o(c[m],m)}}return n}const Kr=(e,t,r,{allOwnKeys:n}={})=>(Ae(t,(o,s)=>{r&&H(o)?Object.defineProperty(e,s,{__proto__:null,value:wt(o,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),Yr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Gr=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},Zr=(e,t,r,n)=>{let o,s,a;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],(!n||n(a,e,t))&&!c[a]&&(t[a]=e[a],c[a]=!0);e=r!==!1&&Ee(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Qr=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},en=e=>{if(!e)return null;if(de(e))return e;let t=e.length;if(!xt(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},tn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ee(Uint8Array)),rn=(e,t)=>{const r=(e&&e[je]).call(e);let n;for(;(n=r.next())&&!n.done;){const o=n.value;t.call(e,o[0],o[1])}},nn=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},on=Z("HTMLFormElement"),sn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,n){return r.toUpperCase()+n}),{propertyIsEnumerable:an}=Object.prototype,ln=Z("RegExp"),_t=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Ae(r,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(n[s]=a||o)}),Object.defineProperties(e,n)},cn=e=>{_t(e,(t,r)=>{if(H(e)&&["arguments","caller","callee"].includes(r))return!1;const n=e[r];if(H(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},un=(e,t)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return de(e)?n(e):n(String(e).split(t)),r},fn=()=>{},dn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function pn(e){return!!(e&&H(e.append)&&e[Ot]==="FormData"&&e[je])}const hn=e=>{const t=new WeakSet,r=n=>{if(Re(n)){if(t.has(n))return;if(Oe(n))return n;if(!("toJSON"in n)){t.add(n);const o=de(n)?[]:{};return Ae(n,(s,a)=>{const c=r(s);!we(c)&&(o[a]=c)}),t.delete(n),o}}return n};return r(e)},mn=Z("AsyncFunction"),yn=e=>e&&(Re(e)||H(e))&&H(e.then)&&H(e.catch),At=((e,t)=>e?setImmediate:t?((r,n)=>(pe.addEventListener("message",({source:o,data:s})=>{o===pe&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),pe.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",H(pe.postMessage)),gn=typeof queueMicrotask<"u"?queueMicrotask.bind(pe):typeof process<"u"&&process.nextTick||At,kt=e=>e!=null&&H(e[je]),bn=e=>e!=null&&_e(e,je)&&kt(e),l={isArray:de,isArrayBuffer:Rt,isBuffer:Oe,isFormData:qr,isArrayBufferView:kr,isString:Pr,isNumber:xt,isBoolean:Cr,isObject:Re,isPlainObject:Ue,isEmptyObject:Nr,isReadableStream:Hr,isRequest:Vr,isResponse:Wr,isHeaders:Jr,isUndefined:we,isDate:Ir,isFile:Dr,isReactNativeBlob:Fr,isReactNative:Lr,isBlob:Br,isRegExp:ln,isFunction:H,isStream:Mr,isURLSearchParams:$r,isTypedArray:tn,isFileList:Ur,forEach:Ae,merge:Ke,extend:Kr,trim:Xr,stripBOM:Yr,inherits:Gr,toFlatObject:Zr,kindOf:Xe,kindOfTest:Z,endsWith:Qr,toArray:en,forEachEntry:rn,matchAll:nn,isHTMLForm:on,hasOwnProperty:Le,hasOwnProp:Le,hasOwnInPrototypeChain:_e,getSafeProp:Ar,reduceDescriptors:_t,freezeMethods:cn,toObjectSet:un,toCamelCase:sn,noop:fn,toFiniteNumber:dn,findKey:vt,global:pe,isContextDefined:jt,isSpecCompliantForm:pn,toJSONObject:hn,isAsyncFn:mn,isThenable:yn,setImmediate:At,asap:gn,isIterable:kt,isSafeIterable:bn},En=l.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"]),wn=e=>{const t={};let r,n,o;return e&&e.split(`
|
|
44
|
+
`).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||t[r]&&En[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t};function On(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}const Rn=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),xn=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ye(e,t){return l.isArray(e)?e.map(r=>Ye(r,t)):On(String(e).replace(t,""))}const Sn=e=>Ye(e,Rn),Tn=e=>Ye(e,xn);function Pt(e){const t=Object.create(null);return l.forEach(e.toJSON(),(r,n)=>{t[n]=Tn(r)}),t}const Ct=Symbol("internals");function ke(e){return e&&String(e).trim().toLowerCase()}function Me(e){return e===!1||e==null?e:l.isArray(e)?e.map(Me):Sn(String(e))}function vn(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const jn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ge(e,t,r,n,o){if(l.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!l.isString(t)){if(l.isString(n))return t.indexOf(n)!==-1;if(l.isRegExp(n))return n.test(t)}}function _n(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function An(e,t){const r=l.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{__proto__:null,value:function(o,s,a){return this[n].call(this,t,o,s,a)},configurable:!0})})}let z=class{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(a,c,f){const p=ke(c);if(!p)return;const m=l.findKey(n,p);(!m||n[m]===void 0||f===!0||f===void 0&&n[m]!==!1)&&(n[m||c]=Me(a))}const s=(a,c)=>l.forEach(a,(f,p)=>o(f,p,c));if(l.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(l.isString(e)&&(e=e.trim())&&!jn(e))s(wn(e),t);else if(l.isObject(e)&&l.isSafeIterable(e)){let a=Object.create(null),c,f;for(const p of e){if(!l.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],l.hasOwnProp(a,f)?(c=a[f],a[f]=l.isArray(c)?[...c,p[1]]:[c,p[1]]):a[f]=p[1]}s(a,t)}else e!=null&&o(t,e,r);return this}get(e,t){if(e=ke(e),e){const r=l.findKey(this,e);if(r){const n=this[r];if(!t)return n;if(t===!0)return vn(n);if(l.isFunction(t))return t.call(this,n,r);if(l.isRegExp(t))return t.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ke(e),e){const r=l.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||Ge(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let n=!1;function o(s){if(s=ke(s),s){const a=l.findKey(r,s);a&&(!t||Ge(r,r[a],a,t))&&(delete r[a],n=!0)}}return l.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];(!e||Ge(this,this[o],o,e,!0))&&(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return l.forEach(this,(n,o)=>{const s=l.findKey(r,o);if(s){t[s]=Me(n),delete t[o];return}const a=e?_n(o):String(o).trim();a!==o&&delete t[o],t[a]=Me(n),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return l.forEach(this,(r,n)=>{r!=null&&r!==!1&&(t[n]=e&&l.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(`
|
|
45
|
+
`)}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){const r=new this(e);return t.forEach(n=>r.set(n)),r}static accessor(e){const t=(this[Ct]=this[Ct]={accessors:{}}).accessors,r=this.prototype;function n(o){const s=ke(o);t[s]||(An(r,o),t[s]=!0)}return l.isArray(e)?e.forEach(n):n(e),this}};z.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(z.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),l.freezeMethods(z);const kn="[REDACTED ****]";function Pn(e){if(l.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(l.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Cn(e,t){const r=new Set(t.map(s=>String(s).toLowerCase())),n=[],o=s=>{if(s===null||typeof s!="object"||l.isBuffer(s))return s;if(n.indexOf(s)!==-1)return;s instanceof z&&(s=s.toJSON()),n.push(s);let a;if(l.isArray(s))a=[],s.forEach((c,f)=>{const p=o(c);l.isUndefined(p)||(a[f]=p)});else{if(!l.isPlainObject(s)&&Pn(s))return n.pop(),s;a=Object.create(null);for(const[c,f]of Object.entries(s)){const p=r.has(c.toLowerCase())?kn:o(f);l.isUndefined(p)||(a[c]=p)}}return n.pop(),a};return o(e)}let w=class ur extends Error{static from(t,r,n,o,s,a){const c=new ur(t.message,r||t.code,n,o,s);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),a&&Object.assign(c,a),c}constructor(t,r,n,o,s){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),o&&(this.request=o),s&&(this.response=s,this.status=s.status)}toJSON(){const t=this.config,r=t&&l.hasOwnProp(t,"redact")?t.redact:void 0,n=l.isArray(r)&&r.length>0?Cn(t,r):l.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};w.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",w.ERR_BAD_OPTION="ERR_BAD_OPTION",w.ECONNABORTED="ECONNABORTED",w.ETIMEDOUT="ETIMEDOUT",w.ECONNREFUSED="ECONNREFUSED",w.ERR_NETWORK="ERR_NETWORK",w.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",w.ERR_DEPRECATED="ERR_DEPRECATED",w.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",w.ERR_BAD_REQUEST="ERR_BAD_REQUEST",w.ERR_CANCELED="ERR_CANCELED",w.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",w.ERR_INVALID_URL="ERR_INVALID_URL",w.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Nn=null,Nt=100;function Ze(e){return l.isPlainObject(e)||l.isArray(e)}function It(e){return l.endsWith(e,"[]")?e.slice(0,-2):e}function Qe(e,t,r){return e?e.concat(t).map(function(n,o){return n=It(n),!r&&o?"["+n+"]":n}).join(r?".":""):t}function In(e){return l.isArray(e)&&!e.some(Ze)}const Dn=l.toFlatObject(l,{},null,function(e){return/^is[A-Z]/.test(e)});function ze(e,t,r){if(!l.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=l.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!l.isUndefined(h[y])});const n=r.metaTokens,o=r.visitor||C,s=r.dots,a=r.indexes,c=r.Blob||typeof Blob<"u"&&Blob,f=r.maxDepth===void 0?Nt:r.maxDepth,p=c&&l.isSpecCompliantForm(t),m=[];if(!l.isFunction(o))throw new TypeError("visitor must be a function");function b(y){if(y===null)return"";if(l.isDate(y))return y.toISOString();if(l.isBoolean(y))return y.toString();if(!p&&l.isBlob(y))throw new w("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(y)||l.isTypedArray(y)?p&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function S(y){if(y>f)throw new w("Object is too deeply nested ("+y+" levels). Max depth: "+f,w.ERR_FORM_DATA_DEPTH_EXCEEDED)}function R(y,h){if(f===1/0)return JSON.stringify(y);const O=[];return JSON.stringify(y,function(k,D){if(!l.isObject(D))return D;for(;O.length&&O[O.length-1]!==this;)O.pop();return O.push(D),S(h+O.length-1),D})}function C(y,h,O){let k=y;if(l.isReactNative(t)&&l.isReactNativeBlob(y))return t.append(Qe(O,h,s),b(y)),!1;if(y&&!O&&typeof y=="object"){if(l.endsWith(h,"{}"))h=n?h:h.slice(0,-2),y=R(y,1);else if(l.isArray(y)&&In(y)||(l.isFileList(y)||l.endsWith(h,"[]"))&&(k=l.toArray(y)))return h=It(h),k.forEach(function(D,te){!(l.isUndefined(D)||D===null)&&t.append(a===!0?Qe([h],te,s):a===null?h:h+"[]",b(D))}),!1}return Ze(y)?!0:(t.append(Qe(O,h,s),b(y)),!1)}const x=Object.assign(Dn,{defaultVisitor:C,convertValue:b,isVisitable:Ze});function F(y,h,O=0){if(!l.isUndefined(y)){if(S(O),m.indexOf(y)!==-1)throw new Error("Circular reference detected in "+h.join("."));m.push(y),l.forEach(y,function(k,D){(!(l.isUndefined(k)||k===null)&&o.call(t,k,l.isString(D)?D.trim():D,h,x))===!0&&F(k,h?h.concat(D):[D],O+1)}),m.pop()}}if(!l.isObject(e))throw new TypeError("data must be an object");return F(e),t}function Dt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function et(e,t){this._pairs=[],e&&ze(e,this,t)}const Ft=et.prototype;Ft.append=function(e,t){this._pairs.push([e,t])},Ft.toString=function(e){const t=e?function(r){return e.call(this,r,Dt)}:Dt;return this._pairs.map(function(r){return t(r[0])+"="+t(r[1])},"").join("&")};function Fn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Lt(e,t,r){if(!t)return e;const n=l.isFunction(r)?{serialize:r}:r,o=l.getSafeProp(n,"encode")||Fn,s=l.getSafeProp(n,"serialize");let a;if(s?a=s(t,n):a=l.isURLSearchParams(t)?t.toString():new et(t,n).toString(o),a){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Bt{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){l.forEach(this.handlers,function(r){r!==null&&t(r)})}}const tt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Ln=typeof URLSearchParams<"u"?URLSearchParams:et,Bn=typeof FormData<"u"?FormData:null,Un=typeof Blob<"u"?Blob:null,Mn={isBrowser:!0,classes:{URLSearchParams:Ln,FormData:Bn,Blob:Un},protocols:["http","https","file","blob","url","data"]},rt=typeof window<"u"&&typeof document<"u",nt=typeof navigator=="object"&&navigator||void 0,zn=rt&&(!nt||["ReactNative","NativeScript","NS"].indexOf(nt.product)<0),qn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",$n=rt&&window.location.href||"http://localhost",Hn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rt,hasStandardBrowserEnv:zn,hasStandardBrowserWebWorkerEnv:qn,navigator:nt,origin:$n},Symbol.toStringTag,{value:"Module"})),M={...Hn,...Mn};function Vn(e,t){return ze(e,new M.classes.URLSearchParams,{visitor:function(r,n,o,s){return M.isNode&&l.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}const Ut=Nt;function Mt(e){if(e>Ut)throw new w("FormData field is too deeply nested ("+e+" levels). Max depth: "+Ut,w.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Wn(e){const t=[],r=/\w+|\[(\w*)]/g;let n;for(;(n=r.exec(e))!==null;)Mt(t.length),t.push(n[0]==="[]"?"":n[1]||n[0]);return t}function Jn(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}function zt(e){function t(r,n,o,s){Mt(s);let a=r[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),f=s>=r.length;return a=!a&&l.isArray(o)?o.length:a,f?(l.hasOwnProp(o,a)?o[a]=l.isArray(o[a])?o[a].concat(n):[o[a],n]:o[a]=n,!c):((!l.hasOwnProp(o,a)||!l.isObject(o[a]))&&(o[a]=[]),t(r,n,o[a],s)&&l.isArray(o[a])&&(o[a]=Jn(o[a])),!c)}if(l.isFormData(e)&&l.isFunction(e.entries)){const r={};return l.forEachEntry(e,(n,o)=>{t(Wn(n),o,r,0)}),r}return null}const xe=(e,t)=>e!=null&&l.hasOwnProp(e,t)?e[t]:void 0;function Xn(e,t,r){if(l.isString(e))try{return(t||JSON.parse)(e),l.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Pe={transitional:tt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=l.isObject(e);if(o&&l.isHTMLForm(e)&&(e=new FormData(e)),l.isFormData(e))return n?JSON.stringify(zt(e)):e;if(l.isArrayBuffer(e)||l.isBuffer(e)||l.isStream(e)||l.isFile(e)||l.isBlob(e)||l.isReadableStream(e))return e;if(l.isArrayBufferView(e))return e.buffer;if(l.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){const a=xe(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Vn(e,a).toString();if((s=l.isFileList(e))||r.indexOf("multipart/form-data")>-1){const c=xe(this,"env"),f=c&&c.FormData;return ze(s?{"files[]":e}:e,f&&new f,a)}}return o||n?(t.setContentType("application/json",!1),Xn(e)):e}],transformResponse:[function(e){const t=xe(this,"transitional")||Pe.transitional,r=t&&t.forcedJSONParsing,n=xe(this,"responseType"),o=n==="json";if(l.isResponse(e)||l.isReadableStream(e))return e;if(e&&l.isString(e)&&(r&&!n||o)){const s=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,xe(this,"parseReviver"))}catch(a){if(s)throw a.name==="SyntaxError"?w.from(a,w.ERR_BAD_RESPONSE,this,null,xe(this,"response")):a}}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}}};l.forEach(["delete","get","head","post","put","patch","query"],e=>{Pe.headers[e]={}});function ot(e,t){const r=this||Pe,n=t||r,o=z.from(n.headers);let s=n.data;return l.forEach(e,function(a){s=a.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function qt(e){return!!(e&&e.__CANCEL__)}let Ce=class extends w{constructor(e,t,r){super(e??"canceled",w.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function $t(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new w("Request failed with status code "+r.status,r.status>=400&&r.status<500?w.ERR_BAD_REQUEST:w.ERR_BAD_RESPONSE,r.config,r.request,r))}function Kn(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Yn(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const f=Date.now(),p=n[s];a||(a=f),r[o]=c,n[o]=f;let m=s,b=0;for(;m!==o;)b+=r[m++],m=m%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),f-a<t)return;const S=p&&f-p;return S?Math.round(b*1e3/S):void 0}}function Gn(e,t){let r=0,n=1e3/t,o,s;const a=(c,f=Date.now())=>{r=f,o=null,s&&(clearTimeout(s),s=null),e(...c)};return[(...c)=>{const f=Date.now(),p=f-r;p>=n?a(c,f):(o=c,s||(s=setTimeout(()=>{s=null,a(o)},n-p)))},()=>o&&a(o)]}const qe=(e,t,r=3)=>{let n=0;const o=Yn(50,250);return Gn(s=>{if(!s||typeof s.loaded!="number")return;const a=s.loaded,c=s.lengthComputable?s.total:void 0,f=c!=null?Math.min(a,c):a,p=Math.max(0,f-n),m=o(p);n=Math.max(n,f);const b={loaded:f,total:c,progress:c?f/c:void 0,bytes:p,rate:m||void 0,estimated:m&&c?(c-f)/m:void 0,event:s,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(b)},r)},Ht=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Vt=e=>(...t)=>l.asap(()=>e(...t)),Zn=M.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,M.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(M.origin),M.navigator&&/(msie|trident)/i.test(M.navigator.userAgent)):()=>!0,Qn=M.hasStandardBrowserEnv?{write(e,t,r,n,o,s,a){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];l.isNumber(r)&&c.push(`expires=${new Date(r).toUTCString()}`),l.isString(n)&&c.push(`path=${n}`),l.isString(o)&&c.push(`domain=${o}`),s===!0&&c.push("secure"),l.isString(a)&&c.push(`SameSite=${a}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let r=0;r<t.length;r++){const n=t[r].replace(/^\s+/,""),o=n.indexOf("=");if(o!==-1&&n.slice(0,o)===e)return decodeURIComponent(n.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function eo(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function to(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const ro=/^https?:(?!\/\/)/i,no=/[\t\n\r]/g;function oo(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function so(e){return oo(e).replace(no,"")}function Wt(e,t){if(typeof e=="string"&&ro.test(so(e)))throw new w('Invalid URL: missing "//" after protocol',w.ERR_INVALID_URL,t)}function Jt(e,t,r,n){Wt(t,n);let o=!eo(t);return e&&(o||r===!1)?(Wt(e,n),to(e,t)):t}const Xt=e=>e instanceof z?{...e}:e;function he(e,t){t=t||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(m,b,S,R){return l.isPlainObject(m)&&l.isPlainObject(b)?l.merge.call({caseless:R},m,b):l.isPlainObject(b)?l.merge({},b):l.isArray(b)?b.slice():b}function o(m,b,S,R){if(l.isUndefined(b)){if(!l.isUndefined(m))return n(void 0,m,S,R)}else return n(m,b,S,R)}function s(m,b){if(!l.isUndefined(b))return n(void 0,b)}function a(m,b){if(l.isUndefined(b)){if(!l.isUndefined(m))return n(void 0,m)}else return n(void 0,b)}function c(m){const b=l.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!l.isUndefined(b))if(l.isPlainObject(b)){if(l.hasOwnProp(b,m))return b[m]}else return;const S=l.hasOwnProp(e,"transitional")?e.transitional:void 0;if(l.isPlainObject(S)&&l.hasOwnProp(S,m))return S[m]}function f(m,b,S){if(l.hasOwnProp(t,S))return n(m,b);if(l.hasOwnProp(e,S))return n(void 0,m)}const p={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:f,headers:(m,b,S)=>o(Xt(m),Xt(b),S,!0)};return l.forEach(Object.keys({...e,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const b=l.hasOwnProp(p,m)?p[m]:o,S=l.hasOwnProp(e,m)?e[m]:void 0,R=l.hasOwnProp(t,m)?t[m]:void 0,C=b(S,R,m);l.isUndefined(C)&&b!==f||(r[m]=C)}),l.hasOwnProp(t,"validateStatus")&&l.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(l.hasOwnProp(e,"validateStatus")?r.validateStatus=n(void 0,e.validateStatus):delete r.validateStatus),r}const ao=["content-type","content-length"];function io(e,t,r){if(r!=="content-only"){e.set(t);return}Object.entries(t).forEach(([n,o])=>{ao.includes(n.toLowerCase())&&e.set(n,o)})}const lo=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16)));function Kt(e){const t=he({},e),r=S=>l.hasOwnProp(t,S)?t[S]:void 0,n=r("data");let o=r("withXSRFToken");const s=r("xsrfHeaderName"),a=r("xsrfCookieName");let c=r("headers");const f=r("auth"),p=r("baseURL"),m=r("allowAbsoluteUrls"),b=r("url");if(t.headers=c=z.from(c),t.url=Lt(Jt(p,b,m,t),r("params"),r("paramsSerializer")),f){const S=l.getSafeProp(f,"username")||"",R=l.getSafeProp(f,"password")||"";c.set("Authorization","Basic "+btoa(S+":"+(R?lo(R):"")))}if(l.isFormData(n)&&(M.hasStandardBrowserEnv||M.hasStandardBrowserWebWorkerEnv||l.isReactNative(n)?c.setContentType(void 0):l.isFunction(n.getHeaders)&&io(c,n.getHeaders(),r("formDataHeaderPolicy"))),M.hasStandardBrowserEnv&&(l.isFunction(o)&&(o=o(t)),o===!0||o==null&&Zn(t.url))){const S=s&&a&&Qn.read(a);S&&c.set(s,S)}return t}const co=typeof XMLHttpRequest<"u",uo=co&&function(e){return new Promise(function(t,r){const n=Kt(e);let o=n.data;const s=z.from(n.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:f}=n,p,m,b,S,R;function C(){S&&S(),R&&R(),n.cancelToken&&n.cancelToken.unsubscribe(p),n.signal&&n.signal.removeEventListener("abort",p)}let x=new XMLHttpRequest;x.open(n.method.toUpperCase(),n.url,!0),x.timeout=n.timeout;function F(){if(!x)return;const h=z.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),O={data:!a||a==="text"||a==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:h,config:e,request:x};$t(function(k){t(k),C()},function(k){r(k),C()},O),x=null}"onloadend"in x?x.onloadend=F:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(F)},x.onabort=function(){x&&(r(new w("Request aborted",w.ECONNABORTED,e,x)),C(),x=null)},x.onerror=function(h){const O=h&&h.message?h.message:"Network Error",k=new w(O,w.ERR_NETWORK,e,x);k.event=h||null,r(k),C(),x=null},x.ontimeout=function(){let h=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const O=n.transitional||tt;n.timeoutErrorMessage&&(h=n.timeoutErrorMessage),r(new w(h,O.clarifyTimeoutError?w.ETIMEDOUT:w.ECONNABORTED,e,x)),C(),x=null},o===void 0&&s.setContentType(null),"setRequestHeader"in x&&l.forEach(Pt(s),function(h,O){x.setRequestHeader(O,h)}),l.isUndefined(n.withCredentials)||(x.withCredentials=!!n.withCredentials),a&&a!=="json"&&(x.responseType=n.responseType),f&&([b,R]=qe(f,!0),x.addEventListener("progress",b)),c&&x.upload&&([m,S]=qe(c),x.upload.addEventListener("progress",m),x.upload.addEventListener("loadend",S)),(n.cancelToken||n.signal)&&(p=h=>{x&&(r(!h||h.type?new Ce(null,e,x):h),x.abort(),C(),x=null)},n.cancelToken&&n.cancelToken.subscribe(p),n.signal&&(n.signal.aborted?p():n.signal.addEventListener("abort",p)));const y=Kn(n.url);if(y&&!M.protocols.includes(y)){r(new w("Unsupported protocol "+y+":",w.ERR_BAD_REQUEST,e));return}x.send(o||null)})},fo=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const r=new AbortController;let n=!1;const o=function(f){if(!n){n=!0,a();const p=f instanceof Error?f:this.reason;r.abort(p instanceof w?p:new Ce(p instanceof Error?p.message:p))}};let s=t&&setTimeout(()=>{s=null,o(new w(`timeout of ${t}ms exceeded`,w.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),e=null)};e.forEach(f=>f.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>l.asap(a),c},po=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},ho=async function*(e,t){for await(const r of mo(e))yield*po(r,t)},mo=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Yt=(e,t,r,n)=>{const o=ho(e,t);let s=0,a,c=f=>{a||(a=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:p,value:m}=await o.next();if(p){c(),f.close();return}let b=m.byteLength;if(r){let S=s+=b;r(S)}f.enqueue(new Uint8Array(m))}catch(p){throw c(p),p}},cancel(f){return c(f),o.return()}},{highWaterMark:2})},$e=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,yo=(e,t,r)=>t+2<r&&$e(e.charCodeAt(t+1))&&$e(e.charCodeAt(t+2));function go(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const r=e.slice(5,t),n=e.slice(t+1);if(/;base64/i.test(r)){let s=n.length;const a=n.length;for(let b=0;b<a;b++)if(n.charCodeAt(b)===37&&b+2<a){const S=n.charCodeAt(b+1),R=n.charCodeAt(b+2);$e(S)&&$e(R)&&(s-=2,b+=2)}let c=0,f=a-1;const p=b=>b>=2&&n.charCodeAt(b-2)===37&&n.charCodeAt(b-1)===51&&(n.charCodeAt(b)===68||n.charCodeAt(b)===100);f>=0&&(n.charCodeAt(f)===61?(c++,f--):p(f)&&(c++,f-=3)),c===1&&f>=0&&(n.charCodeAt(f)===61||p(f))&&c++;const m=Math.floor(s/4)*3-(c||0);return m>0?m:0}let o=0;for(let s=0,a=n.length;s<a;s++){const c=n.charCodeAt(s);if(c===37&&yo(n,s,a))o+=1,s+=2;else if(c<128)o+=1;else if(c<2048)o+=2;else if(c>=55296&&c<=56319&&s+1<a){const f=n.charCodeAt(s+1);f>=56320&&f<=57343?(o+=4,s++):o+=3}else o+=3}return o}const st="1.18.0",Gt=64*1024,{isFunction:He}=l,bo=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16))),Zt=e=>{if(!l.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Qt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Eo=e=>{const t=e.indexOf("://");let r=e;return t!==-1&&(r=r.slice(t+3)),r.includes("@")||r.includes(":")},wo=e=>{const t=l.global!==void 0&&l.global!==null?l.global:globalThis,{ReadableStream:r,TextEncoder:n}=t;e=l.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:s,Response:a}=e,c=o?He(o):typeof fetch=="function",f=He(s),p=He(a);if(!c)return!1;const m=c&&He(r),b=c&&(typeof n=="function"?(y=>h=>y.encode(h))(new n):async y=>new Uint8Array(await new s(y).arrayBuffer())),S=f&&m&&Qt(()=>{let y=!1;const h=new s(M.origin,{body:new r,method:"POST",get duplex(){return y=!0,"half"}}),O=h.headers.has("Content-Type");return h.body!=null&&h.body.cancel(),y&&!O}),R=p&&m&&Qt(()=>l.isReadableStream(new a("").body)),C={stream:R&&(y=>y.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!C[y]&&(C[y]=(h,O)=>{let k=h&&h[y];if(k)return k.call(h);throw new w(`Response type '${y}' is not supported`,w.ERR_NOT_SUPPORT,O)})});const x=async y=>{if(y==null)return 0;if(l.isBlob(y))return y.size;if(l.isSpecCompliantForm(y))return(await new s(M.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(l.isArrayBufferView(y)||l.isArrayBuffer(y))return y.byteLength;if(l.isURLSearchParams(y)&&(y=y+""),l.isString(y))return(await b(y)).byteLength},F=async(y,h)=>l.toFiniteNumber(y.getContentLength())??x(h);return async y=>{let{url:h,method:O,data:k,signal:D,cancelToken:te,timeout:ye,onDownloadProgress:ne,onUploadProgress:X,responseType:E,headers:A,withCredentials:$="same-origin",fetchOptions:le,maxContentLength:V,maxBodyLength:G}=Kt(y);const Q=l.isNumber(V)&&V>-1,oe=l.isNumber(G)&&G>-1,ge=P=>l.hasOwnProp(y,P)?y[P]:void 0;let ce=o||fetch;E=E?(E+"").toLowerCase():"text";let W=fo([D,te&&te.toAbortSignal()],ye),i=null;const g=W&&W.unsubscribe&&(()=>{W.unsubscribe()});let T,j=null;const ee=()=>new w("Request body larger than maxBodyLength limit",w.ERR_BAD_REQUEST,y,i);try{let P;const v=ge("auth");if(v){const _=l.getSafeProp(v,"username")||"",K=l.getSafeProp(v,"password")||"";P={username:_,password:K}}if(Eo(h)){const _=new URL(h,M.origin);if(!P&&(_.username||_.password)){const K=Zt(_.username),ue=Zt(_.password);P={username:K,password:ue}}(_.username||_.password)&&(_.username="",_.password="",h=_.href)}if(P&&(A.delete("authorization"),A.set("Authorization","Basic "+btoa(bo((P.username||"")+":"+(P.password||""))))),Q&&typeof h=="string"&&h.startsWith("data:")&&go(h)>V)throw new w("maxContentLength size of "+V+" exceeded",w.ERR_BAD_RESPONSE,y,i);if(oe&&O!=="get"&&O!=="head"){const _=await x(k);if(typeof _=="number"&&isFinite(_)&&(T=_,_>G))throw ee()}const B=oe&&(l.isReadableStream(k)||l.isStream(k)),re=(_,K,ue)=>Yt(_,Gt,be=>{if(oe&&be>G)throw j=ee();K&&K(be)},ue);if(S&&O!=="get"&&O!=="head"&&(X||B)){if(T=T??await F(A,k),T!==0||B){let _=new s(h,{method:"POST",body:k,duplex:"half"}),K;if(l.isFormData(k)&&(K=_.headers.get("content-type"))&&A.setContentType(K),_.body){const[ue,be]=X&&Ht(T,qe(Vt(X)))||[];k=re(_.body,ue,be)}}}else if(B&&!f&&m&&O!=="get"&&O!=="head")k=re(k);else if(B&&f&&!S&&O!=="get"&&O!=="head")throw new w("Stream request bodies are not supported by the current fetch implementation",w.ERR_NOT_SUPPORT,y,i);l.isString($)||($=$?"include":"omit");const Ne=f&&"credentials"in s.prototype;if(l.isFormData(k)){const _=A.getContentType();_&&/^multipart\/form-data/i.test(_)&&!/boundary=/i.test(_)&&A.delete("content-type")}A.set("User-Agent","axios/"+st,!1);const ir={...le,signal:W,method:O.toUpperCase(),headers:Pt(A.normalize()),body:k,duplex:"half",credentials:Ne?$:void 0};i=f&&new s(h,ir);let se=await(f?ce(i,le):ce(h,ir));const lr=z.from(se.headers);if(Q){const _=l.toFiniteNumber(lr.getContentLength());if(_!=null&&_>V)throw new w("maxContentLength size of "+V+" exceeded",w.ERR_BAD_RESPONSE,y,i)}const pt=R&&(E==="stream"||E==="response");if(R&&se.body&&(ne||Q||pt&&g)){const _={};["status","statusText","headers"].forEach(Ie=>{_[Ie]=se[Ie]});const K=l.toFiniteNumber(lr.getContentLength()),[ue,be]=ne&&Ht(K,qe(Vt(ne),!0))||[];let cr=0;const Do=Ie=>{if(Q&&(cr=Ie,cr>V))throw new w("maxContentLength size of "+V+" exceeded",w.ERR_BAD_RESPONSE,y,i);ue&&ue(Ie)};se=new a(Yt(se.body,Gt,Do,()=>{be&&be(),g&&g()}),_)}E=E||"text";let ae=await C[l.findKey(C,E)||"text"](se,y);if(Q&&!R&&!pt){let _;if(ae!=null&&(typeof ae.byteLength=="number"?_=ae.byteLength:typeof ae.size=="number"?_=ae.size:typeof ae=="string"&&(_=typeof n=="function"?new n().encode(ae).byteLength:ae.length)),typeof _=="number"&&_>V)throw new w("maxContentLength size of "+V+" exceeded",w.ERR_BAD_RESPONSE,y,i)}return!pt&&g&&g(),await new Promise((_,K)=>{$t(_,K,{data:ae,headers:z.from(se.headers),status:se.status,statusText:se.statusText,config:y,request:i})})}catch(P){if(g&&g(),W&&W.aborted&&W.reason instanceof w){const v=W.reason;throw v.config=y,i&&(v.request=i),P!==v&&(v.cause=P),v}throw j?(i&&!j.request&&(j.request=i),j):P instanceof w?(i&&!P.request&&(P.request=i),P):P&&P.name==="TypeError"&&/Load failed|fetch/i.test(P.message)?Object.assign(new w("Network Error",w.ERR_NETWORK,y,i,P&&P.response),{cause:P.cause||P}):w.from(P,P&&P.code,y,i,P&&P.response)}}},Oo=new Map,er=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:o}=t,s=[n,o,r];let a=s.length,c=a,f,p,m=Oo;for(;c--;)f=s[c],p=m.get(f),p===void 0&&m.set(f,p=c?new Map:wo(t)),m=p;return p};er();const at={http:Nn,xhr:uo,fetch:{get:er}};l.forEach(at,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const tr=e=>`- ${e}`,Ro=e=>l.isFunction(e)||e===null||e===!1;function xo(e,t){e=l.isArray(e)?e:[e];const{length:r}=e;let n,o;const s={};for(let a=0;a<r;a++){n=e[a];let c;if(o=n,!Ro(n)&&(o=at[(c=String(n)).toLowerCase()],o===void 0))throw new w(`Unknown adapter '${c}'`);if(o&&(l.isFunction(o)||(o=o.get(t))))break;s[c||"#"+a]=o}if(!o){const a=Object.entries(s).map(([f,p])=>`adapter ${f} `+(p===!1?"is not supported by the environment":"is not available in the build"));let c=r?a.length>1?`since :
|
|
46
|
+
`+a.map(tr).join(`
|
|
47
|
+
`):" "+tr(a[0]):"as no adapter specified";throw new w("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const rr={getAdapter:xo,adapters:at};function it(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ce(null,e)}function nr(e){return it(e),e.headers=z.from(e.headers),e.data=ot.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),rr.getAdapter(e.adapter||Pe.adapter,e)(e).then(function(t){it(e),e.response=t;try{t.data=ot.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=z.from(t.headers),t},function(t){if(!qt(t)&&(it(e),t&&t.response)){e.response=t.response;try{t.response.data=ot.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=z.from(t.response.headers)}return Promise.reject(t)})}const Ve={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ve[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const or={};Ve.transitional=function(e,t,r){function n(o,s){return"[Axios v"+st+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(e===!1)throw new w(n(s," has been removed"+(t?" in "+t:"")),w.ERR_DEPRECATED);return t&&!or[s]&&(or[s]=!0,console.warn(n(s," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(o,s,a):!0}},Ve.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function So(e,t,r){if(typeof e!="object")throw new w("options must be an object",w.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],a=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(a){const c=e[s],f=c===void 0||a(c,s,e);if(f!==!0)throw new w("option "+s+" must be "+f,w.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new w("Unknown option "+s,w.ERR_BAD_OPTION)}}const We={assertOptions:So,validators:Ve},q=We.validators;let me=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Bt,response:new Bt}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const o=(()=>{if(!n.stack)return"";const s=n.stack.indexOf(`
|
|
48
|
+
`);return s===-1?"":n.stack.slice(s+1)})();try{if(!r.stack)r.stack=o;else if(o){const s=o.indexOf(`
|
|
49
|
+
`),a=s===-1?-1:o.indexOf(`
|
|
50
|
+
`,s+1),c=a===-1?"":o.slice(a+1);String(r.stack).endsWith(c)||(r.stack+=`
|
|
51
|
+
`+o)}}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=he(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;r!==void 0&&We.assertOptions(r,{silentJSONParsing:q.transitional(q.boolean),forcedJSONParsing:q.transitional(q.boolean),clarifyTimeoutError:q.transitional(q.boolean),legacyInterceptorReqResOrdering:q.transitional(q.boolean),advertiseZstdAcceptEncoding:q.transitional(q.boolean),validateStatusUndefinedResolves:q.transitional(q.boolean)},!1),n!=null&&(l.isFunction(n)?t.paramsSerializer={serialize:n}:We.assertOptions(n,{encode:q.function,serialize:q.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),We.assertOptions(t,{baseUrl:q.spelling("baseURL"),withXsrfToken:q.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&l.merge(o.common,o[t.method]);o&&l.forEach(["delete","get","head","post","put","patch","query","common"],R=>{delete o[R]}),t.headers=z.concat(s,o);const a=[];let c=!0;this.interceptors.request.forEach(function(R){if(typeof R.runWhen=="function"&&R.runWhen(t)===!1)return;c=c&&R.synchronous;const C=t.transitional||tt;C&&C.legacyInterceptorReqResOrdering?a.unshift(R.fulfilled,R.rejected):a.push(R.fulfilled,R.rejected)});const f=[];this.interceptors.response.forEach(function(R){f.push(R.fulfilled,R.rejected)});let p,m=0,b;if(!c){const R=[nr.bind(this),void 0];for(R.unshift(...a),R.push(...f),b=R.length,p=Promise.resolve(t);m<b;)p=p.then(R[m++],R[m++]);return p}b=a.length;let S=t;for(;m<b;){const R=a[m++],C=a[m++];try{S=R(S)}catch(x){C.call(this,x);break}}try{p=nr.call(this,S)}catch(R){return Promise.reject(R)}for(m=0,b=f.length;m<b;)p=p.then(f[m++],f[m++]);return p}getUri(e){e=he(this.defaults,e);const t=Jt(e.baseURL,e.url,e.allowAbsoluteUrls,e);return Lt(t,e.params,e.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(e){me.prototype[e]=function(t,r){return this.request(he(r||{},{method:e,url:t,data:r&&l.hasOwnProp(r,"data")?r.data:void 0}))}}),l.forEach(["post","put","patch","query"],function(e){function t(r){return function(n,o,s){return this.request(he(s||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:n,data:o}))}}me.prototype[e]=t(),e!=="query"&&(me.prototype[e+"Form"]=t(!0))});let To=class fr{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(c=>{n.subscribe(c),s=c}).then(o);return a.cancel=function(){n.unsubscribe(s)},a},t(function(o,s,a){n.reason||(n.reason=new Ce(o,s,a),r(n.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 r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new fr(function(r){t=r}),cancel:t}}};function vo(e){return function(t){return e.apply(null,t)}}function jo(e){return l.isObject(e)&&e.isAxiosError===!0}const lt={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(lt).forEach(([e,t])=>{lt[t]=e});function sr(e){const t=new me(e),r=wt(me.prototype.request,t);return l.extend(r,me.prototype,t,{allOwnKeys:!0}),l.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return sr(he(e,n))},r}const I=sr(Pe);I.Axios=me,I.CanceledError=Ce,I.CancelToken=To,I.isCancel=qt,I.VERSION=st,I.toFormData=ze,I.AxiosError=w,I.Cancel=I.CanceledError,I.all=function(e){return Promise.all(e)},I.spread=vo,I.isAxiosError=jo,I.mergeConfig=he,I.AxiosHeaders=z,I.formToJSON=e=>zt(l.isHTMLForm(e)?new FormData(e):e),I.getAdapter=rr.getAdapter,I.HttpStatusCode=lt,I.default=I;const{Axios:Uo,AxiosError:Mo,CanceledError:zo,isCancel:qo,CancelToken:$o,VERSION:Ho,all:Vo,Cancel:Wo,isAxiosError:Jo,spread:Xo,toFormData:Ko,AxiosHeaders:Yo,HttpStatusCode:Go,formToJSON:Zo,getAdapter:Qo,mergeConfig:es,create:ts}=I;function _o(e){if(e&&typeof e=="object"&&"code"in e&&"data"in e){const t=e;return t.code!==200?Promise.reject(new Error(t.message||"请求失败")):t.data}return e}function Ao(e,t={}){const{tokenKey:r="token",userInfoKey:n="userInfo",unauthorizedRedirect:o="/login"}=t;e.interceptors.request.use(s=>{const a=localStorage.getItem(r);return a&&(s.headers.Authorization=`Bearer ${a}`),s}),e.interceptors.response.use(s=>_o(s.data),s=>{var a,c,f;return((a=s.response)==null?void 0:a.status)===401?(localStorage.removeItem(r),localStorage.removeItem(n),window.location.href=o):((c=s.response)==null?void 0:c.status)===403?console.error("没有权限访问该资源"):((f=s.response)==null?void 0:f.status)===500&&console.error("服务器内部错误"),Promise.reject(s)})}function ct(e={}){const t=I.create({baseURL:e.baseURL??"/api",timeout:e.timeout??1e4});return Ao(t,{tokenKey:e.tokenKey,userInfoKey:e.userInfoKey,unauthorizedRedirect:e.unauthorizedRedirect}),t}ct();const ko=ct();class rs extends N.Component{constructor(t){super(t),Sr(this,"handleReset",()=>{this.setState({hasError:!1,error:null,errorInfo:null}),typeof this.props.onReset=="function"&&this.props.onReset()}),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("[ErrorBoundary] caught error:",t,r),this.setState({errorInfo:r})}render(){if(!this.state.hasError)return this.props.children;const{fallbackTitle:t="组件加载失败",fallbackDescription:r,showReload:n=!0}=this.props,o=this.state.error&&(this.state.error.message||String(this.state.error))||"未知错误";return Y.jsxs("div",{style:{padding:24,background:"#fff2f0",border:"1px solid #ffccc7",borderRadius:8,minHeight:200},children:[Y.jsx(u.Alert,{type:"error",showIcon:!0,icon:Y.jsx(L.BugOutlined,{}),message:t,description:Y.jsxs("div",{children:[Y.jsx("div",{style:{marginBottom:8},children:r||"当前组件发生了异常,已被错误边界捕获。其他功能仍可正常使用。"}),Y.jsx("div",{style:{fontFamily:"Menlo, Monaco, Consolas, monospace",fontSize:12,color:"#cf1322",background:"#fff",padding:8,borderRadius:4,border:"1px solid #ffccc7",wordBreak:"break-word",whiteSpace:"pre-wrap"},children:o})]})}),n&&Y.jsx(u.Space,{style:{marginTop:16},children:Y.jsx(u.Button,{icon:Y.jsx(L.ReloadOutlined,{}),onClick:this.handleReset,children:"重试"})})]})}}const{Title:ns,Text:os,Paragraph:ss}=u.Typography;let Po="/api";function ar(){return I.create({baseURL:Po,timeout:15e3})}const Co=ar();ar(),Co.interceptors.request.use(e=>{const t=localStorage.getItem("token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});const{Header:as,Sider:is,Content:ls}=u.Layout,{Text:cs}=u.Typography,{Title:us,Text:fs}=u.Typography,{Option:ds}=u.Select,{TextArea:ps}=u.Input,No=[{type:"STRING",label:"字符串",icon:Y.jsx(L.FileTextOutlined,{}),color:"#1677ff",desc:"短文本 (默认 VARCHAR 255)"},{type:"TEXT",label:"长文本",icon:Y.jsx(L.FileTextOutlined,{}),color:"#13c2c2",desc:"TEXT 类型, 无长度限制"},{type:"INT",label:"整数",icon:"#",color:"#722ed1",desc:"INT 整数"},{type:"LONG",label:"长整数",icon:"#",color:"#722ed1",desc:"BIGINT 长整数"},{type:"DECIMAL",label:"小数",icon:"0.00",color:"#eb2f96",desc:"DECIMAL 精确小数"},{type:"BOOLEAN",label:"布尔",icon:Y.jsx(L.CheckCircleOutlined,{}),color:"#52c41a",desc:"TINYINT(1) 是/否"},{type:"DATE",label:"日期",icon:"📅",color:"#fa8c16",desc:"DATE yyyy-MM-dd"},{type:"DATETIME",label:"日期时间",icon:"🕐",color:"#fa8c16",desc:"DATETIME yyyy-MM-dd HH:mm:ss"},{type:"JSON",label:"JSON",icon:"{}",color:"#2f54eb",desc:"JSON 字符串"},{type:"REF",label:"引用",icon:"🔗",color:"#8c8c8c",desc:"外键引用 BIGINT"}];Object.fromEntries(No.map(e=>[e.type,e]));const{Option:hs}=u.Select;u.Input.TextArea,u.Input.TextArea;const{Text:ms,Paragraph:ys}=u.Typography,{TextArea:gs}=u.Input,{TextArea:bs}=u.Input,{Text:Es,Paragraph:ws}=u.Typography,{TextArea:Os}=u.Input,{Text:Rs,Paragraph:xs}=u.Typography,{Text:Ss}=u.Typography,{Text:Ts}=u.Typography,{TextArea:vs}=u.Input,{Text:js,Paragraph:_s}=u.Typography,{Text:As}=u.Typography,{Text:ks}=u.Typography,{Text:Ps}=u.Typography,{Text:Cs}=u.Typography;common;const ie=ct("task"),J={listMyProjects:()=>ko.get("/project/user/list").then(e=>e.data),createProject:e=>ie.post("/project",e).then(t=>t.data),updateProject:(e,t)=>ie.put(`/project/${e}`,t).then(r=>r.data),archiveProject:e=>ie.put(`/project/${e}/archive`).then(t=>t.data),listTasksByProject:e=>ie.get("/task/project/list",{params:{projectId:e}}).then(t=>t.data),listTasksByList:e=>ie.get("/task/list",{params:{listId:e}}).then(t=>t.data),createTask:e=>ie.post("/task",e).then(t=>t.data),completeTask:e=>ie.post("/task/complete",null,{params:{taskId:e}}).then(t=>t.data),moveTask:(e,t,r)=>ie.put("/task/move",null,{params:{taskId:e,targetListId:t,position:r}}).then(n=>n.data)},ut=e=>{if(!e)return"-";const t=String(e),r=t.match(/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})/);return r?r[1]:t};function ft({apiBaseURL:e}){const[t,r]=N.useState([]),[n,o]=N.useState(!1),[s,a]=N.useState(!1),[c,f]=N.useState(null),[p,m]=N.useState(null),[b,S]=N.useState([]),[R,C]=N.useState(!1),[x]=u.Form.useForm(),F=async()=>{o(!0);try{const E=await J.listMyProjects();r((E==null?void 0:E.data)||E||[])}catch(E){u.message.error("加载项目失败: "+((E==null?void 0:E.message)||E))}finally{o(!1)}};N.useEffect(()=>{F()},[]);const y=async E=>{m(E),C(!0);try{const A=await J.listTasksByProject(E.id);S((A==null?void 0:A.data)||A||[])}catch(A){u.message.error("加载任务失败: "+((A==null?void 0:A.message)||A))}finally{C(!1)}},h=async()=>{if(p)try{const E=await J.listTasksByProject(p.id);S((E==null?void 0:E.data)||E||[])}catch(E){u.message.error("刷新任务失败: "+((E==null?void 0:E.message)||E))}},O=()=>{f(null),x.resetFields(),x.setFieldsValue({status:1}),a(!0)},k=E=>{f(E),x.setFieldsValue({name:E.name,description:E.description,status:E.status??1}),a(!0)},D=async()=>{try{const E=await x.validateFields();c?(await J.updateProject(c.id,E),u.message.success("项目已更新")):(await J.createProject(E),u.message.success("项目已创建")),a(!1),F()}catch(E){if(E!=null&&E.errorFields)return;u.message.error("保存失败: "+((E==null?void 0:E.message)||E))}},te=async E=>{try{await J.archiveProject(E),u.message.success("项目已归档"),F(),(p==null?void 0:p.id)===E&&(m(null),S([]))}catch(A){u.message.error("归档失败: "+((A==null?void 0:A.message)||A))}},ye=async E=>{try{await J.completeTask(E),u.message.success("任务已完成"),h()}catch(A){u.message.error("操作失败: "+((A==null?void 0:A.message)||A))}},ne=[{title:"项目名称",dataIndex:"name",render:(E,A)=>d.jsx("a",{onClick:()=>y(A),style:{fontWeight:(p==null?void 0:p.id)===A.id?600:400},children:E})},{title:"状态",dataIndex:"status",width:80,render:E=>E===1?d.jsx(u.Tag,{color:"green",children:"进行中"}):d.jsx(u.Tag,{children:"已归档"})},{title:"创建时间",dataIndex:"createdAt",width:170,render:ut},{title:"操作",width:160,fixed:"right",render:(E,A)=>d.jsxs(u.Space,{children:[d.jsx(u.Button,{size:"small",icon:d.jsx(L.EditOutlined,{}),onClick:()=>k(A),children:"编辑"}),d.jsx(u.Popconfirm,{title:"确定归档该项目?",onConfirm:()=>te(A.id),children:d.jsx(u.Button,{size:"small",danger:!0,icon:d.jsx(L.DeleteOutlined,{}),children:"归档"})})]})}],X=E=>{const $={0:{text:"待办",color:"default"},1:{text:"进行中",color:"blue"},2:{text:"已完成",color:"green"}}[E]||{text:String(E),color:"default"};return d.jsx(u.Tag,{color:$.color,children:$.text})};return d.jsxs("div",{children:[d.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:12},children:d.jsx(u.Button,{type:"primary",icon:d.jsx(L.PlusOutlined,{}),onClick:O,children:"新建项目"})}),d.jsxs("div",{style:{display:"flex",gap:16,height:"calc(100vh - 220px)"},children:[d.jsx(u.Card,{size:"small",title:d.jsxs(u.Space,{children:[d.jsx(L.InboxOutlined,{}),"项目管理"]}),style:{width:520,flexShrink:0},styles:{body:{padding:8,overflow:"auto",height:"calc(100% - 40px)"}},children:d.jsx(u.Table,{rowKey:"id",columns:ne,dataSource:t,loading:n,pagination:{pageSize:10,size:"small"},size:"small",rowClassName:E=>(p==null?void 0:p.id)===E.id?"ant-table-row-selected":"",onRow:E=>({onClick:()=>y(E),style:{cursor:"pointer"}}),locale:{emptyText:"暂无项目"}})}),d.jsx(u.Card,{size:"small",style:{flex:1,overflow:"auto"},styles:{body:{padding:16}},title:p?d.jsxs(u.Space,{children:[d.jsx(L.UnorderedListOutlined,{}),p.name," · 任务列表"]}):"项目详情",children:p?d.jsxs(u.Spin,{spinning:R,children:[d.jsxs(u.Descriptions,{size:"small",bordered:!0,column:2,style:{marginBottom:16},children:[d.jsx(u.Descriptions.Item,{label:"项目名称",span:2,children:p.name}),d.jsx(u.Descriptions.Item,{label:"描述",span:2,children:p.description||"无"}),d.jsx(u.Descriptions.Item,{label:"负责人",children:p.ownerId||"未指定"}),d.jsx(u.Descriptions.Item,{label:"状态",children:p.status===1?d.jsx(u.Tag,{color:"green",children:"进行中"}):d.jsx(u.Tag,{children:"已归档"})}),d.jsx(u.Descriptions.Item,{label:"创建时间",children:ut(p.createdAt)}),d.jsx(u.Descriptions.Item,{label:"项目ID",children:p.id})]}),d.jsx(u.List,{size:"small",header:d.jsxs("b",{children:["任务项 (",b.length,")"]}),bordered:!0,dataSource:b,locale:{emptyText:"该项目下暂无任务"},renderItem:E=>d.jsx(u.List.Item,{actions:[d.jsx(u.Button,{size:"small",type:"primary",icon:d.jsx(L.CheckOutlined,{}),disabled:E.status===2,onClick:()=>ye(E.id),children:"完成"},"complete")],children:d.jsx(u.List.Item.Meta,{title:d.jsxs(u.Space,{children:[E.title,X(E.status),d.jsxs(u.Tag,{children:["优先级 ",E.priority??"-"]})]}),description:d.jsxs("span",{style:{color:"#888",fontSize:12},children:["截止: ",ut(E.dueDate)," · ID: ",E.id]})})})})]}):d.jsx(u.Empty,{description:"请从左侧选择一个项目",style:{marginTop:80}})})]}),d.jsx(u.Drawer,{title:c?`编辑项目 - ${c.name}`:"新建项目",width:480,open:s,onClose:()=>a(!1),destroyOnHidden:!0,extra:d.jsxs(u.Space,{children:[d.jsx(u.Button,{onClick:()=>a(!1),children:"取消"}),d.jsx(u.Button,{type:"primary",onClick:D,children:"保存"})]}),children:d.jsxs(u.Form,{form:x,layout:"vertical",preserve:!1,children:[d.jsx(u.Form.Item,{name:"name",label:"项目名称",rules:[{required:!0,message:"请输入项目名称"}],children:d.jsx(u.Input,{placeholder:"例如: 一人公司"})}),d.jsx(u.Form.Item,{name:"description",label:"项目描述",children:d.jsx(u.Input.TextArea,{rows:3,placeholder:"可选"})}),d.jsx(u.Form.Item,{name:"status",label:"状态",initialValue:1,children:d.jsx(u.Select,{options:[{label:"进行中",value:1},{label:"已归档",value:0}]})})]})})]})}function dt({apiBaseURL:e}){const[t,r]=N.useState([]),[n,o]=N.useState(null),[s,a]=N.useState([]),[c,f]=N.useState(!1),[p,m]=N.useState(!1),[b]=u.Form.useForm(),S=async()=>{try{const h=await J.listMyProjects(),O=(h==null?void 0:h.data)||h||[];r(O),O.length>0&&!n&&o(O[0].id)}catch(h){u.message.error("加载项目失败: "+((h==null?void 0:h.message)||h))}},R=async h=>{if(!h){a([]);return}f(!0);try{const O=await J.listTasksByProject(h);a((O==null?void 0:O.data)||O||[])}catch(O){u.message.error("加载任务失败: "+((O==null?void 0:O.message)||O))}finally{f(!1)}};N.useEffect(()=>{S()},[]),N.useEffect(()=>{R(n)},[n]);const C=()=>{if(!n){u.message.warning("请先选择项目");return}b.resetFields(),b.setFieldsValue({projectId:n,listId:1,status:1,priority:1}),m(!0)},x=async()=>{try{const h=await b.validateFields();await J.createTask(h),u.message.success("任务已创建"),m(!1),R(n)}catch(h){if(h!=null&&h.errorFields)return;u.message.error("创建失败: "+((h==null?void 0:h.message)||h))}},F=async h=>{try{await J.completeTask(h),u.message.success("任务已完成"),R(n)}catch(O){u.message.error("操作失败: "+((O==null?void 0:O.message)||O))}},y=[{title:"ID",dataIndex:"id",width:60},{title:"标题",dataIndex:"title"},{title:"项目ID",dataIndex:"projectId",width:80},{title:"状态",dataIndex:"status",width:100,render:h=>{const O={0:"待办",1:"进行中",2:"已完成"},k={0:"default",1:"blue",2:"green"}[h]||"default";return d.jsx(u.Tag,{color:k,children:O[h]||h})}},{title:"优先级",dataIndex:"priority",width:80},{title:"截止时间",dataIndex:"dueDate",width:180},{title:"操作",width:200,fixed:"right",render:(h,O)=>d.jsx(u.Space,{children:d.jsx(u.Button,{size:"small",type:"primary",icon:d.jsx(L.CheckOutlined,{}),onClick:()=>F(O.id),disabled:O.status===2,children:"完成"})})}];return d.jsxs("div",{children:[d.jsx(u.Card,{title:"任务管理",extra:d.jsxs(u.Space,{children:[d.jsx("span",{children:"项目:"}),d.jsx(u.Select,{value:n,onChange:o,style:{width:240},placeholder:"选择项目",options:t.map(h=>({label:h.name,value:h.id}))}),d.jsx(u.Button,{type:"primary",icon:d.jsx(L.PlusOutlined,{}),onClick:C,children:"新建任务"})]}),children:d.jsx(u.Table,{rowKey:"id",columns:y,dataSource:s,loading:c,pagination:{pageSize:10}})}),d.jsx(u.Modal,{title:"新建任务",open:p,onCancel:()=>m(!1),onOk:x,destroyOnHidden:!0,children:d.jsxs(u.Form,{form:b,layout:"vertical",preserve:!1,children:[d.jsx(u.Form.Item,{name:"title",label:"任务标题",rules:[{required:!0,message:"请输入任务标题"}],children:d.jsx(u.Input,{placeholder:"例如: 实现 xx 功能"})}),d.jsx(u.Form.Item,{name:"projectId",label:"所属项目",rules:[{required:!0}],children:d.jsx(u.Select,{options:t.map(h=>({label:h.name,value:h.id})),placeholder:"从数据库捞出的项目列表"})}),d.jsx(u.Form.Item,{name:"listId",label:"列表ID",rules:[{required:!0}],children:d.jsx(u.Input,{type:"number",placeholder:"默认 1"})}),d.jsx(u.Form.Item,{name:"priority",label:"优先级",initialValue:1,children:d.jsx(u.Select,{options:[{label:"低",value:1},{label:"中",value:2},{label:"高",value:3}]})})]})})]})}function Io(){return d.jsxs(fe.Routes,{children:[d.jsx(fe.Route,{index:!0,element:d.jsx(fe.Navigate,{to:"project",replace:!0})}),d.jsx(fe.Route,{path:"project",element:d.jsx(ft,{})}),d.jsx(fe.Route,{path:"project/*",element:d.jsx(ft,{})}),d.jsx(fe.Route,{path:"task",element:d.jsx(dt,{})}),d.jsx(fe.Route,{path:"task/*",element:d.jsx(dt,{})})]})}U.ProjectList=ft,U.ProjectSelect=Or,U.TaskApp=Io,U.TaskCard=gr,U.TaskList=dt,U.TaskTable=wr,U.api=J,U.taskApi=J,Object.defineProperty(U,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuku123/z-task-frontend-component",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "z-task 共享前端组件 - TaskCard 等",
|
|
6
6
|
"keywords": [
|
|
@@ -44,4 +44,4 @@
|
|
|
44
44
|
"@vitejs/plugin-react": "^4.2.1",
|
|
45
45
|
"vite": "^6.2.0"
|
|
46
46
|
}
|
|
47
|
-
}
|
|
47
|
+
}
|