import{o as e}from"./chunk-jRWAZmH_.js";import{n as t}from"./jsx-runtime-CEixWuwE.js";import{A as n,J as r,L as i,Wn as a,Y as o,cr as s,sr as c,z as l}from"./axios-v6FV69Ne.js";import{n as u,t as d}from"./slicedToArray-YLaz90ka.js";import{i as f,r as p}from"./asyncToGenerator-DHhZBkop.js";import{l as m,u as h}from"./button-C7b7AmGo.js";import{nt as g}from"./index-BqyXv5bE.js";s(),f(),u();var _=e(a()),v=e(g());m();var y=e(t()),b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};n(`small`,`default`,`large`);var x=null;function S(e,t){var n=t.indicator,r=`${e}-dot`;return n===null?null:l(n)?i(n,{className:(0,_.default)(n.props.className,r)}):l(x)?i(x,{className:(0,_.default)(x.props.className,r)}):y.createElement(`span`,{className:(0,_.default)(r,`${e}-dot-spin`)},y.createElement(`i`,{className:`${e}-dot-item`}),y.createElement(`i`,{className:`${e}-dot-item`}),y.createElement(`i`,{className:`${e}-dot-item`}),y.createElement(`i`,{className:`${e}-dot-item`}))}function C(e,t){return!!e&&!!t&&!isNaN(Number(t))}var w=function(e){var t=e.spinPrefixCls,n=e.spinning,i=n===void 0?!0:n,a=e.delay,o=e.className,s=e.size,l=s===void 0?`default`:s,u=e.tip,f=e.wrapperClassName,m=e.style,g=e.children,x=b(e,[`spinPrefixCls`,`spinning`,`delay`,`className`,`size`,`tip`,`wrapperClassName`,`style`,`children`]),w=d(y.useState(function(){return i&&!C(i,a)}),2),T=w[0],E=w[1];y.useEffect(function(){var e=(0,v.default)(function(){E(i)},a);return e(),function(){var t;(t=e?.cancel)==null||t.call(e)}},[a,i]);var D=function(){return g!==void 0};return y.createElement(r,null,function(n){var r=n.direction,i=(0,_.default)(t,p(p(p(p(p({},`${t}-sm`,l===`small`),`${t}-lg`,l===`large`),`${t}-spinning`,T),`${t}-show-text`,!!u),`${t}-rtl`,r===`rtl`),o),a=h(x,[`indicator`,`prefixCls`]),s=y.createElement(`div`,c({},a,{style:m,className:i,"aria-live":`polite`,"aria-busy":T}),S(t,e),u?y.createElement(`div`,{className:`${t}-text`},u):null);if(D()){var d=(0,_.default)(`${t}-container`,p({},`${t}-blur`,T));return y.createElement(`div`,c({},a,{className:(0,_.default)(`${t}-nested-loading`,f)}),T&&y.createElement(`div`,{key:`loading`},s),y.createElement(`div`,{className:d,key:`container`},g))}return s})},T=function(e){var t=e.prefixCls,n=y.useContext(o).getPrefixCls,r=n(`spin`,t),i=c(c({},e),{spinPrefixCls:r});return y.createElement(w,c({},i))};T.setDefaultIndicator=function(e){x=e};export{T as t};