@zeturn/watercolor-react 1.1.43 → 1.1.46
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/README.md +1 -1
- package/dist/src/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/src/components/Icon/Icon.d.ts +9 -10
- package/dist/src/components/Icon/Icon.d.ts.map +1 -1
- package/dist/src/components/List/List.d.ts +2 -1
- package/dist/src/components/List/List.d.ts.map +1 -1
- package/dist/src/utils/theme.d.ts.map +1 -1
- package/dist/watercolor-react.css +1 -1
- package/dist/watercolor-react.es.js +1514 -1979
- package/dist/watercolor-react.umd.js +7 -22
- package/index.d.ts +78 -0
- package/package.json +18 -12
- package/style.css +1 -0
- package/dist/index.d.ts +0 -2
|
@@ -1,21 +1,6 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`react`),require(`react-dom`)):typeof define==`function`&&define.amd?define([`exports`,`react`,`react-dom`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.WatercolorReact={},e.React,e.ReactDOM))})(this,function(e,t,n){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),u=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var s=o(t),l=0,u=s.length,d;l<u;l++)d=s[l],!c.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e},d=(e,t,n)=>(n=e==null?{}:r(s(e)),u(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e));t=d(t),n=d(n);var f=[`default`,`bordered`,`filled`];function p(e=`default`){return f.includes(e)?e:`default`}function m(e){return e?typeof e==`string`?e:Array.isArray(e)?e.filter(Boolean).join(` `):typeof e==`object`?Object.entries(e).filter(([,e])=>e).map(([e])=>e).join(` `):``:``}function h(e=`default`,t=``){let n=p(e),r=m(t);return[`wc-accordion`,n===`default`?``:`wc-accordion--${n}`,r].filter(Boolean).join(` `)}function g(e=[],t,n=!1){return n?e.includes(t)?e.filter(e=>e!==t):[...e,t]:e.includes(t)?[]:[t]}var _=l((e=>{var t=require(`react`),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),v=l((e=>{process.env.NODE_ENV!==`production`&&(function(){"use strict";var t=require(`react`),n=Symbol.for(`react.element`),r=Symbol.for(`react.portal`),i=Symbol.for(`react.fragment`),a=Symbol.for(`react.strict_mode`),o=Symbol.for(`react.profiler`),s=Symbol.for(`react.provider`),c=Symbol.for(`react.context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`),m=Symbol.for(`react.offscreen`),h=Symbol.iterator,g=`@@iterator`;function _(e){if(typeof e!=`object`||!e)return null;var t=h&&e[h]||e[g];return typeof t==`function`?t:null}var v=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(e){b(`error`,e,[...arguments].slice(1))}function b(e,t,n){var r=v.ReactDebugCurrentFrame.getStackAddendum();r!==``&&(t+=`%s`,n=n.concat([r]));var i=n.map(function(e){return String(e)});i.unshift(`Warning: `+t),Function.prototype.apply.call(console[e],console,i)}var x=!1,S=!1,C=!1,w=!1,T=!1,E=Symbol.for(`react.module.reference`);function D(e){return!!(typeof e==`string`||typeof e==`function`||e===i||e===o||T||e===a||e===u||e===d||w||e===m||x||S||C||typeof e==`object`&&e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===s||e.$$typeof===c||e.$$typeof===l||e.$$typeof===E||e.getModuleId!==void 0))}function O(e,t,n){var r=e.displayName;if(r)return r;var i=t.displayName||t.name||``;return i===``?n:n+`(`+i+`)`}function k(e){return e.displayName||`Context`}function A(e){if(e==null)return null;if(typeof e.tag==`number`&&y(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case i:return`Fragment`;case r:return`Portal`;case o:return`Profiler`;case a:return`StrictMode`;case u:return`Suspense`;case d:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case c:return k(e)+`.Consumer`;case s:return k(e._context)+`.Provider`;case l:return O(e,e.render,`ForwardRef`);case f:var t=e.displayName||null;return t===null?A(e.type)||`Memo`:t;case p:var n=e,m=n._payload,h=n._init;try{return A(h(m))}catch{return null}}return null}var j=Object.assign,M=0,N,P,F,I,L,R,z;function B(){}B.__reactDisabledLog=!0;function V(){if(M===0){N=console.log,P=console.info,F=console.warn,I=console.error,L=console.group,R=console.groupCollapsed,z=console.groupEnd;var e={configurable:!0,enumerable:!0,value:B,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}M++}function ee(){if(M--,M===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:j({},e,{value:N}),info:j({},e,{value:P}),warn:j({},e,{value:F}),error:j({},e,{value:I}),group:j({},e,{value:L}),groupCollapsed:j({},e,{value:R}),groupEnd:j({},e,{value:z})})}M<0&&y(`disabledDepth fell below zero. This is a bug in React. Please file an issue.`)}var H=v.ReactCurrentDispatcher,U;function W(e,t,n){if(U===void 0)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);U=r&&r[1]||``}return`
|
|
2
|
-
`+U+e}var G=!1,K=new(typeof WeakMap==`function`?WeakMap:Map);function q(e,t){if(!e||G)return``;var n=K.get(e);if(n!==void 0)return n;var r;G=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var a=H.current;H.current=null,V();try{if(t){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(o,[])}catch(e){r=e}Reflect.construct(e,[],o)}else{try{o.call()}catch(e){r=e}e.call(o.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var s=t.stack.split(`
|
|
3
|
-
`),c=r.stack.split(`
|
|
4
|
-
`),l=s.length-1,u=c.length-1;l>=1&&u>=0&&s[l]!==c[u];)u--;for(;l>=1&&u>=0;l--,u--)if(s[l]!==c[u]){if(l!==1||u!==1)do if(l--,u--,u<0||s[l]!==c[u]){var d=`
|
|
5
|
-
`+s[l].replace(` at new `,` at `);return e.displayName&&d.includes(`<anonymous>`)&&(d=d.replace(`<anonymous>`,e.displayName)),typeof e==`function`&&K.set(e,d),d}while(l>=1&&u>=0);break}}}finally{G=!1,H.current=a,ee(),Error.prepareStackTrace=i}var f=e?e.displayName||e.name:``,p=f?W(f):``;return typeof e==`function`&&K.set(e,p),p}function J(e,t,n){return q(e,!1)}function te(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function Y(e,t,n){if(e==null)return``;if(typeof e==`function`)return q(e,te(e));if(typeof e==`string`)return W(e);switch(e){case u:return W(`Suspense`);case d:return W(`SuspenseList`)}if(typeof e==`object`)switch(e.$$typeof){case l:return J(e.render);case f:return Y(e.type,t,n);case p:var r=e,i=r._payload,a=r._init;try{return Y(a(i),t,n)}catch{}}return``}var X=Object.prototype.hasOwnProperty,ne={},re=v.ReactDebugCurrentFrame;function Z(e){if(e){var t=e._owner,n=Y(e.type,e._source,t?t.type:null);re.setExtraStackFrame(n)}else re.setExtraStackFrame(null)}function ie(e,t,n,r,i){var a=Function.call.bind(X);for(var o in e)if(a(e,o)){var s=void 0;try{if(typeof e[o]!=`function`){var c=Error((r||`React class`)+`: `+n+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name=`Invariant Violation`,c}s=e[o](t,o,r,n,null,`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`)}catch(e){s=e}s&&!(s instanceof Error)&&(Z(i),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||`React class`,n,o,typeof s),Z(null)),s instanceof Error&&!(s.message in ne)&&(ne[s.message]=!0,Z(i),y(`Failed %s type: %s`,n,s.message),Z(null))}}var ae=Array.isArray;function Q(e){return ae(e)}function oe(e){return typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`}function se(e){try{return ce(e),!1}catch{return!0}}function ce(e){return``+e}function le(e){if(se(e))return y(`The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.`,oe(e)),ce(e)}var ue=v.ReactCurrentOwner,de={key:!0,ref:!0,__self:!0,__source:!0},fe,pe,me={};function he(e){if(X.call(e,`ref`)){var t=Object.getOwnPropertyDescriptor(e,`ref`).get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function ge(e){if(X.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function _e(e,t){if(typeof e.ref==`string`&&ue.current&&t&&ue.current.stateNode!==t){var n=A(ue.current.type);me[n]||(y(`Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref`,A(ue.current.type),e.ref),me[n]=!0)}}function ve(e,t){var n=function(){fe||(fe=!0,y("%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://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,`key`,{get:n,configurable:!0})}function ye(e,t){var n=function(){pe||(pe=!0,y("%s: `ref` 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://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,`ref`,{get:n,configurable:!0})}var be=function(e,t,r,i,a,o,s){var c={$$typeof:n,type:e,key:t,ref:r,props:s,_owner:o};return c._store={},Object.defineProperty(c._store,`validated`,{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,`_self`,{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(c,`_source`,{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c};function xe(e,t,n,r,i){var a,o={},s=null,c=null;for(a in n!==void 0&&(le(n),s=``+n),ge(t)&&(le(t.key),s=``+t.key),he(t)&&(c=t.ref,_e(t,i)),t)X.call(t,a)&&!de.hasOwnProperty(a)&&(o[a]=t[a]);if(e&&e.defaultProps){var l=e.defaultProps;for(a in l)o[a]===void 0&&(o[a]=l[a])}if(s||c){var u=typeof e==`function`?e.displayName||e.name||`Unknown`:e;s&&ve(o,u),c&&ye(o,u)}return be(e,s,c,i,r,ue.current,o)}var Se=v.ReactCurrentOwner,Ce=v.ReactDebugCurrentFrame;function we(e){if(e){var t=e._owner,n=Y(e.type,e._source,t?t.type:null);Ce.setExtraStackFrame(n)}else Ce.setExtraStackFrame(null)}var Te=!1;function Ee(e){return typeof e==`object`&&!!e&&e.$$typeof===n}function De(){if(Se.current){var e=A(Se.current.type);if(e)return`
|
|
6
|
-
|
|
7
|
-
Check the render method of \``+e+"`."}return``}function Oe(e){if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,``),n=e.lineNumber;return`
|
|
8
|
-
|
|
9
|
-
Check your code at `+t+`:`+n+`.`}return``}var ke={};function Ae(e){var t=De();if(!t){var n=typeof e==`string`?e:e.displayName||e.name;n&&(t=`
|
|
10
|
-
|
|
11
|
-
Check the top-level render call using <`+n+`>.`)}return t}function je(e,t){if(!(!e._store||e._store.validated||e.key!=null)){e._store.validated=!0;var n=Ae(t);if(!ke[n]){ke[n]=!0;var r=``;e&&e._owner&&e._owner!==Se.current&&(r=` It was passed a child from `+A(e._owner.type)+`.`),we(e),y(`Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.`,n,r),we(null)}}}function Me(e,t){if(typeof e==`object`){if(Q(e))for(var n=0;n<e.length;n++){var r=e[n];Ee(r)&&je(r,t)}else if(Ee(e))e._store&&(e._store.validated=!0);else if(e){var i=_(e);if(typeof i==`function`&&i!==e.entries)for(var a=i.call(e),o;!(o=a.next()).done;)Ee(o.value)&&je(o.value,t)}}}function Ne(e){var t=e.type;if(!(t==null||typeof t==`string`)){var n;if(typeof t==`function`)n=t.propTypes;else if(typeof t==`object`&&(t.$$typeof===l||t.$$typeof===f))n=t.propTypes;else return;if(n){var r=A(t);ie(n,e.props,`prop`,r,e)}else t.PropTypes!==void 0&&!Te&&(Te=!0,y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",A(t)||`Unknown`));typeof t.getDefaultProps==`function`&&!t.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Pe(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if(r!==`children`&&r!==`key`){we(e),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),we(null);break}}e.ref!==null&&(we(e),y("Invalid attribute `ref` supplied to `React.Fragment`."),we(null))}var Fe={};function Ie(e,t,r,a,o,s){var c=D(e);if(!c){var l=``;(e===void 0||typeof e==`object`&&e&&Object.keys(e).length===0)&&(l+=` You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.`);var u=Oe(o);u?l+=u:l+=De();var d;e===null?d=`null`:Q(e)?d=`array`:e!==void 0&&e.$$typeof===n?(d=`<`+(A(e.type)||`Unknown`)+` />`,l=` Did you accidentally export a JSX literal instead of a component?`):d=typeof e,y(`React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s`,d,l)}var f=xe(e,t,r,o,s);if(f==null)return f;if(c){var p=t.children;if(p!==void 0)if(a)if(Q(p)){for(var m=0;m<p.length;m++)Me(p[m],e);Object.freeze&&Object.freeze(p)}else y(`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 Me(p,e)}if(X.call(t,`key`)){var h=A(e),g=Object.keys(t).filter(function(e){return e!==`key`}),_=g.length>0?`{key: someKey, `+g.join(`: ..., `)+`: ...}`:`{key: someKey}`;Fe[h+_]||(y(`A props object containing a "key" prop is being spread into JSX:
|
|
12
|
-
let props = %s;
|
|
13
|
-
<%s {...props} />
|
|
14
|
-
React keys must be passed directly to JSX without using spread:
|
|
15
|
-
let props = %s;
|
|
16
|
-
<%s key={someKey} {...props} />`,_,h,g.length>0?`{`+g.join(`: ..., `)+`: ...}`:`{}`,h),Fe[h+_]=!0)}return e===i?Pe(f):Ne(f),f}function Le(e,t,n){return Ie(e,t,n,!0)}function Re(e,t,n){return Ie(e,t,n,!1)}var ze=Re,Be=Le;e.Fragment=i,e.jsx=ze,e.jsxs=Be})()})),y=l(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=_():t.exports=v()}))(),b=({items:e=[],multiple:n=!1,variant:r=`default`,onToggle:i,className:a=``,style:o={},"aria-label":s,...c})=>{let[l,u]=(0,t.useState)([]),d=h(r,a),f=e=>{let t=g(l,e,n);u(t),i?.(e,t.includes(e))},p=e=>l.includes(e);return(0,y.jsx)(`div`,{className:d,style:o,role:`region`,"aria-label":s||`Accordion`,...c,children:e.map((e,t)=>(0,y.jsxs)(`div`,{className:`wc-accordion-item`,children:[(0,y.jsxs)(`button`,{className:`wc-accordion-header ${p(t)?`wc-accordion-header--active`:``}`,onClick:()=>f(t),type:`button`,children:[(0,y.jsx)(`span`,{className:`wc-accordion-title`,children:e.title}),(0,y.jsx)(`span`,{className:`wc-accordion-icon ${p(t)?`wc-accordion-icon--rotated`:``}`,children:(0,y.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,y.jsx)(`polyline`,{points:`6,9 12,15 18,9`})})})]}),(0,y.jsx)(`div`,{className:`wc-accordion-content ${p(t)?`wc-accordion-content--open`:``}`,style:{display:p(t)?void 0:`none`},children:(0,y.jsx)(`div`,{className:`wc-accordion-content-inner`,children:e.content})})]},t))})};b.displayName=`Accordion`;var x={success:`✓`,info:`ⓘ`,warning:`⚠`,error:`✕`};function S(e){return x[e]||x.info}function C(e,t){return[`wc-alert`,`wc-alert--${e}`,`wc-alert--${t}`]}function w({type:e=`info`,variant:n=`standard`,title:r=``,closable:i=!1,showIcon:a=!0,className:o=``,children:s,onClose:c=()=>{}}){let[l,u]=(0,t.useState)(!0);if(!l)return null;let d=()=>{u(!1),c()},f=C(e,n),p=S(e);return(0,y.jsxs)(`div`,{className:[...f,o].filter(Boolean).join(` `),role:`alert`,children:[a&&(0,y.jsx)(`div`,{className:`wc-alert-icon`,children:(0,y.jsx)(`span`,{children:p})}),(0,y.jsxs)(`div`,{className:`wc-alert-content`,children:[r&&(0,y.jsx)(`div`,{className:`wc-alert-title`,children:r}),(0,y.jsx)(`div`,{className:`wc-alert-message`,children:s})]}),i&&(0,y.jsx)(`button`,{type:`button`,className:`wc-alert-close`,"aria-label":`关闭`,onClick:d,children:`×`})]})}var T=({children:e,position:t=`fixed`,color:n=`default`,elevation:r=4,variant:i=`elevation`,className:a=``,style:o={},...s})=>(0,y.jsx)(`div`,{className:`wc-appbar wc-appbar--${t} wc-appbar--${n} wc-appbar--elevation-${r} wc-appbar--${i} ${a}`,style:o,...s,children:e}),E=({value:e=null,onChange:n,options:r=[],placeholder:i=`Type to search...`,label:a=``,helperText:o=``,error:s=!1,errorMessage:c=``,required:l=!1,disabled:u=!1,readonly:d=!1,multiple:f=!1,freeSolo:p=!1,clearable:m=!0,fullWidth:h=!1,size:g=`md`,variant:_=`outlined`,minSearchLength:v=0,noOptionsText:b=`No options found`,name:x=``,id:S=``,className:C=``,style:w={},onFocus:T,onBlur:E,onInputChange:D,filterOptions:O,renderOption:k,renderInput:A,getOptionLabel:j,getOptionValue:M,...N})=>{let[P,F]=(0,t.useState)(!1),[I,L]=(0,t.useState)(``),[R,z]=(0,t.useState)(-1),B=(0,t.useRef)(null),V=(0,t.useRef)(null),ee=e=>e?typeof e==`object`?e.label||e.value||``:String(e):``,H=e=>e?typeof e==`object`?e.value===void 0?e:e.value:e:null,U=j||ee,W=M||H;(0,t.useEffect)(()=>{!f&&e?L(U(e)):e||L(``)},[e,f]),(0,t.useEffect)(()=>{let e=e=>{B.current&&!B.current.contains(e.target)&&F(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]);let G=O?O(r,I):((e,t)=>!t||t.length<v?e:e.filter(e=>U(e).toLowerCase().includes(t.toLowerCase())))(r,I),K=t=>{let n=W(t);return f&&Array.isArray(e)?e.some(e=>W(e)===n):W(e)===n},q=()=>{let e=[`wc-autocomplete`];return h&&e.push(`wc-autocomplete--full-width`),e.concat(C).filter(Boolean).join(` `)},J=()=>{let e=[`wc-autocomplete__label`];return e.push(`wc-autocomplete__label--${g}`),s&&e.push(`wc-autocomplete__label--error`),e.join(` `)},te=()=>{let e=[`wc-autocomplete__container`];return e.push(`wc-autocomplete__container--${_}`),e.push(`wc-autocomplete__container--${g}`),u&&e.push(`wc-autocomplete__container--disabled`),s&&e.push(`wc-autocomplete__container--error`),P&&e.push(`wc-autocomplete__container--open`),e.join(` `)},Y=(e,t)=>{let n=[`wc-autocomplete__option`];return K(e)&&n.push(`wc-autocomplete__option--selected`),t===R&&n.push(`wc-autocomplete__option--highlighted`),e.disabled&&n.push(`wc-autocomplete__option--disabled`),n.join(` `)},X=e=>{F(!0),T?.(e)},ne=e=>{setTimeout(()=>{F(!1),E?.(e)},200)},re=e=>{let t=e.target.value;L(t),F(!0),z(-1),D?.(t),p&&n?.({target:{name:x,value:t}})},Z=e=>{e.stopPropagation(),L(``),F(!1),z(-1),n?.({target:{name:x,value:f?[]:null}})},ie=t=>{if(t.disabled)return;let r=W(t),i;if(f){let n=Array.isArray(e)?[...e]:[],a=n.findIndex(e=>W(e)===r);a>-1?n.splice(a,1):n.push(t),i=n,L(``)}else i=t,L(U(t)),F(!1);z(-1),n?.({target:{name:x,value:i}})},ae=e=>{if(!P&&(e.key===`ArrowDown`||e.key===`ArrowUp`)){F(!0),e.preventDefault();return}if(!(!P||G.length===0))switch(e.key){case`ArrowDown`:e.preventDefault(),z(e=>Math.min(e+1,G.length-1));break;case`ArrowUp`:e.preventDefault(),z(e=>Math.max(e-1,0));break;case`Enter`:e.preventDefault(),R>=0&&R<G.length&&ie(G[R]);break;case`Escape`:F(!1),z(-1),V.current?.blur();break;default:break}},Q=S||x||`autocomplete-${Math.random().toString(36).substr(2,9)}`;return(0,y.jsxs)(`div`,{className:q(),ref:B,style:w,children:[a&&(0,y.jsxs)(`label`,{htmlFor:Q,className:J(),children:[a,l&&(0,y.jsx)(`span`,{className:`wc-autocomplete__required`,children:`*`})]}),(0,y.jsxs)(`div`,{className:te(),children:[A?A({id:Q,value:I,onChange:re,onFocus:X,onBlur:ne,onKeyDown:ae,placeholder:i,disabled:u,readonly:d,ref:V}):(0,y.jsx)(`input`,{id:Q,ref:V,type:`text`,className:`wc-autocomplete__input`,placeholder:i,value:I,onChange:re,onFocus:X,onBlur:ne,onKeyDown:ae,disabled:u,readOnly:d,autoComplete:`off`}),(0,y.jsxs)(`div`,{className:`wc-autocomplete__indicators`,children:[m&&I&&(0,y.jsx)(`button`,{type:`button`,className:`wc-autocomplete__clear`,onClick:Z,tabIndex:-1,children:(0,y.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,y.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,y.jsx)(`line`,{x1:`15`,y1:`9`,x2:`9`,y2:`15`}),(0,y.jsx)(`line`,{x1:`9`,y1:`9`,x2:`15`,y2:`15`})]})}),(0,y.jsx)(`div`,{className:`wc-autocomplete__arrow${P&&G.length>0?` wc-autocomplete__arrow--open`:``}`,children:(0,y.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,y.jsx)(`polyline`,{points:`6,9 12,15 18,9`})})})]})]}),P&&I.length>=v&&(0,y.jsx)(`div`,{className:`wc-autocomplete__dropdown`,children:G.length===0?(0,y.jsx)(`div`,{className:`wc-autocomplete__no-options`,children:b}):(0,y.jsx)(`div`,{className:`wc-autocomplete__options`,children:G.map((e,t)=>(0,y.jsxs)(`div`,{className:Y(e,t),onClick:()=>ie(e),onMouseEnter:()=>z(t),children:[k?k(e,{selected:K(e)}):(0,y.jsx)(`span`,{className:`wc-autocomplete__option-text`,children:U(e)}),K(e)&&(0,y.jsx)(`svg`,{className:`wc-autocomplete__option-check`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,y.jsx)(`polyline`,{points:`20,6 9,17 4,12`})})]},W(e)||t))})}),(s||o)&&(0,y.jsx)(`div`,{children:s?(0,y.jsx)(`p`,{className:`wc-autocomplete__error`,children:c||s}):(0,y.jsx)(`p`,{className:`wc-autocomplete__helper`,children:o})})]})};E.displayName=`Autocomplete`;function D({size:e,variant:t,color:n,src:r,imgError:i}){let a=[`wc-avatar`];return typeof e==`string`&&a.push(`wc-avatar--${e}`),a.push(`wc-avatar--${t}`),(!r||i)&&a.push(`wc-avatar--${n}`),a}function O(e){let t={};return typeof e==`number`&&(t.width=`${e}px`,t.height=`${e}px`,t.fontSize=`${e*.4}px`),t}function k(e){if(!e)return``;let t=e.trim(),n=t.charAt(0);if(/[\u4e00-\u9fa5]/.test(n))return n;let r=t.split(/\s+/).filter(Boolean);return r.length===1?r[0].charAt(0).toUpperCase():(r[0].charAt(0)+r[1].charAt(0)).toUpperCase()}function A(e){e(!0)}function j(e){e(!1)}var M=({src:e=``,alt:n=``,size:r=`md`,variant:i=`circular`,color:a=`default`,children:o=``,className:s=``,...c})=>{let[l,u]=(0,t.useState)(!1),d=D({size:r,variant:i,color:a,src:e,imgError:l}).concat(s).filter(Boolean).join(` `),f=O(r),p=k(o),m=()=>A(u),h=()=>j(u);return(0,y.jsx)(`div`,{className:d,style:f,...c,children:e&&!l?(0,y.jsx)(`img`,{src:e,alt:n,role:`img`,onError:m,onLoad:h}):o?(0,y.jsx)(`span`,{className:`wc-avatar-text`,children:p}):null})};M.displayName=`Avatar`;var N=[`primary`,`secondary`,`success`,`warning`,`error`,`purple`,`orange`,`cyan`,`pink`];function P(e){return N.includes(e)}function F(e){return P(e)?e:`primary`}function I({variant:e,size:t,dot:n,className:r}){let i=[`wc-badge`,`wc-badge--${F(e)}`];return n?i.push(`wc-badge--dot-${t}`):i.push(`wc-badge--${t}`),r&&i.push(r),i.filter(Boolean).join(` `)}var L=({children:e,variant:t=`primary`,size:n=`md`,dot:r=!1,className:i=``,...a})=>(0,y.jsx)(`span`,{className:I({variant:t,size:n,dot:r,className:i}),...a,children:!r&&e});L.displayName=`Badge`;var R={success:`✓`,info:`📢`,warning:`⚠`,error:`✕`};function z(e,t,n){let r=[`wc-banner`,`wc-banner--${e}`,`wc-banner--${t}`];return n&&r.push(`wc-banner--sticky`),r.join(` `)}function B(e){return R[e]||R.info}function V(e){return{zIndex:e}}function ee(e,t){e(!1),t&&t()}function H(e){e&&e()}function U({type:e=`info`,position:n=`top`,title:r=``,message:i=``,closable:a=!0,showIcon:o=!0,showDefaultAction:s=!1,actionText:c=`立即行动`,sticky:l=!0,zIndex:u=1e3,onClose:d,onAction:f,children:p}){let[m,h]=(0,t.useState)(!0);if(!m)return null;let g=z(e,n,l),_=V(u),v=B(e),b=()=>{ee(h,d)},x=()=>{H(f)},S=p&&t.default.Children.count(p)>0;return(0,y.jsx)(`div`,{className:g,style:_,children:(0,y.jsxs)(`div`,{className:`wc-banner-content`,children:[o&&(0,y.jsx)(`div`,{className:`wc-banner-icon`,children:v}),(0,y.jsxs)(`div`,{className:`wc-banner-text`,children:[r&&(0,y.jsx)(`div`,{className:`wc-banner-title`,children:r}),(0,y.jsx)(`div`,{className:`wc-banner-message`,children:i})]}),(S||s)&&(0,y.jsx)(`div`,{className:`wc-banner-actions`,children:S?p:(0,y.jsx)(`button`,{onClick:x,className:`wc-banner-action-btn`,children:c})}),a&&(0,y.jsx)(`button`,{onClick:b,className:`wc-banner-close`,"aria-label":`关闭`,children:`×`})]})})}function W(e=``,t=`default`,n=!0,r=!0,i=`medium`,a=`default`){let o=[`wc-blockquote`];return t&&t!==`default`&&t!==`card`&&o.push(`wc-blockquote--${t}`),n&&o.push(`wc-blockquote--no-border`),r&&o.push(`wc-blockquote--interactive`),i&&i!==`medium`&&o.push(`wc-blockquote--${i}`),a&&a!==`default`&&o.push(`wc-blockquote--${a}`),e&&o.push(e),o.filter(Boolean).join(` `)}function G(e=``,t=`filled`,n=`default`,r=`medium`,i=!0,a=!0){let o=[`wc-card`];return t&&t!==`filled`&&o.push(`wc-card--${t}`),n&&n!==`default`&&o.push(`wc-card--${n}`),r&&r!==`medium`&&o.push(`wc-card--${r}`),i&&o.push(`wc-card--interactive`),a&&o.push(`wc-card--no-border`),e&&o.push(e),o.filter(Boolean).join(` `)}var K=({children:e,title:t=``,variant:n=`filled`,color:r=`default`,size:i=`medium`,interactive:a=!0,noBorder:o=!0,className:s=``,header:c=null,footer:l=null,style:u={},onClick:d,onMouseEnter:f,onMouseLeave:p,...m})=>{let h=G(s,n,r,i,a,o);return(0,y.jsxs)(`div`,{className:h,style:u,onClick:e=>{a&&d&&d(e)},onMouseEnter:f,onMouseLeave:p,role:d?`button`:void 0,tabIndex:d?0:void 0,...m,children:[c&&(0,y.jsx)(`div`,{className:`wc-card-header`,children:c}),t&&(0,y.jsx)(`div`,{className:`wc-card-header`,children:(0,y.jsx)(`h3`,{className:`wc-card__title`,children:t})}),(0,y.jsx)(`div`,{className:`wc-card-content`,children:e}),l&&(0,y.jsx)(`div`,{className:`wc-card-footer`,children:l})]})};K.displayName=`Card`;function q({cite:e=``,children:t,className:n=``,variant:r=`default`,noBorder:i=!0,interactive:a=!0,size:o=`medium`,color:s=`default`,...c}){return r===`card`?(0,y.jsxs)(K,{variant:`filled`,color:s,size:o,interactive:a,noBorder:i,className:n,...c,children:[(0,y.jsx)(`p`,{className:`quote-text`,children:t}),e&&(0,y.jsxs)(`footer`,{className:`quote-cite`,children:[`— `,e]})]}):(0,y.jsxs)(`blockquote`,{className:W(n,r,i,a,o,s),...c,children:[(0,y.jsx)(`p`,{className:`quote-text`,children:t}),e&&(0,y.jsxs)(`footer`,{className:`quote-cite`,children:[`— `,e]})]})}var J={0:`0`,1:`0.25rem`,2:`0.5rem`,3:`0.75rem`,4:`1rem`,5:`1.25rem`,6:`1.5rem`,8:`2rem`,10:`2.5rem`,12:`3rem`,16:`4rem`,20:`5rem`,24:`6rem`},te={flex:`flex`,block:`block`,inline:`inline`,"inline-block":`inline-block`,none:`hidden`,grid:`grid`},Y={row:`flex-row`,column:`flex-col`,"row-reverse":`flex-row-reverse`,"column-reverse":`flex-col-reverse`},X={"flex-start":`justify-start`,center:`justify-center`,"flex-end":`justify-end`,"space-between":`justify-between`,"space-around":`justify-around`,"space-evenly":`justify-evenly`},ne={"flex-start":`items-start`,center:`items-center`,"flex-end":`items-end`,stretch:`items-stretch`,baseline:`items-baseline`},re={wrap:`flex-wrap`,nowrap:`flex-nowrap`,"wrap-reverse":`flex-wrap-reverse`};function Z(e){return typeof e==`number`?`${e}px`:e}function ie(e){let t=[];if(e.display&&te[e.display]&&t.push(te[e.display]),e.flexDirection&&Y[e.flexDirection]&&t.push(Y[e.flexDirection]),e.justifyContent&&X[e.justifyContent]&&t.push(X[e.justifyContent]),e.alignItems&&ne[e.alignItems]&&t.push(ne[e.alignItems]),e.flexWrap&&re[e.flexWrap]&&t.push(re[e.flexWrap]),e.gap!==void 0){let n=e.gap.toString();[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`8`,`10`,`12`,`16`,`20`,`24`].includes(n)&&t.push(`gap-${n}`)}return t}function ae(e){let t={};if(e.p!==void 0&&(t.padding=J[e.p]||Z(e.p)),e.pt!==void 0&&(t.paddingTop=J[e.pt]||Z(e.pt)),e.pr!==void 0&&(t.paddingRight=J[e.pr]||Z(e.pr)),e.pb!==void 0&&(t.paddingBottom=J[e.pb]||Z(e.pb)),e.pl!==void 0&&(t.paddingLeft=J[e.pl]||Z(e.pl)),e.px!==void 0){let n=J[e.px]||Z(e.px);t.paddingLeft=n,t.paddingRight=n}if(e.py!==void 0){let n=J[e.py]||Z(e.py);t.paddingTop=n,t.paddingBottom=n}if(e.m!==void 0&&(t.margin=J[e.m]||Z(e.m)),e.mt!==void 0&&(t.marginTop=J[e.mt]||Z(e.mt)),e.mr!==void 0&&(t.marginRight=J[e.mr]||Z(e.mr)),e.mb!==void 0&&(t.marginBottom=J[e.mb]||Z(e.mb)),e.ml!==void 0&&(t.marginLeft=J[e.ml]||Z(e.ml)),e.mx!==void 0){let n=J[e.mx]||Z(e.mx);t.marginLeft=n,t.marginRight=n}if(e.my!==void 0){let n=J[e.my]||Z(e.my);t.marginTop=n,t.marginBottom=n}return e.display&&(t.display=e.display),e.flexDirection&&(t.flexDirection=e.flexDirection),e.justifyContent&&(t.justifyContent=e.justifyContent),e.alignItems&&(t.alignItems=e.alignItems),e.flexWrap&&(t.flexWrap=e.flexWrap),e.gap!==void 0&&(t.gap=Z(e.gap)),e.bgcolor&&(t.backgroundColor=e.bgcolor),e.color&&(t.color=e.color),e.border&&(t.border=e.border),e.borderRadius!==void 0&&(t.borderRadius=typeof e.borderRadius==`number`?`${e.borderRadius}px`:e.borderRadius),e.width!==void 0&&(t.width=Z(e.width)),e.height!==void 0&&(t.height=Z(e.height)),e.minWidth!==void 0&&(t.minWidth=Z(e.minWidth)),e.minHeight!==void 0&&(t.minHeight=Z(e.minHeight)),e.maxWidth!==void 0&&(t.maxWidth=Z(e.maxWidth)),e.maxHeight!==void 0&&(t.maxHeight=Z(e.maxHeight)),t}function Q({component:e=`div`,children:t,className:n=``,p:r,pt:i,pr:a,pb:o,pl:s,px:c,py:l,m:u,mt:d,mr:f,mb:p,ml:m,mx:h,my:g,display:_,flexDirection:v,justifyContent:b,alignItems:x,flexWrap:S,gap:C,bgcolor:w,color:T,border:E,borderRadius:D,width:O,height:k,minWidth:A,minHeight:j,maxWidth:M,maxHeight:N,style:P={},...F}){return(0,y.jsx)(e,{className:ie({display:_,flexDirection:v,justifyContent:b,alignItems:x,flexWrap:S,gap:C}).concat(n).filter(Boolean).join(` `),style:{...ae({p:r,pt:i,pr:a,pb:o,pl:s,px:c,py:l,m:u,mt:d,mr:f,mb:p,ml:m,mx:h,my:g,display:_,flexDirection:v,justifyContent:b,alignItems:x,flexWrap:S,gap:C,bgcolor:w,color:T,border:E,borderRadius:D,width:O,height:k,minWidth:A,minHeight:j,maxWidth:M,maxHeight:N}),...P},...F,children:t})}function oe(e,t,n,r){let i=[...e];if(t&&i.length&&i[0].label!==`首页`&&i.unshift({label:`首页`,icon:n,href:`/`}),r>0&&i.length>r){let e=Math.max(1,r-2);i=[...i.slice(0,e),{label:`...`,disabled:!0,isEllipsis:!0},...i.slice(-1)]}return i}function se(e){return`wc-breadcrumb wc-breadcrumb--${e}`}function ce(e,t){let n=[`wc-breadcrumb-item`];return e===t-1&&n.push(`wc-breadcrumb-item--current`),n.join(` `)}function le(e){let t=[`wc-breadcrumb-link`];return e&&t.push(`wc-breadcrumb-link--disabled`),t.join(` `)}function ue(e,t,n,r,i){return t.disabled||t.isEllipsis||n===r-1?(e.preventDefault(),!1):(i&&i(e,t,n),!0)}function de(e,t,n,r){return e!==t-1&&!n&&!r}function fe({items:e=[],separator:n=`/`,variant:r=`default`,showHome:i=!1,homeIcon:a=`🏠`,maxItems:o=0,onItemClick:s}){let c=t.default.useMemo(()=>oe(e,i,a,o),[e,i,a,o]),l=(e,t,n)=>{ue(e,t,n,c.length,s)};return(0,y.jsx)(`nav`,{className:se(r),"aria-label":`面包屑导航`,role:`navigation`,children:(0,y.jsx)(`ol`,{className:`wc-breadcrumb-list`,children:c.map((e,t)=>(0,y.jsxs)(`li`,{className:ce(t,c.length),children:[de(t,c.length,e.disabled,e.isEllipsis)?e.href?(0,y.jsxs)(`a`,{href:e.href,className:le(e.disabled),onClick:n=>l(n,e,t),children:[e.icon&&(0,y.jsx)(`span`,{className:`wc-breadcrumb-icon`,dangerouslySetInnerHTML:{__html:e.icon}}),e.label]}):(0,y.jsxs)(`button`,{type:`button`,onClick:n=>l(n,e,t),className:le(e.disabled),children:[e.icon&&(0,y.jsx)(`span`,{className:`wc-breadcrumb-icon`,dangerouslySetInnerHTML:{__html:e.icon}}),e.label]}):(0,y.jsxs)(`span`,{className:le(!0),"aria-current":`page`,children:[e.icon&&(0,y.jsx)(`span`,{className:`wc-breadcrumb-icon`,dangerouslySetInnerHTML:{__html:e.icon}}),e.label]}),t<c.length-1&&(0,y.jsx)(`span`,{className:`wc-breadcrumb-separator`,children:n})]},t))})})}var pe=[`primary`,`secondary`,`filled`,`outlined`,`text`,`success`,`warning`,`error`,`info`,`purple`,`orange`,`cyan`,`pink`];function me(e){return pe.includes(e)}function he(e){return me(e)?e:`primary`}function ge(e){let{variant:t,size:n,disabled:r,loading:i,fullWidth:a,uppercase:o,rounded:s,buttonStyle:c=`filled`}=e,l=[`wc-btn`];return l.push(`wc-btn--style-${c}`),l.push(`wc-btn--${he(t)}`),l.push(`wc-btn--${n}`),(r||i)&&l.push(`wc-btn--disabled`),i&&l.push(`wc-btn--loading`),a&&l.push(`wc-btn--full-width`),o&&l.push(`wc-btn--uppercase`),s===!1||s===`none`?l.push(`wc-btn--rounded-none`):typeof s==`string`?l.push(`wc-btn--rounded-${s}`):l.push(`wc-btn--rounded`),l}function _e({event:e,disabled:t,loading:n,href:r,target:i,onClick:a}){!t&&!n&&(r&&window.open(r,i),a?.(e))}var ve=({children:e,variant:n=`primary`,buttonStyle:r=`filled`,size:i=`md`,disabled:a=!1,loading:o=!1,fullWidth:s=!1,type:c=`button`,href:l=null,target:u=`_self`,startIcon:d=null,endIcon:f=null,rounded:p=!0,uppercase:m=!1,ripple:h=!0,onClick:g,onMouseOver:_,onMouseOut:v,onFocus:b,onBlur:x,className:S=``,style:C={},...w})=>{let[T,E]=(0,t.useState)(!1),[D,O]=(0,t.useState)(!1),k=ge({variant:n,buttonStyle:r,size:i,disabled:a,loading:o,fullWidth:s,uppercase:m,rounded:p}).concat(S).filter(Boolean).join(` `),A={...C},j=e=>{_e({event:e,disabled:a,loading:o,href:l,target:u,onClick:g})},M=e=>{E(!0),_?.(e)},N=e=>{E(!1),v?.(e)},P=e=>{O(!0),b?.(e)},F=e=>{O(!1),x?.(e)},I=()=>(0,y.jsx)(`span`,{className:`wc-btn__loading`,children:(0,y.jsxs)(`svg`,{className:`animate-spin h-4 w-4`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,y.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,y.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]})});return(0,y.jsxs)(`button`,{className:k,disabled:a||o,type:c,style:A,onClick:j,onMouseOver:M,onMouseOut:N,onFocus:P,onBlur:F,...w,children:[o&&(0,y.jsx)(I,{}),d&&!o&&(0,y.jsx)(`span`,{className:`wc-btn__start-icon`,children:d}),(0,y.jsx)(`span`,{className:`wc-btn__content ${o?`opacity-0`:``}`,children:e}),f&&!o&&(0,y.jsx)(`span`,{className:`wc-btn__end-icon`,children:f})]})};ve.displayName=`Button`;var ye=({children:e,disableSpacing:t=!1,disablePadding:n=!1,justifyContent:r=`flex-start`,className:i=``,...a})=>(0,y.jsx)(`div`,{className:[`wc-card-actions`,`wc-flex`,`wc-items-center`,!n&&`wc-padding-2`,!t&&`wc-gap-2`,{"flex-start":`wc-justify-start`,center:`wc-justify-center`,"flex-end":`wc-justify-end`,"space-between":`wc-justify-between`,"space-around":`wc-justify-around`}[r],i].filter(Boolean).join(` `),...a,children:e});ye.displayName=`CardActions`;var be=({children:e,disablePadding:t=!1,padding:n=`normal`,className:r=``,...i})=>(0,y.jsx)(`div`,{className:[`wc-card-content`,!t&&{none:``,dense:`wc-padding-dense`,normal:`wc-padding-normal`,comfortable:`wc-padding-comfortable`}[n],r].filter(Boolean).join(` `),...i,children:e});be.displayName=`CardContent`;var xe=[`primary`,`secondary`,`success`,`warning`,`error`,`info`],Se=[`sm`,`md`,`lg`],Ce=({checked:e=!1,onChange:n,indeterminate:r=!1,disabled:i=!1,required:a=!1,size:o=`md`,color:s=`primary`,label:c=``,labelPlacement:l=`end`,value:u=!0,name:d,className:f=``,...p})=>{let m=(0,t.useId)(),[h,g]=(0,t.useState)(!1),_=xe.includes(s)?s:`primary`,v=Se.includes(o)?o:`md`,b=[`wc-checkbox`,`wc-checkbox--${v}`,(e||r)&&(r?`wc-checkbox--indeterminate`:`wc-checkbox--checked`),i&&`wc-checkbox--disabled`,h&&`wc-checkbox--focused`,l===`start`?`wc-checkbox--label-start`:`wc-checkbox--label-end`,f].filter(Boolean).join(` `),x=[`wc-checkbox__checkmark`,`wc-checkbox__checkmark--${_}`,`wc-checkbox__checkmark--${v}`,(e||r)&&`wc-checkbox__checkmark--checked`,r&&`wc-checkbox__checkmark--indeterminate`].filter(Boolean).join(` `),S=e=>{if(i)return;let t=e.target.checked;n?.({target:{name:d,value:u,checked:t},preventDefault:()=>{},stopPropagation:()=>{}})},C=r?(0,y.jsx)(`div`,{className:`indeterminate-icon`}):e?(0,y.jsx)(`svg`,{className:`checkmark-icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,children:(0,y.jsx)(`polyline`,{points:`20,6 9,17 4,12`})}):null,w=c?(0,y.jsx)(`span`,{className:`checkbox-label`,children:c}):null;return(0,y.jsxs)(`label`,{className:b,htmlFor:m,children:[l===`start`&&w,(0,y.jsx)(`input`,{id:m,type:`checkbox`,className:`wc-checkbox__input`,checked:e,disabled:i,required:a,value:u,name:d,"aria-checked":r?`mixed`:e,"aria-disabled":i,"aria-required":a,onChange:S,onFocus:()=>g(!0),onBlur:()=>g(!1),ref:e=>{e&&(e.indeterminate=r)},...p}),(0,y.jsx)(`span`,{className:x,children:C}),l===`end`&&w]})};Ce.displayName=`Checkbox`;function we(e){let{size:t=`md`,variant:n=`filled`,color:r=`default`,clickable:i=!1,disabled:a=!1,className:o=``}=e,s=[`wc-chip`];return s.push(`wc-chip--${t}`),s.push(`wc-chip--${n}`),s.push(`wc-chip--${r}`),i&&!a&&s.push(`wc-chip--clickable`),a&&s.push(`wc-chip--disabled`),o&&s.push(o),s.filter(Boolean).join(` `)}function Te(e,t,n,r){t&&!n&&r&&r(e)}function Ee(e,t,n){e.stopPropagation(),!t&&n&&n(e)}function De(){return`M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z`}function Oe(){return(0,y.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 20 20`,fill:`currentColor`,className:`w-4 h-4`,children:(0,y.jsx)(`path`,{fillRule:`evenodd`,d:De(),clipRule:`evenodd`})})}function ke({label:e=``,avatar:t=``,deletable:n=!1,disabled:r=!1,clickable:i=!1,variant:a=`filled`,size:o=`md`,color:s=`default`,deleteIcon:c=null,onClick:l,onDelete:u,children:d}){let f=we({size:o,variant:a,color:s,clickable:i,disabled:r});return(0,y.jsxs)(`div`,{className:f,onClick:e=>{Te(e,i,r,l)},children:[d&&d.avatar||t?(0,y.jsx)(`div`,{className:`wc-chip-avatar`,children:d&&d.avatar?d.avatar:(0,y.jsx)(`img`,{src:t,alt:``,className:`w-full h-full object-cover rounded-full`})}):null,(0,y.jsx)(`span`,{className:`wc-chip-label`,children:d?.label||e}),n&&(0,y.jsx)(`button`,{type:`button`,onClick:e=>{Ee(e,r,u)},className:`wc-chip-delete`,"aria-label":`删除`,children:c||Oe()})]})}function Ae(e,t){let n=typeof e==`string`?parseInt(e,10):e,r=n/2,i=(n-t)/2;return{sizeNumber:n,center:r,radius:i,circumference:2*Math.PI*i}}function je(e,t,n){return e===`determinate`?n-t/100*n:0}function Me(e){let{color:t=`primary`,variant:n=`indeterminate`,overlay:r=!1,centered:i=!1,inline:a=!1,className:o=``}=e,s=[`wc-circular-progress`,`inline-flex`,`relative`,`items-center`,`justify-center`];return s.push(`wc-circular-progress--${t}`),n===`indeterminate`&&s.push(`wc-circular-progress--indeterminate`),r&&s.push(`wc-circular-progress--overlay`),i&&s.push(`wc-circular-progress--centered`),a&&s.push(`wc-circular-progress--inline`),o&&s.push(o),s.filter(Boolean)}function Ne(e){let t=[`wc-circular-progress-circle`];return e===`indeterminate`&&t.push(`wc-circular-progress-circle--indeterminate`),t.filter(Boolean)}function Pe(e){return Math.round(e)}function Fe(e){let{value:t=0,variant:n}=e,r={role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100};return n===`determinate`&&(r[`aria-valuenow`]=t),r}function Ie({value:e=0,size:t=40,thickness:n=3.6,variant:r=`indeterminate`,color:i=`primary`,showValue:a=!1,overlay:o=!1,centered:s=!1,inline:c=!1,className:l=``,...u}){let{sizeNumber:d,center:f,radius:p,circumference:m}=Ae(t,n),h=je(r,e,m),g=Me({color:i,variant:r,overlay:o,centered:s,inline:c,className:l}).join(` `),_=Ne(r).join(` `);return(0,y.jsxs)(`div`,{className:g,...Fe({value:e,variant:r}),...u,children:[(0,y.jsxs)(`svg`,{width:d,height:d,viewBox:`0 0 ${d} ${d}`,className:`wc-circular-progress-svg`,children:[(0,y.jsx)(`circle`,{cx:f,cy:f,r:p,strokeWidth:n,stroke:`currentColor`,fill:`none`,className:`wc-circular-progress-bg`}),(0,y.jsx)(`circle`,{cx:f,cy:f,r:p,strokeWidth:n,stroke:`currentColor`,fill:`none`,strokeDasharray:m,strokeDashoffset:h,className:_})]}),a&&(0,y.jsxs)(`div`,{className:`wc-circular-progress-value`,children:[Pe(e),`%`]})]})}function Le(e){let{size:t=`md`,shape:n=`circle`,disabled:r=!1,className:i=``}=e,a=[`wc-color-picker`];return a.push(`wc-color-picker--${t}`),a.push(`wc-color-picker--${n}`),r&&a.push(`wc-color-picker--disabled`),i&&a.push(i),a.filter(Boolean)}function Re(e,t,n){!t&&n&&n(e.target.value)}function ze(e){return{backgroundColor:e}}function Be({value:e=`#ffffff`,onChange:t,size:n=`md`,shape:r=`circle`,disabled:i=!1,className:a=``}){let o=Le({size:n,shape:r,disabled:i,className:a}).join(` `),s=ze(e);return(0,y.jsxs)(`label`,{className:o,children:[(0,y.jsx)(`input`,{type:`color`,value:e,onChange:e=>{Re(e,i,t)},disabled:i,className:`wc-color-picker__input`}),(0,y.jsx)(`span`,{className:`wc-color-picker__preview`,style:s})]})}var Ve={xs:`max-w-xs`,sm:`max-w-sm`,md:`max-w-md`,lg:`max-w-4xl`,xl:`max-w-6xl`,"2xl":`max-w-7xl`};function He(e){let{maxWidth:t=`lg`,fluid:n=!1,fixed:r=!1,className:i=``}=e,a=[`mx-auto px-4 sm:px-6 lg:px-8`];return n||r?a.push(`w-full`):t&&Ve[t]&&a.push(Ve[t]),i&&a.push(i),a.filter(Boolean)}function Ue({maxWidth:e=`lg`,fluid:t=!1,fixed:n=!1,className:r=``,children:i}){return(0,y.jsx)(`div`,{className:He({maxWidth:e,fluid:t,fixed:n,className:r}).join(` `),children:i})}function We(e){let{variant:t=`default`,size:n=`md`,copied:r=!1,copyError:i=!1,className:a=``}=e,o=[`wc-copy`];return o.push(`wc-copy--${t}`),o.push(`wc-copy--${n}`),r&&o.push(`wc-copy--copied`),i&&o.push(`wc-copy--error`),a&&o.push(a),o.filter(Boolean)}function Ge(e,t){return t?`❌`:e?`✓`:`📋`}function Ke(e,t,n,r){return t?`错误`:e?r:n}function qe(e,t,n,r){return t?r:e?n:``}async function Je(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0;{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-999999px`,t.style.top=`-999999px`,document.body.appendChild(t),t.focus(),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}}catch(e){return console.warn(`复制失败:`,e),!1}}async function Ye(e,t,n,r,i,a,o,s){await Je(e)?(r(!0),i(!1),t(e)):(r(!1),i(!0),n(Error(`复制失败`))),o&&a&&(a(!0),setTimeout(()=>a(!1),1500)),setTimeout(()=>{r(!1),i(!1)},s)}function Xe(e,t){let n=`wc-copy-tooltip`;return e&&(n+=` wc-copy-tooltip--success`),t&&(n+=` wc-copy-tooltip--error`),n}function Ze({text:e,variant:n=`default`,size:r=`md`,showLabel:i=!0,showTooltip:a=!0,copyLabel:o=`复制`,copiedLabel:s=`已复制`,tooltipSuccess:c=`复制成功!`,tooltipError:l=`复制失败`,resetDelay:u=2e3,onCopy:d=()=>{},onError:f=()=>{},className:p=``,children:m,icon:h}){let[g,_]=(0,t.useState)(!1),[v,b]=(0,t.useState)(!1),[x,S]=(0,t.useState)(!1),C=We({variant:n,size:r,copied:g,copyError:v,className:p}).join(` `),w=Ge(g,v),T=Ke(g,v,o,s),E=qe(g,v,c,l),D=Xe(g,v);return(0,y.jsxs)(`div`,{className:C,onClick:async()=>{await Ye(e,d,f,_,b,S,a,u)},children:[m??(0,y.jsx)(`span`,{className:`wc-copy-text`,children:e}),(0,y.jsxs)(`div`,{className:`wc-copy-action`,children:[h?(0,y.jsx)(h,{className:`wc-copy-icon`}):(0,y.jsx)(`span`,{className:`wc-copy-icon`,dangerouslySetInnerHTML:{__html:w}}),i&&(0,y.jsx)(`span`,{className:`wc-copy-label`,children:T})]}),a&&x&&(0,y.jsx)(`div`,{className:D,children:E})]})}function Qe(e,t=`YYYY-MM-DD`){if(!e||!(e instanceof Date))return``;let n=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,`0`),i=String(e.getDate()).padStart(2,`0`);return t.replace(`YYYY`,n).replace(`MM`,r).replace(`DD`,i)}function $e(e){if(!e)return!1;let t=new Date;return e.toDateString()===t.toDateString()}function et(e,t){return!e||!t?!1:e.toDateString()===t.toDateString()}function tt(e){let t=e.getFullYear(),n=e.getMonth(),r=new Date(t,n,1),i=new Date(t,n+1,0),a=r.getDay(),o=i.getDate(),s=[],c=new Date(t,n-1,0);for(let e=a-1;e>=0;e--)s.push({day:c.getDate()-e,month:`prev`,date:new Date(t,n-1,c.getDate()-e)});for(let e=1;e<=o;e++)s.push({day:e,month:`current`,date:new Date(t,n,e)});let l=42-s.length;for(let e=1;e<=l;e++)s.push({day:e,month:`next`,date:new Date(t,n+1,e)});return s}function nt(e=`md`,t=`default`,n=!1,r=!1,i=!1){let a=[`wc-datepicker-wrapper`,`wc-datepicker-wrapper--${e}`,`wc-datepicker-wrapper--${t}`];return n&&a.push(`wc-datepicker-wrapper--disabled`),r&&a.push(`wc-datepicker-wrapper--focused`),i&&a.push(`wc-datepicker-wrapper--open`),a.join(` `)}function rt(e,t){let n=[`wc-datepicker-day`];return e.month===`prev`&&n.push(`wc-datepicker-day--prev`),e.month===`next`&&n.push(`wc-datepicker-day--next`),e.month===`current`&&n.push(`wc-datepicker-day--current`),t&&et(e.date,t)&&n.push(`wc-datepicker-day--selected`),$e(e.date)&&n.push(`wc-datepicker-day--today`),n.join(` `)}function it({value:e=null,onChange:n=()=>{},placeholder:r=`请选择日期`,disabled:i=!1,size:a=`md`,variant:o=`default`,format:s=`YYYY-MM-DD`,showToday:c=!0,minDate:l=null,maxDate:u=null,className:d=``,...f}){let p=(0,t.useRef)(null),[m,h]=(0,t.useState)(!1),[g,_]=(0,t.useState)(()=>e?new Date(e):new Date),[v,b]=(0,t.useState)(e?new Date(e):null);(0,t.useEffect)(()=>{b(e?new Date(e):null)},[e]),(0,t.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&h(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[]);let x=v?Qe(v,s):``,S=()=>{i||h(e=>!e)},C=e=>{_(t=>{let n=new Date(t);return n.setMonth(n.getMonth()+e),n})},w=e=>{if(D(e))return;let t=new Date(e.date);b(t),n(t),h(!1)},T=()=>{let e=new Date;b(e),n(e),h(!1)},E=()=>{b(null),n(null),h(!1)},D=e=>{let{date:t}=e;return!!(l&&t<(l instanceof Date?l:new Date(l))||u&&t>(u instanceof Date?u:new Date(u)))},O=tt(g),k=[`日`,`一`,`二`,`三`,`四`,`五`,`六`],A=`${g.getFullYear()}年${g.getMonth()+1}月`,j=[nt(a,o,i,!1,m),d].filter(Boolean).join(` `);return(0,y.jsxs)(`div`,{className:`wc-datepicker`,ref:p,...f,children:[(0,y.jsxs)(`div`,{className:j,onClick:S,children:[(0,y.jsx)(`input`,{type:`text`,className:`wc-datepicker-input`,value:x,placeholder:r,disabled:i,readOnly:!0}),(0,y.jsx)(`span`,{className:`wc-datepicker-icon`,children:`📅`})]}),m&&(0,y.jsxs)(`div`,{className:`wc-datepicker-dropdown`,style:{zIndex:1e3},children:[(0,y.jsxs)(`div`,{className:`wc-datepicker-header`,children:[(0,y.jsx)(`button`,{type:`button`,className:`wc-datepicker-nav`,onClick:()=>C(-1),children:`‹`}),(0,y.jsx)(`span`,{className:`wc-datepicker-title`,children:A}),(0,y.jsx)(`button`,{type:`button`,className:`wc-datepicker-nav`,onClick:()=>C(1),children:`›`})]}),(0,y.jsx)(`div`,{className:`wc-datepicker-weekdays`,children:k.map(e=>(0,y.jsx)(`div`,{className:`wc-datepicker-weekday`,children:e},e))}),(0,y.jsx)(`div`,{className:`wc-datepicker-days`,children:O.map(e=>(0,y.jsx)(`button`,{type:`button`,className:rt(e,v),disabled:D(e),onClick:()=>w(e),children:e.day},`${e.month}-${e.day}`))}),c&&(0,y.jsxs)(`div`,{className:`wc-datepicker-footer`,children:[(0,y.jsx)(`button`,{type:`button`,className:`wc-datepicker-today`,onClick:T,children:`今天`}),(0,y.jsx)(`button`,{type:`button`,className:`wc-datepicker-clear`,onClick:E,children:`清除`})]})]})]})}var at=({variant:e=`circular`,size:n=`md`,color:r=`primary`,disabled:i=!1,label:a=``,icon:o=``,children:s,onClick:c,onFocus:l,onBlur:u,className:d=``,style:f={},...p})=>{let[m,h]=(0,t.useState)(!1),g=[`circular`,`extended`],_=[`sm`,`md`,`lg`],v=[`primary`,`secondary`,`inherit`];g.includes(e)||console.warn(`Invalid variant "${e}" for Fab component. Valid variants are: ${g.join(`, `)}`),_.includes(n)||console.warn(`Invalid size "${n}" for Fab component. Valid sizes are: ${_.join(`, `)}`),v.includes(r)||console.warn(`Invalid color "${r}" for Fab component. Valid colors are: ${v.join(`, `)}`);let b=[`wc-fab`,`wc-fab--${e}`,`wc-fab--${n}`,`wc-fab--${r}`,i&&`wc-fab--disabled`,m&&`wc-fab--focused`,d].filter(Boolean).join(` `);return(0,y.jsxs)(`button`,{className:b,disabled:i,onClick:e=>{!i&&c&&c(e)},onFocus:e=>{h(!0),l?.(e)},onBlur:e=>{h(!1),u?.(e)},style:f,...p,children:[(o||s)&&(0,y.jsx)(`span`,{className:`fab-icon`,children:o?(0,y.jsx)(`span`,{dangerouslySetInnerHTML:{__html:o}}):s}),e===`extended`&&a&&(0,y.jsx)(`span`,{className:`fab-label`,children:a})]})};at.displayName=`Fab`;var ot=({item:e,showAvatar:t=!0,variant:n=`timeline`,color:r=`var(--wc-primary-500)`,dotSize:i=12,lineWidth:a=2,onItemClick:o})=>{let s=Array.isArray(e.children)&&e.children.length,c=typeof i==`number`?`${i}px`:i,l=typeof a==`number`?`${a}px`:a,u={"--feed-color":r,"--feed-dot-size":c,"--feed-line-width":l};return(0,y.jsxs)(`li`,{className:`wc-feed-item ${n} ${s?`has-children`:``}`,style:u,onClick:()=>o&&o(e),children:[t&&e.avatar&&(0,y.jsx)(`div`,{className:`wc-feed-avatar`,children:(0,y.jsx)(`img`,{src:e.avatar,alt:`avatar`})}),(0,y.jsxs)(`div`,{className:`wc-feed-content`,children:[(0,y.jsxs)(`div`,{className:`wc-feed-header`,children:[(0,y.jsx)(`strong`,{className:`wc-feed-author`,children:e.author}),(0,y.jsx)(`span`,{className:`wc-feed-time`,children:e.time})]}),(0,y.jsx)(`p`,{className:`wc-feed-text`,children:e.text}),s&&(0,y.jsx)(`ul`,{className:`wc-feed-children`,children:e.children.map(e=>(0,y.jsx)(ot,{item:e,showAvatar:t,variant:n,color:r,dotSize:i,lineWidth:a,onItemClick:o},e.id||e.time))})]})]})},st=({items:e=[],variant:t=`timeline`,showAvatar:n=!0,color:r=`var(--wc-primary-500)`,dotSize:i=12,lineWidth:a=2,onItemClick:o,className:s=``})=>{let c=typeof a==`number`?`${a}px`:a,l={"--feed-color":r,"--feed-line-width":c};return(0,y.jsx)(`ul`,{className:`wc-feed-list ${t} ${s}`,style:l,children:e.map(e=>(0,y.jsx)(ot,{item:e,variant:t,showAvatar:n,color:r,dotSize:i,lineWidth:a,onItemClick:o},e.id||e.time))})};st.displayName=`Feed`;var ct=({align:e,size:t,background:n,reverse:r,vertical:i,clickable:a,disabled:o,className:s,isDarkMode:c})=>[`wc-feature-card`,a&&`wc-feature-card--clickable`,o&&`wc-feature-card--disabled`,r&&`wc-feature-card--reverse`,i&&`wc-feature-card--vertical`,`wc-feature-card--${t}`,`wc-feature-card--${n}`,`wc-feature-card--${e}`,s,c&&`dark`].filter(Boolean);function lt(e,t){return[`wc-feature-icon`,`wc-feature-icon--${e}`,t&&`dark`].filter(Boolean)}function ut(e,t){return[`wc-feature-content`,`wc-feature-content--${e}`,t&&`dark`].filter(Boolean)}function dt(e,t){return[`wc-feature-title`,`wc-feature-title--${e}`,t&&`dark`].filter(Boolean)}var ft=(e,t)=>[`wc-feature-description`,`wc-feature-description--${e}`,t&&`dark`].filter(Boolean);function pt(e,t,n){!t&&n&&n(e)}function mt(e,t){e.stopPropagation(),t&&t(e)}function ht(e){return e}var gt=({title:e=`Awesome Feature`,description:t=`Feature description goes here.`,icon:n=``,iconSize:r=48,size:i=`md`,align:a=`left`,background:o=`default`,bgColor:s=``,reverse:c=!1,vertical:l=!1,ctaLabel:u=``,ctaHref:d=`#`,onClick:f,onCtaClick:p,children:m,className:h=``,style:g={},isDarkMode:_=!1})=>{let v=ct({align:a,size:i,background:o,reverse:c,vertical:l,clickable:!!f,disabled:!1,className:h}).join(` `),b=lt(r).join(` `),x=ut(a).join(` `),S=dt(i).join(` `),C=ft(i).join(` `),w={...s?{background:s}:{},...g};return(0,y.jsxs)(`div`,{className:`${v} ${_?`dark`:``}`,style:w,onClick:e=>pt(e,!1,f),children:[n&&(0,y.jsx)(`div`,{className:b,children:typeof n==`string`?(0,y.jsx)(`span`,{className:`wc-feature-icon__inner`,dangerouslySetInnerHTML:{__html:n}}):ht(n)}),(0,y.jsxs)(`div`,{className:x,children:[(0,y.jsx)(`h3`,{className:S,children:e}),(0,y.jsx)(`p`,{className:C,children:m||t}),u&&(0,y.jsx)(`a`,{href:d,className:`wc-feature-cta`,onClick:e=>mt(e,p),children:u})]})]})};gt.displayName=`Feature`;var _t=({multiple:e=!1,variant:n=`block`,accept:r=``,label:i=`选择文件`,onChange:a,onInvalid:o,className:s=``,style:c={}})=>{let l=(0,t.useRef)(null),u=e=>{if(!r)return!0;let t=r.split(`,`).map(e=>e.trim()),n=[...e].filter(e=>!t.some(t=>t.startsWith(`.`)?e.name.endsWith(t):e.type===t));return n.length?(o&&o(n),!1):!0},d=e=>{let t=e.target.files;u(t)&&a&&a(t)},f=e=>{e.preventDefault();let t=e.dataTransfer.files;u(t)&&a&&a(t)},p=()=>{l.current?.click()},m=()=>{switch(n){case`button`:return(0,y.jsx)(`span`,{className:`wc-file-button`,children:i});case`icon`:return(0,y.jsx)(`span`,{className:`wc-file-icon`,children:`⬆️`});default:return(0,y.jsx)(`strong`,{className:`wc-file-input-content__title`,children:i})}};return(0,y.jsxs)(`label`,{className:`wc-file-input-wrapper variant-${n} ${s}`,onDragOver:e=>e.preventDefault(),onDrop:f,onClick:n===`block`?void 0:p,children:[(0,y.jsx)(`input`,{ref:l,type:`file`,multiple:e,accept:r,style:{display:`none`},onChange:d}),n===`block`?(0,y.jsx)(`div`,{className:`wc-file-input-content`,children:m()}):m()]})};_t.displayName=`FileInput`;var vt=(0,t.createContext)(null),yt=({disabled:e=!1,error:n=!1,required:r=!1,variant:i=`outlined`,size:a=`md`,fullWidth:o=!1,margin:s=`normal`,className:c=``,style:l={},children:u,...d})=>{let f=(0,t.useMemo)(()=>({disabled:e,error:n,required:r,variant:i,size:a}),[e,n,r,i,a]),p=[`form-control`,o&&`form-control--full-width`,s===`dense`&&`form-control--margin-dense`,s===`normal`&&`form-control--margin-normal`,e&&`form-control--disabled`,n&&`form-control--error`,c].filter(Boolean).join(` `);return(0,y.jsx)(vt.Provider,{value:f,children:(0,y.jsx)(`div`,{className:p,style:l,...d,children:u})})};yt.displayName=`FormControl`;var bt=({label:e,labelPlacement:t=`end`,disabled:n=!1,required:r=!1,checked:i,value:a,className:o=``,style:s={},onChange:c,children:l,...u})=>{let d=e=>{n||c?.(e)},f=[`form-control-label`,t===`start`&&`form-control-label--placement-start`,t===`end`&&`form-control-label--placement-end`,t===`top`&&`form-control-label--placement-top`,t===`bottom`&&`form-control-label--placement-bottom`,n&&`form-control-label--disabled`,o].filter(Boolean).join(` `),p=[`form-control-label__text`,n&&`form-control-label__text--disabled`].filter(Boolean).join(` `);return(0,y.jsxs)(`label`,{className:f,onClick:d,style:s,...u,children:[t===`start`&&(0,y.jsxs)(`span`,{className:p,children:[e,r&&(0,y.jsx)(`span`,{className:`form-control-label__required`,children:`*`})]}),(0,y.jsx)(`span`,{className:`form-control-label__control`,children:l}),t!==`start`&&(0,y.jsxs)(`span`,{className:p,children:[e,r&&(0,y.jsx)(`span`,{className:`form-control-label__required`,children:`*`})]})]})};bt.displayName=`FormControlLabel`;var xt=({row:e=!1,spacing:t=`normal`,className:n=``,style:r={},children:i,...a})=>(0,y.jsx)(`div`,{className:[`form-group`,e&&`form-group--row`,t===`compact`&&`form-group--spacing-compact`,t===`comfortable`&&`form-group--spacing-comfortable`,n].filter(Boolean).join(` `),style:r,...a,children:i});xt.displayName=`FormGroup`;var St=({disabled:e=!1,error:n=!1,filled:r=!1,focused:i=!1,margin:a=`normal`,required:o=!1,variant:s=`outlined`,id:c,size:l=`md`,className:u=``,style:d={},children:f,...p})=>{let m=(0,t.useContext)(vt)||{},h=n||m.error,g=e||m.disabled;return(0,y.jsx)(`p`,{id:c,className:[`form-helper-text`,l===`sm`&&`form-helper-text--size-sm`,l===`lg`&&`form-helper-text--size-lg`,a===`dense`&&`form-helper-text--margin-dense`,a===`normal`&&`form-helper-text--margin-normal`,h&&`form-helper-text--error`,g&&`form-helper-text--disabled`,i&&`form-helper-text--focused`,u].filter(Boolean).join(` `),style:d,...p,children:f})};St.displayName=`FormHelperText`;var Ct=({container:e=!1,item:t=!1,xs:n,sm:r,md:i,lg:a,xl:o,spacing:s=0,direction:c=`row`,justifyContent:l=`flex-start`,alignItems:u=`stretch`,className:d=``,style:f={},children:p,...m})=>{let h=[];if(e&&(h.push(`flex`,`flex-wrap`),h.push({row:`flex-row`,column:`flex-col`,"row-reverse":`flex-row-reverse`,"column-reverse":`flex-col-reverse`}[c]),h.push({"flex-start":`justify-start`,center:`justify-center`,"flex-end":`justify-end`,"space-between":`justify-between`,"space-around":`justify-around`,"space-evenly":`justify-evenly`}[l]),h.push({"flex-start":`items-start`,center:`items-center`,"flex-end":`items-end`,stretch:`items-stretch`,baseline:`items-baseline`}[u]),s>0)){let e=s.toString();[`1`,`2`,`3`,`4`,`5`,`6`,`8`,`10`,`12`].includes(e)?h.push(`gap-${e}`):h.push(`gap-${Math.floor(s/4)}`)}return t&&(h.push(`flex-shrink-0`),Object.entries({xs:``,sm:`sm:`,md:`md:`,lg:`lg:`,xl:`xl:`}).forEach(([e,t])=>{let s={xs:n,sm:r,md:i,lg:a,xl:o}[e];if(s!==void 0)if(s===`auto`)h.push(`${t}flex-auto`);else if(s===!0)h.push(`${t}flex-1`);else{let e=Math.round(s/12*100);h.push(`${t}w-${e===100?`full`:e===50?`1/2`:e===25?`1/4`:e===75?`3/4`:`[${e}%]`}`)}})),(0,y.jsx)(`div`,{className:[...h,d].filter(Boolean).join(` `),style:f,...m,children:p})};Ct.displayName=`Grid`;var wt=({triggerText:e=`Hover me`,cardData:n={},variant:r=`default`,size:i=`md`,cardSize:a=`md`,position:o=`top`,delay:s=300,hideDelay:c=100,showArrow:l=!0,disabled:u=!1,onShow:d,onHide:f,onAction:p,className:m=``,style:h={},children:g,card:_,...v})=>{let[b,x]=(0,t.useState)(!1),S=(0,t.useRef)(null),C=(0,t.useRef)(null),w=(0,t.useRef)(null),T=(0,t.useRef)(`hover-card-${Math.random().toString(36).substr(2,9)}`),E=()=>{clearTimeout(S.current),clearTimeout(C.current)},D=()=>{u||(E(),S.current=setTimeout(()=>{x(!0),d?.()},s))},O=()=>{u||(E(),C.current=setTimeout(()=>{x(!1),f?.()},c))};(0,t.useEffect)(()=>()=>E(),[]);let k=e=>{p?.(e),e?.onClick?.()},A=[`hover-card-container`,`hover-card-${r}`,`hover-card-size-${i}`,u&&`hover-card-disabled`,m].filter(Boolean).join(` `),j=[`hover-card-popup`,`hover-card-position-${o}`,`hover-card-card-size-${a}`].join(` `);return(0,y.jsxs)(`div`,{className:A,onMouseEnter:D,onMouseLeave:O,onTouchStart:D,onTouchEnd:O,style:h,...v,children:[(0,y.jsx)(`span`,{className:`hover-card-trigger`,children:g||e}),b&&(0,y.jsxs)(`div`,{ref:w,className:j,style:{zIndex:1e3},role:`tooltip`,"aria-describedby":T.current,children:[l&&(0,y.jsx)(`div`,{className:`hover-card-arrow hover-card-arrow-${o}`}),(0,y.jsx)(`div`,{className:`hover-card-content`,children:_?typeof _==`function`?_(n):_:(0,y.jsxs)(y.Fragment,{children:[n.image&&(0,y.jsx)(`div`,{className:`hover-card-image`,children:(0,y.jsx)(`img`,{src:n.image,alt:n.imageAlt||n.title})}),(0,y.jsxs)(`div`,{className:`hover-card-body`,children:[n.title&&(0,y.jsx)(`h3`,{className:`hover-card-title`,children:n.title}),n.description&&(0,y.jsx)(`p`,{className:`hover-card-description`,children:n.description}),n.meta?.length&&(0,y.jsx)(`div`,{className:`hover-card-meta`,children:n.meta.map((e,t)=>(0,y.jsx)(`span`,{className:`hover-card-meta-item`,children:e},t))}),n.actions?.length&&(0,y.jsx)(`div`,{className:`hover-card-actions`,children:n.actions.map((e,t)=>(0,y.jsx)(`button`,{className:`hover-card-action-btn`,onClick:()=>k(e),children:e.label},t))})]})]})})]})]})};wt.displayName=`HoverCard`;var Tt=l((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),Et=l((e=>{process.env.NODE_ENV!==`production`&&(function(){"use strict";var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)}function x(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case l:case u:case i:case o:case a:case f:return p;default:var g=p&&p.$$typeof;switch(g){case c:case d:case h:case m:case s:return g;default:return t}}case r:return t}}}var S=l,C=u,w=c,T=s,E=n,D=d,O=i,k=h,A=m,j=r,M=o,N=a,P=f,F=!1;function I(e){return F||(F=!0,console.warn(`The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.`)),L(e)||x(e)===l}function L(e){return x(e)===u}function R(e){return x(e)===c}function z(e){return x(e)===s}function B(e){return typeof e==`object`&&!!e&&e.$$typeof===n}function V(e){return x(e)===d}function ee(e){return x(e)===i}function H(e){return x(e)===h}function U(e){return x(e)===m}function W(e){return x(e)===r}function G(e){return x(e)===o}function K(e){return x(e)===a}function q(e){return x(e)===f}e.AsyncMode=S,e.ConcurrentMode=C,e.ContextConsumer=w,e.ContextProvider=T,e.Element=E,e.ForwardRef=D,e.Fragment=O,e.Lazy=k,e.Memo=A,e.Portal=j,e.Profiler=M,e.StrictMode=N,e.Suspense=P,e.isAsyncMode=I,e.isConcurrentMode=L,e.isContextConsumer=R,e.isContextProvider=z,e.isElement=B,e.isForwardRef=V,e.isFragment=ee,e.isLazy=H,e.isMemo=U,e.isPortal=W,e.isProfiler=G,e.isStrictMode=K,e.isSuspense=q,e.isValidElementType=b,e.typeOf=x})()})),Dt=l(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=Tt():t.exports=Et()})),Ot=l(((e,t)=>{var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(e==null)throw TypeError(`Object.assign cannot be called with null or undefined`);return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String(`abc`);if(e[5]=`de`,Object.getOwnPropertyNames(e)[0]===`5`)return!1;for(var t={},n=0;n<10;n++)t[`_`+String.fromCharCode(n)]=n;if(Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(``)!==`0123456789`)return!1;var r={};return`abcdefghijklmnopqrst`.split(``).forEach(function(e){r[e]=e}),Object.keys(Object.assign({},r)).join(``)===`abcdefghijklmnopqrst`}catch{return!1}}t.exports=o()?Object.assign:function(e,t){for(var o,s=a(e),c,l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]),o)r.call(o,u)&&(s[u]=o[u]);if(n){c=n(o);for(var d=0;d<c.length;d++)i.call(o,c[d])&&(s[c[d]]=o[c[d]])}}return s}})),kt=l(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),At=l(((e,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)})),jt=l(((e,t)=>{var n=function(){};if(process.env.NODE_ENV!==`production`){var r=kt(),i={},a=At();n=function(e){var t=`Warning: `+e;typeof console<`u`&&console.error(t);try{throw Error(t)}catch{}}}function o(e,t,o,s,c){if(process.env.NODE_ENV!==`production`){for(var l in e)if(a(e,l)){var u;try{if(typeof e[l]!=`function`){var d=Error((s||`React class`)+`: `+o+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name=`Invariant Violation`,d}u=e[l](t,l,s,o,null,r)}catch(e){u=e}if(u&&!(u instanceof Error)&&n((s||`React class`)+`: type specification of `+o+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+`. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).`),u instanceof Error&&!(u.message in i)){i[u.message]=!0;var f=c?c():``;n(`Failed `+o+` type: `+u.message+(f??``))}}}}o.resetWarningCache=function(){process.env.NODE_ENV!==`production`&&(i={})},t.exports=o})),Mt=l(((e,t)=>{var n=Dt(),r=Ot(),i=kt(),a=At(),o=jt(),s=function(){};process.env.NODE_ENV!==`production`&&(s=function(e){var t=`Warning: `+e;typeof console<`u`&&console.error(t);try{throw Error(t)}catch{}});function c(){return null}t.exports=function(e,t){var l=typeof Symbol==`function`&&Symbol.iterator,u=`@@iterator`;function d(e){var t=e&&(l&&e[l]||e[u]);if(typeof t==`function`)return t}var f=`<<anonymous>>`,p={array:_(`array`),bigint:_(`bigint`),bool:_(`boolean`),func:_(`function`),number:_(`number`),object:_(`object`),string:_(`string`),symbol:_(`symbol`),any:v(),arrayOf:y,element:b(),elementType:x(),instanceOf:S,node:E(),objectOf:w,oneOf:C,oneOfType:T,shape:O,exact:k};function m(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}function h(e,t){this.message=e,this.data=t&&typeof t==`object`?t:{},this.stack=``}h.prototype=Error.prototype;function g(e){if(process.env.NODE_ENV!==`production`)var n={},r=0;function a(a,o,c,l,u,d,p){if(l||=f,d||=c,p!==i){if(t){var m=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name=`Invariant Violation`,m}else if(process.env.NODE_ENV!==`production`&&typeof console<`u`){var g=l+`:`+c;!n[g]&&r<3&&(s("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[g]=!0,r++)}}return o[c]==null?a?o[c]===null?new h(`The `+u+" `"+d+"` is marked as required "+("in `"+l+"`, but its value is `null`.")):new h(`The `+u+" `"+d+"` is marked as required in "+("`"+l+"`, but its value is `undefined`.")):null:e(o,c,l,u,d)}var o=a.bind(null,!1);return o.isRequired=a.bind(null,!0),o}function _(e){function t(t,n,r,i,a,o){var s=t[n];if(M(s)!==e){var c=N(s);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("`"+e+"`."),{expectedType:e})}return null}return g(t)}function v(){return g(c)}function y(e){function t(t,n,r,a,o){if(typeof e!=`function`)return new h("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){var c=M(s);return new h(`Invalid `+a+" `"+o+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<s.length;l++){var u=e(s,l,r,a,o+`[`+l+`]`,i);if(u instanceof Error)return u}return null}return g(t)}function b(){function t(t,n,r,i,a){var o=t[n];if(!e(o)){var s=M(o);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return g(t)}function x(){function e(e,t,r,i,a){var o=e[t];if(!n.isValidElementType(o)){var s=M(o);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement type."))}return null}return g(e)}function S(e){function t(t,n,r,i,a){if(!(t[n]instanceof e)){var o=e.name||f,s=F(t[n]);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+o+"`."))}return null}return g(t)}function C(e){if(!Array.isArray(e))return process.env.NODE_ENV!==`production`&&(arguments.length>1?s(`Invalid arguments supplied to oneOf, expected an array, got `+arguments.length+` arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).`):s(`Invalid argument supplied to oneOf, expected an array.`)),c;function t(t,n,r,i,a){for(var o=t[n],s=0;s<e.length;s++)if(m(o,e[s]))return null;var c=JSON.stringify(e,function(e,t){return N(t)===`symbol`?String(t):t});return new h(`Invalid `+i+" `"+a+"` of value `"+String(o)+"` "+("supplied to `"+r+"`, expected one of "+c+`.`))}return g(t)}function w(e){function t(t,n,r,o,s){if(typeof e!=`function`)return new h("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var c=t[n],l=M(c);if(l!==`object`)return new h(`Invalid `+o+" `"+s+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an object."));for(var u in c)if(a(c,u)){var d=e(c,u,r,o,s+`.`+u,i);if(d instanceof Error)return d}return null}return g(t)}function T(e){if(!Array.isArray(e))return process.env.NODE_ENV!==`production`&&s(`Invalid argument supplied to oneOfType, expected an instance of array.`),c;for(var t=0;t<e.length;t++){var n=e[t];if(typeof n!=`function`)return s(`Invalid argument supplied to oneOfType. Expected an array of check functions, but received `+P(n)+` at index `+t+`.`),c}function r(t,n,r,o,s){for(var c=[],l=0;l<e.length;l++){var u=e[l],d=u(t,n,r,o,s,i);if(d==null)return null;d.data&&a(d.data,`expectedType`)&&c.push(d.data.expectedType)}var f=c.length>0?`, expected one of type [`+c.join(`, `)+`]`:``;return new h(`Invalid `+o+" `"+s+"` supplied to "+("`"+r+"`"+f+`.`))}return g(r)}function E(){function e(e,t,n,r,i){return A(e[t])?null:new h(`Invalid `+r+" `"+i+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return g(e)}function D(e,t,n,r,i){return new h((e||`React class`)+`: `+t+" type `"+n+`.`+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function O(e){function t(t,n,r,a,o){var s=t[n],c=M(s);if(c!==`object`)return new h(`Invalid `+a+" `"+o+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));for(var l in e){var u=e[l];if(typeof u!=`function`)return D(r,a,o,l,N(u));var d=u(s,l,r,a,o+`.`+l,i);if(d)return d}return null}return g(t)}function k(e){function t(t,n,o,s,c){var l=t[n],u=M(l);if(u!==`object`)return new h(`Invalid `+s+" `"+c+"` of type `"+u+"` "+("supplied to `"+o+"`, expected `object`."));for(var d in r({},t[n],e)){var f=e[d];if(a(e,d)&&typeof f!=`function`)return D(o,s,c,d,N(f));if(!f)return new h(`Invalid `+s+" `"+c+"` key `"+d+"` supplied to `"+o+`\`.
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`react`),require(`react/jsx-runtime`),require(`react-dom`)):typeof define==`function`&&define.amd?define([`exports`,`react`,`react/jsx-runtime`,`react-dom`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.WatercolorReact={},e.React,e.ReactJSXRuntime,e.ReactDOM))})(this,function(e,t,n,r){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=s(t),c=0,u=i.length,d;c<u;c++)d=i[c],!l.call(e,d)&&d!==n&&a(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=o(t,d))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:i(c(e)),d(t||!e||!e.__esModule?a(n,`default`,{value:e,enumerable:!0}):n,e));t=f(t),r=f(r);var p=[`default`,`bordered`,`filled`];function m(e=`default`){return p.includes(e)?e:`default`}function h(e){return e?typeof e==`string`?e:Array.isArray(e)?e.filter(Boolean).join(` `):typeof e==`object`?Object.entries(e).filter(([,e])=>e).map(([e])=>e).join(` `):``:``}function g(e=`default`,t=``){let n=m(e),r=h(t);return[`wc-accordion`,n===`default`?``:`wc-accordion--${n}`,r].filter(Boolean).join(` `)}function _(e=[],t,n=!1){return n?e.includes(t)?e.filter(e=>e!==t):[...e,t]:e.includes(t)?[]:[t]}var v=({items:e=[],multiple:r=!1,variant:i=`default`,onToggle:a,className:o=``,style:s={},"aria-label":c,...l})=>{let[u,d]=(0,t.useState)([]),f=g(i,o),p=e=>{let t=_(u,e,r);d(t),a?.(e,t.includes(e))},m=e=>u.includes(e);return(0,n.jsx)(`div`,{className:f,style:s,role:`region`,"aria-label":c||`Accordion`,...l,children:e.map((e,t)=>(0,n.jsxs)(`div`,{className:`wc-accordion-item`,children:[(0,n.jsxs)(`button`,{className:`wc-accordion-header ${m(t)?`wc-accordion-header--active`:``}`,onClick:()=>p(t),type:`button`,children:[(0,n.jsx)(`span`,{className:`wc-accordion-title`,children:e.title}),(0,n.jsx)(`span`,{className:`wc-accordion-icon ${m(t)?`wc-accordion-icon--rotated`:``}`,children:(0,n.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,n.jsx)(`polyline`,{points:`6,9 12,15 18,9`})})})]}),(0,n.jsx)(`div`,{className:`wc-accordion-content ${m(t)?`wc-accordion-content--open`:``}`,style:{display:m(t)?void 0:`none`},children:(0,n.jsx)(`div`,{className:`wc-accordion-content-inner`,children:e.content})})]},t))})};v.displayName=`Accordion`;var y={success:`✓`,info:`ⓘ`,warning:`⚠`,error:`✕`};function b(e){return y[e]||y.info}function x(e,t){return[`wc-alert`,`wc-alert--${e}`,`wc-alert--${t}`]}function S({type:e=`info`,variant:r=`standard`,title:i=``,closable:a=!1,showIcon:o=!0,className:s=``,children:c,onClose:l=()=>{}}){let[u,d]=(0,t.useState)(!0);if(!u)return null;let f=()=>{d(!1),l()},p=x(e,r),m=b(e);return(0,n.jsxs)(`div`,{className:[...p,s].filter(Boolean).join(` `),role:`alert`,children:[o&&(0,n.jsx)(`div`,{className:`wc-alert-icon`,children:(0,n.jsx)(`span`,{children:m})}),(0,n.jsxs)(`div`,{className:`wc-alert-content`,children:[i&&(0,n.jsx)(`div`,{className:`wc-alert-title`,children:i}),(0,n.jsx)(`div`,{className:`wc-alert-message`,children:c})]}),a&&(0,n.jsx)(`button`,{type:`button`,className:`wc-alert-close`,"aria-label":`关闭`,onClick:f,children:`×`})]})}var C=({children:e,position:t=`fixed`,color:r=`default`,elevation:i=4,variant:a=`elevation`,className:o=``,style:s={},...c})=>(0,n.jsx)(`div`,{className:`wc-appbar wc-appbar--${t} wc-appbar--${r} wc-appbar--elevation-${i} wc-appbar--${a} ${o}`,style:s,...c,children:e}),w=({value:e=null,onChange:r,options:i=[],placeholder:a=`Type to search...`,label:o=``,helperText:s=``,error:c=!1,errorMessage:l=``,required:u=!1,disabled:d=!1,readonly:f=!1,multiple:p=!1,freeSolo:m=!1,clearable:h=!0,fullWidth:g=!1,size:_=`md`,variant:v=`outlined`,minSearchLength:y=0,noOptionsText:b=`No options found`,name:x=``,id:S=``,className:C=``,style:w={},onFocus:T,onBlur:E,onInputChange:D,filterOptions:O,renderOption:k,renderInput:A,getOptionLabel:j,getOptionValue:M,...N})=>{let[P,F]=(0,t.useState)(!1),[I,L]=(0,t.useState)(``),[R,z]=(0,t.useState)(-1),B=(0,t.useRef)(null),V=(0,t.useRef)(null),H=e=>e?typeof e==`object`?e.label||e.value||``:String(e):``,U=e=>e?typeof e==`object`?e.value===void 0?e:e.value:e:null,W=j||H,G=M||U;(0,t.useEffect)(()=>{!p&&e?L(W(e)):e||L(``)},[e,p]),(0,t.useEffect)(()=>{let e=e=>{B.current&&!B.current.contains(e.target)&&F(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]);let K=O?O(i,I):((e,t)=>!t||t.length<y?e:e.filter(e=>W(e).toLowerCase().includes(t.toLowerCase())))(i,I),q=t=>{let n=G(t);return p&&Array.isArray(e)?e.some(e=>G(e)===n):G(e)===n},J=()=>{let e=[`wc-autocomplete`];return g&&e.push(`wc-autocomplete--full-width`),e.concat(C).filter(Boolean).join(` `)},Y=()=>{let e=[`wc-autocomplete__label`];return e.push(`wc-autocomplete__label--${_}`),c&&e.push(`wc-autocomplete__label--error`),e.join(` `)},ee=()=>{let e=[`wc-autocomplete__container`];return e.push(`wc-autocomplete__container--${v}`),e.push(`wc-autocomplete__container--${_}`),d&&e.push(`wc-autocomplete__container--disabled`),c&&e.push(`wc-autocomplete__container--error`),P&&e.push(`wc-autocomplete__container--open`),e.join(` `)},te=(e,t)=>{let n=[`wc-autocomplete__option`];return q(e)&&n.push(`wc-autocomplete__option--selected`),t===R&&n.push(`wc-autocomplete__option--highlighted`),e.disabled&&n.push(`wc-autocomplete__option--disabled`),n.join(` `)},ne=e=>{F(!0),T?.(e)},X=e=>{setTimeout(()=>{F(!1),E?.(e)},200)},re=e=>{let t=e.target.value;L(t),F(!0),z(-1),D?.(t),m&&r?.({target:{name:x,value:t}})},ie=e=>{e.stopPropagation(),L(``),F(!1),z(-1),r?.({target:{name:x,value:p?[]:null}})},ae=t=>{if(t.disabled)return;let n=G(t),i;if(p){let r=Array.isArray(e)?[...e]:[],a=r.findIndex(e=>G(e)===n);a>-1?r.splice(a,1):r.push(t),i=r,L(``)}else i=t,L(W(t)),F(!1);z(-1),r?.({target:{name:x,value:i}})},oe=e=>{if(!P&&(e.key===`ArrowDown`||e.key===`ArrowUp`)){F(!0),e.preventDefault();return}if(!(!P||K.length===0))switch(e.key){case`ArrowDown`:e.preventDefault(),z(e=>Math.min(e+1,K.length-1));break;case`ArrowUp`:e.preventDefault(),z(e=>Math.max(e-1,0));break;case`Enter`:e.preventDefault(),R>=0&&R<K.length&&ae(K[R]);break;case`Escape`:F(!1),z(-1),V.current?.blur();break;default:break}},se=S||x||`autocomplete-${Math.random().toString(36).substr(2,9)}`;return(0,n.jsxs)(`div`,{className:J(),ref:B,style:w,children:[o&&(0,n.jsxs)(`label`,{htmlFor:se,className:Y(),children:[o,u&&(0,n.jsx)(`span`,{className:`wc-autocomplete__required`,children:`*`})]}),(0,n.jsxs)(`div`,{className:ee(),children:[A?A({id:se,value:I,onChange:re,onFocus:ne,onBlur:X,onKeyDown:oe,placeholder:a,disabled:d,readonly:f,ref:V}):(0,n.jsx)(`input`,{id:se,ref:V,type:`text`,className:`wc-autocomplete__input`,placeholder:a,value:I,onChange:re,onFocus:ne,onBlur:X,onKeyDown:oe,disabled:d,readOnly:f,autoComplete:`off`}),(0,n.jsxs)(`div`,{className:`wc-autocomplete__indicators`,children:[h&&I&&(0,n.jsx)(`button`,{type:`button`,className:`wc-autocomplete__clear`,onClick:ie,tabIndex:-1,children:(0,n.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,n.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,n.jsx)(`line`,{x1:`15`,y1:`9`,x2:`9`,y2:`15`}),(0,n.jsx)(`line`,{x1:`9`,y1:`9`,x2:`15`,y2:`15`})]})}),(0,n.jsx)(`div`,{className:`wc-autocomplete__arrow${P&&K.length>0?` wc-autocomplete__arrow--open`:``}`,children:(0,n.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,n.jsx)(`polyline`,{points:`6,9 12,15 18,9`})})})]})]}),P&&I.length>=y&&(0,n.jsx)(`div`,{className:`wc-autocomplete__dropdown`,children:K.length===0?(0,n.jsx)(`div`,{className:`wc-autocomplete__no-options`,children:b}):(0,n.jsx)(`div`,{className:`wc-autocomplete__options`,children:K.map((e,t)=>(0,n.jsxs)(`div`,{className:te(e,t),onClick:()=>ae(e),onMouseEnter:()=>z(t),children:[k?k(e,{selected:q(e)}):(0,n.jsx)(`span`,{className:`wc-autocomplete__option-text`,children:W(e)}),q(e)&&(0,n.jsx)(`svg`,{className:`wc-autocomplete__option-check`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,n.jsx)(`polyline`,{points:`20,6 9,17 4,12`})})]},G(e)||t))})}),(c||s)&&(0,n.jsx)(`div`,{children:c?(0,n.jsx)(`p`,{className:`wc-autocomplete__error`,children:l||c}):(0,n.jsx)(`p`,{className:`wc-autocomplete__helper`,children:s})})]})};w.displayName=`Autocomplete`;function T({size:e,variant:t,color:n,src:r,imgError:i}){let a=[`wc-avatar`];return typeof e==`string`&&a.push(`wc-avatar--${e}`),a.push(`wc-avatar--${t}`),(!r||i)&&a.push(`wc-avatar--${n}`),a}function E(e){let t={};return typeof e==`number`&&(t.width=`${e}px`,t.height=`${e}px`,t.fontSize=`${e*.4}px`),t}function D(e){if(!e)return``;let t=e.trim(),n=t.charAt(0);if(/[\u4e00-\u9fa5]/.test(n))return n;let r=t.split(/\s+/).filter(Boolean);return r.length===1?r[0].charAt(0).toUpperCase():(r[0].charAt(0)+r[1].charAt(0)).toUpperCase()}function O(e){e(!0)}function k(e){e(!1)}var A=({src:e=``,alt:r=``,size:i=`md`,variant:a=`circular`,color:o=`default`,children:s=``,className:c=``,...l})=>{let[u,d]=(0,t.useState)(!1),f=T({size:i,variant:a,color:o,src:e,imgError:u}).concat(c).filter(Boolean).join(` `),p=E(i),m=D(s),h=()=>O(d),g=()=>k(d);return(0,n.jsx)(`div`,{className:f,style:p,...l,children:e&&!u?(0,n.jsx)(`img`,{src:e,alt:r,role:`img`,onError:h,onLoad:g}):s?(0,n.jsx)(`span`,{className:`wc-avatar-text`,children:m}):null})};A.displayName=`Avatar`;var j=[`primary`,`secondary`,`success`,`warning`,`error`,`purple`,`orange`,`cyan`,`pink`];function M(e){return j.includes(e)}function N(e){return M(e)?e:`primary`}function P({variant:e,size:t,dot:n,className:r}){let i=[`wc-badge`,`wc-badge--${N(e)}`];return n?i.push(`wc-badge--dot-${t}`):i.push(`wc-badge--${t}`),r&&i.push(r),i.filter(Boolean).join(` `)}var F=({children:e,variant:t=`primary`,size:r=`md`,dot:i=!1,className:a=``,...o})=>(0,n.jsx)(`span`,{className:P({variant:t,size:r,dot:i,className:a}),...o,children:!i&&e});F.displayName=`Badge`;var I={success:`✓`,info:`📢`,warning:`⚠`,error:`✕`};function L(e,t,n){let r=[`wc-banner`,`wc-banner--${e}`,`wc-banner--${t}`];return n&&r.push(`wc-banner--sticky`),r.join(` `)}function R(e){return I[e]||I.info}function z(e){return{zIndex:e}}function B(e,t){e(!1),t&&t()}function V(e){e&&e()}function H({type:e=`info`,position:r=`top`,title:i=``,message:a=``,closable:o=!0,showIcon:s=!0,showDefaultAction:c=!1,actionText:l=`立即行动`,sticky:u=!0,zIndex:d=1e3,onClose:f,onAction:p,children:m}){let[h,g]=(0,t.useState)(!0);if(!h)return null;let _=L(e,r,u),v=z(d),y=R(e),b=()=>{B(g,f)},x=()=>{V(p)},S=m&&t.default.Children.count(m)>0;return(0,n.jsx)(`div`,{className:_,style:v,children:(0,n.jsxs)(`div`,{className:`wc-banner-content`,children:[s&&(0,n.jsx)(`div`,{className:`wc-banner-icon`,children:y}),(0,n.jsxs)(`div`,{className:`wc-banner-text`,children:[i&&(0,n.jsx)(`div`,{className:`wc-banner-title`,children:i}),(0,n.jsx)(`div`,{className:`wc-banner-message`,children:a})]}),(S||c)&&(0,n.jsx)(`div`,{className:`wc-banner-actions`,children:S?m:(0,n.jsx)(`button`,{onClick:x,className:`wc-banner-action-btn`,children:l})}),o&&(0,n.jsx)(`button`,{onClick:b,className:`wc-banner-close`,"aria-label":`关闭`,children:`×`})]})})}function U(e=``,t=`default`,n=!0,r=!0,i=`medium`,a=`default`){let o=[`wc-blockquote`];return t&&t!==`default`&&t!==`card`&&o.push(`wc-blockquote--${t}`),n&&o.push(`wc-blockquote--no-border`),r&&o.push(`wc-blockquote--interactive`),i&&i!==`medium`&&o.push(`wc-blockquote--${i}`),a&&a!==`default`&&o.push(`wc-blockquote--${a}`),e&&o.push(e),o.filter(Boolean).join(` `)}function W(e=``,t=`filled`,n=`default`,r=`medium`,i=!0,a=!0){let o=[`wc-card`];return t&&t!==`filled`&&o.push(`wc-card--${t}`),n&&n!==`default`&&o.push(`wc-card--${n}`),r&&r!==`medium`&&o.push(`wc-card--${r}`),i&&o.push(`wc-card--interactive`),a&&o.push(`wc-card--no-border`),e&&o.push(e),o.filter(Boolean).join(` `)}var G=({children:e,title:t=``,variant:r=`filled`,color:i=`default`,size:a=`medium`,interactive:o=!0,noBorder:s=!0,className:c=``,header:l=null,footer:u=null,style:d={},onClick:f,onMouseEnter:p,onMouseLeave:m,...h})=>{let g=W(c,r,i,a,o,s);return(0,n.jsxs)(`div`,{className:g,style:d,onClick:e=>{o&&f&&f(e)},onMouseEnter:p,onMouseLeave:m,role:f?`button`:void 0,tabIndex:f?0:void 0,...h,children:[l&&(0,n.jsx)(`div`,{className:`wc-card-header`,children:l}),t&&(0,n.jsx)(`div`,{className:`wc-card-header`,children:(0,n.jsx)(`h3`,{className:`wc-card__title`,children:t})}),(0,n.jsx)(`div`,{className:`wc-card-content`,children:e}),u&&(0,n.jsx)(`div`,{className:`wc-card-footer`,children:u})]})};G.displayName=`Card`;function K({cite:e=``,children:t,className:r=``,variant:i=`default`,noBorder:a=!0,interactive:o=!0,size:s=`medium`,color:c=`default`,...l}){return i===`card`?(0,n.jsxs)(G,{variant:`filled`,color:c,size:s,interactive:o,noBorder:a,className:r,...l,children:[(0,n.jsx)(`p`,{className:`quote-text`,children:t}),e&&(0,n.jsxs)(`footer`,{className:`quote-cite`,children:[`— `,e]})]}):(0,n.jsxs)(`blockquote`,{className:U(r,i,a,o,s,c),...l,children:[(0,n.jsx)(`p`,{className:`quote-text`,children:t}),e&&(0,n.jsxs)(`footer`,{className:`quote-cite`,children:[`— `,e]})]})}var q={0:`0`,1:`0.25rem`,2:`0.5rem`,3:`0.75rem`,4:`1rem`,5:`1.25rem`,6:`1.5rem`,8:`2rem`,10:`2.5rem`,12:`3rem`,16:`4rem`,20:`5rem`,24:`6rem`},J={flex:`flex`,block:`block`,inline:`inline`,"inline-block":`inline-block`,none:`hidden`,grid:`grid`},Y={row:`flex-row`,column:`flex-col`,"row-reverse":`flex-row-reverse`,"column-reverse":`flex-col-reverse`},ee={"flex-start":`justify-start`,center:`justify-center`,"flex-end":`justify-end`,"space-between":`justify-between`,"space-around":`justify-around`,"space-evenly":`justify-evenly`},te={"flex-start":`items-start`,center:`items-center`,"flex-end":`items-end`,stretch:`items-stretch`,baseline:`items-baseline`},ne={wrap:`flex-wrap`,nowrap:`flex-nowrap`,"wrap-reverse":`flex-wrap-reverse`};function X(e){return typeof e==`number`?`${e}px`:e}function re(e){let t=[];if(e.display&&J[e.display]&&t.push(J[e.display]),e.flexDirection&&Y[e.flexDirection]&&t.push(Y[e.flexDirection]),e.justifyContent&&ee[e.justifyContent]&&t.push(ee[e.justifyContent]),e.alignItems&&te[e.alignItems]&&t.push(te[e.alignItems]),e.flexWrap&&ne[e.flexWrap]&&t.push(ne[e.flexWrap]),e.gap!==void 0){let n=e.gap.toString();[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`8`,`10`,`12`,`16`,`20`,`24`].includes(n)&&t.push(`gap-${n}`)}return t}function ie(e){let t={};if(e.p!==void 0&&(t.padding=q[e.p]||X(e.p)),e.pt!==void 0&&(t.paddingTop=q[e.pt]||X(e.pt)),e.pr!==void 0&&(t.paddingRight=q[e.pr]||X(e.pr)),e.pb!==void 0&&(t.paddingBottom=q[e.pb]||X(e.pb)),e.pl!==void 0&&(t.paddingLeft=q[e.pl]||X(e.pl)),e.px!==void 0){let n=q[e.px]||X(e.px);t.paddingLeft=n,t.paddingRight=n}if(e.py!==void 0){let n=q[e.py]||X(e.py);t.paddingTop=n,t.paddingBottom=n}if(e.m!==void 0&&(t.margin=q[e.m]||X(e.m)),e.mt!==void 0&&(t.marginTop=q[e.mt]||X(e.mt)),e.mr!==void 0&&(t.marginRight=q[e.mr]||X(e.mr)),e.mb!==void 0&&(t.marginBottom=q[e.mb]||X(e.mb)),e.ml!==void 0&&(t.marginLeft=q[e.ml]||X(e.ml)),e.mx!==void 0){let n=q[e.mx]||X(e.mx);t.marginLeft=n,t.marginRight=n}if(e.my!==void 0){let n=q[e.my]||X(e.my);t.marginTop=n,t.marginBottom=n}return e.display&&(t.display=e.display),e.flexDirection&&(t.flexDirection=e.flexDirection),e.justifyContent&&(t.justifyContent=e.justifyContent),e.alignItems&&(t.alignItems=e.alignItems),e.flexWrap&&(t.flexWrap=e.flexWrap),e.gap!==void 0&&(t.gap=X(e.gap)),e.bgcolor&&(t.backgroundColor=e.bgcolor),e.color&&(t.color=e.color),e.border&&(t.border=e.border),e.borderRadius!==void 0&&(t.borderRadius=typeof e.borderRadius==`number`?`${e.borderRadius}px`:e.borderRadius),e.width!==void 0&&(t.width=X(e.width)),e.height!==void 0&&(t.height=X(e.height)),e.minWidth!==void 0&&(t.minWidth=X(e.minWidth)),e.minHeight!==void 0&&(t.minHeight=X(e.minHeight)),e.maxWidth!==void 0&&(t.maxWidth=X(e.maxWidth)),e.maxHeight!==void 0&&(t.maxHeight=X(e.maxHeight)),t}function ae({component:e=`div`,children:t,className:r=``,p:i,pt:a,pr:o,pb:s,pl:c,px:l,py:u,m:d,mt:f,mr:p,mb:m,ml:h,mx:g,my:_,display:v,flexDirection:y,justifyContent:b,alignItems:x,flexWrap:S,gap:C,bgcolor:w,color:T,border:E,borderRadius:D,width:O,height:k,minWidth:A,minHeight:j,maxWidth:M,maxHeight:N,style:P={},...F}){return(0,n.jsx)(e,{className:re({display:v,flexDirection:y,justifyContent:b,alignItems:x,flexWrap:S,gap:C}).concat(r).filter(Boolean).join(` `),style:{...ie({p:i,pt:a,pr:o,pb:s,pl:c,px:l,py:u,m:d,mt:f,mr:p,mb:m,ml:h,mx:g,my:_,display:v,flexDirection:y,justifyContent:b,alignItems:x,flexWrap:S,gap:C,bgcolor:w,color:T,border:E,borderRadius:D,width:O,height:k,minWidth:A,minHeight:j,maxWidth:M,maxHeight:N}),...P},...F,children:t})}function oe(e,t,n,r){let i=[...e];if(t&&i.length&&i[0].label!==`首页`&&i.unshift({label:`首页`,icon:n,href:`/`}),r>0&&i.length>r){let e=Math.max(1,r-2);i=[...i.slice(0,e),{label:`...`,disabled:!0,isEllipsis:!0},...i.slice(-1)]}return i}function se(e){return`wc-breadcrumb wc-breadcrumb--${e}`}function ce(e,t){let n=[`wc-breadcrumb-item`];return e===t-1&&n.push(`wc-breadcrumb-item--current`),n.join(` `)}function le(e){let t=[`wc-breadcrumb-link`];return e&&t.push(`wc-breadcrumb-link--disabled`),t.join(` `)}function ue(e,t,n,r,i){return t.disabled||t.isEllipsis||n===r-1?(e.preventDefault(),!1):(i&&i(e,t,n),!0)}function de(e,t,n,r){return e!==t-1&&!n&&!r}function fe({items:e=[],separator:r=`/`,variant:i=`default`,showHome:a=!1,homeIcon:o=`🏠`,maxItems:s=0,onItemClick:c}){let l=t.default.useMemo(()=>oe(e,a,o,s),[e,a,o,s]),u=(e,t,n)=>{ue(e,t,n,l.length,c)};return(0,n.jsx)(`nav`,{className:se(i),"aria-label":`面包屑导航`,role:`navigation`,children:(0,n.jsx)(`ol`,{className:`wc-breadcrumb-list`,children:l.map((e,t)=>(0,n.jsxs)(`li`,{className:ce(t,l.length),children:[de(t,l.length,e.disabled,e.isEllipsis)?e.href?(0,n.jsxs)(`a`,{href:e.href,className:le(e.disabled),onClick:n=>u(n,e,t),children:[e.icon&&(0,n.jsx)(`span`,{className:`wc-breadcrumb-icon`,dangerouslySetInnerHTML:{__html:e.icon}}),e.label]}):(0,n.jsxs)(`button`,{type:`button`,onClick:n=>u(n,e,t),className:le(e.disabled),children:[e.icon&&(0,n.jsx)(`span`,{className:`wc-breadcrumb-icon`,dangerouslySetInnerHTML:{__html:e.icon}}),e.label]}):(0,n.jsxs)(`span`,{className:le(!0),"aria-current":`page`,children:[e.icon&&(0,n.jsx)(`span`,{className:`wc-breadcrumb-icon`,dangerouslySetInnerHTML:{__html:e.icon}}),e.label]}),t<l.length-1&&(0,n.jsx)(`span`,{className:`wc-breadcrumb-separator`,children:r})]},t))})})}var pe=[`primary`,`secondary`,`filled`,`outlined`,`text`,`success`,`warning`,`error`,`info`,`purple`,`orange`,`cyan`,`pink`];function me(e){return pe.includes(e)}function he(e){return me(e)?e:`primary`}function ge(e){let{variant:t,size:n,disabled:r,loading:i,fullWidth:a,uppercase:o,rounded:s,buttonStyle:c=`filled`}=e,l=[`wc-btn`];return l.push(`wc-btn--style-${c}`),l.push(`wc-btn--${he(t)}`),l.push(`wc-btn--${n}`),(r||i)&&l.push(`wc-btn--disabled`),i&&l.push(`wc-btn--loading`),a&&l.push(`wc-btn--full-width`),o&&l.push(`wc-btn--uppercase`),s===!1||s===`none`?l.push(`wc-btn--rounded-none`):typeof s==`string`?l.push(`wc-btn--rounded-${s}`):l.push(`wc-btn--rounded`),l}function _e({event:e,disabled:t,loading:n,href:r,target:i,onClick:a}){!t&&!n&&(r&&window.open(r,i),a?.(e))}var ve=({children:e,variant:r=`primary`,buttonStyle:i=`filled`,size:a=`md`,disabled:o=!1,loading:s=!1,fullWidth:c=!1,type:l=`button`,href:u=null,target:d=`_self`,startIcon:f=null,endIcon:p=null,rounded:m=!0,uppercase:h=!1,ripple:g=!0,onClick:_,onMouseOver:v,onMouseOut:y,onFocus:b,onBlur:x,className:S=``,style:C={},...w})=>{let[T,E]=(0,t.useState)(!1),[D,O]=(0,t.useState)(!1),k=ge({variant:r,buttonStyle:i,size:a,disabled:o,loading:s,fullWidth:c,uppercase:h,rounded:m}).concat(S).filter(Boolean).join(` `),A={...C},j=e=>{_e({event:e,disabled:o,loading:s,href:u,target:d,onClick:_})},M=e=>{E(!0),v?.(e)},N=e=>{E(!1),y?.(e)},P=e=>{O(!0),b?.(e)},F=e=>{O(!1),x?.(e)},I=()=>(0,n.jsx)(`span`,{className:`wc-btn__loading`,children:(0,n.jsxs)(`svg`,{className:`animate-spin h-4 w-4`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,n.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,n.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]})});return(0,n.jsxs)(`button`,{className:k,disabled:o||s,type:l,style:A,onClick:j,onMouseOver:M,onMouseOut:N,onFocus:P,onBlur:F,...w,children:[s&&(0,n.jsx)(I,{}),f&&!s&&(0,n.jsx)(`span`,{className:`wc-btn__start-icon`,children:f}),(0,n.jsx)(`span`,{className:`wc-btn__content ${s?`opacity-0`:``}`,children:e}),p&&!s&&(0,n.jsx)(`span`,{className:`wc-btn__end-icon`,children:p})]})};ve.displayName=`Button`;var ye=({children:e,disableSpacing:t=!1,disablePadding:r=!1,justifyContent:i=`flex-start`,className:a=``,...o})=>(0,n.jsx)(`div`,{className:[`wc-card-actions`,`wc-flex`,`wc-items-center`,!r&&`wc-padding-2`,!t&&`wc-gap-2`,{"flex-start":`wc-justify-start`,center:`wc-justify-center`,"flex-end":`wc-justify-end`,"space-between":`wc-justify-between`,"space-around":`wc-justify-around`}[i],a].filter(Boolean).join(` `),...o,children:e});ye.displayName=`CardActions`;var be=({children:e,disablePadding:t=!1,padding:r=`normal`,className:i=``,...a})=>(0,n.jsx)(`div`,{className:[`wc-card-content`,!t&&{none:``,dense:`wc-padding-dense`,normal:`wc-padding-normal`,comfortable:`wc-padding-comfortable`}[r],i].filter(Boolean).join(` `),...a,children:e});be.displayName=`CardContent`;var xe=[`primary`,`secondary`,`success`,`warning`,`error`,`info`],Se=[`sm`,`md`,`lg`],Ce=({checked:e=!1,onChange:r,indeterminate:i=!1,disabled:a=!1,required:o=!1,size:s=`md`,color:c=`primary`,label:l=``,labelPlacement:u=`end`,value:d=!0,name:f,className:p=``,...m})=>{let h=(0,t.useId)(),[g,_]=(0,t.useState)(!1),v=xe.includes(c)?c:`primary`,y=Se.includes(s)?s:`md`,b=[`wc-checkbox`,`wc-checkbox--${y}`,(e||i)&&(i?`wc-checkbox--indeterminate`:`wc-checkbox--checked`),a&&`wc-checkbox--disabled`,g&&`wc-checkbox--focused`,u===`start`?`wc-checkbox--label-start`:`wc-checkbox--label-end`,p].filter(Boolean).join(` `),x=[`wc-checkbox__checkmark`,`wc-checkbox__checkmark--${v}`,`wc-checkbox__checkmark--${y}`,(e||i)&&`wc-checkbox__checkmark--checked`,i&&`wc-checkbox__checkmark--indeterminate`].filter(Boolean).join(` `),S=e=>{if(a)return;let t=e.target.checked;r?.({target:{name:f,value:d,checked:t},preventDefault:()=>{},stopPropagation:()=>{}})},C=i?(0,n.jsx)(`div`,{className:`indeterminate-icon`}):e?(0,n.jsx)(`svg`,{className:`checkmark-icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,children:(0,n.jsx)(`polyline`,{points:`20,6 9,17 4,12`})}):null,w=l?(0,n.jsx)(`span`,{className:`checkbox-label`,children:l}):null;return(0,n.jsxs)(`label`,{className:b,htmlFor:h,children:[u===`start`&&w,(0,n.jsx)(`input`,{id:h,type:`checkbox`,className:`wc-checkbox__input`,checked:e,disabled:a,required:o,value:d,name:f,"aria-checked":i?`mixed`:e,"aria-disabled":a,"aria-required":o,onChange:S,onFocus:()=>_(!0),onBlur:()=>_(!1),ref:e=>{e&&(e.indeterminate=i)},...m}),(0,n.jsx)(`span`,{className:x,children:C}),u===`end`&&w]})};Ce.displayName=`Checkbox`;function we(e){let{size:t=`md`,variant:n=`filled`,color:r=`default`,clickable:i=!1,disabled:a=!1,className:o=``}=e,s=[`wc-chip`];return s.push(`wc-chip--${t}`),s.push(`wc-chip--${n}`),s.push(`wc-chip--${r}`),i&&!a&&s.push(`wc-chip--clickable`),a&&s.push(`wc-chip--disabled`),o&&s.push(o),s.filter(Boolean).join(` `)}function Te(e,t,n,r){t&&!n&&r&&r(e)}function Ee(e,t,n){e.stopPropagation(),!t&&n&&n(e)}function De(){return`M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z`}function Oe(){return(0,n.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 20 20`,fill:`currentColor`,className:`w-4 h-4`,children:(0,n.jsx)(`path`,{fillRule:`evenodd`,d:De(),clipRule:`evenodd`})})}function ke({label:e=``,avatar:t=``,deletable:r=!1,disabled:i=!1,clickable:a=!1,variant:o=`filled`,size:s=`md`,color:c=`default`,deleteIcon:l=null,onClick:u,onDelete:d,children:f}){let p=we({size:s,variant:o,color:c,clickable:a,disabled:i});return(0,n.jsxs)(`div`,{className:p,onClick:e=>{Te(e,a,i,u)},children:[f&&f.avatar||t?(0,n.jsx)(`div`,{className:`wc-chip-avatar`,children:f&&f.avatar?f.avatar:(0,n.jsx)(`img`,{src:t,alt:``,className:`w-full h-full object-cover rounded-full`})}):null,(0,n.jsx)(`span`,{className:`wc-chip-label`,children:f?.label||e}),r&&(0,n.jsx)(`button`,{type:`button`,onClick:e=>{Ee(e,i,d)},className:`wc-chip-delete`,"aria-label":`删除`,children:l||Oe()})]})}function Ae(e,t){let n=typeof e==`string`?parseInt(e,10):e,r=n/2,i=(n-t)/2;return{sizeNumber:n,center:r,radius:i,circumference:2*Math.PI*i}}function je(e,t,n){return e===`determinate`?n-t/100*n:0}function Me(e){let{color:t=`primary`,variant:n=`indeterminate`,overlay:r=!1,centered:i=!1,inline:a=!1,className:o=``}=e,s=[`wc-circular-progress`,`inline-flex`,`relative`,`items-center`,`justify-center`];return s.push(`wc-circular-progress--${t}`),n===`indeterminate`&&s.push(`wc-circular-progress--indeterminate`),r&&s.push(`wc-circular-progress--overlay`),i&&s.push(`wc-circular-progress--centered`),a&&s.push(`wc-circular-progress--inline`),o&&s.push(o),s.filter(Boolean)}function Ne(e){let t=[`wc-circular-progress-circle`];return e===`indeterminate`&&t.push(`wc-circular-progress-circle--indeterminate`),t.filter(Boolean)}function Pe(e){return Math.round(e)}function Fe(e){let{value:t=0,variant:n}=e,r={role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100};return n===`determinate`&&(r[`aria-valuenow`]=t),r}function Ie({value:e=0,size:t=40,thickness:r=3.6,variant:i=`indeterminate`,color:a=`primary`,showValue:o=!1,overlay:s=!1,centered:c=!1,inline:l=!1,className:u=``,...d}){let{sizeNumber:f,center:p,radius:m,circumference:h}=Ae(t,r),g=je(i,e,h),_=Me({color:a,variant:i,overlay:s,centered:c,inline:l,className:u}).join(` `),v=Ne(i).join(` `);return(0,n.jsxs)(`div`,{className:_,...Fe({value:e,variant:i}),...d,children:[(0,n.jsxs)(`svg`,{width:f,height:f,viewBox:`0 0 ${f} ${f}`,className:`wc-circular-progress-svg`,children:[(0,n.jsx)(`circle`,{cx:p,cy:p,r:m,strokeWidth:r,stroke:`currentColor`,fill:`none`,className:`wc-circular-progress-bg`}),(0,n.jsx)(`circle`,{cx:p,cy:p,r:m,strokeWidth:r,stroke:`currentColor`,fill:`none`,strokeDasharray:h,strokeDashoffset:g,className:v})]}),o&&(0,n.jsxs)(`div`,{className:`wc-circular-progress-value`,children:[Pe(e),`%`]})]})}function Le(e){let{size:t=`md`,shape:n=`circle`,disabled:r=!1,className:i=``}=e,a=[`wc-color-picker`];return a.push(`wc-color-picker--${t}`),a.push(`wc-color-picker--${n}`),r&&a.push(`wc-color-picker--disabled`),i&&a.push(i),a.filter(Boolean)}function Re(e,t,n){!t&&n&&n(e.target.value)}function ze(e){return{backgroundColor:e}}function Be({value:e=`#ffffff`,onChange:t,size:r=`md`,shape:i=`circle`,disabled:a=!1,className:o=``}){let s=e??``,c=Le({size:r,shape:i,disabled:a,className:o}).join(` `),l=ze(s);return(0,n.jsxs)(`label`,{className:c,children:[(0,n.jsx)(`input`,{type:`color`,value:s,onChange:e=>{Re(e,a,t)},disabled:a,className:`wc-color-picker__input`}),(0,n.jsx)(`span`,{className:`wc-color-picker__preview`,style:l})]})}var Ve={xs:`max-w-xs`,sm:`max-w-sm`,md:`max-w-md`,lg:`max-w-4xl`,xl:`max-w-6xl`,"2xl":`max-w-7xl`};function He(e){let{maxWidth:t=`lg`,fluid:n=!1,fixed:r=!1,className:i=``}=e,a=[`mx-auto px-4 sm:px-6 lg:px-8`];return n||r?a.push(`w-full`):t&&Ve[t]&&a.push(Ve[t]),i&&a.push(i),a.filter(Boolean)}function Ue({maxWidth:e=`lg`,fluid:t=!1,fixed:r=!1,className:i=``,children:a}){return(0,n.jsx)(`div`,{className:He({maxWidth:e,fluid:t,fixed:r,className:i}).join(` `),children:a})}function We(e){let{variant:t=`default`,size:n=`md`,copied:r=!1,copyError:i=!1,className:a=``}=e,o=[`wc-copy`];return o.push(`wc-copy--${t}`),o.push(`wc-copy--${n}`),r&&o.push(`wc-copy--copied`),i&&o.push(`wc-copy--error`),a&&o.push(a),o.filter(Boolean)}function Ge(e,t){return t?`❌`:e?`✓`:`📋`}function Ke(e,t,n,r){return t?`错误`:e?r:n}function qe(e,t,n,r){return t?r:e?n:``}async function Je(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0;{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-999999px`,t.style.top=`-999999px`,document.body.appendChild(t),t.focus(),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}}catch(e){return console.warn(`复制失败:`,e),!1}}async function Ye(e,t,n,r,i,a,o,s){await Je(e)?(r(!0),i(!1),t(e)):(r(!1),i(!0),n(Error(`复制失败`))),o&&a&&(a(!0),setTimeout(()=>a(!1),1500)),setTimeout(()=>{r(!1),i(!1)},s)}function Xe(e,t){let n=`wc-copy-tooltip`;return e&&(n+=` wc-copy-tooltip--success`),t&&(n+=` wc-copy-tooltip--error`),n}function Ze({text:e,variant:r=`default`,size:i=`md`,showLabel:a=!0,showTooltip:o=!0,copyLabel:s=`复制`,copiedLabel:c=`已复制`,tooltipSuccess:l=`复制成功!`,tooltipError:u=`复制失败`,resetDelay:d=2e3,onCopy:f=()=>{},onError:p=()=>{},className:m=``,children:h,icon:g}){let[_,v]=(0,t.useState)(!1),[y,b]=(0,t.useState)(!1),[x,S]=(0,t.useState)(!1),C=We({variant:r,size:i,copied:_,copyError:y,className:m}).join(` `),w=Ge(_,y),T=Ke(_,y,s,c),E=qe(_,y,l,u),D=Xe(_,y);return(0,n.jsxs)(`div`,{className:C,onClick:async()=>{await Ye(e,f,p,v,b,S,o,d)},children:[h??(0,n.jsx)(`span`,{className:`wc-copy-text`,children:e}),(0,n.jsxs)(`div`,{className:`wc-copy-action`,children:[g?(0,n.jsx)(g,{className:`wc-copy-icon`}):(0,n.jsx)(`span`,{className:`wc-copy-icon`,dangerouslySetInnerHTML:{__html:w}}),a&&(0,n.jsx)(`span`,{className:`wc-copy-label`,children:T})]}),o&&x&&(0,n.jsx)(`div`,{className:D,children:E})]})}function Qe(e,t=`YYYY-MM-DD`){if(!e||!(e instanceof Date))return``;let n=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,`0`),i=String(e.getDate()).padStart(2,`0`);return t.replace(`YYYY`,n).replace(`MM`,r).replace(`DD`,i)}function $e(e){if(!e)return!1;let t=new Date;return e.toDateString()===t.toDateString()}function et(e,t){return!e||!t?!1:e.toDateString()===t.toDateString()}function tt(e){let t=e.getFullYear(),n=e.getMonth(),r=new Date(t,n,1),i=new Date(t,n+1,0),a=r.getDay(),o=i.getDate(),s=[],c=new Date(t,n-1,0);for(let e=a-1;e>=0;e--)s.push({day:c.getDate()-e,month:`prev`,date:new Date(t,n-1,c.getDate()-e)});for(let e=1;e<=o;e++)s.push({day:e,month:`current`,date:new Date(t,n,e)});let l=42-s.length;for(let e=1;e<=l;e++)s.push({day:e,month:`next`,date:new Date(t,n+1,e)});return s}function nt(e=`md`,t=`default`,n=!1,r=!1,i=!1){let a=[`wc-datepicker-wrapper`,`wc-datepicker-wrapper--${e}`,`wc-datepicker-wrapper--${t}`];return n&&a.push(`wc-datepicker-wrapper--disabled`),r&&a.push(`wc-datepicker-wrapper--focused`),i&&a.push(`wc-datepicker-wrapper--open`),a.join(` `)}function rt(e,t){let n=[`wc-datepicker-day`];return e.month===`prev`&&n.push(`wc-datepicker-day--prev`),e.month===`next`&&n.push(`wc-datepicker-day--next`),e.month===`current`&&n.push(`wc-datepicker-day--current`),t&&et(e.date,t)&&n.push(`wc-datepicker-day--selected`),$e(e.date)&&n.push(`wc-datepicker-day--today`),n.join(` `)}function it({value:e=null,onChange:r=()=>{},placeholder:i=`请选择日期`,disabled:a=!1,size:o=`md`,variant:s=`default`,format:c=`YYYY-MM-DD`,showToday:l=!0,minDate:u=null,maxDate:d=null,className:f=``,...p}){let m=(0,t.useRef)(null),[h,g]=(0,t.useState)(!1),[_,v]=(0,t.useState)(()=>e?new Date(e):new Date),[y,b]=(0,t.useState)(e?new Date(e):null);(0,t.useEffect)(()=>{b(e?new Date(e):null)},[e]),(0,t.useEffect)(()=>{let e=e=>{m.current&&!m.current.contains(e.target)&&g(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[]);let x=y?Qe(y,c):``,S=()=>{a||g(e=>!e)},C=e=>{v(t=>{let n=new Date(t);return n.setMonth(n.getMonth()+e),n})},w=e=>{if(D(e))return;let t=new Date(e.date);b(t),r(t),g(!1)},T=()=>{let e=new Date;b(e),r(e),g(!1)},E=()=>{b(null),r(null),g(!1)},D=e=>{let{date:t}=e;return!!(u&&t<(u instanceof Date?u:new Date(u))||d&&t>(d instanceof Date?d:new Date(d)))},O=tt(_),k=[`日`,`一`,`二`,`三`,`四`,`五`,`六`],A=`${_.getFullYear()}年${_.getMonth()+1}月`,j=[nt(o,s,a,!1,h),f].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:`wc-datepicker`,ref:m,...p,children:[(0,n.jsxs)(`div`,{className:j,onClick:S,children:[(0,n.jsx)(`input`,{type:`text`,className:`wc-datepicker-input`,value:x,placeholder:i,disabled:a,readOnly:!0}),(0,n.jsx)(`span`,{className:`wc-datepicker-icon`,children:`📅`})]}),h&&(0,n.jsxs)(`div`,{className:`wc-datepicker-dropdown`,style:{zIndex:1e3},children:[(0,n.jsxs)(`div`,{className:`wc-datepicker-header`,children:[(0,n.jsx)(`button`,{type:`button`,className:`wc-datepicker-nav`,onClick:()=>C(-1),children:`‹`}),(0,n.jsx)(`span`,{className:`wc-datepicker-title`,children:A}),(0,n.jsx)(`button`,{type:`button`,className:`wc-datepicker-nav`,onClick:()=>C(1),children:`›`})]}),(0,n.jsx)(`div`,{className:`wc-datepicker-weekdays`,children:k.map(e=>(0,n.jsx)(`div`,{className:`wc-datepicker-weekday`,children:e},e))}),(0,n.jsx)(`div`,{className:`wc-datepicker-days`,children:O.map(e=>(0,n.jsx)(`button`,{type:`button`,className:rt(e,y),disabled:D(e),onClick:()=>w(e),children:e.day},`${e.month}-${e.day}`))}),l&&(0,n.jsxs)(`div`,{className:`wc-datepicker-footer`,children:[(0,n.jsx)(`button`,{type:`button`,className:`wc-datepicker-today`,onClick:T,children:`今天`}),(0,n.jsx)(`button`,{type:`button`,className:`wc-datepicker-clear`,onClick:E,children:`清除`})]})]})]})}var at=({variant:e=`circular`,size:r=`md`,color:i=`primary`,disabled:a=!1,label:o=``,icon:s=``,children:c,onClick:l,onFocus:u,onBlur:d,className:f=``,style:p={},...m})=>{let[h,g]=(0,t.useState)(!1),_=[`circular`,`extended`],v=[`sm`,`md`,`lg`],y=[`primary`,`secondary`,`inherit`];_.includes(e)||console.warn(`Invalid variant "${e}" for Fab component. Valid variants are: ${_.join(`, `)}`),v.includes(r)||console.warn(`Invalid size "${r}" for Fab component. Valid sizes are: ${v.join(`, `)}`),y.includes(i)||console.warn(`Invalid color "${i}" for Fab component. Valid colors are: ${y.join(`, `)}`);let b=[`wc-fab`,`wc-fab--${e}`,`wc-fab--${r}`,`wc-fab--${i}`,a&&`wc-fab--disabled`,h&&`wc-fab--focused`,f].filter(Boolean).join(` `);return(0,n.jsxs)(`button`,{className:b,disabled:a,onClick:e=>{!a&&l&&l(e)},onFocus:e=>{g(!0),u?.(e)},onBlur:e=>{g(!1),d?.(e)},style:p,...m,children:[(s||c)&&(0,n.jsx)(`span`,{className:`fab-icon`,children:s?(0,n.jsx)(`span`,{dangerouslySetInnerHTML:{__html:s}}):c}),e===`extended`&&o&&(0,n.jsx)(`span`,{className:`fab-label`,children:o})]})};at.displayName=`Fab`;var ot=({item:e,showAvatar:t=!0,variant:r=`timeline`,color:i=`var(--wc-primary-500)`,dotSize:a=12,lineWidth:o=2,onItemClick:s})=>{let c=Array.isArray(e.children)&&e.children.length,l=typeof a==`number`?`${a}px`:a,u=typeof o==`number`?`${o}px`:o,d={"--feed-color":i,"--feed-dot-size":l,"--feed-line-width":u};return(0,n.jsxs)(`li`,{className:`wc-feed-item ${r} ${c?`has-children`:``}`,style:d,onClick:()=>s&&s(e),children:[t&&e.avatar&&(0,n.jsx)(`div`,{className:`wc-feed-avatar`,children:(0,n.jsx)(`img`,{src:e.avatar,alt:`avatar`})}),(0,n.jsxs)(`div`,{className:`wc-feed-content`,children:[(0,n.jsxs)(`div`,{className:`wc-feed-header`,children:[(0,n.jsx)(`strong`,{className:`wc-feed-author`,children:e.author}),(0,n.jsx)(`span`,{className:`wc-feed-time`,children:e.time})]}),(0,n.jsx)(`p`,{className:`wc-feed-text`,children:e.text}),c&&(0,n.jsx)(`ul`,{className:`wc-feed-children`,children:e.children.map(e=>(0,n.jsx)(ot,{item:e,showAvatar:t,variant:r,color:i,dotSize:a,lineWidth:o,onItemClick:s},e.id||e.time))})]})]})},st=({items:e=[],variant:t=`timeline`,showAvatar:r=!0,color:i=`var(--wc-primary-500)`,dotSize:a=12,lineWidth:o=2,onItemClick:s,className:c=``})=>{let l=typeof o==`number`?`${o}px`:o,u={"--feed-color":i,"--feed-line-width":l};return(0,n.jsx)(`ul`,{className:`wc-feed-list ${t} ${c}`,style:u,children:e.map(e=>(0,n.jsx)(ot,{item:e,variant:t,showAvatar:r,color:i,dotSize:a,lineWidth:o,onItemClick:s},e.id||e.time))})};st.displayName=`Feed`;var ct=({align:e,size:t,background:n,reverse:r,vertical:i,clickable:a,disabled:o,className:s,isDarkMode:c})=>[`wc-feature-card`,a&&`wc-feature-card--clickable`,o&&`wc-feature-card--disabled`,r&&`wc-feature-card--reverse`,i&&`wc-feature-card--vertical`,`wc-feature-card--${t}`,`wc-feature-card--${n}`,`wc-feature-card--${e}`,s,c&&`dark`].filter(Boolean);function lt(e,t){return[`wc-feature-icon`,`wc-feature-icon--${e}`,t&&`dark`].filter(Boolean)}function ut(e,t){return[`wc-feature-content`,`wc-feature-content--${e}`,t&&`dark`].filter(Boolean)}function dt(e,t){return[`wc-feature-title`,`wc-feature-title--${e}`,t&&`dark`].filter(Boolean)}var ft=(e,t)=>[`wc-feature-description`,`wc-feature-description--${e}`,t&&`dark`].filter(Boolean);function pt(e,t,n){!t&&n&&n(e)}function mt(e,t){e.stopPropagation(),t&&t(e)}function ht(e){return e}var gt=({title:e=`Awesome Feature`,description:t=`Feature description goes here.`,icon:r=``,iconSize:i=48,size:a=`md`,align:o=`left`,background:s=`default`,bgColor:c=``,reverse:l=!1,vertical:u=!1,ctaLabel:d=``,ctaHref:f=`#`,onClick:p,onCtaClick:m,children:h,className:g=``,style:_={},isDarkMode:v=!1})=>{let y=ct({align:o,size:a,background:s,reverse:l,vertical:u,clickable:!!p,disabled:!1,className:g}).join(` `),b=lt(i).join(` `),x=ut(o).join(` `),S=dt(a).join(` `),C=ft(a).join(` `),w={...c?{background:c}:{},..._};return(0,n.jsxs)(`div`,{className:`${y} ${v?`dark`:``}`,style:w,onClick:e=>pt(e,!1,p),children:[r&&(0,n.jsx)(`div`,{className:b,children:typeof r==`string`?(0,n.jsx)(`span`,{className:`wc-feature-icon__inner`,dangerouslySetInnerHTML:{__html:r}}):ht(r)}),(0,n.jsxs)(`div`,{className:x,children:[(0,n.jsx)(`h3`,{className:S,children:e}),(0,n.jsx)(`p`,{className:C,children:h||t}),d&&(0,n.jsx)(`a`,{href:f,className:`wc-feature-cta`,onClick:e=>mt(e,m),children:d})]})]})};gt.displayName=`Feature`;var _t=({multiple:e=!1,variant:r=`block`,accept:i=``,label:a=`选择文件`,onChange:o,onInvalid:s,className:c=``,style:l={}})=>{let u=(0,t.useRef)(null),d=e=>{if(!i)return!0;let t=i.split(`,`).map(e=>e.trim()),n=[...e].filter(e=>!t.some(t=>t.startsWith(`.`)?e.name.endsWith(t):e.type===t));return n.length?(s&&s(n),!1):!0},f=e=>{let t=e.target.files;d(t)&&o&&o(t)},p=e=>{e.preventDefault();let t=e.dataTransfer.files;d(t)&&o&&o(t)},m=()=>{u.current?.click()},h=()=>{switch(r){case`button`:return(0,n.jsx)(`span`,{className:`wc-file-button`,children:a});case`icon`:return(0,n.jsx)(`span`,{className:`wc-file-icon`,children:`⬆️`});default:return(0,n.jsx)(`strong`,{className:`wc-file-input-content__title`,children:a})}};return(0,n.jsxs)(`label`,{className:`wc-file-input-wrapper variant-${r} ${c}`,onDragOver:e=>e.preventDefault(),onDrop:p,onClick:r===`block`?void 0:m,children:[(0,n.jsx)(`input`,{ref:u,type:`file`,multiple:e,accept:i,style:{display:`none`},onChange:f}),r===`block`?(0,n.jsx)(`div`,{className:`wc-file-input-content`,children:h()}):h()]})};_t.displayName=`FileInput`;var vt=(0,t.createContext)(null),yt=({disabled:e=!1,error:r=!1,required:i=!1,variant:a=`outlined`,size:o=`md`,fullWidth:s=!1,margin:c=`normal`,className:l=``,style:u={},children:d,...f})=>{let p=(0,t.useMemo)(()=>({disabled:e,error:r,required:i,variant:a,size:o}),[e,r,i,a,o]),m=[`form-control`,s&&`form-control--full-width`,c===`dense`&&`form-control--margin-dense`,c===`normal`&&`form-control--margin-normal`,e&&`form-control--disabled`,r&&`form-control--error`,l].filter(Boolean).join(` `);return(0,n.jsx)(vt.Provider,{value:p,children:(0,n.jsx)(`div`,{className:m,style:u,...f,children:d})})};yt.displayName=`FormControl`;var bt=({label:e,labelPlacement:t=`end`,disabled:r=!1,required:i=!1,checked:a,value:o,className:s=``,style:c={},onChange:l,children:u,...d})=>{let f=e=>{r||l?.(e)},p=[`form-control-label`,t===`start`&&`form-control-label--placement-start`,t===`end`&&`form-control-label--placement-end`,t===`top`&&`form-control-label--placement-top`,t===`bottom`&&`form-control-label--placement-bottom`,r&&`form-control-label--disabled`,s].filter(Boolean).join(` `),m=[`form-control-label__text`,r&&`form-control-label__text--disabled`].filter(Boolean).join(` `);return(0,n.jsxs)(`label`,{className:p,onClick:f,style:c,...d,children:[t===`start`&&(0,n.jsxs)(`span`,{className:m,children:[e,i&&(0,n.jsx)(`span`,{className:`form-control-label__required`,children:`*`})]}),(0,n.jsx)(`span`,{className:`form-control-label__control`,children:u}),t!==`start`&&(0,n.jsxs)(`span`,{className:m,children:[e,i&&(0,n.jsx)(`span`,{className:`form-control-label__required`,children:`*`})]})]})};bt.displayName=`FormControlLabel`;var xt=({row:e=!1,spacing:t=`normal`,className:r=``,style:i={},children:a,...o})=>(0,n.jsx)(`div`,{className:[`form-group`,e&&`form-group--row`,t===`compact`&&`form-group--spacing-compact`,t===`comfortable`&&`form-group--spacing-comfortable`,r].filter(Boolean).join(` `),style:i,...o,children:a});xt.displayName=`FormGroup`;var St=({disabled:e=!1,error:r=!1,filled:i=!1,focused:a=!1,margin:o=`normal`,required:s=!1,variant:c=`outlined`,id:l,size:u=`md`,className:d=``,style:f={},children:p,...m})=>{let h=(0,t.useContext)(vt)||{},g=r||h.error,_=e||h.disabled;return(0,n.jsx)(`p`,{id:l,className:[`form-helper-text`,u===`sm`&&`form-helper-text--size-sm`,u===`lg`&&`form-helper-text--size-lg`,o===`dense`&&`form-helper-text--margin-dense`,o===`normal`&&`form-helper-text--margin-normal`,g&&`form-helper-text--error`,_&&`form-helper-text--disabled`,a&&`form-helper-text--focused`,d].filter(Boolean).join(` `),style:f,...m,children:p})};St.displayName=`FormHelperText`;var Ct=({container:e=!1,item:t=!1,xs:r,sm:i,md:a,lg:o,xl:s,spacing:c=0,direction:l=`row`,justifyContent:u=`flex-start`,alignItems:d=`stretch`,className:f=``,style:p={},children:m,...h})=>{let g=[];if(e&&(g.push(`flex`,`flex-wrap`),g.push({row:`flex-row`,column:`flex-col`,"row-reverse":`flex-row-reverse`,"column-reverse":`flex-col-reverse`}[l]),g.push({"flex-start":`justify-start`,center:`justify-center`,"flex-end":`justify-end`,"space-between":`justify-between`,"space-around":`justify-around`,"space-evenly":`justify-evenly`}[u]),g.push({"flex-start":`items-start`,center:`items-center`,"flex-end":`items-end`,stretch:`items-stretch`,baseline:`items-baseline`}[d]),c>0)){let e=c.toString();[`1`,`2`,`3`,`4`,`5`,`6`,`8`,`10`,`12`].includes(e)?g.push(`gap-${e}`):g.push(`gap-${Math.floor(c/4)}`)}return t&&(g.push(`flex-shrink-0`),Object.entries({xs:``,sm:`sm:`,md:`md:`,lg:`lg:`,xl:`xl:`}).forEach(([e,t])=>{let n={xs:r,sm:i,md:a,lg:o,xl:s}[e];if(n!==void 0)if(n===`auto`)g.push(`${t}flex-auto`);else if(n===!0)g.push(`${t}flex-1`);else{let e=Math.round(n/12*100);g.push(`${t}w-${e===100?`full`:e===50?`1/2`:e===25?`1/4`:e===75?`3/4`:`[${e}%]`}`)}})),(0,n.jsx)(`div`,{className:[...g,f].filter(Boolean).join(` `),style:p,...h,children:m})};Ct.displayName=`Grid`;var wt=({triggerText:e=`Hover me`,cardData:r={},variant:i=`default`,size:a=`md`,cardSize:o=`md`,position:s=`top`,delay:c=300,hideDelay:l=100,showArrow:u=!0,disabled:d=!1,onShow:f,onHide:p,onAction:m,className:h=``,style:g={},children:_,card:v,...y})=>{let[b,x]=(0,t.useState)(!1),S=(0,t.useRef)(null),C=(0,t.useRef)(null),w=(0,t.useRef)(null),T=(0,t.useRef)(`hover-card-${Math.random().toString(36).substr(2,9)}`),E=()=>{clearTimeout(S.current),clearTimeout(C.current)},D=()=>{d||(E(),S.current=setTimeout(()=>{x(!0),f?.()},c))},O=()=>{d||(E(),C.current=setTimeout(()=>{x(!1),p?.()},l))};(0,t.useEffect)(()=>()=>E(),[]);let k=e=>{m?.(e),e?.onClick?.()},A=[`hover-card-container`,`hover-card-${i}`,`hover-card-size-${a}`,d&&`hover-card-disabled`,h].filter(Boolean).join(` `),j=[`hover-card-popup`,`hover-card-position-${s}`,`hover-card-card-size-${o}`].join(` `);return(0,n.jsxs)(`div`,{className:A,onMouseEnter:D,onMouseLeave:O,onTouchStart:D,onTouchEnd:O,style:g,...y,children:[(0,n.jsx)(`span`,{className:`hover-card-trigger`,children:_||e}),b&&(0,n.jsxs)(`div`,{ref:w,className:j,style:{zIndex:1e3},role:`tooltip`,"aria-describedby":T.current,children:[u&&(0,n.jsx)(`div`,{className:`hover-card-arrow hover-card-arrow-${s}`}),(0,n.jsx)(`div`,{className:`hover-card-content`,children:v?typeof v==`function`?v(r):v:(0,n.jsxs)(n.Fragment,{children:[r.image&&(0,n.jsx)(`div`,{className:`hover-card-image`,children:(0,n.jsx)(`img`,{src:r.image,alt:r.imageAlt||r.title})}),(0,n.jsxs)(`div`,{className:`hover-card-body`,children:[r.title&&(0,n.jsx)(`h3`,{className:`hover-card-title`,children:r.title}),r.description&&(0,n.jsx)(`p`,{className:`hover-card-description`,children:r.description}),r.meta?.length&&(0,n.jsx)(`div`,{className:`hover-card-meta`,children:r.meta.map((e,t)=>(0,n.jsx)(`span`,{className:`hover-card-meta-item`,children:e},t))}),r.actions?.length&&(0,n.jsx)(`div`,{className:`hover-card-actions`,children:r.actions.map((e,t)=>(0,n.jsx)(`button`,{className:`hover-card-action-btn`,onClick:()=>k(e),children:e.label},t))})]})]})})]})]})};wt.displayName=`HoverCard`;var Tt=u((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),Et=u((e=>{process.env.NODE_ENV!==`production`&&(function(){"use strict";var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)}function x(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case l:case u:case i:case o:case a:case f:return p;default:var g=p&&p.$$typeof;switch(g){case c:case d:case h:case m:case s:return g;default:return t}}case r:return t}}}var S=l,C=u,w=c,T=s,E=n,D=d,O=i,k=h,A=m,j=r,M=o,N=a,P=f,F=!1;function I(e){return F||(F=!0,console.warn(`The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.`)),L(e)||x(e)===l}function L(e){return x(e)===u}function R(e){return x(e)===c}function z(e){return x(e)===s}function B(e){return typeof e==`object`&&!!e&&e.$$typeof===n}function V(e){return x(e)===d}function H(e){return x(e)===i}function U(e){return x(e)===h}function W(e){return x(e)===m}function G(e){return x(e)===r}function K(e){return x(e)===o}function q(e){return x(e)===a}function J(e){return x(e)===f}e.AsyncMode=S,e.ConcurrentMode=C,e.ContextConsumer=w,e.ContextProvider=T,e.Element=E,e.ForwardRef=D,e.Fragment=O,e.Lazy=k,e.Memo=A,e.Portal=j,e.Profiler=M,e.StrictMode=N,e.Suspense=P,e.isAsyncMode=I,e.isConcurrentMode=L,e.isContextConsumer=R,e.isContextProvider=z,e.isElement=B,e.isForwardRef=V,e.isFragment=H,e.isLazy=U,e.isMemo=W,e.isPortal=G,e.isProfiler=K,e.isStrictMode=q,e.isSuspense=J,e.isValidElementType=b,e.typeOf=x})()})),Dt=u(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=Tt():t.exports=Et()})),Ot=u(((e,t)=>{var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(e==null)throw TypeError(`Object.assign cannot be called with null or undefined`);return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String(`abc`);if(e[5]=`de`,Object.getOwnPropertyNames(e)[0]===`5`)return!1;for(var t={},n=0;n<10;n++)t[`_`+String.fromCharCode(n)]=n;if(Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(``)!==`0123456789`)return!1;var r={};return`abcdefghijklmnopqrst`.split(``).forEach(function(e){r[e]=e}),Object.keys(Object.assign({},r)).join(``)===`abcdefghijklmnopqrst`}catch{return!1}}t.exports=o()?Object.assign:function(e,t){for(var o,s=a(e),c,l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]),o)r.call(o,u)&&(s[u]=o[u]);if(n){c=n(o);for(var d=0;d<c.length;d++)i.call(o,c[d])&&(s[c[d]]=o[c[d]])}}return s}})),kt=u(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),At=u(((e,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)})),jt=u(((e,t)=>{var n=function(){};if(process.env.NODE_ENV!==`production`){var r=kt(),i={},a=At();n=function(e){var t=`Warning: `+e;typeof console<`u`&&console.error(t);try{throw Error(t)}catch{}}}function o(e,t,o,s,c){if(process.env.NODE_ENV!==`production`){for(var l in e)if(a(e,l)){var u;try{if(typeof e[l]!=`function`){var d=Error((s||`React class`)+`: `+o+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name=`Invariant Violation`,d}u=e[l](t,l,s,o,null,r)}catch(e){u=e}if(u&&!(u instanceof Error)&&n((s||`React class`)+`: type specification of `+o+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+`. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).`),u instanceof Error&&!(u.message in i)){i[u.message]=!0;var f=c?c():``;n(`Failed `+o+` type: `+u.message+(f??``))}}}}o.resetWarningCache=function(){process.env.NODE_ENV!==`production`&&(i={})},t.exports=o})),Mt=u(((e,t)=>{var n=Dt(),r=Ot(),i=kt(),a=At(),o=jt(),s=function(){};process.env.NODE_ENV!==`production`&&(s=function(e){var t=`Warning: `+e;typeof console<`u`&&console.error(t);try{throw Error(t)}catch{}});function c(){return null}t.exports=function(e,t){var l=typeof Symbol==`function`&&Symbol.iterator,u=`@@iterator`;function d(e){var t=e&&(l&&e[l]||e[u]);if(typeof t==`function`)return t}var f=`<<anonymous>>`,p={array:_(`array`),bigint:_(`bigint`),bool:_(`boolean`),func:_(`function`),number:_(`number`),object:_(`object`),string:_(`string`),symbol:_(`symbol`),any:v(),arrayOf:y,element:b(),elementType:x(),instanceOf:S,node:E(),objectOf:w,oneOf:C,oneOfType:T,shape:O,exact:k};function m(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}function h(e,t){this.message=e,this.data=t&&typeof t==`object`?t:{},this.stack=``}h.prototype=Error.prototype;function g(e){if(process.env.NODE_ENV!==`production`)var n={},r=0;function a(a,o,c,l,u,d,p){if(l||=f,d||=c,p!==i){if(t){var m=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name=`Invariant Violation`,m}else if(process.env.NODE_ENV!==`production`&&typeof console<`u`){var g=l+`:`+c;!n[g]&&r<3&&(s("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[g]=!0,r++)}}return o[c]==null?a?o[c]===null?new h(`The `+u+" `"+d+"` is marked as required "+("in `"+l+"`, but its value is `null`.")):new h(`The `+u+" `"+d+"` is marked as required in "+("`"+l+"`, but its value is `undefined`.")):null:e(o,c,l,u,d)}var o=a.bind(null,!1);return o.isRequired=a.bind(null,!0),o}function _(e){function t(t,n,r,i,a,o){var s=t[n];if(M(s)!==e){var c=N(s);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("`"+e+"`."),{expectedType:e})}return null}return g(t)}function v(){return g(c)}function y(e){function t(t,n,r,a,o){if(typeof e!=`function`)return new h("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){var c=M(s);return new h(`Invalid `+a+" `"+o+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<s.length;l++){var u=e(s,l,r,a,o+`[`+l+`]`,i);if(u instanceof Error)return u}return null}return g(t)}function b(){function t(t,n,r,i,a){var o=t[n];if(!e(o)){var s=M(o);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return g(t)}function x(){function e(e,t,r,i,a){var o=e[t];if(!n.isValidElementType(o)){var s=M(o);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement type."))}return null}return g(e)}function S(e){function t(t,n,r,i,a){if(!(t[n]instanceof e)){var o=e.name||f,s=F(t[n]);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+o+"`."))}return null}return g(t)}function C(e){if(!Array.isArray(e))return process.env.NODE_ENV!==`production`&&(arguments.length>1?s(`Invalid arguments supplied to oneOf, expected an array, got `+arguments.length+` arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).`):s(`Invalid argument supplied to oneOf, expected an array.`)),c;function t(t,n,r,i,a){for(var o=t[n],s=0;s<e.length;s++)if(m(o,e[s]))return null;var c=JSON.stringify(e,function(e,t){return N(t)===`symbol`?String(t):t});return new h(`Invalid `+i+" `"+a+"` of value `"+String(o)+"` "+("supplied to `"+r+"`, expected one of "+c+`.`))}return g(t)}function w(e){function t(t,n,r,o,s){if(typeof e!=`function`)return new h("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var c=t[n],l=M(c);if(l!==`object`)return new h(`Invalid `+o+" `"+s+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an object."));for(var u in c)if(a(c,u)){var d=e(c,u,r,o,s+`.`+u,i);if(d instanceof Error)return d}return null}return g(t)}function T(e){if(!Array.isArray(e))return process.env.NODE_ENV!==`production`&&s(`Invalid argument supplied to oneOfType, expected an instance of array.`),c;for(var t=0;t<e.length;t++){var n=e[t];if(typeof n!=`function`)return s(`Invalid argument supplied to oneOfType. Expected an array of check functions, but received `+P(n)+` at index `+t+`.`),c}function r(t,n,r,o,s){for(var c=[],l=0;l<e.length;l++){var u=e[l],d=u(t,n,r,o,s,i);if(d==null)return null;d.data&&a(d.data,`expectedType`)&&c.push(d.data.expectedType)}var f=c.length>0?`, expected one of type [`+c.join(`, `)+`]`:``;return new h(`Invalid `+o+" `"+s+"` supplied to "+("`"+r+"`"+f+`.`))}return g(r)}function E(){function e(e,t,n,r,i){return A(e[t])?null:new h(`Invalid `+r+" `"+i+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return g(e)}function D(e,t,n,r,i){return new h((e||`React class`)+`: `+t+" type `"+n+`.`+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function O(e){function t(t,n,r,a,o){var s=t[n],c=M(s);if(c!==`object`)return new h(`Invalid `+a+" `"+o+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));for(var l in e){var u=e[l];if(typeof u!=`function`)return D(r,a,o,l,N(u));var d=u(s,l,r,a,o+`.`+l,i);if(d)return d}return null}return g(t)}function k(e){function t(t,n,o,s,c){var l=t[n],u=M(l);if(u!==`object`)return new h(`Invalid `+s+" `"+c+"` of type `"+u+"` "+("supplied to `"+o+"`, expected `object`."));for(var d in r({},t[n],e)){var f=e[d];if(a(e,d)&&typeof f!=`function`)return D(o,s,c,d,N(f));if(!f)return new h(`Invalid `+s+" `"+c+"` key `"+d+"` supplied to `"+o+`\`.
|
|
17
2
|
Bad object: `+JSON.stringify(t[n],null,` `)+`
|
|
18
|
-
Valid keys: `+JSON.stringify(Object.keys(e),null,` `));var p=f(l,d,o,s,c+`.`+d,i);if(p)return p}return null}return g(t)}function A(t){switch(typeof t){case`number`:case`string`:case`undefined`:return!0;case`boolean`:return!t;case`object`:if(Array.isArray(t))return t.every(A);if(t===null||e(t))return!0;var n=d(t);if(n){var r=n.call(t),i;if(n!==t.entries){for(;!(i=r.next()).done;)if(!A(i.value))return!1}else for(;!(i=r.next()).done;){var a=i.value;if(a&&!A(a[1]))return!1}}else return!1;return!0;default:return!1}}function j(e,t){return e===`symbol`?!0:t?t[`@@toStringTag`]===`Symbol`||typeof Symbol==`function`&&t instanceof Symbol:!1}function M(e){var t=typeof e;return Array.isArray(e)?`array`:e instanceof RegExp?`object`:j(t,e)?`symbol`:t}function N(e){if(e==null)return``+e;var t=M(e);if(t===`object`){if(e instanceof Date)return`date`;if(e instanceof RegExp)return`regexp`}return t}function P(e){var t=N(e);switch(t){case`array`:case`object`:return`an `+t;case`boolean`:case`date`:case`regexp`:return`a `+t;default:return t}}function F(e){return!e.constructor||!e.constructor.name?f:e.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p}})),Nt=l(((e,t)=>{var n=kt();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),$=d(l(((e,t)=>{if(process.env.NODE_ENV!==`production`){var n=Dt();t.exports=Mt()(n.isElement,!0)}else t.exports=Nt()()}))(),1),Pt=({className:e,style:t})=>(0,y.jsx)(`span`,{className:e,style:t}),Ft=(e,n)=>(0,t.lazy)(()=>e().then(e=>({default:n(e)})).catch(e=>(console.warn(`[Icon] 动态导入失败,已回退到占位符图标。`,e),{default:Pt}))),It=(e,t,n)=>{switch(e){case`lucide`:return Ft(()=>import(`@zeturn/watercolor-icons-lucide-react`),e=>e.getIcon?.(t)||Pt);case`heroicons`:return Ft(()=>import(`@zeturn/watercolor-icons-heroicons-react`),e=>e.getIcon?.(t,n)||Pt);case`tabler`:return Ft(()=>import(`@zeturn/watercolor-icons-tabler-react`),e=>e.getIcon?.(t)||Pt);case`phosphor`:return Ft(()=>import(`@zeturn/watercolor-icons-phosphor-react`),e=>e.getIcon?.(t)||Pt);default:return null}},Lt=e=>typeof e==`number`?e:{xs:16,sm:20,md:24,lg:32,xl:48}[e]||parseInt(e)||24,Rt=({library:e=`lucide`,name:n=``,html:r=``,size:i=24,color:a=`currentColor`,strokeWidth:o=2,variant:s=`outline`,className:c=``,children:l,...u})=>{let d=(0,t.useMemo)(()=>{if(!n)return null;try{return It(e,n,s)}catch{return console.warn(`Icon "${n}" not found in library "${e}"`),null}},[e,n,s]),f=(0,t.useMemo)(()=>e===`feather`&&n?(0,t.lazy)(async()=>{try{let e=Lt(i),{getFeatherSvg:t}=await import(`@zeturn/watercolor-icons-feather`),r=await t(n,{width:e,height:e,strokeWidth:Number(o)});return{default:({className:e,style:t})=>(0,y.jsx)(`span`,{className:e,style:t,dangerouslySetInnerHTML:{__html:r}})}}catch{return console.warn(`Feather icon "${n}" not found`),{default:()=>(0,y.jsx)(`span`,{})}}}):null,[e,n,i,o]),p=(0,t.useMemo)(()=>e===`html`&&r?r:``,[e,r]),m=(0,t.useMemo)(()=>{let e={};if(a&&a!==`currentColor`&&(e.color=a),i){let t=Lt(i);e.width=`${t}px`,e.height=`${t}px`}return e},[a,i]),h=(0,t.useMemo)(()=>{let t={size:Lt(i),color:a,...u};return e===`lucide`&&(t.strokeWidth=o),e===`tabler`&&(t.stroke=o),t},[e,i,a,o,u]),g=`wc-icon ${c}`.trim();return f?(0,y.jsx)(t.Suspense,{fallback:(0,y.jsx)(`span`,{className:g,style:m}),children:(0,y.jsx)(f,{className:g,style:m})}):d?(0,y.jsx)(t.Suspense,{fallback:(0,y.jsx)(`span`,{className:g,style:m}),children:(0,y.jsx)(d,{className:g,style:m,...h})}):p?(0,y.jsx)(`span`,{className:g,style:m,dangerouslySetInnerHTML:{__html:p}}):(0,y.jsx)(`span`,{className:g,style:m,children:l})};Rt.propTypes={library:$.default.oneOf([`lucide`,`heroicons`,`tabler`,`phosphor`,`feather`,`html`]),name:$.default.string,html:$.default.string,size:$.default.oneOfType([$.default.string,$.default.number]),color:$.default.string,strokeWidth:$.default.oneOfType([$.default.string,$.default.number]),variant:$.default.oneOf([`outline`,`solid`,`mini`]),className:$.default.string,children:$.default.node};var zt=({color:e=`default`,size:n=`md`,edge:r=!1,disabled:i=!1,icon:a=``,children:o,onClick:s,onFocus:c,onBlur:l,className:u=``,style:d={},...f})=>{let[p,m]=(0,t.useState)(!1),h=[`default`,`primary`,`secondary`,`error`,`warning`,`info`,`success`],g=[`sm`,`md`,`lg`],_=[!1,`start`,`end`];h.includes(e)||console.warn(`Invalid color "${e}" for IconButton component. Valid colors are: ${h.join(`, `)}`),g.includes(n)||console.warn(`Invalid size "${n}" for IconButton component. Valid sizes are: ${g.join(`, `)}`),_.includes(r)||console.warn(`Invalid edge "${r}" for IconButton component. Valid edges are: ${_.join(`, `)}`);let v=[`wc-icon-button`,`wc-icon-button--${e}`,`wc-icon-button--${n}`,r&&`wc-icon-button--edge-${r}`,i&&`wc-icon-button--disabled`,p&&`wc-icon-button--focused`,u].filter(Boolean).join(` `);return(0,y.jsx)(`button`,{className:v,disabled:i,onClick:e=>{!i&&s&&s(e)},onFocus:e=>{m(!0),c?.(e)},onBlur:e=>{m(!1),l?.(e)},style:d,...f,children:(0,y.jsx)(`span`,{className:`icon-button-icon`,children:a?(0,y.jsx)(`span`,{dangerouslySetInnerHTML:{__html:a}}):o})})};zt.displayName=`IconButton`;var Bt=({images:e=[],title:n=``,layout:r=`grid`,size:i=`md`,columns:a=3,gap:o=16,showInfo:s=!0,showCount:c=!0,showDownload:l=!1,showPagination:u=!1,itemsPerPage:d=12,lazyLoad:f=!0,loading:p=!1,className:m=``,style:h={},onSelect:g,onDownload:_,onLightboxOpen:v,onLightboxClose:b,...x})=>{let[S,C]=(0,t.useState)(-1),[w,T]=(0,t.useState)(1),E=u?Math.ceil(e.length/d):1,D={sm:`75%`,md:`66.67%`,lg:`56.25%`,xl:`50%`},O=u?e.slice((w-1)*d,w*d):e,k=t=>{let n=u?(w-1)*d+t:t;C(n);let r=e[n];g?.({index:n,image:r}),v?.({index:n,image:r})},A=e=>{_?.(e);let t=document.createElement(`a`);t.href=e.src,t.download=e.title||`image`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},j=()=>{C(-1),b?.()},M=()=>C(e=>e>0?e-1:e),N=()=>C(t=>t<e.length-1?t+1:t);return(0,t.useEffect)(()=>{let e=e=>{e.key===`Escape`&&j(),S!==-1&&(e.key===`ArrowLeft`&&M(),e.key===`ArrowRight`&&N())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[S]),(0,y.jsxs)(`div`,{className:[`image-gallery`,`gallery-layout-${r}`,`gallery-size-${i}`,p&&`gallery-loading`,m].filter(Boolean).join(` `),style:h,...x,children:[(n||c)&&(0,y.jsxs)(`div`,{className:`gallery-header`,children:[n&&(0,y.jsx)(`h2`,{className:`gallery-title`,children:n}),c&&(0,y.jsxs)(`div`,{className:`gallery-count`,children:[e.length,` 张图片`]})]}),(0,y.jsx)(`div`,{className:`gallery-grid`,style:r===`grid`?{gridTemplateColumns:`repeat(${a},1fr)`,gap:o}:r===`masonry`?{columnCount:a,columnGap:o}:{gap:o},children:O.map((e,t)=>(0,y.jsxs)(`div`,{className:`gallery-item`,onClick:()=>k(t),tabIndex:0,role:`button`,"aria-label":`查看图片 ${t+1}`,children:[(0,y.jsxs)(`div`,{className:`gallery-image-container`,style:{paddingBottom:D[i]},children:[(0,y.jsx)(`img`,{src:e.thumbnail||e.src,alt:e.alt||e.title,className:`gallery-image`,loading:f?`lazy`:`eager`}),(0,y.jsx)(`div`,{className:`gallery-overlay`,children:(0,y.jsxs)(`div`,{className:`gallery-overlay-content`,children:[(0,y.jsx)(`button`,{className:`gallery-action-btn gallery-view-btn`,"aria-label":`在灯箱中查看图片 ${t+1}`,onClick:e=>{e.stopPropagation(),k(t)},children:`👁️`}),l&&(0,y.jsx)(`button`,{className:`gallery-action-btn gallery-download-btn`,"aria-label":`下载图片 ${t+1}`,onClick:t=>{t.stopPropagation(),A(e)},children:`📥`})]})})]}),s&&(e.title||e.description)&&(0,y.jsxs)(`div`,{className:`gallery-info`,children:[e.title&&(0,y.jsx)(`div`,{className:`gallery-info-title`,children:e.title}),e.description&&(0,y.jsx)(`div`,{className:`gallery-info-description`,children:e.description})]})]},e.id||t))}),u&&E>1&&(0,y.jsxs)(`div`,{className:`gallery-pagination`,children:[(0,y.jsx)(`button`,{className:`gallery-page-btn`,disabled:w===1,onClick:()=>T(e=>e-1),children:`上一页`}),(0,y.jsxs)(`span`,{className:`gallery-page-info`,children:[`第 `,w,` 页,共 `,E,` 页`]}),(0,y.jsx)(`button`,{className:`gallery-page-btn`,disabled:w===E,onClick:()=>T(e=>e+1),children:`下一页`})]}),S!==-1&&(0,y.jsx)(`div`,{className:`gallery-lightbox`,onClick:j,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`lightbox-title`,children:(0,y.jsxs)(`div`,{className:`gallery-lightbox-content`,onClick:e=>e.stopPropagation(),children:[(0,y.jsx)(`button`,{className:`gallery-lightbox-close`,onClick:j,children:`✕`}),(0,y.jsx)(`div`,{className:`gallery-lightbox-image-container`,children:(0,y.jsx)(`img`,{src:e[S].src,alt:e[S].alt,className:`gallery-lightbox-image`})}),(e[S].title||e[S].description)&&(0,y.jsxs)(`div`,{className:`gallery-lightbox-info`,children:[e[S].title&&(0,y.jsx)(`h3`,{id:`lightbox-title`,className:`gallery-lightbox-title`,children:e[S].title}),e[S].description&&(0,y.jsx)(`p`,{className:`gallery-lightbox-description`,children:e[S].description})]}),(0,y.jsxs)(`div`,{className:`gallery-lightbox-navigation`,children:[(0,y.jsx)(`button`,{className:`gallery-lightbox-nav gallery-lightbox-prev`,disabled:S===0,"aria-label":`上一张图片`,onClick:M,children:`‹`}),(0,y.jsxs)(`span`,{className:`gallery-lightbox-counter`,children:[S+1,` / `,e.length]}),(0,y.jsx)(`button`,{className:`gallery-lightbox-nav gallery-lightbox-next`,disabled:S===e.length-1,"aria-label":`下一张图片`,onClick:N,children:`›`})]}),l&&(0,y.jsx)(`button`,{className:`gallery-action-btn gallery-download-btn`,onClick:()=>A(e[S]),children:`下载`})]})})]})};Bt.displayName=`ImageGallery`;var Vt=({value:e=``,onChange:n,type:r=`text`,placeholder:i=``,disabled:a=!1,readonly:o=!1,required:s=!1,autoFocus:c=!1,maxLength:l,minLength:u,size:d=`md`,variant:f=`filled`,color:p=`primary`,error:m=!1,helperText:h=``,label:g=``,startAdornment:_=null,endAdornment:v=null,fullWidth:b=!1,multiline:x=!1,rows:S=4,autoComplete:C=`off`,name:w=``,id:T=``,className:E=``,style:D={},onFocus:O,onBlur:k,onKeyDown:A,onKeyUp:j,onKeyPress:M,...N})=>{let[P,F]=(0,t.useState)(!1),[I,L]=(0,t.useState)(!!e),R=(0,t.useRef)(null),z=(0,t.useId)(),B=T||z;return(0,t.useEffect)(()=>{L(!!e)},[e]),(0,t.useEffect)(()=>{c&&R.current&&R.current.focus()},[c]),(0,y.jsxs)(`div`,{className:`wc-input-container`,children:[g&&(0,y.jsxs)(`label`,{htmlFor:B,className:`wc-input-label ${P||I?`wc-input-label--active`:``} ${m?`wc-input-label--error`:``}`,children:[g,s&&(0,y.jsx)(`span`,{className:`wc-input-label__required`,children:`*`})]}),(0,y.jsxs)(`div`,{className:`wc-input-wrapper`,children:[_&&(0,y.jsx)(`div`,{className:`wc-input-adornment wc-input-adornment--start`,children:_}),(0,y.jsx)(x?`textarea`:`input`,{ref:R,className:(()=>{let e=[`wc-input`];return e.push(`wc-input--${d}`),e.push(`wc-input--${f}`),m&&e.push(`wc-input--error`),a&&e.push(`wc-input--disabled`),o&&e.push(`wc-input--readonly`),P&&e.push(`wc-input--focused`),I&&e.push(`wc-input--has-value`),b&&e.push(`wc-input--full-width`),_&&e.push(`wc-input--has-start-adornment`),v&&e.push(`wc-input--has-end-adornment`),e.concat(E).filter(Boolean).join(` `)})(),style:{...D},type:x?void 0:r,value:e,onChange:e=>{let t=e.target.value;L(!!t),n?.(e)},onFocus:e=>{F(!0),O?.(e)},onBlur:e=>{F(!1),k?.(e)},onKeyDown:A,onKeyUp:j,onKeyPress:M,placeholder:i,disabled:a,readOnly:o,required:s,maxLength:l,minLength:u,rows:x?S:void 0,autoComplete:C,name:w,id:B,...N}),v&&(0,y.jsx)(`div`,{className:`wc-input-adornment wc-input-adornment--end`,children:v})]}),(h||m)&&(0,y.jsx)(`div`,{className:`wc-input-helper-text ${m?`wc-input-helper-text--error`:``}`,children:m||h})]})};Vt.displayName=`Input`;var Ht=e=>{let{dense:t=!1,disablePadding:n=!1,variant:r,className:i=``}=e,a=[`list`];return t&&a.push(`list--dense`),n&&a.push(`list--no-padding`),r&&a.push(`list--${r}`),i&&a.push(i),a},Ut=e=>{let{button:t=!1,disabled:n=!1,divider:r=!1,dense:i=!1,selected:a=!1,disableGutters:o=!1,draggable:s=!1,multiselect:c=!1,className:l=``}=e,u=[`list-item`];return t&&u.push(`list-item--button`),n&&u.push(`list-item--disabled`),r&&u.push(`list-item--divider`),i&&u.push(`list-item--dense`),a&&u.push(`list-item--selected`),o&&u.push(`list-item--no-gutters`),s&&u.push(`list-item--draggable`),c&&u.push(`list-item--multiselect`),l&&u.push(l),u},Wt=e=>{let{position:t=`start`,className:n=``}=e,r=[`list-item-icon`];return t&&r.push(`list-item-icon--${t}`),n&&r.push(n),r},Gt=e=>{let{inset:t=!1,className:n=``}=e,r=[`list-item-text`];return t&&r.push(`list-item-text--inset`),n&&r.push(n),r},Kt=(0,t.createContext)({dense:!1}),qt=({children:e,dense:t=!1,disablePadding:n=!1,subheader:r=``,className:i=``,...a})=>{let o=Ht({dense:t,disablePadding:n,className:i}).join(` `);return(0,y.jsx)(Kt.Provider,{value:{dense:t},children:(0,y.jsx)(`div`,{role:`list`,className:o,...a,children:e})})},Jt=({children:e,button:n=!1,disabled:r=!1,divider:i=!1,selected:a=!1,disableGutters:o=!1,multiselect:s=!1,component:c,className:l=``,...u})=>{let{dense:d}=(0,t.useContext)(Kt)||{dense:!1},f=Ut({button:n,disabled:r,divider:i,dense:d,selected:a,disableGutters:o,multiselect:s,className:l}).join(` `);return(0,y.jsx)(c||(n?`button`:`div`),{role:`listitem`,className:f,disabled:n&&r,...u,children:e})},Yt=({children:e,position:t=`start`,className:n=``,...r})=>(0,y.jsx)(`span`,{className:Wt({position:t,className:n}).join(` `),...r,children:e}),Xt=({primary:e=``,secondary:t=``,inset:n=!1,className:r=``,...i})=>(0,y.jsxs)(`div`,{className:Gt({inset:n,className:r}).join(` `),...i,children:[e&&(0,y.jsx)(`p`,{className:`list-item-text-primary`,children:e}),t&&(0,y.jsx)(`p`,{className:`list-item-text-secondary`,children:t})]}),Zt=({size:e,variant:t,disabled:n,className:r})=>{let i=[`wc-menu`,`wc-menu--${e}`,`wc-menu--${t}`];return n&&i.push(`wc-menu--disabled`),r&&i.push(r),i},Qt=(e,t)=>[`wc-menu__menu`,`wc-menu__menu--${e}`,t],$t=({disabled:e})=>[`wc-menu__button`,e?`wc-menu__button--disabled`:``],en=e=>{let t=[`wc-menu__item`];return e.divider&&t.push(`wc-menu__divider`),e.disabled&&t.push(`wc-menu__item--disabled`),t},tn=e=>[`wc-menu__arrow`,e?`wc-menu__arrow--open`:``],nn=(e,t,n,r,i)=>{t||(n(!e),e?i&&i():r&&r())},rn=(e,t,n,r,i)=>{e.disabled||e.divider||(n&&n(e,t),r(!1),i&&i())},an=e=>{let t=t=>{e(t)};return{add:()=>document.addEventListener(`click`,t),remove:()=>document.removeEventListener(`click`,t)}},on=({items:e=[],triggerText:n=`选择选项`,placement:r=`bottom-start`,size:i=`md`,variant:a=`default`,disabled:o=!1,trigger:s=`click`,illustration:c=``,illustrationAlt:l=`示意图`,cardTitle:u=``,cardDescription:d=``,onSelect:f,onOpen:p,onClose:m,children:h,triggerContent:g,menuContent:_,className:v=``,...b})=>{let[x,S]=(0,t.useState)(!1),C=(0,t.useRef)(null),w=(0,t.useRef)(null),T=Zt({size:i,variant:a,disabled:o,className:v}).join(` `),E=Qt(r,a===`card`?`wc-menu__menu--card`:``).join(` `),D=$t({disabled:o}).join(` `),O=tn(x).join(` `),k=a===`card`?{minWidth:`320px`,maxWidth:`450px`}:{minWidth:`120px`},A=()=>{nn(x,o,S,p,m)},j=(e,t)=>{rn(e,t,f,S,m)},M=an(e=>{C.current&&!C.current.contains(e.target)&&(S(!1),m&&m())});return(0,t.useEffect)(()=>(x?M.add():M.remove(),()=>M.remove()),[x]),(0,y.jsxs)(`div`,{className:T,ref:C,...b,style:{backgroundColor:`var(--wc-bg-surface)`,color:`var(--wc-text-primary)`},children:[(0,y.jsx)(`div`,{className:`wc-menu__trigger`,onClick:A,ref:w,children:g||h||(0,y.jsxs)(`button`,{className:D,children:[n,(0,y.jsx)(`span`,{className:O,children:(0,y.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,y.jsx)(`polyline`,{points:`6,9 12,15 18,9`})})})]})}),x&&(0,y.jsx)(`div`,{className:E,style:k,children:_||(a===`card`?(0,y.jsxs)(`div`,{className:`wc-menu__card`,children:[(0,y.jsxs)(`div`,{className:`wc-menu__card-illustration`,children:[c?(0,y.jsx)(`img`,{src:c,alt:l,className:`wc-menu__illustration-image`}):(0,y.jsx)(`div`,{className:`wc-menu__illustration-placeholder`,children:(0,y.jsx)(`span`,{children:`🎨`})}),(u||d)&&(0,y.jsxs)(`div`,{className:`wc-menu__card-info`,children:[u&&(0,y.jsx)(`h4`,{className:`wc-menu__card-title`,children:u}),d&&(0,y.jsx)(`p`,{className:`wc-menu__card-description`,children:d})]})]}),(0,y.jsx)(`div`,{className:`wc-menu__card-list`,children:e.map((e,t)=>e.divider?(0,y.jsx)(`div`,{className:`wc-menu__divider`},e.key||t):(0,y.jsxs)(`div`,{className:en(e).join(` `),onClick:()=>j(e,t),children:[e.icon&&(0,y.jsx)(`span`,{className:`wc-menu__icon`,children:e.icon}),(0,y.jsx)(`span`,{className:`wc-menu__label`,children:e.label})]},e.key||t))})]}):e.map((e,t)=>e.divider?(0,y.jsx)(`div`,{className:`wc-menu__divider`},e.key||t):(0,y.jsxs)(`div`,{className:en(e).join(` `),onClick:()=>j(e,t),children:[e.icon&&(0,y.jsx)(`span`,{className:`wc-menu__icon`,children:e.icon}),(0,y.jsx)(`span`,{className:`wc-menu__label`,children:e.label})]},e.key||t)))})]})};on.displayName=`Menu`;function sn({size:e=`md`,fullWidth:t=!1,fullScreen:n=!1,scroll:r=`paper`,position:i=`center`,className:a=``}={}){let o=[`wc-modal`];return e&&!n&&o.push(`wc-modal--${e}`),n&&o.push(`wc-modal--fullscreen`),t&&!n&&o.push(`wc-modal--full-width`),r===`body`?o.push(`wc-modal--scroll-body`):o.push(`wc-modal--scroll-paper`),i&&i!==`center`&&o.push(`wc-modal--${i}`),a&&o.push(a),o.filter(Boolean).join(` `)}function cn({centered:e=!0,position:t=`center`}={}){let n=[`wc-modal-overlay`];return(e||t===`center`)&&n.push(`wc-modal-overlay--centered`),t&&t!==`center`&&n.push(`wc-modal-overlay--${t}`),n.join(` `)}function ln(e,t,n=0){e(!1),t&&(n>0?setTimeout(()=>{t()},n):t())}function un(e,t,n){e.key===`Escape`&&t&&n()}function dn(e){if(e){let t=e.querySelectorAll(`button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`);t.length>0?t[0].focus():e.focus()}}function fn(e){if(!e)return()=>{};let t=e.querySelectorAll(`button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`),n=t[0],r=t[t.length-1],i=e=>{e.key===`Tab`&&(e.shiftKey?document.activeElement===n&&(e.preventDefault(),r?.focus()):document.activeElement===r&&(e.preventDefault(),n?.focus()))};return e.addEventListener(`keydown`,i),()=>{e.removeEventListener(`keydown`,i)}}var pn=({visible:e=!1,open:r=!1,title:i=``,size:a=`md`,maxWidth:o=null,closable:s=!0,showCloseButton:c=!0,maskClosable:l=!0,closeOnOverlay:u=!0,disableBackdropClick:d=!1,disableEscapeKeyDown:f=!1,centered:p=!0,fullWidth:m=!1,fullScreen:h=!1,position:g=`center`,scroll:_=`paper`,lockScroll:v=!0,zIndex:b=1e3,showOverlay:x=!0,className:S=``,onClose:C,children:w,header:T,footer:E,...D})=>{let[O,k]=(0,t.useState)(e||r),A=(0,t.useRef)(null),j=(0,t.useRef)(null),M=(0,t.useRef)(null),N=e||r;(0,t.useEffect)(()=>{k(N)},[N]);let P=sn({size:o||a,fullWidth:m,fullScreen:h,scroll:_,position:g,className:S}),F=cn({centered:g===`center`||p,position:g}),I=()=>{ln(k,C)},L=()=>{(l||u)&&!d&&I()},R=e=>{un(e,s&&!f,I)};if((0,t.useEffect)(()=>{if(O)return j.current=document.activeElement,setTimeout(()=>{A.current&&(dn(A.current),M.current=fn(A.current))},100),document.addEventListener(`keydown`,R),v&&(document.body.style.overflow=`hidden`),()=>{document.removeEventListener(`keydown`,R),M.current&&=(M.current(),null),j.current&&j.current.focus&&j.current.focus(),v&&(document.body.style.overflow=``)}},[O,s,f,v]),!O)return null;let z=s&&c!==!1;return(0,n.createPortal)((0,y.jsxs)(`div`,{className:F,style:{zIndex:b},onClick:L,"data-testid":`modal-overlay`,children:[x&&(0,y.jsx)(`div`,{className:`wc-modal__overlay`}),(0,y.jsxs)(`div`,{ref:A,className:P,onClick:e=>e.stopPropagation(),role:`dialog`,"aria-modal":`true`,"aria-labelledby":i?`modal-title`:void 0,tabIndex:-1,...D,children:[z&&(0,y.jsx)(ve,{variant:`text`,size:`sm`,className:`wc-modal__close`,onClick:I,"aria-label":`关闭`,children:`×`}),(i||T)&&(0,y.jsx)(`div`,{className:`wc-modal__header`,children:T||i&&(0,y.jsx)(`h3`,{id:`modal-title`,className:`wc-modal__title`,children:i})}),(0,y.jsx)(`div`,{className:`wc-modal__body`,children:w}),E&&(0,y.jsx)(`div`,{className:`wc-modal__footer`,children:E})]})]}),document.body)};pn.displayName=`Modal`;var mn=({active:e=!0,duration:n=3e3,from:r=0,to:i,locale:a=``,precision:o=0,showSeparator:s=!1,prefix:c=``,suffix:l=``,separator:u=``,formatter:d=null,easing:f=`linear`,onFinish:p,className:m=``,style:h={},...g})=>{let[_,v]=(0,t.useState)(r),[b,x]=(0,t.useState)(!1),S=(0,t.useRef)(null),C=(0,t.useRef)(null),w=t=>{S.current===null&&(S.current=t);let a=Math.min((t-S.current)/n,1);v(r+(i-r)*a),a<1&&e?C.current=requestAnimationFrame(w):(v(i),x(!1),p?.())},T=()=>{E(),S.current=null,e?(x(!0),C.current=requestAnimationFrame(w)):(v(i),x(!1))},E=()=>{C.current&&=(cancelAnimationFrame(C.current),null)};(0,t.useEffect)(()=>(T(),E),[e,r,i,n]);let D=e=>{if(d)return d(e);let t=e.toFixed(o),n=t;if(s||u)if(u){let e=t.split(`.`);e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,u),n=e.join(`.`)}else n=Number(t).toLocaleString(a||void 0,{minimumFractionDigits:o,maximumFractionDigits:o});return`${c}${n}${l}`};return(0,y.jsx)(`span`,{className:[`wc-number-animation`,b?`wc-number-animation--playing`:``,f&&[`ease-in`,`ease-out`,`ease-in-out`].includes(f)?`wc-number-animation--${f}`:``,m].filter(Boolean).join(` `),style:h,...g,children:D(_)})};function hn({value:e=1,onChange:n,total:r,pageSize:i=10,siblingCount:a=1,boundaryCount:o=1,size:s=`md`,className:c=``,...l}){let[u,d]=(0,t.useState)(e);(0,t.useEffect)(()=>{d(e)},[e]);let f=(0,t.useMemo)(()=>Math.max(1,Math.ceil(r/i)),[r,i]),p=(e,t)=>{let n=[];for(let r=e;r<=t;r++)n.push(r);return n},m=(0,t.useMemo)(()=>{if(f<=a*2+3+o*2)return p(1,f).map(e=>({key:e,num:e}));let e=Math.max(u-a,o+2),t=Math.min(u+a,f-o-1),n=e>o+2,r=t<f-o-1,i=[];for(let e=1;e<=o;e++)i.push({key:`b`+e,num:e});n&&i.push({key:`l-ellipsis`,ellipsis:!0});for(let n=e;n<=t;n++)i.push({key:`m`+n,num:n});r&&i.push({key:`r-ellipsis`,ellipsis:!0});for(let e=f-o+1;e<=f;e++)i.push({key:`e`+e,num:e});return i},[u,f,a,o]),h=(0,t.useCallback)(e=>{e<1||e>f||e===u||(d(e),n?.(e))},[u,f,n]);return f<=1?null:(0,y.jsxs)(`nav`,{className:[`pagination`,`wc-pagination`,s===`md`?``:`wc-pagination--${s}`,c].filter(Boolean).join(` `),"aria-label":`分页导航`,...l,children:[(0,y.jsx)(`button`,{className:`page-btn wc-page-btn wc-page-btn--prev wc-page-btn--nav`,disabled:u===1,onClick:()=>h(u-1),"aria-label":`上一页`,children:`‹`}),m.map(e=>e.ellipsis?(0,y.jsx)(`span`,{className:`page-ellipsis`,children:`…`},e.key):(0,y.jsx)(`button`,{className:`page-btn wc-page-btn${e.num===u?` active wc-page-btn--active`:``}`,onClick:()=>h(e.num),children:e.num},e.key)),(0,y.jsx)(`button`,{className:`page-btn wc-page-btn wc-page-btn--next wc-page-btn--nav`,disabled:u===f,onClick:()=>h(u+1),"aria-label":`下一页`,children:`›`})]})}var gn={ELEVATION:`elevation`,OUTLINED:`outlined`},_n={SQUARE:`square`,ROUNDED_SM:`rounded-sm`,ROUNDED_LG:`rounded-lg`,ROUNDED_XL:`rounded-xl`,ROUNDED_2XL:`rounded-2xl`,ROUNDED_FULL:`rounded-full`},vn={SM:`sm`,MD:`md`,LG:`lg`,XL:`xl`},yn={DEFAULT:`default`,PRIMARY:`primary`,SUCCESS:`success`,WARNING:`warning`,ERROR:`error`,INFO:`info`};function bn(e={}){let{variant:t=gn.ELEVATION,elevation:n=1,square:r=!1,shape:i=null,size:a=null,color:o=yn.DEFAULT,hoverable:s=!1,clickable:c=!1,gradient:l=!1,frosted:u=!1,textured:d=!1,className:f=``}=e,p=[`wc-paper`];if(t===gn.OUTLINED)p.push(`wc-paper--outlined`);else{p.push(`wc-paper--elevation`);let e=Math.max(0,Math.min(24,Math.floor(Number(n)||0)));p.push(`wc-paper--elevation-${e}`)}return r?p.push(`wc-paper--square`):i&&_n[i.toUpperCase()]&&p.push(`wc-paper--${i}`),a&&vn[a.toUpperCase()]&&p.push(`wc-paper--${a}`),o!==yn.DEFAULT&&yn[o.toUpperCase()]&&p.push(`wc-paper--${o}`),s&&p.push(`wc-paper--hoverable`),c&&p.push(`wc-paper--clickable`),l&&p.push(`wc-paper--gradient`),u&&p.push(`wc-paper--frosted`),d&&p.push(`wc-paper--textured`),f&&p.push(f),p.join(` `)}function xn({variant:e=`elevation`,elevation:t=1,square:n=!1,hoverable:r=!1,clickable:i=!1,color:a=`default`,size:o=null,className:s=``,children:c,onClick:l,onMouseEnter:u,onMouseLeave:d,...f}){let p=bn({variant:e,elevation:Math.max(0,Math.min(24,Math.floor(Number(t)||0))),square:n,hoverable:r,clickable:i,color:a,size:o,className:s});return(0,y.jsx)(`div`,{className:p,onClick:e=>{i&&l&&l(e)},onMouseEnter:u,onMouseLeave:d,style:{cursor:i?`pointer`:`default`,...f.style},...f,children:c})}function Sn({open:e,onOpenChange:r,triggerText:i=`打开弹窗`,trigger:a,placement:o=`bottom`,offset:s=8,children:c,className:l=``}){let[u,d]=(0,t.useState)(!1),f=e!=null,p=(0,t.useRef)(null),m=(0,t.useRef)(null),h=f?e:u,g=e=>{f||d(e),r?.(e)},_=()=>g(!1),v=()=>{g(!h)},b=(0,t.useCallback)(()=>{let e=p.current,t=m.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=0,a=0;switch(o){case`top`:i=n.top-r.height-s,a=n.left+(n.width-r.width)/2;break;case`bottom`:i=n.bottom+s,a=n.left+(n.width-r.width)/2;break;case`left`:i=n.top+(n.height-r.height)/2,a=n.left-r.width-s;break;case`right`:i=n.top+(n.height-r.height)/2,a=n.right+s;break;default:break}t.style.top=`${i+window.scrollY}px`,t.style.left=`${a+window.scrollX}px`},[o,s]);(0,t.useEffect)(()=>{},[f,e]),(0,t.useEffect)(()=>(h&&(b(),window.addEventListener(`resize`,b),window.addEventListener(`scroll`,b),document.addEventListener(`mousedown`,x)),()=>{window.removeEventListener(`resize`,b),window.removeEventListener(`scroll`,b),document.removeEventListener(`mousedown`,x)}),[h,b]);let x=e=>{m.current&&!m.current.contains(e.target)&&!p.current.contains(e.target)&&_()},S=a?t.default.cloneElement(a,{ref:p,onClick:v,"aria-expanded":h}):(0,y.jsx)(`button`,{ref:p,className:`wc-popover-trigger`,onClick:v,"aria-expanded":h,children:i});return(0,y.jsxs)(`div`,{className:`wc-popover-container ${l}`.trim(),children:[S,h&&n.default.createPortal((0,y.jsx)(`div`,{ref:m,className:`wc-popover-content wc-popover-content--${o}`.trim(),role:`dialog`,children:c}),document.body)]})}function Cn({plans:e=[],columns:t=3,className:n=``}){let r={gridTemplateColumns:`repeat(${t}, minmax(0,1fr))`};return(0,y.jsx)(`div`,{className:`pricing-grid ${n}`.trim(),style:r,children:e.map(e=>(0,y.jsxs)(`div`,{className:`plan-card${e.popular?` popular`:``}`,children:[(0,y.jsx)(`h3`,{className:`plan-name`,children:e.name}),(0,y.jsx)(`p`,{className:`plan-price`,children:e.price}),(0,y.jsx)(`ul`,{className:`plan-features`,children:e.features?.map(e=>(0,y.jsx)(`li`,{children:e},e))}),(0,y.jsx)(`button`,{className:`plan-btn`,children:e.button||`选择`})]},e.name))})}var wn=({value:e=0,label:t=``,showPercent:n=!1,color:r=`primary`,size:i=`md`,animated:a=!1,className:o=``,...s})=>{let c=[`primary`,`success`,`warning`,`error`,`purple`,`orange`,`cyan`,`pink`].includes(r)?r:`primary`,l=Math.max(0,Math.min(100,e)),u=[`wc-progress`,`wc-progress--${i}`],d=[`wc-progress__bar`,`wc-progress__bar--${c}`,a&&`wc-progress__bar--animated`].filter(Boolean).join(` `),f={width:`${l}%`};return(0,y.jsxs)(`div`,{className:`wc-progress-wrapper ${o}`,...s,children:[(t||n)&&(0,y.jsxs)(`div`,{className:`wc-progress-header`,children:[t&&(0,y.jsx)(`label`,{className:`wc-progress-label`,children:t}),n&&(0,y.jsxs)(`span`,{className:`wc-progress-percent`,children:[Math.round(l),`%`]})]}),(0,y.jsx)(`div`,{className:u.join(` `),children:(0,y.jsx)(`div`,{className:d,style:f})})]})};wn.displayName=`Progress`;var Tn=(0,t.createContext)(null);function En({value:e,onChange:n,name:r,disabled:i=!1,label:a=``,row:o=!1,required:s=!1,error:c=``,helperText:l=``,size:u=`md`,color:d=`primary`,children:f,className:p=``}){let[m,h]=(0,t.useState)(e),g=e!==void 0,_=g?e:m,v=(0,t.useCallback)(e=>{i||(g||h(e),n?.(e))},[i,g,n]),b=[`wc-radio-group`,p].filter(Boolean).join(` `),x=[`wc-radio-group-content`,o?`flex flex-wrap gap-4`:`space-y-2`].filter(Boolean).join(` `);return(0,y.jsx)(Tn.Provider,{value:{value:_,updateValue:v,name:r,disabled:i,size:u,color:d},children:(0,y.jsxs)(`div`,{className:b,children:[a&&(0,y.jsxs)(`label`,{className:`wc-radio-group-label`,children:[a,s&&(0,y.jsx)(`span`,{className:`text-error-500`,children:`*`})]}),(0,y.jsx)(`div`,{className:x,children:f}),(c||l)&&(0,y.jsx)(`div`,{className:`mt-2`,children:c?(0,y.jsx)(`p`,{className:`text-sm text-error-500`,children:c}):(0,y.jsx)(`p`,{className:`text-sm text-neutral-500`,children:l})})]})})}function Dn({value:e,checked:n,onChange:r,label:i,name:a,disabled:o=!1,color:s=`primary`,size:c=`md`,className:l=``,children:u,...d}){let f=(0,t.useContext)(Tn),p=f?f.value===e:n===void 0?void 0:n,m=f?f.name:a,h=f&&f.disabled||o,g=c||f&&f.size||`md`,_=s||f&&f.color||`primary`,[v,b]=(0,t.useState)(!1),x=[`wc-radio`,`wc-radio--${g}`,h&&`wc-radio--disabled`,v&&`wc-radio--focused`,l].filter(Boolean).join(` `),S=[`wc-radio__button`,`wc-radio__button--${_}`,`wc-radio__button--${g}`,p&&`wc-radio__button--checked`].filter(Boolean).join(` `),C=()=>{h||(f?f.updateValue(e):r?.(e))},w=u||i;return(0,y.jsxs)(`label`,{className:x,children:[(0,y.jsx)(`input`,{type:`radio`,className:`wc-radio__input`,name:m,value:e,checked:p,disabled:h,onChange:C,onFocus:()=>b(!0),onBlur:()=>b(!1),...d}),(0,y.jsx)(`span`,{className:S,children:p&&(0,y.jsx)(`span`,{className:`radio-dot`})}),w&&(0,y.jsx)(`span`,{className:`radio-label`,children:w})]})}Dn.displayName=`Radio`,En.displayName=`RadioGroup`;var On=({value:e=0,max:n=5,readOnly:r=!1,onChange:i=()=>{},className:a=``,style:o={},...s})=>{let[c,l]=(0,t.useState)(0),[u,d]=(0,t.useState)(e);(0,t.useEffect)(()=>d(e),[e]),(0,t.useEffect)(()=>{if(document.getElementById(`wc-rating-style`))return;let e=document.createElement(`style`);e.id=`wc-rating-style`,e.innerHTML=`
|
|
3
|
+
Valid keys: `+JSON.stringify(Object.keys(e),null,` `));var p=f(l,d,o,s,c+`.`+d,i);if(p)return p}return null}return g(t)}function A(t){switch(typeof t){case`number`:case`string`:case`undefined`:return!0;case`boolean`:return!t;case`object`:if(Array.isArray(t))return t.every(A);if(t===null||e(t))return!0;var n=d(t);if(n){var r=n.call(t),i;if(n!==t.entries){for(;!(i=r.next()).done;)if(!A(i.value))return!1}else for(;!(i=r.next()).done;){var a=i.value;if(a&&!A(a[1]))return!1}}else return!1;return!0;default:return!1}}function j(e,t){return e===`symbol`?!0:t?t[`@@toStringTag`]===`Symbol`||typeof Symbol==`function`&&t instanceof Symbol:!1}function M(e){var t=typeof e;return Array.isArray(e)?`array`:e instanceof RegExp?`object`:j(t,e)?`symbol`:t}function N(e){if(e==null)return``+e;var t=M(e);if(t===`object`){if(e instanceof Date)return`date`;if(e instanceof RegExp)return`regexp`}return t}function P(e){var t=N(e);switch(t){case`array`:case`object`:return`an `+t;case`boolean`:case`date`:case`regexp`:return`a `+t;default:return t}}function F(e){return!e.constructor||!e.constructor.name?f:e.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p}})),Nt=u(((e,t)=>{var n=kt();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),Z=f(u(((e,t)=>{if(process.env.NODE_ENV!==`production`){var n=Dt();t.exports=Mt()(n.isElement,!0)}else t.exports=Nt()()}))(),1),Q=({className:e,style:t})=>(0,n.jsx)(`span`,{className:e,style:t}),Pt={lucide:`@zeturn/watercolor-icons-lucide-react`,heroicons:`@zeturn/watercolor-icons-heroicons-react`,tabler:`@zeturn/watercolor-icons-tabler-react`,phosphor:`@zeturn/watercolor-icons-phosphor-react`,feather:`@zeturn/watercolor-icons-feather`},$=e=>{let t=Pt[e];return t?import(t):Promise.resolve(null)},Ft=(e,n)=>(0,t.lazy)(()=>e().then(e=>({default:n(e||{})})).catch(e=>(console.warn(`[Icon] 动态导入失败,已回退到占位符图标。`,e),{default:Q}))),It=(e,t,n)=>{switch(e){case`lucide`:return Ft(()=>$(`lucide`),e=>e.getIcon?.(t)||Q);case`heroicons`:return Ft(()=>$(`heroicons`),e=>e.getIcon?.(t,n)||Q);case`tabler`:return Ft(()=>$(`tabler`),e=>e.getIcon?.(t)||Q);case`phosphor`:return Ft(()=>$(`phosphor`),e=>e.getIcon?.(t)||Q);default:return null}},Lt=e=>typeof e==`number`?e:{xs:16,sm:20,md:24,lg:32,xl:48}[e]||parseInt(e)||24,Rt=({library:e=`lucide`,name:r=``,html:i=``,size:a=24,color:o=`currentColor`,strokeWidth:s=2,variant:c=`outline`,className:l=``,children:u,...d})=>{let f=(0,t.useMemo)(()=>{if(!r)return null;try{return It(e,r,c)}catch{return console.warn(`Icon "${r}" not found in library "${e}"`),null}},[e,r,c]),p=(0,t.useMemo)(()=>e===`feather`&&r?(0,t.lazy)(async()=>{try{let e=Lt(a),{getFeatherSvg:t}=await $(`feather`)||{},i=await t(r,{width:e,height:e,strokeWidth:Number(s)});return{default:({className:e,style:t})=>(0,n.jsx)(`span`,{className:e,style:t,dangerouslySetInnerHTML:{__html:i}})}}catch{return console.warn(`Feather icon "${r}" not found`),{default:()=>(0,n.jsx)(`span`,{})}}}):null,[e,r,a,s]),m=(0,t.useMemo)(()=>e===`html`&&i?i:``,[e,i]),h=(0,t.useMemo)(()=>{let e={};if(o&&o!==`currentColor`&&(e.color=o),a){let t=Lt(a);e.width=`${t}px`,e.height=`${t}px`}return e},[o,a]),g=(0,t.useMemo)(()=>{let t={size:Lt(a),color:o,...d};return e===`lucide`&&(t.strokeWidth=s),e===`tabler`&&(t.stroke=s),t},[e,a,o,s,d]),_=`wc-icon ${l}`.trim();return p?(0,n.jsx)(t.Suspense,{fallback:(0,n.jsx)(`span`,{className:_,style:h}),children:(0,n.jsx)(p,{className:_,style:h})}):f?(0,n.jsx)(t.Suspense,{fallback:(0,n.jsx)(`span`,{className:_,style:h}),children:(0,n.jsx)(f,{className:_,style:h,...g})}):m?(0,n.jsx)(`span`,{className:_,style:h,dangerouslySetInnerHTML:{__html:m}}):(0,n.jsx)(`span`,{className:_,style:h,children:u})};Rt.propTypes={library:Z.default.oneOf([`lucide`,`heroicons`,`tabler`,`phosphor`,`feather`,`html`]),name:Z.default.string,html:Z.default.string,size:Z.default.oneOfType([Z.default.string,Z.default.number]),color:Z.default.string,strokeWidth:Z.default.oneOfType([Z.default.string,Z.default.number]),variant:Z.default.oneOf([`outline`,`solid`,`mini`]),className:Z.default.string,children:Z.default.node};var zt=({color:e=`default`,size:r=`md`,edge:i=!1,disabled:a=!1,icon:o=``,children:s,onClick:c,onFocus:l,onBlur:u,className:d=``,style:f={},...p})=>{let[m,h]=(0,t.useState)(!1),g=[`default`,`primary`,`secondary`,`error`,`warning`,`info`,`success`],_=[`sm`,`md`,`lg`],v=[!1,`start`,`end`];g.includes(e)||console.warn(`Invalid color "${e}" for IconButton component. Valid colors are: ${g.join(`, `)}`),_.includes(r)||console.warn(`Invalid size "${r}" for IconButton component. Valid sizes are: ${_.join(`, `)}`),v.includes(i)||console.warn(`Invalid edge "${i}" for IconButton component. Valid edges are: ${v.join(`, `)}`);let y=[`wc-icon-button`,`wc-icon-button--${e}`,`wc-icon-button--${r}`,i&&`wc-icon-button--edge-${i}`,a&&`wc-icon-button--disabled`,m&&`wc-icon-button--focused`,d].filter(Boolean).join(` `);return(0,n.jsx)(`button`,{className:y,disabled:a,onClick:e=>{!a&&c&&c(e)},onFocus:e=>{h(!0),l?.(e)},onBlur:e=>{h(!1),u?.(e)},style:f,...p,children:(0,n.jsx)(`span`,{className:`icon-button-icon`,children:o?(0,n.jsx)(`span`,{dangerouslySetInnerHTML:{__html:o}}):s})})};zt.displayName=`IconButton`;var Bt=({images:e=[],title:r=``,layout:i=`grid`,size:a=`md`,columns:o=3,gap:s=16,showInfo:c=!0,showCount:l=!0,showDownload:u=!1,showPagination:d=!1,itemsPerPage:f=12,lazyLoad:p=!0,loading:m=!1,className:h=``,style:g={},onSelect:_,onDownload:v,onLightboxOpen:y,onLightboxClose:b,...x})=>{let[S,C]=(0,t.useState)(-1),[w,T]=(0,t.useState)(1),E=d?Math.ceil(e.length/f):1,D={sm:`75%`,md:`66.67%`,lg:`56.25%`,xl:`50%`},O=d?e.slice((w-1)*f,w*f):e,k=t=>{let n=d?(w-1)*f+t:t;C(n);let r=e[n];_?.({index:n,image:r}),y?.({index:n,image:r})},A=e=>{v?.(e);let t=document.createElement(`a`);t.href=e.src,t.download=e.title||`image`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},j=()=>{C(-1),b?.()},M=()=>C(e=>e>0?e-1:e),N=()=>C(t=>t<e.length-1?t+1:t);return(0,t.useEffect)(()=>{let e=e=>{e.key===`Escape`&&j(),S!==-1&&(e.key===`ArrowLeft`&&M(),e.key===`ArrowRight`&&N())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[S]),(0,n.jsxs)(`div`,{className:[`image-gallery`,`gallery-layout-${i}`,`gallery-size-${a}`,m&&`gallery-loading`,h].filter(Boolean).join(` `),style:g,...x,children:[(r||l)&&(0,n.jsxs)(`div`,{className:`gallery-header`,children:[r&&(0,n.jsx)(`h2`,{className:`gallery-title`,children:r}),l&&(0,n.jsxs)(`div`,{className:`gallery-count`,children:[e.length,` 张图片`]})]}),(0,n.jsx)(`div`,{className:`gallery-grid`,style:i===`grid`?{gridTemplateColumns:`repeat(${o},1fr)`,gap:s}:i===`masonry`?{columnCount:o,columnGap:s}:{gap:s},children:O.map((e,t)=>(0,n.jsxs)(`div`,{className:`gallery-item`,onClick:()=>k(t),tabIndex:0,role:`button`,"aria-label":`查看图片 ${t+1}`,children:[(0,n.jsxs)(`div`,{className:`gallery-image-container`,style:{paddingBottom:D[a]},children:[(0,n.jsx)(`img`,{src:e.thumbnail||e.src,alt:e.alt||e.title,className:`gallery-image`,loading:p?`lazy`:`eager`}),(0,n.jsx)(`div`,{className:`gallery-overlay`,children:(0,n.jsxs)(`div`,{className:`gallery-overlay-content`,children:[(0,n.jsx)(`button`,{className:`gallery-action-btn gallery-view-btn`,"aria-label":`在灯箱中查看图片 ${t+1}`,onClick:e=>{e.stopPropagation(),k(t)},children:`👁️`}),u&&(0,n.jsx)(`button`,{className:`gallery-action-btn gallery-download-btn`,"aria-label":`下载图片 ${t+1}`,onClick:t=>{t.stopPropagation(),A(e)},children:`📥`})]})})]}),c&&(e.title||e.description)&&(0,n.jsxs)(`div`,{className:`gallery-info`,children:[e.title&&(0,n.jsx)(`div`,{className:`gallery-info-title`,children:e.title}),e.description&&(0,n.jsx)(`div`,{className:`gallery-info-description`,children:e.description})]})]},e.id||t))}),d&&E>1&&(0,n.jsxs)(`div`,{className:`gallery-pagination`,children:[(0,n.jsx)(`button`,{className:`gallery-page-btn`,disabled:w===1,onClick:()=>T(e=>e-1),children:`上一页`}),(0,n.jsxs)(`span`,{className:`gallery-page-info`,children:[`第 `,w,` 页,共 `,E,` 页`]}),(0,n.jsx)(`button`,{className:`gallery-page-btn`,disabled:w===E,onClick:()=>T(e=>e+1),children:`下一页`})]}),S!==-1&&(0,n.jsx)(`div`,{className:`gallery-lightbox`,onClick:j,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`lightbox-title`,children:(0,n.jsxs)(`div`,{className:`gallery-lightbox-content`,onClick:e=>e.stopPropagation(),children:[(0,n.jsx)(`button`,{className:`gallery-lightbox-close`,onClick:j,children:`✕`}),(0,n.jsx)(`div`,{className:`gallery-lightbox-image-container`,children:(0,n.jsx)(`img`,{src:e[S].src,alt:e[S].alt,className:`gallery-lightbox-image`})}),(e[S].title||e[S].description)&&(0,n.jsxs)(`div`,{className:`gallery-lightbox-info`,children:[e[S].title&&(0,n.jsx)(`h3`,{id:`lightbox-title`,className:`gallery-lightbox-title`,children:e[S].title}),e[S].description&&(0,n.jsx)(`p`,{className:`gallery-lightbox-description`,children:e[S].description})]}),(0,n.jsxs)(`div`,{className:`gallery-lightbox-navigation`,children:[(0,n.jsx)(`button`,{className:`gallery-lightbox-nav gallery-lightbox-prev`,disabled:S===0,"aria-label":`上一张图片`,onClick:M,children:`‹`}),(0,n.jsxs)(`span`,{className:`gallery-lightbox-counter`,children:[S+1,` / `,e.length]}),(0,n.jsx)(`button`,{className:`gallery-lightbox-nav gallery-lightbox-next`,disabled:S===e.length-1,"aria-label":`下一张图片`,onClick:N,children:`›`})]}),u&&(0,n.jsx)(`button`,{className:`gallery-action-btn gallery-download-btn`,onClick:()=>A(e[S]),children:`下载`})]})})]})};Bt.displayName=`ImageGallery`;var Vt=({value:e=``,onChange:r,type:i=`text`,placeholder:a=``,disabled:o=!1,readonly:s=!1,required:c=!1,autoFocus:l=!1,maxLength:u,minLength:d,size:f=`md`,variant:p=`filled`,color:m=`primary`,error:h=!1,helperText:g=``,label:_=``,startAdornment:v=null,endAdornment:y=null,fullWidth:b=!1,multiline:x=!1,rows:S=4,autoComplete:C=`off`,name:w=``,id:T=``,className:E=``,style:D={},onFocus:O,onBlur:k,onKeyDown:A,onKeyUp:j,onKeyPress:M,...N})=>{let[P,F]=(0,t.useState)(!1),[I,L]=(0,t.useState)(!!e),R=(0,t.useRef)(null),z=(0,t.useId)(),B=T||z;return(0,t.useEffect)(()=>{L(!!e)},[e]),(0,t.useEffect)(()=>{l&&R.current&&R.current.focus()},[l]),(0,n.jsxs)(`div`,{className:`wc-input-container`,children:[_&&(0,n.jsxs)(`label`,{htmlFor:B,className:`wc-input-label ${P||I?`wc-input-label--active`:``} ${h?`wc-input-label--error`:``}`,children:[_,c&&(0,n.jsx)(`span`,{className:`wc-input-label__required`,children:`*`})]}),(0,n.jsxs)(`div`,{className:`wc-input-wrapper`,children:[v&&(0,n.jsx)(`div`,{className:`wc-input-adornment wc-input-adornment--start`,children:v}),(0,n.jsx)(x?`textarea`:`input`,{ref:R,className:(()=>{let e=[`wc-input`];return e.push(`wc-input--${f}`),e.push(`wc-input--${p}`),h&&e.push(`wc-input--error`),o&&e.push(`wc-input--disabled`),s&&e.push(`wc-input--readonly`),P&&e.push(`wc-input--focused`),I&&e.push(`wc-input--has-value`),b&&e.push(`wc-input--full-width`),v&&e.push(`wc-input--has-start-adornment`),y&&e.push(`wc-input--has-end-adornment`),e.concat(E).filter(Boolean).join(` `)})(),style:{...D},type:x?void 0:i,value:e,onChange:e=>{let t=e.target.value;L(!!t),r?.(e)},onFocus:e=>{F(!0),O?.(e)},onBlur:e=>{F(!1),k?.(e)},onKeyDown:A,onKeyUp:j,onKeyPress:M,placeholder:a,disabled:o,readOnly:s,required:c,maxLength:u,minLength:d,rows:x?S:void 0,autoComplete:C,name:w,id:B,...N}),y&&(0,n.jsx)(`div`,{className:`wc-input-adornment wc-input-adornment--end`,children:y})]}),(g||h)&&(0,n.jsx)(`div`,{className:`wc-input-helper-text ${h?`wc-input-helper-text--error`:``}`,children:h||g})]})};Vt.displayName=`Input`;var Ht=e=>{let{dense:t=!1,disablePadding:n=!1,variant:r,className:i=``}=e,a=[`list`];return t&&a.push(`list--dense`),n&&a.push(`list--no-padding`),r&&a.push(`list--${r}`),i&&a.push(i),a},Ut=e=>{let{button:t=!1,disabled:n=!1,divider:r=!1,dense:i=!1,selected:a=!1,disableGutters:o=!1,draggable:s=!1,multiselect:c=!1,className:l=``}=e,u=[`list-item`];return t&&u.push(`list-item--button`),n&&u.push(`list-item--disabled`),r&&u.push(`list-item--divider`),i&&u.push(`list-item--dense`),a&&u.push(`list-item--selected`),o&&u.push(`list-item--no-gutters`),s&&u.push(`list-item--draggable`),c&&u.push(`list-item--multiselect`),l&&u.push(l),u},Wt=e=>{let{position:t=`start`,className:n=``}=e,r=[`list-item-icon`];return t&&r.push(`list-item-icon--${t}`),n&&r.push(n),r},Gt=e=>{let{inset:t=!1,className:n=``}=e,r=[`list-item-text`];return t&&r.push(`list-item-text--inset`),n&&r.push(n),r},Kt=(0,t.createContext)({dense:!1}),qt=({children:e,dense:t=!1,disablePadding:r=!1,nav:i=!1,subheader:a=``,className:o=``,...s})=>{let c=Ht({dense:t,disablePadding:r,className:o}).join(` `);return(0,n.jsx)(Kt.Provider,{value:{dense:t},children:(0,n.jsx)(`div`,{role:i?`navigation`:`list`,className:c,...s,children:e})})},Jt=({children:e,button:r=!1,disabled:i=!1,divider:a=!1,selected:o=!1,disableGutters:s=!1,multiselect:c=!1,component:l,className:u=``,...d})=>{let{dense:f}=(0,t.useContext)(Kt)||{dense:!1},p=Ut({button:r,disabled:i,divider:a,dense:f,selected:o,disableGutters:s,multiselect:c,className:u}).join(` `);return(0,n.jsx)(l||(r?`button`:`div`),{role:`listitem`,className:p,disabled:r&&i,...d,children:e})},Yt=({children:e,position:t=`start`,className:r=``,...i})=>(0,n.jsx)(`span`,{className:Wt({position:t,className:r}).join(` `),...i,children:e}),Xt=({primary:e=``,secondary:t=``,inset:r=!1,className:i=``,...a})=>(0,n.jsxs)(`div`,{className:Gt({inset:r,className:i}).join(` `),...a,children:[e&&(0,n.jsx)(`p`,{className:`list-item-text-primary`,children:e}),t&&(0,n.jsx)(`p`,{className:`list-item-text-secondary`,children:t})]}),Zt=({size:e,variant:t,disabled:n,className:r})=>{let i=[`wc-menu`,`wc-menu--${e}`,`wc-menu--${t}`];return n&&i.push(`wc-menu--disabled`),r&&i.push(r),i},Qt=(e,t)=>[`wc-menu__menu`,`wc-menu__menu--${e}`,t],$t=({disabled:e})=>[`wc-menu__button`,e?`wc-menu__button--disabled`:``],en=e=>{let t=[`wc-menu__item`];return e.divider&&t.push(`wc-menu__divider`),e.disabled&&t.push(`wc-menu__item--disabled`),t},tn=e=>[`wc-menu__arrow`,e?`wc-menu__arrow--open`:``],nn=(e,t,n,r,i)=>{t||(n(!e),e?i&&i():r&&r())},rn=(e,t,n,r,i)=>{e.disabled||e.divider||(n&&n(e,t),r(!1),i&&i())},an=e=>{let t=t=>{e(t)};return{add:()=>document.addEventListener(`click`,t),remove:()=>document.removeEventListener(`click`,t)}},on=({items:e=[],triggerText:r=`选择选项`,placement:i=`bottom-start`,size:a=`md`,variant:o=`default`,disabled:s=!1,trigger:c=`click`,illustration:l=``,illustrationAlt:u=`示意图`,cardTitle:d=``,cardDescription:f=``,onSelect:p,onOpen:m,onClose:h,children:g,triggerContent:_,menuContent:v,className:y=``,...b})=>{let[x,S]=(0,t.useState)(!1),C=(0,t.useRef)(null),w=(0,t.useRef)(null),T=Zt({size:a,variant:o,disabled:s,className:y}).join(` `),E=Qt(i,o===`card`?`wc-menu__menu--card`:``).join(` `),D=$t({disabled:s}).join(` `),O=tn(x).join(` `),k=o===`card`?{minWidth:`320px`,maxWidth:`450px`}:{minWidth:`120px`},A=()=>{nn(x,s,S,m,h)},j=(e,t)=>{rn(e,t,p,S,h)},M=an(e=>{C.current&&!C.current.contains(e.target)&&(S(!1),h&&h())});return(0,t.useEffect)(()=>(x?M.add():M.remove(),()=>M.remove()),[x]),(0,n.jsxs)(`div`,{className:T,ref:C,...b,style:{backgroundColor:`var(--wc-bg-surface)`,color:`var(--wc-text-primary)`},children:[(0,n.jsx)(`div`,{className:`wc-menu__trigger`,onClick:A,ref:w,children:_||g||(0,n.jsxs)(`button`,{className:D,children:[r,(0,n.jsx)(`span`,{className:O,children:(0,n.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,n.jsx)(`polyline`,{points:`6,9 12,15 18,9`})})})]})}),x&&(0,n.jsx)(`div`,{className:E,style:k,children:v||(o===`card`?(0,n.jsxs)(`div`,{className:`wc-menu__card`,children:[(0,n.jsxs)(`div`,{className:`wc-menu__card-illustration`,children:[l?(0,n.jsx)(`img`,{src:l,alt:u,className:`wc-menu__illustration-image`}):(0,n.jsx)(`div`,{className:`wc-menu__illustration-placeholder`,children:(0,n.jsx)(`span`,{children:`🎨`})}),(d||f)&&(0,n.jsxs)(`div`,{className:`wc-menu__card-info`,children:[d&&(0,n.jsx)(`h4`,{className:`wc-menu__card-title`,children:d}),f&&(0,n.jsx)(`p`,{className:`wc-menu__card-description`,children:f})]})]}),(0,n.jsx)(`div`,{className:`wc-menu__card-list`,children:e.map((e,t)=>e.divider?(0,n.jsx)(`div`,{className:`wc-menu__divider`},e.key||t):(0,n.jsxs)(`div`,{className:en(e).join(` `),onClick:()=>j(e,t),children:[e.icon&&(0,n.jsx)(`span`,{className:`wc-menu__icon`,children:e.icon}),(0,n.jsx)(`span`,{className:`wc-menu__label`,children:e.label})]},e.key||t))})]}):e.map((e,t)=>e.divider?(0,n.jsx)(`div`,{className:`wc-menu__divider`},e.key||t):(0,n.jsxs)(`div`,{className:en(e).join(` `),onClick:()=>j(e,t),children:[e.icon&&(0,n.jsx)(`span`,{className:`wc-menu__icon`,children:e.icon}),(0,n.jsx)(`span`,{className:`wc-menu__label`,children:e.label})]},e.key||t)))})]})};on.displayName=`Menu`;function sn({size:e=`md`,fullWidth:t=!1,fullScreen:n=!1,scroll:r=`paper`,position:i=`center`,className:a=``}={}){let o=[`wc-modal`];return e&&!n&&o.push(`wc-modal--${e}`),n&&o.push(`wc-modal--fullscreen`),t&&!n&&o.push(`wc-modal--full-width`),r===`body`?o.push(`wc-modal--scroll-body`):o.push(`wc-modal--scroll-paper`),i&&i!==`center`&&o.push(`wc-modal--${i}`),a&&o.push(a),o.filter(Boolean).join(` `)}function cn({centered:e=!0,position:t=`center`}={}){let n=[`wc-modal-overlay`];return(e||t===`center`)&&n.push(`wc-modal-overlay--centered`),t&&t!==`center`&&n.push(`wc-modal-overlay--${t}`),n.join(` `)}function ln(e,t,n=0){e(!1),t&&(n>0?setTimeout(()=>{t()},n):t())}function un(e,t,n){e.key===`Escape`&&t&&n()}function dn(e){if(e){let t=e.querySelectorAll(`button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`);t.length>0?t[0].focus():e.focus()}}function fn(e){if(!e)return()=>{};let t=e.querySelectorAll(`button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`),n=t[0],r=t[t.length-1],i=e=>{e.key===`Tab`&&(e.shiftKey?document.activeElement===n&&(e.preventDefault(),r?.focus()):document.activeElement===r&&(e.preventDefault(),n?.focus()))};return e.addEventListener(`keydown`,i),()=>{e.removeEventListener(`keydown`,i)}}var pn=({visible:e=!1,open:i=!1,title:a=``,size:o=`md`,maxWidth:s=null,closable:c=!0,showCloseButton:l=!0,maskClosable:u=!0,closeOnOverlay:d=!0,disableBackdropClick:f=!1,disableEscapeKeyDown:p=!1,centered:m=!0,fullWidth:h=!1,fullScreen:g=!1,position:_=`center`,scroll:v=`paper`,lockScroll:y=!0,zIndex:b=1e3,showOverlay:x=!0,className:S=``,onClose:C,children:w,header:T,footer:E,...D})=>{let[O,k]=(0,t.useState)(e||i),A=(0,t.useRef)(null),j=(0,t.useRef)(null),M=(0,t.useRef)(null),N=e||i;(0,t.useEffect)(()=>{k(N)},[N]);let P=sn({size:s||o,fullWidth:h,fullScreen:g,scroll:v,position:_,className:S}),F=cn({centered:_===`center`||m,position:_}),I=()=>{ln(k,C)},L=()=>{(u||d)&&!f&&I()},R=e=>{un(e,c&&!p,I)};if((0,t.useEffect)(()=>{if(O)return j.current=document.activeElement,setTimeout(()=>{A.current&&(dn(A.current),M.current=fn(A.current))},100),document.addEventListener(`keydown`,R),y&&(document.body.style.overflow=`hidden`),()=>{document.removeEventListener(`keydown`,R),M.current&&=(M.current(),null),j.current&&j.current.focus&&j.current.focus(),y&&(document.body.style.overflow=``)}},[O,c,p,y]),!O)return null;let z=c&&l!==!1;return(0,r.createPortal)((0,n.jsxs)(`div`,{className:F,style:{zIndex:b},onClick:L,"data-testid":`modal-overlay`,children:[x&&(0,n.jsx)(`div`,{className:`wc-modal__overlay`}),(0,n.jsxs)(`div`,{ref:A,className:P,onClick:e=>e.stopPropagation(),role:`dialog`,"aria-modal":`true`,"aria-labelledby":a?`modal-title`:void 0,tabIndex:-1,...D,children:[z&&(0,n.jsx)(ve,{variant:`text`,size:`sm`,className:`wc-modal__close`,onClick:I,"aria-label":`关闭`,children:`×`}),(a||T)&&(0,n.jsx)(`div`,{className:`wc-modal__header`,children:T||a&&(0,n.jsx)(`h3`,{id:`modal-title`,className:`wc-modal__title`,children:a})}),(0,n.jsx)(`div`,{className:`wc-modal__body`,children:w}),E&&(0,n.jsx)(`div`,{className:`wc-modal__footer`,children:E})]})]}),document.body)};pn.displayName=`Modal`;var mn=({active:e=!0,duration:r=3e3,from:i=0,to:a,locale:o=``,precision:s=0,showSeparator:c=!1,prefix:l=``,suffix:u=``,separator:d=``,formatter:f=null,easing:p=`linear`,onFinish:m,className:h=``,style:g={},..._})=>{let[v,y]=(0,t.useState)(i),[b,x]=(0,t.useState)(!1),S=(0,t.useRef)(null),C=(0,t.useRef)(null),w=t=>{S.current===null&&(S.current=t);let n=Math.min((t-S.current)/r,1);y(i+(a-i)*n),n<1&&e?C.current=requestAnimationFrame(w):(y(a),x(!1),m?.())},T=()=>{E(),S.current=null,e?(x(!0),C.current=requestAnimationFrame(w)):(y(a),x(!1))},E=()=>{C.current&&=(cancelAnimationFrame(C.current),null)};(0,t.useEffect)(()=>(T(),E),[e,i,a,r]);let D=e=>{if(f)return f(e);let t=e.toFixed(s),n=t;if(c||d)if(d){let e=t.split(`.`);e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,d),n=e.join(`.`)}else n=Number(t).toLocaleString(o||void 0,{minimumFractionDigits:s,maximumFractionDigits:s});return`${l}${n}${u}`};return(0,n.jsx)(`span`,{className:[`wc-number-animation`,b?`wc-number-animation--playing`:``,p&&[`ease-in`,`ease-out`,`ease-in-out`].includes(p)?`wc-number-animation--${p}`:``,h].filter(Boolean).join(` `),style:g,..._,children:D(v)})};function hn({value:e=1,onChange:r,total:i,pageSize:a=10,siblingCount:o=1,boundaryCount:s=1,size:c=`md`,className:l=``,...u}){let[d,f]=(0,t.useState)(e);(0,t.useEffect)(()=>{f(e)},[e]);let p=(0,t.useMemo)(()=>Math.max(1,Math.ceil(i/a)),[i,a]),m=(e,t)=>{let n=[];for(let r=e;r<=t;r++)n.push(r);return n},h=(0,t.useMemo)(()=>{if(p<=o*2+3+s*2)return m(1,p).map(e=>({key:e,num:e}));let e=Math.max(d-o,s+2),t=Math.min(d+o,p-s-1),n=e>s+2,r=t<p-s-1,i=[];for(let e=1;e<=s;e++)i.push({key:`b`+e,num:e});n&&i.push({key:`l-ellipsis`,ellipsis:!0});for(let n=e;n<=t;n++)i.push({key:`m`+n,num:n});r&&i.push({key:`r-ellipsis`,ellipsis:!0});for(let e=p-s+1;e<=p;e++)i.push({key:`e`+e,num:e});return i},[d,p,o,s]),g=(0,t.useCallback)(e=>{e<1||e>p||e===d||(f(e),r?.(e))},[d,p,r]);return p<=1?null:(0,n.jsxs)(`nav`,{className:[`pagination`,`wc-pagination`,c===`md`?``:`wc-pagination--${c}`,l].filter(Boolean).join(` `),"aria-label":`分页导航`,...u,children:[(0,n.jsx)(`button`,{className:`page-btn wc-page-btn wc-page-btn--prev wc-page-btn--nav`,disabled:d===1,onClick:()=>g(d-1),"aria-label":`上一页`,children:`‹`}),h.map(e=>e.ellipsis?(0,n.jsx)(`span`,{className:`page-ellipsis`,children:`…`},e.key):(0,n.jsx)(`button`,{className:`page-btn wc-page-btn${e.num===d?` active wc-page-btn--active`:``}`,onClick:()=>g(e.num),children:e.num},e.key)),(0,n.jsx)(`button`,{className:`page-btn wc-page-btn wc-page-btn--next wc-page-btn--nav`,disabled:d===p,onClick:()=>g(d+1),"aria-label":`下一页`,children:`›`})]})}var gn={ELEVATION:`elevation`,OUTLINED:`outlined`},_n={SQUARE:`square`,ROUNDED_SM:`rounded-sm`,ROUNDED_LG:`rounded-lg`,ROUNDED_XL:`rounded-xl`,ROUNDED_2XL:`rounded-2xl`,ROUNDED_FULL:`rounded-full`},vn={SM:`sm`,MD:`md`,LG:`lg`,XL:`xl`},yn={DEFAULT:`default`,PRIMARY:`primary`,SUCCESS:`success`,WARNING:`warning`,ERROR:`error`,INFO:`info`};function bn(e={}){let{variant:t=gn.ELEVATION,elevation:n=1,square:r=!1,shape:i=null,size:a=null,color:o=yn.DEFAULT,hoverable:s=!1,clickable:c=!1,gradient:l=!1,frosted:u=!1,textured:d=!1,className:f=``}=e,p=[`wc-paper`];if(t===gn.OUTLINED)p.push(`wc-paper--outlined`);else{p.push(`wc-paper--elevation`);let e=Math.max(0,Math.min(24,Math.floor(Number(n)||0)));p.push(`wc-paper--elevation-${e}`)}return r?p.push(`wc-paper--square`):i&&_n[i.toUpperCase()]&&p.push(`wc-paper--${i}`),a&&vn[a.toUpperCase()]&&p.push(`wc-paper--${a}`),o!==yn.DEFAULT&&yn[o.toUpperCase()]&&p.push(`wc-paper--${o}`),s&&p.push(`wc-paper--hoverable`),c&&p.push(`wc-paper--clickable`),l&&p.push(`wc-paper--gradient`),u&&p.push(`wc-paper--frosted`),d&&p.push(`wc-paper--textured`),f&&p.push(f),p.join(` `)}function xn({variant:e=`elevation`,elevation:t=1,square:r=!1,hoverable:i=!1,clickable:a=!1,color:o=`default`,size:s=null,className:c=``,children:l,onClick:u,onMouseEnter:d,onMouseLeave:f,...p}){let m=bn({variant:e,elevation:Math.max(0,Math.min(24,Math.floor(Number(t)||0))),square:r,hoverable:i,clickable:a,color:o,size:s,className:c});return(0,n.jsx)(`div`,{className:m,onClick:e=>{a&&u&&u(e)},onMouseEnter:d,onMouseLeave:f,style:{cursor:a?`pointer`:`default`,...p.style},...p,children:l})}function Sn({open:e,onOpenChange:i,triggerText:a=`打开弹窗`,trigger:o,placement:s=`bottom`,offset:c=8,children:l,className:u=``}){let[d,f]=(0,t.useState)(!1),p=e!=null,m=(0,t.useRef)(null),h=(0,t.useRef)(null),g=p?e:d,_=e=>{p||f(e),i?.(e)},v=()=>_(!1),y=()=>{_(!g)},b=(0,t.useCallback)(()=>{let e=m.current,t=h.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=0,a=0;switch(s){case`top`:i=n.top-r.height-c,a=n.left+(n.width-r.width)/2;break;case`bottom`:i=n.bottom+c,a=n.left+(n.width-r.width)/2;break;case`left`:i=n.top+(n.height-r.height)/2,a=n.left-r.width-c;break;case`right`:i=n.top+(n.height-r.height)/2,a=n.right+c;break;default:break}t.style.top=`${i+window.scrollY}px`,t.style.left=`${a+window.scrollX}px`},[s,c]);(0,t.useEffect)(()=>{},[p,e]),(0,t.useEffect)(()=>(g&&(b(),window.addEventListener(`resize`,b),window.addEventListener(`scroll`,b),document.addEventListener(`mousedown`,x)),()=>{window.removeEventListener(`resize`,b),window.removeEventListener(`scroll`,b),document.removeEventListener(`mousedown`,x)}),[g,b]);let x=e=>{h.current&&!h.current.contains(e.target)&&!m.current.contains(e.target)&&v()},S=o?t.default.cloneElement(o,{ref:m,onClick:y,"aria-expanded":g}):(0,n.jsx)(`button`,{ref:m,className:`wc-popover-trigger`,onClick:y,"aria-expanded":g,children:a});return(0,n.jsxs)(`div`,{className:`wc-popover-container ${u}`.trim(),children:[S,g&&r.default.createPortal((0,n.jsx)(`div`,{ref:h,className:`wc-popover-content wc-popover-content--${s}`.trim(),role:`dialog`,children:l}),document.body)]})}function Cn({plans:e=[],columns:t=3,className:r=``}){let i={gridTemplateColumns:`repeat(${t}, minmax(0,1fr))`};return(0,n.jsx)(`div`,{className:`pricing-grid ${r}`.trim(),style:i,children:e.map(e=>(0,n.jsxs)(`div`,{className:`plan-card${e.popular?` popular`:``}`,children:[(0,n.jsx)(`h3`,{className:`plan-name`,children:e.name}),(0,n.jsx)(`p`,{className:`plan-price`,children:e.price}),(0,n.jsx)(`ul`,{className:`plan-features`,children:e.features?.map(e=>(0,n.jsx)(`li`,{children:e},e))}),(0,n.jsx)(`button`,{className:`plan-btn`,children:e.button||`选择`})]},e.name))})}var wn=({value:e=0,label:t=``,showPercent:r=!1,color:i=`primary`,size:a=`md`,animated:o=!1,className:s=``,...c})=>{let l=[`primary`,`success`,`warning`,`error`,`purple`,`orange`,`cyan`,`pink`].includes(i)?i:`primary`,u=Math.max(0,Math.min(100,e)),d=[`wc-progress`,`wc-progress--${a}`],f=[`wc-progress__bar`,`wc-progress__bar--${l}`,o&&`wc-progress__bar--animated`].filter(Boolean).join(` `),p={width:`${u}%`};return(0,n.jsxs)(`div`,{className:`wc-progress-wrapper ${s}`,...c,children:[(t||r)&&(0,n.jsxs)(`div`,{className:`wc-progress-header`,children:[t&&(0,n.jsx)(`label`,{className:`wc-progress-label`,children:t}),r&&(0,n.jsxs)(`span`,{className:`wc-progress-percent`,children:[Math.round(u),`%`]})]}),(0,n.jsx)(`div`,{className:d.join(` `),children:(0,n.jsx)(`div`,{className:f,style:p})})]})};wn.displayName=`Progress`;var Tn=(0,t.createContext)(null);function En({value:e,onChange:r,name:i,disabled:a=!1,label:o=``,row:s=!1,required:c=!1,error:l=``,helperText:u=``,size:d=`md`,color:f=`primary`,children:p,className:m=``}){let[h,g]=(0,t.useState)(e),_=e!==void 0,v=_?e:h,y=(0,t.useCallback)(e=>{a||(_||g(e),r?.(e))},[a,_,r]),b=[`wc-radio-group`,m].filter(Boolean).join(` `),x=[`wc-radio-group-content`,s?`flex flex-wrap gap-4`:`space-y-2`].filter(Boolean).join(` `);return(0,n.jsx)(Tn.Provider,{value:{value:v,updateValue:y,name:i,disabled:a,size:d,color:f},children:(0,n.jsxs)(`div`,{className:b,children:[o&&(0,n.jsxs)(`label`,{className:`wc-radio-group-label`,children:[o,c&&(0,n.jsx)(`span`,{className:`text-error-500`,children:`*`})]}),(0,n.jsx)(`div`,{className:x,children:p}),(l||u)&&(0,n.jsx)(`div`,{className:`mt-2`,children:l?(0,n.jsx)(`p`,{className:`text-sm text-error-500`,children:l}):(0,n.jsx)(`p`,{className:`text-sm text-neutral-500`,children:u})})]})})}function Dn({value:e,checked:r,onChange:i,label:a,name:o,disabled:s=!1,color:c=`primary`,size:l=`md`,className:u=``,children:d,...f}){let p=(0,t.useContext)(Tn),m=p?p.value===e:r===void 0?void 0:r,h=p?p.name:o,g=p&&p.disabled||s,_=l||p&&p.size||`md`,v=c||p&&p.color||`primary`,[y,b]=(0,t.useState)(!1),x=[`wc-radio`,`wc-radio--${_}`,g&&`wc-radio--disabled`,y&&`wc-radio--focused`,u].filter(Boolean).join(` `),S=[`wc-radio__button`,`wc-radio__button--${v}`,`wc-radio__button--${_}`,m&&`wc-radio__button--checked`].filter(Boolean).join(` `),C=()=>{g||(p?p.updateValue(e):i?.(e))},w=d||a;return(0,n.jsxs)(`label`,{className:x,children:[(0,n.jsx)(`input`,{type:`radio`,className:`wc-radio__input`,name:h,value:e,checked:m,disabled:g,onChange:C,onFocus:()=>b(!0),onBlur:()=>b(!1),...f}),(0,n.jsx)(`span`,{className:S,children:m&&(0,n.jsx)(`span`,{className:`radio-dot`})}),w&&(0,n.jsx)(`span`,{className:`radio-label`,children:w})]})}Dn.displayName=`Radio`,En.displayName=`RadioGroup`;var On=({value:e=0,max:r=5,readOnly:i=!1,onChange:a=()=>{},className:o=``,style:s={},...c})=>{let[l,u]=(0,t.useState)(0),[d,f]=(0,t.useState)(e);(0,t.useEffect)(()=>f(e),[e]),(0,t.useEffect)(()=>{if(document.getElementById(`wc-rating-style`))return;let e=document.createElement(`style`);e.id=`wc-rating-style`,e.innerHTML=`
|
|
19
4
|
.wc-rating{display:inline-flex;gap:4px;}
|
|
20
5
|
.wc-rating-item{background:none;border:none;cursor:pointer;font-size:1.5rem;line-height:1;padding:0;color:var(--wc-neutral-300);transition:color 0.2s ease;}
|
|
21
6
|
.wc-rating-item.active{color:var(--wc-warning-500);}
|
|
@@ -23,7 +8,7 @@ Valid keys: `+JSON.stringify(Object.keys(e),null,` `));var p=f(l,d,o,s,c+`.`+d,
|
|
|
23
8
|
.wc-rating-item:disabled{cursor:default;}
|
|
24
9
|
.dark .wc-rating-item{color:var(--wc-neutral-500);}
|
|
25
10
|
.dark .wc-rating-item.active{color:var(--wc-warning-400);}
|
|
26
|
-
`,document.head.appendChild(e)},[]);let
|
|
11
|
+
`,document.head.appendChild(e)},[]);let p=e=>{if(i)return;let t=e===d?0:e;f(t),a(t)},m=e=>{i||u(e)},h=[];for(let e=1;e<=r;e++){let t=e<=l||e<=d;h.push((0,n.jsx)(`button`,{type:`button`,className:`wc-rating-item ${t?`active`:``}`,onMouseEnter:()=>m(e),onMouseLeave:()=>m(0),onClick:()=>p(e),disabled:i,"aria-checked":e===d,role:`radio`,children:t?`★`:`☆`},e))}return(0,n.jsx)(`div`,{className:`wc-rating ${o}`,role:`radiogroup`,"aria-label":`评分组件`,style:s,...c,children:h})},kn=({value:e=``,onChange:r,options:i=[],placeholder:a=`Select an option`,label:o=``,helperText:s=``,error:c=!1,errorMessage:l=``,required:u=!1,disabled:d=!1,multiple:f=!1,clearable:p=!1,fullWidth:m=!1,size:h=`md`,variant:g=`filled`,color:_=`primary`,maxHeight:v=200,name:y=``,id:b=``,className:x=``,style:S={},onFocus:C,onBlur:w,onSearch:T,renderOption:E,renderValue:D,...O})=>{let[k,A]=(0,t.useState)(!1),[j,M]=(0,t.useState)(!1),N=(0,t.useRef)(null),P=(0,t.useRef)(null);(0,t.useEffect)(()=>{let e=e=>{N.current&&!N.current.contains(e.target)&&(A(!1),M(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]);let F=f?i.filter(t=>e.includes(t.value)):i.find(t=>t.value===e),I=()=>{let e={...S};return g===`outlined`?e.borderColor=c?`var(--wc-error-500)`:`var(--wc-${_}-500)`:g===`filled`&&(e.backgroundColor=`var(--wc-neutral-50)`),e},L=()=>{d||(A(!k),M(!k))},R=t=>{if(t.disabled)return;let n;if(f){let r=Array.isArray(e)?e:[];n=r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]}else n=t.value,A(!1),M(!1);r?.({target:{name:y,value:n}})},z=e=>{e.stopPropagation(),r?.({target:{name:y,value:f?[]:``}})},B=e=>{M(!0),C?.(e)},V=e=>{setTimeout(()=>{N.current?.contains(document.activeElement)||(M(!1),w?.(e))},100)},H=()=>f&&Array.isArray(F)?F.length===0?(0,n.jsx)(`span`,{className:`wc-select__placeholder`,children:a}):(0,n.jsx)(`div`,{className:`wc-select__chips`,children:F.map(e=>(0,n.jsx)(`span`,{className:`wc-select__chip`,children:D?D(e):e.label||e.value},e.value))}):F?D?D(F):F.label||F.value:(0,n.jsx)(`span`,{className:`wc-select__placeholder`,children:a}),U=()=>{let e=[`wc-select__label`];return e.push(`wc-select__label--${h}`),c&&e.push(`wc-select__label--error`),(j||F)&&e.push(`wc-select__label--active`),e.join(` `)},W=()=>{let e=[`wc-select__container`];return e.push(`wc-select__container--${g}`),e.push(`wc-select__container--${h}`),d&&e.push(`wc-select__container--disabled`),c&&e.push(`wc-select__container--error`),j&&e.push(`wc-select__container--focused`),k&&e.push(`wc-select__container--open`),e.join(` `)},G=(e,t)=>{let n=[`wc-select__option`];return t&&n.push(`wc-select__option--selected`),e.disabled&&n.push(`wc-select__option--disabled`),n.join(` `)},K=b||y||`select-${Math.random().toString(36).substr(2,9)}`;return(0,n.jsxs)(`div`,{className:`wc-select`,ref:N,children:[o&&(0,n.jsxs)(`label`,{htmlFor:K,className:U(),children:[o,u&&(0,n.jsx)(`span`,{className:`wc-select__required`,children:`*`})]}),(0,n.jsxs)(`div`,{className:W(),children:[(0,n.jsxs)(`div`,{className:`wc-select__control`,style:I(),onClick:L,onFocus:B,onBlur:V,tabIndex:d?-1:0,role:`combobox`,"aria-expanded":k,"aria-haspopup":`listbox`,"aria-labelledby":o?`${K}-label`:void 0,children:[(0,n.jsx)(`div`,{className:`wc-select__value`,children:H()}),(0,n.jsxs)(`div`,{className:`wc-select__indicators`,children:[p&&(F||f&&e?.length>0)&&(0,n.jsx)(`button`,{type:`button`,className:`wc-select__clear`,onClick:z,tabIndex:-1,children:`×`}),(0,n.jsx)(`div`,{className:`wc-select__arrow${k?` wc-select__arrow--open`:``}`,children:`▼`})]})]}),k&&(0,n.jsx)(`div`,{className:`wc-select__dropdown`,style:{maxHeight:v},ref:P,children:(0,n.jsx)(`div`,{className:`wc-select__options`,role:`listbox`,children:i.length===0?(0,n.jsx)(`div`,{className:`wc-select__no-options`,children:`没有可选项`}):i.map((t,r)=>{let i=f?Array.isArray(e)&&e.includes(t.value):e===t.value;return(0,n.jsxs)(`div`,{className:G(t,i),onClick:()=>R(t),role:`option`,"aria-selected":i,children:[(0,n.jsx)(`span`,{className:`wc-select__option-text`,children:E?E(t):t.label||t.value}),i&&(0,n.jsx)(`svg`,{className:`wc-select__option-check`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,n.jsx)(`polyline`,{points:`20,6 9,17 4,12`})})]},t.value||r)})})})]}),(c||s)&&(0,n.jsx)(`div`,{children:c?(0,n.jsx)(`p`,{className:`wc-select__error`,children:l||c}):(0,n.jsx)(`p`,{className:`wc-select__helper`,children:s})})]})};kn.displayName=`Select`;var An={text:`wc-skeleton--text`,rectangular:`wc-skeleton--rectangular`,rounded:`wc-skeleton--rounded`,circular:`wc-skeleton--circular`},jn=({animation:e=`pulse`,component:r=`div`,height:i,width:a,variant:o=`text`,style:s={},className:c=``,...l})=>{let u=(0,t.useMemo)(()=>{let t=[`wc-skeleton`,An[o]||An.text];return e===`pulse`&&t.push(`wc-skeleton--pulse`),e===`wave`&&t.push(`wc-skeleton--wave`),t.join(` `)},[e,o]);(0,t.useEffect)(()=>{if(!document.getElementById(`wc-skeleton-style`)){let e=document.createElement(`style`);e.id=`wc-skeleton-style`,e.innerHTML=`
|
|
27
12
|
.wc-skeleton{background-color:var(--wc-neutral-200);display:block;position:relative;overflow:hidden;}
|
|
28
13
|
.wc-skeleton--text{border-radius:4px;}
|
|
29
14
|
.wc-skeleton--rectangular{border-radius:4px;}
|
|
@@ -34,14 +19,14 @@ Valid keys: `+JSON.stringify(Object.keys(e),null,` `));var p=f(l,d,o,s,c+`.`+d,
|
|
|
34
19
|
.wc-skeleton--wave::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,0.4),transparent);animation:wc-skeleton-wave 1.6s linear infinite;}
|
|
35
20
|
@keyframes wc-skeleton-wave{0%{transform:translateX(-100%);}50%{transform:translateX(100%);}100%{transform:translateX(100%);}}
|
|
36
21
|
.dark .wc-skeleton{background-color:var(--wc-neutral-700);}
|
|
37
|
-
`,document.head.appendChild(e)}},[]);let
|
|
22
|
+
`,document.head.appendChild(e)}},[]);let d={...s};return a!==void 0&&(d.width=typeof a==`number`?`${a}px`:a),i!==void 0&&(d.height=typeof i==`number`?`${i}px`:i),!a&&!i&&(o===`circular`?(d.width=`40px`,d.height=`40px`):o===`text`?(d.width=`100%`,d.height=`16px`):(d.width=`100%`,d.height=`128px`)),(0,n.jsx)(r,{className:`${u} ${c}`,style:d,role:`status`,"aria-live":`polite`,...l})},Mn=({value:e,defaultValue:r=0,min:i=0,max:a=100,step:o=1,disabled:s=!1,label:c=``,valueLabelDisplay:l=`off`,onChange:u=()=>{},className:d=``,style:f={},...p})=>{let[m,h]=(0,t.useState)(e===void 0?r:e);(0,t.useEffect)(()=>{e!==void 0&&h(e)},[e]);let g=t=>{let n=Number(t.target.value);e===void 0&&h(n),u(n)};(0,t.useEffect)(()=>{if(document.getElementById(`wc-slider-style`))return;let e=document.createElement(`style`);e.id=`wc-slider-style`,e.innerHTML=`
|
|
38
23
|
.wc-slider{display:flex;flex-direction:column;gap:8px;width:100%;}
|
|
39
24
|
.wc-slider__label{font-size:0.875rem;font-weight:500;color:var(--wc-neutral-700);}
|
|
40
25
|
.wc-slider__input{appearance:none;width:100%;height:4px;background:var(--wc-neutral-300);border-radius:2px;outline:none;cursor:pointer;}
|
|
41
26
|
.wc-slider__input::-webkit-slider-thumb{appearance:none;width:20px;height:20px;border-radius:50%;background:var(--wc-primary-500);border:2px solid var(--wc-neutral-0);cursor:pointer;}
|
|
42
27
|
.wc-slider__input::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:var(--wc-primary-500);border:2px solid var(--wc-neutral-0);cursor:pointer;}
|
|
43
28
|
.wc-slider__value{font-size:0.875rem;text-align:center;color:var(--wc-neutral-700);}
|
|
44
|
-
`,document.head.appendChild(e)},[]);let
|
|
29
|
+
`,document.head.appendChild(e)},[]);let _=(0,t.useMemo)(()=>(m-i)/(a-i)*100,[m,i,a]),v={background:`linear-gradient(to right, var(--wc-primary-500) 0%, var(--wc-primary-500) ${_}%, var(--wc-neutral-300) ${_}%, var(--wc-neutral-300) 100%)`};return(0,n.jsxs)(`div`,{className:`wc-slider ${d}`,style:f,...p,children:[c&&(0,n.jsx)(`div`,{className:`wc-slider__label`,children:c}),(0,n.jsx)(`input`,{type:`range`,className:`wc-slider__input`,min:i,max:a,step:o,value:m,onChange:g,disabled:s,style:v,"aria-valuemin":i,"aria-valuemax":a,"aria-valuenow":m,role:`slider`}),l!==`off`&&(0,n.jsx)(`div`,{className:`wc-slider__value`,children:m})]})},Nn=({open:e=!1,onClose:i=()=>{},placement:a=`right`,width:o=400,children:s,header:c,footer:l})=>((0,t.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&i()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,i]),typeof document>`u`?null:(0,r.createPortal)(e?(0,n.jsxs)(`div`,{className:`slideover-wrapper`,role:`dialog`,"aria-modal":`true`,children:[(0,n.jsx)(`div`,{className:`slideover-overlay`,onClick:i}),(0,n.jsxs)(`div`,{className:`slideover-panel slideover-${a}`,style:{width:typeof o==`number`?`${o}px`:o},children:[c&&(0,n.jsx)(`header`,{className:`slideover-header`,children:c}),(0,n.jsx)(`div`,{className:`slideover-body`,children:s}),l&&(0,n.jsx)(`footer`,{className:`slideover-footer`,children:l}),(0,n.jsx)(`button`,{className:`slideover-close`,onClick:i,"aria-label":`关闭`,children:`✕`})]}),(0,n.jsx)(`style`,{children:`
|
|
45
30
|
.slideover-wrapper{position:fixed;inset:0;z-index:3000;display:flex;}
|
|
46
31
|
.slideover-overlay{flex:1 1 auto;background:rgba(0,0,0,0.4);backdrop-filter:blur(2px);}
|
|
47
32
|
.slideover-panel{position:relative;background:var(--wc-neutral-0);max-height:100vh;overflow-y:auto;display:flex;flex-direction:column;}
|
|
@@ -50,5 +35,5 @@ Valid keys: `+JSON.stringify(Object.keys(e),null,` `));var p=f(l,d,o,s,c+`.`+d,
|
|
|
50
35
|
.slideover-header,.slideover-footer{padding:16px;border-bottom:1px solid var(--wc-neutral-200);}
|
|
51
36
|
.slideover-footer{border-top:1px solid var(--wc-neutral-200);border-bottom:none;}
|
|
52
37
|
.slideover-body{padding:16px;flex:1 1 auto;}
|
|
53
|
-
.slideover-enter{opacity:0;transform:translateX(${
|
|
54
|
-
`})]}):null,document.body)),Pn={success:`✓`,info:`ℹ`,warning:`⚠`,error:`✕`};function Fn({open:e=!1,modelValue:r=void 0,message:i=``,title:a=``,severity:o=`info`,variant:s=`filled`,autoHideDuration:c=6e3,anchorOrigin:l={vertical:`bottom`,horizontal:`left`},action:u=``,closable:d=!0,showIcon:f=!0,showProgress:p=!1,onClose:m=()=>{},onUpdateModelValue:h,onAction:g=()=>{},children:_}){let v=r!==void 0,[b,x]=(0,t.useState)(v?r:e),[S,C]=(0,t.useState)(100);(0,t.useEffect)(()=>{let t=v?r:e;x(t),t&&C(100)},[e,r]),(0,t.useEffect)(()=>{if(!b||c<=0)return;let e=Date.now(),t=setTimeout(()=>{w()},c);if(p){let n=setInterval(()=>{let t=Date.now()-e,r=Math.max(0,100-t/c*100);C(r),r<=0&&clearInterval(n)},50);return()=>{clearTimeout(t),clearInterval(n)}}return()=>clearTimeout(t)},[b,c,p]);let w=()=>{v?h?.(!1):x(!1),m()},T=()=>{g()};if(!b)return null;let E=[`wc-snackbar`,`wc-snackbar--${s}`,`wc-snackbar--${o}`],D={position:`fixed`,zIndex:1400},{vertical:O,horizontal:k}=l;return O===`top`?D.top=`20px`:D.bottom=`20px`,k===`left`?D.left=`20px`:k===`right`?D.right=`20px`:(D.left=`50%`,D.transform=`translateX(-50%)`),(0,n.createPortal)((0,y.jsxs)(`div`,{className:E.join(` `),style:D,role:`alert`,"aria-live":`assertive`,"aria-atomic":`true`,children:[f&&(0,y.jsx)(`div`,{className:`wc-snackbar__icon`,children:Pn[o]}),(0,y.jsxs)(`div`,{className:`wc-snackbar__content`,children:[a&&(0,y.jsx)(`div`,{className:`wc-snackbar__title`,children:a}),_||(0,y.jsx)(`div`,{className:`wc-snackbar__message`,children:i})]}),(u||_?.action)&&(0,y.jsx)(`div`,{className:`wc-snackbar__actions`,children:_?.action||(0,y.jsx)(`button`,{type:`button`,className:`wc-snackbar__action`,onClick:T,children:u})}),d&&(0,y.jsx)(`button`,{type:`button`,className:`wc-snackbar__close`,"aria-label":`关闭`,onClick:w,children:`×`}),p&&c>0&&(0,y.jsx)(`div`,{className:`wc-snackbar__progress`,children:(0,y.jsx)(`div`,{className:`wc-snackbar__progress-bar`,style:{width:`${S}%`}})})]}),document.body)}var In=[`default`,`success`,`error`,`warning`,`info`,`pending`,`processing`,`cancelled`],Ln=[`auto`,`pulse`,`spin`,`bounce`,`blink`,`shake`,`breathe`,`ripple`,`glow`],Rn={default:{text:`默认`,color:`#9ca3af`,darkColor:`#6b7280`},success:{text:`成功`,color:`#10b981`,darkColor:`#059669`},error:{text:`失败`,color:`#ef4444`,darkColor:`#dc2626`},warning:{text:`警告`,color:`#f59e0b`,darkColor:`#d97706`},info:{text:`信息`,color:`#3b82f6`,darkColor:`#2563eb`},pending:{text:`等待中`,color:`#8b5cf6`,darkColor:`#7c3aed`},processing:{text:`进行中`,color:`#06b6d4`,darkColor:`#0891b2`},cancelled:{text:`已取消`,color:`#64748b`,darkColor:`#475569`}};function zn(e){return In.includes(e)}function Bn(e){return zn(e)?e:`default`}function Vn({status:e,size:t,showText:n,animated:r,animationType:i=`auto`,className:a}){let o=Bn(e),s=[`wc-status`,`wc-status--${o}`,`wc-status--${t}`];if(n&&s.push(`wc-status--with-text`),r){let e=Un(o,i);s.push(`wc-status--animated`,`wc-status--${e}`)}return a&&s.push(a),s.filter(Boolean).join(` `)}function Hn(e){return Rn[e]?.text||Rn.default.text}function Un(e,t=`auto`){return t!==`auto`&&Ln.includes(t)?t:{processing:`spin`,pending:`pulse`,success:`bounce`,error:`shake`,warning:`blink`,info:`ripple`,cancelled:`breathe`,default:`glow`}[e]||`pulse`}var Wn=({status:e=`default`,size:t=`md`,showText:n=!1,animated:r=!1,animationType:i=`auto`,className:a=``,...o})=>{let s=Vn({status:e,size:t,showText:n,animated:r,animationType:i,className:a}),c=Hn(e);return(0,y.jsx)(`span`,{className:s,title:c,...o,children:n&&(0,y.jsx)(`span`,{className:`wc-status__text`,children:c})})};Wn.displayName=`Status`;var Gn=({checked:e=!1,onChange:n,label:r=``,description:i=``,disabled:a=!1,required:o=!1,color:s=`primary`,size:c=`md`,className:l=``,...u})=>{let d=(0,t.useId)(),f=[`primary`,`success`,`warning`,`error`,`purple`,`orange`,`cyan`,`pink`].includes(s)?s:`primary`,p=[`sm`,`md`,`lg`].includes(c)?c:`md`,m=[`wc-switch`,`wc-switch--${f}`,p!==`md`&&`wc-switch--${p}`,a&&`wc-switch--disabled`,l].filter(Boolean).join(` `),h=e=>{a||!n||n(e.target.checked)};return(0,y.jsxs)(`div`,{className:`wc-switch-wrapper`,children:[r&&(0,y.jsxs)(`label`,{id:d,className:`wc-switch__label`,children:[r,o&&(0,y.jsx)(`span`,{className:`wc-switch__required`,children:`*`})]}),(0,y.jsxs)(`div`,{className:`wc-switch__container`,children:[(0,y.jsxs)(`label`,{className:m,"aria-disabled":a,children:[(0,y.jsx)(`input`,{type:`checkbox`,className:`wc-switch__input`,checked:e,disabled:a,"aria-labelledby":d,role:`switch`,onChange:h,...u}),(0,y.jsx)(`span`,{className:`wc-switch__track`,children:(0,y.jsx)(`span`,{className:`wc-switch__thumb`})})]}),i&&(0,y.jsx)(`span`,{className:`wc-switch__description`,children:i})]})]})};Gn.displayName=`Switch`;var Kn=(0,t.createContext)({size:`md`,dense:!1,hover:!1,striped:!1}),qn=({size:e=`md`,stickyHeader:t=!1,dense:n=!1,hover:r=!1,striped:i=!1,children:a,className:o=``,...s})=>(0,y.jsx)(`div`,{className:`wc-table-container${t?` wc-table-container--sticky`:``} ${o}`,...s,children:(0,y.jsx)(`table`,{className:`wc-table wc-table--${e}${r?` wc-table--hover`:``}${i?` wc-table--striped`:``}${n?` wc-table--dense`:``}`,children:(0,y.jsx)(Kn.Provider,{value:{size:e,dense:n,hover:r,striped:i,stickyHeader:t},children:a})})});qn.displayName=`Table`;var Jn=({children:e,className:n=``,...r})=>{let{stickyHeader:i}=(0,t.useContext)(Kn);return(0,y.jsx)(`thead`,{className:`wc-table-head${i?` wc-table-head--sticky`:``} ${n}`,...r,children:e})};Jn.displayName=`TableHead`;var Yn=({children:e,className:t=``,...n})=>(0,y.jsx)(`tbody`,{className:`wc-table-body ${t}`,...n,children:e});Yn.displayName=`TableBody`;var Xn=({hover:e,selected:n=!1,clickable:r=!1,children:i,className:a=``,onClick:o,...s})=>{let c=(0,t.useContext)(Kn);return(0,y.jsx)(`tr`,{className:[`wc-table-row`,(e===void 0?c.hover:e)||r?`wc-table-row--hover`:``,n?`wc-table-row--selected`:``,r?`wc-table-row--clickable`:``,a].filter(Boolean).join(` `),onClick:r?o:void 0,...s,children:i})};Xn.displayName=`TableRow`;var Zn=({component:e=`td`,align:n=`inherit`,padding:r=`normal`,size:i,sortDirection:a=!1,variant:o=`body`,scope:s,children:c,className:l=``,...u})=>{let d=(0,t.useContext)(Kn),f=i||(d.dense?`small`:`medium`);return(0,y.jsx)(e,{className:[`wc-table-cell`,`wc-table-cell--${o}`,`wc-table-cell--${f}`,`wc-table-cell--padding-${r}`,n===`inherit`?``:`wc-table-cell--align-${n}`,a?`wc-table-cell--sortable`:``,a?`wc-table-cell--sort-${a}`:``,l].filter(Boolean).join(` `),scope:e===`th`||o===`head`?s:void 0,...u,children:c})};Zn.displayName=`TableCell`;var Qn=Object.assign(qn,{Head:Jn,Body:Yn,Row:Xn,Cell:Zn}),$n=({tabs:e=[],activeIndex:n,onChange:r,variant:i=`default`,children:a,className:o=``,...s})=>{let[c,l]=(0,t.useState)(n||0),u=n!==void 0,d=u?n:c;(0,t.useEffect)(()=>{u&&l(n)},[n,u]);let f=[`wc-tabs`,i===`pills`&&`wc-tabs--pills`,i===`underline`&&`wc-tabs--underline`,(i===`default`||![`pills`,`underline`].includes(i))&&`wc-tabs--default`,o].filter(Boolean).join(` `),p=(e,t)=>{let n=[`wc-tab`];return d===e&&n.push(`wc-tab--active`),t&&n.push(`opacity-50 cursor-not-allowed`),n.join(` `)},m=(e,t)=>{t.disabled||(u||l(e),r&&r(e,t))},h=e[d];return(0,y.jsxs)(`div`,{className:`wc-tabs-wrapper`,...s,children:[(0,y.jsx)(`div`,{className:f,children:e.map((e,t)=>(0,y.jsx)(`button`,{className:p(t,e.disabled),onClick:()=>m(t,e),disabled:e.disabled,type:`button`,children:e.title},e.key||t))}),(0,y.jsx)(`div`,{className:`wc-tab-content mt-6`,children:typeof a==`function`?a({activeTab:h,activeIndex:d}):a})]})};$n.displayName=`Tabs`;var er=({value:e=``,onChange:n,type:r=`text`,label:i=``,placeholder:a=``,helperText:o=``,error:s=``,required:c=!1,disabled:l=!1,readonly:u=!1,autoFocus:d=!1,fullWidth:f=!1,multiline:p=!1,rows:m=4,maxRows:h,minRows:g,variant:_=`filled`,size:v=`md`,color:b=`primary`,startAdornment:x=null,endAdornment:S=null,maxLength:C,minLength:w,pattern:T,autoComplete:E=`off`,name:D=``,id:O=``,className:k=``,style:A={},onFocus:j,onBlur:M,onKeyDown:N,onKeyUp:P,onKeyPress:F,...I})=>{let[L,R]=(0,t.useState)(!1),[z,B]=(0,t.useState)(!!e);(0,t.useEffect)(()=>{B(!!e)},[e]);let V=e=>{let t=e.target.value;B(!!t),n?.(e)},ee=e=>{R(!0),j?.(e)},H=e=>{R(!1),M?.(e)},U=()=>{let e=[`wc-textfield`];return f&&e.push(`wc-textfield--full-width`),p&&e.push(`wc-textfield--multiline`),k&&e.push(k),e.filter(Boolean).join(` `)},W=()=>{let e=[`wc-textfield__container`];return e.push(`wc-textfield__container--${_}`),e.push(`wc-textfield__container--${v}`),s&&e.push(`wc-textfield__container--error`),l&&e.push(`wc-textfield__container--disabled`),L&&e.push(`wc-textfield__container--focused`),z&&e.push(`wc-textfield__container--has-value`),e.filter(Boolean).join(` `)},G=()=>{let e=[`wc-textfield__label`];return e.push(`wc-textfield__label--${v}`),s&&e.push(`wc-textfield__label--error`),L&&e.push(`wc-textfield__label--focused`),e.filter(Boolean).join(` `)},K=p?`textarea`:`input`,q=O||D||`textfield-${Math.random().toString(36).substr(2,9)}`,J=!!s;return(0,y.jsxs)(`div`,{className:U(),style:A,children:[i&&(0,y.jsxs)(`label`,{htmlFor:q,className:G(),children:[i,c&&(0,y.jsx)(`span`,{className:`wc-textfield__required`,children:`*`})]}),(0,y.jsxs)(`div`,{className:W(),children:[x&&(0,y.jsx)(`div`,{className:`wc-textfield__adornment wc-textfield__adornment--start`,children:x}),(0,y.jsx)(K,{className:p?`wc-textfield__input wc-textfield__textarea`:`wc-textfield__input`,id:q,type:p?void 0:r,value:e,onChange:V,onFocus:ee,onBlur:H,onKeyDown:N,onKeyUp:P,onKeyPress:F,placeholder:a,disabled:l,readOnly:u,required:c,autoFocus:d,maxLength:C,minLength:w,pattern:T,rows:p?m:void 0,autoComplete:E,name:D,...I}),(S||J)&&(0,y.jsxs)(`div`,{className:`wc-textfield__adornment wc-textfield__adornment--end`,children:[J&&(0,y.jsx)(`svg`,{className:`wc-textfield__error-icon`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,y.jsx)(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z`,clipRule:`evenodd`})}),S]})]}),(o||J)&&(0,y.jsx)(`div`,{className:`wc-textfield__helper-text ${J?`wc-textfield__helper-text--error`:``}`,children:J?s:o})]})};er.displayName=`TextField`;var tr=(e,t,n=``)=>{let r=[`flex items-center w-full`];return e===`dense`?r.push(`min-h-12 py-2`):r.push(`min-h-16 py-3`),t||r.push(`px-4 sm:px-6 lg:px-8`),n&&r.push(n),r.join(` `)},nr=({children:e,variant:t=`regular`,disableGutters:n=!1,className:r=``,style:i={},...a})=>(0,y.jsx)(`div`,{className:tr(t,n,r),style:i,...a,children:e}),rr={top:`wc-tooltip--top`,bottom:`wc-tooltip--bottom`,left:`wc-tooltip--left`,right:`wc-tooltip--right`},ir=[`top`,`bottom`,`left`,`right`];function ar(e){return ir.includes(e)}function or(e){return rr[e]||rr.top}function sr({text:e,placement:n=`top`,children:r,className:i=``}){ar(n)||console.warn(`Invalid tooltip placement: ${n}. Using 'top' as default.`);let[a,o]=(0,t.useState)(!1),[s,c]=(0,t.useState)(!1),l=or(n);return(0,y.jsxs)(`span`,{className:`wc-tooltip-wrapper relative inline-block ${i}`,onMouseEnter:()=>{o(!0),c(!0)},onMouseLeave:()=>{o(!1),setTimeout(()=>c(!1),150)},children:[r,(a||s)&&(0,y.jsx)(`div`,{className:`wc-tooltip absolute z-50 px-2 py-1 rounded text-xs whitespace-nowrap ${l} ${a?`tooltip-fade-enter-to`:`tooltip-fade-leave-to`}`,children:e})]})}var cr={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,caption:`span`,overline:`span`,button:`span`},lr={h1:`text-6xl font-light tracking-tight`,h2:`text-5xl font-light tracking-tight`,h3:`text-4xl font-normal`,h4:`text-3xl font-normal`,h5:`text-2xl font-normal`,h6:`text-xl font-medium`,subtitle1:`text-base font-normal`,subtitle2:`text-sm font-medium`,body1:`text-base font-normal`,body2:`text-sm font-normal`,caption:`text-xs font-normal`,overline:`text-xs font-medium uppercase tracking-wide`,button:`text-sm font-medium uppercase tracking-wide`},ur={inherit:`text-inherit`,primary:`text-primary-600 dark:text-primary-400`,secondary:`text-neutral-600 dark:text-neutral-400`,success:`text-success-600 dark:text-success-400`,warning:`text-warning-600 dark:text-warning-400`,error:`text-error-600 dark:text-error-400`,textPrimary:`text-neutral-900 dark:text-neutral-100`,textSecondary:`text-neutral-600 dark:text-neutral-400`,textDisabled:`text-neutral-400 dark:text-neutral-600`},dr={left:`text-left`,center:`text-center`,right:`text-right`,justify:`text-justify`},fr={h1:`1.2`,h2:`1.2`,h3:`1.3`,h4:`1.3`,h5:`1.4`,h6:`1.4`,subtitle1:`1.5`,subtitle2:`1.5`,body1:`1.6`,body2:`1.6`,caption:`1.4`,overline:`1.4`,button:`1.4`};function pr(e,t){return t||cr[e]||`p`}function mr(e,t,n,r,i,a=``){return[lr[e],ur[t],n===`inherit`?null:dr[n],r?`mb-4`:null,i?`truncate`:null,a].filter(Boolean).join(` `)}var hr=({variant:e=`body1`,component:t,color:n=`inherit`,align:r=`inherit`,gutterBottom:i=!1,noWrap:a=!1,children:o,className:s=``,style:c={},...l})=>(0,y.jsx)(pr(e,t),{className:mr(e,n,r,i,a,s),style:{lineHeight:fr[e],...c},...l,children:o});hr.displayName=`Typography`;var gr=class{constructor(e,t={}){this.text=e,this.speed=t.speed||100,this.pause=t.pause||1500,this.loop=t.loop||!1,this.erase=t.erase||!1,this.index=0,this.direction=1,this.timer=null,this.onUpdate=t.onUpdate||(()=>{})}step(){this.direction===1?this.index<this.text.length?(this.index+=1,this.onUpdate(this.text.slice(0,this.index))):this.loop?this.erase?this.direction=-1:(this.stop(),setTimeout(()=>{this.index=0,this.onUpdate(``),this.start()},this.pause)):this.stop():this.index>0?(--this.index,this.onUpdate(this.text.slice(0,this.index))):this.direction=1}start(){this.stop(),this.timer=setInterval(()=>this.step(),this.speed)}stop(){this.timer&&=(clearInterval(this.timer),null)}reset(){this.stop(),this.index=0,this.direction=1,this.onUpdate(``)}updateText(e){this.text=e,this.reset(),this.start()}},_r=({text:e=`Hello, Watercolor UI!`,speed:n=100,pause:r=1500,loop:i=!1,erase:a=!1,showCursor:o=!0,className:s=``,style:c={},...l})=>{let[u,d]=(0,t.useState)(``),f=(0,t.useRef)(null);return(0,t.useEffect)(()=>(f.current=new gr(e,{speed:n,pause:r,loop:i,erase:a,onUpdate:d}),f.current.start(),()=>{f.current&&f.current.stop()}),[e,n,r,i,a]),(0,y.jsxs)(`span`,{className:`typing-wrapper ${s}`,style:c,...l,children:[(0,y.jsx)(`span`,{className:`typing-text`,children:u}),o&&(0,y.jsx)(`span`,{className:`typing-cursor`})]})};_r.displayName=`TypingText`;var vr=({length:e=6,value:n=``,onChange:r,onComplete:i,autoFocus:a=!1,className:o=``,...s})=>{let c=(0,t.useRef)([]);(0,t.useEffect)(()=>{typeof n==`string`&&n.split(``).forEach((e,t)=>{c.current[t]&&(c.current[t].value=e)})},[n]),(0,t.useEffect)(()=>{a&&c.current[0]&&c.current[0].focus()},[a]);let l=e=>{let t=c.current[e];t&&t.focus()},u=()=>c.current.map(e=>e?e.value:``).join(``),d=t=>n=>{let a=n.target.value.replace(/[^0-9a-zA-Z]/g,``);n.target.value=a.toUpperCase();let o=u();r?.(o),a&&t<e-1&&l(t+1),o.length===e&&i?.(o)},f=e=>t=>{t.key===`Backspace`&&!t.target.value&&e>0&&(t.preventDefault(),l(e-1))},p=e=>{e.target.select()};return(0,y.jsx)(`div`,{className:[`wc-input-code`,o].filter(Boolean).join(` `),onPaste:t=>{t.preventDefault();let n=(t.clipboardData?.getData(`text`)||``).trim().slice(0,e);n&&(n.split(``).forEach((e,t)=>{c.current[t]&&(c.current[t].value=e)}),r?.(n),n.length===e&&i?.(n))},...s,children:Array.from({length:e}).map((e,t)=>(0,y.jsx)(`input`,{ref:e=>c.current[t]=e,id:`wc-input-code-${t}`,name:`wc-input-code-${t}`,className:`wc-input-code__box`,type:`text`,maxLength:1,autoComplete:`one-time-code`,inputMode:`numeric`,onInput:d(t),onKeyDown:f(t),onFocus:p},t))})};vr.displayName=`VerificationCodeInput`;function yr(e){return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,`0`)}`}function br(e,t){let n=e.currentTarget.getBoundingClientRect();return(e.clientX-n.left)/n.width*t}function xr(e){e&&(document.fullscreenElement?document.exitFullscreen?.():e.requestFullscreen?.())}var Sr=({src:e,autoplay:n=!1,loop:r=!1,className:i=``,style:a={},...o})=>{let s=(0,t.useRef)(null),[c,l]=(0,t.useState)(!1),[u,d]=(0,t.useState)(0),[f,p]=(0,t.useState)(.7),[m,h]=(0,t.useState)(!1),[g,_]=(0,t.useState)(0),[v,b]=(0,t.useState)(0),x=yr(v),S=yr(g),C=()=>{let e=s.current;e&&(e.paused?e.play():e.pause())},w=()=>{let e=s.current;e&&(_(e.duration||0),b(e.currentTime),d(e.duration?e.currentTime/e.duration*100:0),l(!e.paused))},T=e=>{let t=s.current;t&&(t.currentTime=br(e,g))},E=()=>{h(e=>{let t=!e;return s.current&&(s.current.muted=t),t})},D=()=>{xr(s.current?.parentElement)};return(0,t.useEffect)(()=>{s.current&&(s.current.volume=f)},[f]),(0,t.useEffect)(()=>{let e=s.current;e&&(e.muted=m,e.loop=r,n&&e.play())},[n,r,m]),(0,y.jsxs)(`div`,{className:`video-wrapper ${i}`,style:a,...o,children:[(0,y.jsx)(`video`,{ref:s,className:`video-el`,src:e,onTimeUpdate:w,onEnded:()=>l(!1)}),(0,y.jsxs)(`div`,{className:`controls`,children:[(0,y.jsx)(`button`,{className:`ctrl-btn`,onClick:C,children:c?`❚❚`:`▶️`}),(0,y.jsx)(`div`,{className:`progress`,onClick:T,children:(0,y.jsx)(`div`,{className:`progress-bar`,style:{width:`${u}%`}})}),(0,y.jsxs)(`span`,{className:`time`,children:[x,` / `,S]}),(0,y.jsx)(`button`,{className:`ctrl-btn`,onClick:E,children:m?`🔇`:`🔊`}),(0,y.jsx)(`input`,{className:`volume`,type:`range`,min:`0`,max:`1`,step:`0.05`,value:f,onChange:e=>p(Number(e.target.value))}),(0,y.jsx)(`button`,{className:`ctrl-btn`,onClick:D,children:`⛶`})]})]})};Sr.displayName=`VideoPlayer`;var Cr={content:``,cross:!1,debug:!1,fontSize:14,fontFamily:`sans-serif`,fontStyle:`normal`,fontVariant:``,fontWeight:400,fontColor:`var(--wc-neutral-500, rgba(128,128,128,.3))`,fullscreen:!1,globalRotate:0,lineHeight:14,height:64,width:200,image:void 0,imageHeight:void 0,imageWidth:void 0,imageOpacity:1,rotate:0,selectable:!0,textAlign:`center`,xGap:48,yGap:48,xOffset:0,yOffset:0,zIndex:10};function wr(e){if(typeof e==`string`&&e.startsWith(`var(`)){let t=e.match(/--[^, )]+/);if(t)return getComputedStyle(document.documentElement).getPropertyValue(t[0]).trim()||e}return e}function Tr(e){let t=document.createElement(`canvas`),n=t.getContext(`2d`),r=e.width,i=e.height;if(!e.image&&e.content){n.font=`${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`;let t=e.content.split(/\n/),a=Math.max(...t.map(e=>n.measureText(e).width)),o=e.lineHeight*t.length;r=Math.max(r,Math.ceil(a)),i=Math.max(i,Math.ceil(o))}if(r+=e.xGap,i+=e.yGap,t.width=r,t.height=i,e.image)return new Promise(r=>{let i=new Image;i.crossOrigin=`anonymous`,i.onload=()=>{t.width=(e.imageWidth||i.width)+e.xGap,t.height=(e.imageHeight||i.height)+e.yGap,n.clearRect(0,0,t.width,t.height),n.globalAlpha=e.imageOpacity,n.translate(t.width/2,t.height/2),n.rotate(e.rotate*Math.PI/180);let a=e.imageWidth||i.width,o=e.imageHeight||i.height;n.drawImage(i,-a/2,-o/2,a,o),r(t.toDataURL())},i.src=e.image});let a=(e.content||``).split(/\n/);n.textAlign=e.textAlign||`center`,n.textBaseline=`middle`,n.fillStyle=e.fontColor.startsWith(`var(`)?wr(e.fontColor):e.fontColor,n.font=`${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`,n.translate(r/2,i/2),n.rotate(e.rotate*Math.PI/180);let o=-(a.length-1)*e.lineHeight/2;return a.forEach((t,r)=>{let i=o+r*e.lineHeight;n.fillText(t,0,i)}),Promise.resolve(t.toDataURL())}function Er(e,t){let n={position:e.fullscreen?`fixed`:`absolute`,top:0,left:0,width:e.fullscreen?`100vw`:`100%`,height:e.fullscreen?`100vh`:`100%`,pointerEvents:e.selectable?`none`:`auto`,backgroundImage:`url(${t})`,backgroundRepeat:`repeat`,backgroundPosition:`${e.xOffset}px ${e.yOffset}px`,zIndex:e.zIndex,transform:`rotate(${e.globalRotate}deg)`,mixBlendMode:`multiply`};return e.debug&&(n.outline=`1px dashed red`),e.cross||(n.overflow=`hidden`),n}var Dr=e=>{let n={...Cr,...e},[r,i]=(0,t.useState)(``),a=!!n.content||!!n.image;(0,t.useEffect)(()=>{if(!a)return;let e=!0;return Tr(n).then(t=>{e&&i(t)}),()=>{e=!1}},[(0,t.useMemo)(()=>{let{children:e,...t}=n;return JSON.stringify(t)},[n]),a]);let o=(0,t.useMemo)(()=>a?Er(n,r):{},[r,a,n]);return a?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`div`,{className:`wc-watermark`,style:o}),n.children]}):n.children||null};Dr.displayName=`Watermark`;function Or(e){let t=document.documentElement;e.primary&&Object.entries(e.primary).forEach(([e,n])=>{t.style.setProperty(`--wc-primary-${e}`,n)}),e.secondary&&Object.entries(e.secondary).forEach(([e,n])=>{t.style.setProperty(`--wc-secondary-${e}`,n)}),e.neutral&&Object.entries(e.neutral).forEach(([e,n])=>{t.style.setProperty(`--wc-neutral-${e}`,n)}),e.success&&Object.entries(e.success).forEach(([e,n])=>{t.style.setProperty(`--wc-success-${e}`,n)}),e.warning&&Object.entries(e.warning).forEach(([e,n])=>{t.style.setProperty(`--wc-warning-${e}`,n)}),e.error&&Object.entries(e.error).forEach(([e,n])=>{t.style.setProperty(`--wc-error-${e}`,n)}),e.info&&Object.entries(e.info).forEach(([e,n])=>{t.style.setProperty(`--wc-info-${e}`,n)}),e.danger&&Object.entries(e.danger).forEach(([e,n])=>{t.style.setProperty(`--wc-danger-${e}`,n)}),e.purple&&Object.entries(e.purple).forEach(([e,n])=>{t.style.setProperty(`--wc-purple-${e}`,n)}),e.pink&&Object.entries(e.pink).forEach(([e,n])=>{t.style.setProperty(`--wc-pink-${e}`,n)}),e.teal&&Object.entries(e.teal).forEach(([e,n])=>{t.style.setProperty(`--wc-teal-${e}`,n)}),e.indigo&&Object.entries(e.indigo).forEach(([e,n])=>{t.style.setProperty(`--wc-indigo-${e}`,n)}),e.fonts&&Ar(e.fonts),e.radius&&Object.entries(e.radius).forEach(([e,n])=>{let r=`--wc-radius-${e}`;t.style.setProperty(r,n)})}function kr(e){console.warn(`applyCSSTheme is deprecated. Use loadThemeConfig() for file-based themes.`)}function Ar(e){let t=document.documentElement,n=[];e.chinese&&n.push(`"${e.chinese}"`),e.english&&n.push(`"${e.english}"`);let r=e.fallback||`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`;n.push(r);let i=n.join(`, `);t.style.setProperty(`--wc-font-family`,i),t.style.setProperty(`--wc-font-chinese`,e.chinese||``),t.style.setProperty(`--wc-font-english`,e.english||``),document.body.style.fontFamily=i}function jr(e){let t=document.documentElement;e?t.classList.add(`dark`):t.classList.remove(`dark`)}function Mr(){return document.documentElement.classList.contains(`dark`)}var Nr={default:{primary:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#93c5fd`,400:`#60a5fa`,500:`#3b82f6`,600:`#2563eb`,700:`#1d4ed8`,800:`#1e40af`,900:`#1e3a8a`},secondary:{50:`#f3f4ff`,100:`#e5e7ff`,200:`#c7d2fe`,300:`#a5b4fc`,400:`#818cf8`,500:`#6366f1`,600:`#4f46e5`,700:`#4338ca`,800:`#3730a3`,900:`#312e81`}}};function Pr(e){if(console.warn(`applyTheme is deprecated. Use loadThemeConfig() for file-based themes.`),e===`default`){let t=Nr[e];Or({primary:t.primary,secondary:t.secondary})}else console.warn(`Theme "${e}" is no longer supported. Please use theme.config.json file.`)}var Fr={system:{english:`system-ui`,chinese:`system-ui`,fallback:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`},chinese:{chinese:`PingFang SC`,english:`SF Pro Display`,fallback:`"PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif`},modern:{english:`Inter`,chinese:`Noto Sans SC`,fallback:`"Inter", "Noto Sans SC", sans-serif`},elegant:{english:`Poppins`,chinese:`Source Han Sans`,fallback:`"Poppins", "Source Han Sans", "Noto Sans CJK SC", sans-serif`},readable:{english:`IBM Plex Sans`,chinese:`IBM Plex Sans SC`,fallback:`"IBM Plex Sans", "IBM Plex Sans SC", sans-serif`},apple:{english:`SF Pro Display`,chinese:`PingFang SC`,fallback:`"SF Pro Display", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif`},google:{english:`Roboto`,chinese:`Noto Sans SC`,fallback:`"Roboto", "Noto Sans SC", sans-serif`}};function Ir(e){Ar(Fr[e])}function Lr(){let e=document.documentElement;return{chinese:e.style.getPropertyValue(`--wc-font-chinese`)||void 0,english:e.style.getPropertyValue(`--wc-font-english`)||void 0,fallback:e.style.getPropertyValue(`--wc-font-family`)||void 0}}async function Rr(e=`/theme.config.json`){if(!(typeof window>`u`||typeof fetch>`u`))try{let t=await fetch(e,{cache:`no-store`});if(!t.ok){console.info(`[Watercolor UI] theme.config.json not found, using default theme`);return}let n=await t.json();Or(n),n.fonts&&Ar(n.fonts),console.info(`[Watercolor UI] Theme loaded from theme.config.json`)}catch(e){console.warn(`[Watercolor UI] 无法加载自定义 theme.config.json:`,e),console.info(`[Watercolor UI] Using default theme`)}}typeof window<`u`&&Rr();function zr(){return Nr.default}function Br(e=`default`,t=!1){let n=typeof window<`u`&&typeof document<`u`,r=null,i=null;if(n)try{r=localStorage.getItem(`wc-color`),i=localStorage.getItem(`wc-scheme`)}catch{}let a=r||e,o=i?i===`dark`:t;if(n){let e=zr();Or({primary:e.primary,secondary:e.secondary}),jr(o)}return{get color(){return a},get dark(){return o},setColor:e=>{if(e!==a&&(a=e,n)){let t=zr();Or({primary:t.primary,secondary:t.secondary});try{localStorage.setItem(`wc-color`,e)}catch{}}},toggleDark:()=>{if(o=!o,n){jr(o);try{localStorage.setItem(`wc-scheme`,o?`dark`:`light`)}catch{}}}}}var Vr=(0,t.createContext)(void 0),Hr=Br(),Ur=({children:e})=>{let[n,r]=(0,t.useState)(Hr.color),[i,a]=(0,t.useState)(Hr.dark);return(0,y.jsx)(Vr.Provider,{value:{color:n,setColor:e=>{Hr.setColor(e),r(e)},dark:i,toggleDark:()=>{Hr.toggleDark(),a(Hr.dark)}},children:e})};function Wr(){let e=(0,t.useContext)(Vr);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}e.Accordion=b,e.Alert=w,e.AppBar=T,e.Autocomplete=E,e.Avatar=M,e.Badge=L,e.Banner=U,e.Blockquote=q,e.Box=Q,e.Breadcrumb=fe,e.Button=ve,e.Card=K,e.CardActions=ye,e.CardContent=be,e.Checkbox=Ce,e.Chip=ke,e.CircularProgress=Ie,e.ColorPicker=Be,e.Container=Ue,e.Copy=Ze,e.DatePicker=it,e.Fab=at,e.Feature=gt,e.Feed=st,e.FileInput=_t,e.FormControl=yt,e.FormControlLabel=bt,e.FormGroup=xt,e.FormHelperText=St,e.Grid=Ct,e.HoverCard=wt,e.Icon=Rt,e.IconButton=zt,e.ImageGallery=Bt,e.Input=Vt,e.List=qt,e.ListItem=Jt,e.ListItemIcon=Yt,e.ListItemText=Xt,e.Menu=on,e.Modal=pn,e.NumberAnimation=mn,e.Pagination=hn,e.Paper=xn,e.Popover=Sn,e.PricingTable=Cn,e.Progress=wn,e.Radio=Dn,e.RadioGroup=En,e.Rating=On,e.Select=kn,e.Skeleton=jn,e.SlideOver=Nn,e.Slider=Mn,e.Snackbar=Fn,e.Status=Wn,e.Switch=Gn,e.Table=Qn,e.TableBody=Yn,e.TableCell=Zn,e.TableHead=Jn,e.TableRow=Xn,e.Tabs=$n,e.TextField=er,e.ThemeProvider=Ur,e.Toolbar=nr,e.Tooltip=sr,e.TypingText=_r,e.Typography=hr,e.VerificationCodeInput=vr,e.VideoPlayer=Sr,e.Watermark=Dr,e.applyCSSTheme=kr,e.applyFontTheme=Ir,e.applyTheme=Pr,e.fontThemes=Fr,e.getCurrentFonts=Lr,e.isDarkMode=Mr,e.loadThemeConfig=Rr,e.setFonts=Ar,e.setTheme=Or,e.themes=Nr,e.toggleDarkMode=jr,e.useTheme=Wr});
|
|
38
|
+
.slideover-enter{opacity:0;transform:translateX(${a===`right`?`100%`:`-100%`});}
|
|
39
|
+
`})]}):null,document.body)),Pn={success:`✓`,info:`ℹ`,warning:`⚠`,error:`✕`};function Fn({open:e=!1,modelValue:i=void 0,message:a=``,title:o=``,severity:s=`info`,variant:c=`filled`,autoHideDuration:l=6e3,anchorOrigin:u={vertical:`bottom`,horizontal:`left`},action:d=``,closable:f=!0,showIcon:p=!0,showProgress:m=!1,onClose:h=()=>{},onUpdateModelValue:g,onAction:_=()=>{},children:v}){let y=i!==void 0,[b,x]=(0,t.useState)(y?i:e),[S,C]=(0,t.useState)(100);(0,t.useEffect)(()=>{let t=y?i:e;x(t),t&&C(100)},[e,i]),(0,t.useEffect)(()=>{if(!b||l<=0)return;let e=Date.now(),t=setTimeout(()=>{w()},l);if(m){let n=setInterval(()=>{let t=Date.now()-e,r=Math.max(0,100-t/l*100);C(r),r<=0&&clearInterval(n)},50);return()=>{clearTimeout(t),clearInterval(n)}}return()=>clearTimeout(t)},[b,l,m]);let w=()=>{y?g?.(!1):x(!1),h()},T=()=>{_()};if(!b)return null;let E=[`wc-snackbar`,`wc-snackbar--${c}`,`wc-snackbar--${s}`],D={position:`fixed`,zIndex:1400},{vertical:O,horizontal:k}=u;return O===`top`?D.top=`20px`:D.bottom=`20px`,k===`left`?D.left=`20px`:k===`right`?D.right=`20px`:(D.left=`50%`,D.transform=`translateX(-50%)`),(0,r.createPortal)((0,n.jsxs)(`div`,{className:E.join(` `),style:D,role:`alert`,"aria-live":`assertive`,"aria-atomic":`true`,children:[p&&(0,n.jsx)(`div`,{className:`wc-snackbar__icon`,children:Pn[s]}),(0,n.jsxs)(`div`,{className:`wc-snackbar__content`,children:[o&&(0,n.jsx)(`div`,{className:`wc-snackbar__title`,children:o}),v||(0,n.jsx)(`div`,{className:`wc-snackbar__message`,children:a})]}),(d||v?.action)&&(0,n.jsx)(`div`,{className:`wc-snackbar__actions`,children:v?.action||(0,n.jsx)(`button`,{type:`button`,className:`wc-snackbar__action`,onClick:T,children:d})}),f&&(0,n.jsx)(`button`,{type:`button`,className:`wc-snackbar__close`,"aria-label":`关闭`,onClick:w,children:`×`}),m&&l>0&&(0,n.jsx)(`div`,{className:`wc-snackbar__progress`,children:(0,n.jsx)(`div`,{className:`wc-snackbar__progress-bar`,style:{width:`${S}%`}})})]}),document.body)}var In=[`default`,`success`,`error`,`warning`,`info`,`pending`,`processing`,`cancelled`],Ln=[`auto`,`pulse`,`spin`,`bounce`,`blink`,`shake`,`breathe`,`ripple`,`glow`],Rn={default:{text:`默认`,color:`#9ca3af`,darkColor:`#6b7280`},success:{text:`成功`,color:`#10b981`,darkColor:`#059669`},error:{text:`失败`,color:`#ef4444`,darkColor:`#dc2626`},warning:{text:`警告`,color:`#f59e0b`,darkColor:`#d97706`},info:{text:`信息`,color:`#3b82f6`,darkColor:`#2563eb`},pending:{text:`等待中`,color:`#8b5cf6`,darkColor:`#7c3aed`},processing:{text:`进行中`,color:`#06b6d4`,darkColor:`#0891b2`},cancelled:{text:`已取消`,color:`#64748b`,darkColor:`#475569`}};function zn(e){return In.includes(e)}function Bn(e){return zn(e)?e:`default`}function Vn({status:e,size:t,showText:n,animated:r,animationType:i=`auto`,className:a}){let o=Bn(e),s=[`wc-status`,`wc-status--${o}`,`wc-status--${t}`];if(n&&s.push(`wc-status--with-text`),r){let e=Un(o,i);s.push(`wc-status--animated`,`wc-status--${e}`)}return a&&s.push(a),s.filter(Boolean).join(` `)}function Hn(e){return Rn[e]?.text||Rn.default.text}function Un(e,t=`auto`){return t!==`auto`&&Ln.includes(t)?t:{processing:`spin`,pending:`pulse`,success:`bounce`,error:`shake`,warning:`blink`,info:`ripple`,cancelled:`breathe`,default:`glow`}[e]||`pulse`}var Wn=({status:e=`default`,size:t=`md`,showText:r=!1,animated:i=!1,animationType:a=`auto`,className:o=``,...s})=>{let c=Vn({status:e,size:t,showText:r,animated:i,animationType:a,className:o}),l=Hn(e);return(0,n.jsx)(`span`,{className:c,title:l,...s,children:r&&(0,n.jsx)(`span`,{className:`wc-status__text`,children:l})})};Wn.displayName=`Status`;var Gn=({checked:e=!1,onChange:r,label:i=``,description:a=``,disabled:o=!1,required:s=!1,color:c=`primary`,size:l=`md`,className:u=``,...d})=>{let f=(0,t.useId)(),p=[`primary`,`success`,`warning`,`error`,`purple`,`orange`,`cyan`,`pink`].includes(c)?c:`primary`,m=[`sm`,`md`,`lg`].includes(l)?l:`md`,h=[`wc-switch`,`wc-switch--${p}`,m!==`md`&&`wc-switch--${m}`,o&&`wc-switch--disabled`,u].filter(Boolean).join(` `),g=e=>{o||!r||r(e.target.checked)};return(0,n.jsxs)(`div`,{className:`wc-switch-wrapper`,children:[i&&(0,n.jsxs)(`label`,{id:f,className:`wc-switch__label`,children:[i,s&&(0,n.jsx)(`span`,{className:`wc-switch__required`,children:`*`})]}),(0,n.jsxs)(`div`,{className:`wc-switch__container`,children:[(0,n.jsxs)(`label`,{className:h,"aria-disabled":o,children:[(0,n.jsx)(`input`,{type:`checkbox`,className:`wc-switch__input`,checked:e,disabled:o,"aria-labelledby":f,role:`switch`,onChange:g,...d}),(0,n.jsx)(`span`,{className:`wc-switch__track`,children:(0,n.jsx)(`span`,{className:`wc-switch__thumb`})})]}),a&&(0,n.jsx)(`span`,{className:`wc-switch__description`,children:a})]})]})};Gn.displayName=`Switch`;var Kn=(0,t.createContext)({size:`md`,dense:!1,hover:!1,striped:!1}),qn=({size:e=`md`,stickyHeader:t=!1,dense:r=!1,hover:i=!1,striped:a=!1,children:o,className:s=``,...c})=>(0,n.jsx)(`div`,{className:`wc-table-container${t?` wc-table-container--sticky`:``} ${s}`,...c,children:(0,n.jsx)(`table`,{className:`wc-table wc-table--${e}${i?` wc-table--hover`:``}${a?` wc-table--striped`:``}${r?` wc-table--dense`:``}`,children:(0,n.jsx)(Kn.Provider,{value:{size:e,dense:r,hover:i,striped:a,stickyHeader:t},children:o})})});qn.displayName=`Table`;var Jn=({children:e,className:r=``,...i})=>{let{stickyHeader:a}=(0,t.useContext)(Kn);return(0,n.jsx)(`thead`,{className:`wc-table-head${a?` wc-table-head--sticky`:``} ${r}`,...i,children:e})};Jn.displayName=`TableHead`;var Yn=({children:e,className:t=``,...r})=>(0,n.jsx)(`tbody`,{className:`wc-table-body ${t}`,...r,children:e});Yn.displayName=`TableBody`;var Xn=({hover:e,selected:r=!1,clickable:i=!1,children:a,className:o=``,onClick:s,...c})=>{let l=(0,t.useContext)(Kn);return(0,n.jsx)(`tr`,{className:[`wc-table-row`,(e===void 0?l.hover:e)||i?`wc-table-row--hover`:``,r?`wc-table-row--selected`:``,i?`wc-table-row--clickable`:``,o].filter(Boolean).join(` `),onClick:i?s:void 0,...c,children:a})};Xn.displayName=`TableRow`;var Zn=({component:e=`td`,align:r=`inherit`,padding:i=`normal`,size:a,sortDirection:o=!1,variant:s=`body`,scope:c,children:l,className:u=``,...d})=>{let f=(0,t.useContext)(Kn),p=a||(f.dense?`small`:`medium`);return(0,n.jsx)(e,{className:[`wc-table-cell`,`wc-table-cell--${s}`,`wc-table-cell--${p}`,`wc-table-cell--padding-${i}`,r===`inherit`?``:`wc-table-cell--align-${r}`,o?`wc-table-cell--sortable`:``,o?`wc-table-cell--sort-${o}`:``,u].filter(Boolean).join(` `),scope:e===`th`||s===`head`?c:void 0,...d,children:l})};Zn.displayName=`TableCell`;var Qn=Object.assign(qn,{Head:Jn,Body:Yn,Row:Xn,Cell:Zn}),$n=({tabs:e=[],activeIndex:r,onChange:i,variant:a=`default`,children:o,className:s=``,...c})=>{let[l,u]=(0,t.useState)(r||0),d=r!==void 0,f=d?r:l;(0,t.useEffect)(()=>{d&&u(r)},[r,d]);let p=[`wc-tabs`,a===`pills`&&`wc-tabs--pills`,a===`underline`&&`wc-tabs--underline`,(a===`default`||![`pills`,`underline`].includes(a))&&`wc-tabs--default`,s].filter(Boolean).join(` `),m=(e,t)=>{let n=[`wc-tab`];return f===e&&n.push(`wc-tab--active`),t&&n.push(`opacity-50 cursor-not-allowed`),n.join(` `)},h=(e,t)=>{t.disabled||(d||u(e),i&&i(e,t))},g=e[f];return(0,n.jsxs)(`div`,{className:`wc-tabs-wrapper`,...c,children:[(0,n.jsx)(`div`,{className:p,children:e.map((e,t)=>(0,n.jsx)(`button`,{className:m(t,e.disabled),onClick:()=>h(t,e),disabled:e.disabled,type:`button`,children:e.title},e.key||t))}),(0,n.jsx)(`div`,{className:`wc-tab-content mt-6`,children:typeof o==`function`?o({activeTab:g,activeIndex:f}):o})]})};$n.displayName=`Tabs`;var er=({value:e=``,onChange:r,type:i=`text`,label:a=``,placeholder:o=``,helperText:s=``,error:c=``,required:l=!1,disabled:u=!1,readonly:d=!1,autoFocus:f=!1,fullWidth:p=!1,multiline:m=!1,rows:h=4,maxRows:g,minRows:_,variant:v=`filled`,size:y=`md`,color:b=`primary`,startAdornment:x=null,endAdornment:S=null,maxLength:C,minLength:w,pattern:T,autoComplete:E=`off`,name:D=``,id:O=``,className:k=``,style:A={},onFocus:j,onBlur:M,onKeyDown:N,onKeyUp:P,onKeyPress:F,...I})=>{let[L,R]=(0,t.useState)(!1),[z,B]=(0,t.useState)(!!e);(0,t.useEffect)(()=>{B(!!e)},[e]);let V=e=>{let t=e.target.value;B(!!t),r?.(e)},H=e=>{R(!0),j?.(e)},U=e=>{R(!1),M?.(e)},W=()=>{let e=[`wc-textfield`];return p&&e.push(`wc-textfield--full-width`),m&&e.push(`wc-textfield--multiline`),k&&e.push(k),e.filter(Boolean).join(` `)},G=()=>{let e=[`wc-textfield__container`];return e.push(`wc-textfield__container--${v}`),e.push(`wc-textfield__container--${y}`),c&&e.push(`wc-textfield__container--error`),u&&e.push(`wc-textfield__container--disabled`),L&&e.push(`wc-textfield__container--focused`),z&&e.push(`wc-textfield__container--has-value`),e.filter(Boolean).join(` `)},K=()=>{let e=[`wc-textfield__label`];return e.push(`wc-textfield__label--${y}`),c&&e.push(`wc-textfield__label--error`),L&&e.push(`wc-textfield__label--focused`),e.filter(Boolean).join(` `)},q=m?`textarea`:`input`,J=O||D||`textfield-${Math.random().toString(36).substr(2,9)}`,Y=!!c;return(0,n.jsxs)(`div`,{className:W(),style:A,children:[a&&(0,n.jsxs)(`label`,{htmlFor:J,className:K(),children:[a,l&&(0,n.jsx)(`span`,{className:`wc-textfield__required`,children:`*`})]}),(0,n.jsxs)(`div`,{className:G(),children:[x&&(0,n.jsx)(`div`,{className:`wc-textfield__adornment wc-textfield__adornment--start`,children:x}),(0,n.jsx)(q,{className:m?`wc-textfield__input wc-textfield__textarea`:`wc-textfield__input`,id:J,type:m?void 0:i,value:e,onChange:V,onFocus:H,onBlur:U,onKeyDown:N,onKeyUp:P,onKeyPress:F,placeholder:o,disabled:u,readOnly:d,required:l,autoFocus:f,maxLength:C,minLength:w,pattern:T,rows:m?h:void 0,autoComplete:E,name:D,...I}),(S||Y)&&(0,n.jsxs)(`div`,{className:`wc-textfield__adornment wc-textfield__adornment--end`,children:[Y&&(0,n.jsx)(`svg`,{className:`wc-textfield__error-icon`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,n.jsx)(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z`,clipRule:`evenodd`})}),S]})]}),(s||Y)&&(0,n.jsx)(`div`,{className:`wc-textfield__helper-text ${Y?`wc-textfield__helper-text--error`:``}`,children:Y?c:s})]})};er.displayName=`TextField`;var tr=(e,t,n=``)=>{let r=[`flex items-center w-full`];return e===`dense`?r.push(`min-h-12 py-2`):r.push(`min-h-16 py-3`),t||r.push(`px-4 sm:px-6 lg:px-8`),n&&r.push(n),r.join(` `)},nr=({children:e,variant:t=`regular`,disableGutters:r=!1,className:i=``,style:a={},...o})=>(0,n.jsx)(`div`,{className:tr(t,r,i),style:a,...o,children:e}),rr={top:`wc-tooltip--top`,bottom:`wc-tooltip--bottom`,left:`wc-tooltip--left`,right:`wc-tooltip--right`},ir=[`top`,`bottom`,`left`,`right`];function ar(e){return ir.includes(e)}function or(e){return rr[e]||rr.top}function sr({text:e,placement:r=`top`,children:i,className:a=``}){ar(r)||console.warn(`Invalid tooltip placement: ${r}. Using 'top' as default.`);let[o,s]=(0,t.useState)(!1),[c,l]=(0,t.useState)(!1),u=or(r);return(0,n.jsxs)(`span`,{className:`wc-tooltip-wrapper relative inline-block ${a}`,onMouseEnter:()=>{s(!0),l(!0)},onMouseLeave:()=>{s(!1),setTimeout(()=>l(!1),150)},children:[i,(o||c)&&(0,n.jsx)(`div`,{className:`wc-tooltip absolute z-50 px-2 py-1 rounded text-xs whitespace-nowrap ${u} ${o?`tooltip-fade-enter-to`:`tooltip-fade-leave-to`}`,children:e})]})}var cr={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,caption:`span`,overline:`span`,button:`span`},lr={h1:`text-6xl font-light tracking-tight`,h2:`text-5xl font-light tracking-tight`,h3:`text-4xl font-normal`,h4:`text-3xl font-normal`,h5:`text-2xl font-normal`,h6:`text-xl font-medium`,subtitle1:`text-base font-normal`,subtitle2:`text-sm font-medium`,body1:`text-base font-normal`,body2:`text-sm font-normal`,caption:`text-xs font-normal`,overline:`text-xs font-medium uppercase tracking-wide`,button:`text-sm font-medium uppercase tracking-wide`},ur={inherit:`text-inherit`,primary:`text-primary-600 dark:text-primary-400`,secondary:`text-neutral-600 dark:text-neutral-400`,success:`text-success-600 dark:text-success-400`,warning:`text-warning-600 dark:text-warning-400`,error:`text-error-600 dark:text-error-400`,textPrimary:`text-neutral-900 dark:text-neutral-100`,textSecondary:`text-neutral-600 dark:text-neutral-400`,textDisabled:`text-neutral-400 dark:text-neutral-600`},dr={left:`text-left`,center:`text-center`,right:`text-right`,justify:`text-justify`},fr={h1:`1.2`,h2:`1.2`,h3:`1.3`,h4:`1.3`,h5:`1.4`,h6:`1.4`,subtitle1:`1.5`,subtitle2:`1.5`,body1:`1.6`,body2:`1.6`,caption:`1.4`,overline:`1.4`,button:`1.4`};function pr(e,t){return t||cr[e]||`p`}function mr(e,t,n,r,i,a=``){return[lr[e],ur[t],n===`inherit`?null:dr[n],r?`mb-4`:null,i?`truncate`:null,a].filter(Boolean).join(` `)}var hr=({variant:e=`body1`,component:t,color:r=`inherit`,align:i=`inherit`,gutterBottom:a=!1,noWrap:o=!1,children:s,className:c=``,style:l={},...u})=>(0,n.jsx)(pr(e,t),{className:mr(e,r,i,a,o,c),style:{lineHeight:fr[e],...l},...u,children:s});hr.displayName=`Typography`;var gr=class{constructor(e,t={}){this.text=e,this.speed=t.speed||100,this.pause=t.pause||1500,this.loop=t.loop||!1,this.erase=t.erase||!1,this.index=0,this.direction=1,this.timer=null,this.onUpdate=t.onUpdate||(()=>{})}step(){this.direction===1?this.index<this.text.length?(this.index+=1,this.onUpdate(this.text.slice(0,this.index))):this.loop?this.erase?this.direction=-1:(this.stop(),setTimeout(()=>{this.index=0,this.onUpdate(``),this.start()},this.pause)):this.stop():this.index>0?(--this.index,this.onUpdate(this.text.slice(0,this.index))):this.direction=1}start(){this.stop(),this.timer=setInterval(()=>this.step(),this.speed)}stop(){this.timer&&=(clearInterval(this.timer),null)}reset(){this.stop(),this.index=0,this.direction=1,this.onUpdate(``)}updateText(e){this.text=e,this.reset(),this.start()}},_r=({text:e=`Hello, Watercolor UI!`,speed:r=100,pause:i=1500,loop:a=!1,erase:o=!1,showCursor:s=!0,className:c=``,style:l={},...u})=>{let[d,f]=(0,t.useState)(``),p=(0,t.useRef)(null);return(0,t.useEffect)(()=>(p.current=new gr(e,{speed:r,pause:i,loop:a,erase:o,onUpdate:f}),p.current.start(),()=>{p.current&&p.current.stop()}),[e,r,i,a,o]),(0,n.jsxs)(`span`,{className:`typing-wrapper ${c}`,style:l,...u,children:[(0,n.jsx)(`span`,{className:`typing-text`,children:d}),s&&(0,n.jsx)(`span`,{className:`typing-cursor`})]})};_r.displayName=`TypingText`;var vr=({length:e=6,value:r=``,onChange:i,onComplete:a,autoFocus:o=!1,className:s=``,...c})=>{let l=(0,t.useRef)([]);(0,t.useEffect)(()=>{typeof r==`string`&&r.split(``).forEach((e,t)=>{l.current[t]&&(l.current[t].value=e)})},[r]),(0,t.useEffect)(()=>{o&&l.current[0]&&l.current[0].focus()},[o]);let u=e=>{let t=l.current[e];t&&t.focus()},d=()=>l.current.map(e=>e?e.value:``).join(``),f=t=>n=>{let r=n.target.value.replace(/[^0-9a-zA-Z]/g,``);n.target.value=r.toUpperCase();let o=d();i?.(o),r&&t<e-1&&u(t+1),o.length===e&&a?.(o)},p=e=>t=>{t.key===`Backspace`&&!t.target.value&&e>0&&(t.preventDefault(),u(e-1))},m=e=>{e.target.select()};return(0,n.jsx)(`div`,{className:[`wc-input-code`,s].filter(Boolean).join(` `),onPaste:t=>{t.preventDefault();let n=(t.clipboardData?.getData(`text`)||``).trim().slice(0,e);n&&(n.split(``).forEach((e,t)=>{l.current[t]&&(l.current[t].value=e)}),i?.(n),n.length===e&&a?.(n))},...c,children:Array.from({length:e}).map((e,t)=>(0,n.jsx)(`input`,{ref:e=>l.current[t]=e,id:`wc-input-code-${t}`,name:`wc-input-code-${t}`,className:`wc-input-code__box`,type:`text`,maxLength:1,autoComplete:`one-time-code`,inputMode:`numeric`,onInput:f(t),onKeyDown:p(t),onFocus:m},t))})};vr.displayName=`VerificationCodeInput`;function yr(e){return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,`0`)}`}function br(e,t){let n=e.currentTarget.getBoundingClientRect();return(e.clientX-n.left)/n.width*t}function xr(e){e&&(document.fullscreenElement?document.exitFullscreen?.():e.requestFullscreen?.())}var Sr=({src:e,autoplay:r=!1,loop:i=!1,className:a=``,style:o={},...s})=>{let c=(0,t.useRef)(null),[l,u]=(0,t.useState)(!1),[d,f]=(0,t.useState)(0),[p,m]=(0,t.useState)(.7),[h,g]=(0,t.useState)(!1),[_,v]=(0,t.useState)(0),[y,b]=(0,t.useState)(0),x=yr(y),S=yr(_),C=()=>{let e=c.current;e&&(e.paused?e.play():e.pause())},w=()=>{let e=c.current;e&&(v(e.duration||0),b(e.currentTime),f(e.duration?e.currentTime/e.duration*100:0),u(!e.paused))},T=e=>{let t=c.current;t&&(t.currentTime=br(e,_))},E=()=>{g(e=>{let t=!e;return c.current&&(c.current.muted=t),t})},D=()=>{xr(c.current?.parentElement)};return(0,t.useEffect)(()=>{c.current&&(c.current.volume=p)},[p]),(0,t.useEffect)(()=>{let e=c.current;e&&(e.muted=h,e.loop=i,r&&e.play())},[r,i,h]),(0,n.jsxs)(`div`,{className:`video-wrapper ${a}`,style:o,...s,children:[(0,n.jsx)(`video`,{ref:c,className:`video-el`,src:e,onTimeUpdate:w,onEnded:()=>u(!1)}),(0,n.jsxs)(`div`,{className:`controls`,children:[(0,n.jsx)(`button`,{className:`ctrl-btn`,onClick:C,children:l?`❚❚`:`▶️`}),(0,n.jsx)(`div`,{className:`progress`,onClick:T,children:(0,n.jsx)(`div`,{className:`progress-bar`,style:{width:`${d}%`}})}),(0,n.jsxs)(`span`,{className:`time`,children:[x,` / `,S]}),(0,n.jsx)(`button`,{className:`ctrl-btn`,onClick:E,children:h?`🔇`:`🔊`}),(0,n.jsx)(`input`,{className:`volume`,type:`range`,min:`0`,max:`1`,step:`0.05`,value:p,onChange:e=>m(Number(e.target.value))}),(0,n.jsx)(`button`,{className:`ctrl-btn`,onClick:D,children:`⛶`})]})]})};Sr.displayName=`VideoPlayer`;var Cr={content:``,cross:!1,debug:!1,fontSize:14,fontFamily:`sans-serif`,fontStyle:`normal`,fontVariant:``,fontWeight:400,fontColor:`var(--wc-neutral-500, rgba(128,128,128,.3))`,fullscreen:!1,globalRotate:0,lineHeight:14,height:64,width:200,image:void 0,imageHeight:void 0,imageWidth:void 0,imageOpacity:1,rotate:0,selectable:!0,textAlign:`center`,xGap:48,yGap:48,xOffset:0,yOffset:0,zIndex:10};function wr(e){if(typeof e==`string`&&e.startsWith(`var(`)){let t=e.match(/--[^, )]+/);if(t)return getComputedStyle(document.documentElement).getPropertyValue(t[0]).trim()||e}return e}function Tr(e){let t=document.createElement(`canvas`),n=t.getContext(`2d`),r=e.width,i=e.height;if(!e.image&&e.content){n.font=`${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`;let t=e.content.split(/\n/),a=Math.max(...t.map(e=>n.measureText(e).width)),o=e.lineHeight*t.length;r=Math.max(r,Math.ceil(a)),i=Math.max(i,Math.ceil(o))}if(r+=e.xGap,i+=e.yGap,t.width=r,t.height=i,e.image)return new Promise(r=>{let i=new Image;i.crossOrigin=`anonymous`,i.onload=()=>{t.width=(e.imageWidth||i.width)+e.xGap,t.height=(e.imageHeight||i.height)+e.yGap,n.clearRect(0,0,t.width,t.height),n.globalAlpha=e.imageOpacity,n.translate(t.width/2,t.height/2),n.rotate(e.rotate*Math.PI/180);let a=e.imageWidth||i.width,o=e.imageHeight||i.height;n.drawImage(i,-a/2,-o/2,a,o),r(t.toDataURL())},i.src=e.image});let a=(e.content||``).split(/\n/);n.textAlign=e.textAlign||`center`,n.textBaseline=`middle`,n.fillStyle=e.fontColor.startsWith(`var(`)?wr(e.fontColor):e.fontColor,n.font=`${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`,n.translate(r/2,i/2),n.rotate(e.rotate*Math.PI/180);let o=-(a.length-1)*e.lineHeight/2;return a.forEach((t,r)=>{let i=o+r*e.lineHeight;n.fillText(t,0,i)}),Promise.resolve(t.toDataURL())}function Er(e,t){let n={position:e.fullscreen?`fixed`:`absolute`,top:0,left:0,width:e.fullscreen?`100vw`:`100%`,height:e.fullscreen?`100vh`:`100%`,pointerEvents:e.selectable?`none`:`auto`,backgroundImage:`url(${t})`,backgroundRepeat:`repeat`,backgroundPosition:`${e.xOffset}px ${e.yOffset}px`,zIndex:e.zIndex,transform:`rotate(${e.globalRotate}deg)`,mixBlendMode:`multiply`};return e.debug&&(n.outline=`1px dashed red`),e.cross||(n.overflow=`hidden`),n}var Dr=e=>{let r={...Cr,...e},[i,a]=(0,t.useState)(``),o=!!r.content||!!r.image;(0,t.useEffect)(()=>{if(!o)return;let e=!0;return Tr(r).then(t=>{e&&a(t)}),()=>{e=!1}},[(0,t.useMemo)(()=>{let{children:e,...t}=r;return JSON.stringify(t)},[r]),o]);let s=(0,t.useMemo)(()=>o?Er(r,i):{},[i,o,r]);return o?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`div`,{className:`wc-watermark`,style:s}),r.children]}):r.children||null};Dr.displayName=`Watermark`;function Or(e){let t=document.documentElement;e.primary&&Object.entries(e.primary).forEach(([e,n])=>{t.style.setProperty(`--wc-primary-${e}`,n)}),e.secondary&&Object.entries(e.secondary).forEach(([e,n])=>{t.style.setProperty(`--wc-secondary-${e}`,n)}),e.neutral&&Object.entries(e.neutral).forEach(([e,n])=>{t.style.setProperty(`--wc-neutral-${e}`,n)}),e.success&&Object.entries(e.success).forEach(([e,n])=>{t.style.setProperty(`--wc-success-${e}`,n)}),e.warning&&Object.entries(e.warning).forEach(([e,n])=>{t.style.setProperty(`--wc-warning-${e}`,n)}),e.error&&Object.entries(e.error).forEach(([e,n])=>{t.style.setProperty(`--wc-error-${e}`,n)}),e.info&&Object.entries(e.info).forEach(([e,n])=>{t.style.setProperty(`--wc-info-${e}`,n)}),e.danger&&Object.entries(e.danger).forEach(([e,n])=>{t.style.setProperty(`--wc-danger-${e}`,n)}),e.purple&&Object.entries(e.purple).forEach(([e,n])=>{t.style.setProperty(`--wc-purple-${e}`,n)}),e.pink&&Object.entries(e.pink).forEach(([e,n])=>{t.style.setProperty(`--wc-pink-${e}`,n)}),e.teal&&Object.entries(e.teal).forEach(([e,n])=>{t.style.setProperty(`--wc-teal-${e}`,n)}),e.indigo&&Object.entries(e.indigo).forEach(([e,n])=>{t.style.setProperty(`--wc-indigo-${e}`,n)}),e.fonts&&Ar(e.fonts),e.radius&&Object.entries(e.radius).forEach(([e,n])=>{let r=`--wc-radius-${e}`;t.style.setProperty(r,n)})}function kr(e){console.warn(`applyCSSTheme is deprecated. Use loadThemeConfig() for file-based themes.`)}function Ar(e){let t=document.documentElement,n=[];e.chinese&&n.push(`"${e.chinese}"`),e.english&&n.push(`"${e.english}"`);let r=e.fallback||`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`;n.push(r);let i=n.join(`, `);t.style.setProperty(`--wc-font-family`,i),t.style.setProperty(`--wc-font-chinese`,e.chinese||``),t.style.setProperty(`--wc-font-english`,e.english||``),document.body.style.fontFamily=i}function jr(e){let t=document.documentElement;e?t.classList.add(`dark`):t.classList.remove(`dark`)}function Mr(){return document.documentElement.classList.contains(`dark`)}var Nr={default:{primary:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#93c5fd`,400:`#60a5fa`,500:`#3b82f6`,600:`#2563eb`,700:`#1d4ed8`,800:`#1e40af`,900:`#1e3a8a`},secondary:{50:`#f3f4ff`,100:`#e5e7ff`,200:`#c7d2fe`,300:`#a5b4fc`,400:`#818cf8`,500:`#6366f1`,600:`#4f46e5`,700:`#4338ca`,800:`#3730a3`,900:`#312e81`}}};function Pr(e){if(console.warn(`applyTheme is deprecated. Use loadThemeConfig() for file-based themes.`),e===`default`){let t=Nr[e];Or({primary:t.primary,secondary:t.secondary})}else console.warn(`Theme "${e}" is no longer supported. Please use theme.config.json file.`)}var Fr={system:{english:`system-ui`,chinese:`system-ui`,fallback:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`},chinese:{chinese:`PingFang SC`,english:`SF Pro Display`,fallback:`"PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif`},modern:{english:`Inter`,chinese:`Noto Sans SC`,fallback:`"Inter", "Noto Sans SC", sans-serif`},elegant:{english:`Poppins`,chinese:`Source Han Sans`,fallback:`"Poppins", "Source Han Sans", "Noto Sans CJK SC", sans-serif`},readable:{english:`IBM Plex Sans`,chinese:`IBM Plex Sans SC`,fallback:`"IBM Plex Sans", "IBM Plex Sans SC", sans-serif`},apple:{english:`SF Pro Display`,chinese:`PingFang SC`,fallback:`"SF Pro Display", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif`},google:{english:`Roboto`,chinese:`Noto Sans SC`,fallback:`"Roboto", "Noto Sans SC", sans-serif`}};function Ir(e){Ar(Fr[e])}function Lr(){let e=document.documentElement;return{chinese:e.style.getPropertyValue(`--wc-font-chinese`)||void 0,english:e.style.getPropertyValue(`--wc-font-english`)||void 0,fallback:e.style.getPropertyValue(`--wc-font-family`)||void 0}}async function Rr(e=`/theme.config.json`){if(!(typeof window>`u`||typeof fetch>`u`))try{let t=await fetch(e,{cache:`no-store`});if(!t.ok){console.info(`[Watercolor UI] theme.config.json not found, using default theme`);return}if(!(t.headers.get(`content-type`)||``).includes(`application/json`)){console.info(`[Watercolor UI] theme.config.json not found, using default theme`);return}let n=await t.json();Or(n),n.fonts&&Ar(n.fonts),console.info(`[Watercolor UI] Theme loaded from theme.config.json`)}catch(e){console.warn(`[Watercolor UI] 无法加载自定义 theme.config.json:`,e),console.info(`[Watercolor UI] Using default theme`)}}typeof window<`u`&&Rr();function zr(){return Nr.default}function Br(e=`default`,t=!1){let n=typeof window<`u`&&typeof document<`u`,r=null,i=null;if(n)try{r=localStorage.getItem(`wc-color`),i=localStorage.getItem(`wc-scheme`)}catch{}let a=r||e,o=i?i===`dark`:t;if(n){let e=zr();Or({primary:e.primary,secondary:e.secondary}),jr(o)}return{get color(){return a},get dark(){return o},setColor:e=>{if(e!==a&&(a=e,n)){let t=zr();Or({primary:t.primary,secondary:t.secondary});try{localStorage.setItem(`wc-color`,e)}catch{}}},toggleDark:()=>{if(o=!o,n){jr(o);try{localStorage.setItem(`wc-scheme`,o?`dark`:`light`)}catch{}}}}}var Vr=(0,t.createContext)(void 0),Hr=Br(),Ur=({children:e})=>{let[r,i]=(0,t.useState)(Hr.color),[a,o]=(0,t.useState)(Hr.dark);return(0,n.jsx)(Vr.Provider,{value:{color:r,setColor:e=>{Hr.setColor(e),i(e)},dark:a,toggleDark:()=>{Hr.toggleDark(),o(Hr.dark)}},children:e})};function Wr(){let e=(0,t.useContext)(Vr);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}e.Accordion=v,e.Alert=S,e.AppBar=C,e.Autocomplete=w,e.Avatar=A,e.Badge=F,e.Banner=H,e.Blockquote=K,e.Box=ae,e.Breadcrumb=fe,e.Button=ve,e.Card=G,e.CardActions=ye,e.CardContent=be,e.Checkbox=Ce,e.Chip=ke,e.CircularProgress=Ie,e.ColorPicker=Be,e.Container=Ue,e.Copy=Ze,e.DatePicker=it,e.Fab=at,e.Feature=gt,e.Feed=st,e.FileInput=_t,e.FormControl=yt,e.FormControlLabel=bt,e.FormGroup=xt,e.FormHelperText=St,e.Grid=Ct,e.HoverCard=wt,e.Icon=Rt,e.IconButton=zt,e.ImageGallery=Bt,e.Input=Vt,e.List=qt,e.ListItem=Jt,e.ListItemIcon=Yt,e.ListItemText=Xt,e.Menu=on,e.Modal=pn,e.NumberAnimation=mn,e.Pagination=hn,e.Paper=xn,e.Popover=Sn,e.PricingTable=Cn,e.Progress=wn,e.Radio=Dn,e.RadioGroup=En,e.Rating=On,e.Select=kn,e.Skeleton=jn,e.SlideOver=Nn,e.Slider=Mn,e.Snackbar=Fn,e.Status=Wn,e.Switch=Gn,e.Table=Qn,e.TableBody=Yn,e.TableCell=Zn,e.TableHead=Jn,e.TableRow=Xn,e.Tabs=$n,e.TextField=er,e.ThemeProvider=Ur,e.Toolbar=nr,e.Tooltip=sr,e.TypingText=_r,e.Typography=hr,e.VerificationCodeInput=vr,e.VideoPlayer=Sr,e.Watermark=Dr,e.applyCSSTheme=kr,e.applyFontTheme=Ir,e.applyTheme=Pr,e.fontThemes=Fr,e.getCurrentFonts=Lr,e.isDarkMode=Mr,e.loadThemeConfig=Rr,e.setFonts=Ar,e.setTheme=Or,e.themes=Nr,e.toggleDarkMode=jr,e.useTheme=Wr});
|