@neuctra/ui 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/basic/Accordation.d.ts +27 -18
- package/dist/components/basic/Alert.d.ts +14 -2
- package/dist/components/basic/Avatar.d.ts +5 -3
- package/dist/components/basic/Badge.d.ts +3 -3
- package/dist/components/basic/Button.d.ts +15 -17
- package/dist/components/basic/Card.d.ts +7 -49
- package/dist/components/basic/{CheckRadioInput.d.ts → CheckboxGroup.d.ts} +4 -5
- package/dist/components/basic/Container.d.ts +28 -26
- package/dist/components/basic/Drawer.d.ts +20 -11
- package/dist/components/basic/DropDown.d.ts +24 -34
- package/dist/components/basic/Flexbox.d.ts +18 -10
- package/dist/components/basic/GridView.d.ts +7 -5
- package/dist/components/basic/Image.d.ts +31 -6
- package/dist/components/basic/Input.d.ts +18 -10
- package/dist/components/basic/List.d.ts +11 -3
- package/dist/components/basic/Modal.d.ts +8 -2
- package/dist/components/basic/RadioGroup.d.ts +25 -0
- package/dist/components/basic/Section.d.ts +36 -0
- package/dist/components/basic/Stack.d.ts +27 -0
- package/dist/components/basic/SwitchGroup.d.ts +25 -0
- package/dist/components/basic/Table.d.ts +18 -54
- package/dist/components/basic/Tabs.d.ts +28 -28
- package/dist/components/basic/Text.d.ts +19 -32
- package/dist/index.cjs.js +55 -176
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +19 -18
- package/dist/index.es.js +3501 -4738
- package/dist/index.es.js.map +1 -0
- package/dist/src/components/avatar/AvatarGroup.js +9 -0
- package/dist/src/components/avatar/AvatarWithStatus.js +18 -0
- package/dist/src/components/basic/Accordation.js +74 -0
- package/dist/src/components/basic/Alert.js +141 -0
- package/dist/src/components/basic/AudioGallery.js +425 -0
- package/dist/src/components/basic/AudioPlayer.js +116 -0
- package/dist/src/components/basic/Avatar.js +181 -0
- package/dist/src/components/basic/Badge.js +66 -0
- package/dist/src/components/basic/Button.js +101 -0
- package/dist/src/components/basic/Card.js +47 -0
- package/dist/src/components/basic/CheckboxGroup.js +40 -0
- package/dist/src/components/basic/Container.js +45 -0
- package/dist/src/components/basic/Drawer.js +94 -0
- package/dist/src/components/basic/DropDown.js +162 -0
- package/dist/src/components/basic/Flexbox.js +67 -0
- package/dist/src/components/basic/GridView.js +51 -0
- package/dist/src/components/basic/Image.js +95 -0
- package/dist/src/components/basic/Input.js +123 -0
- package/dist/src/components/basic/List.js +71 -0
- package/dist/src/components/basic/Modal.js +86 -0
- package/dist/src/components/basic/RadioGroup.js +37 -0
- package/dist/src/components/basic/Section.js +100 -0
- package/dist/src/components/basic/Stack.js +75 -0
- package/dist/src/components/basic/SwitchGroup.js +50 -0
- package/dist/src/components/basic/Table.js +32 -0
- package/dist/src/components/basic/Tabs.js +149 -0
- package/dist/src/components/basic/Text.js +117 -0
- package/dist/src/index.js +46 -0
- package/dist/types/src/components/basic/Accordation.d.ts +44 -0
- package/dist/types/{components → src/components}/basic/Alert.d.ts +14 -2
- package/dist/types/{components → src/components}/basic/Avatar.d.ts +5 -3
- package/dist/types/{components → src/components}/basic/Badge.d.ts +3 -3
- package/dist/types/src/components/basic/Button.d.ts +26 -0
- package/dist/types/src/components/basic/Card.d.ts +28 -0
- package/dist/types/{components/basic/CheckRadioInput.d.ts → src/components/basic/CheckboxGroup.d.ts} +4 -5
- package/dist/types/src/components/basic/Container.d.ts +32 -0
- package/dist/types/src/components/basic/Drawer.d.ts +33 -0
- package/dist/types/src/components/basic/DropDown.d.ts +53 -0
- package/dist/types/src/components/basic/Flexbox.d.ts +25 -0
- package/dist/types/{components → src/components}/basic/GridView.d.ts +7 -5
- package/dist/types/src/components/basic/Image.d.ts +58 -0
- package/dist/types/{components → src/components}/basic/Input.d.ts +18 -10
- package/dist/types/{components → src/components}/basic/List.d.ts +11 -3
- package/dist/types/{components → src/components}/basic/Modal.d.ts +8 -2
- package/dist/types/src/components/basic/RadioGroup.d.ts +25 -0
- package/dist/types/src/components/basic/Section.d.ts +36 -0
- package/dist/types/src/components/basic/Stack.d.ts +27 -0
- package/dist/types/src/components/basic/SwitchGroup.d.ts +25 -0
- package/dist/types/src/components/basic/Table.d.ts +23 -0
- package/dist/types/src/components/basic/Tabs.d.ts +47 -0
- package/dist/types/src/components/basic/Text.d.ts +26 -0
- package/dist/types/{index.d.ts → src/index.d.ts} +19 -18
- package/dist/types/vite.config.d.ts +2 -0
- package/dist/ui.css +1 -1
- package/dist/vite.config.js +34 -0
- package/package.json +2 -1
- package/dist/components/basic/ImageGallery.d.ts +0 -21
- package/dist/components/basic/VideoGallery.d.ts +0 -136
- package/dist/components/basic/VideoPlayer.d.ts +0 -36
- package/dist/types/components/basic/Accordation.d.ts +0 -35
- package/dist/types/components/basic/Button.d.ts +0 -28
- package/dist/types/components/basic/Card.d.ts +0 -70
- package/dist/types/components/basic/Container.d.ts +0 -30
- package/dist/types/components/basic/Drawer.d.ts +0 -24
- package/dist/types/components/basic/DropDown.d.ts +0 -63
- package/dist/types/components/basic/Flexbox.d.ts +0 -17
- package/dist/types/components/basic/Image.d.ts +0 -33
- package/dist/types/components/basic/ImageGallery.d.ts +0 -21
- package/dist/types/components/basic/Table.d.ts +0 -59
- package/dist/types/components/basic/Tabs.d.ts +0 -47
- package/dist/types/components/basic/Text.d.ts +0 -39
- package/dist/types/components/basic/VideoGallery.d.ts +0 -136
- package/dist/types/components/basic/VideoPlayer.d.ts +0 -36
- /package/dist/types/{components → src/components}/avatar/AvatarGroup.d.ts +0 -0
- /package/dist/types/{components → src/components}/avatar/AvatarWithStatus.d.ts +0 -0
- /package/dist/types/{components → src/components}/basic/AudioGallery.d.ts +0 -0
- /package/dist/types/{components → src/components}/basic/AudioPlayer.d.ts +0 -0
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react");var xe={exports:{}},de={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var je;function Ne(){if(je)return de;je=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function n(s,i,a){var x=null;if(a!==void 0&&(x=""+a),i.key!==void 0&&(x=""+i.key),"key"in i){a={};for(var f in i)f!=="key"&&(a[f]=i[f])}else a=i;return i=a.ref,{$$typeof:t,type:s,key:x,ref:i!==void 0?i:null,props:a}}return de.Fragment=r,de.jsx=n,de.jsxs=n,de}var ue={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,268 +14,141 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var we;function Pe(){return we||(we=1,process.env.NODE_ENV!=="production"&&(function(){function t(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===D?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case h:return"Fragment";case l:return"Profiler";case p:return"StrictMode";case z:return"Suspense";case L:return"SuspenseList";case I:return"Activity"}if(typeof o=="object")switch(typeof o.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),o.$$typeof){case b:return"Portal";case $:return o.displayName||"Context";case w:return(o._context.displayName||"Context")+".Consumer";case S:var C=o.render;return o=o.displayName,o||(o=C.displayName||C.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case M:return C=o.displayName||null,C!==null?C:t(o.type)||"Memo";case F:C=o._payload,o=o._init;try{return t(o(C))}catch{}}return null}function r(o){return""+o}function n(o){try{r(o);var C=!1}catch{C=!0}if(C){C=console;var N=C.error,Y=typeof Symbol=="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return N.call(C,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Y),r(o)}}function s(o){if(o===h)return"<>";if(typeof o=="object"&&o!==null&&o.$$typeof===F)return"<...>";try{var C=t(o);return C?"<"+C+">":"<...>"}catch{return"<...>"}}function i(){var o=B.A;return o===null?null:o.getOwner()}function a(){return Error("react-stack-top-frame")}function x(o){if(H.call(o,"key")){var C=Object.getOwnPropertyDescriptor(o,"key").get;if(C&&C.isReactWarning)return!1}return o.key!==void 0}function f(o,C){function N(){T||(T=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",C))}N.isReactWarning=!0,Object.defineProperty(o,"key",{get:N,configurable:!0})}function g(){var o=t(this.type);return V[o]||(V[o]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),o=this.props.ref,o!==void 0?o:null}function y(o,C,N,Y,K,ne){var A=N.ref;return o={$$typeof:m,type:o,key:C,props:N,_owner:Y},(A!==void 0?A:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:g}):Object.defineProperty(o,"ref",{enumerable:!1,value:null}),o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(o,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(o,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:K}),Object.defineProperty(o,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ne}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o}function v(o,C,N,Y,K,ne){var A=C.children;if(A!==void 0)if(Y)if(W(A)){for(Y=0;Y<A.length;Y++)c(A[Y]);Object.freeze&&Object.freeze(A)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else c(A);if(H.call(C,"key")){A=t(o);var P=Object.keys(C).filter(function(R){return R!=="key"});Y=0<P.length?"{key: someKey, "+P.join(": ..., ")+": ...}":"{key: someKey}",re[A+Y]||(P=0<P.length?"{"+P.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,
|
|
23
|
-
@keyframes spin {
|
|
24
|
-
to { transform: rotate(360deg); }
|
|
25
|
-
}
|
|
26
|
-
`})]})};/**
|
|
27
|
-
* @license lucide-react v0.536.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const Tt=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rt=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,a,i)=>i?i.toUpperCase():a.toLowerCase()),et=t=>{const r=Rt(t);return r.charAt(0).toUpperCase()+r.slice(1)},ot=(...t)=>t.filter((r,a,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===a).join(" ").trim(),$t=t=>{for(const r in t)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};/**
|
|
32
|
-
* @license lucide-react v0.536.0 - ISC
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the ISC license.
|
|
35
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/var zt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
37
|
-
* @license lucide-react v0.536.0 - ISC
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the ISC license.
|
|
40
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const Mt=s.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:a=2,absoluteStrokeWidth:i,className:c="",children:n,iconNode:l,...d},S)=>s.createElement("svg",{ref:S,...zt,width:r,height:r,stroke:t,strokeWidth:i?Number(a)*24/Number(r):a,className:ot("lucide",c),...!n&&!$t(d)&&{"aria-hidden":"true"},...d},[...l.map(([j,v])=>s.createElement(j,v)),...Array.isArray(n)?n:[n]]));/**
|
|
42
|
-
* @license lucide-react v0.536.0 - ISC
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the ISC license.
|
|
45
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const te=(t,r)=>{const a=s.forwardRef(({className:i,...c},n)=>s.createElement(Mt,{ref:n,iconNode:r,className:ot(`lucide-${Tt(et(t))}`,`lucide-${t}`,i),...c}));return a.displayName=et(t),a};/**
|
|
47
|
-
* @license lucide-react v0.536.0 - ISC
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the ISC license.
|
|
50
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const It=[["rect",{width:"18",height:"14",x:"3",y:"5",rx:"2",ry:"2",key:"12ruh7"}],["path",{d:"M7 15h4M15 15h2M7 11h2M13 11h4",key:"1ueiar"}]],Ct=te("captions",It);/**
|
|
52
|
-
* @license lucide-react v0.536.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const Et=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],it=te("chevron-left",Et);/**
|
|
57
|
-
* @license lucide-react v0.536.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const _t=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],at=te("chevron-right",_t);/**
|
|
62
|
-
* @license lucide-react v0.536.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the ISC license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const Lt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Pt=te("circle-alert",Lt);/**
|
|
22
|
+
<%s key={someKey} {...props} />`,Y,A,P,A),re[A+Y]=!0)}if(A=null,N!==void 0&&(n(N),A=""+N),x(C)&&(n(C.key),A=""+C.key),"key"in C){N={};for(var G in C)G!=="key"&&(N[G]=C[G])}else N=C;return A&&f(N,typeof o=="function"?o.displayName||o.name||"Unknown":o),y(o,A,N,i(),K,ne)}function c(o){u(o)?o._store&&(o._store.validated=1):typeof o=="object"&&o!==null&&o.$$typeof===F&&(o._payload.status==="fulfilled"?u(o._payload.value)&&o._payload.value._store&&(o._payload.value._store.validated=1):o._store&&(o._store.validated=1))}function u(o){return typeof o=="object"&&o!==null&&o.$$typeof===m}var j=d,m=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),$=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),D=Symbol.for("react.client.reference"),B=j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=Object.prototype.hasOwnProperty,W=Array.isArray,E=console.createTask?console.createTask:function(){return null};j={react_stack_bottom_frame:function(o){return o()}};var T,V={},U=j.react_stack_bottom_frame.bind(j,a)(),q=E(s(a)),re={};ue.Fragment=h,ue.jsx=function(o,C,N){var Y=1e4>B.recentlyCreatedOwnerStacks++;return v(o,C,N,!1,Y?Error("react-stack-top-frame"):U,Y?E(s(o)):q)},ue.jsxs=function(o,C,N){var Y=1e4>B.recentlyCreatedOwnerStacks++;return v(o,C,N,!0,Y?Error("react-stack-top-frame"):U,Y?E(s(o)):q)}})()),ue}var ke;function Oe(){return ke||(ke=1,process.env.NODE_ENV==="production"?xe.exports=Ne():xe.exports=Pe()),xe.exports}var e=Oe();/**
|
|
67
23
|
* @license lucide-react v0.536.0 - ISC
|
|
68
24
|
*
|
|
69
25
|
* This source code is licensed under the ISC license.
|
|
70
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const
|
|
27
|
+
*/const We=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ye=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,n,s)=>s?s.toUpperCase():n.toLowerCase()),Se=t=>{const r=Ye(t);return r.charAt(0).toUpperCase()+r.slice(1)},$e=(...t)=>t.filter((r,n,s)=>!!r&&r.trim()!==""&&s.indexOf(r)===n).join(" ").trim(),Fe=t=>{for(const r in t)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};/**
|
|
72
28
|
* @license lucide-react v0.536.0 - ISC
|
|
73
29
|
*
|
|
74
30
|
* This source code is licensed under the ISC license.
|
|
75
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/
|
|
32
|
+
*/var De={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
77
33
|
* @license lucide-react v0.536.0 - ISC
|
|
78
34
|
*
|
|
79
35
|
* This source code is licensed under the ISC license.
|
|
80
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const
|
|
37
|
+
*/const He=d.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:i="",children:a,iconNode:x,...f},g)=>d.createElement("svg",{ref:g,...De,width:r,height:r,stroke:t,strokeWidth:s?Number(n)*24/Number(r):n,className:$e("lucide",i),...!a&&!Fe(f)&&{"aria-hidden":"true"},...f},[...x.map(([y,v])=>d.createElement(y,v)),...Array.isArray(a)?a:[a]]));/**
|
|
82
38
|
* @license lucide-react v0.536.0 - ISC
|
|
83
39
|
*
|
|
84
40
|
* This source code is licensed under the ISC license.
|
|
85
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const
|
|
42
|
+
*/const X=(t,r)=>{const n=d.forwardRef(({className:s,...i},a)=>d.createElement(He,{ref:a,iconNode:r,className:$e(`lucide-${We(Se(t))}`,`lucide-${t}`,s),...i}));return n.displayName=Se(t),n};/**
|
|
87
43
|
* @license lucide-react v0.536.0 - ISC
|
|
88
44
|
*
|
|
89
45
|
* This source code is licensed under the ISC license.
|
|
90
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const
|
|
47
|
+
*/const Ve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Ue=X("circle-alert",Ve);/**
|
|
92
48
|
* @license lucide-react v0.536.0 - ISC
|
|
93
49
|
*
|
|
94
50
|
* This source code is licensed under the ISC license.
|
|
95
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const
|
|
52
|
+
*/const qe=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Ge=X("circle-check-big",qe);/**
|
|
97
53
|
* @license lucide-react v0.536.0 - ISC
|
|
98
54
|
*
|
|
99
55
|
* This source code is licensed under the ISC license.
|
|
100
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const
|
|
57
|
+
*/const Xe=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Je=X("eye-off",Xe);/**
|
|
102
58
|
* @license lucide-react v0.536.0 - ISC
|
|
103
59
|
*
|
|
104
60
|
* This source code is licensed under the ISC license.
|
|
105
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const
|
|
62
|
+
*/const Ze=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ke=X("eye",Ze);/**
|
|
107
63
|
* @license lucide-react v0.536.0 - ISC
|
|
108
64
|
*
|
|
109
65
|
* This source code is licensed under the ISC license.
|
|
110
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const
|
|
67
|
+
*/const Qe=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],et=X("heart",Qe);/**
|
|
112
68
|
* @license lucide-react v0.536.0 - ISC
|
|
113
69
|
*
|
|
114
70
|
* This source code is licensed under the ISC license.
|
|
115
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const
|
|
72
|
+
*/const tt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],rt=X("info",tt);/**
|
|
117
73
|
* @license lucide-react v0.536.0 - ISC
|
|
118
74
|
*
|
|
119
75
|
* This source code is licensed under the ISC license.
|
|
120
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const
|
|
77
|
+
*/const nt=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],st=X("maximize",nt);/**
|
|
122
78
|
* @license lucide-react v0.536.0 - ISC
|
|
123
79
|
*
|
|
124
80
|
* This source code is licensed under the ISC license.
|
|
125
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const
|
|
82
|
+
*/const ot=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]],at=X("minimize",ot);/**
|
|
127
83
|
* @license lucide-react v0.536.0 - ISC
|
|
128
84
|
*
|
|
129
85
|
* This source code is licensed under the ISC license.
|
|
130
86
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const
|
|
87
|
+
*/const lt=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],Te=X("music",lt);/**
|
|
132
88
|
* @license lucide-react v0.536.0 - ISC
|
|
133
89
|
*
|
|
134
90
|
* This source code is licensed under the ISC license.
|
|
135
91
|
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const
|
|
92
|
+
*/const it=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],he=X("pause",it);/**
|
|
137
93
|
* @license lucide-react v0.536.0 - ISC
|
|
138
94
|
*
|
|
139
95
|
* This source code is licensed under the ISC license.
|
|
140
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const
|
|
97
|
+
*/const ct=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],ge=X("play",ct);/**
|
|
142
98
|
* @license lucide-react v0.536.0 - ISC
|
|
143
99
|
*
|
|
144
100
|
* This source code is licensed under the ISC license.
|
|
145
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const
|
|
102
|
+
*/const dt=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Re=X("rotate-ccw",dt);/**
|
|
147
103
|
* @license lucide-react v0.536.0 - ISC
|
|
148
104
|
*
|
|
149
105
|
* This source code is licensed under the ISC license.
|
|
150
106
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const
|
|
107
|
+
*/const ut=[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]],ft=X("shuffle",ut);/**
|
|
152
108
|
* @license lucide-react v0.536.0 - ISC
|
|
153
109
|
*
|
|
154
110
|
* This source code is licensed under the ISC license.
|
|
155
111
|
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const
|
|
112
|
+
*/const pt=[["path",{d:"M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z",key:"15892j"}],["path",{d:"M3 20V4",key:"1ptbpl"}]],me=X("skip-back",pt);/**
|
|
157
113
|
* @license lucide-react v0.536.0 - ISC
|
|
158
114
|
*
|
|
159
115
|
* This source code is licensed under the ISC license.
|
|
160
116
|
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const
|
|
117
|
+
*/const xt=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],be=X("skip-forward",xt);/**
|
|
162
118
|
* @license lucide-react v0.536.0 - ISC
|
|
163
119
|
*
|
|
164
120
|
* This source code is licensed under the ISC license.
|
|
165
121
|
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const
|
|
122
|
+
*/const ht=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],gt=X("triangle-alert",ht);/**
|
|
167
123
|
* @license lucide-react v0.536.0 - ISC
|
|
168
124
|
*
|
|
169
125
|
* This source code is licensed under the ISC license.
|
|
170
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const
|
|
127
|
+
*/const mt=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],bt=X("user",mt);/**
|
|
172
128
|
* @license lucide-react v0.536.0 - ISC
|
|
173
129
|
*
|
|
174
130
|
* This source code is licensed under the ISC license.
|
|
175
131
|
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const
|
|
132
|
+
*/const yt=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],Ee=X("volume-2",yt);/**
|
|
177
133
|
* @license lucide-react v0.536.0 - ISC
|
|
178
134
|
*
|
|
179
135
|
* This source code is licensed under the ISC license.
|
|
180
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const
|
|
137
|
+
*/const vt=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],Me=X("volume-x",vt);/**
|
|
182
138
|
* @license lucide-react v0.536.0 - ISC
|
|
183
139
|
*
|
|
184
140
|
* This source code is licensed under the ISC license.
|
|
185
141
|
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
* This source code is licensed under the ISC license.
|
|
190
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const vr=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],De=te("x",vr),wr=s.forwardRef(({type:t="text",placeholder:r="",label:a,value:i,defaultValue:c,onChange:n,name:l="",disabled:d=!1,readOnly:S=!1,required:j=!1,error:v,success:f=!1,autoFocus:b=!1,iconLeft:x,iconRight:w,borderColor:m="#ccc",focusBorderColor:C="#2563eb",hoverBorderColor:g="#4b5563",backgroundColor:y="#ffffff",textColor:E="#111827",errorColor:T="#dc2626",successColor:_="#16a34a",labelColor:A="#374151",size:R="md",radius:M="6px",fontSize:X="14px",rows:F=4,cols:Y,maxLength:$,resize:N=!0,showCharacterCount:J=!0,className:k,style:h},I)=>{const V=s.useRef(null),[U,o]=s.useState(c||""),[z,L]=s.useState(!1);s.useImperativeHandle(I,()=>V.current);const q=u=>{$&&u.target.value.length>$||(o(u.target.value),n&&n(l,u.target.value))},K=()=>{switch(R){case"sm":return"6px 12px";case"lg":return"12px 20px";default:return"10px 16px"}},D=()=>{switch(R){case"sm":return"13px";case"lg":return"16px";default:return X}},G=v?T:f?_:m,ne={width:"100%",padding:K(),paddingLeft:x?"40px":K().split(" ")[1],paddingRight:w||t==="password"?"40px":K().split(" ")[1],border:`1px solid ${G}`,borderRadius:M,backgroundColor:y,color:E,fontSize:D(),outline:"none",resize:t==="textarea"&&!N?"none":void 0,...h};return e.jsxs("div",{style:{width:"100%",fontFamily:"sans-serif"},className:k,children:[a&&e.jsxs("label",{htmlFor:l,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:A},children:[a," ",j&&e.jsx("span",{style:{color:T},children:"*"})]}),e.jsxs("div",{style:{position:"relative",width:"100%"},children:[x&&e.jsx("span",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"#6b7280"},children:x}),t==="textarea"?e.jsx("textarea",{ref:V,name:l,value:i??U,onChange:q,placeholder:r,rows:F,cols:Y,maxLength:$,disabled:d,readOnly:S,autoFocus:b,style:ne,onFocus:u=>{u.currentTarget.style.borderColor=C},onBlur:u=>{u.currentTarget.style.borderColor=G},onMouseEnter:u=>{u.currentTarget.style.borderColor=g},onMouseLeave:u=>{u.currentTarget.style.borderColor=G}}):e.jsx("input",{ref:V,id:l,name:l,type:t==="password"?z?"text":"password":t,value:i??U,onChange:q,placeholder:r,disabled:d,readOnly:S,autoFocus:b,style:ne,onFocus:u=>{u.currentTarget.style.borderColor=C},onBlur:u=>{u.currentTarget.style.borderColor=G},onMouseEnter:u=>{u.currentTarget.style.borderColor=g},onMouseLeave:u=>{u.currentTarget.style.borderColor=G}}),t==="password"&&e.jsx("button",{type:"button",onClick:()=>L(!z),style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",color:"#6b7280",cursor:"pointer",padding:0},children:z?e.jsx(Wt,{size:18}):e.jsx(Yt,{size:18})}),w&&t!=="password"&&e.jsx("span",{style:{position:"absolute",right:"12px",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"#6b7280"},children:w})]}),t==="textarea"&&J&&$&&e.jsxs("div",{style:{textAlign:"right",fontSize:"12px",color:"#6b7280",marginTop:"4px"},children:[(i??U).length,"/",$]}),v&&e.jsx("p",{style:{color:T,fontSize:"12px",marginTop:"4px",lineHeight:"1.3"},children:v})]})}),jr=({title:t,titleIcon:r,items:a,type:i="unordered",bulletColor:c="#2563eb",textColor:n="#111827",backgroundColor:l="#fff",borderColor:d="#e5e7eb",fontSize:S="15px",fontWeight:j=500,borderRadius:v="12px",padding:f="16px",spacing:b="12px",className:x,style:w})=>{const m=i==="ordered",C=i==="inline",g={backgroundColor:l,borderColor:d,color:n,borderWidth:d?"1px":"0px",borderStyle:"solid",borderRadius:v,padding:f,...w},y=C?{display:"flex",gap:b,paddingLeft:0,listStyleType:"none",margin:0}:{listStyleType:m?"decimal":"none",paddingLeft:m?"20px":"0",margin:0},E=m?"ol":"ul";return e.jsxs("div",{className:x,style:g,children:[t&&e.jsxs("div",{style:{display:"flex",alignItems:"center",fontSize:"17px",fontWeight:600,marginBottom:"10px",gap:"8px"},children:[r&&e.jsx("span",{style:{fontSize:"18px"},children:r}),e.jsx("span",{children:t})]}),e.jsx(E,{style:y,children:a.map((T,_)=>e.jsx(dt,{...T,bulletColor:c,textColor:n,fontSize:S,fontWeight:j,spacing:b,isInline:C},_))})]})},dt=({text:t,icon:r,onClick:a,subItems:i,bulletColor:c,textColor:n,fontSize:l,fontWeight:d,spacing:S,isInline:j})=>{const v={display:"flex",flexDirection:"column",gap:"6px",marginBottom:j?"0":S},f={display:"flex",alignItems:"center",gap:"8px",fontSize:l,fontWeight:d,color:n,cursor:a?"pointer":"default"},b={width:"8px",height:"8px",backgroundColor:c,borderRadius:"50%",flexShrink:0},x={listStyleType:"disc",paddingLeft:"20px",margin:0};return e.jsxs("li",{style:v,children:[e.jsxs("div",{style:f,onClick:a,children:[r?e.jsx("span",{style:{fontSize:"16px",color:n},children:r}):!j&&e.jsx("span",{style:b}),e.jsx("span",{children:t})]}),i&&i.length>0&&e.jsx("ul",{style:x,children:i.map((w,m)=>e.jsx(dt,{...w,bulletColor:c,textColor:n,fontSize:l,fontWeight:d,spacing:S,isInline:!1},m))})]})},Je=({tabs:t,defaultActive:r=0,tabPosition:a,activeTabClassName:i="",inactiveTabClassName:c="",tabContainerClassName:n="",contentContainerClassName:l="",className:d="",activeTabStyle:S,inactiveTabStyle:j,tabContainerStyle:v,contentContainerStyle:f,style:b,tabsWidth:x="240px",tabGap:w=8,tabPadding:m="12px 16px",tabBorderRadius:C=8,primaryColor:g="#2563eb",textColor:y="#374151",backgroundColor:E="#ffffff",hoverTextColor:T="#1e40af",disabledColor:_="#d1d5db",responsiveBreakpoint:A=768,showDrawerLabel:R="Select Tab",drawerIcon:M="☰",transitionDuration:X=200,onTabChange:F,role:Y="tablist",ariaOrientation:$="horizontal"})=>{const[N,J]=s.useState(r),[k,h]=s.useState(null),[I,V]=s.useState(!1),[U,o]=s.useState(!1);s.useEffect(()=>{if(typeof window>"u")return;const W=()=>{V(window.innerWidth<=A)};return W(),window.addEventListener("resize",W),()=>window.removeEventListener("resize",W)},[A]),s.useEffect(()=>{r>=0&&r<t.length&&J(r)},[r,t.length]);const z=W=>{t[W].disabled||(J(W),F?.(W))},L=a==="left"||a==="right",K={display:"flex",flexDirection:I?"column":L?a==="left"?"row":"row-reverse":"column",width:"100%",height:"100%",backgroundColor:E,...b},D={width:I?"100%":L?x:"100%",display:"flex",flexDirection:I||L?"column":"row",gap:w,padding:I?"0":"8px",boxSizing:"border-box",overflowX:I?"hidden":"visible",...v},G={flexGrow:1,padding:I?"16px":"24px",background:"#f9fafb",boxSizing:"border-box",minWidth:0,width:I?"100%":L?`calc(100% - ${x})`:"100%",...f},ne={cursor:"pointer",display:"flex",alignItems:"center",gap:8,padding:m,borderRadius:C,border:"none",backgroundColor:"transparent",fontWeight:500,transition:`all ${X}ms ease`,width:I||L?"100%":"auto",marginBottom:I||L?w:0,marginRight:!L&&!I?w:0,justifyContent:"flex-start",textAlign:"left",fontSize:I?"14px":"inherit"},u={backgroundColor:g,color:"#fff",fontWeight:600,boxShadow:`0 2px 10px ${g}33`,...S},O={backgroundColor:"transparent",color:y,...j},p={backgroundColor:`${g}11`,color:T},B={cursor:"not-allowed",color:_,opacity:.7},Q={...ne,...u,justifyContent:"space-between",width:"100%",marginBottom:w,fontSize:"16px"};return e.jsxs("div",{className:`react-tabs ${d}`,style:K,role:Y,"aria-orientation":I||L?"vertical":$,children:[e.jsx("style",{children:`
|
|
192
|
-
.react-tabs {
|
|
193
|
-
--primary-color: ${g};
|
|
194
|
-
--text-color: ${y};
|
|
195
|
-
--bg-color: ${E};
|
|
196
|
-
--hover-color: ${T};
|
|
197
|
-
--disabled-color: ${_};
|
|
198
|
-
--transition-duration: ${X}ms;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.react-tabs__mobile-drawer {
|
|
202
|
-
display: flex;
|
|
203
|
-
flex-direction: column;
|
|
204
|
-
gap: ${w}px;
|
|
205
|
-
width: 100%;
|
|
206
|
-
animation: react-tabs-slideDown ${X}ms ease-out;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
@keyframes react-tabs-slideDown {
|
|
210
|
-
from { opacity: 0; transform: translateY(-10px); }
|
|
211
|
-
to { opacity: 1; transform: translateY(0); }
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.react-tabs [role="tab"][aria-selected="true"] {
|
|
215
|
-
background-color: var(--primary-color);
|
|
216
|
-
color: white;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.react-tabs [role="tabpanel"] {
|
|
220
|
-
outline: none;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
@media (max-width: ${A}px) {
|
|
224
|
-
.react-tabs__drawer-button {
|
|
225
|
-
width: 100%;
|
|
226
|
-
display: flex;
|
|
227
|
-
justify-content: space-between;
|
|
228
|
-
align-items: center;
|
|
229
|
-
padding: ${m};
|
|
230
|
-
border-radius: ${C}px;
|
|
231
|
-
margin-bottom: ${w}px;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.react-tabs__nav {
|
|
235
|
-
padding: 0;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.react-tabs__content {
|
|
239
|
-
padding: 16px;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
`}),I?e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>o(!U),style:Q,className:"react-tabs__drawer-button","aria-expanded":U,"aria-controls":"mobile-tabs-drawer","aria-haspopup":"true",children:[e.jsx("span",{children:R}),e.jsx("span",{children:M})]}),U&&e.jsx("div",{id:"mobile-tabs-drawer",className:"react-tabs__mobile-drawer",role:"menu",children:t.map((W,Z)=>{const re=Z===N,ie=k===Z,se=W.disabled;return e.jsxs("button",{onClick:()=>{z(Z),o(!1)},onMouseEnter:()=>!se&&h(Z),onMouseLeave:()=>h(null),className:re?i:c,style:{...ne,...re?u:O,...ie&&!re&&!se?p:{},...se?B:{}},role:"menuitemradio","aria-checked":re,"aria-disabled":se,"aria-label":W.ariaLabel||(typeof W.label=="string"?W.label:`Tab ${Z+1}`),disabled:se,children:[W.icon&&e.jsx("span",{"aria-hidden":"true",children:W.icon}),e.jsx("span",{children:W.label})]},Z)})})]}):e.jsx("nav",{className:`react-tabs__nav ${n}`,style:D,role:Y,"aria-label":"Tabs Navigation",children:t.map((W,Z)=>{const re=Z===N,ie=k===Z,se=W.disabled;return e.jsxs("button",{onClick:()=>z(Z),onMouseEnter:()=>!se&&h(Z),onMouseLeave:()=>h(null),className:re?i:c,style:{...ne,...re?u:O,...ie&&!re&&!se?p:{},...se?B:{}},role:"tab","aria-selected":re,"aria-disabled":se,"aria-controls":`tabpanel-${Z}`,id:`tab-${Z}`,tabIndex:re?0:-1,disabled:se,children:[W.icon&&e.jsx("span",{"aria-hidden":"true",children:W.icon}),e.jsx("span",{children:W.label})]},Z)})}),e.jsx("section",{className:`react-tabs__content ${l}`,style:G,role:"tabpanel",id:`tabpanel-${N}`,"aria-labelledby":`tab-${N}`,tabIndex:0,children:t[N]?.content})]})},ut=t=>e.jsx(Je,{...t,tabPosition:"left",ariaOrientation:"vertical"}),pt=t=>e.jsx(Je,{...t,tabPosition:"top"}),ft=t=>e.jsx(Je,{...t,tabPosition:"right",ariaOrientation:"vertical"}),kr={Left:ut,Top:pt,Right:ft},Sr=({src:t,poster:r,title:a,autoPlay:i=!1,loop:c=!1,muted:n=!1,width:l="100%",height:d="400px",borderRadius:S="16px",theme:j="dark",primaryColor:v="#3b82f6",className:f,showProgress:b=!0,showVolumeSlider:x=!0,showSettings:w=!0,showDownload:m=!0,showShare:C=!0,showPiP:g=!0,showSubtitles:y=!1,showPlaybackSpeed:E=!0,showQuality:T=!0,previewThumbnails:_=!1,customControls:A=!0,hideControlsDelay:R=3e3,seekStep:M=10,volumeStep:X=.1,onPlay:F,onPause:Y,onEnded:$,onTimeUpdate:N,onVolumeChange:J})=>{const k=s.useRef(null),h=s.useRef(null),I=s.useRef(null),V=s.useRef(0),[U,o]=s.useState(i),[z,L]=s.useState(0),[q,K]=s.useState(0),[D,G]=s.useState(n?0:.8),[ne,u]=s.useState(n),[O,p]=s.useState(!1),[B,Q]=s.useState(!1),[W,Z]=s.useState(c),[re,ie]=s.useState(1),[se,ce]=s.useState("auto"),[fe,xe]=s.useState(!0),[he,ye]=s.useState(!1),[pe,ge]=s.useState(!1),[we,je]=s.useState(!1),[de,Te]=s.useState(0),[Re,$e]=s.useState(!1),[Ye,ke]=s.useState(0),ee={dark:{background:"linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%)",controlsBg:"rgba(0, 0, 0, 0.8)",text:"#ffffff",textSecondary:"#a3a3a3",border:"rgba(255, 255, 255, 0.1)",hover:"rgba(255, 255, 255, 0.1)"},light:{background:"linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%)",controlsBg:"rgba(255, 255, 255, 0.95)",text:"#212529",textSecondary:"#6c757d",border:"rgba(0, 0, 0, 0.1)",hover:"rgba(0, 0, 0, 0.05)"},glass:{background:"rgba(255, 255, 255, 0.1)",controlsBg:"rgba(255, 255, 255, 0.1)",text:"#ffffff",textSecondary:"#a3a3a3",border:"rgba(255, 255, 255, 0.2)",hover:"rgba(255, 255, 255, 0.2)"},neon:{background:"linear-gradient(135deg, #0a0a0a 0%, #1a0a1a 100%)",controlsBg:"rgba(139, 69, 19, 0.8)",text:"#00ffff",textSecondary:"#ff00ff",border:"rgba(0, 255, 255, 0.3)",hover:"rgba(255, 0, 255, 0.2)"}}[j],Me=s.useCallback(()=>{typeof window>"u"||(V.current&&clearTimeout(V.current),V.current=window.setTimeout(()=>{U&&xe(!1)},R))},[U,R]),Ie=s.useCallback(()=>{xe(!0),Me()},[Me]);s.useEffect(()=>{k.current&&(k.current.volume=D,k.current.loop=W,k.current.muted=ne,k.current.playbackRate=re)},[D,W,ne,re]),s.useEffect(()=>{U?Me():(V.current&&clearTimeout(V.current),xe(!0))},[U,Me]);const Ce=()=>{k.current&&(U?(k.current.pause(),o(!1),Y?.()):(k.current.play().catch(console.error),o(!0),F?.()))},Pe=()=>{if(!k.current)return;const P=k.current.currentTime,le=k.current.duration;L(P),K(le),N?.(P)},H=P=>{if(!k.current||!I.current)return;const le=I.current.getBoundingClientRect(),Se=(P.clientX-le.left)/le.width*q;k.current.currentTime=Se,L(Se)},oe=P=>{if(!I.current)return;const le=I.current.getBoundingClientRect(),Se=(P.clientX-le.left)/le.width*q;Te(Se),ke(P.clientX-le.left),$e(!0)},ue=P=>{k.current&&(k.current.currentTime=Math.min(Math.max(0,k.current.currentTime+P),q))},be=P=>{const le=Math.min(Math.max(P,0),1);G(le),u(le===0),J?.(le)},me=async()=>{if(h.current)try{O?document.exitFullscreen&&await document.exitFullscreen():h.current.requestFullscreen&&await h.current.requestFullscreen(),p(!O)}catch(P){console.error("Fullscreen error:",P)}},Ae=async()=>{if(k.current)try{B?document.exitPictureInPicture&&await document.exitPictureInPicture():k.current.requestPictureInPicture&&await k.current.requestPictureInPicture(),Q(!B)}catch(P){console.error("Picture-in-Picture error:",P)}},He=()=>{const P=document.createElement("a");P.href=t,P.download=a||"video",P.click()},yt=async()=>{if(!(typeof window>"u")&&navigator)try{const P=window.location.href;navigator.share?await navigator.share({title:a||"Video",url:P}):navigator.clipboard?(await navigator.clipboard.writeText(P),console.log("URL copied to clipboard!")):console.warn("Share API and Clipboard API not supported in this browser.")}catch(P){console.error("Share error:",P)}},Xe=P=>{if(!P||isNaN(P))return"0:00";const le=Math.floor(P/3600),ze=Math.floor(P%3600/60),Se=Math.floor(P%60);return le>0?`${le}:${ze.toString().padStart(2,"0")}:${Se.toString().padStart(2,"0")}`:`${ze}:${Se.toString().padStart(2,"0")}`},mt=()=>ne||D===0?e.jsx(We,{size:18}):D<.3?e.jsx(We,{size:18}):D<.7?e.jsx(br,{size:18}):e.jsx(Ge,{size:18});return s.useEffect(()=>()=>{V.current&&clearTimeout(V.current)},[]),e.jsxs("div",{ref:h,className:f,style:{position:"relative",width:l,height:d,background:ee.background,borderRadius:S,overflow:"hidden",boxShadow:j==="glass"?"inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 32px rgba(0, 0, 0, 0.3)":"0 10px 30px rgba(0, 0, 0, 0.3)",backdropFilter:j==="glass"?"blur(16px)":"none",userSelect:"none",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},onMouseMove:Ie,onMouseLeave:()=>xe(!1),children:[e.jsx("video",{ref:k,src:t,poster:r,autoPlay:i,loop:c,muted:n,controls:!1,onClick:Ce,onTimeUpdate:Pe,onLoadedMetadata:Pe,onWaiting:()=>je(!0),onCanPlay:()=>je(!1),onEnded:()=>{o(!1),$?.()},style:{width:"100%",height:"100%",objectFit:"cover",backgroundColor:"#000"}}),we&&e.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:ee.text,animation:"spin 1s linear infinite"},children:e.jsx(Gt,{size:48})}),!U&&!we&&e.jsx("button",{onClick:Ce,style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",background:`${v}CC`,borderRadius:"50%",border:"none",padding:"24px",cursor:"pointer",color:"#fff",backdropFilter:"blur(10px)",transition:"all 0.3s ease",boxShadow:"0 8px 32px rgba(0, 0, 0, 0.3)"},onMouseEnter:P=>{P.currentTarget.style.transform="translate(-50%, -50%) scale(1.1)",P.currentTarget.style.background=v},onMouseLeave:P=>{P.currentTarget.style.transform="translate(-50%, -50%) scale(1)",P.currentTarget.style.background=`${v}CC`},children:e.jsx(Le,{size:32})}),a&&fe&&e.jsx("div",{style:{position:"absolute",top:"16px",left:"16px",right:"16px",color:ee.text,fontSize:"18px",fontWeight:"600",textShadow:"0 2px 4px rgba(0, 0, 0, 0.8)",opacity:fe?1:0,transition:"opacity 0.3s ease"},children:a}),A&&e.jsxs("div",{style:{position:"absolute",bottom:0,left:0,right:0,background:ee.controlsBg,backdropFilter:"blur(10px)",color:ee.text,padding:"16px",transform:fe?"translateY(0)":"translateY(100%)",transition:"transform 0.3s ease"},children:[b&&e.jsxs("div",{style:{marginBottom:"12px",position:"relative"},children:[e.jsx("div",{ref:I,onClick:H,onMouseMove:oe,onMouseLeave:()=>$e(!1),style:{height:"6px",background:"rgba(255, 255, 255, 0.2)",borderRadius:"3px",cursor:"pointer",position:"relative",overflow:"visible"},children:e.jsx("div",{style:{width:`${z/q*100||0}%`,height:"100%",background:v,borderRadius:"3px",position:"relative"},children:e.jsx("div",{style:{position:"absolute",right:"-6px",top:"50%",width:"12px",height:"12px",background:v,borderRadius:"50%",transform:"translateY(-50%)",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.3)"}})})}),Re&&_&&e.jsx("div",{style:{position:"absolute",bottom:"12px",left:`${Ye}px`,transform:"translateX(-50%)",background:"rgba(0, 0, 0, 0.9)",color:"#fff",padding:"4px 8px",borderRadius:"4px",fontSize:"12px",whiteSpace:"nowrap"},children:Xe(de)})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"12px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("button",{onClick:()=>ue(-M),style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(Oe,{size:20})}),e.jsx("button",{onClick:Ce,style:{background:v,borderRadius:"50%",padding:"12px",color:"#fff",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},children:U?e.jsx(Be,{size:20}):e.jsx(Le,{size:20})}),e.jsx("button",{onClick:()=>ue(M),style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(Fe,{size:20})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},children:[e.jsx("button",{onClick:()=>u(!ne),onMouseEnter:()=>x&&ge(!0),style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(mt,{})}),x&&e.jsx("div",{onMouseEnter:()=>ge(!0),onMouseLeave:()=>ge(!1),style:{position:pe?"relative":"absolute",left:pe?"0":"40px",bottom:pe?"0":"40px",width:pe?"80px":"30px",height:pe?"6px":"80px",background:"rgba(255, 255, 255, 0.2)",borderRadius:"3px",cursor:"pointer",opacity:pe?1:0,transition:"all 0.3s ease"},onClick:P=>{const le=P.currentTarget.getBoundingClientRect(),ze=(P.clientX-le.left)/le.width;be(ze)},children:e.jsx("div",{style:{width:`${D*100}%`,height:"100%",background:v,borderRadius:"3px"}})})]}),e.jsxs("div",{style:{fontSize:"14px",color:ee.textSecondary,minWidth:"100px"},children:[Xe(z)," / ",Xe(q)]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[y&&e.jsx("button",{style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(Ct,{size:18})}),w&&e.jsx("button",{onClick:()=>ye(!he),style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(or,{size:18})}),m&&e.jsx("button",{onClick:He,style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(Ot,{size:18})}),C&&e.jsx("button",{onClick:yt,style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(ar,{size:18})}),g&&e.jsx("button",{onClick:Ae,style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(tr,{size:18})}),e.jsx("button",{onClick:()=>Z(!W),style:{background:"none",border:"none",color:W?v:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(qe,{size:18})}),e.jsx("button",{onClick:me,style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:O?e.jsx(ct,{size:18}):e.jsx(lt,{size:18})})]})]})]}),he&&e.jsxs("div",{style:{position:"absolute",bottom:"80px",right:"16px",background:ee.controlsBg,backdropFilter:"blur(10px)",borderRadius:"12px",padding:"16px",minWidth:"200px",color:ee.text,border:`1px solid ${ee.border}`,opacity:he?1:0,transform:he?"translateY(0)":"translateY(10px)",transition:"all 0.3s ease"},children:[E&&e.jsxs("div",{style:{marginBottom:"12px"},children:[e.jsx("div",{style:{fontSize:"14px",marginBottom:"8px",color:ee.textSecondary},children:"Playback Speed"}),e.jsx("div",{style:{display:"flex",gap:"4px",flexWrap:"wrap"},children:[.25,.5,.75,1,1.25,1.5,1.75,2].map(P=>e.jsxs("button",{onClick:()=>ie(P),style:{background:re===P?v:"transparent",border:`1px solid ${ee.border}`,borderRadius:"6px",padding:"4px 8px",color:ee.text,cursor:"pointer",fontSize:"12px"},children:[P,"x"]},P))})]}),T&&e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"14px",marginBottom:"8px",color:ee.textSecondary},children:"Quality"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:["auto","1080p","720p","480p","360p"].map(P=>e.jsx("button",{onClick:()=>ce(P),style:{background:se===P?v:"transparent",border:"none",borderRadius:"6px",padding:"8px",color:ee.text,cursor:"pointer",fontSize:"12px",textAlign:"left"},children:P},P))})]})]}),e.jsx("style",{children:`
|
|
243
|
-
@keyframes spin {
|
|
244
|
-
from { transform: rotate(0deg); }
|
|
245
|
-
to { transform: rotate(360deg); }
|
|
246
|
-
}
|
|
247
|
-
`})]})},Tr=({src:t,thumbnail:r,autoPlay:a=!1,loop:i=!1,backgroundColor:c="#000000",primaryColor:n="#10b981",secondaryColor:l="#ffffff",borderRadius:d="12px",padding:S="16px",width:j="100%",className:v})=>{const f=s.useRef(null),b=s.useRef(null),[x,w]=s.useState(a),[m,C]=s.useState(0),[g,y]=s.useState(0),[E,T]=s.useState(.5),[_,A]=s.useState(!1),[R,M]=s.useState(i);s.useEffect(()=>{f.current&&(f.current.volume=E)},[E]),s.useEffect(()=>{f.current&&(f.current.loop=R)},[R]);const X=()=>{f.current&&(x?f.current.pause():f.current.play(),w(!x))},F=()=>{f.current&&(C(f.current.currentTime),y(f.current.duration))},Y=k=>{if(!f.current||!k.currentTarget)return;const h=k.currentTarget.getBoundingClientRect(),V=(k.clientX-h.left)/h.width*g;f.current.currentTime=V,C(V)},$=k=>{f.current&&(f.current.currentTime+=k)},N=()=>{b.current&&(_?document.exitFullscreen?.():b.current.requestFullscreen?.(),A(!_))},J=k=>{const h=Math.floor(k/60),I=Math.floor(k%60);return`${h}:${I<10?"0":""}${I}`};return e.jsxs("div",{ref:b,className:v,style:{position:"relative",width:j,backgroundColor:c,borderRadius:d,color:l,boxShadow:"0 4px 12px rgba(0,0,0,0.3)",overflow:"hidden",padding:S,boxSizing:"border-box",maxWidth:"100%"},children:[e.jsx("audio",{ref:f,src:t,autoPlay:a,loop:i,onTimeUpdate:F,onLoadedMetadata:F}),r&&e.jsx("img",{src:r,alt:"Audio Thumbnail",style:{width:"100%",objectFit:"cover",borderRadius:d,marginBottom:"16px",maxHeight:"150px"}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"10px",flexShrink:0,marginTop:"10px"},children:[e.jsx("button",{onClick:()=>$(-10),"aria-label":"Skip Back 10s",children:e.jsx(Oe,{size:20})}),e.jsx("button",{onClick:X,style:{background:n,borderRadius:"9999px",padding:"10px",color:"#fff",border:"none",cursor:"pointer"},"aria-label":x?"Pause":"Play",children:x?e.jsx(Be,{size:20}):e.jsx(Le,{size:20})}),e.jsx("button",{onClick:()=>$(10),"aria-label":"Skip Forward 10s",children:e.jsx(Fe,{size:20})})]}),e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",gap:"12px",width:"100%"},children:[e.jsxs("div",{style:{flexShrink:0,minWidth:"60px",textAlign:"center"},children:[e.jsx("span",{style:{fontSize:"14px",marginRight:"4px"},children:J(m)}),e.jsxs("span",{style:{fontSize:"14px",color:"#aaa"},children:["/ ",J(g)]})]}),e.jsx("div",{onClick:Y,style:{flex:1,height:"8px",background:"#444",borderRadius:"4px",cursor:"pointer",position:"relative",minWidth:"100px"},children:e.jsx("div",{style:{width:`${m/g*100||0}%`,height:"100%",background:n,borderRadius:"4px"}})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",flexShrink:0},children:[e.jsx("button",{onClick:()=>M(!R),"aria-label":"Toggle Loop",children:e.jsx(qe,{size:18,color:R?n:void 0})}),e.jsx("button",{onClick:()=>T(E>0?0:.5),"aria-label":"Toggle Mute",children:E>0?e.jsx(Ge,{size:18}):e.jsx(We,{size:18})}),e.jsx("button",{onClick:N,"aria-label":"Toggle Fullscreen",children:_?e.jsx(ct,{size:18}):e.jsx(lt,{size:18})})]})]})]})};function ae(t,r,a){return t==null?a:typeof t!="object"?t:t[r]??a}const rt=t=>t<768?"sm":t<1024?"md":"lg",Rr=({display:t={sm:"block",md:"flex",lg:"grid"},flexDirection:r={sm:"column",md:"row",lg:"row"},justifyContent:a={sm:"flex-start",md:"center",lg:"space-between"},alignItems:i={sm:"stretch",md:"center",lg:"center"},gridTemplateColumns:c={sm:"1fr",md:"1fr 1fr",lg:"1fr 1fr 1fr"},gridTemplateRows:n={sm:"auto",md:"auto",lg:"auto"},gap:l={sm:"10px",md:"20px",lg:"30px"},rowGap:d,columnGap:S,width:j={sm:"100%",md:"90%",lg:"80%"},maxWidth:v={sm:"100%",md:"800px",lg:"1200px"},height:f={sm:"auto",md:"auto",lg:"auto"},padding:b={sm:"10px",md:"20px",lg:"40px"},margin:x={sm:"0 auto",md:"0 auto",lg:"0 auto"},textAlign:w={sm:"left",md:"center",lg:"center"},backgroundColor:m="#fff",border:C={sm:"none",md:"1px solid #ddd",lg:"2px solid #ccc"},borderRadius:g={sm:"0",md:"8px",lg:"12px"},boxShadow:y={sm:"none",md:"0 4px 6px rgba(0,0,0,0.1)",lg:"0 6px 10px rgba(0,0,0,0.15)"},overflow:E={sm:"visible",md:"hidden",lg:"auto"},children:T,className:_,style:A})=>{const[R,M]=s.useState("lg");s.useEffect(()=>{M(rt(window.innerWidth));const F=()=>M(rt(window.innerWidth));return window.addEventListener("resize",F),()=>window.removeEventListener("resize",F)},[]);const X=s.useMemo(()=>{const F=ae(t,R,"block"),Y=ae(r,R,void 0),$=ae(a,R,void 0),N=ae(i,R,void 0),J=ae(c,R,void 0),k=ae(n,R,void 0),h=ae(l,R,void 0),I=ae(d,R,void 0),V=ae(S,R,void 0),U=ae(j,R,"100%"),o=ae(v,R,void 0),z=ae(f,R,void 0),L=ae(b,R,void 0),q=ae(x,R,void 0),K=ae(w,R,void 0),D=ae(C,R,void 0),G=ae(g,R,void 0),ne=ae(y,R,void 0),u=ae(E,R,void 0);return{display:F,...Y&&{flexDirection:Y},...$&&{justifyContent:$},...N&&{alignItems:N},...J&&{gridTemplateColumns:J},...k&&{gridTemplateRows:k},...h&&{gap:h},...I&&{rowGap:I},...V&&{columnGap:V},width:U,...o&&{maxWidth:o},...z&&{height:z},...L&&{padding:L},...q&&{margin:q},...K&&{textAlign:K},backgroundColor:m,...D&&{border:D},...G&&{borderRadius:G},...ne&&{boxShadow:ne},...u&&{overflow:u},boxSizing:"border-box",...A}},[R,t,r,a,i,c,n,l,d,S,j,v,f,b,x,w,m,C,g,y,E,A]);return e.jsx("div",{className:_,style:X,children:T})},$r=({items:t,allowMultiple:r=!1,defaultOpenIndex:a=[],borderColor:i="#d1d5db",backgroundColor:c="#ffffff",textColor:n="#111827",hoverBgColor:l="#f3f4f6",hoverTextColor:d="#111827",paddingVertical:S="16px",paddingHorizontal:j="16px",margin:v="12px 0",iconOpen:f="−",iconClose:b="+",transitionDuration:x="300ms",borderRadius:w="8px",shadow:m="0 2px 8px rgba(0, 0, 0, 0.05)",contentPadding:C="16px",fontSize:g="16px",fontWeight:y="600",iconSize:E="18px",contentFontSize:T="14px",contentFontWeight:_="400",contentBackgroundColor:A="#ffffff",contentTextColor:R="#111827",className:M,style:X})=>{const[F,Y]=s.useState(a),$=s.useRef([]),N=s.useRef([]);s.useEffect(()=>{$.current.forEach((k,h)=>{k&&(k.style.maxHeight=F.includes(h)?`${k.scrollHeight}px`:"0px")})},[F]);const J=k=>{Y(h=>r?h.includes(k)?h.filter(I=>I!==k):[...h,k]:h.includes(k)?[]:[k])};return e.jsx("div",{className:M,style:{width:"100%",...X},children:t.map((k,h)=>e.jsxs("div",{style:{border:`1px solid ${i}`,borderRadius:w,margin:v,boxShadow:m,overflow:"hidden",transition:`all ${x} ease`},children:[e.jsxs("button",{ref:I=>{N.current[h]=I},onClick:()=>J(h),style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:c,color:n,padding:`${S} ${j}`,fontWeight:y,fontSize:g,cursor:"pointer",outline:"none",border:"none",transition:`all ${x}`},onMouseEnter:I=>{I.currentTarget.style.backgroundColor=l,I.currentTarget.style.color=d},onMouseLeave:I=>{I.currentTarget.style.backgroundColor=c,I.currentTarget.style.color=n},children:[e.jsx("span",{children:k.title}),e.jsx("span",{style:{fontSize:E},children:F.includes(h)?f:b})]}),e.jsx("div",{ref:I=>{$.current[h]=I},style:{overflow:"hidden",maxHeight:F.includes(h)?`${$.current[h]?.scrollHeight}px`:"0px",transition:`max-height ${x} ease-in-out`},children:e.jsx("div",{style:{borderTop:`1px solid ${i}`,backgroundColor:A,color:R,padding:C,fontSize:T,fontWeight:_},children:k.content})})]},h))})},zr=({type:t,name:r,options:a,selectedValues:i,onChange:c,disabled:n=!1,readOnly:l=!1,required:d=!1,error:S,className:j="",customIcon:v,style:f,labelStyle:b,iconSize:x=20,iconCheckedBgColor:w="#2563eb",iconUncheckedBorderColor:m="#9ca3af",textColor:C="#374151",errorStyle:g})=>{const y=t==="checkbox",E=T=>{if(c)if(y){const _=Array.isArray(i)?i.includes(T)?i.filter(A=>A!==T):[...i,T]:[T];c(_)}else c(T)};return e.jsxs("div",{className:j,style:{display:"flex",flexDirection:"column",gap:8,...f},role:t,"aria-disabled":n,children:[a.map(T=>{const _=y?Array.isArray(i)&&i.includes(T.value):i===T.value;return e.jsxs("label",{style:{display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",opacity:n?.6:1,gap:8,userSelect:"none",...b},children:[e.jsx("input",{type:t,name:r,value:T.value,checked:_,disabled:n||l,required:d,onChange:()=>E(T.value),style:{display:"none"}}),v?v(_):e.jsxs("span",{style:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:x,height:x,borderRadius:y?4:"50%",border:`2px solid ${_?w:m}`,backgroundColor:_?w:"transparent",transition:"all 0.2s ease",flexShrink:0},children:[_&&!y&&e.jsx("span",{style:{width:x/2,height:x/2,borderRadius:"50%",backgroundColor:"white"}}),_&&y&&e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",style:{width:x*.6,height:x*.6},children:e.jsx("polyline",{points:"20 6 9 17 4 12"})})]}),e.jsx("span",{style:{color:C,fontSize:14},children:T.label})]},T.value)}),S&&e.jsx("p",{role:"alert",style:{color:"#dc2626",fontSize:12,marginTop:4,...g},children:S})]})},Mr=({label:t="Open Drawer",icon:r,iconPosition:a="left",onClick:i,style:c={}})=>e.jsxs("button",{onClick:i,style:{padding:"10px 16px",backgroundColor:"#2563eb",color:"#fff",border:"none",borderRadius:"6px",cursor:"pointer",display:"inline-flex",alignItems:"center",fontSize:"14px",gap:"8px",...c},children:[r&&a==="left"&&r,t,r&&a==="right"&&r]}),Ir=({open:t,onClose:r,position:a="right",width:i="300px",height:c="300px",backgroundColor:n="#fff",transitionDuration:l=300,style:d={},children:S,showCloseButton:j=!0,closeButtonStyle:v={}})=>{const[f,b]=s.useState(t);s.useEffect(()=>{t?b(!0):setTimeout(()=>b(!1),l)},[t,l]);const x=s.useMemo(()=>{if(t)return"translate(0, 0)";switch(a){case"left":return"translateX(-100%)";case"right":return"translateX(100%)";case"top":return"translateY(-100%)";case"bottom":return"translateY(100%)";default:return"translate(0, 0)"}},[t,a]),w={position:"fixed",zIndex:1e3,backgroundColor:n,transition:`transform ${l}ms ease, opacity ${l}ms ease`,transform:x,opacity:t?1:0,...d,...a==="left"||a==="right"?{top:0,[a]:0,width:i,height:"100%"}:{left:0,[a]:0,height:c,width:"100%"}},m={position:"fixed",display:f?"block":"none",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:999,transition:`opacity ${l}ms ease`,opacity:t?1:0,pointerEvents:t?"auto":"none"},C={position:"absolute",top:"10px",right:"10px",fontSize:"20px",background:"none",border:"none",cursor:"pointer",color:"#000"};return e.jsxs(e.Fragment,{children:[e.jsx("div",{style:m,onClick:r}),e.jsxs("div",{style:{...w,display:"block",visibility:f?"visible":"hidden",pointerEvents:t?"auto":"none"},children:[j&&e.jsx("button",{onClick:r,style:{...C,...v},children:e.jsx(De,{size:20,color:"rgba(255, 0, 0, 1)"})}),S]})]})},Cr=({options:t,value:r,defaultValue:a,onChange:i,placeholder:c="Select an option",disabled:n=!1,searchable:l=!1,multiSelect:d=!1,clearable:S=!1,virtualized:j=!1,optionHeight:v=36,visibleOptions:f=5,width:b="100%",height:x="auto",borderColor:w="#d1d5db",focusBorderColor:m="#2563eb",errorBorderColor:C="#dc2626",backgroundColor:g="#ffffff",textColor:y="#111827",placeholderColor:E="#9ca3af",hoverColor:T="#f3f4f6",selectedColor:_="#eff6ff",disabledColor:A="#f3f4f6",padding:R="0.5rem 0.75rem",margin:M="0",borderRadius:X="0.375rem",boxShadow:F="0 1px 2px 0 rgba(0, 0, 0, 0.05)",optionPadding:Y="0.5rem 0.75rem",optionGap:$="0.5rem",transitionDuration:N="200ms",dropdownMaxHeight:J="300px",dropdownMinWidth:k="100%",className:h="",dropdownClassName:I="",optionClassName:V="",inputClassName:U="",style:o,dropdownStyle:z,optionStyle:L,inputStyle:q,iconPrefix:K,iconSuffix:D,clearIcon:G="×",dropdownIcon:ne="▼",checkIcon:u="✓",ariaLabel:O,ariaLabelledby:p,ariaDescribedby:B,onFocus:Q,onBlur:W,onOpen:Z,onClose:re})=>{const[ie,se]=s.useState([]),[ce,fe]=s.useState(!1),[xe,he]=s.useState(""),[ye,pe]=s.useState(null),ge=s.useRef(null),we=s.useRef(null),je=s.useRef([]);s.useEffect(()=>{se(r?d?r.split(","):[r]:a?d?a.split(","):[a]:[])},[r,a,d]);const de=l?t.filter(H=>H.label.toLowerCase().includes(xe.toLowerCase())):t;s.useEffect(()=>{const H=oe=>{ge.current&&!ge.current.contains(oe.target)&&(fe(!1),re?.())};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[re]),s.useEffect(()=>{const H=oe=>{if(ce)switch(oe.key){case"ArrowDown":oe.preventDefault(),pe(ue=>{const be=ue===null?0:Math.min(ue+1,de.length-1);return Te(be),be});break;case"ArrowUp":oe.preventDefault(),pe(ue=>{const be=ue===null?0:Math.max(ue-1,0);return Te(be),be});break;case"Enter":oe.preventDefault(),ye!==null&&Re(de[ye].value);break;case"Escape":oe.preventDefault(),fe(!1),re?.();break;case"Tab":fe(!1),re?.();break}};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[ce,ye,de]);const Te=s.useCallback(H=>{je.current[H]?.scrollIntoView({block:"nearest",behavior:"smooth"})},[]),Re=H=>{let oe;d?oe=ie.includes(H)?ie.filter(ue=>ue!==H):[...ie,H]:(oe=[H],fe(!1),re?.()),se(oe),i?.(d?oe.join(","):H)},$e=H=>{H.stopPropagation(),se([]),i?.(""),he("")},Ye=()=>{if(n)return;const H=!ce;fe(H),H?(Z?.(),l&&setTimeout(()=>we.current?.focus(),0)):re?.()},ke=t.find(H=>H.value===ie[0]),Ve=t.filter(H=>ie.includes(H.value)),[ee,Me]=s.useState(0),Ie=Math.min(f,de.length),Ce=Math.min(ee+Ie,de.length),Pe=j?de.slice(ee,Ce):de;return e.jsxs("div",{ref:ge,className:`dropdown-container ${h}`,style:{position:"relative",width:b,margin:M,fontFamily:"'Inter', sans-serif",...o},children:[e.jsx("style",{children:`
|
|
248
|
-
.dropdown-container {
|
|
249
|
-
--border-color: ${w};
|
|
250
|
-
--focus-border-color: ${m};
|
|
251
|
-
--error-border-color: ${C};
|
|
252
|
-
--bg-color: ${g};
|
|
253
|
-
--text-color: ${y};
|
|
254
|
-
--placeholder-color: ${E};
|
|
255
|
-
--hover-color: ${T};
|
|
256
|
-
--selected-color: ${_};
|
|
257
|
-
--disabled-color: ${A};
|
|
258
|
-
--transition-duration: ${N};
|
|
259
|
-
}
|
|
260
|
-
`}),e.jsxs("div",{role:"button",onClick:Ye,"aria-disabled":n,"aria-haspopup":"listbox","aria-expanded":ce,"aria-label":O,"aria-labelledby":p,"aria-describedby":B,className:`dropdown-control ${U}`,style:{width:"100%",minHeight:x,padding:R,backgroundColor:n?A:g,color:y,borderWidth:"1px",borderStyle:"solid",borderColor:ce?m:w,borderRadius:X,boxShadow:F,display:"flex",alignItems:"center",justifyContent:"space-between",cursor:n?"not-allowed":"pointer",opacity:n?.7:1,transition:`all ${N} ease-in-out`,textAlign:"left",...q,...ce&&{boxShadow:`0 0 0 1px ${m}`}},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:$,flex:1,overflow:"hidden"},children:[K&&e.jsx("span",{className:"dropdown-icon-prefix",style:{flexShrink:0},children:K}),d?e.jsx("div",{style:{display:"flex",gap:"0.25rem",flexWrap:"wrap",flex:1,overflow:"hidden"},children:Ve.length>0?Ve.map(H=>e.jsxs("span",{style:{backgroundColor:_,padding:"0.25rem 0.5rem",borderRadius:"0.25rem",fontSize:"0.875rem",display:"flex",alignItems:"center",gap:"0.25rem",flexShrink:0},children:[H.icon&&e.jsx("span",{style:{flexShrink:0},children:H.icon}),e.jsx("span",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:H.label})]},H.value)):e.jsx("span",{style:{color:E},children:c})}):e.jsxs("span",{style:{color:ke?y:E,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:$},children:[ke?.icon&&e.jsx("span",{style:{flexShrink:0},children:ke.icon}),ke?ke.label:c]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",marginLeft:"0.5rem",flexShrink:0},children:[S&&ie.length>0&&e.jsx("span",{onClick:$e,style:{cursor:n?"not-allowed":"pointer",fontSize:"1rem",color:y,opacity:.7,display:"flex",alignItems:"center",justifyContent:"center"},"aria-label":"Clear selection",children:G}),e.jsx("span",{style:{transition:`transform ${N}`,transform:ce?"rotate(180deg)":"rotate(0deg)",fontSize:"0.75rem",color:y,opacity:.7},children:ne})]})]}),ce&&e.jsxs("div",{className:`dropdown-menu ${I}`,style:{position:"absolute",top:"100%",left:0,zIndex:1e3,width:"100%",minWidth:k,maxHeight:J,overflowY:"auto",backgroundColor:g,border:`1px solid ${w}`,borderRadius:X,boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",marginTop:"0.25rem",transition:`opacity ${N}, transform ${N}`,opacity:0,transform:"translateY(-0.5rem)",animation:`dropdownFadeIn ${N} ease-out forwards`,...z},role:"listbox","aria-multiselectable":d,children:[l&&e.jsx("div",{style:{padding:"0.5rem",borderBottom:`1px solid ${w}`},children:e.jsx("input",{ref:we,type:"text",value:xe,onChange:H=>he(H.target.value),placeholder:"Search...",style:{width:"100%",padding:"0.5rem 0.75rem",borderWidth:"1px",borderStyle:"solid",color:y,borderColor:ce?m:w,borderRadius:"0.25rem",outline:"none",transition:`border-color ${N}`,...ce&&{boxShadow:`0 0 0 1px ${m}`}},onFocus:Q,onBlur:W})}),e.jsx("ul",{style:{margin:0,padding:"0.25rem 0",listStyle:"none"},children:de.length>0?Pe.map((H,oe)=>{const ue=ie.includes(H.value),be=ye===(j?ee+oe:oe),me=H.disabled;return e.jsxs("li",{ref:Ae=>{if(Ae){const He=j?ee+oe:oe;je.current[He]=Ae}},onClick:()=>!me&&Re(H.value),onMouseEnter:()=>!me&&pe(j?ee+oe:oe),className:`dropdown-option ${V} ${me?"disabled":""}`,style:{padding:Y,cursor:me?"not-allowed":"pointer",backgroundColor:ue?_:be?T:g,color:me?A:y,display:"flex",alignItems:"center",gap:$,transition:`background-color ${N}`,...L},role:"option","aria-selected":ue,"aria-disabled":me,children:[d&&e.jsx("span",{style:{flexShrink:0},children:ue?u:"○"}),H.icon&&e.jsx("span",{style:{flexShrink:0},children:H.icon}),e.jsx("span",{style:{flex:1},children:H.label})]},H.value)}):e.jsx("li",{style:{padding:Y,color:E,textAlign:"center"},children:"No options found"})}),j&&de.length>Ie&&e.jsx("div",{style:{height:`${(de.length-Ie)*v}px`}})]}),e.jsx("style",{children:`
|
|
261
|
-
@keyframes dropdownFadeIn {
|
|
262
|
-
to {
|
|
263
|
-
opacity: 1;
|
|
264
|
-
transform: translateY(0);
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
`})]})},Er=({columns:t,data:r,className:a="",pagination:i=!0,rowsPerPage:c=5,colors:n={headerBg:"#3b82f6",headerText:"#ffffff",rowBg:"#ffffff",rowText:"#000000",borderColor:"#d1d5db",hoverBg:"#e5e7eb",paginationBg:"#d1d5db",paginationText:"#000000",evenRowBg:"#f9fafb",selectedRowBg:"#e0f2fe"},borderRadius:l={table:"8px",header:"8px",pagination:"6px"},sortable:d=!0,defaultSort:S,bodyAlign:j="left",headerAlign:v="left",rowSelection:f={enabled:!1},emptyState:b=e.jsx("div",{style:{padding:"20px",textAlign:"center"},children:"No data available"}),onRowClick:x,rowClassName:w,cellPadding:m="12px",headerCellPadding:C="12px",stickyHeader:g=!1,maxHeight:y,scrollShadow:E=!1})=>{const[T,_]=s.useState(S?.column||null),[A,R]=s.useState(S?.direction||"asc"),[M,X]=s.useState(1),[F,Y]=s.useState(null),[$,N]=s.useState([]),J=(u,O)=>{!d||!O||(T===u?R(A==="asc"?"desc":"asc"):(_(u),R("asc")),X(1))},k=u=>{const O=$.some(B=>B.id===u.id);let p;O?p=$.filter(B=>B.id!==u.id):p=[...$,u],N(p),f.onSelect?.(p)},h=()=>{$.length===V.length?(N([]),f.onSelect?.([])):(N([...V]),f.onSelect?.([...V]))},I=s.useMemo(()=>T?[...r].sort((u,O)=>{const p=u[T],B=O[T];if(p==null&&B==null)return 0;if(p==null)return A==="asc"?-1:1;if(B==null)return A==="asc"?1:-1;if(typeof p=="number"&&typeof B=="number")return A==="asc"?p-B:B-p;if(p instanceof Date&&B instanceof Date)return A==="asc"?p.getTime()-B.getTime():B.getTime()-p.getTime();const Q=String(p).toLowerCase(),W=String(B).toLowerCase();return Q===W?0:A==="asc"?Q>W?1:-1:Q<W?1:-1}):[...r],[r,T,A]),V=i?I.slice((M-1)*c,M*c):I,U=Math.ceil(r.length/c),o=u=>$.some(O=>O.id===u.id),z=e.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 576 512",height:"15px",width:"15px",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-224 0z"})}),L=e.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 576 512",height:"15px",width:"15px",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 480l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0c17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32z"})}),q=e.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 320 512",height:"15px",width:"15px",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M182.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L128 109.3l0 293.5L86.6 361.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 402.7l0-293.5 41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96z"})}),K=e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("path",{d:"M9 12l2 2 4-4"})]}),D=e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("line",{x1:"8",y1:"12",x2:"16",y2:"12"})]}),G=$.length===V.length&&V.length>0,ne=$.length>0&&!G;return e.jsxs("div",{style:{overflowX:"auto",width:"100%",maxHeight:y,position:"relative",boxShadow:E?"0 2px 4px rgba(0,0,0,0.1)":"none"},className:a,children:[e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",border:`1px solid ${n.borderColor}`,tableLayout:"auto",minWidth:"400px",borderRadius:l.table,borderSpacing:0,overflow:"hidden"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[f.enabled&&e.jsx("th",{style:{width:f.selectionColumnWidth||"40px",padding:C,backgroundColor:n.headerBg,color:n.headerText,border:`1px solid ${n.borderColor}`,position:g?"sticky":void 0,top:g?0:void 0,zIndex:g?1:void 0},children:e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:h,children:ne?D:G?K:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"})})})}),t.map(({key:u,label:O,sortable:p,icon:B,width:Q,align:W,headerClassName:Z},re)=>e.jsx("th",{onClick:()=>J(u,p),style:{width:Q,padding:C,border:`1px solid ${n.borderColor}`,cursor:d&&p?"pointer":"default",backgroundColor:n.headerBg,color:n.headerText,userSelect:"none",borderTopLeftRadius:re===0&&!f.enabled?l.header:void 0,borderTopRightRadius:re===t.length-1?l.header:void 0,textAlign:W||v,whiteSpace:"nowrap",position:g?"sticky":void 0,top:g?0:void 0,zIndex:g?1:void 0},className:Z,"aria-sort":T===u?A==="asc"?"ascending":"descending":void 0,role:d&&p?"button":void 0,tabIndex:d&&p?0:void 0,onKeyDown:ie=>{d&&p&&(ie.key==="Enter"||ie.key===" ")&&(ie.preventDefault(),J(u,p))},children:e.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"6px",justifyContent:W==="right"?"flex-end":W==="center"?"center":"flex-start"},children:[B&&e.jsx("span",{children:B}),e.jsx("span",{children:O}),d&&p&&(T===u?A==="asc"?z:L:q)]})},u))]})}),e.jsx("tbody",{children:V.length>0?V.map((u,O)=>{const p=o(u),B=O%2===0;return e.jsxs("tr",{style:{backgroundColor:p?n.selectedRowBg:B&&n.evenRowBg||n.rowBg,color:n.rowText,transition:"background-color 0.2s ease-in-out",cursor:x?"pointer":"default"},onMouseEnter:()=>Y(O),onMouseLeave:()=>Y(null),onClick:()=>x?.(u,O),className:w?.(u,O),children:[f.enabled&&e.jsx("td",{style:{padding:m,border:`1px solid ${n.borderColor}`,textAlign:"center"},onClick:Q=>{Q.stopPropagation(),k(u)},children:p?K:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"})})}),t.map(({key:Q,align:W,render:Z,cellClassName:re})=>e.jsx("td",{style:{padding:m,border:`1px solid ${n.borderColor}`,whiteSpace:"nowrap",textAlign:W||j},className:re,children:Z?Z(u[Q],u):u[Q]},Q))]},O)}):e.jsx("tr",{children:e.jsx("td",{colSpan:t.length+(f.enabled?1:0),style:{padding:"20px",textAlign:"center",border:`1px solid ${n.borderColor}`},children:b})})})]}),i&&U>1&&e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:"12px",padding:"8px",userSelect:"none"},children:[e.jsxs("button",{style:{display:"flex",alignItems:"center",gap:4,padding:"6px 12px",backgroundColor:n.paginationBg,color:n.paginationText,borderRadius:l.pagination,border:"none",opacity:M===1?.5:1,cursor:M===1?"not-allowed":"pointer",fontSize:"0.875rem"},disabled:M===1,onClick:()=>X(u=>Math.max(u-1,1)),"aria-label":"Previous page",type:"button",children:[e.jsx(it,{size:16}),"Prev"]}),e.jsx("div",{style:{display:"flex",gap:"4px"},children:Array.from({length:Math.min(5,U)},(u,O)=>{let p;return U<=5||M<=3?p=O+1:M>=U-2?p=U-4+O:p=M-2+O,e.jsx("button",{style:{padding:"6px 12px",backgroundColor:M===p?n.headerBg:n.paginationBg,color:M===p?n.headerText:n.paginationText,borderRadius:l.pagination,border:"none",cursor:"pointer",fontSize:"0.875rem",minWidth:"36px"},onClick:()=>X(p),"aria-label":`Page ${p}`,type:"button",children:p},p)})}),e.jsxs("button",{style:{display:"flex",alignItems:"center",gap:4,padding:"6px 12px",backgroundColor:n.paginationBg,color:n.paginationText,borderRadius:l.pagination,border:"none",opacity:M===U?.5:1,cursor:M===U?"not-allowed":"pointer",fontSize:"0.875rem"},disabled:M===U,onClick:()=>X(u=>Math.min(u+1,U)),"aria-label":"Next page",type:"button",children:["Next",e.jsx(at,{size:16})]})]})]})},_r=(t,r)=>{const{as:a,children:i,className:c="",style:n={},background:l="#fff",backgroundImage:d,backgroundSize:S="cover",backgroundPosition:j="center",backgroundRepeat:v="no-repeat",backgroundGradient:f,backgroundBlendMode:b,textColor:x="#000",hoverStyles:w={},activeStyles:m={},borderRadius:C=12,border:g="none",borderTop:y,borderRight:E,borderBottom:T,borderLeft:_,boxShadow:A="0 4px 12px rgba(0,0,0,0.1)",hoverShadow:R,transition:M="all 0.2s ease",padding:X,paddingX:F,paddingY:Y,margin:$,marginX:N,marginY:J,width:k,minWidth:h,maxWidth:I="100%",height:V,minHeight:U,maxHeight:o,display:z="flex",flexDirection:L="column",justifyContent:q="flex-start",alignItems:K="stretch",alignContent:D,flexWrap:G,flex:ne,gap:u=16,position:O,top:p,right:B,bottom:Q,left:W,zIndex:Z,overflow:re,overflowX:ie,overflowY:se,cursor:ce,pointerEvents:fe,userSelect:xe,transform:he,transformOrigin:ye,backdropFilter:pe,filter:ge,opacity:we,visibility:je,...de}=t,Te=a||"div",Re={background:f?`${f}${l?`, ${l}`:""}`:l,color:x,...d?{backgroundImage:`url(${d})`,backgroundSize:S,backgroundPosition:j,backgroundRepeat:v}:{},backgroundBlendMode:b,borderRadius:C,boxShadow:A,transition:M,...X?{padding:X}:{paddingTop:Y,paddingBottom:Y,paddingLeft:F,paddingRight:F},...$?{margin:$}:{marginTop:J,marginBottom:J,marginLeft:N,marginRight:N},width:k,minWidth:h,maxWidth:I,height:V,minHeight:U,maxHeight:o,display:z,flexDirection:L,justifyContent:q,alignItems:K,alignContent:D,flexWrap:G,flex:ne,gap:u,position:O,top:p,right:B,bottom:Q,left:W,zIndex:Z,overflow:re,overflowX:ie,overflowY:se,cursor:ce,pointerEvents:fe,userSelect:xe,transform:he,transformOrigin:ye,backdropFilter:pe,filter:ge,opacity:we,visibility:je,border:g,...y&&{borderTop:y},...E&&{borderRight:E},...T&&{borderBottom:T},..._&&{borderLeft:_},boxSizing:"border-box"},$e={"--hover-shadow":R,"--hover-styles":JSON.stringify(w),"--active-styles":JSON.stringify(m)};return e.jsx(Te,{ref:r,className:`card ${c}`,style:{...Re,...$e,...n},...de,children:i})},Lr=s.forwardRef(_r),Pr=Object.assign(Lr,{displayName:"Card"}),nt=t=>t<768?"sm":t<1024?"md":"lg",Ar=({columns:t={sm:1,md:2,lg:3},gap:r="16px",padding:a="20px",alignItems:i="stretch",justifyItems:c="stretch",backgroundColor:n="transparent",width:l="100%",maxWidth:d="100%",height:S="auto",children:j,style:v})=>{const[f,b]=s.useState("lg");s.useEffect(()=>{b(nt(window.innerWidth));const m=()=>b(nt(window.innerWidth));return window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]);const x=s.useMemo(()=>typeof t=="number"?t:t[f]??1,[t,f]),w=s.useMemo(()=>({display:"grid",gridTemplateColumns:`repeat(${x}, 1fr)`,gap:r,padding:a,alignItems:i,justifyItems:c,backgroundColor:n,width:l,maxWidth:d,height:S,boxSizing:"border-box",...v}),[x,r,a,i,c,n,l,d,S,v]);return e.jsx("div",{style:w,children:j})},st=t=>t<768?"sm":t<1024?"md":"lg",Nr=({direction:t="row",align:r="center",justify:a="space-between",gap:i=16,padding:c=20,backgroundColor:n="transparent",width:l="100%",maxWidth:d="100%",height:S="auto",style:j,children:v})=>{const[f,b]=s.useState("lg");s.useEffect(()=>{b(st(window.innerWidth));const m=()=>b(st(window.innerWidth));return window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]);const x=s.useMemo(()=>typeof t=="string"?t:t[f]??"row",[t,f]),w=s.useMemo(()=>({display:"flex",flexDirection:x,alignItems:r,justifyContent:a,gap:typeof i=="number"?`${i}px`:i,padding:typeof c=="number"?`${c}px`:c,backgroundColor:n,width:l,maxWidth:d,height:S,boxSizing:"border-box",...j}),[x,r,a,i,c,n,l,d,S,j]);return e.jsx("div",{style:w,children:v})},Br={success:{bg:"#ecfdf5",border:"#34d399",iconColor:"#059669",Icon:e.jsx(Nt,{size:20})},error:{bg:"#fef2f2",border:"#f87171",iconColor:"#dc2626",Icon:e.jsx(Pt,{size:20})},warning:{bg:"#fffbeb",border:"#facc15",iconColor:"#d97706",Icon:e.jsx(fr,{size:20})},info:{bg:"#eff6ff",border:"#3b82f6",iconColor:"#2563eb",Icon:e.jsx(Ut,{size:20})}},Or=t=>{const r={position:"fixed",zIndex:9999};switch(t){case"top-left":return{...r,top:"20px",left:"20px"};case"top-center":return{...r,top:"20px",left:"50%",transform:"translateX(-50%)"};case"top-right":return{...r,top:"20px",right:"20px"};case"bottom-left":return{...r,bottom:"20px",left:"20px"};case"bottom-center":return{...r,bottom:"20px",left:"50%",transform:"translateX(-50%)"};case"bottom-right":default:return{...r,bottom:"20px",right:"20px"}}},Fr=({title:t="",description:r="",type:a="info",dismissible:i=!0,onClose:c,duration:n,icon:l,actionButton:d,position:S="top-right",className:j,style:v})=>{const[f,b]=s.useState(!0);if(s.useEffect(()=>{if(n){const y=setTimeout(()=>{b(!1),c?.()},n);return()=>clearTimeout(y)}},[n,c]),!f)return null;const{bg:x,border:w,iconColor:m,Icon:C}=Br[a],g=Or(S);return e.jsxs("div",{className:j,style:{...g,display:"flex",gap:"12px",padding:"16px",backgroundColor:x,borderLeft:`4px solid ${w}`,borderRadius:"8px",color:"#111827",alignItems:"flex-start",boxShadow:"0 4px 12px rgba(0,0,0,0.08)",transition:"all 0.3s ease",animation:"slideIn 0.3s ease",maxWidth:"600px",width:"calc(100% - 40px)",...v},children:[e.jsx("div",{style:{color:m,marginTop:"3px"},children:l||C}),e.jsxs("div",{style:{flex:1},children:[t&&e.jsx("div",{style:{fontWeight:"600",marginBottom:"4px"},children:t}),r&&e.jsx("div",{style:{fontSize:"14px",color:"#374151"},children:r}),d&&e.jsx("div",{style:{marginTop:"10px"},children:d})]}),i&&e.jsx("button",{onClick:()=>{b(!1),c?.()},style:{background:"transparent",border:"none",color:"#6b7280",cursor:"pointer",marginLeft:"8px"},children:e.jsx(De,{size:16})}),e.jsx("style",{children:`
|
|
268
|
-
@keyframes slideIn {
|
|
269
|
-
from { opacity: 0; transform: translateY(-10px); }
|
|
142
|
+
*/const jt=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ye=X("x",jt),wt={success:{bg:"#ecfdf5",border:"#34d399",iconColor:"#059669",Icon:e.jsx(Ge,{size:20})},error:{bg:"#fef2f2",border:"#f87171",iconColor:"#dc2626",Icon:e.jsx(Ue,{size:20})},warning:{bg:"#fffbeb",border:"#facc15",iconColor:"#d97706",Icon:e.jsx(gt,{size:20})},info:{bg:"#eff6ff",border:"#3b82f6",iconColor:"#2563eb",Icon:e.jsx(rt,{size:20})}},kt=t=>{const r={position:"fixed",zIndex:9999,pointerEvents:"auto"};switch(t){case"top-left":return{...r,top:"1.25rem",left:"1.25rem"};case"top-center":return{...r,top:"1.25rem",left:"50%",transform:"translateX(-50%)"};case"top-right":return{...r,top:"1.25rem",right:"1.25rem"};case"bottom-left":return{...r,bottom:"1.25rem",left:"1.25rem"};case"bottom-center":return{...r,bottom:"1.25rem",left:"50%",transform:"translateX(-50%)"};case"bottom-right":default:return{...r,bottom:"1.25rem",right:"1.25rem"}}},ze=({title:t,description:r,type:n="info",dismissible:s=!0,duration:i,onClose:a,icon:x,actionButton:f,position:g="top-right",backgroundColor:y,borderColor:v,textColor:c="#111827",borderRadius:u="0.75rem",shadow:j="0 4px 14px rgba(0,0,0,0.1)",padding:m="1rem",fontSize:b="0.95rem",fontWeight:h=500,descriptionColor:p="#374151",animationDuration:l="300ms",maxWidth:w="480px",className:$="",style:S})=>{const[z,L]=d.useState(!1),[M,F]=d.useState(!1);d.useEffect(()=>{if(L(!0),i){const T=setTimeout(()=>{F(!0),setTimeout(()=>{L(!1),a?.()},parseInt(l))},i);return()=>clearTimeout(T)}},[i,a,l]);const{bg:I,border:D,iconColor:B,Icon:H}=wt[n],W=kt(g),E=d.useMemo(()=>({...W,display:"flex",alignItems:"flex-start",gap:"0.75rem",backgroundColor:y??I,borderLeft:`4px solid ${v??D}`,borderRadius:u,color:c,boxShadow:j,padding:m,maxWidth:w,width:"calc(100% - 2.5rem)",opacity:z&&!M?1:0,transform:z&&!M?"translateY(0)":g.includes("bottom")?"translateY(20px)":"translateY(-20px)",transition:`opacity ${l} ease, transform ${l} ease`,fontWeight:h,fontSize:b,...S}),[z,M,I,D,v,u,g,j,m,c,w,y,l,S,b,h]);return z?e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
|
|
143
|
+
@keyframes alert-slide-in-top {
|
|
144
|
+
from { opacity: 0; transform: translateY(-20px); }
|
|
270
145
|
to { opacity: 1; transform: translateY(0); }
|
|
271
146
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
50% { transform: scale(1.5); opacity: 0.5; }
|
|
276
|
-
100% { transform: scale(1); opacity: 1; }
|
|
147
|
+
@keyframes alert-slide-in-bottom {
|
|
148
|
+
from { opacity: 0; transform: translateY(20px); }
|
|
149
|
+
to { opacity: 1; transform: translateY(0); }
|
|
277
150
|
}
|
|
278
|
-
`})]})},Dr=({isOpen:t,onClose:r,children:a,overlayStyle:i,modalStyle:c,closeButtonStyle:n})=>t?e.jsx("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.6)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3,...i},onClick:r,children:e.jsxs("div",{style:{position:"relative",backgroundColor:"#fff",borderRadius:12,width:"90vw",maxWidth:700,maxHeight:"90vh",overflowY:"auto",padding:24,boxShadow:"0 10px 40px rgba(0,0,0,0.25)",...c},onClick:l=>l.stopPropagation(),children:[e.jsx("button",{onClick:r,"aria-label":"Close modal",style:{position:"absolute",top:16,right:16,background:"transparent",border:"none",cursor:"pointer",padding:4,color:"#444",transition:"color 0.2s ease",...n},onMouseEnter:l=>l.currentTarget.style.color="#000",onMouseLeave:l=>l.currentTarget.style.color="#444",children:e.jsx(De,{size:24})}),a]})}):null,xt={xs:24,sm:32,md:40,lg:48,xl:56,"2xl":64},Yr={xs:6,sm:8,md:10,lg:12,xl:14,"2xl":16},ht={xs:10,sm:12,md:14,lg:16,xl:18,"2xl":20},gt=t=>{switch(t){case"square":return"0px";case"rounded":return"8px";case"circular":default:return"50%"}},Vr=(t,r)=>{switch(t){case"top-left":return{top:1,left:1};case"top-right":return{top:1,right:1};case"bottom-left":return{bottom:1,left:1};case"bottom-right":default:return{bottom:1,right:1}}},Hr=(t,r)=>{switch(t){case"tight":return-(r*.5);case"loose":return-(r*.15);case"normal":default:return-(r*.35)}},bt=({src:t,alt:r="User Avatar",size:a="md",variant:i="circular",isOnline:c=!1,isOffline:n=!1,className:l="",style:d,statusClassName:S="",statusStyle:j,statusPosition:v="bottom-right",fallback:f,ring:b=!1,ringColor:x="#3b82f6",onClick:w})=>{const[m,C]=s.useState(!1),[g,y]=s.useState(!1),E=xt[a],T=Yr[a],_=ht[a],A=gt(i),R=f||r.split(" ").map(N=>N[0]).join("").toUpperCase().slice(0,2);let M="",X="";c?(M="#10b981",X="Online"):n&&(M="#6b7280",X="Offline");const F=c||n,Y=t&&!m,$=!!w;return e.jsxs("div",{style:{position:"relative",width:E,height:E,borderRadius:A,overflow:"visible",display:"inline-block",flexShrink:0,cursor:$?"pointer":"default",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",transform:g&&$?"scale(1.05)":"scale(1)",boxShadow:b?`0 0 0 3px ${x}20, 0 0 0 1px ${x}`:g&&$?"0 8px 25px -8px rgba(0, 0, 0, 0.3)":"0 1px 3px rgba(0, 0, 0, 0.1)",...d},className:l,"aria-label":r,role:$?"button":"img",tabIndex:$?0:-1,onClick:w,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),onKeyDown:N=>{$&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),w?.())},children:[Y?e.jsx("div",{style:{borderRadius:A,overflow:"hidden",width:"100%",height:"100%"},children:e.jsx("img",{src:t,alt:r,width:E,height:E,loading:"lazy",onError:()=>C(!0),style:{width:"100%",height:"100%",objectFit:"cover",objectPosition:"center",display:"block",transition:"opacity 0.2s ease-in-out"}})}):e.jsx("div",{style:{width:"100%",height:"100%",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",fontSize:_,fontWeight:"600",borderRadius:A,position:"relative"},children:R?e.jsx("span",{style:{userSelect:"none"},children:R}):e.jsx(hr,{size:E*.5,strokeWidth:1.5})}),F&&e.jsx("div",{className:S,style:{position:"absolute",width:T,height:T,borderRadius:"50%",backgroundColor:M,border:"2px solid white",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.12)",...Vr(v),...j},"aria-label":X,title:X})]})},Xr=({avatars:t,max:r=4,size:a="md",className:i="",style:c,spacing:n="normal",direction:l="left"})=>{const d=xt[a],S=ht[a],j=t.slice(0,r),v=t.length-r,f=Hr(n,d);return e.jsxs("div",{style:{display:"flex",alignItems:"center",flexDirection:l==="right"?"row-reverse":"row",...c},className:i,"aria-label":`Avatar group with ${t.length} members`,role:"group",children:[j.map((b,x)=>{const w=l==="left"?x===0:x===j.length-1,m=l==="left"?j.length-x:x+1;return e.jsx("div",{style:{marginLeft:l==="left"&&!w?f:0,marginRight:l==="right"&&!w?f:0,position:"relative",zIndex:m,transition:"transform 0.2s cubic-bezier(0.4, 0, 0.2, 1)"},className:"group-hover:translate-x-1",onMouseEnter:C=>{const g=C.currentTarget;g.style.transform=`translateY(-2px) ${l==="right"?"translateX(4px)":"translateX(-4px)"}`,g.style.zIndex="100"},onMouseLeave:C=>{const g=C.currentTarget;g.style.transform="translateY(0) translateX(0)",g.style.zIndex=m.toString()},children:e.jsx("div",{style:{border:"3px solid white",borderRadius:gt(b.variant||"circular"),boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},children:e.jsx(bt,{...b,size:a,style:{boxShadow:"none"}})})},x)}),v>0&&e.jsxs("div",{style:{marginLeft:l==="left"?f:0,marginRight:l==="right"?f:0,width:d,height:d,borderRadius:"50%",background:"linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%)",color:"#374151",fontSize:S*.9,fontWeight:"600",display:"flex",justifyContent:"center",alignItems:"center",border:"3px solid white",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",userSelect:"none",cursor:"default",flexShrink:0,position:"relative",zIndex:0,transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)"},"aria-label":`${v} more members`,title:`${v} more members`,onMouseEnter:b=>{const x=b.currentTarget;x.style.transform="translateY(-2px) scale(1.05)",x.style.background="linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%)"},onMouseLeave:b=>{const x=b.currentTarget;x.style.transform="translateY(0) scale(1)",x.style.background="linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%)"},children:["+",v]})]})},Ur=[{src:"https://www.soundjay.com/misc/sounds/bell-ringing-05.wav",title:"Morning Bell",artist:"Nature Sounds",duration:"0:15",thumbnail:"https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=300&h=300&fit=crop"},{src:"https://www.soundjay.com/buttons/sounds/button-4.wav",title:"Digital Click",artist:"Tech Audio",duration:"0:05",thumbnail:"https://images.unsplash.com/photo-1514525253161-7a46d19cd819?w=300&h=300&fit=crop"},{src:"https://www.soundjay.com/buttons/sounds/button-10.wav",title:"Soft Chime",artist:"Ambient Studio",duration:"0:08",thumbnail:"https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=300&h=300&fit=crop"}];function qr({tracks:t=Ur,className:r="",galleryTitle:a="Audio Gallery",primaryColor:i="#8b5cf6",backgroundColor:c="#0f0f23",textColor:n="#e4e4e7",secondaryColor:l="#1a1a2e",border:d=0,borderColor:S,maxWidth:j=420,autoplay:v=!1,loop:f=!1}){const[b,x]=s.useState(null),[w,m]=s.useState(!1),[C,g]=s.useState(0),[y,E]=s.useState(0),[T,_]=s.useState(.7),[A,R]=s.useState(!1),[M,X]=s.useState(f),[F,Y]=s.useState(!1),[$,N]=s.useState(!1),[J,k]=s.useState(!1),h=s.useRef(null),I=s.useRef(null),V=s.useRef(null);s.useEffect(()=>{h.current&&(h.current.volume=T)},[T]),s.useEffect(()=>{h.current&&(h.current.loop=M)},[M]),s.useEffect(()=>{b===null&&h.current&&(h.current.pause(),m(!1),g(0),E(0))},[b]);const U=p=>{if(b===p){if(!h.current)return;h.current.paused?(h.current.play().catch(()=>{}),m(!0)):(h.current.pause(),m(!1))}else x(p),setTimeout(()=>{h.current&&(h.current.play().catch(()=>{}),m(!0))},100)},o=()=>{h.current&&(g(h.current.currentTime),h.current.duration&&E(h.current.duration))},z=p=>{if(!h.current||!y)return;const B=p.currentTarget.getBoundingClientRect(),Z=(p.clientX-B.left)/B.width*y;h.current.currentTime=Z,g(Z)},L=p=>{const B=p.currentTarget.getBoundingClientRect(),W=(p.clientX-B.left)/B.width,Z=Math.max(0,Math.min(1,W));_(Z)},q=p=>{if(h.current&&y){let B=h.current.currentTime+p;B=Math.min(Math.max(B,0),y),h.current.currentTime=B,g(B)}},K=()=>{if(b===null)return;let p;F?p=Math.floor(Math.random()*t.length):p=(b+1)%t.length,U(p)},D=()=>{if(b===null)return;let p;F?p=Math.floor(Math.random()*t.length):p=(b-1+t.length)%t.length,U(p)},G=()=>{_(p=>p>0?0:.7)},ne=()=>{k(!0),V.current&&clearTimeout(V.current),V.current=setTimeout(()=>{k(!1)},3e3)},u=p=>{if(isNaN(p))return"0:00";const B=Math.floor(p/60),Q=Math.floor(p%60);return`${B}:${Q<10?"0":""}${Q}`},O=b!==null?t[b]:null;return e.jsxs("div",{className:r,style:{maxWidth:`${j}px`,margin:"20px auto",background:`linear-gradient(145deg, ${c}, ${l})`,color:n,borderRadius:"24px",padding:"24px 16px",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",userSelect:"none",backdropFilter:"blur(20px)",border:`${d}px solid ${S}40`},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"24px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:`linear-gradient(135deg, ${i}, ${l})`,display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(tt,{size:20,color:"white"})}),e.jsxs("div",{children:[e.jsx("h2",{style:{margin:0,fontSize:"1.25rem",fontWeight:"700",color:i},children:a}),e.jsxs("p",{style:{margin:0,fontSize:"0.875rem",opacity:.7},children:[t.length," tracks"]})]})]}),e.jsx("button",{onClick:()=>Y(!F),style:{background:F?i:"transparent",border:"none",borderRadius:"12px",padding:"8px",cursor:"pointer",transition:"all 0.3s ease",opacity:F?1:.6},"aria-label":"Toggle Shuffle",children:e.jsx(cr,{size:18,color:F?"white":n})})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",marginBottom:"20px",maxHeight:"240px",overflowY:"auto",paddingRight:"4px"},children:t.map((p,B)=>{const Q=b===B,W=Q&&w;return e.jsxs("div",{onClick:()=>U(B),style:{display:"flex",alignItems:"center",padding:"12px 16px",borderRadius:"16px",background:Q?`linear-gradient(135deg, ${i}20, ${i}10)`:"rgba(255,255,255,0.05)",border:Q?`1px solid ${i}40`:"1px solid transparent",cursor:"pointer",transition:"all 0.3s ease",backdropFilter:Q?"blur(20px)":"none"},children:[e.jsxs("div",{style:{width:"48px",height:"48px",borderRadius:"12px",background:p.thumbnail?`url(${p.thumbnail}) center/cover`:i,display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",position:"relative",overflow:"hidden"},children:[!p.thumbnail&&e.jsx(tt,{size:20,color:"white"}),W&&e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"rgba(0,0,0,0.6)",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx("div",{style:{width:"16px",height:"16px",display:"flex",gap:"2px",alignItems:"end",justifyContent:"center"},children:[0,1,2].map(Z=>e.jsx("div",{style:{width:"3px",background:"white",borderRadius:"2px",animation:`equalizer 1s ease-in-out infinite ${Z*.2}s`,height:"12px"}},Z))})})]}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:"600",fontSize:"0.95rem",color:Q?i:n,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:p.title}),p.artist&&e.jsx("div",{style:{fontSize:"0.8rem",opacity:.7,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:p.artist})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[p.duration&&e.jsx("span",{style:{fontSize:"0.8rem",opacity:.6},children:p.duration}),e.jsx("div",{style:{width:"32px",height:"32px",borderRadius:"8px",background:Q?i:"rgba(255,255,255,0.1)",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease"},children:W?e.jsx(Be,{size:16,color:"white"}):e.jsx(Le,{size:16,color:"white"})})]})]},B)})}),O&&e.jsxs("div",{ref:I,style:{background:`linear-gradient(135deg, ${l}, ${c})`,borderRadius:"20px",padding:"20px",border:`1px solid ${i}40`,backdropFilter:"blur(20px)",position:"relative",overflow:"hidden"},children:[O.thumbnail&&e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`url(${O.thumbnail})`,backgroundSize:"cover",backgroundPosition:"center",filter:"blur(60px) opacity(0.1)",transform:"scale(1.1)"}}),e.jsxs("div",{style:{position:"relative",zIndex:1},children:[e.jsxs("div",{style:{textAlign:"center",marginBottom:"20px"},children:[e.jsx("h3",{style:{margin:"0 0 4px 0",fontSize:"1.1rem",fontWeight:"700",color:i},children:O.title}),O.artist&&e.jsx("p",{style:{margin:0,opacity:.7,fontSize:"0.9rem"},children:O.artist})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"20px",marginBottom:"20px"},children:[e.jsx("button",{onClick:D,style:ve(n,"rgba(255,255,255,0.1)"),"aria-label":"Previous Track",children:e.jsx(Oe,{size:20})}),e.jsxs("button",{onClick:()=>q(-10),style:ve(n,"rgba(255,255,255,0.1)"),"aria-label":"Skip back 10 seconds",children:[e.jsx(Oe,{size:16}),e.jsx("span",{style:{fontSize:"0.7rem",marginLeft:"2px"},children:"10"})]}),e.jsx("button",{onClick:()=>{h.current&&(w?(h.current.pause(),m(!1)):(h.current.play().catch(()=>{}),m(!0)))},style:{...ve("#fff",i),width:"60px",height:"60px",borderRadius:"50%",boxShadow:`0 8px 25px ${i}40`},"aria-label":w?"Pause":"Play",children:w?e.jsx(Be,{size:24}):e.jsx(Le,{size:24})}),e.jsxs("button",{onClick:()=>q(10),style:ve(n,"rgba(255,255,255,0.1)"),"aria-label":"Skip forward 10 seconds",children:[e.jsx("span",{style:{fontSize:"0.7rem",marginRight:"2px"},children:"10"}),e.jsx(Fe,{size:16})]}),e.jsx("button",{onClick:K,style:ve(n,"rgba(255,255,255,0.1)"),"aria-label":"Next Track",children:e.jsx(Fe,{size:20})})]}),e.jsxs("div",{style:{marginBottom:"16px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px",fontSize:"0.8rem",opacity:.7},children:[e.jsx("span",{children:u(C)}),e.jsx("span",{children:u(y)})]}),e.jsx("div",{onClick:z,style:{height:"6px",background:"rgba(255,255,255,0.2)",borderRadius:"3px",cursor:"pointer",position:"relative",overflow:"hidden"},children:e.jsx("div",{style:{width:`${C/y*100||0}%`,height:"100%",background:`linear-gradient(90deg, ${i}, #ec4899)`,borderRadius:"3px",position:"relative"},children:e.jsx("div",{style:{position:"absolute",right:"-6px",top:"50%",transform:"translateY(-50%)",width:"12px",height:"12px",background:i,borderRadius:"50%",boxShadow:`0 2px 8px ${i}60`}})})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx("button",{onClick:()=>N(!$),style:ve($?"#ec4899":n,"rgba(255,255,255,0.1)"),"aria-label":"Like",children:e.jsx(Ht,{size:16,fill:$?"#ec4899":"none"})}),e.jsx("button",{onClick:()=>X(!M),style:ve(M?i:n,"rgba(255,255,255,0.1)"),"aria-label":"Toggle Loop",children:e.jsx(qe,{size:16})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},children:[J&&e.jsx("div",{onClick:L,style:{width:"80px",height:"4px",background:"rgba(255,255,255,0.2)",borderRadius:"2px",cursor:"pointer",position:"relative"},children:e.jsx("div",{style:{width:`${T*100}%`,height:"100%",background:i,borderRadius:"2px"}})}),e.jsx("button",{onClick:G,onMouseEnter:ne,style:ve(n,"rgba(255,255,255,0.1)"),"aria-label":T>0?"Mute":"Unmute",children:T>0?e.jsx(Ge,{size:16}):e.jsx(We,{size:16})})]})]})]}),e.jsx("audio",{ref:h,src:O.src,autoPlay:v,loop:M,onTimeUpdate:o,onEnded:()=>{m(!1),M||K()},onLoadedMetadata:o,preload:"metadata",style:{display:"none"}})]}),e.jsx("style",{children:`
|
|
151
|
+
`}),e.jsxs("div",{className:$,style:{...E,animation:`${g.includes("bottom")?"alert-slide-in-bottom":"alert-slide-in-top"} ${l} ease`},role:"alert",children:[e.jsx("div",{style:{color:B,marginTop:"2px"},children:x||H}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[t&&e.jsx("div",{style:{fontWeight:600,fontSize:b,marginBottom:"4px"},children:t}),r&&e.jsx("div",{style:{fontSize:"0.875rem",color:p,lineHeight:1.4},children:r}),f&&e.jsx("div",{style:{marginTop:"8px"},children:f})]}),s&&e.jsx("button",{onClick:()=>{F(!0),setTimeout(()=>{L(!1),a?.()},parseInt(l))},style:{background:"transparent",border:"none",color:"#6b7280",cursor:"pointer",marginLeft:"8px",padding:0,lineHeight:0},"aria-label":"Close alert",children:e.jsx(ye,{size:16})})]})]}):null};ze.displayName="Alert";const _e=d.memo(({items:t,allowMultiple:r=!1,defaultOpen:n=[],borderColor:s="#e5e7eb",backgroundColor:i="#fff",textColor:a="#111827",hoverBgColor:x="#f9fafb",hoverTextColor:f="#111827",contentBgColor:g="#fff",contentTextColor:y="#374151",paddingY:v="1rem",paddingX:c="1rem",marginY:u="0.75rem",borderRadius:j="0.5rem",contentPadding:m="1rem",fontSize:b="1rem",fontWeight:h=600,contentFontSize:p="0.95rem",contentFontWeight:l=400,iconOpen:w="−",iconClose:$="+",iconSize:S="1.25rem",transitionDuration:z="300ms",shadow:L="0 1px 4px rgba(0,0,0,0.08)",className:M="",style:F})=>{const[I,D]=d.useState(n),B=d.useRef([]);d.useEffect(()=>{B.current.forEach((W,E)=>{W&&(W.style.maxHeight=I.includes(E)?`${W.scrollHeight}px`:"0px")})},[I]);const H=W=>{D(E=>r?E.includes(W)?E.filter(T=>T!==W):[...E,W]:E.includes(W)?[]:[W])};return e.jsx("div",{className:M,style:{width:"100%",...F},children:t.map((W,E)=>{const T=I.includes(E);return e.jsxs("div",{style:{border:`1px solid ${s}`,borderRadius:j,margin:`${u} 0`,boxShadow:L,overflow:"hidden",transition:`all ${z} ease`},children:[e.jsxs("button",{onClick:()=>H(E),style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:i,color:a,padding:`${v} ${c}`,fontWeight:h,fontSize:b,cursor:"pointer",border:"none",outline:"none",transition:`all ${z}`},onMouseEnter:V=>{V.currentTarget.style.backgroundColor=x,V.currentTarget.style.color=f},onMouseLeave:V=>{V.currentTarget.style.backgroundColor=i,V.currentTarget.style.color=a},children:[e.jsx("span",{children:W.title}),e.jsx("span",{style:{fontSize:S},children:T?w:$})]}),e.jsx("div",{ref:V=>{B.current[E]=V},style:{overflow:"hidden",maxHeight:T?`${B.current[E]?.scrollHeight}px`:"0px",transition:`max-height ${z} ease-in-out`},children:e.jsx("div",{style:{borderTop:`1px solid ${s}`,backgroundColor:g,color:y,padding:m,fontSize:p,fontWeight:l},children:W.content})})]},E)})})});_e.displayName="Accordion";const Ie={xs:24,sm:32,md:40,lg:48,xl:56,"2xl":64},Ae={xs:10,sm:12,md:14,lg:16,xl:18,"2xl":20},St={xs:6,sm:8,md:10,lg:12,xl:14,"2xl":16},Tt=t=>{switch(t){case"square":return"0px";case"rounded":return"8px";default:return"50%"}},Ct=(t,r)=>{switch(t){case"top-left":return{top:2,left:2};case"top-right":return{top:2,right:2};case"bottom-left":return{bottom:2,left:2};default:return{bottom:2,right:2}}},$t=(t,r)=>{switch(t){case"tight":return-(r*.5);case"loose":return-(r*.15);default:return-(r*.35)}},Le=({src:t,alt:r="User avatar",size:n="md",variant:s="circular",isOnline:i=!1,isOffline:a=!1,className:x="",style:f,statusClassName:g="",statusStyle:y,statusPosition:v="bottom-right",fallback:c,ring:u=!1,ringColor:j="#3b82f6",onClick:m})=>{const[b,h]=d.useState(!1),[p,l]=d.useState(!1),w=n==="responsive",$=w?void 0:Ie[n],S=w?"clamp(10px, 2vw, 16px)":Ae[n],z=w?10:St[n],L=Tt(s),M=c||r.split(" ").map(H=>H[0]).join("").toUpperCase().slice(0,2),F=i?"#10b981":a?"#6b7280":"",I=i?"Online":a?"Offline":"",D=t&&!b,B=!!m;return e.jsxs("div",{className:x,role:B?"button":"img",tabIndex:B?0:-1,"aria-label":r,onClick:m,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onKeyDown:H=>{B&&(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),m?.())},style:{position:"relative",width:w?"100%":$,height:w?"100%":$,borderRadius:L,overflow:"visible",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:B?"pointer":"default",transition:"all 0.25s cubic-bezier(0.4, 0, 0.2, 1)",transform:p&&B?"scale(1.05)":"scale(1)",boxShadow:u?`0 0 0 3px ${j}22, 0 0 0 1px ${j}`:p&&B?"0 6px 16px rgba(0, 0, 0, 0.15)":"0 1px 3px rgba(0, 0, 0, 0.1)",...f},children:[D?e.jsx("img",{src:t,alt:r,onError:()=>h(!0),loading:"lazy",style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:L,transition:"opacity 0.3s ease-in-out"}}):e.jsx("div",{style:{width:"100%",height:"100%",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",color:"#fff",fontSize:S,fontWeight:600,borderRadius:L,display:"flex",alignItems:"center",justifyContent:"center"},children:M||e.jsx(bt,{size:$?$*.5:20})}),(i||a)&&e.jsx("div",{className:g,"aria-label":I,title:I,style:{position:"absolute",width:z,height:z,borderRadius:"50%",backgroundColor:F,border:"2px solid white",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.12)",...Ct(v),...y}})]})},Rt=({avatars:t,max:r=4,size:n="md",className:s="",style:i,spacing:a="normal",direction:x="left"})=>{const f=n==="responsive",g=f?40:Ie[n],y=f?"clamp(10px, 2vw, 14px)":Ae[n],v=$t(a,g),c=t.slice(0,r),u=t.length-r;return e.jsxs("div",{className:s,style:{display:"flex",alignItems:"center",flexDirection:x==="right"?"row-reverse":"row",flexWrap:"wrap",...i},role:"group","aria-label":`Avatar group with ${t.length} members`,children:[c.map((j,m)=>{const b=x==="left"?m===0:m===c.length-1,h=x==="left"?c.length-m:m+1;return e.jsx("div",{style:{marginLeft:x==="left"&&!b?v:0,marginRight:x==="right"&&!b?v:0,zIndex:h,position:"relative",transition:"transform 0.25s cubic-bezier(0.4, 0, 0.2, 1)"},onMouseEnter:p=>{p.currentTarget.style.transform="translateY(-3px) scale(1.05)",p.currentTarget.style.zIndex="100"},onMouseLeave:p=>{p.currentTarget.style.transform="translateY(0) scale(1)",p.currentTarget.style.zIndex=h.toString()},children:e.jsx(Le,{...j,size:n})},m)}),u>0&&e.jsxs("div",{style:{marginLeft:x==="left"?v:0,marginRight:x==="right"?v:0,width:g,height:g,borderRadius:"50%",background:"linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%)",color:"#374151",fontSize:y,fontWeight:600,display:"flex",justifyContent:"center",alignItems:"center",border:"3px solid white",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",userSelect:"none"},title:`${u} more members`,children:["+",u]})]})},Et=({src:t,thumbnail:r,autoPlay:n=!1,loop:s=!1,backgroundColor:i="#000000",primaryColor:a="#10b981",secondaryColor:x="#ffffff",borderRadius:f="12px",padding:g="16px",width:y="100%",className:v})=>{const c=d.useRef(null),u=d.useRef(null),[j,m]=d.useState(n),[b,h]=d.useState(0),[p,l]=d.useState(0),[w,$]=d.useState(.5),[S,z]=d.useState(!1),[L,M]=d.useState(s);d.useEffect(()=>{c.current&&(c.current.volume=w)},[w]),d.useEffect(()=>{c.current&&(c.current.loop=L)},[L]);const F=()=>{c.current&&(j?c.current.pause():c.current.play(),m(!j))},I=()=>{c.current&&(h(c.current.currentTime),l(c.current.duration))},D=E=>{if(!c.current||!E.currentTarget)return;const T=E.currentTarget.getBoundingClientRect(),U=(E.clientX-T.left)/T.width*p;c.current.currentTime=U,h(U)},B=E=>{c.current&&(c.current.currentTime+=E)},H=()=>{u.current&&(S?document.exitFullscreen?.():u.current.requestFullscreen?.(),z(!S))},W=E=>{const T=Math.floor(E/60),V=Math.floor(E%60);return`${T}:${V<10?"0":""}${V}`};return e.jsxs("div",{ref:u,className:v,style:{position:"relative",width:y,backgroundColor:i,borderRadius:f,color:x,boxShadow:"0 4px 12px rgba(0,0,0,0.3)",overflow:"hidden",padding:g,boxSizing:"border-box",maxWidth:"100%"},children:[e.jsx("audio",{ref:c,src:t,autoPlay:n,loop:s,onTimeUpdate:I,onLoadedMetadata:I}),r&&e.jsx("img",{src:r,alt:"Audio Thumbnail",style:{width:"100%",objectFit:"cover",borderRadius:f,marginBottom:"16px",maxHeight:"150px"}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"10px",flexShrink:0,marginTop:"10px"},children:[e.jsx("button",{onClick:()=>B(-10),"aria-label":"Skip Back 10s",children:e.jsx(me,{size:20})}),e.jsx("button",{onClick:F,style:{background:a,borderRadius:"9999px",padding:"10px",color:"#fff",border:"none",cursor:"pointer"},"aria-label":j?"Pause":"Play",children:j?e.jsx(he,{size:20}):e.jsx(ge,{size:20})}),e.jsx("button",{onClick:()=>B(10),"aria-label":"Skip Forward 10s",children:e.jsx(be,{size:20})})]}),e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",gap:"12px",width:"100%"},children:[e.jsxs("div",{style:{flexShrink:0,minWidth:"60px",textAlign:"center"},children:[e.jsx("span",{style:{fontSize:"14px",marginRight:"4px"},children:W(b)}),e.jsxs("span",{style:{fontSize:"14px",color:"#aaa"},children:["/ ",W(p)]})]}),e.jsx("div",{onClick:D,style:{flex:1,height:"8px",background:"#444",borderRadius:"4px",cursor:"pointer",position:"relative",minWidth:"100px"},children:e.jsx("div",{style:{width:`${b/p*100||0}%`,height:"100%",background:a,borderRadius:"4px"}})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",flexShrink:0},children:[e.jsx("button",{onClick:()=>M(!L),"aria-label":"Toggle Loop",children:e.jsx(Re,{size:18,color:L?a:void 0})}),e.jsx("button",{onClick:()=>$(w>0?0:.5),"aria-label":"Toggle Mute",children:w>0?e.jsx(Ee,{size:18}):e.jsx(Me,{size:18})}),e.jsx("button",{onClick:H,"aria-label":"Toggle Fullscreen",children:S?e.jsx(at,{size:18}):e.jsx(st,{size:18})})]})]})]})},Mt=[{src:"https://www.soundjay.com/misc/sounds/bell-ringing-05.wav",title:"Morning Bell",artist:"Nature Sounds",duration:"0:15",thumbnail:"https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=300&h=300&fit=crop"},{src:"https://www.soundjay.com/buttons/sounds/button-4.wav",title:"Digital Click",artist:"Tech Audio",duration:"0:05",thumbnail:"https://images.unsplash.com/photo-1514525253161-7a46d19cd819?w=300&h=300&fit=crop"},{src:"https://www.soundjay.com/buttons/sounds/button-10.wav",title:"Soft Chime",artist:"Ambient Studio",duration:"0:08",thumbnail:"https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=300&h=300&fit=crop"}];function zt({tracks:t=Mt,className:r="",galleryTitle:n="Audio Gallery",primaryColor:s="#8b5cf6",backgroundColor:i="#0f0f23",textColor:a="#e4e4e7",secondaryColor:x="#1a1a2e",border:f=0,borderColor:g,maxWidth:y=420,autoplay:v=!1,loop:c=!1}){const[u,j]=d.useState(null),[m,b]=d.useState(!1),[h,p]=d.useState(0),[l,w]=d.useState(0),[$,S]=d.useState(.7),[z,L]=d.useState(!1),[M,F]=d.useState(c),[I,D]=d.useState(!1),[B,H]=d.useState(!1),[W,E]=d.useState(!1),T=d.useRef(null),V=d.useRef(null),U=d.useRef(null);d.useEffect(()=>{T.current&&(T.current.volume=$)},[$]),d.useEffect(()=>{T.current&&(T.current.loop=M)},[M]),d.useEffect(()=>{u===null&&T.current&&(T.current.pause(),b(!1),p(0),w(0))},[u]);const q=R=>{if(u===R){if(!T.current)return;T.current.paused?(T.current.play().catch(()=>{}),b(!0)):(T.current.pause(),b(!1))}else j(R),setTimeout(()=>{T.current&&(T.current.play().catch(()=>{}),b(!0))},100)},re=()=>{T.current&&(p(T.current.currentTime),T.current.duration&&w(T.current.duration))},o=R=>{if(!T.current||!l)return;const k=R.currentTarget.getBoundingClientRect(),Z=(R.clientX-k.left)/k.width*l;T.current.currentTime=Z,p(Z)},C=R=>{const k=R.currentTarget.getBoundingClientRect(),J=(R.clientX-k.left)/k.width,Z=Math.max(0,Math.min(1,J));S(Z)},N=R=>{if(T.current&&l){let k=T.current.currentTime+R;k=Math.min(Math.max(k,0),l),T.current.currentTime=k,p(k)}},Y=()=>{if(u===null)return;let R;I?R=Math.floor(Math.random()*t.length):R=(u+1)%t.length,q(R)},K=()=>{if(u===null)return;let R;I?R=Math.floor(Math.random()*t.length):R=(u-1+t.length)%t.length,q(R)},ne=()=>{S(R=>R>0?0:.7)},A=()=>{E(!0),U.current&&clearTimeout(U.current),U.current=setTimeout(()=>{E(!1)},3e3)},P=R=>{if(isNaN(R))return"0:00";const k=Math.floor(R/60),_=Math.floor(R%60);return`${k}:${_<10?"0":""}${_}`},G=u!==null?t[u]:null;return e.jsxs("div",{className:r,style:{maxWidth:`${y}px`,margin:"20px auto",background:`linear-gradient(145deg, ${i}, ${x})`,color:a,borderRadius:"24px",padding:"24px 16px",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",userSelect:"none",backdropFilter:"blur(20px)",border:`${f}px solid ${g}40`},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"24px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:`linear-gradient(135deg, ${s}, ${x})`,display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(Te,{size:20,color:"white"})}),e.jsxs("div",{children:[e.jsx("h2",{style:{margin:0,fontSize:"1.25rem",fontWeight:"700",color:s},children:n}),e.jsxs("p",{style:{margin:0,fontSize:"0.875rem",opacity:.7},children:[t.length," tracks"]})]})]}),e.jsx("button",{onClick:()=>D(!I),style:{background:I?s:"transparent",border:"none",borderRadius:"12px",padding:"8px",cursor:"pointer",transition:"all 0.3s ease",opacity:I?1:.6},"aria-label":"Toggle Shuffle",children:e.jsx(ft,{size:18,color:I?"white":a})})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",marginBottom:"20px",maxHeight:"240px",overflowY:"auto",paddingRight:"4px"},children:t.map((R,k)=>{const _=u===k,J=_&&m;return e.jsxs("div",{onClick:()=>q(k),style:{display:"flex",alignItems:"center",padding:"12px 16px",borderRadius:"16px",background:_?`linear-gradient(135deg, ${s}20, ${s}10)`:"rgba(255,255,255,0.05)",border:_?`1px solid ${s}40`:"1px solid transparent",cursor:"pointer",transition:"all 0.3s ease",backdropFilter:_?"blur(20px)":"none"},children:[e.jsxs("div",{style:{width:"48px",height:"48px",borderRadius:"12px",background:R.thumbnail?`url(${R.thumbnail}) center/cover`:s,display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",position:"relative",overflow:"hidden"},children:[!R.thumbnail&&e.jsx(Te,{size:20,color:"white"}),J&&e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"rgba(0,0,0,0.6)",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx("div",{style:{width:"16px",height:"16px",display:"flex",gap:"2px",alignItems:"end",justifyContent:"center"},children:[0,1,2].map(Z=>e.jsx("div",{style:{width:"3px",background:"white",borderRadius:"2px",animation:`equalizer 1s ease-in-out infinite ${Z*.2}s`,height:"12px"}},Z))})})]}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:"600",fontSize:"0.95rem",color:_?s:a,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:R.title}),R.artist&&e.jsx("div",{style:{fontSize:"0.8rem",opacity:.7,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:R.artist})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[R.duration&&e.jsx("span",{style:{fontSize:"0.8rem",opacity:.6},children:R.duration}),e.jsx("div",{style:{width:"32px",height:"32px",borderRadius:"8px",background:_?s:"rgba(255,255,255,0.1)",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease"},children:J?e.jsx(he,{size:16,color:"white"}):e.jsx(ge,{size:16,color:"white"})})]})]},k)})}),G&&e.jsxs("div",{ref:V,style:{background:`linear-gradient(135deg, ${x}, ${i})`,borderRadius:"20px",padding:"20px",border:`1px solid ${s}40`,backdropFilter:"blur(20px)",position:"relative",overflow:"hidden"},children:[G.thumbnail&&e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`url(${G.thumbnail})`,backgroundSize:"cover",backgroundPosition:"center",filter:"blur(60px) opacity(0.1)",transform:"scale(1.1)"}}),e.jsxs("div",{style:{position:"relative",zIndex:1},children:[e.jsxs("div",{style:{textAlign:"center",marginBottom:"20px"},children:[e.jsx("h3",{style:{margin:"0 0 4px 0",fontSize:"1.1rem",fontWeight:"700",color:s},children:G.title}),G.artist&&e.jsx("p",{style:{margin:0,opacity:.7,fontSize:"0.9rem"},children:G.artist})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"20px",marginBottom:"20px"},children:[e.jsx("button",{onClick:K,style:ie(a,"rgba(255,255,255,0.1)"),"aria-label":"Previous Track",children:e.jsx(me,{size:20})}),e.jsxs("button",{onClick:()=>N(-10),style:ie(a,"rgba(255,255,255,0.1)"),"aria-label":"Skip back 10 seconds",children:[e.jsx(me,{size:16}),e.jsx("span",{style:{fontSize:"0.7rem",marginLeft:"2px"},children:"10"})]}),e.jsx("button",{onClick:()=>{T.current&&(m?(T.current.pause(),b(!1)):(T.current.play().catch(()=>{}),b(!0)))},style:{...ie("#fff",s),width:"60px",height:"60px",borderRadius:"50%",boxShadow:`0 8px 25px ${s}40`},"aria-label":m?"Pause":"Play",children:m?e.jsx(he,{size:24}):e.jsx(ge,{size:24})}),e.jsxs("button",{onClick:()=>N(10),style:ie(a,"rgba(255,255,255,0.1)"),"aria-label":"Skip forward 10 seconds",children:[e.jsx("span",{style:{fontSize:"0.7rem",marginRight:"2px"},children:"10"}),e.jsx(be,{size:16})]}),e.jsx("button",{onClick:Y,style:ie(a,"rgba(255,255,255,0.1)"),"aria-label":"Next Track",children:e.jsx(be,{size:20})})]}),e.jsxs("div",{style:{marginBottom:"16px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px",fontSize:"0.8rem",opacity:.7},children:[e.jsx("span",{children:P(h)}),e.jsx("span",{children:P(l)})]}),e.jsx("div",{onClick:o,style:{height:"6px",background:"rgba(255,255,255,0.2)",borderRadius:"3px",cursor:"pointer",position:"relative",overflow:"hidden"},children:e.jsx("div",{style:{width:`${h/l*100||0}%`,height:"100%",background:`linear-gradient(90deg, ${s}, #ec4899)`,borderRadius:"3px",position:"relative"},children:e.jsx("div",{style:{position:"absolute",right:"-6px",top:"50%",transform:"translateY(-50%)",width:"12px",height:"12px",background:s,borderRadius:"50%",boxShadow:`0 2px 8px ${s}60`}})})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx("button",{onClick:()=>H(!B),style:ie(B?"#ec4899":a,"rgba(255,255,255,0.1)"),"aria-label":"Like",children:e.jsx(et,{size:16,fill:B?"#ec4899":"none"})}),e.jsx("button",{onClick:()=>F(!M),style:ie(M?s:a,"rgba(255,255,255,0.1)"),"aria-label":"Toggle Loop",children:e.jsx(Re,{size:16})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},children:[W&&e.jsx("div",{onClick:C,style:{width:"80px",height:"4px",background:"rgba(255,255,255,0.2)",borderRadius:"2px",cursor:"pointer",position:"relative"},children:e.jsx("div",{style:{width:`${$*100}%`,height:"100%",background:s,borderRadius:"2px"}})}),e.jsx("button",{onClick:ne,onMouseEnter:A,style:ie(a,"rgba(255,255,255,0.1)"),"aria-label":$>0?"Mute":"Unmute",children:$>0?e.jsx(Ee,{size:16}):e.jsx(Me,{size:16})})]})]})]}),e.jsx("audio",{ref:T,src:G.src,autoPlay:v,loop:M,onTimeUpdate:re,onEnded:()=>{b(!1),M||Y()},onLoadedMetadata:re,preload:"metadata",style:{display:"none"}})]}),e.jsx("style",{children:`
|
|
279
152
|
@keyframes equalizer {
|
|
280
153
|
0%, 100% { height: 4px; }
|
|
281
154
|
50% { height: 12px; }
|
|
@@ -292,24 +165,30 @@ React keys must be passed directly to JSX without using spread:
|
|
|
292
165
|
}
|
|
293
166
|
|
|
294
167
|
div::-webkit-scrollbar-thumb {
|
|
295
|
-
background: ${
|
|
168
|
+
background: ${s};
|
|
296
169
|
border-radius: 2px;
|
|
297
170
|
}
|
|
298
171
|
|
|
299
172
|
div::-webkit-scrollbar-thumb:hover {
|
|
300
|
-
background: ${
|
|
173
|
+
background: ${s}dd;
|
|
301
174
|
}
|
|
302
|
-
`})]})}function
|
|
303
|
-
@keyframes
|
|
304
|
-
|
|
305
|
-
|
|
175
|
+
`})]})}function ie(t,r){return{border:"none",backgroundColor:r,color:t,cursor:"pointer",padding:"10px",borderRadius:"12px",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease",backdropFilter:"blur(10px)"}}const _t=d.memo(({text:t,color:r="#2563eb",textColor:n="#fff",borderColor:s="#2563eb",borderWidth:i="0",icon:a,iconPosition:x="left",rounded:f=!1,borderRadius:g,fontSize:y="13px",fontWeight:v=500,horizontalPadding:c="10px",verticalPadding:u="4px",margin:j="0",shadow:m="0 1px 3px rgba(0,0,0,0.1)",notificationDot:b=!1,dotColor:h="#ef4444",count:p,pulse:l=!1,style:w,className:$="",onClick:S})=>{const z={display:"inline-flex",alignItems:"center",justifyContent:"center",backgroundColor:r,color:n,border:`${i} solid ${s}`,borderRadius:g||(f?"9999px":"6px"),padding:`${u} ${c}`,fontSize:y,fontWeight:v,margin:j,boxShadow:m,position:"relative",cursor:S?"pointer":"default",userSelect:"none",lineHeight:1,transition:"all 0.2s ease",...w},L={position:"absolute",top:"-4px",right:"-4px",height:"8px",width:"8px",backgroundColor:h,borderRadius:"50%",animation:l?"pulseAnim 1.2s infinite":void 0},M={position:"absolute",top:"-8px",right:"-8px",backgroundColor:h,color:"#fff",borderRadius:"50%",minWidth:"18px",height:"18px",fontSize:"11px",padding:"0 5px",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1},F={display:"flex",alignItems:"center",margin:a&&t?x==="left"?"0 6px 0 0":"0 0 0 6px":0};return e.jsxs("span",{style:z,className:$,onClick:S,children:[b&&e.jsx("span",{style:L}),typeof p<"u"&&e.jsx("span",{style:M,children:p}),a&&x==="left"&&e.jsx("span",{style:F,children:a}),t&&e.jsx("span",{children:t}),a&&x==="right"&&e.jsx("span",{style:F,children:a}),e.jsx("style",{children:`
|
|
176
|
+
@keyframes pulseAnim {
|
|
177
|
+
0% { transform: scale(1); opacity: 1; }
|
|
178
|
+
50% { transform: scale(1.5); opacity: 0.5; }
|
|
179
|
+
100% { transform: scale(1); opacity: 1; }
|
|
306
180
|
}
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
@keyframes fadeIn {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}
|
|
315
|
-
|
|
181
|
+
`})]})}),It={light:{default:"#111",primary:"#2563eb",success:"#16a34a",danger:"#dc2626",white:"#ffffff",muted:"#6b7280",border:"#d1d5db",hover:"#1d4ed8",text:"#ffffff"},dark:{default:"#f8fafc",primary:"#60a5fa",success:"#22c55e",danger:"#f87171",white:"#ffffff",muted:"#9ca3af",border:"#374151",hover:"#3b82f6",text:"#000000"}};function fe(t,r){return!t.startsWith("#")||t.length!==7?t:"#"+t.replace(/^#/,"").replace(/../g,n=>("0"+Math.min(255,Math.max(0,parseInt(n,16)+r)).toString(16)).slice(-2))}const At=({children:t,type:r="button",onClick:n,iconBefore:s,iconAfter:i,className:a="",style:x,fullWidth:f=!1,disabled:g=!1,loading:y=!1,loadingText:v="Loading...",darkMode:c=!1,baseColor:u,size:j="md",rounded:m=!0,showBorder:b=!1})=>{const[h,p]=d.useState(!1),l=d.useMemo(()=>{if(!u)return It[c?"dark":"light"];const z={primary:u,hover:fe(u,-40),text:"#ffffff",border:fe(u,-60)},L={primary:fe(u,60),hover:fe(u,80),text:"#000000",border:fe(u,40)};return c?L:z},[u,c]),$={sm:{px:16,py:6,font:"0.85rem"},md:{px:24,py:10,font:"1rem"},lg:{px:32,py:14,font:"1.125rem"}}[j],S={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"8px",padding:`${$.py}px ${$.px}px`,fontSize:$.font,fontWeight:500,borderRadius:m?8:3,border:b?`1px solid ${l.border}`:"none",width:f?"100%":"auto",backgroundColor:h&&!g?l.hover:l.primary,color:l.text,cursor:g?"not-allowed":"pointer",opacity:g?.6:1,transition:"all 0.25s ease-in-out",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.15)",...x};return e.jsxs("button",{type:r,className:a,style:S,onClick:!g&&!y?n:void 0,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),disabled:g,children:[y?e.jsxs(e.Fragment,{children:[e.jsx("span",{style:{width:"16px",height:"16px",border:"2px solid currentColor",borderTopColor:"transparent",borderRadius:"50%",animation:"spin 1s linear infinite"}}),e.jsx("span",{children:v})]}):e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{children:s}),e.jsx("span",{children:t}),i&&e.jsx("span",{children:i})]}),e.jsx("style",{children:`
|
|
182
|
+
@keyframes spin {
|
|
183
|
+
to { transform: rotate(360deg); }
|
|
184
|
+
}
|
|
185
|
+
`})]})},Lt=({as:t,children:r,className:n="",variant:s="elevated",background:i="#fff",textColor:a="#000",borderRadius:x=12,border:f,boxShadow:g,hoverShadow:y,padding:v=16,margin:c,width:u,height:j,style:m={},hoverStyle:b={},onClick:h,...p},l)=>{const w=t||"div",$={elevated:{boxShadow:g||"0 4px 12px rgba(0,0,0,0.08)",border:f||"none"},outline:{border:f||"1px solid rgba(0,0,0,0.1)",boxShadow:"none"},flat:{border:"none",boxShadow:"none"}},S={background:i,color:a,borderRadius:x,padding:v,margin:c,width:u,height:j,transition:"all 0.25s ease",cursor:h?"pointer":void 0,boxSizing:"border-box",...$[s]||{},...m},z=M=>{Object.assign(M.currentTarget.style,y?{boxShadow:y}:b)},L=M=>{Object.assign(M.currentTarget.style,{...S,...$[s]||{}})};return e.jsx(w,{ref:l,className:`ui-card ${n}`,style:S,onClick:h,onMouseEnter:z,onMouseLeave:L,...p,children:r})},Bt=d.forwardRef(Lt),Nt=Object.assign(Bt,{displayName:"Card"}),Pt=({name:t,options:r,selectedValues:n=[],onChange:s,disabled:i=!1,readOnly:a=!1,required:x=!1,error:f,className:g="",customIcon:y,style:v,labelStyle:c,iconSize:u=20,iconCheckedBgColor:j="#2563eb",iconUncheckedBorderColor:m="#9ca3af",textColor:b="#374151",errorStyle:h})=>{const p=l=>{if(!s)return;const w=n.includes(l)?n.filter($=>$!==l):[...n,l];s(w)};return e.jsxs("div",{className:g,style:{display:"flex",flexDirection:"column",gap:8,...v},role:"group","aria-disabled":i,children:[r.map(l=>{const w=n.includes(l.value);return e.jsxs("label",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:i?"not-allowed":"pointer",opacity:i?.6:1,gap:8,userSelect:"none",...c},children:[e.jsx("span",{style:{color:b,fontSize:14},children:l.label}),e.jsx("input",{type:"checkbox",name:t,value:l.value,checked:w,disabled:i||a,required:x,onChange:()=>p(l.value),style:{display:"none"}}),y?y(w):e.jsx("span",{style:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:u,height:u,borderRadius:4,border:`2px solid ${w?j:m}`,backgroundColor:w?j:"transparent",transition:"all 0.25s ease"},children:w&&e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",style:{width:u*.6,height:u*.6},children:e.jsx("polyline",{points:"20 6 9 17 4 12"})})})]},l.value)}),f&&e.jsx("p",{role:"alert",style:{color:"#dc2626",fontSize:12,marginTop:4,...h},children:f})]})},Ot=({name:t,options:r,selectedValue:n,onChange:s,disabled:i=!1,readOnly:a=!1,required:x=!1,error:f,className:g="",style:y,labelStyle:v,iconSize:c=20,iconCheckedBgColor:u="#2563eb",iconUncheckedBorderColor:j="#9ca3af",textColor:m="#374151",errorStyle:b})=>e.jsxs("div",{className:g,style:{display:"flex",flexDirection:"column",gap:8,...y},role:"radiogroup","aria-disabled":i,children:[r.map(h=>{const p=n===h.value;return e.jsxs("label",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:i?"not-allowed":"pointer",opacity:i?.6:1,gap:8,userSelect:"none",...v},children:[e.jsx("span",{style:{color:m,fontSize:14},children:h.label}),e.jsx("input",{type:"radio",name:t,value:h.value,checked:p,disabled:i||a,required:x,onChange:()=>s&&s(h.value),style:{display:"none"}}),e.jsx("span",{style:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:c,height:c,borderRadius:"50%",border:`2px solid ${p?u:j}`,backgroundColor:p?u:"transparent",transition:"all 0.25s ease"},children:p&&e.jsx("span",{style:{width:c/2,height:c/2,borderRadius:"50%",backgroundColor:"white"}})})]},h.value)}),f&&e.jsx("p",{role:"alert",style:{color:"#dc2626",fontSize:12,marginTop:4,...b},children:f})]}),Wt=({name:t,options:r,selectedValues:n=[],onChange:s,disabled:i=!1,readOnly:a=!1,required:x=!1,error:f,className:g="",style:y,labelStyle:v,iconSize:c=20,iconCheckedBgColor:u="#2563eb",switchBgColor:j="#d1d5db",textColor:m="#374151",errorStyle:b})=>{const h=p=>{if(!s)return;const l=n.includes(p)?n.filter(w=>w!==p):[...n,p];s(l)};return e.jsxs("div",{className:g,style:{display:"flex",flexDirection:"column",gap:8,...y},role:"group","aria-disabled":i,children:[r.map(p=>{const l=n.includes(p.value);return e.jsxs("label",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:i?"not-allowed":"pointer",opacity:i?.6:1,gap:8,userSelect:"none",...v},children:[e.jsx("span",{style:{color:m,fontSize:14},children:p.label}),e.jsx("input",{type:"checkbox",name:t,value:p.value,checked:l,disabled:i||a,required:x,onChange:()=>h(p.value),style:{display:"none"}}),e.jsx("span",{style:{position:"relative",width:c*2,height:c*1.1,borderRadius:9999,backgroundColor:l?u:j,transition:"background-color 0.25s ease"},children:e.jsx("span",{style:{position:"absolute",top:"50%",left:l?`calc(100% - ${c-4}px - 2px)`:"2px",transform:"translateY(-50%)",width:c-4,height:c-4,borderRadius:"50%",backgroundColor:"#fff",boxShadow:"0 1px 2px rgba(0,0,0,0.3)",transition:"left 0.25s ease"}})})]},p.value)}),f&&e.jsx("p",{role:"alert",style:{color:"#dc2626",fontSize:12,marginTop:4,...b},children:f})]})},Yt={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px",full:"100%"},Ft=({size:t="lg",padding:r=0,margin:n="0 auto",backgroundColor:s="transparent",center:i=!0,width:a,height:x="auto",borderRadius:f=0,style:g,className:y="",children:v})=>{const c=d.useMemo(()=>{const u=typeof r=="number"?`${r}px`:r,j=i&&n==="0 auto"?"0 auto":n,m=typeof f=="number"?`${f}px`:f;return{maxWidth:a??Yt[t],margin:j,padding:u,backgroundColor:s,height:x,borderRadius:m,boxSizing:"border-box",width:a??"100%",...g}},[t,r,n,s,a,x,f,i,g]);return e.jsx("div",{className:y,style:c,children:v})},Dt=t=>t<768?"sm":t<1024?"md":"lg",Q=(t,r,n)=>t==null?n:typeof t!="object"?t:t[r]??n,Ht=({direction:t={sm:"column",md:"row",lg:"row"},align:r="center",justify:n="space-between",wrap:s="wrap",gap:i=16,padding:a,margin:x,backgroundColor:f="transparent",width:g="100%",maxWidth:y="100%",height:v="auto",borderRadius:c,border:u,boxShadow:j,overflow:m,children:b,style:h,className:p})=>{const[l,w]=d.useState("lg");d.useEffect(()=>{const S=()=>w(Dt(window.innerWidth));return S(),window.addEventListener("resize",S),()=>window.removeEventListener("resize",S)},[]);const $=d.useMemo(()=>{const S=z=>typeof z=="number"?`${z}px`:z;return{display:"flex",flexDirection:Q(t,l,"row"),alignItems:Q(r,l,"center"),justifyContent:Q(n,l,"flex-start"),flexWrap:Q(s,l,"wrap"),gap:S(Q(i,l,void 0)),padding:S(Q(a,l,void 0)),margin:S(Q(x,l,void 0)),backgroundColor:Q(f,l,void 0),width:Q(g,l,"100%"),maxWidth:Q(y,l,void 0),height:Q(v,l,void 0),borderRadius:Q(c,l,void 0),border:Q(u,l,void 0),boxShadow:Q(j,l,void 0),overflow:Q(m,l,void 0),boxSizing:"border-box",...h}},[t,r,n,s,i,a,x,f,g,y,v,c,u,j,m,l,h]);return e.jsx("div",{className:p,style:$,children:b})},Vt=t=>t<768?"sm":t<1024?"md":"lg",ee=(t,r,n)=>t==null?n:typeof t!="object"?t:t[r]??n,ve=({direction:t={sm:"vertical",md:"horizontal",lg:"horizontal"},gap:r=12,align:n="center",justify:s="flex-start",wrap:i="nowrap",padding:a,margin:x,width:f="100%",maxWidth:g,height:y="auto",backgroundColor:v="transparent",borderRadius:c,border:u,boxShadow:j,overflow:m,className:b,style:h,children:p})=>{const[l,w]=d.useState("lg");d.useEffect(()=>{const S=()=>w(Vt(window.innerWidth));return S(),window.addEventListener("resize",S),()=>window.removeEventListener("resize",S)},[]);const $=d.useMemo(()=>{const S=M=>typeof M=="number"?`${M}px`:M;return{display:"flex",flexDirection:ee(t,l,"vertical")==="vertical"?"column":"row",alignItems:ee(n,l,"center"),justifyContent:ee(s,l,"flex-start"),flexWrap:ee(i,l,"nowrap"),gap:S(ee(r,l,12)),padding:S(ee(a,l,void 0)),margin:S(ee(x,l,void 0)),width:ee(f,l,"100%"),maxWidth:ee(g,l,void 0),height:ee(y,l,void 0),backgroundColor:ee(v,l,void 0),borderRadius:ee(c,l,void 0),border:ee(u,l,void 0),boxShadow:ee(j,l,void 0),overflow:ee(m,l,void 0),boxSizing:"border-box",...h}},[t,r,n,s,i,a,x,f,g,y,v,c,u,j,m,h,l]);return e.jsx("div",{className:b,style:$,children:p})},Ut=t=>e.jsx(ve,{direction:"horizontal",...t}),qt=t=>e.jsx(ve,{direction:"vertical",...t}),Ce=t=>t<768?"sm":t<1024?"md":"lg",Gt=({columns:t={sm:1,md:2,lg:3},gap:r=16,padding:n=0,alignItems:s="stretch",justifyItems:i="stretch",backgroundColor:a="transparent",width:x="100%",maxWidth:f="100%",height:g="auto",margin:y=0,style:v,className:c="",children:u})=>{const[j,m]=d.useState("lg");d.useEffect(()=>{m(Ce(window.innerWidth));const p=()=>m(Ce(window.innerWidth));return window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[]);const b=d.useMemo(()=>typeof t=="number"?t:t[j]??1,[t,j]),h=d.useMemo(()=>({display:"grid",gridTemplateColumns:`repeat(${b}, 1fr)`,gap:typeof r=="number"?`${r}px`:r,padding:typeof n=="number"?`${n}px`:n,margin:typeof y=="number"?`${y}px`:y,alignItems:s,justifyItems:i,backgroundColor:a,width:x,maxWidth:f,height:g,boxSizing:"border-box",...v}),[b,r,n,y,s,i,a,x,f,g,v]);return e.jsx("div",{style:h,className:c,children:u})},Xt=({label:t="Open Drawer",icon:r,iconPosition:n="left",onClick:s,color:i="#2563eb",textColor:a="#fff",borderRadius:x="6px",padding:f="10px 16px",fontSize:g="14px",gap:y="8px",style:v,className:c=""})=>e.jsxs("button",{onClick:s,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",backgroundColor:i,color:a,border:"none",borderRadius:x,padding:f,fontSize:g,gap:y,cursor:"pointer",fontWeight:500,transition:"all 0.2s ease",boxShadow:"0 1px 3px rgba(0,0,0,0.1)",...v},className:c,children:[r&&n==="left"&&r,t,r&&n==="right"&&r]}),Jt=({open:t,onClose:r,position:n="right",width:s="320px",height:i="320px",backgroundColor:a="#fff",backdropColor:x="rgba(0,0,0,0.5)",transitionDuration:f=300,style:g,className:y="",children:v,showCloseButton:c=!0,closeIconColor:u="#000",closeButtonStyle:j})=>{const[m,b]=d.useState(t);d.useEffect(()=>{t?b(!0):setTimeout(()=>b(!1),f)},[t,f]);const h=d.useMemo(()=>{if(t)return"translate(0, 0)";switch(n){case"left":return"translateX(-100%)";case"right":return"translateX(100%)";case"top":return"translateY(-100%)";case"bottom":return"translateY(100%)";default:return"translate(0, 0)"}},[t,n]),p={position:"fixed",backgroundColor:a,transition:`transform ${f}ms ease, opacity ${f}ms ease`,transform:h,opacity:t?1:0,zIndex:1001,...g,...n==="left"||n==="right"?{top:0,bottom:0,[n]:0,width:s,height:"100%"}:{left:0,right:0,[n]:0,height:i,width:"100%"}},l={position:"fixed",inset:0,backgroundColor:x,opacity:t?1:0,transition:`opacity ${f}ms ease`,zIndex:1e3,display:m?"block":"none",pointerEvents:t?"auto":"none"},w={position:"absolute",top:"12px",right:"12px",background:"none",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease, opacity 0.2s ease"};return e.jsxs(e.Fragment,{children:[e.jsx("div",{style:l,onClick:r}),e.jsxs("div",{style:{...p,display:"flex",flexDirection:"column",visibility:m?"visible":"hidden",pointerEvents:t?"auto":"none",boxShadow:"0 0 20px rgba(0,0,0,0.15)"},className:y,children:[c&&e.jsx("button",{onClick:r,style:{...w,...j},"aria-label":"Close drawer",children:e.jsx(ye,{size:22,color:u})}),e.jsx("div",{style:{flex:1,overflowY:"auto",padding:"16px",scrollbarWidth:"thin"},children:v})]})]})},Zt={light:{controlBg:"#ffffff",menuBg:"#ffffff",textColor:"#111827",placeholderColor:"#6b7280",hoverBg:"#f9fafb",selectedBg:"#eff6ff",disabledBg:"#f3f4f6",disabledTextColor:"#9ca3af",borderColor:"#e5e7eb",accentColor:"#3b82f6"},dark:{controlBg:"#1f2937",menuBg:"#111827",textColor:"#f9fafb",placeholderColor:"#9ca3af",hoverBg:"#374151",selectedBg:"#2563eb33",disabledBg:"#374151",disabledTextColor:"#6b7280",borderColor:"#374151",accentColor:"#60a5fa"},custom:{}},Kt=(t,r)=>{d.useId();const{options:n,value:s,values:i,defaultValue:a,defaultValues:x,onChange:f,placeholder:g="Select...",disabled:y=!1,searchable:v=!1,multiSelect:c=!1,clearable:u=!1,virtualized:j=!1,width:m="100%",dropdownMaxHeight:b="320px",borderRadius:h="8px",boxShadow:p="0 8px 28px rgba(0,0,0,0.1)",borderColor:l,accentColor:w,theme:$="light",menuBg:S,controlBg:z,textColor:L,hoverBg:M,selectedBg:F,disabledBg:I,disabledTextColor:D,placeholderColor:B,transitionDuration:H="180ms",className:W,controlClassName:E,menuClassName:T,optionClassName:V,style:U,controlStyle:q,menuStyle:re,optionStyle:o,iconPrefix:C,iconSuffix:N,clearIcon:Y="×",dropdownIcon:K="▾",checkIcon:ne="✓"}=t,A={...Zt[$],...$==="custom"?{}:{}},P={borderColor:l??A.borderColor,accentColor:w??A.accentColor,controlBg:z??A.controlBg,menuBg:S??A.menuBg,textColor:L??A.textColor,hoverBg:M??A.hoverBg,selectedBg:F??A.selectedBg,disabledBg:I??A.disabledBg,disabledTextColor:D??A.disabledTextColor,placeholderColor:B??A.placeholderColor},[G,R]=d.useState(!1),[k,_]=d.useState(x??(a?[a]:[]));d.useEffect(()=>{s&&_([s]),i&&_(i)},[s,i]);const J=d.useMemo(()=>n.filter(O=>k.includes(O.value)),[n,k]),Z=()=>!y&&R(O=>!O),se=O=>{if(c){const ae=k.includes(O)?k.filter(te=>te!==O):[...k,O];_(ae),f?.(ae)}else _([O]),f?.(O),R(!1)},le=O=>{O?.stopPropagation(),_([]),f?.(c?[]:"")};return e.jsxs("div",{ref:r,className:W,style:{position:"relative",width:m,fontFamily:"Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial",...U},children:[e.jsxs("div",{className:E,role:"button",tabIndex:0,onClick:Z,style:{display:"flex",justifyContent:"space-between",alignItems:"center",background:P.controlBg,color:P.textColor,padding:"0.5rem 0.75rem",border:`1px solid ${G?P.accentColor:P.borderColor}`,borderRadius:h,cursor:y?"not-allowed":"pointer",boxShadow:G?`0 0 0 3px ${P.accentColor}33`:void 0,transition:`all ${H} ease`,...q},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[C,J.length?e.jsx("span",{children:J.map(O=>O.label).join(", ")}):e.jsx("span",{style:{color:P.placeholderColor},children:g})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[u&&k.length>0&&e.jsx("button",{onClick:le,style:{background:"transparent",border:"none",color:P.textColor,cursor:"pointer"},children:Y}),N,e.jsx("div",{style:{transform:G?"rotate(180deg)":"rotate(0deg)",transition:`transform ${H}`},children:K})]})]}),G&&e.jsx("ul",{className:T,style:{position:"absolute",zIndex:100,top:"calc(100% + 4px)",left:0,right:0,background:P.menuBg,border:`1px solid ${P.borderColor}`,borderRadius:h,boxShadow:p,maxHeight:b,overflowY:"auto",transition:`opacity ${H} ease`,...re},children:n.map(O=>{const oe=k.includes(O.value);return e.jsxs("li",{onClick:()=>!O.disabled&&se(O.value),className:V,style:{display:"flex",alignItems:"center",gap:8,padding:"0.5rem 0.75rem",background:O.disabled?P.disabledBg:oe?P.selectedBg:"transparent",color:O.disabled?P.disabledTextColor:P.textColor,cursor:O.disabled?"not-allowed":"pointer",borderRadius:6,userSelect:"none",...o},onMouseEnter:ae=>{!O.disabled&&!oe&&(ae.currentTarget.style.backgroundColor=P.hoverBg)},onMouseLeave:ae=>{!O.disabled&&!oe&&(ae.currentTarget.style.backgroundColor="transparent")},children:[c&&e.jsx("span",{style:{width:18,textAlign:"center"},children:oe?ne:"○"}),O.icon&&e.jsx("span",{children:O.icon}),e.jsxs("div",{style:{flex:1},children:[O.label,O.description&&e.jsx("div",{style:{fontSize:12,color:P.placeholderColor,marginTop:2},children:O.description})]})]},O.value)})})]})},Qt=d.forwardRef(Kt),er=d.forwardRef((t,r)=>{const{type:n="text",label:s,placeholder:i="",name:a="",value:x,defaultValue:f,onChange:g,disabled:y=!1,readOnly:v=!1,required:c=!1,error:u,success:j=!1,autoFocus:m=!1,iconLeft:b,iconRight:h,labelColor:p="#374151",placeholderColor:l="#9ca3af",backgroundColor:w="#ffffff",textColor:$="#111827",borderColor:S="#d1d5db",hoverBorderColor:z="#9ca3af",focusBorderColor:L="#2563eb",errorColor:M="#dc2626",successColor:F="#16a34a",iconColor:I="#6b7280",shadow:D="0 1px 2px rgba(0,0,0,0.05)",size:B="md",fontSize:H="14px",fontFamily:W="Inter, system-ui, sans-serif",radius:E="8px",rows:T=4,cols:V,maxLength:U,resize:q=!0,showCharacterCount:re=!0,paddingX:o,paddingY:C,className:N,style:Y}=t,K=d.useRef(null),[ne,A]=d.useState(f||""),[P,G]=d.useState(!1);d.useImperativeHandle(r,()=>K.current);const R=te=>{const ce=te.target.value;U&&ce.length>U||(A(ce),g&&g(a,ce))},k=x!==void 0?x:ne,_=u?M:j?F:S,J={sm:{paddingY:"6px",paddingX:"10px",font:"13px"},md:{paddingY:"10px",paddingX:"14px",font:"14px"},lg:{paddingY:"14px",paddingX:"18px",font:"16px"}}[B],Z=o||J.paddingX,se=C||J.paddingY,le={width:"100%",border:`1px solid ${_}`,borderRadius:E,backgroundColor:w,color:$,fontFamily:W,fontSize:H,padding:`${se} ${Z}`,paddingLeft:b?"40px":Z,paddingRight:h||n==="password"?"40px":Z,outline:"none",transition:"border-color 0.25s ease, box-shadow 0.25s ease",resize:n==="textarea"&&!q?"none":void 0,boxShadow:D,...Y},O={"::placeholder":{color:l,opacity:1}},oe=(te,ce)=>{te&&(te.style.borderColor=ce)},ae={onFocus:te=>oe(te.currentTarget,L),onBlur:te=>oe(te.currentTarget,_),onMouseEnter:te=>oe(te.currentTarget,z),onMouseLeave:te=>oe(te.currentTarget,_)};return e.jsxs("div",{className:N,style:{width:"100%",display:"flex",flexDirection:"column",fontFamily:W},children:[s&&e.jsxs("label",{htmlFor:a,style:{marginBottom:6,color:p,fontWeight:500,fontSize:"14px"},children:[s,c&&e.jsx("span",{style:{color:M},children:" *"})]}),e.jsxs("div",{style:{position:"relative",width:"100%"},children:[b&&e.jsx("span",{style:{position:"absolute",left:12,top:"50%",transform:"translateY(-50%)",color:I,pointerEvents:"none"},children:b}),n==="textarea"?e.jsx("textarea",{ref:K,name:a,value:k,placeholder:i,disabled:y,readOnly:v,rows:T,cols:V,maxLength:U,autoFocus:m,style:{...le,...O},onChange:R,...ae}):e.jsx("input",{ref:K,id:a,type:n==="password"?P?"text":"password":n,name:a,value:k,placeholder:i,disabled:y,readOnly:v,autoFocus:m,style:{...le,...O},onChange:R,...ae}),n==="password"&&e.jsx("button",{type:"button",onClick:()=>G(!P),style:{position:"absolute",right:10,top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",cursor:"pointer",color:I,padding:0},children:P?e.jsx(Je,{size:18}):e.jsx(Ke,{size:18})}),h&&n!=="password"&&e.jsx("span",{style:{position:"absolute",right:12,top:"50%",transform:"translateY(-50%)",color:I,pointerEvents:"none"},children:h})]}),n==="textarea"&&re&&U&&e.jsxs("div",{style:{textAlign:"right",fontSize:"12px",color:"#6b7280",marginTop:4},children:[k.length,"/",U]}),u&&e.jsx("div",{style:{color:M,fontSize:"12px",marginTop:4},children:u})]})}),tr=({src:t,alt:r="Image",title:n,width:s="100%",height:i="auto",borderRadius:a="8px",borderColor:x="transparent",borderStyle:f="solid",borderWidth:g="0px",shadow:y=!1,boxShadow:v,opacity:c=1,objectFit:u="cover",overlayText:j,overlayColor:m="rgba(0,0,0,0.5)",svgIcon:b,responsive:h=!1,padding:p,margin:l,lazyLoad:w=!0,hoverOpacity:$,hoverShadow:S=!1,hoverScale:z=1,hoverRotate:L=0,transitionDuration:M="0.3s",overflow:F="hidden",className:I,style:D,onClick:B,onLoad:H,onError:W})=>{const E=d.useMemo(()=>({width:h?"100%":s,height:h?"auto":i,borderRadius:a,border:`${g} ${f} ${x}`,objectFit:u,opacity:c,boxShadow:y?v||"0 4px 12px rgba(0,0,0,0.15)":"none",transition:`all ${M} ease`,display:"block"}),[h,s,i,a,x,f,g,u,c,y,v,M]),T=d.useCallback(q=>{q.currentTarget.style.opacity=$!==void 0?$.toString():"1",q.currentTarget.style.boxShadow=S?"0 8px 20px rgba(0,0,0,0.3)":E.boxShadow||"none",q.currentTarget.style.transform=`scale(${z}) rotate(${L}deg)`},[$,S,z,L,E.boxShadow]),V=d.useCallback(q=>{q.currentTarget.style.opacity=E.opacity?.toString()||"1",q.currentTarget.style.boxShadow=E.boxShadow||"none",q.currentTarget.style.transform="scale(1) rotate(0deg)"},[E]),U=d.useMemo(()=>{switch(F){case"x":return{overflowX:"hidden"};case"y":return{overflowY:"hidden"};default:return{overflow:F}}},[F]);return e.jsxs("div",{className:I,role:"img","aria-label":r,title:n||r,onClick:B,style:{width:h?"100%":s,height:h?"auto":i,padding:p,margin:l,position:"relative",cursor:B?"pointer":"default",display:"inline-block",transition:`all ${M} ease`,...U,...D},children:[b?e.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:b}):e.jsx("img",{src:t,alt:r,title:n||r,loading:w?"lazy":"eager",style:E,onClick:B,onMouseEnter:T,onMouseLeave:V,onLoad:H,onError:W,decoding:"async",fetchPriority:"high"}),j&&e.jsx("div",{style:{position:"absolute",inset:0,backgroundColor:m,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",fontSize:"1.1rem",textAlign:"center",padding:"1rem",boxSizing:"border-box"},children:j})]})},Be=({text:t,icon:r,onClick:n,subItems:s,bulletColor:i="#2563eb",textColor:a="#111827",fontSize:x="15px",fontWeight:f=500,spacing:g="12px",isInline:y=!1})=>{const v={display:"flex",flexDirection:"column",gap:"6px",marginBottom:y?"0":g},c={display:"flex",alignItems:"center",gap:"8px",fontSize:x,fontWeight:f,color:a,cursor:n?"pointer":"default",transition:"color 0.2s ease, transform 0.2s ease"},u={width:"8px",height:"8px",backgroundColor:i,borderRadius:"50%",flexShrink:0},j={listStyleType:"disc",paddingLeft:"20px",margin:0};return e.jsxs("li",{style:v,children:[e.jsxs("div",{style:c,onClick:n,onMouseEnter:m=>m.currentTarget.style.color=i,onMouseLeave:m=>m.currentTarget.style.color=a,children:[r?e.jsx("span",{style:{fontSize:"16px",color:a},children:r}):!y&&e.jsx("span",{style:u}),e.jsx("span",{children:t})]}),s&&s.length>0&&e.jsx("ul",{style:j,children:s.map((m,b)=>e.jsx(Be,{...m,bulletColor:i,textColor:a,fontSize:x,fontWeight:f,spacing:g,isInline:!1},b))})]})},rr=({title:t,titleIcon:r,items:n,type:s="unordered",bulletColor:i="#2563eb",textColor:a="#111827",backgroundColor:x="#fff",borderColor:f="#e5e7eb",fontSize:g="15px",fontWeight:y=500,borderRadius:v="12px",padding:c="16px",spacing:u="12px",className:j,style:m})=>{const b=s==="ordered",h=s==="inline",p={backgroundColor:x,borderColor:f,color:a,borderWidth:f?"1px":"0px",borderStyle:"solid",borderRadius:v,padding:c,...m},l=h?{display:"flex",gap:u,paddingLeft:0,listStyleType:"none",margin:0}:{listStyleType:b?"decimal":"none",paddingLeft:b?"20px":"0",margin:0},w=b?"ol":"ul";return e.jsxs("div",{className:j,style:p,children:[t&&e.jsxs("div",{style:{display:"flex",alignItems:"center",fontSize:"17px",fontWeight:600,marginBottom:"10px",gap:"8px"},children:[r&&e.jsx("span",{style:{fontSize:"18px"},children:r}),e.jsx("span",{children:t})]}),e.jsx(w,{style:l,children:n.map(($,S)=>e.jsx(Be,{...$,bulletColor:i,textColor:a,fontSize:g,fontWeight:y,spacing:u,isInline:h},S))})]})},nr=({isOpen:t,onClose:r,children:n,ariaLabel:s,title:i,overlayStyle:a,modalStyle:x,closeButtonStyle:f,disableOverlayClose:g=!1,transitionDuration:y=200,className:v,darkMode:c=!1})=>{const u=d.useRef(null);d.useEffect(()=>{const p=l=>{l.key==="Escape"&&r()};return t&&document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[t,r]),d.useEffect(()=>{if(t){const p=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=p}}},[t]);const j=d.useCallback(()=>{g||r()},[g,r]);if(!t)return null;const m={position:"fixed",inset:0,backgroundColor:c?"rgba(0,0,0,0.8)":"rgba(0,0,0,0.6)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3,opacity:t?1:0,transition:`opacity ${y}ms ease`,...a},b={position:"relative",backgroundColor:c?"#1f1f1f":"#fff",color:c?"#f5f5f5":"#111",borderRadius:12,width:"90vw",maxWidth:700,maxHeight:"90vh",overflowY:"auto",padding:24,boxShadow:c?"0 10px 40px rgba(0,0,0,0.7)":"0 10px 40px rgba(0,0,0,0.25)",transform:t?"scale(1)":"scale(0.95)",transition:`transform ${y}ms ease, opacity ${y}ms ease`,...x},h={position:"absolute",top:16,right:16,background:"transparent",border:"none",cursor:"pointer",padding:4,color:c?"#f5f5f5":"#444",transition:"color 0.2s ease, transform 0.2s ease",...f};return e.jsx("div",{role:"dialog","aria-modal":"true","aria-label":s||i||"Modal",style:m,onClick:j,className:v,children:e.jsxs("div",{ref:u,style:b,onClick:p=>p.stopPropagation(),children:[e.jsx("button",{onClick:r,"aria-label":"Close modal",style:h,onMouseEnter:p=>{p.currentTarget.style.color=c?"#fff":"#000",p.currentTarget.style.transform="scale(1.1)"},onMouseLeave:p=>{p.currentTarget.style.color=c?"#f5f5f5":"#444",p.currentTarget.style.transform="scale(1)"},children:e.jsx(ye,{size:24})}),i&&e.jsx("h2",{style:{fontSize:"1.25rem",fontWeight:600,marginBottom:"1rem"},children:i}),n]})})},sr=({children:t,style:r,className:n})=>e.jsx("table",{className:n,style:{width:"100%",borderCollapse:"collapse",borderSpacing:0,...r},children:t}),or=({children:t,style:r,className:n})=>e.jsx("thead",{className:n,style:{backgroundColor:"#f9fafb",borderBottom:"2px solid #e5e7eb",...r},children:t}),ar=({children:t,style:r,className:n})=>e.jsx("tbody",{className:n,style:r,children:t}),lr=({children:t,style:r,className:n})=>e.jsx("tr",{className:n,style:{borderBottom:"1px solid #e5e7eb",transition:"background 0.2s ease",...r},children:t}),ir=({children:t,style:r,className:n})=>e.jsx("th",{className:n,style:{textAlign:"left",padding:"12px 16px",fontWeight:600,fontSize:"0.875rem",color:"#374151",...r},children:t}),cr=({children:t,style:r,className:n})=>e.jsx("td",{className:n,style:{padding:"12px 16px",fontSize:"0.875rem",color:"#4b5563",...r},children:t}),dr=({tabs:t,defaultActive:r=0,position:n="top",variant:s="solid",fullWidth:i=!1,gap:a=8,radius:x=8,padding:f="12px 18px",transitionDuration:g=200,elevation:y=1,bordered:v=!1,primaryColor:c="#2563eb",backgroundColor:u="transparent",textColor:j="#374151",hoverColor:m="#1d4ed8",activeColor:b="#ffffff",borderColor:h="#e5e7eb",disabledColor:p="#9ca3af",responsiveBreakpoint:l=768,showDrawerLabel:w="Select Tab",drawerIcon:$="☰",onTabChange:S,className:z="",style:L,tabClassName:M="",contentClassName:F="",activeTabStyle:I,inactiveTabStyle:D,contentStyle:B})=>{const[H,W]=d.useState(r),[E,T]=d.useState(null),[V,U]=d.useState(!1),[q,re]=d.useState(!1),o=d.useRef(null);d.useEffect(()=>{const k=()=>U(window.innerWidth<=l);return k(),window.addEventListener("resize",k),()=>window.removeEventListener("resize",k)},[l]);const C=k=>{t[k].disabled||(W(k),S?.(k),V&&re(!1))},N=(k,_)=>{k.key==="ArrowRight"||k.key==="ArrowDown"?(k.preventDefault(),C((_+1)%t.length)):(k.key==="ArrowLeft"||k.key==="ArrowUp")&&(k.preventDefault(),C((_-1+t.length)%t.length))},Y={padding:f,borderRadius:x,cursor:"pointer",display:"flex",alignItems:"center",gap:8,justifyContent:"center",fontWeight:500,transition:`all ${g}ms ease`,background:"transparent",border:s==="outline"?`1px solid ${h}`:"none",borderBottom:s==="underline"?"2px solid transparent":void 0,color:j,width:i?"100%":"auto",userSelect:"none"},K={background:s==="solid"?c:"transparent",color:b,borderBottom:s==="underline"?`2px solid ${c}`:void 0,boxShadow:y>0?`0 ${y}px ${y*4}px ${c}33`:void 0,...I},ne={...s==="outline"?{borderColor:h}:s==="underline"?{borderBottomColor:"transparent"}:{},...D},A={color:m,background:s==="solid"?`${c}11`:s==="outline"?`${c}11`:"transparent"},P={color:p,cursor:"not-allowed",opacity:.6},G={flexGrow:1,borderTop:v&&n==="top"?`1px solid ${h}`:void 0,borderLeft:v&&n==="left"?`1px solid ${h}`:void 0,borderRight:v&&n==="right"?`1px solid ${h}`:void 0,borderRadius:x,...B},R=n==="left"||n==="right";return e.jsxs("div",{ref:o,className:`modern-tabs ${z}`,style:{display:"flex",flexDirection:R?n==="right"?"row-reverse":"row":"column",background:u,border:v?`1px solid ${h}`:void 0,borderRadius:x,overflow:"hidden",...L},children:[e.jsx("style",{children:`
|
|
186
|
+
@keyframes tab-fade {
|
|
187
|
+
from { opacity: 0; transform: translateY(5px); }
|
|
188
|
+
to { opacity: 1; transform: translateY(0); }
|
|
189
|
+
}
|
|
190
|
+
.modern-tabs__content {
|
|
191
|
+
animation: tab-fade ${g}ms ease;
|
|
192
|
+
}
|
|
193
|
+
`}),V?e.jsxs("div",{style:{width:"100%",padding:8},children:[e.jsxs("button",{onClick:()=>re(!q),style:{...Y,...K,justifyContent:"space-between",width:"100%",fontSize:16},children:[w,e.jsx("span",{children:$})]}),q&&e.jsx("div",{style:{display:"flex",flexDirection:"column",marginTop:8,gap:a},children:t.map((k,_)=>{const J=_===H,Z=E===_,se=k.disabled;return e.jsxs("button",{disabled:se,onClick:()=>C(_),onKeyDown:le=>N(le,_),onMouseEnter:()=>T(_),onMouseLeave:()=>T(null),className:M,style:{...Y,...J?K:ne,...Z&&!J&&!se?A:{},...se?P:{}},children:[k.icon&&e.jsx("span",{children:k.icon}),k.label]},_)})})]}):e.jsx("div",{style:{display:"flex",flexDirection:R?"column":"row",gap:a,padding:8,minWidth:R?200:void 0},children:t.map((k,_)=>{const J=_===H,Z=E===_,se=k.disabled;return e.jsxs("button",{disabled:se,onClick:()=>C(_),onKeyDown:le=>N(le,_),onMouseEnter:()=>T(_),onMouseLeave:()=>T(null),className:M,style:{...Y,...J?K:ne,...Z&&!J&&!se?A:{},...se?P:{}},role:"tab","aria-selected":J,children:[k.icon&&e.jsx("span",{children:k.icon}),k.label]},_)})}),e.jsx("div",{className:`modern-tabs__content ${F}`,style:G,role:"tabpanel",children:t[H]?.content})]})};function pe(t,r){return"#"+t.replace(/^#/,"").replace(/../g,n=>("0"+Math.min(255,Math.max(0,parseInt(n,16)+r)).toString(16)).slice(-2))}const ur={light:{default:"#111",primary:"#2563eb",secondary:"#64748b",success:"#16a34a",danger:"#dc2626",white:"#ffffff",muted:"#6b7280"},dark:{default:"#f8fafc",primary:"#60a5fa",secondary:"#94a3b8",success:"#22c55e",danger:"#f87171",white:"#ffffff",muted:"#9ca3af"}};function fr({as:t,children:r,color:n="default",size:s="md",weight:i="normal",align:a="left",transform:x="none",italic:f=!1,underline:g=!1,strikethrough:y=!1,truncate:v=!1,selectable:c=!0,hoverable:u=!1,onClick:j,darkMode:m=!1,baseColor:b,className:h="",style:p={},...l}){const w=t||"p",$=d.useMemo(()=>{if(!b)return ur[m?"dark":"light"];const I={default:"#111",primary:b,secondary:pe(b,-50),success:pe(b,-30),danger:"#dc2626",white:"#ffffff",muted:"#6b7280"},D={default:"#f8fafc",primary:pe(b,80),secondary:pe(b,120),success:pe(b,100),danger:"#f87171",white:"#ffffff",muted:"#9ca3af"};return m?D:I},[b,m]),S={xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.25rem",xl:"1.5rem","2xl":"2rem"},z={color:$[n]||n,fontSize:S[s]||s,fontWeight:i,textAlign:a,textTransform:x,fontStyle:f?"italic":"normal",textDecoration:g?"underline":y?"line-through":"none",userSelect:c?"text":"none",overflow:v?"hidden":void 0,whiteSpace:v?"nowrap":void 0,textOverflow:v?"ellipsis":void 0,cursor:j?"pointer":"default",transition:"all 0.25s ease-in-out",...p},F={className:h,style:z,onClick:j,onMouseEnter:I=>{if(!u)return;const D=I.currentTarget;D instanceof HTMLElement&&(D.style.opacity="0.8")},onMouseLeave:I=>{if(!u)return;const D=I.currentTarget;D instanceof HTMLElement&&(D.style.opacity="1")},...l};return d.createElement(w,F,r)}exports.Accordion=_e;exports.Alert=ze;exports.AudioGallery=zt;exports.AudioPlayer=Et;exports.Avatar=Le;exports.AvatarGroup=Rt;exports.Badge=_t;exports.Button=At;exports.Card=Nt;exports.CheckboxGroup=Pt;exports.Container=Ft;exports.Drawer=Jt;exports.DrawerButton=Xt;exports.Dropdown=Qt;exports.Flexbox=Ht;exports.GridView=Gt;exports.HStack=Ut;exports.Image=tr;exports.Input=er;exports.List=rr;exports.Modal=nr;exports.RadioGroup=Ot;exports.Stack=ve;exports.SwitchGroup=Wt;exports.TBody=ar;exports.TD=cr;exports.TH=ir;exports.THead=or;exports.TRow=lr;exports.Table=sr;exports.Tabs=dr;exports.Text=fr;exports.VStack=qt;
|
|
194
|
+
//# sourceMappingURL=index.cjs.js.map
|